wrangler 0.0.0-ece06ea → 0.0.0-edc4b53
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/package.json +24 -15
- package/pages/functions/buildWorker.ts +62 -0
- package/pages/functions/filepath-routing.test.ts +39 -0
- package/pages/functions/filepath-routing.ts +221 -0
- package/pages/functions/identifiers.ts +78 -0
- package/pages/functions/routes.ts +158 -0
- package/pages/functions/template-worker.ts +144 -0
- package/src/__tests__/dev.test.tsx +66 -0
- package/src/__tests__/index.test.ts +254 -120
- package/src/__tests__/jest.setup.ts +22 -0
- package/src/__tests__/kv.test.ts +1106 -0
- package/src/__tests__/mock-cfetch.ts +171 -0
- package/src/__tests__/mock-dialogs.ts +65 -0
- package/src/__tests__/run-in-tmp.ts +19 -0
- package/src/__tests__/run-wrangler.ts +32 -0
- package/src/api/form_data.ts +71 -98
- package/src/api/preview.ts +29 -24
- package/src/api/worker.ts +38 -44
- package/src/cfetch/index.ts +102 -0
- package/src/cfetch/internal.ts +65 -0
- package/src/cli.ts +6 -7
- package/src/config.ts +476 -113
- package/src/dev.tsx +291 -256
- package/src/dialogs.tsx +4 -12
- package/src/index.tsx +381 -252
- package/src/inspect.ts +524 -0
- package/src/kv.tsx +110 -45
- package/src/module-collection.ts +64 -0
- package/src/pages.tsx +900 -213
- package/src/proxy.ts +294 -0
- package/src/publish.ts +67 -63
- package/src/sites.tsx +10 -7
- package/src/tail.tsx +5 -3
- package/src/user.tsx +31 -33
- package/wrangler-dist/cli.js +43444 -56347
- package/wrangler-dist/cli.js.map +3 -3
- package/src/__tests__/fixtures/init/.gitkeep +0 -0
- package/src/__tests__/mock-cfetch.js +0 -46
- package/src/api/inspect.ts +0 -441
- package/src/cfetch.ts +0 -72
- package/src/util/fetch.ts +0 -74
package/src/dialogs.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { Box, Text, useInput, render } from "ink";
|
|
|
4
4
|
import TextInput from "ink-text-input";
|
|
5
5
|
type ConfirmProps = {
|
|
6
6
|
text: string;
|
|
7
|
-
onConfirm: (answer: boolean) => void
|
|
7
|
+
onConfirm: (answer: boolean) => void;
|
|
8
8
|
};
|
|
9
9
|
function Confirm(props: ConfirmProps) {
|
|
10
10
|
useInput((input: string) => {
|
|
@@ -43,7 +43,7 @@ type PromptProps = {
|
|
|
43
43
|
onSubmit: (text: string) => void;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
function Prompt(props: PromptProps) {
|
|
47
47
|
const [value, setValue] = useState("");
|
|
48
48
|
|
|
49
49
|
return (
|
|
@@ -67,19 +67,11 @@ export async function prompt(text: string, type: "text" | "password" = "text") {
|
|
|
67
67
|
<Prompt
|
|
68
68
|
text={text}
|
|
69
69
|
type={type}
|
|
70
|
-
onSubmit={(
|
|
70
|
+
onSubmit={(inputText) => {
|
|
71
71
|
unmount();
|
|
72
|
-
resolve(
|
|
72
|
+
resolve(inputText);
|
|
73
73
|
}}
|
|
74
74
|
/>
|
|
75
75
|
);
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
// this one feels a little non "standard"
|
|
80
|
-
// export async function select(
|
|
81
|
-
// title: string,
|
|
82
|
-
// choices: { label: string; value: string }[]
|
|
83
|
-
// ): Promise<{ label: string; value: string }>{
|
|
84
|
-
|
|
85
|
-
// }
|