wrangler 0.0.0-fb0eae7 → 0.0.0-fb43821
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 +7 -8
- package/src/__tests__/index.test.ts +356 -87
- package/src/__tests__/mock-cfetch.js +11 -15
- package/src/api/inspect.ts +0 -11
- package/src/dev.tsx +66 -13
- package/src/dialogs.tsx +1 -9
- package/src/index.tsx +69 -40
- package/src/pages.tsx +554 -80
- package/src/publish.ts +4 -3
- package/src/user.tsx +1 -1
- package/wrangler-dist/cli.js +53687 -66219
- package/wrangler-dist/cli.js.map +3 -3
- package/src/__tests__/fixtures/init/.gitkeep +0 -0
package/src/publish.ts
CHANGED
|
@@ -99,6 +99,7 @@ export default async function publish(props: Props): Promise<void> {
|
|
|
99
99
|
format: "esm",
|
|
100
100
|
sourcemap: true,
|
|
101
101
|
metafile: true,
|
|
102
|
+
conditions: ["worker", "browser"],
|
|
102
103
|
loader: {
|
|
103
104
|
".js": "jsx",
|
|
104
105
|
},
|
|
@@ -136,7 +137,7 @@ export default async function publish(props: Props): Promise<void> {
|
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
const content = await readFile(chunks[0], { encoding: "utf-8" });
|
|
139
|
-
destination.cleanup();
|
|
140
|
+
await destination.cleanup();
|
|
140
141
|
|
|
141
142
|
// if config.migrations
|
|
142
143
|
// get current migration tag
|
|
@@ -282,8 +283,8 @@ export default async function publish(props: Props): Promise<void> {
|
|
|
282
283
|
// This is to prevent an issue where a negative cache-hit
|
|
283
284
|
// causes the subdomain to be unavailable for 30 seconds.
|
|
284
285
|
// This is a temporary measure until we fix this on the edge.
|
|
285
|
-
.then((url) => {
|
|
286
|
-
sleep(3000);
|
|
286
|
+
.then(async (url) => {
|
|
287
|
+
await sleep(3000);
|
|
287
288
|
return url;
|
|
288
289
|
})
|
|
289
290
|
);
|
package/src/user.tsx
CHANGED
|
@@ -816,7 +816,7 @@ export async function loginOrRefreshIfRequired(): Promise<boolean> {
|
|
|
816
816
|
|
|
817
817
|
export async function login(props?: LoginProps): Promise<boolean> {
|
|
818
818
|
const urlToOpen = await getAuthURL(props?.scopes);
|
|
819
|
-
open(urlToOpen);
|
|
819
|
+
await open(urlToOpen);
|
|
820
820
|
// TODO: log url only if on system where it's unreliable/unavailable
|
|
821
821
|
// console.log(`💁 Opened ${urlToOpen}`);
|
|
822
822
|
let server;
|