rspack-plugin-cloudflare 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import { maybeStartOrUpdateRemoteProxySession, unstable_convertConfigBindingsToS
|
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { getCloudflarePreset } from "@cloudflare/unenv-preset";
|
|
9
|
+
import { getNodeCompat, normalizeAndValidateConfig } from "@cloudflare/workers-utils";
|
|
9
10
|
import { defineEnv } from "unenv";
|
|
10
11
|
import { convertToWranglerConfig, loadAndParseConfig } from "@cloudflare/config";
|
|
11
|
-
import { normalizeAndValidateConfig } from "@cloudflare/workers-utils";
|
|
12
12
|
import { WebSocketServer } from "ws";
|
|
13
13
|
import { cleanupContainers, createContainerDevPlan, generateContainerBuildId, prepareContainerImagesForDev, resolveDockerHost } from "@cloudflare/containers-shared";
|
|
14
14
|
import { Readable } from "node:stream";
|
|
@@ -54,7 +54,6 @@ function getModuleTypes(worker) {
|
|
|
54
54
|
}
|
|
55
55
|
return types;
|
|
56
56
|
}
|
|
57
|
-
const miniflare = createRequire(import.meta.resolve("wrangler"))("miniflare");
|
|
58
57
|
// src/nodejs-compat.ts
|
|
59
58
|
function resolvePolyfill(specifier) {
|
|
60
59
|
return fileURLToPath(import.meta.resolve(specifier));
|
|
@@ -75,7 +74,7 @@ function createInjectSource(inject, polyfills) {
|
|
|
75
74
|
*/
|
|
76
75
|
function getNodeJsCompat(worker) {
|
|
77
76
|
const { compatibility_date: compatibilityDate, compatibility_flags: compatibilityFlags } = worker.config;
|
|
78
|
-
if (!
|
|
77
|
+
if (!getNodeCompat(compatibilityDate, compatibilityFlags).isNodejsCompatEnabled) return;
|
|
79
78
|
const { env } = defineEnv({ presets: [getCloudflarePreset({
|
|
80
79
|
compatibilityDate,
|
|
81
80
|
compatibilityFlags
|
|
@@ -533,6 +532,7 @@ async function resolveAuxiliaryWorker(context, options, auxiliary, clientOutputP
|
|
|
533
532
|
function getWorkerResolvers(context, options, clientOutputPath) {
|
|
534
533
|
return [() => resolveWorker(context, options, clientOutputPath), ...(options.auxiliaryWorkers ?? []).map((auxiliary) => () => resolveAuxiliaryWorker(context, options, auxiliary, clientOutputPath))];
|
|
535
534
|
}
|
|
535
|
+
const miniflare = createRequire(import.meta.resolve("wrangler"))("miniflare");
|
|
536
536
|
// workers-sdk/packages/workers-shared/utils/configuration/constants.ts
|
|
537
537
|
const PERMITTED_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
538
538
|
200,
|