@prismicio/next 1.3.5 → 1.3.6
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.
- package/dist/lib/getPreviewCookieRepositoryName.cjs +1 -1
- package/dist/lib/getPreviewCookieRepositoryName.cjs.map +1 -1
- package/dist/lib/getPreviewCookieRepositoryName.js +1 -1
- package/dist/lib/getPreviewCookieRepositoryName.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +1 -1
- package/src/lib/getPreviewCookieRepositoryName.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const getPreviewCookieRepositoryName = (previewCookie) => {
|
|
4
|
-
return (decodeURIComponent(previewCookie).match(
|
|
4
|
+
return (decodeURIComponent(previewCookie).match(/"([^"]+)\.prismic\.io"/) || [])[1];
|
|
5
5
|
};
|
|
6
6
|
exports.getPreviewCookieRepositoryName = getPreviewCookieRepositoryName;
|
|
7
7
|
//# sourceMappingURL=getPreviewCookieRepositoryName.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPreviewCookieRepositoryName.cjs","sources":["../../../src/lib/getPreviewCookieRepositoryName.ts"],"sourcesContent":["/**\n * Extracts preview reference repo name from stringified Prismic preview cookie\n *\n * @param previewCookie - The Prismic preview cookie.\n *\n * @returns The repository name for the Prismic preview cookie. If the cookie\n * represents an inactive preview session, `undefined` will be returned.\n */\nexport const getPreviewCookieRepositoryName = (\n\tpreviewCookie: string,\n): string | undefined => {\n\treturn (decodeURIComponent(previewCookie).match(
|
|
1
|
+
{"version":3,"file":"getPreviewCookieRepositoryName.cjs","sources":["../../../src/lib/getPreviewCookieRepositoryName.ts"],"sourcesContent":["/**\n * Extracts preview reference repo name from stringified Prismic preview cookie\n *\n * @param previewCookie - The Prismic preview cookie.\n *\n * @returns The repository name for the Prismic preview cookie. If the cookie\n * represents an inactive preview session, `undefined` will be returned.\n */\nexport const getPreviewCookieRepositoryName = (\n\tpreviewCookie: string,\n): string | undefined => {\n\treturn (decodeURIComponent(previewCookie).match(/\"([^\"]+)\\.prismic\\.io\"/) ||\n\t\t[])[1];\n};\n"],"names":[],"mappings":";;AAQa,MAAA,iCAAiC,CAC7C,kBACuB;AACf,UAAA,mBAAmB,aAAa,EAAE,MAAM,wBAAwB,KACvE,CAAA,GAAI,CAAC;AACP;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const getPreviewCookieRepositoryName = (previewCookie) => {
|
|
2
|
-
return (decodeURIComponent(previewCookie).match(
|
|
2
|
+
return (decodeURIComponent(previewCookie).match(/"([^"]+)\.prismic\.io"/) || [])[1];
|
|
3
3
|
};
|
|
4
4
|
export {
|
|
5
5
|
getPreviewCookieRepositoryName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPreviewCookieRepositoryName.js","sources":["../../../src/lib/getPreviewCookieRepositoryName.ts"],"sourcesContent":["/**\n * Extracts preview reference repo name from stringified Prismic preview cookie\n *\n * @param previewCookie - The Prismic preview cookie.\n *\n * @returns The repository name for the Prismic preview cookie. If the cookie\n * represents an inactive preview session, `undefined` will be returned.\n */\nexport const getPreviewCookieRepositoryName = (\n\tpreviewCookie: string,\n): string | undefined => {\n\treturn (decodeURIComponent(previewCookie).match(
|
|
1
|
+
{"version":3,"file":"getPreviewCookieRepositoryName.js","sources":["../../../src/lib/getPreviewCookieRepositoryName.ts"],"sourcesContent":["/**\n * Extracts preview reference repo name from stringified Prismic preview cookie\n *\n * @param previewCookie - The Prismic preview cookie.\n *\n * @returns The repository name for the Prismic preview cookie. If the cookie\n * represents an inactive preview session, `undefined` will be returned.\n */\nexport const getPreviewCookieRepositoryName = (\n\tpreviewCookie: string,\n): string | undefined => {\n\treturn (decodeURIComponent(previewCookie).match(/\"([^\"]+)\\.prismic\\.io\"/) ||\n\t\t[])[1];\n};\n"],"names":[],"mappings":"AAQa,MAAA,iCAAiC,CAC7C,kBACuB;AACf,UAAA,mBAAmB,aAAa,EAAE,MAAM,wBAAwB,KACvE,CAAA,GAAI,CAAC;AACP;"}
|
package/dist/package.json.cjs
CHANGED
package/dist/package.json.js
CHANGED
package/package.json
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
export const getPreviewCookieRepositoryName = (
|
|
10
10
|
previewCookie: string,
|
|
11
11
|
): string | undefined => {
|
|
12
|
-
return (decodeURIComponent(previewCookie).match(
|
|
12
|
+
return (decodeURIComponent(previewCookie).match(/"([^"]+)\.prismic\.io"/) ||
|
|
13
13
|
[])[1];
|
|
14
14
|
};
|