wrangler 0.0.0-e978986 → 0.0.0-e98613f8
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/README.md +23 -3
- package/bin/wrangler.js +162 -62
- package/kv-asset-handler.js +1 -0
- package/miniflare-dist/index.mjs +1456 -21
- package/package.json +191 -152
- package/src/__tests__/access.test.ts +25 -0
- package/src/__tests__/api-dev.test.ts +209 -0
- package/src/__tests__/api-devregistry.test.js +56 -0
- package/src/__tests__/api.test.ts +80 -0
- package/src/__tests__/config-cache-without-cache-dir.test.ts +38 -0
- package/src/__tests__/config-cache.test.ts +30 -24
- package/src/__tests__/configuration.test.ts +3970 -3363
- package/src/__tests__/d1.test.ts +80 -0
- package/src/__tests__/delete.test.ts +263 -0
- package/src/__tests__/deployments.test.ts +91 -0
- package/src/__tests__/dev.test.tsx +1524 -951
- package/src/__tests__/dialogs.test.tsx +40 -0
- package/src/__tests__/generate.test.ts +235 -0
- package/src/__tests__/get-host-from-url.test.ts +16 -0
- package/src/__tests__/guess-worker-format.test.ts +68 -68
- package/src/__tests__/helpers/cmd-shim.d.ts +6 -6
- package/src/__tests__/helpers/mock-account-id.ts +24 -24
- package/src/__tests__/helpers/mock-bin.ts +20 -20
- package/src/__tests__/helpers/mock-cfetch.ts +216 -94
- package/src/__tests__/helpers/mock-console.ts +58 -39
- package/src/__tests__/helpers/mock-dialogs.ts +94 -71
- package/src/__tests__/helpers/mock-get-zone-from-host.ts +8 -0
- package/src/__tests__/helpers/mock-http-server.ts +30 -30
- package/src/__tests__/helpers/mock-istty.ts +65 -18
- package/src/__tests__/helpers/mock-known-routes.ts +7 -0
- package/src/__tests__/helpers/mock-kv.ts +27 -27
- package/src/__tests__/helpers/mock-oauth-flow.ts +229 -228
- package/src/__tests__/helpers/mock-process.ts +39 -0
- package/src/__tests__/helpers/mock-stdin.ts +82 -77
- package/src/__tests__/helpers/mock-web-socket.ts +21 -21
- package/src/__tests__/helpers/msw/handlers/access.ts +13 -0
- package/src/__tests__/helpers/msw/handlers/deployments.ts +59 -0
- package/src/__tests__/helpers/msw/handlers/namespaces.ts +104 -0
- package/src/__tests__/helpers/msw/handlers/oauth.ts +31 -0
- package/src/__tests__/helpers/msw/handlers/r2.ts +80 -0
- package/src/__tests__/helpers/msw/handlers/script.ts +75 -0
- package/src/__tests__/helpers/msw/handlers/user.ts +63 -0
- package/src/__tests__/helpers/msw/handlers/zones.ts +22 -0
- package/src/__tests__/helpers/msw/index.ts +21 -0
- package/src/__tests__/helpers/run-in-tmp.ts +27 -28
- package/src/__tests__/helpers/run-wrangler.ts +8 -8
- package/src/__tests__/helpers/worker-scripts/child-wrangler.toml +1 -0
- package/src/__tests__/helpers/worker-scripts/hello-world-worker.js +5 -0
- package/src/__tests__/helpers/worker-scripts/hello-world-wrangler.toml +1 -0
- package/src/__tests__/helpers/worker-scripts/parent-worker.js +8 -0
- package/src/__tests__/helpers/worker-scripts/parent-wrangler.toml +5 -0
- package/src/__tests__/helpers/write-worker-source.ts +16 -16
- package/src/__tests__/helpers/write-wrangler-toml.ts +9 -9
- package/src/__tests__/https-options.test.ts +142 -109
- package/src/__tests__/index.test.ts +241 -233
- package/src/__tests__/init.test.ts +2884 -1536
- package/src/__tests__/jest.setup.ts +159 -34
- package/src/__tests__/kv.test.ts +1660 -1466
- package/src/__tests__/logger.test.ts +100 -74
- package/src/__tests__/logout.test.ts +47 -0
- package/src/__tests__/metrics.test.ts +450 -0
- package/src/__tests__/middleware.scheduled.test.ts +135 -0
- package/src/__tests__/middleware.test.ts +726 -0
- package/src/__tests__/package-manager.test.ts +303 -303
- package/src/__tests__/pages-deployment-tail.test.ts +820 -0
- package/src/__tests__/pages.test.ts +2423 -638
- package/src/__tests__/parse.test.ts +252 -252
- package/src/__tests__/paths.test.ts +39 -0
- package/src/__tests__/publish.test.ts +7516 -5351
- package/src/__tests__/pubsub.test.ts +370 -0
- package/src/__tests__/queues.test.ts +522 -0
- package/src/__tests__/r2.test.ts +388 -228
- package/src/__tests__/route.test.ts +18 -18
- package/src/__tests__/secret.test.ts +622 -459
- package/src/__tests__/tail.test.ts +776 -567
- package/src/__tests__/test-old-node-version.js +31 -0
- package/src/__tests__/type-generation.test.ts +226 -0
- package/src/__tests__/user.test.ts +117 -119
- package/src/__tests__/utils-collectKeyValues.test.ts +47 -0
- package/src/__tests__/validate-dev-props.test.ts +56 -0
- package/src/__tests__/version.test.ts +35 -0
- package/src/__tests__/whoami.test.tsx +264 -91
- package/src/__tests__/worker-namespace.test.ts +326 -0
- package/src/abort.d.ts +1 -1
- package/src/api/dev.ts +210 -0
- package/src/api/index.ts +2 -0
- package/src/bundle-reporter.tsx +68 -0
- package/src/bundle.ts +785 -162
- package/src/cfetch/index.ts +120 -81
- package/src/cfetch/internal.ts +209 -91
- package/src/cli.ts +23 -8
- package/src/config/config.ts +236 -195
- package/src/config/diagnostics.ts +61 -61
- package/src/config/environment.ts +498 -357
- package/src/config/index.ts +302 -193
- package/src/config/validation-helpers.ts +379 -357
- package/src/config/validation.ts +1931 -1367
- package/src/config-cache.ts +81 -41
- package/src/create-worker-preview.ts +239 -142
- package/src/create-worker-upload-form.ts +300 -238
- package/src/d1/backups.tsx +223 -0
- package/src/d1/constants.ts +2 -0
- package/src/d1/create.tsx +63 -0
- package/src/d1/delete.tsx +56 -0
- package/src/d1/execute.tsx +352 -0
- package/src/d1/formatTimeAgo.ts +14 -0
- package/src/d1/index.ts +101 -0
- package/src/d1/list.tsx +48 -0
- package/src/d1/migrations/apply.tsx +184 -0
- package/src/d1/migrations/create.tsx +77 -0
- package/src/d1/migrations/helpers.ts +147 -0
- package/src/d1/migrations/index.tsx +3 -0
- package/src/d1/migrations/list.tsx +79 -0
- package/src/d1/migrations/options.ts +18 -0
- package/src/d1/options.ts +22 -0
- package/src/d1/types.tsx +24 -0
- package/src/d1/utils.ts +48 -0
- package/src/delete.ts +108 -0
- package/src/deployments.ts +77 -0
- package/src/deprecated/index.ts +438 -0
- package/src/dev/dev-vars.ts +20 -17
- package/src/dev/dev.tsx +547 -352
- package/src/dev/get-local-persistence-path.tsx +31 -0
- package/src/dev/local.tsx +870 -298
- package/src/dev/remote.tsx +591 -215
- package/src/dev/start-server.ts +539 -0
- package/src/dev/use-esbuild.ts +183 -97
- package/src/dev/validate-dev-props.ts +31 -0
- package/src/dev-registry.tsx +201 -0
- package/src/dev.tsx +913 -0
- package/src/dialogs.tsx +132 -99
- package/src/dispatch-namespace.ts +207 -0
- package/src/durable.ts +87 -87
- package/src/entry.ts +235 -228
- package/src/environment-variables.ts +38 -23
- package/src/errors.ts +6 -6
- package/src/git-client.ts +135 -0
- package/src/global-wrangler-config-path.ts +26 -0
- package/src/https-options.ts +84 -80
- package/src/index.tsx +630 -2791
- package/src/init.ts +970 -0
- package/src/inspect.ts +698 -593
- package/src/intl-polyfill.d.ts +123 -123
- package/src/is-ci.ts +14 -0
- package/src/is-interactive.ts +16 -0
- package/src/kv/helpers.ts +430 -0
- package/src/kv/index.ts +596 -0
- package/src/logger.ts +67 -41
- package/src/metrics/index.ts +5 -0
- package/src/metrics/metrics-config.ts +239 -0
- package/src/metrics/metrics-dispatcher.ts +96 -0
- package/src/metrics/metrics-usage-headers.ts +24 -0
- package/src/metrics/send-event.ts +96 -0
- package/src/miniflare-cli/assets.ts +220 -0
- package/src/miniflare-cli/index.ts +205 -33
- package/src/miniflare-cli/request-context.ts +18 -18
- package/src/module-collection.ts +221 -212
- package/src/open-in-browser.ts +4 -6
- package/src/package-manager.ts +173 -128
- package/src/pages/build.tsx +270 -0
- package/src/pages/constants.ts +18 -0
- package/src/pages/deployment-tails.tsx +284 -0
- package/src/pages/deployments.tsx +84 -0
- package/src/pages/dev.tsx +706 -0
- package/src/pages/errors.ts +66 -0
- package/src/pages/functions/buildPlugin.ts +107 -0
- package/src/pages/functions/buildWorker.ts +166 -0
- package/{pages → src/pages}/functions/filepath-routing.test.ts +113 -113
- package/src/pages/functions/filepath-routing.ts +189 -0
- package/src/pages/functions/identifiers.ts +78 -0
- package/src/pages/functions/routes-consolidation.test.ts +250 -0
- package/src/pages/functions/routes-consolidation.ts +73 -0
- package/src/pages/functions/routes-transformation.test.ts +282 -0
- package/src/pages/functions/routes-transformation.ts +115 -0
- package/src/pages/functions/routes-validation.test.ts +403 -0
- package/src/pages/functions/routes-validation.ts +202 -0
- package/src/pages/functions/routes.ts +151 -0
- package/src/pages/functions.tsx +82 -0
- package/src/pages/hash.tsx +13 -0
- package/src/pages/index.tsx +102 -0
- package/src/pages/projects.tsx +169 -0
- package/src/pages/prompt-select-project.tsx +31 -0
- package/src/pages/publish.tsx +451 -0
- package/src/pages/types.ts +41 -0
- package/src/pages/upload.tsx +426 -0
- package/src/pages/utils.ts +23 -0
- package/src/parse.ts +209 -125
- package/src/paths.ts +53 -8
- package/src/proxy.ts +623 -394
- package/src/publish/index.ts +270 -0
- package/src/publish/publish.ts +1035 -0
- package/src/pubsub/index.ts +286 -0
- package/src/pubsub/pubsub-commands.tsx +624 -0
- package/src/queues/cli/commands/consumer/add.ts +71 -0
- package/src/queues/cli/commands/consumer/index.ts +22 -0
- package/src/queues/cli/commands/consumer/remove.ts +38 -0
- package/src/queues/cli/commands/create.ts +25 -0
- package/src/queues/cli/commands/delete.ts +26 -0
- package/src/queues/cli/commands/index.ts +36 -0
- package/src/queues/cli/commands/list.ts +25 -0
- package/src/queues/client.ts +135 -0
- package/src/queues/utils.ts +18 -0
- package/src/r2/constants.ts +4 -0
- package/src/r2/helpers.ts +131 -0
- package/src/r2/index.ts +289 -0
- package/src/routes.ts +140 -0
- package/src/secret/index.ts +378 -0
- package/src/selfsigned.d.ts +23 -23
- package/src/sites.tsx +280 -203
- package/src/tail/createTail.ts +379 -0
- package/src/tail/filters.ts +108 -110
- package/src/tail/index.ts +211 -296
- package/src/tail/printing.ts +86 -46
- package/src/type-generation.ts +173 -0
- package/src/update-check.ts +11 -11
- package/src/user/access.ts +69 -0
- package/src/user/choose-account.tsx +69 -0
- package/src/user/env-vars.ts +46 -0
- package/src/user/generate-auth-url.ts +33 -0
- package/src/user/generate-random-state.ts +16 -0
- package/src/user/index.ts +3 -0
- package/src/user/user.tsx +1198 -0
- package/src/utils/collectKeyValues.ts +14 -0
- package/src/whoami.tsx +141 -42
- package/src/worker.ts +171 -106
- package/src/yargs-types.ts +24 -0
- package/src/zones.ts +191 -0
- package/templates/__tests__/pages-dev-util.test.ts +128 -0
- package/templates/checked-fetch.js +17 -0
- package/templates/d1-beta-facade.js +205 -0
- package/templates/first-party-worker-module-facade.ts +18 -0
- package/templates/format-dev-errors.ts +32 -0
- package/templates/init-tests/test-jest-new-worker.js +25 -0
- package/templates/init-tests/test-vitest-new-worker.js +26 -0
- package/templates/middleware/common.ts +62 -0
- package/templates/middleware/loader-modules.ts +84 -0
- package/templates/middleware/loader-sw.ts +227 -0
- package/templates/middleware/middleware-miniflare3-json-error.ts +20 -0
- package/templates/middleware/middleware-pretty-error.ts +40 -0
- package/templates/middleware/middleware-scheduled.ts +15 -0
- package/templates/new-worker-scheduled.js +4 -4
- package/templates/new-worker-scheduled.ts +16 -16
- package/templates/new-worker.js +3 -3
- package/templates/new-worker.ts +15 -15
- package/templates/no-op-worker.js +10 -0
- package/templates/pages-dev-pipeline.ts +28 -0
- package/templates/pages-dev-util.ts +52 -0
- package/templates/pages-shim.ts +9 -0
- package/templates/pages-template-plugin.ts +171 -0
- package/templates/pages-template-worker.ts +189 -0
- package/templates/serve-static-assets.ts +63 -0
- package/templates/service-bindings-module-facade.js +54 -0
- package/templates/service-bindings-sw-facade.js +42 -0
- package/templates/tsconfig.json +96 -95
- package/wrangler-dist/cli.d.ts +893 -0
- package/wrangler-dist/cli.js +146463 -108710
- package/pages/functions/buildPlugin.ts +0 -105
- package/pages/functions/buildWorker.ts +0 -151
- package/pages/functions/filepath-routing.ts +0 -189
- package/pages/functions/identifiers.ts +0 -78
- package/pages/functions/routes.ts +0 -156
- package/pages/functions/template-plugin.ts +0 -147
- package/pages/functions/template-worker.ts +0 -143
- package/src/__tests__/helpers/faye-websocket.d.ts +0 -6
- package/src/kv.ts +0 -408
- package/src/miniflare-cli/enum-keys.ts +0 -17
- package/src/pages.tsx +0 -2027
- package/src/publish.ts +0 -583
- package/src/r2.ts +0 -50
- package/src/user.tsx +0 -1203
- package/templates/static-asset-facade.js +0 -47
- package/vendor/@cloudflare/kv-asset-handler/CHANGELOG.md +0 -332
- package/vendor/@cloudflare/kv-asset-handler/LICENSE_APACHE +0 -176
- package/vendor/@cloudflare/kv-asset-handler/LICENSE_MIT +0 -25
- package/vendor/@cloudflare/kv-asset-handler/README.md +0 -245
- package/vendor/@cloudflare/kv-asset-handler/dist/index.d.ts +0 -32
- package/vendor/@cloudflare/kv-asset-handler/dist/index.js +0 -354
- package/vendor/@cloudflare/kv-asset-handler/dist/mocks.d.ts +0 -13
- package/vendor/@cloudflare/kv-asset-handler/dist/mocks.js +0 -148
- package/vendor/@cloudflare/kv-asset-handler/dist/test/getAssetFromKV.d.ts +0 -1
- package/vendor/@cloudflare/kv-asset-handler/dist/test/getAssetFromKV.js +0 -436
- package/vendor/@cloudflare/kv-asset-handler/dist/test/mapRequestToAsset.d.ts +0 -1
- package/vendor/@cloudflare/kv-asset-handler/dist/test/mapRequestToAsset.js +0 -40
- package/vendor/@cloudflare/kv-asset-handler/dist/test/serveSinglePageApp.d.ts +0 -1
- package/vendor/@cloudflare/kv-asset-handler/dist/test/serveSinglePageApp.js +0 -42
- package/vendor/@cloudflare/kv-asset-handler/dist/types.d.ts +0 -26
- package/vendor/@cloudflare/kv-asset-handler/dist/types.js +0 -31
- package/vendor/@cloudflare/kv-asset-handler/package.json +0 -52
- package/vendor/@cloudflare/kv-asset-handler/src/index.ts +0 -296
- package/vendor/@cloudflare/kv-asset-handler/src/mocks.ts +0 -136
- package/vendor/@cloudflare/kv-asset-handler/src/test/getAssetFromKV.ts +0 -464
- package/vendor/@cloudflare/kv-asset-handler/src/test/mapRequestToAsset.ts +0 -33
- package/vendor/@cloudflare/kv-asset-handler/src/test/serveSinglePageApp.ts +0 -42
- package/vendor/@cloudflare/kv-asset-handler/src/types.ts +0 -39
- package/vendor/wrangler-mime/CHANGELOG.md +0 -289
- package/vendor/wrangler-mime/LICENSE +0 -21
- package/vendor/wrangler-mime/Mime.js +0 -97
- package/vendor/wrangler-mime/README.md +0 -187
- package/vendor/wrangler-mime/cli.js +0 -46
- package/vendor/wrangler-mime/index.js +0 -4
- package/vendor/wrangler-mime/lite.js +0 -4
- package/vendor/wrangler-mime/package.json +0 -52
- package/vendor/wrangler-mime/types/other.js +0 -1
- package/vendor/wrangler-mime/types/standard.js +0 -1
package/miniflare-dist/index.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1
7
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
8
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
9
|
}) : x)(function(x) {
|
|
@@ -5,9 +11,747 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
5
11
|
return require.apply(this, arguments);
|
|
6
12
|
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
7
13
|
});
|
|
14
|
+
var __esm = (fn, res) => function __init() {
|
|
15
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
|
|
37
|
+
// ../../node_modules/mime/Mime.js
|
|
38
|
+
var require_Mime = __commonJS({
|
|
39
|
+
"../../node_modules/mime/Mime.js"(exports, module) {
|
|
40
|
+
"use strict";
|
|
41
|
+
function Mime() {
|
|
42
|
+
this._types = /* @__PURE__ */ Object.create(null);
|
|
43
|
+
this._extensions = /* @__PURE__ */ Object.create(null);
|
|
44
|
+
for (let i = 0; i < arguments.length; i++) {
|
|
45
|
+
this.define(arguments[i]);
|
|
46
|
+
}
|
|
47
|
+
this.define = this.define.bind(this);
|
|
48
|
+
this.getType = this.getType.bind(this);
|
|
49
|
+
this.getExtension = this.getExtension.bind(this);
|
|
50
|
+
}
|
|
51
|
+
Mime.prototype.define = function(typeMap, force) {
|
|
52
|
+
for (let type in typeMap) {
|
|
53
|
+
let extensions = typeMap[type].map(function(t) {
|
|
54
|
+
return t.toLowerCase();
|
|
55
|
+
});
|
|
56
|
+
type = type.toLowerCase();
|
|
57
|
+
for (let i = 0; i < extensions.length; i++) {
|
|
58
|
+
const ext = extensions[i];
|
|
59
|
+
if (ext[0] === "*") {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (!force && ext in this._types) {
|
|
63
|
+
throw new Error(
|
|
64
|
+
'Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".'
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
this._types[ext] = type;
|
|
68
|
+
}
|
|
69
|
+
if (force || !this._extensions[type]) {
|
|
70
|
+
const ext = extensions[0];
|
|
71
|
+
this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
Mime.prototype.getType = function(path) {
|
|
76
|
+
path = String(path);
|
|
77
|
+
let last = path.replace(/^.*[/\\]/, "").toLowerCase();
|
|
78
|
+
let ext = last.replace(/^.*\./, "").toLowerCase();
|
|
79
|
+
let hasPath = last.length < path.length;
|
|
80
|
+
let hasDot = ext.length < last.length - 1;
|
|
81
|
+
return (hasDot || !hasPath) && this._types[ext] || null;
|
|
82
|
+
};
|
|
83
|
+
Mime.prototype.getExtension = function(type) {
|
|
84
|
+
type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
|
|
85
|
+
return type && this._extensions[type.toLowerCase()] || null;
|
|
86
|
+
};
|
|
87
|
+
module.exports = Mime;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// ../../node_modules/mime/types/standard.js
|
|
92
|
+
var require_standard = __commonJS({
|
|
93
|
+
"../../node_modules/mime/types/standard.js"(exports, module) {
|
|
94
|
+
module.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// ../../node_modules/mime/types/other.js
|
|
99
|
+
var require_other = __commonJS({
|
|
100
|
+
"../../node_modules/mime/types/other.js"(exports, module) {
|
|
101
|
+
module.exports = { "application/prs.cww": ["cww"], "application/vnd.1000minds.decision-model+xml": ["1km"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.keynote": ["key"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.numbers": ["numbers"], "application/vnd.apple.pages": ["pages"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.balsamiq.bmml+xml": ["bmml"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.citationstyles.style+xml": ["csl"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dbf": ["dbf"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mapbox-vector-tile": ["mvt"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["*stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.ac+xml": ["*ac"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openblox.game+xml": ["obgx"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openstreetmap.data+xml": ["osm"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.rar": ["rar"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.software602.filler.form+xml": ["fo"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.syncml.dmddf+xml": ["ddf"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": ["*dmg"], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": ["*bdoc"], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["*deb", "udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": ["*iso"], "application/x-iwork-keynote-sffkey": ["*key"], "application/x-iwork-numbers-sffnumbers": ["*numbers"], "application/x-iwork-pages-sffpages": ["*pages"], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-keepass2": ["kdbx"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": ["*exe"], "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": ["*prc", "*pdb"], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["*rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["*obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["*xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": ["*m4a"], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": ["*ra"], "audio/x-wav": ["*wav"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "image/prs.btif": ["btif"], "image/prs.pti": ["pti"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.airzip.accelerator.azv": ["azv"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": ["*sub"], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.microsoft.icon": ["ico"], "image/vnd.ms-dds": ["dds"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.pco.b16": ["b16"], "image/vnd.tencent.tap": ["tap"], "image/vnd.valve.source.texture": ["vtf"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/vnd.zbrush.pcx": ["pcx"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["*ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": ["*bmp"], "image/x-pcx": ["*pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/vnd.wfa.wsc": ["wsc"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.opengex": ["ogex"], "model/vnd.parasolid.transmit.binary": ["x_b"], "model/vnd.parasolid.transmit.text": ["x_t"], "model/vnd.sap.vds": ["vds"], "model/vnd.usdz+zip": ["usdz"], "model/vnd.valve.source.compiled-map": ["bsp"], "model/vnd.vtu": ["vtu"], "text/prs.lines.tag": ["dsc"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": ["*org"], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] };
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// ../../node_modules/mime/index.js
|
|
106
|
+
var require_mime = __commonJS({
|
|
107
|
+
"../../node_modules/mime/index.js"(exports, module) {
|
|
108
|
+
"use strict";
|
|
109
|
+
var Mime = require_Mime();
|
|
110
|
+
module.exports = new Mime(require_standard(), require_other());
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// ../pages-shared/environment-polyfills/index.ts
|
|
115
|
+
var polyfill;
|
|
116
|
+
var init_environment_polyfills = __esm({
|
|
117
|
+
"../pages-shared/environment-polyfills/index.ts"() {
|
|
118
|
+
polyfill = (environment) => {
|
|
119
|
+
Object.entries(environment).map(([name, value]) => {
|
|
120
|
+
Object.defineProperty(globalThis, name, {
|
|
121
|
+
value,
|
|
122
|
+
configurable: true,
|
|
123
|
+
enumerable: true,
|
|
124
|
+
writable: true
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// ../pages-shared/environment-polyfills/miniflare.ts
|
|
132
|
+
var miniflare_exports = {};
|
|
133
|
+
import {
|
|
134
|
+
fetch as miniflareFetch,
|
|
135
|
+
Headers as MiniflareHeaders,
|
|
136
|
+
Request as MiniflareRequest,
|
|
137
|
+
Response as MiniflareResponse
|
|
138
|
+
} from "@miniflare/core";
|
|
139
|
+
var init_miniflare = __esm({
|
|
140
|
+
"../pages-shared/environment-polyfills/miniflare.ts"() {
|
|
141
|
+
init_environment_polyfills();
|
|
142
|
+
polyfill({
|
|
143
|
+
fetch: miniflareFetch,
|
|
144
|
+
Headers: MiniflareHeaders,
|
|
145
|
+
Request: MiniflareRequest,
|
|
146
|
+
Response: MiniflareResponse
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// ../pages-shared/asset-server/responses.ts
|
|
152
|
+
function mergeHeaders(base, extra) {
|
|
153
|
+
base = new Headers(base ?? {});
|
|
154
|
+
extra = new Headers(extra ?? {});
|
|
155
|
+
return new Headers({
|
|
156
|
+
...Object.fromEntries(base.entries()),
|
|
157
|
+
...Object.fromEntries(extra.entries())
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
var OkResponse, MovedPermanentlyResponse, FoundResponse, NotModifiedResponse, PermanentRedirectResponse, NotFoundResponse, MethodNotAllowedResponse, NotAcceptableResponse, InternalServerErrorResponse, SeeOtherResponse, TemporaryRedirectResponse;
|
|
161
|
+
var init_responses = __esm({
|
|
162
|
+
"../pages-shared/asset-server/responses.ts"() {
|
|
163
|
+
OkResponse = class extends Response {
|
|
164
|
+
constructor(...[body, init]) {
|
|
165
|
+
super(body, {
|
|
166
|
+
...init,
|
|
167
|
+
status: 200,
|
|
168
|
+
statusText: "OK"
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
MovedPermanentlyResponse = class extends Response {
|
|
173
|
+
constructor(location, init) {
|
|
174
|
+
super(`Redirecting to ${location}`, {
|
|
175
|
+
...init,
|
|
176
|
+
status: 301,
|
|
177
|
+
statusText: "Moved Permanently",
|
|
178
|
+
headers: mergeHeaders(init?.headers, {
|
|
179
|
+
location
|
|
180
|
+
})
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
FoundResponse = class extends Response {
|
|
185
|
+
constructor(location, init) {
|
|
186
|
+
super(`Redirecting to ${location}`, {
|
|
187
|
+
...init,
|
|
188
|
+
status: 302,
|
|
189
|
+
statusText: "Found",
|
|
190
|
+
headers: mergeHeaders(init?.headers, {
|
|
191
|
+
location
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
NotModifiedResponse = class extends Response {
|
|
197
|
+
constructor(...[_body, _init]) {
|
|
198
|
+
super(void 0, {
|
|
199
|
+
status: 304,
|
|
200
|
+
statusText: "Not Modified"
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
PermanentRedirectResponse = class extends Response {
|
|
205
|
+
constructor(location, init) {
|
|
206
|
+
super(void 0, {
|
|
207
|
+
...init,
|
|
208
|
+
status: 308,
|
|
209
|
+
statusText: "Permanent Redirect",
|
|
210
|
+
headers: mergeHeaders(init?.headers, {
|
|
211
|
+
location
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
NotFoundResponse = class extends Response {
|
|
217
|
+
constructor(...[body, init]) {
|
|
218
|
+
super(body, {
|
|
219
|
+
...init,
|
|
220
|
+
status: 404,
|
|
221
|
+
statusText: "Not Found"
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
MethodNotAllowedResponse = class extends Response {
|
|
226
|
+
constructor(...[body, init]) {
|
|
227
|
+
super(body, {
|
|
228
|
+
...init,
|
|
229
|
+
status: 405,
|
|
230
|
+
statusText: "Method Not Allowed"
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
NotAcceptableResponse = class extends Response {
|
|
235
|
+
constructor(...[body, init]) {
|
|
236
|
+
super(body, {
|
|
237
|
+
...init,
|
|
238
|
+
status: 406,
|
|
239
|
+
statusText: "Not Acceptable"
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
InternalServerErrorResponse = class extends Response {
|
|
244
|
+
constructor(err, init) {
|
|
245
|
+
let body = void 0;
|
|
246
|
+
if (globalThis.DEBUG) {
|
|
247
|
+
body = `${err.message}
|
|
248
|
+
|
|
249
|
+
${err.stack}`;
|
|
250
|
+
}
|
|
251
|
+
super(body, {
|
|
252
|
+
...init,
|
|
253
|
+
status: 500,
|
|
254
|
+
statusText: "Internal Server Error"
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
SeeOtherResponse = class extends Response {
|
|
259
|
+
constructor(location, init) {
|
|
260
|
+
super(`Redirecting to ${location}`, {
|
|
261
|
+
...init,
|
|
262
|
+
status: 303,
|
|
263
|
+
statusText: "See Other",
|
|
264
|
+
headers: mergeHeaders(init?.headers, { location })
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
TemporaryRedirectResponse = class extends Response {
|
|
269
|
+
constructor(location, init) {
|
|
270
|
+
super(`Redirecting to ${location}`, {
|
|
271
|
+
...init,
|
|
272
|
+
status: 307,
|
|
273
|
+
statusText: "Temporary Redirect",
|
|
274
|
+
headers: mergeHeaders(init?.headers, { location })
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
// ../pages-shared/asset-server/rulesEngine.ts
|
|
282
|
+
var ESCAPE_REGEX_CHARACTERS, escapeRegex, HOST_PLACEHOLDER_REGEX, PLACEHOLDER_REGEX2, replacer, generateRulesMatcher;
|
|
283
|
+
var init_rulesEngine = __esm({
|
|
284
|
+
"../pages-shared/asset-server/rulesEngine.ts"() {
|
|
285
|
+
ESCAPE_REGEX_CHARACTERS = /[-/\\^$*+?.()|[\]{}]/g;
|
|
286
|
+
escapeRegex = (str) => {
|
|
287
|
+
return str.replace(ESCAPE_REGEX_CHARACTERS, "\\$&");
|
|
288
|
+
};
|
|
289
|
+
HOST_PLACEHOLDER_REGEX = /(?<=^https:\\\/\\\/[^/]*?):([^\\]+)(?=\\)/g;
|
|
290
|
+
PLACEHOLDER_REGEX2 = /:(\w+)/g;
|
|
291
|
+
replacer = (str, replacements) => {
|
|
292
|
+
for (const [replacement, value] of Object.entries(replacements)) {
|
|
293
|
+
str = str.replaceAll(`:${replacement}`, value);
|
|
294
|
+
}
|
|
295
|
+
return str;
|
|
296
|
+
};
|
|
297
|
+
generateRulesMatcher = (rules, replacerFn = (match) => match) => {
|
|
298
|
+
if (!rules)
|
|
299
|
+
return () => [];
|
|
300
|
+
const compiledRules = Object.entries(rules).map(([rule, match]) => {
|
|
301
|
+
const crossHost = rule.startsWith("https://");
|
|
302
|
+
rule = rule.split("*").map(escapeRegex).join("(?<splat>.*)");
|
|
303
|
+
const host_matches = rule.matchAll(HOST_PLACEHOLDER_REGEX);
|
|
304
|
+
for (const host_match of host_matches) {
|
|
305
|
+
rule = rule.split(host_match[0]).join(`(?<${host_match[1]}>[^/.]+)`);
|
|
306
|
+
}
|
|
307
|
+
const path_matches = rule.matchAll(PLACEHOLDER_REGEX2);
|
|
308
|
+
for (const path_match of path_matches) {
|
|
309
|
+
rule = rule.split(path_match[0]).join(`(?<${path_match[1]}>[^/]+)`);
|
|
310
|
+
}
|
|
311
|
+
rule = "^" + rule + "$";
|
|
312
|
+
try {
|
|
313
|
+
const regExp = new RegExp(rule);
|
|
314
|
+
return [{ crossHost, regExp }, match];
|
|
315
|
+
} catch {
|
|
316
|
+
}
|
|
317
|
+
}).filter((value) => value !== void 0);
|
|
318
|
+
return ({ request }) => {
|
|
319
|
+
const { pathname, host } = new URL(request.url);
|
|
320
|
+
return compiledRules.map(([{ crossHost, regExp }, match]) => {
|
|
321
|
+
const test = crossHost ? `https://${host}${pathname}` : pathname;
|
|
322
|
+
const result = regExp.exec(test);
|
|
323
|
+
if (result) {
|
|
324
|
+
return replacerFn(match, result.groups || {});
|
|
325
|
+
}
|
|
326
|
+
}).filter((value) => value !== void 0);
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// ../pages-shared/asset-server/handler.ts
|
|
333
|
+
var handler_exports = {};
|
|
334
|
+
__export(handler_exports, {
|
|
335
|
+
ANALYTICS_VERSION: () => ANALYTICS_VERSION2,
|
|
336
|
+
ASSET_PRESERVATION_CACHE: () => ASSET_PRESERVATION_CACHE,
|
|
337
|
+
CACHE_CONTROL_BROWSER: () => CACHE_CONTROL_BROWSER,
|
|
338
|
+
HEADERS_VERSION: () => HEADERS_VERSION2,
|
|
339
|
+
HEADERS_VERSION_V1: () => HEADERS_VERSION_V1,
|
|
340
|
+
REDIRECTS_VERSION: () => REDIRECTS_VERSION2,
|
|
341
|
+
generateHandler: () => generateHandler,
|
|
342
|
+
normaliseHeaders: () => normaliseHeaders,
|
|
343
|
+
parseQualityWeightedList: () => parseQualityWeightedList
|
|
344
|
+
});
|
|
345
|
+
function normaliseHeaders(headers) {
|
|
346
|
+
if (headers.version === HEADERS_VERSION2) {
|
|
347
|
+
return headers.rules;
|
|
348
|
+
} else if (headers.version === HEADERS_VERSION_V1) {
|
|
349
|
+
return Object.keys(headers.rules).reduce(
|
|
350
|
+
(acc, key) => {
|
|
351
|
+
acc[key] = {
|
|
352
|
+
set: headers.rules[key]
|
|
353
|
+
};
|
|
354
|
+
return acc;
|
|
355
|
+
},
|
|
356
|
+
{}
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
return {};
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
async function generateHandler({
|
|
363
|
+
request,
|
|
364
|
+
metadata,
|
|
365
|
+
xServerEnvHeader,
|
|
366
|
+
logError,
|
|
367
|
+
findAssetEntryForPath,
|
|
368
|
+
getAssetKey,
|
|
369
|
+
negotiateContent,
|
|
370
|
+
fetchAsset,
|
|
371
|
+
generateNotFoundResponse = async (notFoundRequest, notFoundFindAssetEntryForPath, notFoundServeAsset) => {
|
|
372
|
+
let assetEntry;
|
|
373
|
+
if (assetEntry = await notFoundFindAssetEntryForPath("/index.html")) {
|
|
374
|
+
return notFoundServeAsset(assetEntry, { preserve: false });
|
|
375
|
+
}
|
|
376
|
+
return new NotFoundResponse();
|
|
377
|
+
},
|
|
378
|
+
attachAdditionalHeaders = () => {
|
|
379
|
+
},
|
|
380
|
+
caches,
|
|
381
|
+
waitUntil
|
|
382
|
+
}) {
|
|
383
|
+
const url = new URL(request.url);
|
|
384
|
+
const { protocol, host, search } = url;
|
|
385
|
+
let { pathname } = url;
|
|
386
|
+
const earlyHintsCache = metadata.deploymentId ? await caches?.open(`eh:${metadata.deploymentId}`) : void 0;
|
|
387
|
+
const headerRules = metadata.headers ? normaliseHeaders(metadata.headers) : {};
|
|
388
|
+
const staticRules = metadata.redirects?.version === REDIRECTS_VERSION2 ? metadata.redirects.staticRules || {} : {};
|
|
389
|
+
const staticRedirectsMatcher = () => {
|
|
390
|
+
const withHostMatch = staticRules[`https://${host}${pathname}`];
|
|
391
|
+
const withoutHostMatch = staticRules[pathname];
|
|
392
|
+
if (withHostMatch && withoutHostMatch) {
|
|
393
|
+
if (withHostMatch.lineNumber < withoutHostMatch.lineNumber) {
|
|
394
|
+
return withHostMatch;
|
|
395
|
+
} else {
|
|
396
|
+
return withoutHostMatch;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return withHostMatch || withoutHostMatch;
|
|
400
|
+
};
|
|
401
|
+
const generateRedirectsMatcher = () => generateRulesMatcher(
|
|
402
|
+
metadata.redirects?.version === REDIRECTS_VERSION2 ? metadata.redirects.rules : {},
|
|
403
|
+
({ status, to }, replacements) => ({
|
|
404
|
+
status,
|
|
405
|
+
to: replacer(to, replacements)
|
|
406
|
+
})
|
|
407
|
+
);
|
|
408
|
+
let assetEntry;
|
|
409
|
+
async function generateResponse() {
|
|
410
|
+
const match = staticRedirectsMatcher() || generateRedirectsMatcher()({ request })[0];
|
|
411
|
+
if (match) {
|
|
412
|
+
const { status, to } = match;
|
|
413
|
+
const destination = new URL(to, request.url);
|
|
414
|
+
const location = destination.origin === new URL(request.url).origin ? `${destination.pathname}${destination.search || search}${destination.hash}` : `${destination.href}${destination.search ? "" : search}${destination.hash}`;
|
|
415
|
+
switch (status) {
|
|
416
|
+
case 301:
|
|
417
|
+
return new MovedPermanentlyResponse(location);
|
|
418
|
+
case 303:
|
|
419
|
+
return new SeeOtherResponse(location);
|
|
420
|
+
case 307:
|
|
421
|
+
return new TemporaryRedirectResponse(location);
|
|
422
|
+
case 308:
|
|
423
|
+
return new PermanentRedirectResponse(location);
|
|
424
|
+
case 302:
|
|
425
|
+
default:
|
|
426
|
+
return new FoundResponse(location);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
if (!request.method.match(/^(get|head)$/i)) {
|
|
430
|
+
return new MethodNotAllowedResponse();
|
|
431
|
+
}
|
|
432
|
+
try {
|
|
433
|
+
pathname = globalThis.decodeURIComponent(pathname);
|
|
434
|
+
} catch (err) {
|
|
435
|
+
}
|
|
436
|
+
if (pathname.endsWith("/")) {
|
|
437
|
+
if (assetEntry = await findAssetEntryForPath(`${pathname}index.html`)) {
|
|
438
|
+
return serveAsset(assetEntry);
|
|
439
|
+
} else if (pathname.endsWith("/index/")) {
|
|
440
|
+
return new PermanentRedirectResponse(
|
|
441
|
+
`/${pathname.slice(1, -"index/".length)}${search}`
|
|
442
|
+
);
|
|
443
|
+
} else if (assetEntry = await findAssetEntryForPath(
|
|
444
|
+
`${pathname.replace(/\/$/, ".html")}`
|
|
445
|
+
)) {
|
|
446
|
+
return new PermanentRedirectResponse(
|
|
447
|
+
`/${pathname.slice(1, -1)}${search}`
|
|
448
|
+
);
|
|
449
|
+
} else {
|
|
450
|
+
return notFound();
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
if (assetEntry = await findAssetEntryForPath(pathname)) {
|
|
454
|
+
if (pathname.endsWith(".html")) {
|
|
455
|
+
const extensionlessPath = pathname.slice(0, -".html".length);
|
|
456
|
+
if (extensionlessPath.endsWith("/index")) {
|
|
457
|
+
return new PermanentRedirectResponse(
|
|
458
|
+
`${extensionlessPath.replace(/\/index$/, "/")}${search}`
|
|
459
|
+
);
|
|
460
|
+
} else if (await findAssetEntryForPath(extensionlessPath) || extensionlessPath === "/") {
|
|
461
|
+
return serveAsset(assetEntry);
|
|
462
|
+
} else {
|
|
463
|
+
return new PermanentRedirectResponse(`${extensionlessPath}${search}`);
|
|
464
|
+
}
|
|
465
|
+
} else {
|
|
466
|
+
return serveAsset(assetEntry);
|
|
467
|
+
}
|
|
468
|
+
} else if (pathname.endsWith("/index")) {
|
|
469
|
+
return new PermanentRedirectResponse(
|
|
470
|
+
`/${pathname.slice(1, -"index".length)}${search}`
|
|
471
|
+
);
|
|
472
|
+
} else if (assetEntry = await findAssetEntryForPath(`${pathname}.html`)) {
|
|
473
|
+
return serveAsset(assetEntry);
|
|
474
|
+
} else if (hasFileExtension(pathname)) {
|
|
475
|
+
return notFound();
|
|
476
|
+
}
|
|
477
|
+
if (assetEntry = await findAssetEntryForPath(`${pathname}/index.html`)) {
|
|
478
|
+
return new PermanentRedirectResponse(`${pathname}/${search}`);
|
|
479
|
+
} else {
|
|
480
|
+
return notFound();
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
async function attachHeaders(response) {
|
|
484
|
+
const existingHeaders = new Headers(response.headers);
|
|
485
|
+
const extraHeaders = new Headers({
|
|
486
|
+
"access-control-allow-origin": "*",
|
|
487
|
+
"referrer-policy": "strict-origin-when-cross-origin",
|
|
488
|
+
...existingHeaders.has("content-type") ? { "x-content-type-options": "nosniff" } : {}
|
|
489
|
+
});
|
|
490
|
+
const headers = new Headers({
|
|
491
|
+
...Object.fromEntries(existingHeaders.entries()),
|
|
492
|
+
...Object.fromEntries(extraHeaders.entries())
|
|
493
|
+
});
|
|
494
|
+
if (earlyHintsCache) {
|
|
495
|
+
const preEarlyHintsHeaders = new Headers(headers);
|
|
496
|
+
const earlyHintsCacheKey = `${protocol}//${host}${pathname}`;
|
|
497
|
+
const earlyHintsResponse = await earlyHintsCache.match(
|
|
498
|
+
earlyHintsCacheKey
|
|
499
|
+
);
|
|
500
|
+
if (earlyHintsResponse) {
|
|
501
|
+
const earlyHintsLinkHeader = earlyHintsResponse.headers.get("Link");
|
|
502
|
+
if (earlyHintsLinkHeader) {
|
|
503
|
+
headers.set("Link", earlyHintsLinkHeader);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
const clonedResponse = response.clone();
|
|
507
|
+
if (waitUntil) {
|
|
508
|
+
waitUntil(
|
|
509
|
+
(async () => {
|
|
510
|
+
try {
|
|
511
|
+
const links = [];
|
|
512
|
+
const transformedResponse = new HTMLRewriter().on("link[rel~=preconnect],link[rel~=preload]", {
|
|
513
|
+
element(element) {
|
|
514
|
+
for (const [attributeName] of element.attributes) {
|
|
515
|
+
if (!ALLOWED_EARLY_HINT_LINK_ATTRIBUTES.includes(
|
|
516
|
+
attributeName.toLowerCase()
|
|
517
|
+
)) {
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
const href = element.getAttribute("href") || void 0;
|
|
522
|
+
const rel = element.getAttribute("rel") || void 0;
|
|
523
|
+
const as = element.getAttribute("as") || void 0;
|
|
524
|
+
if (href && !href.startsWith("data:") && rel) {
|
|
525
|
+
links.push({ href, rel, as });
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}).transform(clonedResponse);
|
|
529
|
+
await transformedResponse.text();
|
|
530
|
+
links.forEach(({ href, rel, as }) => {
|
|
531
|
+
let link = `<${href}>; rel="${rel}"`;
|
|
532
|
+
if (as) {
|
|
533
|
+
link += `; as=${as}`;
|
|
534
|
+
}
|
|
535
|
+
preEarlyHintsHeaders.append("Link", link);
|
|
536
|
+
});
|
|
537
|
+
const linkHeader = preEarlyHintsHeaders.get("Link");
|
|
538
|
+
if (linkHeader) {
|
|
539
|
+
await earlyHintsCache.put(
|
|
540
|
+
earlyHintsCacheKey,
|
|
541
|
+
new Response(null, { headers: { Link: linkHeader } })
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
} catch (err) {
|
|
545
|
+
}
|
|
546
|
+
})()
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
const headersMatcher = generateRulesMatcher(
|
|
551
|
+
headerRules,
|
|
552
|
+
({ set = {}, unset = [] }, replacements) => {
|
|
553
|
+
const replacedSet = {};
|
|
554
|
+
Object.keys(set).forEach((key) => {
|
|
555
|
+
replacedSet[key] = replacer(set[key], replacements);
|
|
556
|
+
});
|
|
557
|
+
return {
|
|
558
|
+
set: replacedSet,
|
|
559
|
+
unset
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
const matches = headersMatcher({ request });
|
|
564
|
+
const setMap = /* @__PURE__ */ new Set();
|
|
565
|
+
matches.forEach(({ set = {}, unset = [] }) => {
|
|
566
|
+
unset.forEach((key) => {
|
|
567
|
+
headers.delete(key);
|
|
568
|
+
});
|
|
569
|
+
Object.keys(set).forEach((key) => {
|
|
570
|
+
if (setMap.has(key.toLowerCase())) {
|
|
571
|
+
headers.append(key, set[key]);
|
|
572
|
+
} else {
|
|
573
|
+
headers.set(key, set[key]);
|
|
574
|
+
setMap.add(key.toLowerCase());
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
});
|
|
578
|
+
return new Response(
|
|
579
|
+
[101, 204, 205, 304].includes(response.status) ? null : response.body,
|
|
580
|
+
{
|
|
581
|
+
headers,
|
|
582
|
+
status: response.status,
|
|
583
|
+
statusText: response.statusText
|
|
584
|
+
}
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
return await attachHeaders(await generateResponse());
|
|
588
|
+
async function serveAsset(servingAssetEntry, options = { preserve: true }) {
|
|
589
|
+
let content;
|
|
590
|
+
try {
|
|
591
|
+
content = negotiateContent(request, servingAssetEntry);
|
|
592
|
+
} catch (err) {
|
|
593
|
+
return new NotAcceptableResponse();
|
|
594
|
+
}
|
|
595
|
+
const assetKey = getAssetKey(servingAssetEntry, content);
|
|
596
|
+
const etag = `"${assetKey}"`;
|
|
597
|
+
const weakEtag = `W/${etag}`;
|
|
598
|
+
const ifNoneMatch = request.headers.get("if-none-match");
|
|
599
|
+
if (ifNoneMatch === weakEtag || ifNoneMatch === etag) {
|
|
600
|
+
return new NotModifiedResponse();
|
|
601
|
+
}
|
|
602
|
+
try {
|
|
603
|
+
const asset = await fetchAsset(assetKey);
|
|
604
|
+
const headers = {
|
|
605
|
+
etag,
|
|
606
|
+
"content-type": asset.contentType
|
|
607
|
+
};
|
|
608
|
+
let encodeBody = "automatic";
|
|
609
|
+
if (xServerEnvHeader) {
|
|
610
|
+
headers["x-server-env"] = xServerEnvHeader;
|
|
611
|
+
}
|
|
612
|
+
if (content.encoding) {
|
|
613
|
+
encodeBody = "manual";
|
|
614
|
+
headers["cache-control"] = "no-transform";
|
|
615
|
+
headers["content-encoding"] = content.encoding;
|
|
616
|
+
}
|
|
617
|
+
const response = new OkResponse(
|
|
618
|
+
request.method === "HEAD" ? null : asset.body,
|
|
619
|
+
{
|
|
620
|
+
headers,
|
|
621
|
+
encodeBody
|
|
622
|
+
}
|
|
623
|
+
);
|
|
624
|
+
if (isCacheable(request)) {
|
|
625
|
+
response.headers.append("cache-control", CACHE_CONTROL_BROWSER);
|
|
626
|
+
}
|
|
627
|
+
attachAdditionalHeaders(response, content, servingAssetEntry, asset);
|
|
628
|
+
if (isPreview(new URL(request.url))) {
|
|
629
|
+
response.headers.set("x-robots-tag", "noindex");
|
|
630
|
+
}
|
|
631
|
+
if (options.preserve) {
|
|
632
|
+
const preservedResponse = new Response(
|
|
633
|
+
[101, 204, 205, 304].includes(response.status) ? null : response.clone().body,
|
|
634
|
+
response
|
|
635
|
+
);
|
|
636
|
+
preservedResponse.headers.set(
|
|
637
|
+
"cache-control",
|
|
638
|
+
CACHE_CONTROL_PRESERVATION
|
|
639
|
+
);
|
|
640
|
+
preservedResponse.headers.set("x-robots-tag", "noindex");
|
|
641
|
+
if (waitUntil && caches) {
|
|
642
|
+
waitUntil(
|
|
643
|
+
caches.open(ASSET_PRESERVATION_CACHE).then(
|
|
644
|
+
(assetPreservationCache) => assetPreservationCache.put(request.url, preservedResponse)
|
|
645
|
+
).catch((err) => {
|
|
646
|
+
logError(err);
|
|
647
|
+
})
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (asset.contentType.startsWith("text/html") && metadata.analytics?.version === ANALYTICS_VERSION2) {
|
|
652
|
+
return new HTMLRewriter().on("body", {
|
|
653
|
+
element(e) {
|
|
654
|
+
e.append(
|
|
655
|
+
`<!-- Cloudflare Pages Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "${metadata.analytics?.token}"}'><\/script><!-- Cloudflare Pages Analytics -->`,
|
|
656
|
+
{ html: true }
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
}).transform(response);
|
|
660
|
+
}
|
|
661
|
+
return response;
|
|
662
|
+
} catch (err) {
|
|
663
|
+
logError(err);
|
|
664
|
+
return new InternalServerErrorResponse(err);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
async function notFound() {
|
|
668
|
+
if (caches) {
|
|
669
|
+
const assetPreservationCache = await caches.open(
|
|
670
|
+
ASSET_PRESERVATION_CACHE
|
|
671
|
+
);
|
|
672
|
+
const preservedResponse = await assetPreservationCache.match(request.url);
|
|
673
|
+
if (preservedResponse) {
|
|
674
|
+
return preservedResponse;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
let cwd = pathname;
|
|
678
|
+
while (cwd) {
|
|
679
|
+
cwd = cwd.slice(0, cwd.lastIndexOf("/"));
|
|
680
|
+
if (assetEntry = await findAssetEntryForPath(`${cwd}/404.html`)) {
|
|
681
|
+
let content;
|
|
682
|
+
try {
|
|
683
|
+
content = negotiateContent(request, assetEntry);
|
|
684
|
+
} catch (err) {
|
|
685
|
+
return new NotAcceptableResponse();
|
|
686
|
+
}
|
|
687
|
+
const assetKey = getAssetKey(assetEntry, content);
|
|
688
|
+
try {
|
|
689
|
+
const { body, contentType } = await fetchAsset(assetKey);
|
|
690
|
+
const response = new NotFoundResponse(body);
|
|
691
|
+
response.headers.set("content-type", contentType);
|
|
692
|
+
return response;
|
|
693
|
+
} catch (err) {
|
|
694
|
+
logError(err);
|
|
695
|
+
return new InternalServerErrorResponse(err);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return await generateNotFoundResponse(
|
|
700
|
+
request,
|
|
701
|
+
findAssetEntryForPath,
|
|
702
|
+
serveAsset
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
function parseQualityWeightedList(list = "") {
|
|
707
|
+
const items = {};
|
|
708
|
+
list.replace(/\s/g, "").split(",").forEach((el) => {
|
|
709
|
+
const [item, weight] = el.split(";q=");
|
|
710
|
+
items[item] = weight ? parseFloat(weight) : 1;
|
|
711
|
+
});
|
|
712
|
+
return items;
|
|
713
|
+
}
|
|
714
|
+
function isCacheable(request) {
|
|
715
|
+
return !request.headers.has("authorization") && !request.headers.has("range");
|
|
716
|
+
}
|
|
717
|
+
function hasFileExtension(path) {
|
|
718
|
+
return /\/.+\.[a-z0-9]+$/i.test(path);
|
|
719
|
+
}
|
|
720
|
+
function isPreview(url) {
|
|
721
|
+
if (url.hostname.endsWith(".pages.dev")) {
|
|
722
|
+
return url.hostname.split(".").length > 3 ? true : false;
|
|
723
|
+
}
|
|
724
|
+
return false;
|
|
725
|
+
}
|
|
726
|
+
var ASSET_PRESERVATION_CACHE, CACHE_CONTROL_PRESERVATION, CACHE_CONTROL_BROWSER, REDIRECTS_VERSION2, HEADERS_VERSION2, HEADERS_VERSION_V1, ANALYTICS_VERSION2, ALLOWED_EARLY_HINT_LINK_ATTRIBUTES;
|
|
727
|
+
var init_handler = __esm({
|
|
728
|
+
"../pages-shared/asset-server/handler.ts"() {
|
|
729
|
+
init_responses();
|
|
730
|
+
init_rulesEngine();
|
|
731
|
+
ASSET_PRESERVATION_CACHE = "assetPreservationCache";
|
|
732
|
+
CACHE_CONTROL_PRESERVATION = "public, s-maxage=604800";
|
|
733
|
+
CACHE_CONTROL_BROWSER = "public, max-age=0, must-revalidate";
|
|
734
|
+
REDIRECTS_VERSION2 = 1;
|
|
735
|
+
HEADERS_VERSION2 = 2;
|
|
736
|
+
HEADERS_VERSION_V1 = 1;
|
|
737
|
+
ANALYTICS_VERSION2 = 1;
|
|
738
|
+
ALLOWED_EARLY_HINT_LINK_ATTRIBUTES = ["rel", "as", "href"];
|
|
739
|
+
}
|
|
740
|
+
});
|
|
8
741
|
|
|
9
742
|
// src/miniflare-cli/index.ts
|
|
10
|
-
import {
|
|
743
|
+
import { fetch } from "@miniflare/core";
|
|
744
|
+
import {
|
|
745
|
+
DurableObjectNamespace,
|
|
746
|
+
DurableObjectStub
|
|
747
|
+
} from "@miniflare/durable-objects";
|
|
748
|
+
import {
|
|
749
|
+
Log as MiniflareLog,
|
|
750
|
+
LogLevel as MiniflareLogLevel,
|
|
751
|
+
Miniflare,
|
|
752
|
+
Request as MiniflareRequest3,
|
|
753
|
+
Response as MiniflareResponse3
|
|
754
|
+
} from "miniflare";
|
|
11
755
|
|
|
12
756
|
// ../../node_modules/yargs/lib/platform-shims/esm.mjs
|
|
13
757
|
import { notStrictEqual, strictEqual } from "assert";
|
|
@@ -4816,14 +5560,577 @@ function isYargsInstance(y) {
|
|
|
4816
5560
|
var Yargs = YargsFactory(esm_default);
|
|
4817
5561
|
var yargs_default = Yargs;
|
|
4818
5562
|
|
|
4819
|
-
// src/
|
|
4820
|
-
var
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
5563
|
+
// src/errors.ts
|
|
5564
|
+
var FatalError = class extends Error {
|
|
5565
|
+
constructor(message, code) {
|
|
5566
|
+
super(message);
|
|
5567
|
+
this.code = code;
|
|
5568
|
+
}
|
|
4824
5569
|
};
|
|
4825
|
-
|
|
4826
|
-
|
|
5570
|
+
|
|
5571
|
+
// src/miniflare-cli/assets.ts
|
|
5572
|
+
import { existsSync, lstatSync, readFileSync as readFileSync5 } from "node:fs";
|
|
5573
|
+
import { join } from "node:path";
|
|
5574
|
+
|
|
5575
|
+
// ../pages-shared/metadata-generator/constants.ts
|
|
5576
|
+
var REDIRECTS_VERSION = 1;
|
|
5577
|
+
var HEADERS_VERSION = 2;
|
|
5578
|
+
var ANALYTICS_VERSION = 1;
|
|
5579
|
+
var PERMITTED_STATUS_CODES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
5580
|
+
var HEADER_SEPARATOR = ":";
|
|
5581
|
+
var MAX_LINE_LENGTH = 2e3;
|
|
5582
|
+
var MAX_HEADER_RULES = 100;
|
|
5583
|
+
var MAX_DYNAMIC_REDIRECT_RULES = 100;
|
|
5584
|
+
var MAX_STATIC_REDIRECT_RULES = 2e3;
|
|
5585
|
+
var UNSET_OPERATOR = "! ";
|
|
5586
|
+
var SPLAT_REGEX = /\*/g;
|
|
5587
|
+
var PLACEHOLDER_REGEX = /:\w+/g;
|
|
5588
|
+
|
|
5589
|
+
// ../pages-shared/metadata-generator/createMetadataObject.ts
|
|
5590
|
+
function createMetadataObject({
|
|
5591
|
+
redirects,
|
|
5592
|
+
headers,
|
|
5593
|
+
webAnalyticsToken,
|
|
5594
|
+
deploymentId,
|
|
5595
|
+
failOpen,
|
|
5596
|
+
logger = (_message) => {
|
|
5597
|
+
}
|
|
5598
|
+
}) {
|
|
5599
|
+
return {
|
|
5600
|
+
...constructRedirects({ redirects, logger }),
|
|
5601
|
+
...constructHeaders({ headers, logger }),
|
|
5602
|
+
...constructWebAnalytics({ webAnalyticsToken, logger }),
|
|
5603
|
+
deploymentId,
|
|
5604
|
+
failOpen
|
|
5605
|
+
};
|
|
5606
|
+
}
|
|
5607
|
+
function constructRedirects({
|
|
5608
|
+
redirects,
|
|
5609
|
+
logger
|
|
5610
|
+
}) {
|
|
5611
|
+
if (!redirects)
|
|
5612
|
+
return {};
|
|
5613
|
+
const num_valid = redirects.rules.length;
|
|
5614
|
+
const num_invalid = redirects.invalid.length;
|
|
5615
|
+
logger(
|
|
5616
|
+
`Parsed ${num_valid} valid redirect rule${num_valid === 1 ? "" : "s"}.`
|
|
5617
|
+
);
|
|
5618
|
+
if (num_invalid > 0) {
|
|
5619
|
+
logger(`Found invalid redirect lines:`);
|
|
5620
|
+
for (const { line, lineNumber, message } of redirects.invalid) {
|
|
5621
|
+
if (line)
|
|
5622
|
+
logger(` - ${lineNumber ? `#${lineNumber}: ` : ""}${line}`);
|
|
5623
|
+
logger(` ${message}`);
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5626
|
+
if (num_valid === 0) {
|
|
5627
|
+
return {};
|
|
5628
|
+
}
|
|
5629
|
+
const staticRedirects = {};
|
|
5630
|
+
const dynamicRedirects = {};
|
|
5631
|
+
let canCreateStaticRule = true;
|
|
5632
|
+
for (const rule of redirects.rules) {
|
|
5633
|
+
if (!rule.from.match(SPLAT_REGEX) && !rule.from.match(PLACEHOLDER_REGEX)) {
|
|
5634
|
+
if (canCreateStaticRule) {
|
|
5635
|
+
staticRedirects[rule.from] = { status: rule.status, to: rule.to };
|
|
5636
|
+
continue;
|
|
5637
|
+
} else {
|
|
5638
|
+
logger(
|
|
5639
|
+
`Info: the redirect rule ${rule.from} \u2192 ${rule.status} ${rule.to} could be made more performant by bringing it above any lines with splats or placeholders.`
|
|
5640
|
+
);
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
dynamicRedirects[rule.from] = { status: rule.status, to: rule.to };
|
|
5644
|
+
canCreateStaticRule = false;
|
|
5645
|
+
}
|
|
5646
|
+
return {
|
|
5647
|
+
redirects: {
|
|
5648
|
+
version: REDIRECTS_VERSION,
|
|
5649
|
+
staticRules: staticRedirects,
|
|
5650
|
+
rules: dynamicRedirects
|
|
5651
|
+
}
|
|
5652
|
+
};
|
|
5653
|
+
}
|
|
5654
|
+
function constructHeaders({
|
|
5655
|
+
headers,
|
|
5656
|
+
logger
|
|
5657
|
+
}) {
|
|
5658
|
+
if (!headers)
|
|
5659
|
+
return {};
|
|
5660
|
+
const num_valid = headers.rules.length;
|
|
5661
|
+
const num_invalid = headers.invalid.length;
|
|
5662
|
+
logger(`Parsed ${num_valid} valid header rule${num_valid === 1 ? "" : "s"}.`);
|
|
5663
|
+
if (num_invalid > 0) {
|
|
5664
|
+
logger(`Found invalid header lines:`);
|
|
5665
|
+
for (const { line, lineNumber, message } of headers.invalid) {
|
|
5666
|
+
if (line)
|
|
5667
|
+
logger(` - ${lineNumber ? `#${lineNumber}: ` : ""} ${line}`);
|
|
5668
|
+
logger(` ${message}`);
|
|
5669
|
+
}
|
|
5670
|
+
}
|
|
5671
|
+
if (num_valid === 0) {
|
|
5672
|
+
return {};
|
|
5673
|
+
}
|
|
5674
|
+
const rules = {};
|
|
5675
|
+
for (const rule of headers.rules) {
|
|
5676
|
+
rules[rule.path] = {};
|
|
5677
|
+
if (Object.keys(rule.headers).length) {
|
|
5678
|
+
rules[rule.path].set = rule.headers;
|
|
5679
|
+
}
|
|
5680
|
+
if (rule.unsetHeaders.length) {
|
|
5681
|
+
rules[rule.path].unset = rule.unsetHeaders;
|
|
5682
|
+
}
|
|
5683
|
+
}
|
|
5684
|
+
return {
|
|
5685
|
+
headers: {
|
|
5686
|
+
version: HEADERS_VERSION,
|
|
5687
|
+
rules
|
|
5688
|
+
}
|
|
5689
|
+
};
|
|
5690
|
+
}
|
|
5691
|
+
function constructWebAnalytics({
|
|
5692
|
+
webAnalyticsToken
|
|
5693
|
+
}) {
|
|
5694
|
+
if (!webAnalyticsToken)
|
|
5695
|
+
return {};
|
|
5696
|
+
return {
|
|
5697
|
+
analytics: {
|
|
5698
|
+
version: ANALYTICS_VERSION,
|
|
5699
|
+
token: webAnalyticsToken
|
|
5700
|
+
}
|
|
5701
|
+
};
|
|
5702
|
+
}
|
|
5703
|
+
|
|
5704
|
+
// ../pages-shared/metadata-generator/validateURL.ts
|
|
5705
|
+
var extractPathname = (path = "/", includeSearch, includeHash) => {
|
|
5706
|
+
if (!path.startsWith("/"))
|
|
5707
|
+
path = `/${path}`;
|
|
5708
|
+
const url = new URL(`//${path}`, "relative://");
|
|
5709
|
+
return `${url.pathname}${includeSearch ? url.search : ""}${includeHash ? url.hash : ""}`;
|
|
5710
|
+
};
|
|
5711
|
+
var URL_REGEX = /^https:\/\/+(?<host>[^/]+)\/?(?<path>.*)/;
|
|
5712
|
+
var PATH_REGEX = /^\//;
|
|
5713
|
+
var validateUrl = (token, onlyRelative = false, includeSearch = false, includeHash = false) => {
|
|
5714
|
+
const host = URL_REGEX.exec(token);
|
|
5715
|
+
if (host && host.groups && host.groups.host) {
|
|
5716
|
+
if (onlyRelative)
|
|
5717
|
+
return [
|
|
5718
|
+
void 0,
|
|
5719
|
+
`Only relative URLs are allowed. Skipping absolute URL ${token}.`
|
|
5720
|
+
];
|
|
5721
|
+
return [
|
|
5722
|
+
`https://${host.groups.host}${extractPathname(
|
|
5723
|
+
host.groups.path,
|
|
5724
|
+
includeSearch,
|
|
5725
|
+
includeHash
|
|
5726
|
+
)}`,
|
|
5727
|
+
void 0
|
|
5728
|
+
];
|
|
5729
|
+
} else {
|
|
5730
|
+
if (!token.startsWith("/") && onlyRelative)
|
|
5731
|
+
token = `/${token}`;
|
|
5732
|
+
const path = PATH_REGEX.exec(token);
|
|
5733
|
+
if (path) {
|
|
5734
|
+
try {
|
|
5735
|
+
return [extractPathname(token, includeSearch, includeHash), void 0];
|
|
5736
|
+
} catch {
|
|
5737
|
+
return [void 0, `Error parsing URL segment ${token}. Skipping.`];
|
|
5738
|
+
}
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
return [
|
|
5742
|
+
void 0,
|
|
5743
|
+
onlyRelative ? "URLs should begin with a forward-slash." : 'URLs should either be relative (e.g. begin with a forward-slash), or use HTTPS (e.g. begin with "https://").'
|
|
5744
|
+
];
|
|
5745
|
+
};
|
|
5746
|
+
|
|
5747
|
+
// ../pages-shared/metadata-generator/parseHeaders.ts
|
|
5748
|
+
var LINE_IS_PROBABLY_A_PATH = new RegExp(/^([^\s]+:\/\/|^\/)/);
|
|
5749
|
+
function parseHeaders(input) {
|
|
5750
|
+
const lines = input.split("\n");
|
|
5751
|
+
const rules = [];
|
|
5752
|
+
const invalid = [];
|
|
5753
|
+
let rule = void 0;
|
|
5754
|
+
for (let i = 0; i < lines.length; i++) {
|
|
5755
|
+
const line = lines[i].trim();
|
|
5756
|
+
if (line.length === 0 || line.startsWith("#"))
|
|
5757
|
+
continue;
|
|
5758
|
+
if (line.length > MAX_LINE_LENGTH) {
|
|
5759
|
+
invalid.push({
|
|
5760
|
+
message: `Ignoring line ${i + 1} as it exceeds the maximum allowed length of ${MAX_LINE_LENGTH}.`
|
|
5761
|
+
});
|
|
5762
|
+
continue;
|
|
5763
|
+
}
|
|
5764
|
+
if (LINE_IS_PROBABLY_A_PATH.test(line)) {
|
|
5765
|
+
if (rules.length >= MAX_HEADER_RULES) {
|
|
5766
|
+
invalid.push({
|
|
5767
|
+
message: `Maximum number of rules supported is ${MAX_HEADER_RULES}. Skipping remaining ${lines.length - i} lines of file.`
|
|
5768
|
+
});
|
|
5769
|
+
break;
|
|
5770
|
+
}
|
|
5771
|
+
if (rule) {
|
|
5772
|
+
if (isValidRule(rule)) {
|
|
5773
|
+
rules.push({
|
|
5774
|
+
path: rule.path,
|
|
5775
|
+
headers: rule.headers,
|
|
5776
|
+
unsetHeaders: rule.unsetHeaders
|
|
5777
|
+
});
|
|
5778
|
+
} else {
|
|
5779
|
+
invalid.push({
|
|
5780
|
+
line: rule.line,
|
|
5781
|
+
lineNumber: i + 1,
|
|
5782
|
+
message: "No headers specified"
|
|
5783
|
+
});
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
const [path, pathError] = validateUrl(line);
|
|
5787
|
+
if (pathError) {
|
|
5788
|
+
invalid.push({
|
|
5789
|
+
line,
|
|
5790
|
+
lineNumber: i + 1,
|
|
5791
|
+
message: pathError
|
|
5792
|
+
});
|
|
5793
|
+
rule = void 0;
|
|
5794
|
+
continue;
|
|
5795
|
+
}
|
|
5796
|
+
rule = {
|
|
5797
|
+
path,
|
|
5798
|
+
line,
|
|
5799
|
+
headers: {},
|
|
5800
|
+
unsetHeaders: []
|
|
5801
|
+
};
|
|
5802
|
+
continue;
|
|
5803
|
+
}
|
|
5804
|
+
if (!line.includes(HEADER_SEPARATOR)) {
|
|
5805
|
+
if (!rule) {
|
|
5806
|
+
invalid.push({
|
|
5807
|
+
line,
|
|
5808
|
+
lineNumber: i + 1,
|
|
5809
|
+
message: "Expected a path beginning with at least one forward-slash"
|
|
5810
|
+
});
|
|
5811
|
+
} else {
|
|
5812
|
+
if (line.trim().startsWith(UNSET_OPERATOR)) {
|
|
5813
|
+
rule.unsetHeaders.push(line.trim().replace(UNSET_OPERATOR, ""));
|
|
5814
|
+
} else {
|
|
5815
|
+
invalid.push({
|
|
5816
|
+
line,
|
|
5817
|
+
lineNumber: i + 1,
|
|
5818
|
+
message: "Expected a colon-separated header pair (e.g. name: value)"
|
|
5819
|
+
});
|
|
5820
|
+
}
|
|
5821
|
+
}
|
|
5822
|
+
continue;
|
|
5823
|
+
}
|
|
5824
|
+
const [rawName, ...rawValue] = line.split(HEADER_SEPARATOR);
|
|
5825
|
+
const name = rawName.trim().toLowerCase();
|
|
5826
|
+
if (name.includes(" ")) {
|
|
5827
|
+
invalid.push({
|
|
5828
|
+
line,
|
|
5829
|
+
lineNumber: i + 1,
|
|
5830
|
+
message: "Header name cannot include spaces"
|
|
5831
|
+
});
|
|
5832
|
+
continue;
|
|
5833
|
+
}
|
|
5834
|
+
const value = rawValue.join(HEADER_SEPARATOR).trim();
|
|
5835
|
+
if (name === "") {
|
|
5836
|
+
invalid.push({
|
|
5837
|
+
line,
|
|
5838
|
+
lineNumber: i + 1,
|
|
5839
|
+
message: "No header name specified"
|
|
5840
|
+
});
|
|
5841
|
+
continue;
|
|
5842
|
+
}
|
|
5843
|
+
if (value === "") {
|
|
5844
|
+
invalid.push({
|
|
5845
|
+
line,
|
|
5846
|
+
lineNumber: i + 1,
|
|
5847
|
+
message: "No header value specified"
|
|
5848
|
+
});
|
|
5849
|
+
continue;
|
|
5850
|
+
}
|
|
5851
|
+
if (!rule) {
|
|
5852
|
+
invalid.push({
|
|
5853
|
+
line,
|
|
5854
|
+
lineNumber: i + 1,
|
|
5855
|
+
message: `Path should come before header (${name}: ${value})`
|
|
5856
|
+
});
|
|
5857
|
+
continue;
|
|
5858
|
+
}
|
|
5859
|
+
const existingValues = rule.headers[name];
|
|
5860
|
+
rule.headers[name] = existingValues ? `${existingValues}, ${value}` : value;
|
|
5861
|
+
}
|
|
5862
|
+
if (rule) {
|
|
5863
|
+
if (isValidRule(rule)) {
|
|
5864
|
+
rules.push({
|
|
5865
|
+
path: rule.path,
|
|
5866
|
+
headers: rule.headers,
|
|
5867
|
+
unsetHeaders: rule.unsetHeaders
|
|
5868
|
+
});
|
|
5869
|
+
} else {
|
|
5870
|
+
invalid.push({ line: rule.line, message: "No headers specified" });
|
|
5871
|
+
}
|
|
5872
|
+
}
|
|
5873
|
+
return {
|
|
5874
|
+
rules,
|
|
5875
|
+
invalid
|
|
5876
|
+
};
|
|
5877
|
+
}
|
|
5878
|
+
function isValidRule(rule) {
|
|
5879
|
+
return Object.keys(rule.headers).length > 0 || rule.unsetHeaders.length > 0;
|
|
5880
|
+
}
|
|
5881
|
+
|
|
5882
|
+
// ../pages-shared/metadata-generator/parseRedirects.ts
|
|
5883
|
+
function parseRedirects(input) {
|
|
5884
|
+
const lines = input.split("\n");
|
|
5885
|
+
const rules = [];
|
|
5886
|
+
const seen_paths = /* @__PURE__ */ new Set();
|
|
5887
|
+
const invalid = [];
|
|
5888
|
+
let staticRules = 0;
|
|
5889
|
+
let dynamicRules = 0;
|
|
5890
|
+
let canCreateStaticRule = true;
|
|
5891
|
+
for (let i = 0; i < lines.length; i++) {
|
|
5892
|
+
const line = lines[i].trim();
|
|
5893
|
+
if (line.length === 0 || line.startsWith("#"))
|
|
5894
|
+
continue;
|
|
5895
|
+
if (line.length > MAX_LINE_LENGTH) {
|
|
5896
|
+
invalid.push({
|
|
5897
|
+
message: `Ignoring line ${i + 1} as it exceeds the maximum allowed length of ${MAX_LINE_LENGTH}.`
|
|
5898
|
+
});
|
|
5899
|
+
continue;
|
|
5900
|
+
}
|
|
5901
|
+
const tokens = line.split(/\s+/);
|
|
5902
|
+
if (tokens.length < 2 || tokens.length > 3) {
|
|
5903
|
+
invalid.push({
|
|
5904
|
+
line,
|
|
5905
|
+
lineNumber: i + 1,
|
|
5906
|
+
message: `Expected exactly 2 or 3 whitespace-separated tokens. Got ${tokens.length}.`
|
|
5907
|
+
});
|
|
5908
|
+
continue;
|
|
5909
|
+
}
|
|
5910
|
+
const [str_from, str_to, str_status = "302"] = tokens;
|
|
5911
|
+
const fromResult = validateUrl(str_from, true, false, false);
|
|
5912
|
+
if (fromResult[0] === void 0) {
|
|
5913
|
+
invalid.push({
|
|
5914
|
+
line,
|
|
5915
|
+
lineNumber: i + 1,
|
|
5916
|
+
message: fromResult[1]
|
|
5917
|
+
});
|
|
5918
|
+
continue;
|
|
5919
|
+
}
|
|
5920
|
+
const from = fromResult[0];
|
|
5921
|
+
if (canCreateStaticRule && !from.match(SPLAT_REGEX) && !from.match(PLACEHOLDER_REGEX)) {
|
|
5922
|
+
staticRules += 1;
|
|
5923
|
+
if (staticRules > MAX_STATIC_REDIRECT_RULES) {
|
|
5924
|
+
invalid.push({
|
|
5925
|
+
message: `Maximum number of static rules supported is ${MAX_STATIC_REDIRECT_RULES}. Skipping line.`
|
|
5926
|
+
});
|
|
5927
|
+
continue;
|
|
5928
|
+
}
|
|
5929
|
+
} else {
|
|
5930
|
+
dynamicRules += 1;
|
|
5931
|
+
canCreateStaticRule = false;
|
|
5932
|
+
if (dynamicRules > MAX_DYNAMIC_REDIRECT_RULES) {
|
|
5933
|
+
invalid.push({
|
|
5934
|
+
message: `Maximum number of dynamic rules supported is ${MAX_DYNAMIC_REDIRECT_RULES}. Skipping remaining ${lines.length - i} lines of file.`
|
|
5935
|
+
});
|
|
5936
|
+
break;
|
|
5937
|
+
}
|
|
5938
|
+
}
|
|
5939
|
+
const toResult = validateUrl(str_to, false, true, true);
|
|
5940
|
+
if (toResult[0] === void 0) {
|
|
5941
|
+
invalid.push({
|
|
5942
|
+
line,
|
|
5943
|
+
lineNumber: i + 1,
|
|
5944
|
+
message: toResult[1]
|
|
5945
|
+
});
|
|
5946
|
+
continue;
|
|
5947
|
+
}
|
|
5948
|
+
const to = toResult[0];
|
|
5949
|
+
const status = Number(str_status);
|
|
5950
|
+
if (isNaN(status) || !PERMITTED_STATUS_CODES.has(status)) {
|
|
5951
|
+
invalid.push({
|
|
5952
|
+
line,
|
|
5953
|
+
lineNumber: i + 1,
|
|
5954
|
+
message: `Valid status codes are 301, 302 (default), 303, 307, or 308. Got ${str_status}.`
|
|
5955
|
+
});
|
|
5956
|
+
continue;
|
|
5957
|
+
}
|
|
5958
|
+
if (seen_paths.has(from)) {
|
|
5959
|
+
invalid.push({
|
|
5960
|
+
line,
|
|
5961
|
+
lineNumber: i + 1,
|
|
5962
|
+
message: `Ignoring duplicate rule for path ${from}.`
|
|
5963
|
+
});
|
|
5964
|
+
continue;
|
|
5965
|
+
}
|
|
5966
|
+
seen_paths.add(from);
|
|
5967
|
+
rules.push({ from, to, status, lineNumber: i + 1 });
|
|
5968
|
+
}
|
|
5969
|
+
return {
|
|
5970
|
+
rules,
|
|
5971
|
+
invalid
|
|
5972
|
+
};
|
|
5973
|
+
}
|
|
5974
|
+
|
|
5975
|
+
// src/miniflare-cli/assets.ts
|
|
5976
|
+
var import_mime = __toESM(require_mime());
|
|
5977
|
+
import {
|
|
5978
|
+
Response as MiniflareResponse2,
|
|
5979
|
+
Request as MiniflareRequest2
|
|
5980
|
+
} from "@miniflare/core";
|
|
5981
|
+
import { upgradingFetch as miniflareFetch2 } from "@miniflare/web-sockets";
|
|
5982
|
+
import { watch } from "chokidar";
|
|
5983
|
+
|
|
5984
|
+
// src/pages/hash.tsx
|
|
5985
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
5986
|
+
import { extname as extname2 } from "node:path";
|
|
5987
|
+
import { hash as blake3hash } from "blake3-wasm";
|
|
5988
|
+
var hashFile = (filepath) => {
|
|
5989
|
+
const contents = readFileSync4(filepath);
|
|
5990
|
+
const base64Contents = contents.toString("base64");
|
|
5991
|
+
const extension = extname2(filepath).substring(1);
|
|
5992
|
+
return blake3hash(base64Contents + extension).toString("hex").slice(0, 32);
|
|
5993
|
+
};
|
|
5994
|
+
|
|
5995
|
+
// src/miniflare-cli/assets.ts
|
|
5996
|
+
async function generateASSETSBinding(options) {
|
|
5997
|
+
const assetsFetch = options.directory !== void 0 ? await generateAssetsFetch(options.directory, options.log) : invalidAssetsFetch;
|
|
5998
|
+
return async function(miniflareRequest) {
|
|
5999
|
+
if (options.proxyPort) {
|
|
6000
|
+
try {
|
|
6001
|
+
const url = new URL(miniflareRequest.url);
|
|
6002
|
+
url.host = `localhost:${options.proxyPort}`;
|
|
6003
|
+
const proxyRequest = new MiniflareRequest2(url, miniflareRequest);
|
|
6004
|
+
if (proxyRequest.headers.get("Upgrade") === "websocket") {
|
|
6005
|
+
proxyRequest.headers.delete("Sec-WebSocket-Accept");
|
|
6006
|
+
proxyRequest.headers.delete("Sec-WebSocket-Key");
|
|
6007
|
+
}
|
|
6008
|
+
return await miniflareFetch2(proxyRequest);
|
|
6009
|
+
} catch (thrown) {
|
|
6010
|
+
options.log.error(new Error(`Could not proxy request: ${thrown}`));
|
|
6011
|
+
return new MiniflareResponse2(
|
|
6012
|
+
`[wrangler] Could not proxy request: ${thrown}`,
|
|
6013
|
+
{
|
|
6014
|
+
status: 502
|
|
6015
|
+
}
|
|
6016
|
+
);
|
|
6017
|
+
}
|
|
6018
|
+
} else {
|
|
6019
|
+
try {
|
|
6020
|
+
return await assetsFetch(miniflareRequest);
|
|
6021
|
+
} catch (thrown) {
|
|
6022
|
+
options.log.error(new Error(`Could not serve static asset: ${thrown}`));
|
|
6023
|
+
return new MiniflareResponse2(
|
|
6024
|
+
`[wrangler] Could not serve static asset: ${thrown}`,
|
|
6025
|
+
{ status: 502 }
|
|
6026
|
+
);
|
|
6027
|
+
}
|
|
6028
|
+
}
|
|
6029
|
+
};
|
|
6030
|
+
}
|
|
6031
|
+
async function generateAssetsFetch(directory, log) {
|
|
6032
|
+
await Promise.resolve().then(() => (init_miniflare(), miniflare_exports));
|
|
6033
|
+
const { generateHandler: generateHandler2, parseQualityWeightedList: parseQualityWeightedList2 } = await Promise.resolve().then(() => (init_handler(), handler_exports));
|
|
6034
|
+
const headersFile = join(directory, "_headers");
|
|
6035
|
+
const redirectsFile = join(directory, "_redirects");
|
|
6036
|
+
const workerFile = join(directory, "_worker.js");
|
|
6037
|
+
const ignoredFiles = [headersFile, redirectsFile, workerFile];
|
|
6038
|
+
let redirects;
|
|
6039
|
+
if (existsSync(redirectsFile)) {
|
|
6040
|
+
const contents = readFileSync5(redirectsFile, "utf-8");
|
|
6041
|
+
redirects = parseRedirects(contents);
|
|
6042
|
+
}
|
|
6043
|
+
let headers;
|
|
6044
|
+
if (existsSync(headersFile)) {
|
|
6045
|
+
const contents = readFileSync5(headersFile, "utf-8");
|
|
6046
|
+
headers = parseHeaders(contents);
|
|
6047
|
+
}
|
|
6048
|
+
let metadata = createMetadataObject({
|
|
6049
|
+
redirects,
|
|
6050
|
+
headers,
|
|
6051
|
+
logger: log.warn.bind(log)
|
|
6052
|
+
});
|
|
6053
|
+
watch([headersFile, redirectsFile], { persistent: true }).on(
|
|
6054
|
+
"change",
|
|
6055
|
+
(path) => {
|
|
6056
|
+
switch (path) {
|
|
6057
|
+
case headersFile: {
|
|
6058
|
+
log.log("_headers modified. Re-evaluating...");
|
|
6059
|
+
const contents = readFileSync5(headersFile).toString();
|
|
6060
|
+
headers = parseHeaders(contents);
|
|
6061
|
+
break;
|
|
6062
|
+
}
|
|
6063
|
+
case redirectsFile: {
|
|
6064
|
+
log.log("_redirects modified. Re-evaluating...");
|
|
6065
|
+
const contents = readFileSync5(redirectsFile).toString();
|
|
6066
|
+
redirects = parseRedirects(contents);
|
|
6067
|
+
break;
|
|
6068
|
+
}
|
|
6069
|
+
}
|
|
6070
|
+
metadata = createMetadataObject({
|
|
6071
|
+
redirects,
|
|
6072
|
+
headers,
|
|
6073
|
+
logger: log.warn
|
|
6074
|
+
});
|
|
6075
|
+
}
|
|
6076
|
+
);
|
|
6077
|
+
const generateResponse = async (request) => {
|
|
6078
|
+
const assetKeyEntryMap = /* @__PURE__ */ new Map();
|
|
6079
|
+
return await generateHandler2({
|
|
6080
|
+
request,
|
|
6081
|
+
metadata,
|
|
6082
|
+
xServerEnvHeader: "dev",
|
|
6083
|
+
logError: console.error,
|
|
6084
|
+
findAssetEntryForPath: async (path) => {
|
|
6085
|
+
const filepath = join(directory, path);
|
|
6086
|
+
if (existsSync(filepath) && lstatSync(filepath).isFile() && !ignoredFiles.includes(filepath)) {
|
|
6087
|
+
const hash = hashFile(filepath);
|
|
6088
|
+
assetKeyEntryMap.set(hash, filepath);
|
|
6089
|
+
return hash;
|
|
6090
|
+
}
|
|
6091
|
+
return null;
|
|
6092
|
+
},
|
|
6093
|
+
getAssetKey: (assetEntry) => {
|
|
6094
|
+
return assetEntry;
|
|
6095
|
+
},
|
|
6096
|
+
negotiateContent: (contentRequest) => {
|
|
6097
|
+
let rawAcceptEncoding;
|
|
6098
|
+
if (contentRequest.cf && "clientAcceptEncoding" in contentRequest.cf && contentRequest.cf.clientAcceptEncoding) {
|
|
6099
|
+
rawAcceptEncoding = contentRequest.cf.clientAcceptEncoding;
|
|
6100
|
+
} else {
|
|
6101
|
+
rawAcceptEncoding = contentRequest.headers.get("Accept-Encoding") || void 0;
|
|
6102
|
+
}
|
|
6103
|
+
const acceptEncoding = parseQualityWeightedList2(rawAcceptEncoding);
|
|
6104
|
+
if (acceptEncoding["identity"] === 0 || acceptEncoding["*"] === 0 && acceptEncoding["identity"] === void 0) {
|
|
6105
|
+
throw new Error("No acceptable encodings available");
|
|
6106
|
+
}
|
|
6107
|
+
return { encoding: null };
|
|
6108
|
+
},
|
|
6109
|
+
fetchAsset: async (assetKey) => {
|
|
6110
|
+
const filepath = assetKeyEntryMap.get(assetKey);
|
|
6111
|
+
if (!filepath) {
|
|
6112
|
+
throw new Error(
|
|
6113
|
+
"Could not fetch asset. Please file an issue on GitHub (https://github.com/cloudflare/wrangler2/issues/new/choose) with reproduction steps."
|
|
6114
|
+
);
|
|
6115
|
+
}
|
|
6116
|
+
const body = readFileSync5(filepath);
|
|
6117
|
+
let contentType = (0, import_mime.getType)(filepath) || "application/octet-stream";
|
|
6118
|
+
if (contentType.startsWith("text/") && !contentType.includes("charset")) {
|
|
6119
|
+
contentType = `${contentType}; charset=utf-8`;
|
|
6120
|
+
}
|
|
6121
|
+
return { body, contentType };
|
|
6122
|
+
}
|
|
6123
|
+
});
|
|
6124
|
+
};
|
|
6125
|
+
return async (input, init) => {
|
|
6126
|
+
const request = new MiniflareRequest2(input, init);
|
|
6127
|
+
return await generateResponse(request);
|
|
6128
|
+
};
|
|
6129
|
+
}
|
|
6130
|
+
var invalidAssetsFetch = () => {
|
|
6131
|
+
throw new Error(
|
|
6132
|
+
"Trying to fetch assets directly when there is no `directory` option specified."
|
|
6133
|
+
);
|
|
4827
6134
|
};
|
|
4828
6135
|
|
|
4829
6136
|
// src/miniflare-cli/request-context.ts
|
|
@@ -4846,28 +6153,156 @@ var getRequestContextCheckOptions = async () => {
|
|
|
4846
6153
|
};
|
|
4847
6154
|
|
|
4848
6155
|
// src/miniflare-cli/index.ts
|
|
6156
|
+
var MiniflareNoOpLog = class extends MiniflareLog {
|
|
6157
|
+
log() {
|
|
6158
|
+
}
|
|
6159
|
+
error(message) {
|
|
6160
|
+
throw message;
|
|
6161
|
+
}
|
|
6162
|
+
};
|
|
4849
6163
|
async function main() {
|
|
4850
|
-
const args = await yargs_default(hideBin(process.argv)).help(false).version(false).
|
|
4851
|
-
choices: enumKeys(LogLevel)
|
|
4852
|
-
}).argv;
|
|
4853
|
-
const logLevel = LogLevel[args.log ?? "INFO"];
|
|
6164
|
+
const args = await yargs_default(hideBin(process.argv)).help(false).version(false).argv;
|
|
4854
6165
|
const requestContextCheckOptions = await getRequestContextCheckOptions();
|
|
4855
6166
|
const config = {
|
|
4856
6167
|
...JSON.parse(args._[0] ?? "{}"),
|
|
4857
|
-
...requestContextCheckOptions
|
|
4858
|
-
log: new Log(logLevel)
|
|
6168
|
+
...requestContextCheckOptions
|
|
4859
6169
|
};
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
const
|
|
6170
|
+
let logLevelString = config.logLevel.toUpperCase();
|
|
6171
|
+
if (logLevelString === "LOG")
|
|
6172
|
+
logLevelString = "INFO";
|
|
6173
|
+
const logLevel = MiniflareLogLevel[logLevelString];
|
|
6174
|
+
config.log = logLevel === MiniflareLogLevel.NONE ? new MiniflareNoOpLog() : new MiniflareLog(logLevel, config.logOptions);
|
|
6175
|
+
if (logLevel === MiniflareLogLevel.DEBUG) {
|
|
6176
|
+
console.log("MINIFLARE OPTIONS:\n", JSON.stringify(config, null, 2));
|
|
6177
|
+
}
|
|
6178
|
+
config.bindings = {
|
|
6179
|
+
...config.bindings,
|
|
6180
|
+
...config.externalDurableObjects && Object.fromEntries(
|
|
6181
|
+
Object.entries(
|
|
6182
|
+
config.externalDurableObjects
|
|
6183
|
+
).map(([binding, { name, host, port }]) => {
|
|
6184
|
+
const factory = () => {
|
|
6185
|
+
throw new FatalError(
|
|
6186
|
+
"An external Durable Object instance's state has somehow been attempted to be accessed.",
|
|
6187
|
+
1
|
|
6188
|
+
);
|
|
6189
|
+
};
|
|
6190
|
+
const namespace = new DurableObjectNamespace(name, factory);
|
|
6191
|
+
namespace.get = (id) => {
|
|
6192
|
+
const stub = new DurableObjectStub(factory, id);
|
|
6193
|
+
stub.fetch = (...reqArgs) => {
|
|
6194
|
+
const requestFromArgs = new MiniflareRequest3(...reqArgs);
|
|
6195
|
+
const url = new URL(requestFromArgs.url);
|
|
6196
|
+
url.host = host;
|
|
6197
|
+
if (port !== void 0)
|
|
6198
|
+
url.port = port.toString();
|
|
6199
|
+
const request = new MiniflareRequest3(
|
|
6200
|
+
url.toString(),
|
|
6201
|
+
requestFromArgs
|
|
6202
|
+
);
|
|
6203
|
+
request.headers.set("x-miniflare-durable-object-name", name);
|
|
6204
|
+
request.headers.set(
|
|
6205
|
+
"x-miniflare-durable-object-id",
|
|
6206
|
+
id.toString()
|
|
6207
|
+
);
|
|
6208
|
+
return fetch(request);
|
|
6209
|
+
};
|
|
6210
|
+
return stub;
|
|
6211
|
+
};
|
|
6212
|
+
return [binding, namespace];
|
|
6213
|
+
})
|
|
6214
|
+
)
|
|
6215
|
+
};
|
|
6216
|
+
let mf;
|
|
6217
|
+
let durableObjectsMf = void 0;
|
|
6218
|
+
let durableObjectsMfPort = void 0;
|
|
4864
6219
|
try {
|
|
4865
|
-
|
|
6220
|
+
if (args._[1]) {
|
|
6221
|
+
const opts = JSON.parse(
|
|
6222
|
+
args._[1]
|
|
6223
|
+
);
|
|
6224
|
+
if (isNaN(opts.proxyPort || NaN) && !opts.directory) {
|
|
6225
|
+
throw new Error(
|
|
6226
|
+
"MiniflareCLIOptions: built in service bindings set to true, but no port or directory provided"
|
|
6227
|
+
);
|
|
6228
|
+
}
|
|
6229
|
+
const options = {
|
|
6230
|
+
log: config.log,
|
|
6231
|
+
proxyPort: opts.proxyPort,
|
|
6232
|
+
directory: opts.directory
|
|
6233
|
+
};
|
|
6234
|
+
config.serviceBindings = {
|
|
6235
|
+
...config.serviceBindings,
|
|
6236
|
+
ASSETS: await generateASSETSBinding(options)
|
|
6237
|
+
};
|
|
6238
|
+
}
|
|
6239
|
+
mf = new Miniflare(config);
|
|
6240
|
+
const mfServer = await mf.startServer();
|
|
6241
|
+
const mfPort = mfServer.address().port;
|
|
4866
6242
|
await mf.startScheduler();
|
|
6243
|
+
const internalDurableObjectClassNames = Object.values(
|
|
6244
|
+
config.durableObjects
|
|
6245
|
+
);
|
|
6246
|
+
if (internalDurableObjectClassNames.length > 0) {
|
|
6247
|
+
durableObjectsMf = new Miniflare({
|
|
6248
|
+
host: config.host,
|
|
6249
|
+
port: 0,
|
|
6250
|
+
script: `
|
|
6251
|
+
export default {
|
|
6252
|
+
fetch(request, env) {
|
|
6253
|
+
return env.DO.fetch(request)
|
|
6254
|
+
}
|
|
6255
|
+
}`,
|
|
6256
|
+
serviceBindings: {
|
|
6257
|
+
DO: async (request) => {
|
|
6258
|
+
request = new MiniflareRequest3(request);
|
|
6259
|
+
const name = request.headers.get("x-miniflare-durable-object-name");
|
|
6260
|
+
const idString = request.headers.get(
|
|
6261
|
+
"x-miniflare-durable-object-id"
|
|
6262
|
+
);
|
|
6263
|
+
request.headers.delete("x-miniflare-durable-object-name");
|
|
6264
|
+
request.headers.delete("x-miniflare-durable-object-id");
|
|
6265
|
+
if (!name || !idString) {
|
|
6266
|
+
return new MiniflareResponse3(
|
|
6267
|
+
"[durable-object-proxy-err] Missing `x-miniflare-durable-object-name` or `x-miniflare-durable-object-id` headers.",
|
|
6268
|
+
{ status: 400 }
|
|
6269
|
+
);
|
|
6270
|
+
}
|
|
6271
|
+
const namespace = await mf?.getDurableObjectNamespace(name);
|
|
6272
|
+
const id = namespace?.idFromString(idString);
|
|
6273
|
+
if (!id) {
|
|
6274
|
+
return new MiniflareResponse3(
|
|
6275
|
+
"[durable-object-proxy-err] Could not generate an ID. Possibly due to a mismatched DO name and ID?",
|
|
6276
|
+
{ status: 500 }
|
|
6277
|
+
);
|
|
6278
|
+
}
|
|
6279
|
+
const stub = namespace?.get(id);
|
|
6280
|
+
if (!stub) {
|
|
6281
|
+
return new MiniflareResponse3(
|
|
6282
|
+
"[durable-object-proxy-err] Could not generate a stub. Possibly due to a mismatched DO name and ID?",
|
|
6283
|
+
{ status: 500 }
|
|
6284
|
+
);
|
|
6285
|
+
}
|
|
6286
|
+
return stub.fetch(request);
|
|
6287
|
+
}
|
|
6288
|
+
},
|
|
6289
|
+
modules: true
|
|
6290
|
+
});
|
|
6291
|
+
const server = await durableObjectsMf.startServer();
|
|
6292
|
+
durableObjectsMfPort = server.address().port;
|
|
6293
|
+
}
|
|
6294
|
+
process.send && process.send(
|
|
6295
|
+
JSON.stringify({
|
|
6296
|
+
port: mfPort,
|
|
6297
|
+
ready: true,
|
|
6298
|
+
durableObjectsPort: durableObjectsMfPort
|
|
6299
|
+
})
|
|
6300
|
+
);
|
|
4867
6301
|
} catch (e) {
|
|
4868
|
-
mf
|
|
6302
|
+
mf?.log.error(e);
|
|
4869
6303
|
process.exitCode = 1;
|
|
4870
|
-
await mf
|
|
6304
|
+
await mf?.dispose();
|
|
6305
|
+
await durableObjectsMf?.dispose();
|
|
4871
6306
|
}
|
|
4872
6307
|
}
|
|
4873
6308
|
await main();
|