[ci] format

This commit is contained in:
ematipico 2023-09-22 15:00:18 +00:00 committed by astrobot-houston
parent faeead4232
commit 0352dec47b
3 changed files with 11 additions and 7 deletions

View file

@ -197,9 +197,9 @@ export default defineConfig({
default: `false`
Whether or not to import `.wasm` files [directly as ES modules](https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration).
Whether or not to import `.wasm` files [directly as ES modules](https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration).
Add `wasmModuleImports: true` to `astro.config.mjs` to enable in both the Cloudflare build and the Astro dev server.
Add `wasmModuleImports: true` to `astro.config.mjs` to enable in both the Cloudflare build and the Astro dev server.
```diff
// astro.config.mjs
@ -214,9 +214,9 @@ export default defineConfig({
})
```
Once enabled, you can import a web assembly module in Astro with a `.wasm?module` import.
Once enabled, you can import a web assembly module in Astro with a `.wasm?module` import.
The following is an example of importing a Wasm module that then responds to requests by adding the request's number parameters together.
The following is an example of importing a Wasm module that then responds to requests by adding the request's number parameters together.
```javascript
// pages/add/[a]/[b].js

View file

@ -350,7 +350,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
'node:stream',
'node:string_decoder',
'node:util',
],
],
entryPoints: pathsGroup,
outbase: absolutePagesDirname,
outdir: outputDir,

View file

@ -41,7 +41,11 @@ export async function runCLI(
let cli;
let lastErr;
while (triesRemaining > 0) {
cli = await tryRunCLI(basePath, { silent, timeout, forceRotatePort: triesRemaining !== maxAttempts });
cli = await tryRunCLI(basePath, {
silent,
timeout,
forceRotatePort: triesRemaining !== maxAttempts,
});
try {
await cli.ready;
return cli;
@ -148,7 +152,7 @@ const isPortOpen = async (port) => {
resolve(true);
s.close();
});
s.listen(port, "0.0.0.0");
s.listen(port, '0.0.0.0');
});
};