diff --git a/.llms-snapshots/llms-full.txt b/.llms-snapshots/llms-full.txt index 5acc9bcd..9ac552dd 100644 --- a/.llms-snapshots/llms-full.txt +++ b/.llms-snapshots/llms-full.txt @@ -736,7 +736,7 @@ If you're using the [Next.js](/docs/reference/plugins.md#nextjs-plugin) or [Vite juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist" }, orbiter: { ids: { production: "aaaa-bbbbb-ccccc-ddddd-cai" // <-- Replace with your ID } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" } }, orbiter: { ids: { production: "aaaa-bbbbb-ccccc-ddddd-cai" // <-- Replace with your ID } }}); ``` If you're not using a plugin, you can skip this step and instead provide the IDs manually when initializing the Orbiter (see next section). @@ -865,7 +865,7 @@ You can also configure different IDs for different environments (e.g., developme juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist" }, orbiter: { ids: { production: "aaaa-bbbbb-ccccc-ddddd-cai", development: "ffff-eeee-ddddd-ccccc-cai" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" } }, orbiter: { ids: { production: "aaaa-bbbbb-ccccc-ddddd-cai", development: "ffff-eeee-ddddd-ccccc-cai" } }}); ``` # Authentication @@ -1094,7 +1094,7 @@ Deploy your own instance of the [Juno API](https://github.com/junobuild/juno-api Once your proxy is running, add your GitHub configuration to your `juno.config` file: ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", authentication: { github: { clientId: "your-github-client-id" } } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist" }, authentication: { github: { clientId: "your-github-client-id" } } }}); ``` If you use different Client IDs for each environment (as recommended), you can leverage the build mode to load configuration conditionally. @@ -1305,7 +1305,7 @@ Once your credentials are ready, you need to add your Google Client ID to your p In your `juno.config` file: ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", authentication: { google: { clientId: "1234567890-abcde12345fghijklmno.apps.googleusercontent.com" } } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist" }, authentication: { google: { clientId: "1234567890-abcde12345fghijklmno.apps.googleusercontent.com" } } }}); ``` If you use different Client IDs for each environment (as recommended), you can leverage the build mode to load configuration conditionally. @@ -3148,7 +3148,7 @@ Juno uses this directory to locate the files that will be deployed as part of yo juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist" }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" } }}); ``` ### Ignore files @@ -3162,7 +3162,7 @@ Here is an example of how the ignore attribute can be utilized: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", ignore: ["**/*.txt", ".tmp/"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", ignore: ["**/*.txt", ".tmp/"] } }}); ``` ### HTTP Headers @@ -3176,7 +3176,7 @@ Here's an example of the `headers` object: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { headers: [ { source: "/", headers: [["Cache-Control", "public,max-age=0,must-revalidate"]] }, { source: "assets/fonts/*", headers: [["Cache-Control", "max-age=31536000"]] }, { source: "**/*.jpg", headers: [ ["Cache-Control", "max-age=31536000"], ["Access-Control-Allow-Origin", "*"] ] } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { headers: [ { source: "/", headers: [["Cache-Control", "public,max-age=0,must-revalidate"]] }, { source: "assets/fonts/*", headers: [["Cache-Control", "max-age=31536000"]] }, { source: "**/*.jpg", headers: [ ["Cache-Control", "max-age=31536000"], ["Access-Control-Allow-Origin", "*"] ] } ] } }}); ``` This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the headers using globs. @@ -3204,7 +3204,7 @@ Here's the basic structure for a `redirects` attribute. juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { redirects: [ { source: "/hello", location: "/world/index.html", code: 301 } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { redirects: [ { source: "/hello", location: "/world/index.html", code: 301 } ] } }}); ``` The `redirects` attribute contains an array of redirect rules: @@ -3224,7 +3224,7 @@ Here's the basic structure for a `rewrites` attribute. juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { rewrites: [ { source: "/hello/**", destination: "/hello/world.html" } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { rewrites: [ { source: "/hello/**", destination: "/hello/world.html" } ] } }}); ``` This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the rewrites using globs. @@ -3253,7 +3253,7 @@ Set the `precompress` option to `false` in your configuration: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: false }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: false } }}); ``` #### Customize the file matching pattern @@ -3263,7 +3263,7 @@ If you want to customize the default pattern `**/*.+(css|js|mjs|html)` to better juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: { pattern: "**/*.jpg" // precompress JPEG files only } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: { pattern: "**/*.jpg" // precompress JPEG files only } } }}); ``` #### Decide what happens to original files @@ -3282,7 +3282,7 @@ To avoid this, instead of providing a single precompression rule, it's recommend juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: { mode: "replace" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: { mode: "replace" } } }}); ``` #### Choose the compression algorithm @@ -3294,7 +3294,7 @@ You can switch to **Brotli** (`algorithm: "brotli"`) for potentially smaller fil juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: { algorithm: "brotli" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: { algorithm: "brotli" } } }}); ``` #### Use multiple rules @@ -3310,7 +3310,7 @@ To handle this, the precompress option also accepts an array of rules: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: [ { pattern: "**/*.+(js|mjs|css)", algorithm: "brotli", mode: "replace" }, { pattern: "**/*.html", algorithm: "brotli", mode: "both" } ] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: [ { pattern: "**/*.+(js|mjs|css)", algorithm: "brotli", mode: "replace" }, { pattern: "**/*.html", algorithm: "brotli", mode: "both" } ] } }}); ``` ### Encoding types @@ -3334,7 +3334,7 @@ Here is an example of how the "encoding" attribute can be utilized: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", encoding: [["**/releases/*.gz", "identity"]] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", encoding: [["**/releases/*.gz", "identity"]] } }}); ``` ### iframe @@ -3346,7 +3346,7 @@ You can customize this behavior by setting the `iframe` option to either `same-o juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { iframe: "same-origin" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { iframe: "same-origin" } }}); ``` ### Assertions @@ -3358,7 +3358,7 @@ You can customize this behavior by adjusting the heap memory limit in bytes. For juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", assertions: { heapMemory: 678000000 } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, assertions: { heapMemory: 678000000 } }}); ``` Alternatively, these checks can be completely disabled. To do so, set the `heapMemory` assertion to `false`: @@ -3366,7 +3366,7 @@ Alternatively, these checks can be completely disabled. To do so, set the `heapM juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", assertions: { heapMemory: false } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, assertions: { heapMemory: false } }}); ``` # Development @@ -6826,7 +6826,7 @@ If you're using a different image like Skylab, you can make this configuration d You can also replace `development` with `test` or any other mode. Adapt as you wish. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "jx5yt-yyaaa-aaaal-abzbq-cai", production: "" }, source: "out", collections: { datastore: [ { collection: "notes", read: "managed", write: "managed", memory: "stable" } ], storage: [ { collection: "images", read: "managed", write: "managed", memory: "stable" } ] } }, emulator: { runner: { type: "docker" }, satellite: {} }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "jx5yt-yyaaa-aaaal-abzbq-cai", production: "" }, hosting: { source: "out" }, collections: { datastore: [ { collection: "notes", read: "managed", write: "managed", memory: "stable" } ], storage: [ { collection: "images", read: "managed", write: "managed", memory: "stable" } ] } }, emulator: { runner: { type: "docker" }, satellite: {} }}); ``` The configuration above also defines the collections used by the application under test. @@ -7574,7 +7574,7 @@ To initialize your project with the Satellite ID you created, configure it in th Replace `` with the ID. ``` -import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "out", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "out", predeploy: ["npm run build"] } }}); ``` In addition, add also the ID to your `environment.ts` file: @@ -7659,7 +7659,7 @@ Use this guide to deploy your project to production. Create a `juno.config.mjs` file at the root of your project. Replace the `PROD_SATELLITE_ID` with the ID of the Satellite you created earlier and `dist//browser` with your project's name. ``` -import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist//browser", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist//browser", predeploy: ["npm run build"] } }}); ``` ## 3\. How to deploy @@ -7833,7 +7833,7 @@ To initialize the library with the Satellite ID you created, configure it in the Replace `` with the ID. ``` -import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }}); ``` ## 4\. Install the Plugin @@ -7892,7 +7892,7 @@ Use this guide to deploy and host your project to production. Create a `juno.config.mjs` file at the root of your project, and replace the `PROD_SATELLITE_ID` with the ID of the Satellite you created earlier. ``` -import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }}); ``` ## 3\. How to deploy @@ -8003,7 +8003,7 @@ Use this guide to deploy and host your project to production. Create a `juno.config.ts` file at the root of your project, and replace the `PROD_SATELLITE_ID` with the ID of the Satellite you created earlier. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "build", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "build", predeploy: ["npm run build"] } }}); ``` ## 3\. How to deploy @@ -8127,7 +8127,7 @@ Commonly, or if you are using the templates, these are the folders that can be s Here’s an example of configuration file: ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" // Replace with your satellite ID }, source: "dist", // Replace with your build output directory predeploy: ["npm run build"] // Adjust based on your package manager }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" // Replace with your satellite ID }, hosting: { source: "dist", // Replace with your build output directory predeploy: ["npm run build"] // Adjust based on your package manager } }}); ``` For detailed information about all available configuration options, refer to the [configuration](/docs/reference/configuration.md) section. @@ -8487,7 +8487,7 @@ To initialize the library with the Satellite ID you created, configure it in the Replace `` with the ID. ``` -import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "out", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "out", predeploy: ["npm run build"] } }}); ``` ### 4\. Install the Plugin (If Needed) @@ -8590,7 +8590,7 @@ next.config.js Create a `juno.config.mjs` file at the root of your project, and replace the `PROD_SATELLITE_ID` with the ID of the Satellite you created earlier. ``` -import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "out", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";/** @type {import('@junobuild/config').JunoConfig} */export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "out", predeploy: ["npm run build"] } }}); ``` ## 4\. How to deploy @@ -8859,7 +8859,7 @@ Use this guide to deploy and host your project to production. Create a `juno.config.ts` file at the root of your project, and replace the `PROD_SATELLITE_ID` with the ID of the Satellite you created earlier. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }}); ``` ## 3\. How to deploy @@ -9043,7 +9043,7 @@ To initialize the library with the Satellite ID you created, configure it in the Replace `` with the ID. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "build", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }}); ``` ### 4\. Install the Plugin (If Needed) @@ -9162,7 +9162,7 @@ export const prerender = true; Create a `juno.config.ts` file at the root of your project, and replace the `PROD_SATELLITE_ID` with the ID of the Satellite you created earlier. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "build", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "build", predeploy: ["npm run build"] } }}); ``` ## 4\. How to deploy @@ -9346,7 +9346,7 @@ To initialize the library with the Satellite ID you created, configure it in the Replace `` with the ID. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }}); ``` ### 4\. Install the Plugin (If Needed) @@ -9431,7 +9431,7 @@ Use this guide to deploy and host your project to production. Create a `juno.config.ts` file at the root of your project, and replace the `PROD_SATELLITE_ID` with the ID of the Satellite you created earlier. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }}); ``` ## 3\. How to deploy @@ -9926,7 +9926,7 @@ Add a CSP as the first `` tag of the `` in your HTML file. Configure your Satellite to send a CSP header as part of the HTTP response. Headers can be configured as specified in this [chapter](/docs/reference/configuration.md#http-headers) of the documentation. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { headers: [ { source: "**/*", headers: [["Content-Security-Policy", "REPLACE_THIS_WITH_YOUR_RULES"]] } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { headers: [ { source: "**/*", headers: [["Content-Security-Policy", "REPLACE_THIS_WITH_YOUR_RULES"]] } ] } }}); ``` # Infrastructure @@ -10808,7 +10808,7 @@ The Juno config file defines the settings and options needed for managing and de A basic config file looks like this: ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "build" }, orbiter: { ids: { production: "eeeee-fffff-ddddd-11111-cai" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "build" } }, orbiter: { ids: { production: "eeeee-fffff-ddddd-11111-cai" } }}); ``` At the top level, the Juno configuration includes two main sections: @@ -10862,7 +10862,7 @@ Juno uses this directory to locate the files that will be deployed as part of yo juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist" }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" } }}); ``` ### Ignore files @@ -10876,7 +10876,7 @@ Here is an example of how the ignore attribute can be utilized: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", ignore: ["**/*.txt", ".tmp/"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", ignore: ["**/*.txt", ".tmp/"] } }}); ``` ### Precompress @@ -10898,7 +10898,7 @@ Set the `precompress` option to `false` in your configuration: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: false }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: false } }}); ``` #### Customize the file matching pattern @@ -10908,7 +10908,7 @@ If you want to customize the default pattern `**/*.+(css|js|mjs|html)` to better juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: { pattern: "**/*.jpg" // precompress JPEG files only } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: { pattern: "**/*.jpg" // precompress JPEG files only } } }}); ``` #### Decide what happens to original files @@ -10927,7 +10927,7 @@ To avoid this, instead of providing a single precompression rule, it's recommend juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: { mode: "replace" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: { mode: "replace" } } }}); ``` #### Choose the compression algorithm @@ -10939,7 +10939,7 @@ You can switch to **Brotli** (`algorithm: "brotli"`) for potentially smaller fil juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: { algorithm: "brotli" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: { algorithm: "brotli" } } }}); ``` #### Use multiple rules @@ -10955,7 +10955,7 @@ To handle this, the precompress option also accepts an array of rules: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", precompress: [ { pattern: "**/*.+(js|mjs|css)", algorithm: "brotli", mode: "replace" }, { pattern: "**/*.html", algorithm: "brotli", mode: "both" } ] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", precompress: [ { pattern: "**/*.+(js|mjs|css)", algorithm: "brotli", mode: "replace" }, { pattern: "**/*.html", algorithm: "brotli", mode: "both" } ] } }}); ``` ### Encoding @@ -10979,7 +10979,7 @@ Here is an example of how the "encoding" attribute can be utilized: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", encoding: [["**/releases/*.gz", "identity"]] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", encoding: [["**/releases/*.gz", "identity"]] } }}); ``` ### Predeploy @@ -10993,7 +10993,7 @@ The predeploy option allows you to define a list of scripts or commands to be ex These scripts are executed sequentially in the order they are listed. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", predeploy: ["npm run build", "npm run lint"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", predeploy: ["npm run build", "npm run lint"] } }}); ``` ### Postdeploy @@ -11007,7 +11007,7 @@ The postdeploy option allows you to define a list of scripts or commands to be e Like `predeploy`, these scripts are executed sequentially in the order they are listed. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", postdeploy: ["./scripts/notify-admins.sh", "echo 'Deployment complete'"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist", postdeploy: ["./scripts/notify-admins.sh", "echo 'Deployment complete'"] } }}); ``` ### Storage @@ -11025,7 +11025,7 @@ Here's an example of the `headers` object: juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { headers: [ { source: "/", headers: [["Cache-Control", "public,max-age=0,must-revalidate"]] }, { source: "assets/fonts/*", headers: [["Cache-Control", "max-age=31536000"]] }, { source: "**/*.jpg", headers: [ ["Cache-Control", "max-age=31536000"], ["Access-Control-Allow-Origin", "*"] ] } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { headers: [ { source: "/", headers: [["Cache-Control", "public,max-age=0,must-revalidate"]] }, { source: "assets/fonts/*", headers: [["Cache-Control", "max-age=31536000"]] }, { source: "**/*.jpg", headers: [ ["Cache-Control", "max-age=31536000"], ["Access-Control-Allow-Origin", "*"] ] } ] } }}); ``` This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the headers using globs. @@ -11047,7 +11047,7 @@ Here's the basic structure for a `rewrites` attribute. juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { rewrites: [ { source: "/hello/**", destination: "/hello/world.html" } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { rewrites: [ { source: "/hello/**", destination: "/hello/world.html" } ] } }}); ``` This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the rewrites using globs. @@ -11066,7 +11066,7 @@ Here's the basic structure for a `redirects` attribute. juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { redirects: [ { source: "/hello", location: "/world/index.html", code: 301 } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { redirects: [ { source: "/hello", location: "/world/index.html", code: 301 } ] } }}); ``` The `redirects` attribute contains an array of redirect rules: @@ -11086,7 +11086,7 @@ You can customize this behavior by setting the `iframe` option to either `same-o juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { iframe: "same-origin" } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { iframe: "same-origin" } }}); ``` #### Maximum Memory Size @@ -11096,7 +11096,7 @@ You can set optional limits on heap and stable memory to control how assets are When the limit is reached, the Storage will continue to operate normally but will reject the upload of new assets. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", storage: { maxMemorySize: { stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory } } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, storage: { maxMemorySize: { stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory } } }}); ``` ### Datastore @@ -11110,7 +11110,7 @@ You can set optional limits on heap and stable memory to control how documents a When the limit is reached, the Datastore will continue to operate normally but will reject changes to documents. ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", datastore: { maxMemorySize: { stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory } } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, datastore: { maxMemorySize: { stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory } } }}); ``` ### Authentication @@ -11146,7 +11146,7 @@ You can customize this behavior by adjusting the heap memory limit in bytes. For juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", assertions: { heapMemory: 678000000 } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, assertions: { heapMemory: 678000000 } }}); ``` Alternatively, these checks can be completely disabled. To do so, set the `heapMemory` assertion to `false`: @@ -11154,7 +11154,7 @@ Alternatively, these checks can be completely disabled. To do so, set the `heapM juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", assertions: { heapMemory: false } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, assertions: { heapMemory: false } }}); ``` ### Settings @@ -11204,7 +11204,7 @@ A basic example of a custom emulator configuration: juno.config.ts ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist" }, emulator: { runner: { type: "docker", image: "junobuild/skylab:latest", name: "juno-skylab", volume: "juno", platform: "linux/amd64" }, skylab: { ports: { server: 5987, admin: 5999, console: 5866 } } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" } }, emulator: { runner: { type: "docker", image: "junobuild/skylab:latest", name: "juno-skylab", volume: "juno", platform: "linux/amd64" }, skylab: { ports: { server: 5987, admin: 5999, console: 5866 } } }}); ``` ### Runner Options @@ -11231,7 +11231,7 @@ If you're using Podman instead of Docker, you can specify it with the `type` fie juno.config.ts ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist" }, emulator: { runner: { type: "podman" }, skylab: {} }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" } }, emulator: { runner: { type: "podman" }, skylab: {} }}); ``` This will use the default image and settings, but with Podman as the container runtime. You can customize the image, volume, and other options just like you would with Docker. @@ -11267,7 +11267,7 @@ The `network` field lets you customize which well-known services of the Internet juno.config.ts ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist" }, emulator: { runner: { type: "podman" }, skylab: {}, network: { services: { registry: true, sns: true, nns_dapp: true } } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" } }, emulator: { runner: { type: "podman" }, skylab: {}, network: { services: { registry: true, sns: true, nns_dapp: true } } }}); ``` #### Available Services @@ -11306,7 +11306,7 @@ Use `datastore` field to define the collection of your Datastore. juno.config.ts ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", collections: { datastore: [ { collection: "tasks", memory: "stable", read: "managed", write: "managed" }, { collection: "announcements", memory: "stable", read: "public", write: "controllers" } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, collections: { datastore: [ { collection: "tasks", memory: "stable", read: "managed", write: "managed" }, { collection: "announcements", memory: "stable", read: "public", write: "controllers" } ] } }}); ``` #### Fields @@ -11332,7 +11332,7 @@ Use the `storage` field to define the collection of your Storage. juno.config.ts ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, source: "dist", collections: { storage: [ { collection: "images", memory: "stable", read: "managed", write: "managed" }, { collection: "files", memory: "stable", read: "public", write: "managed" } ] } }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, hosting: { source: "dist" }, collections: { storage: [ { collection: "images", memory: "stable", read: "managed", write: "managed" }, { collection: "files", memory: "stable", read: "public", write: "managed" } ] } }}); ``` #### Fields @@ -11404,7 +11404,7 @@ You might want to deploy or manage a project across different environments, such juno.config.js ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "xxxxx-zzzzz-wwwww-77777-cai", staging: "11111-22222-33333-44444-cai", production: "aaaaa-bbbbb-ccccc-ddddd-cai" }, source: "dist" }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "xxxxx-zzzzz-wwwww-77777-cai", staging: "11111-22222-33333-44444-cai", production: "aaaaa-bbbbb-ccccc-ddddd-cai" }, hosting: { source: "dist" } }}); ``` **Note:** @@ -11787,7 +11787,7 @@ Make also sure to set the `runner` type to match your container runtime, and def juno.config.ts ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "jx5yt-yyaaa-aaaal-abzbq-cai", production: "" }, source: "dist", predeploy: ["npm run build"] }, emulator: { runner: { type: "docker" }, satellite: {} }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "jx5yt-yyaaa-aaaal-abzbq-cai", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }, emulator: { runner: { type: "docker" }, satellite: {} }}); ``` For more advanced options like customizing ports, image name, or CI setup, see the [Emulator Configuration](/docs/reference/configuration.md#emulator-configuration) section. @@ -11818,7 +11818,7 @@ You can specify this ID under the `development` key in your Juno Config file: juno.config.ts ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist", predeploy: ["npm run build"] }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist", predeploy: ["npm run build"] } }}); ``` For more advanced options like customizing ports, image name, or CI setup, see the [Emulator Configuration](/docs/reference/configuration.md#emulator-configuration) section. @@ -14118,7 +14118,7 @@ To resolve this issue, make sure your SDK is correctly configured by following t When you scaffold an app with a template, the `juno.config` file includes placeholder values for the Satellite IDs: ``` -import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, source: "dist" }}); +import { defineConfig } from "@junobuild/config";export default defineConfig({ satellite: { ids: { development: "", production: "" }, hosting: { source: "dist" } }}); ``` If you start your frontend development server without replacing these placeholders, you may encounter an error like: `Invalid character: "<"` while running your app in the browser. diff --git a/docs/build/analytics/setup.mdx b/docs/build/analytics/setup.mdx index 55f3f0a5..553fb1ed 100644 --- a/docs/build/analytics/setup.mdx +++ b/docs/build/analytics/setup.mdx @@ -59,7 +59,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist" + hosting: { + source: "dist" + } }, orbiter: { ids: { @@ -240,7 +242,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist" + hosting: { + source: "dist" + } }, orbiter: { ids: { diff --git a/docs/build/authentication/github.mdx b/docs/build/authentication/github.mdx index e114c5c4..98aad85f 100644 --- a/docs/build/authentication/github.mdx +++ b/docs/build/authentication/github.mdx @@ -70,7 +70,9 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", + hosting: { + source: "dist" + }, authentication: { github: { clientId: "your-github-client-id" diff --git a/docs/build/authentication/google.mdx b/docs/build/authentication/google.mdx index f0767967..070a2f05 100644 --- a/docs/build/authentication/google.mdx +++ b/docs/build/authentication/google.mdx @@ -75,7 +75,9 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", + hosting: { + source: "dist" + }, authentication: { google: { clientId: "1234567890-abcde12345fghijklmno.apps.googleusercontent.com" diff --git a/docs/build/components/assertions.mdx b/docs/build/components/assertions.mdx index bab0804f..9d1bc1d1 100644 --- a/docs/build/components/assertions.mdx +++ b/docs/build/components/assertions.mdx @@ -10,7 +10,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, assertions: { heapMemory: 678000000 } @@ -28,7 +30,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, assertions: { heapMemory: false } diff --git a/docs/build/components/encoding.mdx b/docs/build/components/encoding.mdx index c4b120c0..13cb93e8 100644 --- a/docs/build/components/encoding.mdx +++ b/docs/build/components/encoding.mdx @@ -22,8 +22,10 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - encoding: [["**/releases/*.gz", "identity"]] + hosting: { + source: "dist", + encoding: [["**/releases/*.gz", "identity"]] + } } }); ``` diff --git a/docs/build/components/http-headers.mdx b/docs/build/components/http-headers.mdx index 66746f26..6e11a04e 100644 --- a/docs/build/components/http-headers.mdx +++ b/docs/build/components/http-headers.mdx @@ -12,7 +12,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, storage: { headers: [ { diff --git a/docs/build/components/iframe.mdx b/docs/build/components/iframe.mdx index 29cf3580..aa6aecc6 100644 --- a/docs/build/components/iframe.mdx +++ b/docs/build/components/iframe.mdx @@ -10,7 +10,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, storage: { iframe: "same-origin" } diff --git a/docs/build/components/ignore-files.mdx b/docs/build/components/ignore-files.mdx index 4fdad173..23a9fc16 100644 --- a/docs/build/components/ignore-files.mdx +++ b/docs/build/components/ignore-files.mdx @@ -12,8 +12,10 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - ignore: ["**/*.txt", ".tmp/"] + hosting: { + source: "dist", + ignore: ["**/*.txt", ".tmp/"] + } } }); ``` diff --git a/docs/build/components/precompress.mdx b/docs/build/components/precompress.mdx index 512dabf6..9bf0f23a 100644 --- a/docs/build/components/precompress.mdx +++ b/docs/build/components/precompress.mdx @@ -22,8 +22,10 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - precompress: false + hosting: { + source: "dist", + precompress: false + } } }); ``` @@ -40,9 +42,11 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - precompress: { - pattern: "**/*.jpg" // precompress JPEG files only + hosting: { + source: "dist", + precompress: { + pattern: "**/*.jpg" // precompress JPEG files only + } } } }); @@ -71,9 +75,11 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - precompress: { - mode: "replace" + hosting: { + source: "dist", + precompress: { + mode: "replace" + } } } }); @@ -93,9 +99,11 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - precompress: { - algorithm: "brotli" + hosting: { + source: "dist", + precompress: { + algorithm: "brotli" + } } } }); @@ -121,19 +129,21 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - precompress: [ - { - pattern: "**/*.+(js|mjs|css)", - algorithm: "brotli", - mode: "replace" - }, - { - pattern: "**/*.html", - algorithm: "brotli", - mode: "both" - } - ] + hosting: { + source: "dist", + precompress: [ + { + pattern: "**/*.+(js|mjs|css)", + algorithm: "brotli", + mode: "replace" + }, + { + pattern: "**/*.html", + algorithm: "brotli", + mode: "both" + } + ] + } } }); ``` diff --git a/docs/build/components/redirects.mdx b/docs/build/components/redirects.mdx index b8318a76..5c45b36c 100644 --- a/docs/build/components/redirects.mdx +++ b/docs/build/components/redirects.mdx @@ -10,7 +10,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, storage: { redirects: [ { diff --git a/docs/build/components/rewrites.mdx b/docs/build/components/rewrites.mdx index 1983d893..10002f94 100644 --- a/docs/build/components/rewrites.mdx +++ b/docs/build/components/rewrites.mdx @@ -10,7 +10,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, storage: { rewrites: [ { diff --git a/docs/build/components/source.mdx b/docs/build/components/source.mdx index be4c83d7..7a1d3706 100644 --- a/docs/build/components/source.mdx +++ b/docs/build/components/source.mdx @@ -14,7 +14,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist" + hosting: { + source: "dist" + } } }); ``` diff --git a/docs/guides/angular/build.mdx b/docs/guides/angular/build.mdx index 129e5b25..34aee287 100644 --- a/docs/guides/angular/build.mdx +++ b/docs/guides/angular/build.mdx @@ -71,8 +71,10 @@ export default defineConfig({ development: "", production: "" }, - source: "out", - predeploy: ["npm run build"] + hosting: { + source: "out", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/angular/deploy.mdx b/docs/guides/angular/deploy.mdx index 0147b587..dc7594b5 100644 --- a/docs/guides/angular/deploy.mdx +++ b/docs/guides/angular/deploy.mdx @@ -30,8 +30,10 @@ export default defineConfig({ development: "", production: "" }, - source: "dist//browser", - predeploy: ["npm run build"] + hosting: { + source: "dist//browser", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/astro/build.mdx b/docs/guides/astro/build.mdx index e696a42c..a394eedf 100644 --- a/docs/guides/astro/build.mdx +++ b/docs/guides/astro/build.mdx @@ -62,8 +62,10 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/astro/deploy.mdx b/docs/guides/astro/deploy.mdx index 426eef39..d5cc1bcf 100644 --- a/docs/guides/astro/deploy.mdx +++ b/docs/guides/astro/deploy.mdx @@ -30,8 +30,10 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/docusaurus/deploy.mdx b/docs/guides/docusaurus/deploy.mdx index 8c62d0ae..413f4cae 100644 --- a/docs/guides/docusaurus/deploy.mdx +++ b/docs/guides/docusaurus/deploy.mdx @@ -30,8 +30,10 @@ export default defineConfig({ development: "", production: "" }, - source: "build", - predeploy: ["npm run build"] + hosting: { + source: "build", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/e2e.md b/docs/guides/e2e.md index 528ddfdb..0c6bbc51 100644 --- a/docs/guides/e2e.md +++ b/docs/guides/e2e.md @@ -71,7 +71,9 @@ export default defineConfig({ development: "jx5yt-yyaaa-aaaal-abzbq-cai", production: "" }, - source: "out", + hosting: { + source: "out" + }, collections: { datastore: [ { diff --git a/docs/guides/github-actions/index.mdx b/docs/guides/github-actions/index.mdx index 9de32dfe..69a83f3f 100644 --- a/docs/guides/github-actions/index.mdx +++ b/docs/guides/github-actions/index.mdx @@ -52,8 +52,10 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" // Replace with your satellite ID }, - source: "dist", // Replace with your build output directory - predeploy: ["npm run build"] // Adjust based on your package manager + hosting: { + source: "dist", // Replace with your build output directory + predeploy: ["npm run build"] // Adjust based on your package manager + } } }); ``` diff --git a/docs/guides/nextjs/build.mdx b/docs/guides/nextjs/build.mdx index cccc0c9d..f57691ed 100644 --- a/docs/guides/nextjs/build.mdx +++ b/docs/guides/nextjs/build.mdx @@ -71,8 +71,10 @@ export default defineConfig({ development: "", production: "" }, - source: "out", - predeploy: ["npm run build"] + hosting: { + source: "out", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/nextjs/deploy.mdx b/docs/guides/nextjs/deploy.mdx index 7a8baac8..c90a7cf7 100644 --- a/docs/guides/nextjs/deploy.mdx +++ b/docs/guides/nextjs/deploy.mdx @@ -53,8 +53,10 @@ export default defineConfig({ development: "", production: "" }, - source: "out", - predeploy: ["npm run build"] + hosting: { + source: "out", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/react/deploy.mdx b/docs/guides/react/deploy.mdx index be0a8a80..50f97c3f 100644 --- a/docs/guides/react/deploy.mdx +++ b/docs/guides/react/deploy.mdx @@ -29,8 +29,10 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/sveltekit/build.mdx b/docs/guides/sveltekit/build.mdx index 311088cb..e55d2c87 100644 --- a/docs/guides/sveltekit/build.mdx +++ b/docs/guides/sveltekit/build.mdx @@ -70,8 +70,10 @@ export default defineConfig({ development: "", production: "" }, - source: "build", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/sveltekit/deploy.mdx b/docs/guides/sveltekit/deploy.mdx index 4fda0dc5..27aef955 100644 --- a/docs/guides/sveltekit/deploy.mdx +++ b/docs/guides/sveltekit/deploy.mdx @@ -63,8 +63,10 @@ export default defineConfig({ development: "", production: "" }, - source: "build", - predeploy: ["npm run build"] + hosting: { + source: "build", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/vue/build.mdx b/docs/guides/vue/build.mdx index b717fe6e..e02a05ff 100644 --- a/docs/guides/vue/build.mdx +++ b/docs/guides/vue/build.mdx @@ -69,8 +69,10 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/guides/vue/deploy.mdx b/docs/guides/vue/deploy.mdx index 1bdbc700..9f51ed71 100644 --- a/docs/guides/vue/deploy.mdx +++ b/docs/guides/vue/deploy.mdx @@ -29,8 +29,10 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/miscellaneous/best-practices.md b/docs/miscellaneous/best-practices.md index e104aaea..8bd4e293 100644 --- a/docs/miscellaneous/best-practices.md +++ b/docs/miscellaneous/best-practices.md @@ -41,7 +41,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, storage: { headers: [ { diff --git a/docs/reference/configuration.mdx b/docs/reference/configuration.mdx index fc3d2f51..b89afaee 100644 --- a/docs/reference/configuration.mdx +++ b/docs/reference/configuration.mdx @@ -19,7 +19,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "build" + hosting: { + source: "build" + } }, orbiter: { ids: { @@ -103,8 +105,10 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - predeploy: ["npm run build", "npm run lint"] + hosting: { + source: "dist", + predeploy: ["npm run build", "npm run lint"] + } } }); ``` @@ -127,8 +131,10 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", - postdeploy: ["./scripts/notify-admins.sh", "echo 'Deployment complete'"] + hosting: { + source: "dist", + postdeploy: ["./scripts/notify-admins.sh", "echo 'Deployment complete'"] + } } }); ``` @@ -175,7 +181,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, storage: { maxMemorySize: { stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory @@ -203,7 +211,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, datastore: { maxMemorySize: { stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory @@ -334,7 +344,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist" + hosting: { + source: "dist" + } }, emulator: { runner: { @@ -386,7 +398,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist" + hosting: { + source: "dist" + } }, emulator: { runner: { @@ -437,7 +451,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist" + hosting: { + source: "dist" + } }, emulator: { runner: { @@ -496,7 +512,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, collections: { datastore: [ { @@ -545,7 +563,9 @@ export default defineConfig({ ids: { production: "qsgjb-riaaa-aaaaa-aaaga-cai" }, - source: "dist", + hosting: { + source: "dist" + }, collections: { storage: [ { @@ -656,7 +676,9 @@ export default defineConfig({ staging: "11111-22222-33333-44444-cai", production: "aaaaa-bbbbb-ccccc-ddddd-cai" }, - source: "dist" + hosting: { + source: "dist" + } } }); ``` diff --git a/docs/reference/emulator/satellite.md b/docs/reference/emulator/satellite.md index 9035c2e4..0dd324ee 100644 --- a/docs/reference/emulator/satellite.md +++ b/docs/reference/emulator/satellite.md @@ -19,8 +19,10 @@ export default defineConfig({ development: "jx5yt-yyaaa-aaaal-abzbq-cai", production: "" }, - source: "dist", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } }, emulator: { runner: { diff --git a/docs/reference/emulator/skylab.md b/docs/reference/emulator/skylab.md index 02733313..4a609e48 100644 --- a/docs/reference/emulator/skylab.md +++ b/docs/reference/emulator/skylab.md @@ -30,8 +30,10 @@ export default defineConfig({ development: "", production: "" }, - source: "dist", - predeploy: ["npm run build"] + hosting: { + source: "dist", + predeploy: ["npm run build"] + } } }); ``` diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 1a6a8efe..c873d5df 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -78,7 +78,9 @@ export default defineConfig({ development: "", production: "" }, - source: "dist" + hosting: { + source: "dist" + } } }); ```