wrangler 0.0.0-d92ee694 → 0.0.0-d947d72e

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 CHANGED
@@ -28,30 +28,6 @@ Consider using a Node.js version manager such as https://volta.sh/ or https://gi
28
28
  return;
29
29
  }
30
30
 
31
- let pathToCACerts = process.env.NODE_EXTRA_CA_CERTS;
32
- if (pathToCACerts) {
33
- // TODO:
34
- // - should we log a warning here?
35
- // - maybe we can generate a certificate that concatenates with ours?
36
- //
37
- // I do think it'll be rare that someone wants to add a cert AND
38
- // use Cloudflare WARP, but let's wait till the situation actually
39
- // arises before we do anything about it
40
- } else {
41
- const osTempDir = os.tmpdir();
42
- const certDir = path.join(osTempDir, "wrangler-cert");
43
- const certPath = path.join(certDir, "Cloudflare_CA.pem");
44
- // copy cert to the system temp dir if needed
45
- if (!fs.existsSync(certPath)) {
46
- fs.mkdirSync(certDir, { recursive: true });
47
- fs.writeFileSync(
48
- certPath,
49
- fs.readFileSync(path.join(__dirname, "../Cloudflare_CA.pem"), "utf-8")
50
- );
51
- }
52
- pathToCACerts = certPath;
53
- }
54
-
55
31
  return spawn(
56
32
  process.execPath,
57
33
  [
@@ -63,10 +39,6 @@ Consider using a Node.js version manager such as https://volta.sh/ or https://gi
63
39
  ],
64
40
  {
65
41
  stdio: ["inherit", "inherit", "inherit", "ipc"],
66
- env: {
67
- ...process.env,
68
- NODE_EXTRA_CA_CERTS: pathToCACerts,
69
- },
70
42
  }
71
43
  )
72
44
  .on("exit", (code) =>
@@ -24,7 +24,8 @@
24
24
  "Text",
25
25
  "Data",
26
26
  "PythonModule",
27
- "PythonRequirement"
27
+ "PythonRequirement",
28
+ "NodeJsCompatModule"
28
29
  ],
29
30
  "type": "string"
30
31
  },
@@ -478,6 +479,58 @@
478
479
  "description": "The entrypoint/path to the JavaScript file that will be executed.",
479
480
  "type": "string"
480
481
  },
482
+ "migrations": {
483
+ "default": [],
484
+ "description": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
485
+ "items": {
486
+ "additionalProperties": false,
487
+ "properties": {
488
+ "deleted_classes": {
489
+ "description": "The Durable Objects being removed.",
490
+ "items": {
491
+ "type": "string"
492
+ },
493
+ "type": "array"
494
+ },
495
+ "new_classes": {
496
+ "description": "The new Durable Objects being defined.",
497
+ "items": {
498
+ "type": "string"
499
+ },
500
+ "type": "array"
501
+ },
502
+ "renamed_classes": {
503
+ "description": "The Durable Objects being renamed.",
504
+ "items": {
505
+ "additionalProperties": false,
506
+ "properties": {
507
+ "from": {
508
+ "type": "string"
509
+ },
510
+ "to": {
511
+ "type": "string"
512
+ }
513
+ },
514
+ "required": [
515
+ "from",
516
+ "to"
517
+ ],
518
+ "type": "object"
519
+ },
520
+ "type": "array"
521
+ },
522
+ "tag": {
523
+ "description": "A unique identifier for this migration.",
524
+ "type": "string"
525
+ }
526
+ },
527
+ "required": [
528
+ "tag"
529
+ ],
530
+ "type": "object"
531
+ },
532
+ "type": "array"
533
+ },
481
534
  "minify": {
482
535
  "description": "Minify the script before uploading.",
483
536
  "type": "boolean"
@@ -919,6 +972,7 @@
919
972
  "jsx_fragment",
920
973
  "kv_namespaces",
921
974
  "logfwdr",
975
+ "migrations",
922
976
  "mtls_certificates",
923
977
  "queues",
924
978
  "r2_buckets",
@@ -980,6 +1034,13 @@
980
1034
  ],
981
1035
  "type": "object"
982
1036
  },
1037
+ "alias": {
1038
+ "additionalProperties": {
1039
+ "type": "string"
1040
+ },
1041
+ "description": "A map of module aliases. Lets you swap out a module for any others. Corresponds with esbuild's `alias` config",
1042
+ "type": "object"
1043
+ },
983
1044
  "analytics_engine_datasets": {
984
1045
  "default": "`[]`",
985
1046
  "description": "Specifies analytics engine datasets that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
@@ -1003,38 +1064,45 @@
1003
1064
  "type": "array"
1004
1065
  },
