wrangler 0.0.0-c18fbaf5 → 0.0.0-c1be44c8
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 +7 -7
- package/bin/wrangler.js +10 -68
- package/package.json +22 -23
- package/templates/__tests__/tsconfig-sanity.ts +12 -0
- package/templates/__tests__/tsconfig.json +8 -0
- package/templates/__tests__/tsconfig.tsbuildinfo +1 -0
- package/templates/checked-fetch.js +10 -4
- package/templates/d1-beta-facade.js +42 -3
- package/templates/facade.d.ts +14 -0
- package/templates/first-party-worker-module-facade.ts +5 -4
- package/templates/format-dev-errors.ts +8 -6
- package/templates/gitignore +1 -0
- package/templates/init-tests/test-jest-new-worker.js +3 -5
- package/templates/init-tests/test-vitest-new-worker.js +3 -5
- package/templates/init-tests/test-vitest-new-worker.ts +25 -0
- package/templates/middleware/common.ts +9 -4
- package/templates/middleware/loader-modules.ts +2 -2
- package/templates/middleware/loader-sw.ts +2 -1
- package/templates/middleware/middleware-miniflare3-json-error.ts +17 -5
- package/templates/new-worker-scheduled.ts +1 -1
- package/templates/new-worker.ts +4 -1
- package/templates/pages-dev-pipeline.ts +4 -1
- package/templates/pages-dev-util.ts +4 -1
- package/templates/pages-shim.ts +1 -1
- package/templates/pages-template-plugin.ts +19 -10
- package/templates/serve-static-assets.ts +17 -14
- package/templates/service-bindings-module-facade.js +1 -0
- package/templates/tsconfig-sanity.ts +11 -0
- package/templates/tsconfig.init.json +105 -0
- package/templates/tsconfig.json +5 -103
- package/templates/tsconfig.tsbuildinfo +1 -0
- package/wrangler-dist/cli.d.ts +891 -73
- package/wrangler-dist/cli.js +124561 -140520
- package/wrangler-dist/wasm-sync.wasm +0 -0
- package/import_meta_url.js +0 -3
- package/miniflare-config-stubs/.env.empty +0 -0
- package/miniflare-config-stubs/package.empty.json +0 -1
- package/miniflare-config-stubs/wrangler.empty.toml +0 -0
- package/miniflare-dist/index.mjs +0 -6365
- package/src/__tests__/access.test.ts +0 -25
- package/src/__tests__/api-dev.test.ts +0 -209
- package/src/__tests__/api-devregistry.test.js +0 -56
- package/src/__tests__/api.test.ts +0 -80
- package/src/__tests__/config-cache-without-cache-dir.test.ts +0 -38
- package/src/__tests__/config-cache.test.ts +0 -42
- package/src/__tests__/configuration.test.ts +0 -4192
- package/src/__tests__/d1.test.ts +0 -80
- package/src/__tests__/delete.test.ts +0 -263
- package/src/__tests__/deployments.test.ts +0 -91
- package/src/__tests__/dev.test.tsx +0 -1553
- package/src/__tests__/dialogs.test.tsx +0 -40
- package/src/__tests__/generate.test.ts +0 -235
- package/src/__tests__/get-host-from-url.test.ts +0 -16
- package/src/__tests__/guess-worker-format.test.ts +0 -85
- package/src/__tests__/helpers/clipboardy-mock.js +0 -4
- package/src/__tests__/helpers/cmd-shim.d.ts +0 -11
- package/src/__tests__/helpers/mock-account-id.ts +0 -48
- package/src/__tests__/helpers/mock-bin.ts +0 -36
- package/src/__tests__/helpers/mock-cfetch.ts +0 -333
- package/src/__tests__/helpers/mock-console.ts +0 -106
- package/src/__tests__/helpers/mock-dialogs.ts +0 -153
- package/src/__tests__/helpers/mock-get-zone-from-host.ts +0 -8
- package/src/__tests__/helpers/mock-http-server.ts +0 -46
- package/src/__tests__/helpers/mock-istty.ts +0 -74
- package/src/__tests__/helpers/mock-known-routes.ts +0 -7
- package/src/__tests__/helpers/mock-kv.ts +0 -33
- package/src/__tests__/helpers/mock-oauth-flow.ts +0 -256
- package/src/__tests__/helpers/mock-process.ts +0 -39
- package/src/__tests__/helpers/mock-stdin.ts +0 -108
- package/src/__tests__/helpers/mock-web-socket.ts +0 -29
- package/src/__tests__/helpers/msw/handlers/access.ts +0 -13
- package/src/__tests__/helpers/msw/handlers/deployments.ts +0 -59
- package/src/__tests__/helpers/msw/handlers/namespaces.ts +0 -104
- package/src/__tests__/helpers/msw/handlers/oauth.ts +0 -31
- package/src/__tests__/helpers/msw/handlers/r2.ts +0 -80
- package/src/__tests__/helpers/msw/handlers/script.ts +0 -75
- package/src/__tests__/helpers/msw/handlers/user.ts +0 -63
- package/src/__tests__/helpers/msw/handlers/zones.ts +0 -22
- package/src/__tests__/helpers/msw/index.ts +0 -21
- package/src/__tests__/helpers/run-in-tmp.ts +0 -38
- package/src/__tests__/helpers/run-wrangler.ts +0 -16
- package/src/__tests__/helpers/worker-scripts/child-wrangler.toml +0 -1
- package/src/__tests__/helpers/worker-scripts/hello-world-worker.js +0 -5
- package/src/__tests__/helpers/worker-scripts/hello-world-wrangler.toml +0 -1
- package/src/__tests__/helpers/worker-scripts/parent-worker.js +0 -8
- package/src/__tests__/helpers/worker-scripts/parent-wrangler.toml +0 -5
- package/src/__tests__/helpers/write-worker-source.ts +0 -31
- package/src/__tests__/helpers/write-wrangler-toml.ts +0 -17
- package/src/__tests__/https-options.test.ts +0 -163
- package/src/__tests__/index.test.ts +0 -264
- package/src/__tests__/init.test.ts +0 -2915
- package/src/__tests__/jest.setup.ts +0 -202
- package/src/__tests__/kv.test.ts +0 -1675
- package/src/__tests__/logger.test.ts +0 -141
- package/src/__tests__/logout.test.ts +0 -47
- package/src/__tests__/metrics.test.ts +0 -450
- package/src/__tests__/middleware.scheduled.test.ts +0 -135
- package/src/__tests__/middleware.test.ts +0 -726
- package/src/__tests__/package-manager.test.ts +0 -353
- package/src/__tests__/pages-deployment-tail.test.ts +0 -884
- package/src/__tests__/pages.test.ts +0 -2442
- package/src/__tests__/parse.test.ts +0 -330
- package/src/__tests__/paths.test.ts +0 -39
- package/src/__tests__/publish.test.ts +0 -7720
- package/src/__tests__/pubsub.test.ts +0 -490
- package/src/__tests__/queues.test.ts +0 -522
- package/src/__tests__/r2.test.ts +0 -393
- package/src/__tests__/route.test.ts +0 -45
- package/src/__tests__/secret.test.ts +0 -644
- package/src/__tests__/tail.test.ts +0 -899
- package/src/__tests__/test-old-node-version.js +0 -31
- package/src/__tests__/type-generation.test.ts +0 -233
- package/src/__tests__/user.test.ts +0 -129
- package/src/__tests__/utils-collectKeyValues.test.ts +0 -47
- package/src/__tests__/validate-dev-props.test.ts +0 -56
- package/src/__tests__/version.test.ts +0 -35
- package/src/__tests__/whoami.test.tsx +0 -278
- package/src/__tests__/worker-namespace.test.ts +0 -326
- package/src/abort.d.ts +0 -3
- package/src/api/dev.ts +0 -210
- package/src/api/index.ts +0 -2
- package/src/bundle-reporter.tsx +0 -68
- package/src/bundle.ts +0 -823
- package/src/cfetch/index.ts +0 -160
- package/src/cfetch/internal.ts +0 -263
- package/src/cli.ts +0 -28
- package/src/config/README.md +0 -107
- package/src/config/config.ts +0 -275
- package/src/config/diagnostics.ts +0 -80
- package/src/config/environment.ts +0 -577
- package/src/config/index.ts +0 -357
- package/src/config/validation-helpers.ts +0 -597
- package/src/config/validation.ts +0 -2152
- package/src/config-cache.ts +0 -85
- package/src/create-worker-preview.ts +0 -282
- package/src/create-worker-upload-form.ts +0 -325
- package/src/d1/backups.tsx +0 -223
- package/src/d1/constants.ts +0 -2
- package/src/d1/create.tsx +0 -63
- package/src/d1/delete.tsx +0 -56
- package/src/d1/execute.tsx +0 -352
- package/src/d1/formatTimeAgo.ts +0 -14
- package/src/d1/index.ts +0 -101
- package/src/d1/list.tsx +0 -48
- package/src/d1/migrations/apply.tsx +0 -184
- package/src/d1/migrations/create.tsx +0 -77
- package/src/d1/migrations/helpers.ts +0 -147
- package/src/d1/migrations/index.tsx +0 -3
- package/src/d1/migrations/list.tsx +0 -79
- package/src/d1/migrations/options.ts +0 -18
- package/src/d1/options.ts +0 -22
- package/src/d1/types.tsx +0 -24
- package/src/d1/utils.ts +0 -48
- package/src/delete.ts +0 -108
- package/src/deployments.ts +0 -77
- package/src/deprecated/index.ts +0 -438
- package/src/dev/dev-vars.ts +0 -39
- package/src/dev/dev.tsx +0 -614
- package/src/dev/get-local-persistence-path.tsx +0 -31
- package/src/dev/local.tsx +0 -908
- package/src/dev/remote.tsx +0 -603
- package/src/dev/start-server.ts +0 -539
- package/src/dev/use-esbuild.ts +0 -204
- package/src/dev/validate-dev-props.ts +0 -31
- package/src/dev-registry.tsx +0 -201
- package/src/dev.tsx +0 -925
- package/src/dialogs.tsx +0 -168
- package/src/dispatch-namespace.ts +0 -207
- package/src/durable.ts +0 -102
- package/src/entry.ts +0 -329
- package/src/environment-variables.ts +0 -50
- package/src/errors.ts +0 -11
- package/src/git-client.ts +0 -135
- package/src/global-wrangler-config-path.ts +0 -26
- package/src/https-options.ts +0 -127
- package/src/index.tsx +0 -688
- package/src/init.ts +0 -978
- package/src/inspect.ts +0 -767
- package/src/intl-polyfill.d.ts +0 -139
- package/src/is-ci.ts +0 -14
- package/src/is-interactive.ts +0 -16
- package/src/kv/helpers.ts +0 -430
- package/src/kv/index.ts +0 -596
- package/src/logger.ts +0 -92
- package/src/metrics/index.ts +0 -5
- package/src/metrics/metrics-config.ts +0 -239
- package/src/metrics/metrics-dispatcher.ts +0 -96
- package/src/metrics/metrics-usage-headers.ts +0 -24
- package/src/metrics/send-event.ts +0 -96
- package/src/miniflare-cli/README.md +0 -30
- package/src/miniflare-cli/assets.ts +0 -242
- package/src/miniflare-cli/index.ts +0 -214
- package/src/miniflare-cli/request-context.ts +0 -40
- package/src/module-collection.ts +0 -267
- package/src/open-in-browser.ts +0 -17
- package/src/package-manager.ts +0 -219
- package/src/pages/build.tsx +0 -270
- package/src/pages/constants.ts +0 -18
- package/src/pages/deployment-tails.tsx +0 -284
- package/src/pages/deployments.tsx +0 -84
- package/src/pages/dev.tsx +0 -713
- package/src/pages/errors.ts +0 -66
- package/src/pages/functions/buildPlugin.ts +0 -107
- package/src/pages/functions/buildWorker.ts +0 -166
- package/src/pages/functions/filepath-routing.test.ts +0 -234
- package/src/pages/functions/filepath-routing.ts +0 -189
- package/src/pages/functions/identifiers.ts +0 -78
- package/src/pages/functions/routes-consolidation.test.ts +0 -250
- package/src/pages/functions/routes-consolidation.ts +0 -73
- package/src/pages/functions/routes-transformation.test.ts +0 -282
- package/src/pages/functions/routes-transformation.ts +0 -115
- package/src/pages/functions/routes-validation.test.ts +0 -403
- package/src/pages/functions/routes-validation.ts +0 -202
- package/src/pages/functions/routes.ts +0 -151
- package/src/pages/functions.tsx +0 -82
- package/src/pages/hash.tsx +0 -13
- package/src/pages/index.tsx +0 -102
- package/src/pages/projects.tsx +0 -169
- package/src/pages/prompt-select-project.tsx +0 -31
- package/src/pages/publish.tsx +0 -451
- package/src/pages/types.ts +0 -41
- package/src/pages/upload.tsx +0 -426
- package/src/pages/utils.ts +0 -23
- package/src/parse.ts +0 -286
- package/src/paths.ts +0 -71
- package/src/proxy.ts +0 -694
- package/src/publish/index.ts +0 -270
- package/src/publish/publish.ts +0 -1036
- package/src/pubsub/index.ts +0 -286
- package/src/pubsub/pubsub-commands.tsx +0 -624
- package/src/queues/cli/commands/consumer/add.ts +0 -71
- package/src/queues/cli/commands/consumer/index.ts +0 -22
- package/src/queues/cli/commands/consumer/remove.ts +0 -38
- package/src/queues/cli/commands/create.ts +0 -25
- package/src/queues/cli/commands/delete.ts +0 -26
- package/src/queues/cli/commands/index.ts +0 -36
- package/src/queues/cli/commands/list.ts +0 -25
- package/src/queues/client.ts +0 -135
- package/src/queues/utils.ts +0 -18
- package/src/r2/constants.ts +0 -4
- package/src/r2/helpers.ts +0 -131
- package/src/r2/index.ts +0 -289
- package/src/routes.ts +0 -140
- package/src/secret/index.ts +0 -379
- package/src/selfsigned.d.ts +0 -29
- package/src/sites.tsx +0 -372
- package/src/tail/createTail.ts +0 -379
- package/src/tail/filters.ts +0 -277
- package/src/tail/index.ts +0 -214
- package/src/tail/printing.ts +0 -107
- package/src/type-generation.ts +0 -181
- package/src/update-check.ts +0 -19
- package/src/user/access.ts +0 -69
- package/src/user/choose-account.tsx +0 -69
- package/src/user/env-vars.ts +0 -46
- package/src/user/generate-auth-url.ts +0 -33
- package/src/user/generate-random-state.ts +0 -16
- package/src/user/index.ts +0 -3
- package/src/user/user.tsx +0 -1198
- package/src/utils/collectKeyValues.ts +0 -14
- package/src/whoami.tsx +0 -169
- package/src/worker.ts +0 -251
- package/src/yargs-types.ts +0 -24
- package/src/zones.ts +0 -191
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<h1 align="center"> ⛅️ wrangler </h1>
|
|
2
2
|
<section align="center" id="shieldio-badges">
|
|
3
3
|
<a href="https://www.npmjs.com/package/wrangler"><img alt="npm" src="https://img.shields.io/npm/dw/wrangler?style=flat-square"></a>
|
|
4
|
-
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/cloudflare/
|
|
5
|
-
<img alt="GitHub commit activity (branch)" src="https://img.shields.io/github/commit-activity/w/cloudflare/
|
|
4
|
+
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/cloudflare/workers-sdk?style=flat-square">
|
|
5
|
+
<img alt="GitHub commit activity (branch)" src="https://img.shields.io/github/commit-activity/w/cloudflare/workers-sdk/main?style=flat-square">
|
|
6
6
|
<a href="https://discord.gg/CloudflareDev"><img alt="Discord" src="https://img.shields.io/discord/595317990191398933?color=%23F48120&style=flat-square"></a>
|
|
7
7
|
</section>
|
|
8
8
|
|
|
9
|
-
> This package is for wrangler v2.x, released first in May 2022. If you're looking for v1.x of the `@cloudflare/wrangler` package, visit https://www.npmjs.com/package/@cloudflare/wrangler / https://github.com/cloudflare/wrangler.
|
|
9
|
+
> This package is for wrangler v2.x, released first in May 2022. If you're looking for v1.x of the `@cloudflare/wrangler` package, visit https://www.npmjs.com/package/@cloudflare/wrangler / https://github.com/cloudflare/wrangler-legacy.
|
|
10
10
|
|
|
11
11
|
`wrangler` is a command line tool for building [Cloudflare Workers](https://workers.cloudflare.com/).
|
|
12
12
|
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
echo "export default { fetch() { return new Response('hello world') } }" > index.js
|
|
18
18
|
# try it out
|
|
19
19
|
npx wrangler dev index.js
|
|
20
|
-
# and then
|
|
21
|
-
npx wrangler
|
|
20
|
+
# and then deploy it
|
|
21
|
+
npx wrangler deploy index.js --name my-worker
|
|
22
22
|
# visit https://my-worker.<your workers subdomain>.workers.dev
|
|
23
23
|
```
|
|
24
24
|
|
|
@@ -29,7 +29,7 @@ npx wrangler publish index.js --name my-worker
|
|
|
29
29
|
npx wrangler init my-worker
|
|
30
30
|
# try it out
|
|
31
31
|
cd my-worker && npm run start
|
|
32
|
-
# and then
|
|
32
|
+
# and then deploy it
|
|
33
33
|
npm run deploy
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -63,7 +63,7 @@ Creates a Worker project. For details on configuration keys and values, refer to
|
|
|
63
63
|
|
|
64
64
|
Start a local development server, with live reloading and devtools.
|
|
65
65
|
|
|
66
|
-
### `wrangler
|
|
66
|
+
### `wrangler deploy`
|
|
67
67
|
|
|
68
68
|
Publish the given script to the worldwide Cloudflare network.
|
|
69
69
|
|
package/bin/wrangler.js
CHANGED
|
@@ -20,7 +20,7 @@ function runWrangler() {
|
|
|
20
20
|
// Note Volta and nvm are also recommended in the official docs:
|
|
21
21
|
// https://developers.cloudflare.com/workers/get-started/guide#2-install-the-workers-cli
|
|
22
22
|
console.error(
|
|
23
|
-
`Wrangler requires at least
|
|
23
|
+
`Wrangler requires at least Node.js v${MIN_NODE_VERSION}. You are using v${process.versions.node}. Please update your version of Node.js.
|
|
24
24
|
|
|
25
25
|
Consider using a Node.js version manager such as https://volta.sh/ or https://github.com/nvm-sh/nvm.`
|
|
26
26
|
);
|
|
@@ -79,72 +79,6 @@ Consider using a Node.js version manager such as https://volta.sh/ or https://gi
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
/**
|
|
83
|
-
* Runs a locally-installed version of wrangler, delegating from this version.
|
|
84
|
-
* @throws {MODULE_NOT_FOUND} if there isn't a locally installed version of wrangler.
|
|
85
|
-
*/
|
|
86
|
-
function runDelegatedWrangler() {
|
|
87
|
-
const packageJsonPath = require.resolve("wrangler/package.json", {
|
|
88
|
-
paths: [process.cwd()],
|
|
89
|
-
});
|
|
90
|
-
const {
|
|
91
|
-
bin: { wrangler: binaryPath },
|
|
92
|
-
version,
|
|
93
|
-
} = JSON.parse(fs.readFileSync(packageJsonPath));
|
|
94
|
-
const resolvedBinaryPath = path.resolve(packageJsonPath, "..", binaryPath);
|
|
95
|
-
|
|
96
|
-
debug(`Delegating to locally-installed version of wrangler @ v${version}`);
|
|
97
|
-
|
|
98
|
-
// this call to `spawn` is simpler because the delegated version will do all
|
|
99
|
-
// of the other work.
|
|
100
|
-
return spawn(
|
|
101
|
-
process.execPath,
|
|
102
|
-
[resolvedBinaryPath, ...process.argv.slice(2)],
|
|
103
|
-
{
|
|
104
|
-
stdio: ["inherit", "inherit", "inherit", "ipc"],
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
.on("exit", (code) =>
|
|
108
|
-
process.exit(code === undefined || code === null ? 0 : code)
|
|
109
|
-
)
|
|
110
|
-
.on("message", (message) => {
|
|
111
|
-
if (process.send) {
|
|
112
|
-
process.send(message);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Indicates if this invocation of `wrangler` should delegate
|
|
119
|
-
* to a locally-installed version.
|
|
120
|
-
*/
|
|
121
|
-
function shouldDelegate() {
|
|
122
|
-
try {
|
|
123
|
-
// `require.resolve` will throw if it can't find
|
|
124
|
-
// a locally-installed version of `wrangler`
|
|
125
|
-
const delegatedPackageJson = require.resolve("wrangler/package.json", {
|
|
126
|
-
paths: [process.cwd()],
|
|
127
|
-
});
|
|
128
|
-
const thisPackageJson = path.resolve(__dirname, "..", "package.json");
|
|
129
|
-
// if it's the same path, then we're already a local install -- no need to delegate
|
|
130
|
-
return thisPackageJson !== delegatedPackageJson;
|
|
131
|
-
} catch (e) {
|
|
132
|
-
// there's no local version to delegate to -- `require.resolve` threw
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
async function main() {
|
|
138
|
-
wranglerProcess = shouldDelegate() ? runDelegatedWrangler() : runWrangler();
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
process.on("SIGINT", () => {
|
|
142
|
-
wranglerProcess && wranglerProcess.kill();
|
|
143
|
-
});
|
|
144
|
-
process.on("SIGTERM", () => {
|
|
145
|
-
wranglerProcess && wranglerProcess.kill();
|
|
146
|
-
});
|
|
147
|
-
|
|
148
82
|
// semiver implementation via https://github.com/lukeed/semiver/blob/ae7eebe6053c96be63032b14fb0b68e2553fcac4/src/index.js
|
|
149
83
|
|
|
150
84
|
/**
|
|
@@ -177,4 +111,12 @@ function semiver(a, b, bool) {
|
|
|
177
111
|
|
|
178
112
|
// end semiver implementation
|
|
179
113
|
|
|
180
|
-
|
|
114
|
+
if (module === require.main) {
|
|
115
|
+
wranglerProcess = runWrangler();
|
|
116
|
+
process.on("SIGINT", () => {
|
|
117
|
+
wranglerProcess && wranglerProcess.kill();
|
|
118
|
+
});
|
|
119
|
+
process.on("SIGTERM", () => {
|
|
120
|
+
wranglerProcess && wranglerProcess.kill();
|
|
121
|
+
});
|
|
122
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-c1be44c8",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"http",
|
|
25
25
|
"cli"
|
|
26
26
|
],
|
|
27
|
-
"homepage": "https://github.com/cloudflare/
|
|
27
|
+
"homepage": "https://github.com/cloudflare/workers-sdk#readme",
|
|
28
28
|
"bugs": {
|
|
29
|
-
"url": "https://github.com/cloudflare/
|
|
29
|
+
"url": "https://github.com/cloudflare/workers-sdk/issues"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
33
|
-
"url": "https://github.com/cloudflare/
|
|
33
|
+
"url": "https://github.com/cloudflare/workers-sdk.git",
|
|
34
34
|
"directory": "packages/wrangler"
|
|
35
35
|
},
|
|
36
36
|
"license": "MIT OR Apache-2.0",
|
|
@@ -42,14 +42,10 @@
|
|
|
42
42
|
"wrangler2": "./bin/wrangler.js"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
|
-
"src",
|
|
46
45
|
"bin",
|
|
47
|
-
"miniflare-config-stubs",
|
|
48
46
|
"miniflare-dist",
|
|
49
47
|
"wrangler-dist",
|
|
50
48
|
"templates",
|
|
51
|
-
"vendor",
|
|
52
|
-
"import_meta_url.js",
|
|
53
49
|
"kv-asset-handler.js",
|
|
54
50
|
"Cloudflare_CA.pem"
|
|
55
51
|
],
|
|
@@ -57,15 +53,17 @@
|
|
|
57
53
|
"assert-git-version": "node -r esbuild-register scripts/assert-git-version.ts",
|
|
58
54
|
"build": "npm run clean && npm run bundle && npm run emit-types",
|
|
59
55
|
"bundle": "node -r esbuild-register scripts/bundle.ts",
|
|
60
|
-
"check:type": "tsc",
|
|
56
|
+
"check:type": "node -r esbuild-register scripts/tsc-all.ts",
|
|
61
57
|
"clean": "rimraf wrangler-dist miniflare-dist emitted-types",
|
|
62
58
|
"dev": "npm run clean && concurrently -c black,blue --kill-others-on-fail false 'npm run bundle -- --watch' 'npm run check:type -- --watch --preserveWatchOutput'",
|
|
63
59
|
"emit-types": "tsc -p tsconfig.emit.json && node -r esbuild-register scripts/emit-types.ts",
|
|
64
60
|
"prepublishOnly": "SOURCEMAPS=false npm run build",
|
|
65
61
|
"start": "npm run bundle && cross-env NODE_OPTIONS=--enable-source-maps ./bin/wrangler.js",
|
|
66
|
-
"test": "npm run assert-git-version && jest
|
|
62
|
+
"test": "npm run assert-git-version && jest",
|
|
67
63
|
"test-watch": "npm run test -- --runInBand --testTimeout=50000 --watch",
|
|
68
|
-
"test:ci": "npm run test -- --
|
|
64
|
+
"test:ci": "npm run test -- --coverage",
|
|
65
|
+
"test:debug": "npm run test -- --silent=false --verbose=true",
|
|
66
|
+
"test:e2e": "vitest --no-threads ./e2e"
|
|
69
67
|
},
|
|
70
68
|
"jest": {
|
|
71
69
|
"coverageReporters": [
|
|
@@ -82,7 +80,7 @@
|
|
|
82
80
|
"setupFilesAfterEnv": [
|
|
83
81
|
"<rootDir>/src/__tests__/jest.setup.ts"
|
|
84
82
|
],
|
|
85
|
-
"testRegex": "
|
|
83
|
+
"testRegex": "src/__tests__/.*\\.(test|spec)\\.[jt]sx?$",
|
|
86
84
|
"testTimeout": 30000,
|
|
87
85
|
"transform": {
|
|
88
86
|
"^.+\\.c?(t|j)sx?$": [
|
|
@@ -100,13 +98,10 @@
|
|
|
100
98
|
"@cloudflare/kv-asset-handler": "^0.2.0",
|
|
101
99
|
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
|
|
102
100
|
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
|
|
103
|
-
"@miniflare/core": "2.10.0",
|
|
104
|
-
"@miniflare/d1": "2.10.0",
|
|
105
|
-
"@miniflare/durable-objects": "2.10.0",
|
|
106
101
|
"blake3-wasm": "^2.1.5",
|
|
107
102
|
"chokidar": "^3.5.3",
|
|
108
|
-
"esbuild": "0.
|
|
109
|
-
"miniflare": "
|
|
103
|
+
"esbuild": "0.16.3",
|
|
104
|
+
"miniflare": "^3.0.0",
|
|
110
105
|
"nanoid": "^3.3.3",
|
|
111
106
|
"path-to-regexp": "^6.2.0",
|
|
112
107
|
"selfsigned": "^2.0.1",
|
|
@@ -115,11 +110,9 @@
|
|
|
115
110
|
},
|
|
116
111
|
"devDependencies": {
|
|
117
112
|
"@cloudflare/types": "^6.18.4",
|
|
118
|
-
"@
|
|
119
|
-
"@databases/sql": "^3.2.0",
|
|
113
|
+
"@cloudflare/workers-types": "^4.20230511.0",
|
|
120
114
|
"@iarna/toml": "^3.0.0",
|
|
121
115
|
"@microsoft/api-extractor": "^7.28.3",
|
|
122
|
-
"@miniflare/tre": "^3.0.0-next.8",
|
|
123
116
|
"@types/better-sqlite3": "^7.6.0",
|
|
124
117
|
"@types/busboy": "^1.5.0",
|
|
125
118
|
"@types/command-exists": "^1.2.0",
|
|
@@ -134,8 +127,10 @@
|
|
|
134
127
|
"@types/supports-color": "^8.1.1",
|
|
135
128
|
"@types/ws": "^8.5.3",
|
|
136
129
|
"@types/yargs": "^17.0.10",
|
|
137
|
-
"@webcontainer/env": "^1.0
|
|
130
|
+
"@webcontainer/env": "^1.1.0",
|
|
138
131
|
"body-parser": "^1.20.0",
|
|
132
|
+
"chalk": "^2.4.2",
|
|
133
|
+
"cli-table3": "^0.6.3",
|
|
139
134
|
"clipboardy": "^3.0.0",
|
|
140
135
|
"cmd-shim": "^4.1.0",
|
|
141
136
|
"command-exists": "^1.2.9",
|
|
@@ -173,16 +168,20 @@
|
|
|
173
168
|
"remove-accents-esm": "^0.0.1",
|
|
174
169
|
"semiver": "^1.1.0",
|
|
175
170
|
"serve-static": "^1.15.0",
|
|
171
|
+
"shellac": "^0.7.3",
|
|
176
172
|
"signal-exit": "^3.0.7",
|
|
173
|
+
"strip-ansi": "^7.0.1",
|
|
177
174
|
"supports-color": "^9.2.2",
|
|
178
175
|
"timeago.js": "^4.0.2",
|
|
179
176
|
"tmp-promise": "^3.0.3",
|
|
180
177
|
"ts-dedent": "^2.2.0",
|
|
181
|
-
"undici": "
|
|
178
|
+
"undici": "5.20.0",
|
|
182
179
|
"update-check": "^1.5.4",
|
|
180
|
+
"vitest": "^0.31.0",
|
|
183
181
|
"ws": "^8.5.0",
|
|
184
182
|
"xdg-app-paths": "^7.3.0",
|
|
185
|
-
"yargs": "^17.4.1"
|
|
183
|
+
"yargs": "^17.4.1",
|
|
184
|
+
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz"
|
|
186
185
|
},
|
|
187
186
|
"optionalDependencies": {
|
|
188
187
|
"fsevents": "~2.3.2"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// `@types/node` should be included
|
|
2
|
+
Buffer.from("test");
|
|
3
|
+
|
|
4
|
+
// `@types/jest` should be included
|
|
5
|
+
test("test");
|
|
6
|
+
|
|
7
|
+
// @ts-expect-error `@cloudflare/workers-types` should NOT be included
|
|
8
|
+
const _handler: ExportedHandler = {};
|
|
9
|
+
// @ts-expect-error `@cloudflare/workers-types` should NOT be included
|
|
10
|
+
new HTMLRewriter();
|
|
11
|
+
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../pages-dev-util.ts","./pages-dev-util.test.ts","./tsconfig-sanity.ts","../../../../node_modules/@types/node/ts4.8/assert.d.ts","../../../../node_modules/@types/node/ts4.8/assert/strict.d.ts","../../../../node_modules/@types/node/ts4.8/globals.d.ts","../../../../node_modules/@types/node/ts4.8/async_hooks.d.ts","../../../../node_modules/@types/node/ts4.8/buffer.d.ts","../../../../node_modules/@types/node/ts4.8/child_process.d.ts","../../../../node_modules/@types/node/ts4.8/cluster.d.ts","../../../../node_modules/@types/node/ts4.8/console.d.ts","../../../../node_modules/@types/node/ts4.8/constants.d.ts","../../../../node_modules/@types/node/ts4.8/crypto.d.ts","../../../../node_modules/@types/node/ts4.8/dgram.d.ts","../../../../node_modules/@types/node/ts4.8/diagnostics_channel.d.ts","../../../../node_modules/@types/node/ts4.8/dns.d.ts","../../../../node_modules/@types/node/ts4.8/dns/promises.d.ts","../../../../node_modules/@types/node/ts4.8/domain.d.ts","../../../../node_modules/@types/node/ts4.8/dom-events.d.ts","../../../../node_modules/@types/node/ts4.8/events.d.ts","../../../../node_modules/@types/node/ts4.8/fs.d.ts","../../../../node_modules/@types/node/ts4.8/fs/promises.d.ts","../../../../node_modules/@types/node/ts4.8/http.d.ts","../../../../node_modules/@types/node/ts4.8/http2.d.ts","../../../../node_modules/@types/node/ts4.8/https.d.ts","../../../../node_modules/@types/node/ts4.8/inspector.d.ts","../../../../node_modules/@types/node/ts4.8/module.d.ts","../../../../node_modules/@types/node/ts4.8/net.d.ts","../../../../node_modules/@types/node/ts4.8/os.d.ts","../../../../node_modules/@types/node/ts4.8/path.d.ts","../../../../node_modules/@types/node/ts4.8/perf_hooks.d.ts","../../../../node_modules/@types/node/ts4.8/process.d.ts","../../../../node_modules/@types/node/ts4.8/punycode.d.ts","../../../../node_modules/@types/node/ts4.8/querystring.d.ts","../../../../node_modules/@types/node/ts4.8/readline.d.ts","../../../../node_modules/@types/node/ts4.8/readline/promises.d.ts","../../../../node_modules/@types/node/ts4.8/repl.d.ts","../../../../node_modules/@types/node/ts4.8/stream.d.ts","../../../../node_modules/@types/node/ts4.8/stream/promises.d.ts","../../../../node_modules/@types/node/ts4.8/stream/consumers.d.ts","../../../../node_modules/@types/node/ts4.8/stream/web.d.ts","../../../../node_modules/@types/node/ts4.8/string_decoder.d.ts","../../../../node_modules/@types/node/ts4.8/test.d.ts","../../../../node_modules/@types/node/ts4.8/timers.d.ts","../../../../node_modules/@types/node/ts4.8/timers/promises.d.ts","../../../../node_modules/@types/node/ts4.8/tls.d.ts","../../../../node_modules/@types/node/ts4.8/trace_events.d.ts","../../../../node_modules/@types/node/ts4.8/tty.d.ts","../../../../node_modules/@types/node/ts4.8/url.d.ts","../../../../node_modules/@types/node/ts4.8/util.d.ts","../../../../node_modules/@types/node/ts4.8/v8.d.ts","../../../../node_modules/@types/node/ts4.8/vm.d.ts","../../../../node_modules/@types/node/ts4.8/wasi.d.ts","../../../../node_modules/@types/node/ts4.8/worker_threads.d.ts","../../../../node_modules/@types/node/ts4.8/zlib.d.ts","../../../../node_modules/@types/node/ts4.8/globals.global.d.ts","../../../../node_modules/@types/node/ts4.8/index.d.ts","../../../../node_modules/@types/jest/node_modules/chalk/index.d.ts","../../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../../node_modules/@jest/schemas/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-matcher-utils/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"000e5d1634879510274a1056ee148c61a063bf5e18b795838052a80a5bc11975","5e22f932d1687df8312894052ab0596c3206342cab47a30052908ff6bb37af34","8d4e3c29ce13a2cfc9d60930ae3d109d858f1db924d796c2a58c4f0b56a23c2b","9ee13abb39c50c2f45b5362dbadc55334e82dfc9789cfc070808e10dc5f60000","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"03c04ba2137908b3b6219ecadc3471d4e39bb9030e6404510ee6e87a3b590a2d",{"version":"f179943da888f75e1e28ed9ce5d3aaa0b14f1d35af42fc5c373533ddf76e4e8b","affectsGlobalScope":true},"404e1d1f2f68da458e157f7187754c7f3138a5ea0b3b28fd7944b2a6b96c9bdc","ac0c7cb0a4c1bec60be2c0460b3bda1e674eaf2c98312d7b6f16a0bb58718e2d",{"version":"7e2181a6fc140b4525d5a45c204477c37fa78a635558e88552c68f76a4325403","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","aa1809b3e0d8a8a663ab68fe18f4612de2e50602a46a703eba1e1ab6d5eedd93","276b547eeb8eeeee9a446a3bfa6e07d1c0199269bdcf33813abab1281394a9cb","c999f7816955f75b447823e3e4085f699600e2a4a3327907df9af65b0a9c0df6","64361245fe025cbbad90451dd3698f7e6822d465ef568cbee3a4d8ddb52e7cda","8e6b05abc98adba15e1ac78e137c64576c74002e301d682e66feb77a23907ab8","9b814e0806922056145bedb096f11b73bdce70cc871f3ccfc4ce00b2cba75718",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"2013a2215691096d953ce7cefbc71a6cd31ef14be092cd003792714c5cd23bde","affectsGlobalScope":true},"60155c38ec392043962a90006153f7e31187b93411f2d8f9b35f595e98b8d75f","2ad6a251b6ef19fd1f8498f83bb7b265033bd52287e1f6569d09544f18806713","86d16ae7507f915f0f49d2795f8df2bf803e5d67e3b212c6f314709a65d279ae","159807eb55a9439f9a675bd493788190a6203b5f36c315f8c3acbfcb875c7072","fe31b2b31ac5453fc7b8eef32b62017e55b214ceb884f0b177f442af92e84682","dd72576c8ea64d55af46a386068503d3cfcecce84ed7e1cbd4ff4081ba67fafc",{"version":"125af9d85cb9d5e508353f10a8d52f01652d2d48b2cea54789a33e5b4d289c1c","affectsGlobalScope":true},"70a7e8a7880d55396285e4b85ff5bdf3af3083176abe07f944967836f2a43188","3570df7c6f3a976109f55b596a2d88c2f87e0574cd1502272594ee5c4e56d0ef","850e95721334c2aa7697b08782f443ec4286274e5024169d4443933544f359d7",{"version":"74e6cd21f7b5e29fab05060ea24e2b90aa254f16f3f62ccd7055bdb8fc7b2ff5","affectsGlobalScope":true},{"version":"5761c90b0cabdd6bd1f5fb1c3bf942088fdd39e18ed35dbe39b0c34bc733bf13","affectsGlobalScope":true},"1eb6c5569d41e6021832d0a8a71f45fecbc13d03ad7d306da485999148b64955","c05ef0ecf06540ad3039515c10d3b27f9380639ced40f4093fd073e1b5ff21d9","fd25a0d3e6448b61d33e1fe4e0667a1a87a77e53570b65a454937cf2dc92f967","c27b01e8ddff5cd280711af5e13aecd9a3228d1c256ea797dd64f8fdec5f7df5","24a68c38b5c66d6a6883624342560d88db670e97824b397e78d9dac121aa8bae","9a134dbb29f0af914d90b23f609b39019d66ed53db7d492ab6b04c67114559da","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","7b3781fbdfddbee8dba55ccee5aa74a7c8d6701ade11d49ab7d8cb1fcefe669e","c4aab2ec3a249f2a4caa9cbdb099752a80daf999b79d85aa3504cdfd6e559476",{"version":"666d3f264db693828f6edc2eb53ae6013e40f6e39278ca209c7a8a99ac91b62f","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","c764a6cf523d13f2304a23216cd1084e28c041eebabd8aa9b2a9d99866c668c0","1272a5c2bd05961adc473e905332b7a422b00485c10b41c752f7fcf6835e3436","30ef92bf8135ce36ba1231fe41715276f2a40be72a478ddeb862bc16672e8680",{"version":"a33f56e4b9468b9030fbf9c7fd352c7effdacb8e646564b73097304e84323d55","affectsGlobalScope":true},{"version":"da4e3531f6b51d5186526c228772a7d79182985cb755426dfd1f72c8e789275e","affectsGlobalScope":true},"66bfb3de947abf4b117ee849c245425dbe494d6903e28f9ded566e91c9d05d77","c28d4f58131b93d60e087b86148d4e0c9d9b5c49c23ff1a9d1a9594fdedd5d08","c6b5d7f259544c91024ecf2b17138574a3f6ff2476468fafd7f957d2b68d6d98",{"version":"1ec27c4b695590464113276d174f873e260e468ef226b7dc18f9193875fa559d","affectsGlobalScope":true},"33da4ee2ab9fdd9ef8b3fc526d871ce02ae8c825283f5695e7cad507c087b97c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"652ee9c5103e89102d87bc20d167a02a0e3e5e53665674466c8cfea8a9e418c7","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d982cdd2610155b3cbcbfa62ccabcf2d2b739f821518ef113348d160ef0010d9","ffcc5500e77223169833fc6eb59b3a507944a1f89574e0a1276b0ea7fc22c4a4","22f13de9e2fe5f0f4724797abd3d34a1cdd6e47ef81fc4933fea3b8bf4ad524b","e3ba509d3dce019b3190ceb2f3fc88e2610ab717122dabd91a9efaa37804040d","cda0cb09b995489b7f4c57f168cd31b83dcbaa7aad49612734fb3c9c73f6e4f2",{"version":"1de1ad6a1929317171d8cfcd55bb2732257680c1bf89bcd53e1d46a4d8dbda22","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"alwaysStrict":false,"esModuleInterop":true,"jsx":2,"module":1,"skipLibCheck":true,"strict":true,"target":99},"fileIdsList":[[103,112],[103],[103,114,116],[103,114],[103,111,115],[103,113],[57,103],[60,103],[61,66,94,103],[62,73,74,81,91,102,103],[62,63,73,81,103],[64,103],[65,66,74,82,103],[66,91,99,103],[67,69,73,81,103],[68,103],[69,70,103],[73,103],[71,73,103],[73,74,75,91,102,103],[73,74,75,88,91,94,103],[103,107],[69,76,81,91,102,103],[73,74,76,77,81,91,99,102,103],[76,78,91,99,102,103],[57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],[73,79,103],[80,102,103],[69,73,81,91,103],[82,103],[83,103],[60,84,103],[85,101,103,107],[86,103],[87,103],[73,88,89,103],[88,90,103,105],[61,73,91,92,93,94,103],[61,91,93,103],[91,92,103],[94,103],[95,103],[91,103],[73,97,98,103],[97,98,103],[66,81,91,99,103],[100,103],[81,101,103],[61,76,87,102,103],[66,103],[91,103,104],[103,105],[103,106],[61,66,73,75,84,91,102,103,105,107],[91,103,108],[54,103]],"referencedMap":[[113,1],[112,2],[117,3],[111,2],[115,4],[116,5],[114,6],[57,7],[58,7],[60,8],[61,9],[62,10],[63,11],[64,12],[65,13],[66,14],[67,15],[68,16],[69,17],[70,17],[72,18],[71,19],[73,18],[74,20],[75,21],[59,22],[109,2],[76,23],[77,24],[78,25],[110,26],[79,27],[80,28],[81,29],[82,30],[83,31],[84,32],[85,33],[86,34],[87,35],[88,36],[89,36],[90,37],[91,38],[93,39],[92,40],[94,41],[95,42],[96,43],[97,44],[98,45],[99,46],[100,47],[101,48],[102,49],[103,50],[104,51],[105,52],[106,53],[107,54],[108,55],[12,2],[11,2],[2,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[3,2],[4,2],[24,2],[21,2],[22,2],[23,2],[25,2],[26,2],[27,2],[5,2],[28,2],[29,2],[30,2],[31,2],[6,2],[32,2],[33,2],[34,2],[35,2],[7,2],[36,2],[41,2],[42,2],[37,2],[38,2],[39,2],[40,2],[8,2],[46,2],[43,2],[44,2],[45,2],[47,2],[9,2],[48,2],[49,2],[50,2],[51,2],[52,2],[1,2],[10,2],[53,2],[55,56],[56,2],[54,2]],"exportedModulesMap":[[113,1],[112,2],[117,3],[111,2],[115,4],[116,5],[114,6],[57,7],[58,7],[60,8],[61,9],[62,10],[63,11],[64,12],[65,13],[66,14],[67,15],[68,16],[69,17],[70,17],[72,18],[71,19],[73,18],[74,20],[75,21],[59,22],[109,2],[76,23],[77,24],[78,25],[110,26],[79,27],[80,28],[81,29],[82,30],[83,31],[84,32],[85,33],[86,34],[87,35],[88,36],[89,36],[90,37],[91,38],[93,39],[92,40],[94,41],[95,42],[96,43],[97,44],[98,45],[99,46],[100,47],[101,48],[102,49],[103,50],[104,51],[105,52],[106,53],[107,54],[108,55],[12,2],[11,2],[2,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[3,2],[4,2],[24,2],[21,2],[22,2],[23,2],[25,2],[26,2],[27,2],[5,2],[28,2],[29,2],[30,2],[31,2],[6,2],[32,2],[33,2],[34,2],[35,2],[7,2],[36,2],[41,2],[42,2],[37,2],[38,2],[39,2],[40,2],[8,2],[46,2],[43,2],[44,2],[45,2],[47,2],[9,2],[48,2],[49,2],[50,2],[51,2],[52,2],[1,2],[10,2],[53,2],[55,56],[56,2],[54,2]],"semanticDiagnosticsPerFile":[113,112,117,111,115,116,114,57,58,60,61,62,63,64,65,66,67,68,69,70,72,71,73,74,75,59,109,76,77,78,110,79,80,81,82,83,84,85,86,87,88,89,90,91,93,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,36,41,42,37,38,39,40,8,46,43,44,45,47,9,48,49,50,51,52,1,10,53,55,56,54],"affectedFilesPendingEmit":[[113,1],[112,1],[117,1],[111,1],[115,1],[116,1],[114,1],[57,1],[58,1],[60,1],[61,1],[62,1],[63,1],[64,1],[65,1],[66,1],[67,1],[68,1],[69,1],[70,1],[72,1],[71,1],[73,1],[74,1],[75,1],[59,1],[109,1],[76,1],[77,1],[78,1],[110,1],[79,1],[80,1],[81,1],[82,1],[83,1],[84,1],[85,1],[86,1],[87,1],[88,1],[89,1],[90,1],[91,1],[93,1],[92,1],[94,1],[95,1],[96,1],[97,1],[98,1],[99,1],[100,1],[101,1],[102,1],[103,1],[104,1],[105,1],[106,1],[107,1],[108,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1],[55,1],[56,1],[54,1]]},"version":"4.8.4"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
const urls = new Set();
|
|
2
2
|
|
|
3
3
|
export function checkedFetch(request, init) {
|
|
4
|
-
const url =
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const url =
|
|
5
|
+
request instanceof URL
|
|
6
|
+
? request
|
|
7
|
+
: new URL(
|
|
8
|
+
(typeof request === "string"
|
|
9
|
+
? new Request(request, init)
|
|
10
|
+
: request
|
|
11
|
+
).url
|
|
12
|
+
);
|
|
7
13
|
if (url.port && url.port !== "443" && url.protocol === "https:") {
|
|
8
14
|
if (!urls.has(url.toString())) {
|
|
9
15
|
urls.add(url.toString());
|
|
10
16
|
console.warn(
|
|
11
17
|
`WARNING: known issue with \`fetch()\` requests to custom HTTPS ports in published Workers:\n` +
|
|
12
|
-
` - ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler
|
|
18
|
+
` - ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler deploy\` command.\n`
|
|
13
19
|
);
|
|
14
20
|
}
|
|
15
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/shim.ts
|
|
2
|
-
import worker from "__ENTRY_POINT__";
|
|
2
|
+
import worker, * as OTHER_EXPORTS from "__ENTRY_POINT__";
|
|
3
3
|
export * from "__ENTRY_POINT__";
|
|
4
4
|
|
|
5
5
|
// src/index.ts
|
|
@@ -11,7 +11,7 @@ var D1Database = class {
|
|
|
11
11
|
return new D1PreparedStatement(this, query);
|
|
12
12
|
}
|
|
13
13
|
async dump() {
|
|
14
|
-
const response = await this.binding.fetch("/dump", {
|
|
14
|
+
const response = await this.binding.fetch("http://d1/dump", {
|
|
15
15
|
method: "POST",
|
|
16
16
|
headers: {
|
|
17
17
|
"content-type": "application/json",
|
|
@@ -79,7 +79,7 @@ var D1Database = class {
|
|
|
79
79
|
params,
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
|
-
const response = await this.binding.fetch(endpoint, {
|
|
82
|
+
const response = await this.binding.fetch(new URL(endpoint, "http://d1"), {
|
|
83
83
|
method: "POST",
|
|
84
84
|
headers: {
|
|
85
85
|
"content-type": "application/json",
|
|
@@ -110,6 +110,42 @@ var D1PreparedStatement = class {
|
|
|
110
110
|
this.params = values || [];
|
|
111
111
|
}
|
|
112
112
|
bind(...values) {
|
|
113
|
+
for (var r in values) {
|
|
114
|
+
switch (typeof values[r]) {
|
|
115
|
+
case "number":
|
|
116
|
+
case "string":
|
|
117
|
+
break;
|
|
118
|
+
case "object":
|
|
119
|
+
if (values[r] == null) break;
|
|
120
|
+
if (
|
|
121
|
+
Array.isArray(values[r]) &&
|
|
122
|
+
values[r]
|
|
123
|
+
.map((b) => {
|
|
124
|
+
return typeof b == "number" && b >= 0 && b < 256 ? 1 : 0;
|
|
125
|
+
})
|
|
126
|
+
.indexOf(0) == -1
|
|
127
|
+
)
|
|
128
|
+
break;
|
|
129
|
+
if (values[r] instanceof ArrayBuffer) {
|
|
130
|
+
values[r] = Array.from(new Uint8Array(values[r]));
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
if (ArrayBuffer.isView(values[r])) {
|
|
134
|
+
values[r] = Array.from(values[r]);
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
default:
|
|
138
|
+
throw new Error("D1_TYPE_ERROR", {
|
|
139
|
+
cause: new Error(
|
|
140
|
+
"Type '" +
|
|
141
|
+
typeof values[r] +
|
|
142
|
+
"' not supported for value '" +
|
|
143
|
+
values[r] +
|
|
144
|
+
"'"
|
|
145
|
+
),
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
113
149
|
return new D1PreparedStatement(this.database, this.statement, values);
|
|
114
150
|
}
|
|
115
151
|
async first(colName) {
|
|
@@ -201,5 +237,8 @@ var shim_default = {
|
|
|
201
237
|
async trace(traces, env, ctx) {
|
|
202
238
|
return worker.trace(traces, getMaskedEnv(env), ctx);
|
|
203
239
|
},
|
|
240
|
+
async email(message, env, ctx) {
|
|
241
|
+
return worker.email(message, getMaskedEnv(env), ctx);
|
|
242
|
+
},
|
|
204
243
|
};
|
|
205
244
|
export { shim_default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare module "__ENTRY_POINT__" {
|
|
2
|
+
import type { Middleware } from "./middleware/common";
|
|
3
|
+
const worker: ExportedHandler & { middleware?: Middleware[] };
|
|
4
|
+
export default worker;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare module "__KV_ASSET_HANDLER__" {
|
|
8
|
+
export * from "@cloudflare/kv-asset-handler";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module "__STATIC_CONTENT_MANIFEST" {
|
|
12
|
+
const manifest: string;
|
|
13
|
+
export default manifest;
|
|
14
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
// @ts-ignore entry point will get replaced
|
|
2
1
|
import worker from "__ENTRY_POINT__";
|
|
3
|
-
// @ts-ignore entry point will get replaced
|
|
4
2
|
export * from "__ENTRY_POINT__";
|
|
5
3
|
|
|
6
4
|
type Env = {
|
|
@@ -11,8 +9,11 @@ type Env = {
|
|
|
11
9
|
* Setup globals/vars as required
|
|
12
10
|
*/
|
|
13
11
|
|
|
14
|
-
export default {
|
|
15
|
-
async fetch(request
|
|
12
|
+
export default <ExportedHandler<Env>>{
|
|
13
|
+
async fetch(request, env, ctx) {
|
|
14
|
+
if (worker.fetch === undefined) {
|
|
15
|
+
throw new TypeError("Entry point missing `fetch` handler");
|
|
16
|
+
}
|
|
16
17
|
return worker.fetch(request, env, ctx);
|
|
17
18
|
},
|
|
18
19
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import Worker from "__ENTRY_POINT__";
|
|
1
|
+
import worker from "__ENTRY_POINT__";
|
|
3
2
|
|
|
4
|
-
// @ts-expect-error
|
|
5
3
|
export * from "__ENTRY_POINT__";
|
|
6
4
|
|
|
7
|
-
export default {
|
|
8
|
-
|
|
5
|
+
export default <ExportedHandler>{
|
|
6
|
+
...worker,
|
|
7
|
+
async fetch(req, env, ctx) {
|
|
8
|
+
if (worker.fetch === undefined) {
|
|
9
|
+
throw new TypeError("Entry point missing `fetch` handler");
|
|
10
|
+
}
|
|
9
11
|
try {
|
|
10
|
-
return await
|
|
12
|
+
return await worker.fetch(req, env, ctx);
|
|
11
13
|
} catch (err) {
|
|
12
14
|
return new Response(
|
|
13
15
|
`<!DOCTYPE html>
|
package/templates/gitignore
CHANGED
|
@@ -4,11 +4,9 @@ describe("Worker", () => {
|
|
|
4
4
|
let worker;
|
|
5
5
|
|
|
6
6
|
beforeAll(async () => {
|
|
7
|
-
worker = await unstable_dev(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{ disableExperimentalWarning: true }
|
|
11
|
-
);
|
|
7
|
+
worker = await unstable_dev("src/index.js", {
|
|
8
|
+
experimental: { disableExperimentalWarning: true },
|
|
9
|
+
});
|
|
12
10
|
});
|
|
13
11
|
|
|
14
12
|
afterAll(async () => {
|
|
@@ -5,11 +5,9 @@ describe("Worker", () => {
|
|
|
5
5
|
let worker;
|
|
6
6
|
|
|
7
7
|
beforeAll(async () => {
|
|
8
|
-
worker = await unstable_dev(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{ disableExperimentalWarning: true }
|
|
12
|
-
);
|
|
8
|
+
worker = await unstable_dev("src/index.js", {
|
|
9
|
+
experimental: { disableExperimentalWarning: true },
|
|
10
|
+
});
|
|
13
11
|
});
|
|
14
12
|
|
|
15
13
|
afterAll(async () => {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { unstable_dev } from "wrangler";
|
|
2
|
+
import type { UnstableDevWorker } from "wrangler";
|
|
3
|
+
import { describe, expect, it, beforeAll, afterAll } from "vitest";
|
|
4
|
+
|
|
5
|
+
describe("Worker", () => {
|
|
6
|
+
let worker: UnstableDevWorker;
|
|
7
|
+
|
|
8
|
+
beforeAll(async () => {
|
|
9
|
+
worker = await unstable_dev("src/index.ts", {
|
|
10
|
+
experimental: { disableExperimentalWarning: true },
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
afterAll(async () => {
|
|
15
|
+
await worker.stop();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("should return Hello World", async () => {
|
|
19
|
+
const resp = await worker.fetch();
|
|
20
|
+
if (resp) {
|
|
21
|
+
const text = await resp.text();
|
|
22
|
+
expect(text).toMatchInlineSnapshot(`"Hello World!"`);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -5,13 +5,18 @@ export type Dispatcher = (
|
|
|
5
5
|
init: { cron?: string }
|
|
6
6
|
) => Awaitable<void>;
|
|
7
7
|
|
|
8
|
+
export type IncomingRequest = Request<
|
|
9
|
+
unknown,
|
|
10
|
+
IncomingRequestCfProperties<unknown>
|
|
11
|
+
>;
|
|
12
|
+
|
|
8
13
|
export interface MiddlewareContext {
|
|
9
14
|
dispatch: Dispatcher;
|
|
10
|
-
next(request:
|
|
15
|
+
next(request: IncomingRequest, env: any): Awaitable<Response>;
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
export type Middleware = (
|
|
14
|
-
request:
|
|
19
|
+
request: IncomingRequest,
|
|
15
20
|
env: any,
|
|
16
21
|
ctx: ExecutionContext,
|
|
17
22
|
middlewareCtx: MiddlewareContext
|
|
@@ -32,7 +37,7 @@ export function __facade_registerInternal__(
|
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
function __facade_invokeChain__(
|
|
35
|
-
request:
|
|
40
|
+
request: IncomingRequest,
|
|
36
41
|
env: any,
|
|
37
42
|
ctx: ExecutionContext,
|
|
38
43
|
dispatch: Dispatcher,
|
|
@@ -49,7 +54,7 @@ function __facade_invokeChain__(
|
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
export function __facade_invoke__(
|
|
52
|
-
request:
|
|
57
|
+
request: IncomingRequest,
|
|
53
58
|
env: any,
|
|
54
59
|
ctx: ExecutionContext,
|
|
55
60
|
dispatch: Dispatcher,
|
|
@@ -11,11 +11,9 @@ import {
|
|
|
11
11
|
__facade_register__,
|
|
12
12
|
} from "./common";
|
|
13
13
|
|
|
14
|
-
// @ts-expect-error We'll swap in the entry point during build
|
|
15
14
|
import worker from "__ENTRY_POINT__";
|
|
16
15
|
|
|
17
16
|
// We need to preserve all of the exports from the worker
|
|
18
|
-
// @ts-expect-error We'll swap in the entry point during build
|
|
19
17
|
export * from "__ENTRY_POINT__";
|
|
20
18
|
|
|
21
19
|
class __Facade_ScheduledController__ implements ScheduledController {
|
|
@@ -79,6 +77,8 @@ const facade: ExportedHandler<unknown> = {
|
|
|
79
77
|
}
|
|
80
78
|
},
|
|
81
79
|
scheduled: worker.scheduled,
|
|
80
|
+
queue: worker.queue,
|
|
81
|
+
trace: worker.trace,
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
export default facade;
|