wrangler 2.6.2 → 2.7.0
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/bin/wrangler.js +9 -1
- package/miniflare-dist/index.mjs +1 -1
- package/package.json +12 -10
- package/src/__tests__/api-dev.test.ts +65 -36
- package/src/__tests__/api-devregistry.test.js +14 -6
- package/src/__tests__/configuration.test.ts +2 -31
- package/src/__tests__/{d1.test.ts → d1/d1.test.ts} +48 -5
- package/src/__tests__/d1/splitter.test.ts +255 -0
- package/src/__tests__/delete.test.ts +5 -2
- package/src/__tests__/deployments.test.ts +20 -6
- package/src/__tests__/dev.test.tsx +52 -19
- package/src/__tests__/generate.test.ts +7 -4
- package/src/__tests__/helpers/mock-auth-domain.ts +20 -0
- package/src/__tests__/helpers/mock-cfetch.ts +2 -57
- package/src/__tests__/helpers/mock-dialogs.ts +70 -86
- package/src/__tests__/helpers/mock-oauth-flow.ts +64 -49
- package/src/__tests__/helpers/mock-process.ts +8 -13
- package/src/__tests__/helpers/msw/blob-worker.cjs +19 -0
- package/src/__tests__/helpers/msw/read-file-sync.js +61 -0
- package/src/__tests__/index.test.ts +46 -44
- package/src/__tests__/init.test.ts +761 -537
- package/src/__tests__/jest.setup.ts +20 -24
- package/src/__tests__/kv.test.ts +286 -173
- package/src/__tests__/logout.test.ts +1 -1
- package/src/__tests__/metrics.test.ts +5 -7
- package/src/__tests__/middleware.scheduled.test.ts +40 -30
- package/src/__tests__/middleware.test.ts +144 -120
- package/src/__tests__/pages.test.ts +1617 -1161
- package/src/__tests__/publish.test.ts +174 -125
- package/src/__tests__/r2.test.ts +2 -2
- package/src/__tests__/secret.test.ts +183 -126
- package/src/__tests__/tail.test.ts +6 -0
- package/src/__tests__/tsconfig-sanity.ts +12 -0
- package/src/__tests__/tsconfig.json +8 -0
- package/src/__tests__/tsconfig.tsbuildinfo +1 -0
- package/src/__tests__/whoami.test.tsx +1 -96
- package/src/api/dev.ts +78 -41
- package/src/api/index.ts +1 -1
- package/src/{bundle-reporter.tsx → bundle-reporter.ts} +0 -0
- package/src/cfetch/index.ts +0 -2
- package/src/cfetch/internal.ts +6 -15
- package/src/cli.ts +2 -2
- package/src/config/validation.ts +1 -2
- package/src/create-worker-upload-form.ts +2 -2
- package/src/d1/{delete.tsx → delete.ts} +0 -0
- package/src/d1/execute.tsx +8 -37
- package/src/d1/migrations/apply.tsx +29 -19
- package/src/d1/migrations/{index.tsx → index.ts} +0 -0
- package/src/d1/splitter.ts +161 -0
- package/src/d1/{types.tsx → types.ts} +0 -0
- package/src/delete.ts +3 -8
- package/src/deployments.ts +6 -0
- package/src/deprecated/index.ts +2 -295
- package/src/dev/dev.tsx +2 -2
- package/src/dev/{get-local-persistence-path.tsx → get-local-persistence-path.ts} +0 -0
- package/src/dev/local.tsx +16 -4
- package/src/dev/remote.tsx +28 -1
- package/src/dev/start-server.ts +19 -11
- package/src/dev/use-esbuild.ts +1 -1
- package/src/{dev-registry.tsx → dev-registry.ts} +0 -0
- package/src/dev.tsx +21 -2
- package/src/dialogs.ts +136 -0
- package/src/dispatch-namespace.ts +1 -1
- package/src/docs/index.ts +3 -0
- package/src/environment-variables/factory.ts +88 -0
- package/src/environment-variables/misc-variables.ts +30 -0
- package/src/generate/index.ts +300 -0
- package/src/{index.tsx → index.ts} +10 -13
- package/src/init.ts +92 -52
- package/src/jest.d.ts +4 -0
- package/src/logger.ts +15 -3
- package/src/metrics/metrics-config.ts +1 -1
- package/src/miniflare-cli/assets.ts +4 -0
- package/src/miniflare-cli/index.ts +1 -5
- package/src/miniflare-cli/tsconfig.json +9 -0
- package/src/miniflare-cli/tsconfig.tsbuildinfo +1 -0
- package/src/miniflare-cli/types.ts +11 -0
- package/src/pages/{build.tsx → build.ts} +0 -0
- package/src/pages/{deployment-tails.tsx → deployment-tails.ts} +0 -0
- package/src/pages/{dev.tsx → dev.ts} +53 -55
- package/src/pages/functions/buildWorker.ts +1 -1
- package/src/pages/functions/tsconfig.json +8 -0
- package/src/pages/functions/tsconfig.tsbuildinfo +1 -0
- package/src/pages/{functions.tsx → functions.ts} +0 -0
- package/src/pages/{hash.tsx → hash.ts} +0 -0
- package/src/pages/{index.tsx → index.ts} +0 -0
- package/src/pages/projects.tsx +3 -5
- package/src/pages/publish.tsx +5 -4
- package/src/pages/upload.tsx +1 -1
- package/src/publish/publish.ts +9 -7
- package/src/pubsub/{pubsub-commands.tsx → pubsub-commands.ts} +1 -1
- package/src/secret/index.ts +1 -1
- package/src/{sites.tsx → sites.ts} +0 -0
- package/src/tail/index.ts +2 -3
- package/src/tsconfig-sanity.ts +16 -0
- package/src/user/access.ts +0 -1
- package/src/user/auth-variables.ts +113 -0
- package/src/user/choose-account.tsx +1 -31
- package/src/user/index.ts +0 -1
- package/src/user/{user.tsx → user.ts} +107 -73
- package/src/{whoami.tsx → whoami.ts} +37 -71
- package/templates/__tests__/tsconfig-sanity.ts +12 -0
- package/templates/__tests__/tsconfig.json +8 -0
- package/templates/__tests__/tsconfig.tsbuildinfo +1 -0
- package/templates/d1-beta-facade.js +36 -0
- package/templates/facade.d.ts +14 -0
- package/templates/first-party-worker-module-facade.ts +4 -3
- package/templates/format-dev-errors.ts +7 -6
- 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/loader-modules.ts +0 -2
- package/templates/middleware/loader-sw.ts +6 -0
- package/templates/pages-dev-pipeline.ts +4 -1
- package/templates/pages-shim.ts +4 -1
- package/templates/pages-template-plugin.ts +12 -7
- package/templates/serve-static-assets.ts +16 -14
- package/templates/tsconfig-sanity.ts +11 -0
- package/templates/tsconfig.init.json +106 -0
- package/templates/tsconfig.json +5 -103
- package/templates/tsconfig.tsbuildinfo +1 -0
- package/wrangler-dist/cli.d.ts +58 -60
- package/wrangler-dist/cli.js +34440 -55514
- package/wrangler-dist/wasm-sync.wasm +0 -0
- package/src/__tests__/dialogs.test.tsx +0 -40
- package/src/dialogs.tsx +0 -168
- package/src/environment-variables.ts +0 -50
- package/src/user/env-vars.ts +0 -46
|
@@ -183,6 +183,8 @@ __facade__originalAddEventListener__("fetch", (event) => {
|
|
|
183
183
|
});
|
|
184
184
|
|
|
185
185
|
__FACADE_EVENT_TARGET__.dispatchEvent(facadeEvent);
|
|
186
|
+
// @ts-expect-error `waitUntil` types are currently broken, blocked on
|
|
187
|
+
// https://github.com/cloudflare/workerd/pull/191
|
|
186
188
|
event.waitUntil(Promise.all(facadeEvent[__facade_waitUntil__]));
|
|
187
189
|
}
|
|
188
190
|
};
|
|
@@ -195,6 +197,8 @@ __facade__originalAddEventListener__("fetch", (event) => {
|
|
|
195
197
|
|
|
196
198
|
__FACADE_EVENT_TARGET__.dispatchEvent(facadeEvent);
|
|
197
199
|
facadeEvent[__facade_dispatched__] = true;
|
|
200
|
+
// @ts-expect-error `waitUntil` types are currently broken, blocked on
|
|
201
|
+
// https://github.com/cloudflare/workerd/pull/191
|
|
198
202
|
event.waitUntil(Promise.all(facadeEvent[__facade_waitUntil__]));
|
|
199
203
|
|
|
200
204
|
const response = facadeEvent[__facade_response__];
|
|
@@ -223,5 +227,7 @@ __facade__originalAddEventListener__("scheduled", (event) => {
|
|
|
223
227
|
});
|
|
224
228
|
|
|
225
229
|
__FACADE_EVENT_TARGET__.dispatchEvent(facadeEvent);
|
|
230
|
+
// @ts-expect-error `waitUntil` types are currently broken, blocked on
|
|
231
|
+
// https://github.com/cloudflare/workerd/pull/191
|
|
226
232
|
event.waitUntil(Promise.all(facadeEvent[__facade_waitUntil__]));
|
|
227
233
|
});
|
|
@@ -7,7 +7,7 @@ import { isRoutingRuleMatch } from "./pages-dev-util";
|
|
|
7
7
|
// @ts-ignore routes are injected
|
|
8
8
|
const routes = __ROUTES__;
|
|
9
9
|
|
|
10
|
-
export default {
|
|
10
|
+
export default <ExportedHandler<{ ASSETS: Fetcher }>>{
|
|
11
11
|
fetch(request, env, context) {
|
|
12
12
|
const { pathname } = new URL(request.url);
|
|
13
13
|
|
|
@@ -19,6 +19,9 @@ export default {
|
|
|
19
19
|
|
|
20
20
|
for (const include of routes.include) {
|
|
21
21
|
if (isRoutingRuleMatch(pathname, include)) {
|
|
22
|
+
if (worker.fetch === undefined) {
|
|
23
|
+
throw new TypeError("Entry point missing `fetch` handler");
|
|
24
|
+
}
|
|
22
25
|
return worker.fetch(request, env, context);
|
|
23
26
|
}
|
|
24
27
|
}
|
package/templates/pages-shim.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// This Worker is used as a default when no Pages Functions are present.
|
|
2
2
|
// It proxies the request directly on to the asset server binding.
|
|
3
3
|
|
|
4
|
-
export default {
|
|
4
|
+
export default <ExportedHandler<{ ASSETS: Fetcher }>>{
|
|
5
5
|
async fetch(request, env, context) {
|
|
6
|
+
// @ts-expect-error due to a bug in `@cloudflare/workers-types`, the `cf`
|
|
7
|
+
// types from the `request` parameter and `RequestInit` are incompatible.
|
|
8
|
+
// We'll get this fixed very soon.
|
|
6
9
|
const response = await env.ASSETS.fetch(request.url, request);
|
|
7
10
|
return new Response(response.body, response);
|
|
8
11
|
},
|
|
@@ -119,14 +119,15 @@ function* executeRequest(request: Request, relativePathname: string) {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export default function (pluginArgs) {
|
|
122
|
+
export default function (pluginArgs: unknown) {
|
|
123
123
|
const onRequest: PagesPluginFunction = async (workerContext) => {
|
|
124
124
|
let { request } = workerContext;
|
|
125
125
|
const { env, next, data } = workerContext;
|
|
126
126
|
|
|
127
127
|
const url = new URL(request.url);
|
|
128
|
+
// TODO: Replace this with something actually legible.
|
|
128
129
|
const relativePathname = `/${
|
|
129
|
-
url.pathname.
|
|
130
|
+
url.pathname.replace(workerContext.functionPath, "") || ""
|
|
130
131
|
}`.replace(/^\/\//, "/");
|
|
131
132
|
|
|
132
133
|
const handlerIterator = executeRequest(request, relativePathname);
|
|
@@ -154,11 +155,7 @@ export default function (pluginArgs) {
|
|
|
154
155
|
|
|
155
156
|
const response = await handler(context);
|
|
156
157
|
|
|
157
|
-
|
|
158
|
-
return new Response(
|
|
159
|
-
[101, 204, 205, 304].includes(response.status) ? null : response.body,
|
|
160
|
-
{ ...response, headers: new Headers(response.headers) }
|
|
161
|
-
);
|
|
158
|
+
return cloneResponse(response);
|
|
162
159
|
} else {
|
|
163
160
|
return next();
|
|
164
161
|
}
|
|
@@ -169,3 +166,11 @@ export default function (pluginArgs) {
|
|
|
169
166
|
|
|
170
167
|
return onRequest;
|
|
171
168
|
}
|
|
169
|
+
|
|
170
|
+
// This makes a Response mutable
|
|
171
|
+
const cloneResponse = (response: Response) =>
|
|
172
|
+
// https://fetch.spec.whatwg.org/#null-body-status
|
|
173
|
+
new Response(
|
|
174
|
+
[101, 204, 205, 304].includes(response.status) ? null : response.body,
|
|
175
|
+
response
|
|
176
|
+
);
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
// @ts-expect-error
|
|
2
1
|
import worker from "__ENTRY_POINT__";
|
|
3
2
|
import {
|
|
4
3
|
getAssetFromKV,
|
|
5
4
|
NotFoundError,
|
|
6
5
|
MethodNotAllowedError,
|
|
7
|
-
|
|
6
|
+
serveSinglePageApp,
|
|
8
7
|
} from "__KV_ASSET_HANDLER__";
|
|
9
|
-
|
|
8
|
+
import type { Options, CacheControl } from "__KV_ASSET_HANDLER__";
|
|
10
9
|
import manifest from "__STATIC_CONTENT_MANIFEST";
|
|
11
10
|
import type * as kvAssetHandler from "@cloudflare/kv-asset-handler";
|
|
12
11
|
|
|
13
12
|
const ASSET_MANIFEST = JSON.parse(manifest);
|
|
14
13
|
|
|
15
|
-
// @ts-expect-error
|
|
16
14
|
export * from "__ENTRY_POINT__";
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
// Injected as `esbuild` `define`s
|
|
17
|
+
declare global {
|
|
18
|
+
const __CACHE_CONTROL_OPTIONS__: Partial<CacheControl>;
|
|
19
|
+
const __SERVE_SINGLE_PAGE_APP__: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default <ExportedHandler<{ __STATIC_CONTENT: KVNamespace }>>{
|
|
23
|
+
async fetch(request, env, ctx) {
|
|
24
|
+
let options: Partial<Options> = {
|
|
25
25
|
ASSET_MANIFEST,
|
|
26
26
|
ASSET_NAMESPACE: env.__STATIC_CONTENT,
|
|
27
27
|
cacheControl: __CACHE_CONTROL_OPTIONS__,
|
|
28
|
-
|
|
28
|
+
mapRequestToAsset: __SERVE_SINGLE_PAGE_APP__
|
|
29
|
+
? serveSinglePageApp
|
|
30
|
+
: undefined,
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
try {
|
|
@@ -34,7 +36,7 @@ export default {
|
|
|
34
36
|
)(
|
|
35
37
|
{
|
|
36
38
|
request,
|
|
37
|
-
waitUntil(promise
|
|
39
|
+
waitUntil(promise) {
|
|
38
40
|
return ctx.waitUntil(promise);
|
|
39
41
|
},
|
|
40
42
|
},
|
|
@@ -54,7 +56,7 @@ export default {
|
|
|
54
56
|
} catch (e) {
|
|
55
57
|
if (e instanceof NotFoundError || e instanceof MethodNotAllowedError) {
|
|
56
58
|
// if a known error is thrown then serve from actual worker
|
|
57
|
-
return await worker.fetch(request, env, ctx);
|
|
59
|
+
return await worker.fetch?.(request, env, ctx);
|
|
58
60
|
}
|
|
59
61
|
// otherwise it's a real error, so throw it
|
|
60
62
|
throw e;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @ts-nocheck `@types/node` should NOT be included
|
|
2
|
+
Buffer.from("test");
|
|
3
|
+
|
|
4
|
+
// @ts-expect-error `@types/jest` should NOT be included
|
|
5
|
+
test("test");
|
|
6
|
+
|
|
7
|
+
// `@cloudflare/workers-types` should be included
|
|
8
|
+
const _handler: ExportedHandler = {};
|
|
9
|
+
new HTMLRewriter();
|
|
10
|
+
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Projects */
|
|
6
|
+
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
+
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
|
9
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
|
10
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
+
|
|
13
|
+
/* Language and Environment */
|
|
14
|
+
"target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
15
|
+
"lib": [
|
|
16
|
+
"es2021"
|
|
17
|
+
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
|
18
|
+
"jsx": "react" /* Specify what JSX code is generated. */,
|
|
19
|
+
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
20
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
21
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
|
22
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
23
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
|
24
|
+
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
|
25
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
26
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
27
|
+
|
|
28
|
+
/* Modules */
|
|
29
|
+
"module": "es2022" /* Specify what module code is generated. */,
|
|
30
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
31
|
+
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
|
32
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
33
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
34
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
35
|
+
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
|
36
|
+
"types": [
|
|
37
|
+
"@cloudflare/workers-types",
|
|
38
|
+
"jest"
|
|
39
|
+
] /* Specify type package names to be included without being referenced in a source file. */,
|
|
40
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
41
|
+
"resolveJsonModule": true /* Enable importing .json files */,
|
|
42
|
+
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
|
43
|
+
|
|
44
|
+
/* JavaScript Support */
|
|
45
|
+
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
|
|
46
|
+
"checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
|
|
47
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
|
48
|
+
|
|
49
|
+
/* Emit */
|
|
50
|
+
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
51
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
52
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
53
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
54
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
55
|
+
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
|
56
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
57
|
+
"noEmit": true /* Disable emitting files from a compilation. */,
|
|
58
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
59
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
|
60
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
61
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
62
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
63
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
64
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
65
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
66
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
67
|
+
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
|
68
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
|
69
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
70
|
+
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
|
71
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
72
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
73
|
+
|
|
74
|
+
/* Interop Constraints */
|
|
75
|
+
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
|
|
76
|
+
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
|
|
77
|
+
// "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
|
78
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
79
|
+
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
80
|
+
|
|
81
|
+
/* Type Checking */
|
|
82
|
+
"strict": true /* Enable all strict type-checking options. */,
|
|
83
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
|
84
|
+
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
|
85
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
86
|
+
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
|
87
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
88
|
+
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
|
89
|
+
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
|
90
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
91
|
+
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
|
92
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
|
93
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
94
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
95
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
96
|
+
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
97
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
98
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
|
99
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
100
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
101
|
+
|
|
102
|
+
/* Completeness */
|
|
103
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
104
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
105
|
+
}
|
|
106
|
+
}
|
package/templates/tsconfig.json
CHANGED
|
@@ -1,106 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
|
9
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
|
10
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
-
|
|
13
|
-
/* Language and Environment */
|
|
14
|
-
"target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
15
|
-
"lib": [
|
|
16
|
-
"es2021"
|
|
17
|
-
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
|
18
|
-
"jsx": "react" /* Specify what JSX code is generated. */,
|
|
19
|
-
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
20
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
21
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
|
22
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
23
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
|
24
|
-
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
|
25
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
26
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
27
|
-
|
|
28
|
-
/* Modules */
|
|
29
|
-
"module": "es2022" /* Specify what module code is generated. */,
|
|
30
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
31
|
-
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
|
32
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
33
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
34
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
35
|
-
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
|
36
|
-
"types": [
|
|
37
|
-
"@cloudflare/workers-types",
|
|
38
|
-
"jest"
|
|
39
|
-
] /* Specify type package names to be included without being referenced in a source file. */,
|
|
40
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
41
|
-
"resolveJsonModule": true /* Enable importing .json files */,
|
|
42
|
-
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
|
43
|
-
|
|
44
|
-
/* JavaScript Support */
|
|
45
|
-
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
|
|
46
|
-
"checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
|
|
47
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
|
48
|
-
|
|
49
|
-
/* Emit */
|
|
50
|
-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
51
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
52
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
53
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
54
|
-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
55
|
-
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
|
56
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
57
|
-
"noEmit": true /* Disable emitting files from a compilation. */,
|
|
58
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
59
|
-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
|
60
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
61
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
62
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
63
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
64
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
65
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
66
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
67
|
-
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
|
68
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
|
69
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
70
|
-
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
|
71
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
72
|
-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
73
|
-
|
|
74
|
-
/* Interop Constraints */
|
|
75
|
-
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
|
|
76
|
-
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
|
|
77
|
-
// "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
|
78
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
79
|
-
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
80
|
-
|
|
81
|
-
/* Type Checking */
|
|
82
|
-
"strict": true /* Enable all strict type-checking options. */,
|
|
83
|
-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
|
84
|
-
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
|
85
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
86
|
-
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
|
87
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
88
|
-
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
|
89
|
-
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
|
90
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
91
|
-
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
|
92
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
|
93
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
94
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
95
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
96
|
-
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
97
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
98
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
|
99
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
100
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
101
|
-
|
|
102
|
-
/* Completeness */
|
|
103
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
104
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
105
|
-
}
|
|
4
|
+
"types": ["@cloudflare/workers-types"]
|
|
5
|
+
},
|
|
6
|
+
"include": ["**/*.ts"],
|
|
7
|
+
"exclude": ["__tests__", "./init-tests/**"]
|
|
106
8
|
}
|
|
@@ -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","../../../node_modules/@cloudflare/kv-asset-handler/dist/types.d.ts","../../../node_modules/@cloudflare/kv-asset-handler/dist/index.d.ts","./facade.d.ts","./first-party-worker-module-facade.ts","./format-dev-errors.ts","./new-worker-scheduled.ts","./new-worker.ts","./pages-dev-util.ts","./pages-dev-pipeline.ts","./pages-shim.ts","../../../node_modules/path-to-regexp/dist/index.d.ts","./pages-template-plugin.ts","./pages-template-worker.ts","./serve-static-assets.ts","./tsconfig-sanity.ts","./middleware/common.ts","./middleware/loader-modules.ts","./middleware/loader-sw.ts","./middleware/middleware-miniflare3-json-error.ts","./middleware/middleware-pretty-error.ts","./middleware/middleware-scheduled.ts","../../../node_modules/@cloudflare/workers-types/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},"f439ece97b03903d27a93c02f445d9abcff70232b88e70a2621fedcc9db1ffc8",{"version":"e8b2423b91be2951e7db3f6db2ec2cd3625235a950200a74a673b790ed8b4372","affectsGlobalScope":true},"8714b72b95c1f7f9245d32b8b291b21ef26e45d3df59e818f9197f6540e518b7","ad83ce0d12ff9d14ba6a9f43457ffc3d90e87f3e5f20e3fdebbb8409d931d478","ac0696673cb55b950db6fb25fe3ccd6b59c5eb570dc92bfcc4713013b6ed5d63","276b86bbfe5c329ac50a49825faa76788fddc67ff806fdd2880cb53187dfa691","cbfef832a9d473a7cce99f80fe8bda43d59ce81d1c6b5e929f43253f3878ce30","0704bdc9e66ede7a2183c419efdbb5f22c195952231e6c0b9cba526df2e8e2a4","dc4c974e076a16fdd706c84f0e7d30ae61bc0476d02860d88880bb5bd413cb7e","4cd5c66df96cc93d2ff073b6b507741b7de9002225152306bbe4ed79df3451c4","6e7936b20cd2022c2a71f9d780e7f87216c19fde5c18448aaff60059a46ae2e7","3267d7a7c896c2be4958055926940c89f3b4e6786a51335d77da1aa57ee6a33b","ecfcda58573d4cdbd5ecb0eb39a4c9439d40c5e0ca3200e5eafb1624a6117b8e",{"version":"bb652ceca49b7d127579d4c72f5e5adadf64109e91d97470b5ec82d363406e4e","affectsGlobalScope":true},"675d74367d696b7a52f2a515036acf36b2ef341c385d3944dc531d753b257e65","f165c6b3228ab46d02bb1f18a6352c1573382d992cc22342c46cb032c090c4af","9464d23740da2e84ea5c7b2f1f458e1059fe23a5623a7eb087e3507d92c241c6",{"version":"8ec567ca02a6acc5fb4e6f6b2a302884009fc78a3246277b488a95c87d1fcaad","affectsGlobalScope":true},"b8773398f456dc4a0c00b988648b2354ae2453ebb5274742b7a7b364f8a0acc8","6c15d320a0c150eac09db4c9e75725fd24a33c78695c758d4eb09f64452b21b8","1e7ccb28ed0d8738d210b1216e3504049d0021df9deec7d5ee247f72db4d6fd9",{"version":"8dfb280945d90d2bf2397e23aa63d7daa3d7e032de526b259ea2baf08223bd69","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"alwaysStrict":false,"esModuleInterop":true,"jsx":2,"module":1,"skipLibCheck":true,"strict":true,"target":99},"fileIdsList":[[54],[55],[56],[56,69],[69],[56,61],[64],[55,56]],"referencedMap":[[55,1],[56,2],[57,3],[58,3],[70,4],[71,5],[72,5],[73,5],[74,5],[62,6],[65,7],[66,7],[67,8]],"exportedModulesMap":[[55,1],[56,2],[57,3],[58,3],[70,4],[71,5],[72,5],[73,5],[74,5],[62,6],[65,7],[66,7],[67,8]],"semanticDiagnosticsPerFile":[55,54,75,64,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,56,57,58,69,70,71,72,73,74,59,60,62,61,63,65,66,67,68],"affectedFilesPendingEmit":[[55,1],[54,1],[75,1],[64,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1],[56,1],[57,1],[58,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[59,1],[60,1],[62,1],[61,1],[63,1],[65,1],[66,1],[67,1],[68,1]]},"version":"4.8.4"}
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -74,65 +74,6 @@ declare interface DeprecatedUpload {
|
|
|
74
74
|
rules?: Environment["rules"];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
declare interface DevApiOptions {
|
|
78
|
-
testMode?: boolean;
|
|
79
|
-
disableExperimentalWarning?: boolean;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
declare interface DevOptions {
|
|
83
|
-
config?: string;
|
|
84
|
-
env?: string;
|
|
85
|
-
ip?: string;
|
|
86
|
-
port?: number;
|
|
87
|
-
bundle?: boolean;
|
|
88
|
-
inspectorPort?: number;
|
|
89
|
-
localProtocol?: "http" | "https";
|
|
90
|
-
assets?: string;
|
|
91
|
-
site?: string;
|
|
92
|
-
siteInclude?: string[];
|
|
93
|
-
siteExclude?: string[];
|
|
94
|
-
nodeCompat?: boolean;
|
|
95
|
-
compatibilityDate?: string;
|
|
96
|
-
compatibilityFlags?: string[];
|
|
97
|
-
persist?: boolean;
|
|
98
|
-
persistTo?: string;
|
|
99
|
-
liveReload?: boolean;
|
|
100
|
-
watch?: boolean;
|
|
101
|
-
vars?: {
|
|
102
|
-
[key: string]: unknown;
|
|
103
|
-
};
|
|
104
|
-
kv?: {
|
|
105
|
-
binding: string;
|
|
106
|
-
id: string;
|
|
107
|
-
preview_id?: string;
|
|
108
|
-
}[];
|
|
109
|
-
durableObjects?: {
|
|
110
|
-
name: string;
|
|
111
|
-
class_name: string;
|
|
112
|
-
script_name?: string | undefined;
|
|
113
|
-
environment?: string | undefined;
|
|
114
|
-
}[];
|
|
115
|
-
r2?: {
|
|
116
|
-
binding: string;
|
|
117
|
-
bucket_name: string;
|
|
118
|
-
preview_bucket_name?: string;
|
|
119
|
-
}[];
|
|
120
|
-
d1Databases?: Environment["d1_databases"];
|
|
121
|
-
showInteractiveDevSession?: boolean;
|
|
122
|
-
logLevel?: "none" | "info" | "error" | "log" | "warn" | "debug";
|
|
123
|
-
logPrefix?: string;
|
|
124
|
-
inspect?: boolean;
|
|
125
|
-
local?: boolean;
|
|
126
|
-
forceLocal?: boolean;
|
|
127
|
-
enablePagesAssetsServiceBinding?: EnablePagesAssetsServiceBindingOptions;
|
|
128
|
-
_?: (string | number)[];
|
|
129
|
-
$0?: string;
|
|
130
|
-
testScheduled?: boolean;
|
|
131
|
-
experimentalLocal?: boolean;
|
|
132
|
-
accountId?: string;
|
|
133
|
-
experimentalLocalRemoteKv?: boolean;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
77
|
declare interface EnablePagesAssetsServiceBindingOptions {
|
|
137
78
|
proxyPort?: number;
|
|
138
79
|
directory?: string;
|
|
@@ -883,7 +824,64 @@ declare interface SpecIterator<T, TReturn = any, TNext = undefined> {
|
|
|
883
824
|
/**
|
|
884
825
|
* unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
|
|
885
826
|
*/
|
|
886
|
-
export declare function unstable_dev(script: string, options?:
|
|
827
|
+
export declare function unstable_dev(script: string, options?: UnstableDevOptions, apiOptions?: unknown): Promise<UnstableDevWorker>;
|
|
828
|
+
|
|
829
|
+
export declare interface UnstableDevOptions {
|
|
830
|
+
config?: string;
|
|
831
|
+
env?: string;
|
|
832
|
+
ip?: string;
|
|
833
|
+
port?: number;
|
|
834
|
+
bundle?: boolean;
|
|
835
|
+
inspectorPort?: number;
|
|
836
|
+
localProtocol?: "http" | "https";
|
|
837
|
+
assets?: string;
|
|
838
|
+
site?: string;
|
|
839
|
+
siteInclude?: string[];
|
|
840
|
+
siteExclude?: string[];
|
|
841
|
+
nodeCompat?: boolean;
|
|
842
|
+
compatibilityDate?: string;
|
|
843
|
+
compatibilityFlags?: string[];
|
|
844
|
+
persist?: boolean;
|
|
845
|
+
persistTo?: string;
|
|
846
|
+
vars?: {
|
|
847
|
+
[key: string]: unknown;
|
|
848
|
+
};
|
|
849
|
+
kv?: {
|
|
850
|
+
binding: string;
|
|
851
|
+
id: string;
|
|
852
|
+
preview_id?: string;
|
|
853
|
+
}[];
|
|
854
|
+
durableObjects?: {
|
|
855
|
+
name: string;
|
|
856
|
+
class_name: string;
|
|
857
|
+
script_name?: string | undefined;
|
|
858
|
+
environment?: string | undefined;
|
|
859
|
+
}[];
|
|
860
|
+
r2?: {
|
|
861
|
+
binding: string;
|
|
862
|
+
bucket_name: string;
|
|
863
|
+
preview_bucket_name?: string;
|
|
864
|
+
}[];
|
|
865
|
+
logLevel?: "none" | "info" | "error" | "log" | "warn" | "debug";
|
|
866
|
+
logPrefix?: string;
|
|
867
|
+
inspect?: boolean;
|
|
868
|
+
local?: boolean;
|
|
869
|
+
accountId?: string;
|
|
870
|
+
experimental?: {
|
|
871
|
+
d1Databases?: Environment["d1_databases"];
|
|
872
|
+
disableExperimentalWarning?: boolean;
|
|
873
|
+
disableDevRegistry?: boolean;
|
|
874
|
+
enablePagesAssetsServiceBinding?: EnablePagesAssetsServiceBindingOptions;
|
|
875
|
+
experimentalLocal?: boolean;
|
|
876
|
+
experimentalLocalRemoteKv?: boolean;
|
|
877
|
+
forceLocal?: boolean;
|
|
878
|
+
liveReload?: boolean;
|
|
879
|
+
showInteractiveDevSession?: boolean;
|
|
880
|
+
testMode?: boolean;
|
|
881
|
+
testScheduled?: boolean;
|
|
882
|
+
watch?: boolean;
|
|
883
|
+
};
|
|
884
|
+
}
|
|
887
885
|
|
|
888
886
|
export declare interface UnstableDevWorker {
|
|
889
887
|
port: number;
|