@sparted/shared-library 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const S3_URL_RE = /https:\/\/sparted-prod-([^.]+)\.s3\.
|
|
5
|
+
const S3_URL_RE = /https:\/\/sparted-prod-([^.]+)\.s3(\.eu-west-1)?(\.amazonaws\.com)?(\.fr-par\.scw\.cloud)?([^?]+)/;
|
|
6
6
|
const extractInfoFromUrl = (url) => {
|
|
7
7
|
const matchS3Url = url.match(S3_URL_RE);
|
|
8
8
|
if (!matchS3Url) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-info-from-url.util.js","sources":["../../../src/cdn/utils/extract-info-from-url.util.ts"],"sourcesContent":["type ExtractInfoFromUrl = (url: string) =>\n| {\n instanceId: string;\n path: string;\n}\n| undefined;\n\nconst S3_URL_RE = /https:\\/\\/sparted-prod-([^.]+)\\.s3\\.
|
|
1
|
+
{"version":3,"file":"extract-info-from-url.util.js","sources":["../../../src/cdn/utils/extract-info-from-url.util.ts"],"sourcesContent":["type ExtractInfoFromUrl = (url: string) =>\n| {\n instanceId: string;\n path: string;\n}\n| undefined;\n\nconst S3_URL_RE = /https:\\/\\/sparted-prod-([^.]+)\\.s3(\\.eu-west-1)?(\\.amazonaws\\.com)?(\\.fr-par\\.scw\\.cloud)?([^?]+)/;\n\nexport const extractInfoFromUrl: ExtractInfoFromUrl = (url) => {\n const matchS3Url = url.match(S3_URL_RE);\n\n if (!matchS3Url) {\n return undefined;\n }\n\n const instanceId = matchS3Url[1];\n const path = matchS3Url[5];\n\n return { instanceId, path };\n};\n"],"names":[],"mappings":";;;;AAOA,MAAM,SAAS,GAAG,mGAAmG,CAAC;AAEzG,MAAA,kBAAkB,GAAuB,CAAC,GAAG,KAAI;IAC5D,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAExC,IAAI,CAAC,UAAU,EAAE;AACf,QAAA,OAAO,SAAS,CAAC;AAClB,KAAA;AAED,IAAA,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACjC,IAAA,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAE3B,IAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AAC9B;;;;"}
|