1005
1066
  "assets": {
1006
- "additionalProperties": false,
1007
- "description": "Serve a folder of static assets with your Worker, without any additional code. This can either be a string, or an object with additional config fields.",
1008
- "properties": {
1009
- "browser_TTL": {
1010
- "type": "number"
1011
- },
1012
- "bucket": {
1013
- "type": "string"
1014
- },
1015
- "exclude": {
1016
- "items": {
1017
- "type": "string"
1018
- },
1019
- "type": "array"
1020
- },
1021
- "include": {
1022
- "items": {
1023
- "type": "string"
1067
+ "anyOf": [
1068
+ {
1069
+ "additionalProperties": false,
1070
+ "properties": {
1071
+ "browser_TTL": {
1072
+ "type": "number"
1073
+ },
1074
+ "bucket": {
1075
+ "type": "string"
1076
+ },
1077
+ "exclude": {
1078
+ "items": {
1079
+ "type": "string"
1080
+ },
1081
+ "type": "array"
1082
+ },
1083
+ "include": {
1084
+ "items": {
1085
+ "type": "string"
1086
+ },
1087
+ "type": "array"
1088
+ },
1089
+ "serve_single_page_app": {
1090
+ "type": "boolean"
1091
+ }
1024
1092
  },
1025
- "type": "array"
1093
+ "required": [
1094
+ "bucket",
1095
+ "include",
1096
+ "exclude",
1097
+ "serve_single_page_app"
1098
+ ],
1099
+ "type": "object"
1026
1100
  },
1027
- "serve_single_page_app": {
1028
- "type": "boolean"
1101
+ {
1102
+ "type": "string"
1029
1103
  }
1030
- },
1031
- "required": [
1032
- "bucket",
1033
- "include",
1034
- "exclude",
1035
- "serve_single_page_app"
1036
1104
  ],
1037
- "type": "object"
1105
+ "description": "Serve a folder of static assets with your Worker, without any additional code. This can either be a string, or an object with additional config fields."
1038
1106
  },
1039
1107
  "base_dir": {
1040
1108
  "description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.",
@@ -2389,6 +2457,58 @@
2389
2457
  "description": "The entrypoint/path to the JavaScript file that will be executed.",
2390
2458
  "type": "string"
2391
2459
  },
2460
+ "migrations": {
2461
+ "default": [],
2462
+ "description": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
2463
+ "items": {
2464
+ "additionalProperties": false,
2465
+ "properties": {
2466
+ "deleted_classes": {
2467
+ "description": "The Durable Objects being removed.",
2468
+ "items": {
2469
+ "type": "string"
2470
+ },
2471
+ "type": "array"
2472
+ },
2473
+ "new_classes": {
2474
+ "description": "The new Durable Objects being defined.",
2475
+ "items": {
2476
+ "type": "string"
2477
+ },
2478
+ "type": "array"
2479
+ },
2480
+ "renamed_classes": {
2481
+ "description": "The Durable Objects being renamed.",
2482
+ "items": {
2483
+ "additionalProperties": false,
2484
+ "properties": {
2485
+ "from": {
2486
+ "type": "string"
2487
+ },
2488
+ "to": {
2489
+ "type": "string"
2490
+ }
2491
+ },
2492
+ "required": [
2493
+ "from",
2494
+ "to"
2495
+ ],
2496
+ "type": "object"
2497
+ },
2498
+ "type": "array"
2499
+ },
2500
+ "tag": {
2501
+ "description": "A unique identifier for this migration.",
2502
+ "type": "string"
2503
+ }
2504
+ },
2505
+ "required": [
2506
+ "tag"
2507
+ ],
2508
+ "type": "object"
2509
+ },
2510
+ "type": "array"
2511
+ },
2392
2512
  "minify": {
2393
2513
  "description": "Minify the script before uploading.",
2394
2514
  "type": "boolean"
@@ -2863,7 +2983,7 @@
2863
2983
  "additionalProperties": false,
2864
2984
  "properties": {
2865
2985
  "environment": {
2866
- "description": "(Optional) The environt of the service.",
2986
+ "description": "(Optional) The environment of the service.",
2867
2987
  "type": "string"
2868
2988
  },
2869
2989
  "service": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "0.0.0-d92ee694",
3
+ "version": "0.0.0-d947d72e",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -47,7 +47,6 @@
47
47
  "wrangler-dist",
48
48
  "templates",
49
49
  "kv-asset-handler.js",
50
- "Cloudflare_CA.pem",
51
50
  "config-schema.json"
52
51
  ],
53
52
  "dependencies": {
@@ -55,60 +54,62 @@
55
54
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
56
55
  "blake3-wasm": "^2.1.5",
57
56
  "chokidar": "^3.5.3",
57
+ "date-fns": "^3.6.0",
58
58
  "esbuild": "0.17.19",
59
59
  "nanoid": "^3.3.3",
60
60
  "path-to-regexp": "^6.2.0",
61
61
  "resolve": "^1.22.8",
62
62
  "resolve.exports": "^2.0.2",
63
63
  "selfsigned": "^2.0.1",
64
- "source-map": "0.6.1",
64
+ "source-map": "^0.6.1",
65
+ "unenv": "npm:unenv-nightly@1.10.0-1717606461.a117952",
65
66
  "xxhash-wasm": "^1.0.1",
66
- "@cloudflare/kv-asset-handler": "0.3.2",
67
- "miniflare": "3.20240512.0"
67
+ "@cloudflare/kv-asset-handler": "0.3.4",
68
+ "miniflare": "3.20240718.0"
68
69
  },
69
70
  "devDependencies": {
70
71
  "@cloudflare/types": "^6.18.4",
71
- "@cloudflare/workers-types": "^4.20240512.0",
72
+ "@cloudflare/workers-types": "^4.20240718.0",
72
73
  "@cspotcode/source-map-support": "0.8.1",
73
74
  "@iarna/toml": "^3.0.0",
74
- "@microsoft/api-extractor": "^7.28.3",
75
+ "@microsoft/api-extractor": "^7.47.0",
75
76
  "@sentry/node": "^7.86.0",
76
77
  "@sentry/types": "^7.86.0",
77
78
  "@sentry/utils": "^7.86.0",
78
79
  "@types/body-parser": "^1.19.2",
79
80
  "@types/command-exists": "^1.2.0",
80
81
  "@types/express": "^4.17.13",
81
- "@types/glob-to-regexp": "0.4.1",
82
+ "@types/glob-to-regexp": "^0.4.1",
82
83
  "@types/is-ci": "^3.0.0",
83
84
  "@types/javascript-time-ago": "^2.0.3",
84
- "@types/mime": "^2.0.3",
85
+ "@types/mime": "^3.0.4",
85
86
  "@types/minimatch": "^5.1.2",
86
87
  "@types/prompts": "^2.0.14",
87
- "@types/react": "^17.0.37",
88
+ "@types/react": "^18.2.21",
88
89
  "@types/resolve": "^1.20.6",
89
90
  "@types/serve-static": "^1.13.10",
90
91
  "@types/shell-quote": "^1.7.2",
91
92
  "@types/signal-exit": "^3.0.1",
92
93
  "@types/supports-color": "^8.1.1",
93
- "@types/ws": "^8.5.3",
94
- "@types/yargs": "^17.0.10",
94
+ "@types/ws": "^8.5.7",
95
+ "@types/yargs": "^17.0.22",
95
96
  "@vitest/ui": "^1.6.0",
96
97
  "@webcontainer/env": "^1.1.0",
97
98
  "body-parser": "^1.20.0",
98
- "chalk": "^2.4.2",
99
+ "chalk": "^5.2.0",
99
100
  "cli-table3": "^0.6.3",
100
101
  "clipboardy": "^3.0.0",
101
102
  "cmd-shim": "^4.1.0",
102
103
  "command-exists": "^1.2.9",
103
- "concurrently": "^7.2.2",
104
- "devtools-protocol": "^0.0.955664",
104
+ "concurrently": "^8.2.2",
105
+ "devtools-protocol": "^0.0.1182435",
105
106
  "dotenv": "^16.0.0",
106
107
  "es-module-lexer": "^1.3.0",
107
108
  "execa": "^6.1.0",
108
109
  "express": "^4.18.1",
109
110
  "find-up": "^6.3.0",
110
- "get-port": "^6.1.2",
111
- "glob-to-regexp": "0.4.1",
111
+ "get-port": "^7.0.0",
112
+ "glob-to-regexp": "^0.4.1",
112
113
  "http-terminator": "^3.2.0",
113
114
  "https-proxy-agent": "7.0.2",
114
115
  "ignore": "^5.2.0",
@@ -129,45 +130,49 @@
129
130
  "pretty-bytes": "^6.0.0",
130
131
  "prompts": "^2.4.2",
131
132
  "ps-list": "^8.1.1",
132
- "react": "^17.0.2",
133
+ "react": "^18.2.0",
133
134
  "react-error-boundary": "^3.1.4",
134
135
  "semiver": "^1.1.0",
135
136
  "serve-static": "^1.15.0",
136
137
  "shell-quote": "^1.8.1",
137
138
  "shellac": "^0.8.0",
138
139
  "signal-exit": "^3.0.7",
139
- "strip-ansi": "^7.0.1",
140
+ "strip-ansi": "^7.1.0",
140
141
  "supports-color": "^9.2.2",
141
142
  "timeago.js": "^4.0.2",
143
+ "tree-kill": "^1.2.2",
142
144
  "ts-dedent": "^2.2.0",
143
145
  "ts-json-schema-generator": "^1.5.0",
144
- "undici": "5.28.4",
146
+ "undici": "^5.28.4",
145
147
  "update-check": "^1.5.4",
146
148
  "vitest": "^1.6.0",
147
149
  "vitest-websocket-mock": "^0.3.0",
148
- "ws": "^8.5.0",
150
+ "ws": "^8.17.1",
149
151
  "xdg-app-paths": "^8.3.0",
150
152
  "yargs": "^17.7.2",
151
153
  "yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
152
154
  "@cloudflare/cli": "1.1.1",
153
155
  "@cloudflare/eslint-config-worker": "1.1.0",
154
- "@cloudflare/workers-tsconfig": "0.0.0",
155
- "@cloudflare/pages-shared": "^0.11.38"
156
- },
157
- "optionalDependencies": {
158
- "fsevents": "~2.3.2"
156
+ "@cloudflare/pages-shared": "^0.11.48",
157
+ "@cloudflare/workers-tsconfig": "0.0.0"
159
158
  },
160
159
  "peerDependencies": {
161
- "@cloudflare/workers-types": "^4.20240512.0"
160
+ "@cloudflare/workers-types": "^4.20240718.0"
162
161
  },
163
162
  "peerDependenciesMeta": {
164
163
  "@cloudflare/workers-types": {
165
164
  "optional": true
166
165
  }
167
166
  },
167
+ "optionalDependencies": {
168
+ "fsevents": "~2.3.2"
169
+ },
168
170
  "engines": {
169
171
  "node": ">=16.17.0"
170
172
  },
173
+ "volta": {
174
+ "extends": "../../package.json"
175
+ },
171
176
  "workers-sdk": {
172
177
  "prerelease": true
173
178
  },
@@ -175,7 +180,7 @@
175
180
  "assert-git-version": "node -r esbuild-register scripts/assert-git-version.ts",
176
181
  "build": "pnpm run clean && pnpm run bundle && pnpm run emit-types && pnpm run generate-json-schema",
177
182
  "bundle": "node -r esbuild-register scripts/bundle.ts",
178
- "check:lint": "eslint .",
183
+ "check:lint": "eslint . --max-warnings=0",
179
184
  "check:type": "tsc",
180
185
  "clean": "rimraf wrangler-dist miniflare-dist emitted-types",
181
186
  "dev": "pnpm run clean && concurrently -c black,blue --kill-others-on-fail false \"pnpm run bundle --watch\" \"pnpm run check:type --watch --preserveWatchOutput\"",
@@ -183,9 +188,9 @@
183
188
  "generate-json-schema": "pnpm exec ts-json-schema-generator --no-type-check --path src/config/config.ts --type RawConfig --out config-schema.json",
184
189
  "start": "pnpm run bundle && cross-env NODE_OPTIONS=--enable-source-maps ./bin/wrangler.js",
185
190
  "test": "pnpm run assert-git-version && vitest",
186
- "test:ci": "pnpm run test",
191
+ "test:ci": "pnpm run test run",
187
192
  "test:debug": "pnpm run test --silent=false --verbose=true",
188
- "test:e2e": "vitest -c ./e2e/vitest.config.ts",
193
+ "test:e2e": "vitest -c ./e2e/vitest.config.mts",
189
194
  "test:watch": "pnpm run test --testTimeout=50000 --watch",
190
195
  "type:tests": "tsc -p ./src/__tests__/tsconfig.json && tsc -p ./e2e/tsconfig.json"
191
196
  }
@@ -3,10 +3,10 @@ declare module "__ENTRY_POINT__" {
3
3
  import { WorkerEntrypoint } from "cloudflare:workers";
4
4
 
5
5
  export type WorkerEntrypointConstructor = typeof WorkerEntrypoint;
6
- export type WithMiddleware<T> = T & { middleware?: Middleware[] };
7
6
 
8
- const worker: WithMiddleware<ExportedHandler | WorkerEntrypointConstructor>;
7
+ const worker: ExportedHandler | WorkerEntrypointConstructor;
9
8
  export default worker;
9
+ export const __INTERNAL_WRANGLER_MIDDLEWARE__: Middleware[];
10
10
  }
11
11
 
12
12
  declare module "__KV_ASSET_HANDLER__" {
@@ -165,3 +165,6 @@ dist
165
165
  .yarn/build-state.yml
166
166
  .yarn/install-state.gz
167
167
  .pnp.\*
168
+
169
+ .wrangler
170
+ .DS_Store
@@ -3,12 +3,9 @@
3
3
  // export dynamically through wrangler, or we can potentially let users directly
4
4
  // add them as a sort of "plugin" system.
5
5
 
6
- import ENTRY from "__ENTRY_POINT__";
6
+ import ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from "__ENTRY_POINT__";
7
7
  import { __facade_invoke__, __facade_register__, Dispatcher } from "./common";
8
- import type {
9
- WithMiddleware,
10
- WorkerEntrypointConstructor,
11
- } from "__ENTRY_POINT__";
8
+ import type { WorkerEntrypointConstructor } from "__ENTRY_POINT__";
12
9
 
13
10
  // Preserve all the exports from the worker
14
11
  export * from "__ENTRY_POINT__";
@@ -33,15 +30,16 @@ class __Facade_ScheduledController__ implements ScheduledController {
33
30
  }
34
31
  }
35
32
 
36
- function wrapExportedHandler(
37
- worker: WithMiddleware<ExportedHandler>
38
- ): ExportedHandler {
33
+ function wrapExportedHandler(worker: ExportedHandler): ExportedHandler {
39
34
  // If we don't have any middleware defined, just return the handler as is
40
- if (worker.middleware === undefined || worker.middleware.length === 0) {
35
+ if (
36
+ __INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||
37
+ __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0
38
+ ) {
41
39
  return worker;
42
40
  }
43
41
  // Otherwise, register all middleware once
44
- for (const middleware of worker.middleware) {
42
+ for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
45
43
  __facade_register__(middleware);
46
44
  }
47
45
 
@@ -75,14 +73,17 @@ function wrapExportedHandler(
75
73
  }
76
74
 
77
75
  function wrapWorkerEntrypoint(
78
- klass: WithMiddleware<WorkerEntrypointConstructor>
76
+ klass: WorkerEntrypointConstructor
79
77
  ): WorkerEntrypointConstructor {
80
78
  // If we don't have any middleware defined, just return the handler as is
81
- if (klass.middleware === undefined || klass.middleware.length === 0) {
79
+ if (
80
+ __INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||
81
+ __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0
82
+ ) {
82
83
  return klass;
83
84
  }
84
85
  // Otherwise, register all middleware once
85
- for (const middleware of klass.middleware) {
86
+ for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
86
87
  __facade_register__(middleware);
87
88
  }
88
89
 
@@ -1,105 +1,22 @@
1
1
  {
2
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
3
  "target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
4
  "lib": [
16
5
  "es2021"
17
6
  ] /* 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`. */
7
+ "jsx": "react-jsx" /* Specify what JSX code is generated. */,
8
+ "module": "ESNext" /* Specify what module code is generated. */,
9
+ "moduleResolution": "Bundler" /* Specify how TypeScript looks up a file from a given module specifier. */,
36
10
  "types": [
37
11
  "@cloudflare/workers-types"
38
12
  ] /* Specify type package names to be included without being referenced in a source file. */,
39
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
40
13
  "resolveJsonModule": true /* Enable importing .json files */,
41
- // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
42
-
43
- /* JavaScript Support */
44
14
  "allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
45
- "checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
46
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
47
-
48
- /* Emit */
49
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
50
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
51
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
52
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
53
- // "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. */
54
- // "outDir": "./", /* Specify an output folder for all emitted files. */
55
- // "removeComments": true, /* Disable emitting comments. */
56
15
  "noEmit": true /* Disable emitting files from a compilation. */,
57
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
58
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
59
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
60
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
61
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
62
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
63
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
64
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
65
- // "newLine": "crlf", /* Set the newline character for emitting files. */
66
- // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
67
- // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
68
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
69
- // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
70
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
71
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
72
-
73
- /* Interop Constraints */
74
16
  "isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
75
17
  "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
76
- // "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
77
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
78
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
79
-
80
- /* Type Checking */
81
18
  "strict": true /* Enable all strict type-checking options. */,
82
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
83
- // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
84
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
85
- // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
86
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
87
- // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
88
- // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
89
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
90
- // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
91
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
92
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
93
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
94
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
95
- // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
96
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
97
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
98
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
99
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
100
-
101
- /* Completeness */
102
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
19
+ "noUncheckedIndexedAccess": true,
103
20
  "skipLibCheck": true /* Skip type checking all .d.ts files. */
104
21
  }
105
22
  }