Commit iniziale
This commit is contained in:
13
node_modules/@azure/msal-common/dist/url/IUri.d.ts
generated
vendored
Normal file
13
node_modules/@azure/msal-common/dist/url/IUri.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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
|
||||
1
node_modules/@azure/msal-common/dist/url/IUri.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/url/IUri.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"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"}
|
||||
49
node_modules/@azure/msal-common/dist/url/UrlString.d.ts
generated
vendored
Normal file
49
node_modules/@azure/msal-common/dist/url/UrlString.d.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
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
|
||||
1
node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"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"}
|
||||
172
node_modules/@azure/msal-common/dist/url/UrlString.mjs
generated
vendored
Normal file
172
node_modules/@azure/msal-common/dist/url/UrlString.mjs
generated
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
/*! @azure/msal-common v15.1.1 2025-02-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
|
||||
1
node_modules/@azure/msal-common/dist/url/UrlString.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-common/dist/url/UrlString.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"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,QA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