@cloudflare/pages-shared 0.11.7 → 0.11.9
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Headers as WorkerHeaders,
|
|
3
|
+
HTMLRewriter as WorkerHTMLRewriter,
|
|
3
4
|
Request as WorkerRequest,
|
|
4
5
|
Response as WorkerResponse,
|
|
5
|
-
HTMLRewriter as WorkerHTMLRewriter,
|
|
6
6
|
} from "@cloudflare/workers-types/experimental";
|
|
7
7
|
import type {
|
|
8
|
+
CacheStorage as WorkerCacheStorage,
|
|
8
9
|
fetch as workerFetch,
|
|
9
10
|
ReadableStream as WorkerReadableStream,
|
|
10
|
-
CacheStorage as WorkerCacheStorage,
|
|
11
11
|
} from "@cloudflare/workers-types/experimental";
|
|
12
12
|
|
|
13
13
|
declare global {
|
|
@@ -29,4 +29,9 @@ export type PolyfilledRuntimeEnvironment = {
|
|
|
29
29
|
Response: typeof Response;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export {
|
|
32
|
+
export {
|
|
33
|
+
workerFetch as fetch,
|
|
34
|
+
WorkerHeaders as Headers,
|
|
35
|
+
WorkerRequest as Request,
|
|
36
|
+
WorkerResponse as Response,
|
|
37
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ANALYTICS_VERSION,
|
|
3
|
-
REDIRECTS_VERSION,
|
|
4
3
|
HEADERS_VERSION,
|
|
5
|
-
SPLAT_REGEX,
|
|
6
4
|
PLACEHOLDER_REGEX,
|
|
5
|
+
REDIRECTS_VERSION,
|
|
6
|
+
SPLAT_REGEX,
|
|
7
7
|
} from "./constants";
|
|
8
8
|
import type { MetadataStaticRedirects } from "../asset-server/metadata";
|
|
9
9
|
import type {
|
|
10
|
+
Logger,
|
|
10
11
|
Metadata,
|
|
11
|
-
MetadataRedirects,
|
|
12
12
|
MetadataHeaders,
|
|
13
|
-
|
|
13
|
+
MetadataRedirects,
|
|
14
14
|
ParsedHeaders,
|
|
15
|
-
|
|
15
|
+
ParsedRedirects,
|
|
16
16
|
} from "./types";
|
|
17
17
|
|
|
18
18
|
export function createMetadataObject({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
MAX_LINE_LENGTH,
|
|
3
|
-
MAX_HEADER_RULES,
|
|
4
2
|
HEADER_SEPARATOR,
|
|
3
|
+
MAX_HEADER_RULES,
|
|
4
|
+
MAX_LINE_LENGTH,
|
|
5
5
|
UNSET_OPERATOR,
|
|
6
6
|
} from "./constants";
|
|
7
7
|
import { validateUrl } from "./validateURL";
|
|
8
|
-
import type { InvalidHeadersRule, ParsedHeaders
|
|
8
|
+
import type { HeadersRule, InvalidHeadersRule, ParsedHeaders } from "./types";
|
|
9
9
|
|
|
10
10
|
// Not strictly necessary to check for all protocols-like beginnings, since _technically_ that could be a legit header (e.g. name=http, value=://I'm a value).
|
|
11
11
|
// But we're checking here since some people might be caught out and it'll help 99.9% of people who get it wrong.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
MAX_LINE_LENGTH,
|
|
3
2
|
MAX_DYNAMIC_REDIRECT_RULES,
|
|
3
|
+
MAX_LINE_LENGTH,
|
|
4
4
|
MAX_STATIC_REDIRECT_RULES,
|
|
5
5
|
PERMITTED_STATUS_CODES,
|
|
6
|
-
SPLAT_REGEX,
|
|
7
6
|
PLACEHOLDER_REGEX,
|
|
7
|
+
SPLAT_REGEX,
|
|
8
8
|
} from "./constants";
|
|
9
|
-
import {
|
|
9
|
+
import { urlHasHost, validateUrl } from "./validateURL";
|
|
10
10
|
import type {
|
|
11
11
|
InvalidRedirectRule,
|
|
12
12
|
ParsedRedirects,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/pages-shared",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.9",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/cloudflare/workers-sdk.git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"metadata-generator/**/*"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"miniflare": "3.20231218.
|
|
16
|
+
"miniflare": "3.20231218.4"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@cloudflare/workers-types": "^4.20230511.0",
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"service-worker-mock": "^2.0.5",
|
|
24
24
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
25
25
|
},
|
|
26
|
+
"workers-sdk": {
|
|
27
|
+
"prerelease": true
|
|
28
|
+
},
|
|
26
29
|
"scripts": {
|
|
27
30
|
"check:type": "tsc",
|
|
28
31
|
"test": "vitest run",
|