diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 265519cc2b..f5a0879fad 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -50,3 +50,8 @@ updates: minor-and-patch: patterns: ["*"] update-types: ["minor", "patch"] + ignore: + - dependency-name: "remark-directive" + versions: [">=4"] + - dependency-name: "eslint-plugin-mdx" + versions: [">=3.9"] diff --git a/.github/workflows/ci-gate.yml b/.github/workflows/ci-gate.yml index 28841059c1..6642f36dd9 100644 --- a/.github/workflows/ci-gate.yml +++ b/.github/workflows/ci-gate.yml @@ -83,7 +83,7 @@ jobs: run: pnpm ci:ratchet audit - name: Secret detection - uses: trufflesecurity/trufflehog@c85580b712841eda4c53bc28fc6ace6100e8c16c # main + uses: trufflesecurity/trufflehog@ea68ca03c865c5f324e86e849ced20ed3cf9dbbb # main with: path: ./ base: ${{ github.event.pull_request.base.sha }} @@ -138,7 +138,7 @@ jobs: - name: Prettier (changed files) if: ${{ always() && steps.diff.outcome == 'success' && steps.diff.outputs.fmt != '0' }} - run: tr '\n' '\0' < changed-fmt.txt | xargs -0 pnpm exec prettier --check --plugin-search-dir=. + run: tr '\n' '\0' < changed-fmt.txt | xargs -0 pnpm exec prettier --check - name: Stylelint (changed files) if: ${{ always() && steps.diff.outcome == 'success' && steps.diff.outputs.style != '0' }} diff --git a/.prettierrc b/.prettierrc index 34b2ca2821..3934c460fe 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,6 +5,7 @@ "tabWidth": 2, "trailingComma": "es5", "useTabs": true, + "plugins": ["prettier-plugin-astro"], "overrides": [ { "files": [".*", "*.json", "*.md", "*.mdx", "*.toml", "*.yml"], diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 75149ca2c4..87130ac0c4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - "apps/docs": "2.4.2" + "apps/docs": "2.4.4" } diff --git a/apps/docs/CHANGELOG.md b/apps/docs/CHANGELOG.md index 9ca4ee4897..4e430add13 100644 --- a/apps/docs/CHANGELOG.md +++ b/apps/docs/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.4.4](https://github.com/aziontech/docs/compare/docs-v2.4.3...docs-v2.4.4) (2026-11-10) + + +### Bug Fixes + +* **applications:** apply live test results and define each resource by its role ([#2626](https://github.com/aziontech/docs/issues/2626)) ([1f841e4](https://github.com/aziontech/docs/commit/1f841e408508ef9bf9f5be03f32d17416477199e)) + +## [2.4.3](https://github.com/aziontech/docs/compare/docs-v2.4.2...docs-v2.4.3) (2026-11-09) + + +### Documentation + +* **applications:** review the Applications section and apply the updated writing rules ([#2615](https://github.com/aziontech/docs/issues/2615)) ([c1df92f](https://github.com/aziontech/docs/commit/c1df92f2885e5a4a17ded9eb44186a12203ebf35)) + ## [2.4.2](https://github.com/aziontech/docs/compare/docs-v2.4.1...docs-v2.4.2) (2026-11-09) diff --git a/apps/docs/package.json b/apps/docs/package.json index 4e6a9b8eda..fd207afc2a 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,7 +1,7 @@ { "name": "docs", "type": "module", - "version": "2.4.2", + "version": "2.4.4", "private": true, "scripts": { "consts:local": "test -f ./src/consts.ts || cp ./env/consts.localhost.ts ./src/consts.ts", @@ -42,69 +42,69 @@ }, "dependencies": { "@astrojs/vue": "^7.1.2", - "@aziontech/icons": "^4.2.0", - "@aziontech/theme": "5.2.0", + "@aziontech/icons": "^4.4.0", + "@aziontech/theme": "5.2.2", "@aziontech/webkit": "5.3.0", - "@babel/types": "^8.0.6", - "@tailwindcss/vite": "^4.3.3", + "@babel/types": "^8.1.0", + "@tailwindcss/vite": "^4.3.5", "github-slugger": "^2.0.0", "gray-matter": "^4.0.3", "hast-util-has-property": "^3.0.0", "hast-util-heading-rank": "^3.0.0", - "mermaid": "^12.2.0", + "mermaid": "^12.3.0", "nanostores": "^0.10.3", "rehype-autolink-headings": "^7.1.0", - "remark-smartypants": "^2.0.0", + "remark-smartypants": "^3.0.2", "sharp": "^0.35.5", - "tailwindcss": "^4.3.3", - "vue": "^3.5.44" + "tailwindcss": "^4.3.5", + "vue": "^3.5.45" }, "devDependencies": { "@actions/core": "^3.0.1", "@astrojs/check": "^0.9.12", - "@astrojs/markdown-remark": "^7.3.4", - "@astrojs/mdx": "^7.0.5", + "@astrojs/markdown-remark": "^7.3.6", + "@astrojs/mdx": "^8.1.3", "@astrojs/sitemap": "3.7.4", "@tailwindcss/typography": "^0.5.20", - "@types/hast": "^2.3.4", + "@types/hast": "^3.0.5", "@types/html-escaper": "^3.0.0", - "@types/mdast": "^3.0.10", - "@types/node": "^18.6.4", + "@types/mdast": "^4.0.4", + "@types/node": "^26.6.6", "algoliasearch": "^4.22.1", - "astro": "^7.3.8", + "astro": "^7.4.7", "astro-auto-import": "^0.6.0", "bcp-47-normalize": "^2.1.0", - "cssnano": "^6.0.3", + "cssnano": "^9.9.0", "dedent-js": "^1.0.1", - "domhandler": "^4.3.1", + "domhandler": "^6.0.1", "fast-glob": "^3.2.11", - "hast-util-to-html": "^8.0.4", + "hast-util-to-html": "^9.0.6", "hast-util-to-string": "^3.0.1", - "hastscript": "^7.0.2", + "hastscript": "^9.0.3", "html-escaper": "^3.0.3", - "htmlparser2": "^7.2.0", + "htmlparser2": "^12.0.0", "kleur": "^4.1.5", - "mdast-util-mdx-jsx": "^2.1.2", - "mdast-util-to-string": "^3.1.1", + "mdast-util-mdx-jsx": "^3.2.1", + "mdast-util-to-string": "^4.0.0", "node-fetch": "^3.2.10", "organize-imports-cli": "^1.0.2", - "p-retry": "^5.1.1", - "postcss": "^8.5.31", + "p-retry": "^9.0.0", + "postcss": "^8.5.32", "prompts": "^2.4.2", - "remark": "^14.0.2", - "remark-directive": "^2.0.1", - "remark-gfm": "^3.0.1", - "remark-mdx": "^2.3.0", + "remark": "^15.0.1", + "remark-directive": "^3.0.1", + "remark-gfm": "^4.0.1", + "remark-mdx": "^3.1.1", "simple-git": "^4.0.2", - "stream-json": "^3.7.0", + "stream-json": "^3.8.0", "tsm": "^2.3.0", "tsx": "^4.23.15", - "typescript": "^5.3.2", - "unified": "^10.1.2", + "typescript": "^6.0.3", + "unified": "^11.0.5", "unist-util-remove": "^4.0.0", - "unist-util-visit": "^5.1.0", + "unist-util-visit": "^5.2.0", "unist-util-walker": "^1.0.0", - "vfile": "^5.3.6", - "vitest": "^5.0.5" + "vfile": "^6.0.3", + "vitest": "^5.1.0" } } diff --git a/apps/docs/plugins/rehype-doc-table.ts b/apps/docs/plugins/rehype-doc-table.ts index ed88b83979..388deb5071 100644 --- a/apps/docs/plugins/rehype-doc-table.ts +++ b/apps/docs/plugins/rehype-doc-table.ts @@ -21,7 +21,7 @@ const NOWRAP_CODE_MAX = 48; const unbreakable = (value: string) => value.length <= NOWRAP_CODE_MAX && !/\s/.test(value); const addClass = (node: Element, className: string) => { - node.properties = { ...node.properties, className }; + node.properties = { ...node.properties, className: [className] }; }; /* @@ -37,7 +37,7 @@ const addCellClass = (cell: Element, baseClass: string) => { ? baseClass.replace('text-start', align === 'center' ? 'text-center' : 'text-end') : baseClass; const rest = inline.replace(/text-align:\s*[a-z]+;?\s*/, '').trim(); - cell.properties = { ...cell.properties, className }; + cell.properties = { ...cell.properties, className: [className] }; delete cell.properties.align; if (rest) cell.properties.style = rest; else delete cell.properties.style; @@ -96,7 +96,7 @@ export default function rehypeDocTable() { parent.children[index] = { type: 'element', tagName: 'div', - properties: { 'data-doc-block': '', className: 'w-full overflow-x-auto' }, + properties: { 'data-doc-block': '', className: ['w-full', 'overflow-x-auto'] }, children: [node], position: node.position, }; diff --git a/apps/docs/plugins/rehype-optimize-static.ts b/apps/docs/plugins/rehype-optimize-static.ts index 40b227dfd2..914769b337 100644 --- a/apps/docs/plugins/rehype-optimize-static.ts +++ b/apps/docs/plugins/rehype-optimize-static.ts @@ -17,7 +17,7 @@ export function rehypeOptimizeStatic(): Transformer { const allPossibleElements = new Set(); const elementStack: Node[] = []; - walk(tree, { + walk(tree as Node, { enter(node) { // @ts-expect-error test tagName naively const isHeading = node.tagName && headingRe.test(node.tagName); diff --git a/apps/docs/scripts/lib/linkcheck/base/page.ts b/apps/docs/scripts/lib/linkcheck/base/page.ts index 698fdd0987..a8fdd94f20 100644 --- a/apps/docs/scripts/lib/linkcheck/base/page.ts +++ b/apps/docs/scripts/lib/linkcheck/base/page.ts @@ -1,5 +1,5 @@ -import type { Document, Element } from 'domhandler'; -import htmlparser2 from 'htmlparser2'; +import { isTag, type Document, type Element } from 'domhandler'; +import * as htmlparser2 from 'htmlparser2'; export interface AllPagesByPathname { [key: string]: HtmlPage; @@ -91,7 +91,8 @@ export class HtmlPage { let el: Element | null = start; while (el) { if (test(el)) return el; - el = htmlparser2.DomUtils.getParent(el); + const parent = htmlparser2.DomUtils.getParent(el); + el = parent && isTag(parent) ? parent : null; } return null; } diff --git a/apps/docs/src/content/docs/en/pages/architectures/edge-application/application-acceleration.mdx b/apps/docs/src/content/docs/en/pages/architectures/edge-application/application-acceleration.mdx index 0af47dc5ab..da0540b206 100644 --- a/apps/docs/src/content/docs/en/pages/architectures/edge-application/application-acceleration.mdx +++ b/apps/docs/src/content/docs/en/pages/architectures/edge-application/application-acceleration.mdx @@ -11,7 +11,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -This design serves teams whose API responses are personalized or transactional and cannot be cached. The application bypasses the cache on those paths, so every call reaches the origin through a connector. Application Accelerator unlocks that bypass and the `OPTIONS`, `POST`, `PUT`, `PATCH`, and `DELETE` methods an API needs. The cacheable paths of the same site keep their cache rules. The design implements the use case [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/). +This design serves teams whose API responses are personalized or transactional and cannot be cached. The application bypasses the cache on those paths, so every call reaches the origin through a connector. Application Accelerator unlocks that bypass. The cacheable paths of the same site keep their cache rules. The design implements the use case [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/). ## Architecture diagram @@ -43,7 +43,7 @@ flowchart TD 1. A client sends a request to the domain of a workload, and the workload's deployment names the application. 2. The application runs its Request Phase rules in order. A rule that matches a dynamic path, such as `/api/`, carries the **Bypass Cache** behavior. 3. **Bypass Cache** sends the request to the origin through the connector that a **Set Connector** rule names, and Azion stores no copy of the response. A response to a request sent with `Pragma: azion-debug-cache` reports `BYPASS` in its `x-cache` header. -4. The connector reaches the origin with the protocol its settings decide. Where possible, the bypassed request travels on a keep-alive connection to the origin. +4. The connector reaches the origin with the protocol its settings decide. 5. A request on a cacheable path takes the cache setting that a **Set Cache Policy** rule applies. Cache answers from a valid copy, and a miss reaches the origin through the same connector. 6. Real-Time Metrics records every request to the domain. On a dynamic path, the request time always includes the time the origin takes to answer. @@ -51,10 +51,10 @@ Every response returns through the application, which delivers it to the client. ## Components -- **application**: the Platform Resource that holds the per-path rules. A Request Phase rule with **Bypass Cache** matches each dynamic path, and **Set Cache Policy** rules apply cache settings to the other paths. A **Max Age** of `0` does not replace the bypass. It merges parallel requests for one object into one origin request, so two simultaneous callers receive the same answer. -- **Application Accelerator**: the Product that lets the application accept `OPTIONS`, `POST`, `PUT`, `PATCH`, and `DELETE`, beyond the `GET` and `HEAD` it accepts natively. It also unlocks **Bypass Cache**. A request that **Bypass Cache** sends to the origin keeps protocol optimizations and, where possible, a keep-alive connection to it. Its switch belongs to the application and is off on a new one. +- **application**: the Platform Resource that holds the per-path rules. A Request Phase rule with **Bypass Cache** matches each dynamic path, and **Set Cache Policy** rules apply cache settings to the other paths. +- **Application Accelerator**: the Platform Resource that unlocks **Bypass Cache** and makes `POST` and `OPTIONS` responses cacheable. Its switch belongs to the application and is off on a new one. - **connector**: the Platform Resource that carries the origin's address and shapes each request to it, for every dynamic request and every cache miss. Its **Transport Protocol Policy** sets the protocol to the origin: forcing HTTPS protects that leg and costs a TLS handshake on every new connection. Without Load Balancer, the connection's timeouts follow platform defaults and are not settings. -- **Cache**: stores the responses of the paths that stay cacheable, under the cache setting each path's rule applies. **Bypass Cache** does not reach the Tiered Cache layer. An application whose cache settings have Tiered Cache on keeps caching objects there for the minimum TTL. +- **Cache**: stores the responses of the paths that stay cacheable, under the cache setting each path's rule applies. **Bypass Cache** does not reach the Tiered Cache layer. An application whose cache settings have Tiered Cache on keeps caching objects there for the Max Age of the cache setting. - **Real-Time Metrics**: shows how long the application takes to answer a request, filtered to the domain. The **Requests** dashboard charts **Average Request Time**, and a filter on **Upstream Cache Status** set to `BYPASS` keeps only the bypassed requests. In the GraphQL API, the `upstreamResponseTime` field of [`workloadMetrics`](/en/documentation/devtools/graphql/gql-real-time-metrics-fields/#workloadmetrics) sums the time Azion takes to receive the origin's responses. ## Implementation diff --git a/apps/docs/src/content/docs/en/pages/architectures/edge-application/content-delivery.mdx b/apps/docs/src/content/docs/en/pages/architectures/edge-application/content-delivery.mdx index 9fd99b5e16..29d23f92fc 100644 --- a/apps/docs/src/content/docs/en/pages/architectures/edge-application/content-delivery.mdx +++ b/apps/docs/src/content/docs/en/pages/architectures/edge-application/content-delivery.mdx @@ -51,7 +51,7 @@ flowchart TD 1. Edge DNS resolves the domain to the workload, and the user's request reaches the application in a nearby data center. 2. The application's rules read the path in the Request Phase and apply a cache setting. A valid copy in the cache of that data center answers the request, and the origin is not asked. -3. On a miss for a static file, the data center asks the Tiered Cache layer, which every data center shares, before it asks the origin. +3. On a miss for a static file, the data center asks the Tiered Cache layer, in the region that the topology of the cache setting selects, before it asks the origin. 4. A miss in every layer reaches the origin through the connector, and the response is stored for the next request. A call on a bypassed path, such as `/api/`, always reaches the origin, and its response is never stored. 5. The connector reaches the origin from an address on the `Azion Origin Shield` list, and the firewall of the origin refuses every other source. 6. When content changes, a cache key purge removes it from the Tiered Cache layer first and from Cache second. The next request then fetches the new version from the origin. @@ -63,7 +63,7 @@ Every response returns through the application, which delivers it to the user. T - **Edge DNS**: resolves the domain to the workload. A subdomain points at the workload domain with a `CNAME` record, and the apex points at it with an `ANAME` record. - **application**: the Platform Resource that holds the cache rules. Each rule matches a set of paths and applies a cache setting. A rule with the **Bypass Cache** behavior keeps a path out of the cache, and that behavior requires Application Accelerator on the application. - **Cache**: stores each response in the data center that fetched it, for the TTL of its cache setting, and answers repeated requests from that copy. The cache key is the scheme, the host, and the path, plus the variations a cache setting adds. A request that carries `Pragma: azion-debug-cache` receives the key in the `x-cache-key` header. For static files, the design keeps the TTL at 15 days (`1296000` seconds) or less, the default maximum of the [Static Cache template](/en/documentation/guides/application-development/frameworks/static-cache-template/). -- **Tiered Cache**: the Feature that adds a second cache layer between Cache and the origin, shared by every data center, in the region its topology names. It requires _Override cache behavior_ and a **Max Age** of at least 3 seconds. +- **Tiered Cache**: the Feature that adds a second cache layer between Cache and the origin, in the region its topology names. It requires _Override cache behavior_ and, with Application Accelerator on, a **Max Age** of at least 3 seconds. - **connector**: the Platform Resource that reaches the origin on a miss in every cache layer, and on every call to a bypassed path. - **Origin Shield**: with Origin IP ACL on the connector, the origin's firewall allows the prefixes of the `Azion Origin Shield` list and refuses every other source. Azion does not enforce the allowlist, and the list carries IPv4 and IPv6 prefixes that the allowlist needs together. - **Real-Time Purge**: the Platform Resource that removes changed content before its TTL ends. A cache key purge takes up to 50 keys per request, and it is the only purge type that reaches the Tiered Cache layer. diff --git a/apps/docs/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx b/apps/docs/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx index 33b9c31c22..f29cb9243f 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx @@ -506,7 +506,7 @@ Request the same URL twice with the `Pragma: azion-debug-cache` header: curl -sI -H "Accept: image/webp" -H "Pragma: azion-debug-cache" "https://www.example.com/images/blue-shirt.jpg?ims=fit-in/800x800/filters:quality(85)" ``` -The second response carries `x-cache: HIT`, and `x-cache-key` ends with the `ims` value and `@@webp`, the format the variant was converted to. The `400x400` URL, requested with the same headers, has a different `x-cache-key`, and its first response carries `x-cache: MISS`. The `800x800` URL requested with `-H "Accept: image/jpeg"` and the `Pragma: azion-debug-cache` header carries the original format in `content-type`, and its `x-cache-key` carries no `@@webp`. For how to read the debug headers, refer to [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). +The second response carries `x-cache: HIT`, and `x-cache-key` ends with the `ims` value followed by `webp`, the format the variant was converted to. The `400x400` URL, requested with the same headers, has a different `x-cache-key`, and its first response carries `x-cache: MISS`. The `800x800` URL requested with `-H "Accept: image/jpeg"` and the `Pragma: azion-debug-cache` header carries the original format in `content-type`, and its `x-cache-key` carries no `webp` at the end. For how to read the debug headers, refer to [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). In the [Build and run marketing websites](/en/documentation/use-cases/build-and-run-applications/build-and-run-marketing-websites/) use case, expect: @@ -516,7 +516,10 @@ In the [Build e-commerce storefronts](/en/documentation/use-cases/build-and-run- - **Product images are processed.** An image requested with an `ims` query string, such as `https://www.example.com/media/blue-shirt.jpg?ims=400x`, carries `x-ims: Enabled`. -These checks confirm the [Optimize images for websites and mobile apps](/en/documentation/use-cases/improve-performance-and-reliability/optimize-images-for-websites-and-mobile-apps/) use case. +In the [Optimize images for websites and mobile apps](/en/documentation/use-cases/improve-performance-and-reliability/optimize-images-for-websites-and-mobile-apps/) use case, expect: + +- **Each variant is converted to a format the browser accepts.** A request with `Accept: image/webp` carries `x-ims: Enabled` and `content-type: image/webp`. +- **Each size is cached on its own.** The second request for the `800x800` URL carries `x-cache: HIT`, and the `400x400` URL has a different `x-cache-key`. --- diff --git a/apps/docs/src/content/docs/en/pages/build-journey/build-with-edge-app/build-with-edge-apps.mdx b/apps/docs/src/content/docs/en/pages/build-journey/build-with-edge-app/build-with-edge-apps.mdx index 6f93b47538..76318ca765 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/build-with-edge-app/build-with-edge-apps.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/build-with-edge-app/build-with-edge-apps.mdx @@ -65,7 +65,7 @@ An application. To create one, refer to [Applications quickstart](/en/documentat ## Enable a Product on the application -A new application runs Cache and Functions. Application Accelerator and Image Processor stay off until you enable them. Azion Console labels Cache "Automatically enabled in all accounts." +A new application runs Cache and Functions. Application Accelerator and Image Processor stay off until you enable them. Azion Console labels Cache "Automatically enabled in all accounts." Cache cannot be turned off: the API refuses `modules.cache.enabled` set to `false` with error `31001`, `Cache Cannot Be False`. Each Product changes what the rules and settings of the application can do: diff --git a/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-astro.mdx b/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-astro.mdx index 5dad394a20..2f069fdd4e 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-astro.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-astro.mdx @@ -362,7 +362,9 @@ The deploy returns the URL of the site's Azion domain, in the form `https://xxxx The first deploy can take several minutes to answer from every location; later deploys take about two minutes. Until a location receives the site, the domain answers with a `404` page that reads `There's nothing here yet`. On that response, wait and request the URL again. -These checks confirm the [Build and run marketing websites](/en/documentation/use-cases/build-and-run-applications/build-and-run-marketing-websites/) use case. +In the [Build and run marketing websites](/en/documentation/use-cases/build-and-run-applications/build-and-run-marketing-websites/) use case, expect: + +- **The site answers on its Azion domain.** The URL the deploy returns, in the form `https://xxxxxxxxxx.map.azionedge.net`, opens the Astro site in a browser. --- diff --git a/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-react.mdx b/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-react.mdx index ed05b8a809..164893e5a0 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-react.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/develop-with-azion/frameworks/framework-react.mdx @@ -325,7 +325,9 @@ Every route returns the URL of the app's Azion domain, in the form `https://xxxx The first deploy can take several minutes to answer from every location; later deploys take about two minutes. Until a location receives the app, the domain answers with a `404` page that reads `There's nothing here yet`. On that response, wait and request the URL again. -These checks confirm the [Deploy frontend applications](/en/documentation/use-cases/build-and-run-applications/deploy-frontend-applications/) use case. +In the [Deploy frontend applications](/en/documentation/use-cases/build-and-run-applications/deploy-frontend-applications/) use case, expect: + +- **The app answers on its Azion domain.** The URL the deploy returns, in the form `https://xxxxxxxxxx.map.azionedge.net`, opens the React app in a browser. --- diff --git a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx index 3341321955..5fa4e6549a 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx @@ -79,7 +79,7 @@ The **Create Cache Settings** drawer carries every field of a setting. To create -The setting appears in the **Cache Settings** list with its **Name**, **ID**, **Browser Cache**, and **Cache**. For every field with its type, its default, and its bounds, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). +The setting appears in the **Cache Settings** list with its **Name**, **Browser Cache**, and **Cache**. For every field with its type, its default, and its bounds, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). In the [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case, this section takes these values: diff --git a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx index 2320a75e22..e0db63c91d 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx @@ -21,7 +21,7 @@ To keep a separate cached copy of each object for every device group, set the va ## Prerequisites - An application served by a [workload](/en/documentation/platform/workloads/). To create both, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- Application Accelerator turned on for the application. The rule on this page reads the `${device_group}` variable, which requires it. To turn it on, refer to [Main Settings](/en/documentation/platform/applications/main-settings/#products). +- Application Accelerator turned on for the application. The rule on this page reads the `${device_group}` variable, which requires it. To turn it on, refer to [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources). - Access to Azion Console. To sign in, refer to [Access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/). --- diff --git a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx index 733d52f384..7bb32bdaba 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx @@ -233,9 +233,9 @@ Args are the arguments an instance passes into the context of the function's exe } ``` -The code reads the key at run time and the instance decides its value. A function can define default Args of its own, and the Args of an instance override the keys they repeat. The Args object holds a maximum of 100 KB, and an object above that ceiling makes the function fail at instantiation. Sensitive values such as API keys, credentials, and access tokens belong in [environment variables](/en/documentation/platform/functions/environment-variables/) instead. +The code reads the key at run time and the instance decides its value. A function can define default Args of its own, and Args set on an instance replace those defaults as a whole. The Args object holds a maximum of 100 KB, and an object above that ceiling makes the function fail at instantiation. Sensitive values such as API keys, credentials, and access tokens belong in [environment variables](/en/documentation/platform/functions/environment-variables/) instead. -For the default values and the override rules, refer to [How Functions works](/en/documentation/platform/functions/how-it-works/). For every field of the instance object, refer to [Function instances](/en/documentation/platform/applications/functions-instances/). +For the default values and how the Args of an instance replace them, refer to [How Functions works](/en/documentation/platform/functions/how-it-works/). For every field of the instance object, refer to [Function instances](/en/documentation/platform/applications/functions-instances/). --- diff --git a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx index 7fcf0860ce..c77646ea68 100644 --- a/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx +++ b/apps/docs/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx @@ -75,7 +75,7 @@ curl -I http://xxxxxxxxxx.map.azionedge.net:8008 **Modules** - [Modules](/en/documentation/platform/applications/main-settings/#products) can unlock additional functionalities and features for your applications. See the [Pricing page](/en/documentation/fundamentals/pricing/) for more details. + [Modules](/en/documentation/platform/applications/main-settings/#platform-resources) can unlock additional functionalities and features for your applications. See the [Pricing page](/en/documentation/fundamentals/pricing/) for more details. For now, you'll enable two modules. The **Application Accelerator** and **Functions** modules will be used for when you [tune your cache settings](/en/documentation/guides/application-performance/cache-and-purge/tune-cache-settings/), [instantiate a function](/en/documentation/guides/application-development/getting-started/instantiate-functions/), and [work with Rules Engine](/en/documentation/guides/application-development/getting-started/work-with-rules-engine/). diff --git a/apps/docs/src/content/docs/en/pages/build/application-accelerator/how-it-works.mdx b/apps/docs/src/content/docs/en/pages/build/application-accelerator/how-it-works.mdx index 433a8c4e3d..1f3bbbfd75 100644 --- a/apps/docs/src/content/docs/en/pages/build/application-accelerator/how-it-works.mdx +++ b/apps/docs/src/content/docs/en/pages/build/application-accelerator/how-it-works.mdx @@ -1,6 +1,6 @@ --- title: Cache variation -description: What Application Accelerator unlocks, what each cache variation costs, how purges reach varied objects, and how a TTL of 0 differs from Bypass Cache. +description: See what Application Accelerator unlocks, what each cache variation costs, how purges reach varied objects, and how a TTL of 0 differs from Bypass Cache. meta_tags: 'application accelerator, cache variation, cache key, advanced cache key, allowlist, sort, purge, bypass cache, TTL, post and options caching' namespace: documentation_products_application_accelerator_how_it_works permalink: /documentation/platform/applications/application-accelerator/cache-variation/ @@ -9,9 +9,9 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -When the response to one URL depends on a cookie, a device, or a request body, the cache has to tell those requests apart. On an application, one switch turns on Application Accelerator, and a cache setting then names the inputs that make two requests different. How a variation changes the cache key, with its diagram, is on the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path). +When the response to one URL depends on a cookie, a device, or a request body, the cache has to tell those requests apart. In an [Application](/en/documentation/platform/applications/), adding those inputs to the cache key requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), a Platform Resource that unlocks four capabilities for the cache and the rules. Application Accelerator is off in a new Application, and each Application turns it on separately, in the Application's `modules.application_accelerator.enabled` field in the API. Each [cache setting](/en/documentation/platform/applications/cache/cache-settings/) of the Application holds how long a response stays in cache. It then sets the inputs that make two requests different, in its own `modules.application_accelerator` object. How a variation changes the cache key, with its diagram, is on the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path). -The sections cover what the switch unlocks, what a variation costs, how purges reach variations, and how _Bypass Cache_ differs from a TTL of 0. +The sections cover what turning on Application Accelerator unlocks, what a variation costs, and how purges reach variations. The last section compares _Bypass Cache_ with a time to live (TTL) of 0. --- @@ -19,50 +19,50 @@ The sections cover what the switch unlocks, what a variation costs, how purges r Turning on Application Accelerator unlocks four capabilities that look unrelated until you see what they have in common: -- Cache variation beyond the URL, by query string, by cookie, by device group, and by request method. The feature is named [Advanced Cache Key](/en/documentation/platform/applications/cache/cache-settings/#application-accelerator). -- Caching of `POST` and `OPTIONS` responses, beyond the `GET` and `HEAD` responses an application caches natively. -- A **Max Age** as low as 0 seconds, under the 60-second floor that holds without it. -- Seven more Rules Engine behaviors, and the `${request_uri}` and `${device_group}` variables in rule criteria. The behaviors are _Add Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_, _Forward Cookies_, _Rewrite Request_, and _Run Function_. +- Cache variation by query string, by cookie, by device group, and by request method, through [Advanced Cache Key](/en/documentation/platform/applications/cache/cache-settings/#application-accelerator), a Feature of Application Accelerator. +- Caching of `POST` and `OPTIONS` responses, beyond the `GET` and `HEAD` responses an Application caches without it. +- A Max Age as low as 0 seconds, in the `modules.cache.max_age` field of a cache setting, under the 60-second floor that holds without it. +- More [Rules Engine](/en/documentation/platform/applications/rules-engine/) behaviors, and the `${request_uri}` and `${device_group}` variables in rule criteria. The behaviors are _Add Request Cookie_ and _Add Response Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_ and _Filter Response Cookie_, _Forward Cookies_, and _Rewrite Request_. -What the four have in common is dynamic content. Cache variation gives the cache key the extra input it needs to tell two correct responses apart. Caching `POST` and `OPTIONS` brings in the methods that carry that input in the request body. A TTL under a minute fits content that stops being correct before a minute passes. Several of the gated behaviors act on the cookies and paths that carry the difference in the first place. +What the four have in common is dynamic content. Cache variation gives the cache key the extra input it needs to tell two correct responses apart. Caching `POST` and `OPTIONS` responses extends the cache past `GET` and `HEAD`, and a `POST` carries that input in its request body. A TTL under a minute fits content that stops being correct before a minute passes. Several of the gated behaviors act on the cookies and paths that carry the difference in the first place. -The switch is all four or none. An application cannot take cache variation without also taking the extra methods and behaviors. A cache setting that sets a variation on an application with the switch off is refused with `21013`. +Application Accelerator is all four or none. An Application takes cache variation only together with the other three capabilities. The API refuses a cache setting that sets a variation on an Application with Application Accelerator off. For the error the API returns, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#errors). -Turning the switch on changes no traffic by itself, either. The query-string, cookie, and device controls of a cache setting start at `ignore`, and the method list starts empty. A cache setting reaches a request only when a [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior applies it. +Turning on Application Accelerator leaves traffic as it was: the query-string, cookie, and device controls of a cache setting start at `ignore`, and the method list starts empty. A cache setting reaches a request only when a [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior applies that cache setting. -Turning on a Product can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). +Turning on Application Accelerator can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). --- ## The cost of a variation -Cache variation has one cost, and it follows from how the key is built: each distinct value of a varying attribute produces a separate cached object. That makes the choice of what to vary by more consequential than the choice to vary at all. A cookie whose value is unique to each visitor gives every visitor a copy of the object. The cache still works, but it no longer serves one stored response to many requests, and the number of objects grows with the audience instead of with the content. +Cache variation costs storage first. The cost follows from how the key is built: each distinct value of a varying attribute produces a separate cached object. That makes the choice of what to vary by more consequential than the choice to vary at all. A cookie whose value is unique to each visitor gives every visitor a copy of the object. The cache still works, but each stored response then serves a single visitor. The number of objects grows with the audience instead of with the content. -An allowlist is the control for that cost. The `allowlist` behavior names the query-string arguments or the cookies that change the response, so an attribute nobody named cannot create another object. The `all` behavior varies by every attribute that arrives, including the ones the application ignores. For example, a link that arrives with a campaign argument gets its own cached object under `all`. Under an allowlist that does not name that argument, the same link maps to the shared object. +An allowlist is the control for that cost. The `allowlist` behavior names the query-string arguments or the cookies that change the response, so only an attribute it names can create another object. The `all` behavior varies by every query-string argument or cookie the request carries. For example, a link that arrives with a campaign argument gets its own cached object under `all`. Under an allowlist that does not name that argument, the same link maps to the shared object. -Sorting applies the same economy to the order of the arguments. The chosen arguments enter the key in the order the request submitted them, so `?a=1&b=2` and `?b=2&a=1` are two objects that hold one response. With **Sort** on, those variations group under one key, ordered alphabetically. For example, a product listing that changes with its `category` and `page` arguments names both in an allowlist. With **Sort** on, every order of the two arguments reaches one object. The cost of sorting is that the key no longer matches the URL as the client wrote it, which matters at purge time. For the Console steps that set these controls, refer to [Configure Advanced Cache Key for an application](/en/documentation/guides/application-performance/cache-and-purge/advanced-cache-key/). +Sorting applies the same economy to the order of the arguments. The chosen arguments enter the key in the order the request submitted them, so `?a=1&b=2` and `?b=2&a=1` are two objects that hold one response. With `sort_enabled` on, those variations group under one key, ordered alphabetically. For example, a product listing that changes with its `category` and `page` arguments names both in an allowlist. With `sort_enabled` on, every order of the two arguments reaches one object. The cost of sorting is that the key then differs from the URL as the client wrote it, which matters at purge time. For the Console steps that set these controls, refer to [Configure Advanced Cache Key for an application](/en/documentation/guides/application-performance/cache-and-purge/advanced-cache-key/). --- ## Cache variation and purges -A purge removes an object from the cache, and it finds the object by its cache key. A URL purge converts the URL it receives to a cache key without considering content variation. Every variation that the URL does not carry therefore survives it. Cookie variations and device group variations do not expire with a URL purge, and their copies stay in the cache. +A purge is a request that removes an object from the cache, and it finds the object by its cache key. A URL purge converts the URL it receives to a cache key without considering content variation. So every variation that the URL does not carry survives it, such as a cookie variation or a device group variation, and its copies stay in the cache. -Two purge types reach them. A cache key purge names each variation, and a wildcard purge ends the key with `@@*`. Query-string variations are the exception, because the query string is part of the URL. A URL purge reaches them when the arguments are sent in the order they were presented, or in alphabetical order when **Sort** is on. +Two purge types reach them. A cache key purge names each variation, and a wildcard purge ends the key with `@@*`. Query-string variations are the exception, because the query string is part of the URL. A URL purge reaches them when the arguments are sent in the order they were presented, or in alphabetical order when `sort_enabled` is on. -The variations you configure are also the objects a purge has to reach. A variation with many distinct values therefore costs you at purge time as well as in storage. For the purge types and the steps to run each one, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). +The variations you configure are also the objects a purge has to reach. So a variation with many distinct values costs you at purge time as well as in storage. For the purge types and the steps to run each one, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). --- ## Bypass Cache and a TTL of 0 -Without Application Accelerator, the shortest **Max Age** an application accepts is 60 seconds, and the API refuses a lower value with `21021`. Application Accelerator removes that floor and allows 0 seconds, or 3 seconds when the cache setting also has Tiered Cache on. A TTL of 0 is not the same as not caching, and the difference between the two is why both exist. Both need Application Accelerator, because _Bypass Cache_ is one of the behaviors it unlocks. +Without Application Accelerator, the shortest Max Age that a cache setting accepts, in its `modules.cache.max_age` field, is 60 seconds, and the API refuses a lower value. For the error, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#errors). Application Accelerator removes that floor and allows 0 seconds, or 3 seconds when the cache setting also has [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) on. A TTL of 0 differs from not caching, and that difference is why both exist. Both need Application Accelerator, because _Bypass Cache_ is one of the behaviors it unlocks. -The [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior sends every HTTP and HTTPS request its rule matches to the origin, and Azion caches nothing in its own cache. It keeps protocol optimizations and, where possible, a keep-alive connection to the origin. It does not change the browser cache, which a _Set Cache Policy_ behavior sets. It does not reach the Tiered Cache layer either: an application with active Tiered Cache settings keeps caching objects there for the minimum TTL. Use it when each request has to receive different content. +The [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior sends every HTTP and HTTPS request its rule matches to the origin, and the response bypasses Azion's own cache. It leaves the browser cache as a _Set Cache Policy_ behavior sets it. Its effect also stops at Azion's own cache: an Application with active Tiered Cache settings keeps caching objects in the Tiered Cache layer for the Max Age of the cache setting. Use it when each request has to receive different content. -A **Max Age** of 0 seconds keeps the request on the cache path. Parallel requests for the same object reach the origin as one request, and Azion validates the object with an `If-Modified-Since` request. An object that has not changed is not transferred again, and the answer can be a `304 Not Modified`. A **Max Age** of 0 still creates a cache object, which lives for 999 milliseconds. Use it when dynamic content can be delivered identically to everyone who requests it at the same moment. +A Max Age of 0 seconds keeps the request on the cache path: the response carries a cache key and reports `MISS`, and every request still reaches the origin. -The trade is between freshness for each request and load on the origin. _Bypass Cache_ gives every request its own answer, and gives up both the single origin request for parallel requests and the revalidation that skips an unchanged transfer. A TTL of 0 keeps both, and gives up the ability to answer two simultaneous requests differently. +Both send every request to the origin. The difference is the cache path: a TTL of 0 keeps the request on it, and _Bypass Cache_ keeps the response out of Azion's cache. --- @@ -72,7 +72,7 @@ The trade is between freshness for each request and load on the origin. _Bypass The controls behind cache variation, cached POST and OPTIONS responses, and a TTL under the floor. The Console steps that set the variation controls of a cache setting, including Sort. - The steps that turn on caching for the two methods Application Accelerator adds. - The switch turned on and a first cache setting that varies. + The steps that turn on caching for POST and OPTIONS responses. + Application Accelerator turned on and a first cache setting that varies. diff --git a/apps/docs/src/content/docs/en/pages/build/application-accelerator/overview.mdx b/apps/docs/src/content/docs/en/pages/build/application-accelerator/overview.mdx index d69b2e4162..961c0f74e2 100644 --- a/apps/docs/src/content/docs/en/pages/build/application-accelerator/overview.mdx +++ b/apps/docs/src/content/docs/en/pages/build/application-accelerator/overview.mdx @@ -10,18 +10,67 @@ import DocButton from '~/components/webkit/DocButton.vue' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -A cache files each stored response under a key built from the request. When that key holds only the URL, every request for the URL receives the same copy. That copy is wrong for content that changes with a cookie, a device, or an argument. Adding that input to the key gives each of its values a copy of its own. One URL then holds several correct responses, and no visitor receives the response meant for another. +**Application Accelerator** is a Platform Resource that unlocks four capabilities for the cache and the rules of an [Application](/en/documentation/platform/applications/). With Application Accelerator on, an Application can add more parts of the request to the cache key, cache `POST` and `OPTIONS` responses, and keep a response in cache for less than 60 seconds. Its rules can also use more [Rules Engine](/en/documentation/platform/applications/rules-engine/) behaviors, such as _Bypass Cache_ and _Forward Cookies_, and two more variables. -**Application Accelerator** puts those inputs into the cache key on an [application](/en/documentation/platform/applications/): a query-string argument, a cookie, the device group, or the request method. Its switch in **Main Settings** › **Modules** turns it on for that application alone. A cache setting then names the inputs that vary its copies, and a _Set Cache Policy_ rule applies that setting to the requests it matches. Use Application Accelerator to cache a personalized page, an API response that changes with a query string, a catalog that differs by device, or a response to a `POST`. +A cache files each stored response under a key built from the request. When that key holds only the URL, every visitor who requests the URL gets the same copy, even when the content changes with a cookie, a device, or an argument. Adding one of those inputs to the key gives each of its values a copy of its own. One URL then holds several correct responses, and each visitor receives the one that matches their request. + +In an Application with Application Accelerator on, the key can take four inputs: a query-string argument, a cookie, the device group, and the request method. A [device group](/en/documentation/platform/applications/device-groups/) is a name and a regular expression that the Application compares with the `User-Agent` header of each request. + +Application Accelerator is off in a new Application, and each Application turns it on separately, in the Application's `modules.application_accelerator.enabled` field in the API. Each [cache setting](/en/documentation/platform/applications/cache/cache-settings/) of the Application holds how long a response stays in cache. It also sets which inputs vary the key, in its own `modules.application_accelerator` object. Then a [rule](/en/documentation/platform/applications/rules-engine/) with the [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior applies the cache setting to the requests the rule matches. Use Application Accelerator to cache separate copies of a page personalized by a cookie, an API response that changes with its query string, a catalog that differs by device, or a `POST` response. --- +## Request path + +A cache key is the index entry for a cached object. By default, Azion builds it from the scheme, the host, and the path of the request, so each path is one object in cache. Unless a cache setting varies the key by query string, every query string of a path maps to that one object. Each variation a cache setting turns on adds one input to the key, and each kind appends its own marker: + +- A cookie variation appends the `@@` separator, then the names and values of the cookies, each followed by `;`. +- A device variation appends `@@` and the name of the device group. +- A cached `POST` response appends `@@` and the MD5 hash of the request body. A cached `OPTIONS` response adds only its method prefix. +- A query-string variation under `allowlist` or `denylist`, the `behavior` values that name the arguments to keep or to leave out, appends `@@`, then `?` and the chosen arguments. Under `all`, which varies the key by every argument, the whole query string follows the path, before `@@`. + +A request that uses any method other than `GET` or `HEAD` is a complex request, and its key carries the method as a prefix. + +Solid arrows carry the request, and dotted arrows carry the response. Each label starts with the number of its step below. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Client"]) + App["Application"] + Setting["cache setting: Application Accelerator"] + Cache["Cache"] + Conn["Connector"] + Origin[["origin server"]] + Client -->|"1. request"| App + App -->|"2. Set Cache Policy"| Setting + Setting -->|"3. cache key"| Cache + Cache -.->|"4. valid copy"| App + App -->|"5. no valid copy"| Conn + Conn -->|"5. request"| Origin + Origin -.->|"5. response"| Conn + Conn -.->|"5. response"| App + App -.->|"4, 5. response"| Client +``` + +1. The request reaches the Application with its scheme, host, path, and query string. +2. A _Set Cache Policy_ rule applies a cache setting to the request. +3. The key starts with the scheme, the host, and the path. Each variation in the cache setting's `modules.application_accelerator` object then appends its input, with the marker that this section lists for it. +4. When [Cache](/en/documentation/platform/applications/cache/) holds a valid copy under that key, that copy becomes the response. +5. Otherwise, the [Connector](/en/documentation/platform/connectors/) routes the request to the origin server, and Cache stores the response under that key. + +A cookie variation on a `user` cookie produces a key shaped like `httpwww.example.com/@@user=user;`. For a cached `POST`, the key is shaped like `posthttpsdynamic.example.com/path@@md5_of_post_body`. Two requests share a cached object when they produce the same key, and they get separate objects when they do not. For the full format and every input a key carries, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#key-format). + +For what turning on Application Accelerator unlocks, the cost of a variation, and purges, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/). That page also compares _Bypass Cache_ with a time to live (TTL) of 0. + +--- + ## Cache setting structure -Application Accelerator acts through the `modules.application_accelerator` object of a cache setting, which [Azion Console](https://console.azion.com) shows as the **Application Accelerator** section of the setting. This cache setting keeps a product listing for 30 seconds and gives each value of its `category` argument a copy of its own, sent as the body of `POST /v4/workspace/applications//cache_settings`: +A cache setting holds the inputs that vary the cache key in its `modules.application_accelerator` object, which [Azion Console](https://console.azion.com) shows as the **Application Accelerator** section of the setting only while Application Accelerator is on in the Application. This cache setting keeps a product listing for 30 seconds and gives each value of its `category` argument a copy of its own. Send it as the body of `POST /v4/workspace/applications//cache_settings`: ```json { @@ -43,58 +92,27 @@ Application Accelerator acts through the `modules.application_accelerator` objec } ``` -- `modules.application_accelerator` holds the four **Cache vary by** controls: `cache_vary_by_querystring`, `cache_vary_by_cookies`, `cache_vary_by_devices`, and `cache_vary_by_method`. A control the body leaves out keeps its default, `ignore`, or an empty list for the methods. +- `modules.application_accelerator` holds the four variation controls: `cache_vary_by_querystring`, `cache_vary_by_cookies`, `cache_vary_by_devices`, and `cache_vary_by_method`. A control the body leaves out keeps its default, `ignore`, or an empty list for the methods. - `behavior` takes `ignore`, `all`, `allowlist`, or `denylist`, and the device control takes `ignore` or `allowlist`. Here, `allowlist` varies the key only by the arguments in `fields`, and `sort_enabled` groups every order of them under one key. - `max_age` set to `30` is accepted only while Application Accelerator is on. Without it, the floor is 60 seconds, and [Azion API](https://api.azion.com/) refuses a lower value with `21021`. -- The switch belongs to the application, not to the cache setting. `PATCH /v4/workspace/applications/` turns it on with `{ "modules": { "application_accelerator": { "enabled": true } } }`, and while it is off, the API refuses any field of `modules.application_accelerator` with `21013`. - -If you configured a `Vary` header or a cache-key rule elsewhere, the model transfers. You name the inputs that make two requests different, and each distinct value gets its own copy. - ---- - -## Request path - -A cache key is the index entry for a cached object. By default, Azion builds it from the scheme, the host, and the path of the request, so each path is one object in cache. While the query-string control stays at its default, `ignore`, a query string does not split that object. Each variation a cache setting turns on adds one input to the key, and each kind appends its own marker: - -- A cookie variation appends the `@@` separator, then the names and values of the cookies, each followed by `;`. -- A device variation appends `@@` and the name of the device group. -- A cached `POST` or `OPTIONS` response appends `@@` and the MD5 hash of the request body. -- A query-string variation appends the query separator and the chosen arguments, in the order the request submitted them. The arguments are already part of the URL, so this variation needs no `@@`. - -A request that uses any method other than `GET` or `HEAD` is a complex request, and its key carries the method as a prefix. This diagram shows what the default key is built from and what each variation adds to it: - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Request["Request: scheme, host, path, query string"] --> Base["Default cache key: one object per path"] - Base --> Cookie["Cookie variation: @@, then cookie names and values"] - Base --> Device["Device variation: @@, then the device group name"] - Base --> Method["Cached POST or OPTIONS: @@, then the MD5 hash of the request body"] - Base --> Query["Query string variation: the query separator, then the chosen arguments"] - Cookie --> Object["A separate cached object per distinct value"] - Device --> Object - Method --> Object - Query --> Object -``` - -A cookie variation on a `user` cookie produces a key shaped like `httpwww.example.com/@@user=user;`. For a cached `POST`, the key is shaped like `httpsdynamic.example.com/path@@md5_of_post_arguments`. Two requests share a cached object when they produce the same key, and they get separate objects when they do not. For the full format and every input a key carries, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#key-format). +- The Application carries a `modules.application_accelerator` object of its own, and its `enabled` field turns Application Accelerator on. `PATCH /v4/workspace/applications/` sets it with `{ "modules": { "application_accelerator": { "enabled": true } } }`. While that field is `false`, the API refuses with `21013` a cache setting that varies the cache: a query-string, cookie, or device-group variation whose `behavior` is not `ignore`, or a method in `cache_vary_by_method`. -For what the switch unlocks, the cost of a variation, purges, and how _Bypass Cache_ differs from a time to live (TTL) of 0, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/). +If you configured a `Vary` header or a cache-key rule elsewhere, the model transfers. You name the inputs that make two requests different, and each distinct value gets its own copy. Only the four variation controls set those inputs, so a request header such as `Accept-Language` cannot vary the key. --- ## Scope and limits -- **Application**: the switch is off on a new application, and it belongs to the application, so one application can carry it while another does not. Turning it on changes no traffic by itself. The controls of a cache setting start at `ignore`, and a cache setting reaches a request only through a [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) rule. For the switch, refer to [Main Settings](/en/documentation/platform/applications/main-settings/#products). -- **What the switch unlocks**: cache variation, the caching of `POST` and `OPTIONS` responses, and a **Max Age** as low as 0 seconds. It also unlocks seven more Rules Engine behaviors and the `${request_uri}` and `${device_group}` variables, and an application takes all of these or none. The behaviors are _Add Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_, _Forward Cookies_, _Rewrite Request_, and _Run Function_. Beyond the `GET` and `HEAD` an application accepts natively, the switch adds `OPTIONS`, `POST`, `PUT`, `PATCH`, and `DELETE`. Of those, only `POST` and `OPTIONS` responses can be cached. -- **Variation size**: each distinct value of a varied input is a separate cached object. A cookie unique to each visitor gives every visitor a copy, so the number of objects grows with the audience instead of with the content. For how an allowlist and **Sort** bound that number, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/#the-cost-of-a-variation), and for the practices, to [Applications best practices](/en/documentation/platform/applications/best-practices/#application-accelerator). -- **Purges**: cookie and device group variations survive a URL purge. A cache key purge reaches them, and so does a wildcard purge that ends the key with `@@*`. Query-string variations are the exception. A URL purge reaches them when it sends the arguments in the order they were presented, or in alphabetical order with **Sort** on. For the purge types, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). -- **Bypass Cache and a TTL of 0**: [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) sends each request its rule matches to the origin and caches nothing in Azion's cache. It does not reach the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) layer. A **Max Age** of 0 seconds keeps the request on the cache path, so parallel requests for one object reach the origin as one request. For when to use each, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). -- **Neighbors**: Application Accelerator decides what goes into a key, and [Cache](/en/documentation/platform/applications/cache/) then keeps a separate copy for each value. Varying the cache on the `ims` string of [Image Processor](/en/documentation/platform/applications/image-processor/) needs Application Accelerator, while processing an image does not. -- **Interfaces**: you turn on the switch in Azion Console, through Azion API at `/v4/workspace/applications/`, and with `azion update application --application-accelerator` in [Azion CLI](/en/documentation/devtools/cli/). [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) sets it with `applicationAcceleratorEnabled`, and [Azion Lib](/en/documentation/devtools/azion-lib/application/) with `application_acceleration` on an update. [Azion Terraform Provider](/en/documentation/devtools/terraform/) manages the application resource that carries the switch. The variation controls belong to the cache setting, at `/v4/workspace/applications//cache_settings` or through `azion create cache-setting` flags such as `--cache-by-query-string` and `--cache-by-cookies`. No flag of `azion create cache-setting` sets device-group variation or the cache **Max Age**, so send them in a `--file` body. -- **Observability**: with `Pragma: azion-debug-cache` on a request, the `x-cache-key` header of the response shows what each variation added to the key. A `POST` reports `-` in `x-cache` until the cache setting names _POST_ in **Cache vary by Method**. To read the same headers in a browser, refer to [Verify cache indicators](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). -- **Limits**: with Application Accelerator on, **Max Age** goes down to 0 seconds, or to 3 seconds when the cache setting also has Tiered Cache on. Turning it on can generate usage-related costs. For each TTL bound, the answer past it, and what each plan includes, refer to [Applications limits](/en/documentation/platform/applications/limits/#application-accelerator), and for the rates, to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). -- **Terms**: the [Applications glossary](/en/documentation/platform/applications/glossary/) defines the words the Application Accelerator pages give a specific meaning, such as Advanced Cache Key, allowlist, denylist, and complex request. +- **Application**: Application Accelerator is off in a new Application, and it belongs to the Application, so one Application can have it on while another has it off. Turning it on leaves traffic as it was: the controls of a cache setting start at `ignore`, and a cache setting reaches a request only through a [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) rule. [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) shows where to turn it on in Azion Console and the API. +- **What Application Accelerator unlocks**: cache variation, the caching of `POST` and `OPTIONS` responses, and a Max Age, the cache setting's `modules.cache.max_age` field, as low as 0 seconds. It also unlocks Rules Engine behaviors and the `${request_uri}` and `${device_group}` variables, and an Application takes all of these or none. The behaviors are _Add Request Cookie_ and _Add Response Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_ and _Filter Response Cookie_, _Forward Cookies_, and _Rewrite Request_. An Application passes `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS` to the origin with or without Application Accelerator. Of those methods, Application Accelerator makes only the `POST` and `OPTIONS` responses cacheable. +- **Variation size**: each distinct value of a varied input is a separate cached object. A cookie unique to each visitor gives every visitor a copy, so the number of objects grows with the audience instead of with the content. For how an allowlist and sorting, the `sort_enabled` field, bound that number, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/#the-cost-of-a-variation), and for the practices, to [Applications best practices](/en/documentation/platform/applications/best-practices/#application-accelerator). +- **Purges**: cookie and device group variations survive a URL purge. A cache key purge reaches them, and so does a wildcard purge that ends the key with `@@*`. Query-string variations are the exception. A URL purge reaches them when it sends the arguments in the order they were presented, or in alphabetical order with `sort_enabled` on. For the purge types, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). +- **Bypass Cache and a TTL of 0**: [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) sends each request that its rule matches to the origin and keeps the response out of Azion's cache. It acts on Azion's cache only, so the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) layer keeps caching objects for an Application whose cache settings turn Tiered Cache on. A Max Age of 0 seconds keeps the request on the cache path, and every request still reaches the origin. For how the two compare, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). +- **Neighbors**: with Application Accelerator on, the variation controls of a cache setting decide what goes into a key, and [Cache](/en/documentation/platform/applications/cache/) then keeps a separate copy for each value. To vary the cache on the `ims` string of [Image Processor](/en/documentation/platform/applications/image-processor/), add `ims` to the query-string allowlist of the cache setting that serves images. +- **Interfaces**: you turn on Application Accelerator in Azion Console, through Azion API at `/v4/workspace/applications/`, and with `azion update application --application-accelerator` in [Azion CLI](/en/documentation/devtools/cli/). [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) sets it with `applicationAcceleratorEnabled`, and [Azion Lib](/en/documentation/devtools/azion-lib/application/) with `application_acceleration` on an update. [Azion Terraform Provider](/en/documentation/devtools/terraform/) manages the Application resource that carries the switch. The variation controls belong to the cache setting, at `/v4/workspace/applications//cache_settings` or through `azion create cache-setting` flags such as `--cache-by-query-string` and `--cache-by-cookies`. `azion create cache-setting` takes device-group variation and the cache Max Age only in a `--file` body. +- **Observability**: with `Pragma: azion-debug-cache` on a request, the `x-cache-key` header of the response shows what each variation added to the key. A `POST` reports `-` in `x-cache` until the `cache_vary_by_method` field of the cache setting carries `post`. To check the cache status of one response, refer to [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). +- **Limits**: with Application Accelerator on, the Max Age of a cache setting goes down to 0 seconds, or to 3 seconds when the cache setting also has Tiered Cache on. Turning it on can generate usage-related costs. For each TTL bound and the answer past it, refer to [Applications limits](/en/documentation/platform/applications/limits/#application-accelerator), and for the rates, to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). [Azion pricing](https://www.azion.com/en/pricing/) lists what each plan includes. +- **Terms**: the [Applications glossary](/en/documentation/platform/applications/glossary/) defines the words the Application Accelerator pages give a specific meaning, such as Advanced Cache Key, cache variation, and device group. --- @@ -103,8 +121,8 @@ For what the switch unlocks, the cost of a variation, purges, and how _Bypass Ca - + - + diff --git a/apps/docs/src/content/docs/en/pages/build/application-accelerator/quickstart.mdx b/apps/docs/src/content/docs/en/pages/build/application-accelerator/quickstart.mdx index 8b93717450..7356516080 100644 --- a/apps/docs/src/content/docs/en/pages/build/application-accelerator/quickstart.mdx +++ b/apps/docs/src/content/docs/en/pages/build/application-accelerator/quickstart.mdx @@ -12,21 +12,22 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' This guide instructs you through your first cache setting that varies the cache key. The example is a listing page whose response changes with one query string argument. -- Turn on [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on an application. -- Create a cache setting that holds the listing for 30 seconds and varies by the `category` argument. +- Turn on [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on an Application. +- Create a [cache setting](/en/documentation/platform/applications/cache/cache-settings/) that holds the listing for 30 seconds and varies by the `category` argument. - Add a Rules Engine rule that applies the cache setting to requests for `/products`. - Request the listing twice, with two values of `category`, and read the cache key of each response. -Three objects produce that result, and each one depends on the one before it: +Three parts of the Application produce that result, and each one depends on the one before it: -1. The **Application Accelerator** switch belongs to the application. It unlocks the fields that vary the cache key, and it removes the 60-second floor on the cache TTL. -2. The **cache setting** holds the cache behavior, the **Max Age**, and the variation. It names what the cache does, not which requests it does it to. -3. The [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule applies the cache setting with the **Set Cache Policy** behavior. Its criteria decide which requests the cache setting covers. +1. Application Accelerator is on or off in each Application separately. It unlocks the fields that vary the cache key, and it removes the 60-second floor on the cache TTL. +2. A cache setting belongs to the Application and holds the cache behavior, the Max Age, and the variation. It sets what the cache does, not which requests it does it to. +3. The [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule applies the cache setting with the [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior. Its criteria decide which requests the cache setting covers. -Creating a cache setting changes no traffic. A cache setting that no rule applies never reaches a request. +A cache setting reaches a request only when a rule applies that cache setting, so creating one leaves traffic as it was. `azion.config.js` and Azion Lib carry the same settings. For the field each interface sets, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/). @@ -44,9 +45,10 @@ Creating a cache setting changes no traffic. A cache setting that no rule applie ### Console - An Azion account. To create one, refer to [How to create an account on Azion](/en/documentation/fundamentals/creating-account/). -- The **Edit Applications** permission on the account. It grants permission to edit, create, and remove applications, and it also requires the permission **View Applications**. Refer to [Teams permissions](/en/documentation/fundamentals/teams-permissions/). -- An application that serves a path whose response changes with a query string argument. This guide uses the `/products` path and the `category` argument. To create an application, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The **Edit Applications** permission on the account. It grants permission to edit, create, and remove Applications, and it also requires the permission **View Applications**. Refer to [Teams permissions](/en/documentation/fundamentals/teams-permissions/). +- An Application that receives the requests of a Workload, with a path whose response changes with a query string argument. This guide uses the `/products` path and the `category` argument. To create both, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). - Access to Azion Console. To sign in, refer to [Access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/). +- `curl`, to request the listing. @@ -55,9 +57,10 @@ Creating a cache setting changes no traffic. A cache setting that no rule applie ### CLI - An Azion account. To create one, refer to [How to create an account on Azion](/en/documentation/fundamentals/creating-account/). -- The **Edit Applications** permission on the account. It grants permission to edit, create, and remove applications, and it also requires the permission **View Applications**. Refer to [Teams permissions](/en/documentation/fundamentals/teams-permissions/). -- An application that serves a path whose response changes with a query string argument. This guide uses the `/products` path and the `category` argument. To create an application, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The **Edit Applications** permission on the account. It grants permission to edit, create, and remove Applications, and it also requires the permission **View Applications**. Refer to [Teams permissions](/en/documentation/fundamentals/teams-permissions/). +- An Application that receives the requests of a Workload, with a path whose response changes with a query string argument. This guide uses the `/products` path and the `category` argument. To create both, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). - The [Azion CLI](/en/documentation/devtools/cli/) installed and authorized. +- `curl`, to request the listing. @@ -66,8 +69,8 @@ Creating a cache setting changes no traffic. A cache setting that no rule applie ### API - An Azion account. To create one, refer to [How to create an account on Azion](/en/documentation/fundamentals/creating-account/). -- The **Edit Applications** permission on the account. It grants permission to edit, create, and remove applications, and it also requires the permission **View Applications**. Refer to [Teams permissions](/en/documentation/fundamentals/teams-permissions/). -- An application that serves a path whose response changes with a query string argument. This guide uses the `/products` path and the `category` argument. To create an application, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The **Edit Applications** permission on the account. It grants permission to edit, create, and remove Applications, and it also requires the permission **View Applications**. Refer to [Teams permissions](/en/documentation/fundamentals/teams-permissions/). +- An Application that receives the requests of a Workload, with a path whose response changes with a query string argument. This guide uses the `/products` path and the `category` argument. To create both, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). - A [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `curl`. @@ -78,7 +81,7 @@ Creating a cache setting changes no traffic. A cache setting that no rule applie ## Turn on Application Accelerator -The module is off by default, and it belongs to one application at a time. +Application Accelerator is off in a new Application, and each Application turns it on separately. @@ -86,7 +89,7 @@ The module is off by default, and it belongs to one application at a time. ### Console -To turn on the module in Azion Console: +To turn on Application Accelerator in Azion Console: @@ -94,9 +97,9 @@ To turn on the module in Azion Console: Access [Azion Console](https://console.azion.com/) > **Applications**. - + - + In the **Modules** section, turn on **Application Accelerator**. @@ -104,7 +107,7 @@ To turn on the module in Azion Console: -The application now accepts the cache fields the rest of this guide uses. +The Application now accepts the cache fields the rest of this guide uses. @@ -112,19 +115,17 @@ The application now accepts the cache fields the rest of this guide uses. ### CLI -To turn on the module with the Azion CLI, replace `` with [your application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): +Find the ID of your Application in its Azion Console address, `console.azion.com/applications/edit//main-settings`, or in the output of `azion list application`. To turn on Application Accelerator with the Azion CLI, replace `` with that ID: - ```bash - azion update application --application-id --application-accelerator true - ``` + --application-accelerator true`} /> - The command confirms the application it updated: + The command confirms the Application it updated: ```text Updated Application with ID @@ -133,7 +134,7 @@ To turn on the module with the Azion CLI, replace `` with [your -The application now accepts the cache fields the rest of this guide uses. +The Application now accepts the cache fields the rest of this guide uses. @@ -141,30 +142,28 @@ The application now accepts the cache fields the rest of this guide uses. ### API -To turn on the module with the Azion API, replace `[TOKEN VALUE]` with your personal token and `` with [your application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): +Find the ID of your Application in its Azion Console address, `console.azion.com/applications/edit//main-settings`. To turn on Application Accelerator with the Azion API, replace `[TOKEN VALUE]` with your personal token and `` with that ID: - ```bash - curl --request PATCH \ - --url https://api.azion.com/v4/workspace/applications/ \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "modules": { "application_accelerator": { "enabled": true } } - }' - ``` + }'`} /> - A `202` carries `"state": "pending"`, and the response echoes every module of the application: + A `202` carries `"state": "pending"`, and the response echoes every key of `modules`: ```json { @@ -175,26 +174,26 @@ To turn on the module with the Azion API, replace `[TOKEN VALUE]` with your pers } ``` - The values of the other modules are the ones the application already held. Only `application_accelerator` changed. + The other keys of `modules` keep the values the Application already held. Only `application_accelerator` changed. -The application now accepts the cache fields the rest of this guide uses. +The Application now accepts the cache fields the rest of this guide uses. :::caution -Turning on a module can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). +Turning on Application Accelerator can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). ::: --- ## Create a cache setting that varies by query string -A cache setting is where the cache behavior and the variation live. The **Max Age** of `30` seconds below is the point of the exercise: without Application Accelerator, the shortest cache TTL an application accepts is 60 seconds. +The cache setting holds the cache behavior and the variation. The Max Age of `30` seconds that this stage sets is the point of the exercise. Without Application Accelerator, the shortest cache TTL an Application accepts is 60 seconds. @@ -224,7 +223,7 @@ To create the cache setting in Azion Console: - Add `category` to the field list under **Behavior**. + In **Fields**, enter `category`. @@ -243,15 +242,14 @@ The cache setting appears in the **Cache Settings** tab. It holds an object for ### CLI -To create the cache setting with the Azion CLI, send the body from a file: the command flags do not reach **Max Age**. +`azion create cache-setting` takes `max_age` only in a `--file` body. To create the cache setting with the Azion CLI, send the body from a file: Save the following as `cache-setting.json`: - ```json - { + - ```bash - azion create cache-setting --application-id --file cache-setting.json - ``` + --file cache-setting.json`} /> The command prints the id of the new cache setting: @@ -286,9 +281,7 @@ To create the cache setting with the Azion CLI, send the body from a file: the c - ```bash - azion describe cache-setting --application-id --cache-setting-id 123462 --format json - ``` + --cache-setting-id 123462 --format json`} /> This excerpt of the output carries the fields the file set: @@ -314,7 +307,7 @@ To create the cache setting with the Azion CLI, send the body from a file: the c -The cache setting holds an object for 30 seconds and gives each value of `category` its own cached object. Record the id: the rule in the next stage selects the cache setting by it. For every flag the command accepts, refer to [Azion CLI create](/en/documentation/devtools/cli/resources/). +The cache setting holds an object for 30 seconds and gives each value of `category` its own cached object. Record the id: the rule in the next stage selects the cache setting by it. For every flag the command accepts, refer to [`azion create cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/#create). @@ -322,17 +315,16 @@ The cache setting holds an object for 30 seconds and gives each value of `catego ### API -To create the cache setting with the Azion API, replace `[TOKEN VALUE]` with your personal token and `` with your application ID: +To create the cache setting with the Azion API, replace `[TOKEN VALUE]` with your personal token and `` with the ID of your Application: - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//cache_settings \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + /cache_settings \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "name": "product-listing", "browser_cache": { "behavior": "honor" }, @@ -349,8 +341,7 @@ To create the cache setting with the Azion API, replace `[TOKEN VALUE]` with you } } } - }' - ``` + }'`} /> @@ -395,7 +386,7 @@ The cache setting holds an object for 30 seconds and gives each value of `catego ## Apply the cache setting with a rule -A cache setting reaches a request only when a rule applies it. +A cache setting reaches a request only when a rule applies that cache setting. @@ -435,7 +426,7 @@ To apply the cache setting to the listing path in Azion Console: - In the **Behaviors** section, select **Set Cache Policy**. + In the **Behaviors** section, select _Set Cache Policy_. @@ -450,22 +441,21 @@ The rule applies the cache setting to every request whose URI starts with `/prod ### CLI -To add the rule with the Azion CLI, send the body from a file: the criteria carry `${uri}`, which a shell expands. +To add the rule with the Azion CLI, send the body from a file, so the shell leaves `${uri}` as written. Save the following as `rule.json`, with the id of your cache setting in `attributes.value`: - ```json - { + - ```bash - azion create rules-engine --application-id --phase request --file rule.json - ``` + --phase request --file rule.json`} /> The command prints the id of the new rule: @@ -504,22 +491,21 @@ The rule applies the cache setting to every request whose URI starts with `/prod ### API -To add the rule with the Azion API, send the body from a file: the criteria carry `${uri}`, which a shell expands. +To add the rule with the Azion API, replace `[TOKEN VALUE]` with your personal token and `` with the ID of your Application. Send the body from a file, so the shell leaves `${uri}` as written. Save the following as `rule.json`, with the `id` the cache setting create returned in `attributes.value`: - ```json - { + - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json - ``` + /request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> - A `202` carries `"state": "pending"` and the rule, with its `id`, its `name`, whether it is `active`, the behaviors it holds, and the `order` it holds among the rules of the application. + A `202` carries `"state": "pending"` and the rule. The rule carries its `id`, its `name`, whether it is `active`, and the behaviors it holds. It also carries its `order` among the rules of the Application. @@ -560,7 +543,7 @@ The rule applies the cache setting to every request whose URI starts with `/prod -A new rule takes a few minutes to propagate. Wait before you request the path. +A new rule can take a few minutes to propagate. Wait before you request the path. --- @@ -568,38 +551,34 @@ A new rule takes a few minutes to propagate. Wait before you request the path. Azion returns the cache key of an object when the request carries the Azion debug header `Pragma: azion-debug-cache`. Reading that key for two values of `category` shows the variation the cache setting created. -Your application answers on a domain in the format `xxxxxxxxx.map.azionedge.net`. To set the domain for your application, refer to [Add a custom domain to a workload](/en/documentation/guides/platform/migration/configure-a-domain/). +Your Application receives the requests of a Workload, and that Workload answers on its workload domain, in the format `xxxxxxxxx.map.azionedge.net`. To add a custom domain to that Workload, refer to [Add a custom domain to a workload](/en/documentation/guides/platform/migration/configure-a-domain/). -Replace `` with that domain, and request the listing with one value: +Replace `` with the domain of that Workload, and request the listing with one value: -```bash -curl -I -H "Pragma: azion-debug-cache" "https:///products?category=shoes" -``` +/products?category=shoes"`} /> -The response carries two Azion debug headers. This excerpt is from an application served at `www.example.com`, and HTTP/2 sends header names in lowercase: +The response carries two Azion debug headers. This excerpt is from an Application served at `www.example.com`, and HTTP/2 sends header names in lowercase: ```text x-cache: MISS from 203.0.113.10 with HTTP/2.0 -x-cache-key: httpswww.example.com/products?category=shoes +x-cache-key: httpswww.example.com/products@@?category=shoes ``` -`x-cache` carries the cache status, the address of the data center that answered, and the protocol of the request. `x-cache-key` carries the cache key, which concatenates the scheme, the host, the path, and the query string arguments the allowlist named. +`x-cache` carries the cache status, the IP address of the server that answered, and the protocol of the request. `x-cache-key` carries the cache key, which concatenates the scheme, the host, the path, `@@`, and the query string arguments the allowlist named. Request the same path with a different value: -```bash -curl -I -H "Pragma: azion-debug-cache" "https:///products?category=hats" -``` +/products?category=hats"`} /> The argument changed, so the key changed with it: ```text -x-cache-key: httpswww.example.com/products?category=hats +x-cache-key: httpswww.example.com/products@@?category=hats ``` Two keys are two cached objects, which is what the allowlist asked for. For the full format of a cache key, refer to [Cache key format](/en/documentation/platform/applications/cache/cache-keys/#key-format). -Your application now caches the `/products` listing for 30 seconds and keeps one object per value of `category`. +Your Application now caches the `/products` listing for 30 seconds and keeps one object per value of `category`. --- @@ -610,6 +589,6 @@ Your application now caches the `/products` listing for 30 seconds and keeps one - - + + diff --git a/apps/docs/src/content/docs/en/pages/build/application-accelerator/settings.mdx b/apps/docs/src/content/docs/en/pages/build/application-accelerator/settings.mdx index bf57df5e75..4686371a05 100644 --- a/apps/docs/src/content/docs/en/pages/build/application-accelerator/settings.mdx +++ b/apps/docs/src/content/docs/en/pages/build/application-accelerator/settings.mdx @@ -12,50 +12,58 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -[Application Accelerator](/en/documentation/platform/applications/application-accelerator/) is a module of [Applications](/en/documentation/platform/applications/), turned on for one application at a time. The module unlocks the cache fields that vary the cache key, the caching of `POST` and `OPTIONS` responses, and seven [Rules Engine](/en/documentation/platform/applications/rules-engine/) behaviors. This page carries the name, the type, and the default of each field, and the interface that sets it. +[Application Accelerator](/en/documentation/platform/applications/application-accelerator/) is a Platform Resource that unlocks four capabilities for the cache and the rules of an [Application](/en/documentation/platform/applications/). The capabilities are cache variation, the caching of `POST` and `OPTIONS` responses, a Max Age below 60 seconds, and the [Rules Engine](/en/documentation/platform/applications/rules-engine/) behaviors and variables that this page lists. Each Application turns Application Accelerator on separately. This page carries the name, the type, and the default of each field, and the interface that sets it. --- -## Module activation +## Application Accelerator switch -The module is off by default, and every interface below sets the same toggle. The toggle belongs to the application, not to a cache setting, so one application can carry it while another does not. +Application Accelerator is off in a new Application, and the setting belongs to the Application, not to a [cache setting](/en/documentation/platform/applications/cache/cache-settings/). So one Application can have Application Accelerator on while another has it off. Each interface turns on the same setting, which API v4 stores in `modules.application_accelerator.enabled`: | Interface | Where you set it | Field or flag | | --- | --- | --- | -| Azion Console | The **Modules** section of the **Main Settings** tab of an application | The **Application Accelerator** switch | +| Azion Console | The **Modules** section of the **Main Settings** tab of an Application | The **Application Accelerator** switch | | Azion API v4 | `PATCH /workspace/applications/{id}` | `modules.application_accelerator.enabled` | | [Azion CLI](/en/documentation/devtools/cli/) | `azion update application` | `--application-accelerator` | | [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) | The `AzionApplication` object | `applicationAcceleratorEnabled` | -| [Azion Lib](/en/documentation/devtools/azion-lib/application/) | The data passed to an application update, because API v3 refuses the field on create | `application_acceleration` | +| [Azion Lib](/en/documentation/devtools/azion-lib/application/) | The data passed to an Application update, because API v3 refuses the field on create | `application_acceleration` | `modules.application_accelerator.enabled` is a boolean and defaults to `false`. `applicationAcceleratorEnabled` and `application_acceleration` are booleans, and the Azion CLI flag takes a string. -The [Azion Terraform provider](/en/documentation/devtools/terraform/) manages the application resource that carries the module. Turning on a module can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). +The [Azion Terraform Provider](/en/documentation/devtools/terraform/) manages the Application resource that carries the switch. Turning on Application Accelerator can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). --- ## Cache variation -Application Accelerator adds the `modules.application_accelerator` object to a cache setting, and the fields in it configure **Advanced Cache Key**. They decide which parts of a request, beyond the URL, produce a separate cached object. In Azion Console, the same fields sit in the **Application Accelerator** section of a cache setting. A variation appends the `@@` separator to the cache key. For the format of a cache key, refer to [Cache key format](/en/documentation/platform/applications/cache/cache-keys/#key-format). +Every cache setting carries its own `modules.application_accelerator` object, which shares its name with the object of the Application. The Application's object holds only `enabled`, and the cache setting's object holds the variations. With Application Accelerator on in the Application, the fields of the cache setting's object can leave their defaults. + +Those fields configure Advanced Cache Key, a Feature of Application Accelerator. They decide which parts of a request, besides its scheme, host, and path, produce a separate cached object. A cookie, device group, or cached `POST` variation appends the `@@` separator to the cache key, and so does a query-string variation under `allowlist` or `denylist`, as `@@?` and its arguments. Under `all`, the whole query string follows the path, before `@@`. A cached `OPTIONS` response adds only the `options` prefix, with no `@@`. For the format of a cache key, refer to [Cache key format](/en/documentation/platform/applications/cache/cache-keys/#key-format). + +Each field maps to a control in the **Application Accelerator** section of a cache setting, in Azion Console, which shows that section only while Application Accelerator is on in the Application: | Field | Type | Default | Console control | What it sets | | --- | --- | --- | --- | --- | | `cache_vary_by_method` | array of enum, at most 2 values: `options`, `post` | `[]` | **Cache vary by Method**, one checkbox per method | The request methods whose responses are cached. | | `cache_vary_by_querystring.behavior` | enum: `ignore`, `all`, `allowlist`, `denylist` | `ignore` | **Cache vary by Query String** > **Behavior** | The mode that decides how the query string varies the key. | -| `cache_vary_by_querystring.fields` | array of string | `[]` | The field list under **Cache vary by Query String** | The query string arguments the mode applies to. | +| `cache_vary_by_querystring.fields` | array of string | `[]` | **Cache vary by Query String** > **Fields** | The query string arguments the mode applies to. | | `cache_vary_by_querystring.sort_enabled` | boolean | `false` | **Cache vary by Query String** > **Sort** | Whether the variations group under one key, ordered alphabetically. | | `cache_vary_by_cookies.behavior` | enum: `ignore`, `all`, `allowlist`, `denylist` | `ignore` | **Cache vary by Cookies** > **Behavior** | The mode that decides how cookies vary the key. | -| `cache_vary_by_cookies.cookie_names` | array of string | `[]` | The cookie list under **Cache vary by Cookies** | The cookies the mode applies to. | +| `cache_vary_by_cookies.cookie_names` | array of string | `[]` | **Cache vary by Cookies** > **Fields** | The cookies the mode applies to. | | `cache_vary_by_devices.behavior` | enum: `ignore`, `allowlist` | `ignore` | **Cache vary by Devices** > **Behavior** | The mode that decides how device groups vary the key. | -| `cache_vary_by_devices.device_group` | array of integer | `[]` | The device group list under **Cache vary by Devices** | The device groups the mode applies to. | +| `cache_vary_by_devices.device_group` | array of integer | `[]` | **Cache vary by Devices** > **Device Group** | The [device groups](/en/documentation/platform/applications/device-groups/) the mode applies to. | + +In Azion Console, the **Behavior** dropdowns of **Cache vary by Query String** and **Cache vary by Cookies** show _Allowlist_, _Denylist_, _Ignore_, and _All_. The one of **Cache vary by Devices** shows _Allowlist_ and _Ignore_. -Each **Behavior** dropdown renders the values of its enum title-cased: _Allowlist_, _Denylist_, _Ignore_, and _All_. +`allowlist` and `denylist` on the query string need at least one argument in `fields`, or the API returns error `21018`. While Application Accelerator is off in the Application, the API refuses a variation with error `21013`. For every error a cache setting returns, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#errors). -One field on the same cache setting sits outside that object and is still gated by the module: +One field on the same cache setting sits outside that object and still requires Application Accelerator: | Field | Type | Default | Console control | What it sets | | --- | --- | --- | --- | --- | -| `modules.cache.max_age` | integer, `0` to `31536000` seconds | `60` | **Cache** > **Max Age** | How long the cache holds the object. A value below 60 requires the module. | +| `modules.cache.max_age` | integer, `0` to `31536000` seconds | `60` | **Cache** > **Max Age** | How long the cache holds the object. A value below 60 requires Application Accelerator. | + +Without Application Accelerator, a `max_age` below 60 returns error `21021`. With Application Accelerator and Tiered Cache on, a value below 3 returns error `21020`. For the ceilings that bound a cache setting, refer to [Limits](/en/documentation/platform/applications/limits/#application-accelerator). @@ -63,7 +71,7 @@ For the ceilings that bound a cache setting, refer to [Limits](/en/documentation ## Cache setting flags in Azion CLI -`azion create cache-setting` writes the same fields from the command line. Each flag below sets one field of the cache setting. +`azion create cache-setting` writes most of these fields from the command line. Each flag sets one field of the cache setting: | Flag | Field it sets | Default | | --- | --- | --- | @@ -74,17 +82,17 @@ For the ceilings that bound a cache setting, refer to [Limits](/en/documentation | `--enable-caching-for-post` | `options` and `post` in `cache_vary_by_method`, with either value | None | | `--enable-caching-for-options` | `options` in `cache_vary_by_method`, with either value | `false` | -On create, `false` does not turn a method off, so caching `POST` without `OPTIONS` takes `cache_vary_by_method` in a `--file` body. [`azion update cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/#update) honors `true` and `false`. On update, a call that passes one method flag drops the other method, so pass both flags to keep both. +On create, either value turns a method on, so caching `POST` without `OPTIONS` takes `cache_vary_by_method` in a `--file` body. [`azion update cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/#update) honors `true` and `false`. On update, a call that passes one method flag drops the other method, so pass both flags to keep both. -No flag of `azion create cache-setting` sets device-group variation or the cache **Max Age**, so send them in a `--file` body. `--browser-cache-max-age` sets the browser value alone. +`azion create cache-setting` takes `sort_enabled`, device-group variation, and the cache `max_age` only in a `--file` body. On `azion update cache-setting`, `--enable-caching-string-sort` sets `sort_enabled`. `--browser-cache-max-age` sets the browser value alone. --- ## HTTP methods -An application natively accepts `GET` and `HEAD`. Application Accelerator adds five more methods, and the responses of two of them can be cached through `cache_vary_by_method`. +An Application passes `OPTIONS`, `POST`, `PUT`, `PATCH`, and `DELETE` to the origin with or without Application Accelerator, as it does `GET` and `HEAD`. Of those five methods, Application Accelerator makes the responses of two cacheable, through `cache_vary_by_method`. -| Method added by the module | Response can be cached | +| Method | Response can be cached | | --- | --- | | `OPTIONS` | Yes, when `cache_vary_by_method` carries `options` | | `POST` | Yes, when `cache_vary_by_method` carries `post` | @@ -92,27 +100,30 @@ An application natively accepts `GET` and `HEAD`. Application Accelerator adds f | `PATCH` | No | | `DELETE` | No | -A cached `POST` or `OPTIONS` object gets its own cache key. For the shape of that key, refer to [Cached HTTP methods](/en/documentation/platform/applications/cache/cache-keys/#variations). +A cached `POST` or `OPTIONS` object gets its own cache key. For the shape of that key, refer to [Cache key variations](/en/documentation/platform/applications/cache/cache-keys/#variations). --- ## Rules Engine behaviors -Seven Rules Engine behaviors require Application Accelerator on the application that runs the rule. The table indexes them; [Rules Engine](/en/documentation/platform/applications/rules-engine/#behaviors) owns the arguments and the syntax of each one. +These Rules Engine behaviors require Application Accelerator on the Application that runs the rule. The table indexes them; [Rules Engine](/en/documentation/platform/applications/rules-engine/#behaviors) owns the arguments and the syntax of each one. | Behavior | Phases | What it does | | --- | --- | --- | -| [Add Cookie](/en/documentation/platform/applications/rules-engine/#add-cookie) | Request, Response | Adds a cookie to the `Set-Cookie` header. | -| [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) | Request | Stops Azion from caching the origin response, and leaves the browser cache untouched. | -| [Capture Match Groups](/en/documentation/platform/applications/rules-engine/#capture-match-groups) | Request, Response | Stores the result of a regular expression capture over a request field in a temporary variable. | -| [Filter Cookie](/en/documentation/platform/applications/rules-engine/#filter-request-cookie) | Request, Response | Removes a cookie from the request header sent to the origin, or from the response header sent to the user. | +| [Add Request Cookie, Add Response Cookie](/en/documentation/platform/applications/rules-engine/#add-request-cookie-and-add-response-cookie) | Request, Response | Adds a cookie to the `Set-Cookie` header. | +| [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) | Request | Stops Azion's cache from storing the origin response, and leaves the browser cache untouched. | +| [Capture Match Groups](/en/documentation/platform/applications/rules-engine/#capture-match-groups) | Request, Response | Stores a regular expression capture over a request field in a temporary variable. | +| [Filter Request Cookie, Filter Response Cookie](/en/documentation/platform/applications/rules-engine/#filter-request-cookie) | Request, Response | Removes a cookie from the request to the origin or the response to the user. | | [Forward Cookies](/en/documentation/platform/applications/rules-engine/#forward-cookies) | Request | Forwards the `Set-Cookie` header of the origin to users, including on a cache hit. | | [Rewrite Request](/en/documentation/platform/applications/rules-engine/#rewrite-request) | Request | Modifies the resource path requested from the origin. | -| [Run Function](/en/documentation/platform/applications/rules-engine/#run-function) | Request, Response | Runs a function instantiated on the application. Also requires [Functions](/en/documentation/platform/functions/). | -Rule criteria can read `${device_group}`, which requires the module as well. For the variable, refer to [Variables](/en/documentation/platform/applications/rules-engine/#variables), and for the groups it matches, refer to [Device Groups](/en/documentation/platform/applications/device-groups/). +_Bypass Cache_ acts on Azion's cache and not on the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) layer. An Application whose cache settings have Tiered Cache on keeps caching objects there for the Max Age of the cache setting. + +Rule criteria can read `${request_uri}` and `${device_group}`, and both require Application Accelerator. A rule that reads `${request_uri}` without it is refused with `25047`. For the variables, refer to [Variables](/en/documentation/platform/applications/rules-engine/#variables), and for the groups `${device_group}` matches, refer to [Device Groups](/en/documentation/platform/applications/device-groups/). + +[Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) works without Application Accelerator. It applies a cache setting of the Application, and it is how a cache setting reaches a request. -[Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) does not require the module. It assigns a cache policy created in [Cache Settings](/en/documentation/platform/applications/cache/cache-settings/), and it is how a cache setting reaches a request. +[Run Function](/en/documentation/platform/applications/rules-engine/#run-function) also works without Application Accelerator. It runs a Function Instance of the Application, and it requires [Functions](/en/documentation/platform/functions/). --- @@ -121,7 +132,7 @@ Rule criteria can read `${device_group}`, which requires the module as well. For How each of these fields changes the cache key, and what a variation costs. - Turn the module on and create a cache setting that varies the cache key. + Turn on Application Accelerator and create a cache setting that varies the cache key. The ceilings that bound the values in these tables. How to purge an object that varies by cookie, query string, or device group. diff --git a/apps/docs/src/content/docs/en/pages/build/applications/best-practices.mdx b/apps/docs/src/content/docs/en/pages/build/applications/best-practices.mdx index d6d73f40c5..2979f14af0 100644 --- a/apps/docs/src/content/docs/en/pages/build/applications/best-practices.mdx +++ b/apps/docs/src/content/docs/en/pages/build/applications/best-practices.mdx @@ -14,27 +14,27 @@ import DocItem from '@aziontech/webkit/doc-item' Most mistakes in the layer between your users and your origin stay invisible until a user meets one. A visitor sees a page you already replaced, or the origin answers requests that a stored copy could have answered. A session cookie reaches a user it was never issued to, or an image arrives heavier or cropped differently than the page asked. -The cause is rarely one wrong value. More often, a cache key varies by something the response ignores, or one TTL covers content that changes at different rates. Or a change is judged before anyone reads the response. +The cause is rarely one wrong value. More often, a [cache key](/en/documentation/platform/applications/cache/cache-keys/), the string Azion files a stored copy under, varies by something the response ignores. Or one time to live (TTL) covers content that changes at different rates, or a change is judged before anyone reads the response. -These practices apply to an [application](/en/documentation/platform/applications/), its [device groups](/en/documentation/platform/applications/device-groups/), the [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) rules that act on its traffic, and the cache settings those rules apply. [How Applications works](/en/documentation/platform/applications/how-it-works/) explains the mechanisms behind them, and [Applications limits](/en/documentation/platform/applications/limits/) holds the value of every bound. +These practices apply to an [Application](/en/documentation/platform/applications/) and its [device groups](/en/documentation/platform/applications/device-groups/). They also cover the [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) rules that act on its traffic, and the cache settings those rules apply. [How Applications works](/en/documentation/platform/applications/how-it-works/) explains the mechanisms behind them, and [Applications limits](/en/documentation/platform/applications/limits/) holds the value of every bound. For the practices of the Functions that an Application runs, refer to [Functions best practices](/en/documentation/platform/functions/best-practices/). -The first two practices apply to the application itself. Sections for Cache, Application Accelerator, and Image Processor follow, one per Product an application can enable, each in the order you meet its decisions. +The first two practices apply to the Application itself: the words a device group matches, and the requests that send the WebSocket upgrade headers. Sections for [Cache](/en/documentation/platform/applications/cache/), [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), and [Image Processor](/en/documentation/platform/applications/image-processor/) follow, one per Platform Resource nested in Applications, each in the order you meet its decisions. --- ## Match a device group on the words that only that device sends -Each device group's regular expression is tested against the `User-Agent` header, and the group a request takes decides its rules and cache variation. `Google Chrome Android` and `Google Chrome Symbian` share `Google Chrome`, so an expression on that name puts both in one group. +A device group is a name and a regular expression that an Application compares with the `User-Agent` header of each request. A rule can match on the group through `${device_group}`, and a cache setting can vary by it. `iPhone` and `iPod` share `iP`, so an expression on `iP` puts both in one group. -Write each expression on the words that set its class of device apart. A group named `Mobile` with `(Mobile|iP(hone|od)|BlackBerry|IEMobile)` catches most mobile devices. +Write each expression on the words that set its class of device apart. This device group, in the form the API accepts, catches most mobile devices: `{ "name": "Mobile", "user_agent": "(Mobile|iP(hone|od)|BlackBerry|IEMobile)" }`. -The cost is coverage: a device of the class whose header carries none of the words falls outside the group. Where two classes share a word, the first matching group in the list wins, as [Device Groups](/en/documentation/platform/applications/device-groups/#match-order) shows. To create a group, refer to [Create device groups](/en/documentation/guides/application-development/getting-started/create-device-groups/). +The cost is coverage: a device of the class whose header carries none of the words falls outside the group. Where two classes share a word, the first matching group in the list wins, as [Device Groups](/en/documentation/platform/applications/device-groups/#match-order) shows. With [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules) on, the log of a request from that class of device shows which rules that test `${device_group}` ran on it. To create a group, refer to [Create device groups](/en/documentation/guides/application-development/getting-started/create-device-groups/). --- ## Send the WebSocket upgrade headers only on requests that open a connection -By default, an application with [WebSocket Proxy](/en/documentation/platform/applications/websocket/) enabled proxies every request that carries `Upgrade: websocket` and `Connection: upgrade` to the origin as a WebSocket connection. It does not check the path. Azion recommends that the application you build control those headers, and send them only where the WebSocket protocol should be used. +By default, an Application with [WebSocket Proxy](/en/documentation/platform/applications/websocket/) turned on proxies every request that carries `Upgrade: websocket` and `Connection: upgrade` to the origin as a WebSocket connection, whatever its path. Control those headers in the application you build, and send them only where the WebSocket protocol should be used. The decision then lives in your client code. The same client also reopens a connection that closes. Azion recycles keepalive connections approximately every 15 minutes, which can close an active WebSocket connection. @@ -44,13 +44,13 @@ A connection that opens returns `101 Switching Protocols`, and any other status, ## Cache -A cache setting decides how long Azion keeps a copy of a response. Kept too long, the copy shows a visitor content the origin already replaced. Kept too briefly, it sends the origin requests that a stored copy could have answered. +A cache setting belongs to one Application and holds how long Azion and the browser keep a response, and what makes two requests different. Kept too long, a copy shows a visitor content the origin already replaced. Kept too briefly, it sends the origin requests that a stored copy could have answered. -These practices apply to the [cache settings](/en/documentation/platform/applications/cache/cache-settings/) of an application and the rules whose _Set Cache Policy_ behavior applies them. The first practice shows a complete cache setting in the form the API accepts, and later practices name only the field they change. The last practice shows how to confirm each change in the response. +These practices apply to the [cache settings](/en/documentation/platform/applications/cache/cache-settings/) of an Application and to the rules that apply those cache settings through the _Set Cache Policy_ behavior. They cover, in order, the TTL, the name of an object, the purge of its variations, Tiered Cache, stale cache, and the cache status of a response. The first practice shows a complete cache setting in the form the API accepts, and later practices name only the field they change. The last practice shows how to confirm each change in the response. ### Match each TTL to how often its content changes -Under _Override cache behavior_, **Max Age** sets the TTL of a copy, and a longer TTL answers more requests but lags further behind the origin. Assets can change only when a deployment replaces them, while a page changes through the day, so one TTL misfits part of the content. +Under the `override` behavior, the Max Age of a cache setting sets the TTL of a copy, in its `modules.cache.max_age` field. A longer TTL answers more requests but lags further behind the origin. Assets can change only when a deployment replaces them, while a page changes through the day, so one TTL misfits part of the content. Give each group of paths that changes at one rate its own cache setting and rule. This setting keeps the assets 86,400 seconds in the browser and 300 seconds at Azion: @@ -64,13 +64,13 @@ Give each group of paths that changes at one rate its own cache setting and rule } ``` -Pages edited during the day get a second setting and rule, with a lower **Max Age**. A **Max Age** under 60 seconds needs Application Accelerator, or the API refuses it with `21021`. For every bound, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache). For the steps, refer to [Create a cache setting](/en/documentation/guides/application-performance/cache-and-purge/tune-cache-settings/). +Pages edited during the day get a second setting and rule, with a lower Max Age. A Max Age under 60 seconds needs Application Accelerator, or the API refuses it with `21021`. For every bound, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache). For the steps, refer to [Create a cache setting](/en/documentation/guides/application-performance/cache-and-purge/tune-cache-settings/). ### Change an object's name when its content changes An object that keeps its name needs a purge of every cache layer and variation each time its content changes. Put a version in the file name instead. The cache treats each version as a separate object, and the first request for it fetches the current bytes from the origin. Any scheme serves, such as a counter, a timestamp, or a content hash, provided different content always gets a different name: `https://static.example.com/assets/image_1.jpg` becomes `https://static.example.com/assets/image_2.jpg`. -No purge is needed for an update to reach users, and a browser that holds the earlier name keeps a valid object. Both versions stay available, so a rollback points your pages at the previous name. The cost is that every reference to the object changes with it, which a build step can automate and a hand edit cannot. +An update reaches users without a purge, and a browser that holds the earlier name keeps a valid object. Both versions stay available, so a rollback points your pages at the previous name. The cost is that every reference to the object changes with it, which a build step can automate and a hand edit cannot. ### Purge an object that varies by cache key or wildcard @@ -87,15 +87,15 @@ Each command prints `Purge carried out successfully`. A variation with many valu ### Keep Tiered Cache for long-lived objects with a stable body -[Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) adds a second cache layer that data centers ask before the origin, so one origin fetch serves them all. Turn it on for long-lived objects with a stable body, with `modules.cache.tiered_cache` set to `{ "enabled": true, "topology": "nearest-region" }`. +[Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) adds a second cache layer between the data center that answers a request and your origin. A valid copy of an object in that layer answers a miss in the first layer, and the origin receives no request. Turn Tiered Cache on for long-lived objects with a stable body, with `modules.cache.tiered_cache` set to `{ "enabled": true, "topology": "nearest-region" }`. -The setting needs `override`, or the API refuses it with `21001`. With Application Accelerator on, the **Max Age** floor is 3 seconds, and a lower value gets `21020`. The cost is one extra hop on a first-layer miss, and the layer does not fit content that changes every few seconds. +The setting needs `override`, or the API refuses it with `21001`. With Application Accelerator on, the Max Age floor is 3 seconds, and a lower value gets `21020`. The cost is one extra hop on a first-layer miss, and the layer misfits content that changes every few seconds. -A _Bypass Cache_ rule does not reach the layer, as [Rule out Tiered Cache before you rely on Bypass Cache](/en/documentation/platform/applications/best-practices/#rule-out-tiered-cache-before-you-rely-on-bypass-cache) explains. To remove an object from both layers, purge Tiered Cache before Cache, as [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#purge) shows. +The layer is outside the reach of a _Bypass Cache_ rule, as [Rule out Tiered Cache before you rely on Bypass Cache](/en/documentation/platform/applications/best-practices/#rule-out-tiered-cache-before-you-rely-on-bypass-cache) explains. To remove an object from both layers, purge Tiered Cache before Cache, as [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#purge) shows. ### Turn on stale cache where an old page is better than an error -With **Stale cache** on, Azion serves a copy past its TTL when revalidating it with the origin fails, while the stale window lasts. The visitor gets the last good version rather than an error page. Set `modules.cache.stale_cache.enabled` to `true` for an article, a listing, or a product page. Keep it off for a price or an availability figure that a visitor decides on. +With stale cache on in a cache setting, Azion serves a copy past its TTL when revalidating it with the origin fails. It does so for the origin's `stale-while-revalidate` value under the `honor` behavior, and for 300 seconds otherwise. The visitor gets the last good version rather than an error page. Set `modules.cache.stale_cache.enabled` to `true` for an article, a listing, or a product page. Keep it off for a price or an availability figure that a visitor decides on. A response served this way reports `STALE` in `x-cache`. For the length of the window, what makes a revalidation fail, and when a purge serves better than expiry, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/#stale-cache). @@ -117,7 +117,9 @@ One response describes one copy on one server, so repeat the request before you Every attribute a cache key varies by multiplies the copies Azion keeps of one URL, one copy per value. When the attribute leaves the response unchanged, those copies carry identical bytes, split the traffic between them, and add keys a purge has to reach. -[Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/) adds the `modules.application_accelerator` object to a cache setting and unlocks Rules Engine behaviors such as _Bypass Cache_ and _Forward Cookies_. While it is off on the application, the API refuses any field of that object with `21013`. The first four practices shape the key, and `x-cache-key` shows what each one adds, as [Read the cache status after every cache change](/en/documentation/platform/applications/best-practices/#read-the-cache-status-after-every-cache-change) explains. +[Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/) unlocks Rules Engine behaviors such as _Bypass Cache_ and _Forward Cookies_, and it lets a cache setting change the fields of its `modules.application_accelerator` object. While it is off in the Application, the API refuses with `21013` a variation in those fields, a `behavior` other than `ignore` or a method in `cache_vary_by_method`. + +The first four practices shape the key: the query string, its order, the cookies, and the session cookies under _Forward Cookies_. `x-cache-key` shows what each of them adds, as [Read the cache status after every cache change](/en/documentation/platform/applications/best-practices/#read-the-cache-status-after-every-cache-change) explains. The last one concerns _Bypass Cache_ and the Tiered Cache layer it leaves untouched. ### Key the cache only on the arguments the response depends on @@ -144,75 +146,63 @@ An empty list is refused with `21018`. Leave off an argument that changes the re Unsorted, the listed arguments join the cache key in the order the client wrote them. `?category=shoes&page=2` and `?page=2&category=shoes` then become two copies of the same response. With `sort_enabled` set to `true` in the same `cache_vary_by_querystring` object, the arguments enter the key in alphabetical order, and both requests land on one copy. -The cost shows at purge time: a URL purge reaches the copy only when it names the arguments in alphabetical order. The Azion CLI sets `sort_enabled` only through `--file` and a JSON body. To see which purge reaches each variation, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). +The cost shows at purge time: a URL purge reaches the copy only when it names the arguments in alphabetical order. When the Azion CLI creates a cache setting, only `--file` and a JSON body set `sort_enabled`. On an update, `--enable-caching-string-sort` sets it. To see which purge reaches each variation, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). ### List only the cookies that segment content -Browsers send every cookie they hold for a domain, and few of them change what the origin returns. Under `all`, an analytics identifier or a consent flag joins the key, and copies multiply with cookie values rather than with content. Under `allowlist`, only the cookies you name vary the key, which is how an application segments content by user profile or another grouping. - -Azion recommends the allowlist when cookies manage user sessions: `behavior` set to `allowlist` and `session_id` in `cookie_names`, under `modules.application_accelerator.cache_vary_by_cookies`. The cost is copies: a cookie unique per visitor means one copy per visitor. For the steps, refer to [Configure Advanced Cache Key for an application](/en/documentation/guides/application-performance/cache-and-purge/advanced-cache-key/). - -### Denylist session cookies where Forward Cookies runs - -The [Forward Cookies](/en/documentation/platform/applications/rules-engine/#forward-cookies) behavior passes the origin's `Set-Cookie` header on to users, cache hits included. A cached response can then hand one user the `Set-Cookie` of another user's session. The remedy Azion documents is the `denylist` behavior of the cookie variation, naming the session cookies that must stay private: `behavior` set to `denylist`, with `session_id` in `cookie_names`. +Browsers send every cookie they hold for a domain, and few of them change what the origin returns. Under `all`, an analytics identifier or a consent flag joins the key, and copies multiply with cookie values rather than with content. Under `allowlist`, only the cookies you name vary the key, which is how an Application segments content by user profile or another grouping. -Put the denylist on the cache setting that the Forward Cookies rule applies through _Set Cache Policy_. A cache setting holds a single cookie behavior, so a segmenting allowlist needs a separate setting. For the steps, refer to [Configure cache policies for an application](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#forward-cookies-from-the-origin-to-the-user). +Use the allowlist when cookies manage user sessions: `behavior` set to `allowlist` and `session_id` in `cookie_names`, under `modules.application_accelerator.cache_vary_by_cookies`. The cost is copies: a cookie unique per visitor means one copy per visitor. For the steps, refer to [Configure Advanced Cache Key for an application](/en/documentation/guides/application-performance/cache-and-purge/advanced-cache-key/). -### Prefer a TTL of 0 seconds where everyone can share the answer +### Allowlist session cookies where Forward Cookies runs -A **Max Age** of 0 and the [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior both keep users from receiving a stored copy. _Bypass Cache_ forwards each request it matches. A TTL of 0 keeps it on the cache path, where simultaneous requests reach the origin as one. +The [Forward Cookies](/en/documentation/platform/applications/rules-engine/#forward-cookies) behavior passes the origin's `Set-Cookie` header on to users, cache hits included. A cached response can then hand one user the `Set-Cookie` of another user's session. Name the session cookie in an allowlist, so each session gets its own key: `behavior` set to `allowlist`, with `session_id` in `cookie_names`. A `denylist` that names `session_id` leaves the cookie out of the key, and the sessions share one object. -Use the TTL of 0 when dynamic content is the same for everyone who asks at the same moment, with `modules.cache.max_age` set to `0`. Use _Bypass Cache_, `{ "type": "bypass_cache" }` in the API, when two requests that arrive together need different answers. With Tiered Cache on, neither holds across both layers: **Max Age** stops at 3 seconds, and _Bypass Cache_ does not reach the layer. For how each one handles a request, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). +Put the allowlist on the cache setting that the Forward Cookies rule applies through _Set Cache Policy_. For the steps, refer to [Configure cache policies for an application](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#forward-cookies-from-the-origin-to-the-user). ### Rule out Tiered Cache before you rely on Bypass Cache -_Bypass Cache_ keeps Azion's cache from storing the origin's response, but the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache) layer is outside the rule's reach. While the rule is active, a layer that the cache settings turn on keeps caching objects for the minimum TTL. The rule shows no trace of it, so a rule that looks right can still leave content cached. +The [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior keeps Azion's cache from storing the origin's response, but the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache) layer is outside the rule's reach. While the rule is active, a layer that the cache settings turn on keeps caching objects for the Max Age of the cache setting, whose floor is 3 seconds with Tiered Cache on. The layer shows only in the cache settings, not in the rule, so a rule that looks right can still leave content cached. -When freshness is the requirement, look for `modules.cache.tiered_cache.enabled` set to `true` in the cache settings that cover the rule's paths. If no layer may keep a copy, decide on Tiered Cache together with the rule. For the symptom a missed layer produces and its fix, refer to [Troubleshoot Applications](/en/documentation/platform/applications/troubleshooting/). +When freshness is the requirement, look for `modules.cache.tiered_cache.enabled` set to `true` in the cache settings that cover the rule's paths. If no layer may keep a copy, decide on Tiered Cache together with the rule. For the symptom a missed layer produces and its fix, refer to [Content is still served from cache after a Bypass Cache rule](/en/documentation/platform/applications/troubleshooting/#content-is-still-served-from-cache-after-a-bypass-cache-rule). --- ## Image Processor -A transformed image can fail a page in three ways. The file outweighs what the page needs, or the crop removes something nobody meant to remove. Or the request fails because of where one parameter sits in the URL. Around the transformation, the cache setting decides how derived images are stored and how often the same work runs again. +A transformed image can fail a page in three ways. The file outweighs what the page needs, or the crop removes something nobody meant to remove. Or the image arrives in a format the client cannot display. Around the transformation, the cache setting decides how derived images are stored and how often the same request reaches Image Processor again. -These practices apply to [Image Processor](/en/documentation/platform/applications/image-processor/settings/): the `ims` query string, the rule whose _Optimize Images_ behavior acts on it, and that rule's cache setting. The first four practices concern the request, and the last two concern the cache setting. +These practices apply to [Image Processor](/en/documentation/platform/applications/image-processor/settings/): the `ims` query string, the rule whose _Optimize Images_ behavior acts on that query string, and that rule's cache setting. The first three practices concern the request: its quality, its resize, and the `Accept` header. The last two concern the cache setting: its allowlist and its TTL. `x-cache` and `x-cache-key` show the result of those two, as [Read the cache status after every cache change](/en/documentation/platform/applications/best-practices/#read-the-cache-status-after-every-cache-change) explains. ### Request quality 85 unless one image needs otherwise -The quality filter controls how hard Image Processor compresses a derived image, exchanging bytes for visual fidelity. Its argument is a whole number from 0 to 100. Azion recommends `?ims=filters:quality(85)`, which optimizes the file without a noticeable loss of visual quality. +The quality filter controls how hard Image Processor compresses a derived image, exchanging bytes for visual fidelity. Its argument is a whole number from 0 to 100. Request `?ims=filters:quality(85)`, which optimizes the file without a noticeable loss of visual quality. A lower value makes the file smaller still, and the delivered image shows the loss. A higher one adds weight that a viewer cannot perceive. Depart from 85 only for an image that must look sharper, or weigh less, than 85 delivers. For the argument and its range, refer to [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#quality). ### Use fit-in when the image must keep its proportions -`?ims=WidthxHeight` fills an exact box, and when the requested shape differs from the source, a centered autocrop trims the overflowing axis. Part of the subject can go with it. `fit-in` places the image inside the same box instead, keeping its aspect ratio and never enlarging it. +`?ims=WidthxHeight` fills an exact box. When the requested shape differs from the source, a centered autocrop trims the axis that overflows. Part of the subject can go with it. `fit-in` places the image inside the same box instead: it keeps the aspect ratio, and the result is at most the size of the original. On a landscape photograph, `?ims=400x400` crops the picture to fill the square. `?ims=fit-in/400x400` keeps the whole picture and falls short of the square on one side. Use the plain resize when the layout needs the box filled, and `fit-in` when no edge may be lost. For each resize form, refer to [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#resize). -### Keep ims as the final query-string parameter - -Image Processor expects `ims` to be the final parameter of the query string. A parameter placed after it may make the request return a `504` error. `example.com/image.jpeg?ims=1000x1000&ts=1234` is the incorrect form, and `example.com/image.jpeg?ts=1234&ims=1000x1000` is the correct one. - -Cache-busting timestamps and tracking values that another system appends follow the same rule. A script that adds a parameter has to insert it ahead of `ims`, not at the end. For the rule, refer to [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#position-of-the-ims-parameter). - -### Add the Accept header that a WEBP or AVIF conversion needs +### Add the Accept header only where every client displays WEBP -A conversion to WEBP or AVIF needs a matching request header. `filters:format(webp)` requires `Accept: image/webp`, and `filters:format(avif)` requires `Accept: image/avif`. In the Request Phase, the [Add Request Header](/en/documentation/platform/applications/rules-engine/#add-request-header) behavior supplies the header, so the conversion no longer depends on what the client sends. +An [Add Request Header](/en/documentation/platform/applications/rules-engine/#add-request-header) behavior with `Accept: image/webp` makes the automatic conversion deliver WEBP to every request the rule matches, including one whose client asked for PNG. A `filters:format()` filter does not need it: the response carries the named format whatever `Accept` header the request carries. Add the header only when every client of those paths displays WEBP. -A rule that converts to WEBP carries `{ "type": "add_request_header", "attributes": { "value": "Accept: image/webp" } }`. The API rejects the type `add_header` with `10039`. Keep each value in step with the format its `ims` string requests. For the conversion filter, refer to [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#format-conversion). For the criteria that limit a rule to image requests, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#rules-engine-behaviors). +The API takes the behavior as `{ "type": "add_request_header", "attributes": { "value": "Accept: image/webp" } }` in the Request Phase of the rule, and it rejects the type `add_header` with `10039`. For the conversion filter, refer to [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#format-conversion). For the criteria that limit a rule to image requests, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#rules-engine-behaviors). ### Put ims in the allowlist of the cache setting that serves images `ims` carries the transformation, so it is an argument the response depends on. [Key the cache only on the arguments the response depends on](/en/documentation/platform/applications/best-practices/#key-the-cache-only-on-the-arguments-the-response-depends-on) applies to it. The cache setting that the image rule applies sets `fields` to `["ims"]` under an `allowlist`. -The difference is a second Product: `cache_vary_by_querystring` belongs to `modules.application_accelerator`, so keying the cache on `ims` needs Application Accelerator, even though transforming an image does not. For the Azion Console controls that set the field, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#cache-variation). +The difference is a second Platform Resource: `cache_vary_by_querystring` belongs to `modules.application_accelerator`, so this allowlist needs Application Accelerator, even though transforming an image does not. For the Azion Console controls that set the field, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#cache-variation). ### Keep derived images cached as long as their sources allow -Image Processor counts each transformation, whether a resize, a crop, a format conversion, or a filter, against the monthly Images meter. A request the cache answers runs no transformation and adds nothing. A short **Max Age** makes it redo the same transformation on a timer unrelated to changes at the source. +Image Processor adds one image to the monthly Images meter for each request it processes, whether the request resizes, crops, converts, or filters it. A request the cache answers runs no transformation and adds nothing. A short Max Age sends the same request to Image Processor again on a timer unrelated to changes at the source. -Give the cache setting for derived images the longest `modules.cache.max_age` its source content tolerates, up to 31,536,000 seconds. The cost is freshness. A replaced source image leaves its derived versions, one key per processing and per format, cached until they expire or a purge removes them. For the images each plan includes, refer to [Applications limits](/en/documentation/platform/applications/limits/#image-processor). +Give the cache setting for derived images the longest `modules.cache.max_age` its source content tolerates, up to 31,536,000 seconds. The cost is freshness. A replaced source image leaves its derived versions, one key per processing and per format, cached until they expire or a purge removes them. For the images each plan includes, refer to [Azion pricing](https://www.azion.com/en/pricing/). --- @@ -221,7 +211,7 @@ Give the cache setting for derived images the longest `modules.cache.max_age` it Every variable, operator, and behavior the rules on this page combine. - What each cache variation does to the key, and the behaviors the Product unlocks. + What each cache variation does to the key, and the behaviors that Application Accelerator unlocks. The rule and the cache setting that the Image Processor practices assume, built step by step. The procedures that apply these practices, one task per guide. diff --git a/apps/docs/src/content/docs/en/pages/build/applications/glossary.mdx b/apps/docs/src/content/docs/en/pages/build/applications/glossary.mdx index 85ade1f4c1..e06ee8e2aa 100644 --- a/apps/docs/src/content/docs/en/pages/build/applications/glossary.mdx +++ b/apps/docs/src/content/docs/en/pages/build/applications/glossary.mdx @@ -1,78 +1,59 @@ --- title: Glossary -description: What application, rule, phase, criterion, behavior, cache setting, cache key, Tiered Cache, and the other terms in the Applications documentation mean. +description: Look up what Application, rule, phase, criterion, behavior, cache setting, cache key, Tiered Cache, and the other Applications terms mean. meta_tags: 'applications, glossary, terms, cache, application accelerator, image processor, rules engine, cache key' namespace: documentation_products_applications_glossary permalink: /documentation/platform/applications/glossary/ --- -[Applications](/en/documentation/platform/applications/) and the Products enabled on an application, [Cache](/en/documentation/platform/applications/cache/), [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), and [Image Processor](/en/documentation/platform/applications/image-processor/), use each term in this table in a sense of their own. +Definitions for the terms the [Applications](/en/documentation/platform/applications/) documentation uses, including those of [Cache](/en/documentation/platform/applications/cache/), [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), and [Image Processor](/en/documentation/platform/applications/image-processor/). | Term | Definition | | --- | --- | -| action | The name other platforms give to what a rule does to a request it matches, which an application calls a behavior. A rule that routes by path elsewhere transfers with its match condition as criteria, its action as behaviors, and its backend server as a connector. [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#behaviors) lists every behavior. | -| Add Request Header | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that adds a header in the `Field: value` form to the request, in the **Request Phase**, `add_request_header` in the API. A request that Image Processor converts to WEBP must carry `Accept: image/webp`, and this behavior adds it. The API refuses the name `add_header` with `10039 Invalid Choice`. | -| Advanced Cache Key | The feature that varies the cache key by parts of a request beyond the URL: the query string, cookies, device groups, and the request method. It needs Application Accelerator on the application, and a cache setting configures it through its four **Cache vary by** controls. Azion Console names no control after it: the controls sit in the **Application Accelerator** section of the cache setting, which [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) documents. | -| allowlist | The value of the `behavior` field of a **Cache vary by** control that varies the cache key only by the attributes the cache setting names, and ignores every other one the request carries. The **Behavior** dropdown of Azion Console shows it as _Allowlist_. It bounds how many objects a variation creates, because an attribute the setting does not name produces no further object; [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) lists the values each control accepts. | -| application | An instance of Applications, the Platform Resource that holds the logic a workload runs on its requests, set in the **Main Settings**, **Device Groups**, **Cache Settings**, **Functions Instances**, and **Rules Engine** tabs. A new application starts with Cache and Functions on, Application Accelerator and Image Processor off, and no rules. A [workload](/en/documentation/platform/workloads/) selects it in the **Application** field of its **Deployment Settings**, the API serves it at `/v4/workspace/applications`, and [Applications](/en/documentation/platform/applications/) documents the resource. | -| Application Accelerator | The Product enabled on an application that puts the rest of a request into the cache key. Its switch, **Application Accelerator** in **Main Settings** › **Modules**, is off on a new application and unlocks cache variation, the caching of `POST` and `OPTIONS` responses, a **Max Age** below 60 seconds, seven Rules Engine behaviors, and the `${request_uri}` and `${device_group}` variables. [Applications](/en/documentation/platform/applications/#application-accelerator) describes it, and the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path) follows a request through it. | -| autocrop | The centered crop a `WidthxHeight` resize can apply so the derived image fills the requested box, vertically or horizontally depending on how the original dimensions fit the requested ones. Setting one dimension to `orig` prevents it, as [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#resize) shows. | -| behavior | The action a rule runs on the requests its criteria match, such as **Set Cache Policy**, **Set Connector**, or **Run Function**. A rule runs its behaviors in the order it lists them, a finalizing behavior stops every behavior and rule after it, and [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) names the Product each behavior needs. On a cache setting, `behavior` is also the field of each **Cache vary by** control, and [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) lists the values of each. | -| Bypass Cache | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior that sends every request its rule matches to the origin and keeps the response out of Azion's cache, `bypass_cache` in the API. It runs in the **Request Phase**, requires Application Accelerator, leaves the browser cache to **Set Cache Policy**, and differs from a TTL of 0 seconds, as [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0) explains. It does not reach [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache): an application with active Tiered Cache settings keeps caching objects in that layer for the minimum TTL. | -| Cache | The Product enabled on an application that stores copies of responses on Azion's distributed infrastructure and answers later requests from them. Its switch in **Main Settings** › **Modules** carries the helper text "Automatically enabled in all accounts.", and a new application reports `modules.cache.enabled` as `true`. [Applications](/en/documentation/platform/applications/#cache) describes it, and the [Cache overview](/en/documentation/platform/applications/cache/#request-path) follows a request through it. | -| cache key | The index entry under which Cache stores an object, case sensitive. In Cache, the default setting ignores the query string, so the key concatenates the scheme, host, and path, as in `httpsstatic.example.com/page/site.js`, and each variation adds to it: a method prefix, the query string arguments a setting names, or a value after the `@@` separator. In Image Processor, the cache setting that serves images names `ims` in its query string allowlist, and a converted image carries its format after `@@`; [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#key-format) documents every form. | +| Add Request Header | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that adds a header in the `Field: value` form to the request, in the Request Phase, `add_request_header` in the API. With `Accept: image/webp`, it makes the automatic conversion of Image Processor deliver WEBP to every request its rule matches. The API refuses the name `add_header` with `10039 Invalid Choice`. | +| Advanced Cache Key | A Feature of Application Accelerator that varies the cache key by parts of a request beyond the URL: the query string, cookies, device groups, and the request method. It needs Application Accelerator on in the Application, and each cache setting configures it in its `modules.application_accelerator` object, through the four Cache vary by controls. [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) documents each control and where it sits in Azion Console and the API. | +| Application | The entity that runs its rules on the requests received by a [Workload](/en/documentation/platform/workloads/), once that Workload's deployment sets that Application. A new Application starts with Cache and Functions on, Application Accelerator and Image Processor off, and no rules. The **Application** field of a Workload's **Deployment Settings** in Azion Console sets it, the API serves your Applications at `/v4/workspace/applications`, and [Applications](/en/documentation/platform/applications/) documents the Platform Resource. | +| Application Accelerator | A Platform Resource nested in Applications that unlocks four capabilities for the cache and the rules of an Application: cache variation, the caching of `POST` and `OPTIONS` responses, a Max Age below 60 seconds, and the Rules Engine behaviors that Azion Console marks _- Required Application Accelerator_, with the `${request_uri}` and `${device_group}` variables. It is off in a new Application, `modules.application_accelerator.enabled` in the API, and with cache variation, a cache setting can add the query string, cookies, the device group, or the request method to the cache key. [Applications](/en/documentation/platform/applications/#application-accelerator) describes it, and the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path) follows a request through it. | +| autocrop | The centered crop that a `WidthxHeight` resize can apply so the derived image fills the requested box. The crop is vertical or horizontal, depending on how the original dimensions fit the requested ones, as [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#resize) shows. | +| behavior | The action a rule runs on the requests its criteria match, such as _Set Cache Policy_, _Set Connector_, or _Run Function_. A rule runs its behaviors in the order it lists them, a behavior that ends the processing stops the behaviors and rules after it in its phase, and [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) names the Platform Resource each behavior needs. On a cache setting, `behavior` is also the field of each Cache vary by control, and [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) lists the values of each. | +| Bypass Cache | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior that sends a matching request to the origin and keeps the response out of Azion's cache, `bypass_cache` in the API. It runs in the Request Phase, requires Application Accelerator, leaves the browser cache to _Set Cache Policy_, and differs from a TTL of 0 seconds, as [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0) explains. It acts on Azion's cache only, so an Application with active Tiered Cache settings keeps caching objects in the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache) layer for the Max Age of the cache setting. | +| Cache | A Platform Resource nested in Applications that stores copies of the responses to the requests received by an Application, to serve later requests for the same object from those copies. Each copy stays in the data center that stored it. It is always on in an Application: the API refuses `modules.cache.enabled` set to `false` with `31001`, and Azion Console shows the **Cache** switch locked on, with the note `Automatically enabled in all accounts.` [Applications](/en/documentation/platform/applications/#cache) describes it, and the [Cache overview](/en/documentation/platform/applications/cache/#request-path) follows a request through it. | +| cache key | The index entry under which Cache stores an object, case sensitive. In Cache, the default setting ignores the query string, so the key concatenates the scheme, host, and path, as in `httpsstatic.example.com/page/site.js`, and each variation adds a value after the `@@` separator: under `allowlist` and `denylist`, that value includes the query string arguments a setting names, but under `all`, the whole query string follows the path, before `@@`. When the cache setting that serves images names `ims` in its allowlist, the key carries the `ims` query string after `@@`, and a converted image carries its format at the end. Under the default setting, the `ims` value is not part of the key, so every size and processing of the path shares a key, and the first one stored answers every `ims` value; [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#key-format) documents every form. | | cache key purge | A [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#cache-key-purge) type, `cachekey` in the API, that clears the objects stored under each key of a list. A key can name one variation, by query string, cookie, or image format, so a purge of every variation of an object lists each key. It is the only purge type that reaches the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#purge) layer. | -| cache setting | The object, created with **+ Cache** on the **Cache Settings** tab of an application, that holds how long Azion's cache and the browser keep a response and what makes two requests different. Its **Browser Cache** and **Cache** sections carry **Max Age**, **Stale cache**, **Large file optimization**, and **Tiered Cache**, and its **Application Accelerator** section carries the four **Cache vary by** controls. It belongs to one application and applies to no request until a **Set Cache Policy** rule names it; [Cache settings](/en/documentation/platform/applications/cache/cache-settings/) documents every field. | -| cache status | The state of a response in Cache, at the start of the `x-cache` header: `HIT`, `MISS`, `EXPIRED`, `STALE`, `UPDATING`, `REVALIDATED`, or `BYPASS`. A response the platform does not cache reports `-`. [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#cache-status) gives the meaning of each one. | -| cache variation | In Cache, a further copy of an object stored under its own key because the request method, a query string argument, a cookie, a device group, an image format, or a byte range of a large file differs. In Image Processor, the `cache_vary_by_querystring` field that varies the cache on `ims`, set through its **Behavior**, **Fields**, and **Sort** controls, as [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#cache-variation) shows. Every **Cache vary by** control requires Application Accelerator, because its fields belong to `modules.application_accelerator`, while processing an image does not; [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) documents the four controls. | -| Cache vary by Cookies | The cache setting control that varies the cache key by the value of named cookies, `cache_vary_by_cookies` in the API. It carries a `behavior` and, in `cookie_names`, the list of cookies the behavior applies to. | -| Cache vary by Devices | The cache setting control that varies the cache key by [device group](/en/documentation/platform/applications/device-groups/), `cache_vary_by_devices` in the API. It carries a `behavior` and, in `device_group`, the list of device groups the behavior applies to. | -| Cache vary by Method | The cache setting control that names the request methods whose responses Azion caches, `cache_vary_by_method` in the API and empty by default. It accepts `POST`, `OPTIONS`, or both, sent as `post` and `options`, and nothing else. Without Application Accelerator on the application, the API refuses a value with `21013`. | -| Cache vary by Query String | The cache setting control that varies the cache key by named query string arguments, `cache_vary_by_querystring` in the API. It carries a **Behavior**, the **Fields** the behavior applies to, one per line in Azion Console, and **Sort**. | -| complex request | A request whose method is anything other than `GET` or `HEAD`. Azion prefixes the method to the cache key of a complex request, as in `optionshttpsstatic.example.com/page`, so an `OPTIONS` response and a `GET` response for one path are separate objects. [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#variations) lists the prefix with the other variations. | -| connector | The object an application sends requests to so they reach your origin, created in [Connectors](/en/documentation/platform/connectors/), the Platform Resource that took over the settings once made under **Origins**. A rule with the **Set Connector** behavior selects it by ID. One connector can reach several origins and distribute traffic among them through [Load Balancer](/en/documentation/platform/connectors/load-balancer/). | -| criterion | A single condition inside a rule: a variable such as `${uri}`, a comparison operator, and an argument when the operator takes one, sent in the API as `variable`, `operator`, `conditional`, and `argument`. Criteria combine with `and` and `or`, `and` takes implicit precedence, and the API carries them as an array of groups, `[[{...}]]`. [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) lists every variable and operator. | -| Debug Rules | The **Main Settings** section that logs the Rules Engine rules each request ran, `debug` in the API and off on a new application. With it on, executed rules appear in the `$traceback` field in Data Stream and [Real-Time Events](/en/documentation/platform/real-time-events/), and in the `stacktrace` field of the [Real-Time Events GraphQL API](/en/documentation/devtools/graphql/gql-real-time-events-fields/). To read those logs, refer to [Debug rules created with Rules Engine](/en/documentation/guides/application-development/getting-started/debug-rules/). | -| denylist | The value of the `behavior` field of a **Cache vary by** control that varies the cache key by every attribute the request carries except the ones the cache setting names. The **Behavior** dropdown shows it as _Denylist_, and [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) lists the controls that accept it. | -| derived image | The output Image Processor builds from the source image on the origin and returns to a request carrying an `ims` query string. Azion keeps no derived image as a stored asset, and the original stays untouched. The [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path) describes how a request produces one. | -| device group | A named set of devices that an application recognizes by matching the `User-Agent` header of a request against a regular expression, created on the **Device Groups** tab. A rule tests it through the `${device_group}` variable, which requires Application Accelerator, and **Cache vary by Devices** varies the cache key by it. [Device Groups](/en/documentation/platform/applications/device-groups/) documents the matching. | -| edge hostname | The name other platforms give to the hostname they assign to the configuration that serves your domains. On Azion it is the workload domain, which Azion assigns to a new workload under `map.azionedge.net`. Domains belong to the [workload](/en/documentation/platform/workloads/), not to the application, and the [Applications quickstart](/en/documentation/platform/applications/quickstart/) sends a first request to the workload domain. | +| cache setting | A set of values that tell Cache how to store and serve a response: the TTLs of Azion's cache and of the browser, and the inputs that tell two requests apart. It belongs to one Application and carries Max Age, stale cache, Large File Optimization, and Tiered Cache, plus the four Cache vary by controls in its `modules.application_accelerator` object. It acts only through a rule that applies that cache setting with _Set Cache Policy_ to the requests the rule matches; [Cache settings](/en/documentation/platform/applications/cache/cache-settings/) documents every field, and [Cache quickstart](/en/documentation/platform/applications/cache/quickstart/) creates a first one. | +| cache status | The state of a response in Cache, at the start of the `x-cache` header: `HIT`, `MISS`, `EXPIRED`, `STALE`, `UPDATING`, `REVALIDATED`, or `BYPASS`. A response that Azion does not store reports `-` while Application Accelerator is on, but with it off, a `GET` or `HEAD` response that is not stored reports `MISS`, with `x-cache-expires-in: 0`. [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#cache-status) gives the meaning of each one. | +| cache variation | A further copy of an object stored under its own key because the request method, a query string argument, a cookie, a device group, an image format, or a byte range of a large file differs. While Application Accelerator is off in the Application, the API refuses a variation with `21013`, and that includes the query-string variation on `ims` that [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#cache-variation) describes. Image Processor processes an image whether Application Accelerator is on or off; [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) documents the four controls. | +| Connector | The entity that routes the requests of an Application to your origin, once a rule sets the ID of that Connector in the _Set Connector_ behavior. It belongs to [Connectors](/en/documentation/platform/connectors/), the Platform Resource that replaces the origins that earlier versions of Applications configured on the Application. With [Load Balancer](/en/documentation/platform/connectors/load-balancer/) enabled, one Connector of the `http` type can spread traffic across several origins. | +| criterion | A single condition inside a rule: a variable such as `${uri}`, a comparison operator, and an argument when the operator takes one, sent in the API as `variable`, `operator`, `conditional`, and `argument`. Inside a group, criteria combine with `and` and `or`, and `and` takes precedence over `or`. The groups of a rule are joined by `and`, and the API carries them as an array of groups, `[[{...}]]`. [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) lists every variable and operator. | +| Debug Rules | The setting of an Application that logs the Rules Engine rules each request ran, `debug` in the API and off in a new Application. With it on, the rules that ran appear in the `$traceback` field in Data Stream and [Real-Time Events](/en/documentation/platform/real-time-events/), and in the `stacktrace` field of the [Real-Time Events GraphQL API](/en/documentation/devtools/graphql/gql-real-time-events-fields/). [Main Settings](/en/documentation/platform/applications/main-settings/#debug-rules) shows where to turn it on in Azion Console, and [Debug rules created with Rules Engine](/en/documentation/guides/application-development/getting-started/debug-rules/) shows how to read those logs. | +| derived image | The image that Image Processor builds from the source image on the origin. Image Processor returns it without saving it as an asset of the account, and the source image stays unchanged. The [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path) describes how a request produces one. | +| device group | A name and a regular expression that an Application compares with the `User-Agent` header of each request. A request belongs to the group when its header matches the expression. Each device group belongs to one Application, and a rule tests it through the `${device_group}` variable, which requires Application Accelerator. [Cache vary by Devices](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) varies the cache key by it, and [Device Groups](/en/documentation/platform/applications/device-groups/) documents the matching. | | filter | The `ims` component that transforms an image beyond a resize or a crop, written `filters:name(argument)`, as in `filters:quality(15)`. One `ims` string combines several filters, separated by `:`. [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/) documents `rotate`, `quality`, `watermark`, `format`, and `fill`. | -| `fit-in` | The `ims` prefix that fits the derived image inside a `WidthxHeight` box and keeps the aspect ratio of the source image, as in `?ims=fit-in/400x400`. An image smaller than the box is not scaled up and keeps its original size. Both dimensions are optional, and [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#resize) shows each form. | -| Forward Cookies | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that sends the `Set-Cookie` header of the origin to the user even when the response comes from cache. It runs in the **Request Phase** and requires Application Accelerator. | -| function instance | The object that attaches a function created in [Functions](/en/documentation/platform/functions/) to an application, with the arguments it runs with, listed on the **Functions Instances** tab and served by the API at `/v4/workspace/applications//functions`. A rule with the **Run Function** behavior invokes it, naming its ID in `attributes.value`. [Function instances](/en/documentation/platform/applications/functions-instances/) documents its fields. | -| Image Processor | The Product enabled on an application that returns a derived image built from a source image on the origin, following the `ims` query string of the request. Its switch, **Image Processor** in **Main Settings** › **Modules**, is off on a new application, `modules.image_processor.enabled` in the API and `--image-processor` in Azion CLI. [Applications](/en/documentation/platform/applications/#image-processor) describes it, and the [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path) follows a request through it. | -| Images | The usage meter that counts the images Image Processor processes, whether to optimize, crop, resize, filter, or convert them. Each request Image Processor handles counts as one image, and an image served from cache without processing does not count. [Applications limits](/en/documentation/platform/applications/limits/#image-processor) carries the volume each plan includes, and [Pricing](/en/documentation/fundamentals/pricing/#image-processor) carries the rate. | -| `imagesProcessedMetrics` | The GraphQL dataset holding request metrics for the images that went through Image Processor. [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#usage-and-event-data) lists it with the other surfaces that report Image Processor activity. | -| `images_processed` | The `metricName` of the consumption GraphQL query that returns the total number of images Image Processor processed, under `productId` `1441110021`. [Query usage data from Image Processor](/en/documentation/guides/platform/observability/query-image-processor-usage-data-with-graphql/) carries the full query. | -| `ims` | The query string parameter that tells Image Processor which transformation to apply, as in `?ims=400x`. It goes last in the URL, because a request that carries another parameter after `ims=` may return a `504` error. [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#position-of-the-ims-parameter) documents every value it accepts and its position. | -| `ims_http` | The value of the **Proxy Upstream** field in a [Real-Time Events](/en/documentation/platform/real-time-events/) record when Image Processor answered as the upstream. In some cases Image Processor is the origin of [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/), processing the image and then caching it. | -| Large File Optimization | The Cache feature, turned on per cache setting with the **Large file optimization** toggle, that stores a large object as fragments of 1,024 kB. Azion caches each fragment when a user requests it, under its own cache key ending in `@@bytes=-`, and the feature applies to Tiered Cache too when that layer is on. [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/#large-file-optimization) describes the mechanism. | -| Main Settings | The application tab whose four sections are **General**, which carries the name, **Modules**, **Debug Rules**, and **Status**. Delivery and protocol settings are not on it, because they belong to the [workload](/en/documentation/platform/workloads/) that serves the application. [Main Settings](/en/documentation/platform/applications/main-settings/) documents each section. | -| match condition | The name other platforms give to the test that decides whether a rule acts on a request, which an application calls a criterion. Criteria combine with `and` and `or`, and [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#criteria) lists every variable and operator. | -| Max Age | The Azion Console field for how many seconds Azion's cache keeps a copy of an object, `modules.cache.max_age` in the API, with a default of `60` in the Console, the API, and the CLI. The API refuses a value below 60 with `21021` while Application Accelerator is off, a value below 3 with `21020` while Tiered Cache is on, and a value above `31536000` with `10068`. The **Browser Cache** section carries a **Max Age** of its own, `browser_cache.max_age`; [Applications limits](/en/documentation/platform/applications/limits/#application-accelerator) carries the bounds that depend on the Products turned on. | -| `modules` | The API object that carries the switches of an application, `application_accelerator`, `cache`, `functions`, and `image_processor`, each with an `enabled` value. Azion Console renders it as the **Modules** section of **Main Settings**, whose **Default Modules** are the same four, beside a **Subscription modules** group with a **Contact sales** action. Tiered Cache has no key there, because it is a switch inside a cache setting. | -| Optimize Images | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that turns on Image Processor for the requests its rule matches, `optimize_images` in the API. It runs in the **Request Phase**, takes no arguments, and requires Image Processor on the application. The API accepts it alone in a rule, with no **Set Cache Policy** beside it. | -| `orig` | The `ims` dimension value that keeps the original measurement of the source image on one axis, while the other axis takes the requested value. A derived image with an `orig` dimension is not autocropped, as [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#resize) shows. | -| phase | One of the two stages in which an application runs rules: the **Request Phase**, which handles the request before a response exists, and the **Response Phase**, which handles the response delivered to the user. You choose the phase when you create a rule, and it cannot be changed afterward, so a rule in the other phase is a new rule. Caching is decided in the **Request Phase**, and [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) lists the phases each variable and behavior is available in. | -| property | The name other platforms give to the configuration that serves a site: its hostnames and the rules applied to their requests. On Azion it is two objects: a [workload](/en/documentation/platform/workloads/) holds the domains, protocols, and certificates, and the application its deployment names holds the rules. [How Applications works](/en/documentation/platform/applications/how-it-works/#the-path-a-request-travels) follows a request through both. | -| Real-Time Purge | The Platform Resource that clears objects from Cache or Tiered Cache ahead of their TTL, so the origin serves the latest version on the next request. A purge names its objects by URL, by cache key, or by a wildcard expression, and Azion queues it after the confirmation message and lists it in the history once it completes. [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) documents the three types and the layer each one reaches. | -| route | The name other platforms give to a path pattern and what serves the requests that match it. On an application it is a **Request Phase** rule: a criterion on `${uri}` matches the path, and **Set Connector** sends the request to a connector. Two such rules send `/api/` to one origin and every other path to another, as [How Applications works](/en/documentation/platform/applications/how-it-works/#the-path-a-request-travels) shows. | -| rule | An entry in Rules Engine for Applications that runs its behaviors, in one phase, on the requests its criteria match. Rules run in the order you arrange them, and a new application has none: you create each one with **+ Rule**, naming it in **General** before you choose its **Phase**. The API serves the rules of the **Request Phase** at `/v4/workspace/applications//request_rules`, and [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) lists their fields. | -| Rules Engine for Applications | The feature of an application that holds its rules and runs them in order, with if-then logic: the criteria are the if, and the behaviors are the then. Azion Console shows it as the **Rules Engine** tab, with the rules grouped by phase. [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) documents every variable, operator, and behavior. | -| Run Function | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that runs a function instance on the requests its rule matches, `run_function` in the API with the instance ID in `attributes.value`. It runs in the **Request Phase** and the **Response Phase**, and it needs the **Functions** switch on in **Main Settings** › **Modules**. [Function instances](/en/documentation/platform/applications/functions-instances/#run-function-behavior) documents how it names the instance. | -| Set Cache Policy | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior that names a cache setting and puts it in effect for the requests its rule matches, `set_cache_policy` in the API with the cache setting ID in `attributes.value`. It runs in the **Request Phase** and does not require Application Accelerator. A cache setting that no **Set Cache Policy** rule names applies to no request, and the API refuses to delete a setting in use with `21014 Cannot Delete Cache Setting`. | -| Set Connector | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that sends the requests its rule matches to a [connector](/en/documentation/platform/connectors/), `set_connector` in the API with the connector ID in `attributes.value`. It runs in the **Request Phase**, and when more than one matching rule carries it, only the last one runs. | -| Sort | The **Cache vary by Query String** control that groups the same query string arguments under one cache key whatever order they arrive in, `sort_enabled` in the API and off by default. Without it, `?a=1&b=2` and `?b=2&a=1` are two objects that hold one response. With it, a URL purge has to send the arguments in alphabetical order. | -| source image | The original image, stored on the origin, that Image Processor reads to answer a request carrying an `ims` query string. Azion writes nothing back to it, because each transformation yields a derived image and leaves the original where it is. The [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path) describes the path between the two. | -| stale cache | The Cache behavior that answers with an expired copy for the length of a stale window when revalidation with the origin fails, turned on per cache setting with the **Stale cache** toggle. Under _Honor cache policies_ the window is the `stale-while-revalidate` value of the origin, and under _Override cache behavior_, or when the origin omits the directive, it is 300 seconds. During the window Azion fetches a fresh version in the background, as [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/#stale-cache) describes. | -| Tiered Cache | The second cache layer between Azion's cache and the origin, kept in one region, shared by every data center, and holding objects longer than the first layer. Every plan includes it, and its **Tiered Cache** toggle sits in a cache setting rather than in **Main Settings**. The setting must use _Override cache behavior_, or the API answers `21001`, and a **Max Age** of at least 3 seconds; [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) covers the regions it runs in and the purge type that clears it. | -| topology | The Tiered Cache setting that selects the region where the second cache layer holds objects, such as `nearest-region` or `us-east-1`, in `modules.cache.tiered_cache.topology`. The API refuses a value it does not accept with `10039 Invalid Choice`, and [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#topology) documents each region. | -| TTL | The number of seconds Azion's cache or the browser keeps a copy of an object, set per [cache setting](/en/documentation/platform/applications/cache/cache-settings/) by **Max Age**: `modules.cache.max_age` for Azion's cache and `browser_cache.max_age` for the browser. | +| `fit-in` | The `ims` prefix that fits the derived image inside a `WidthxHeight` box and keeps the aspect ratio of the source image, as in `?ims=fit-in/400x400`. An image smaller than the box keeps its original size. Both dimensions are optional, and [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#resize) shows each form. | +| Forward Cookies | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that sends the `Set-Cookie` header of the origin to the user even when the response comes from cache. It runs in the Request Phase and requires Application Accelerator. | +| Function Instance | The entity that binds one of your [Functions](/en/documentation/platform/functions/) to one Application or one [Firewall](/en/documentation/platform/firewall/), with the arguments it runs with. The API serves the Function Instances of an Application at `/v4/workspace/applications//functions`, and a rule with the _Run Function_ behavior invokes a Function Instance by its ID in `attributes.value`. [Function Instances](/en/documentation/platform/applications/functions-instances/) documents its fields. | +| Image Processor | A Platform Resource nested in Applications that builds a new image, the derived image, from an image on the origin of an Application. It is off in a new Application, and each Application turns it on separately, in `modules.image_processor.enabled` in the API or with `--image-processor` in Azion CLI. [Applications](/en/documentation/platform/applications/#image-processor) describes it, and the [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path) follows a request through it. | +| `ims` | The query string parameter that tells Image Processor which transformation to apply, as in `?ims=400x`. It can sit anywhere in the query string, and an `ims` value that Image Processor cannot parse returns the source image without a transformation. [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/#position-of-the-ims-parameter) documents every value it accepts and its position. | +| Large File Optimization | A Feature of Cache that stores a large object as fragments of 1,024 kB, off by default and turned on per cache setting in `modules.cache.large_file_cache.enabled`. Azion caches each fragment when a user requests it, under its own cache key ending in `@@bytes=-`, and the Feature applies to Tiered Cache too when that layer is on. [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/#large-file-optimization) describes the mechanism. | +| Main Settings | The set of values that apply to an Application as a whole: its name, the Platform Resources turned on in it, whether it logs the rules each request runs, and whether it is active. Azion Console groups them in the **Main Settings** tab of the Application, in four sections: **General**, which carries the name, **Modules**, **Debug Rules**, and **Status**. Delivery and protocol settings belong to the [Workload](/en/documentation/platform/workloads/) that receives the requests, not to Main Settings. [Main Settings](/en/documentation/platform/applications/main-settings/) documents each section. | +| Max Age | The cache setting field for how many seconds Azion's cache keeps a copy of an object, `modules.cache.max_age` in the API, with a default of `60` in Azion Console, the API, and the CLI. The API refuses a value below 60 with `21021` while Application Accelerator is off, a value below 3 with `21020` while Application Accelerator and Tiered Cache are both on, and a value above `31536000` with `10068`. The browser cache has a Max Age of its own, `browser_cache.max_age`; [Applications limits](/en/documentation/platform/applications/limits/#application-accelerator) carries the bounds that depend on the Platform Resources turned on. | +| `modules` | The API object that carries the switches of an Application, `application_accelerator`, `cache`, `functions`, and `image_processor`, each with an `enabled` value. Azion Console renders it as the **Modules** section of [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources), whose **Default Modules** are the same four, beside a **Subscription modules** group with a **Contact sales** action. Tiered Cache is not one of these switches: each cache setting turns it on in its own `modules.cache.tiered_cache.enabled` field. | +| Optimize Images | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that applies Image Processor to the requests its rule matches, `optimize_images` in the API. It runs in the Request Phase, takes no arguments, and requires Image Processor on in the Application. The API accepts it alone in a rule, with no _Set Cache Policy_ beside it. | +| phase | One of the two stages in which an Application runs rules: the Request Phase, on the request before a response exists, and the Response Phase, on the response delivered to the user. You set the phase of a rule when you create it, and you cannot change it later, so a rule in the other phase is a new rule. Caching is decided in the Request Phase, and [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) lists the phases each variable and behavior is available in. | +| Real-Time Purge | A Platform Resource that removes cached objects from Cache or Tiered Cache before their TTL ends. Once an object is in neither Cache nor Tiered Cache, the next request for it fetches the current version from the origin. A purge names its objects by URL, by cache key, or by a wildcard expression, and Azion queues it and lists it in the purge history once it completes. [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) documents the three types and the layer each one reaches. | +| rule | An entry in Rules Engine for Applications that runs its behaviors, in one phase, on the requests its criteria match. Each rule carries a name and its phase, rules run in the order you arrange them, and a new Application has none. The API serves the rules of the Request Phase at `/v4/workspace/applications//request_rules` and those of the Response Phase at `/v4/workspace/applications//response_rules`, and [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) lists their fields. | +| Rules Engine for Applications | A Feature of Applications that holds the rules of an Application. The Application runs them in order as if-then logic, with the criteria as the if and the behaviors as the then. Azion Console shows it as the **Rules Engine** tab of each Application, with the rules grouped by phase. [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) documents every variable, operator, and behavior. | +| Run Function | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that invokes a Function Instance on the requests its rule matches, `run_function` in the API with the Function Instance ID in `attributes.value`. It runs in the Request Phase and in the Response Phase, which accepts only Functions written in Lua, and it needs Functions on in the Application, `modules.functions.enabled` in the API. [Function Instances](/en/documentation/platform/applications/functions-instances/#run-function-behavior) documents how it references the Function Instance. | +| Set Cache Policy | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior that applies a cache setting to a matching request, `set_cache_policy` in the API with the cache setting ID in `attributes.value`. It runs in the Request Phase and works with Application Accelerator on or off. A cache setting acts only through a rule that carries this behavior, and the API refuses to delete a setting in use with `21014 Cannot Delete Cache Setting`. | +| Set Connector | The [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) behavior that routes the requests its rule matches to a [Connector](/en/documentation/platform/connectors/), `set_connector` in the API with the Connector ID in `attributes.value`. It runs in the Request Phase, and when more than one matching rule carries it, only the last one runs. | +| source image | The image file on the origin that Image Processor reads to build a derived image. Image Processor reads it without changing it, and each transformation yields a separate derived image. The [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path) describes the path between the two. | +| stale cache | A Feature of Cache that can answer with an expired copy during a stale window, when a revalidation attempt with the origin fails. Each cache setting turns it on in `modules.cache.stale_cache.enabled`, and the window is the `stale-while-revalidate` value of the origin under _Honor cache policies_, or 300 seconds under _Override cache behavior_ or when the origin omits the directive, as [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/#stale-cache) describes. | +| Tiered Cache | A Feature of Cache that adds a second cache layer between the data center that answers a request and the origin, in the region the topology of the cache setting selects. The first layer is the cache of that data center. On a miss in the first layer, the data center asks the Tiered Cache layer before the request goes to the origin, and each cache setting turns Tiered Cache on in its own `modules.cache.tiered_cache.enabled` field, on every plan. The setting must use _Override cache behavior_, or the API answers `21001`, and, with Application Accelerator on, a Max Age of at least 3 seconds; [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) covers the regions it runs in and the purge type that clears it. | +| TTL | Time to live: the number of seconds Azion's cache or the browser keeps a copy of an object. Under _Honor cache policies_, the `Cache-Control` and `Expires` headers the origin sends set it. When a [cache setting](/en/documentation/platform/applications/cache/cache-settings/) overrides them, its Max Age sets it: `modules.cache.max_age` for Azion's cache and `browser_cache.max_age` for the browser. | | URL purge | A [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#url-purge) type, `url` in the API, that clears the object behind each URL of a list. It is not recursive, and Azion converts each URL to its cache key without the variations, so an object that varies by cookie, device group, or image format needs a cache key or wildcard purge. Sent without a scheme, a URL clears the HTTP and the HTTPS copy alike. | -| variable | A value of the request or the response, written `${name}`, that a criterion tests or a behavior argument inserts, such as `${uri}`, `${host}`, or `${device_group}`. Each variable is available in the **Request Phase**, the **Response Phase**, or both. On an application, `${request_uri}` requires Application Accelerator, and a rule that uses it without that Product is refused with `25047 Missing Required Modules`, while the same rule with `${uri}` is accepted. | -| WASM Image Processor | The WebAssembly library that processes images inside a [Functions](/en/documentation/platform/functions/) function, through `loadImage`, `resize`, `getImageResponse`, and `clean`, for the `webp`, `jpeg`, and `png` formats. It is not the Image Processor Product: Image Processor transforms a request through the `ims` query string, and the library runs inside your code. [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#wasm-image-processor-library) points to its reference. | -| WebSocket Proxy | The application feature that keeps a WebSocket connection, a single bidirectional TCP connection, open between your users and your origin. An application with it on treats a request that carries `Upgrade: websocket` and `Connection: upgrade` as a WebSocket connection and proxies it to the origin, and a valid connection answers `101 Switching Protocols`. [WebSocket Proxy](/en/documentation/platform/applications/websocket/) documents its requirements and availability. | -| wildcard purge | A [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#wildcard-purge) type, `wildcard` in the API, that clears every object matching one expression carrying `*` in its path or query string. An expression can carry more than one `*`, but a request carries one expression, and the API refuses a second with `10065`. It does not reach the Tiered Cache layer, and a wildcard purge sent to that layer is refused with `30001`. | +| variable | A value of the request or the response, written `${name}`, that a criterion tests or a behavior argument inserts, such as `${uri}`, `${host}`, or `${device_group}`. Each variable is available in the Request Phase, the Response Phase, or both, as [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#variables) lists. In an Application, `${request_uri}` requires Application Accelerator, and a rule that uses it while Application Accelerator is off is refused with `25047 Missing Required Modules`, while the same rule with `${uri}` is accepted. | +| WASM Image Processor | The WebAssembly library that processes images inside a [Function](/en/documentation/platform/functions/), through `loadImage`, `resize`, `getImageResponse`, and `clean`, for the `webp`, `jpeg`, and `png` formats. It is separate from the Image Processor Platform Resource: Image Processor transforms a request through the `ims` query string, and the library runs inside your code. [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#wasm-image-processor-library) points to its reference. | +| WebSocket Proxy | A Feature of Applications that carries a WebSocket connection, a single bidirectional TCP connection, between your users and your origin. An Application with it on treats a request that carries `Upgrade: websocket` and `Connection: upgrade` as a WebSocket connection and proxies it to the origin, and a valid connection answers `101 Switching Protocols`. [WebSocket Proxy](/en/documentation/platform/applications/websocket/) documents its requirements and availability. | +| wildcard purge | A [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#wildcard-purge) type, `wildcard` in the API, that clears every object matching one expression carrying `*` in its path or query string. An expression can carry more than one `*`, but a request carries one expression, and the API refuses a second with `10065`. It clears Azion's cache only: a wildcard purge sent to the Tiered Cache layer is refused with `30001`. | | `x-cache` | The debug response header that carries the cache status of a response, the IP address of the server that answered, and the protocol, in the form ` from with `. A request has to carry `Pragma: azion-debug-cache` for Azion to add it to the response. [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#debug-headers) lists every status it can carry. | -| `x-cache-key` | The debug response header that carries the cache key of a response, as in `x-cache-key: httpsstatic.example.com/page/site.js`. It comes back only on a request sent with `Pragma: azion-debug-cache`, and it reads `x-cache-key: -` on a response the platform does not cache. [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#key-format) breaks the key down element by element. | +| `x-cache-key` | The debug response header that carries the cache key of a response, as in `x-cache-key: httpsstatic.example.com/page/site.js`. It comes back only on a request sent with `Pragma: azion-debug-cache`, and it reads `x-cache-key: -` on a response that Azion does not store while Application Accelerator is on. [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#key-format) breaks the key down element by element. | diff --git a/apps/docs/src/content/docs/en/pages/build/applications/how-it-works.mdx b/apps/docs/src/content/docs/en/pages/build/applications/how-it-works.mdx index b3bd8d4b1c..ebc901c3e5 100644 --- a/apps/docs/src/content/docs/en/pages/build/applications/how-it-works.mdx +++ b/apps/docs/src/content/docs/en/pages/build/applications/how-it-works.mdx @@ -1,6 +1,6 @@ --- title: How Applications works -description: Follow a request through an application, from the workload to the origin, and see where Cache, Application Accelerator, and Image Processor act on it. +description: Trace a request through an Application, from its Workload to the origin, and see where Cache, Application Accelerator, and Image Processor act on it. meta_tags: 'applications, how it works, request path, request phase, response phase, rules engine, connector, origin, workload, cache, application accelerator, image processor' namespace: documentation_products_applications_how_it_works permalink: /documentation/platform/applications/how-it-works/ @@ -9,88 +9,152 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -A request for a page, a file, or an API route does not have to travel all the way to the server that holds the content. A layer in front of that server can read the request first and decide what happens to it. It can answer from a copy it stored earlier, add or remove a header, or choose which server receives the request. On the way back, the same layer can change the response before the client sees it. +Between a client and your content, a layer can read each request first, whether the request asks for a page, a file, or an API route. The layer then decides what happens to the request. It can run code that builds the response with no server behind it, stand in front of the server that holds your content, or do both. In front of that server, it can answer with a copy of a response that the server sent earlier, add or remove a header, or choose the server that receives the request. When a response comes back from that server, the same layer can change it before the client receives it. -On Azion, that layer is an [application](/en/documentation/platform/applications/), an instance of the Applications Platform Resource. A [workload](/en/documentation/platform/workloads/) receives the request on its domain, and the workload's deployment names the application that handles it. The application decides through its rules, written in [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/), in two phases. Request Phase rules act on the request, and Response Phase rules act on the response delivered to the user. A rule whose _Set Connector_ behavior names a [connector](/en/documentation/platform/connectors/) sends the request to the origin. +On Azion, that layer is an Application. [Applications](/en/documentation/platform/applications/) is a Platform Resource that processes the requests received by your [Workloads](/en/documentation/platform/workloads/), on Azion's distributed infrastructure, from the data center nearest to your user. Each request reaches an Application through a Workload, which receives the request on one of its domains. The Workload's deployment sets the Application that processes the request. -Three Products enabled on an application act along that path. Cache answers from a stored copy, and Application Accelerator puts more of the request into the key that finds it. Image Processor builds a resized or converted image from the one on the origin. +The Application acts on the request through its rules, which you write in [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/). Each rule belongs to one of two phases: Request Phase rules act on the request, and Response Phase rules act on the response that the user receives. To send the request to the origin, a Request Phase rule uses the _Set Connector_ behavior, which sets the [Connector](/en/documentation/platform/connectors/) that routes the request there. A rule can also run your code on the request: the _Run Function_ behavior invokes a [Function Instance](/en/documentation/platform/applications/functions-instances/) of one of your [Functions](/en/documentation/platform/functions/). -This page covers the mechanisms rather than the fields: every variable, operator, and behavior is on Rules Engine for Applications, and every bound is on [Applications limits](/en/documentation/platform/applications/limits/). The sections follow the path a request travels, the two phases, how rules run, what a new application has, and propagation. Cache, Application Accelerator, and Image Processor close the page, in that order. A WebSocket connection, which an application proxies to the origin, has a page of its own: [WebSocket Proxy](/en/documentation/platform/applications/websocket/). +Three Platform Resources nested in Applications act along the path from the Workload to the origin, each with its own switch in the Application. [Cache](/en/documentation/platform/applications/cache/) answers with a stored copy of an earlier response. [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) unlocks four capabilities for the cache and the rules of an Application. Among them, cache variation adds more of the request, such as a cookie or a query-string argument, to the cache key, the index under which Cache files each copy. [Image Processor](/en/documentation/platform/applications/image-processor/) builds a resized or converted image from an image on the origin. + +This page explains the mechanisms, and two other pages hold the fields: Rules Engine for Applications lists every variable, operator, and behavior, and [Applications limits](/en/documentation/platform/applications/limits/) lists every bound. The sections follow a request along its path, then cover the two phases, how rules run, what a new Application has, and propagation. After them, one section each covers Cache, Application Accelerator, and Image Processor. [WebSocket Proxy](/en/documentation/platform/applications/websocket/) covers, on its own page, the WebSocket connections that an Application proxies to the origin, and [How Functions works](/en/documentation/platform/functions/how-it-works/) covers how a Function runs. --- ## The path a request travels -An application handles no request until a workload names it. The binding lives on the workload's deployment, not on the application. In Azion Console it is the **Application** field of the workload's **Deployment Settings**. The same deployment can name a [firewall](/en/documentation/platform/firewall/), and a request then crosses the firewall before it reaches the application. Domains, protocols, and certificates belong to the workload as well, so an application carries no delivery settings of its own. +Creating an Application does not put it in the path of any request: a request reaches the Application only after a Workload's deployment sets that Application. The relation is stored on the deployment, not on the Application, and in Azion Console you set it in the **Application** field of the Workload's **Deployment Settings**. The deployment can also set a [Firewall](/en/documentation/platform/firewall/), and the request then crosses the Firewall before the Application receives it. The domains, protocols, and certificates are on the Workload too, so you configure delivery on the Workload, not on the Application. -The application record names no origin either. An application created through the API with only `name` and `active` returns its `modules`, `active`, and `debug` fields, and nothing that points to a server. A request reaches an origin because a rule sends it there: a Request Phase rule whose _Set Connector_ behavior names a connector. The connector holds the address of the origin. Azion Console states that origins have been redesigned as connectors. +The Application does not store an origin either: a request reaches an origin only when a Request Phase rule sends it there with the _Set Connector_ behavior. That behavior sets a Connector, and the Connector holds the address of the origin. The API shows this: an Application created with only `name` and `active` comes back with `modules`, `active`, and `debug`, and with no field that points to a server. Connectors replace the origins that earlier versions of Applications configured on the Application. In place of an origin, a Function can answer a request: a rule runs the Function with _Run Function_, and the Function builds the response with no Connector. -This diagram follows one request, from the workload it reaches to the response the client receives: +The diagram follows one request on the path to an origin, from the client to the response it receives. Solid arrows carry the request, and dotted arrows carry the response. Each label starts with the number of its step below. ```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% flowchart TD - Client["A client sends a request to the domain of a workload"] --> Fw{"Does the workload's deployment name a firewall?"} - Fw -->|"Yes"| Firewall["The firewall runs its rules first and can stop the request"] - Fw -->|"No"| Req["The application runs its Request Phase rules, in order"] - Firewall -->|"The request continues"| Req - Req -->|"A behavior ends the processing, such as a deny"| Answer["The application answers the client"] - Req --> Copy{"Did a Set Cache Policy rule apply, and is a valid copy stored?"} - Copy -->|"Yes"| Stored["The stored copy answers, and the origin is not asked"] - Copy -->|"No"| Conn["The connector that a Set Connector rule names takes the request to the origin"] - Conn --> Origin["The origin answers"] - Stored --> Resp["The application delivers the response, and its Response Phase rules act on it"] - Origin --> Resp - Resp --> Done["The client receives the response"] + Client(["Client"]) + WL["Workload"] + FW["Firewall"] + App["Application"] + Cache["Cache"] + Conn["Connector"] + Origin[["origin server"]] + Client -->|"1. request"| WL + WL -->|"1. with a Firewall"| FW + WL -->|"1. without a Firewall"| App + FW -->|"1. allowed"| App + FW -.->|"1. refusal"| Client + App -.->|"2. Deny (403)"| Client + App -->|"3. cache setting"| Cache + Cache -.->|"3. valid copy"| App + App -->|"4. no valid copy"| Conn + Conn -->|"4. request"| Origin + Origin -.->|"4. response"| Conn + Conn -.->|"4. response"| App + App -.->|"5. response"| Client ``` -1. A client sends a request to the domain of a workload. When the workload's deployment names a firewall, the firewall runs its rules first and can stop the request there. -2. The application that the deployment names runs its Request Phase rules, in order. A behavior that ends the processing, such as _Deny (403 Forbidden)_, answers the client, and nothing after it runs. -3. When a _Set Cache Policy_ rule applied a cache setting and a valid copy is stored, the copy answers, and the origin is not asked. -4. Otherwise, the connector that a _Set Connector_ rule names takes the request to the origin, and the origin answers. -5. The application delivers the response, its Response Phase rules act on it, and the client receives it. +1. The client sends the request to one of the Workload's domains. When the Workload's deployment also sets a Firewall, the Firewall runs its rules first and can refuse the request. +2. The Application that the deployment sets runs its Request Phase rules, in order. When a behavior ends the processing, as _Deny (403 Forbidden)_ does, the Application answers the client, and no later behavior or rule runs. +3. When a _Set Cache Policy_ rule applied a cache setting, Cache looks for a valid copy of the origin response. If it finds one, that copy becomes the response, and the origin receives no request. +4. Otherwise, the Connector set by a _Set Connector_ rule routes the request to the origin, and the origin's response returns through that Connector. +5. The Application runs its Response Phase rules on the response, and the client receives the result. -Choosing the origin per request is what lets one application send `/api/` to one server and every other path to another, with two rules and two connectors. The price is that nothing reaches an origin by default. With no rule that names a connector, an application has no origin to send a request to, and a new application has no rules. For the first rule that sends an application's requests to an origin, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +Because a rule chooses the origin of each request, one Application can route `/api/` to one server and every other path to another, with two rules and two Connectors. The cost is that no request reaches an origin by default: a new Application has no rules, so no Connector is set for its requests. To create the first rule that routes an Application's requests to an origin, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). --- ## Request and response phases -Every rule of an application belongs to one of two phases, and the application runs them in a fixed sequence. Request Phase rules run when the request arrives, before the application has a response to work on. Response Phase rules run when the application delivers the response to the user, and each delivery is handled on its own. The phase is chosen in the **Phase** section when the rule is created, and it cannot be changed afterward. To run the same logic in the other phase, you create a new rule there. +Each rule of an Application belongs to one phase, and the two phases run in a fixed order: the Request Phase before a response exists, then the Response Phase on the response that the Application delivers. You set the phase of a rule when you create it, and you cannot change it later. In the API, the endpoint that receives the rule sets its phase: `request_rules` or `response_rules`. To run the same logic in the other phase, add a second rule in that phase. + +The diagram follows a request on the path to an origin. Solid arrows carry the request, and dotted arrows carry the response. Each label starts with the number of its step below. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Client"]) + ReqRules["Application: Request Phase rules"] + RespRules["Application: Response Phase rules"] + Cache["Cache"] + Conn["Connector"] + Origin[["origin server"]] + Client -->|"1. request"| ReqRules + ReqRules -->|"2. Set Cache Policy"| Cache + ReqRules -->|"2. Set Connector, Bypass Cache"| Conn + Conn -->|"2. request"| Origin + Cache -.->|"3. stored copy"| RespRules + Origin -.->|"3. response"| Conn + Conn -.->|"3. response"| RespRules + RespRules -.->|"4. response"| Client +``` -What each phase can read follows from that sequence. A Request Phase rule reads what the request carries, such as its URI, its headers, and its cookies, but nothing about the response, which does not exist yet. A Response Phase rule can also read what came back, such as `${status}` and the headers the origin sent. Each phase offers its own set of behaviors as well: _Set Connector_, _Set Cache Policy_, _Bypass Cache_, and _Optimize Images_ run only in the Request Phase. +1. The request arrives, and the Request Phase rules run on it first. They can read what the request carries, such as its URI, its headers, and its cookies, but nothing about the response, which does not exist yet. +2. These rules decide the cache and the origin. _Set Cache Policy_ applies a cache setting, _Bypass Cache_ sends the request past the cache, and _Set Connector_ sets the Connector that routes the request to the origin. These three behaviors and _Optimize Images_ run only in the Request Phase. In this phase, _Add Request Header_ adds a header to the request that the origin receives. +3. The response comes back: either a copy of an origin response that Cache stored, or the origin's response through the Connector. +4. The Response Phase rules run on that response, once for each delivery to the user. They can also read what came back, such as `${status}` and the headers the origin sent. In this phase, _Add Response Header_ adds a header to the response that the user receives. -The cache is decided in the Request Phase. A _Set Cache Policy_ rule chooses the cache setting for the request, and a _Bypass Cache_ rule sends it past the cache. The response is unknown at that point, so a rule cannot choose a cache setting from the status code the origin returns: `${status}` is readable only in the Response Phase, and _Set Cache Policy_ runs only in the Request Phase. +Because the Request Phase runs first, the cache is decided before the response exists. A rule cannot apply a cache setting based on the status code that the origin returns, because `${status}` is readable only in the Response Phase, and _Set Cache Policy_ runs only in the Request Phase. -Some behaviors work in both phases and change their target with the phase. _Add Request Header_ adds a header to the request sent to the origin, and the same behavior in a Response Phase rule adds it to the response sent to the user. _Redirect To_ in a Response Phase rule runs only when the origin returns `404`. For example, a Response Phase redirect can send a user to another page when the origin has nothing at the path, while a request for a path that exists passes untouched. _Run Function_ also works in both phases, and the function instance form in Azion Console states the limit for the second one: `Only Lua functions can be used in the Response phase.` For the variables and behaviors each phase accepts, refer to [Phases](/en/documentation/platform/applications/rules-engine/#phases). +Some behaviors work in both phases, and the phase limits what they do. In a Response Phase rule, _Redirect To_ runs only when the origin returns `404`. So a redirect in that phase can send the user to another page when the origin has nothing at the path, and leave the requests for existing paths untouched. _Run Function_ also works in both phases, but the Response Phase accepts only Functions written in Lua. The Function Instance form in Azion Console states this limit: `Only Lua functions can be used in the Response phase.` [Phases](/en/documentation/platform/applications/rules-engine/#phases) lists the variables and behaviors that each phase accepts. --- ## How rules run -Inside a phase, an application runs its rules in their order. Each rule compares its criteria with the request, and a rule whose criteria match runs its behaviors in the order they are arranged. A rule whose criteria do not match runs nothing, and the application moves to the next rule. The application continues until every rule of the phase has run or a behavior ends the processing. For the variables, operators, and conditionals that criteria combine, refer to [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#criteria). +Within one phase, the Application takes its rules one at a time, in their order. It stops when every rule of the phase has run or when a behavior ends the processing. -Each rule carries an `order`, which the platform assigns as rules are created, starting at `0` for the first rule of a phase. The **Rules Engine** list in Azion Console can be reordered, and the API reorders a phase with one call. Some behaviors cannot be added to the same rule together, or only under some conditions, and the Console refuses those combinations. +Solid arrows follow one request through the rules of one phase. Each label starts with the number of its step below. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Req(["request"]) + Next["Application: next rule, in order"] + Match{"criteria match?"} + Run["Application: behaviors of the rule, in order"] + Stop["Application: processing stopped"] + Done["Application: phase complete"] + Req -->|"1. enters the phase"| Next + Next -->|"2. rule found"| Match + Match -->|"2. no"| Next + Match -->|"3. yes"| Run + Run -->|"4. a behavior ends it"| Stop + Run -->|"5. no behavior ends it"| Next + Next -->|"5. no rule left"| Done +``` + +1. The request enters a phase, and the Application takes the first rule of that phase. +2. The Application compares the criteria of the rule with the request. If they do not match, the rule runs nothing, and the Application moves to the next rule. +3. If they match, the rule runs its behaviors one after another, in the order you arranged them. +4. When one of those behaviors ends the processing, nothing after it runs in the phase. +5. Otherwise, the Application moves to the next rule, until no rule of the phase is left. + +[Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#criteria) lists the variables, operators, and conditionals that criteria combine. + +The position of a rule is its `order`. The platform assigns it when you create the rule, starting at `0` for the first rule of each phase. You can change the order of the rules in Azion Console, or reorder one phase with a single API call. + +Some behaviors cannot share a rule, and the API and Azion Console both refuse those combinations. [Behaviors](/en/documentation/platform/applications/rules-engine/#behaviors) lists them. ### Behaviors that repeat -Several matching rules can carry the same behavior, and the type of the behavior decides what happens. A behavior of the Set type, such as _Set Connector_, does not add up: only the one from the last rule whose criteria matched runs. For example, take a rule that names a connector for every path, followed by a rule that names another connector for `/api/`. A request to `/api/` matches both, and it goes through the connector of the second rule. +When several rules match a request and carry the same Set behavior, such as _Set Connector_, the behavior does not accumulate: only the one in the last matching rule runs. For example, a first rule sets a Connector for every path, and a second rule sets another Connector for `/api/`. A request to `/api/` matches both rules, so the Connector of the second rule routes it. -A behavior of the Add type adds up instead. _Add Cookie_ and _Add Request Header_ run once for every rule that carries them, so the same name and value added by two rules arrive as two identical entries. +_Add Request Header_ does not repeat a header either: when two matching rules add a header with the same name, the origin receives it once, with the value of the last of those rules. -Rule order therefore decides the outcome as much as the rules do. A broad rule early in the list sets a default, and a narrow rule later in the list overrides it for the requests it matches. The cost is that reordering the list can change which connector a path reaches, with no change to any rule. +So the order of the rules shapes the result as much as their content does. A broad rule near the top sets a default, and a narrower rule further down overrides that default for the requests it matches. The same mechanism has a cost: moving a rule in the list can change the Connector that a path reaches, even though no rule changed. ### Behaviors that end the processing -Some behaviors finish the processing of the request, and no behavior or rule after them runs. _Deny (403 Forbidden)_ answers with a `403 Forbidden` page. _Deliver_ delivers the content to the user, and _Redirect To_ sends the user to another URL with `301` or `302`. _Finish Request Phase_ ends the Request Phase: the behaviors after it in its rule, and the rules after that rule, do not run. +Some behaviors stop the processing of a request, and nothing after them runs: no later behavior in their rule, and no later rule. _Deny (403 Forbidden)_ answers with a `403 Forbidden` page, _Deliver_ delivers the content to the user, and _Redirect To_ sends the user to another URL with a `301` or `302` status. _Finish Request Phase_ ends the Request Phase at the point where it runs, so the rest of its rule and every later rule of that phase are skipped. -A behavior that ends the processing is both a shortcut and a trap. Placed early, it settles the request before any later rule works on it. Placed before a rule you still need, it keeps that rule from running for every request the earlier rule matches. To see which rules ran on a request, turn on **Debug Rules** in **Main Settings**. For more information, refer to [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules). +An ending behavior saves work, and it can also hide a rule. Early in the list, it settles the request before later rules spend time on it. Placed before a rule that you still need, it stops that rule for every request that the earlier rule matches. With Debug Rules on, [Real-Time Events](/en/documentation/platform/real-time-events/) and [Data Stream](/en/documentation/platform/data-stream/) show which rules each request ran. Debug Rules is the `debug` field of the Application in the API, and [Main Settings](/en/documentation/platform/applications/main-settings/#debug-rules) shows where to turn it on in Azion Console. --- -## What a new application has +## What a new Application has -A new application starts with two Products on and no rules. Created through the API with only `name` and `active`, an application returns these fields: +A new Application has two switches on, Cache and Functions, and no rules. When you create an Application through the API with only `name` and `active`, the response carries these fields: ```json { @@ -105,11 +169,11 @@ A new application starts with two Products on and no rules. Created through the } ``` -The list of its request rules comes back empty, with `count` set to `0`. In Azion Console, the Products sit in the **Modules** section of **Main Settings**, whose **Default Modules** are **Application Accelerator**, **Cache**, **Functions**, and **Image Processor**. The **Cache** switch carries the note `Automatically enabled in all accounts.` Tiered Cache has no switch there, because it is a toggle inside each cache setting. For each switch and its API field, refer to [Main Settings](/en/documentation/platform/applications/main-settings/#products). +Its list of request rules is empty, with `count` at `0`. The four keys of `modules` are the four switches of an Application, and [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) shows each one in Azion Console and the API. Cache cannot be turned off: the API refuses `false` in `modules.cache.enabled` with `31001`, and in Azion Console the **Cache** switch is locked on, with the note `Automatically enabled in all accounts.` [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) is not one of these switches: it is a Feature of Cache, and each cache setting turns it on in its `modules.cache.tiered_cache.enabled` field. -Cache being on does not mean that anything is cached. A cache setting reaches a request only when a rule applies it, and a new application has neither cache settings nor rules. Cache on a new application therefore stores nothing until you create a cache setting and a _Set Cache Policy_ rule that names it. +Cache is on, but it stores copies only after a rule applies a cache setting, and a new Application has no cache settings and no rules. Cache starts storing copies once you create a cache setting and a _Set Cache Policy_ rule that applies it. -A Product that is off keeps its options out of reach. In the **Rules Engine** form, Azion Console marks an option that needs one with _- Required Application Accelerator_, _- Required Image Processor_, or _- Required Function_. The API refuses a rule that uses one. For example, a request rule whose criterion reads `${request_uri}`, on an application with Application Accelerator off, returns `400` with this body: +While a switch is off, the rule options that depend on it are unavailable. The **Rules Engine** form in Azion Console labels each of those options with _- Required Application Accelerator_, _- Required Image Processor_, or _- Required Function_, and the API refuses a rule that uses one. For example, on an Application with Application Accelerator off, a request rule with a criterion on `${request_uri}` returns `400` with this body: ```json { @@ -130,49 +194,51 @@ A Product that is off keeps its options out of reach. In the **Rules Engine** fo } ``` -The same rule with `${uri}` in place of `${request_uri}` is accepted, because `${uri}` needs no Product. Gating keeps a rule from depending on a Product the application does not run. It costs a choice between two variables: `${uri}` holds the decoded URI without the query string, and `${request_uri}`, which keeps the query string, needs Application Accelerator. For the variables and behaviors each Product adds, refer to [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#behaviors). +The API accepts the same rule with `${uri}` instead of `${request_uri}`, because `${uri}` depends on no Platform Resource. This check keeps a rule from relying on a Platform Resource that is off in the Application. The trade-off is a choice between two variables: `${uri}` holds the decoded URI without the query string, while `${request_uri}` keeps the query string and needs Application Accelerator. [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#behaviors) lists the variables and behaviors that each Platform Resource adds. --- ## Propagation -A change to an application does not reach traffic at once. It propagates across Azion's distributed infrastructure, and no duration is guaranteed. Applying a new rule to an application that already serves traffic can take a few minutes. A new workload answers with Azion's placeholder `404` until its binding to the application propagates, which can take several minutes. +A change to an Application reaches traffic only after it propagates across Azion's distributed infrastructure, and Azion guarantees no propagation time. A new rule on an Application that already serves traffic can take a few minutes to apply. The deployment of a new Workload can take several minutes to propagate, and until it does, the Workload answers with Azion's placeholder `404`. -During the rollout, the answers alternate. One request returns the placeholder `404`, and the next returns the application's response, depending on which data center answers. A single request after a change therefore proves little: a workload that answered once can return the placeholder on the next request. Send the request again until it answers as expected and the answers agree. +While a change propagates, the answers alternate, because each request can reach a different data center. One request returns the placeholder `404`, and the next returns the Application's response. One correct answer after a change does not prove that the change is live, because the next request can still return the placeholder. Repeat the request until every answer is the one you expect. -A firewall named by the same deployment can enter the path much later than the application. A domain that answers therefore does not mean the firewall is in the path yet. For more information, refer to [Firewall](/en/documentation/platform/firewall/). +A Firewall that the same deployment sets can join the path much later than the Application. So a domain that already answers can still serve requests that skip the Firewall. To see how a Firewall acts on requests, refer to [Firewall](/en/documentation/platform/firewall/). --- ## Cache -A cache keeps a copy of an origin response in the data center that fetched it. Later requests for the same object are answered from that copy, and the origin is not asked again. The copy is filed under a cache key built from the request, and it is kept for a time to live, the TTL. When the TTL ends, the copy expires, and the next request checks the origin. +A cache stores a copy of an origin response in the data center that fetched it. Later requests for the same object get that copy, and the origin receives no request for them. Each copy is filed under a cache key, built from the request, and kept for its time to live (TTL). When the TTL ends, the copy expires, and the next request for that object checks with the origin. + +In an Application, Cache stores those copies, and it is on in every Application you create. A cache setting belongs to one Application and holds the TTLs and the inputs that make two requests different. A cache setting acts only through a Request Phase rule, which applies that cache setting with _Set Cache Policy_ to the requests that the rule matches. _Bypass Cache_ does the opposite and sends the request past the cache. -On an application, Cache is the Product that keeps those copies, and it is on for every application you create. A cache setting, created with **+ Cache** on the **Cache Settings** tab, holds the TTLs and what makes two requests different. A Request Phase rule with _Set Cache Policy_ applies a cache setting to the requests it matches, and a rule with _Bypass Cache_ sends a request past the cache. Every field and its default are on [Cache settings](/en/documentation/platform/applications/cache/cache-settings/), and the full key format is on [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). Cache variation by query string, cookie, device group, and method belongs to [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). To create a first cache setting and the rule that applies it, refer to [Cache quickstart](/en/documentation/platform/applications/cache/quickstart/). +[Cache settings](/en/documentation/platform/applications/cache/cache-settings/) lists every field and its default, and [Cache keys](/en/documentation/platform/applications/cache/cache-keys/) gives the full key format. To vary the cache by query string, cookie, device group, or method, you need [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). [Cache quickstart](/en/documentation/platform/applications/cache/quickstart/) creates a first cache setting and the rule that applies it. -For where Cache acts on a request, refer to the [Cache overview](/en/documentation/platform/applications/cache/#request-path), and for how long a copy lives and what ends it, to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). +The [Cache overview](/en/documentation/platform/applications/cache/#request-path) shows where Cache acts on a request, and [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/) explains how long a copy lives and what ends it. --- ## Application Accelerator -A cache finds a stored copy through a key built from the request, and a key built from the URL alone assumes that one URL has one correct response. Dynamic content breaks that assumption. Under a single URL, a signed-in visitor sees their own cart, a listing reorders on a filter, and a layout changes on a phone. A cache that keys by URL alone then serves one visitor's response to another, or the path stops being cached at all. +A cache key built from the URL alone assumes that each URL has one correct response. Dynamic content breaks that assumption: under a single URL, a signed-in visitor sees their own cart, a listing reorders when a filter changes, and the layout differs on a phone. With a key built from the URL alone, the cache either serves one visitor's response to another, or it cannot cache the path at all. -On an application, Application Accelerator is the Product that removes the assumption. One switch, **Application Accelerator** in **Main Settings** › **Modules**, turns it on for that application alone, and the switch is off on a new application. The variations it allows sit in the **Application Accelerator** section of a cache setting, which is the `modules.application_accelerator` object of the setting in the API. If you have written a `Vary` header or a cache-key rule before, the model transfers: you name the inputs that make two requests different. Field names, types, and defaults are on [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/), and the TTL bounds are on [Applications limits](/en/documentation/platform/applications/limits/#application-accelerator). To turn the switch on and vary a first cache setting, refer to [Application Accelerator quickstart](/en/documentation/platform/applications/application-accelerator/quickstart/). +In an Application, Application Accelerator unlocks cache variation, which removes that assumption, and three more capabilities for dynamic content. It is off in a new Application, and each Application turns it on separately, in its `modules.application_accelerator.enabled` field in the API. Each cache setting then holds its own variations, in its own `modules.application_accelerator` object. If you have written a `Vary` header or a cache-key rule, the model is the same: you list the inputs that make two requests different. [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/) lists each field, its type, and its default, and [Applications limits](/en/documentation/platform/applications/limits/#application-accelerator) gives the TTL bounds. To turn Application Accelerator on and add a first variation to a cache setting, refer to [Application Accelerator quickstart](/en/documentation/platform/applications/application-accelerator/quickstart/). -For how a variation changes the cache key, refer to the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path), and for what the switch unlocks and what a variation costs, to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/). +The [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path) shows how a variation changes the cache key, and [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/) explains what turning it on unlocks and what each variation costs. --- ## Image Processor -An image on a page often has to arrive in several sizes, crops, and formats, one for each layout and browser. Building every variant ahead of time means storing one file per variant and rebuilding them all when the original changes. A transformation applied when a request asks for it works from one original instead: the URL describes the variant, and the platform builds it on demand. +A page often needs the same image in several sizes, crops, and formats, one for each layout and browser. Preparing every variant in advance means one stored file per variant, and a rebuild of all of them whenever the original changes. Transforming the image at request time avoids both: the URL describes the variant, and the platform builds it from one original when a request asks for it. -On an application, Image Processor is the Product that builds those variants. The URL carries the description in the `ims` query string. Image Processor applies it to the source image on the origin and returns the result, the derived image. The source is never modified, and the derived image is never stored as an asset of its own. One file therefore answers every size, crop, quality, and format a page asks for. +In an Application, Image Processor builds those variants. The request URL describes the variant in its `ims` query string, and Image Processor applies that description to the source image on the origin. Even with no `ims` query string, Image Processor can convert the image to a format the browser accepts. The result, the derived image, is what the client receives. Image Processor reads the source image without changing it, and it returns the derived image without saving it as an asset of the account. So one file on the origin serves every size, crop, quality, and format that a page requests. -The switch, **Image Processor** in **Main Settings** › **Modules**, is off on a new application. The operations `ims` accepts are on [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/), and the headers and behaviors are on [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/). To request a first derived image, refer to [Image Processor quickstart](/en/documentation/platform/applications/image-processor/quickstart/). +Image Processor is off in a new Application, and each Application turns it on separately, in its `modules.image_processor.enabled` field in the API. Even when it is on, Image Processor acts only on the requests that a Request Phase rule with _Optimize Images_ matches. [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/) lists the operations that `ims` accepts, and [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/) covers the headers and behaviors. To turn Image Processor on and request a first derived image, follow [Image Processor quickstart](/en/documentation/platform/applications/image-processor/quickstart/). -For where Image Processor acts on a request, refer to the [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path), and for how the delivered format is chosen and where Image Processor stops, to [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/). +The [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path) shows where Image Processor acts on a request, and [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/) explains how the delivered format is chosen and where Image Processor stops. --- @@ -180,9 +246,9 @@ For where Image Processor acts on a request, refer to the [Image Processor overv - Every variable, operator, and behavior a rule combines, by phase, with the Product each one requires. - The switch of each Product, Debug Rules, and the API fields behind the defaults of a new application. - The shortest path from a new application to a rule that sends its requests to an origin. - The recommendations that follow from these mechanisms, for the application and for each Product enabled on it. + The variables, operators, and behaviors of each phase, with the Platform Resource that each one needs. + Each switch, Debug Rules, and the API fields behind the defaults of a new Application. + Create the first rule that routes the requests of a new Application to your origin. + Recommendations that follow from these mechanisms, for the Application and for each Platform Resource turned on in it. diff --git a/apps/docs/src/content/docs/en/pages/build/applications/limits.mdx b/apps/docs/src/content/docs/en/pages/build/applications/limits.mdx index 87a32e8bc4..a2dc6d345f 100644 --- a/apps/docs/src/content/docs/en/pages/build/applications/limits.mdx +++ b/apps/docs/src/content/docs/en/pages/build/applications/limits.mdx @@ -1,6 +1,6 @@ --- title: Applications limits -description: Check the bounds of an application, its rules and settings, and of the Cache, Application Accelerator, and Image Processor settings it carries, by plan. +description: Check the bounds of an Application, its rules and settings, and of the Cache, Application Accelerator, and Image Processor settings it carries. meta_tags: 'applications, limits, rules, criteria, cache, tiered cache, ttl, application accelerator, image processor, websocket, plans' namespace: documentation_products_applications_limits permalink: /documentation/platform/applications/limits/ @@ -10,80 +10,78 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -An [application](/en/documentation/platform/applications/) runs request and response [rules](/en/documentation/platform/applications/rules-engine/), and it can proxy WebSocket connections to the origin through [WebSocket Proxy](/en/documentation/platform/applications/websocket/). Each Product enabled on it brings bounds of its own: [cache settings](/en/documentation/platform/applications/cache/cache-settings/) and [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) requests for Cache, the cache TTL floor for Application Accelerator, and processed images for Image Processor. This page states each bound, the answer a call receives where the API refuses it, and the usage each service plan includes. +An [Application](/en/documentation/platform/applications/) processes the requests received by your [Workloads](/en/documentation/platform/workloads/): it runs its request and response [rules](/en/documentation/platform/applications/rules-engine/) on each request. With [WebSocket Proxy](/en/documentation/platform/applications/websocket/) turned on for the account, it can also proxy WebSocket connections to the origin. An Application receives the requests of a Workload once that Workload's deployment sets that Application. -A default limit bounds one object, one request, or one account. An included amount bounds one month of use, and each service plan includes a different amount. Azion offers three service plans: Hobby, Pro, and Enterprise. On Hobby, use past an included amount may require an upgrade, and Azion may restrict the account. On Pro and Enterprise, Azion bills that use at on-demand rates, and on Pro you can set a spend limit to control the charge. +Each Platform Resource turned on in the Application adds bounds of its own. [Cache](/en/documentation/platform/applications/cache/) bounds [cache settings](/en/documentation/platform/applications/cache/cache-settings/) and the objects it stores, and [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) bounds purge requests. [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) moves the floor of the cache time to live (TTL), and [Image Processor](/en/documentation/platform/applications/image-processor/) bounds the size, width, and height of one image. This page states each bound and the answer a call receives where the API refuses it. + +A service plan also includes an amount of usage before a rate applies. That amount is a billing quantity: passing it changes what the account is charged rather than what the call returns. [Azion pricing](https://www.azion.com/en/pricing/) lists the plans and the usage each one includes. For the rates, refer to [Pricing](/en/documentation/fundamentals/pricing/#applications). --- ## Applications, rules, and connections -These bounds apply to every application, whichever Products it has enabled. They cover the rules in its Rules Engine, the **Debug Rules** log, and the connections it keeps open. +These bounds apply to every Application, whichever Platform Resources are turned on in it. They cover the rules in its Rules Engine, the [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules) log, and the connections it keeps open. ### Default limits -Each row names what is bounded and the bound. Azion can raise these limits on request, based on the plan, and the WebSocket connection time is one of them. For an increase, contact the [technical support](/en/documentation/support/) team. +Seven bounds apply to every Application. | Scope | Limit | | --- | --- | -| Rules in one application, request and response phases together | 200 | -| Criteria groups per rule | 1 to 5 | -| Criteria per group | 1 to 10 | -| Behaviors per rule | 1 to 10 | +| Rules in one Application, request and response phases together | 200 rules | +| Criteria groups per rule | 1 to 5 groups | +| Criteria per group | 1 to 10 criteria | +| Behaviors per rule | 1 to 10 behaviors | | Behavior argument | 1,600 characters | -| **Debug Rules** log size | 1.5 kB | -| Maximum WebSocket connection time | 15 minutes | -| Keepalive connection between a user and an application | Approximately 15 minutes | - -The 200 rules are one total that the request phase and the response phase share. For example, an application can carry 150 request rules and 50 response rules, but not 200 of each. +| Debug Rules log size | 1.5 kB | +| WebSocket connection time | 15 minutes | -Azion recycles the keepalive connections on its servers approximately every 15 minutes. That cycle bounds how long a connection between a user and an application stays open. An active connection that needs more time can be terminated. When a WebSocket connection is terminated this way, the application handles the closed connection and opens it again. For a large file, fragments or compression raise the transfer speed, so the transfer can finish in time. +Three further bounds apply to names: an Application's name takes 1 to 100 characters, a device group's name takes 1 to 250, and a device group's `user_agent` expression takes 1 to 512. -To store a large file in fragments, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#cache). To compress it, refer to [Compress application responses with gzip](/en/documentation/guides/application-performance/delivery-optimization/gzip-compression/). +The 200 rules are one total that the request phase and the response phase share. For example, an Application can carry 150 request rules and 50 response rules, but not 200 of each. -### Included rules per plan +Azion recycles the keepalive connections on its servers approximately every 15 minutes. That cycle bounds how long a connection between a user and an Application stays open. An active connection that needs more time can be terminated. When a WebSocket connection closes this way, your client code has to detect the closed connection and open it again. -Applications is billed on rules, and each service plan includes a number of rules per application. +For a large file, either of two options lets each transfer finish before the connection is recycled. With `modules.cache.large_file_cache.enabled` set to `true` in a cache setting, Cache stores the file in fragments of 1,024 kB. The other option, compression, shrinks the file. -| Metric | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Rules per application | 10 | 20 | Custom | - -The included rules are a billing quantity, separate from the default limit of 200 rules on one application. For the rate past the included rules, refer to [Pricing](/en/documentation/fundamentals/pricing/#applications). +To store a large file in fragments, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#cache). To compress it, refer to [Compress application responses with gzip](/en/documentation/guides/application-performance/delivery-optimization/gzip-compression/). --- ## Cache -Cache bounds a cache setting, the object a cache setting holds, and a Real-Time Purge request. Past a bound that the API checks, the call returns HTTP `400` with an error code and a title. [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) changes two bounds of a cache setting: the lowest TTL it takes and the cache behavior it allows. +Cache bounds a cache setting and an object it stores, and Real-Time Purge bounds a purge request. Past a bound that the API checks, the call returns HTTP `400` with an error code and a title. [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) changes two bounds of a cache setting: the lowest TTL it takes and the cache behavior it allows. -For a higher limit on the account, contact the [technical support](/en/documentation/support/) team. The TTL bounds are the exception: the API validates them on every cache setting, and Azion does not raise them on request. +The API validates the TTL bounds on every cache setting. + +For the rates of Cache, refer to [Pricing](/en/documentation/fundamentals/pricing/#cache). To query the data that Tiered Cache transferred, refer to [Query usage data from Tiered Cache](/en/documentation/guides/platform/observability/query-tiered-cache-usage-data-with-graphql/). ### Cache settings -Each bound in this table applies to one cache setting, from any interface that writes it. The Scope column names the API field and, where one exists, the Console label. The Past the limit column carries the code and the title of the `400` answer. +Each bound in this table applies to one cache setting, from any interface that writes it. The Scope column names the API field and, where one exists, the Console label. The Past the limit column carries the code and the title of the `400` answer. The error titles keep earlier names: `Edge Cache` stands for Cache, and `Module` stands for a Platform Resource turned on in the Application. | Scope | Limit | Past the limit | | --- | --- | --- | -| Cache TTL minimum, **Max Age** (`modules.cache.max_age`) | 60 seconds; 0 seconds with Application Accelerator on the application | Error `21021`, `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module`, with `meta.min_value` set to `60`. | +| Cache TTL minimum, **Max Age** (`modules.cache.max_age`) | 60 seconds; 0 seconds with Application Accelerator on the Application | Error `21021`, `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module`, with `meta.min_value` set to `60`. | | Cache TTL minimum with Tiered Cache on | 3 seconds, with Application Accelerator on; without it, the 60-second minimum holds | Error `21020`, `Edge Cache Max Age Lower Than The Minimum Allowed By The Tiered Cache Module`, with `meta.min_value` set to `3`. | | Cache TTL maximum | 31,536,000 seconds, one year | Error `10068`, `Max Value`, with the detail `Ensure this value is less than or equal to 31536000.` | | Cache behavior with Tiered Cache on (`modules.cache.behavior`) | `override` only | Error `21001`, `It's Not Possible To Use This Edge Cache Behavior.` | | Browser cache TTL (`browser_cache.max_age`) | 0 to 31,536,000 seconds | Error `10068`, `Max Value`. | | Cache setting name, **Name** (`name`) | 250 characters | Error `10046`, `Max Length`, with the detail `Ensure this field has no more than 250 characters.` | -A cache setting with `modules.cache.stale_cache.enabled` set to `true` can serve an expired copy for a limited window. Under the `honor` behavior, the window is the value of the origin's `stale-while-revalidate=` directive. Under `override`, or when the origin omits the directive, the window is 300 seconds. +One further bound applies to a cache setting: its `cache_vary_by_method` array takes at most 2 values, `post` and `options`. + +With `modules.cache.stale_cache.enabled` set to `true` in a cache setting, Cache can serve an expired copy of an object for a limited window. Under the `honor` behavior, the window is the value of the origin's `stale-while-revalidate=` directive. Under `override`, or when the origin omits the directive, the window is 300 seconds. ### Cached objects -Two bounds apply to an object that Cache stores: its size, and the size of each fragment of a large file stored in pieces. +Two bounds apply to an object that Cache stores: its size, and the size of each fragment of a large file stored in pieces. The API checks the fragment size on every cache setting. -| Scope | Limit | -| --- | --- | -| Single object in cache | 10 GB | -| Fragment size of a large file (`modules.cache.large_file_cache.offset`) | 1,024 kB per fragment, fixed | +| Scope | Limit | Past the limit | +| --- | --- | --- | +| Fragment size of a large file (`modules.cache.large_file_cache.offset`) | 1,024 kB per fragment, fixed | Error `10068`, `Max Value`, with the detail `Ensure this value is less than or equal to 1024.` | -A fragment size larger than 1,024 returns error `10068`, `Max Value`, with the detail `Ensure this value is less than or equal to 1024.` To change the fragment size, contact the Sales team. +A single object in cache takes up to 10 GB. ### Real-Time Purge @@ -93,7 +91,8 @@ Each bound in this table applies to a purge request, from any interface that sen | --- | --- | --- | | Objects in one URL or cache key purge request | 50 objects | Error `10065`, `List Field Max Length`, with the detail `Ensure this field has no more than 50 elements.` | | Wildcards in one purge request | 1 wildcard | Error `10065`, `List Field Max Length`, with the detail `Ensure this field has no more than 1 elements.` | -| URL or cache key length | 4,096 characters | The API does not refuse a longer URL when it receives the request. A purge of one 4,098-character URL returns HTTP `201`. | + +A URL or a cache key in a purge takes up to 4,096 characters. Six more bounds set the rate of purge requests, the length of a wildcard, and how much purge history Azion keeps. @@ -106,23 +105,13 @@ Six more bounds set the rate of purge requests, the length of a wildcard, and ho | Requests kept in the purge history | 1,000,000 requests | | Time a request stays in the purge history | 6 months | -### Included usage per plan - -Cache is billed on purges, and each service plan includes a number of them every month. - -| Metric | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Purges | 1,000 / month | 2,000 / month | Custom | - -The Purges metric counts each purge operation that the account runs during the month. Tiered Cache is included on every plan. The pricing page lists data transfer under Application Accelerator, so that amount sits with the bounds of [Application Accelerator](#application-accelerator). - -For the rate past the included purges, refer to [Pricing](/en/documentation/fundamentals/pricing/#cache). To query the data that Tiered Cache has transferred, refer to [Query usage data from Tiered Cache](/en/documentation/guides/platform/observability/query-tiered-cache-usage-data-with-graphql/). - --- ## Application Accelerator -Application Accelerator changes one bound of a cache setting: the shortest time Cache holds an object. `modules.cache.max_age` sets that time in seconds, and Azion Console renders the field as **Max Age** in the **Cache** section of a cache setting. The field takes an integer from 0 to 31,536,000 and refuses any value outside that range. Whether Application Accelerator and Tiered Cache are on decides how low inside the range a cache setting goes. +Application Accelerator changes one bound of a cache setting: the shortest time Cache holds an object. The Max Age of a cache setting, its `modules.cache.max_age` field, sets in seconds how long Cache holds an object. The field takes an integer from 0 to 31,536,000 and refuses any value outside that range. Whether Application Accelerator and Tiered Cache are on decides how low inside the range a cache setting goes. + +For the rates of Application Accelerator, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). ### Default limits @@ -130,59 +119,31 @@ Each row names a cache TTL bound and the condition that puts it in force. | Scope | Limit | Applies when | | --- | --- | --- | -| Minimum cache TTL | 60 seconds | Application Accelerator is off on the application, with Tiered Cache on or off. | +| Minimum cache TTL | 60 seconds | Application Accelerator is off in the Application, with Tiered Cache on or off. | | Minimum cache TTL | 0 seconds | Application Accelerator is on, and Tiered Cache is off. | | Minimum cache TTL | 3 seconds | Application Accelerator is on, and Tiered Cache is on. | -| Maximum cache TTL | 31,536,000 seconds, one year | Every cache setting, whichever Products are on. | - -A **Max Age** lower than the minimum in force returns HTTP `400`. The error is `21021` while Application Accelerator is off, and `21020` while Application Accelerator and Tiered Cache are both on. A value higher than the maximum returns error `10068`. For the error titles, refer to [Cache settings](#cache-settings). - -The 3-second floor comes from Tiered Cache rather than from Application Accelerator. Tiered Cache requires at least 3 seconds, which narrows the 0-second floor that Application Accelerator unlocks. A **Max Age** of 0 seconds still keeps the request on the cache path, so it differs from bypassing the cache. For how each one handles a request, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). - -These TTL bounds are validations the API applies to every cache setting, and Azion does not raise them on request. The `cache_vary_by_method` array of a cache setting takes at most 2 values, `post` and `options`, and the API specification sets that cap. - -A request that Application Accelerator varies is still bounded by the Products that store the object and run code on it. Cache bounds the object itself: the size of one cached object, and the size of each fragment of a large file. For those values, refer to [Cached objects](#cached-objects). A function the application runs on [Functions](/en/documentation/platform/functions/) carries its own limits on its code and on each invocation. For those values, refer to [Functions limits](/en/documentation/platform/functions/limits/). +| Maximum cache TTL | 31,536,000 seconds, one year | Every cache setting, whichever Platform Resources are on. | -### Included usage per plan +A Max Age lower than the minimum in force returns HTTP `400`. The error is `21021` while Application Accelerator is off, and `21020` while Application Accelerator and Tiered Cache are both on. A value higher than the maximum returns error `10068`. For the error titles, refer to [Cache settings](#cache-settings). -Application Accelerator is billed on data transfer, and each service plan includes an amount of it every month. +For how a Max Age of 0 seconds and the _Bypass Cache_ behavior each handle a request, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). -| Metric | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Data transfer | 1 TB / month | 2 TB / month | Custom | - -Cache variation, which the pricing page lists as Custom Cache Keys, and path rewrites are included on every plan. For the rates past the included data transfer, refer to [Pricing](/en/documentation/fundamentals/pricing/#application-accelerator). +A request that Application Accelerator varies is still bounded by the Platform Resources that store the object and run code on it. Cache bounds the object itself: the size of one cached object, and the size of each fragment of a large file. For those values, refer to [Cached objects](#cached-objects). A [Function](/en/documentation/platform/functions/) that the Application runs carries its own limits on its code and on each invocation. For those values, refer to [Functions limits](/en/documentation/platform/functions/limits/). --- ## Image Processor -Image Processor bounds a single image with three default limits, and each service plan includes a number of processed images every month. The size, width, and height bound one image. The monthly amount bounds the account. +Image Processor bounds a single image with three default limits: its size, its width, and its height. + +For the rates of the Images metric, refer to [Pricing](/en/documentation/fundamentals/pricing/#image-processor). To query the number of images the account has processed, refer to [Query usage data from Image Processor](/en/documentation/guides/platform/observability/query-image-processor-usage-data-with-graphql/). ### Default limits -Image Processor applies these default limits to an image. To raise one of them for the account, contact the [technical support](/en/documentation/support/) team. - -| Scope | Limit | -| --- | --- | -| Maximum size | 150 MB | -| Maximum width | 3840 pixels | -| Maximum height | 2160 pixels | +Image Processor applies three default limits to an image: a maximum size of 150 MB, a maximum width of 3,840 pixels, and a maximum height of 2,160 pixels. Each `ims` parameter also accepts a range of values of its own. For the range of each parameter, refer to [URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/). -### Included usage per plan - -Every service plan includes a number of processed images each month, and the amount differs by plan. - -| Metric | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Images | 5,000 / month | 10,000 / month | Custom | - -Image Processor counts one image each time it processes an image on a request, whether the request optimizes, crops, resizes, filters, or converts the format. An image that Cache serves without processing does not count, so a derived image already in cache adds nothing on the requests the cache answers. For example, a photograph served in three widths counts as three images. The later requests that the cache answers for those widths count none. - -For the rates of the Images metric, refer to [Pricing](/en/documentation/fundamentals/pricing/#image-processor). To query the number of images the account has processed, refer to [Query usage data from Image Processor](/en/documentation/guides/platform/observability/query-image-processor-usage-data-with-graphql/). - --- ## Related resources @@ -191,7 +152,7 @@ For the rates of the Images metric, refer to [Pricing](/en/documentation/fundame Turn on Application Accelerator and create a cache setting inside these TTL bounds. The fields that Application Accelerator unlocks, with their types, enums, and defaults. - How a request passes through an application, and where Cache, Application Accelerator, and Image Processor act on it. - Where the account watches its Cache, Tiered Cache, and Image Processor traffic against the amounts on this page. + How a request passes through an Application, and where Cache, Application Accelerator, and Image Processor act on it. + Where the account watches its Cache, Tiered Cache, and Image Processor traffic. diff --git a/apps/docs/src/content/docs/en/pages/build/applications/troubleshooting.mdx b/apps/docs/src/content/docs/en/pages/build/applications/troubleshooting.mdx index cb8a2a6ab3..24558dfe1d 100644 --- a/apps/docs/src/content/docs/en/pages/build/applications/troubleshooting.mdx +++ b/apps/docs/src/content/docs/en/pages/build/applications/troubleshooting.mdx @@ -1,6 +1,6 @@ --- title: Troubleshoot Applications -description: Find why an application does not serve the origin, why a rule does not act, and what the Azion API returns when it refuses an application object. +description: Find why requests do not reach the origin, why a rule does not act, and what the Azion API returns when it refuses a write to an Application. meta_tags: 'applications, troubleshooting, rules engine, debug rules, cache, application accelerator, image processor, errors' namespace: documentation_products_applications_troubleshooting permalink: /documentation/platform/applications/troubleshooting/ @@ -10,21 +10,21 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Use this page when an [application](/en/documentation/platform/applications/) does not handle requests the way you configured it, or when the Azion API refuses an object that belongs to it. Each section names one symptom, its cause, and its fix, and reads on its own. The application's own symptoms come first, then those of [Cache](/en/documentation/platform/applications/cache/), [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), and [Image Processor](/en/documentation/platform/applications/image-processor/), the Products enabled on an application. +Use this page when an [Application](/en/documentation/platform/applications/) does not process requests the way you configured it, or when the Azion API refuses a rule, a setting, or another object that belongs to it. The Application's own symptoms come first, then those of [Cache](/en/documentation/platform/applications/cache/), [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), and [Image Processor](/en/documentation/platform/applications/image-processor/), the Platform Resources nested in Applications. --- ## Requests never reach the origin -Clients send requests to the domain of a workload, and your origin logs none of them. +Clients send requests to the domain of a Workload, and your origin logs none of them. -Two links connect a request to an origin. The workload's deployment names the application, and a Request Phase rule with **Set Connector** names the [connector](/en/documentation/platform/connectors/) that holds the origin's address, since the application record has no origin field. +Two links connect a request to an origin. The Workload's deployment sets the Application. A Request Phase rule with _Set Connector_ then sets the [Connector](/en/documentation/platform/connectors/), which holds the origin's address, because an Application reaches an origin only through a Connector. -- **Name the application on the workload's deployment**: in Azion Console, select it in the **Application** field of the workload's **Deployment Settings**. -- **Add a rule that sends requests to the connector**: a [new application](/en/documentation/platform/applications/how-it-works/#what-a-new-application-has) has no rules. Create one with **Set Connector** in Azion Console, as [Applications quickstart](/en/documentation/platform/applications/quickstart/) shows, or with `set_connector` through the [API](/en/documentation/platform/applications/rules-engine/#api). +- **Set the Application on the Workload's deployment**: in Azion Console, select it in the **Application** field of the Workload's **Deployment Settings**. +- **Add a rule that sends requests to the Connector**: a [new Application](/en/documentation/platform/applications/how-it-works/#what-a-new-application-has) has no rules. Create one with _Set Connector_ in Azion Console, as [Applications quickstart](/en/documentation/platform/applications/quickstart/) shows, or with `set_connector` through the [API](/en/documentation/platform/applications/rules-engine/#api). - **Give the change time to propagate**: send the request again until the origin receives it, for the times that [Propagation](/en/documentation/platform/applications/how-it-works/#propagation) gives. -Requests that match the rule then reach the origin through the connector, and the origin's responses return to the client. +Requests that match the rule then reach the origin through the Connector, and the origin's responses return to the client. --- @@ -32,10 +32,10 @@ Requests that match the rule then reach the origin through the connector, and th Your origin answers a request with a `4xx` or `5xx` status, and the client receives an error page. -The connector that a **Set Connector** rule names receives the origin's error. The error page is set on the workload, not on the application: its deployment selects the page beside the application and the firewall. +The Connector that a _Set Connector_ rule sets receives the origin's error. The error page is set on the Workload, not on the Application: the Workload's deployment sets the page beside the Application and the Firewall. -- **Serve your own error page**: create it in [Custom Pages](/en/documentation/platform/workloads/#custom-pages) and select it in the **Custom Page** field of the workload's **Deployment Settings**. -- **Serve the last stored copy instead of a `5xx`**: turn on [Stale cache](/en/documentation/platform/applications/cache/expiration-and-freshness/#stale-cache) in the cache setting that a **Set Cache Policy** rule applies to the path. +- **Serve your own error page**: create it as [Custom Pages quickstart](/en/documentation/platform/workloads/custom-pages/quickstart/) shows. Then, in Azion Console, select it in the **Custom Page** field of the Workload's **Deployment Settings**. +- **Serve the last stored copy instead of a `5xx`**: turn on [stale cache](/en/documentation/platform/applications/cache/expiration-and-freshness/#stale-cache) in the cache setting that a _Set Cache Policy_ rule applies to the path, with `modules.cache.stale_cache.enabled` set to `true` in the API. A client then receives your page for an origin error, or the expired copy of a cached object within the stale window. @@ -49,12 +49,12 @@ A rule acts only on the requests its criteria match, and only after the change p - **The rule has not propagated yet**: the API accepts a rule with `202` and `state` set to `pending`. Send the request again before you change the rule, for as long as [Propagation](/en/documentation/platform/applications/how-it-works/#propagation) describes. - **The criteria do not match the request**: [Criteria](/en/documentation/platform/applications/rules-engine/#criteria) lists each variable, operator, and conditional. -- **An earlier rule ended the processing**: a behavior such as **Finish Request Phase** stops the behaviors and rules after it, as [How rules run](/en/documentation/platform/applications/how-it-works/#how-rules-run) explains. +- **An earlier rule ended the processing**: a behavior such as _Deny (403 Forbidden)_ stops the behaviors and rules after it, as [How rules run](/en/documentation/platform/applications/how-it-works/#how-rules-run) explains. -To tell the three apart, check which rules ran on the request. **Debug Rules** logs the Rules Engine rules that run on each request, and it is off on a new application. +To tell the three apart, check which rules ran on the request. Debug Rules logs the Rules Engine rules that run on each request, and it is off in a new Application. -- **Turn on Debug Rules**: on the **Main Settings** tab of the application, turn on **Debug Rules** and select **Save**. -- **Read the rules that ran**: [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules) names the field that lists them in each log. A rule missing from the log of a request did not run on it: rework its criteria, or move it ahead of the rule that ended the processing. +- **Turn on Debug Rules**: in Azion Console, on the **Main Settings** tab of the Application, turn on **Debug Rules** and select **Save**. Through the API, set the Application's `debug` field to `true`. +- **Read the rules that ran**: the `$traceback` field of each log lists them, as [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules) describes. A rule missing from the log of a request did not run on it: rework its criteria, or move it ahead of the rule that ended the processing. The rule then appears in the log of each request it matches, and its behaviors run. @@ -62,11 +62,11 @@ The rule then appears in the log of each request it matches, and its behaviors r ## A problem shows in traffic but not in the responses you request -Users report errors or slow responses, yet each request you send to the application returns what you expect. +Users report errors or slow responses, yet each request you send to the Application returns what you expect. A request you send shows one response, from one server, at one moment, as [Debug headers](/en/documentation/platform/applications/cache/cache-keys/#debug-headers) shows. A problem that touches some servers, some paths, or some hours does not show in a single response. -- **Read aggregated metrics**: [Real-Time Metrics](/en/documentation/platform/real-time-metrics/build-dashboards/#applications) charts aggregated data for your applications, and keeps it over longer storage periods. +- **Read aggregated metrics**: [Real-Time Metrics](/en/documentation/platform/real-time-metrics/build-dashboards/#applications) charts aggregated data for your Applications, and keeps it over longer storage periods. - **Read the raw log of each request**: [Real-Time Events](/en/documentation/platform/real-time-events/) holds the raw data of every request. - **Query only the data you need**: the GraphQL API returns [aggregated and raw data](/en/documentation/devtools/graphql/features/#datasets), limited to the fields a query asks for, as [Query usage data from Applications](/en/documentation/guides/platform/observability/query-applications-usage-data-with-graphql/) shows. - **Trace the rules that ran**: [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules) logs them per request. @@ -79,10 +79,10 @@ The metrics and logs then show which requests, paths, or periods carry the probl Saving a request rule that reads `${request_uri}` fails with `400` and code `25047` while Application Accelerator is off, as [Errors](/en/documentation/platform/applications/rules-engine/#errors) shows in full. -Some variables and behaviors belong to a Product, and the API refuses a rule that uses one while that Product is off: `meta.missing_required_modules` names it. +Some variables and behaviors belong to a Platform Resource, and the API refuses a rule that uses one while that Platform Resource is off: `meta.missing_required_modules` names it. -- **Match on `${uri}` instead**: it needs no Product, so the same rule returns `202`, as [Variables](/en/documentation/platform/applications/rules-engine/#variables) lists for every variable. -- **Turn on the Product the error names**: its switch is in the **Modules** section of the application's **Main Settings** tab, and **Save** applies it. [Products](/en/documentation/platform/applications/main-settings/#products) gives its Azion CLI flag and API key. +- **Match on `${uri}` instead**: it needs no Platform Resource, so the same rule returns `202`, as [Variables](/en/documentation/platform/applications/rules-engine/#variables) lists for every variable. +- **Turn on the Platform Resource the error names**: in Azion Console, its switch is in the **Modules** section of the Application's **Main Settings** tab, and **Save** applies it. [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) gives its Azion CLI flag and API key. With Application Accelerator on, the rule on `${request_uri}` is accepted. @@ -92,7 +92,7 @@ With Application Accelerator on, the rule on `${request_uri}` is accepted. A rule body copied from an older example fails with `400`, code `10039`, and `Invalid Choice`, which [Errors](/en/documentation/platform/applications/rules-engine/#errors) lists with its detail and pointer. -The API accepts only the behavior types it defines. The one that adds a header to the request is `add_request_header`, **Add Request Header** in Azion Console, and not `add_header`. +The API accepts only the behavior types it defines. The one that adds a header to the request is `add_request_header`, _Add Request Header_ in Azion Console, and not `add_header`. - **Send `add_request_header`**: carry the header as `name: value` in `attributes.value`, as in `{ "type": "add_request_header", "attributes": { "value": "Accept: image/webp" } }`. - **Look up the other types**: [Behaviors](/en/documentation/platform/applications/rules-engine/#behaviors) lists every behavior and its type. @@ -103,9 +103,9 @@ The rule is then accepted and reads back with the type `add_request_header`. ## A WebSocket connection does not return 101 Switching Protocols -A WebSocket connection through the application returns a status other than `101 Switching Protocols`, even a `2xx` or a `3xx`. +A WebSocket connection through the Application returns a status other than `101 Switching Protocols`, even a `2xx` or a `3xx`. -Only `101` means an upgraded connection: any other status means that the client, the application, or the origin did not complete it. +Only `101` means an upgraded connection: any other status means that the client, the Application, or the origin did not complete it. - **Confirm native WebSocket support**: the client and the origin both need it, as [Client and origin support](/en/documentation/platform/applications/websocket/#client-and-origin-support) requires. - **Send both upgrade headers**: `Upgrade: websocket` and `Connection: upgrade`, as [Upgrade headers](/en/documentation/platform/applications/websocket/#upgrade-headers) requires. @@ -115,17 +115,29 @@ The connection then returns `101 Switching Protocols`. --- +## A WebSocket connection closes after about 15 minutes + +A WebSocket connection through the Application closes after about 15 minutes, while the client and the origin still use it. + +Azion recycles the keepalive connections on its servers approximately every 15 minutes, and the recycle can close an active WebSocket connection, as [WebSocket Proxy](/en/documentation/platform/applications/websocket/#limits) states. + +- **Reopen the connection from the client**: detect the closed connection in your client code, and open a new one. + +The client then holds a new connection, which returns `101 Switching Protocols`. + +--- + ## Cache -Every new application has Cache on, yet a cache setting changes only the requests that a rule applies it to. For how Cache answers a request, refer to the [Cache overview](/en/documentation/platform/applications/cache/#request-path). +Every new Application has Cache on, yet a cache setting changes a request only after a rule applies that cache setting to the request. For how Cache answers a request, refer to the [Cache overview](/en/documentation/platform/applications/cache/#request-path). ### A saved cache setting has no effect and responses stay MISS -`x-cache` reads `MISS` on each response for the path, and your origin gets as many requests as before. +`x-cache` reads `MISS` on each response for the path, or `-` while Application Accelerator is on, and your origin gets as many requests as before. -A saved cache setting acts only on the requests that a propagated Request Phase rule applies it to through **Set Cache Policy**. +A saved cache setting acts on a request only after a propagated Request Phase rule applies that cache setting to the request through _Set Cache Policy_. -- **Apply the setting with a rule**: add **Set Cache Policy** with the setting to a Request Phase rule that covers the path, as [Create a cache setting](/en/documentation/guides/application-performance/cache-and-purge/tune-cache-settings/) shows. +- **Apply the setting with a rule**: add _Set Cache Policy_ with the setting to a Request Phase rule that covers the path, as [Create a cache setting](/en/documentation/guides/application-performance/cache-and-purge/tune-cache-settings/) shows. - **Wait for the rule to propagate**: [Propagation](/en/documentation/platform/applications/how-it-works/#propagation) gives the time it takes. - **Read the status of several requests**: each one can come from a different server. [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/) shows how to read it. @@ -135,30 +147,42 @@ With the rule in effect, the request that stores the copy reports `MISS`, and la Both debug headers hold a dash, `x-cache: -` and `x-cache-key: -`, so the response has neither a cache status nor a key. -The dash marks content restricted from caching, as [Cache status](/en/documentation/platform/applications/cache/cache-keys/#cache-status) lists. `GET` and `HEAD` responses are cached natively, while `POST` and `OPTIONS` responses need Application Accelerator and a cache setting that varies by their method. +The dash marks a response that Azion does not store, as [Cache status](/en/documentation/platform/applications/cache/cache-keys/#cache-status) lists, and on a `GET` or a `HEAD` it appears only while Application Accelerator is on. `GET` and `HEAD` responses are cached natively, while `POST` and `OPTIONS` responses need Application Accelerator and a cache setting that varies by their method. -- **Turn on Application Accelerator first**: with it off, the API refuses the method field with error `21013`. [Products](/en/documentation/platform/applications/main-settings/#products) has the switch. -- **Cache the method**: select it in **Cache vary by Method**, in the **Application Accelerator** section of the cache setting, which then reads back as `"cache_vary_by_method":["post"]` for _POST_. [Cache POST and OPTIONS responses](/en/documentation/guides/application-performance/cache-and-purge/cache-post-and-options-responses/) has the steps. -- **Tell the cases apart by method**: on a `GET` or a `HEAD`, the dash comes from elsewhere, such as a response that a function builds. +- **Turn on Application Accelerator first**: with it off, the API refuses the method field with error `21013`. [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) has the switch. +- **Cache the method**: in Azion Console, select it in **Cache vary by Method**, in the **Application Accelerator** section of the cache setting, which then reads back as `"cache_vary_by_method":["post"]` for _POST_. [Cache POST and OPTIONS responses](/en/documentation/guides/application-performance/cache-and-purge/cache-post-and-options-responses/) has the steps. +- **Tell the cases apart by method**: on a `GET` or a `HEAD`, the dash means only that Azion does not store the response, whether the origin or a Function builds it. With Application Accelerator off, the same response reports `MISS`, with `x-cache-expires-in: 0`. -Responses to the cached method then carry a status, and a key that ends with an MD5 hash of the request body. +Responses to the cached method then carry a status, and a key that starts with the method. A `POST` key also ends with `@@` and an MD5 hash of the request body. ### Content is still served from cache after a Bypass Cache rule -Requests that a **Bypass Cache** rule matches keep getting a stored copy, and the origin does not see them. +Requests that a _Bypass Cache_ rule matches keep getting a stored copy, and the origin does not see them. -**Bypass Cache** reaches Azion's cache but not the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache) layer, which keeps objects for the minimum TTL, so the first layer can still answer from it. +_Bypass Cache_ keeps Azion's cache from storing the response, but the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache) layer is outside its reach. While a cache setting keeps Tiered Cache on, that layer goes on storing objects for the Max Age of the cache setting, and it answers before the origin does. -- **Turn off Tiered Cache**: in the **Cache** section of the cache setting that serves the path. +- **Turn off Tiered Cache**: in Azion Console, in the **Cache** section of the cache setting that serves the path. Through the API, set `modules.cache.tiered_cache.enabled` to `false` in that setting. - **Purge both layers, the tiered one first**: purge Tiered Cache by cache key, then Cache, so the first layer cannot refill from a stale copy, as [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/) shows. -Requests that the rule sends to the origin then carry `x-cache: BYPASS`. +Requests that the rule sends to the origin then carry `-` or `BYPASS` in `x-cache`. + +### Responses keep an old version after you replace a file at the origin + +You replaced a file at the origin, and the responses for its URL keep the old version. + +A stored copy stays in cache until its TTL ends or a purge removes it, even after you replace the file at the origin, as [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/) explains. + +- **Purge the URL**: remove the stored copy, as [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/) shows. +- **Purge Tiered Cache first when it is on**: purge the Tiered Cache layer by cache key, then Cache, as [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/#purge) explains. +- **Change the object's name**: put a version in the file name, so each version is a separate object, as [Change an object's name when its content changes](/en/documentation/platform/applications/best-practices/#change-an-objects-name-when-its-content-changes) describes. + +On its next request, the purged URL reports `x-cache: MISS`, and the response carries the new version. ### A purge did not expire a variation of the object The purge was accepted, yet some visitors, or some query strings, keep getting the old content. -A URL purge maps each URL to one cache key without variation, so copies that vary by cookie, device group, or image format survive it, however often you repeat it. It reaches a query string variation only when the URL lists the arguments in the order the key stores them, alphabetical when **Sort** is on. +A URL purge maps each URL to one cache key without variation, so copies that vary by cookie, device group, or image format survive it, however often you repeat it. It reaches a query string variation only when the URL lists the arguments in the order the key stores them, alphabetical when the variation has `sort_enabled` set to `true`. - **Purge by cache key**: list every variation of the object, at most 50 keys in one request, each copied from the `x-cache-key` header of its response. - **Purge by wildcard**: end the expression with `@@*` for the variations that add the `@@` separator, such as cookie and device group, or with `?*` for query string variations. @@ -167,20 +191,20 @@ On its next request, each purged variation reports `x-cache: MISS`, as [Purge co ### A Max Age below 60 seconds is refused with error 21021 -Creating or updating a cache setting with a **Max Age** below 60 seconds returns `400` and code `21021`, as [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details. +Creating or updating a cache setting with a Max Age below 60 seconds returns `400` and code `21021`, as [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details. -Without Application Accelerator, the floor is 60 seconds, with Tiered Cache on or off. With it, a **Max Age** of `30` or of `0` saves, unless Tiered Cache is on, whose floor is 3 seconds. +Without Application Accelerator, the floor is 60 seconds, with Tiered Cache on or off. With it, a Max Age of `30` or of `0` saves, unless Tiered Cache is on, whose floor is 3 seconds. -- **Turn on Application Accelerator**: its switch is in **Main Settings** › **Modules**. -- **Keep it off and raise the value**: a **Max Age** of 60 seconds or more saves without it. +- **Turn on Application Accelerator**: in Azion Console, its switch is in **Main Settings** › **Modules**. +- **Keep it off and raise the value**: a Max Age of 60 seconds or more saves without it. The cache setting is then accepted, within the bounds that [Applications limits](/en/documentation/platform/applications/limits/#cache) lists. ### Tiered Cache cannot be turned on and the API returns 21001 or 21020 -A cache setting that sends `tiered_cache.enabled` as `true` is refused with `400`: code `21001` answers the `honor` cache behavior, and code `21020` a **Max Age** below 3 seconds, as [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details for each. +A cache setting that sends `tiered_cache.enabled` as `true` is refused with `400`: code `21001` answers the `honor` cache behavior, and code `21020` a Max Age below 3 seconds, as [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details for each. -Tiered Cache needs the _Override cache behavior_, `override` in the API, and a **Max Age** of at least 3 seconds. With Application Accelerator off, the 60-second floor of error `21021` applies first, so 3 to 59 seconds is still refused. +Tiered Cache needs the _Override cache behavior_ in Azion Console, `override` in the API, and a Max Age of at least 3 seconds. With Application Accelerator off, the 60-second floor of error `21021` applies first, so 3 to 59 seconds is still refused. - **Send the behavior and the Max Age in one request**: `modules.cache.behavior` set to `override`, with a `max_age` of at least 3, or of at least 60 with Application Accelerator off. - **Use `--file` in Azion CLI**: no CLI flag sets the cache behavior, so `--tiered-caching-enabled` on its own always ends in `21001`. This command writes the body to a file and creates the setting from it: @@ -198,16 +222,16 @@ The CLI prints `Created Cache Settings configuration with ID ` A `DELETE` on a cache setting answers `400` and code `21014`, which [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) lists with its detail. -The **Set Cache Policy** behavior of some rule still names the setting, and a setting in use cannot be removed. +The _Set Cache Policy_ behavior of some rule still applies the setting, and a setting in use cannot be removed. -- **Release the setting**: on the **Rules Engine** tab, point that rule's **Set Cache Policy** at a different setting, or delete the rule. -- **Delete it again**: with Azion CLI, the delete takes the application ID and the setting ID: +- **Release the setting**: in Azion Console, on the **Rules Engine** tab of the Application, point that rule's _Set Cache Policy_ at a different setting, or delete the rule. +- **Delete it again**: with Azion CLI, the delete takes the ID of the Application and the ID of the setting: ```bash azion delete cache-setting --application-id --cache-setting-id --format json ``` -With no rule naming the setting, the CLI prints `{"message": "Caches settings configuration was successfully deleted"}`, and the setting leaves the **Cache Settings** list. +With no rule applying the setting, the CLI prints `{"message": "Caches settings configuration was successfully deleted"}`, and the setting leaves the **Cache Settings** list in Azion Console. ### A purge request is rejected with 30001, 30003, or 30005 @@ -216,8 +240,8 @@ A purge comes back `400` rather than `201`, with one of three codes that [Errors | Code | Title | Cause | Fix | | --- | --- | --- | --- | | `30001` | `Invalid Purge Layer For Purge Type` | `layer` is `tiered_cache` on a purge by URL or by wildcard | Purge by cache key to reach the Tiered Cache layer, or change `layer` to `cache` | -| `30003` | `Unauthorized Domain` | An item names a domain outside the account. A purge only reaches domains that belong to the account sending it | Fix the domain in the item | -| `30005` | `Invalid Purge Cachekey` | A cache key purge carries an item that is not a valid key | Copy the key from the `x-cache-key` header as it is, without a scheme separator or spaces | +| `30003` | `Unauthorized Domain` | An item names a domain that does not belong to the account sending the purge | Fix the domain in the item | +| `30005` | `Invalid Purge Cachekey` | A cache key purge carries an item that is not a valid key | Copy the key from the `x-cache-key` header as is, with no scheme separator or spaces | Azion CLI reports `30001` with the detail of the API, as this URL purge on the Tiered Cache layer shows: @@ -231,65 +255,65 @@ The command prints `Error: ["Invalid purge layer for purge type \"url\"."]`. A p A cache setting `create` or `update` fails, and under `--format json` Azion CLI prints only `{"error": {}}`. -With JSON output, Azion CLI 4.23.0 loses the code and the title that the API answered with. +With JSON output, Azion CLI 4.23.0 and 4.24.0 lose the code and the title that the API answered with. -- **Repeat the command without `--format json`**: plain output carries the message of the API, such as `Error: Failed to create the Cache Settings configuration: ["It's not possible to use this edge cache behavior while using Tiered Cache."]` for Tiered Cache with `honor`. +- **Repeat the command without `--format json`**: plain output carries the message of the API, such as `Error: Failed to create the Cache Settings configuration: ["It's not possible to use this edge cache behavior while using Tiered Cache."]` for Tiered Cache with `honor`. The message keeps an earlier name for Cache. - **Look the message up**: on this page, or in [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors), which lists every code of the cache settings endpoint. -Correct the request with that reason, and send it again. +Plain output then shows why the API refused the request, and the corrected request saves. --- ## Application Accelerator -Application Accelerator decides three things on an application: what goes into a cache key, which HTTP methods get cached, and which Rules Engine behaviors a rule may use. It is off on a new application. For how a variation changes the key, refer to the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path). +Application Accelerator unlocks four capabilities for the cache and the rules of an Application: cache variation, the caching of `POST` and `OPTIONS` responses, a Max Age below 60 seconds, and further Rules Engine behaviors and variables. It is off in a new Application. For how a variation changes the key, refer to the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/#request-path). ### A POST request reports no cache status -A `POST` reports `-` in `X-Cache` until Application Accelerator is on and the cache setting names _POST_ in **Cache vary by Method**, a field that [HTTP methods](/en/documentation/platform/applications/application-accelerator/settings/#http-methods) lists for each interface. For the fix, refer to [The x-cache header reports a dash on every response for a path](/en/documentation/platform/applications/troubleshooting/#the-x-cache-header-reports-a-dash-on-every-response-for-a-path). +A `POST` reports `-` in `x-cache` until Application Accelerator is on and the cache setting caches the method: _POST_ in **Cache vary by Method** in Azion Console, or `post` in `cache_vary_by_method` in the API. [HTTP methods](/en/documentation/platform/applications/application-accelerator/settings/#http-methods) shows the field for each interface. For the fix, refer to [The x-cache header reports a dash on every response for a path](/en/documentation/platform/applications/troubleshooting/#the-x-cache-header-reports-a-dash-on-every-response-for-a-path). ### Cookie and device group variations survive a purge -These variations come from the **Application Accelerator** section of the cache setting, and each one is an object under its own key, which a URL purge never reaches. For the purge by cache key or by the `@@*` wildcard that does, refer to [A purge did not expire a variation of the object](/en/documentation/platform/applications/troubleshooting/#a-purge-did-not-expire-a-variation-of-the-object). +These variations come from the `modules.application_accelerator` object of the cache setting, the **Application Accelerator** section in Azion Console. Each one is an object under its own key, out of reach of a URL purge. For the purge by cache key or by the `@@*` wildcard that does, refer to [A purge did not expire a variation of the object](/en/documentation/platform/applications/troubleshooting/#a-purge-did-not-expire-a-variation-of-the-object). ### A URL purge misses a query string variation -A URL purge reaches a query string variation only when it lists the arguments the key varies by, in the order the key stores them, which is alphabetical when **Sort** is on in **Cache vary by Query String**. For that purge and the `?*` wildcard, refer to [A purge did not expire a variation of the object](/en/documentation/platform/applications/troubleshooting/#a-purge-did-not-expire-a-variation-of-the-object). +A URL purge reaches a query string variation only when it lists the arguments the key varies by, in the order the key stores them. That order is alphabetical when **Sort** is on in **Cache vary by Query String** in Azion Console, `sort_enabled` in the API. For that purge and the `?*` wildcard, refer to [A purge did not expire a variation of the object](/en/documentation/platform/applications/troubleshooting/#a-purge-did-not-expire-a-variation-of-the-object). ### A behavior or a variable cannot be selected in Rules Engine -On the **Rules Engine** tab of an application, a behavior such as **Bypass Cache**, **Forward Cookies**, or **Rewrite Request** cannot be added to a rule, and the `${device_group}` variable is missing from the criteria. +In Azion Console, on the **Rules Engine** tab of an Application, a behavior such as _Bypass Cache_, _Forward Cookies_, or _Rewrite Request_ cannot be added to a rule. In the list, its name ends with `- Required Application Accelerator`, and the `${device_group}` variable is missing from the criteria. -Seven behaviors and the `${device_group}` variable stay locked while Application Accelerator is off on the application. +Six behaviors and the `${device_group}` variable stay locked while Application Accelerator is off in the Application. -- **Turn on Application Accelerator**: its switch is in **Main Settings** › **Modules**. -- **Turn on Functions for Run Function**: **Run Function** also needs [Functions](/en/documentation/platform/functions/) on the application, as [Run Function is missing from the behaviors list](/en/documentation/platform/functions/troubleshooting/#run-function-is-missing-from-the-behaviors-list) explains. +- **Turn on Application Accelerator**: in Azion Console, its switch is in **Main Settings** › **Modules**. +- **Turn on Functions for Run Function**: _Run Function_ depends on [Functions](/en/documentation/platform/functions/) turned on in the Application, not on Application Accelerator, as [Run Function is missing from the behaviors list](/en/documentation/platform/functions/troubleshooting/#run-function-is-missing-from-the-behaviors-list) explains. -A rule can then take the seven behaviors, and its criteria can use `${device_group}`, as [Rules Engine behaviors](/en/documentation/platform/applications/application-accelerator/settings/#rules-engine-behaviors) lists by phase. +A rule can then take the six behaviors, and its criteria can use `${device_group}`, as [Rules Engine behaviors](/en/documentation/platform/applications/application-accelerator/settings/#rules-engine-behaviors) lists by phase. ### Content is served from cache with Bypass Cache configured -**Bypass Cache** needs Application Accelerator, and a rule that applies it can still be answered from the Tiered Cache layer, which [Bypass Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache) leaves untouched. The rule works, so changing it fixes nothing: turn off Tiered Cache and purge both layers, as [Content is still served from cache after a Bypass Cache rule](/en/documentation/platform/applications/troubleshooting/#content-is-still-served-from-cache-after-a-bypass-cache-rule) describes. +_Bypass Cache_ needs Application Accelerator, and a request that a _Bypass Cache_ rule matches can still be answered from the Tiered Cache layer, which [Bypass Cache](/en/documentation/platform/applications/cache/tiered-cache/#bypass-cache) leaves untouched. The rule works, so changing it fixes nothing: turn off Tiered Cache and purge both layers, as [Content is still served from cache after a Bypass Cache rule](/en/documentation/platform/applications/troubleshooting/#content-is-still-served-from-cache-after-a-bypass-cache-rule) describes. ### A cache variation is refused with error 21013 -Saving a cache setting that sets a field of its **Application Accelerator** section returns `400` and code `21013`, as [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details. +Saving a cache setting returns `400` and code `21013` when it sets a variation in its **Application Accelerator** section in Azion Console, or a `behavior` other than `ignore` or a method in `modules.application_accelerator` in the API. [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details the code. -Those fields, under `modules.application_accelerator`, vary the cache by method, query string, cookie, and device group, and each one needs Application Accelerator. +A cache variation by method, query string, cookie, or device group needs Application Accelerator. -- **Turn on Application Accelerator, then save the setting again**: the switch is in **Main Settings** › **Modules**. -- **Read the reason when Azion CLI hides it**: with `--format json`, Azion CLI 4.23.0 prints this refusal as `{"error": {}}` for a setting with a query string allowlist, as [Azion CLI prints an empty error object](/en/documentation/platform/applications/troubleshooting/#azion-cli-prints-an-empty-error-object) explains. +- **Turn on Application Accelerator, then save the setting again**: in Azion Console, the switch is in **Main Settings** › **Modules**. +- **Read the reason when Azion CLI hides it**: with `--format json`, Azion CLI 4.23.0 prints this refusal as `{"error": {}}` for a setting with a query string allowlist, and 4.24.0 also loses the code and the title of a refusal. To read the reason, refer to [Azion CLI prints an empty error object](/en/documentation/platform/applications/troubleshooting/#azion-cli-prints-an-empty-error-object). The setting then saves, and its variation reads back as sent. ### A query string variation is refused with error 21018 -A cache setting whose query string behavior is _Allowlist_ or _Denylist_, sent with an empty list of fields, returns `400` and code `21018`, as [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details. +A cache setting whose query string behavior is `allowlist` or `denylist`, sent with an empty list of fields, returns `400` and code `21018`, as [Errors](/en/documentation/platform/applications/cache/cache-settings/#errors) details. -Those behaviors name the fields the key varies by, so each needs at least one, and Azion Console makes **Fields** required. +`allowlist` names the fields the key varies by, and `denylist` names the ones it leaves out. Each needs at least one, and Azion Console makes **Fields** required. -- **List the fields**: enter at least one query string parameter in **Fields**, one per line, or send them in `fields` through the API. -- **Keep the default when the key should not vary**: _Ignore_, the default behavior, saves with an empty `fields` list. +- **List the fields**: in Azion Console, enter at least one query string parameter in **Fields**, one per line, or send them in `fields` through the API. +- **Keep the default when the key should not vary**: the default behavior, `ignore` in the API and _Ignore_ in Azion Console, saves with an empty `fields` list. The setting then saves, with `cache_vary_by_querystring` holding what you sent, as [Cache variation](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation) lists. @@ -297,58 +321,70 @@ The setting then saves, with `cache_vary_by_querystring` holding what you sent, ## Image Processor -Image Processor builds a derived image from the source image when a rule applies **Optimize Images**, and it is off on a new application. For the path from the source image to the derived image, refer to the [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path). +Image Processor builds a derived image from the source image when a rule applies _Optimize Images_, and it is off in a new Application. For the path from the source image to the derived image, refer to the [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path). -### A 504 error on a request whose ims is not the last parameter +### The image comes back untransformed although x-ims reads Enabled -A request for an image returns a `504` error, and its URL has another query string parameter after `ims=`. +A request with an `ims` query string returns the source image as it is, and the response carries `x-ims: Enabled`. -`ims=` has to come last among the parameters of the URL: a parameter after it may make the request return a `504`, though not every such request fails. +Image Processor cannot parse the `ims` value, such as `450xOrig`, so it returns the source image without a transformation. `ims` can sit anywhere in the query string, so only its value decides the result. -- **Put `ims` last**: move the other parameters ahead of `ims=`, as in `example.com/image.jpeg?ts=1234&ims=1000x1000`. For the rule, refer to [Position of the ims parameter](/en/documentation/platform/applications/image-processor/url-parameters/#position-of-the-ims-parameter). +- **Write the value in a form that Image Processor parses**: for example, `?ims=400x` for a width of 400 pixels, as [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/) shows for each parameter. -With `ims=` last, the URL returns the derived image, not a `504`. +The URL then returns the derived image, with the transformation that the `ims` value requests. ### The image is delivered unprocessed and its ims query string is ignored The `ims` query string of a request is valid, yet the source image comes back as it is, without a resize, a crop, or a filter. -An `ims` query string does not start a transformation by itself: a rule has to match the request and apply **Optimize Images**. +A transformation starts only when a rule matches the request and applies _Optimize Images_, whatever the `ims` query string asks for. -- **Check what the rule matches**: on the **Rules Engine** tab, compare the rule's criterion with the request. A criterion for images compares `${uri}`, or `${request_uri}` with Application Accelerator on, through `matches` with an argument such as `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. -- **Check the behavior**: **Optimize Images** has to be a Request Phase behavior of the rule, beside **Set Cache Policy** when the rule also caches the result, as [Rules Engine behaviors](/en/documentation/platform/applications/image-processor/settings/#rules-engine-behaviors) describes. +- **Check what the rule matches**: in Azion Console, on the **Rules Engine** tab of the Application, compare the rule's criterion with the request. A criterion for images compares `${uri}`, or `${request_uri}` with Application Accelerator on, through `matches` with an argument such as `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. +- **Check the behavior**: _Optimize Images_ has to be a Request Phase behavior of the rule. When the rule also caches the result, _Set Cache Policy_ sits beside it, as [Rules Engine behaviors](/en/documentation/platform/applications/image-processor/settings/#rules-engine-behaviors) describes. - **Follow the guide**: [Configure Image Processor on an application](/en/documentation/guides/application-performance/delivery-optimization/process-images/) builds the rule step by step. A request that matches the rule then gets a derived image, with `x-ims: Enabled` in the response headers. -### The image is not converted to WEBP +### A file that is not an image returns an empty 400 + +A request that a rule with _Optimize Images_ matches returns `400` with an empty body. The response carries `server: Azion IMS` and no `x-ims` header. + +The rule matches a path that does not return an image, such as a text file or a JSON response, and _Optimize Images_ makes that request fail. The rule's criteria have to match image paths only. + +- **Narrow the criterion to image extensions**: a criterion for images compares `${uri}`, or `${request_uri}` with Application Accelerator on, through `matches` with an argument such as `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. For the rule, refer to [Rules Engine behaviors](/en/documentation/platform/applications/image-processor/settings/#rules-engine-behaviors). + +A request for a file outside the criterion then gets the origin's response. + +### The image is not converted to WEBP or AVIF + +You request a WEBP or AVIF conversion, and the image arrives in another format. -You request a WEBP conversion, and the image arrives in another format. +A `filters:format()` filter returns the format it names whatever `Accept` header the request carries, as [Format conversion](/en/documentation/platform/applications/image-processor/url-parameters/#format-conversion) states, so an image in another format means that the conversion does not run. The `x-ims` header of the response tells the two causes apart: -A WEBP conversion happens only for a request whose `Accept` header names the format, `Accept: image/webp`, as [Format conversion](/en/documentation/platform/applications/image-processor/url-parameters/#format-conversion) requires. +- **Check what the rule matches when the response has no `x-ims`**: no rule with _Optimize Images_ matches the request. [The image is delivered unprocessed and its ims query string is ignored](/en/documentation/platform/applications/troubleshooting/#the-image-is-delivered-unprocessed-and-its-ims-query-string-is-ignored) shows what the rule has to match. +- **Check the `ims` value when the response carries `x-ims: Enabled`**: Image Processor cannot parse the value, as [The image comes back untransformed although x-ims reads Enabled](/en/documentation/platform/applications/troubleshooting/#the-image-comes-back-untransformed-although-x-ims-reads-enabled) describes. -- **Set the header from a rule**: give the rule an **Add Request Header** behavior in its Request Phase, with the value `Accept: image/webp`, `add_request_header` in the API. For the behavior, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#rules-engine-behaviors). +Matching requests then get the image back as `image/webp` or `image/avif`, the format the `ims` string requests. -Matching requests then get the image back as `image/webp`. +### Every request for the same derived image reaches Image Processor -### Every request for the same derived image is processed again +Repeated requests for the same image with the same `ims` value never report `HIT` in `x-cache`. -Each request for the same image with the same `ims` value adds a processed image to the Images meter of the account, instead of coming from cache. +No cache setting applies to the image requests, so the Application's cache keeps no derived image. Every request reaches Image Processor, which answers a repeated transformation from its own cache. -**Optimize Images** processes the image, and keeping the result takes a cache setting that a rule applies with **Set Cache Policy**. Varying that setting by `ims` is a query string variation, so it needs Application Accelerator, which processing does not. +- **Apply a cache setting to the image requests**: add _Set Cache Policy_, with the cache setting that serves images, to the rule that applies _Optimize Images_. For the query string allowlist that this setting carries, refer to [Cache variation](/en/documentation/platform/applications/image-processor/settings/#cache-variation). -- **Apply a cache setting to the image requests**: add **Set Cache Policy**, with the cache setting that serves images, to the rule that applies **Optimize Images**. -- **Add ims to the query string allowlist**: in **Cache vary by Query String**, in the **Application Accelerator** section of that setting, choose _Allowlist_ as the **Behavior** and enter `ims` in **Fields**, as [Cache variation](/en/documentation/platform/applications/image-processor/settings/#cache-variation) describes. +The rule then applies the cache setting to each image request it matches, and a request that the cache answers does not reach Image Processor. -Read back, the cache setting then holds `{ "behavior": "allowlist", "fields": ["ims"], "sort_enabled": false }` in `cache_vary_by_querystring`. +### A fit-in resize does not enlarge the image -### A resize larger than the original does not enlarge the image +You ask for `fit-in/WidthxHeight` with dimensions beyond those of the source image, and the derived image comes back no bigger than the original. -You ask for `fit-in/WidthxHeight`, or for dimensions beyond those of the source image, and the derived image comes back no bigger than the original. +`fit-in` scales an image down only. Without `fit-in`, a larger size enlarges the image. -The resize works as designed, and no setting changes it. `fit-in` does not scale an image up, and without `fit-in`, a request for more resolution than the original has returns the highest resolution the source allows. +- **Request the size without `fit-in`**: `?ims=1200x` enlarges the width and keeps the proportions, and `?ims=1200x900` fills the exact box, as [Resize](/en/documentation/platform/applications/image-processor/url-parameters/#resize) shows for every form. -The result keeps the size of the source image, or takes the largest size that fits the requested box, as [Resize](/en/documentation/platform/applications/image-processor/url-parameters/#resize) shows for every form. +The derived image then comes back at the requested size, larger than the source image. ### A rotation value has no effect @@ -367,7 +403,7 @@ The derived image is then turned to the left by the angle you requested. Each variable, operator, and behavior of a rule, and the errors returned when a rule is refused. - The Product switches, the Debug Rules setting, and the errors an application write returns. + The switches of the Platform Resources, the Debug Rules setting, and the errors that a write to an Application returns. The upgrade headers, the support a client and an origin need, and the status a connection returns. The purge types, the two layers, and the purge that reaches each kind of variation. diff --git a/apps/docs/src/content/docs/en/pages/build/cache/cache-keys.mdx b/apps/docs/src/content/docs/en/pages/build/cache/cache-keys.mdx index 546932400a..6466811a18 100644 --- a/apps/docs/src/content/docs/en/pages/build/cache/cache-keys.mdx +++ b/apps/docs/src/content/docs/en/pages/build/cache/cache-keys.mdx @@ -2,7 +2,7 @@ title: Cache keys description: >- Look up how Azion builds a cache key from a request, what each variation - appends to it, and the debug headers that show the key and the cache status. + adds to it, and the debug headers that show the key and the cache status. meta_tags: 'cache key, cache keys, x-cache, x-cache-key, azion-debug-cache, cache status, hit, miss, cache variation, advanced cache key' namespace: documentation_products_cache_cache_keys permalink: /documentation/platform/applications/cache/cache-keys/ @@ -12,66 +12,67 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -A cache key is the index entry [Cache](/en/documentation/platform/applications/cache/) stores an object under. Azion builds it from the request: the scheme, the host, the path, and the variations a cache setting adds. A request whose key matches a stored object is answered from the copy. Otherwise the request goes to the origin, and Azion stores the response under that key. For the lookup, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/); for the fields that add variations, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). +A cache key is the index entry [Cache](/en/documentation/platform/applications/cache/) stores an object under. Azion builds it from the request: the scheme, the host, the path, and the variations that a cache setting or [Image Processor](/en/documentation/platform/applications/image-processor/) adds. A request whose key matches a valid stored object is answered with that object. Otherwise the origin or a [Function](/en/documentation/platform/functions/) builds the response, and Azion can store that response under that key. For the lookup, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). For the fields that add variations, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). --- ## Key format -The default key concatenates four elements of the request URI, in this order: +The default key concatenates three elements of the request URI, in this order: | Element | Example | | --- | --- | | Scheme | `https` | | Host | `static.example.com` | | Path | `/page/site.js` | -| Variation separator and variations | `@@Mobile` | The query string is not part of the default key: `https://static.example.com/page/site.js?city=city&name=name` produces the same key as the URI without it. The query-string variation under Variations adds it. -The URI `https://static.example.com/page/site.js` produces the key `httpsstatic.example.com/page/site.js`. Keys are case sensitive: upper and lower case characters are distinct. When a cache setting turns a variation on, the key can end with the `@@` separator, as in `httpsstatic.example.com/page/site.js@@`. Each variation listed under Variations is appended after that separator. +The URI `https://static.example.com/page/site.js` produces the key `httpsstatic.example.com/page/site.js`. Keys are case sensitive: upper and lower case characters are distinct. When a cache setting turns a variation on, the key can end with the `@@` separator, as in `httpsstatic.example.com/page/site.js@@`. The table under Variations shows where each variation goes: the request method is a prefix, and the other variations follow `@@`, the query string included when its behavior is `allowlist` or `denylist`. Under `all`, the whole query string follows the path, before `@@`. --- ## Variations -A variation appends to the default key, so one URI can hold more than one object in the cache. The table lists what each variation appends and the key it produces. +A variation adds to the default key, so one URI can hold more than one object in the cache. The table lists what each variation adds and the key it produces. -| Variation | What is appended | Example key | +| Variation | What it adds | Example key | | --- | --- | --- | | Complex request | The request method, prefixed to the key. A `GET` or `HEAD` request carries no prefix. | `optionshttpsstatic.example.com/page` | -| Query string | The `?` separator and the arguments the setting names, in the order the request sends them. With **Sort** on, `?name=name&city=city` and `?city=city&name=name` share one key, with the arguments in alphabetical order. | `httpstatic.example.com/page?name=name`, `httpstatic.example.com/page?city=city&name=name`, `httpstatic.example.com/page?name=name&city=city` | -| Cookies | `@@`, then each cookie name and value the setting names, followed by `;`. The empty variation, with no cookie value, is `@@;`. | `httpwww.example.com/@@;`, `httpwww.example.com/@@user=user;` | +| Query string | Under `allowlist` and `denylist`: `@@`, then `?` and the arguments the setting keeps. Under `all`: `?` and the whole query string, after the path and before `@@`. | `httpstatic.example.com/page@@?name=name`, `httpstatic.example.com/page?city=city&name=name@@` | +| Cookies | Under `allowlist` and `denylist`: `@@`, then each cookie name and value the setting keeps, followed by `;`. The empty variation, with no cookie value, is `@@;`. Under `all`, the whole `Cookie` header follows `@@` as it arrived, spaces included. | `httpwww.example.com/@@;`, `httpwww.example.com/@@user=user;` | | Device group | `@@` and the name of the device group. | `httpwww.example.com/@@Mobile` | -| [Image Processor](/en/documentation/platform/applications/image-processor/) | The `ims` query string, and the converted image format after `@@`. | `httpsstatic.example.com/static/images/image_1.jpg?ims=880x@@webp` | -| Large File Optimization | `@@bytes=-` for each fragment, so each fragment carries its own key. A file of 2,097,151 bytes produces two keys. | `httpsstatic.example.com/media/file.mp4@@bytes=0-1048575`, `httpsstatic.example.com/media/file.mp4@@bytes=1048576-2097151` | -| Cached `POST` or `OPTIONS` | `@@` and the MD5 hash of the request body. | `httpsdynamic.example.com/path@@md5_of_post_arguments`, `httpsdynamic.example.com/path@@md5_of_options_arguments` | +| [Image Processor](/en/documentation/platform/applications/image-processor/) | The converted image format, at the end of the key with no separator. When the cache setting names `ims` in its query-string allowlist, the `ims` query string follows `@@`, and the format follows it. When the cache setting does not vary the key by query string, the `ims` value is not part of the key, so every size and processing of the path shares a key, and the first one stored answers every `ims` value. | `httpsstatic.example.com/static/images/image_1.jpg@@webp`, `httpsstatic.example.com/static/images/image_1.jpg@@?ims=880xwebp` | +| Large File Optimization | `@@bytes=-` for each fragment, so each fragment carries its own key. A file of 2,097,152 bytes produces two keys. | `httpsstatic.example.com/media/file.mp4@@bytes=0-1048575`, `httpsstatic.example.com/media/file.mp4@@bytes=1048576-2097151` | +| Cached `POST` | `@@` and the MD5 (Message Digest 5) hash of the request body, after the `post` prefix. A cached `OPTIONS` carries only the `options` prefix. | `posthttpsdynamic.example.com/path@@`, `optionshttpsdynamic.example.com/path` | -The query-string and cookie fields are case sensitive, so `user` and `User` are two variations. For a cached `POST` or `OPTIONS` request, the request body is part of the key. The query-string, cookie, device group, and request method variations are the feature named Advanced Cache Key. For what each behavior does to the key, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation). +The query-string and cookie fields are case sensitive, so `user` and `User` are two variations. With `sort_enabled` on in the cache setting, `?name=name&city=city` and `?city=city&name=name` share one key, with the arguments in alphabetical order. -These controls produce the variations: +The query-string, cookie, device group, and request method variations make up Advanced Cache Key, a Feature of [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). Each of them requires Application Accelerator on the Application. For what each behavior does to the key, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation). -- **Cache vary by Method** caches `POST` and `OPTIONS` requests. -- **Cache vary by Query String**, with its **Behavior** and **Sort**, sets the query-string variation. -- **Cache vary by Cookies** sets the cookie variation. -- **Cache vary by Devices** sets the device group variation, for the groups defined in [Device Groups](/en/documentation/platform/applications/device-groups/). -- **Large file optimization** splits the object into fragments, each with its own key. -- Image Processor adds the format variation. +In Azion Console, these controls produce the variations, with the API field of each one in parentheses: -For the field behind each control, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). +- **Cache vary by Method** (`cache_vary_by_method`) makes `POST` and `OPTIONS` responses cacheable. +- **Cache vary by Query String** (`cache_vary_by_querystring`) sets the query-string variation, with its **Behavior** and **Sort**. +- **Cache vary by Cookies** (`cache_vary_by_cookies`) sets the cookie variation. +- **Cache vary by Devices** (`cache_vary_by_devices`) sets the device group variation, for the groups defined in [Device Groups](/en/documentation/platform/applications/device-groups/). +- **Large file optimization** (`large_file_cache.enabled`) splits a large object into fragments, each with its own key. +- Image Processor, turned on in the Application (`modules.image_processor.enabled`), adds the format variation. + +For the type and default of each field, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). --- ## Debug headers -To read the status and the key of a response, send the request with the header `Pragma: azion-debug-cache`. The response carries two headers. `x-cache` holds the cache status, the IP address of the server that answered the request, and the protocol. `x-cache-key` holds the key: +To read the status and the key of a response, send the request with the header `Pragma: azion-debug-cache`. The response carries several `x-cache-*` headers, and two of them hold the status and the key. `x-cache` holds the cache status, the IP address of the server that answered the request, and the protocol. `x-cache-key` holds the key: -```http +```text x-cache: MISS from 192.0.2.10 with HTTP/2.0 x-cache-key: httpsstatic.example.com/page/site.js ``` -Under HTTP/2, the header names arrive in lower case. A response the platform does not cache carries `-` in both headers. Consecutive requests for one path can each be answered by a different server, which `x-cache` names. For the procedure, refer to [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). +Under HTTP/2, the header names arrive in lower case. A `GET` or `HEAD` response that Azion does not store carries `-` in both headers while Application Accelerator is on; with it off, the same response reports `MISS`, with its key in `x-cache-key` and `x-cache-expires-in: 0`. A `POST`, `PUT`, `PATCH`, `DELETE`, or `OPTIONS` response that Azion does not store carries `-` either way. Consecutive requests for one path can each be answered by a different server, which `x-cache` names. For the procedure, refer to [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). --- @@ -81,14 +82,16 @@ The `x-cache` header opens with one of eight values. Each one names what Cache d | Status | Meaning | | --- | --- | -| `HIT` | Valid, up-to-date content served from the cache of the data center nearest to the user. The origin is not reached. | +| `HIT` | Valid, up-to-date content served from the cache of the data center that answered the request. The origin receives no request. | | `MISS` | The content is not in the cache. Azion fetches it from the origin, and the response may be stored for later requests. | -| `EXPIRED` | The cached copy passed its TTL. When the origin responds, the response updates the copy for later requests. | -| `STALE` | Stale cache is on, the copy expired, and the origin failed to respond, so Azion serves the expired copy. For more information, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). | -| `UPDATING` | The copy expired, and Azion serves it while the content is updated from the origin. For more information, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). | +| `EXPIRED` | The cached copy passed its time to live (TTL). When the origin responds, the response updates the copy for later requests. | +| `STALE` | Stale cache is on, the copy expired, and the origin failed to respond, so Azion serves the expired copy. | +| `UPDATING` | The copy expired, and Azion serves it while the content is updated from the origin. | | `REVALIDATED` | Azion checked the copy against the origin with conditional headers, and it was still current, so the origin did not send it again. | -| `BYPASS` | The request went to the origin because a [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior applies. | -| `-` | No status: the content is restricted from caching. For example, a `POST` request when caching for `POST` is off. A `GET` or `HEAD` response that a function builds can carry it too. | +| `BYPASS` | The request went to the origin because a [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior applies. A response under that behavior can report `-` instead. | +| `-` | No status: Azion did not store the response. A `POST` reports it when caching for `POST` is off, and a `GET` or `HEAD` response that is not stored reports it while Application Accelerator is on. With Application Accelerator off, that `GET` or `HEAD` response reports `MISS` with `x-cache-expires-in: 0`. | + +For more information on the `STALE` status, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). --- diff --git a/apps/docs/src/content/docs/en/pages/build/cache/how-it-works.mdx b/apps/docs/src/content/docs/en/pages/build/cache/how-it-works.mdx index 821236ad96..45be01392c 100644 --- a/apps/docs/src/content/docs/en/pages/build/cache/how-it-works.mdx +++ b/apps/docs/src/content/docs/en/pages/build/cache/how-it-works.mdx @@ -1,6 +1,6 @@ --- title: Expiration and freshness -description: How long a cached copy lives, when an expired copy may still answer, and how large files, variations, Tiered Cache, and purges change it. +description: See how long a cached copy lives, when an expired copy may still answer, and how fragments, variations, Tiered Cache, and purges change it. meta_tags: 'cache, expiration, freshness, TTL, max age, stale cache, large file optimization, cache key, cache variation, tiered cache, purge' namespace: documentation_products_cache_how_it_works permalink: /documentation/platform/applications/cache/expiration-and-freshness/ @@ -9,7 +9,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -How long a cached copy answers for the origin decides how fresh a response is and how often the origin is asked. On an application, a cache setting decides that time and what happens after it, and a purge ends a copy early. How a request reaches a cached copy, with the diagram of the cache path, is on the [Cache overview](/en/documentation/platform/applications/cache/#request-path). +The time a cached copy answers for the origin decides two things: how fresh a response is, and how often the origin is asked. In an Application, [Cache](/en/documentation/platform/applications/cache/) is the Platform Resource that stores the copy, and a [cache setting](/en/documentation/platform/applications/cache/cache-settings/) sets that time as its time to live (TTL). The cache setting also decides what happens after the TTL ends. A purge ends a copy early. The [Cache overview](/en/documentation/platform/applications/cache/#request-path) shows how a request reaches a cached copy, with a diagram of the cache path. The sections cover TTL and expiration, stale cache, Large File Optimization, cache keys and variations, Tiered Cache, and purge. @@ -17,42 +17,41 @@ The sections cover TTL and expiration, stale cache, Large File Optimization, cac ## TTL and expiration -A cache setting carries two TTLs. The browser TTL controls how long a visitor's browser keeps its copy, and the cache TTL controls how long Azion keeps its own. A request the browser answers from its copy never reaches Azion, and a request Azion answers from its copy never reaches the origin. +A cache setting carries two TTLs. The browser TTL controls how long a visitor's browser keeps its copy. The cache TTL controls how long Azion keeps its own. A request that the browser answers from its copy stops at the browser, and a request that Azion answers from its copy stops at Azion. -Where each TTL comes from depends on the behavior the setting selects. In the **Cache** section, _Honor cache policies_ keeps the `Cache-Control` and `Expires` headers the origin sends and forwards them to the browser, so the origin decides how long its content lives. _Override cache behavior_ replaces those headers for Azion's cache with the value of **Max Age**. The **Browser Cache** section carries its own choice for the browser's copy: _Honor cache policies_, _Override cache settings_, or _No cache_. When the origin sends no TTL under _Honor cache policies_, Azion keeps the copy for a default TTL. +Where each TTL comes from depends on the behavior the setting selects for each copy. For Azion's copy, the behavior is the `modules.cache.behavior` field. _Honor cache policies_ (`honor`) keeps the `Cache-Control` and `Expires` headers of the origin and forwards them to the browser, so the origin decides how long its content lives. _Override cache behavior_ (`override`) replaces those headers for Azion's cache with Max Age, the `modules.cache.max_age` field. When the origin sends no TTL under _Honor cache policies_, Azion keeps the copy for the Max Age of the setting. The browser's copy has its own behavior in the `browser_cache.behavior` field: _Honor cache policies_, _Override cache settings_, or _No cache_. -The copy expires when the cache TTL ends, and the next request for the object goes to the origin. When the origin returns the object, that response updates the copy, and the response reports `EXPIRED`. A check with conditional headers can also find the copy unchanged. The response then reports `REVALIDATED`, and the origin does not transmit the object again. +The copy expires when the cache TTL ends, and the next request for the object goes to the origin. When the origin returns the object, that response updates the copy. The response reports `EXPIRED`. A check with conditional headers can also find the copy unchanged. The response then reports `REVALIDATED`, and the origin confirms the copy instead of sending the object again. -A request that finds no valid copy is a cache miss, and on a miss the platform limits what the origin has to do. When several requests for the same uncached object arrive at the same time, Azion opens one connection to the origin for all of them. Where possible, Azion also keeps its connections to the origin open between fetches, instead of opening a new one each time. Under a burst of requests for an uncached object, the origin therefore sees one fetch per data center, not one per visitor. +A request that finds no valid copy is a cache miss. On a miss, the platform limits the work of the origin. When several requests for the same uncached object reach the same server at the same time, that server opens one connection to the origin for all of them. So, under a burst of requests for an uncached object, the origin sees one fetch per server that received the burst, not one per visitor. -The TTL is a trade between the load on the origin and the age of what a visitor sees. A long TTL answers more requests from the copy and reaches the origin less, but content the origin already changed stays in the copy until it expires. A short TTL keeps the copy close to the origin's version, at the price of more origin fetches. For example, one application can hold two cache settings, each applied by its own rule. Images that rarely change take a TTL of a day, and a listing that changes through the day takes a TTL of a few minutes. +The TTL is a trade between the load on the origin and the age of what a visitor sees. A long TTL answers more requests from the copy and reaches the origin less, but content the origin already changed stays in the copy until it expires. A short TTL keeps the copy close to the origin's version, at the price of more origin fetches. For example, one Application can hold two cache settings, each applied by its own rule. Images that rarely change take a TTL of a day, and a listing that changes through the day takes a TTL of a few minutes. -**Max Age** has a floor and a ceiling. Without Application Accelerator, the floor is 60 seconds, and Application Accelerator lowers it. For every TTL bound, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache-settings). For how a TTL of 0 seconds differs from bypassing the cache, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). +Max Age has a floor and a ceiling, and [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) lowers the floor. For every TTL bound, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache-settings). For how a TTL of 0 seconds differs from bypassing the cache, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). --- ## Stale cache -A copy past its TTL still has a use. With **Stale cache** on in the cache setting, Azion may reuse an expired copy when a revalidation attempt fails for one of four reasons: +A copy past its TTL still has a use. With stale cache on in the cache setting, Azion may reuse an expired copy when a revalidation attempt fails, for one of three reasons: - The origin returns a `5xx` error. - The connection times out, or the origin is unreachable. - The cache-control headers of the origin are invalid or missing. -- The object is under update, with a revalidation in progress. -How long the expired copy may be served is the stale window. Under _Honor cache policies_, the window is the value of the `stale-while-revalidate=` directive the origin supplies. Under _Override cache behavior_, or when the origin omits the directive, the window is 300 seconds. During the window, the data center serves the expired copy at once and fetches a fresh version in the background. Once the new object is stored, later requests receive the updated content. +How long the expired copy may be served is the stale window. Under _Honor cache policies_, the window is the value of the `stale-while-revalidate=` directive the origin supplies. Under _Override cache behavior_, or when the origin omits the directive, the window is 300 seconds. -The response says which case applies. A response served from an expired copy because the origin failed to respond reports `STALE`. A response served while the fresh version is on its way from the origin reports `UPDATING`. +A response served from an expired copy because the origin failed to respond reports `STALE`. -Stale cache shows visitors an old page instead of an error page during an origin outage, for as long as the window lasts. The cost is freshness: a visitor inside the window can receive content the origin already replaced. A change that every visitor has to see at once is therefore a case for a purge rather than for expiry. +Stale cache shows visitors an old page instead of an error page during an origin outage, for as long as the window lasts. The cost is freshness: a visitor inside the window can receive content the origin already replaced. So a change that every visitor has to see at once is a case for a purge rather than for expiry. -Whether a new setting starts with the toggle on depends on the interface. A setting created through the API or the CLI has stale cache off, and Azion Console turns it on for a new setting. For the field, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#cache). +Whether stale cache starts on in a new setting depends on the interface. Its field is `modules.cache.stale_cache.enabled`. A setting created through the API or the CLI has it off, and Azion Console turns it on for a new setting. [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#cache) shows where to change it in each interface. --- ## Large File Optimization -A large object can be cached in fragments rather than as one piece. With **Large file optimization** on in the cache setting, Azion splits the file into fragments of 1,024 kB. Each fragment is delivered as the user consumes it, and it is cached on demand, at the moment it is requested. The cache key of a fragment ends in `@@bytes=` and the byte range the fragment holds, so every fragment is an object of its own. +A large object can be cached in fragments rather than as one piece. With Large File Optimization on in the cache setting, in its `modules.cache.large_file_cache.enabled` field, Azion splits the file into fragments of 1,024 kB. Each fragment is delivered as the user consumes it, and it is cached on demand, at the moment it is requested. The cache key of a fragment ends in `@@bytes=` and the byte range of the fragment. So every fragment is an object of its own. For example, a video of 2,097,151 bytes at `https://static.example.com/media/file.mp4` becomes two fragments. They are stored under these keys: @@ -61,7 +60,7 @@ httpsstatic.example.com/media/file.mp4@@bytes=0-1048575 httpsstatic.example.com/media/file.mp4@@bytes=1048576-2097151 ``` -A fragment is fetched only when a user reaches it, so a download that stops partway leaves the later fragments unfetched. The fragments that were fetched stay cached for the next request. The fragmentation applies to Azion's cache, and to the Tiered Cache layer when the setting has that toggle on. +A fragment is fetched only when a user reaches it, so a download that stops partway leaves the later fragments unfetched. The fragments that were fetched stay cached for the next request. The fragmentation applies to Azion's cache, and to the Tiered Cache layer when the setting has Tiered Cache on. The cost comes at purge time. One file becomes many keys, so a purge lists the key of each fragment, or uses a wildcard that ends the path of the file with `*`. A purge that removes some fragments and not others leaves a mix of new and old fragments in the cache. For the purge types, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-types). @@ -69,43 +68,44 @@ The cost comes at purge time. One file becomes many keys, so a purge lists the k ## Cache keys and variations -A variation is a second copy of one URL, stored under a different cache key. While no variation is on, one path is one stored object. Azion builds the default key from the scheme, the host, and the path of the request. The query-string control of a cache setting starts at `ignore`, which keeps the query string out of the key. When something other than the path changes the response, the cache setting names it, and the key carries a marker for it. +A variation is a further copy of one path, stored under its own cache key because something other than the path differs. While no variation is on, one path is one stored object. Azion builds the default key from the scheme, the host, and the path of the request. A cache setting holds its query-string variation in the `cache_vary_by_querystring.behavior` field, which starts at `ignore` and keeps the query string out of the key. When something other than the path changes the response, the cache setting names it, and the key carries a marker for it. -Four inputs can vary a copy through the **Application Accelerator** section of a cache setting: a query-string argument, a cookie, the device group a request falls in, and the request method. Two more come from elsewhere. Image Processor adds the image format when it converts an image, and Large File Optimization adds the byte range of each fragment. Each distinct value is a separate key, so each one is stored and purged separately. +Four inputs can vary a copy through the `modules.application_accelerator` object of a cache setting: -Device groups come from the **Device Groups** tab of the application, which [Device Groups](/en/documentation/platform/applications/device-groups/) documents. With **Cache vary by Devices**, a setting either delivers one version whatever the device, or keeps a copy for each group it names. +- A query-string argument. +- A cookie. +- The device group a request falls in. +- The request method. -The method is a variation too. `GET` and `HEAD` responses are cached natively, and `POST` and `OPTIONS` responses are cached only with Application Accelerator on. The request body then becomes part of the key as an MD5 hash, so two different bodies posted to one path are two objects. +Two more come from elsewhere. [Image Processor](/en/documentation/platform/applications/image-processor/) adds the image format when it converts an image, and Large File Optimization adds the byte range of each fragment. Each distinct value is a separate key, so each one is stored and purged separately. -A variation splits the requests for one URL across several copies. Fewer requests find a copy already present, and a purge has to reach every copy. For example, a listing page that varies by a `page` argument stores one copy per page number, and a purge of the listing has to name each of them. For the marker each variation appends, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#variations). For the controls that turn a variation on, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation). +Device groups belong to the Application, and [Device Groups](/en/documentation/platform/applications/device-groups/) documents them. With `cache_vary_by_devices`, a setting delivers one version whatever the device, or keeps one copy per named group. + +The method is a variation too. `GET` and `HEAD` responses are cached natively, and `POST` and `OPTIONS` responses are cached only with Application Accelerator on and the method listed in `cache_vary_by_method`. The body of a `POST` then becomes part of the key as an MD5 hash, so two different bodies posted to one path are two objects. An `OPTIONS` key carries the method prefix only. + +A variation splits the requests for one path across several copies. Fewer requests find a copy already present, and a purge has to reach every copy. For example, a listing page that varies by a `page` argument stores one copy per page number, and a purge of the listing has to name each of them. For the marker each variation appends, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#variations). For the fields that turn a variation on, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation). --- ## Tiered Cache -[Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) adds a second cache layer between Azion's cache and the origin. When the data center that received a request holds no valid copy, it asks the Tiered Cache layer before it asks the origin. A miss in the first layer can therefore still be answered from cache, and the second layer keeps objects longer than the first. +[Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) is a Feature of Cache that adds a second cache layer between the data center that answers a request and the origin. When that data center holds no valid copy, it asks the Tiered Cache layer before the request goes to the origin. A valid copy in that layer answers the miss, and the origin receives no request. -The layer is turned on per cache setting with the **Tiered Cache** toggle, and every plan includes it. The setting names a topology, the region that holds the layer, such as `nearest-region` or `us-east-1`. Tiered Cache also requires _Override cache behavior_, because the API refuses it under _Honor cache policies_ with `21001`. +Each cache setting turns the layer on in its `modules.cache.tiered_cache.enabled` field, and every plan includes it. The setting names a topology in `modules.cache.tiered_cache.topology`: the region that holds the layer, such as `nearest-region` or `us-east-1`. Tiered Cache also requires _Override cache behavior_. Under _Honor cache policies_, the API refuses the setting with `21001`. -The trade is an extra hop and a floor on the TTL. A miss in the first layer travels to the second before it reaches the origin. A setting with Tiered Cache on also carries a minimum TTL, because the layer is designed for objects that stay cached a long time. In return, fewer requests reach the origin. For the minimum, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache-settings). +The trade is an extra hop and a floor on the TTL. A miss in the first layer travels to the second before it reaches the origin. A setting with Tiered Cache on also carries a minimum TTL. In return, fewer requests reach the origin. For the minimum, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache-settings). -A _Bypass Cache_ rule affects Azion's cache and not the Tiered Cache layer. An application with active Tiered Cache settings keeps caching objects in that layer for the minimum TTL. The layer is purged by cache key. When you purge an object held in both layers, purge the Tiered Cache layer first and then Cache, or the first layer refills from stale Tiered Cache content. For the purge layers, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#layers). +A _Bypass Cache_ rule affects Azion's cache and not the Tiered Cache layer. An Application with active Tiered Cache settings keeps caching objects in that layer for the Max Age of the cache setting. The layer is purged by cache key. When you purge an object held in both layers, purge the Tiered Cache layer first and then Cache, or the first layer refills from stale Tiered Cache content. For the purge layers, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#layers). --- ## Purge -A purge removes a stored copy before its TTL ends. The next request for the object finds no copy and goes to the origin, the response reports `MISS`, and the version the origin returns is stored. A purge is queued after you confirm it, because the result takes time to propagate. It appears in the purge history once it completes across Azion's infrastructure. - -A purge finds an object by its cache key, so the purge type matters for an object that varies. A URL purge converts each URL to a cache key without considering content variation. A copy that varies by cookie, device group, or image format therefore survives it. A cache key purge names each variation, and a wildcard purge reaches every key that matches an expression with `*`. Query-string variations are the exception a URL purge does reach. The arguments have to be sent in the order they were presented, or in alphabetical order when **Sort** is on. - -Removing an object with the `DEL` HTTP method instead of a purge also makes the first `GET` request of a user go to the origin. The difference is the safety net. The method keeps Azion from delivering a stale copy when the origin is inaccessible, and an error page is delivered instead. It suits three cases: +A purge removes a stored copy before its TTL ends. Once no layer holds a copy, the next request for the object goes to the origin, the response reports `MISS`, and the version the origin returns is stored. A purge is queued after you confirm it, because the result takes time to propagate. It appears in the purge history once it completes across Azion's infrastructure. -- Content left the origin and has to leave the cache too. -- Content whose timestamp is unreliable needs a forced removal and a later update. -- An error page is preferable to a stale copy while the origin is unreachable. +A purge finds an object by its cache key, so the purge type matters for an object that varies. A URL purge converts each URL to a cache key without considering content variation. So a copy that varies by cookie, device group, or image format survives it. A cache key purge names each variation. A wildcard purge reaches every key that matches an expression with `*`. Query-string variations are the exception a URL purge does reach. The arguments have to be sent in the order they were presented, or in alphabetical order when the cache setting sorts them, in its `cache_vary_by_querystring.sort_enabled` field. -A purge is the tool for a change that cannot wait for the TTL. Its cost is the origin fetch that refills each purged key, and the more keys an object has, through variations or fragments, the more a purge has to name. For the purge types and their arguments, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/). For the steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/). +A purge is the tool for a change that cannot wait for the TTL. Its cost is the origin fetch that refills each purged key. The more keys an object has, through variations or fragments, the more a purge has to name. For the purge types and their arguments, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/). For the steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/). --- diff --git a/apps/docs/src/content/docs/en/pages/build/cache/overview.mdx b/apps/docs/src/content/docs/en/pages/build/cache/overview.mdx index 664c866a59..d8aad994c8 100644 --- a/apps/docs/src/content/docs/en/pages/build/cache/overview.mdx +++ b/apps/docs/src/content/docs/en/pages/build/cache/overview.mdx @@ -1,6 +1,6 @@ --- title: Cache -description: Store copies of origin responses on an application with Cache, and answer later requests from them without asking the origin. +description: Store copies of the responses to the requests received by an Application, and answer later requests from them without asking the origin. meta_tags: 'cache, cache setting, ttl, max age, set cache policy, cache key, x-cache, stale cache, large file optimization, tiered cache, real-time purge, applications' namespace: documentation_products_cache_overview permalink: /documentation/platform/applications/cache/ @@ -10,18 +10,58 @@ import DocButton from '~/components/webkit/DocButton.vue' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -A cache keeps a copy of a response, so that the server that holds the content, the origin, does not answer every request for it. The first request for an object reaches the origin, and the cache stores the answer under a key built from the request. Later requests that produce the same key get the stored copy until its time to live (TTL) ends. The origin then answers only the first request and the requests that arrive after the copy expires. +**Cache** is a Platform Resource that stores copies of the responses to the requests received by your [Applications](/en/documentation/platform/applications/), on Azion's distributed infrastructure. A cache is a store of response copies between clients and the origin, the server that holds the content. It answers repeated requests with those copies. -**Cache** keeps those copies for an [application](/en/documentation/platform/applications/), in the data center that fetched each response. It is on in every new application, and it stores the responses of the requests that a Request Phase rule with the _Set Cache Policy_ behavior matches. That rule names a cache setting, the object that holds the TTLs. Use Cache to keep static files near your users, serve large videos in fragments, answer while the origin is down, or remove a copy when the origin changes. +The first request for an object reaches the origin, and the cache stores the response under a key built from the request. Later requests with the same key get the stored copy. The copy lasts until its time to live (TTL), a period in seconds, ends. The origin then answers only the first request and the requests that arrive after the copy expires. + +Cache is always on in an Application. It stores only the responses to the requests that a [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule with the _Set Cache Policy_ behavior matches. That rule applies a [cache setting](/en/documentation/platform/applications/cache/cache-settings/), which holds the TTLs and decides how Azion stores and varies each copy. Cache can store a response whether the origin or a [Function](/en/documentation/platform/functions/) builds it. Each copy stays in the data center that stored it. Use Cache to keep static files in the data center nearest to your user, serve large videos in fragments with Large File Optimization, answer with an expired copy through stale cache while the origin is down, or remove a copy with [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) when the origin changes. --- +## Request path + +Creating a cache setting caches nothing: a request reaches a stored copy only through a rule that applies the setting. + +Solid arrows carry the request, and dotted arrows carry the response. Each label starts with the number of its step below. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Client"]) + App["Application"] + Cache["Cache"] + Conn["Connector"] + Origin[["origin server"]] + Client -->|"1. request"| App + App -->|"2. cache setting"| Cache + Cache -.->|"3. valid copy"| App + App -->|"4. no valid copy"| Conn + App -->|"5. no cache setting, or Bypass Cache"| Conn + Conn -->|"4, 5. request"| Origin + Origin -.->|"4, 5. response"| Conn + Conn -.->|"4, 5. response"| App + App -.->|"4. copy to store"| Cache + App -.->|"3, 4, 5. response"| Client +``` + +1. The client's request reaches an Application, and the Application's Request Phase rules run in order. +2. When a _Set Cache Policy_ rule applies a cache setting, Cache builds the cache key from the request and from every variation the setting names. +3. When Cache holds a valid copy under that key, the data center that received the request answers from it. The response reports `HIT`. +4. Otherwise, the Connector that a _Set Connector_ rule sets routes the request to the origin, and the response reports `MISS`. Cache may store the response under the key for later requests. +5. When no rule applies a cache setting, or a _Bypass Cache_ rule matches, the request goes to the origin past Cache. _Bypass Cache_ requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). With _Bypass Cache_, nothing is stored, and the response reports `-` or `BYPASS` in `x-cache`. + +A stored copy answers until its TTL ends or a purge removes it. The status comes back in the `x-cache` header of a response to a request sent with `Pragma: azion-debug-cache`. For every status and the debug headers, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#cache-status). + +For TTL and expiration, stale cache, Large File Optimization, cache keys and variations, Tiered Cache, and purge, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). + +--- + ## Cache setting structure -Cache acts through a cache setting, which holds how long Azion and the browser keep a copy, and what Azion does with the copy around that time. This cache setting keeps each response for 300 seconds in Azion's cache and for one day in the browser, sent as the body of `POST /v4/workspace/applications//cache_settings`: +Cache acts through a cache setting. The setting holds how long Azion and the browser keep a copy, what Azion does with an expired copy, and what makes two requests different. To keep each response for 300 seconds in Azion's cache and for one day in the browser, send this cache setting as the body of `POST /v4/workspace/applications//cache_settings`: ```json { @@ -39,55 +79,27 @@ Cache acts through a cache setting, which holds how long Azion and the browser k } ``` -- `browser_cache` decides what a visitor's browser keeps. `honor` forwards the `Cache-Control` and `Expires` headers the origin sends, `override` replaces them with `max_age`, in seconds, and `no-cache` turns browser caching off. -- `modules.cache` decides what Azion keeps. With `behavior` set to `override`, `max_age` replaces the headers of the origin. Under `honor`, Azion keeps those headers, and it keeps a response whose origin sends no TTL for a default TTL. -- `stale_cache`, `large_file_cache`, and `tiered_cache` turn on stale cache, fragments of 1,024 kB, and a second cache layer in the region that `topology` names. A body that leaves one out gets it off, and `tiered_cache` requires the `override` behavior. -- A cache setting caches nothing on its own: a Request Phase rule applies it with `{ "type": "set_cache_policy", "attributes": { "value": } }`. [Azion Console](https://console.azion.com) builds the same setting from **+ Cache** on the **Cache Settings** tab of an application. +- `browser_cache` decides what a visitor's browser keeps. `honor` forwards the `Cache-Control` and `Expires` headers of the origin. `override` replaces them with `max_age`, in seconds. `no-cache` turns browser caching off. +- `modules.cache` decides what Azion keeps. With `behavior` set to `override`, `max_age` replaces the headers of the origin. Under `honor`, Azion keeps those headers. When the origin sends no TTL, Azion keeps the response for the `max_age` of the setting. +- `stale_cache`, `large_file_cache`, and `tiered_cache` turn on stale cache, fragments of 1,024 kB, and a second cache layer in the region that `topology` names. Stale cache can serve an expired copy when Azion cannot confirm the copy with the origin. A body that leaves one of the three fields out gets that field off. `tiered_cache` also requires the `override` behavior. +- A cache setting acts only once a Request Phase rule applies that cache setting with `{ "type": "set_cache_policy", "attributes": { "value": } }`. You can also build the same setting in Azion Console, as [Cache quickstart](/en/documentation/platform/applications/cache/quickstart/) shows. If you set `Cache-Control` headers at your origin, the model transfers: `honor` keeps them, and `override` replaces them. --- -## Request path - -A request reaches a cached copy through a chain of objects. This diagram shows the chain, from the request to the stored copy or to the origin: - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Request["A request reaches an application, where Cache is on"] --> Rules{"Which Request Phase rule matches the request?"} - Rules -->|"A rule with Set Cache Policy"| Setting["The cache setting that the rule names applies"] - Rules -->|"A rule with Bypass Cache"| Bypass["The origin answers, and nothing is stored: BYPASS"] - Setting --> Lookup{"Is a copy stored under this cache key?"} - Lookup -->|"Yes"| Hit["The stored copy is delivered: HIT"] - Lookup -->|"No"| Origin["The origin is asked: MISS"] - Origin --> Store["The response is delivered, and Azion may store it under the key"] -``` - -1. A Request Phase rule matches the request and applies a cache setting through _Set Cache Policy_. -2. Azion builds the cache key from the request and from every variation the setting names. -3. When a copy is stored under that key, the data center that received the request answers from it, and the response reports `HIT`. -4. Otherwise the request goes to the origin, the response reports `MISS`, and Azion may store the response for later requests. -5. The copy answers until its TTL ends, a purge removes it, or a rule sends the request past the cache. - -A rule with _Bypass Cache_ sends its requests to the origin instead, nothing is stored, and the response reports `BYPASS`. The status comes back in the `x-cache` header of a response to a request sent with `Pragma: azion-debug-cache`. For every status and the debug headers, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#cache-status). - -For TTL and expiration, stale cache, Large File Optimization, cache keys and variations, Tiered Cache, and purge, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). - ---- - ## Scope and limits -- **Application**: Cache is on in every new application, where `modules.cache.enabled` reads `true`. Its switch in [Main Settings](/en/documentation/platform/applications/main-settings/#products) › **Modules** carries the note `Automatically enabled in all accounts.` A new application has no cache settings and no rules, so Cache stores nothing until a _Set Cache Policy_ rule names a cache setting. -- **Expired copies**: with **Stale cache** on, Azion may serve an expired copy when a revalidation with the origin fails, and the response reports `STALE`. A setting created through [Azion API](https://api.azion.com/) or [Azion CLI](/en/documentation/devtools/cli/) has it off, while Azion Console turns it on for a new setting. For when an old page is better than an error, refer to [Applications best practices](/en/documentation/platform/applications/best-practices/#cache). -- **Large files**: **Large file optimization** caches a large object in fragments of 1,024 kB, each fetched when a user reaches it and stored under a key of its own. A purge of the file therefore has to name every fragment, or use a wildcard. -- **Tiered Cache**: [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) adds a second cache layer between Azion's cache and the origin, turned on per cache setting and included on every plan. A data center that holds no valid copy asks that layer before it asks the origin. It requires _Override cache behavior_ and a minimum TTL, and a _Bypass Cache_ rule does not reach it. -- **Keys and variation**: Azion builds the default [cache key](/en/documentation/platform/applications/cache/cache-keys/) from the scheme, the host, and the path. One path is therefore one stored object, and the query string stays out of the key. Varying a copy by query string, cookie, device group, or method takes [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). [Image Processor](/en/documentation/platform/applications/image-processor/) adds the format of a converted image to the key. -- **Purge**: [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) removes a stored copy before its TTL ends, by URL, by cache key, or by wildcard. Azion queues a purge after you confirm it, because the result takes time to propagate, and lists it in the purge history once it completes. A URL purge does not reach a copy that varies by cookie, device group, or image format. -- **Code**: Cache runs no code, so a function that reads and writes cached entries calls [Cache API](/en/documentation/devtools/runtime/api-reference/cache/) instead. -- **Interfaces**: you create cache settings on the **Cache Settings** tab of an application in Azion Console, through Azion API at `/v4/workspace/applications//cache_settings`, and with Azion CLI commands such as `azion create cache-setting`. [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) declares a setting as an entry of its `cache` array, [Azion Lib](/en/documentation/devtools/azion-lib/application/) creates one with `createCacheSetting`, and [Azion Terraform Provider](/en/documentation/devtools/terraform/applications/) manages one with the `azion_application_cache_setting` resource. A purge is sent from **Real-Time Purge** in Azion Console, to `POST /v4/workspace/purge/`, or with `azion purge`. -- **Observability**: a request sent with `Pragma: azion-debug-cache` receives `x-cache`, which carries the cache status, and `x-cache-key`, which carries the key that indexes the copy. [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) shows Cache and Tiered Cache traffic, and [Real-Time Events](/en/documentation/platform/real-time-events/) carries a Tiered Cache dataset. -- **Limits**: a single cached object can reach 10 GB. **Max Age** takes 60 seconds to one year, and down to 0 seconds with Application Accelerator. For every bound of a cache setting, a cached object, and a purge request, and what each plan includes, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache), and for the rates, to [Pricing](/en/documentation/fundamentals/pricing/#cache). +- **Application**: Cache is always on in an Application, in its `modules.cache.enabled` field in the API, which refuses `false` with `31001`. [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) shows its switch locked on in Azion Console, with the note `Automatically enabled in all accounts.` A new Application has no cache settings and no rules, so Cache starts storing copies once a _Set Cache Policy_ rule applies a cache setting. +- **Expired copies**: with stale cache on, in the `modules.cache.stale_cache.enabled` field of a cache setting, Azion may serve an expired copy when it cannot confirm the copy with the origin. The response then reports `STALE`. A setting created through [Azion API](https://api.azion.com/) or [Azion CLI](/en/documentation/devtools/cli/) has it off, while Azion Console turns it on for a new setting. [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#cache) shows where to change it in each interface. For when an old page is better than an error, refer to [Applications best practices](/en/documentation/platform/applications/best-practices/#cache). +- **Large files**: Large File Optimization, the `modules.cache.large_file_cache.enabled` field of a cache setting, caches a large object in fragments of 1,024 kB. It is off in a new cache setting. Each fragment is fetched when a user reaches it and stored under a key of its own, so a purge of the file has to name every fragment or use a wildcard. +- **Tiered Cache**: [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) is a Feature of Cache that adds a second cache layer between the data center that answers a request and the origin. Each cache setting turns it on in its `modules.cache.tiered_cache.enabled` field, and every plan includes it. A data center that holds no valid copy asks that layer before the request goes to the origin. Tiered Cache requires the `override` behavior and a minimum TTL. A _Bypass Cache_ rule acts on Azion's cache only, so the Tiered Cache layer keeps caching objects for the Max Age of the cache setting. +- **Keys and variation**: Azion builds the default [cache key](/en/documentation/platform/applications/cache/cache-keys/) from the scheme, the host, and the path, so one path is one stored object, and the query string stays out of the key. Varying a copy by query string, cookie, device group, or method takes [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). [Image Processor](/en/documentation/platform/applications/image-processor/) adds the format of a converted image to the key. +- **Purge**: [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) is a Platform Resource that removes a stored copy before its TTL ends, by URL, by cache key, or by wildcard. Azion queues a purge after you confirm it, because the result takes time to propagate. The purge history lists the purge once it completes. A copy that varies by cookie, device group, or image format survives a URL purge, and a cache key or wildcard purge reaches it. +- **Code**: code that reads and writes cached entries runs in a [Function](/en/documentation/platform/functions/) and calls [Cache API](/en/documentation/devtools/runtime/api-reference/cache/), because Cache itself cannot run code. +- **Interfaces**: you create cache settings on the **Cache Settings** tab of an Application in Azion Console, through Azion API at `/v4/workspace/applications//cache_settings`, and with Azion CLI commands such as `azion create cache-setting`. [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) declares a setting as an entry of its `cache` array, [Azion Lib](/en/documentation/devtools/azion-lib/application/) creates one with `createCacheSetting`, and [Azion Terraform Provider](/en/documentation/devtools/terraform/applications/) manages one with the `azion_application_cache_setting` resource. A purge is sent from **Real-Time Purge** in Azion Console, to `POST /v4/workspace/purge/`, or with `azion purge`. +- **Observability**: a request sent with `Pragma: azion-debug-cache` receives two headers. `x-cache` carries the cache status, and `x-cache-key` carries the key of the copy. [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) shows Cache and Tiered Cache traffic, and [Real-Time Events](/en/documentation/platform/real-time-events/) carries a Tiered Cache dataset. +- **Limits**: a single cached object can reach 10 GB. Max Age, the `modules.cache.max_age` field of a cache setting, takes 60 seconds to one year. With Application Accelerator on, Azion API accepts down to 0 seconds. For every bound of a cache setting, a cached object, and a purge request, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache). For the rates, refer to [Pricing](/en/documentation/fundamentals/pricing/#cache), and for what each plan includes, to [Azion pricing](https://www.azion.com/en/pricing/). - **Terms**: the [Applications glossary](/en/documentation/platform/applications/glossary/) defines the words the Cache pages give a specific meaning, such as cache setting, cache key, cache status, and stale cache. --- @@ -99,6 +111,6 @@ For TTL and expiration, stale cache, Large File Optimization, cache keys and var - + diff --git a/apps/docs/src/content/docs/en/pages/build/cache/quickstart.mdx b/apps/docs/src/content/docs/en/pages/build/cache/quickstart.mdx index 9555c0df71..015849f21a 100644 --- a/apps/docs/src/content/docs/en/pages/build/cache/quickstart.mdx +++ b/apps/docs/src/content/docs/en/pages/build/cache/quickstart.mdx @@ -13,14 +13,17 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' -This guide instructs you through caching a path of your application for the first time. By the end you will have: +This guide instructs you through caching a path of your Application for the first time. By the end you will have: - A cache setting that keeps a copy of each response for 300 seconds. - A [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule that applies the setting to one path prefix. - The cache status of a response, read from its `x-cache` header. -The result rests on four objects, in this order. The **application** carries the [Cache](/en/documentation/platform/applications/cache/) module, which is on for every application. The **cache setting** belongs to the application and holds the TTL, the time Azion keeps a copy. The **rule**, also on the application, matches requests by path and applies the setting through the **Set Cache Policy** behavior. A matching **request** is answered from the stored copy when one exists, and its response carries `x-cache` with `HIT`. Until a rule names it, a cache setting does nothing. +The result rests on four objects, in this order. The **Application** has [Cache](/en/documentation/platform/applications/cache/) on, as every Application does. The **cache setting** belongs to the Application. It holds the time to live (TTL), how long Azion keeps a copy. It also holds what Azion does with that copy. + +The **rule**, also on the Application, matches requests by path and applies the setting through the _Set Cache Policy_ behavior. A cache setting acts only once a rule applies that cache setting. A matching **request** is answered from the stored copy when one exists. With the `Pragma: azion-debug-cache` header, its response reports `HIT` in `x-cache`. --- @@ -35,8 +38,8 @@ The result rests on four objects, in this order. The **application** carries the ### Console -- An application that already serves content on a domain. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- The URL of a static object the application serves, such as an image, to check at the end. +- An Application that already serves content on a domain. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The URL of a static object the Application serves under a path prefix such as `/static/`, to check at the end. - `curl` on your machine, for the cache status check at the end. - Access to Azion Console. To sign in, refer to [Access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/). @@ -46,8 +49,8 @@ The result rests on four objects, in this order. The **application** carries the ### CLI -- An application that already serves content on a domain. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- The URL of a static object the application serves, such as an image, to check at the end. +- An Application that already serves content on a domain. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The URL of a static object the Application serves under a path prefix such as `/static/`, to check at the end. - `curl` on your machine, for the cache status check at the end. - The [Azion CLI](/en/documentation/devtools/cli/) installed and authorized. @@ -57,8 +60,8 @@ The result rests on four objects, in this order. The **application** carries the ### API -- An application that already serves content on a domain. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- The URL of a static object the application serves, such as an image, to check at the end. +- An Application that already serves content on a domain. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The URL of a static object the Application serves under a path prefix such as `/static/`, to check at the end. - `curl` on your machine, for the cache status check at the end. - A [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/). @@ -70,7 +73,7 @@ The result rests on four objects, in this order. The **application** carries the ## Create a cache setting -A cache setting holds how long Azion keeps a copy of a response. This one keeps each copy for 300 seconds. +A cache setting holds how long Azion keeps a copy of a response, and what Azion does with that copy. This one keeps each copy for 300 seconds. @@ -81,9 +84,9 @@ A cache setting holds how long Azion keeps a copy of a response. This one keeps To create the cache setting in Azion Console: - + - Access [Azion Console](https://console.azion.com/) > **Applications**, then select the application that serves your content. + Access [Azion Console](https://console.azion.com/) > **Applications**, then select the Application that serves your content. @@ -106,7 +109,7 @@ To create the cache setting in Azion Console: -The new setting appears in the **Cache Settings** list, which shows its **Name**, **ID**, **Browser Cache**, and **Cache**. +The new setting appears in the **Cache Settings** list, which shows its **Name**, **Browser Cache**, and **Cache**. @@ -114,32 +117,29 @@ The new setting appears in the **Cache Settings** list, which shows its **Name** ### CLI -To create the cache setting with the Azion CLI, replace `` with the ID of your application: +To create the cache setting with the Azion CLI, replace `` with the ID of your Application: - The command reads the setting from a JSON file. Save this body as `cache-setting.json`: + The command reads the setting from a JSON file. `stale_cache` turns on stale cache, as Azion Console does for a new setting. Save this body as `cache-setting.json`: - ```json - { + - ```bash - azion create cache-setting --application-id --file cache-setting.json - ``` + --file cache-setting.json`} /> The command confirms the setting and returns its ID: @@ -152,19 +152,17 @@ To create the cache setting with the Azion CLI, replace `` with Replace `123460` with the ID the create command returned: - ```bash - azion describe cache-setting --application-id --cache-setting-id 123460 --format json - ``` + --cache-setting-id 123460 --format json`} /> The output reports `modules.cache.max_age` as `300`. -The cache setting exists on the application. Record its ID: the rule in the next stage names it. +The cache setting exists on the Application. Record its ID: the rule in the next stage applies the setting by that ID. :::note -The command flags do not set **Max Age**, the cache behavior, stale cache, Large File Optimization, or Tiered Cache. Pass the request body with `--file` for those fields. For every flag the command accepts, refer to [Azion CLI create](/en/documentation/devtools/cli/resources/). +Only the request body, passed with `--file`, sets `max_age`, the cache behavior, stale cache, and Large File Optimization. `--tiered-caching-enabled` fails without the `override` behavior, and only the body sets that behavior. For every flag the command accepts, refer to [Azion CLI cache-setting](/en/documentation/devtools/cli/resources/cache-setting/#create). ::: @@ -173,33 +171,34 @@ The command flags do not set **Max Age**, the cache behavior, stale cache, Large ### API -To create the cache setting with the Azion API, replace `[TOKEN VALUE]` with your personal token and `` with the ID of your application: +To create the cache setting with the Azion API, replace `[TOKEN VALUE]` with your personal token. Replace `` with the ID of your Application: - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//cache_settings \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + `stale_cache` turns on stale cache, as Azion Console does for a new setting: + + /cache_settings \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "name": "static-assets", "browser_cache": { "behavior": "honor" }, "modules": { "cache": { "behavior": "override", - "max_age": 300 + "max_age": 300, + "stale_cache": { "enabled": true } } } - }' - ``` + }'`} /> - A `201` carries the setting, with every field the request left out filled by its default: + A `201` carries the setting, with its defaults filled in. This excerpt leaves out `modules.application_accelerator` and `created_at`: ```json { @@ -212,7 +211,7 @@ To create the cache setting with the Azion API, replace `[TOKEN VALUE]` with you "cache": { "behavior": "override", "max_age": 300, - "stale_cache": { "enabled": false }, + "stale_cache": { "enabled": true }, "large_file_cache": { "enabled": false, "offset": 1024 }, "tiered_cache": { "enabled": false } } @@ -224,21 +223,21 @@ To create the cache setting with the Azion API, replace `[TOKEN VALUE]` with you -The cache setting exists on the application. Record the `id`: the rule in the next stage names it. +The cache setting exists on the Application. Record the `id`: the rule in the next stage applies the setting by that ID. :::note -A **Max Age** below 60 seconds requires the [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) module on the application. +A Max Age below 60 seconds, in the `modules.cache.max_age` field, requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on the Application. ::: --- ## Apply the setting with a rule -A cache setting does nothing until a rule names it. This rule applies `static-assets` to every request whose path matches a prefix you choose. +A cache setting acts only once a rule applies that cache setting. This rule applies `static-assets` to every request whose path matches a prefix you choose. @@ -249,17 +248,22 @@ A cache setting does nothing until a rule names it. This rule applies `static-as To create the rule in Azion Console: + + + Access [Azion Console](https://console.azion.com/) > **Applications**, then select the Application that serves your content. + + - Enter a name such as `cache-static-assets`. + In **Name**, enter `cache-static-assets`. - Under **Criteria**, select `${uri}` and an operator. As the argument, enter the path prefix to cache, such as `/static/`. + Under **Criteria**, select `${uri}` and _starts with_. As the argument, enter `/static/`, or the path prefix of your object. @@ -270,7 +274,7 @@ To create the rule in Azion Console: -The rule appears in the list and applies `static-assets` to every request whose path matches its criteria. +The rule appears in the list and applies `static-assets` to every request whose path starts with `/static/`. @@ -278,22 +282,21 @@ The rule appears in the list and applies `static-assets` to every request whose ### CLI -To create the rule with the Azion CLI, replace `` with the ID of your application: +To create the rule with the Azion CLI, replace `` with the ID of your Application: - The criteria carry `${uri}`, which a shell expands, so the rule goes in a file. Save this body as `rule.json`, and replace `123460` with the ID of the cache setting from the previous stage: + The command reads the rule from a JSON file. Save this body as `rule.json`, and replace `123460` with the ID of the cache setting from the previous stage. If your object sits under another prefix, replace `/static/` with it: - ```json - { + ` with the ID of "attributes": { "value": 123460 } } ] - } - ``` + }`} /> - ```bash - azion create rules-engine --application-id --phase request --file rule.json - ``` + --phase request --file rule.json`} /> The command confirms the rule and returns its ID: @@ -324,7 +324,7 @@ To create the rule with the Azion CLI, replace `` with the ID of -The rule exists on the application and applies `static-assets` to every request whose path starts with `/static/`. +The rule exists on the Application and applies `static-assets` to every request whose path starts with `/static/`. @@ -332,22 +332,21 @@ The rule exists on the application and applies `static-assets` to every request ### API -To create the rule with the Azion API, replace `[TOKEN VALUE]` with your personal token and `` with the ID of your application: +To create the rule with the Azion API, replace `[TOKEN VALUE]` with your personal token. Replace `` with the ID of your Application: - The criteria carry `${uri}`, which a shell expands, so the body goes in a file instead of on the command line. Save this body as `rule.json`, and replace `123459` with the ID of the cache setting from the previous stage: + Save this body as `rule.json`, and replace `123459` with the ID of the cache setting from the previous stage. If your object sits under another prefix, replace `/static/` with it: - ```json - { + - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json - ``` + /request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> - A `202` carries the rule, and the state `pending` means the platform is still applying it: + A `202` carries the rule, and the state `pending` means the platform is still applying it. This excerpt leaves out `criteria`, `description`, `order`, `last_editor`, `last_modified`, and `created_at`: ```json { @@ -391,8 +387,7 @@ To create the rule with the Azion API, replace `[TOKEN VALUE]` with your persona "type": "set_cache_policy", "attributes": { "value": 123459 } } - ], - "order": 2 + ] } } ``` @@ -400,7 +395,7 @@ To create the rule with the Azion API, replace `[TOKEN VALUE]` with your persona -The rule exists on the application and applies `static-assets` to every request whose path starts with `/static/`. +The rule exists on the Application and applies `static-assets` to every request whose path starts with `/static/`. @@ -421,42 +416,40 @@ The request header `Pragma: azion-debug-cache` makes the response carry two debu Request an object under the path the rule matches, with your own host and path: - ```bash - curl -sI -H "Pragma: azion-debug-cache" https://www.example.com/static/site.js - ``` + The response carries the two debug headers. Under HTTP/2, the header names arrive in lowercase: - ```http + ```text x-cache: MISS from 192.0.2.10 with HTTP/2.0 x-cache-key: httpswww.example.com/static/site.js ``` - `MISS` means the object was not in the cache: Azion fetched it from the origin and may store the response. + `MISS` means the object was not in the cache. Azion fetched it from the origin and may store the response. - A response answered from the stored copy carries `HIT`. `x-cache` also names the server that answered. + A response answered from the stored copy carries `HIT`. `x-cache` also names the server that answered. Each server keeps its own copy, so a request that another server answers can report `MISS` once more. Run the command again. -Your application now keeps a copy of each matching response for 300 seconds. `x-cache` tells you when a response came from that copy. A response can also carry another status, such as `REVALIDATED`. For every status value, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). +Your Application now keeps a copy of each matching response for 300 seconds. `x-cache` tells you when a response came from that copy. A response can also carry another status, such as `REVALIDATED`. For every status value, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#cache-status). --- ## Next steps - - - + + + - - + + diff --git a/apps/docs/src/content/docs/en/pages/build/functions/glossary.mdx b/apps/docs/src/content/docs/en/pages/build/functions/glossary.mdx index d0ec704f70..339394bdf5 100644 --- a/apps/docs/src/content/docs/en/pages/build/functions/glossary.mdx +++ b/apps/docs/src/content/docs/en/pages/build/functions/glossary.mdx @@ -12,7 +12,7 @@ Definitions for the terms the [Functions](/en/documentation/platform/functions/) | Term | Definition | | --- | --- | -| Args | The JSON object a [function instance](/en/documentation/platform/applications/functions-instances/) passes into the execution context of the function. An instance overrides, key by key, the default Args set on the function. [How it works](/en/documentation/platform/functions/how-it-works/) shows how the two combine. | +| Args | The JSON object a [function instance](/en/documentation/platform/applications/functions-instances/) passes into the execution context of the function. An instance that sets Args replaces the default Args of the function as a whole. [How it works](/en/documentation/platform/functions/how-it-works/) shows which Args the function receives. | | Azion Bundler | The open-source framework adapter that transforms a framework project into functions that run on Azion Runtime. [How it works](/en/documentation/platform/functions/how-it-works/) describes the four stages of the build, from framework detection to the deployment of the generated functions. | | Azion Runtime | The environment that executes the handler of a function. [Azion Runtime](/en/documentation/devtools/runtime/) runs JavaScript built on Web standards. A function also calls the [Azion APIs](/en/documentation/devtools/runtime/api-reference/azion-runtime-globals/), which reach environment variables, stores, and AI Inference. | | Cell | The isolation environment a function runs inside, based on V8 isolates. Each Cell is a lightweight execution context with no direct access to the underlying operating system, which is why a function cannot read OS properties, resolve DNS through native system calls, or open low-level sockets. [Node.js compatibility](/en/documentation/devtools/runtime/node/) lists what that excludes. | diff --git a/apps/docs/src/content/docs/en/pages/build/functions/how-it-works.mdx b/apps/docs/src/content/docs/en/pages/build/functions/how-it-works.mdx index 1fec38d3c3..414d078ee7 100644 --- a/apps/docs/src/content/docs/en/pages/build/functions/how-it-works.mdx +++ b/apps/docs/src/content/docs/en/pages/build/functions/how-it-works.mdx @@ -124,13 +124,13 @@ The two contexts trade in opposite directions. A function on a firewall decides Args are the arguments an instance passes into the context of the function's execution, written as a JSON object. They exist so that one function behaves differently in each place it is instantiated, with no edit to the code. The code reads a key at run time; the instance decides the value. -A function can define default Args of its own, and those defaults are the basis for every instance of that function. An instance's Args override the keys they repeat, and every key the instance leaves out keeps its default. A function whose defaults set `threshold`, `action`, and `log_level`, instantiated with Args that set only the first two, executes with these values: +A function can define default Args of its own, and the function reads them only when an instance sets no Args. An instance that sets Args replaces the defaults as a whole, so a key the instance leaves out is absent, not kept at its default. A function whose defaults set `threshold`, `action`, and `log_level`, instantiated with Args that set only the first two, executes with these values: | Key | Function default | Instance Args | Passed to the function | | --- | --- | --- | --- | | `threshold` | `100` | `50` | `50` | | `action` | `"deny"` | `"block"` | `"block"` | -| `log_level` | `"info"` | not set | `"info"` | +| `log_level` | `"info"` | not set | not passed | In the Service Worker pattern, the code reads Args from the `event.args` object, one property per key: diff --git a/apps/docs/src/content/docs/en/pages/build/image-processor/how-it-works.mdx b/apps/docs/src/content/docs/en/pages/build/image-processor/how-it-works.mdx index 6c09b56858..18d5a739df 100644 --- a/apps/docs/src/content/docs/en/pages/build/image-processor/how-it-works.mdx +++ b/apps/docs/src/content/docs/en/pages/build/image-processor/how-it-works.mdx @@ -1,6 +1,6 @@ --- title: Image delivery -description: How Image Processor chooses the delivered format, keeps one cache entry per transformation, and where it stops, with no storage and no uploads. +description: Understand how Image Processor picks the delivered format, how it caches one entry per transformation, and where it stops. meta_tags: 'image processor, image delivery, derived image, format negotiation, webp, ims, cache key, response headers, wasm image processor' namespace: documentation_products_image_processor_how_it_works permalink: /documentation/platform/applications/image-processor/image-delivery/ @@ -9,7 +9,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -An image built on request still has to reach the browser in a format it reads, and be built once rather than for every reader. On an application, Image Processor builds a derived image from the source image on the origin. How a request becomes a derived image, with the diagram of that chain, is on the [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path). +An image built on request still has to reach the browser in a format it reads, and be built once rather than for every reader. In an [Application](/en/documentation/platform/applications/), [Image Processor](/en/documentation/platform/applications/image-processor/) is the Platform Resource that builds that image, the derived image, from the source image on the origin. How a request becomes a derived image, with the diagram of that chain, is on the [Image Processor overview](/en/documentation/platform/applications/image-processor/#request-path). The sections cover how the delivered format is chosen, how the cache tells one derived image from another, and where Image Processor stops. @@ -17,19 +17,19 @@ The sections cover how the delivered format is chosen, how the cache tells one d ## Format negotiation -The delivered format is not always the format of the source image. Two mechanisms change it, and they behave differently. +The delivered format can differ from the format of the source image. Two mechanisms change it, and they behave differently. -The first is explicit. A `filters:format()` filter in the `ims` string asks for a named output format. Converting to WEBP also requires the request to carry `Accept: image/webp`, and the [Add Request Header](/en/documentation/platform/applications/rules-engine/#add-request-header) behavior adds that header when the browser does not send it. +The first is explicit. A `filters:format()` filter in the `ims` string asks for a named output format, and the response carries that format whatever `Accept` header the request sent, or with none. -The second is automatic and needs no `ims` parameter at all. Image Processor detects whether the browser supports WEBP and converts the image when it does. A BMP image is converted to JPEG or WEBP depending on the same support. For example, a request whose `Accept` header lists `image/webp`, with no query string, can receive `image/webp` for a source image stored as PNG. +The second is automatic and needs no `ims` parameter at all. Image Processor detects which formats the browser supports and, when possible, converts the image to one of them, such as WEBP or AVIF. A BMP image is converted to JPEG or WEBP depending on the same support. For example, a request whose `Accept` header lists `image/webp`, with no query string, can receive `image/webp` for a source image stored as PNG. A response can carry a format other than the one on the origin even when the URL has no filter. -The bytes on the origin and the bytes on the wire are therefore two different measurements, and the response says so. A processed response carries `x-ims: Enabled`, and `x-original-image-size` carries the size of the source image before the transformation. A reader who never writes a filter can still receive a format other than the one on the origin. Read these headers before you compare a response with the file on the origin. For the headers, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#response-headers). +So the bytes on the origin and the bytes on the wire are two different measurements, and the response says so. A processed response carries `x-ims: Enabled`, and `x-original-image-size` carries the size of the source image before the transformation. Read these headers before you compare a response with the file on the origin. For the headers, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#response-headers). --- ## One cache entry per transformation -A derived image is worth building only once. The practice for the cache setting that serves images is to list `ims` in its query-string control: **Cache vary by Query String**, with the **Behavior** _Allowlist_ and `ims` in **Fields**. Each distinct `ims` string then has a cache key of its own. That control belongs to the **Application Accelerator** section of a cache setting, `cache_vary_by_querystring` under `modules.application_accelerator`. Varying the cache on `ims` therefore requires Application Accelerator, while processing an image does not. +A derived image is worth building only once. The practice for the cache setting that serves images is to vary the cache on `ims`: its `cache_vary_by_querystring` field takes the `allowlist` behavior, with `ims` in `fields`. Each distinct `ims` string then has a cache key of its own. That field sits under `modules.application_accelerator` in the cache setting, so varying the cache on `ims` requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), while processing an image does not. [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/#cache-variation) maps each of these fields to its control in Azion Console. A cache setting created with that allowlist reads back with this `modules` object: @@ -57,21 +57,21 @@ A cache setting created with that allowlist reads back with this `modules` objec } ``` -A derived image converted to another format also carries the format after the `@@` separator, as in `httpsstatic.example.com/static/images/image_1.jpg?ims=880x@@webp`. +The cache key of a derived image converted to another format also carries the format at the end of the key, with no separator, as in `httpsstatic.example.com/static/images/image_1.jpg@@?ims=880xwebp`. -That key has a cost, and the cost is cardinality. Every distinct `ims` string is a distinct stored object. A page that asks for arbitrary widths stores an object per width, while a page that asks for four fixed widths stores four. Choosing a small set of sizes is therefore a caching decision as much as a layout one. +That key has a cost, and the cost is cardinality. Every distinct `ims` string, in each delivered format, is a distinct stored object. A page that asks for arbitrary widths stores an object per width and format, while a page that asks for four fixed widths stores four per format. So choosing a small set of sizes is a caching decision as much as a layout one. -It is also a billing decision. An image served from the cache without processing is not counted against the monthly Images meter, so a well-cached derived image costs one processed image however many readers receive it. For what each plan includes, refer to [Applications limits](/en/documentation/platform/applications/limits/#image-processor). +It is also a billing decision, because the monthly Images meter counts the images that Image Processor processes, not the images that the cache serves. So a derived image that stays in cache is counted when Image Processor builds it, not each time a reader receives it. The cache can remove a little-used object before its maximum age ends, and the next request for that image is processed and counted again. For the rate, refer to [Pricing](/en/documentation/fundamentals/pricing/#image-processor). --- ## Where Image Processor stops -Image Processor reads a source image and returns a derived one. It does not store images, and it does not accept uploads: the source stays wherever it already lives, and no derived image becomes an asset the account owns. A workflow that needs to keep a transformed file has to save the response itself. +Image Processor reads a source image from the origin and returns a derived one without saving it as an asset of the account. You cannot upload images to Image Processor: the source image stays wherever it already lives, and the cache holds the derived images. A workflow that needs to keep a transformed file has to save the response itself. What the `ims` string can express, and the size of the image, bound the transformation. The operations the string accepts are on [Image Processor URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/), and the maximum size and dimensions are on [Applications limits](/en/documentation/platform/applications/limits/#image-processor). -One boundary is worth naming, because two surfaces share a name. **WASM Image Processor** is a WebAssembly library that processes images inside a function on [Functions](/en/documentation/platform/functions/). It is a different surface with a different interface, and nothing on this page configures it. +One boundary is worth naming, because two surfaces share a name. [WASM Image Processor](/en/documentation/devtools/azion-lib/wasm-image-processor/) is a WebAssembly library that processes images inside a [Function](/en/documentation/platform/functions/). It runs in the code of that Function, separately from the Image Processor Platform Resource and everything this page describes. --- diff --git a/apps/docs/src/content/docs/en/pages/build/image-processor/overview.mdx b/apps/docs/src/content/docs/en/pages/build/image-processor/overview.mdx index 3da45f6230..86c575fb15 100644 --- a/apps/docs/src/content/docs/en/pages/build/image-processor/overview.mdx +++ b/apps/docs/src/content/docs/en/pages/build/image-processor/overview.mdx @@ -1,6 +1,6 @@ --- title: Image Processor -description: Resize, crop, filter, and convert images on request with Image Processor, from one source image on the origin of an application. +description: Resize, crop, filter, and convert images on request with Image Processor, from one source image on the origin of an Application. meta_tags: 'image processor, ims, derived image, source image, resize, crop, filters, webp, avif, optimize images, applications' namespace: documentation_products_image_optimization permalink: /documentation/platform/applications/image-processor/ @@ -10,18 +10,55 @@ import DocButton from '~/components/webkit/DocButton.vue' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -Transforming an image on request builds each variant when a request asks for it, instead of ahead of time. The URL describes the variant, such as a width, a crop, a quality, or a format, and the server builds it from one original file. No variant has to be built, stored, or rebuilt ahead of time, because each one comes from that one original on request. +**Image Processor** is a Platform Resource that builds a new image, the derived image, from an image on the origin of an [Application](/en/documentation/platform/applications/). On-request image transformation is a delivery model where the server builds each variant of an image at the time of the request. The URL of the request describes the variant, such as a width, a crop, a quality, or a format. Each variant comes from the one original, so the original is the only file you store and update. -**Image Processor** builds that variant, the derived image, from the source image on the origin of an [application](/en/documentation/platform/applications/). The `ims` query string of the request describes it, such as `?ims=fit-in/400x400`, and the source image is never modified. It runs on the requests that a Request Phase rule with the _Optimize Images_ behavior hands it. Use Image Processor to deliver one image in several sizes, crops, qualities, or formats, such as WEBP for browsers that accept it, without a file per variant. +In an Application, Image Processor reads the source image, the file on the origin, without changing it. The `ims` query string of the request describes the derived image, such as `?ims=fit-in/400x400`. Even with no `ims` query string, Image Processor can convert an image to a format the browser accepts. Image Processor processes only the requests that a Request Phase rule with the _Optimize Images_ behavior matches, and you write that rule in the Application's [Rules Engine](/en/documentation/platform/applications/rules-engine/). Use Image Processor to deliver one image in several sizes, crops, qualities, or formats, such as WEBP for browsers that accept it, without a file per variant. --- +## Request path + +An `ims` query string does not transform an image by itself: a rule with the [Optimize Images](/en/documentation/platform/applications/rules-engine/#optimize-images) behavior has to match the request first. Turning Image Processor on in an Application only makes that behavior available to its rules. + +Solid arrows carry the request, and dotted arrows carry the response. Each label starts with the number of its step below. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Client"]) + App["Application"] + Cache["Cache"] + IP["Image Processor"] + Origin[["origin server"]] + Client -->|"1. request for an image"| App + App -.->|"2. no match: unprocessed image"| Client + App -->|"3. cache setting"| Cache + Cache -.->|"4. cached derived image"| App + App -->|"5. no cached copy"| IP + IP -->|"5. source image request"| Origin + Origin -.->|"5. source image"| IP + IP -.->|"5. derived image"| App + App -.->|"4, 5. derived image"| Client +``` + +1. A request for a path that holds an image reaches the Application, which runs its Request Phase rules. A rule for images matches on `${uri}`, or on `${request_uri}` with [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on, against an argument such as `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. +2. When no rule with _Optimize Images_ matches, the source image is delivered unprocessed, even when the request carries `ims`. +3. A matching rule applies its behaviors. _Optimize Images_ marks the request for Image Processor. When the rule also carries _Set Cache Policy_, that behavior applies the [cache setting](/en/documentation/platform/applications/cache/cache-settings/) that holds the derived image. A rule can carry _Optimize Images_ alone, because the behavior takes no argument. +4. When the derived image is already cached, [Cache](/en/documentation/platform/applications/cache/) delivers it without processing. +5. Otherwise, Image Processor reads the source image from the origin and applies the `ims` query string to it. The derived image is delivered. The Application's cache stores it only when the rule applies a cache setting with _Set Cache Policy_. Without one, every request reaches Image Processor, which answers a repeated transformation from its own cache. + +When a rule with _Optimize Images_ matches a path that does not return an image, the request fails with an empty `400`, so the rule's criteria have to match image paths only. To build that rule step by step, refer to [Configure Image Processor on an application](/en/documentation/guides/application-performance/delivery-optimization/process-images/). + +For how the delivered format is chosen, how the cache tells derived images apart, and where Image Processor stops, refer to [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/). + +--- + ## Rule structure -Image Processor acts through a Request Phase rule that carries the _Optimize Images_ behavior. This rule hands every request for an image path to Image Processor and applies the cache setting that stores each derived image. It is sent as the body of `POST /v4/workspace/applications//request_rules`: +Image Processor acts through a Request Phase rule that carries the _Optimize Images_ behavior. To process every request for an image path and cache each derived image, send this rule as the body of `POST /v4/workspace/applications//request_rules`: ```json { @@ -45,56 +82,25 @@ Image Processor acts through a Request Phase rule that carries the _Optimize Ima } ``` -- `criteria` compares the path with a list of image extensions through `matches`. `${request_uri}` needs [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), and `${uri}` matches the same paths without it. -- `optimize_images` takes no attributes and marks the request for Image Processor. It requires Image Processor on the application that runs the rule. -- `set_cache_policy` names the cache setting that stores each derived image. With `ims` in the allowlist of its **Cache vary by Query String** control, each distinct `ims` string gets a cache key of its own. That control needs Application Accelerator. +- `criteria` compares the path with a list of image extensions through `matches`. `${request_uri}` needs Application Accelerator, and `${uri}` matches the same paths without it. +- `optimize_images` takes no attributes and marks the request for Image Processor. It requires Image Processor on the Application that runs the rule. +- `set_cache_policy` applies the cache setting whose ID is in `attributes.value`, and that cache setting stores each derived image. With `ims` in the `fields` of its `cache_vary_by_querystring` allowlist, each distinct `ims` string gets a cache key of its own. That field belongs to Application Accelerator, so it needs Application Accelerator on. - Each request then carries its transformation in the URL, such as `?ims=400x`. A processed response carries `x-ims: Enabled`, and `x-original-image-size` carries the size of the source image before the transformation. --- -## Request path - -A transformation does not happen because an `ims` query string is present. It happens because a Request Phase rule ran and applied the [Optimize Images](/en/documentation/platform/applications/rules-engine/#optimize-images) behavior to the request. Turning Image Processor on makes that behavior available, and it processes nothing on its own. - -This diagram shows the chain from a request for an image to the derived image: - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Request["A request for an image"] --> Rules{"Does a Request Phase rule with Optimize Images match?"} - Rules -->|"No"| Unprocessed["The source image is delivered unprocessed"] - Rules -->|"Yes"| Optimize["Optimize Images marks the request, and Set Cache Policy, when present, applies a cache setting"] - Optimize --> Cached{"Is this derived image already cached?"} - Cached -->|"Yes"| Hit["The cached derived image is delivered"] - Cached -->|"No"| Origin["The source image is read from the origin"] - Origin --> Apply["The ims query string is applied to the source image"] - Apply --> Store["The derived image is delivered and cached"] -``` - -1. A request arrives for a path that holds an image. -2. The application runs its Request Phase rules. A rule for images matches on `${uri}`, or on `${request_uri}` with Application Accelerator on, against an argument such as `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. -3. A matching rule applies its behaviors. _Optimize Images_ marks the request for Image Processor, and _Set Cache Policy_, when the rule carries it, chooses the cache setting that holds the derived image. A rule can carry _Optimize Images_ alone, because the behavior takes no argument. -4. When the derived image is already cached, the cache delivers it, and no processing happens. -5. Otherwise, the source image is read from the origin, the `ims` query string is applied to it, and the result is delivered and stored. - -Two consequences follow from step 2, and both surprise readers who expect the query string alone to do the work. A request that no rule matches is delivered unprocessed, even when it carries `ims`. When a rule matches a path that holds no image, it still runs, so the criteria decide which requests reach Image Processor. For the rule that sends image requests to Image Processor, refer to [Configure Image Processor on an application](/en/documentation/guides/application-performance/delivery-optimization/process-images/). - -For how the delivered format is chosen, how the cache tells derived images apart, and where Image Processor stops, refer to [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/). - ---- - ## Scope and limits -- **Application**: Image Processor is off on a new application, and turning it on processes nothing by itself. Its toggle in [Main Settings](/en/documentation/platform/applications/main-settings/#products) › **Modules** sets `modules.image_processor.enabled`, and a rule with _Optimize Images_ decides which requests reach it. +- **Application**: Image Processor is off in a new Application, and each Application turns it on separately, in its `modules.image_processor.enabled` field in the API. Even when it is on, Image Processor processes only the requests that a rule with _Optimize Images_ matches. [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) shows where to turn it on in Azion Console and the API. - **Operations**: one `ims` string can carry a resize, a crop, and a chain of filters. The operations are resize, crop, rotation, quality, watermark, format conversion, and fill, and `fit-in` fits an image inside an area without enlarging it. For the syntax and the values each one accepts, refer to [URL parameters](/en/documentation/platform/applications/image-processor/url-parameters/). -- **Parameter position**: `ims` must be the last parameter of the URL. A request with another query-string parameter after it may return `504`. -- **Formats**: Image Processor reads JPEG, GIF, PNG, BMP, ICO, WEBP, and AVIF. With no `ims` parameter, it converts an image to WEBP for a browser that supports it, and a BMP image to JPEG or WEBP. A conversion to WEBP or AVIF that a filter asks for needs `Accept: image/webp` or `Accept: image/avif`, which the _Add Request Header_ behavior can add. For how the delivered format is chosen, refer to [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/#format-negotiation). -- **Cache**: once `ims` is in the allowlist of the cache setting, each distinct `ims` string is a separate stored object. A page that asks for four fixed widths stores four objects, while a page that asks for arbitrary widths stores one per width. Once a derived image is in cache, it is delivered without processing. For the practices, refer to [Applications best practices](/en/documentation/platform/applications/best-practices/#image-processor). -- **Storage**: Image Processor stores no images and accepts no uploads. The source stays where it already lives, and no derived image becomes an asset of the account. A workflow that needs to keep a transformed file saves the response itself. -- **Neighbors**: [WASM Image Processor](/en/documentation/devtools/azion-lib/wasm-image-processor/) is a WebAssembly library that processes images inside a function on [Functions](/en/documentation/platform/functions/). It is a different surface with a different interface, and no setting of Image Processor configures it. -- **Interfaces**: you turn on Image Processor on the **Main Settings** tab of an application in [Azion Console](https://console.azion.com), and through [Azion API](https://api.azion.com/) at `/v4/workspace/applications/`. [Azion CLI](/en/documentation/devtools/cli/) sets it with `--image-processor` on `azion create application` or `azion update application`. [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) and [Azion Lib](/en/documentation/devtools/azion-lib/) set it with `imageProcessorEnabled`. For each field, flag, behavior, and header, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/). -- **Observability**: [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) has an **Image Processor** tab with request charts, and [Real-Time Events](/en/documentation/platform/real-time-events/) has an **Image Processor** dataset, which requires Image Processor on. -- **Limits**: one image takes up to 150 MB, 3840 pixels of width, and 2160 pixels of height. For every bound and what each plan includes, refer to [Applications limits](/en/documentation/platform/applications/limits/#image-processor), and for the rates, to [Pricing](/en/documentation/fundamentals/pricing/#image-processor). +- **Parameter position**: `ims` can sit anywhere in the query string. An `ims` value that Image Processor cannot parse returns the source image untransformed. +- **Formats**: Image Processor reads JPEG, GIF, PNG, BMP, ICO, WEBP, and AVIF. Even with no `ims` parameter, it can convert an image to a format the browser accepts, such as WEBP or AVIF, and it converts a BMP image to JPEG or WEBP. A `filters:format()` filter returns the format it names, whatever `Accept` header the request carries. For how the delivered format is chosen, refer to [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/#format-negotiation). +- **Cache**: once `ims` is in the allowlist of the cache setting, each distinct `ims` string, in each delivered format, is a separate stored object. A page that asks for four fixed widths stores four objects per delivered format, while a page that asks for arbitrary widths stores one per width and format. Once a derived image is in cache, it is delivered without processing. For the practices, refer to [Applications best practices](/en/documentation/platform/applications/best-practices/#image-processor). +- **Storage**: Image Processor returns each derived image without saving it as an asset of the account, and you cannot upload images to Image Processor. The cache holds the derived images, and the source image stays where it already lives. A workflow that needs to keep a transformed file saves the response itself. +- **Neighbors**: [WASM Image Processor](/en/documentation/devtools/azion-lib/wasm-image-processor/) is a WebAssembly library that processes images inside a [Function](/en/documentation/platform/functions/). It runs in the code of that Function, separately from the Image Processor Platform Resource and its settings. +- **Interfaces**: you turn on Image Processor on the **Main Settings** tab of an Application in [Azion Console](https://console.azion.com), and through [Azion API](https://api.azion.com/) at `/v4/workspace/applications/`. [Azion CLI](/en/documentation/devtools/cli/) sets it with `--image-processor` on `azion create application` or `azion update application`. [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) and [Azion Lib](/en/documentation/devtools/azion-lib/) set it with `imageProcessorEnabled`. For each field, flag, behavior, and header, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/). +- **Observability**: in Azion Console, [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) has an **Image Processor** tab with request charts, and [Real-Time Events](/en/documentation/platform/real-time-events/) has an **Image Processor** dataset, which requires Image Processor on. +- **Limits**: one image takes up to 150 MB, 3840 pixels of width, and 2160 pixels of height. For every bound, refer to [Applications limits](/en/documentation/platform/applications/limits/#image-processor), and for the rates, refer to [Pricing](/en/documentation/fundamentals/pricing/#image-processor). [Azion pricing](https://www.azion.com/en/pricing/) lists what each plan includes. - **Terms**: the [Applications glossary](/en/documentation/platform/applications/glossary/) defines the words the Image Processor pages give a specific meaning, such as derived image, source image, autocrop, and `fit-in`. --- @@ -102,10 +108,10 @@ For how the delivered format is chosen, how the cache tells derived images apart ## Next steps - + - + diff --git a/apps/docs/src/content/docs/en/pages/build/image-processor/quickstart.mdx b/apps/docs/src/content/docs/en/pages/build/image-processor/quickstart.mdx index 0d76ca5e60..8cf32d7422 100644 --- a/apps/docs/src/content/docs/en/pages/build/image-processor/quickstart.mdx +++ b/apps/docs/src/content/docs/en/pages/build/image-processor/quickstart.mdx @@ -13,15 +13,16 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' -This guide instructs you through requesting your first derived image from an application. By the end you will have: +This guide instructs you through requesting your first derived image from an Application. By the end you will have: -- Image Processor turned on for one application. +- [Image Processor](/en/documentation/platform/applications/image-processor/) turned on for one Application. - A cache setting that stores each transformation as its own object. -- A Rules Engine rule that sends image requests to the module. +- A [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule that sends image requests to Image Processor. - A resized image returned from a URL you wrote. -Four objects carry that result, and each one is linked to the one before it. The **application** holds the module switch. The **cache setting** belongs to the application and decides that two different transformations are two different cached objects. The **rule** belongs to the application, matches image requests, and applies both the cache setting and the **Optimize Images** behavior. The image URL then carries the transformation in its `ims` query string. A request that no rule matches is delivered unprocessed, so the rule is what makes the query string mean anything. +Three entities and one URL carry that result, in this order. The **Application** has Image Processor turned on. The **cache setting** belongs to the Application and makes the cache store two different transformations as two different objects. The **rule** belongs to the Application, matches image requests, and applies both the cache setting and the _Optimize Images_ behavior. The image URL then carries the transformation in its `ims` query string. A request that no rule matches is delivered unprocessed, so the rule is what makes the query string mean anything. --- @@ -37,8 +38,8 @@ Four objects carry that result, and each one is linked to the one before it. The ### Console - An [Azion account](/en/documentation/fundamentals/creating-account/). -- An application that already delivers images from an origin. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- The path of one image the application serves, so you can request it at the end. +- An Application that already delivers images from an origin. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The path of one image the Application serves, so you can request it at the end. - Access to Azion Console. To sign in, refer to [Access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/). @@ -48,8 +49,8 @@ Four objects carry that result, and each one is linked to the one before it. The ### CLI - An [Azion account](/en/documentation/fundamentals/creating-account/). -- An application that already delivers images from an origin. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- The path of one image the application serves, so you can request it at the end. +- An Application that already delivers images from an origin. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The path of one image the Application serves, so you can request it at the end. - The [Azion CLI](/en/documentation/devtools/cli/) installed and authorized. @@ -59,8 +60,8 @@ Four objects carry that result, and each one is linked to the one before it. The ### API - An [Azion account](/en/documentation/fundamentals/creating-account/). -- An application that already delivers images from an origin. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- The path of one image the application serves, so you can request it at the end. +- An Application that already delivers images from an origin. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The path of one image the Application serves, so you can request it at the end. - A [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `curl`. @@ -69,11 +70,11 @@ Four objects carry that result, and each one is linked to the one before it. The --- -## Turn on Image Processor +## Turn on Image Processor and Application Accelerator -The module is a switch on the application, and it is off until you set it. This stage turns on two modules. +Image Processor is a Platform Resource that is off in a new Application. This stage turns on two Platform Resources. -**Application Accelerator** is the second for one reason: the field that varies the cache by a query string belongs to it, and the cache setting uses that field. Processing an image does not require the module, but caching each transformation separately does. +[Application Accelerator](/en/documentation/platform/applications/application-accelerator/) is the second for two reasons. The field that varies the cache by a query string belongs to it, and the cache setting uses that field. The rule in this guide also reads `${request_uri}`, and Azion refuses a rule that reads it while Application Accelerator is off. Processing an image does not require Application Accelerator, but caching each transformation separately does. @@ -81,12 +82,12 @@ The module is a switch on the application, and it is off until you set it. This ### Console -To turn on both modules in Azion Console: +To turn on both Platform Resources in Azion Console: - + - Access [Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/) > **Applications**, then select the application that delivers your images. + Access [Azion Console](https://console.azion.com/) > **Applications** > **your Application**. @@ -103,7 +104,7 @@ To turn on both modules in Azion Console: -The application now carries both modules, and the **Optimize Images** behavior becomes available to its rules. +The Application now has both Platform Resources turned on, and the _Optimize Images_ behavior is available to its rules. @@ -111,19 +112,17 @@ The application now carries both modules, and the **Optimize Images** behavior b ### CLI -One command sets both modules. Replace `` with [your application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): +One command turns on both Platform Resources. Replace `` with [your Application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): - ```bash - azion update application --application-id --image-processor true --application-accelerator true - ``` + --image-processor true --application-accelerator true`} /> - The command confirms the application it changed: + The command confirms the Application it changed: ```text Updated Application with ID @@ -132,7 +131,7 @@ One command sets both modules. Replace `` with [your application -The application now carries both modules, and the **Optimize Images** behavior becomes available to its rules. +The Application now has both Platform Resources turned on, and the _Optimize Images_ behavior is available to its rules. @@ -140,29 +139,27 @@ The application now carries both modules, and the **Optimize Images** behavior b ### API -One request sets both modules. Replace `[TOKEN VALUE]` with your personal token and `` with [your application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): +One request turns on both Platform Resources. Replace `[TOKEN VALUE]` with your personal token and `` with [your Application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): - ```bash - curl --request PATCH \ - --url https://api.azion.com/v4/workspace/applications/ \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "modules": { "application_accelerator": { "enabled": true }, "image_processor": { "enabled": true } } - }' - ``` +}'`} /> - A `202` carries `"state": "pending"`, because the change is still propagating. The `modules` object of the response echoes every module of the application, including the ones you left alone: + A `202` carries `"state": "pending"`, because the change is still propagating. The `modules` object of the response echoes every switch of the Application, including the ones you left alone: ```json { @@ -176,7 +173,7 @@ One request sets both modules. Replace `[TOKEN VALUE]` with your personal token -The application now carries both modules, and the **Optimize Images** behavior becomes available to its rules. +The Application now has both Platform Resources turned on, and the _Optimize Images_ behavior is available to its rules. @@ -186,7 +183,7 @@ The application now carries both modules, and the **Optimize Images** behavior b ## Create a cache setting that varies on the ims query string -Without this step the cache cannot tell one transformation from another, and it may answer a request for a 400 pixel image with a 200 pixel one. +Without this step, the cache cannot tell one transformation from another. It may answer a request for a 400-pixel image with a 200-pixel one. @@ -197,12 +194,27 @@ Without this step the cache cannot tell one transformation from another, and it To create the cache setting in Azion Console: + + + Access [Azion Console](https://console.azion.com/) > **Applications** > **your Application**. + + In **Name**, enter `images`. + + + + In the **Cache** section, set **Cache Behavior** to _Override cache behavior_. + + + + + In the **Cache** section, in **Max Age**, enter `31536000`. + @@ -215,10 +227,11 @@ To create the cache setting in Azion Console: In **Fields**, enter `ims`. + -The application now has a cache setting that stores one object per distinct `ims` value. +The Application now has a cache setting that stores one object per distinct `ims` value. @@ -226,15 +239,14 @@ The application now has a cache setting that stores one object per distinct `ims ### CLI -The create flags do not reach the maximum age, so the command sends the whole body from a file. +The Azion CLI command sends the whole body from a file, because no create flag sets the cache `max_age` or `sort_enabled`. Save the following as `cache-setting.json`: - ```json - { + `31536000` seconds is the ceiling of `max_age`, which suits images because they change rarely. - Replace `` with [your application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): + Replace `` with [your Application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): - ```bash - azion create cache-setting --application-id --file cache-setting.json - ``` + --file cache-setting.json`} /> The command prints the id of the new cache setting: @@ -270,16 +279,14 @@ The create flags do not reach the maximum age, so the command sends the whole bo - ```bash - azion describe cache-setting --application-id --cache-setting-id 123464 --format json - ``` + --cache-setting-id 123464 --format json`} /> The output reports the `ims` allowlist and the maximum age the file set. -The application now has a cache setting that stores one object per distinct `ims` value. Record the id the command printed, because the rule applies it. For every flag the command accepts, refer to [Azion CLI create](/en/documentation/devtools/cli/resources/). +The Application now has a cache setting that stores one object per distinct `ims` value. Record the id the command printed, because the rule applies it. For every flag the command accepts, refer to [Azion CLI cache-setting](/en/documentation/devtools/cli/resources/cache-setting/). @@ -292,14 +299,13 @@ One request carries the cache behavior and the query string allowlist together. - Replace `` with [your application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): + Replace `` with [your Application ID](/en/documentation/guides/application-development/getting-started/configure-main-settings/): - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//cache_settings \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + /cache_settings \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "name": "images", "browser_cache": { "behavior": "honor" }, @@ -313,8 +319,7 @@ One request carries the cache behavior and the query string allowlist together. } } } - }' - ``` +}'`} /> `31536000` seconds is the ceiling of `max_age`, which suits images because they change rarely. @@ -328,19 +333,19 @@ One request carries the cache behavior and the query string allowlist together. -The application now has a cache setting that stores one object per distinct `ims` value. +The Application now has a cache setting that stores one object per distinct `ims` value. -For the rest of the fields a cache setting carries, including how long an object stays cached, refer to [Cache Settings](/en/documentation/platform/applications/cache/cache-settings/). +For the rest of the fields a cache setting carries, including how long an object stays cached, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). --- -## Create a rule that sends image requests to the module +## Create a rule that sends image requests to Image Processor -The rule is what turns the query string into a transformation. It matches requests for image paths, applies the cache setting you created, and adds the **Optimize Images** behavior. +The rule is what turns the query string into a transformation. It matches requests for image paths, applies the cache setting you created, and carries the _Optimize Images_ behavior. @@ -351,6 +356,11 @@ The rule is what turns the query string into a transformation. It matches reques To create the rule in Azion Console: + + + Access [Azion Console](https://console.azion.com/) > **Applications** > **your Application**. + + @@ -380,7 +390,7 @@ To create the rule in Azion Console: -Every request for a path ending in one of those extensions now reaches Image Processor, carries the `images` cache setting, and is processed when its URL asks for a transformation. +Every request for a path with one of those extensions now gets the `images` cache setting and the _Optimize Images_ behavior. Image Processor transforms the image when its URL carries `ims`. @@ -395,8 +405,7 @@ The criteria carry `${request_uri}`, which a shell expands, and the argument car Save the following as `rule.json`, with the id of your cache setting in the `set_cache_policy` behavior: - ```json - { + One rule carries both behaviors, and `optimize_images` takes no attributes. - ```bash - azion create rules-engine --application-id --phase request --file rule.json - ``` + --phase request --file rule.json`} /> The command prints the id of the new rule: @@ -435,7 +441,7 @@ The criteria carry `${request_uri}`, which a shell expands, and the argument car -Every request for a path ending in one of those extensions now reaches Image Processor, carries the `images` cache setting, and is processed when its URL asks for a transformation. +Every request for a path with one of those extensions now gets the `images` cache setting and the _Optimize Images_ behavior. Image Processor transforms the image when its URL carries `ims`. @@ -450,8 +456,7 @@ The criteria carry `${request_uri}`, which a shell expands, and the argument car Save the following as `rule.json`, with the id of your cache setting in the `set_cache_policy` behavior: - ```json - { + One rule carries both behaviors, and `optimize_images` takes no attributes. - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json - ``` + /request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> - A `202` carries `"state": "pending"`, because the rule is still propagating. It echoes the criteria and both behaviors, and it carries the `order` the rule holds among the rules of the application. + A `202` carries `"state": "pending"`, because the rule is still propagating. It echoes the criteria and both behaviors, and it carries the `order` the rule holds among the rules of the Application. -Every request for a path ending in one of those extensions now reaches Image Processor, carries the `images` cache setting, and is processed when its URL asks for a transformation. +Every request for a path with one of those extensions now gets the `images` cache setting and the _Optimize Images_ behavior. Image Processor transforms the image when its URL carries `ims`. -:::note[Optional] -Converting an image to WEBP or AVIF requires the request to carry `Accept: image/webp` or `Accept: image/avif`. The **Add Request Header** behavior adds it to the same rule, so the conversion stops depending on what the browser sent. In the Azion CLI and the API, it is a behavior of type `add_request_header`, whose `attributes` carry `"value": "Accept: image/webp"`. For the behavior's fields, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/). +:::note +This part is optional. An **Add Request Header** behavior with `Accept: image/webp` on the same rule makes the automatic conversion deliver WEBP to every request the rule matches, including one whose browser asked for PNG. Add it only when every client of those paths displays WEBP. In the Azion CLI and the API, it is a behavior of type `add_request_header`, whose `attributes` carry `"value": "Accept: image/webp"`. For the behavior's fields, refer to [Image Processor settings](/en/documentation/platform/applications/image-processor/settings/). ::: --- @@ -512,11 +514,9 @@ Ask for a width and see the response change. Request one of your images with an `ims` query string, replacing the host and the path with your own: -```bash -curl -s -o /dev/null -w "%{http_code} %{content_type} %{size_download} bytes\n" \ - -H "Accept: image/webp,image/*" \ - "https://www.example.com/images/photo.jpg?ims=400x" -``` + The response reports its status, its type, and its size: @@ -524,13 +524,11 @@ The response reports its status, its type, and its size: 200 image/webp 8312 bytes ``` -Request the same image with no query string and compare the size. The processed response is smaller, and it may also carry a different format from the file on your origin, because Image Processor delivers WEBP to the browsers that accept it. +Request the same image with no query string and compare the size. The resized response is smaller when the source image is wider than 400 pixels. Both responses can carry a different format from the file on your origin, because Image Processor converts images for browsers that accept another format, such as WEBP. -To confirm the module handled the response rather than the origin, read the headers: +To confirm that Image Processor handled the response rather than the origin, read the headers: -```bash -curl -sI -H "Accept: image/webp" "https://www.example.com/images/photo.jpg?ims=400x" -``` + A processed response carries `x-ims: Enabled` and the size of the source image before the transformation: @@ -541,11 +539,7 @@ x-ims: Enabled x-original-image-size: 484156 ``` -You now have an application that transforms images on request, and a URL that describes the transformation. - -:::tip -Keep `ims=` as the last parameter in the URL. A request that carries another query string parameter after it may return a `504` error. -::: +You now have an Application that transforms images on request, and a URL that describes the transformation. --- @@ -553,9 +547,9 @@ Keep `ims=` as the last parameter in the URL. A request that carries another que - + - + diff --git a/apps/docs/src/content/docs/en/pages/build/image-processor/settings.mdx b/apps/docs/src/content/docs/en/pages/build/image-processor/settings.mdx index 6388c535b6..ba714d6191 100644 --- a/apps/docs/src/content/docs/en/pages/build/image-processor/settings.mdx +++ b/apps/docs/src/content/docs/en/pages/build/image-processor/settings.mdx @@ -12,25 +12,25 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -[Image Processor](/en/documentation/platform/applications/image-processor/) is a module of [Applications](/en/documentation/platform/applications/), turned on for one application at a time. With the module on, a request for an image can carry an `ims` query string that describes a transformation. Azion returns a derived image built from the source image on the origin. This page carries the field, the flag, and the interface that sets each one, plus the behaviors, cache fields, headers, and datasets the module reaches. +[Image Processor](/en/documentation/platform/applications/image-processor/) is a Platform Resource that builds a derived image from the source image on the origin of an [Application](/en/documentation/platform/applications/). It is off in a new Application, and each Application turns it on separately. With Image Processor on, a request for an image can carry an `ims` query string that describes a transformation. This page carries the field, the flag, and the interface that sets each one, plus the behaviors, cache fields, headers, and datasets that Image Processor reaches. --- -## Module activation +## Activation -Five interfaces set the same switch, and the switch belongs to the application: one application can carry the module while another does not. +Five interfaces set the same switch, and the switch belongs to the Application: one Application can have Image Processor on while another does not. | Interface | Where you set it | Field or flag | | --- | --- | --- | -| Azion Console | The **Default Modules** group of the **Modules** section, on the **Main Settings** tab of an application | The **Image Processor** toggle, with the helper text "Enable dynamic image editing options." | +| Azion Console | The **Default Modules** group of the **Modules** section, on the **Main Settings** tab of an Application | The **Image Processor** toggle, with the helper text "Enable dynamic image editing options." | | Azion API v4 | `PATCH /v4/workspace/applications/` | `modules.image_processor.enabled` | | Azion API v3 | `PATCH https://api.azionapi.net/edge_applications/` | `image_optimization` | | [Azion CLI](/en/documentation/devtools/cli/) | `azion create application` and `azion update application` | `--image-processor` | -| [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) and [Azion Lib](/en/documentation/devtools/azion-lib/) | The application object | `imageProcessorEnabled` | +| [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/) and [Azion Lib](/en/documentation/devtools/azion-lib/) | An entry of `applications`, one per Application | `imageProcessorEnabled` | -`modules.image_processor.enabled` and `imageProcessorEnabled` are booleans, and `imageProcessorEnabled` defaults to `false`. The Azion CLI flag takes a string: `--image-processor true`. In Azion Console, the toggle is saved with **Save**. +`modules.image_processor.enabled` and `imageProcessorEnabled` are booleans, and both default to `false`. The Azion CLI flag takes a string: `--image-processor true`. In Azion Console, the toggle is saved with **Save**. -API v4 carries the switch in the `modules` object of the application: +API v4 carries the switch in the `modules` object of the Application: ```json { @@ -42,43 +42,47 @@ API v4 carries the switch in the `modules` object of the application: } ``` -The same `modules` object carries `application_accelerator`, `cache`, and `functions`, each with its own `enabled` boolean. API v3 names the switch `image_optimization` and takes it at the top level of the body. +The same `modules` object carries `application_accelerator`, `cache`, and `functions`, each with its own `enabled` boolean. API v3 names the switch `image_optimization` and takes it at the top level of the body. On an Application created through API v4, API v3 reads `websocket` as `true`, and the `PATCH` returns `400` until the body also carries `"websocket": false`. --- ## Rules Engine behaviors -Three [Rules Engine](/en/documentation/platform/applications/rules-engine/) behaviors build the rule that processes an image. **Optimize Images** requires the Image Processor module on the application that runs the rule. +A rule for images can carry three [Rules Engine](/en/documentation/platform/applications/rules-engine/) behaviors. Only **Optimize Images** is needed to process an image, and it requires Image Processor on the Application that runs the rule. | Behavior | Phase | API type | What it does | | --- | --- | --- | --- | -| **Optimize Images** | **Request Phase** | `optimize_images` | Enables Image Processor for the matched request. It takes no attributes. | -| **Set Cache Policy** | **Request Phase** | `set_cache_policy` | Applies a cache setting to the matched request. `attributes.value` carries the id of the cache setting, and Azion Console names it in a second dropdown. | -| **Add Request Header** | **Request Phase** | `add_request_header` | Adds a header to the request. `attributes.value` takes the form `Field: value`, such as `Accept: image/webp` or `Accept: image/avif`, which is what a conversion to those formats requires. | +| **Optimize Images** | **Request Phase** | `optimize_images` | Applies Image Processor to the matched request. It takes no attributes. | +| **Set Cache Policy** | **Request Phase** | `set_cache_policy` | Applies a cache setting to the matched request. | +| **Add Request Header** | **Request Phase** | `add_request_header` | Adds a header to the request. | -A criterion of the same rule carries `variable`, `operator`, `conditional`, and `argument`. A rule that matches image requests reads `${request_uri}` or `${uri}` with the `matches` operator, against an argument such as `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. +For **Set Cache Policy**, `attributes.value` carries the id of the cache setting, and in Azion Console you select it in a second dropdown. For **Add Request Header**, `attributes.value` takes the form `Field: value`, such as `Accept: image/webp` or `Accept: image/avif`. + +A criterion of the same rule carries `variable`, `operator`, `conditional`, and `argument`. A rule that matches image requests reads `${request_uri}` or `${uri}` with the `matches` operator, against an argument such as `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. `${request_uri}` requires Application Accelerator on the Application: while Application Accelerator is off, the API refuses a rule that reads it and returns the error `25047`. `${uri}` depends on no Platform Resource. --- ## Cache variation -A derived image is cached under its own key. The cache key includes the `ims` query string, and a variation with a converted format carries the file format after the separator, as in `httpsstatic.yourdomain.com/static/images/image_1.jpg?ims=880x@@webp`. +A derived image is cached under a key of its own when its cache setting varies the cache on `ims`, because the cache key then includes the `ims` query string after `@@`. A variation with a converted format also carries the file format at the end of the key, with no separator, as in `httpsstatic.example.com/static/images/image_1.jpg@@?ims=880xwebp`. + +Varying the cache on a query string uses an [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) field: `cache_vary_by_querystring`, under `modules.application_accelerator` in a cache setting. So varying the cache on `ims` requires Application Accelerator, while processing an image does not. -Varying the cache on a query string is an [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) field: `cache_vary_by_querystring` lives under `modules.application_accelerator` in a cache setting. Varying the cache on `ims` therefore requires that module. Processing an image does not require it. +In Azion Console, each field maps to a control of the **Cache vary by Query String** panel, in the **Application Accelerator** section of a cache setting: | Field | Console control | What it sets | | --- | --- | --- | | `cache_vary_by_querystring.behavior` | **Behavior** | How the cache handles query string parameters. The dropdown offers _Allowlist_, _Denylist_, _Ignore_, and _All_. | -| `cache_vary_by_querystring.fields` | **Fields** | The query string parameters considered for cache variation, one per line. A cache setting for images carries `ims`. | +| `cache_vary_by_querystring.fields` | **Fields** | The query string parameters considered for cache variation, one per line. | | `cache_vary_by_querystring.sort_enabled` | **Sort** | Whether query string parameters are sorted, so that cache behavior does not depend on the order they arrive in. | -In Azion Console, the three controls sit in the **Cache vary by Query String** panel of the **Application Accelerator** section of a cache setting. For the rest of the fields a cache setting carries, including the maximum age of the cached object, refer to [Cache Settings](/en/documentation/platform/applications/cache/cache-settings/). For the other fields the module unlocks, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/). +A cache setting for images carries `ims` in `fields`. For the rest of the fields a cache setting carries, including the maximum age of the cached object, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). For the other fields Application Accelerator unlocks, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/). --- ## Response headers -Azion returns two headers on the response to a request that carries an `ims` query string. +Azion returns two headers on a response that Image Processor processed. | Header | What it carries | | --- | --- | @@ -89,24 +93,24 @@ Azion returns two headers on the response to a request that carries an `ims` que ## Usage and event data -Azion reports Image Processor activity on six surfaces: two in Real-Time Metrics, two in Real-Time Events, and two in GraphQL. +Azion reports Image Processor activity on six surfaces: four in Azion Console, two each in Real-Time Metrics and Real-Time Events, and two in GraphQL. | Surface | What it carries | | --- | --- | | The **Image Processor** tab of [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) | Metrics for the requests made to the images processed through Image Processor in your account, as Total Requests and Total Requests per Second charts. | -| The **Bandwidth Saving** graph of Real-Time Metrics, under Applications | The traffic the account saved. | -| The **Image Processor** dataset of [Real-Time Events](/en/documentation/platform/real-time-events/) | The event records of requests made to applications using Image Processor. The dataset requires the module. | -| The **Proxy Upstream** field of Real-Time Events | `ims_http`, the value the field reads when the Tiered Cache origin is Image Processor. | +| The **Bandwidth Saving** dashboard in the **Applications** tab of Real-Time Metrics | The bytes Image Processor saved on the images it processed and delivered. | +| The **Image Processor** dataset of [Real-Time Events](/en/documentation/platform/real-time-events/) | The event records of requests made to Applications that use Image Processor. | +| The **Proxy Upstream** field of the Tiered Cache data source of Real-Time Events | `ims_http`, the value the field reads when Image Processor is the upstream of the Tiered Cache layer. | | The consumption dataset of [GraphQL](/en/documentation/devtools/graphql/gql-consumption-fields/) | `productId` `1441110021` and the metric `images_processed`, the total number of images processed by Image Processor. | | The [metrics datasets](/en/documentation/devtools/graphql/gql-real-time-metrics-fields/) of GraphQL | The `imagesProcessedMetrics` dataset and its fields. | -The data is available for up to 24 months. To build the consumption query and read its response, refer to [Query usage data from Image Processor](/en/documentation/guides/platform/observability/query-image-processor-usage-data-with-graphql/). +In Azion Console, the **Image Processor** dataset of Real-Time Events requires Image Processor on, and in GraphQL it is the `imagesProcessedEvents` dataset. The consumption data is available for up to 24 months, and a Real-Time Events record is kept for 7 days. To build the consumption query and read its response, refer to [Query usage data from Image Processor](/en/documentation/guides/platform/observability/query-image-processor-usage-data-with-graphql/). --- ## WASM Image Processor library -WASM Image Processor is a WebAssembly library that processes images inside a [Functions](/en/documentation/platform/functions/) function. It carries `loadImage`, `resize`, `getImageResponse`, and `clean`, and it writes `webp`, `jpeg`, and `png`. It is a different product surface from the Image Processor module, and no field on this page configures it. For more information, refer to [WASM Image Processor](/en/documentation/devtools/azion-lib/wasm-image-processor/). +WASM Image Processor is a WebAssembly library that processes images inside a [Function](/en/documentation/platform/functions/). It provides `loadImage`, `resize`, `getImageResponse`, and `clean`, and it writes `webp`, `jpeg`, and `png`. It runs in the code of that Function, separately from the Image Processor Platform Resource and the fields on this page. For more information, refer to [WASM Image Processor](/en/documentation/devtools/azion-lib/wasm-image-processor/). --- @@ -114,9 +118,9 @@ WASM Image Processor is a WebAssembly library that processes images inside a [Fu - Turn the module on and request a transformed image for the first time. - The path a request for a derived image takes, and where the transformation happens. + Turn Image Processor on and request a transformed image for the first time. + How the delivered format is chosen, how a derived image is cached, and where Image Processor stops. The grammar of the `ims` query string these settings switch on. - The steps that turn the module on and build the rule, interface by interface. + The steps that turn Image Processor on and build the rule, interface by interface. diff --git a/apps/docs/src/content/docs/en/pages/build/image-processor/url-parameters.mdx b/apps/docs/src/content/docs/en/pages/build/image-processor/url-parameters.mdx index a192aca279..65df80317b 100644 --- a/apps/docs/src/content/docs/en/pages/build/image-processor/url-parameters.mdx +++ b/apps/docs/src/content/docs/en/pages/build/image-processor/url-parameters.mdx @@ -12,7 +12,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -The `ims` query string carries the transformation [Image Processor](/en/documentation/platform/applications/image-processor/) applies to an image. One string can hold a resize, a crop, and a chain of filters. The platform returns a derived image built from the source image on the origin, and the original is never modified. This page carries the syntax of each operation, the values its arguments accept, and a rendered result. +The `ims` query string carries the transformation [Image Processor](/en/documentation/platform/applications/image-processor/) applies to an image. One string can hold a resize, a crop, and a chain of filters. Image Processor returns a derived image built from the source image on the origin, and it reads the source image without changing it. This page carries the syntax of each operation, the values its arguments accept, and a rendered result. --- @@ -25,6 +25,8 @@ A resize sets the size of the derived image. The size goes in the query string a | `Width` | Whole number of pixels, or `orig` | No | Calculated from `Height`, with the aspect ratio preserved | Sets the width of the derived image. `orig` keeps the original width. | | `Height` | Whole number of pixels, or `orig` | No | Calculated from `Width`, with the aspect ratio preserved | Sets the height of the derived image. `orig` keeps the original height. | +When both `Width` and `Height` are set, the image may be cropped automatically to fit the requested size. The crop is centered, and it runs vertically or horizontally depending on how the original dimensions fit the requested ones. + The arguments combine into five forms: | Form | Result | @@ -32,12 +34,14 @@ The arguments combine into five forms: | `?ims=WidthxHeight` | Resizes the image to that size. The image may be autocropped to fit. | | `?ims=Widthx` | Sets the width and calculates the height, with the aspect ratio preserved. | | `?ims=xHeight` | Sets the height and calculates the width, with the aspect ratio preserved. | -| `?ims=WidthxOrig` | Sets the width and keeps the original height, with no autocrop. | +| `?ims=Widthxorig` | Sets the width and keeps the original height. | | `?ims=fit-in/WidthxHeight` | Fits the image inside the area, with the aspect ratio preserved and no enlargement. | -When both `Width` and `Height` are set, the image may be cropped automatically to fit the requested size. The crop is centered, and it runs vertically or horizontally depending on how the original dimensions fit the requested ones. +Image Processor does not honor `orig` on every URL: some requests that carry it return the source image without a transformation. -`fit-in` never enlarges the image: when the area is larger than the image dimensions, the image keeps its original size. Both dimensions are optional, and the image grows until it reaches the width or the height, whichever bound comes first. For example, `?ims=fit-in/400x400` on a landscape image stops at 400 pixels of width, and the height lands below 400. +Without `fit-in`, a requested size larger than the source image enlarges it: `?ims=1200x`, `?ims=x900`, and `?ims=1200x900` all return an image larger than the source. To keep the original size when the requested size is larger, use `fit-in`. + +`fit-in` never enlarges the image: when the area is larger than the image dimensions, the image keeps its original size. Both dimensions are optional, and the image is scaled down until it fits the width or the height, whichever it reaches first. For example, `?ims=fit-in/400x400` on a landscape image stops at 400 pixels of width, and the height lands below 400. The image below carries `?ims=400x400`, which resizes with autocrop: @@ -54,11 +58,11 @@ A crop keeps the rectangle between two coordinates of the source image and disca | `AxB` | Coordinate pair in pixels | Yes | The upper-left corner where the crop starts. | | `CxD` | Coordinate pair in pixels | Yes | The bottom-right corner where the crop ends. | -For example, `?ims=430x20:910x730` starts the crop at the coordinate 430x20 pixels and ends it at the coordinate 910x730 pixels. +For example, `?ims=430x20:800x500` starts the crop at the coordinate 430x20 pixels and ends it at the coordinate 800x500 pixels. The image below carries that query: -![The source photograph cropped to the rectangle between the coordinates 430x20 and 910x730 pixels](/assets/docs/images/image-processor/Image_Processor_1.png?ims=430x20:910x730) +![The source photograph cropped to the rectangle between the coordinates 430x20 and 800x500 pixels](/assets/docs/images/image-processor/Image_Processor_1.png?ims=430x20:800x500) --- @@ -92,18 +96,14 @@ The image below carries `?ims=filters:rotate(270)`: ## Quality -The quality filter sets how much the derived image is compressed, which changes the file size and the transfer time. The value goes in the query string as `?ims=filters:quality(value)`. +The quality filter sets the compression of the derived image, which changes the file size and the transfer time. The value goes in the query string as `?ims=filters:quality(value)`. | Argument | Type | Required | What it does | | --- | --- | --- | --- | -| `value` | Whole number, `0` to `100` | Yes | The level of quality applied to the image. | +| `value` | Whole number, `0` to `100` | Yes | The quality of the derived image. `0` compresses it the most, and `100` the least. | The recommended value is `85`. It optimizes the image with no noticeable loss of visual quality. -:::note -A request for a resolution larger than the original does not enlarge the image. The image is displayed at the highest possible resolution. -::: - The image below carries `?ims=filters:quality(15)`, far below the recommended value: ![The source photograph delivered with a quality value of 15](/assets/docs/images/image-processor/Image_Processor_1.png?ims=filters:quality(15)) @@ -116,12 +116,14 @@ A watermark places a second image over the source image. The filter goes in the | Argument | Type | Required | What it does | | --- | --- | --- | --- | -| `WatermarkURL` | URL of an image | Yes | The image placed over the source image. Parentheses in the URL are encoded as `%28` for `(` and `%29` for `)`. | -| `X` | Whole number of pixels, `center`, or `repeat` | Yes | The horizontal position. A positive number offsets from the left edge to the right edge, and a negative number from the right edge to the left edge. `center` centers the watermark horizontally, and `repeat` fills the image horizontally with copies of it. | -| `Y` | Whole number of pixels, `center`, or `repeat` | Yes | The vertical position. A positive number offsets from top to bottom, and a negative number from bottom to top. `center` centers the watermark vertically, and `repeat` fills the image vertically with copies of it. | +| `WatermarkURL` | URL of an image | Yes | The image placed over the source image. | +| `X` | Whole number of pixels, `center`, or `repeat` | Yes | The horizontal position. | +| `Y` | Whole number of pixels, `center`, or `repeat` | Yes | The vertical position. | | `Alpha` | Whole number, `0` to `100` | Yes | The transparency of the watermark. `0` is completely opaque and `100` is completely transparent. | -For example, `?ims=filters:watermark(https://example.com/watermark-image.png,-25,-10,50)` applies the watermark 25 pixels left of center and 10 pixels below center, at 50% transparency. +A positive `X` offsets the watermark from the left edge, and a negative `X` offsets it from the right edge. A positive `Y` offsets it from the top edge, and a negative `Y` offsets it from the bottom edge. `center` centers it on that axis, and `repeat` fills the image with copies of it along that axis. Parentheses in `WatermarkURL` are encoded as `%28` for `(` and `%29` for `)`. + +For example, `?ims=filters:watermark(https://example.com/watermark-image.png,-25,-10,50)` places the watermark 25 pixels from the right edge and 10 pixels from the bottom edge, at 50% transparency. The image below carries a watermark centered on both axes, at 50% transparency: @@ -137,14 +139,7 @@ Format conversion returns the image in a different file format. The target forma | --- | --- | --- | --- | | `ImageFormat` | One of `webp`, `avif`, `jpeg`, `gif`, `png` | Yes | The file format of the derived image. | -Converting to WEBP or AVIF requires the request to carry an `Accept` header that names the format: - -| Output format | Header the request must carry | -| --- | --- | -| `webp` | `Accept: image/webp` | -| `avif` | `Accept: image/avif` | - -To add that header with a rule, refer to [Configure Image Processor](/en/documentation/guides/application-performance/delivery-optimization/process-images/). +The response carries the format the filter names, whatever `Accept` header the request carries. A browser that does not support WEBP or AVIF cannot display it. The image below carries `?ims=filters:format(gif)`: @@ -154,15 +149,15 @@ The image below carries `?ims=filters:format(gif)`: ## Fill -Fill creates a derived image larger than the original and paints the area around it with one color. The filter goes in the query string as `?ims=fit-in/WidthxHeight/filters:fill(Color)`. +Fill fits the image inside an area of the requested size and paints the rest of the area with one color. The derived image takes the size of the area. The filter goes in the query string as `?ims=fit-in/WidthxHeight/filters:fill(Color)`. | Argument | Type | Required | What it does | | --- | --- | --- | --- | -| `Width` | Whole number of pixels | No | The width of the area the image fits into. Omit it and the width is calculated from `Height`, with the aspect ratio preserved. | -| `Height` | Whole number of pixels | No | The height of the area the image fits into. Omit it and the height is calculated from `Width`, with the aspect ratio preserved. | +| `Width` | Whole number of pixels | No | The width of the area the image fits into. | +| `Height` | Whole number of pixels | No | The height of the area the image fits into. | | `Color` | Hexadecimal color value, or the named value `gray` | Yes | The color painted around the image. | -Fill uses the same `fit-in` behavior as a resize: the image keeps its aspect ratio, and an area larger than the image does not enlarge it. The space left over is what the color fills. +If you omit `Width` or `Height`, the omitted dimension is calculated from the other, with the aspect ratio preserved. Fill uses the same `fit-in` behavior as a resize: the image keeps its aspect ratio, and an area larger than the image does not enlarge it. The space left over is what the color fills. For example, `?ims=fit-in/300x400/filters:fill(008080)` fits the image into an area of 300 by 400 pixels and paints the space around it with the color `008080`. @@ -178,11 +173,11 @@ One `ims` string can carry more than one filter. The filters go inside a single | Segment | Example | What it does | | --- | --- | --- | -| Resize segment | `fit-in/400x400` | Sets the size of the derived image. It comes first, and a `/` separates it from the filter group. | +| Resize segment | `fit-in/400x400` | Sets the size of the derived image. | | Filter group | `filters:fill(00ffff):quality(100)` | Carries one or more filters, opened by `filters:`. | | Filter separator | `:` | Separates one filter from the next inside the group. | -For example, `?ims=fit-in/400x400/filters:fill(00ffff):quality(100)` fits the image into an area of 400 by 400 pixels. It then paints the space around the image with the color `00ffff` and applies a quality value of `100`. +The resize segment comes first, and a `/` separates it from the filter group. For example, `?ims=fit-in/400x400/filters:fill(00ffff):quality(100)` fits the image into an area of 400 by 400 pixels. It then paints the space around the image with the color `00ffff` and applies a quality value of `100`. The image below carries that query: @@ -202,20 +197,15 @@ Image Processor accepts these source image formats: - WEBP - AVIF -WEBP and AVIF depend on the browser. For the browsers that support each one, refer to [WEBP browser support](https://caniuse.com/webp) and [AVIF browser support](https://caniuse.com/avif). +A browser displays a WEBP or AVIF derived image only when it supports that format. For the browsers that support each one, refer to [WEBP browser support](https://caniuse.com/webp) and [AVIF browser support](https://caniuse.com/avif). -Image Processor also converts a format with no `ims` parameter in the request. It detects whether the browser supports WEBP and converts the image when possible, and BMP images are converted to JPEG or WEBP depending on the same browser support. For more information, refer to [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/). +Image Processor also converts a format with no `ims` parameter in the request. It detects which formats the browser supports and, when possible, converts the image to one of them, such as WEBP or AVIF. BMP images are converted to JPEG or WEBP depending on the same browser support. For more information, refer to [Image delivery](/en/documentation/platform/applications/image-processor/image-delivery/). --- ## Position of the ims parameter -The `ims=` query string parameter must be the last parameter in the URL. When another query string parameter follows `ims=`, the request may return a `504` error. - -| URL | Position of `ims=` | -| --- | --- | -| `example.com/image.jpeg?ts=1234&ims=1000x1000` | Last. The request is valid. | -| `example.com/image.jpeg?ims=1000x1000&ts=1234` | Not last. The request may return a `504` error. | +`ims` can sit anywhere in the query string: `example.com/image.jpeg?ims=1000x1000&ts=1234` and `example.com/image.jpeg?ts=1234&ims=1000x1000` return the same derived image. An `ims` value that Image Processor cannot parse, such as `450xOrig`, returns the source image without a transformation, still with `x-ims: Enabled`. --- @@ -223,9 +213,9 @@ The `ims=` query string parameter must be the last parameter in the URL. When an - The path a request takes through the module, and how a derived image is cached. - The fields and interfaces that turn the module on for an application. + How the delivered format is chosen, how a derived image is cached, and where Image Processor stops. + The fields and interfaces that turn Image Processor on for an Application. The size and dimension ceilings that bound the values in these tables. - Turn the module on, add the rules that process images, and set the cache. + Turn Image Processor on, add the rules that process images, and set the cache. diff --git a/apps/docs/src/content/docs/en/pages/devtools/api-graphql/features/events-fields.mdx b/apps/docs/src/content/docs/en/pages/devtools/api-graphql/features/events-fields.mdx index 07f7595e04..bf7a8a5711 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/api-graphql/features/events-fields.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/api-graphql/features/events-fields.mdx @@ -378,7 +378,7 @@ The response holds five records, cut here after the third: | `host` | String | Host of the request: the host name from the request line, the `Host` request header, or the server name that matched the request. Example: `hello.myhost.net` | | `proxyHost` | String | Host name being proxied. Example: `storage.googleapis.com:443` | | `proxyStatus` | Int | HTTP error status code, or the origin, when the upstream returns no response. Example: `520`. For a cached response, the value is `-`. | -| `proxyUpstream` | String | Address of the origin (upstream). The second origin can be Image Processor, which processes the image before it is cached. Example: `ims_http` | +| `proxyUpstream` | String | Address of the origin (upstream). When Image Processor answered as the upstream, the field reads `ims_http`. | | `referenceError` | String | Reference ID of the request, generated when the status code is `4xx` or `5xx`. Example: `#AECFE66100000000C947B9B3B3BFBE46FFFFFFFF9401`. Can also be `-` | | `remoteAddr` | String | IP address of the origin that generated the request. Example: `127.0.0.1` | | `remotePort` | Int | Port of the origin that generated the request. Example: `8080` | diff --git a/apps/docs/src/content/docs/en/pages/devtools/azion-edge-runtime/overview/overview.mdx b/apps/docs/src/content/docs/en/pages/devtools/azion-edge-runtime/overview/overview.mdx index fe14a58cc3..58edbde66d 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/azion-edge-runtime/overview/overview.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/azion-edge-runtime/overview/overview.mdx @@ -70,7 +70,7 @@ flowchart TD ``` 1. `azion build` runs Azion Bundler, which bundles your code and resolves the Node.js APIs it calls with polyfills, at build time. `azion deploy` publishes the result as a function. -2. A [function instance](/en/documentation/platform/applications/functions-instances/#instance-fields) places the function on an application. Its `active` field stops the instance from running without deleting it. The application must have **Functions** turned on in the **Modules** section of its [Main Settings](/en/documentation/platform/applications/main-settings/#products). +2. A [function instance](/en/documentation/platform/applications/functions-instances/#function-instance-fields) places the function on an application. Its `active` field stops the instance from running without deleting it. The application must have **Functions** turned on in the **Modules** section of its [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources). 3. A request arrives, and a [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule whose criteria match runs its **Run Function** behavior, which names the instance. 4. Azion Runtime runs the function in an isolate, a V8 execution context, in the [data center that serves the request](/en/documentation/fundamentals/how-it-works/#distributed-infrastructure). 5. The runtime calls the handler, and the handler returns a `Response`. Work passed to `ctx.waitUntil()` can finish after the handler returns. diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/azion-cli/config/azion-config-js.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/azion-cli/config/azion-config-js.mdx index 8c6caf6db8..1c4aca89bf 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/cli/azion-cli/config/azion-config-js.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/azion-cli/config/azion-config-js.mdx @@ -524,6 +524,8 @@ Each entry of a workload's `deployments` sets which application, firewall, and c | `strategy.attributes.firewall` | `string \| number \| null` | No | The firewall, by name or ID. | | `strategy.attributes.customPage` | `string \| number \| null` | No | The custom page, by name or ID. | +With `azion deploy`, a deployment serves the Application that the deploy creates for the project, even when `strategy.attributes.application` carries the ID of another Application. + ### customPages Each entry of `customPages` declares one set of [custom pages](/en/documentation/platform/workloads/custom-pages/settings/), the pages Azion returns in place of an error response. diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/glossary.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/glossary.mdx index 7ea59664b2..2e4287d7ac 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/cli/glossary.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/glossary.mdx @@ -21,4 +21,4 @@ This glossary defines the terms that the [Azion CLI](/en/documentation/devtools/ | preset | A set of default build and deploy settings for one framework or language, such as `astro`, `html`, or `javascript`, which you can replace in `azion.config.js`. [Azion CLI presets](/en/documentation/devtools/cli/resources/presets/) lists every preset the CLI offers. | | profile | A CLI configuration in `~/.azion` that holds a personal token and the account details the CLI stores with it, so you can switch between accounts or environments with `azion profiles`. [Azion CLI profile](/en/documentation/devtools/cli/resources/profile/) creates and deletes them. | | template | A starter project that `azion init` offers after you choose a preset, such as *Hello World* for the *Javascript* preset. [Azion CLI init](/en/documentation/devtools/cli/init/) sets up a project from a preset and a template. | -| workload deployment | The object that names the application, the firewall, and the custom page set that serve the traffic of a workload. A workload holds one deployment, which `azion deploy` creates from the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`. | +| workload deployment | The object that names the application, the firewall, and the custom page set that serve the traffic of a workload. A workload holds one deployment, which the [`workload-deployment`](/en/documentation/devtools/cli/resources/workload-deployment/) commands create and update, and which `azion deploy` writes from the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`. | diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/application.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/application.mdx index 95dae8c4ef..1a81edffa4 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/application.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/application.mdx @@ -26,7 +26,7 @@ azion create application [flags] | --- | --- | --- | --- | --- | | `--active` | — | string | — | Turns the application on (`true`) or off (`false`). | | `--application-accelerator` | — | string | — | Turns [Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/) on (`true`) or off (`false`) for the application. | -| `--cache` | — | string | — | Turns [Cache](/en/documentation/platform/applications/cache/cache-settings/) on (`true`) or off (`false`) for the application. | +| `--cache` | — | string | — | Keeps [Cache](/en/documentation/platform/applications/cache/cache-settings/) on (`true`) for the application. Cache cannot be turned off, and `false` fails with `The cache cannot be false.` | | `--debug-enabled` | — | string | — | Takes `true` or `false`. With `true`, you can check whether the application's [Rules Engine](/en/documentation/platform/applications/rules-engine/) rules ran. | | `--file` | — | string | — | Path to a JSON file with the attributes of the application. Use `-` to read the JSON from standard input. | | `--function` | — | string | — | Turns [Functions](/en/documentation/platform/functions/) on (`true`) or off (`false`) for the application. | @@ -124,7 +124,7 @@ azion update application [flags] | `--active` | — | string | — | Turns the application on (`true`) or off (`false`). | | `--application-accelerator` | — | string | — | Turns Application Accelerator on (`true`) or off (`false`) for the application. | | `--application-id` | — | int | — | ID of the application to update. You can leave it out when the `--file` JSON carries `"id"`. | -| `--cache` | — | string | — | Turns Cache on (`true`) or off (`false`) for the application. | +| `--cache` | — | string | — | Keeps Cache on (`true`) for the application. Cache cannot be turned off, and `false` fails with `The cache cannot be false.` | | `--debug-enabled` | — | string | — | Takes `true` or `false`. With `true`, you can check whether the application's Rules Engine rules ran. | | `--file` | — | string | — | Path to a JSON file with the attributes to change. Use `-` to read the JSON from standard input. | | `--functions` | — | string | — | Turns Functions on (`true`) or off (`false`) for the application. | diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/custom-pages.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/custom-pages.mdx index dc6d6a580f..f604b74902 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/custom-pages.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/custom-pages.mdx @@ -10,7 +10,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -The Azion CLI `custom-pages` commands create, list, describe, update, and delete custom page sets, the [Custom Pages](/en/documentation/platform/workloads/custom-pages/settings/) resource that replaces the error responses of a workload with pages served from a connector. These commands manage the set and do not assign it to a workload: set **Custom Page** in the workload's deployment settings in Azion Console, or name the set in the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/). +The Azion CLI `custom-pages` commands create, list, describe, update, and delete custom page sets, the [Custom Pages](/en/documentation/platform/workloads/custom-pages/settings/) resource that replaces the error responses of a workload with pages served from a connector. These commands manage the set and do not assign it to a workload: set **Custom Page** in the workload's deployment settings in Azion Console, run [`azion update workload-deployment`](/en/documentation/devtools/cli/resources/workload-deployment/#update) with `--custom-page`, or name the set in the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`. `azion update workload-deployment` sends `--custom-page` only with `--strategy-type`. It sends the strategy as one object, so pass the application and the firewall the deployment names as well. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/). --- @@ -223,6 +223,7 @@ On update, the file carries only the fields to change, and the fields it leaves The options every command accepts, such as `--format`, `--out`, and `-y`. The fields of a custom page set, the status codes it can replace, and how a page takes its content from a connector. The commands that create and manage the connector that serves the pages of a set. + The commands that assign a custom page set in the deployment of a workload. The `deployments` entry that assigns a custom page set to a workload. diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/firewall.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/firewall.mdx index 455c1ee8f9..bb47027e63 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/firewall.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/firewall.mdx @@ -10,7 +10,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -The Azion CLI `firewall` commands create, list, describe, update, and delete firewalls. A [firewall](/en/documentation/platform/firewall/) inspects the requests of a workload before its application does, and these commands turn its WAF, Network Shield, and Functions switches on or off. A firewall inspects no request until the deployment of a workload names it: set **Firewall** in the workload's deployment settings in Azion Console, or name the firewall in the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js` and run `azion deploy`. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/). +The Azion CLI `firewall` commands create, list, describe, update, and delete firewalls. A [firewall](/en/documentation/platform/firewall/) inspects the requests of a workload before its application does, and these commands turn its WAF, Network Shield, and Functions switches on or off. A firewall inspects no request until the deployment of a workload names it: set **Firewall** in the workload's deployment settings in Azion Console, run [`azion update workload-deployment`](/en/documentation/devtools/cli/resources/workload-deployment/#update) with `--edge-firewall`, or name the firewall in the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js` and run `azion deploy`. `azion update workload-deployment` sends `--edge-firewall` only with `--strategy-type`. It sends the strategy as one object, so pass the application and the custom page set the deployment names as well. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/). --- diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/resources.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/resources.mdx index 597ffdaedc..ea724b7454 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/resources.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/resources.mdx @@ -43,6 +43,7 @@ Each table marks with ✓ the verbs a resource takes. The resource name links to | Resource | Create | List | Describe | Update | Delete | | --- | --- | --- | --- | --- | --- | | [`workload`](/en/documentation/devtools/cli/resources/workload/) | ✓ | ✓ | ✓ | ✓ | ✓ | +| [`workload-deployment`](/en/documentation/devtools/cli/resources/workload-deployment/) | ✓ | ✓ | ✓ | ✓ | | ### Connectors diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/workload-deployment.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/workload-deployment.mdx new file mode 100644 index 0000000000..2266b67e58 --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/workload-deployment.mdx @@ -0,0 +1,186 @@ +--- +title: Azion CLI workload-deployment +description: Azion CLI commands that create, list, describe, and update the deployment of a workload, the object that names its application, firewall, and custom page set. +meta_tags: 'azion cli, azion create workload-deployment, azion list workload-deployment, azion update workload-deployment, workload deployment, custom page, firewall' +namespace: documentation_cli_resource_workload_deployment +permalink: /documentation/devtools/cli/resources/workload-deployment/ +--- + +import FrameBox from '@aziontech/webkit/frame-box' +import ItemList from '@aziontech/webkit/item-list' +import DocItem from '@aziontech/webkit/doc-item' + +The Azion CLI `workload-deployment` commands create, list, describe, and update the deployment of a [workload](/en/documentation/platform/workloads/). The deployment names the application that answers the workload's domains and, optionally, the [firewall](/en/documentation/platform/firewall/) that inspects requests first and the [custom page set](/en/documentation/platform/workloads/custom-pages/settings/) that replaces error responses. A workload holds one deployment. The CLI has no command that deletes a deployment. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/). This page matches Azion CLI 4.24.0. + +--- + +## Create + +`azion create workload-deployment` creates the deployment of a workload: + +```bash +azion create workload-deployment [flags] +``` + +| Flag | Short | Type | Default | Description | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID of the workload the deployment belongs to. Without it, and without `--file`, the command asks for it. | +| `--name` | — | string | — | Name of the deployment. Without it, and without `--file`, the command asks for it. | +| `--application-id` | — | int | — | ID of the application the deployment serves. Without it, and without `--file`, the command asks for it. | +| `--firewall-id` | — | int | — | ID of the firewall that inspects the workload's requests. | +| `--custom-page` | — | string | — | ID of the custom page set that replaces the workload's error responses. | +| `--strategy-type` | — | string | `default` | Type of the deployment strategy. | +| `--active` | — | string | — | Whether the deployment is active, `true` or `false`. | +| `--current` | — | string | — | Whether the deployment is the current one, `true` or `false`. | +| `--file` | — | string | — | Path to a JSON file with the attributes of the deployment. Use `-` to read the JSON from standard input. With `--file`, the command reads no other attribute flag. | + +This command creates a deployment for the workload with ID `1234` that serves the application with ID `5678` and replaces error responses with the custom page set with ID `123`: + +```bash +azion create workload-deployment --workload-id 1234 --name my-deployment --application-id 5678 --custom-page 123 +``` + +The command prints the ID of the deployment: + +```text +Created Workload Deployment with ID 4321 +``` + +--- + +## List + +`azion list workload-deployment` lists the deployments of a workload, 50 to a page: + +```bash +azion list workload-deployment [flags] +``` + +| Flag | Short | Type | Default | Description | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID of the workload whose deployments to list. Without it, the command asks for it. | +| `--details` | — | — | — | Adds the `EDGE APPLICATION` and `EDGE FIREWALL` columns to the `ID` and `CURRENT` columns. | +| `--filter` | — | string | — | Name to filter the list by. | +| `--order-by` | — | string | — | Field to sort the list by. | +| `--page` | — | int | `1` | Number of the page to return. | +| `--page-size` | — | int | `50` | Number of deployments on each page. | + +This command lists the deployment of the workload with ID `1234`, with the application and the firewall it names: + +```bash +azion list workload-deployment --workload-id 1234 --details +``` + +The command prints one row per deployment. `EDGE APPLICATION` and `EDGE FIREWALL` hold IDs, and an `EDGE FIREWALL` of `0` means the deployment names no firewall. The list shows no column for the custom page set; to see it, use `azion describe workload-deployment --format json`. + +--- + +## Describe + +`azion describe workload-deployment` prints the settings of the deployment of a workload: + +```bash +azion describe workload-deployment [flags] +``` + +| Flag | Short | Type | Default | Description | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID of the workload. Without it, the command asks for it. | +| `--deployment-id` | — | int | — | ID of the deployment to describe. Without it, the command asks for it. | + +This command describes the deployment with ID `4321` of the workload with ID `1234`, as JSON: + +```bash +azion describe workload-deployment --workload-id 1234 --deployment-id 4321 --format json +``` + +Without `--format json`, the command prints only the ID, the tag, and the current state of the deployment. + +--- + +## Update + +`azion update workload-deployment` changes the name, the state, or the strategy of the deployment of a workload: + +```bash +azion update workload-deployment [flags] +``` + +| Flag | Short | Type | Default | Description | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID of the workload. Without it, and without `--file`, the command asks for it. | +| `--deployment-id` | — | int | — | ID of the deployment to update. Without it, and without `--file`, the command asks for it. | +| `--name` | — | string | — | New name of the deployment. | +| `--active` | — | string | — | Whether the deployment is active, `true` or `false`. | +| `--current` | — | string | — | Whether the deployment is the current one, `true` or `false`. | +| `--strategy-type` | — | string | — | Type of the deployment strategy. The command sends `--edge-application`, `--edge-firewall`, and `--custom-page` only when this flag is set. | +| `--edge-application` | — | string | — | ID of the application the deployment serves. | +| `--edge-firewall` | — | string | — | ID of the firewall that inspects the workload's requests. | +| `--custom-page` | — | string | — | ID of the custom page set that replaces the workload's error responses. | +| `--file` | — | string | — | Path to a JSON file with the attributes to change. Use `-` to read the JSON from standard input. With `--file`, the command reads no other attribute flag and does not ask for the IDs, so pass `--workload-id` and `--deployment-id` with it. | + +The flags that name the application and the firewall are `--edge-application` and `--edge-firewall` here, and `--application-id` and `--firewall-id` on create. + +The command sends the strategy as one object. To change the custom page set, pass `--strategy-type` and the application and firewall the deployment already names, as `azion list workload-deployment --details` shows them. This command assigns the custom page set with ID `123` and keeps the application with ID `5678` and the firewall with ID `910`: + +```bash +azion update workload-deployment --workload-id 1234 --deployment-id 4321 --strategy-type default --edge-application 5678 --edge-firewall 910 --custom-page 123 +``` + +The command prints the ID of the updated deployment: + +```text +Updated Workload Deployment with ID 4321 +``` + +--- + +## Use a JSON file + +`azion create workload-deployment` and `azion update workload-deployment` read the deployment from a JSON file with `--file`. The workload and deployment IDs are not part of the file: pass them with `--workload-id` and, on update, `--deployment-id`. + +The file carries the fields of the deployment: + +- `name`, `active`, and `current` describe the deployment. +- `strategy.type` is the type of the strategy, such as `default`. +- `strategy.attributes` carries `application`, the ID of the application, and optionally `firewall` and `custom_page`, the IDs of the firewall and the custom page set. + +This file creates a current, active deployment that serves the application with ID `5678` behind the firewall with ID `910`, with the custom page set with ID `123`: + +```json +{ + "name": "my-deployment", + "active": true, + "current": true, + "strategy": { + "type": "default", + "attributes": { + "application": 5678, + "firewall": 910, + "custom_page": 123 + } + } +} +``` + +Pass the file to the create command with the ID of the workload: + +```bash +azion create workload-deployment --workload-id 1234 --file deployment.json +``` + +To declare the deployment in a project instead, use the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js` and run `azion deploy`. Its `strategy.attributes.customPage` takes the set by name or ID. With `azion deploy`, the deployment names the application the deploy creates for the project, even when `strategy.attributes.application` carries the ID of another application. + +--- + +## Related resources + + + + The options every command accepts, such as `--format`, `--out`, and `-y`. + The commands that create and manage the workload a deployment belongs to. + The commands that create and manage the custom page set a deployment names. + Every field of the deployment in Azion Console. + The `deployments` entry that `azion deploy` writes to the workload. + + diff --git a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/workload.mdx b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/workload.mdx index 25c3e8e29e..9be138d93a 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/cli/resources/workload.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/cli/resources/workload.mdx @@ -10,7 +10,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -The Azion CLI `workload` commands create, list, describe, update, and delete [Workloads](/en/documentation/platform/workloads/), the resource that answers the domains of a site or an API and holds their TLS, mTLS, and port settings. The application that answers those domains is set by the workload's deployment: `azion deploy` creates it from the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`, and in Azion Console you set it in the workload's deployment settings. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/). +The Azion CLI `workload` commands create, list, describe, update, and delete [Workloads](/en/documentation/platform/workloads/), the resource that answers the domains of a site or an API and holds their TLS, mTLS, and port settings. The application that answers those domains is set by the workload's deployment, which the [`workload-deployment`](/en/documentation/devtools/cli/resources/workload-deployment/) commands create and update. `azion deploy` also writes it from the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`, and in Azion Console you set it in the workload's deployment settings. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/). --- @@ -233,6 +233,7 @@ Error: Failed to update the Workload: ["This account is not allowed to use the f The options every command accepts, such as `--format`, `--out`, and `-y`. What a workload holds and how it puts an application on your domains. + The commands that create and update the deployment that names the application, firewall, and custom page set of a workload. The `deployments` entry that names the application and the firewall a workload uses. The commands that create and manage the application a deployment names. diff --git a/apps/docs/src/content/docs/en/pages/devtools/mcp/mcp-cache-testing.mdx b/apps/docs/src/content/docs/en/pages/devtools/mcp/mcp-cache-testing.mdx index ec762c05b3..72552f1c9a 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/mcp/mcp-cache-testing.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/mcp/mcp-cache-testing.mdx @@ -63,7 +63,7 @@ The request header `Pragma: azion-debug-cache` makes Azion add its cache headers curl -sI -H "Pragma: azion-debug-cache" https://www.example.com/ ``` -The response below is cut to its cache headers. The page it requests is not cached, so every header except `x-cache-config`, `x-cache-id`, and `x-cache-location` carries `-`: +The response below is cut to its cache headers. The page it requests is not stored, and its Application has Application Accelerator on, so every header except `x-cache-config`, `x-cache-id`, and `x-cache-location` carries `-`: ```text cache-control: max-age=0, no-cache, no-store @@ -79,7 +79,7 @@ x-cache-id: 0123456789abcdef0123456789abcdef x-cache-location: / ``` -A `-` in `x-cache` means no status: the content is restricted from caching. For every status value, such as `HIT` and `MISS`, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). Without `Pragma: azion-debug-cache`, the response carries none of these headers; of the Azion headers, only `x-azion-request-id` and `x-azion-edge-location` remain. +A `-` in `x-cache` means no status: the content is restricted from caching. With Application Accelerator off, the same response reports `MISS` in `x-cache`, its key in `x-cache-key`, and `0` in `x-cache-expires-in`. For every status value, such as `HIT` and `MISS`, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). Without `Pragma: azion-debug-cache`, the response carries none of these headers; of the Azion headers, only `x-azion-request-id` and `x-azion-edge-location` remain. Run the same request twice to see whether the second response comes from the cache. Consecutive requests can reach different servers, and `x-cache` names the server that answered each one. Then repeat the request for a static asset, with a query string, or with a `Cookie` header, and compare `x-cache-key`. The key shows which query parameters and cookies vary the cache. diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/examples.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/examples.mdx index 4c5b5cd0f4..ce4498080d 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/examples.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/examples.mdx @@ -28,7 +28,7 @@ These resources and data sources manage workloads and their deployments. For mor | Resource | Description | | --- | --- | | [`azion_workload`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload) | Creates and manages a workload. | -| [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload_deployment) | Creates and manages a workload deployment. | +| [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload_deployment) | Creates and manages a workload deployment, which binds an application, and optionally a firewall and a custom page, to a workload. | | Data source | Description | | --- | --- | @@ -37,23 +37,41 @@ These resources and data sources manage workloads and their deployments. For mor | [`azion_workload_deployments`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/workload_deployments) | Lists workload deployments. | | [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/workload_deployment) | Reads one deployment. | -This block creates a workload and a deployment of it, then queries the existing workloads: +This block creates an application, a workload, and a deployment that binds the application to the workload, then queries the existing workloads: ```hcl +# Create the application that the deployment binds +resource "azion_application_main_setting" "app" { + application = { + name = "my-application" + active = true + } +} + # Create a workload resource "azion_workload" "example" { - name = "my-workload" - - application_id = azion_application_main_setting.app.id - - active = true + workload = { + name = "my-workload" + active = true + } } -# Create a deployment +# Deploy the application on the workload resource "azion_workload_deployment" "example" { - workload_id = azion_workload.example.id - - active = true + workload_id = azion_workload.example.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true + + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.app.application.application_id + } + } + } } # Query existing workloads @@ -75,16 +93,30 @@ These resources and data sources manage connectors, which link an application to | [`azion_connectors`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/connectors) | Lists connectors. | | [`azion_connector`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/connector) | Reads one connector. | -This block creates a connector to an HTTPS origin, then queries the existing connectors: +This block creates an `http` connector to an HTTPS origin, then queries the existing connectors: ```hcl # Create a connector resource "azion_connector" "example" { - name = "my-connector" - - origin = { - address = "origin.example.com" - protocol = "https" + connector = { + name = "my-connector" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + https_port = 443 + } + } + ] + connection_options = { + host = "origin.example.com" + transport_policy = "force_https" + } + } } } @@ -104,37 +136,53 @@ These resources and data sources manage applications and their settings: cache s | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_cache_setting) | Creates and manages a cache setting. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_device_group) | Creates and manages a device group. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine) | Creates and manages a Rules Engine rule. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Creates and manages a function instance in an application. | +| [`azion_application_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine_order) | Sets the order of the Rules Engine rules of one phase. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Creates and manages a function instance in an application. | | Data source | Description | | --- | --- | -| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Queries the main settings of applications. | +| [`azion_applications_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/applications_main_settings) | Lists the main settings of applications. | +| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Reads the main settings of one application. | | [`azion_application_cache_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_settings) | Lists cache settings. | | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_setting) | Reads one cache setting. | | [`azion_application_device_groups`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_groups) | Lists device groups. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_group) | Reads one device group. | | [`azion_application_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rules_engine) | Lists Rules Engine rules. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rule_engine) | Reads one Rules Engine rule. | -| [`azion_application_functions_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lists function instances. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Reads one function instance. | +| [`azion_application_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lists function instances. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_function_instance) | Reads one function instance. | -This block creates an application and a cache setting that honors the cache policy of the origin: +This block creates an application with the cache module on, and a cache setting that honors the cache policy of the origin: ```hcl -# Create an Application +# Create an application resource "azion_application_main_setting" "app" { - name = "my-application" - - active = true + application = { + name = "my-application" + active = true + modules = { + cache = { + enabled = true + } + } + } } # Configure cache resource "azion_application_cache_setting" "cache" { - application_id = azion_application_main_setting.app.id - name = "cache-default" - - browser_cache_settings = "honor" - cdn_cache_settings = "honor" + application_id = azion_application_main_setting.app.application.application_id + + cache_setting = { + name = "cache-default" + browser_cache = { + behavior = "honor" + } + modules = { + cache = { + behavior = "honor" + } + } + } } ``` @@ -162,20 +210,24 @@ This block creates a zone and an `A` record in it, then queries the existing zon ```hcl # Create a DNS zone resource "azion_intelligent_dns_zone" "zone" { - name = "example.com" - domain = "example.com" - - active = true + zone = { + name = "example-zone" + domain = "example.com" + active = true + } } # Create a DNS record resource "azion_intelligent_dns_record" "www" { zone_id = azion_intelligent_dns_zone.zone.id - name = "www" - type = "A" - ttl = 3600 - - value = "192.0.2.1" + + record = { + name = "www" + type = "A" + rdata = ["192.0.2.1"] + policy = "simple" + ttl = 3600 + } } # Query existing DNS zones @@ -186,79 +238,138 @@ data "azion_intelligent_dns_zones" "all" {} ## Security -These resources and data sources manage firewalls, their Rules Engine rules and function instances, Web Application Firewall (WAF) settings, and network lists. For more information, refer to [Security resources](/en/documentation/devtools/terraform/security/). +These resources and data sources manage firewalls, their Rules Engine rules and function instances, Web Application Firewall (WAF) rule sets and exceptions, and network lists. For more information, refer to [Security resources](/en/documentation/devtools/terraform/security/). | Resource | Description | | --- | --- | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_main_setting) | Creates and manages the main settings of a firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine) | Creates and manages a Rules Engine rule of a firewall. | +| [`azion_firewall_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine_order) | Sets the order of the Rules Engine rules of a firewall. | | [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_functions_instance) | Creates and manages a function instance in a firewall. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/network_list) | Creates and manages a network list. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Creates and manages a WAF. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Creates and manages a WAF rule set. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Creates and manages a WAF rule set. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Creates and manages a WAF exception, which belongs to the rule set that its `waf_id` names. | | Data source | Description | | --- | --- | | [`azion_firewall_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_settings) | Lists firewalls. | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_setting) | Reads one firewall. | -| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lists the Rules Engine rules of firewalls. | +| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lists the Rules Engine rules of a firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rule_engine) | Reads one Rules Engine rule of a firewall. | -| [`azion_firewall_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lists the function instances of firewalls. | -| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Reads one function instance of a firewall. | +| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lists the function instances of a firewall. | +| [`azion_firewall_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_function_instance) | Reads one function instance of a firewall. | | [`azion_network_lists`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_lists) | Lists network lists. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_list) | Reads one network list. | -| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lists WAFs. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Reads one WAF. | -| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lists WAF rule sets. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Reads one WAF rule set. | +| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lists WAF rule sets. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Reads one WAF rule set. | +| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lists the exceptions of a WAF rule set. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Reads one WAF exception. | -This block creates a firewall in `waf` mode and a network list of two IP ranges: +This block creates a firewall with the WAF module on, a WAF rule set, and a firewall rule that applies the rule set in blocking mode to every request. It also creates a network list of two IP ranges: ```hcl -# Create a Firewall +# Create a firewall with the WAF module on resource "azion_firewall_main_setting" "firewall" { - name = "my-firewall" - - active = true - mode = "waf" + data = { + name = "my-firewall" + active = true + modules = { + waf = { + enabled = true + } + } + } } -# Create a Network List +# Create a WAF rule set +resource "azion_waf" "waf" { + result = { + name = "my-waf" + active = true + } +} + +# Apply the WAF to every request that reaches the firewall +resource "azion_firewall_rule_engine" "waf" { + firewall_id = azion_firewall_main_setting.firewall.data.id + + results = { + name = "Enable WAF" + active = true + behaviors = [ + { + behavior = { + type = "set_waf" + attributes = { + waf_id = azion_waf.waf.result.id + mode = "blocking" + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${request_uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } +} + +# Create a network list resource "azion_network_list" "allowlist" { - name = "allowlist-ips" - list_type = "ip_cidr" - - items = [ - "192.0.2.0/24", - "10.0.0.0/8" - ] + results = { + name = "allowlist-ips" + type = "ip_cidr" + items = [ + "192.0.2.0/24", + "198.51.100.0/24", + ] + } } ``` +The `$${request_uri}` argument escapes the `$`, so Terraform passes the literal `${request_uri}` variable to the firewall instead of interpolating it. + --- ## Certificates -These resources and data sources manage digital certificates. For more information, refer to [Certificates resources](/en/documentation/devtools/terraform/certificates/). +These resources and data sources manage digital certificates, certificate requests, and certificate revocation lists (CRLs). For more information, refer to [Certificates resources](/en/documentation/devtools/terraform/certificates/). | Resource | Description | | --- | --- | | [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/digital_certificate) | Creates and manages a digital certificate. | +| [`azion_certificate_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_request) | Requests a certificate from a certificate authority. | +| [`azion_certificate_signing_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_signing_request) | Creates a certificate signing request (CSR). | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/crl) | Creates and manages a CRL. | | Data source | Description | | --- | --- | | [`azion_digital_certificates`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificates) | Lists digital certificates. | | [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificate) | Reads one digital certificate. | +| [`azion_crls`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crls) | Lists CRLs. | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crl) | Reads one CRL. | This block creates a certificate from a certificate file and a private key file in the module folder, then queries the existing certificates: +{/* terraform-validate: skip — file() needs cert.pem and key.pem on disk; the block itself matches the 2.10.0 schema */} ```hcl # Create a certificate resource "azion_digital_certificate" "cert" { - name = "my-certificate" - - certificate = file("${path.module}/cert.pem") - private_key = file("${path.module}/key.pem") + results = { + name = "my-certificate" + certificate_content = file("${path.module}/cert.pem") + private_key = file("${path.module}/key.pem") + } } # Query existing certificates @@ -297,16 +408,49 @@ This resource and these data sources manage custom pages. No reference page of t --- +## Object Storage + +This resource and these data sources manage the buckets of [Object Storage](/en/documentation/platform/object-storage/). No reference page of the provider covers them. + +| Resource | Description | +| --- | --- | +| [`azion_bucket`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/bucket) | Creates and manages a bucket. | + +| Data source | Description | +| --- | --- | +| [`azion_buckets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/buckets) | Lists buckets. | +| [`azion_bucket`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/bucket) | Reads one bucket. | + +--- + +## Data Stream + +These resources and data sources manage [Data Stream](/en/documentation/platform/data-stream/) streams and their templates. No reference page of the provider covers them. + +| Resource | Description | +| --- | --- | +| [`azion_data_stream`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/data_stream) | Creates and manages a data stream. | +| [`azion_data_stream_template`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/data_stream_template) | Creates and manages a data stream template. | + +| Data source | Description | +| --- | --- | +| [`azion_data_streams`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_streams) | Lists data streams. | +| [`azion_data_stream`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_stream) | Reads one data stream. | +| [`azion_data_stream_templates`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_stream_templates) | Lists data stream templates. | +| [`azion_data_stream_template`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_stream_template) | Reads one data stream template. | + +--- + ## Complete example -This configuration pins the provider to version 2.0.0 and creates an application with a cache setting, a connector, a workload with a deployment, and a firewall. It outputs the IDs of the application, the workload, and the connector, and reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. +This configuration pins the provider to version 2.10.0 and creates an application with a cache setting, a connector and a rule that sends requests to it, a firewall that applies a WAF rule set, and a workload with a deployment that binds the application and the firewall to it. It outputs the IDs of the application, the workload, and the connector, and reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -317,58 +461,187 @@ provider "azion" { # Application resource "azion_application_main_setting" "app" { - name = "my-application" - active = true + application = { + name = "my-application" + active = true + modules = { + cache = { + enabled = true + } + } + } } -# Cache Setting +# Cache setting resource "azion_application_cache_setting" "cache" { - application_id = azion_application_main_setting.app.id - name = "cache-default" - browser_cache_settings = "honor" - cdn_cache_settings = "honor" + application_id = azion_application_main_setting.app.application.application_id + + cache_setting = { + name = "cache-default" + browser_cache = { + behavior = "honor" + } + modules = { + cache = { + behavior = "honor" + } + } + } } # Connector resource "azion_connector" "origin" { - name = "my-origin" - origin = { - address = "origin.example.com" - protocol = "https" + connector = { + name = "my-origin" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + https_port = 443 + } + } + ] + connection_options = { + host = "origin.example.com" + transport_policy = "force_https" + } + } + } +} + +# Rule that sends every request to the connector +resource "azion_application_rule_engine" "origin" { + application_id = azion_application_main_setting.app.application.application_id + + results = { + name = "Send requests to the origin" + phase = "request" + active = true + behaviors = [ + { + behavior = { + type = "set_connector" + attributes = { + value = azion_connector.origin.connector.id + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } +} + +# Firewall with the WAF module on +resource "azion_firewall_main_setting" "firewall" { + data = { + name = "my-firewall" + active = true + modules = { + waf = { + enabled = true + } + } + } +} + +# WAF rule set +resource "azion_waf" "waf" { + result = { + name = "my-waf" + active = true + } +} + +# Firewall rule that applies the WAF +resource "azion_firewall_rule_engine" "waf" { + firewall_id = azion_firewall_main_setting.firewall.data.id + + results = { + name = "Enable WAF" + active = true + behaviors = [ + { + behavior = { + type = "set_waf" + attributes = { + waf_id = azion_waf.waf.result.id + mode = "blocking" + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${request_uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] } } # Workload resource "azion_workload" "main" { - name = "my-workload" - application_id = azion_application_main_setting.app.id - active = true + workload = { + name = "my-workload" + active = true + } } -# Workload Deployment +# Workload deployment resource "azion_workload_deployment" "main" { - workload_id = azion_workload.main.id - active = true -} - -# Firewall -resource "azion_firewall_main_setting" "firewall" { - name = "my-firewall" - active = true - mode = "waf" + workload_id = azion_workload.main.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true + + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.app.application.application_id + firewall = azion_firewall_main_setting.firewall.data.id + } + } + } } # Outputs output "application_id" { - value = azion_application_main_setting.app.id + value = azion_application_main_setting.app.application.application_id } output "workload_id" { - value = azion_workload.main.id + value = azion_workload.main.workload.id } output "connector_id" { - value = azion_connector.origin.id + value = azion_connector.origin.connector.id } ``` diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/best-practices.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/best-practices.mdx index f095721769..e54b51ca7d 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/best-practices.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/best-practices.mdx @@ -13,7 +13,7 @@ import DocItem from '@aziontech/webkit/doc-item' A Terraform configuration describes infrastructure that several people and pipelines change over time. When its files follow one layout, its state lives in one shared place, and its token stays out of the repository, every run starts from the same picture of the account. Without that, two applies can write the same state at once, a token leaks with a commit, and a provider release reaches a configuration that never asked for it. -These practices apply to configurations that use the [Azion Terraform Provider](/en/documentation/devtools/terraform/) v2.0, which works with Azion API v4 only. +These practices apply to configurations that use the [Azion Terraform Provider](/en/documentation/devtools/terraform/) v2, which works with Azion API v4 only. The samples are written for provider 2.10.0. In order, the practices cover the file layout, resource names, the remote backend and its lock, the sensitive token variable, the `.gitignore` file, and the token in the environment. They then cover modules, the CI/CD pipeline, the provider version, outputs, references between resources, comments, and module README files. @@ -55,19 +55,23 @@ To check it, confirm that each file holds only the blocks its name announces, su ## Name each resource for what it serves -Terraform addresses a resource by its type and its local name, as in `azion_workload.api_gateway`, and `terraform state show` and every reference use that address. A local name such as `w1` tells nobody which workload it is. A local name such as `api_gateway`, with a `name` argument such as `api-gateway-prod`, says what the workload serves and in which environment. The cost is a naming convention that the team agrees on and keeps. +Terraform addresses a resource by its type and its local name, as in `azion_workload.api_gateway`, and `terraform state show` and every reference use that address. A local name such as `w1` tells nobody which workload it is. A local name such as `api_gateway`, with a `name` such as `api-gateway-prod` in its `workload` block, says what the workload serves and in which environment. The cost is a naming convention that the team agrees on and keeps. The first block shows the name to avoid, and the second the name to use: ```hcl # Avoid: the names say nothing about the workload resource "azion_workload" "w1" { - name = "w1" + workload = { + name = "w1" + } } # Use: the names say what the workload serves and where resource "azion_workload" "api_gateway" { - name = "api-gateway-prod" + workload = { + name = "api-gateway-prod" + } } ``` @@ -175,16 +179,19 @@ variable "environment" { } resource "azion_workload" "this" { - name = "${var.name}-${var.environment}" + workload = { + name = "${var.name}-${var.environment}" + } } output "workload_id" { - value = azion_workload.this.id + value = azion_workload.this.workload.id } ``` The root `main.tf` calls the module once per workload, with its own values: +{/* terraform-validate: skip */} ```hcl # main.tf module "api_workload" { @@ -252,7 +259,7 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" # An exact version, not a range + version = "2.10.0" # An exact version, not a range } } } @@ -260,7 +267,7 @@ terraform { The cost is that a later release arrives only when you edit the pin and run `terraform init -upgrade`. -To check it, run `terraform init` and confirm that it installs `aziontech/azion` at version `2.0.0`. +To check it, run `terraform init` and confirm that it installs `aziontech/azion` at version `2.10.0`. --- @@ -268,21 +275,33 @@ To check it, run `terraform init` and confirm that it installs `aziontech/azion` An output publishes a value after `terraform apply`, so another configuration, a script, or a person reads a workload or application ID instead of looking it up. A `description` says what the value is to anyone who reads the outputs later. The cost is a stable contract: whatever reads an output breaks when you rename or remove it. -The outputs below export the IDs of the workload and the application: +These outputs export the IDs of a workload and an application declared in the same configuration. Provider v2 returns each ID inside the resource's nested block, as `workload.id` and `application.application_id`: ```hcl +resource "azion_workload" "main" { + workload = { + name = "main-workload" + } +} + +resource "azion_application_main_setting" "main" { + application = { + name = "main-application" + } +} + output "workload_id" { description = "ID of the created workload" - value = azion_workload.main.id + value = azion_workload.main.workload.id } output "application_id" { description = "ID of the created application" - value = azion_application_main_setting.main.id + value = azion_application_main_setting.main.application.application_id } ``` -Inside a module, the same blocks go in its `outputs.tf`. For example, `modules/application/outputs.tf` exports `application_id` from `azion_application_main_setting.this.id` and `application_name` from `azion_application_main_setting.this.name`. +Inside a module, the same blocks go in its `outputs.tf`. For example, `modules/application/outputs.tf` exports `application_id` from `azion_application_main_setting.this.application.application_id` and `application_name` from `azion_application_main_setting.this.application.name`. To check it, confirm that each output carries a `description` and reads a resource attribute, never a literal ID. @@ -290,25 +309,56 @@ To check it, confirm that each output carries a `description` and reads a resour ## Reference resources instead of hardcoding IDs -A reference such as `azion_application_main_setting.example.id` passes the ID that Terraform knows once it creates the application, and it makes Terraform create the application first. A hardcoded ID such as `"12345"` belongs to one account, breaks when the application is created again with another ID, and gives Terraform no order to follow. The cost is that the referenced resource must be in the same configuration, or be read through a data source. +A reference such as `azion_application_main_setting.example.application.application_id` passes the ID that Terraform knows once it creates the application, and it makes Terraform create the application first. A hardcoded ID such as `12345` belongs to one account, breaks when the application is created again with another ID, and gives Terraform no order to follow. The cost is that the referenced resource must be in the same configuration, or be read through a data source. -The first block shows the hardcoded ID to avoid, and the second the reference to use: +The following configuration declares an application and one rule, held in a `locals` block, that two Rules Engine resources apply. The first resource shows the hardcoded ID to avoid, and the second the reference to use: ```hcl +resource "azion_application_main_setting" "example" { + application = { + name = "my-application" + } +} + +# The rule that both Rules Engine resources apply +locals { + deliver_rule = { + name = "Deliver all requests" + phase = "request" + behaviors = [{ behavior = { type = "deliver" } }] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } +} + # Avoid: an ID copied from one account -resource "azion_application_rule_engine" "example" { - application_id = "12345" +resource "azion_application_rule_engine" "hardcoded" { + application_id = 12345 + results = local.deliver_rule } # Use: a reference that also sets the order -resource "azion_application_rule_engine" "example" { - application_id = azion_application_main_setting.example.id +resource "azion_application_rule_engine" "referenced" { + application_id = azion_application_main_setting.example.application.application_id + results = local.deliver_rule } ``` -Because a reference already sets the order, a `depends_on` list that names the same resource repeats it. A deployment with `workload_id = azion_workload.main.id` needs no `depends_on = [azion_workload.main]`. For how references order resources, refer to [How the Terraform Provider works](/en/documentation/devtools/terraform/how-it-works/). +Because a reference already sets the order, a `depends_on` list that names the same resource repeats it. A deployment with `workload_id = azion_workload.main.workload.id` needs no `depends_on = [azion_workload.main]`. For how references order resources, refer to [How the Terraform Provider works](/en/documentation/devtools/terraform/how-it-works/). -To check it, search the configuration for quoted IDs in `_id` arguments, and replace each one with a reference or a data source. +To check it, search the configuration for literal IDs in `_id` arguments, and replace each one with a reference or a data source. --- @@ -322,7 +372,9 @@ The comment below says which API the workload serves and in which environment: # Workload for the main API # This workload manages the production API resource "azion_workload" "api" { - name = "api-prod" + workload = { + name = "api-prod" + } } ``` @@ -334,7 +386,7 @@ To check it, read each commented block after a change and confirm that the comme A `README.md` file in each module shows how to call it, which inputs it takes, and which outputs it returns. The person who calls the module then needs no look at its code. The cost is manual upkeep: update the README in the same change as the module's variables and outputs. -The README below documents a workload module with one input and one output: +This README documents a workload module with two inputs and one output: ````markdown # Workload Module @@ -343,8 +395,9 @@ The README below documents a workload module with one input and one output: ```hcl module "workload" { - source = "./modules/workload" - name = "api" + source = "./modules/workload" + name = "api" + environment = "prod" } ``` @@ -353,6 +406,7 @@ module "workload" { | Name | Description | Type | Default | |------|-------------|------|---------| | name | Workload name | string | n/a | +| environment | Environment suffix of the workload name | string | n/a | ## Outputs diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/getting-started.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/getting-started.mdx index c2d1769cc9..f8ef1395a4 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/getting-started.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/getting-started.mdx @@ -31,7 +31,7 @@ For more information about the provider, refer to [Azion Terraform Provider](/en ## Prerequisites - [Terraform](https://developer.hashicorp.com/terraform/downloads) 1.0 or later. -- The Azion Terraform Provider 2.0 or later, which this guide pins in `main.tf`. Version 2.0 works with Azion API v4 only, and earlier versions work with API v3. For the versions and what each one supports, refer to [Migrate from provider v1.x to v2.0](/en/documentation/devtools/terraform/terraform-migration-v3-to-v4/). +- The Azion Terraform Provider version 2.10.0, which this guide pins in `main.tf`. Version 2.0 and later work with Azion API v4 only, and earlier versions work with API v3. For the versions and what each one supports, refer to [Migrate from provider v1.x to v2.0](/en/documentation/devtools/terraform/terraform-migration-v3-to-v4/). - An Azion account. To create one, refer to [Create an account](/en/documentation/fundamentals/creating-account/). - A personal token with the permissions that your resources require. For more information, refer to [Personal tokens](/en/documentation/fundamentals/personal-tokens/). @@ -60,14 +60,14 @@ mkdir azion-terraform cd azion-terraform ``` -In the `azion-terraform` directory, create a `main.tf` file with the following content. The `required_providers` block sets the provider source to `aziontech/azion` and pins version `2.0.0`: +In the `azion-terraform` directory, create a `main.tf` file with the following content. The `required_providers` block sets the provider source to `aziontech/azion` and pins version `2.10.0`: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -127,27 +127,50 @@ In the `azion-terraform` directory, create a `resources.tf` file. It declares a ```hcl # Create a workload resource "azion_workload" "my_workload" { - name = "my-first-workload" + workload = { + name = "my-first-workload" + active = true + } } -# Create a connector +# Create a connector to your origin resource "azion_connector" "my_connector" { - name = "my-connector" + connector = { + name = "my-connector" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + } + } + ] + } + } } # Create an application resource "azion_application_main_setting" "my_app" { - name = "my-application" + application = { + name = "my-application" + active = true + } } # Create a DNS zone resource "azion_intelligent_dns_zone" "my_zone" { - name = "example.com" - active = true + zone = { + name = "my-zone" + domain = "example.com" + active = true + } } ``` -Replace `example.com` with the domain of your zone. The project declares four resources that do not exist on your account yet. +Each resource keeps its arguments in one nested block named after the object, such as `workload = { ... }` or `zone = { ... }`. Replace `origin.example.com` with the address of your origin server, and `example.com` with the domain of your zone. The project declares four resources that do not exist on your account yet. --- @@ -195,14 +218,14 @@ The state holds the four resources, and `terraform state show` displays the attr ## Complete example -The following configuration for provider version `2.0.0` puts the provider and three resources in one file. It declares the provider itself, so use it in an empty directory, not next to another file that declares the provider. It reads the token from the `api_token` variable, so it needs a `variables.tf` file that declares `api_token` and a `terraform.tfvars` file that sets it. Each resource block marks where its other arguments go: +The following configuration for provider version `2.10.0` puts the provider and three resources in one file. It declares the provider itself, so use it in an empty directory, not next to another file that declares the provider. It reads the token from the `api_token` variable, so it needs a `variables.tf` file that declares `api_token` and a `terraform.tfvars` file that sets it. Each nested block marks where its other arguments go: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -213,20 +236,37 @@ provider "azion" { # Create a workload resource "azion_workload" "example" { - name = "my-workload" - # Additional configuration... + workload = { + name = "my-workload" + # Additional configuration... + } } # Create a connector resource "azion_connector" "example" { - name = "my-connector" - # Additional configuration... + connector = { + name = "my-connector" + type = "http" + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + } + } + ] + } + # Additional configuration... + } } # Create an application resource "azion_application_main_setting" "example" { - name = "my-application" - # Additional configuration... + application = { + name = "my-application" + # Additional configuration... + } } ``` diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/migration-v3-to-v4.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/migration-v3-to-v4.mdx index 7df2d5d87b..30ec98d91f 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/migration-v3-to-v4.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/guides/migration-v3-to-v4.mdx @@ -12,7 +12,7 @@ import DocCard from '@aziontech/webkit/doc-card' You can move a Terraform configuration and its state from [Azion Terraform Provider](/en/documentation/devtools/terraform/) v1.x, which calls Azion API v3, to v2.0, which calls Azion API v4. To keep a configuration on v1.x instead, refer to [Azion Terraform Provider v1.x (API v3)](/en/documentation/devtools/terraform/terraform-provider-v3/). -Provider v2.0 is a major version. It adds resources and removes deprecated ones to match Azion API v4, so a v1.x configuration does not run on v2.0 unchanged. +Provider v2.0 is a major version. It adds resources and removes deprecated ones to match Azion API v4, so a v1.x configuration does not run on v2.0 unchanged. The v2.0 samples on this page are written for provider 2.10.0. --- @@ -61,6 +61,7 @@ Each provider version line calls one Azion API version: Version 1.41.0 is the last v1.x version. To keep running v1.x while you prepare the migration, pin the provider to it: +{/* terraform-validate: skip */} ```hcl terraform { required_providers { @@ -82,7 +83,9 @@ Provider 1.41.0 and earlier versions receive no updates or bug fixes. Plan the m ## Resource changes in v2.0 -Provider v2.0 removes, renames, and adds resources. The four tables below list each v1.x resource and data source with its v2.0 counterpart. For every argument of a v2.0 resource, refer to the [Terraform Registry](https://registry.terraform.io/providers/aziontech/azion/latest/docs). +Provider v2.0 removes, renames, and adds resources. The four tables in this section list each v1.x resource and data source with its v2.0 counterpart, and the resources that v2 adds. For every argument of a v2.0 resource, refer to the [Terraform Registry](https://registry.terraform.io/providers/aziontech/azion/latest/docs). + +Every v2.0 resource with a v1.x counterpart, including the ones that keep their v1.x name, takes its settings in a single nested block, such as `workload = {}`, `connector = {}`, `application = {}`, `function = {}`, `data = {}`, or `results = {}`. A v1.x block with its arguments at the top level fails `terraform validate` on v2.0, so every resource block needs a rewrite. ### Removed resources @@ -94,6 +97,9 @@ Provider v2.0 has no resource or data source with these v1.x names: | `azion_domains` (data source) | `azion_workloads` (data source) | | `azion_edge_application_origin` | `azion_connector` | | `azion_edge_applications_origins` (data source) | `azion_connectors` (data source) | +| `azion_environment_variable` | None. Provider v2.0 has no resource for environment variables, so manage them outside Terraform, for example in Azion Console. | +| `azion_environment_variables` (data source) | None | +| `azion_waf_domains` (data source) | None | ### Renamed resources @@ -106,24 +112,39 @@ These v1.x resources keep their role in v2.0 under another name. The v2.0 names | `azion_edge_application_main_setting` | `azion_application_main_setting` | | `azion_edge_application_cache_setting` | `azion_application_cache_setting` | | `azion_edge_application_rule_engine` | `azion_application_rule_engine` | -| `azion_edge_application_edge_functions_instance` | `azion_application_functions_instance` | +| `azion_edge_application_edge_functions_instance` | `azion_application_function_instance` | | `azion_edge_firewall_main_setting` | `azion_firewall_main_setting` | | `azion_edge_firewall_edge_functions_instance` | `azion_firewall_functions_instance` | +| `azion_waf_rule_set` | `azion_waf` | +| `azion_waf_rule_sets` (data source) | `azion_wafs` (data source) | + +The v1.x `azion_waf_rule_set` manages a WAF rule set, with the sensitivity of each threat family. In v2.0, that object is `azion_waf`, so a v1.x rule set block becomes an `azion_waf` block. The WAF mode moves to the `set_waf` behavior of the firewall rule that runs the WAF, where it takes `logging` or `blocking`. The data sources follow the same mapping, and the names `azion_waf_rule_set` and `azion_waf_rule_sets` stay in v2.0 for a different object, a WAF exception. -### Resources added in v2.0 +### Resources added in v2 -Provider v2.0 adds four resources: +These v2 resources have no v1.x counterpart. Some of them arrived after 2.0.0, in later 2.x releases, and provider 2.10.0 includes all of them: | Resource | What it manages | | --- | --- | | `azion_workload` | Workloads. Replaces `azion_domain` together with `azion_workload_deployment`. | -| `azion_workload_deployment` | Workload deployments. | +| `azion_workload_deployment` | Workload deployments, which bind an application, and optionally a firewall and a custom page, to a workload. | | `azion_connector` | Connectors. Replaces `azion_edge_application_origin`. | | `azion_custom_page` | Custom pages. Provider v1.x has no resource for them. | +| `azion_application_device_group` | Device groups of an application. | +| `azion_application_rule_engine_order` | The order of the rules in one phase of an application's Rules Engine. | +| `azion_firewall_rule_engine` | Rules Engine rules of a firewall. | +| `azion_firewall_rule_engine_order` | The order of the rules in a firewall's Rules Engine. | +| `azion_waf_rule_set` | WAF exceptions. Each one belongs to the rule set that its `waf_id` names. The v1.x resource with this name maps to `azion_waf`. | +| `azion_bucket` | Object Storage buckets. | +| `azion_certificate_request` | Let's Encrypt certificate requests. | +| `azion_certificate_signing_request` | Certificate signing requests (CSRs). | +| `azion_crl` | Certificate revocation lists. | +| `azion_data_stream` | Data Stream streams. | +| `azion_data_stream_template` | Data Stream templates. | ### Unchanged resources -These resources keep their v1.x names in v2.0: +These resources keep their v1.x names in v2.0. Their arguments still move into a nested block, so rewrite each one as described in [Resource changes in v2.0](#resource-changes-in-v20): | Resource | What it manages | | --- | --- | @@ -131,9 +152,7 @@ These resources keep their v1.x names in v2.0: | `azion_intelligent_dns_record` | DNS records | | `azion_intelligent_dns_dnssec` | DNSSEC settings | | `azion_network_list` | Network lists | -| `azion_waf_rule_set` | WAF rule sets | | `azion_digital_certificate` | Digital certificates | -| `azion_environment_variable` | Environment variables | --- @@ -141,26 +160,26 @@ These resources keep their v1.x names in v2.0: The upgrade takes two changes: the version constraint in the configuration and the provider installed in the project. -To change the version constraint, set `version` to `2.0.0` in the `required_providers` block: +To change the version constraint, set `version` to `2.10.0` in the `required_providers` block: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } ``` -To download provider 2.0.0, run: +To download provider 2.10.0, run: ```bash terraform init -upgrade ``` -Terraform installs provider 2.0.0 in the project. +Terraform installs provider 2.10.0 in the project. --- @@ -168,7 +187,7 @@ Terraform installs provider 2.0.0 in the project. Remove the deprecated v1.x resources from the Terraform state before you import them under their v2.0 types. -To remove the domain, origin, and function entries from the Terraform state: +To remove the domain, origin, function, and WAF rule set entries from the Terraform state: ```bash # Remove domain resources @@ -179,6 +198,9 @@ terraform state rm azion_edge_application_origin.example # Remove function resources (will be recreated as azion_function) terraform state rm azion_edge_function.example + +# Remove WAF rule set resources (will be imported as azion_waf) +terraform state rm azion_waf_rule_set.example ``` Replace `example` with the name each resource has in your configuration. The state no longer lists these resources, and the resources stay on your Azion account. @@ -195,6 +217,7 @@ In v1.x, one `azion_domain` resource managed the whole domain lifecycle. In v2.0 The v1.x configuration: +{/* terraform-validate: skip */} ```hcl terraform { required_providers { @@ -213,8 +236,8 @@ provider "azion" { resource "azion_domain" "example" { name = "my-domain" cname_access_only = false - digital_certificate = 1234 - edge_application = 5678 + digital_certificate = var.certificate_id + edge_application = var.application_id is_active = true # Domain name binding @@ -229,38 +252,70 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } +variable "api_token" { + type = string + sensitive = true +} + +variable "certificate_id" { + type = number +} + +variable "application_id" { + type = number +} + provider "azion" { api_token = var.api_token } # Workload resource (v2.0) resource "azion_workload" "example" { - name = "my-workload" - - # Workload configuration options - # Refer to the Terraform Registry documentation for the complete options + workload = { + name = "my-workload" + active = true + domains = ["example.com"] + workload_domain_allow_access = true + + tls = { + certificate = var.certificate_id + } + } } # Workload deployment (v2.0) resource "azion_workload_deployment" "example" { - workload_id = azion_workload.example.id - - # Deployment configuration - # Refer to the Terraform Registry documentation for the complete options + workload_id = azion_workload.example.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true + + strategy = { + type = "default" + attributes = { + application = var.application_id + } + } + } } ``` +Both blocks read the IDs of the certificate and the application from the `certificate_id` and `application_id` variables. Each v1.x argument has a v2.0 place. The domain moves to `workload.domains`, the certificate to `workload.tls.certificate`, and `is_active` to `workload.active`. `workload_domain_allow_access = true` keeps the domain that Azion assigns to the workload reachable, as `cname_access_only = false` did. The application that v1.x set in `edge_application` moves to the deployment, in `deployment.strategy.attributes.application`. + ### Replace an origin with a connector In v1.x, an origin belonged to an application and took its `edge_application_id`. In v2.0, a connector is an independent resource. For every argument of `azion_connector`, refer to [Connectors resources](/en/documentation/devtools/terraform/connectors/). The v1.x configuration: +{/* terraform-validate: skip */} ```hcl # Origin (v1.x) resource "azion_edge_application_origin" "example" { @@ -284,30 +339,40 @@ The v2.0 configuration: ```hcl # Connector (v2.0) resource "azion_connector" "example" { - name = "my-connector" - - # Connector configuration - # Refer to the Terraform Registry documentation for the complete options - - # Example configuration - origin = { - address = "origin.example.com" - protocol = "https" - path = "/api" + connector = { + name = "my-connector" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + https_port = 443 + } + } + ] + + connection_options = { + host = "origin.example.com" + path_prefix = "/api" + transport_policy = "force_https" + } + } } - - # Connection settings - connection_timeout = 30 - read_timeout = 60 } ``` +An `http` connector lists its origin servers in `http_attributes.addresses`. The v1.x `host_header`, `origin_path`, and `origin_protocol` move to `http_attributes.connection_options` as `host`, `path_prefix`, and `transport_policy`. The v1.x timeouts have no argument at that level: in v2.0, `connection_timeout` and `read_write_timeout` belong to the load balancer module, in `http_attributes.modules.load_balancer.config`. Because a connector takes no application ID, an application sends requests to it through a Rules Engine rule with the `set_connector` behavior, as [Migrate a complete configuration](#migrate-a-complete-configuration) shows. + ### Rename a function resource -The function resource keeps its arguments in v2.0: `name`, `active`, `code`, and `json_args`. Only the resource type changes, from `azion_edge_function` to `azion_function`. +The function resource changes its type, from `azion_edge_function` to `azion_function`, and the shape of its arguments. In v2.0, they sit in a `function` block: `name`, `code`, `active`, `default_args`, `execution_environment`, and `runtime`. The v1.x `json_args` argument has no v2.0 counterpart under that name: pass the same `jsonencode()` value in `default_args`. The v1.x configuration: +{/* terraform-validate: skip */} ```hcl # Function (v1.x) resource "azion_edge_function" "example" { @@ -327,23 +392,35 @@ The v2.0 configuration: ```hcl # Function (v2.0) resource "azion_function" "example" { - name = "my-function" - active = true - code = file("${path.module}/function.js") - - # Function arguments - json_args = jsonencode({ - key = "value" - }) + function = { + name = "my-function" + active = true + code = trimspace(<<-EOT + addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello from my-function")); + }); + EOT + ) + execution_environment = "application" + runtime = "azion_js" + + # Function arguments + default_args = jsonencode({ + key = "value" + }) + } } ``` +The sample keeps the code inline. To read it from a file in the module, as the v1.x block does, set `code = trimspace(file("${path.module}/function.js"))`. The provider recommends wrapping `code` in `trimspace()`. + ### Migrate a complete configuration -A configuration with an application, an origin, a domain, and a function changes in four places: the application main setting takes its v2.0 name, a connector replaces the origin, a workload and a deployment replace the domain, and the function takes its v2.0 type. For the application resources, refer to [Applications resources](/en/documentation/devtools/terraform/applications/). +A configuration with an application, an origin, a domain, and a function changes in five places: the application main setting takes its v2.0 name, a connector replaces the origin, a Rules Engine rule routes the application's requests to the connector, a workload and a deployment replace the domain, and the function takes its v2.0 type. For the application resources, refer to [Applications resources](/en/documentation/devtools/terraform/applications/). The v1.x configuration: +{/* terraform-validate: skip */} ```hcl terraform { required_providers { @@ -393,42 +470,116 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } +variable "api_token" { + type = string + sensitive = true +} + provider "azion" { api_token = var.api_token } # Application resource "azion_application_main_setting" "app" { - name = "my-application" + application = { + name = "my-application" + } } # Connector (replaces origin) resource "azion_connector" "connector" { - name = "my-connector" - # Connector configuration + connector = { + name = "my-connector" + type = "http" + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + } + } + ] + } + } +} + +# Rule that routes the application's requests to the connector +resource "azion_application_rule_engine" "route_to_connector" { + application_id = azion_application_main_setting.app.application.application_id + results = { + name = "Route to my-connector" + phase = "request" + behaviors = [ + { + behavior = { + type = "set_connector" + attributes = { + value = azion_connector.connector.connector.id + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } } # Workload (replaces domain) resource "azion_workload" "workload" { - name = "my-workload" + workload = { + name = "my-workload" + active = true + domains = ["example.com"] + } } -# Workload deployment +# Workload deployment (binds the application to the workload) resource "azion_workload_deployment" "deployment" { - workload_id = azion_workload.workload.id - # Deployment configuration + workload_id = azion_workload.workload.workload.id + deployment = { + name = "my-deployment" + active = true + current = true + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.app.application.application_id + } + } + } } # Function (renamed) resource "azion_function" "func" { - name = "my-function" - active = true - code = file("${path.module}/function.js") + function = { + name = "my-function" + active = true + code = trimspace(<<-EOT + addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello from my-function")); + }); + EOT + ) + execution_environment = "application" + runtime = "azion_js" + } } ``` @@ -438,7 +589,7 @@ resource "azion_function" "func" { The resources you removed from the state still exist on your Azion account. Import each one under its v2.0 resource type with `terraform import . `. -To import the workload, connector, and function: +To import the workload, connector, function, and WAF rule set: ```bash # Import workloads @@ -449,6 +600,9 @@ terraform import azion_connector.example # Import functions terraform import azion_function.example + +# Import WAF rule sets +terraform import azion_waf.example ``` Replace each ID with the API v4 ID of the resource. An API v3 resource can have a different ID in API v4, so look the IDs up in [Azion Console](https://console.azion.com/). The state lists the imported resources under their v2.0 types. @@ -477,7 +631,7 @@ To apply the changes, run the command in a test environment first: terraform apply ``` -Terraform manages the resources through provider 2.0.0 and Azion API v4. For errors during the migration, refer to [Troubleshoot the Terraform Provider](/en/documentation/devtools/terraform/troubleshooting/). +Terraform manages the resources through provider 2.10.0 and Azion API v4. For errors during the migration, refer to [Troubleshoot the Terraform Provider](/en/documentation/devtools/terraform/troubleshooting/). --- diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/how-it-works.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/how-it-works.mdx index 5ff67b9162..2ec3577293 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/how-it-works.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/how-it-works.mdx @@ -40,7 +40,7 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -81,24 +81,44 @@ Terraform changes your account in a cycle of three commands, each with its own j - `terraform plan` shows the changes that `terraform apply` would make, without making them. - `terraform apply` makes the changes through the provider, after you type `yes` at its prompt. -Terraform reads the order of the changes from the configuration itself. A reference to another resource, such as `azion_workload.example.id`, makes one resource depend on the other, so Terraform creates the workload before the deployment that uses its ID: +Terraform reads the order of the changes from the configuration itself. A reference to another resource, such as `azion_workload.example.workload.id`, makes one resource depend on the other, so Terraform creates the workload before the deployment that uses its ID. In this block, the deployment takes the ID of an existing application from the `application_id` variable: ```hcl resource "azion_workload" "example" { - name = "my-workload" + workload = { + name = "my-workload" + } } resource "azion_workload_deployment" "example" { - workload_id = azion_workload.example.id - - # Deployment configuration + workload_id = azion_workload.example.workload.id + + deployment = { + name = "my-deployment" + strategy = { + type = "default" + attributes = { + application = var.application_id + } + } + } } ``` -The `depends_on` argument declares a dependency by name instead. A hardcoded ID, such as `application_id = "12345"`, carries no dependency at all, so references are the safer choice. +The `depends_on` argument declares a dependency by name instead. A hardcoded ID, such as `workload_id = 12345`, carries no dependency at all, so references are the safer choice. Splitting plan from apply costs one extra step and buys a review before anything changes. For example, a pipeline can run `terraform plan` on every change and run `terraform apply -auto-approve` only on the `main` branch. To run the cycle for the first time, refer to [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/). +### Configuration is the desired state + +Most Azion resources keep their arguments in one nested block, such as `workload = { ... }` or `cache_setting = { ... }`, and the provider treats that block as the desired state of the object. Each resource enforces its own set of fields, and the provider sends that set on every `terraform apply`. Three things follow: + +- **An omitted enforced field is reset**: leaving an enforced field out of the block does not mean "keep whatever is there". It means "use the default", and the apply resets the field to it. For example, `azion_firewall_main_setting` sends the complete firewall, so a block without `modules.waf.enabled = true` turns WAF off. To keep a non-default value, declare it. +- **An omitted field that the resource does not enforce keeps its value**: `azion_workload`, for example, sends `domains`, `active`, and `tls.certificate` only when the block declares them. Without them, the apply keeps the values that the API holds. +- **Changes outside Terraform are reverted on enforced and declared fields**: a setting changed in [Azion Console](https://console.azion.com/) or through the API shows up as drift in the next `terraform plan`, and the next apply changes it back to the configuration. + +Terraform detects drift only when it refreshes the state, so `terraform plan -refresh=false` does not show it. Which fields a resource enforces, and their defaults, are listed on the resource's page in the [Terraform Registry](https://registry.terraform.io/providers/aziontech/azion/latest/docs). + --- ## Resource and data source names @@ -109,7 +129,7 @@ Data source names follow a pattern. The plural name lists objects, and the singu The singular name is often a resource and a data source at once. `azion_workload` is both, so the block keyword decides whether Terraform manages the object or only reads it. A configuration that reads every workload declares `data "azion_workloads" "all" {}`. -The application main settings break the pattern. The resource is `azion_application_main_setting`, and the data source that queries main settings is `azion_application_main_settings`, with a plural spelling. Check each name on its reference page, such as [Applications resources](/en/documentation/devtools/terraform/applications/), before you use it. +Some names break the pattern. The resource for application main settings is `azion_application_main_setting`, but the data source that reads one application is `azion_application_main_settings`, with a plural spelling, and the one that lists applications is `azion_applications_main_settings`. For firewall function instances, `azion_firewall_functions_instance` lists them and `azion_firewall_function_instance` reads one. Check each name on its reference page, such as [Applications resources](/en/documentation/devtools/terraform/applications/), before you use it. A data source lets a configuration use an object it does not own, such as a workload that another configuration manages. The cost is that Terraform cannot change that object. To manage it, you import it into the state as a resource. diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/applications.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/applications.mdx index cc0257dc78..8812672808 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/applications.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/applications.mdx @@ -15,7 +15,7 @@ import DocItem from '@aziontech/webkit/doc-item' -An application carries the content delivery logic of the Azion Platform: its [cache settings](/en/documentation/platform/applications/cache/cache-settings/), the [Rules Engine](/en/documentation/platform/applications/rules-engine/) rules that process each request, its [device groups](/en/documentation/platform/applications/device-groups/), and the [function instances](/en/documentation/platform/applications/functions-instances/) it runs. The Azion Terraform Provider manages [Applications](/en/documentation/platform/applications/) with five resources and reads them with nine data sources. To move a v1.x configuration to these resources, refer to [Migrate from provider v1.x to v2.0](/en/documentation/devtools/terraform/terraform-migration-v3-to-v4/). +An application carries the content delivery logic of the Azion Platform: its [cache settings](/en/documentation/platform/applications/cache/cache-settings/), the [Rules Engine](/en/documentation/platform/applications/rules-engine/) rules that process each request, its [device groups](/en/documentation/platform/applications/device-groups/), and the [function instances](/en/documentation/platform/applications/functions-instances/) it runs. The Azion Terraform Provider manages [Applications](/en/documentation/platform/applications/) with six resources and reads them with ten data sources. To move a v1.x configuration to these resources, refer to [Migrate from provider v1.x to v2.0](/en/documentation/devtools/terraform/terraform-migration-v3-to-v4/). --- @@ -27,9 +27,20 @@ An application carries the content delivery logic of the Azion Platform: its [ca | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_cache_setting) | Creates and manages a cache setting. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_device_group) | Creates and manages a device group. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine) | Creates and manages a Rules Engine rule. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Creates and manages a function instance in an application. | +| [`azion_application_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine_order) | Sets the order of the Rules Engine rules of one phase. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Creates and manages a function instance in an application. | -`azion_application_main_setting` requires `name`, a string that holds the name of the application. A cache setting, a Rules Engine rule, and a function instance belong to one application, so each of their resources takes the ID of that application in `application_id`. Cache settings and rules also take a `name`, and a rule takes the `phase` it runs in. `azion_application_functions_instance` takes `function_id`, the ID of a function that the `azion_function` resource manages. The Terraform Registry page of each resource lists every argument. +These resources take their settings in one nested attribute: + +| Resource | Nested attribute | Fields | +| --- | --- | --- | +| `azion_application_main_setting` | `application` | Requires `name`. The optional `modules` turns on the `cache`, `functions`, `application_accelerator`, and `image_processor` modules. | +| `azion_application_cache_setting` | `cache_setting` | Requires `name`. The optional `browser_cache` and `modules` hold the cache policy. | +| `azion_application_device_group` | `device_group` | Requires `name` and `user_agent`, the regular expression that matches the devices of the group. | +| `azion_application_rule_engine` | `results` | Requires `name`, `phase` (`request` or `response`), `criteria`, and `behaviors`. | +| `azion_application_function_instance` | `data` | Requires `name` and `function_id`, the ID of a function that the `azion_function` resource manages. | + +After apply, `application.application_id` holds the numeric ID of the application. A cache setting, a device group, a Rules Engine rule, and a function instance belong to one application, so each of their resources takes that ID in `application_id`, outside the nested attribute. `azion_application_rule_engine_order` takes `application_id`, the `phase`, and `order`, the list of rule IDs in the order they run. A module that `modules` omits returns to its default on every apply. The Terraform Registry page of each resource lists every argument. --- @@ -37,28 +48,29 @@ An application carries the content delivery logic of the Azion Platform: its [ca | Data source | Description | | --- | --- | -| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Queries the main settings of applications. | +| [`azion_applications_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/applications_main_settings) | Lists the main settings of applications. | +| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Reads the main settings of one application. | | [`azion_application_cache_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_settings) | Lists cache settings. | | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_setting) | Reads one cache setting. | | [`azion_application_device_groups`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_groups) | Lists device groups. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_group) | Reads one device group. | | [`azion_application_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rules_engine) | Lists Rules Engine rules. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rule_engine) | Reads one Rules Engine rule. | -| [`azion_application_functions_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lists function instances. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Reads one function instance. | +| [`azion_application_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lists function instances. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_function_instance) | Reads one function instance. | --- ## Example -This configuration pins the provider to version 2.0.0, creates an application, adds a cache setting and a Rules Engine rule in the `request` phase, instantiates a function in the application, and outputs the ID of the application. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. The function instance reads `function_id` from an `azion_function` resource named `my_function`, which this configuration does not declare. To look up that resource, refer to [Resources and data sources](/en/documentation/devtools/terraform/examples/#functions). +This configuration pins provider 2.10.0 and creates an application with the cache and functions modules on. It adds a cache setting and a Rules Engine rule in the `request` phase that bypasses the cache for paths under `/api/`. It also creates a function, instantiates it in the application, and outputs the ID of the application. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. For more on the `azion_function` resource, refer to [Resources and data sources](/en/documentation/devtools/terraform/examples/#functions). ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -69,39 +81,111 @@ provider "azion" { # Create main application resource "azion_application_main_setting" "my_app" { - name = "my-application" + application = { + name = "my-application" + active = true + + modules = { + cache = { + enabled = true + } + functions = { + enabled = true + } + } + } } # Configure cache resource "azion_application_cache_setting" "my_cache" { - application_id = azion_application_main_setting.my_app.id - name = "static-cache" + application_id = azion_application_main_setting.my_app.application.application_id + + cache_setting = { + name = "static-cache" + + browser_cache = { + behavior = "override" + max_age = 3600 + } - # Cache configuration + modules = { + cache = { + behavior = "override" + max_age = 86400 + } + } + } } # Create rule in Rules Engine resource "azion_application_rule_engine" "my_rule" { - application_id = azion_application_main_setting.my_app.id - name = "redirect-rule" - phase = "request" + application_id = azion_application_main_setting.my_app.application.application_id + + results = { + name = "bypass-cache-api" + phase = "request" + active = true + + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/api/" + } + } + ] + } + ] + + behaviors = [ + { + behavior = { + type = "bypass_cache" + } + } + ] + } +} - # Criteria and behaviors +# Create a function +resource "azion_function" "my_function" { + function = { + name = "my-function" + active = true + runtime = "azion_js" + execution_environment = "application" + default_args = jsonencode({}) + code = trimspace(<<-EOT + addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello from Azion")); + }); + EOT + ) + } } -# Instantiate a function -resource "azion_application_functions_instance" "my_function" { - application_id = azion_application_main_setting.my_app.id - function_id = azion_function.my_function.id +# Instantiate the function in the application +resource "azion_application_function_instance" "my_function" { + application_id = azion_application_main_setting.my_app.application.application_id - # Instance configuration + data = { + name = "my-function-instance" + function_id = azion_function.my_function.function.id + active = true + } } output "application_id" { - value = azion_application_main_setting.my_app.id + value = azion_application_main_setting.my_app.application.application_id } ``` +The criterion writes the `${uri}` variable as `$${uri}`. With a single `$`, Terraform reads it as an interpolation and fails. + --- ## Related resources diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/certificates.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/certificates.mdx index ed99eea2a8..e2d24d945c 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/certificates.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/certificates.mdx @@ -15,7 +15,7 @@ import DocItem from '@aziontech/webkit/doc-item' -A digital certificate is the SSL/TLS certificate and private key pair that lets an application answer over HTTPS. The Azion Terraform Provider manages the certificates of [Certificate Manager](/en/documentation/platform/workloads/certificate-manager/certificates/) with one resource and reads them with two data sources. +A digital certificate is the SSL/TLS certificate and private key pair that lets an application answer over HTTPS. The Azion Terraform Provider manages the certificates of [Certificate Manager](/en/documentation/platform/workloads/certificate-manager/certificates/) with four resources and reads them with four data sources. Besides uploading a certificate that you already have, the provider can request a Let's Encrypt certificate, create a certificate signing request (CSR), and upload a certificate revocation list (CRL) for mTLS. --- @@ -23,9 +23,14 @@ A digital certificate is the SSL/TLS certificate and private key pair that lets | Resource | Description | | --- | --- | -| [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/digital_certificate) | Creates and manages a digital certificate. | +| [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/digital_certificate) | Creates and manages a digital certificate from a certificate and private key that you upload. | +| [`azion_certificate_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_request) | Requests a Let's Encrypt certificate. | +| [`azion_certificate_signing_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_signing_request) | Creates a certificate signing request (CSR). | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/crl) | Creates and manages a certificate revocation list (CRL). | -`azion_digital_certificate` requires three string arguments: `name`, the name of the certificate; `certificate`, the SSL/TLS certificate in PEM format; and `private_key`, the private key in PEM format. It exports `id`, a string that holds the unique ID of the certificate. The Terraform Registry page of the resource lists every argument. +`azion_digital_certificate` takes its settings in one nested attribute, `results`, which requires three string arguments: `name`, the name of the certificate; `certificate_content`, the SSL/TLS certificate in PEM format; and `private_key`, the private key in PEM format. The provider treats `certificate_content` and `private_key` as sensitive. After apply, `results.id` holds the numeric ID of the certificate. + +`azion_certificate_request` also takes `results`, with `name`, `common_name`, `authority` (`lets_encrypt`), and `challenge` (`dns` or `http`). The provider can only create a certificate request: it has no update operation for it. `azion_certificate_signing_request` takes the subject fields of the CSR in `results`, and a change to any of them recreates the CSR. `azion_crl` takes `crl`, with `name`, `issuer`, and the `crl` content. The Terraform Registry page of each resource lists every argument. --- @@ -35,19 +40,22 @@ A digital certificate is the SSL/TLS certificate and private key pair that lets | --- | --- | | [`azion_digital_certificates`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificates) | Lists digital certificates. | | [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificate) | Reads one digital certificate. | +| [`azion_crls`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crls) | Lists certificate revocation lists. | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crl) | Reads one certificate revocation list. | --- ## Example -This configuration pins the provider, creates a certificate from a certificate file and a private key file in the `certificates` folder of the module, reads the existing certificates, and outputs the ID of the certificate. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. +This configuration pins provider 2.10.0, creates a certificate from a certificate file and a private key file in the `certificates` folder of the module, reads the existing certificates, and outputs the ID of the certificate. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. +{/* terraform-validate: skip — file() needs the PEM files on disk; the next sample validates the same resource with variables */} ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -58,16 +66,18 @@ provider "azion" { # Create digital certificate resource "azion_digital_certificate" "my_cert" { - name = "certificate-mydomain" - certificate = file("${path.module}/certificates/mydomain.pem") - private_key = file("${path.module}/certificates/mydomain-key.pem") + results = { + name = "certificate-mydomain" + certificate_content = file("${path.module}/certificates/mydomain.pem") + private_key = file("${path.module}/certificates/mydomain-key.pem") + } } # Query existing certificates data "azion_digital_certificates" "all" {} output "certificate_id" { - value = azion_digital_certificate.my_cert.id + value = azion_digital_certificate.my_cert.results.id } ``` @@ -87,9 +97,11 @@ variable "ssl_private_key" { } resource "azion_digital_certificate" "my_cert" { - name = "my-certificate" - certificate = var.ssl_certificate - private_key = var.ssl_private_key + results = { + name = "my-certificate" + certificate_content = var.ssl_certificate + private_key = var.ssl_private_key + } } ``` @@ -103,7 +115,7 @@ A shorter form, with `cert.pem` and `key.pem` at the root of the module, is on [ The resources that manage applications, their cache settings, rules, device groups, and function instances. The resources that manage DNS zones, their records, and their DNSSEC settings. - The resources that manage firewalls, WAF rule sets, and network lists. + The resources that manage firewalls, WAF rule sets and their exceptions, and network lists. The changes to make when a configuration still uses provider v1.x and API v3. diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/connectors.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/connectors.mdx index f8ffb0d345..32e9881947 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/connectors.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/connectors.mdx @@ -25,7 +25,12 @@ A connector sets how your applications communicate with the origins that hold yo | --- | --- | | [`azion_connector`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/connector) | Creates and manages a connector. | -`azion_connector` requires `name`, a string that holds the unique name of the connector, and exports `id`, a string that holds the unique ID of the connector. The Terraform Registry page of the resource lists every argument. +`azion_connector` takes its settings in one nested attribute, `connector`. It requires `name`, a string that holds the unique name of the connector, and `type`, which is `http` or `storage`: + +- An `http` connector requires `http_attributes.addresses`, a list of origin addresses. Each entry takes an `endpoint` with the `address` of the origin and the optional `http_port`, `https_port`, and `active`. `http_attributes` also takes the optional `connection_options` and the `load_balancer` and `origin_shield` modules. +- A `storage` connector requires `storage_attributes.bucket`, the name of the bucket that holds the content, and takes an optional `prefix`. + +After apply, `connector.id` holds the numeric ID of the connector. The Terraform Registry page of the resource lists every argument. --- @@ -40,14 +45,14 @@ A connector sets how your applications communicate with the origins that hold yo ## Example -This configuration pins the provider, creates a connector, reads the existing connectors, and outputs the ID of the connector. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. +This configuration pins provider 2.10.0, creates an HTTP connector to the `origin.example.com` origin on ports 80 and 443, reads the existing connectors, and outputs the ID of the connector. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -56,18 +61,32 @@ provider "azion" { api_token = var.api_token } -# Create a connector +# Create an HTTP connector resource "azion_connector" "my_origin" { - name = "my-origin" - - # Origin configuration + connector = { + name = "my-origin" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + http_port = 80 + https_port = 443 + } + } + ] + } + } } # Query existing connectors data "azion_connectors" "all" {} output "connector_id" { - value = azion_connector.my_origin.id + value = azion_connector.my_origin.connector.id } ``` diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/security.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/security.mdx index 405ffda4ce..7d523be788 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/security.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/security.mdx @@ -2,7 +2,7 @@ title: Security resources description: >- Azion Terraform Provider resources and data sources that manage firewalls, - their rules and function instances, WAFs, and network lists. + their rules and function instances, WAF rule sets, and network lists. meta_tags: 'terraform, firewall, WAF, security, network lists, infrastructure as code, api v4' namespace: documentation_terraform_resources_security permalink: /documentation/devtools/terraform/security/ @@ -15,7 +15,7 @@ import DocItem from '@aziontech/webkit/doc-item' -The security resources of the Azion Terraform Provider configure what stops a request before it reaches your application: protection against threats, geolocation blocking, and rate limiting. The provider manages a [Firewall](/en/documentation/platform/firewall/) and its rules and function instances, Web Application Firewall (WAF) settings and [rule sets](/en/documentation/platform/firewall/waf/rules-set/), and [Network Lists](/en/documentation/platform/firewall/network-shield/network-lists/) with six resources. Twelve data sources read the same objects back, one that lists them and one that reads a single object per resource type. +The security resources of the Azion Terraform Provider configure what stops a request before it reaches your application: protection against threats, geolocation blocking, and rate limiting. The provider manages a [Firewall](/en/documentation/platform/firewall/) and its rules, rule order, and function instances, Web Application Firewall (WAF) [rule sets](/en/documentation/platform/firewall/waf/rules-set/) and their [exceptions](/en/documentation/platform/firewall/waf/custom-allowed-rules/), and [Network Lists](/en/documentation/platform/firewall/network-shield/network-lists/) with seven resources. Twelve data sources read the same objects back: for each object type except the rule order, one lists the objects and one reads a single object. --- @@ -25,12 +25,24 @@ The security resources of the Azion Terraform Provider configure what stops a re | --- | --- | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_main_setting) | Creates and manages the main settings of a firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine) | Creates and manages a Rules Engine rule of a firewall. | +| [`azion_firewall_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine_order) | Sets the order of the Rules Engine rules of a firewall. | | [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_functions_instance) | Creates and manages a function instance in a firewall. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Creates and manages a WAF. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Creates and manages a WAF rule set. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Creates and manages a WAF rule set, which Azion Console lists under **WAF Rules**. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Creates and manages a [WAF exception](/en/documentation/platform/firewall/waf/custom-allowed-rules/), which Azion Console lists as an allowed rule, in one rule set. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/network_list) | Creates and manages a network list of IP addresses and CIDR ranges, countries, or ASNs. | -`azion_firewall_main_setting` requires `name`, a string that holds the name of the firewall, and accepts `active`, a boolean that sets whether the firewall is active. `azion_network_list` requires `name`, a string that holds the name of the list, and `list_type`, a string that takes `ip_cidr`, `countries`, or `asns`. `azion_waf_rule_set` takes a `name`. The Terraform Registry page of each resource lists every argument. +These resources take their settings in one nested attribute: + +| Resource | Nested attribute | Fields | +| --- | --- | --- | +| `azion_firewall_main_setting` | `data` | Requires `name`. The optional `active` sets whether the firewall is active, and `modules` turns on the `waf`, `network_protection`, and `functions` modules. | +| `azion_firewall_rule_engine` | `results` | Requires `name`, `criteria`, and `behaviors`, such as `deny`, `drop`, `set_waf`, or `set_rate_limit`. | +| `azion_firewall_functions_instance` | `data` | Requires `name` and `function`, the ID of a function that the `azion_function` resource manages. | +| `azion_waf` | `result` | Requires `name`. The optional `engine_settings` holds the threat families and their sensitivity. | +| `azion_waf_rule_set` | `result` | Requires `name` and `conditions`, the parts of the request that the exception exempts. The optional `rule_id` is the internal rule it exempts, and `0` exempts all of them. | +| `azion_network_list` | `results` | Requires `name`, `type` (`ip_cidr`, `countries`, or `asn`), and `items`, the IP addresses and CIDR ranges, country codes, or ASNs of the list. | + +The rule, rule order, and function instance resources take the ID of their firewall in `firewall_id`, and `azion_waf_rule_set` takes the ID of its rule set in `waf_id`, outside the nested attribute. After apply, `data.id` holds the numeric ID of a firewall and `result.id` the numeric ID of a WAF rule set. A rule set scores requests only when the firewall has the `waf` module on and a firewall rule runs the `set_waf` behavior with the rule set ID and a mode of `logging` or `blocking`. A firewall runs on a workload through the `firewall` attribute of a deployment strategy; for more information, refer to [Workloads resources](/en/documentation/devtools/terraform/workloads/). A module that `modules` omits returns to its default on every apply. The Terraform Registry page of each resource lists every argument. --- @@ -40,14 +52,14 @@ The security resources of the Azion Terraform Provider configure what stops a re | --- | --- | | [`azion_firewall_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_settings) | Lists firewalls. | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_setting) | Reads one firewall. | -| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lists the Rules Engine rules of firewalls. | +| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lists the Rules Engine rules of a firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rule_engine) | Reads one Rules Engine rule of a firewall. | -| [`azion_firewall_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lists the function instances of firewalls. | -| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Reads one function instance of a firewall. | -| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lists WAFs. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Reads one WAF. | -| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lists WAF rule sets. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Reads one WAF rule set. | +| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lists the function instances of a firewall. | +| [`azion_firewall_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_function_instance) | Reads one function instance of a firewall. | +| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lists WAF rule sets. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Reads one WAF rule set. | +| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lists the exceptions of a WAF rule set. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Reads one WAF exception. | | [`azion_network_lists`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_lists) | Lists network lists. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_list) | Reads one network list. | @@ -55,14 +67,14 @@ The security resources of the Azion Terraform Provider configure what stops a re ## Example -This configuration pins the provider, creates a network list of IP ranges, an active firewall, and a WAF rule set, and outputs the ID of the firewall. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. +This configuration pins provider 2.10.0 and creates a network list of blocked IP ranges and an active firewall with the WAF and network protection modules on. It creates a WAF rule set with an exception for the `/health` path, adds a firewall rule that denies requests from the network list, and adds a rule that runs the rule set in `blocking` mode on every request. It outputs the ID of the firewall. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -73,30 +85,137 @@ provider "azion" { # Create network list for blocked IPs resource "azion_network_list" "blocked_ips" { - name = "blocked-ips" - list_type = "ip_cidr" + results = { + name = "blocked-ips" + type = "ip_cidr" + items = ["192.0.2.0/24", "198.51.100.10"] + } } # Create firewall resource "azion_firewall_main_setting" "my_firewall" { - name = "my-firewall" - active = true + data = { + name = "my-firewall" + active = true + + modules = { + waf = { + enabled = true + } + network_protection = { + enabled = true + } + } + } +} + +# Create a WAF rule set +resource "azion_waf" "my_waf" { + result = { + name = "my-waf" + active = true + } +} - # Link to workload/application +# Create WAF exception for the health check path +resource "azion_waf_rule_set" "health_check" { + waf_id = azion_waf.my_waf.result.id + + result = { + name = "allow-health-check" + active = true + path = "/health" + operator = "contains" + rule_id = 0 + + conditions = [ + { + condition = { + match = "any_url" + condition_type = "generic" + } + } + ] + } } -# Create WAF rule set -resource "azion_waf_rule_set" "my_waf" { - name = "my-waf" +# Deny requests from the network list +resource "azion_firewall_rule_engine" "deny_blocked_ips" { + firewall_id = azion_firewall_main_setting.my_firewall.data.id + + results = { + name = "deny-blocked-ips" + active = true + + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${network}" + operator = "is_in_list" + conditional = "if" + argument = azion_network_list.blocked_ips.id + } + } + ] + } + ] + + behaviors = [ + { + behavior = { + type = "deny" + } + } + ] + } +} - # WAF configuration +# Run the WAF on every request +resource "azion_firewall_rule_engine" "run_waf" { + firewall_id = azion_firewall_main_setting.my_firewall.data.id + + results = { + name = "run-waf" + active = true + + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${request_uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + + behaviors = [ + { + behavior = { + type = "set_waf" + attributes = { + waf_id = azion_waf.my_waf.result.id + mode = "blocking" + } + } + } + ] + } } output "firewall_id" { - value = azion_firewall_main_setting.my_firewall.id + value = azion_firewall_main_setting.my_firewall.data.id } ``` +The criteria write the `${network}` and `${request_uri}` variables as `$${network}` and `$${request_uri}`. With a single `$`, Terraform reads them as interpolations and fails. For `is_in_list`, the `argument` is the ID of the network list. + --- ## Related resources @@ -107,5 +226,6 @@ output "firewall_id" { Every resource and data source of the provider, with an example per family. The resources that manage applications, their cache settings, rules, device groups, and function instances. The resource names and arguments that changed between provider v1.x and v2.0. + The resources that deploy an application and a firewall on a workload. diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/workloads.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/workloads.mdx index 9edb1e72d5..19c8e95c1b 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/workloads.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/resources/workloads.mdx @@ -26,7 +26,9 @@ A workload is the object that receives traffic for a set of domains and holds th | [`azion_workload`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload) | Creates and manages a workload. | | [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload_deployment) | Creates and manages a deployment of a workload. | -`azion_workload` requires `name`, a string that holds the unique name of the workload, and exports `id`, a string that holds the unique ID of the workload. `azion_workload_deployment` requires `workload_id`, a string that holds the ID of the workload it deploys. The Terraform Registry page of each resource lists every argument. +Each resource takes its settings in one nested attribute. `azion_workload` takes `workload`, which requires `name`, a string that holds the unique name of the workload. The same attribute holds the optional `domains`, `active`, `tls`, `protocols`, and `mtls` settings. After apply, `workload.id` holds the numeric ID of the workload. + +`azion_workload_deployment` requires `workload_id`, the numeric ID of the workload it deploys, and `deployment`, which requires a `name` and a `strategy`. The strategy takes `type = "default"` and, in `attributes`, the numeric ID of the application that answers in `application`, with the optional `firewall` and `custom_page` IDs. The deployment is the only place that binds an application to a workload: `azion_workload` takes no application ID. The Terraform Registry page of each resource lists every argument. --- @@ -43,14 +45,14 @@ A workload is the object that receives traffic for a set of domains and holds th ## Example -This configuration pins the provider, creates a workload and one deployment of it, reads the existing workloads, and outputs the ID of the workload. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. +This configuration pins provider 2.10.0, creates an application, creates a workload for the `www.example.com` domain, and deploys the application on the workload. It also reads the existing workloads and outputs the ID of the workload. It reads your personal token from the `api_token` variable that the [Azion Terraform Provider quickstart](/en/documentation/devtools/terraform/getting-started/) declares. ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -59,23 +61,46 @@ provider "azion" { api_token = var.api_token } +# Create the application that answers on the workload +resource "azion_application_main_setting" "my_app" { + application = { + name = "my-application" + active = true + } +} + # Create a workload -resource "azion_workload" "my_app" { - name = "my-application" +resource "azion_workload" "my_workload" { + workload = { + name = "my-workload" + active = true + domains = ["www.example.com"] + } } -# Create a deployment for the workload -resource "azion_workload_deployment" "my_app_deployment" { - workload_id = azion_workload.my_app.id +# Deploy the application on the workload +resource "azion_workload_deployment" "my_deployment" { + workload_id = azion_workload.my_workload.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true - # Additional deployment configuration + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.my_app.application.application_id + } + } + } } # Query existing workloads data "azion_workloads" "all" {} output "workload_id" { - value = azion_workload.my_app.id + value = azion_workload.my_workload.workload.id } ``` diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/terraform.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/terraform.mdx index 084802f2ef..7908876156 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/terraform.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/terraform.mdx @@ -26,14 +26,14 @@ Version 2.0 of the provider works only with Azion API v4. If your account uses A ## Provider configuration -A Terraform project for Azion declares the provider once and then one block per resource. This configuration pins provider version 2.0.0 and declares a workload: +A Terraform project for Azion declares the provider once and then one block per resource. This configuration pins provider version 2.10.0 and declares a workload: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -45,13 +45,16 @@ provider "azion" { # Create a workload resource "azion_workload" "my_workload" { - name = "my-first-workload" + workload = { + name = "my-first-workload" + active = true + } } ``` - The `required_providers` block names the Registry source, `aziontech/azion`, and a fixed provider version. `terraform init` installs that version. - The `provider "azion"` block configures the provider. It stays empty when your personal token is in the `AZION_API_TOKEN` environment variable; otherwise the `api_token` argument passes the token. -- Each `resource` block declares one object of your account. Its type, such as `azion_workload`, names the kind of object, and its label, such as `my_workload`, names it inside the configuration. +- Each `resource` block declares one object of your account. Its type, such as `azion_workload`, names the kind of object, and its label, such as `my_workload`, names it inside the configuration. Most resource types take their arguments in one nested block, such as `workload = { ... }`. The blocks follow the standard Terraform language, so a configuration written for another provider has the same shape. Only the `azion_*` types change. diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/terraformV3.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/terraformV3.mdx index fd137dfa6d..7874212734 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/terraformV3.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/terraformV3.mdx @@ -3,7 +3,7 @@ title: Azion Terraform Provider v1.x (API v3) description: >- Legacy documentation for Azion Terraform Provider v1.x, compatible with Azion API v3. For new projects, use Terraform Provider v2.0 with API v4. -meta_tags: 'edge, javascript' +meta_tags: 'terraform, terraform provider, provider v1.x, infrastructure as code, azion, api v3' namespace: documentation_terraform_provider_v3 permalink: /documentation/devtools/terraform/terraform-provider-v3/ --- @@ -40,37 +40,56 @@ See the [Migration Guide](/en/documentation/devtools/terraform/terraform-migrati ## First steps -In your `.tf` file, you must set the **Azion Terraform Provider** as the provider and set its version as well, such as: +In your `.tf` file, you must set the **Azion Terraform Provider** as the provider and set its version as well, inside the `terraform` block, such as: -```json - required_providers { - source = "aziontech/azion" - version = "1.x.y" // it depends on the version you're willing to use. +{/* terraform-validate: skip */} +```hcl +terraform { + required_providers { + azion = { + source = "aziontech/azion" + version = "1.41.0" # The last v1.x release. Pin the v1.x version you use. } + } +} ``` -With the provider configured, it is recommended to configure a [personal token](/en/documentation/fundamentals/personal-tokens/): +With the provider configured, it is recommended to configure a [personal token](/en/documentation/fundamentals/personal-tokens/). The `provider "azion"` block reads it from a variable, so the token stays out of the file: -```json - provider "azion" { - api_token = "token" // Here you place your personal token - } +{/* terraform-validate: skip */} +```hcl +provider "azion" { + api_token = var.api_token +} ``` -> **Note**: if the personal token is not provided as presented above, a prompt will ask you to inform it when you try to run any Terraform command. +:::note +If the `api_token` variable has no value, for example from `TF_VAR_api_token` or a `.tfvars` file, a prompt asks you for it when you run a Terraform command. +::: After these steps, you are ready to get started managing your infrastructure using the Azion Terraform Provider. Here is how your `.tf` should look like at this point: -```json - required_providers { - source = "aziontech/azion" - version = "1.x.y" // it depends on the version you're willing to use. - } - provider "azion" { - api_token = "token" // Here you place your personal token - } +{/* terraform-validate: skip */} +```hcl +terraform { + required_providers { + azion = { + source = "aziontech/azion" + version = "1.41.0" # The last v1.x release. Pin the v1.x version you use. + } + } +} + +variable "api_token" { + type = string + sensitive = true +} + +provider "azion" { + api_token = var.api_token +} ``` --- diff --git a/apps/docs/src/content/docs/en/pages/devtools/terraform/troubleshooting.mdx b/apps/docs/src/content/docs/en/pages/devtools/terraform/troubleshooting.mdx index e2cbf34907..f108cc3b15 100644 --- a/apps/docs/src/content/docs/en/pages/devtools/terraform/troubleshooting.mdx +++ b/apps/docs/src/content/docs/en/pages/devtools/terraform/troubleshooting.mdx @@ -71,17 +71,17 @@ Could not retrieve the list of available versions for provider aziontech/azion Terraform looks the provider up by the source and the version in the `required_providers` block. The source of the Azion Terraform Provider is `aziontech/azion`. -- **Check the source and the version**: set `source` to `aziontech/azion` and `version` to the provider version that you use, such as `2.0.0`. +- **Check the source and the version**: set `source` to `aziontech/azion` and `version` to the provider version that you use, such as `2.10.0`. - **Upgrade the installed provider**: `terraform init -upgrade` downloads the version that the block sets. For the full upgrade to v2.0, refer to [Upgrade the provider to v2.0](/en/documentation/devtools/terraform/terraform-migration-v3-to-v4/#upgrade-the-provider-to-v20). -This `required_providers` block sets the source and pins provider version `2.0.0`: +This `required_providers` block sets the source and pins provider version `2.10.0`: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -93,7 +93,7 @@ To download the provider version that the block sets, run this command in the pr terraform init -upgrade ``` -Terraform installs the provider version that the block sets, such as `2.0.0`, in the project. +Terraform installs the provider version that the block sets, such as `2.10.0`, in the project. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/answer-questions-from-a-vector-table.mdx b/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/answer-questions-from-a-vector-table.mdx index 38fc049e54..156cc6e6fa 100644 --- a/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/answer-questions-from-a-vector-table.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/answer-questions-from-a-vector-table.mdx @@ -156,7 +156,9 @@ The single entry in `data` carries `results`, whose one row holds the same numbe The [Build and run customer support AI assistants](/en/documentation/use-cases/build-and-run-ai-workloads/build-and-run-customer-support-ai-assistants/) use case uses the values of this example. -These checks confirm the [Build and run customer support AI assistants](/en/documentation/use-cases/build-and-run-ai-workloads/build-and-run-customer-support-ai-assistants/) use case. +In the [Build and run customer support AI assistants](/en/documentation/use-cases/build-and-run-ai-workloads/build-and-run-customer-support-ai-assistants/) use case, expect: + +- **The document is stored as passages.** The ingestion of `returns-policy.md` answers with the number of passages it stored, and a count of the document's rows with an embedding returns the same number. --- @@ -285,7 +287,9 @@ Ask a question no document covers, such as `What is the capital of France?`. The The function answers from the passages of the table, and only from them. -These checks confirm the [Build and run customer support AI assistants](/en/documentation/use-cases/build-and-run-ai-workloads/build-and-run-customer-support-ai-assistants/) use case. +In the [Build and run customer support AI assistants](/en/documentation/use-cases/build-and-run-ai-workloads/build-and-run-customer-support-ai-assistants/) use case, expect: + +- **Answers cite the documents, and only them.** A question that `returns-policy.md` answers returns an `answer` with at least one `[n]` citation and `sources` that name the document. A question no document covers returns an answer with no citation. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/pause-an-agent-for-approval-with-kv-store.mdx b/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/pause-an-agent-for-approval-with-kv-store.mdx index 4fe9ed9085..eb4d6d4dfe 100644 --- a/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/pause-an-agent-for-approval-with-kv-store.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/agents-and-rag/pause-an-agent-for-approval-with-kv-store.mdx @@ -268,7 +268,10 @@ To read the events of the refund task, send the statement `SELECT event, steps F The agent pauses before the refund, runs it once after the approval, and records each event in `task_events`. -These checks confirm the [Build AI agents](/en/documentation/use-cases/build-and-run-ai-workloads/build-ai-agents/) use case. +In the [Build AI agents](/en/documentation/use-cases/build-and-run-ai-workloads/build-ai-agents/) use case, expect: + +- **The agent pauses before the refund.** A refund task answers `"status":"awaiting_approval"` with an `action` that names `refund_order`, and the order service receives no refund. +- **The approval runs the refund once.** The approval answers `"status":"completed"`, the same approval sent again answers `404`, and `task_events` lists `started`, `awaiting_approval`, `approved`, and `completed`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/automation/route-an-api-path-to-a-backend.mdx b/apps/docs/src/content/docs/en/pages/guides/automation/route-an-api-path-to-a-backend.mdx index 2906f4431b..292ba359b1 100644 --- a/apps/docs/src/content/docs/en/pages/guides/automation/route-an-api-path-to-a-backend.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/automation/route-an-api-path-to-a-backend.mdx @@ -139,7 +139,9 @@ curl -s -D - https:///api/health The response is the backend's own answer for `/api/health`. When it is not, the rule may still be propagating, or another rule ran first. To see which rules ran on the request, turn on [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules). -These checks confirm the [Deploy frontend applications](/en/documentation/use-cases/build-and-run-applications/deploy-frontend-applications/) use case. +In the [Deploy frontend applications](/en/documentation/use-cases/build-and-run-applications/deploy-frontend-applications/) use case, expect: + +- **API paths reach the backend.** A request for `/api/health` returns the backend's own answer. --- @@ -153,7 +155,9 @@ curl -s https:///orders/42 The body is the same entry HTML that `/` returns. The router in the browser then renders the route. -These checks confirm the [Deploy frontend applications](/en/documentation/use-cases/build-and-run-applications/deploy-frontend-applications/) use case. +In the [Deploy frontend applications](/en/documentation/use-cases/build-and-run-applications/deploy-frontend-applications/) use case, expect: + +- **Client-side routes still load the interface.** A request for a route the interface handles, such as `/orders/42`, returns the same entry HTML as `/`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/availability/route-requests-by-country-or-continent.mdx b/apps/docs/src/content/docs/en/pages/guides/availability/route-requests-by-country-or-continent.mdx index 3c5bd90d1e..de3c91d75d 100644 --- a/apps/docs/src/content/docs/en/pages/guides/availability/route-requests-by-country-or-continent.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/availability/route-requests-by-country-or-continent.mdx @@ -85,7 +85,7 @@ The criterion names the location to match. Rules Engine reads it from the client | One country | `${geoip_country_code}`, the two-letter country code | _is equal_, `is_equal` | A code such as `RU`, for Russia | | A list of countries | `${geoip_country_code}` | _matches_, `matches` | A regular expression of country codes, such as `^(BR\|AR)$` | -A continent code is geography, not a jurisdiction. When a rule must follow the countries a law or a contract names, match the country list. The `${geoip_city_*}` variables read a different geolocation base, `geoip_city`. For every geolocation variable, refer to [Variables](/en/documentation/platform/applications/rules-engine/#variables). +A continent code is geography, not a jurisdiction. When a rule must follow the countries a law or a contract names, match the country list. For every geolocation variable, refer to [Variables](/en/documentation/platform/applications/rules-engine/#variables). The procedures match the continent `NA`. For a country list, change the criterion to the one in the table. @@ -317,7 +317,9 @@ Every response carries `x-origin-region: us`. Under HTTP/2, header names arrive To compare the location Azion read with the origin that answered, access [Azion Console](https://console.azion.com/) > **Real-Time Events**, select the _HTTP Requests_ data source, and enter `host='www.example.com'` in **Filter by**. Each record of your requests carries **Geoloc Country Name** and **Upstream Addr**, the address of the origin that answered. For the filter syntax, refer to [Filter events](/en/documentation/guides/platform/observability/add-filters-events/). -These checks confirm the [Route users to regional origins](/en/documentation/use-cases/improve-performance-and-reliability/route-users-to-regional-origins/) use case. +In the [Route users to regional origins](/en/documentation/use-cases/improve-performance-and-reliability/route-users-to-regional-origins/) use case, expect: + +- **Each region reaches its own origin.** A request from outside Europe carries `x-origin-region: us`, and the same request from Europe carries `x-origin-region: eu`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/availability/shift-traffic-between-two-origins-by-weight.mdx b/apps/docs/src/content/docs/en/pages/guides/availability/shift-traffic-between-two-origins-by-weight.mdx index a5cb5b20bb..c046f4ce01 100644 --- a/apps/docs/src/content/docs/en/pages/guides/availability/shift-traffic-between-two-origins-by-weight.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/availability/shift-traffic-between-two-origins-by-weight.mdx @@ -481,7 +481,10 @@ Each step is judged on what each origin received and how it answered. The checks A step that seems to have no effect may still be propagating. Repeat the check after a few minutes before you change the weights again. -These checks confirm the [Migrate an application to a new origin without downtime](/en/documentation/use-cases/build-and-run-applications/migrate-an-application-to-a-new-origin-without-downtime/) use case. +In the [Migrate an application to a new origin without downtime](/en/documentation/use-cases/build-and-run-applications/migrate-an-application-to-a-new-origin-without-downtime/) use case, expect: + +- **The new origin takes its share without new errors.** The requests grouped by upstream address track the share of the weights, and Real-Time Events lists no `502` from the new origin. +- **A rollback takes effect.** After a rollback, the records of requests to the new origin stop once every data center holds the change. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/availability/show-your-own-page-when-no-origin-answers.mdx b/apps/docs/src/content/docs/en/pages/guides/availability/show-your-own-page-when-no-origin-answers.mdx index 96e510b44d..2710f16f5d 100644 --- a/apps/docs/src/content/docs/en/pages/guides/availability/show-your-own-page-when-no-origin-answers.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/availability/show-your-own-page-when-no-origin-answers.mdx @@ -238,7 +238,9 @@ To confirm the page: The response carries status `503`, from the page's **Response Custom Status Code**, and the body of `/errors/503.html`, not the page titled `Azion - Default error page`. It carries no `Location` header, so the client is not redirected. If the default page still arrives after the deployment change has spread, refer to [Troubleshoot Workloads](/en/documentation/platform/workloads/troubleshooting/#custom-pages). -These checks confirm the [Keep an application online when an origin fails](/en/documentation/use-cases/improve-performance-and-reliability/keep-an-application-online-when-an-origin-fails/) use case. +In the [Keep an application online when an origin fails](/en/documentation/use-cases/improve-performance-and-reliability/keep-an-application-online-when-an-origin-fails/) use case, expect: + +- **Visitors get your page when no origin answers.** With every origin stopped, a request to your domain answers `503` with the body of `/errors/503.html`, not `Azion - Default error page`, and with no `Location` header. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/aws-to-azion/aws-to-azion-comprehensive-guide.mdx b/apps/docs/src/content/docs/en/pages/guides/aws-to-azion/aws-to-azion-comprehensive-guide.mdx index 7ce73d3b3a..4c407cb936 100644 --- a/apps/docs/src/content/docs/en/pages/guides/aws-to-azion/aws-to-azion-comprehensive-guide.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/aws-to-azion/aws-to-azion-comprehensive-guide.mdx @@ -894,7 +894,7 @@ To recreate an origin and its behavior in Azion Console: For _HTTP_, enter the host of the origin in **Address**, without a protocol or a port. In **Host**, enter the name the origin answers for. - + Go to **Applications**, select the application, and select the **Rules Engine** tab. diff --git a/apps/docs/src/content/docs/en/pages/guides/bots-and-network/restrict-an-origin-to-azion-with-origin-ip-acl.mdx b/apps/docs/src/content/docs/en/pages/guides/bots-and-network/restrict-an-origin-to-azion-with-origin-ip-acl.mdx index 96594b36a2..545ef46670 100644 --- a/apps/docs/src/content/docs/en/pages/guides/bots-and-network/restrict-an-origin-to-azion-with-origin-ip-acl.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/bots-and-network/restrict-an-origin-to-azion-with-origin-ip-acl.mdx @@ -182,9 +182,13 @@ To confirm the restriction: The origin's firewall refuses the direct connection or lets it time out, while requests through `www.example.com` keep answering. Your origin accepts connections from Azion only. -These checks confirm the [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case. +In the [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case, expect: -These checks confirm the [Protect web applications from OWASP Top 10 and zero-day attacks](/en/documentation/use-cases/secure-applications-and-networks/protect-web-applications-from-owasp-top-10-and-zero-day-attacks/) use case. +- **Traffic reaches the origin through Azion only.** Requests through `www.example.com` keep answering, and a direct connection to the origin's address is refused or times out. + +In the [Protect web applications from OWASP Top 10 and zero-day attacks](/en/documentation/use-cases/secure-applications-and-networks/protect-web-applications-from-owasp-top-10-and-zero-day-attacks/) use case, expect: + +- **No request reaches the origin around Azion.** A direct connection to the origin's address is refused or times out, while requests through `www.example.com` keep answering. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/bots-and-network/run-bot-manager-on-selected-paths.mdx b/apps/docs/src/content/docs/en/pages/guides/bots-and-network/run-bot-manager-on-selected-paths.mdx index 6bd9de8aff..47b6ef8285 100644 --- a/apps/docs/src/content/docs/en/pages/guides/bots-and-network/run-bot-manager-on-selected-paths.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/bots-and-network/run-bot-manager-on-selected-paths.mdx @@ -557,8 +557,6 @@ A report line appears for `/login`, and none for `/`. When a request's score rea The [Block account takeover on login and checkout flows](/en/documentation/use-cases/secure-applications-and-networks/block-account-takeover-on-login-and-checkout-flows/) use case uses the values of this example. -These checks confirm the [Block account takeover on login and checkout flows](/en/documentation/use-cases/secure-applications-and-networks/block-account-takeover-on-login-and-checkout-flows/) use case. - In the [Block account takeover on login and checkout flows](/en/documentation/use-cases/secure-applications-and-networks/block-account-takeover-on-login-and-checkout-flows/) use case, expect: - **A person passes the challenge.** Open `https://www.example.com/login` in a browser, from a client the instance flags, and solve the challenge. The login page loads, and later requests pass without a new challenge. diff --git a/apps/docs/src/content/docs/en/pages/guides/connectors/sign-origin-requests-with-hmac.mdx b/apps/docs/src/content/docs/en/pages/guides/connectors/sign-origin-requests-with-hmac.mdx index 60e2aa3196..1369e86beb 100644 --- a/apps/docs/src/content/docs/en/pages/guides/connectors/sign-origin-requests-with-hmac.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/connectors/sign-origin-requests-with-hmac.mdx @@ -137,7 +137,7 @@ To create the connector in Azion Console: In **Access Key** and **Secret Key**, enter the credentials that can read the bucket. - + The connector exists in your account and signs each request it sends to the endpoint. diff --git a/apps/docs/src/content/docs/en/pages/guides/data-streaming/debug-functions-dts.mdx b/apps/docs/src/content/docs/en/pages/guides/data-streaming/debug-functions-dts.mdx index a2054594b5..53e2bb9563 100644 --- a/apps/docs/src/content/docs/en/pages/guides/data-streaming/debug-functions-dts.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/data-streaming/debug-functions-dts.mdx @@ -264,7 +264,9 @@ In the [Govern access to multiple AI models](/en/documentation/use-cases/build-a - **Every call is logged.** Your analytics platform receives a `model_call` line for each request sent to the gateway, with `"team":"checkout-team"`. To read the lines of one request, open the **Functions Console** data source in [Real-Time Events](/en/documentation/platform/real-time-events/quickstart/), where the `ID` variable groups the lines of a single request. -These checks confirm the [Screen file uploads for malicious content](/en/documentation/use-cases/secure-applications-and-networks/screen-file-uploads-for-malicious-content/) use case. +In the [Screen file uploads for malicious content](/en/documentation/use-cases/secure-applications-and-networks/screen-file-uploads-for-malicious-content/) use case, expect: + +- **Each upload verdict reaches the SIEM.** After the upload of the test file, the SIEM receives a warning line whose `logMessage` reads `[AI] true`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/data/deduplicate-webhook-deliveries-with-kv-store.mdx b/apps/docs/src/content/docs/en/pages/guides/data/deduplicate-webhook-deliveries-with-kv-store.mdx index b72b39524d..ea58150ec2 100644 --- a/apps/docs/src/content/docs/en/pages/guides/data/deduplicate-webhook-deliveries-with-kv-store.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/data/deduplicate-webhook-deliveries-with-kv-store.mdx @@ -200,7 +200,9 @@ The handler answers `{ "received": true }`, and the Stripe Dashboard lists the d The [Build event-driven APIs](/en/documentation/use-cases/build-and-run-applications/build-event-driven-apis/) use case uses the values of this example. -These checks confirm the [Build event-driven APIs](/en/documentation/use-cases/build-and-run-applications/build-event-driven-apis/) use case. +In the [Build event-driven APIs](/en/documentation/use-cases/build-and-run-applications/build-event-driven-apis/) use case, expect: + +- **The route queues each event.** A test event sent with `stripe trigger payment_intent.succeeded` answers `{ "received": true }`, and `azion logs cells --tail` prints no `QStash answered` line. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/data/read-and-write-sql-database-from-a-nextjs-app.mdx b/apps/docs/src/content/docs/en/pages/guides/data/read-and-write-sql-database-from-a-nextjs-app.mdx index 54dbb884b7..78f2fc730b 100644 --- a/apps/docs/src/content/docs/en/pages/guides/data/read-and-write-sql-database-from-a-nextjs-app.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/data/read-and-write-sql-database-from-a-nextjs-app.mdx @@ -175,7 +175,10 @@ Each check requests the application on its domain. A location that does not have The page reads the table through a read replica, and the route handler writes to it through the Azion API. -These checks confirm the [Deploy full-stack applications globally](/en/documentation/use-cases/build-and-run-applications/deploy-full-stack-applications-globally/) use case. +In the [Deploy full-stack applications globally](/en/documentation/use-cases/build-and-run-applications/deploy-full-stack-applications-globally/) use case, expect: + +- **The app writes to the database and shows the write.** A `POST` to `/api/projects` answers `201` with the ID the database assigned, and the home page then lists both projects. +- **A push deploys.** After a push to the default branch propagates, the home page carries the new `

` text. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/data/serve-a-rest-api-from-a-function-backed-by-sql-database.mdx b/apps/docs/src/content/docs/en/pages/guides/data/serve-a-rest-api-from-a-function-backed-by-sql-database.mdx index 873912c171..e61f4af084 100644 --- a/apps/docs/src/content/docs/en/pages/guides/data/serve-a-rest-api-from-a-function-backed-by-sql-database.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/data/serve-a-rest-api-from-a-function-backed-by-sql-database.mdx @@ -221,7 +221,10 @@ Each check calls the API on its domain. A first deploy that does not answer yet The API reads, writes, and deletes tasks, and serves the list from its cached copy between writes. -These checks confirm the [Build REST and GraphQL APIs](/en/documentation/use-cases/build-and-run-applications/build-rest-and-graphql-apis/) use case. +In the [Build REST and GraphQL APIs](/en/documentation/use-cases/build-and-run-applications/build-rest-and-graphql-apis/) use case, expect: + +- **The API writes to the database.** A `POST` to `/api/tasks` answers `201` with the ID the database assigned, and a second `DELETE` of the same task answers `404`. +- **The list comes from the cache between writes.** A repeated list request within 60 seconds carries the same `x-tasks-cached-at` value, and a write changes it. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cache-post-options.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cache-post-options.mdx index a8f30a4b9b..b7a7435f19 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cache-post-options.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cache-post-options.mdx @@ -14,7 +14,7 @@ import DocStep from '@aziontech/webkit/doc-step' [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) unlocks the caching of `POST` and `OPTIONS` responses, beyond the `GET` and `HEAD` requests an application caches natively. You select the methods in a cache setting from Azion Console, then apply that cache setting with [Rules Engine](/en/documentation/platform/applications/rules-engine/). -A cached `POST` object does not share a [cache key](/en/documentation/platform/applications/cache/cache-keys/) with the `GET` response for the same path. Azion prefixes the method to the key of any request other than `GET` or `HEAD`. For a cached `POST` or `OPTIONS` object, the key also appends `@@` and the MD5 hash of the request body. An `OPTIONS` request to `https://static.yourdomain.com/page` is stored under the key `optionshttpsstatic.yourdomain.com/page`. A `POST` to a dynamic path is stored under `httpsdynamic.yourdomain.com/path@@md5_of_post_arguments`. +A cached `POST` object does not share a [cache key](/en/documentation/platform/applications/cache/cache-keys/) with the `GET` response for the same path. Azion prefixes the method to the key of any request other than `GET` or `HEAD`. For a cached `POST` object, the key also appends `@@` and the MD5 hash of the request body. An `OPTIONS` key carries the method prefix only, with no `@@` and no hash, even when the request carries a body: an `OPTIONS` request to `https://static.yourdomain.com/page` is stored under the key `optionshttpsstatic.yourdomain.com/page`. A `POST` to a dynamic path is stored under `posthttpsdynamic.yourdomain.com/path@@md5_of_post_body`. A `POST` body that varies per request therefore produces one cached object per request. For what a variation costs, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/). @@ -116,7 +116,7 @@ Requests whose URI starts with `/api/search` carry the cache setting. Azion stor Before a cache setting selects **POST**, a `POST` request logs no cache status: the `X-Cache` header carries `-`, because the content is restricted from caching. To read the header on a request, refer to [Verify cache indicators with ModHeader](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). ::: -A cached `POST` or `OPTIONS` object expires with a cache key purge that lists each variation, or with a wildcard purge ending in `@@*`. For the purge types, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). +A cached `POST` object expires with a cache key purge that lists each variation, or with a wildcard purge ending in `@@*`. For the purge types, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-content-that-varies). --- diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-configure-cache-policies.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-configure-cache-policies.mdx index fc1f077eed..38c2376911 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-configure-cache-policies.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-configure-cache-policies.mdx @@ -207,7 +207,9 @@ The response carries `x-cache: BYPASS`. For how to read the header, refer to [Ch The [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case uses the values of this example. -These checks confirm the [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case. +In the [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case, expect: + +- **API responses are not cached.** A request for `/api/status` with the `Pragma: azion-debug-cache` header carries `x-cache: BYPASS`. --- @@ -255,9 +257,9 @@ The forwarded header can carry session cookies. To stop a user from receiving th In **Name**, enter a name that identifies the setting. For example: `/target-uri - Private cookies`. - + - Under **Application Accelerator**, open **Cache vary by Cookies** and set **Behavior** to _Denylist_. + Under **Application Accelerator**, open **Cache vary by Cookies** and set **Behavior** to _Allowlist_. @@ -268,7 +270,7 @@ The forwarded header can carry session cookies. To stop a user from receiving th -The cache setting appears in the **Cache Settings** tab, and it keeps the listed cookies out of the cache key. +The cache setting appears in the **Cache Settings** tab, and it puts the listed cookies in the cache key, so each session gets its own cached copy of the response. To apply that cache setting to the rule that forwards the cookies: @@ -397,7 +399,7 @@ The [Build e-commerce storefronts](/en/documentation/use-cases/build-and-run-app ## Bypass the cache for several paths and a session cookie -One rule can send every per-visitor request to the origin. The rule in this section matches the cart, checkout, and account paths, and any request that carries the session cookie, so a visitor with a session bypasses the cache on every path. It carries **Forward Cookies** as well, so the session cookie the origin sets reaches the visitor. Nothing this rule matches is cached, so the denylist cache setting of [Forward cookies from the origin to the user](#forward-cookies-from-the-origin-to-the-user) is not needed here. The example uses `/cart`, `/checkout`, `/account`, and `session_id`. Replace each one with your own. +One rule can send every per-visitor request to the origin. The rule in this section matches the cart, checkout, and account paths, and any request that carries the session cookie, so a visitor with a session bypasses the cache on every path. It carries **Forward Cookies** as well, so the session cookie the origin sets reaches the visitor. Nothing this rule matches is cached, so the allowlist cache setting of [Forward cookies from the origin to the user](#forward-cookies-from-the-origin-to-the-user) is not needed here. The example uses `/cart`, `/checkout`, `/account`, and `session_id`. Replace each one with your own. @@ -482,7 +484,9 @@ The second catalog request carries `x-cache: HIT`. The cart and the request with The [Build e-commerce storefronts](/en/documentation/use-cases/build-and-run-applications/build-e-commerce-storefronts/) use case uses the values of this example. -These checks confirm the [Build e-commerce storefronts](/en/documentation/use-cases/build-and-run-applications/build-e-commerce-storefronts/) use case. +In the [Build e-commerce storefronts](/en/documentation/use-cases/build-and-run-applications/build-e-commerce-storefronts/) use case, expect: + +- **Catalog pages are cached, and personal pages are not.** The second request for a catalog page carries `x-cache: HIT`. The cart, and a catalog page requested with the session cookie, carry `x-cache: BYPASS`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cors/check-cors-permissions.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cors/check-cors-permissions.mdx index d9e7ceaf5a..4023fa4669 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cors/check-cors-permissions.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-cors/check-cors-permissions.mdx @@ -164,7 +164,7 @@ http://app.example.com http://example.org ``` -A rule that allows specific origins requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/#module-activation) on the application. +A rule that allows specific origins requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/#application-accelerator-switch) on the application. To turn on Application Accelerator in Azion Console: diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-purge-on-publish.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-purge-on-publish.mdx index 71615ce484..a4cf46b295 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-purge-on-publish.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-application/ea-purge-on-publish.mdx @@ -229,7 +229,7 @@ The API answers with HTTP `201`, and without `layer` it purges `cache`: -Every size and format of the changed images leaves the cache. When the publishing system knows the exact variants it serves, a cache key purge that lists each key does the same work without counting against the wildcard bound. A key carries the processing arguments after `?` and the format after `@@`, as in `httpswww.example.com/media/blue-shirt.jpg?ims=400x@@webp`. For the format, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). +Every size and format of the changed images leaves the cache. When the publishing system knows the exact variants it serves, a cache key purge that lists each key does the same work without counting against the wildcard bound. With `ims` in the query-string allowlist of the cache setting, a key carries `@@`, then the processing arguments and the format at the end, as in `httpswww.example.com/media/blue-shirt.jpg@@?ims=400xwebp`. For the format, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). :::caution URL and wildcard purges clear the Cache layer only. On an application whose cache setting has [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) on, purge the Tiered Cache layer first with a cache key purge, then the Cache layer, so the cache is not refilled from a stale copy. For the steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/#choose-the-purge-type). @@ -290,7 +290,9 @@ In the [Build and run marketing websites](/en/documentation/use-cases/build-and- - **A push reaches the page.** Change the text of the `/about/` page, commit, and push. Wait for the deploy to complete, send the wildcard purge, and request the page again. The response carries `x-cache: MISS` and the new text, and the request after it carries `HIT`. -These checks confirm the [Build e-commerce storefronts](/en/documentation/use-cases/build-and-run-applications/build-e-commerce-storefronts/) use case. +In the [Build e-commerce storefronts](/en/documentation/use-cases/build-and-run-applications/build-e-commerce-storefronts/) use case, expect: + +- **A purged product page serves the new version.** After the purge appears in the history, a request for `/products/blue-shirt` carries `x-cache: MISS` and the version the origin published, and the request after it carries `HIT`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-firewall/ai-inference-upload-scanning.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-firewall/ai-inference-upload-scanning.mdx index ab5ae54797..45cb126f8e 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-firewall/ai-inference-upload-scanning.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-firewall/ai-inference-upload-scanning.mdx @@ -269,7 +269,9 @@ curl -s -o /dev/null -w '%{http_code}\n' -X POST --data-binary @test-malicious.p The first command prints the status your application answers for an upload. When the model answers `true`, the second prints `403`, and the `functionConsoleEvents` dataset of Real-Time Events holds a warning line that reads `[AI] true`. A request to a route outside `/upload` writes no line from the function. -These checks confirm the [Screen file uploads for malicious content](/en/documentation/use-cases/secure-applications-and-networks/screen-file-uploads-for-malicious-content/) use case. +In the [Screen file uploads for malicious content](/en/documentation/use-cases/secure-applications-and-networks/screen-file-uploads-for-malicious-content/) use case, expect: + +- **A malicious upload never reaches the application.** When the model answers `true`, the upload of the test file answers `403`, and `functionConsoleEvents` holds a warning line that reads `[AI] true`. A safe document gets your application's usual status. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-sql/retrieve-data/index.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-sql/retrieve-data/index.mdx index d9472ec894..819c988f36 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-sql/retrieve-data/index.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-sql/retrieve-data/index.mdx @@ -249,7 +249,9 @@ The body holds the rows of the `stores` table: The [Modernize a monolithic application without a rewrite](/en/documentation/use-cases/build-and-run-applications/modernize-a-monolithic-application-without-a-rewrite/) use case uses the values of this example. -These checks confirm the [Modernize a monolithic application without a rewrite](/en/documentation/use-cases/build-and-run-applications/modernize-a-monolithic-application-without-a-rewrite/) use case. +In the [Modernize a monolithic application without a rewrite](/en/documentation/use-cases/build-and-run-applications/modernize-a-monolithic-application-without-a-rewrite/) use case, expect: + +- **The migrated route answers from SQL Database.** A request for `/api/stores` returns the rows of the `stores` table as a JSON array. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-sql/vector-search-guide.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-sql/vector-search-guide.mdx index 90a137cbdc..f18e072012 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-sql/vector-search-guide.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-sql/vector-search-guide.mdx @@ -15,31 +15,32 @@ import DocStep from '@aziontech/webkit/doc-step' In this tutorial, you will build a semantic search that returns the documents closest in meaning to a question, over data stored in [SQL Database](/en/documentation/platform/sql-database/). You will create a database, add a table with a vector column and an index over it, generate embeddings with OpenAI, store them, and query the table by similarity. -The artifact is a TypeScript function that runs on an Azion application. It reaches the database through the [Azion SQL library](/en/documentation/devtools/azion-lib/sql/) and produces its embeddings with the LangChain OpenAI package. +The work is split in two. A setup script runs once from your machine: it creates the database, waits until the database accepts statements, and stores the embeddings. A function then answers each request with a search over those rows. Both reach the database through the [Azion SQL library](/en/documentation/devtools/azion-lib/sql/) and produce embeddings with the LangChain OpenAI package. The function runs locally with `azion dev`. --- ## Prerequisites -- Node.js installed. The application and the `azion` library run on it. -- The Azion CLI installed. For more information, refer to [Azion CLI](/en/documentation/devtools/cli/). +- Node.js version 20.6 or higher. The setup script reads its credentials with `node --env-file`, which earlier versions do not have. +- The Azion CLI installed and authorized. For more information, refer to [Azion CLI](/en/documentation/devtools/cli/). +- A function project created with `azion init`, with the _Javascript_ preset and the _Hello World_ template. To create one, refer to [Deploy a function with Azion CLI](/en/documentation/guides/application-development/functions-and-runtime/deploy-function-with-cli/). The steps below run in the project folder. - An Azion personal token. For more information, refer to [How to manage a personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/). - SQL Database enabled on the account. The product is in Preview, and access is requested through the technical support team. To request it, refer to [Technical Support](/en/documentation/support/). - An OpenAI API key. The embedding step calls the OpenAI API with it. To create one, refer to [Create and export an API key](https://developers.openai.com/api/docs/quickstart#create-and-export-an-api-key). --- -## 1. Create the database +## 1. Set up the project -The database is the container the table lives in, and `createDatabase` creates it from the application code. To set the project up and create it: +The setup script and the function share the same dependencies and credentials. To prepare the project: - In the application directory, install the `azion` library and the LangChain OpenAI package: + In the project folder, install the Azion SQL library and the LangChain OpenAI package: ```bash - npm install azion @langchain/openai + npm install @aziontech/sql @langchain/openai ``` Both packages are listed under the project dependencies. @@ -47,115 +48,158 @@ The database is the container the table lives in, and `createDatabase` creates i - In the `.env` file, add the personal token and the OpenAI API key: + In the `.env` file of the project folder, add the personal token and the OpenAI API key: ```bash AZION_TOKEN=[TOKEN VALUE] OPENAI_API_KEY=[OPENAI API KEY] ``` - `AZION_TOKEN` authenticates the library, and `OPENAI_API_KEY` authenticates the embedding calls. + `AZION_TOKEN` authenticates the library, and `OPENAI_API_KEY` authenticates the embedding calls. Never commit the `.env` file to your code repository. - + + +The project holds both packages and the two credentials the next stages read. + +--- + +## 2. Create the database and wait until it is ready - In `main.ts`, import what the function uses and create the database. `createDatabase` answers with `data` and `error`, and a failure carries its message in `error`: +`createDatabase` returns while the database is still being provisioned: its `status` reads `creating` and changes to `created` about 15 seconds later. A statement sent before that fails, so the script polls `getDatabase` until the status reads `created`. A database name is unique within the account, and `createDatabase` on a name the account already holds fails with error `14001` `Name Already In Use.`. The script reads the database first and creates it only when it is missing, so a second run reuses the database instead of failing. - ```typescript - import { createDatabase, useExecute, useQuery } from 'azion/sql' - import { OpenAIEmbeddings } from '@langchain/openai' +Create a file named `setup.mjs` in the project folder and start it with the database step: - export default async function vectorSearch() { - const { error: createError } = await createDatabase('vectorDatabase', { debug: true }) +```javascript +import { createDatabase, getDatabase, useExecute, useQuery } from '@aziontech/sql' +import { OpenAIEmbeddings } from '@langchain/openai' - if (createError) { - return Response.json({ error: createError.message }, { status: 500 }) +const DATABASE = 'vectorDatabase' + +async function ensureDatabase() { + let { data: database } = await getDatabase(DATABASE) + + if (!database) { + const { error } = await createDatabase(DATABASE) + // 14001 Name Already In Use: another run created it between the two calls. + // Read it again, and stop only when it still does not exist. + if (error) { + ;({ data: database } = await getDatabase(DATABASE)) + if (!database) throw new Error(`createDatabase failed: ${error.message}`) } - ``` + } - - + for (let attempt = 1; attempt <= 20; attempt++) { + const { data, error } = await getDatabase(DATABASE) + if (error) throw new Error(`getDatabase failed: ${error.message}`) + if (data?.status === 'created') return + console.log(`Database status is ${data?.status}, waiting...`) + await new Promise((resolve) => setTimeout(resolve, 3000)) + } + + throw new Error('The database did not reach the created status in 60 seconds') +} +``` -The account holds a database named `vectorDatabase`. Provisioning is asynchronous: the status reads `creating` first and reads `created` about 15 seconds later, and a statement runs against the database only after the status reads `created`. +`getDatabase` returns an empty object for a name that matches no database, so `database` is `undefined` until the database exists. The loop checks the status every 3 seconds and gives up after 20 attempts. --- -## 2. Create the table and the vector index +## 3. Create the table and the vector index The table holds the text of each document and its embedding. A vector lives in a column of its own, declared with a blob type that carries its dimension count: `F32_BLOB(1536)` stores 1,536 32-bit floating-point elements, which is the number of dimensions the `text-embedding-3-small` model returns. The index makes a search consult an approximate-nearest-neighbor structure instead of every row. It is built over `libsql_vector_idx(embedding, 'metric=cosine')`, and the table it covers needs a `ROWID` or a single-column primary key, which `id INTEGER PRIMARY KEY AUTOINCREMENT` provides. -Continue in `main.ts`, and run both statements with `useExecute`, which carries the statements that create and write: +Continue in `setup.mjs`. Both statements carry `IF NOT EXISTS`, so a second run leaves the table and the index as they are. Run them with `useExecute`, which carries the statements that create and write: -```typescript - const setupStatements = [ - `CREATE TABLE documents ( +```javascript +async function ensureTable() { + const { error } = await useExecute(DATABASE, [ + `CREATE TABLE IF NOT EXISTS documents ( id INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT NOT NULL, embedding F32_BLOB(1536) );`, - `CREATE INDEX documents_idx ON documents ( + `CREATE INDEX IF NOT EXISTS documents_idx ON documents ( libsql_vector_idx(embedding, 'metric=cosine') );` - ] + ]) - const { error: setupError } = await useExecute('vectorDatabase', setupStatements) - - if (setupError) { - return Response.json({ error: setupError.message }, { status: 500 }) - } + if (error) throw new Error(`Table setup failed: ${error.message}`) +} ``` The database holds a `documents` table and a `documents_idx` index. Creating a vector index also adds a shadow table named `documents_idx_shadow`, which `getTables` and the EdgeSQL Shell both list beside the table. --- -## 3. Generate and store the embeddings - -The embedding model turns text into a vector. `text-embedding-3-small` returns 1,536 dimensions, the number the `embedding` column declares, and the same model produces the vectors stored here and the vector the search uses in stage 4. - -Continue in `main.ts`. Build the model, embed each document with `embedQuery`, and wrap the result in `vector('[...]')`, which converts an array of numbers into the type the column stores: +## 4. Generate and store the embeddings + +The embedding model turns text into a vector. `text-embedding-3-small` returns 1,536 dimensions, the number the `embedding` column declares, and the same model produces the vectors stored here and the vector the search uses in stage 5. + +Continue in `setup.mjs`. `seedDocuments` counts the rows first and stores the documents only when the table is empty, so a second run does not duplicate them. It embeds each document with `embedQuery` and wraps the result in `vector('[...]')`, which converts an array of numbers into the type the column stores: + +```javascript +const documents = [ + 'Paris is the capital of France', + 'The Eiffel Tower is a French landmark', + 'London is the capital of England', + 'Big Ben is located in London', + 'Canberra is the capital of Australia', + 'The Great Barrier Reef is in Australia', + 'French cuisine is world-famous', + 'Tea is popular in England', + 'The English Channel separates Britain and France' +] + +async function seedDocuments() { + const { data: count, error: countError } = await useQuery(DATABASE, [ + 'SELECT COUNT(*) AS total FROM documents;' + ]) + if (countError) throw new Error(`Count failed: ${countError.message}`) + + if (count.results[0].rows[0][0] > 0) { + console.log('The documents table already holds rows, skipping the insert') + return + } -```typescript const embeddings = new OpenAIEmbeddings({ model: 'text-embedding-3-small', - verbose: false, apiKey: process.env.OPENAI_API_KEY }) - const documents = [ - 'Paris is the capital of France', - 'The Eiffel Tower is a French landmark', - 'London is the capital of England', - 'Big Ben is located in London', - 'Canberra is the capital of Australia', - 'The Great Barrier Reef is in Australia', - 'French cuisine is world-famous', - 'Tea is popular in England', - 'The English Channel separates Britain and France' - ] - const insertStatements = [] for (const doc of documents) { const embedding = await embeddings.embedQuery(doc) + // The body carries SQL text, so double every single quote inside a value. + const content = doc.replaceAll("'", "''") insertStatements.push( - `INSERT INTO documents (content, embedding) VALUES ('${doc}', vector('[${embedding}]'));` + `INSERT INTO documents (content, embedding) VALUES ('${content}', vector('[${embedding}]'));` ) } - const { error: insertError } = await useExecute('vectorDatabase', insertStatements, { debug: true }) + const { error } = await useExecute(DATABASE, insertStatements) + if (error) throw new Error(`Insert failed: ${error.message}`) +} - if (insertError) { - return Response.json({ error: insertError.message }, { status: 500 }) - } +await ensureDatabase() +await ensureTable() +await seedDocuments() +console.log('Setup complete') ``` -The `documents` table holds one row per entry in the list, each with its text and its embedding, and the index covers those rows. `vector('[...]')` rejects a vector of more than 65,536 dimensions. +Run the script from the project folder: + +```bash +node --env-file=.env setup.mjs +``` + +The script prints `Database status is creating, waiting...` while the database is provisioned, and `Setup complete` at the end. The `documents` table holds one row per entry in the list, each with its text and its embedding, and the index covers those rows. Running the script again prints `Setup complete` without creating anything twice. `vector('[...]')` rejects a vector of more than 65,536 dimensions. --- -## 4. Query by similarity +## 5. Query by similarity A search embeds the question with the same model and asks the index for the nearest rows. `vector_top_k` takes the index name, the query vector, and the number of rows to return, and answers with an `id` column that the table joins on `rowid`: @@ -163,30 +207,39 @@ A search embeds the question with the same model and asks the index for the near SELECT content FROM vector_top_k('documents_idx', vector('[...]'), 2) JOIN documents ON documents.rowid = id; ``` -Continue in `main.ts`, and run the statement with `useQuery`, which carries the statements that return rows: +The function only reads, so it creates nothing and answers every request the same way. Replace the contents of `index.js`, the entrypoint the build reads by default, with the search, and run the statement with `useQuery`, which carries the statements that return rows: -```typescript - const query = 'What is the capital of Australia?' - const queryEmbedding = await embeddings.embedQuery(query) +```javascript +import { useQuery } from '@aziontech/sql' +import { OpenAIEmbeddings } from '@langchain/openai' - const searchStatements = [ - `SELECT content FROM vector_top_k('documents_idx', vector('[${queryEmbedding}]'), 2) - JOIN documents ON documents.rowid = id;` - ] +export default { + async fetch(request) { + const embeddings = new OpenAIEmbeddings({ + model: 'text-embedding-3-small', + apiKey: process.env.OPENAI_API_KEY + }) - const { data: searchData, error: searchError } = await useQuery('vectorDatabase', searchStatements) + const query = 'What is the capital of Australia?' + const queryEmbedding = await embeddings.embedQuery(query) - if (searchError) { - return Response.json({ error: searchError.message }, { status: 500 }) - } + const { data: searchData, error: searchError } = await useQuery('vectorDatabase', [ + `SELECT content FROM vector_top_k('documents_idx', vector('[${queryEmbedding}]'), 2) + JOIN documents ON documents.rowid = id;` + ]) + + if (searchError) { + return Response.json({ error: searchError.message }, { status: 500 }) + } - return Response.json({ data: searchData }) + return Response.json({ data: searchData }) + } } ``` -The answer carries `results`, one entry per statement, each with its `columns` and its `rows`. A statement that fails does not fail the call: its message arrives in `error` and in the matching entry of `results`, which is why every operation above reads `error` before it reads `data`. +The answer carries `results`, one entry per statement, each with its `columns` and its `rows`. A statement that fails fails the whole call: `error` holds the database message, such as `no such table: documents`, and `data` is unset. That is why the function reads `error` before it reads `data`. -The function returns the two rows whose embeddings are nearest the question, and a failure anywhere in the chain returns a JSON message with status `500`. +The function returns the two rows whose embeddings are nearest the question, and a failed search returns a JSON message with status `500`. :::note SQL Database also supports the LangChain Vector Store integration for document storage, and the LangChain Retriever for hybrid search that combines vector search with full-text search. @@ -194,14 +247,14 @@ SQL Database also supports the LangChain Vector Store integration for document s --- -## 5. Run it +## 6. Run the search locally -The function creates its own database, table, index, and rows on the first request. To run it locally: +The function reads the rows the setup script stored. To run it locally: - + - From the application directory, build it: + From the project folder, build it: ```bash azion build @@ -218,17 +271,21 @@ The function creates its own database, table, index, and rows on the first reque azion dev ``` - The function answers on the local address the command prints. + The function answers on the local address the command prints, `http://localhost:3333` by default. - Request that local address. The function creates the database, stores the embeddings, embeds `What is the capital of Australia?`, and searches the index. + ```bash + curl http://localhost:3333 + ``` + + The function embeds `What is the capital of Australia?` and searches the index. -The response carries the documents whose embeddings are nearest the question, and the account holds the `vectorDatabase` database with the `documents` table and its rows. To search for something else, change the value of `query` and send the request again. +The response carries the two documents whose embeddings are nearest the question. Every later request runs the same search, because the function creates nothing. To search for something else, change the value of `query`, build again, and send the request again. To store other documents, change the `documents` list, delete the rows of the `documents` table, and run `setup.mjs` again. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/edge-storage/auth-layer-object-storage-functions/index.mdx b/apps/docs/src/content/docs/en/pages/guides/edge-storage/auth-layer-object-storage-functions/index.mdx index 3ea7abfaa5..27b32bf48c 100644 --- a/apps/docs/src/content/docs/en/pages/guides/edge-storage/auth-layer-object-storage-functions/index.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/edge-storage/auth-layer-object-storage-functions/index.mdx @@ -58,10 +58,10 @@ The Azion CLI scaffolds the project and `npm` adds the library that verifies the ```bash - azion init my-auth-storage + azion init --name my-auth-storage ``` - At the prompts, set **Template** to _JavaScript_ and **Runtime** to _Azion Runtime_. The Azion CLI writes the project into a `my-auth-storage` folder. + The `--name` flag sets the project name, so the command does not ask for one. At `Choose a preset:`, select _Javascript_. At `Choose a template:`, select _Hello World_. Answer `Y` to the dependency question and `N` to the questions about a local development server and a deploy. The Azion CLI writes the project into a `my-auth-storage` folder. @@ -217,17 +217,27 @@ The handler reads `JWT_SECRET` and `BUCKET_NAME` with `Azion.env.get`, so neithe --- -## Configure the environment variables +## Store the environment variables -Create a `.env` file in the root of the project, with the bucket the handler reads and the secret it verifies against: +The handler reads the bucket name and the signing secret from your account at run time, so neither value enters the code or its repository. The bucket name is not confidential, and the secret is: a secret variable is never printed back by the Azion CLI. + +To create the two variables with the Azion CLI: + +```bash +azion create variables --key BUCKET_NAME --value --secret false +azion create variables --key JWT_SECRET --value --secret true +``` + +Each command prints the UUID of the variable it created: ```text -BUCKET_NAME=your-bucket-name -JWT_SECRET=your-secret +Created variable with UUID 00000000-0000-0000-0000-000000000005 ``` +A variable reaches a function only after the function is deployed, so create both before you deploy the project. The account holds both variables, and the handler reads each one with `Azion.env.get()`. For the limits on variables, refer to [Environment variables](/en/documentation/platform/functions/environment-variables/). + :::caution -Never commit the `.env` file or a secret such as `JWT_SECRET` to your code repository. Add `.env` to your `.gitignore`. +Never write `JWT_SECRET` into the code or commit it to your code repository. Keep it only in the secret variable. ::: --- @@ -253,30 +263,13 @@ Replace `your-bucket-name`, `your-bucket-prefix`, and `./path/to/storage/files` ## Deploy the function -The deploy sends the code, and `azion sync` sends the values the code reads. To put both on your account: - - - - - ```bash - azion deploy - ``` - - The Azion CLI builds the project and sends the function to your account. +The variables are already on your account, so the deploy is the last step before the function answers requests. From the project folder, run: - - - - ```bash - azion sync - ``` - - The handler reads `BUCKET_NAME` and `JWT_SECRET` at run time. Without this step the variables exist only in your `.env` file, and the function does not find them. - - - +```bash +azion deploy +``` -The function runs on your account with the bucket name and the signing secret it needs. +The Azion CLI builds the project and sends the function to your account, and the function reads `BUCKET_NAME` and `JWT_SECRET` from the variables you created. If you create or change a variable after this deploy, run `azion deploy` again so the function reads the new value. --- @@ -292,7 +285,7 @@ Sign a token with the same secret, then request an object three times: with the ```javascript import { SignJWT } from 'jose'; - const secret = new TextEncoder().encode('your-secret-key'); + const secret = new TextEncoder().encode(''); const token = await new SignJWT({ sub: 'user123', @@ -306,7 +299,7 @@ Sign a token with the same secret, then request an object three times: with the console.log(token); ``` - The script prints the signed token. Set `secret` to the value you stored in `JWT_SECRET`, or the function refuses every token the script issues. + The script prints the signed token. Replace `` with the value you stored in `JWT_SECRET`, or the function refuses every token the script issues. @@ -349,7 +342,9 @@ Sign a token with the same secret, then request an object three times: with the A signed token returns the object, and an absent or unverifiable token returns `401` without reaching the bucket. -These checks confirm the [Deliver an on-demand video library](/en/documentation/use-cases/deliver-media-and-streaming/deliver-an-on-demand-video-library/) use case. +In the [Deliver an on-demand video library](/en/documentation/use-cases/deliver-media-and-streaming/deliver-an-on-demand-video-library/) use case, expect: + +- **Only a signed request gets the object.** A request with a valid token returns the object, and a request with no token answers `401` without reaching the bucket. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/firewall-and-waf/apply-waf-and-rate-limit-to-one-path.mdx b/apps/docs/src/content/docs/en/pages/guides/firewall-and-waf/apply-waf-and-rate-limit-to-one-path.mdx index f26f8e7d41..888b1f12f9 100644 --- a/apps/docs/src/content/docs/en/pages/guides/firewall-and-waf/apply-waf-and-rate-limit-to-one-path.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/firewall-and-waf/apply-waf-and-rate-limit-to-one-path.mdx @@ -272,7 +272,10 @@ In the [Deploy remote MCP servers](/en/documentation/use-cases/build-and-run-ai- - **The rate limit refuses a loop.** Sixty `tools/list` requests sent 30 at a time, so they arrive faster than 10 per second, answer with both `200` and `429`: the rate and the burst admit some of the requests, and the firewall refuses the others. -These checks confirm the [Protect public APIs from abuse](/en/documentation/use-cases/secure-applications-and-networks/protect-public-apis-from-abuse/) use case. +In the [Protect public APIs from abuse](/en/documentation/use-cases/secure-applications-and-networks/protect-public-apis-from-abuse/) use case, expect: + +- **The API path refuses a flood.** Requests to `/api/` beyond the burst answer `429`, and the same requests to a path outside `/api/` do not. +- **WAF records attacks on the path.** An injection-shaped request to `/api/` has a WAF record, and after the move to _Blocking_ it answers `400`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/functions-and-runtime/resolve-tenants-by-hostname-in-a-function.mdx b/apps/docs/src/content/docs/en/pages/guides/functions-and-runtime/resolve-tenants-by-hostname-in-a-function.mdx index 16cf683d37..8e7932e0a1 100644 --- a/apps/docs/src/content/docs/en/pages/guides/functions-and-runtime/resolve-tenants-by-hostname-in-a-function.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/functions-and-runtime/resolve-tenants-by-hostname-in-a-function.mdx @@ -237,7 +237,10 @@ Each check requests a tenant hostname or the workload domain: A tenant that answers Azion's placeholder `404` page instead of `Unknown tenant` is still waiting for the workload change to propagate. When the function does not answer at all, turn on [Debug Rules](/en/documentation/platform/applications/main-settings/#debug-rules) to see which rules ran. -These checks confirm the [Run multi-tenant SaaS applications](/en/documentation/use-cases/build-and-run-applications/run-multi-tenant-saas-applications/) use case. +In the [Run multi-tenant SaaS applications](/en/documentation/use-cases/build-and-run-applications/run-multi-tenant-saas-applications/) use case, expect: + +- **Each tenant sees only its own data.** A request to `acme.app.example.com` names `Acme` and holds only its rows, and the same request to `globex.app.example.com` holds none of Acme's projects. +- **An unknown hostname gets nothing.** A request to the workload domain answers `404`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/graphql/query-tiered-cache-usage-data.mdx b/apps/docs/src/content/docs/en/pages/guides/graphql/query-tiered-cache-usage-data.mdx index 7621760e98..b294b454c5 100644 --- a/apps/docs/src/content/docs/en/pages/guides/graphql/query-tiered-cache-usage-data.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/graphql/query-tiered-cache-usage-data.mdx @@ -152,7 +152,7 @@ For every field of the dataset, refer to [Consumption GraphQL API fields](/en/do - + diff --git a/apps/docs/src/content/docs/en/pages/guides/inference/route-model-calls-through-a-gateway-function.mdx b/apps/docs/src/content/docs/en/pages/guides/inference/route-model-calls-through-a-gateway-function.mdx index b6b6733d1f..ba6293901b 100644 --- a/apps/docs/src/content/docs/en/pages/guides/inference/route-model-calls-through-a-gateway-function.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/inference/route-model-calls-through-a-gateway-function.mdx @@ -289,7 +289,10 @@ A request with no `Authorization` header answers `401`. A request for `long-cont The gateway routes each team's request by alias, falls back when a route fails, and refuses what the team record does not allow. Remove the `fallback-test` alias from `ROUTES` and from the team record once the fallback check passes. -These checks confirm the [Govern access to multiple AI models](/en/documentation/use-cases/build-and-run-ai-workloads/govern-access-to-multiple-ai-models/) use case. +In the [Govern access to multiple AI models](/en/documentation/use-cases/build-and-run-ai-workloads/govern-access-to-multiple-ai-models/) use case, expect: + +- **Each team calls only the models its record allows.** A request for `general` returns a `chat.completion` object, and a request for `long-context`, which `checkout-team` may not call, answers `403`. +- **A failed route falls back.** A request for `fallback-test` carries `x-gateway-route: provider`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/inference/summarize-text-with-ai-inference-and-cache-the-summary.mdx b/apps/docs/src/content/docs/en/pages/guides/inference/summarize-text-with-ai-inference-and-cache-the-summary.mdx index f854a424dd..ccfe2c5161 100644 --- a/apps/docs/src/content/docs/en/pages/guides/inference/summarize-text-with-ai-inference-and-cache-the-summary.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/inference/summarize-text-with-ai-inference-and-cache-the-summary.mdx @@ -120,8 +120,6 @@ The response carries `x-summary-cache: miss` and a JSON body with `summary`. Sen The route returns a summary for a text, and answers the same text from the cache for one day. -These checks confirm the [Add AI features to existing applications](/en/documentation/use-cases/build-and-run-ai-workloads/add-ai-features-to-existing-applications/) use case. - In the [Add AI features to existing applications](/en/documentation/use-cases/build-and-run-ai-workloads/add-ai-features-to-existing-applications/) use case, expect: - **The route runs only on its path.** Any other path of your application answers as it did before the rule existed. diff --git a/apps/docs/src/content/docs/en/pages/guides/marketplace/integrations/jwt.mdx b/apps/docs/src/content/docs/en/pages/guides/marketplace/integrations/jwt.mdx index c03cad7254..d1f5d9447b 100644 --- a/apps/docs/src/content/docs/en/pages/guides/marketplace/integrations/jwt.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/marketplace/integrations/jwt.mdx @@ -235,7 +235,9 @@ The command prints `400` or `401`. The same request with a valid `Authorization: The [Protect public APIs from abuse](/en/documentation/use-cases/secure-applications-and-networks/protect-public-apis-from-abuse/) use case uses the values of this example. -These checks confirm the [Protect public APIs from abuse](/en/documentation/use-cases/secure-applications-and-networks/protect-public-apis-from-abuse/) use case. +In the [Protect public APIs from abuse](/en/documentation/use-cases/secure-applications-and-networks/protect-public-apis-from-abuse/) use case, expect: + +- **Requests without a valid token stop at Azion.** A request to `/v1/orders` with no `Authorization` header answers `400` or `401`, and the same request with a valid `Bearer` token reaches the API. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/azion-starter-kit.mdx b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/azion-starter-kit.mdx index b21143858e..3d30ca5721 100644 --- a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/azion-starter-kit.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/azion-starter-kit.mdx @@ -77,7 +77,7 @@ The application includes the following rules and settings: - For image optimization and caching, the file extensions that can be enhanced with these configurations are `.jpg`, `.jpeg`, `.bmp`, `.ico`, `.gif`, `.png`. - For static content, the template supports the common static file extensions. - The template: - - Respects the origin's cache settings (or uses a default TTL for cache). + - Respects the origin's cache settings (or, when the origin sends none, uses the Max Age of the cache setting). - Provides rules that alter caching settings for static files based on the file extension of the requested content to improve the delivery. Additionally, the Firewall enhances security through the [Azion IP Tor Exit Nodes](/en/documentation/guides/application-security/bots-and-network/block-tor-networks/) network list and Azion [Bot Manager Lite](/en/documentation/guides/application-development/integrations/bot-manager-lite/). diff --git a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/dynamic-and-static-file-optimization.mdx b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/dynamic-and-static-file-optimization.mdx index f195edd5c6..f7bd594a8e 100644 --- a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/dynamic-and-static-file-optimization.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/dynamic-and-static-file-optimization.mdx @@ -71,7 +71,7 @@ The deployed application includes the following rules and settings: - For image optimization and caching, the file extensions that can be enhanced with these configurations are `.jpg`, `.jpeg`, `.bmp`, `.ico`, `.gif`, `.png`. - For static content, the template supports the common static file extensions. - Additionally, the template: - - Respects the origin's cache settings (or uses a default TTL for cache). + - Respects the origin's cache settings (or, when the origin sends none, uses the Max Age of the cache setting). - Provides rules that alter caching settings for static files based on the file extension of the requested content to improve the delivery. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/edge-application-proxy.mdx b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/edge-application-proxy.mdx index 3bbc15f7be..e6e32ae7de 100644 --- a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/edge-application-proxy.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/edge-application-proxy.mdx @@ -21,7 +21,7 @@ The rule's criterion compares the `${uri}` variable with the route you enter, su - [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) keeps Azion from caching the origin's response, so the application's cache settings do not apply to the route. - [Forward Cookies](/en/documentation/platform/applications/rules-engine/#forward-cookies) sends the origin's `Set-Cookie` header to the user. -Bypass Cache acts on Azion's cache and not on the Tiered Cache layer. If a cache setting of the application turns on Tiered Cache, that layer still caches objects on the route for its minimum TTL. For more information, refer to [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/). +Bypass Cache acts on Azion's cache and not on the Tiered Cache layer. If a cache setting of the application turns on Tiered Cache, that layer still caches objects on the route for the Max Age of that cache setting. For more information, refer to [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/). ## Prerequisites diff --git a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/static-cache.mdx b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/static-cache.mdx index ef45a9bbf3..3e97bb63a2 100644 --- a/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/static-cache.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/marketplace/templates/static-cache.mdx @@ -12,7 +12,7 @@ import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import DocButton from '~/components/webkit/DocButton.vue' -The **Static Cache** template deploys an application that caches static files, such as JavaScript and CSS, by their file extension. Its rules are applied through [Rules Engine](/en/documentation/platform/applications/rules-engine/), and they respect the cache settings the origin sends or apply a default TTL instead. The rules cover the **GET**, **HEAD**, and **OPTIONS** methods. +The **Static Cache** template deploys an application that caches static files, such as JavaScript and CSS, by their file extension. Its rules are applied through [Rules Engine](/en/documentation/platform/applications/rules-engine/), and they respect the cache settings the origin sends or, when the origin sends none, apply the Max Age of the cache setting. The rules cover the **GET**, **HEAD**, and **OPTIONS** methods. You link the template to your own origin, and the deployment creates an application on [Azion Platform](/en/documentation/platform/applications/) where every setting stays editable. diff --git a/apps/docs/src/content/docs/en/pages/guides/mcp/create-mcp.mdx b/apps/docs/src/content/docs/en/pages/guides/mcp/create-mcp.mdx index 9d29b43a05..8bd4dcd1d7 100644 --- a/apps/docs/src/content/docs/en/pages/guides/mcp/create-mcp.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/mcp/create-mcp.mdx @@ -588,7 +588,10 @@ The server exposes two tools that call the order service, and each tool call wri The [Deploy remote MCP servers](/en/documentation/use-cases/build-and-run-ai-workloads/deploy-remote-mcp-servers/) use case uses the values of this example. -These checks confirm the [Deploy remote MCP servers](/en/documentation/use-cases/build-and-run-ai-workloads/deploy-remote-mcp-servers/) use case. +In the [Deploy remote MCP servers](/en/documentation/use-cases/build-and-run-ai-workloads/deploy-remote-mcp-servers/) use case, expect: + +- **The server lists its tools.** `tools/list` returns `get_order` and `list_customer_orders`, each with the input schema the code declares. +- **A tool call returns only the order's fields.** A `get_order` call with an existing order ID returns its `id`, `status`, `total`, and `created_at`, and no other field. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/observability/stream-request-and-waf-records-to-siem.mdx b/apps/docs/src/content/docs/en/pages/guides/observability/stream-request-and-waf-records-to-siem.mdx index 5e4729f93f..01c4f1d8c8 100644 --- a/apps/docs/src/content/docs/en/pages/guides/observability/stream-request-and-waf-records-to-siem.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/observability/stream-request-and-waf-records-to-siem.mdx @@ -242,7 +242,10 @@ At the SIEM, each log line carries the keys of the template, named after its var The SIEM receives one line per request to the workload, each with its WAF fields. The SIEM keeps the lines for as long as you configure it to. -These checks confirm the [Prepare regulated web applications for security audits](/en/documentation/use-cases/secure-applications-and-networks/prepare-regulated-web-applications-for-security-audits/) use case. +In the [Prepare regulated web applications for security audits](/en/documentation/use-cases/secure-applications-and-networks/prepare-regulated-web-applications-for-security-audits/) use case, expect: + +- **The stream delivers to the SIEM.** The sends of the stream report a status of `200` in `dataStreamedEvents`. +- **Every request leaves a record.** The SIEM receives one line per request to the workload, with `request_id`, `status`, `waf_score`, `waf_match`, and `waf_block`. --- diff --git a/apps/docs/src/content/docs/en/pages/guides/paywall-edge-function-jwt/paywall-edge-function-jwt.mdx b/apps/docs/src/content/docs/en/pages/guides/paywall-edge-function-jwt/paywall-edge-function-jwt.mdx index 6b5c42f76d..81e823bbad 100644 --- a/apps/docs/src/content/docs/en/pages/guides/paywall-edge-function-jwt/paywall-edge-function-jwt.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/paywall-edge-function-jwt/paywall-edge-function-jwt.mdx @@ -3,7 +3,7 @@ title: Set up a paywall with the JWT function description: >- Validate a JSON Web Token on each request to restricted content and control access by subscription with the JWT function from Azion Marketplace. -meta_tags: 'paywall, jwt, functions, args, rules engine, marketplace' +meta_tags: 'paywall, jwt, functions, firewall, function instance, rules engine, marketplace' namespace: docs_use_case_paywall_edge_function_jwt permalink: /documentation/guides/application-development/functions-and-runtime/paywall-function-jwt/ --- @@ -12,7 +12,7 @@ import DocStep from '@aziontech/webkit/doc-step' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -A paywall built with the JWT function has two parts: a function instance that validates the token, and a Rules Engine rule that runs the instance on the content you restrict. The JWT function is a serverless solution available in Azion Marketplace. +A paywall built with the JWT function has two parts: a function instance on a [firewall](/en/documentation/platform/firewall/) that validates the token, and a firewall rule that runs the instance on the content you restrict. The JWT function is a serverless solution available in Azion Marketplace, and it runs on a firewall, not on an application. The origin application generates the token and sets its expiration. It also decides how access is controlled: @@ -22,31 +22,45 @@ The origin application generates the token and sets its expiration. It also deci The token follows the Bearer Authentication Scheme, the standard for HTTP authentication. Every request carries a JSON object of authentication information in its header. -The JWT function validates that token on each request the application receives. It follows the business rules defined in the token, and those rules combine with the criteria you set in Rules Engine. The result decides the behavior: the request reaches the content, or it goes to the sign-in page of the origin application. Validation runs before the request reaches the origin, so the origin does not process an unauthorized request. +The JWT function validates that token on each request the firewall inspects. It follows the business rules defined in the token, and those rules combine with the criteria you set in the firewall's Rules Engine. The result decides the behavior: the request reaches the content, or it goes to the sign-in page of the origin application. Validation runs on the firewall, before the request reaches the application or the origin, so the origin does not process an unauthorized request. --- ## Prerequisites -- An application. To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- The JWT function installed on the account. To install it, refer to [How to Install the JWT Integration](/en/documentation/guides/application-development/integrations/jwt/). +- An application served by a [workload](/en/documentation/platform/workloads/). To create one, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). +- The JWT function installed on the account. To install it, refer to [Install the JWT integration](/en/documentation/guides/application-development/integrations/jwt/). +- A firewall with **Functions** turned on in its **Modules** section, bound to the workload's deployment. To create one, refer to [Create the firewall](/en/documentation/guides/application-development/integrations/jwt/#create-the-firewall), and to bind it, [Bind a firewall to a workload](/en/documentation/guides/application-security/firewall-and-waf/firewall-protect-your-domain/#bind-the-firewall-to-the-workload). - The list of KID and secret key pairs that the origin application uses to sign the token. --- -## Instantiate the JWT function on the application +## Instantiate the JWT function on the firewall -An application runs a function through a function instance, and the instance carries the Args passed into the execution context. For the full procedure on Azion Console and the Azion API, refer to [Instantiate a function on an application](/en/documentation/guides/application-development/getting-started/instantiate-functions/). +A firewall runs a function through a function instance, and the instance carries the arguments passed into the execution context. For the full procedure on Azion Console and the Azion API, refer to [Instantiate a function on a firewall](/en/documentation/guides/application-security/firewall-and-waf/instantiate-functions/). -The instance form shows the source code of the function in the **Code** field. That field is informational, and you cannot change it. The **Args** tab takes the list of KID (key ID) and secret key pairs that generate the signature of the token. - -The origin application defines the pairs. To pass them to the instance: +The **Arguments** field takes the list of KID (key ID) and secret key pairs that generate the signature of the token. The origin application defines the pairs. To create the instance: - + + + Access [Azion Console](https://console.azion.com/) > **Firewalls**, select your firewall, then select the **Functions Instances** tab. + + + + + A firewall that has no instance shows the same action as **Function Instance**. The **Create Instance** drawer opens. + + + + + Enter a name for the instance. For example: `paywall-jwt`. + + + - Enter the pairs in this format: + In **Arguments**, enter the pairs in this format: ```json [{ @@ -62,20 +76,20 @@ The origin application defines the pairs. To pass them to the instance: -The instance appears in the **Functions Instances** tab of the application. It does not run until a Rules Engine rule selects it. +The instance appears in the **Functions Instances** tab of the firewall. It does not run until a firewall rule selects it. --- ## Add the rule that runs the function -A rule states the conditions a request meets for its behaviors to run. A criterion reads as a logical operator, a variable, a comparison operator, and a string. A behavior reads as a logical operator, an action, and a function. The behavior that runs the function goes on the **Default Rule** of the application, or on a rule you create. Match the criteria to the paths you sell by subscription, and to the authentication the origin application already uses. +A firewall rule states the conditions a request meets for its behaviors to run. A criterion reads as a variable, a comparison operator, and a string. The behavior that runs the function is **Run Function**, with the instance you created. Match the criteria to the paths you sell by subscription, and to the authentication the origin application already uses. -To put the behavior on a new rule: +To create the rule: - + - Access [Azion Console](https://console.azion.com/) > **Applications** > **your application**. + Access [Azion Console](https://console.azion.com/) > **Firewalls** > **your firewall**. @@ -85,28 +99,20 @@ To put the behavior on a new rule: Enter a name for the rule. For example: `Paywall on news`. - - - - In the **Criteria** section, select the `${uri}` variable. - - - - + - Enter `/news` as the string. The criterion reads `If ${uri} starts with /news`. + In the **Criteria** section, select `Request Uri`, _starts with_, and enter `/news`. The criterion reads `If ${request_uri} starts with /news`. - - + - Select the instance you named when you instantiated the function. + In the **Behaviors** section, select **Run Function**, then select the instance by the name you gave it. -The rule runs the JWT function on every request whose URI starts with `/news`. New rules can take a few minutes to propagate. +The firewall runs the JWT function on every request to the workload whose URI starts with `/news`. New rules can take a few minutes to propagate. :::note The function returns an HTTP status code `400` or `401` when the token it receives is invalid. The code depends on the error. @@ -117,8 +123,8 @@ The function returns an HTTP status code `400` or `401` when the token it receiv ## Next steps - - - - + + + + diff --git a/apps/docs/src/content/docs/en/pages/guides/streaming/deliver-a-live-stream-from-live-ingest.mdx b/apps/docs/src/content/docs/en/pages/guides/streaming/deliver-a-live-stream-from-live-ingest.mdx index 5c5769f811..f5f4cfd295 100644 --- a/apps/docs/src/content/docs/en/pages/guides/streaming/deliver-a-live-stream-from-live-ingest.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/streaming/deliver-a-live-stream-from-live-ingest.mdx @@ -359,8 +359,6 @@ curl -sI -H "Pragma: azion-debug-cache" https://live.example.com/.ts The second response carries `x-cache: HIT`. For how to read the header, refer to [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/). -These checks confirm the [Stream live events to large audiences](/en/documentation/use-cases/deliver-media-and-streaming/stream-live-events-to-large-audiences/) use case. - In the [Stream live events to large audiences](/en/documentation/use-cases/deliver-media-and-streaming/stream-live-events-to-large-audiences/) use case, expect: - **Viewers can play the stream.** Load `https://live.example.com/.m3u8` in an HLS player, such as the hls.js configuration in [Connectors best practices](/en/documentation/platform/connectors/best-practices/#give-the-player-a-fallback-for-load-errors). The player starts the stream and keeps advancing as the encoder pushes it. diff --git a/apps/docs/src/content/docs/en/pages/guides/tls-and-certificates/redirect-http-to-https.mdx b/apps/docs/src/content/docs/en/pages/guides/tls-and-certificates/redirect-http-to-https.mdx index 096cc2f944..36793ed83a 100644 --- a/apps/docs/src/content/docs/en/pages/guides/tls-and-certificates/redirect-http-to-https.mdx +++ b/apps/docs/src/content/docs/en/pages/guides/tls-and-certificates/redirect-http-to-https.mdx @@ -294,7 +294,9 @@ curl -s -o /dev/null -w '%{redirect_url}\n' http://www.example.com/ The command prints `https://www.example.com/`. -These checks confirm the [Prepare regulated web applications for security audits](/en/documentation/use-cases/secure-applications-and-networks/prepare-regulated-web-applications-for-security-audits/) use case. +In the [Prepare regulated web applications for security audits](/en/documentation/use-cases/secure-applications-and-networks/prepare-regulated-web-applications-for-security-audits/) use case, expect: + +- **Plain HTTP never serves content.** A request for `http://www.example.com/` redirects to `https://www.example.com/`. --- diff --git a/apps/docs/src/content/docs/en/pages/hubs/guides/applications.mdx b/apps/docs/src/content/docs/en/pages/hubs/guides/applications.mdx index b611144f44..986a067757 100644 --- a/apps/docs/src/content/docs/en/pages/hubs/guides/applications.mdx +++ b/apps/docs/src/content/docs/en/pages/hubs/guides/applications.mdx @@ -1,10 +1,10 @@ --- title: Applications guides and tutorials -description: Every guide and tutorial for Applications, each covering one task. +description: Every guide and tutorial for Applications and the Platform Resources nested in it. meta_tags: 'applications, guides, tutorials' namespace: documentation_products_applications_guides permalink: /documentation/platform/applications/guides/ guides_hub: applications --- -Every guide and tutorial for Applications, each covering one task. Open one and it takes you to the Guides section, where every guide lives. +Each guide opens in the Guides section, where every guide lives. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/cache-settings.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/cache-settings.mdx index 92d7df28ec..1a6c3c8b37 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/cache-settings.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/cache-settings.mdx @@ -12,53 +12,55 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -A cache setting is an object on an application that tells [Cache](/en/documentation/platform/applications/cache/) how to store and serve a response. It holds the browser TTL, the cache TTL and behavior, stale cache, Large File Optimization, [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/), and the cache variation rules. A [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule with the [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior applies the setting to the requests it matches. Until a rule names it, a setting does nothing. To create one, refer to [Create a cache setting](/en/documentation/guides/application-performance/cache-and-purge/tune-cache-settings/). +A cache setting is a set of values that tell [Cache](/en/documentation/platform/applications/cache/) how to store and serve a response. It belongs to one Application, and its values are the browser time to live (TTL), the cache TTL and behavior, stale cache, Large File Optimization, [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/), and the cache variations. A [Rules Engine](/en/documentation/platform/applications/rules-engine/) rule with the [Set Cache Policy](/en/documentation/platform/applications/rules-engine/#set-cache-policy) behavior applies the setting, and the setting acts only on the requests that this rule matches. To create one, refer to [Create a cache setting](/en/documentation/guides/application-performance/cache-and-purge/tune-cache-settings/). --- ## Interfaces -Six interfaces write the same object. The tables on this page name the Console control, the API field, and the CLI flag of each field. +Six interfaces create and change the same cache setting. The tables on this page name the Console control, the API field, and the CLI flag of each field. | Interface | Create | Read, update, delete | | --- | --- | --- | -| [Azion Console](https://console.azion.com/) | The **Cache Settings** tab of an application in [Applications](/en/documentation/platform/applications/), then **+ Cache**, which opens the **Create Cache Settings** drawer | The same tab lists every setting with its **Name**, **ID**, **Browser Cache**, and **Cache** | -| [Azion API v4](/en/documentation/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `GET`, `PATCH`, and `DELETE /v4/workspace/applications/{application_id}/cache_settings/{cache_setting_id}`; `GET /v4/workspace/applications/{application_id}/cache_settings` lists them | -| Azion CLI | [`azion create cache-setting`](/en/documentation/devtools/cli/resources/) | [`azion describe cache-setting`](/en/documentation/devtools/cli/resources/), [`azion list cache-setting`](/en/documentation/devtools/cli/resources/), [`azion update cache-setting`](/en/documentation/devtools/cli/resources/), [`azion delete cache-setting`](/en/documentation/devtools/cli/resources/) | -| `azion.config.js` | An entry of the `cache` array, of type `AzionCache` | The same entry | +| [Azion Console](https://console.azion.com/) | The **Cache Settings** tab of an Application in [Applications](/en/documentation/platform/applications/), then **+ Cache**, which opens the **Create Cache Settings** drawer | The same tab lists every setting with its **Name**, **Browser Cache**, and **Cache** | +| [Azion API v4](/en/documentation/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `GET`, `PUT`, `PATCH`, and `DELETE /v4/workspace/applications/{application_id}/cache_settings/{cache_setting_id}`; `GET /v4/workspace/applications/{application_id}/cache_settings` lists them | +| Azion CLI | [`azion create cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/) | [`azion describe cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/), [`azion list cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/), [`azion update cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/), [`azion delete cache-setting`](/en/documentation/devtools/cli/resources/cache-setting/) | +| `azion.config.js` | An entry of the `cache` array of an Application, of type `AzionCache` | The same entry | | [Azion Lib](/en/documentation/devtools/azion-lib/application/) | `createCacheSetting` from `azion/applications` | `getCacheSetting`, `getCacheSettings`, `updateCacheSetting`, and `deleteCacheSetting` from `azion/applications` | | [Terraform](/en/documentation/devtools/terraform/applications/) | The `azion_application_cache_setting` resource, whose page documents `application_id` and `name` | The same resource | -The API authenticates with a personal token in the `Authorization: Token ` header. For more information, refer to [Personal tokens](/en/documentation/guides/platform/account-and-billing/personal-tokens/). An `AzionCache` entry carries `name`, `stale`, `queryStringSort`, `tieredCache`, `methods`, `browser.maxAgeSeconds`, `edge.maxAgeSeconds`, `cacheByCookie`, and `cacheByQueryString`. +`PUT` replaces the whole setting, and `PATCH` changes only the fields it sends. The list endpoint filters by `id` and `name` and pages with `page` and `page_size`. The API authenticates with a personal token in the `Authorization: Token ` header. For more information, refer to [Personal tokens](/en/documentation/guides/platform/account-and-billing/personal-tokens/). + +In `azion.config.js`, an `AzionCache` entry carries `name`, `stale`, `queryStringSort`, `tieredCache`, `methods`, `browser.maxAgeSeconds`, `edge.maxAgeSeconds`, `cacheByCookie`, and `cacheByQueryString`. --- ## General -The **General** section of the drawer holds the name. The API requires `name` and nothing else. +In Azion Console, the **General** section of the **Create Cache Settings** drawer holds the name. `name` is the only field the API requires. | Console control | API field | Type | Values | Default | CLI flag | | --- | --- | --- | --- | --- | --- | -| **Name** | `name` | string | 1 to 250 characters | required, no default | `--name` | +| **Name** | `name` | string | 1 to 250 characters, unique among the cache settings of the Application | required, no default | `--name` | --- ## Browser Cache -The **Browser Cache** section decides what the browser is told to keep, through the `browser_cache` object. +The `browser_cache` object sets what the browser is told to keep. In Azion Console, its controls are in the **Browser Cache** section. | Console control | API field | Type | Values | Default | CLI flag | | --- | --- | --- | --- | --- | --- | | **Browser Cache** radios | `browser_cache.behavior` | enum | _Honor cache policies_ (`honor`), _Override cache settings_ (`override`), _No cache_ (`no-cache`) | `honor` | `--browser-cache-behavior` | -| The TTL field under _Override cache settings_ | `browser_cache.max_age` | integer, seconds | 0 to 31,536,000 | `0` | `--browser-cache-max-age` | +| **Max Age** under _Override cache settings_ | `browser_cache.max_age` | integer, seconds | 0 to 31,536,000 | `0` | `--browser-cache-max-age` | -_Honor cache policies_ keeps the `Cache-Control` and `Expires` headers the origin sends and forwards them to the browser. _Override cache settings_ replaces them with the TTL in `browser_cache.max_age`. For _No cache_, the Console reads: "Disable browser caching to ensure content is always fetched directly from the server". On `azion update cache-setting`, the flag for `browser_cache.behavior` is `--browser-cache-settings`. +`honor` keeps the `Cache-Control` and `Expires` headers the origin sends and forwards them to the browser. `override` replaces them with the TTL in `browser_cache.max_age`. For `no-cache`, the _No cache_ option of Azion Console reads: "Disable browser caching to ensure content is always fetched directly from the server". On `azion update cache-setting`, the flag for `browser_cache.behavior` is `--browser-cache-settings`. --- ## Cache -The **Cache** section sets how long Azion keeps the copy and what it does with it, through the `modules.cache` object. +The `modules.cache` object sets how long Azion keeps a copy of a response and what it does with that copy. In Azion Console, its controls are in the **Cache** section. | Console control | API field | Type | Values | Default | CLI flag | | --- | --- | --- | --- | --- | --- | @@ -67,37 +69,43 @@ The **Cache** section sets how long Azion keeps the copy and what it does with i | **Stale cache** | `modules.cache.stale_cache.enabled` | boolean | `true`, `false` | `false` (API, CLI); on in the Console | `--file` only | | **Large file optimization** | `modules.cache.large_file_cache.enabled` | boolean | `true`, `false` | `false` (API, CLI); off in the Console | `--file` only | | **Offset (KB)** | `modules.cache.large_file_cache.offset` | integer, kB | `1024`, fixed | `1024` | `--file` only | -| **Tiered Cache** | `modules.cache.tiered_cache.enabled` | boolean | `true`, `false` | `false` when no `tiered_cache` object is sent; `true` inside a `tiered_cache` object that omits it; off in the Console | `--tiered-caching-enabled` alone fails with error `21001`; use `--file` | -| **Tiered Cache Region** | `modules.cache.tiered_cache.topology` | enum | Such as `nearest-region` or `us-east-1` | none | `--file` only | +| **Tiered Cache** | `modules.cache.tiered_cache.enabled` | boolean | `true`, `false` | `false` (API); off in the Console | `--tiered-caching-enabled` alone fails with error `21001`; use `--file` | +| **Tiered Cache Region** | `modules.cache.tiered_cache.topology` | enum | Such as `nearest-region` or `us-east-1` | `nearest-region` (API); `nearest-region`, preselected in the Console | `--file` only | + +`honor` keeps the `Cache-Control` and `Expires` headers the origin sends, and `override` replaces them with the TTL in `modules.cache.max_age`. When the origin sends neither `Cache-Control` nor `Expires`, `honor` keeps the copy for the Max Age of the setting, `modules.cache.max_age`. -_Honor cache policies_ keeps the `Cache-Control` and `Expires` headers the origin sends; _Override cache behavior_ replaces them with **Max Age**. **Stale cache** lets Azion serve an expired copy when the origin fails. **Large file optimization** stores a large object in fragments of 1,024 kB. **Tiered Cache** adds a second cache layer between Azion's cache and the origin. For how each one behaves on a request, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). +Stale cache, the `stale_cache.enabled` field, lets Azion serve an expired copy for a limited window when the origin fails to answer. Large File Optimization, the `large_file_cache.enabled` field, stores a large object in fragments, and `large_file_cache.offset` holds their size, fixed at 1,024 kB. Tiered Cache is a Feature of Cache that adds a second cache layer between the data center that answers a request and your origin. `tiered_cache.enabled` turns it on for the objects this setting caches, and `tiered_cache.topology` selects where that layer holds them. A `tiered_cache` object sent without `enabled` turns the layer on. For how each one behaves on a request, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). :::note -Two constraints bind these values. A **Max Age** below 60 seconds requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on the application; without it, the API rejects the setting with error `21021`. Tiered Cache requires _Override cache behavior_; with `honor`, the API rejects the setting with error `21001`. +Two constraints bind these values. A `modules.cache.max_age` below 60 seconds requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on the Application; without it, the API refuses the setting with error `21021`. In Azion Console, the **Max Age** field states a minimum of 3 seconds once **Large file optimization** is on; without Application Accelerator, the API still refuses a value below 60 seconds with error `21021`. Tiered Cache requires `override` in `modules.cache.behavior`; with `honor`, the API refuses the setting with error `21001`. In Azion Console, turning on **Large file optimization** or **Tiered Cache** disables the _Honor cache policies_ option and selects _Override cache behavior_, but the API accepts `honor` with Large File Optimization. ::: --- ## Application Accelerator -The four **Cache vary by** controls of the **Application Accelerator** section write the `modules.application_accelerator` object. Every field in it requires the [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) module on the application, or the API returns error `21013`. The query-string and cookie fields configure **Advanced Cache Key**; the device fields use the groups defined in [Device Groups](/en/documentation/platform/applications/device-groups/). For what each behavior does to the cache key, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/). +The `modules.application_accelerator` object holds the cache variations of a setting. In Azion Console, its four **Cache vary by** controls are in the **Application Accelerator** section, which the **Create Cache Settings** drawer shows only while [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) is on in the Application. While Application Accelerator is off, the API refuses with error `21013` any variation in that object: a `behavior` other than `ignore`, or a method in `cache_vary_by_method`. An object that keeps those defaults is accepted, even with `sort_enabled` set to `true`. + +Together, the fields of `modules.application_accelerator` configure Advanced Cache Key, a Feature of Application Accelerator. `cache_vary_by_devices` uses the device groups defined in [Device Groups](/en/documentation/platform/applications/device-groups/). For what each behavior does to the cache key, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/). | Console control | API field | Type | Values | Default | CLI flag | | --- | --- | --- | --- | --- | --- | -| **Cache vary by Method** > **POST**, **OPTIONS** | `cache_vary_by_method` | array of enum, at most 2 values | `post`, `options` | `[]` | On create, `--enable-caching-for-options` for `options` and `--file` for `post`. On update, `--enable-caching-for-options` and `--enable-caching-for-post`; a call that passes one drops the other method, so pass both to keep both | +| **Cache vary by Method** > **POST**, **OPTIONS** | `cache_vary_by_method` | array of enum, at most 2 values | `post`, `options` | `[]` | On create, `--enable-caching-for-options` and `--file`. On update, `--enable-caching-for-options` and `--enable-caching-for-post` | | **Cache vary by Query String** > **Behavior** | `cache_vary_by_querystring.behavior` | enum | _Ignore_ (`ignore`), _All_ (`all`), _Allowlist_ (`allowlist`), _Denylist_ (`denylist`) | `ignore` | `--cache-by-query-string` | -| The field list under **Cache vary by Query String** | `cache_vary_by_querystring.fields` | array of string | query string argument names | `[]` | `--query-string-fields` | +| **Cache vary by Query String** > **Fields** | `cache_vary_by_querystring.fields` | array of string | query string argument names | `[]` | `--query-string-fields` | | **Cache vary by Query String** > **Sort** | `cache_vary_by_querystring.sort_enabled` | boolean | `true`, `false` | `false` | On create, `--file` only. On update, `--enable-caching-string-sort` | | **Cache vary by Cookies** > **Behavior** | `cache_vary_by_cookies.behavior` | enum | _Ignore_ (`ignore`), _All_ (`all`), _Allowlist_ (`allowlist`), _Denylist_ (`denylist`) | `ignore` | `--cache-by-cookies` | -| The cookie list under **Cache vary by Cookies** | `cache_vary_by_cookies.cookie_names` | array of string | cookie names | `[]` | `--cookie-names` | +| **Cache vary by Cookies** > **Fields** | `cache_vary_by_cookies.cookie_names` | array of string | cookie names | `[]` | `--cookie-names` | | **Cache vary by Devices** > **Behavior** | `cache_vary_by_devices.behavior` | enum | _Ignore_ (`ignore`), _Allowlist_ (`allowlist`) | `ignore` | `--file` only | -| The device group list under **Cache vary by Devices** | `cache_vary_by_devices.device_group` | array of integer | device group ids | `[]` | `--file` only | +| **Cache vary by Devices** > **Device Group** | `cache_vary_by_devices.device_group` | array of integer | device group ids | `[]` | `--file` only | -_Ignore_ varies the key by none of the values, and _All_ by every value that arrives. _Allowlist_ varies it by the named values, and _Denylist_ by every value except the named ones. _Allowlist_ and _Denylist_ on the query string need at least one field, or the API returns error `21018`. For the Console steps that set these controls, refer to [Configure Advanced Cache Key for an application](/en/documentation/guides/application-performance/cache-and-purge/advanced-cache-key/). +On `azion create cache-setting`, `--enable-caching-for-options` writes `options` whatever its value, and `post` takes `--file`. On `azion update cache-setting`, a call that passes one method flag drops the other method, so pass both flags to keep both. + +`ignore` keeps the same key whatever the values are, and `all` varies the key by every value that arrives. `allowlist` varies it by the named values, and `denylist` varies it by every value except the named ones. `fields`, `cookie_names`, and `device_group` hold the named values. `sort_enabled` groups the same arguments under one key whatever order they arrive in. `allowlist` and `denylist` on the query string need at least one field, or the API returns error `21018`. For the steps in Azion Console that set these controls, refer to [Configure Advanced Cache Key for an application](/en/documentation/guides/application-performance/cache-and-purge/advanced-cache-key/). --- -## Request body +## Request body and CLI command The request body below creates a complete cache setting through `POST /v4/workspace/applications/{application_id}/cache_settings`: @@ -117,13 +125,13 @@ The request body below creates a complete cache setting through `POST /v4/worksp } ``` -The API answers with HTTP `201`, `state` set to `executed`, and the new object with its `id` under `data`: +The API answers with HTTP `201`, `state` set to `executed`, and the new cache setting with its `id` under `data`: ```json {"state":"executed","data":{"id":123456,"name":"static-assets",...,"created_at":"2026-01-01T12:00:00.577248Z"}} ``` -The list endpoint wraps the settings of an application in a page envelope: +The list endpoint wraps the cache settings of an Application in a page envelope: ```json {"count":2,"total_pages":1,"page":1,"page_size":10,"next":null,"previous":null,"results":[...]} @@ -149,25 +157,28 @@ The command prints the id of the new setting: Created Cache Settings configuration with ID 123457 ``` -The flags cover browser cache, query-string and cookie variation, and OPTIONS caching. Every other field, including **Max Age**, the cache behavior, stale cache, Large File Optimization, and Tiered Cache, is set through `--file` with the JSON body. +On `azion create cache-setting`, the flags cover browser cache, query-string and cookie variation, and `OPTIONS` caching, and `azion update cache-setting` also sets `sort_enabled` and `POST` caching. Every other field is set through `--file` with the JSON body: `modules.cache.max_age`, the cache behavior, stale cache, Large File Optimization, and Tiered Cache. --- ## Errors -The API answers each request below with HTTP `400`. The body carries the code and the title, and a field error also points at the field. +The API answers each request below with HTTP `400`. The body carries the code, the title, and a detail, and a field error also points at the field. + +| Code | Title | Cause | Detail | What to do | +| --- | --- | --- | --- | --- | +| `21021` | `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module` | `modules.cache.max_age` is below 60 on an Application without Application Accelerator. | `The value is lower than the minimum required when the Application's Application Accelerator Module is disabled.`, at `/data/modules/cache/max_age`, with `meta.min_value` set to `60` | Set `modules.cache.max_age` to 60 or more, or turn on Application Accelerator on the Application. | +| `21020` | `Edge Cache Max Age Lower Than The Minimum Allowed By The Tiered Cache Module` | `modules.cache.max_age` is below 3, with `tiered_cache.enabled` set to `true` and Application Accelerator on. | `The value is lower than the minimum required by the Tiered Cache Module.`, at `/data/modules/cache/max_age`, with `meta.min_value` set to `3` | Set `modules.cache.max_age` to 3 or more, or turn Tiered Cache off. | +| `21001` | `It's Not Possible To Use This Edge Cache Behavior.` | `tiered_cache.enabled` is `true` while `modules.cache.behavior` is `honor`. | `It's not possible to use this edge cache behavior while using Tiered Cache.`, at `/data/modules/cache/behavior` | Set `modules.cache.behavior` to `override`; from the CLI, send the body with `--file`. | +| `21013` | `This Configuration Requires The Edge Application's Application Accelerator Module` | A `modules.application_accelerator` field varies the cache, with a `behavior` other than `ignore` or a method in `cache_vary_by_method`, on an Application without Application Accelerator. | `To use this value, you must first enable the Application Accelerator module in Edge Application's Main Settings.`, at the field, such as `/data/modules/application_accelerator/cache_vary_by_method` | Set `modules.application_accelerator.enabled` to `true` on the Application, or remove the field. [Main Settings](/en/documentation/platform/applications/main-settings/) shows where in Azion Console. | +| `21018` | `Query String Fields Are Required For Current Cache Vary By Query String Behavior` | `cache_vary_by_querystring.behavior` is `allowlist` or `denylist`, and `fields` is empty. | `The current behavior requires you to configure query string fields.`, at `/data/modules/application_accelerator/cache_vary_by_querystring/fields` | List at least one field, or set the behavior to `ignore` or `all`. | +| `21014` | `Cannot Delete Cache Setting` | A `DELETE` targets a setting that a rule's _Set Cache Policy_ behavior still uses. | `This Cache Setting cannot be deleted because it is being used.`, at `/data` | Change or delete that rule, then repeat the `DELETE`. | +| `10068` | `Max Value` | `modules.cache.max_age` or `browser_cache.max_age` is above 31,536,000, or `large_file_cache.offset` is above 1,024. | `Ensure this value is less than or equal to 31536000.`; for the offset, `Ensure this value is less than or equal to 1024.` | Lower the value to the ceiling the detail names. | +| `10046` | `Max Length` | `name` is longer than 250 characters. | `Ensure this field has no more than 250 characters.` | Shorten the name to 250 characters or fewer. | +| `10039` | `Invalid Choice` | `tiered_cache.topology` is not a topology the API accepts. | `"" is not a valid choice.`, at `/data/modules/cache/tiered_cache/topology` | Send a topology that the [Azion API reference](https://api.azion.com/) lists, such as `nearest-region` or `us-east-1`. | +| `10012` | `Unique Field` | `name` repeats the name of another cache setting of the same Application. | `This field must be unique.`, at `/data/name` | Choose a name that no other cache setting of the Application uses. | -| Code | Title | Cause | What to do | -| --- | --- | --- | --- | -| `21021` | `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module` | `modules.cache.max_age` is below 60 on an application without Application Accelerator; `meta.min_value` is `60`, and the detail reads `The value is lower than the minimum required when the Application's Application Accelerator Module is disabled.` and points at `/data/modules/cache/max_age`. | Set **Max Age** to 60 or more, or turn on Application Accelerator on the application. | -| `21020` | `Edge Cache Max Age Lower Than The Minimum Allowed By The Tiered Cache Module` | `modules.cache.max_age` is below 3 with `tiered_cache.enabled` set to `true`; `meta.min_value` is `3`, and the detail reads `The value is lower than the minimum required by the Tiered Cache Module.` and points at `/data/modules/cache/max_age`. | Set **Max Age** to 3 or more, or turn Tiered Cache off. | -| `21001` | `It's Not Possible To Use This Edge Cache Behavior.` | `tiered_cache.enabled` is `true` while `modules.cache.behavior` is `honor`; the detail reads `It's not possible to use this edge cache behavior while using Tiered Cache.` and points at `/data/modules/cache/behavior`. `azion create cache-setting --tiered-caching-enabled true` sends this combination, because no flag sets the behavior. | Set `modules.cache.behavior` to `override`; from the CLI, send the body with `--file`. | -| `21013` | `This Configuration Requires The Edge Application's Application Accelerator Module` | A `modules.application_accelerator` field is sent for an application without the module; the detail reads `To use this value, you must first enable the Application Accelerator module in Edge Application's Main Settings.` and points at the field, such as `/data/modules/application_accelerator/cache_vary_by_method`. | Turn on **Application Accelerator** under **Main Settings** > **Modules**, or remove the field. | -| `21018` | `Query String Fields Are Required For Current Cache Vary By Query String Behavior` | `cache_vary_by_querystring.behavior` is `allowlist` or `denylist` and `fields` is empty; the detail reads `The current behavior requires you to configure query string fields.` and points at `/data/modules/application_accelerator/cache_vary_by_querystring/fields`. | List at least one field, or set the behavior to `ignore` or `all`. | -| `21014` | `Cannot Delete Cache Setting` | A `DELETE` targets a setting that a rule's **Set Cache Policy** behavior still names; the detail reads `This Cache Setting cannot be deleted because it is being used.` and points at `/data`. | Change or delete that rule, then repeat the `DELETE`. | -| `10068` | `Max Value` | `modules.cache.max_age` or `browser_cache.max_age` is above 31,536,000, with the detail `Ensure this value is less than or equal to 31536000.`; or `large_file_cache.offset` is above 1,024, with the detail `Ensure this value is less than or equal to 1024.` | Lower the value to the ceiling the detail names. | -| `10046` | `Max Length` | `name` is longer than 250 characters; the detail reads `Ensure this field has no more than 250 characters.` | Shorten the name to 250 characters or fewer. | -| `10039` | `Invalid Choice` | `tiered_cache.topology` is not a topology the API accepts. | Send a topology such as `nearest-region` or `us-east-1`. | +`azion create cache-setting --tiered-caching-enabled true` returns `21001`, because the CLI sets the cache behavior only through `--file`, so the setting keeps the `honor` default. --- @@ -180,12 +191,11 @@ The bounds below apply to one cache setting. Each row names the API's answer pas | `name` | 1 to 250 characters | HTTP `400`, error `10046` | | `modules.cache.max_age` | 0 to 31,536,000 seconds | HTTP `400`, error `10068` above the maximum | | `modules.cache.max_age` without Application Accelerator | at least 60 seconds | HTTP `400`, error `21021` | -| `modules.cache.max_age` with Tiered Cache on | at least 3 seconds | HTTP `400`, error `21020` | +| `modules.cache.max_age` with Tiered Cache and Application Accelerator on | at least 3 seconds | HTTP `400`, error `21020` | | `browser_cache.max_age` | 0 to 31,536,000 seconds | HTTP `400`, error `10068` | -| `cache_vary_by_method` | at most 2 values | The spec caps the array at 2 items; no error string is documented | -| `large_file_cache.offset` | 1,024 kB, fixed | HTTP `400`, error `10068` above 1,024. To change the fragment size, contact the Sales team | +| `large_file_cache.offset` | 1,024 kB, fixed | HTTP `400`, error `10068` above 1,024 | -For purge limits and the amounts each plan includes, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache). +`cache_vary_by_method` takes at most 2 values. The API accepts only 1,024 in `large_file_cache.offset`. To change the fragment size, contact the [Sales team](https://www.azion.com/en/contact/). For the size of a cached object and purge limits, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache). --- @@ -195,7 +205,7 @@ For purge limits and the amounts each plan includes, refer to [Applications limi The Console, API, and CLI steps that create a setting and apply it with a rule. What the TTL, stale cache, Large File Optimization, and Tiered Cache do to a request. - The key each variation in these tables appends to, and the debug headers that show it. + The key each variation in these tables adds to, and the debug headers that show it. The Console steps that set a TTL for a path and bypass the cache for another. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/device-groups.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/device-groups.mdx index 0513b0a94d..a4b4cacd8a 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/device-groups.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/device-groups.mdx @@ -10,19 +10,30 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -A device group is a name and a regular expression that an [application](/en/documentation/platform/applications/) compares with the `User-Agent` header of each request. A request whose header matches the expression belongs to the group, so a [rule](/en/documentation/platform/applications/rules-engine/) or a [cache setting](/en/documentation/platform/applications/cache/cache-settings/) can treat those devices apart from the rest. Each application holds its own device groups, and Azion Console lists them in the application's **Device Groups** tab. +Device Groups is a Feature of Applications that groups the requests received by an [Application](/en/documentation/platform/applications/) according to the client device. A device group is a name and a regular expression that the Application compares with the `User-Agent` header of each request. A request belongs to the group when its header matches the expression. Device groups require [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) turned on in the Application. A [rule](/en/documentation/platform/applications/rules-engine/) or a [cache setting](/en/documentation/platform/applications/cache/cache-settings/) can then treat those devices apart from the rest. Each Application holds its own device groups, and [Create device groups](/en/documentation/guides/application-development/getting-started/create-device-groups/) shows how to add one in Azion Console. --- ## Device group fields -A device group carries two fields that you set and an ID that the platform assigns. A rule refers to a device group by its name, and a cache setting refers to it by its ID. +A device group carries two fields that you set, and an ID and a creation date that the platform assigns. A rule refers to a device group by its name, and a cache setting refers to it by its ID. For the two fields you set, the Field column gives the label that Azion Console shows. -| Field | Type | Description | -| --- | --- | --- | -| **Name** | string | The name of the group. A rule compares `${device_group}` with this name, and the cache key of a copy that varies by device ends with it. The Console shows `Name must be alphanumeric` for a name with other characters | -| **Regular Expression** | string | The expression compared with the contents of the `User-Agent` header, in the **Match to User-Agent** section of the form. It follows the PCRE standard. The Console shows `Enter a valid regular expression pattern.` for an expression it cannot read, and `User Agent cannot contain emojis or null bytes` for an expression that carries either | -| ID | integer | The identifier of the group. The `cache_vary_by_devices.device_group` field of a cache setting lists device groups by this ID | +| Field | API field | Type | Bounds in the API | Description | +| --- | --- | --- | --- | --- | +| **Name** | `name` | string | 1 to 250 characters, letters and numbers only | The name of the group. A rule compares `${device_group}` with this name | +| **Regular Expression**, in **Match to User-Agent** | `user_agent` | string | 1 to 512 characters | The expression compared with the contents of the `User-Agent` header | +| ID | `id` | integer | Read-only | The identifier of the group | +| Creation date | `created_at` | date-time | Read-only | When the group was created | + +The cache key of a copy that varies by device ends with the name of the group. The name takes only letters and numbers, with no spaces or symbols, and the API refuses another name with HTTP `400` and error `27003`, `Device Group Invalid Name`. In Azion Console, the **Name** field states `Use only letters and numbers, without spaces or symbols.` The Console shows `Name must be alphanumeric` for a name with other characters. + +The regular expression follows Perl Compatible Regular Expressions (PCRE). Azion Console shows these messages for an expression it refuses: + +- `Enter a valid regular expression pattern.` for an expression it cannot read. +- `User Agent cannot contain emojis or null bytes` for an expression that carries either. +- `User Agent cannot contain < > " or '` for an expression that carries one of those characters. + +The `cache_vary_by_devices.device_group` field of a cache setting lists device groups by their ID. --- @@ -48,7 +59,7 @@ User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Fir ## User-Agent matching -An application compares the **Regular Expression** of a device group with the contents of the `User-Agent` header, and a request belongs to the group when the expression matches. The expression does not have to match the whole header, because a match on part of it is enough. For example, a group named `Mobile` with this expression matches the headers of most mobile devices: +An Application compares the regular expression of each device group with the `User-Agent` header. A request belongs to a group when the expression matches. The expression does not have to match the whole header, because a match on part of it is enough. For example, a group named `Mobile` with this expression matches the headers of most mobile devices: ```text (Mobile|iP(hone|od)|BlackBerry|IEMobile) @@ -56,7 +67,7 @@ An application compares the **Regular Expression** of a device group with the co ### Match order -When a `User-Agent` header matches more than one device group, the request takes the first group that matches, from first to last in the list of device groups. The position of the matching words inside the header does not change the result. For example, an application holds these three device groups, in this order: +When a `User-Agent` header matches more than one device group, the request takes the first group that matches, from first to last in the list of device groups. The position of the matching words inside the header does not change the result. For example, an Application holds these three device groups, in this order: | Order | Device group | Regular expression | | --- | --- | --- | @@ -70,7 +81,7 @@ A header that contains `Android Tablet Mobile (Mozilla Firefox)` matches all thr ## Rules Engine variable -In Rules Engine for Applications, the `${device_group}` variable holds the name of the device group that a request belongs to. A criterion compares it with the name of a group as its argument, so the behaviors of the rule apply only to the requests from that group. The variable requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/) on the application. +In Rules Engine for Applications, the `${device_group}` variable holds the name of the device group that a request belongs to. A criterion compares it with the name of a group, given as its argument. The behaviors of the rule then apply only to the requests from that group. The variable requires [Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/) turned on in the Application. This criterion matches a request from the `Mobile` device group: @@ -90,11 +101,44 @@ For every variable and operator a rule can use, refer to [Rules Engine for Appli ## Cache variation -A cache setting can deliver one version of an object to every device, or keep a separate copy for each device group it names. In Azion Console, the control is **Cache vary by Devices** › **Behavior**, in the **Application Accelerator** section of the cache setting. In the API, the control writes `modules.application_accelerator.cache_vary_by_devices`, whose `device_group` field lists device groups by ID. A cache setting that does not set the control carries `"behavior": "ignore"` and an empty `device_group` list. Azion CLI has no flag for device group variation. +A cache setting can vary the cache key by device group. With the variation, [Cache](/en/documentation/platform/applications/cache/) stores a separate copy of an object for each device group that the cache setting lists. Otherwise, Cache answers every device with the same copy. In the API, the variation is the `modules.application_accelerator.cache_vary_by_devices` field, whose `device_group` field lists device groups by ID. A cache setting that does not set the variation carries `"behavior": "ignore"` and an empty `device_group` list. [Azion CLI](/en/documentation/devtools/cli/) has no flag for device group variation. + +The `modules.application_accelerator` object of a cache setting requires Application Accelerator turned on in the Application. Without it, the API refuses with error `21013` a variation of that object whose `behavior` is not `ignore`. For the values each field takes and its label in Azion Console, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation). + +Each copy that varies by device group has its own cache key. The key ends in `@@` and the name of the device group, such as `httpwww.example.com/@@Mobile`. A URL purge does not reach these copies, so purge them by cache key or with a wildcard. For the key format, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#variations). For the purge types, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#url-purge). + +--- + +## API -The **Application Accelerator** section of a cache setting requires Application Accelerator on the application, and without it the API refuses the section's fields with error `21013`. For the values each field takes, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/#cache-variation). +The API serves the device groups of an Application at `https://api.azion.com/v4/workspace/applications//device_groups`. Each call authenticates with a [personal token](/en/documentation/fundamentals/personal-tokens/) in the `Authorization: Token [TOKEN VALUE]` header, and a call with a body also sends `Content-Type: application/json`. + +| Operation | Method and path | +| --- | --- | +| Create a device group | `POST /workspace/applications//device_groups` | +| List the device groups of an Application | `GET /workspace/applications//device_groups` | +| Read one device group | `GET /workspace/applications//device_groups/` | +| Replace a device group | `PUT /workspace/applications//device_groups/` | +| Change part of a device group | `PATCH /workspace/applications//device_groups/` | +| Delete a device group | `DELETE /workspace/applications//device_groups/` | + +A create request requires `name` and `user_agent`. The platform assigns `id` and `created_at`. While Application Accelerator is off in the Application, the API refuses the create request with HTTP `403` and error `27002`, `Application Acceleration Not Enabled`. + +--- + +## CLI + +Azion CLI manages device groups with five commands under the `device-group` noun. Every command takes `--application-id`, and a command that acts on one device group takes its ID in `--group-id`. + +| Command | What it does | Flags | +| --- | --- | --- | +| `azion create device-group` | Creates a device group | `--application-id`, `--name`, `--user-agent`, `--file` | +| `azion list device-group` | Lists the device groups of an Application | `--application-id`, `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion describe device-group` | Returns one device group | `--application-id`, `--group-id` | +| `azion update device-group` | Changes a device group | `--application-id`, `--group-id`, `--name`, `--user-agent`, `--file` | +| `azion delete device-group` | Deletes a device group | `--application-id`, `--group-id` | -Each copy that varies by device group has its own cache key, which ends in `@@` and the name of the device group, such as `httpwww.example.com/@@Mobile`. A URL purge does not reach these copies, so purge them by cache key or with a wildcard. For the key format, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/#variations). For the purge types, refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#url-purge). +`--name` sets the `name` field, and `--user-agent` sets the regular expression in `user_agent`. `--file` reads the device group from a JSON file instead. --- @@ -102,9 +146,9 @@ Each copy that varies by device group has its own cache key, which ends in `@@` - How an application runs its rules and its cache on a request. + How an Application runs its rules and its cache on a request. The procedure that creates a device group in Azion Console. - The first application, before you add device groups to it. - The terms an application uses, device group among them. + The first Application, before you add device groups to it. + The words the Applications pages use with a specific meaning, device group among them. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-application.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-application.mdx index 4a7e13503f..ad5f3945f6 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-application.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-application.mdx @@ -1,6 +1,6 @@ --- title: Applications -description: 'An application decides where each request goes, what is cached, and what code runs. Enable Cache, Application Accelerator, and Image Processor on it.' +description: 'Route requests to your origins, cache responses, and run code with the rules of an Application, then turn on Application Accelerator or Image Processor.' meta_tags: 'applications, rules engine, connector, origin, cache, application accelerator, image processor, functions, workload' namespace: documentation_products_edge_applications permalink: /documentation/platform/applications/ @@ -13,18 +13,61 @@ import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet. [Applications | v3](/en/documentation/platform/applications/v3/) -A reverse proxy is a server that receives requests in place of the servers that hold your content, the origins. It reads each request before an origin does and decides what happens to it. It can answer from a copy it stored earlier, add or remove a header, run code, or pass the request to an origin and relay the answer. Clients reach one domain, and logic that each origin would otherwise carry runs in front of all of them. +**Applications** is a Platform Resource that processes the requests received by your [Workloads](/en/documentation/platform/workloads/). An Application can run serverless functions, act as a reverse proxy for your origins, or combine the two, on Azion's distributed infrastructure, from the data center nearest to your user. A serverless function is a [Function](/en/documentation/platform/functions/), code run on demand at each request, with no server for you to provision. A reverse proxy is a server in front of your origin, the server that holds your content. The proxy can answer each request with a cached copy of an earlier origin response, add or remove headers, or route the request to your origin. Every request passes through the proxy, so your clients reach a single domain, and the proxy applies the logic that each origin would otherwise repeat. -**Applications** is the Platform Resource that runs that proxy on Azion's distributed infrastructure, close to your users, for each [workload](/en/documentation/platform/workloads/) whose deployment names it. An application acts through rules, which run in a request phase and a response phase. Its rules decide which [connector](/en/documentation/platform/connectors/) takes a request to your origin, what is answered from a stored copy, and which function runs. Use Applications to route each path to its origin, cache responses, add or filter headers, rewrite requests, run your own code, or resize and convert images on demand. +An Application receives the requests of a Workload once that Workload's deployment sets that Application. On each request, the Application runs its rules. A rule can set the [Connector](/en/documentation/platform/connectors/) that routes the request to your origin, decide whether the response is cached, or run a Function. Use Applications to route each path to its origin, cache responses, add or remove headers, rewrite requests, run your own code on the requests a rule matches, or resize and convert images on demand. --- +## Request path + +Creating an Application routes no request to it: a Workload's deployment has to set that Application first. An Application also reaches an origin only through a rule that sets a Connector. The diagram follows a request that takes that path. In place of an origin, a Function can answer a request: a rule runs the Function with _Run Function_, and the Function builds the response with no Connector. + +Solid arrows carry the request, and dotted arrows carry the response. Each label starts with the number of its step below. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Client"]) + WL["Workload"] + FW["Firewall"] + App["Application"] + Cache["Cache"] + Conn["Connector"] + Origin[["origin server"]] + Client -->|"1. request"| WL + WL -->|"1. with a Firewall"| FW + WL -->|"1. without a Firewall"| App + FW -->|"1. allowed"| App + FW -.->|"1. refusal"| Client + App -.->|"2. Deny (403)"| Client + App -->|"3. cache setting"| Cache + Cache -.->|"3. valid copy"| App + App -->|"4. no valid copy"| Conn + Conn -->|"4. request"| Origin + Origin -.->|"4. response"| Conn + Conn -.->|"4. response"| App + App -.->|"5. response"| Client +``` + +1. The request reaches a Workload through one of its domains, and the Workload's deployment sets the Application. In Azion Console, you set it in the **Application** field of **Deployment Settings**. A [Firewall](/en/documentation/platform/firewall/) that the deployment also sets runs its rules first, and it can stop the request there. +2. The Application's Request Phase rules run in order. When a behavior, the action a rule runs, ends the processing, as _Deny (403 Forbidden)_ does, the Application answers the client, and no later rule runs. +3. If a rule with the _Set Cache Policy_ behavior applied a cache setting, [Cache](/en/documentation/platform/applications/cache/) looks for a valid copy of the origin response. When Cache holds one, that copy becomes the response, and the origin receives no request. +4. Otherwise, the Connector set by a rule with _Set Connector_ routes the request to the origin. If several matching rules carry _Set Connector_, only the last of them runs. +5. The Application's Response Phase rules then run on the response, and the response reaches the client. + +A new Application starts with Cache and [Functions](/en/documentation/platform/functions/) on, Application Accelerator and [Image Processor](/en/documentation/platform/applications/image-processor/) off, and no rules. + +A change does not take effect at once: it propagates, and Azion guarantees no propagation time. Until the deployment of a new Workload propagates, which can take several minutes, the Workload answers with Azion's placeholder `404`. During that time, answers alternate between the placeholder and the Application's response, so repeat the request until they agree. For how the two phases work, the order of rules and behaviors, and propagation, refer to [How Applications works](/en/documentation/platform/applications/how-it-works/). + +--- + ## Rule structure -Rules carry the logic of an application. A rule tests each request against its criteria and, when the request matches, runs its behaviors. Sent as the body of `POST /v4/workspace/applications//request_rules`, this rule hands every request to the connector that reaches your origin: +A rule is the unit of logic in an Application. Its criteria test each request, and its behaviors run on a request that matches. To route every request to the Connector that reaches your origin, send this rule as the body of `POST /v4/workspace/applications//request_rules`: ```json { @@ -49,91 +92,75 @@ Rules carry the logic of an application. A rule tests each request against its c } ``` -- `criteria` holds groups of conditions, and the first condition of a group opens with `if`. Here, `${uri}`, the URI without its query string, matches every request with `starts_with` and `/`, because every path starts with `/`. The same rule on `${request_uri}`, which keeps the query string, is refused with `400` and error `25047` while Application Accelerator is off. -- `behaviors` lists what the rule does to each request it matches. `set_connector` hands the request to the connector whose ID is in `attributes.value`, and the connector holds the address of your origin. -- `name` and `active` are the rule's own fields. The API answers `202` and returns the rule with `order` set to `0`, its position among the Request Phase rules of the application. -- Azion Console builds the same rule in the application's **Rules Engine** tab, from **+ Rule**, _Request Phase_, a criterion on `${uri}`, and the _Set Connector_ behavior. +- `criteria` holds groups of conditions, and each group starts with a condition whose `conditional` is `if`. Here, `${uri}` is the URI without its query string. Every path starts with `/`, so `starts_with` and `/` match every request. If the rule tests `${request_uri}` instead, which keeps the query string, the API refuses it with `400` and error `25047` while [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) is off. +- `behaviors` lists the actions the rule runs on a matching request. `set_connector` routes the request to the Connector whose ID is in `attributes.value`. That Connector holds the address of your origin. +- `name` and `active` belong to the rule itself. +- You can also build the same rule in Azion Console, as [Applications quickstart](/en/documentation/platform/applications/quickstart/) shows. -If you have routed traffic by path in a reverse proxy, the model transfers: criteria are the match condition, behaviors the action, and a connector the backend server. +When you send the rule, the API answers `202` and returns it with `order` set to `0`. That value is the rule's position among the Request Phase rules of the Application. ---- - -## Request path - -Creating an application serves nothing. An application handles only the requests of a workload whose deployment names it, and it reaches an origin only through a rule that names a connector. - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Q["Request to the domain of a workload"] --> D["Workload deployment: names one application"] - D -->|"The deployment also names a firewall"| FW["Firewall: runs its rules first and can stop the request"] - D -->|"No firewall"| R["Application: runs its Request Phase rules, in order"] - FW -->|"The request continues"| R - R -->|"A Set Cache Policy rule applied, and a valid copy is stored"| C["Cache answers from the stored copy"] - R -->|"No stored copy"| O["The connector that a Set Connector rule names takes the request to the origin"] - C --> P["Application: runs its Response Phase rules on the response"] - O --> P - P --> A["The client receives the response"] -``` - -1. A workload receives the request, and its deployment names the application. In Azion Console, the binding is the **Application** field of **Deployment Settings**. When the deployment also names a [firewall](/en/documentation/platform/firewall/), the firewall runs its rules first and can stop the request. -2. The application runs its Request Phase rules, in order. A behavior that ends the processing, such as _Deny (403 Forbidden)_, answers the client, and no later rule runs. -3. When a _Set Cache Policy_ rule applied a cache setting and a valid copy is stored, Cache answers from the copy, and the origin is not asked. -4. Otherwise, the connector that a _Set Connector_ rule names takes the request to the origin. When several matching rules carry _Set Connector_, only the last one runs. -5. The application runs its Response Phase rules on the response, and the client receives it. - -A new application has Cache and Functions on, Application Accelerator and Image Processor off, and no rules. Until a rule names a connector, it has no origin to send a request to. No propagation time is guaranteed for a change. A new workload answers with Azion's placeholder `404` until its binding to the application propagates, which can take several minutes. Until then, answers alternate between the placeholder and the application, so send the request again until they agree. For the two phases, the order in which rules and behaviors run, and propagation, refer to [How Applications works](/en/documentation/platform/applications/how-it-works/). +The model matches path-based routing in a reverse proxy: each criterion is a match condition, each behavior is an action, and a Connector holds the address of the backend server. --- ## Resources -Cache, Application Accelerator, and Image Processor are Products enabled on an application, each with its own switch in [Main Settings](/en/documentation/platform/applications/main-settings/#products) › **Modules**. +Cache, Application Accelerator, and Image Processor act on the requests of an Application. Each Application turns Application Accelerator and Image Processor on separately, and [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) shows where in Azion Console and the API. ### Cache -Cache answers later requests for an object from a copy of the origin response, kept in the data center that fetched it until its time to live (TTL) ends. Use it to keep static files close to your users, serve large video files in fragments, keep answering while the origin is down, or remove a copy the moment the origin changes. Cache is on in every new application, but it stores nothing until a _Set Cache Policy_ rule applies a cache setting, the object that holds the TTLs. +Cache is a Platform Resource that stores copies of the responses to the requests received by an Application. Each copy stays in the data center that stored it, and later requests for the same object get that copy until its time to live (TTL) ends. Cache is always on in an Application. It starts storing copies once a _Set Cache Policy_ rule applies a cache setting, which holds the TTLs. Use Cache to: + +- Keep static files in the data center nearest to your user +- Serve large video files in fragments, with Large File Optimization turned on in the cache setting +- Answer requests with an expired copy when the origin fails to answer, with stale cache turned on in the cache setting +- Remove a copy when the origin changes, with [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) -For what a cache setting holds, how a request reaches a stored copy, and where to start, refer to the [Cache overview](/en/documentation/platform/applications/cache/). +The [Cache overview](/en/documentation/platform/applications/cache/) explains what a cache setting holds, how a request reaches a stored copy, and where to start. ### Application Accelerator -Application Accelerator decides what besides the URL makes two requests different, such as a query-string argument, a cookie, the device group, or the request method, and Cache then keeps a separate copy for each. Turn it on when one URL has more than one correct response, such as a personalized page, an API response that changes with a query string, a catalog that differs by device, or a response to a `POST`. Its switch is off on a new application. +Application Accelerator is a Platform Resource that unlocks four capabilities for the cache and the rules of an Application: cache variation, the caching of `POST` and `OPTIONS` responses, a Max Age below 60 seconds, and further Rules Engine behaviors and variables. With cache variation, a cache setting tells apart two requests for the same URL by a query-string argument, a cookie, the device group, or the request method, and Cache keeps a separate copy for each value. Application Accelerator starts off in a new Application. Turn it on when one URL has more than one correct response, for example: + +- A personalized page +- An API response that changes with its query string +- A catalog that differs by device +- A response to a `POST` -For what a variation adds to the cache key, what the switch unlocks, and where to start, refer to the [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/). +The [Application Accelerator overview](/en/documentation/platform/applications/application-accelerator/) explains what a variation adds to the cache key, what turning it on unlocks, and where to start. ### Image Processor -Image Processor builds a derived image from the source image on the origin, following the `ims` query string of the request, such as `?ims=fit-in/400x400`, and never saves the result as an asset of the account. Turn it on when pages need one image in several sizes, crops, qualities, or formats, such as WEBP for the browsers that accept it, without storing or uploading a file for each variant. Its switch is off on a new application, and turning it on processes nothing by itself: a Request Phase rule with _Optimize Images_ decides which requests reach it. +Image Processor is a Platform Resource that builds a new image, the derived image, from an image on your origin. The `ims` query string of the request describes the derived image, such as `?ims=fit-in/400x400`, and even with no `ims` query string, Image Processor can convert an image to a format the browser accepts. It returns the derived image without saving it as an asset of the account. It starts off in a new Application, and even when it is on, Image Processor processes only the requests that a Request Phase rule with _Optimize Images_ matches. Turn it on when your pages need one image in several sizes, crops, qualities, or formats, such as WEBP for browsers that accept it. Every variant then comes from one file on your origin, so you store and upload only that file. -For how a request becomes a derived image, what `ims` accepts, and where to start, refer to the [Image Processor overview](/en/documentation/platform/applications/image-processor/). +The [Image Processor overview](/en/documentation/platform/applications/image-processor/) explains how a request becomes a derived image, what `ims` accepts, and where to start. --- ## Scope and limits -- **Phases**: a rule runs in the Request Phase, on the request before a response exists, or in the Response Phase, on the response delivered to the user. The phase is set when the rule is created and cannot change, and the choice of origin and of cache setting happens only in the Request Phase. For the variables and behaviors of each phase, and the Product each one needs, refer to [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#phases). -- **Origins**: the application record names no origin, so two rules with two connectors can send `/api/` to one server and every other path to another. Behind a connector, the origin can be web servers in your infrastructure, a cloud service, or an [Object Storage](/en/documentation/platform/object-storage/) bucket, as [Use a bucket as an application origin](/en/documentation/guides/application-development/data/use-bucket-as-origin/) shows. One connector can spread traffic across several origins through [Load Balancer](/en/documentation/platform/connectors/load-balancer/). Azion Console states that origins have been redesigned as connectors. -- **Functions**: an application runs your code through a [function instance](/en/documentation/platform/applications/functions-instances/), which binds one function from [Functions](/en/documentation/platform/functions/) to the application with its own arguments. A rule with _Run Function_ invokes the instance, and an instance that no rule names never runs. **Functions** is on in a new application. For the Response Phase, the instance form in Azion Console states `Only Lua functions can be used in the Response phase.` To attach your first function, refer to [Instantiate a function on an application](/en/documentation/guides/application-development/getting-started/instantiate-functions/). -- **Cache and images in code**: Cache runs no code, so a function that reads and writes cached entries uses the [Cache API](/en/documentation/devtools/runtime/api-reference/cache/). A function that processes images itself uses the WASM Image Processor library, a surface other than Image Processor, as [Where Image Processor stops](/en/documentation/platform/applications/image-processor/image-delivery/#where-image-processor-stops) explains. -- **Devices**: a [device group](/en/documentation/platform/applications/device-groups/) names the devices whose `User-Agent` header matches a regular expression. A rule tests it through `${device_group}`, and a cache setting can keep one copy per group, both with Application Accelerator on. For an expression that matches only the devices you mean, refer to [Applications best practices](/en/documentation/platform/applications/best-practices/#match-a-device-group-on-the-words-that-only-that-device-sends). -- **WebSocket**: [WebSocket Proxy](/en/documentation/platform/applications/websocket/) carries a WebSocket connection, opened with the `Upgrade: websocket` and `Connection: upgrade` headers, between your users and the origin through an application. It is not enabled on an account by default, and Azion enables it on request. To request it, refer to [Support guidelines](/en/documentation/support/). Azion recycles keepalive connections approximately every 15 minutes, so the client reopens a WebSocket connection that closes. -- **Workloads**: domains, protocols, and certificates belong to the workload that serves the application, so an application carries no delivery settings of its own. _Redirect HTTP to HTTPS_ needs HTTPS on the workload. The error page a client sees when the connector receives a 4xx or 5xx response from your origin is set by [Custom Pages](/en/documentation/platform/workloads/#custom-pages) on the workload. To request an application on your own domain from one device before you change its DNS records, refer to [Test an application through the hosts file](/en/documentation/guides/application-development/getting-started/stage-applications-through-hosts-file/). -- **Interfaces**: you create and manage applications on the **Applications** page of [Azion Console](https://console.azion.com). Each application has the **Main Settings**, **Device Groups**, **Cache Settings**, **Functions Instances**, and **Rules Engine** tabs. **Clone**, a row action of the **Applications** list, creates a separate application that starts with the settings of the original, as [Clone an application](/en/documentation/guides/application-development/getting-started/clone-applications/) shows. The [Azion API](https://api.azion.com/) serves applications at `/v4/workspace/applications`, and [Azion CLI](/en/documentation/devtools/cli/) manages them with commands such as `azion create application`, `azion update application`, and `azion create rules-engine`. [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/), [Azion Lib](/en/documentation/devtools/azion-lib/application/), and the [Azion Terraform provider](/en/documentation/devtools/terraform/) also create and configure applications. An account that has not migrated to API v4 follows [Applications | v3](/en/documentation/platform/applications/v3/). -- **Observability**: with **Debug Rules** on in [Main Settings](/en/documentation/platform/applications/main-settings/#debug-rules), [Real-Time Events](/en/documentation/platform/real-time-events/) and [Data Stream](/en/documentation/platform/data-stream/) show the rules each request ran, in the `$traceback` field. The setting is off on a new application. A response to a request sent with `Pragma: azion-debug-cache` reports its cache status, such as `HIT` or `MISS`, in the `x-cache` header. [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) shows Cache and Tiered Cache traffic. For the tools and queries, refer to [Troubleshoot Applications](/en/documentation/platform/applications/troubleshooting/) and [Troubleshoot Applications](/en/documentation/platform/applications/troubleshooting/#a-problem-shows-in-traffic-but-not-in-the-responses-you-request). -- **Limits**: an application holds up to 200 rules across both phases. A rule carries 1 to 5 groups of 1 to 10 criteria, and 1 to 10 behaviors. A cache setting takes a **Max Age** of at least 60 seconds without Application Accelerator, and a single cached object can reach 10 GB. For every bound, the answer past it, and the bounds of each Product, refer to [Applications limits](/en/documentation/platform/applications/limits/). -- **Billing**: Cache is billed on purges, Application Accelerator on data transfer, and Image Processor on processed images, and turning on a Product can generate usage-related costs. Each plan includes an amount of each, such as 1,000 purges a month on Hobby and 2,000 on Pro. For the amounts, refer to [Applications limits](/en/documentation/platform/applications/limits/#included-usage-per-plan), and for the rates, refer to [Pricing](/en/documentation/fundamentals/pricing/). -- **Terms**: the [Applications glossary](/en/documentation/platform/applications/glossary/) defines the words the Applications pages give a specific meaning, such as rule, phase, behavior, cache setting, cache key, and derived image. +- **Phases**: every rule belongs to one of two phases. The Request Phase acts on the request before a response exists, and the Response Phase acts on the response that the user receives. You choose the phase when you create the rule, and you cannot change it later. Only Request Phase rules can choose the origin and the cache setting. [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/#phases) lists the variables and behaviors of each phase and the Platform Resource that each one needs. +- **Origins**: an Application reaches each origin through a Connector, so two rules with two Connectors can route `/api/` to one server and every other path to another. The origin behind a Connector can be a web server in your infrastructure, a cloud service, or an [Object Storage](/en/documentation/platform/object-storage/) bucket. [Use a bucket as an application origin](/en/documentation/guides/application-development/data/use-bucket-as-origin/) shows the bucket case. With [Load Balancer](/en/documentation/platform/connectors/load-balancer/) enabled, one Connector of the `http` type can spread traffic across several origins. Connectors replace the origins that earlier versions of Applications configured on the Application. +- **Functions**: a [Function Instance](/en/documentation/platform/applications/functions-instances/) binds one of your [Functions](/en/documentation/platform/functions/) to the Application, with its own arguments. A Function Instance belongs to one Application, and it runs only when a rule with _Run Function_ invokes that Function Instance. Functions starts on in a new Application, in its `modules.functions.enabled` field in the API. Only Functions written in Lua run in the Response Phase, as the Function Instance form in Azion Console states: `Only Lua functions can be used in the Response phase.` For the steps to add your first Function, refer to [Instantiate a function on an application](/en/documentation/guides/application-development/getting-started/instantiate-functions/). +- **Cache and images in code**: code that reads or writes cached entries runs in a Function and uses the [Cache API](/en/documentation/devtools/runtime/api-reference/cache/), because Cache itself cannot run code. A Function that processes images on its own uses the WASM Image Processor library, which is separate from the Image Processor Platform Resource. [Where Image Processor stops](/en/documentation/platform/applications/image-processor/image-delivery/#where-image-processor-stops) explains the difference. +- **Devices**: a [device group](/en/documentation/platform/applications/device-groups/) is a name and a regular expression that the Application compares with the `User-Agent` header of each request. Both uses of a group need Application Accelerator on: a rule tests the group through `${device_group}`, and a cache setting can keep one copy per group. [Applications best practices](/en/documentation/platform/applications/best-practices/#match-a-device-group-on-the-words-that-only-that-device-sends) shows how to write an expression that matches only the devices you mean. +- **WebSocket**: [WebSocket Proxy](/en/documentation/platform/applications/websocket/) is a Feature of Applications that carries a WebSocket connection between your users and the origin. The connection opens with the `Upgrade: websocket` and `Connection: upgrade` headers. Azion turns the Feature on for an account only on request, and [Support guidelines](/en/documentation/support/) explains how to ask. Because Azion recycles keepalive connections about every 15 minutes, the client must reopen a WebSocket connection when it closes. +- **Workloads**: a Workload holds the domains, protocols, and certificates that serve the Application, so you configure delivery on the Workload, not on the Application. [Test an application through the hosts file](/en/documentation/guides/application-development/getting-started/stage-applications-through-hosts-file/) shows how to request an Application on your own domain from one device before you change its DNS records. _Redirect HTTP to HTTPS_ works only when the Workload has HTTPS. When the Connector receives a 4xx or 5xx response from your origin, [Custom Pages](/en/documentation/platform/workloads/#custom-pages) on the Workload sets the error page that the client sees. +- **Interfaces**: in [Azion Console](https://console.azion.com), you create and manage your Applications on the **Applications** page, where each Application has five tabs: **Main Settings**, **Device Groups**, **Cache Settings**, **Functions Instances**, and **Rules Engine**. In the Console, the **Clone** row action of the **Applications** list creates a separate Application with the settings of the original, as [Clone an application](/en/documentation/guides/application-development/getting-started/clone-applications/) shows. The [Azion API](https://api.azion.com/) serves your Applications at `/v4/workspace/applications`, and [Azion CLI](/en/documentation/devtools/cli/) manages them with commands such as `azion create application`, `azion update application`, and `azion create rules-engine`. You can also create and configure your Applications with [`azion.config.js`](/en/documentation/devtools/cli/azion-config-js/), [Azion Lib](/en/documentation/devtools/azion-lib/application/), or the [Azion Terraform Provider](/en/documentation/devtools/terraform/). If your account has not migrated to API v4, use [Applications | v3](/en/documentation/platform/applications/v3/). +- **Observability**: with Debug Rules on, [Real-Time Events](/en/documentation/platform/real-time-events/) and [Data Stream](/en/documentation/platform/data-stream/) show the rules that each request ran, in the `$traceback` field. Debug Rules starts off in a new Application. It is the `debug` field of the Application in the API, and [Main Settings](/en/documentation/platform/applications/main-settings/#debug-rules) shows where to turn it on in Azion Console. To check one response, send the request with `Pragma: azion-debug-cache`: the response reports its cache status, such as `HIT` or `MISS`, in the `x-cache` header. Across all requests, [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) shows the traffic of Cache and [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/). [Troubleshoot Applications](/en/documentation/platform/applications/troubleshooting/) lists the tools and queries. For traffic that differs from what you see, refer to [A problem shows in traffic but not in the responses you request](/en/documentation/platform/applications/troubleshooting/#a-problem-shows-in-traffic-but-not-in-the-responses-you-request). +- **Limits**: an Application accepts at most 200 rules, counting both phases. Each rule has 1 to 5 groups of 1 to 10 criteria, plus 1 to 10 behaviors. Without Application Accelerator, a cache setting needs a Max Age, its `modules.cache.max_age` field, of at least 60 seconds. One cached object can be as large as 10 GB. [Applications limits](/en/documentation/platform/applications/limits/) lists every bound, what happens past it, and the bounds of each Platform Resource nested in Applications. +- **Billing**: a Platform Resource that you turn on can add costs that depend on usage. [Azion pricing](https://www.azion.com/en/pricing/) lists the plans and the usage that each plan includes, and [Pricing](/en/documentation/fundamentals/pricing/) lists the rates and the metric that each Platform Resource is billed on. +- **Terms**: the [Applications glossary](/en/documentation/platform/applications/glossary/) defines the words that the Applications pages use with a specific meaning, such as rule, phase, behavior, cache setting, cache key, and derived image. --- ## Next steps - - - - - - + + + + + + diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-functions-instances.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-functions-instances.mdx index 5c8fd91884..78f83a17dd 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-functions-instances.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/edge-functions-instances.mdx @@ -1,8 +1,8 @@ --- -title: Function instances +title: Function Instances description: >- - Bind a function to an application, set the JSON Args it receives, and invoke - it with the Run Function behavior in Rules Engine. + Look up the fields of a Function Instance, its Args, and how the Run + Function behavior invokes it. meta_tags: 'function instance, args, run function, rules engine, applications' namespace: documentation_products_edge_applications_edge_functions_instances permalink: /documentation/platform/applications/functions-instances/ @@ -12,54 +12,61 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -A function instance binds one function to one [application](/en/documentation/platform/applications/). The instance carries the **Args**, the arguments passed into the context of the function's execution in JSON format. The code of the function cannot be edited at instantiation: an instance sets the Args and nothing else. +A Function Instance is the entity that binds one [Function](/en/documentation/platform/functions/) to one [Application](/en/documentation/platform/applications/) or one [Firewall](/en/documentation/platform/firewall/). The Function Instance carries the Args, the arguments passed into the context of the Function's execution in JSON format: `args` in the API, and the **Arguments** section in Azion Console. A Function Instance sets its name, its Args, its form schema, and whether it is active, and it leaves the code of the Function as it is. -A rule in [Rules Engine](/en/documentation/platform/applications/rules-engine/) invokes the instance, not the function. The same function can be instantiated in more than one application, and each instance carries its own Args. An instance that no rule names never runs. +A rule in [Rules Engine](/en/documentation/platform/applications/rules-engine/) invokes the Function Instance, not the Function. The same Function can be instantiated in more than one Application, and each Function Instance carries its own Args. A Function Instance runs only when a rule with _Run Function_ invokes that Function Instance. -A firewall instantiates functions the same way. An instance on a firewall runs its function before the request reaches the application, so the function can stop the request there. An instance on an application runs its function as part of serving the request. Refer to [Function instances for Firewall](/en/documentation/platform/firewall/functions-instances/) for the firewall object, and to [Firewall limits](/en/documentation/platform/firewall/limits/#rules-and-function-instances) for its bounds. +A Firewall holds its own Function Instances. A Function Instance on a Firewall runs its Function before the request reaches the Application, so the Function can stop the request there. A Function Instance on an Application runs its Function as part of serving the request. For the Function Instances of a Firewall, refer to [Function instances for Firewall](/en/documentation/platform/firewall/functions-instances/). For their bounds, refer to [Firewall limits](/en/documentation/platform/firewall/limits/#rules-and-function-instances). --- -## Instance fields +## Function Instance fields -The [Azion API](https://api.azion.com/) creates an instance under the application it belongs to. These are the fields you set: +The [Azion API](https://api.azion.com/) creates a Function Instance of an Application under that Application. These are the fields you set: | Field | Type | Required | Description | | --- | --- | --- | --- | -| `name` | string | Yes | Name of the instance. | -| `function` | integer | Yes | ID of the function the instance binds. This ID differs from the ID of the instance. | -| `args` | JSON object or array | No | Arguments passed into the context of the function's execution. When the instance sets no args, the `default_args` of the function are used. | -| `azion_form` | JSON object | No | A JSON Schema that renders the args as a form. When none is set, an empty object is used. | -| `active` | boolean | No | Whether the instance is active. | +| `name` | string, 1 to 100 characters | Yes | Name of the Function Instance. | +| `function` | integer | Yes | ID of the Function the Function Instance binds, not of the Function Instance. | +| `args` | JSON object or array | No | Arguments passed into the context of the Function's execution. | +| `azion_form` | JSON object | No | A JSON Schema that renders the args as a form. | +| `active` | boolean | No | Whether the Function Instance is active. | -The API returns four more fields: `id`, the ID of the instance; `last_editor`, the email address of the account that last changed it; `last_modified`, the timestamp of that change; and `created_at`, the timestamp of creation. +When the Function Instance sets no args, the `default_args` of the Function are used. When it sets no `azion_form`, an empty object is used. -A `POST` request to the `functions` resource of an application creates an instance: +The API returns four more fields: + +- `id`, the ID of the Function Instance. +- `last_editor`, the email address of the account that last changed it. +- `last_modified`, the timestamp of that change. +- `created_at`, the timestamp of creation. + +A `POST` request to the `functions` resource of an Application creates a Function Instance: ```bash curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//functions \ + --url https://api.azion.com/v4/workspace/applications//functions \ --header 'Accept: application/json' \ --header 'Authorization: Token [TOKEN VALUE]' \ --header 'Content-Type: application/json' \ --data '{ "name": "My instance Name", - "function": , + "function": , "active": true }' ``` -The API answers with the created object: +The API answers `202` with the created object: ```json { "state": "pending", "data": { - "id": , - "name": "My Function Instance", + "id": , + "name": "My instance Name", "args": {}, "azion_form": {}, - "function": 123456, + "function": , "active": true, "last_editor": "your-email@example.com", "last_modified": "2025-08-14T16:41:56.699896Z", @@ -70,13 +77,24 @@ The API answers with the created object: The `"state": "pending"` value means the change takes a few minutes to propagate before it takes effect. -You create the same object in the **Functions Instances** tab of an application in Azion Console. In the `azion.config.js` file that [Azion CLI](/en/documentation/devtools/cli/) reads, an instance carries `name`, `args`, and `active`, and `ref` names the function by name or by ID. +The API serves the Function Instances of an Application under `/workspace/applications//functions`. In the path of one Function Instance, `` is the ID of the Function Instance, not of the Function: + +| Operation | Method and path | +| --- | --- | +| Create a Function Instance | `POST /workspace/applications//functions` | +| List the Function Instances of an Application | `GET /workspace/applications//functions` | +| Read one Function Instance | `GET /workspace/applications//functions/` | +| Replace a Function Instance | `PUT /workspace/applications//functions/` | +| Change part of a Function Instance | `PATCH /workspace/applications//functions/` | +| Delete a Function Instance | `DELETE /workspace/applications//functions/` | + +[Instantiate a function on an application](/en/documentation/guides/application-development/getting-started/instantiate-functions/) shows how to create a Function Instance in Azion Console. In the `azion.config.js` file that [Azion CLI](/en/documentation/devtools/cli/) reads, a Function Instance carries `name`, `args`, and `active`, and `ref` names the Function by name or by ID. --- ## Args -Args are the arguments an instance passes into the context of the function's execution, written as a JSON object. The code reads a key at run time and the instance decides its value, so one function behaves differently in each place it is instantiated. A function can define default Args of its own: the Args of an instance override the keys they repeat, and every key the instance leaves out keeps its default value. +Args are the arguments a Function Instance passes into the context of the Function's execution, written as a JSON object or array. The code reads a key at run time and the Function Instance decides its value, so one Function behaves differently in each place it is instantiated. A Function can define default Args of its own, and the Function reads them only when the Function Instance sets no Args. Args set in the Function Instance replace the defaults as a whole, so a key the Function Instance leaves out is absent, not kept at its default. An Args object that sets one key: @@ -86,29 +104,45 @@ An Args object that sets one key: } ``` -The Args object holds a maximum of 100 KB, and an object above that ceiling makes the function fail at instantiation. For every Functions limit, refer to [Limits](/en/documentation/platform/functions/limits/). +The Args object holds a maximum of 100 KB, and an object above that ceiling makes the Function fail at instantiation. For every Functions limit, refer to [Functions limits](/en/documentation/platform/functions/limits/). -Args are per-instance configuration. Sensitive values such as API keys, credentials, and access tokens belong in [environment variables](/en/documentation/platform/functions/environment-variables/) instead. +Args are the configuration of one Function Instance. Sensitive values such as API keys, credentials, and access tokens belong in [environment variables](/en/documentation/platform/functions/environment-variables/) instead. --- ## Run Function behavior -**Run Function** is the [Rules Engine](/en/documentation/platform/applications/rules-engine/#run-function) behavior that invokes an instance. The rule names the instance, the execution phase, and the criteria that trigger it. When a request meets those criteria, the function runs on Azion's distributed infrastructure. +_Run Function_ is the [Rules Engine](/en/documentation/platform/applications/rules-engine/#run-function) behavior that invokes a Function Instance. The rule holds the ID of the Function Instance, and the phase and the criteria of the rule decide when it runs. When a request meets those criteria, the Function runs on Azion's distributed infrastructure. -Run Function is available in the Request Phase and in the Response Phase, and it requires the [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) module. In the Azion API, the behavior is `run_function` and its `value` attribute holds the ID of the instance. +_Run Function_ is available in the Request Phase and in the Response Phase, and it requires [Functions](/en/documentation/platform/functions/) turned on in the Application. In the Response Phase, it runs only Functions written in Lua. In the Azion API, the behavior is `run_function`, and its `value` attribute holds the ID of the Function Instance. While Functions is off, the API also refuses to create a Function Instance in the Application, with HTTP `400` and error `29003`, `Edge Functions Module Is Not Enabled`. For the execution phases, the criteria, and the order behaviors run in, refer to [How Functions works](/en/documentation/platform/functions/how-it-works/). --- +## CLI + +Azion CLI manages the Function Instances of an Application with five commands under the `function-instance` noun. Every command takes `--application-id`, and a command that acts on one Function Instance takes its ID in `--instance-id`. + +| Command | What it does | Flags | +| --- | --- | --- | +| `azion create function-instance` | Creates a Function Instance | `--application-id`, `--function-id`, `--name`, `--args`, `--active`, `--file` | +| `azion list function-instance` | Lists the Function Instances of an Application | `--application-id`, `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion describe function-instance` | Returns one Function Instance | `--application-id`, `--instance-id` | +| `azion update function-instance` | Changes a Function Instance | `--application-id`, `--instance-id`, `--function-id`, `--name`, `--args`, `--active`, `--file` | +| `azion delete function-instance` | Deletes a Function Instance | `--application-id`, `--instance-id` | + +`--function-id` sets the `function` field, and `--args` sets `args`. On `azion create function-instance` and `azion update function-instance`, `--active` defaults to `true`. + +--- + ## Related resources - The path a request takes from a Rules Engine rule to your function code. - The steps to create an instance in Azion Console and through the Azion API. - A function that reads a key from its Args and answers with the value. - The size ceiling for Args and every other Functions limit. + The path a request takes from a Rules Engine rule to the code of your Function. + The steps to create a Function Instance in Azion Console and through the Azion API. + A Function that reads a key from its Args and answers with the value. + The size ceiling for Args and every other Functions limit. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/first-steps.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/first-steps.mdx index 3d2fb1c5d1..cd877434e4 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/first-steps.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/first-steps.mdx @@ -1,6 +1,6 @@ --- title: Applications quickstart -description: Create an application that sends every request to your origin through a connector, serve it from a workload, and request it. +description: Create an Application that sends every request to your origin through a Connector, serve it from a Workload, and request it. meta_tags: 'applications, quickstart, connector, origin, set connector, rules engine, workload, deployment, azion cli, api' namespace: documentation_products_edge_application_first_steps permalink: /documentation/platform/applications/quickstart/ @@ -10,26 +10,27 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' -This guide instructs you through serving your origin's content from your first [application](/en/documentation/platform/applications/). +This guide instructs you through serving your origin's content from your first [Application](/en/documentation/platform/applications/). -- Create a [connector](/en/documentation/platform/connectors/) that reaches your origin over HTTPS. -- Create an application. -- Add a rule that sends every request to the connector. -- Serve the application from a [workload](/en/documentation/platform/workloads/). +- Create a [Connector](/en/documentation/platform/connectors/) that reaches your origin over HTTPS. +- Create an Application. +- Add a rule that sends every request to the Connector. +- Serve the Application from a [Workload](/en/documentation/platform/workloads/). - Send a request to the workload domain and get your origin's answer. Five parts make the chain, listed in the order this guide uses them: -1. The **connector** holds the address of your origin and the way Azion connects to it. -2. The **application** holds the rules that decide what happens to a request. A new application has no rules. -3. The **rule** on the application pairs a criterion with a behavior. In this guide, the criterion matches every request, and the **Set Connector** behavior names the connector. -4. The **workload** holds the domain that receives requests. Its **deployment** names the application. -5. The **request** to the workload domain meets the rule, and the connector passes it to your origin. +1. The **Connector** holds the address of your origin and the way Azion connects to it. +2. The **Application** holds the rules that decide what happens to a request. A new Application has no rules. +3. The **rule** on the Application pairs a condition on the request, called a criterion, with an action called a behavior. In this guide, the criterion matches every request, and the _Set Connector_ behavior sends the request to the Connector. +4. The **Workload** holds a domain and receives the requests sent to it. Its **deployment**, a setting of the Workload, sets the Application that receives those requests. +5. The **request** goes to the workload domain, the hostname Azion assigns to the Workload. The rule of the Application matches the request, and the Connector routes it to your origin. -A connector receives requests only once a rule names it, and an application only once a deployment names it. +A Connector receives requests only after a rule sets that Connector. An Application receives the requests of a Workload only after that Workload's deployment sets that Application. -On an application, you enable three Products: Cache, Application Accelerator, and Image Processor. A new application starts with Cache turned on and the other two turned off, and this guide changes none of them. To turn one on later, open the application's **Main Settings** tab, turn on its switch in **Modules**, and select **Save**. The quickstart of each Product begins where this guide ends, with an application that already serves content. +Each Application has four switches: [Cache](/en/documentation/platform/applications/cache/), [Functions](/en/documentation/platform/functions/), [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), and [Image Processor](/en/documentation/platform/applications/image-processor/). In Azion Console, the switches are in **Main Settings** > **Modules**, and in the API, they are the keys of `modules`. A new Application starts with Cache and Functions turned on and the other two turned off, and this guide keeps all four as they are. The quickstarts of Cache, Application Accelerator, and Image Processor begin where this guide ends, with an Application that already serves content. --- @@ -46,9 +47,8 @@ On an application, you enable three Products: Cache, Application Accelerator, an - An Azion account. For more information, refer to [Create an account](/en/documentation/fundamentals/creating-account/). - An origin server that answers HTTPS requests on port `443` under a public hostname. This guide writes that hostname as ``. -- `curl`, to send a request through the workload. - -You also need access to Azion Console. For more information, refer to [Access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/). +- `curl`, to send a request through the Workload. +- Access to Azion Console. For more information, refer to [Access Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/). @@ -58,9 +58,8 @@ You also need access to Azion Console. For more information, refer to [Access Az - An Azion account. For more information, refer to [Create an account](/en/documentation/fundamentals/creating-account/). - An origin server that answers HTTPS requests on port `443` under a public hostname. This guide writes that hostname as ``. -- `curl`, to send a request through the workload. - -You also need the [Azion CLI](/en/documentation/devtools/cli/) on your machine, authorized with a personal token. +- `curl`, to send a request through the Workload. +- The [Azion CLI](/en/documentation/devtools/cli/) on your machine, authorized with a personal token. @@ -70,9 +69,9 @@ You also need the [Azion CLI](/en/documentation/devtools/cli/) on your machine, - An Azion account. For more information, refer to [Create an account](/en/documentation/fundamentals/creating-account/). - An origin server that answers HTTPS requests on port `443` under a public hostname. This guide writes that hostname as ``. -- `curl`, to send a request through the workload. - -You also need a personal token for the `Authorization` header. To create one, refer to [Manage a personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/). To bind the application to the workload, you also need the [Azion CLI](/en/documentation/devtools/cli/), authorized with a personal token. +- `curl`, to send a request through the Workload. +- A personal token for the `Authorization` header. To create one, refer to [Manage personal tokens](/en/documentation/guides/platform/account-and-billing/personal-tokens/). +- The [Azion CLI](/en/documentation/devtools/cli/), authorized with a personal token, to create the deployment that sets the Application. @@ -80,9 +79,11 @@ You also need a personal token for the `Authorization` header. To create one, re --- -## Create a connector to your origin +## Create a Connector to your origin + +A Connector holds the address of your origin and the settings Azion uses to reach it. You create it on its own, outside any Application, and a rule sets the Connector later. This Connector has one address and connects to your origin over HTTPS. It sends your origin's hostname in the `Host` header. -A connector holds the address of your origin and the settings Azion uses to reach it. You create it on its own, outside any application, and a rule names it later. This connector has one address and connects to your origin over HTTPS. It sends your origin's hostname in the `Host` header. +By default, a Connector sends the host the client requested, which here is your workload domain. An origin that routes by name may not answer that host. For more information, refer to [Host header](/en/documentation/platform/connectors/how-it-works/#host-header). @@ -90,7 +91,7 @@ A connector holds the address of your origin and the settings Azion uses to reac ### Console -To create the connector in Azion Console: +To create the Connector in Azion Console: @@ -98,15 +99,19 @@ To create the connector in Azion Console: Access [Azion Console](https://console.azion.com/) > **Connectors**. - - + + + Select **+ Connectors**. + + + In **General**, enter `origin-connector` as the **Name**. - + - In **Connector Type**, select the HTTP type. + In **Connector Type**, keep _HTTP_ selected. @@ -116,18 +121,18 @@ To create the connector in Azion Console: - In **Host Header**, enter ``, the same value as **Address**. + In **Connection Options**, replace `${host}` in **Host** with ``, the same value as **Address**. - In **Transport Protocol Policy**, select the option that uses HTTPS only. + In **Transport Protocol Policy**, select _Force HTTPS_. - + -The connector exists in your account, and the rule you add to the application selects it. For every field of the connector form, refer to [Connectors](/en/documentation/platform/connectors/). +Azion Console shows the message "Connector successfully created". The Connector exists in your account, and the rule you add to the Application sets that Connector. For every field of the Connector form, refer to [Connector settings](/en/documentation/platform/connectors/settings/). @@ -135,33 +140,35 @@ The connector exists in your account, and the rule you add to the application se ### CLI -To create the connector with the Azion CLI, put it in a JSON file first. Save this body as `connector.json`, and replace `` in both places: +To create the Connector with the Azion CLI, put it in a JSON file first. Save this body as `connector.json`, and replace `` in both places: -```json -{ - "name": "origin-connector", - "type": "http", - "attributes": { - "addresses": [ - { "address": "" } - ], - "connection_options": { - "transport_policy": "force_https", - "host": "" +" } + ], + "connection_options": { + "transport_policy": "force_https", + "host": "" + } } - } -} -``` +}`} /> + +`addresses` lists the origin servers, and `connection_options.host` is the `Host` header the Connector sends. `force_https` makes every connection to the origin use HTTPS. -`addresses` lists the origin servers, and `connection_options.host` is the `Host` header the connector sends. `force_https` makes every connection to the origin use HTTPS. +Create the Connector from the file: -Create the connector from the file: + -```bash -azion create connector --type http --file connector.json +The output carries the Connector's ID: + +```text +Created Connector with ID ``` -Record the ID of the new connector from the command output: the rule passes it as ``. +Record the ID: the rule passes it as ``. @@ -169,28 +176,26 @@ Record the ID of the new connector from the command output: the rule passes it a ### API -To create the connector with the API, send a `POST` request to the connectors endpoint. Replace `[TOKEN VALUE]` with your personal token, and `` with the hostname of your origin: - -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/connectors \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data '{ - "name": "origin-connector", - "type": "http", - "attributes": { - "addresses": [{ "address": "" }], - "connection_options": { - "transport_policy": "force_https", - "host": "" +To create the Connector with the API, send a `POST` request to the connectors endpoint. Replace `[TOKEN VALUE]` with your personal token, and `` with the hostname of your origin: + +" }], + "connection_options": { + "transport_policy": "force_https", + "host": "" + } } - } -}' -``` +}'`} /> -The response returns the connector, with a value for every setting the request left out. This excerpt shows those values: +The response returns the Connector, with a value for every setting the request left out. This excerpt shows those values: ```json { @@ -233,7 +238,7 @@ The response returns the connector, with a value for every setting the request l } ``` -The connector is active, and its address takes HTTPS connections on `https_port` `443`. [Load Balancer](/en/documentation/platform/connectors/load-balancer/) and [Origin Shield](/en/documentation/platform/connectors/origin-shield/) start turned off. Record the `id`: the rule passes it as ``. +The Connector is active, and its address takes HTTPS connections on `https_port` `443`. [Load Balancer](/en/documentation/platform/connectors/load-balancer/) and [Origin Shield](/en/documentation/platform/connectors/origin-shield/) start turned off. Record the `id`: the rule passes it as ``. @@ -241,9 +246,9 @@ The connector is active, and its address takes HTTPS connections on `https_port` --- -## Create the application +## Create the Application -An application holds the rules that decide what happens to each request. It needs only a name, and every other setting keeps its default. Until a rule names a connector, the application has no origin to send requests to. +An Application holds the rules that decide what happens to each request. It needs only a name, and every other setting keeps its default. The Application reaches your origin only through a rule that sets a Connector. @@ -251,7 +256,7 @@ An application holds the rules that decide what happens to each request. It need ### Console -To create the application in Azion Console: +To create the Application in Azion Console: @@ -259,8 +264,12 @@ To create the application in Azion Console: Access [Azion Console](https://console.azion.com/) > **Applications**. - - + + + Select **+ Application**. + + + In **General**, enter `first-application` as the **Name**. @@ -268,7 +277,7 @@ To create the application in Azion Console: -The application exists, and its **Rules Engine** tab holds no rules yet. +The Application exists, and its **Rules Engine** tab holds no rules yet. @@ -276,19 +285,17 @@ The application exists, and its **Rules Engine** tab holds no rules yet. ### CLI -To create the application with the Azion CLI: +To create the Application with the Azion CLI: -```bash -azion create application --name first-application --active true -``` + -The output carries the application's ID: +The output carries the Application's ID: ```text Created Application with ID ``` -The application is active and has no rules. Cache and Functions start turned on, and Application Accelerator and Image Processor start turned off. Record the ID: the rule and the deployment pass it as ``. +The Application is active and has no rules. Cache and Functions start turned on, and Application Accelerator and Image Processor start turned off. Record the ID: the rule and the deployment pass it as ``. @@ -296,18 +303,16 @@ The application is active and has no rules. Cache and Functions start turned on, ### API -To create the application with the API, send a `POST` request to the applications endpoint. Replace `[TOKEN VALUE]` with your personal token: +To create the Application with the API, send a `POST` request to the applications endpoint. Replace `[TOKEN VALUE]` with your personal token: -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/applications \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data '{"name": "first-application", "active": true}' -``` + -In the response, `modules` lists the switches the application starts with: +In the response, `modules` lists the switches the Application starts with: ```json { @@ -331,7 +336,7 @@ In the response, `modules` lists the switches the application starts with: } ``` -The application is active and has no rules. In `modules`, `cache` and `functions` start turned on, while `application_accelerator` and `image_processor` start turned off. Record the `id`: the rule and the deployment pass it as ``. +The Application is active and has no rules. In `modules`, `cache` and `functions` start turned on, and `application_accelerator` and `image_processor` start turned off. Record the `id`: the rule and the deployment pass it as ``. @@ -339,11 +344,11 @@ The application is active and has no rules. In `modules`, `cache` and `functions --- -## Send every request to the connector +## Send every request to the Connector -A rule in [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) pairs criteria with behaviors. This rule runs in the request phase. Its criterion, `${uri}` starting with `/`, matches every request. Its behavior, **Set Connector**, sends each matching request to your connector. For more information, refer to [Set Connector](/en/documentation/platform/applications/rules-engine/#set-connector). +A rule in [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/) pairs criteria with behaviors. This rule runs in the Request Phase. Its criterion, `${uri}` starting with `/`, matches every request. Its behavior, _Set Connector_, sends each matching request to your Connector. For more information, refer to [Set Connector](/en/documentation/platform/applications/rules-engine/#set-connector). -The criterion uses `${uri}`, not `${request_uri}`. `${request_uri}` needs Application Accelerator turned on. On an application without it, the API refuses the rule with `400` and error `25047`, `Missing Required Modules`. +The criterion uses `${uri}`, not `${request_uri}`. `${request_uri}` needs Application Accelerator turned on. On an Application with Application Accelerator turned off, the API refuses the rule with `400` and error `25047`, `Missing Required Modules`. @@ -354,9 +359,9 @@ The criterion uses `${uri}`, not `${request_uri}`. `${request_uri}` needs Applic To create the rule in Azion Console: - + - Access [Azion Console](https://console.azion.com/) > **Applications**, and select the application you created. + Access [Azion Console](https://console.azion.com/) > **Applications**, and select the Application you created. @@ -366,24 +371,24 @@ To create the rule in Azion Console: In **General**, enter `send-to-origin` as the **Name**. - + In **Phase**, select _Request Phase_. A rule's phase cannot change after you create the rule. - Under **Criteria**, select the variable `${uri}` and the operator `starts_with`, and enter `/` as the argument. + Under **Criteria**, keep `${uri}` and _starts with_, and enter `/` as the argument. - Under **Behaviors**, select **Set Connector**. + Under **Behaviors**, select _Set Connector_. - + - In **Connector**, select the connector you created. + In the list of the _Set Connector_ behavior, select `origin-connector`. @@ -397,36 +402,34 @@ The rule appears in the **Rules Engine** tab, under the **Request** heading. ### CLI -To create the rule with the Azion CLI, keep the rule in a file: on a command line, the shell would expand `${uri}`. Save this body as `rule.json`, and replace `` with the ID of your connector: +To create the rule with the Azion CLI, keep the rule in a file: on a command line, the shell would expand `${uri}`. Save this body as `rule.json`, and replace `` with the ID of your Connector: -```json -{ - "name": "send-to-origin", - "active": true, - "criteria": [ - [ + } } ] - ], - "behaviors": [ - { - "type": "set_connector", - "attributes": { "value": } - } - ] -} -``` +}`} /> -Each group in `criteria` opens with a condition whose conditional is `if`. Create the rule in the request phase of your application. Replace `` with the ID of your application: +Each group in `criteria` opens with a condition whose conditional is `if`. -```bash -azion create rules-engine --application-id --phase request --file rule.json -``` +Create the rule in the Request Phase of your Application. Replace `` with the ID of your Application: + + --phase request --file rule.json`} /> The output carries the rule's ID: @@ -434,7 +437,7 @@ The output carries the rule's ID: Created Rules Engine with ID ``` -The rule is active on your application, and it sends every request to your connector. +The rule is active on your Application, and it sends every request to your Connector. @@ -442,41 +445,39 @@ The rule is active on your application, and it sends every request to your conne ### API -To create the rule with the API, keep the request body in a file: on a command line, the shell would expand `${uri}`. Save this body as `rule.json`, and replace `` with the ID of your connector: +To create the rule with the API, keep the request body in a file: on a command line, the shell would expand `${uri}`. Save this body as `rule.json`, and replace `` with the ID of your Connector: -```json -{ - "name": "send-to-origin", - "active": true, - "criteria": [ - [ + } } ] - ], - "behaviors": [ - { - "type": "set_connector", - "attributes": { "value": } - } - ] -} -``` +}`} /> -Each group in `criteria` opens with a condition whose conditional is `if`. Send a `POST` request to the request-phase rules of your application. Replace `` with the ID of your application: +Each group in `criteria` opens with a condition whose conditional is `if`. -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json -``` +Send a `POST` request to the Request Phase rules of your Application. Replace `[TOKEN VALUE]` with your personal token, and `` with the ID of your Application: + +/request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> The response carries the stored rule. This excerpt keeps its `id`, its criterion, its behavior, and its `order`: @@ -510,7 +511,7 @@ The response carries the stored rule. This excerpt keeps its `id`, its criterion } ``` -`order` is `0`, the position of the first rule on the application. The rule is active, and it sends every request to your connector. +`order` is `0`, the position of the first rule on the Application. The rule is active, and it sends every request to your Connector. @@ -518,9 +519,9 @@ The response carries the stored rule. This excerpt keeps its `id`, its criterion --- -## Serve the application from a workload +## Serve the Application from a Workload -A workload holds what receives requests: the domain, the protocols, and the certificates. The application holds none of these settings. The workload's deployment names the application it runs, and the current deployment is the one that serves requests. A new workload answers on a workload domain that Azion assigns under `map.azionedge.net`. +A Workload receives the requests sent to its domains. It holds those domains, the protocols, and the certificates, so you configure delivery on the Workload, not on the Application. The Workload's deployment sets the Application that receives those requests, and a Workload holds one deployment. A new Workload answers on a workload domain that Azion assigns under `map.azionedge.net`. @@ -528,7 +529,7 @@ A workload holds what receives requests: the domain, the protocols, and the cert ### Console -To create the workload and its deployment in Azion Console: +To create the Workload and its deployment in Azion Console: @@ -536,26 +537,26 @@ To create the workload and its deployment in Azion Console: Access [Azion Console](https://console.azion.com/) > **Workloads**. - + - The **Create Workload** page opens. + Select **+ Workload**. The **Create Workload** page opens. - + Enter a name, such as `first-workload`. - + - Under **Deployment Settings**, set **Application** to the application you created. + Under **Deployment Settings**, set **Application** to the Application you created. - + -The workload exists, and its deployment names your application. To copy the address that the final request goes to, select **Copy Workload URL**. +The Workload exists, and its deployment sets your Application. To copy the address that the final request goes to, select **Copy Workload URL** in the message that Azion Console shows. The message closes after a few seconds, and the **Workload Domain** column of the Workloads list also shows the address. @@ -563,27 +564,54 @@ The workload exists, and its deployment names your application. To copy the addr ### CLI -To create the workload with the Azion CLI: +To create the Workload with the Azion CLI: -```bash -azion create workload --name first-workload --active true -``` + -The output carries the workload's ID: +The output carries the Workload's ID: ```text Created Workload with ID ``` -The workload serves your application through its deployment. Name the application in the **Application** field of **Deployment Settings** in [Azion Console](https://console.azion.com/), or declare it in the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js` and run `azion deploy`. +Create the deployment of the Workload. That deployment sets your Application. Replace `` with the ID of the Workload and `` with the ID of your Application: + + --name first-deployment --application-id `} /> -To find the workload domain, describe the workload in JSON: +The command prints the ID of the new deployment: -```bash -azion describe workload --workload-id --format json +```text +Created Workload Deployment with ID ``` -The `workload_domain` field holds the domain that the final request goes to. +To check that the deployment sets your Application, list the deployments of the Workload with their details: + + --details`} /> + +The `EDGE APPLICATION` column shows the ID of your Application: + +```text +ID CURRENT EDGE APPLICATION EDGE FIREWALL + true 0 +``` + +The deployment of the Workload sets your Application. A project that declares the Workload in `azion.config.js` gets its deployment from `azion deploy` instead, and that deployment sets the Application the deploy creates for the project, even when the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry names another Application by its ID. + +To find the workload domain, describe the Workload in JSON: + + --format json`} /> + +In the output, the `workload_domain` field holds the domain that the final request goes to: + +```json +{ + … + "id": , + … + "workload_domain": "", + … +} +``` @@ -591,23 +619,21 @@ The `workload_domain` field holds the domain that the final request goes to. ### API -To create the workload with the API, send a `POST` request to the workloads endpoint. `infrastructure` set to `1` selects the production infrastructure, and `workload_domain_allow_access` set to `true` lets the workload answer on its workload domain: - -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/workloads \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data '{ - "name": "first-workload", - "active": true, - "infrastructure": 1, - "workload_domain_allow_access": true -}' -``` +To create the Workload with the API, send a `POST` request to the workloads endpoint. `infrastructure` set to `1` selects the production infrastructure, and `workload_domain_allow_access` set to `true` lets the Workload answer on its workload domain. Replace `[TOKEN VALUE]` with your personal token: -The response carries the starting settings of the workload and the domain Azion assigned to it: + + +The response carries the starting settings of the Workload and the domain Azion assigned to it: ```json { @@ -640,9 +666,9 @@ The response carries the starting settings of the workload and the domain Azion } ``` -The workload has no domains of its own, and `workload_domain` holds the one Azion assigned. Record the `id` and the `workload_domain`. +`domains` is empty, and `workload_domain` holds the domain that Azion assigned to the Workload. Record the `id` and the `workload_domain`. -The published Azion API v4 reference has no endpoint for the deployment of a workload. To bind your application to the workload you created, follow the deployment step of the CLI panel. +To set your Application in the deployment of the Workload you created, run the command of the CLI panel that creates the deployment. You use the CLI here because the published Azion API v4 reference has no endpoint for the deployment of a Workload. @@ -650,19 +676,19 @@ The published Azion API v4 reference has no endpoint for the deployment of a wor --- -## Send a request through the workload +## Send a request through the Workload -This stage needs only `curl`, whichever interface you used to build the chain. In the command, replace `` with the workload domain of the workload you created. +This stage needs only `curl`, whichever interface you used to build the chain. In the command, replace `` with the workload domain of the Workload you created. -A new workload does not answer at once. Its first deployment can take several minutes to reach traffic, and no duration is guaranteed. Until then, the workload domain answers `404` with a placeholder page. While the deployment spreads, answers to the same request can alternate between that `404` and your origin's response. Repeat the request until the answer comes from your origin. +A new Workload answers with your origin's response only after its first deployment reaches traffic. This can take several minutes, and Azion guarantees no duration. Until then, the workload domain answers `404` with a placeholder page. While the deployment spreads, answers to the same request can alternate between that `404` and your origin's response. Repeat the request until the answer comes from your origin. For more information, refer to [Propagation](/en/documentation/platform/applications/how-it-works/#propagation). Send a request to the root path of your workload domain: -```bash -curl -i https:/// -``` +/`} /> + +The response is the one your origin returns for `/`: its status, its headers, and its body. Every other path reaches your origin the same way, because the rule matches every URI that starts with `/`. Your Application now sends every request on the workload domain to your origin through the Connector. -The response is the one your origin returns for `/`: its status, its headers, and its body. Every other path reaches your origin the same way, because the rule matches every URI that starts with `/`. Your application now sends every request on its workload domain to your origin through the connector. +When your origin refuses the TLS handshake, the response is a `502` with the page titled `Azion - Default error page`, not a page from your origin. For more information, refer to [Connection reuse and timeouts](/en/documentation/platform/connectors/how-it-works/#connection-reuse-and-timeouts). --- @@ -672,7 +698,7 @@ The response is the one your origin returns for `/`: its status, its headers, an - - - + + + diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/l2-caching.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/l2-caching.mdx index 29a279a355..c744c39b55 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/l2-caching.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/l2-caching.mdx @@ -1,8 +1,8 @@ --- title: Tiered Cache description: >- - Turn on a second cache layer between Azion's cache and your origin, set its - topology and TTL floor, and purge it by cache key. + Turn on a second cache layer between the data center that answers a request + and your origin, choose its topology, and purge it by cache key. meta_tags: 'tiered cache, cache layer, topology, cache settings, max age, purge cache, real-time purge, caching, cache' namespace: documentation_products_edge_application_l2_caching permalink: /documentation/platform/applications/cache/tiered-cache/ @@ -12,47 +12,44 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -**Tiered Cache** is a second cache layer between [Cache](/en/documentation/platform/applications/cache/) and your origin, kept in one region. The first layer is the cache of the data center that answered the request. The second layer is shared by every data center and keeps objects longer than the first. +**Tiered Cache** is a Feature of [Cache](/en/documentation/platform/applications/cache/) that adds a second cache layer between the data center that answers a request and your origin. The first layer is the cache of that data center. The second layer sits in the region that the `topology` of a cache setting selects. -When a request misses the first layer, the data center asks the Tiered Cache layer before it asks the origin. An object fetched once from the origin is then served to every data center from that layer. You turn the layer on per cache setting, and it applies to the objects that setting caches. For the full request path, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/). +When a request misses the first layer, the data center asks the Tiered Cache layer before the request goes to the origin. A valid copy of the requested object in that layer answers the miss, and the origin receives no request. You turn the layer on per cache setting, and it applies to the objects that setting caches. For how the two layers answer a request, refer to [Expiration and freshness](/en/documentation/platform/applications/cache/expiration-and-freshness/#tiered-cache). -A miss in the first layer is answered from Azion's infrastructure instead of your origin. The response arrives with less latency, and fewer requests reach the origin. The origin handles less load at a lower infrastructure cost, and an object stays cached longer. The price is one extra hop on a miss in the first layer and a floor on the TTL of the setting. +An answer from the Tiered Cache layer arrives with less latency than one from the origin, and fewer requests reach the origin. The origin handles less load at a lower infrastructure cost. The price is one extra hop on a miss in the first layer. With [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on, Tiered Cache also sets a floor of 3 seconds on the time to live (TTL) of the cache setting. --- ## Interfaces -Tiered Cache is a field of a cache setting, so every interface that writes a cache setting turns it on. The table names where the control sits in each one. +A cache setting turns Tiered Cache on in its `modules.cache.tiered_cache` object, and the four interfaces below write that object. The table names where the control sits in each one. | Interface | Where | Value | | --- | --- | --- | -| [Azion Console](https://console.azion.com/) | The **Cache** section of the **Create Cache Settings** drawer, under the **Cache Settings** tab of an application in [Applications](/en/documentation/platform/applications/) | The **Tiered Cache** toggle, off on a new setting | -| [Azion API v4](/en/documentation/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `modules.cache.tiered_cache.enabled`, `true` or `false`, and `modules.cache.tiered_cache.topology` | -| [Azion CLI](/en/documentation/devtools/cli/) | `azion create cache-setting --file` with the JSON body | The same `tiered_cache` object. The `--tiered-caching-enabled` flag alone is rejected with error `21001`, because no flag sets the cache behavior | +| [Azion Console](https://console.azion.com/) | The **Cache** section of the **Create Cache Settings** drawer, under the **Cache Settings** tab of an Application in [Applications](/en/documentation/platform/applications/) | The **Tiered Cache** toggle, off on a new setting, and the **Tiered Cache Region** select, `nearest-region` by default. Turning the toggle on disables _Honor cache policies_ and selects _Override cache behavior_ | +| [Azion API v4](/en/documentation/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `modules.cache.tiered_cache.enabled`, `true` or `false`, and `modules.cache.tiered_cache.topology`, `nearest-region` when the body leaves it out | +| [Azion CLI](/en/documentation/devtools/cli/) | `azion create cache-setting --file` with the JSON body | The same `tiered_cache` object. The `--tiered-caching-enabled` flag alone is refused with error `21001` | | `azion.config.js` | An entry of the `cache` array, of type `AzionCache` | `tieredCache: { enabled, topology }` | -Two conditions bind the setting. Its cache behavior must be _Override cache behavior_, because the API rejects Tiered Cache under _Honor cache policies_ with error `21001`. Its **Max Age** must be at least 3 seconds, or the API returns error `21020`. +:::note +Two conditions bind the cache setting. Its `modules.cache.behavior` must be `override`, because the API refuses Tiered Cache under `honor` with error `21001`. The CLI sets the cache behavior only in the JSON body of `--file`. With [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) on the Application, the `modules.cache.max_age` of the cache setting must be at least 3 seconds, or the API returns error `21020`. Without Application Accelerator, the 60-second floor of every cache setting holds, and the API returns `21021`. +::: -Tiered Cache is included on every service plan and is turned on per cache setting. For every field of a cache setting, with the title and the fix of each error, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). For the Console steps that apply a setting to a path, refer to [Configure cache policies for an application](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/). +Tiered Cache is included on every service plan. For every field of a cache setting, with the title and the fix of each error, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/). For the Console steps that apply a setting to a path, refer to [Configure cache policies for an application](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/). --- ## Topology -The `topology` of a cache setting names the region that hosts the Tiered Cache layer for the objects that setting caches. The API, the CLI JSON body, and `azion.config.js` accept values such as the ones below. A value the API does not accept returns error `10039`, `Invalid Choice`. - -| Value | Meaning | -| --- | --- | -| `nearest-region` | Nearest region | -| `us-east-1` | United States, east | +The `topology` of a cache setting selects where the Tiered Cache layer holds the objects that setting caches. Azion Console, the API, the CLI JSON body, and `azion.config.js` accept values such as `nearest-region` and `us-east-1`, and the [Azion API reference](https://api.azion.com/) lists every accepted value. A value the API does not accept returns error `10039`, `Invalid Choice`. --- ## TTL -The time to live (TTL) of an object in the Tiered Cache layer is the **Max Age** of its cache setting. While the toggle is on, that field carries a floor of 3 seconds. A new setting starts at 60 seconds, the default of **Max Age** in the Console, the API, and the CLI. For example, a **Max Age** of 2 seconds with Tiered Cache on is rejected with error `21020`. The same setting at 3 seconds is accepted. Tiered Cache is designed for objects that stay cached for a long time. +The time to live (TTL) of an object in the Tiered Cache layer is the Max Age of its cache setting, the `modules.cache.max_age` field. While Tiered Cache and Application Accelerator are both on, that field has a floor of 3 seconds. A new cache setting starts at 60 seconds, the default of Max Age in Azion Console, the API, and the CLI. For example, on an Application with Application Accelerator on, a Max Age of 2 seconds with Tiered Cache on is refused with error `21020`. The same setting at 3 seconds is accepted. -Azion also offers the option of hosting the Tiered Cache servers in other regions. To switch between regions in your applications, please contact the [Sales team](https://www.azion.com/en/contact/). +The ceiling is the ceiling of the cache TTL itself. For the value and the error past it, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache). --- @@ -60,19 +57,19 @@ Azion also offers the option of hosting the Tiered Cache servers in other region [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/) removes an object from the Tiered Cache layer before its TTL ends. The layer is `tiered_cache` in the API body and in the `--layer` flag of `azion purge`. A cache key purge is the only type that reaches it. A URL or wildcard purge with that layer returns error `30001`, `Invalid Purge Layer For Purge Type`. -To remove an object held in both layers, purge Tiered Cache first and then Cache, so the first layer is not refilled from a stale Tiered Cache copy. For the Console, API, and CLI steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/). +To remove an object held in both layers, purge Tiered Cache first and then Cache. In that order, the first layer is not refilled from a stale Tiered Cache copy. For the Console, API, and CLI steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/). --- ## Bypass Cache -A [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) rule in Rules Engine affects Azion's cache and not the Tiered Cache layer. An application with active Tiered Cache settings continues to cache objects in that layer for the minimum TTL. For the symptom this produces and what to do about it, refer to [Troubleshoot Applications](/en/documentation/platform/applications/troubleshooting/#cache). +A rule with the [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-cache) behavior in [Rules Engine](/en/documentation/platform/applications/rules-engine/) affects Azion's cache and not the Tiered Cache layer. An Application whose cache settings turn Tiered Cache on continues to cache objects in that layer for the Max Age of the cache setting, its `modules.cache.max_age` field. For the symptom this produces and what to do about it, refer to [Troubleshoot Applications](/en/documentation/platform/applications/troubleshooting/#cache). --- ## Observability -[Real-Time Metrics](/en/documentation/platform/real-time-metrics/) carries a **Tiered Cache** dataset beside its Cache dataset. [Real-Time Events](/en/documentation/platform/real-time-events/) carries a **Tiered Cache** dataset as well. The data Tiered Cache has transferred is queried through GraphQL. For the query and its response, refer to [Query usage data from Tiered Cache](/en/documentation/guides/platform/observability/query-tiered-cache-usage-data-with-graphql/). +[Real-Time Metrics](/en/documentation/platform/real-time-metrics/) carries a Tiered Cache dataset beside its Cache dataset. [Real-Time Events](/en/documentation/platform/real-time-events/) carries a Tiered Cache dataset as well. Through GraphQL, you query the data that Tiered Cache transfers. For the query and its response, refer to [Query usage data from Tiered Cache](/en/documentation/guides/platform/observability/query-tiered-cache-usage-data-with-graphql/). --- @@ -82,7 +79,7 @@ A [Bypass Cache](/en/documentation/platform/applications/rules-engine/#bypass-ca Every field of a cache setting, with the Tiered Cache rows, the errors, and the request body. The path a request takes through the first layer, the Tiered Cache layer, and the origin. - The TTL floor and ceiling with Tiered Cache on, and what each plan includes. + The TTL floor and ceiling with Tiered Cache on. The Console, API, and CLI steps that purge an object from the Tiered Cache layer by cache key. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/main-settings.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/main-settings.mdx index 2e58ac9df9..fa40cc4d95 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/main-settings.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/main-settings.mdx @@ -1,6 +1,6 @@ --- title: Main Settings -description: 'Look up the settings of an application: its name, the Products enabled on it, Debug Rules, and its status.' +description: 'Look up the settings of an Application: its name, the Platform Resources turned on in it, Debug Rules, and its status.' meta_tags: 'applications, main settings, modules, application accelerator, cache, functions, image processor, debug rules, status' namespace: documentation_products_edge_application_delivery permalink: /documentation/platform/applications/main-settings/ @@ -13,78 +13,87 @@ import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet. [Main Settings | v3](/en/documentation/platform/applications/main-settings-v3/) -Main Settings is the set of values that apply to an [application](/en/documentation/platform/applications/) as a whole: its name, the Products enabled on it, Debug Rules, and its status. Azion Console groups them in the **Main Settings** tab of the application, and the API returns them as fields of the application object. For the path a request takes through an application, refer to [How Applications works](/en/documentation/platform/applications/how-it-works/). +Main Settings is the set of values that apply to an [Application](/en/documentation/platform/applications/) as a whole: its name, the Platform Resources turned on in it, whether it logs the rules each request runs, and whether it is active. Azion Console groups them in the **Main Settings** tab of the Application, and the API returns them as fields of the Application. For the path a request takes through an Application, refer to [How Applications works](/en/documentation/platform/applications/how-it-works/). --- ## Sections and fields -The **Main Settings** tab has four sections: **General**, **Modules**, **Debug Rules**, and **Status**. **General** holds the **Name** of the application. The tab carries **Cancel** and **Save**, and a change is saved with **Save**. +In Azion Console, the **Main Settings** tab of an Application has four sections: **General**, **Modules**, **Debug Rules**, and **Status**. The tab carries **Cancel** and **Save**, and a change is saved with **Save**. -Each section maps to one or more fields of the application in the API. The last column holds the value each field takes when a create request sends only `name` and `active`. +Each section maps to one or more fields of the Application in the API. The last column holds the value each field takes when a create request sends only `name` and `active`. | Section | Setting | API field | Type | Value at creation | | --- | --- | --- | --- | --- | -| **General** | **Name** | `name` | string | The value the create request sends | -| **Modules** | One toggle per Product | `modules..enabled` | boolean | `true` for `cache` and `functions`, `false` for `application_accelerator` and `image_processor` | -| **Debug Rules** | **Debug Rules** | `debug` | boolean | `false` | -| **Status** | **Status** | `active` | boolean | The value the create request sends | +| **General** | **Name** | `name` | string, 1 to 100 characters | The value the create request sends | +| **Modules** | One switch per Platform Resource | `modules..enabled` | boolean | `true` for `cache` and `functions`, `false` for `application_accelerator` and `image_processor` | +| **Debug Rules** | **Active** | `debug` | boolean | `false` | +| **Status** | **Active** | `active` | boolean | The value the create request sends, or `true` when the request omits it | -For example, an application you create through the API with only `name` and `active` has Cache and [Functions](/en/documentation/platform/functions/) on from the start, and Application Accelerator stays off until you turn it on. +For example, an Application you create through the API with only `name` and `active` has [Cache](/en/documentation/platform/applications/cache/) and [Functions](/en/documentation/platform/functions/) on from the start. [Application Accelerator](/en/documentation/platform/applications/application-accelerator/) stays off until you turn it on. -The **Status** toggle turns the application off and back on without deleting it. The API carries the same state in the `active` boolean. +The status, the `active` boolean in the API, turns the Application off and back on without deleting it. --- -## Products +## Platform Resources -The **Modules** section turns Products on or off for one application, and each application keeps its own set. Its **Default Modules** group holds one toggle per Product: **Application Accelerator**, **Cache**, **Functions**, and **Image Processor**. A **Subscription modules** group carries a **Contact sales** action, and the section states that "Some modules require subscription." +In Azion Console, the switches that turn Platform Resources on or off for one Application sit in the **Modules** section, and each Application keeps its own set. Its **Default Modules** group holds one switch per Platform Resource: **Application Accelerator**, **Cache**, **Functions**, and **Image Processor**. A **Subscription modules** group carries a **Contact sales** action, and the section states `Some modules require subscription.` -| Product | Key in `modules` | CLI flag | What it covers on the application | +| Platform Resource | Key in `modules` | CLI flag | What it covers in the Application | | --- | --- | --- | --- | -| Application Accelerator | `application_accelerator` | `--application-accelerator` | The Rules Engine variables and behaviors that the Console marks `- Required Application Accelerator`. A cache setting needs it for the variations of its **Application Accelerator** section and for a **Max Age** below 60 seconds | -| Cache | `cache` | `--cache` | Caching of the content the application delivers. Cache settings are created in the **Cache Settings** tab and applied by a **Set Cache Policy** behavior | -| Functions | `functions` | `--functions` | Function instances, listed in the **Functions Instances** tab and run by a **Run Function** behavior. The Console marks a behavior that needs Functions `- Required Function` | -| Image Processor | `image_processor` | `--image-processor` | The **Optimize Images** behavior. The Console marks a behavior that needs Image Processor `- Required Image Processor` | +| Application Accelerator | `application_accelerator` | `--application-accelerator` | The behaviors marked `- Required Application Accelerator`, and the `${request_uri}` variable | +| Cache | `cache` | `--cache` | Caching of the content the Application delivers | +| Functions | `functions` | `--function` on create, `--functions` on update | Function Instances, invoked by a _Run Function_ behavior | +| [Image Processor](/en/documentation/platform/applications/image-processor/) | `image_processor` | `--image-processor` | The _Optimize Images_ behavior | -Cache is on when you create an application, and the Console notes that it is "Automatically enabled in all accounts." You can turn a Product on when your account supports it, and turn it off when nothing on the application depends on it. Turning on a Product can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/). +In Azion Console, the **Rules Engine** form marks a behavior whose Platform Resource is off with `- Required Application Accelerator`, `- Required Function`, or `- Required Image Processor`. A cache setting also needs Application Accelerator for the variations in its `modules.application_accelerator` object, and for a Max Age, its `modules.cache.max_age` field, below 60 seconds. -A rule or a cache setting that needs a Product the application has off is refused when you save it, with one of the codes in Errors. For example, a request rule whose criterion reads `${request_uri}` is refused while Application Accelerator is off, and the same rule on `${uri}` is accepted. For the variables and behaviors each Product adds, refer to [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/). +Cache settings and Function Instances belong to the Application, outside Main Settings. A _Set Cache Policy_ behavior applies a cache setting, and a _Run Function_ behavior invokes a Function Instance. [Cache quickstart](/en/documentation/platform/applications/cache/quickstart/) and [Instantiate a function on an application](/en/documentation/guides/application-development/getting-started/instantiate-functions/) show where to create each one in Azion Console. -Tiered Cache has no toggle in the **Modules** section. It is a switch inside each cache setting. For more information, refer to [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/). +Cache is always on in an Application: the API refuses `modules.cache.enabled` set to `false` with error `31001`, `Cache Cannot Be False`. Azion Console shows the **Cache** switch locked on, with the note `Automatically enabled in all accounts.` You can turn another Platform Resource on when your account supports it, and off when nothing in the Application depends on it. Turning on a Platform Resource can generate usage-related costs. For more information, refer to [Pricing](/en/documentation/fundamentals/pricing/). + +While Application Accelerator is off, the API refuses a request rule whose criterion reads `${request_uri}`. It also refuses a cache setting that varies the cache by method, query string, cookie, or device group, or that sets a Max Age below 60 seconds. Each refusal carries one of the codes in Errors, and the same rule on `${uri}` is accepted. For the variables and behaviors each Platform Resource adds, refer to [Rules Engine for Applications](/en/documentation/platform/applications/rules-engine/). + +[Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) is not one of the four `modules` switches of an Application: it is a Feature of Cache, and each cache setting turns it on in its `modules.cache.tiered_cache.enabled` field. --- ## Debug Rules -Debug Rules logs the Rules Engine rules that run on each request to the application. The setting is off when you create an application, and the API holds it in the `debug` boolean. In Azion Console, the **Debug Rules** toggle sets it. +Debug Rules logs the Rules Engine rules that run on each request to the Application. The setting is off when you create an Application, and the API holds it in the `debug` boolean. In Azion Console, the **Active** switch of the **Debug Rules** section sets it. In [Azion CLI](/en/documentation/devtools/cli/), `--debug-enabled` sets it on `azion create application` and `azion update application`. -With Debug Rules on, the rules that ran on a request appear in the `$traceback` field of Data Stream and [Real-Time Events](/en/documentation/platform/real-time-events/). The Real-Time Events GraphQL API returns the same rules in the `stacktrace` field. A rule that is missing from that list did not run on the request. +With Debug Rules on, the rules that ran on a request appear in the `$traceback` field of [Data Stream](/en/documentation/platform/data-stream/) and [Real-Time Events](/en/documentation/platform/real-time-events/). The Real-Time Events GraphQL API returns the same rules in the `stacktrace` field. A rule that is missing from that list did not run on the request. -For example, when a **Set Cache Policy** rule seems to have no effect on a path, the `$traceback` of a request to that path shows whether the rule ran at all. For the queries that read the field in each tool, refer to [Debug rules created with Rules Engine](/en/documentation/guides/application-development/getting-started/debug-rules/). +For example, a _Set Cache Policy_ rule can seem to have no effect on a path. The `$traceback` of a request to that path then shows whether the rule ran at all. For the queries that read the field in each tool, refer to [Debug rules created with Rules Engine](/en/documentation/guides/application-development/getting-started/debug-rules/). --- ## Delivery and protocol settings -Main Settings carries no delivery or protocol settings. Domains, protocols, and certificates belong to the [workload](/en/documentation/platform/workloads/) that serves the application, and the **Deployment Settings** of the workload select the **Application** it runs. +Domains, protocols, and certificates belong to a [Workload](/en/documentation/platform/workloads/), so you configure delivery on the Workload, not in Main Settings. A Workload receives each request, and the deployment of that Workload sets the Application that processes the request. In Azion Console, you set that Application in the **Application** field of the Workload's **Deployment Settings**. -In an account that has not migrated to API v4, the application itself holds its delivery protocols, ports, and TLS settings. For those settings, refer to [Main Settings | v3](/en/documentation/platform/applications/main-settings-v3/). +In an account that has not migrated to API v4, the Application itself holds its delivery protocols, ports, and TLS settings. For those settings, refer to [Main Settings | v3](/en/documentation/platform/applications/main-settings-v3/). --- ## API -The API serves applications at `https://api.azion.com/v4/workspace/applications`. Each call authenticates with a [personal token](/en/documentation/fundamentals/personal-tokens/) in the `Authorization: Token [TOKEN VALUE]` header, and a call with a body also sends `Content-Type: application/json`. +The API serves your Applications at `https://api.azion.com/v4/workspace/applications`. Each call authenticates with a [personal token](/en/documentation/fundamentals/personal-tokens/) in the `Authorization: Token [TOKEN VALUE]` header, and a call with a body also sends `Content-Type: application/json`. -| Operation | Method and path | Status | -| --- | --- | --- | -| Create an application | `POST /workspace/applications` | `202`, with `state` set to `pending` | -| List the applications of the account | `GET /workspace/applications` | `200` | -| Read one application | `GET /workspace/applications/` | `200` | -| Change part of an application | `PATCH /workspace/applications/` | `202`, with `state` set to `pending` | +| Operation | Method and path | +| --- | --- | +| Create an Application | `POST /workspace/applications` | +| List the Applications of the account | `GET /workspace/applications` | +| Read one Application | `GET /workspace/applications/` | +| Replace an Application | `PUT /workspace/applications/` | +| Change part of an Application | `PATCH /workspace/applications/` | +| Delete an Application | `DELETE /workspace/applications/` | +| Clone an Application | `POST /workspace/applications//clone` | -This call creates an application from a name and a status alone: +A create and a `PATCH` answer `202`, with `state` set to `pending`. A list and a read answer `200`. + +`name` is the only field a create request requires. This call creates an Application from a name and a status alone: ```bash curl --request POST \ @@ -104,9 +113,9 @@ The API answers `202`. In this excerpt of the body, `modules` and `debug` carry {"state":"pending","data":{"id":,"name":"my-application",…,"modules":{"cache":{"enabled":true},"functions":{"enabled":true},"application_accelerator":{"enabled":false},"image_processor":{"enabled":false}},"active":true,"debug":false,…}} ``` -The `id` in `data` identifies the application in every later call, including the paths of its rules, such as `/workspace/applications//request_rules`. +The `id` in `data` identifies the Application in every later call, including the paths of its rules, such as `/workspace/applications//request_rules`. -This call turns on Application Accelerator on an existing application: +This call turns on Application Accelerator on an existing Application: ```bash curl --request PATCH \ @@ -129,13 +138,18 @@ The API answers `202` with `state` set to `pending`. A body with `functions` in ## CLI -[Azion CLI](/en/documentation/devtools/cli/) reads and changes an application with three commands under the `application` noun. Each Product flag takes a string, such as `true`. +[Azion CLI](/en/documentation/devtools/cli/) reads and changes an Application with six commands under the `application` noun. Each flag of a Platform Resource takes a string, such as `true`. -| Command | What it does | -| --- | --- | -| `azion create application` | Creates an application. `--cache` and `--image-processor` set those Products at creation | -| `azion update application` | Changes the application that `--application-id` names. `--application-accelerator`, `--functions`, and `--image-processor` turn a Product on or off | -| `azion describe application` | Returns the application that `--application-id` names, with its `modules` object | +| Command | What it does | Flags | +| --- | --- | --- | +| `azion create application` | Creates an Application | `--name`, `--active`, `--debug-enabled`, `--application-accelerator`, `--cache`, `--function`, `--image-processor`, `--file` | +| `azion update application` | Changes the Application that `--application-id` names | `--application-id`, `--name`, `--active`, `--debug-enabled`, `--application-accelerator`, `--cache`, `--functions`, `--image-processor`, `--file` | +| `azion describe application` | Returns one Application, with its `modules` object | `--application-id` | +| `azion list application` | Lists the Applications of the account | `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion delete application` | Deletes the Application that `--application-id` names | `--application-id`, `--cascade` | +| `azion clone application` | Copies an Application under the name in `--name` | `--application-id`, `--name` | + +The Functions flag is `--function` on `azion create application` and `--functions` on `azion update application`. On `azion delete application`, `--cascade` also deletes the resources that `azion deploy` created, and it defaults to `true`. This command turns on Application Accelerator: @@ -147,13 +161,13 @@ azion update application --application-id --application-acceler Updated Application with ID ``` -The output of `azion describe application` includes the `modules` object of the application: +The output of `azion describe application` includes the `modules` object of the Application: ```bash azion describe application --application-id ``` -On an application with all four Products on, the object reads: +On an Application with all four Platform Resources on, the object reads: ```json "modules": { @@ -168,7 +182,7 @@ On an application with all four Products on, the object reads: ## Errors -A Product that is off on the application surfaces as a refusal of the object that needs it, with `400`. Each of these refusals names Application Accelerator. This body answers a request rule on `${request_uri}`: +A Platform Resource that is off in the Application surfaces as a refusal of the object that needs it, with `400`. Each of these refusals names Application Accelerator, except `31001`, which refuses turning Cache off. This body answers a request rule on `${request_uri}`: ```json { @@ -189,13 +203,14 @@ A Product that is off on the application surfaces as a refusal of the object tha } ``` -`meta.missing_required_modules` lists the keys to turn on in the `modules` object of the application. +`meta.missing_required_modules` lists the keys to turn on in the `modules` object of the Application. | Code | Title | Status | What causes it | What to do | | --- | --- | --- | --- | --- | -| `25047` | Missing Required Modules | 400 | A request rule whose criteria read `${request_uri}`, on an application with Application Accelerator off | Turn on Application Accelerator, or match on `${uri}`, which the API accepts without it | -| `21013` | This Configuration Requires The Edge Application's Application Accelerator Module | 400 | A cache setting that varies the cache by method or by query string, on an application with Application Accelerator off. The pointer names the variation, such as `/data/modules/application_accelerator/cache_vary_by_method` | Turn on Application Accelerator, then save the cache setting again | -| `21021` | Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module | 400 | A cache setting whose `modules.cache.max_age` is below 60, on an application with Application Accelerator off. `meta.min_value` is `60` | Turn on Application Accelerator, or set **Max Age** to 60 seconds or more | +| `25047` | `Missing Required Modules` | 400 | A request rule whose criteria read `${request_uri}`, on an Application with Application Accelerator off | Turn on Application Accelerator, or match on `${uri}`, which the API accepts without it | +| `21013` | `This Configuration Requires The Edge Application's Application Accelerator Module` | 400 | A cache setting that varies the cache by method, query string, cookie, or device group, on an Application with Application Accelerator off. The pointer names the variation, such as `/data/modules/application_accelerator/cache_vary_by_method` | Turn on Application Accelerator, then save the cache setting again | +| `21021` | `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module` | 400 | A cache setting whose `modules.cache.max_age` is below 60, on an Application with Application Accelerator off. `meta.min_value` is `60` | Turn on Application Accelerator, or set `modules.cache.max_age` to 60 seconds or more | +| `31001` | `Cache Cannot Be False` | 400 | A `PATCH` that sets `modules.cache.enabled` to `false` | Leave Cache on: it cannot be turned off | --- @@ -203,8 +218,8 @@ A Product that is off on the application surfaces as a refusal of the object tha - The mechanism behind an application, its rules, and the Products it runs. - The cache variations and Rules Engine behaviors Application Accelerator adds to an application. + The mechanism behind an Application, its rules, and the Platform Resources turned on in it. + The cache variations and Rules Engine behaviors Application Accelerator adds to an Application. The Browser Cache, Cache, and Application Accelerator fields of a cache setting. The queries that read the rules each request ran once Debug Rules is on. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/real-time-purge.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/real-time-purge.mdx index b418bfd48a..528d3b5858 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/real-time-purge.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/real-time-purge.mdx @@ -12,17 +12,19 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -**Real-Time Purge** removes a cached object from [Cache](/en/documentation/platform/applications/cache/), or from [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/), before its TTL ends, so the next request fetches the current version from the origin. A purge takes one of three arguments: a list of URLs, a list of cache keys, or one wildcard expression. Azion queues the purge after the confirmation and lists it in the purge history when it is complete. Use a purge to serve an update the origin already has, to remove an obsolete object, or to keep control of what Azion serves for dynamic content. For the steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/). For the format of a key, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). +**Real-Time Purge** is a Platform Resource that removes a cached object from [Cache](/en/documentation/platform/applications/cache/), or from [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/), before its time to live (TTL) ends. Once the object is in neither Cache nor Tiered Cache, the next request for it fetches the current version from the origin. Use a purge to serve an update the origin already has, to remove an obsolete object, or to keep control of what Azion serves for dynamic content. + +A purge takes one of three arguments: a list of URLs, a list of cache keys, or one wildcard expression. Azion confirms each purge, queues it, and lists it in the purge history when it is complete. For the steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/). For the format of a key, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). --- ## Interfaces -Five interfaces send the same purge. Each one names the purge type, carries the argument list, and names the layer. +Five interfaces send the same purge. Each one names the purge type and carries the argument list. Every interface except Azion Lib also names the layer, and Azion Lib purges the Cache layer. | Interface | Purge | | --- | --- | -| [Azion Console](https://console.azion.com/) | **Real-Time Purge**, where you choose the purge type and the layer and enter the argument list. For the steps, refer to [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content/) | +| [Azion Console](https://console.azion.com/) | **Real-Time Purge** > **Purge** opens **Create Real-Time Purge**, with **Layer Settings**, **Purge Type**, and **Arguments List**, one argument per line | | [Azion API v4](/en/documentation/devtools/api/) | `POST /v4/workspace/purge/{purge_type}`, with `purge_type` set to `url`, `cachekey`, or `wildcard`, and a body with `items` and `layer` | | Azion CLI | [`azion purge`](/en/documentation/devtools/cli/purge/) with `--urls`, `--cachekey`, or `--wildcard`, and `--layer` | | `azion.config.js` | An entry of the `purge` array, of type `AzionPurge`, with `type`, `items`, and `layer` | @@ -39,9 +41,9 @@ A purge names the layer it clears. The `layer` field of the API body and the `-- | Layer | API value | What it purges | | --- | --- | --- | | Cache | `cache`, the default | The objects cached on Azion's distributed infrastructure | -| Tiered Cache | `tiered_cache` | The objects in the second cache layer, on applications whose cache setting has the module on; by cache key only. A URL or wildcard purge with this layer returns error `30001` | +| Tiered Cache | `tiered_cache` | The objects in the second cache layer, on Applications whose cache settings turn Tiered Cache on; by cache key only | -To purge an object from both layers, purge Tiered Cache first, then Cache, so the cache is not refilled from a stale Tiered Cache copy. +A URL or wildcard purge with the `tiered_cache` layer returns error `30001`. To purge an object from both layers, purge Tiered Cache first and then Cache. In that order, the cache is not refilled from a stale Tiered Cache copy. --- @@ -57,7 +59,9 @@ The `purge_type` segment of the API path, the CLI flag, and the Console's purge ### URL purge -A URL purge takes a list of URLs and is not recursive: only the URLs in the list leave the cache. Azion converts each URL to its cache key with no content variation, so a variation by cookie, device group, or image format does not expire with it. Purge those variations with a cache key or a wildcard. A variation by query string is part of the URL, so it does expire when the arguments are in the same order as in the cache key. With **Sort** on in the cache setting, send the arguments in alphabetical order, or use a cache key or wildcard purge. For the **Sort** control, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#application-accelerator). +A URL purge takes a list of URLs and is not recursive: only the URLs in the list leave the cache. Azion converts each URL to its cache key with no content variation. So a variation by cookie, device group, image format, or request body does not expire with it. Purge those variations with a cache key or a wildcard. + +A variation by query string is part of the URL, so it expires when the arguments are in the same order as in the cache key. With `sort_enabled` on in the cache setting, send the arguments in alphabetical order, or use a cache key or wildcard purge. For the `sort_enabled` field, refer to [Cache settings](/en/documentation/platform/applications/cache/cache-settings/#application-accelerator). A URL is `scheme://host` or `host`, with an optional `/path` and `?query-string`. Without a scheme, Azion purges both the HTTP and the HTTPS copies. An asterisk (`*`) in a URL purge is a literal character, not a wildcard. The list below carries four valid URL arguments: @@ -68,11 +72,11 @@ A URL is `scheme://host` or `host`, with an optional `/path` and `?query-string` ### Cache key purge -A cache key purge takes a list of cache keys. A key names one variation of an object. It can vary by query string, with or without **Sort**, by cookie, device group, or request method through **Advanced Cache Key** on [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), or by image format through [Image Processor](/en/documentation/platform/applications/image-processor/). To purge every variation of an object, list every key. A cache key purge is the only type that reaches the Tiered Cache layer. +A cache key purge takes a list of cache keys. A key names one variation of an object. With Advanced Cache Key, a Feature of [Application Accelerator](/en/documentation/platform/applications/application-accelerator/), a key can vary by query string, sorted or not, and by cookie, device group, or request method. Through [Image Processor](/en/documentation/platform/applications/image-processor/), a key can also vary by image format. To purge every variation of an object, list every key. A cache key purge is the only type that reaches the Tiered Cache layer. ### Wildcard purge -A wildcard purge takes one expression: `scheme://host` or `host`, with an optional `/path` and `?query-string`, and an asterisk (`*`) in the path or in the query string. Several asterisks match a more complex path. Each request carries one expression, and a wildcard purge reaches the Cache layer only, not Tiered Cache. The list below carries ten valid wildcard expressions: +A wildcard purge takes one expression: `scheme://host` or `host`, with an optional `/path` and `?query-string`. The expression carries an asterisk (`*`) in the path or in the query string. Several asterisks match a more complex path. Each request carries one expression, and a wildcard purge reaches the Cache layer only, not Tiered Cache. The list below carries ten valid wildcard expressions: - `www.example.com/*` - `static.example.com/include/*.css` @@ -94,22 +98,22 @@ When a cache setting varies the cache key, one object has one key per variation. | Variation | How to purge | | --- | --- | | Cookies | A cache key purge that lists every variation, or a wildcard purge with `@@*` at the end | -| Query string | A cache key purge that lists every variation, a wildcard purge with `?*` at the end, or a URL purge that names only the arguments in the key, in alphabetical order when **Sort** is on | -| Device group | A cache key purge that lists every variation, or a wildcard purge | +| Query string | A cache key purge that lists every variation, a wildcard purge with `?*` at the end, or a URL purge that names only the arguments in the key, in alphabetical order when `sort_enabled` is on | +| Device group | A cache key purge that lists every variation, or a wildcard purge with `@@*` at the end | | Image Processor | A cache key purge that lists every variation, or a wildcard purge with `*` at the end | | Large File Optimization | A cache key purge that lists every fragment's key, or a wildcard purge such as `static.example.com/media/file.mp4*` | | Cached `POST` and `OPTIONS` | A cache key purge that lists every variation, or a wildcard purge with `@@*` at the end | -Query-string, cookie, device group, and request method variation come from **Advanced Cache Key**, a feature of [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). The same module caches `POST` and `OPTIONS` responses; without it, Azion caches `GET` and `HEAD` only. For the behaviors, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/). +Query-string, cookie, device group, and request method variation come from Advanced Cache Key, in [Application Accelerator](/en/documentation/platform/applications/application-accelerator/). Application Accelerator also caches `POST` and `OPTIONS` responses; without it, Azion caches `GET` and `HEAD` only. For the behaviors, refer to [Application Accelerator settings](/en/documentation/platform/applications/application-accelerator/settings/). -An image that [Image Processor](/en/documentation/platform/applications/image-processor/) serves has one key per processing and per format. The key carries the host and path, the processing arguments after the `?` separator, and the format after `@@`. The four keys below belong to one image: +An image that [Image Processor](/en/documentation/platform/applications/image-processor/) serves has one key per processing and per format when the cache setting names `ims` in its query-string allowlist. When the cache setting does not vary the key by query string, the `ims` value is not part of the key, so every size and processing of the path shares a key, and the first one stored answers every `ims` value. With `ims` in the allowlist, the key carries the host and path, then `@@`, the `ims` query string, and the converted format at the end, with no separator. The four keys below belong to one image: - `httpstatic.example.com/static/images/image.jpg@@` - `httpstatic.example.com/static/images/image.jpg@@webp` -- `httpstatic.example.com/static/images/image.jpg?ims=88x@@` -- `httpstatic.example.com/static/images/image.jpg?ims=88x@@webp` +- `httpstatic.example.com/static/images/image.jpg@@?ims=88x` +- `httpstatic.example.com/static/images/image.jpg@@?ims=88xwebp` -With **Large file optimization** on, Azion caches a large object in fragments, each with its own key. The file can stay in the cache after a purge of its URL. To purge it, list each fragment's key, or use the wildcard `static.example.com/media/file.mp4*`, which clears every fragment of one file. +With Large File Optimization on in the cache setting, Azion caches a large object in fragments, each with its own key. The file can stay in the cache after a purge of its URL. To purge it, list each fragment's key, or use the wildcard `static.example.com/media/file.mp4*`. That wildcard clears every fragment of one file. :::caution A purge of individual fragments can leave old and new fragments side by side. When the file changes at the origin, a fragment that was not purged stays in the cache next to the fragments fetched again. @@ -157,13 +161,13 @@ Each command prints one line: Purge carried out successfully ``` -After the purge, the next request for the object returns `x-cache: MISS`, because Azion fetches it from the origin again. +Once a purge of the Cache layer completes, a request for the object sent with `Pragma: azion-debug-cache` returns `x-cache: MISS`, because that layer no longer holds the object. --- -## Confirmation +## Purge queue and history -After you create a purge, a message confirms the creation. Azion then queues the purge, and it appears in the purge history when it is complete, because the result takes time to propagate across Azion's distributed infrastructure. The history can be filtered by the user who made the purge, the time, the argument list, the purge type, and the method. +After you create a purge, a message confirms the creation. Azion then queues the purge. The purge appears in the purge history when it is complete, because the result takes time to propagate across Azion's distributed infrastructure. In Azion Console, the **Real-Time Purge** list shows each purge with its **Date**, **User**, **Layer**, **Type**, and **Arguments**, and the **Repurge** action sends the same purge again. --- @@ -171,31 +175,37 @@ After you create a purge, a message confirms the creation. Azion then queues the The API answers each request below with HTTP `400`. The body carries the code, the title, and a detail. -| Code | Title | Cause | What to do | -| --- | --- | --- | --- | -| `30001` | `Invalid Purge Layer For Purge Type` | `layer` is `tiered_cache` on a `url` or `wildcard` purge; the detail reads `Invalid purge layer for purge type "url".` | Purge Tiered Cache by cache key, or set `layer` to `cache`. | -| `30003` | `Unauthorized Domain` | An item names a domain the account does not own; the detail reads `The domain is not authorized for your account.` | Correct the domain in the item. A purge reaches only the domains the account owns. | -| `30005` | `Invalid Purge Cachekey` | An item of a `cachekey` purge is not a valid cache key; the detail reads `The Content must be a valid cachekey.` | Send the key as the `x-cache-key` header shows it; the format is on [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). | -| `10065` | `List Field Max Length` | `items` has more than 50 elements on a `url` or `cachekey` purge, with the detail `Ensure this field has no more than 50 elements.`; or more than 1 element on a `wildcard` purge, with the detail `Ensure this field has no more than 1 elements.` and `meta.max_length` set to `1`. | Split the list into requests of 50 items or fewer, and send one wildcard expression per request. | +| Code | Title | Cause | Detail | What to do | +| --- | --- | --- | --- | --- | +| `30001` | `Invalid Purge Layer For Purge Type` | `layer` is `tiered_cache` on a `url` or `wildcard` purge. | `Invalid purge layer for purge type "url".` | Purge Tiered Cache by cache key, or set `layer` to `cache`. | +| `30003` | `Unauthorized Domain` | An item names a domain the account does not own. | `The domain is not authorized for your account.` | Correct the domain in the item. A purge reaches only the domains the account owns. | +| `30005` | `Invalid Purge Cachekey` | An item of a `cachekey` purge is not a valid cache key. | `The Content must be a valid cachekey.` | Send the key as the `x-cache-key` header shows it; the format is on [Cache keys](/en/documentation/platform/applications/cache/cache-keys/). | +| `10065` | `List Field Max Length` | `items` has more than 50 elements on a `url` or `cachekey` purge, or more than 1 on a `wildcard` purge. | `Ensure this field has no more than 50 elements.`; on a `wildcard` purge, `Ensure this field has no more than 1 elements.`, with `meta.max_length` set to `1` | Split the list into requests of 50 items or fewer, and send one wildcard expression per request. | --- ## Limits -The bounds below apply to purge requests. Each row names the API's answer past the value where a source states one. +The bounds below apply to purge requests. Each row names the API's answer past the value. | Value | Bound | Past the bound | | --- | --- | --- | -| URL or cache key length | 4,096 characters | No error is documented | -| URL and cache key requests per client | 200 requests, 50 objects per request | HTTP `400`, error `10065` above 50 objects in one request | -| URL and cache key objects per minute | 10,000 objects every 60 seconds | No error is documented | -| Wildcard requests per day | 2,000 requests in a 24-hour interval | No error is documented | -| Wildcard expression length | 256 characters | No error is documented | +| URL or cache key length | 4,096 characters | The API accepts a longer URL when it receives the request: a purge of one 4,098-character URL returns HTTP `201`. | +| URL and cache key objects per request | 50 objects | HTTP `400`, error `10065` | | Wildcard expressions per request | 1 | HTTP `400`, error `10065` | -| Purge history | 1,000,000 requests | No error is documented | -| Purge history retention | 6 months | No error is documented | -For the purges each plan includes, refer to [Applications limits](/en/documentation/platform/applications/limits/#cache). +Six more bounds set the rate of purge requests, the length of a wildcard, and how much purge history Azion keeps. + +| Value | Bound | +| --- | --- | +| URL and cache key requests per client | 200 requests | +| URL and cache key objects per minute | 10,000 objects every 60 seconds | +| Wildcard requests per day | 2,000 requests in a 24-hour interval | +| Wildcard expression length | 256 characters | +| Purge history | 1,000,000 requests | +| Purge history retention | 6 months | + +[Azion pricing](https://www.azion.com/en/pricing/) lists the purges each plan includes. --- diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/rules-engine.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/rules-engine.mdx index 517156c2c0..f82fb0cd6f 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/rules-engine.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/rules-engine.mdx @@ -1,6 +1,6 @@ --- title: Rules Engine for Applications -description: Look up every criterion variable, operator, and behavior an application rule can use, by phase, and the Product each one requires. +description: Look up every criterion variable, operator, and behavior a rule of an Application can use, by phase, and the Platform Resource each one requires. meta_tags: 'applications, rules engine, request phase, response phase, criteria, variables, operators, behaviors, set connector, set cache policy, run function' namespace: documentation_products_edge_applications_rules_engine permalink: /documentation/platform/applications/rules-engine/ @@ -10,22 +10,24 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Rules Engine for Applications holds the conditional logic of an [application](/en/documentation/platform/applications/). Each rule tests a request against its criteria, the _if_ of the rule, and runs its behaviors, the _then_, only when the request matches. Every rule belongs to one phase: it acts on the request the user sends, or on the response the user receives. Some variables and behaviors need a Product enabled on the application, and each table on this page names it. For the order in which an application runs its rules and behaviors, refer to [How Applications works](/en/documentation/platform/applications/how-it-works/). +Rules Engine for Applications is a Feature of Applications that holds the rules of an [Application](/en/documentation/platform/applications/). A rule is conditional logic that the Application applies to a request or to its response. For example, a rule can send the request to a [Connector](/en/documentation/platform/connectors/), apply a [cache setting](/en/documentation/platform/applications/cache/cache-settings/), or invoke a [Function Instance](/en/documentation/platform/applications/functions-instances/). Each rule has criteria, its _if_, and behaviors, its _then_. It runs its behaviors only when a request matches its criteria. Every rule belongs to one phase: the Request Phase acts on the request, and the Response Phase acts on the response. -An application rule decides how the application handles a request that reached it, such as the connector or the cache setting the request uses. When the workload's deployment names a firewall, the firewall decides earlier whether the request reaches the application at all. For its rules, refer to [Rules Engine for Firewall](/en/documentation/platform/firewall/rules-engine/). +Some variables and behaviors need a Platform Resource turned on in the Application, and each table on this page names it. For the order in which an Application runs its rules and behaviors, refer to [How Applications works](/en/documentation/platform/applications/how-it-works/). + +When the deployment of a [Workload](/en/documentation/platform/workloads/) sets both the Application and a [Firewall](/en/documentation/platform/firewall/), the Firewall decides earlier whether the request reaches the Application at all. For its rules, refer to [Rules Engine for Firewall](/en/documentation/platform/firewall/rules-engine/). --- ## Rule fields -An application keeps its rules in the **Rules Engine** tab of Azion Console, where **+ Rule** creates one. A new application has no rules. In the API, a rule is a JSON object: a request sets five of its fields, and the platform sets and returns the other five. +A new Application has no rules, and [Create request and response rules](/en/documentation/guides/application-development/getting-started/rules-engine/) shows how to create one in Azion Console. In the API, a rule is a JSON object: a request sets five of its fields, and the platform sets and returns the other five. For the fields you set, the Description column also names the label of each one in the rule form of Azion Console. | Field | Type | Required | Description | | --- | --- | --- | --- | -| `id` | integer | Read-only | The identifier every later call on the rule uses. The Console rule list does not show it, and `azion list rules-engine` prints it as `ID` | -| `name` | string, 1 to 250 characters | Yes | The name the rule list shows. The Console renders it as **Name**, in the **General** section. Give each rule a unique name | -| `description` | string, up to 1,000 characters | No | A comment shown in the rule list, rendered as **Description** in **General**. Defaults to an empty string. Past 1,000 characters, the Console shows `Description should not exceed 1000 characters` | -| `active` | boolean | No | Whether the rule runs. Defaults to `true`. The Console renders it as the **Active** switch in the **Status** section | +| `id` | integer | Read-only | The identifier every later call on the rule uses | +| `name` | string, 1 to 250 characters | Yes | The name the rule list shows, rendered as **Name** in **General** | +| `description` | string, up to 1,000 characters | No | A comment the rule list shows, rendered as **Description** in **General**. Defaults to an empty string | +| `active` | boolean | No | Whether the rule runs, the **Active** switch in **Status**. Defaults to `true` | | `criteria` | array of 1 to 5 groups, each an array of 1 to 10 criteria | Yes | The conditions a request must meet. Criteria lists every variable and operator | | `behaviors` | array of 1 to 10 behavior objects | Yes | What the rule does when the request matches. Behaviors lists every one | | `order` | integer, 0 to 199 | Read-only | The position of the rule in the list of its phase | @@ -33,26 +35,28 @@ An application keeps its rules in the **Rules Engine** tab of Azion Console, whe | `last_modified` | date-time | Read-only | When the rule last changed | | `created_at` | date-time | Read-only | When the rule was created | +The Console rule list does not show `id`, and `azion list rules-engine` prints it as `ID`. Give each rule a unique name. Past 1,000 characters of `description`, the Console shows `Description should not exceed 1000 characters`. + The platform assigns `order` as rules are created: the first rule of a phase carries `0`, and the next one carries `1`. The Console numbers the same positions from `1`, so the rule whose `order` is `0` is the one its list shows as `1`. The Console rule list lets you move a rule, and a position past the end of the list places the rule last. The API reorders a phase with one call, which the API section lists. --- ## Phases -A rule runs in the phase chosen in the **Phase** section when the rule is created, and that choice is final. To run the same logic in the other phase, create a new rule there. The Console groups the rule list by phase, and the API keeps each phase in its own collection. +You set the phase of a rule when you create it, and you cannot change it later. To run the same logic in the other phase, create a new rule there. In Azion Console, the rule list groups the rules by phase, and the API keeps each phase in its own collection. | Phase | What its rules act on | API collection | | --- | --- | --- | -| Request Phase | The request the user sends to the application | `/v4/workspace/applications//request_rules` | -| Response Phase | The response the application delivers to the user | `/v4/workspace/applications//response_rules` | +| Request Phase | The request the user sends to the Application | `/v4/workspace/applications//request_rules` | +| Response Phase | The response the Application delivers to the user | `/v4/workspace/applications//response_rules` | -Each phase offers its own set of variables and behaviors. A value that exists only once the origin answers, such as `${status}`, is readable only in the Response Phase. The Phases column of the variable table and the two API columns of the behavior table say which phase accepts each one. +Each phase offers its own set of variables and behaviors. A value that exists only once the origin or a [Function](/en/documentation/platform/functions/) answers, such as `${status}`, is readable only in the Response Phase. The Phases column of the variable table and the two API columns of the behavior table say which phase accepts each one. --- ## Criteria -Criteria decide which requests a rule acts on. A criterion names a variable, an operator, and, for most operators, an argument to compare the variable with. In the API, a criterion is an object with four keys: `variable`, `operator`, `conditional`, and `argument`. +A criterion is a condition a request must meet: a variable, an operator, and, for most operators, an argument to compare the variable with. In the API, a criterion is an object with four keys: `variable`, `operator`, `conditional`, and `argument`. This criterion matches a request from a desktop browser, with a regular expression on the `User-Agent` header: @@ -62,30 +66,30 @@ This criterion matches a request from a desktop browser, with a regular expressi ### Variables -A variable holds one value of the request or of the response, and the Phases column names where a criterion can read it. `${request_uri}` and `${device_group}` require [Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/) on the application. A rule that reads one of them on an application without the Product is refused: the API answers HTTP `400` with the error code `25047`, `Missing Required Modules`, whose full body the Errors section carries. `${uri}` needs no Product, so it is the URI variable for an application without Application Accelerator. +A variable is a value of the request or of the response, written `${name}`. The Phases column names where a criterion can read it. `${request_uri}` and `${device_group}` require [Application Accelerator](/en/documentation/platform/applications/application-accelerator/settings/) turned on in the Application. A rule that reads one of them in an Application with Application Accelerator off is refused. The API answers HTTP `400` with the error code `25047`, `Missing Required Modules`, and the Errors section carries the full body. `${uri}` needs no Platform Resource, so it is the URI variable for an Application without Application Accelerator. Six rows name a pattern instead of a variable. In `${arg_name}`, `${cookie_name}`, `${http_name}`, `${sent_http_name}`, `${upstream_cookie_name}`, and `${upstream_http_name}`, replace `name` with the argument, cookie, or header to read. | Variable | What it holds | Example | Phases | | --- | --- | --- | --- | -| `${arg_name}` | The value of the query-string argument `name` | `${arg_search}` holds `test` for `/path?search=test` | Request, Response | +| `${arg_name}` | The value of the query-string argument `name`. Replace each hyphen in `name` with an underscore | `${arg_search}` holds `test` for `/path?search=test` | Request, Response | | `${args}` | Every argument name and value in the query string | `${args}` holds `search=test` for `/path?search=test` | Request, Response | -| `${cookie_name}` | The value of the cookie `name` | `${cookie_icl_current_language}` holds `pt-br` for `icl_current_language = pt-br` | Request, Response | -| `${device_group}` | The name of the [device group](/en/documentation/platform/applications/device-groups/) the request matches, from the **Device Groups** tab of the application. Requires Application Accelerator | `Mobile` | Request, Response | +| `${cookie_name}` | The value of the cookie `name`. Replace each hyphen in `name` with an underscore | `${cookie_icl_current_language}` holds `pt-br` for `icl_current_language = pt-br` | Request, Response | +| `${device_group}` | The name of the [device group](/en/documentation/platform/applications/device-groups/) the request matches, among the device groups of the Application. Requires Application Accelerator | `Mobile` | Request, Response | | `${domain}` | The host name or `Host` header of the request, as `${host}` reads it, without the last subdomain after the second-level domain | `blog.domain.com` for `az.blog.domain.com` | Request, Response | -| `${geoip_city}` | The city name, from the geolocation base `geoip_city` | `Frankfurt am Main` | Request, Response | -| `${geoip_city_continent_code}` | The two-letter continent code, from the geolocation base `geoip_city` | `EU`, for Europe | Request, Response | -| `${geoip_city_country_code}` | The two-letter country code, from the geolocation base `geoip_city` | `IN`, for India | Request, Response | -| `${geoip_city_country_name}` | The country name, from the geolocation base `geoip_city` | `United States` | Request, Response | +| `${geoip_city}` | The city name | `Frankfurt am Main` | Request, Response | +| `${geoip_city_continent_code}` | The two-letter continent code | `EU`, for Europe | Request, Response | +| `${geoip_city_country_code}` | The two-letter country code | `IN`, for India | Request, Response | +| `${geoip_city_country_name}` | The country name | `United States` | Request, Response | | `${geoip_continent_code}` | The two-letter continent code | `NA`, for North America | Request, Response | -| `${geoip_country_code}` | The two-letter country code, from the geolocation base `geoip_country` | `RU`, for Russia | Request, Response | -| `${geoip_country_name}` | The country name, from the geolocation base `geoip_country` | `France` | Request, Response | +| `${geoip_country_code}` | The two-letter country code | `RU`, for Russia | Request, Response | +| `${geoip_country_name}` | The country name | `France` | Request, Response | | `${geoip_region}` | The two-letter region code | `FL`, for Florida | Request, Response | -| `${geoip_region_name}` | The region name, from the geolocation base `geoip_region` | `Ontario` | Request, Response | +| `${geoip_region_name}` | The region name | `Ontario` | Request, Response | | `${host}` | In order of precedence: the host name in the request line, the value of the `Host` header, or the name of the server that serves the request | `blog.domain.com` | Request, Response | | `${http_name}` | The value of the request header `name`. Write `name` in lowercase and replace each hyphen with an underscore. `name` must be a valid [HTTP request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) | `${http_accept}` holds `image/webp,image/apng` for `Accept: image/webp,image/apng` | Request, Response | | `${remote_addr}` | The IP address of the client that sends the request | `200.10.2.50` | Request, Response | -| `${remote_port}` | The port the client uses in the URL of its request | `443` | Request, Response | +| `${remote_port}` | The TCP source port of the client connection, which changes from one connection to the next | `6742` | Request, Response | | `${remote_user}` | The user name sent through basic authentication, when the request carries one | `username` | Request, Response | | `${request}` | The first line of the request as the client sent it: the method, the URI, and the HTTP version | `GET /path HTTP/2.0` | Request, Response | | `${request_body}` | The content of the request body, without the request line or the headers | `{"name": "azion", "action": "login"}` | Request, Response | @@ -105,23 +109,23 @@ Six rows name a pattern instead of a variable. In `${arg_name}`, `${cookie_name} ### Mutual Transport Layer Security (mTLS) variables -These variables hold the client certificate that a request presents over mTLS, where the client also authenticates with a certificate. A criterion reads them only in the Request Phase. For how a workload asks for and validates client certificates, refer to [mTLS](/en/documentation/platform/workloads/mtls/). +These variables hold the client certificate that a request presents over mTLS, where the client also authenticates with a certificate. A criterion reads them only in the Request Phase. For how a Workload asks for and validates client certificates, refer to [mTLS](/en/documentation/platform/workloads/mtls/). | Variable | What it holds | Example | | --- | --- | --- | | `${ssl_client_cert}` | The client certificate in Privacy-Enhanced Mail (PEM) format. Deprecated: read `${ssl_client_escaped_cert}` instead | `-----BEGIN CERTIFICATE-----` `MIICnz...` `-----END CERTIFICATE-----` | | `${ssl_client_escaped_cert}` | The client certificate in PEM format, as a URL-encoded string | `-----BEGIN%20CERTIFICATE-----%0AMIICnz...%0A-----END%20CERTIFICATE-----` | | `${ssl_client_fingerprint}` | The Secure Hash Algorithm 1 (SHA-1) fingerprint of the client certificate | `2fd4e1c67a2d28fced849` | -| `${ssl_client_i_dn}` | The issuer DN string of the client certificate | `/C=US/ST=California/L=San Francisco/O=Example CA/CN=issuer.com` | +| `${ssl_client_i_dn}` | The issuer Distinguished Name (DN) string of the client certificate | `/C=US/ST=California/L=San Francisco/O=Example CA/CN=issuer.com` | | `${ssl_client_s_dn}` | The subject DN string of the client certificate | `/C=US/ST=California/L=San Francisco/O=Example CA/CN=example.com` | -| `${ssl_client_s_dn_parsed}` | The subject CN extracted from the client certificate, as a string | `example.com` | +| `${ssl_client_s_dn_parsed}` | The subject Common Name (CN) extracted from the client certificate, as a string | `example.com` | | `${ssl_client_serial}` | The serial number of the client certificate | `6C:0A:83:7E:92:3B:D6:C6:E3:56:50:E7` | | `${ssl_client_v_end}` | The expiration date of the client certificate, in the format `YYYYMMDDHHmmSS` | `20230115120000` | | `${ssl_client_v_remain}` | The number of days until the client certificate expires | `100` | | `${ssl_client_v_start}` | The start date of the client certificate, in the format `YYYYMMDDHHmmSS` | `20230115120000` | | `${ssl_client_verify}` | The result of the client certificate verification | `SUCCESS`, `FAILED:reason`, or `NONE` | -Most mTLS services expect to receive the client certificate itself. A Request Phase rule can send `${ssl_client_escaped_cert}` to the origin in the `X-Forward-Client-Cert` (XFCC) header with _Add Request Header_, and the origin then reads the certificate data from that header. +Most mTLS services expect to receive the client certificate itself. A Request Phase rule can send `${ssl_client_escaped_cert}` to the origin with _Add Request Header_, in the `X-Forward-Client-Cert` (XFCC) header. The origin then reads the certificate data from that header. ### Variables in behavior arguments @@ -143,12 +147,12 @@ Two more variables act as functions: each takes an argument, and both work only | Variable | What it returns | Example | | --- | --- | --- | -| `${cookie_time_offset(number)}` | The current date plus an offset of `number` seconds, for the expiration of a cookie | `cookie-name=cookie-value; Expires=${cookie_time_offset(3600)}` in [Add Cookie](#add-cookie) makes the cookie expire 1 hour after it is created | +| `${cookie_time_offset(number)}` | The current date plus an offset of `number` seconds, for the expiration of a cookie | `cookie-name=cookie-value; Expires=${cookie_time_offset(3600)}` in [Add Response Cookie](#add-request-cookie-and-add-response-cookie) makes the cookie expire 1 hour after it is created | | `${encode_base64(string)}` | `string`, encoded in base64 | `${encode_base64(http://www.yourdomain.com/)}` returns `aHR0cDovL3d3dy55b3VyZG9tYWluLmNvbS8=` | ### Operators -A criterion compares its variable with its argument through an operator, and the API sends the operator as one of these values in `operator`. The operators the Console offers can vary with the variable the criterion uses. +A criterion compares its variable with its argument through an operator, and the API sends the operator as one of these values in `operator`. | Operator | The criterion matches when | Argument | | --- | --- | --- | @@ -158,14 +162,14 @@ A criterion compares its variable with its argument through an operator, and the | `does_not_start_with` | The value does not start with the argument | String | | `matches` | The value matches the regular expression in the argument | Regular expression | | `does_not_match` | The value does not match the regular expression in the argument | Regular expression | -| `exists` | The variable has a value. `${arg_search}` exists when the query string carries a `search` argument | None | -| `does_not_exist` | The variable has no value. `${arg_search}` does not exist when the query string carries no `search` argument | None | +| `exists` | The variable has a value, such as `${arg_search}` with a `search` argument | None | +| `does_not_exist` | The variable has no value, such as `${arg_search}` without a `search` argument | None | ### Conditionals -Criteria combine inside groups, and a rule holds 1 to 5 groups of 1 to 10 criteria each. In a group, the first criterion carries the conditional `if`, and each later criterion carries `and` or `or`. The Console joins criteria with **And** and **Or**. +Criteria combine inside groups, and a rule holds 1 to 5 groups of 1 to 10 criteria each. In a group, the first criterion carries the conditional `if`, and each later criterion carries `and` or `or`. In Azion Console, the rule form joins criteria with **And** and **Or**. -Inside a group, `and` takes precedence over `or`. To set the precedence yourself, split the conditions into groups: the groups of a rule are joined by `and`, so a request matches the rule only when it matches every group. For example, a rule that needs `A or B`, and also `C`, puts `A or B` in one group and `C` in a second one. +Inside a group, `and` takes precedence over `or`. To set the precedence yourself, split the conditions into groups. The groups of a rule are joined by `and`, so a request matches the rule only when it matches every group. For example, a rule that needs `A or B`, and also `C`, puts `A or B` in one group and `C` in a second one. In the API, `criteria` is a list of groups, and each group is a list of criterion objects, as in `[[{ … }]]`. @@ -173,39 +177,45 @@ In the API, `criteria` is a list of groups, and each group is a list of criterio ## Behaviors -Behaviors are what a rule does to a request, or to a response, that matches its criteria, and a rule carries from 1 to 10 of them. The Console labels the first behavior row **Then** and each later row **And**, and **+ Add Behavior** adds a row. Some behaviors cannot be added together, or only under some conditions, and the Console refuses those combinations. +A behavior is an action a rule runs on a request, or on a response, that matches its criteria. A rule carries 1 to 10 behaviors. In Azion Console, the rule form labels the first behavior row **Then** and each later row **And**. Some behaviors cannot be added together, and the API refuses those combinations with HTTP `400`: + +- A behavior after a final one, such as _Deliver_, with `25010`. +- A behavior that a rule takes only once, such as _Bypass Cache_, repeated in the rule, with `25011`. +- _Set Cache Policy_ beside _Deny (403 Forbidden)_, _Redirect To (301 Moved Permanently)_, _Redirect To (302 Found)_, or _No Content (204)_, with `25012`. + +In Azion Console, **Add Behavior** turns off once _Deliver_ is in the rule. In the API, each behavior is an object with a `type`. A behavior that takes an argument carries it in `attributes.value`, and _Capture Match Groups_ carries three named attributes instead. The Console refuses some arguments that contain a space, with `Argument cannot contain spaces, use %20 instead`. -The two API columns give the `type` each phase accepts, and Requires names the Product the application must have enabled. When that Product is off, the Console adds _- Required Application Accelerator_, _- Required Image Processor_, or _- Required Function_ to the label. A new application has Cache and Functions on, and Application Accelerator and Image Processor off. +The two API columns give the `type` each phase accepts, and Requires names the Platform Resource that must be turned on in the Application. When that Platform Resource is off, Azion Console adds _- Required Application Accelerator_, _- Required Image Processor_, or _- Required Function_ to the label. A new Application has [Cache](/en/documentation/platform/applications/cache/) and [Functions](/en/documentation/platform/functions/) on, and Application Accelerator and [Image Processor](/en/documentation/platform/applications/image-processor/) off. | Behavior | API `type`, Request Phase | API `type`, Response Phase | Requires | | --- | --- | --- | --- | -| Add Cookie | `add_request_cookie` | `set_cookie` | Application Accelerator | -| Add Request Header | `add_request_header` | `add_response_header` | None | +| Add Request Cookie / Add Response Cookie | `add_request_cookie` | `set_cookie` | Application Accelerator | +| Add Request Header / Add Response Header | `add_request_header` | `add_response_header` | None | | Bypass Cache | `bypass_cache` | Not available | Application Accelerator | | Capture Match Groups | `capture_match_groups` | `capture_match_groups` | Application Accelerator | | Deliver | `deliver` | `deliver` | None | | Deny (403 Forbidden) | `deny` | Not available | None | | Enable Gzip | `enable_gzip` | `enable_gzip` | None | | Enforce HLS cache | Added by Azion | Not available | Live Ingest | -| Filter Request Cookie | `filter_request_cookie` | `filter_response_cookie` | Application Accelerator | -| Filter Request Header | `filter_request_header` | `filter_response_header` | None | +| Filter Request Cookie / Filter Response Cookie | `filter_request_cookie` | `filter_response_cookie` | Application Accelerator | +| Filter Request Header / Filter Response Header | `filter_request_header` | `filter_response_header` | None | | Finish Request Phase | `finish_request_phase` | Not available | None | | Forward Cookies | `forward_cookies` | Not available | Application Accelerator | | No Content (204) | `no_content` | Not available | None | | Optimize Images | `optimize_images` | Not available | Image Processor | -| Redirect HTTP to HTTPS | `redirect_http_to_https` | Not available | HTTPS on the workload | +| Redirect HTTP to HTTPS | `redirect_http_to_https` | Not available | HTTPS on the Workload | | Redirect To (301 Moved Permanently) | `redirect_to_301` | `redirect_to_301` | None | | Redirect To (302 Found) | `redirect_to_302` | `redirect_to_302` | None | | Rewrite Request | `rewrite_request` | Not available | Application Accelerator | -| Run Function | `run_function` | `run_function` | Application Accelerator and Functions | +| Run Function | `run_function` | `run_function` | Functions | | Set Cache Policy | `set_cache_policy` | Not available | None | | Set Connector | `set_connector` | Not available | None | -### Add Cookie +### Add Request Cookie and Add Response Cookie -_Add Cookie_ adds a cookie in the `Set-Cookie` header, in either phase, and requires Application Accelerator on the application. In a Response Phase rule, the behavior is _Add Response Cookie_. The argument takes the form `cookie-name=cookie-value`, and the value can be a variable, as in `cookie-name=${arg_cookie}`. The Console checks the argument and shows `This cookie is not valid` when it cannot read one. +_Add Request Cookie_ adds a cookie in the `Set-Cookie` header in the Request Phase, and _Add Response Cookie_ does the same in the Response Phase. Both require Application Accelerator turned on in the Application. The argument takes the form `cookie-name=cookie-value`, and the value can be a variable, as in `cookie-name=${arg_cookie}`. The Console checks the argument and shows `This cookie is not valid` when it cannot read one. In the Response Phase, the argument can carry [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) attributes after the value, each one after a semicolon (`;`): @@ -220,14 +230,16 @@ A cookie with several attributes chains them, as in `cookie-name=cookie-value; D ### Add Request Header -_Add Request Header_ adds a header to the request that Azion sends to the origin, in the Request Phase, and requires no Product. A Response Phase rule adds the header to the response sent to the user instead, with the API `type` `add_response_header`. The argument takes the form `Field: value`, and the Console refuses any other shape with `Header must follow the header-name: value format`. +_Add Request Header_ adds a header to the request that Azion sends to the origin, in the Request Phase, and requires no Platform Resource. A Response Phase rule adds the header to the response sent to the user instead, with _Add Response Header_, the API `type` `add_response_header`. The argument takes the form `Field: value`, and the Console refuses any other shape with `Header must follow the header-name: value format`. -The header name takes only letters (`a-z`, `A-Z`), numbers (`0-9`), hyphens, and underscores, and any other character makes the header invalid. The header value takes letters, numbers, and these characters: +In Azion Console, the header name takes letters, digits, and the characters ``!#$%&'*+-.^_`|~``. The Console refuses any other character in the name with ``Header name can only use letters, digits and !#$%&'*+-.^_`|~``. The header value takes letters, numbers, and these characters: ```text _ :;.,/"'?!(){}[]@<>=-+*#$&`|~^% ``` +The Console refuses an empty value with `Header value cannot be empty`, and a value with a line break or a control character with `Header value cannot contain line breaks or control characters`. The API checks the value on its own terms: it accepts a backslash, which the Console list leaves out, and it refuses the accented letter `é` with HTTP `400` and error `25024`, `Invalid Header`. + The argument holds up to 1,600 characters, and a longer one fails with `Argument too long`. This argument is a valid header: ```text @@ -238,20 +250,22 @@ In the API, the behavior is `add_request_header`, with the header in `attributes ### Bypass Cache -_Bypass Cache_ sends the requests the rule matches to the origin, and Azion does not cache the response. It runs in the Request Phase and requires Application Accelerator on the application. The behavior does not change the browser cache, which _Set Cache Policy_ sets through a cache setting. In the API, it is `{ "type": "bypass_cache" }`, with no attributes. +_Bypass Cache_ sends the requests the rule matches to the origin, and Azion does not cache the response. It runs in the Request Phase and requires Application Accelerator turned on in the Application. The behavior does not change the browser cache, which _Set Cache Policy_ sets through a cache setting. In the API, it is `{ "type": "bypass_cache" }`, with no attributes. -Bypass Cache acts on Azion's cache and not on the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) layer. An application whose cache settings have Tiered Cache on keeps caching objects in that layer for the minimum TTL. For how Bypass Cache differs from a cache TTL of 0, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). To bypass the cache for one path, refer to [Bypass the cache for a path](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#bypass-the-cache-for-a-path). +Bypass Cache acts on Azion's cache and not on the [Tiered Cache](/en/documentation/platform/applications/cache/tiered-cache/) layer. An Application whose cache settings have Tiered Cache on keeps caching objects in that layer for the Max Age of the cache setting. For how Bypass Cache differs from a cache TTL of 0, refer to [Bypass Cache and a TTL of 0](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). To bypass the cache for one path, refer to [Bypass the cache for a path](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#bypass-the-cache-for-a-path). ### Capture Match Groups -_Capture Match Groups_ applies a regular expression to a request field and stores the groups it captures in a temporary array. It runs in either phase and requires Application Accelerator on the application. _Rewrite Request_ reads the array to build a new path. The array is local, so only the rule that captures it can read it. +_Capture Match Groups_ applies a regular expression to a request field and stores the groups it captures in a temporary array. It runs in either phase and requires Application Accelerator turned on in the Application. _Rewrite Request_ reads the array to build a new path. The array is local, so only the rule that captures it can read it. -| Argument | API attribute | Values | Description | +| Argument in Azion Console | API attribute | Values | Description | | --- | --- | --- | --- | -| _captured array name_ | `captured_array` | String, 1 to 10 characters | The name of the array that holds the captures. Outside that range, the Console shows `Captured array name must have at least 1 character.` or `Captured array name must have at most 10 characters.` | +| _captured array name_ | `captured_array` | String, 1 to 10 characters | The name of the array that holds the captures | | **Subject** | `subject` | String, 4 to 50 characters | The request field to read, written as a variable such as `${uri}` | | **Regex** | `regex` | String, 1 to 255 characters | The regular expression. Each group to capture goes in parentheses | +Outside the range of the _captured array name_, the Console shows `Captured array name must have at least 1 character.` or `Captured array name must have at most 10 characters.` For a name in another shape, it shows `Captured array name must start with a letter and contain only letters or underscores (maximum 10 characters).` + A capture is read as `%{name[index]}`. For example, with `capture` as the array name, `${uri}` as the subject, and `^(.*/)([^/]*)$` as the regular expression, a request for `/path/image.jpg` fills three entries: - `%{capture[0]} = "/path/image.jpg"` @@ -262,19 +276,19 @@ A group can also carry a name, in the `?` notation, and its capture is the ### Deliver -_Deliver_ ends the processing of the request and delivers the content to the user, and the rules that follow do not run. It runs in either phase, requires no Product, and takes no argument. In the API, it is `{ "type": "deliver" }`. +_Deliver_ ends the processing of the request and delivers the content to the user, and the rules that follow do not run. It runs in either phase, requires no Platform Resource, and takes no argument. In the API, it is `{ "type": "deliver" }`. ### Deny (403 Forbidden) -_Deny (403 Forbidden)_ answers the request with a `403 Forbidden` page and ends the processing of the request. It runs in the Request Phase, requires no Product, and takes no argument. In the API, it is `{ "type": "deny" }`. +_Deny (403 Forbidden)_ answers the request with a `403 Forbidden` page and ends the processing of the request. It runs in the Request Phase, requires no Platform Resource, and takes no argument. In the API, it is `{ "type": "deny" }`. ### Enable Gzip -_Enable Gzip_ compresses the content with gzip when the browser of the user supports it. It runs in either phase, requires no Product, and is `{ "type": "enable_gzip" }` in the API. To turn compression on for an application, refer to [Compress application responses with gzip](/en/documentation/guides/application-performance/delivery-optimization/gzip-compression/). +_Enable Gzip_ compresses the content with gzip when the browser of the user supports it. It runs in either phase, requires no Platform Resource, and is `{ "type": "enable_gzip" }` in the API. To turn compression on for an Application, refer to [Compress application responses with gzip](/en/documentation/guides/application-performance/delivery-optimization/gzip-compression/). ### Enforce HLS cache -_Enforce HLS cache_ imposes the cache policy Azion defines for live HLS transmissions, and requires Live Ingest. Azion adds the behavior to a Request Phase rule every time you select a Live Ingest source. The behavior does two things: it bypasses the cache rules of the application, and it applies the live HLS policy. +_Enforce HLS cache_ imposes the cache policy Azion defines for live HLS transmissions, and requires Live Ingest. Azion adds the behavior to a Request Phase rule every time you select a Live Ingest source. The behavior does two things: it bypasses the cache rules of the Application, and it applies the live HLS policy. | Object | Cache time | | --- | --- | @@ -285,11 +299,13 @@ To apply the policy to a stream, refer to [Enforce HLS cache for live streaming] ### Filter Request Cookie -_Filter Request Cookie_ removes a cookie from the request that Azion sends to the origin, and requires Application Accelerator on the application. A Response Phase rule removes a cookie from the response sent to the user instead, with the API `type` `filter_response_cookie`. The argument is `cookie-name` to remove the cookie, or `cookie-name=cookie-value` to remove only that value. In the API, the Request Phase `type` is `filter_request_cookie`. +_Filter Request Cookie_ removes a cookie from the request that Azion sends to the origin, and requires Application Accelerator turned on in the Application. A Response Phase rule removes a cookie from the response sent to the user instead, with _Filter Response Cookie_, the API `type` `filter_response_cookie`. The argument is `cookie-name` to remove the cookie, or `cookie-name=cookie-value` to remove only that value. In the API, the Request Phase `type` is `filter_request_cookie`. + +The Console refuses an argument that lacks the cookie name with `This filter is not valid, missing cookie name`, and one that lacks the cookie value with `This filter is not valid, missing cookie value`. ### Filter Request Header -_Filter Request Header_ removes a header from the request that Azion sends to the origin, and requires no Product. A Response Phase rule removes a header from the response sent to the user instead, with the API `type` `filter_response_header`. The argument is the header name, such as `Header-Name`. In the API, the Request Phase `type` is `filter_request_header`. +_Filter Request Header_ removes a header from the request that Azion sends to the origin, and requires no Platform Resource. A Response Phase rule removes a header from the response sent to the user instead, with _Filter Response Header_, the API `type` `filter_response_header`. The argument is the header name, such as `Header-Name`. In the API, the Request Phase `type` is `filter_request_header`. Five headers cannot be filtered or overwritten: @@ -301,37 +317,31 @@ Five headers cannot be filtered or overwritten: ### Finish Request Phase -_Finish Request Phase_ ends the Request Phase. The behaviors after it in the rule, and the rules after that rule, do not run. It runs in the Request Phase, requires no Product, and is `{ "type": "finish_request_phase" }` in the API. +_Finish Request Phase_ ends the Request Phase. The behaviors after it in the rule, and the rules after that rule, do not run. It runs in the Request Phase, requires no Platform Resource, and is `{ "type": "finish_request_phase" }` in the API. Azion Console does not offer it in the behavior list: send it through the API, or from the same JSON with `azion create rules-engine` in Azion CLI. ### Forward Cookies -_Forward Cookies_ makes Azion forward the `Set-Cookie` header that the origin returns to users, even when the response comes from cache. It runs in the Request Phase, requires Application Accelerator on the application, and is `{ "type": "forward_cookies" }` in the API. A cached response can then carry the `Set-Cookie` of another user's session. To keep sessions apart, refer to [Forward cookies from the origin to the user](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#forward-cookies-from-the-origin-to-the-user). +_Forward Cookies_ makes Azion forward the `Set-Cookie` header that the origin returns to users, even when the response comes from cache. It runs in the Request Phase, requires Application Accelerator turned on in the Application, and is `{ "type": "forward_cookies" }` in the API. A cached response can then carry the `Set-Cookie` of another user's session. To keep sessions apart, refer to [Forward cookies from the origin to the user](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#forward-cookies-from-the-origin-to-the-user). -Cookies created with JavaScript are an alternative to the `Set-Cookie` response header: a script creates, reads, and expires them through the `document.cookie` property. A JavaScript cookie takes this format: - -```javascript -document.cookie = "username=John Doe; expires=Thu, 18 Dec 2020 12:00:00 UTC; path=/"; -``` - -Azion does not filter the `Cookie` request header by default, whatever the Forward Cookies configuration, so JavaScript cookies reach the origin. For more information, refer to [JavaScript Cookies](https://www.w3schools.com/js/js_cookies.asp). +Azion does not filter the `Cookie` request header by default, whatever the Forward Cookies configuration, so the cookies a script sets with `document.cookie` reach the origin. ### No Content (204) -_No Content (204)_ answers with `204` instead of the status code the origin returns. It runs in the Request Phase, requires no Product, and is `{ "type": "no_content" }` in the API. +_No Content (204)_ answers with `204` instead of the status code the origin returns. It runs in the Request Phase, requires no Platform Resource, and is `{ "type": "no_content" }` in the API. ### Optimize Images -_Optimize Images_ applies [Image Processor](/en/documentation/platform/applications/image-processor/settings/) to the requests the rule matches, and requires Image Processor on the application. It runs in the Request Phase. In the API, it is `{ "type": "optimize_images" }`: it takes no attributes, and a rule can carry it as its only behavior. +_Optimize Images_ applies [Image Processor](/en/documentation/platform/applications/image-processor/settings/) to the requests the rule matches, and requires Image Processor turned on in the Application. It runs in the Request Phase. In the API, it is `{ "type": "optimize_images" }`: it takes no attributes, and a rule can carry it as its only behavior. ### Redirect HTTP to HTTPS -_Redirect HTTP to HTTPS_ redirects a request made over HTTP to HTTPS, and does nothing to a request already made over HTTPS. It runs in the Request Phase and is `{ "type": "redirect_http_to_https" }` in the API. It requires HTTPS enabled in the protocol settings of the [workload](/en/documentation/platform/workloads/) that delivers the application. +_Redirect HTTP to HTTPS_ redirects a request made over HTTP to HTTPS, and does nothing to a request already made over HTTPS. It runs in the Request Phase and is `{ "type": "redirect_http_to_https" }` in the API. It requires HTTPS enabled in the protocol settings of the [Workload](/en/documentation/platform/workloads/) that receives the request. ### Redirect To -_Redirect To (301 Moved Permanently)_ and _Redirect To (302 Found)_ send the user to the URL or URI in the argument, with that status code. Use `301` when a path changes for good, and `302` when the change is temporary. Both behaviors end the processing of the request, run in either phase, and require no Product. In a Response Phase rule, they run only when the origin returns `404`. +_Redirect To (301 Moved Permanently)_ and _Redirect To (302 Found)_ send the user to the URL or URI in the argument, with that status code. Use `301` when a path changes for good, and `302` when the change is temporary. Both behaviors end the processing of the request, run in either phase, and require no Platform Resource. In a Response Phase rule, they run only when the origin returns `404`. -The Console asks for the argument with `Redirect target is required`, and refuses a space in it with `Redirect target cannot contain spaces, use %20 instead`. In the API, the types are `redirect_to_301` and `redirect_to_302`, with the target in `attributes.value`. This behavior sends a reader of a FAQ to its English version: +The Console asks for the argument with `Redirect target is required`, and refuses a space in it with `Redirect target cannot contain spaces, use %20 instead`. It refuses a target with another start with `Redirect target must start with /, http://, https://, #, ?, ${variable} or %{captured}`, and a variable in another format with `Variables must use the ${lowercase_name} format`. In the API, the types are `redirect_to_301` and `redirect_to_302`, with the target in `attributes.value`. This behavior sends a reader of a FAQ to its English version: | Behavior | Argument | | --- | --- | @@ -339,7 +349,7 @@ The Console asks for the argument with `Redirect target is required`, and refuse ### Rewrite Request -_Rewrite Request_ changes the path of the resource that Azion requests from the origin. It runs in the Request Phase, requires Application Accelerator on the application, and is `rewrite_request` in the API, with the new path in `attributes.value`. The new path can combine a string, the variables of the Request Phase, and the captures of _Capture Match Groups_, written as `%{name[index]}`. +_Rewrite Request_ changes the path of the resource that Azion requests from the origin. It runs in the Request Phase, requires Application Accelerator turned on in the Application, and is `rewrite_request` in the API, with the new path in `attributes.value`. The new path can combine a string, the variables of the Request Phase, and the captures of _Capture Match Groups_, written as `%{name[index]}`. The Console refuses a path with another start with `Argument should start with /, ${uri}, ${request_uri}, or ${domain}`. For example, two behaviors in one rule send a request for `/original/image.jpg` to the origin as `/new/image.jpg`: @@ -350,19 +360,19 @@ For example, two behaviors in one rule send a request for `/original/image.jpg` ### Run Function -_Run Function_ runs a [function instance](/en/documentation/platform/applications/functions-instances/) of the application on what the rule matches. It runs in either phase and requires Application Accelerator and [Functions](/en/documentation/platform/functions/) on the application. The instances live in the **Functions Instances** tab of the application, and a new application has Functions on. For the Response Phase, the Console function instance form states `Only Lua functions can be used in the Response phase.` +_Run Function_ invokes a [Function Instance](/en/documentation/platform/applications/functions-instances/) of the Application on what the rule matches. It runs in either phase and requires [Functions](/en/documentation/platform/functions/) turned on in the Application, and a new Application has Functions on. In the Response Phase, it runs only Functions written in Lua. In Azion Console, the rule form states `Only functions with Lua runtime are available for Response phase.`, and the Function Instance form states `Only Lua functions can be used in the Response phase.` -In the API, `attributes.value` holds the ID of the function instance, not of the function, as in `{ "type": "run_function", "attributes": { "value": } }`. To create an instance, refer to [Instantiate a function on an application](/en/documentation/guides/application-development/getting-started/instantiate-functions/). +In the API, `attributes.value` holds the ID of the Function Instance, not of the Function, as in `{ "type": "run_function", "attributes": { "value": } }`. To create a Function Instance, refer to [Instantiate a function on an application](/en/documentation/guides/application-development/getting-started/instantiate-functions/). ### Set Cache Policy -_Set Cache Policy_ applies a [cache setting](/en/documentation/platform/applications/cache/cache-settings/) to the requests the rule matches, which is how a cache setting reaches a request. It runs in the Request Phase and requires no other Product. The cache setting comes first, in the **Cache Settings** tab of the application, and the behavior then names it in a second list. +_Set Cache Policy_ applies a [cache setting](/en/documentation/platform/applications/cache/cache-settings/) to the requests the rule matches, which is how a cache setting reaches a request. It runs in the Request Phase and requires no other Platform Resource. The cache setting has to exist before a rule can apply it, and [Cache quickstart](/en/documentation/platform/applications/cache/quickstart/) creates a first cache setting and the rule that applies it. -The cache setting holds how long an object stays in cache. Its [Application Accelerator](/en/documentation/platform/applications/cache/cache-settings/#application-accelerator) section holds the variations that set the cache key. In the API, `attributes.value` holds the ID of the cache setting. The API returns that ID as an integer, even when the request sends it as a string. A cache setting that a rule applies cannot be deleted: the API answers `400` with code `21014`. +The cache setting holds how long an object stays in cache. Its [Application Accelerator fields](/en/documentation/platform/applications/cache/cache-settings/#application-accelerator) hold the variations that set the cache key. In the API, `attributes.value` holds the ID of the cache setting. The API returns that ID as an integer, even when the request sends it as a string. A cache setting that a rule applies cannot be deleted: the API answers `400` with code `21014`. ### Set Connector -_Set Connector_ sends the requests the rule matches to a [connector](/en/documentation/platform/connectors/), which reaches the origin. In Azion Console, origins have been redesigned as connectors, and this behavior names one. It runs in the Request Phase and requires no Product, so a rule with `${uri}` and _Set Connector_ works on an application without Application Accelerator. In the API, `attributes.value` holds the ID of the connector, as the API section shows. +_Set Connector_ sends the requests the rule matches to a [Connector](/en/documentation/platform/connectors/), which routes them to the origin. It runs in the Request Phase and requires no Platform Resource, so a rule with `${uri}` and _Set Connector_ works in an Application without Application Accelerator. In the API, `attributes.value` holds the ID of the Connector, as the API section shows. --- @@ -382,7 +392,7 @@ Every rule operation is authenticated and sits under `https://api.azion.com/v4/w A create answers `202` with a `state` of `pending`, and a list answers `200`. The reorder call takes an `order` array that lists the rule IDs of the phase in their new order. -This call creates a Request Phase rule that sends every request of the application to a connector: +This call creates a Request Phase rule that sends every request of the Application to a Connector: ```bash curl --request POST \ @@ -404,13 +414,13 @@ The response carries `202` and a `state` of `pending`. The excerpt keeps the rul {"state":"pending","data":{"id":,"name":"send-to-connector","active":true,"criteria":[[{"conditional":"if","variable":"${uri}","operator":"starts_with","argument":"/"}]],"behaviors":[{"type":"set_connector","attributes":{"value":}}],"description":"","order":0,…}} ``` -The platform adds `description`, an empty string when the create sends none, and `order`, the position of the rule in its phase. The same body with `${request_uri}` in place of `${uri}` fails with code `25047` on an application without Application Accelerator. +The platform adds `description`, an empty string when the create sends none, and `order`, the position of the rule in its phase. The same body with `${request_uri}` in place of `${uri}` fails with code `25047` in an Application without Application Accelerator. --- ## CLI -Azion CLI creates a rule with `azion create rules-engine`, which reads the rule from a JSON file in the shape the API takes. `--phase` names the phase, and it defaults to `request`. +[Azion CLI](/en/documentation/devtools/cli/) creates a rule with `azion create rules-engine`, which reads the rule from a JSON file in the shape the API takes. `--phase` names the phase, and `azion create rules-engine` has no default for it: in a terminal, the command asks for the phase, and with no terminal it fails with `Error: Failed to parse your response.` This file applies a cache setting to every request whose path starts with `/static/`: @@ -424,7 +434,7 @@ This file applies a cache setting to every request whose path starts with `/stat } ``` -Save it as `rule.json`, replace `` with the ID of a cache setting of the application, and create the rule: +Save it as `rule.json`, replace `` with the ID of a cache setting of the Application, and create the rule: ```bash azion create rules-engine --application-id --phase request --file rule.json @@ -436,11 +446,24 @@ Created Rules Engine with ID The CLI refuses two older shapes of a rule file. A criterion with `input_value` instead of `argument` fails with `json: unknown field "input_value"`. A behavior written as `{"type":"set_cache_settings","cache_settings_id":""}` fails with `data failed to match schemas in oneOf(RequestPhaseBehaviorRequest)`: the behavior is `set_cache_policy`, with the ID in `attributes.value`. +Six commands cover the rules of a phase. Each takes `--application-id` and `--phase`, and a command that acts on one rule takes its ID in `--rule-id`: + +| Command | What it does | Flags | +| --- | --- | --- | +| `azion create rules-engine` | Creates a rule from a JSON file | `--application-id`, `--phase`, `--file` | +| `azion list rules-engine` | Lists the rules of a phase | `--application-id`, `--phase`, `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion describe rules-engine` | Returns one rule | `--application-id`, `--phase`, `--rule-id` | +| `azion update rules-engine` | Changes a rule from a JSON file | `--application-id`, `--phase`, `--rule-id`, `--file` | +| `azion delete rules-engine` | Deletes a rule | `--application-id`, `--phase`, `--rule-id` | +| `azion update rules-engine-order` | Reorders the rules of a phase | `--application-id`, `--phase`, `--rule-ids` | + +`--rule-ids` takes the rule IDs of the phase in their new order, separated by commas, such as `123,456,789`. On `azion list rules-engine` and `azion delete rules-engine`, `--phase` defaults to `request`. + --- ## Errors -A rejected rule returns an `errors` array. Each entry carries a `code`, a `title`, a `detail`, the `status`, and a `source` pointer that names the field, and some entries add a `meta` object. This body answers a rule with `${request_uri}` on an application without Application Accelerator: +A rejected rule returns an `errors` array. Each entry carries a `code`, a `title`, a `detail`, the `status`, and a `source` pointer that names the field. Some entries add a `meta` object. This body answers a rule with `${request_uri}` in an Application without Application Accelerator: ```json { @@ -463,9 +486,15 @@ A rejected rule returns an `errors` array. Each entry carries a `code`, a `title | Code | Title | Status | What causes it | What to do | | --- | --- | --- | --- | --- | -| `10039` | Invalid Choice | 400 | A behavior `type` that is not a valid choice, such as `add_header`, with the detail `"add_header" is not a valid choice.` The `source` pointer names the behavior, as in `/data/behaviors/0/type`, and `meta.input` repeats the value | Send a `type` from the behavior table, such as `add_request_header` | -| `21014` | Cannot Delete Cache Setting | 400 | Deleting a cache setting that a rule applies with `set_cache_policy` | Remove the behavior that names the cache setting, or delete the rule, then delete the cache setting | -| `25047` | Missing Required Modules | 400 | A criterion variable whose Product is off on the application, such as `${request_uri}` without Application Accelerator. `meta.missing_required_modules` names the Product | Enable Application Accelerator in the **Modules** section of the application's [Main Settings](/en/documentation/platform/applications/main-settings/), or match on `${uri}` | +| `10039` | Invalid Choice | 400 | A behavior `type` that is not a valid choice, such as `add_header` | Send a `type` from the behavior table, such as `add_request_header` | +| `21014` | Cannot Delete Cache Setting | 400 | Deleting a cache setting that a rule applies with `set_cache_policy` | Remove the behavior or the rule that applies it, then delete the cache setting | +| `25010` | Behavior Marked As Final | 400 | A behavior after a final behavior, such as _Deliver_ | Make the final behavior the last of the rule | +| `25011` | Duplicated Behavior | 400 | A behavior that a rule takes once, such as _Bypass Cache_, repeated in the rule | Keep one | +| `25012` | Incompatible Behavior | 400 | _Set Cache Policy_ beside _Deny (403 Forbidden)_, _Redirect To_, or _No Content (204)_ | Move one of them to another rule | +| `25024` | Invalid Header | 400 | A header argument the API does not accept, such as a value with `é` | Remove the character the API refuses | +| `25047` | Missing Required Modules | 400 | A criterion variable whose Platform Resource is off, such as `${request_uri}` without Application Accelerator | Turn on Application Accelerator, as [Main Settings](/en/documentation/platform/applications/main-settings/#platform-resources) shows, or match on `${uri}` | + +For `10039`, the detail reads `"add_header" is not a valid choice.`, the `source` pointer names the behavior, as in `/data/behaviors/0/type`, and `meta.input` repeats the value. For `25047`, `meta.missing_required_modules` names the `modules` key of the Platform Resource to turn on. --- @@ -473,9 +502,9 @@ A rejected rule returns an `errors` array. Each entry carries a `code`, a `title - How an application runs its rules in each phase, in which order, and when a behavior stops the rest. + How an Application runs its rules in each phase, in which order, and when a behavior stops the rest. The procedure that builds a rule in Azion Console. The procedures that apply a cache setting, bypass the cache for a path, and forward cookies from the origin. - Debug the rules of an application through the GraphQL API, Data Stream, or Real-Time Events. + Debug the rules of an Application through the GraphQL API, Data Stream, or Real-Time Events. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/websocket.mdx b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/websocket.mdx index 086938ac0a..f23d089d99 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/websocket.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/websocket.mdx @@ -1,6 +1,6 @@ --- title: WebSocket Proxy -description: Look up what WebSocket Proxy needs on an application, the upgrade headers, the errors it returns, and its connection limits. +description: Look up what WebSocket Proxy needs in an Application, the upgrade headers, the errors it returns, and its connection limits. meta_tags: 'applications, websocket, websocket proxy, upgrade, connection, keepalive, errors' namespace: documentation_products_edge_application_websocket permalink: /documentation/platform/applications/websocket/ @@ -10,40 +10,44 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -WebSocket, specified in [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455), is a protocol that keeps one bidirectional TCP connection open between a client and a server, so both sides exchange data in real time after a single handshake, without restarting the connection. **WebSocket Proxy** carries that connection between your users and your origin through an [application](/en/documentation/platform/applications/), which works as a reverse proxy. Use it for real-time applications such as online games, chat, notifications, and live streaming. WebSocket Proxy fits when the WebSocket server is your origin, because the application only carries the connection to it. When a function should act as the WebSocket server or client itself, use the [WebSocket API](/en/documentation/devtools/runtime/api-reference/websocket/) instead, which handles a server-side upgrade with `upgradeWebSocket()`. +WebSocket is a protocol, specified in [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455), that keeps one TCP connection open in both directions between a client and a server. After one handshake, both sides exchange data over it in real time. **WebSocket Proxy** is a Feature of Applications that carries that connection between your users and your origin. The connection passes through an [Application](/en/documentation/platform/applications/) that acts as a reverse proxy for that origin. Use WebSocket Proxy for real-time applications such as online games, chat, notifications, and live streaming. + +WebSocket Proxy fits when the WebSocket server is your origin, because the Application only carries the connection to it. When a [Function](/en/documentation/platform/functions/) should act as the WebSocket server or client itself, use the [WebSocket API](/en/documentation/devtools/runtime/api-reference/websocket/) instead, which handles a server-side upgrade with `upgradeWebSocket()`. --- ## Availability -WebSocket Proxy is not enabled on an account by default, and Azion enables it on request. To request it, refer to [Support guidelines](/en/documentation/support/). +Azion turns WebSocket Proxy on for an account only on request. To request it, refer to [Support guidelines](/en/documentation/support/). ## Client and origin support -A WebSocket connection through an application needs native WebSocket support at both ends: the client that opens the connection and the server at the origin. Most browsers support WebSocket natively. For the list of browsers with native support, refer to [Can I use](https://caniuse.com/websockets). +A WebSocket connection through an Application needs native WebSocket support at both ends: the client that opens the connection and the server at the origin. Most browsers support WebSocket natively. For the list of browsers with native support, refer to [Can I use](https://caniuse.com/websockets). ## Upgrade headers -An application with WebSocket Proxy enabled reads two request headers to decide whether a request opens a WebSocket connection. By default, it treats every request that carries both headers, with the values in this table, as a WebSocket connection and proxies it to the origin. +An Application with WebSocket Proxy enabled reads two request headers to decide whether a request opens a WebSocket connection. It treats the request as one, and proxies it to the origin, when `Upgrade` reads `websocket` and `Connection` carries the `upgrade` token, in any letter case, alone or in a list such as `Connection: keep-alive, Upgrade`. | Header | Value | | --- | --- | | `Upgrade` | `websocket` | | `Connection` | `upgrade` | -When the client sends either header with another value, or omits one of them, the application does not carry out the upgrade toward the origin. +When the client omits either header, or sends a value that does not name the upgrade, the Application does not carry out the upgrade toward the origin. -The rules of a firewall can inspect a WebSocket request before the upgrade completes. +The rules of a Firewall, in [Rules Engine for Firewall](/en/documentation/platform/firewall/rules-engine/), can inspect a WebSocket request before the upgrade completes. --- ## Errors -A WebSocket connection through an application completes with `101 Switching Protocols`. Any other status means that the upgrade did not complete, even a status from the `2xx` or `3xx` success families: +A WebSocket connection through an Application completes with `101 Switching Protocols`. Any other status means that the upgrade did not complete, even a `2xx` success or a `3xx` redirection: | Status | Cause | What to do | | --- | --- | --- | -| Any status other than `101` | The client, the application, or the origin did not complete the WebSocket connection | Check that the client and the origin support WebSocket natively, and that the request carries both [upgrade headers](/en/documentation/platform/applications/websocket/#upgrade-headers) with their values | +| Any status other than `101` | The client, the Application, or the origin did not complete the WebSocket connection | Check the client, the origin, and the [upgrade headers](/en/documentation/platform/applications/websocket/#upgrade-headers) | + +The client and the origin both need native WebSocket support, and the request needs both upgrade headers with their values. --- @@ -57,9 +61,9 @@ Azion recycles keepalive connections on its servers approximately every 15 minut - The first application, before you proxy WebSocket connections through it. - Where the origins an application sends requests to are defined. - How to find which rules of an application run on a request. - The symptoms an application can produce, and how to find their cause. + The first Application, before you proxy WebSocket connections through it. + Where the origins an Application sends requests to are defined. + The maximum connection time of a WebSocket connection, and the other bounds of an Application. + The symptoms an Application can produce, and how to find their cause. diff --git a/apps/docs/src/content/docs/en/pages/main-menu/work-with-domains/point-domain.mdx b/apps/docs/src/content/docs/en/pages/main-menu/work-with-domains/point-domain.mdx index 73e23bdf57..31741fce8c 100644 --- a/apps/docs/src/content/docs/en/pages/main-menu/work-with-domains/point-domain.mdx +++ b/apps/docs/src/content/docs/en/pages/main-menu/work-with-domains/point-domain.mdx @@ -89,9 +89,13 @@ Requests to your hostname then reach the application in the workload's deploymen An `https://` request to your hostname also needs a server certificate that covers the hostname, bound to the workload. To get one, refer to [Request a Let's Encrypt certificate](/en/documentation/guides/application-security/tls-and-certificates/how-to-generate-a-lets-encrypt-certificate/) or [Upload a digital certificate](/en/documentation/guides/application-security/tls-and-certificates/digital-certificates/). -These checks confirm the [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case. +In the [Accelerate websites and APIs with a CDN](/en/documentation/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn/) use case, expect: -These checks confirm the [Stream live events to large audiences](/en/documentation/use-cases/deliver-media-and-streaming/stream-live-events-to-large-audiences/) use case. +- **The hostname reaches the workload.** `dig +short www.example.com` lists the workload domain as the value of the `CNAME` record. + +In the [Stream live events to large audiences](/en/documentation/use-cases/deliver-media-and-streaming/stream-live-events-to-large-audiences/) use case, expect: + +- **The stream hostname reaches the workload.** `dig +short` for the hostname viewers load, such as `live.example.com`, lists the workload domain as the value of the `CNAME` record. --- diff --git a/apps/docs/src/content/docs/en/pages/observe/real-time-events/data-sources.mdx b/apps/docs/src/content/docs/en/pages/observe/real-time-events/data-sources.mdx index 02874f23e6..639a303323 100644 --- a/apps/docs/src/content/docs/en/pages/observe/real-time-events/data-sources.mdx +++ b/apps/docs/src/content/docs/en/pages/observe/real-time-events/data-sources.mdx @@ -157,7 +157,7 @@ In the GraphQL API the same records are the `tieredCacheEvents` dataset, which c | Host | Host information sent on the request line. Stores: host name from the request line, or host name from the `Host` request header field, or the server name matching a request. Example: `xxxxxxxxxx.map.azionedge.net` | | Proxy Host | Hostname being proxied. Example: `storage.googleapis.com:443` | | Proxy Status | HTTP error status code or origin when no response is obtained from the upstream. Example: `520`. **In case of cache, the response is `-`.** | -| Proxy Upstream | Origin (upstream) address. In some cases, the Tiered Cache origin can be Image Processor (IMS) to process the image and then cache it. Example: `ims_http` | +| Proxy Upstream | Origin (upstream) address. When Image Processor answered as the upstream, the field reads `ims_http`. | | Reference Error | Reference ID of the request. Generated when the status code is `4xx` or `5xx`. Example: `#AECFE66100000000C947B9B3B3BFBE46FFFFFFFF9401` | | Remote Addr | IP address of the origin that generated the request. Example: `127.0.0.1` | | Remote Port | Port of the origin that generated the request. Example: `8080` | diff --git a/apps/docs/src/content/docs/en/pages/secure-journey/automate/integrate-siems.mdx b/apps/docs/src/content/docs/en/pages/secure-journey/automate/integrate-siems.mdx index 758475fb41..9d1f82b4dc 100644 --- a/apps/docs/src/content/docs/en/pages/secure-journey/automate/integrate-siems.mdx +++ b/apps/docs/src/content/docs/en/pages/secure-journey/automate/integrate-siems.mdx @@ -250,11 +250,17 @@ At the SIEM, each log line carries the keys of the *WAF Event Collector* templat To correlate these events with the request data of your applications in one log line, use the *Applications* data source with the *Applications + WAF Event Collector* template instead. For the tradeoff, refer to [Best practices for Data Stream](/en/documentation/platform/data-stream/best-practices/#use-the-applications--waf-event-collector-preset-to-feed-a-siem). -These checks confirm the [Protect web applications from OWASP Top 10 and zero-day attacks](/en/documentation/use-cases/secure-applications-and-networks/protect-web-applications-from-owasp-top-10-and-zero-day-attacks/) use case. +In the [Protect web applications from OWASP Top 10 and zero-day attacks](/en/documentation/use-cases/secure-applications-and-networks/protect-web-applications-from-owasp-top-10-and-zero-day-attacks/) use case, expect: -These checks confirm the [Protect public APIs from abuse](/en/documentation/use-cases/secure-applications-and-networks/protect-public-apis-from-abuse/) use case. +- **WAF decisions reach the SIEM.** The latest sends report a **Status Code** of `200`, and each line at the SIEM carries `waf_attack_action`, `waf_attack_family`, and `waf_match`. -These checks confirm the [Block attackers automatically from SIEM detections](/en/documentation/use-cases/secure-applications-and-networks/block-attackers-automatically-from-siem-detections/) use case. +In the [Protect public APIs from abuse](/en/documentation/use-cases/secure-applications-and-networks/protect-public-apis-from-abuse/) use case, expect: + +- **Blocked API requests are on record.** Each line at the SIEM carries `waf_score` and `waf_match`, and `blocked` reads `1` for a request that WAF blocked. + +In the [Block attackers automatically from SIEM detections](/en/documentation/use-cases/secure-applications-and-networks/block-attackers-automatically-from-siem-detections/) use case, expect: + +- **The SIEM receives the events its detections read.** The latest sends report a **Status Code** of `200`, and each line carries `waf_attack_action` and `waf_attack_family`, such as `$BLOCK` and `SQL`. --- diff --git a/apps/docs/src/content/docs/en/pages/secure-journey/automate/terraform.mdx b/apps/docs/src/content/docs/en/pages/secure-journey/automate/terraform.mdx index 8c68d2bb57..0d689ec999 100644 --- a/apps/docs/src/content/docs/en/pages/secure-journey/automate/terraform.mdx +++ b/apps/docs/src/content/docs/en/pages/secure-journey/automate/terraform.mdx @@ -35,9 +35,11 @@ One of the primary benefits of Terraform is its automation capabilities. It simp | Scope | Resource | Data source | | --- | --- | --- | | Firewall Main Settings | [Managing Firewall Main Settings](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_main_setting) | [Consulting Firewall Main Settings](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_settings) | +| Firewall Rules Engine | [Managing Firewall rules](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine) | [Consulting Firewall rules](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | | Firewall Functions Instances | [Managing Firewall Functions Instances](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_functions_instance) | [Consulting Firewall Functions Instances](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | | Network list | [Managing Network list](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/network_list) | [Consulting Network lists](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_lists) | -| WAF Rules set | [Managing WAF Rules set](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | [Consulting WAF Rules set](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | +| WAF rule sets | [Managing WAF rule sets](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | [Consulting WAF rule sets](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | +| [WAF exceptions](/en/documentation/platform/firewall/waf/custom-allowed-rules/) | [Managing WAF exceptions](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | [Consulting WAF exceptions](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | | Edge DNS Zones | [Managing zones](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/intelligent_dns_zone)| [Consulting zones](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/intelligent_dns_zones) | | Edge DNS Records | [Managing records](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/intelligent_dns_record) | | | Edge DNS DNSSEC | [Managing DNSSEC](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/intelligent_dns_dnssec) | [Consulting DNSSEC](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/intelligent_dns_dnssec)| diff --git a/apps/docs/src/content/docs/en/pages/secure-journey/edit-edge-firewall/protect-your-domain.mdx b/apps/docs/src/content/docs/en/pages/secure-journey/edit-edge-firewall/protect-your-domain.mdx index 54ca7e5f8f..da7a3cc262 100644 --- a/apps/docs/src/content/docs/en/pages/secure-journey/edit-edge-firewall/protect-your-domain.mdx +++ b/apps/docs/src/content/docs/en/pages/secure-journey/edit-edge-firewall/protect-your-domain.mdx @@ -102,7 +102,21 @@ After the save, the deployment of the workload names your firewall. ### CLI -The deployment of a workload is written by `azion deploy`, from the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`. To bind the firewall on an existing workload, follow the Console panel. +List the deployment of your workload to find its ID and the application it names. Replace `` with the ID of your workload: + +```bash +azion list workload-deployment --workload-id --details +``` + +The output shows the deployment's `ID` and its `EDGE APPLICATION`. The update sends the deployment strategy as one object, so pass that application again beside your firewall. If the workload uses a custom page set, also add `--custom-page `. The output of `azion describe workload-deployment --format json` carries the ID of the set as `custom_page`. + +Name your firewall in the deployment: + +```bash +azion update workload-deployment --workload-id --deployment-id --strategy-type default --edge-application --edge-firewall +``` + +Azion CLI prints `Updated Workload Deployment with ID `, and the deployment of the workload names your firewall. For every flag, refer to [Azion CLI workload-deployment](/en/documentation/devtools/cli/resources/workload-deployment/). diff --git a/apps/docs/src/content/docs/en/pages/secure/connectors/quickstart.mdx b/apps/docs/src/content/docs/en/pages/secure/connectors/quickstart.mdx index b28621c37f..78f5415517 100644 --- a/apps/docs/src/content/docs/en/pages/secure/connectors/quickstart.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/connectors/quickstart.mdx @@ -128,7 +128,7 @@ To create the connector in Azion Console: In **Transport Protocol Policy**, select _Force HTTPS_. - + The connector exists in your account, and the rule you add to your application selects it. diff --git a/apps/docs/src/content/docs/en/pages/secure/custom-pages/quickstart.mdx b/apps/docs/src/content/docs/en/pages/secure/custom-pages/quickstart.mdx index e97134a59a..db39fcc8c1 100644 --- a/apps/docs/src/content/docs/en/pages/secure/custom-pages/quickstart.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/custom-pages/quickstart.mdx @@ -24,7 +24,7 @@ Four objects take part, and each one links to the next: 3. The **deployment** of the workload names the set, next to the application it already names. 4. The **request** reaches a path that the application's connector answers with `404`, and the set replaces that answer. -A set changes nothing until a deployment names it. When the application's connector answers `404`, the visitor receives the content of your page in place, with no redirect, and with the status code the page sets. This guide covers Azion Console and the API, and you assign the set in Azion Console. The Azion CLI cannot change a deployment that already exists, and the published API v4 reference has no endpoint for one. +A set changes nothing until a deployment names it. When the application's connector answers `404`, the visitor receives the content of your page in place, with no redirect, and with the status code the page sets. This guide covers Azion Console and the API. You assign the set in Azion Console, because the published API v4 reference has no endpoint for a deployment. To assign the set with the Azion CLI, run [`azion update workload-deployment`](/en/documentation/devtools/cli/resources/workload-deployment/#update) with `--strategy-type`, `--custom-page`, and the application and the firewall the deployment already names. --- diff --git a/apps/docs/src/content/docs/en/pages/secure/firewall/glossary.mdx b/apps/docs/src/content/docs/en/pages/secure/firewall/glossary.mdx index 3ecb7a9f7d..fb3b1e90fc 100644 --- a/apps/docs/src/content/docs/en/pages/secure/firewall/glossary.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/firewall/glossary.mdx @@ -46,7 +46,7 @@ permalink: /documentation/platform/firewall/glossary/ | IP/CIDR list | A network list of type `ip_cidr`, _IP/CIDR_ in Azion Console, that holds IPv4 and IPv6 addresses and CIDR ranges such as `198.51.100.0/24`. A rule matches a request when its client IP address falls inside one of the entries. It is the only type whose items accept a due date and a comment, and [Network Lists](/en/documentation/platform/firewall/network-shield/network-lists/#list-types) compares the three types. | | item | One entry in a network list: an IP address or CIDR range, an ASN, or a country code, according to the list type. Exact duplicates are removed silently, while equivalent notations such as `192.0.2.80` and `192.0.2.80/32` are both kept. [Network Lists](/en/documentation/platform/firewall/network-shield/network-lists/) documents the format each type accepts. | | log tag | The identifier an instance stamps on the report lines it writes, so you can tell one instance's records from another's in [Real-Time Events](/en/documentation/platform/real-time-events/). The `log_tag` argument sets it, as [Arguments](/en/documentation/platform/firewall/bot-manager/arguments/#fields) documents. Bot Manager Lite writes it in the line prefix, `[Bot-Protection][]`, and Bot Manager writes it as a `log_tag` field. | -| Logging | The WAF mode that scores a request and records the match without blocking it, `logging` in the API and the other mode the _Set WAF_ behavior accepts. The API refuses `learning` with `10039`, but other surfaces keep that name: [Real-Time Events](/en/documentation/platform/real-time-events/) reports the state in `wafLearning`, labeled **WAF Learning**, [Data Stream](/en/documentation/platform/data-stream/) in `waf_learning`, and `azion.config.js` takes `wafMode` set to `learning`. [Scoring and modes](/en/documentation/platform/firewall/waf/scoring-and-modes/#modes) compares both modes. | +| Logging | The WAF mode that scores a request and records the match without blocking it, `logging` in the API and the other mode the _Set WAF_ behavior accepts. The API refuses `learning` with `10039`, but other surfaces keep that name: [Real-Time Events](/en/documentation/platform/real-time-events/) reports the state in `wafLearning`, labeled **WAF Learning**, [Data Stream](/en/documentation/platform/data-stream/) in `waf_learning`, and `azion.config.js` takes `mode` set to `learning` in the `set_waf` behavior. [Scoring and modes](/en/documentation/platform/firewall/waf/scoring-and-modes/#modes) compares both modes. | | Main Settings | The tab of a firewall that holds its settings in four sections: **General**, for its name, **Modules**, **Debug Rules**, and **Status**. It holds no domains, because a workload selects its firewall through its deployment. [Set a firewall's main settings](/en/documentation/guides/application-security/firewall-and-waf/firewall-configure-main-settings/) covers each section. | | match target | The name other platforms give to the requests a security policy applies to. A firewall sets it in two places: the workloads whose deployment names the firewall, and the criteria of each rule. A WAF rule set carries no domain or path and scores the requests a rule's criteria hand it, as the [WAF overview](/en/documentation/platform/firewall/waf/#request-path) describes. | | match zone | The part of a request a WAF condition inspects, such as a query string value, a header name, or the raw body, out of 15 in all. Azion Console selects one through the **Condition** field, not through a control named match zone, and the API takes it as `conditions[].match`. [Exceptions](/en/documentation/platform/firewall/waf/custom-allowed-rules/#match-zones) lists all 15. | diff --git a/apps/docs/src/content/docs/en/pages/secure/firewall/quickstart.mdx b/apps/docs/src/content/docs/en/pages/secure/firewall/quickstart.mdx index 222a02705e..8d05aea889 100644 --- a/apps/docs/src/content/docs/en/pages/secure/firewall/quickstart.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/firewall/quickstart.mdx @@ -369,7 +369,21 @@ The deployment of the workload names your firewall, beside its application and i ### CLI -The deployment of a workload is written by `azion deploy`, from the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`. To bind the firewall on an existing workload, follow the Console panel. +List the deployment of your workload to find its ID and the application it names. Replace `` with the ID of your workload: + +```bash +azion list workload-deployment --workload-id --details +``` + +The output shows the deployment's `ID` and its `EDGE APPLICATION`. The update sends the deployment strategy as one object, so pass that application again beside your firewall. If the workload uses a custom page set, also add `--custom-page `. The output of `azion describe workload-deployment --format json` carries the ID of the set as `custom_page`. + +Name your firewall in the deployment: + +```bash +azion update workload-deployment --workload-id --deployment-id --strategy-type default --edge-application --edge-firewall +``` + +Azion CLI prints `Updated Workload Deployment with ID `, and the deployment of the workload names your firewall. For every flag, refer to [Azion CLI workload-deployment](/en/documentation/devtools/cli/resources/workload-deployment/). @@ -377,7 +391,7 @@ The deployment of a workload is written by `azion deploy`, from the [`deployment ### API -The published Azion API v4 reference has no endpoint for the deployment of a workload. To bind the firewall, follow the Console panel. +The published Azion API v4 reference has no endpoint for the deployment of a workload. To bind the firewall, follow the Console or the CLI panel. diff --git a/apps/docs/src/content/docs/en/pages/secure/firewall/troubleshooting.mdx b/apps/docs/src/content/docs/en/pages/secure/firewall/troubleshooting.mdx index 8e127ce428..ce30f77f6b 100644 --- a/apps/docs/src/content/docs/en/pages/secure/firewall/troubleshooting.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/firewall/troubleshooting.mdx @@ -35,7 +35,7 @@ The rules of a firewall never touch the requests a workload receives, even after A firewall inspects only workloads whose [deployment](/en/documentation/platform/workloads/) names it, since the workload record has no firewall field. - **In Azion Console**: pick the firewall in **Deployment Settings** › **Firewall**, which reads `Select a Firewall` while empty. -- **With Azion CLI**: create a deployment with `--firewall-id`, as [Bind a firewall to a workload](/en/documentation/guides/application-security/firewall-and-waf/firewall-protect-your-domain/#bind-the-firewall-to-the-workload) shows for each interface. +- **With Azion CLI**: pass `--firewall-id` to `azion create workload-deployment` when you create the deployment. In a project that declares the workload in `azion.config.js`, name the firewall in `strategy.attributes.firewall` of its [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry, then run `azion deploy`. For each interface, refer to [Bind a firewall to a workload](/en/documentation/guides/application-security/firewall-and-waf/firewall-protect-your-domain/#bind-the-firewall-to-the-workload). Once the binding [propagates](/en/documentation/platform/firewall/how-it-works/#propagation), every request to the workload runs through the rules of the firewall. diff --git a/apps/docs/src/content/docs/en/pages/secure/waf/examples/apply-rule-set.mdx b/apps/docs/src/content/docs/en/pages/secure/waf/examples/apply-rule-set.mdx index 125dfb0451..65c3e00b7d 100644 --- a/apps/docs/src/content/docs/en/pages/secure/waf/examples/apply-rule-set.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/waf/examples/apply-rule-set.mdx @@ -323,7 +323,9 @@ In the [Protect public APIs from abuse](/en/documentation/use-cases/secure-appli - **WAF scores an attack pattern.** With a valid token, a request with an injection-shaped query string, `https://api.example.com/v1/orders?q=1%27%20OR%20%271%27%3D%271`, is answered as usual in _Logging_, and receives `HTTP/2 400` after the switch to _Blocking_. Its `x-azion-request-id` finds the record in Real-Time Events. -These checks confirm the [Block account takeover on login and checkout flows](/en/documentation/use-cases/secure-applications-and-networks/block-account-takeover-on-login-and-checkout-flows/) use case. +In the [Block account takeover on login and checkout flows](/en/documentation/use-cases/secure-applications-and-networks/block-account-takeover-on-login-and-checkout-flows/) use case, expect: + +- **WAF scores attacks on `/v1/`.** A request to `/v1/` with an injection-shaped query string is answered as usual in _Logging_, and receives `HTTP/2 400` after the switch to _Blocking_. Its `x-azion-request-id` finds the record in Real-Time Events. In the [Prepare regulated web applications for security audits](/en/documentation/use-cases/secure-applications-and-networks/prepare-regulated-web-applications-for-security-audits/) use case, expect: diff --git a/apps/docs/src/content/docs/en/pages/secure/waf/examples/config-file-binding.mdx b/apps/docs/src/content/docs/en/pages/secure/waf/examples/config-file-binding.mdx index 7484984c56..bc589d0e15 100644 --- a/apps/docs/src/content/docs/en/pages/secure/waf/examples/config-file-binding.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/waf/examples/config-file-binding.mdx @@ -3,7 +3,7 @@ title: Bind a rule set in azion.config.js description: >- Declare the WAF rule set and the firewall rule that applies it in azion.config.js, so the Azion CLI creates both from the repository. -meta_tags: 'waf, azion config js, set waf ruleset, waf mode, firewall, rules, criteria, thresholds, azion cli' +meta_tags: 'waf, azion config js, set_waf, waf mode, firewall, rules, criteria, thresholds, workload deployment, azion cli' namespace: documentation_products_waf_examples_config_file_binding permalink: /documentation/guides/application-security/firewall-and-waf/config-file-binding/ --- @@ -11,51 +11,24 @@ permalink: /documentation/guides/application-security/firewall-and-waf/config-fi import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -You can declare a WAF rule set and the firewall rule that applies it in `azion.config.js`, and let the [Azion CLI](/en/documentation/devtools/cli/) create both from the file. Both then live in the repository, under review alongside the application they protect. +You can declare a WAF rule set and the firewall rule that applies it in `azion.config.js`, with the deployment that binds the firewall to a workload. The [Azion CLI](/en/documentation/devtools/cli/) creates them from the file, so they live in the repository, under review alongside the application they protect. --- ## Prerequisites -You need the Azion CLI installed and a configured personal token. +You need the Azion CLI installed, a configured personal token, and the `@aziontech/config` package in the project, which `npm install -D @aziontech/config` adds. --- ## Declare the rule set and the rule -In `azion.config.js`, declare the firewall with `waf: true`, the rule that carries the `setWafRuleset` behavior, and the rule set under `waf`: +In `azion.config.js`, declare the rule set under `waf`, the firewall with `waf: true` and the rule that carries the `set_waf` behavior under `firewall`, and the workload deployment that names the firewall under `workloads`. The sample assumes the same file declares an application named `storefront` under `applications`, since a deployment can only name an application the file declares: ```javascript -import { defineConfig } from 'azion'; +import { defineConfig } from '@aziontech/config'; export default defineConfig({ - firewall: { - name: 'storefront-firewall', - active: true, - waf: true, - rules: [ - { - name: 'Apply storefront-waf', - active: true, - criteria: [ - { - variable: 'request_uri', - conditional: 'if', - operator: 'starts_with', - argument: '/', - }, - ], - behaviors: [ - { - setWafRuleset: { - wafMode: 'blocking', - wafId: '', - }, - }, - ], - }, - ], - }, waf: [ { name: 'storefront-waf', @@ -72,12 +45,58 @@ export default defineConfig({ }, }, ], + firewall: [ + { + name: 'storefront-firewall', + active: true, + waf: true, + rules: [ + { + name: 'Apply storefront-waf', + active: true, + criteria: [ + { + variable: '${request_uri}', + conditional: 'if', + operator: 'starts_with', + argument: '/', + }, + ], + behaviors: [ + { + type: 'set_waf', + attributes: { mode: 'blocking', wafId: 'storefront-waf' }, + }, + ], + }, + ], + }, + ], + workloads: [ + { + name: 'storefront', + deployments: [ + { + name: 'storefront', + current: true, + active: true, + strategy: { + type: 'default', + attributes: { + application: 'storefront', + firewall: 'storefront-firewall', + }, + }, + }, + ], + }, + ], }); ``` -The Azion CLI reads the file and creates what it declares: the firewall with WAF turned on, the rule set, and the rule that applies it. +Run `azion deploy` in the project folder. The Azion CLI reads the file and creates what it declares: the rule set, the firewall with WAF turned on, the rule that applies the rule set, and the deployment that binds the firewall to the workload. Until a deployment names the firewall, its rules see no request. -`waf: true` on the firewall turns WAF on, and it stays off until you turn it on. A family you leave out of `thresholds` is not configured, so list every family you want scored. `setWafRuleset` takes exactly two keys, `wafMode` and `wafId`. `wafMode` takes `learning` or `blocking` in this file: the same mode reads _Logging_ in Azion Console and `logging` in an API payload. For what each mode does, refer to [Scoring and modes](/en/documentation/platform/firewall/waf/scoring-and-modes/). +`waf: true` on the firewall turns WAF on, and it stays off until you turn it on. A family you leave out of `thresholds` is not configured, so list every family you want scored. The `set_waf` behavior takes two attributes, `mode` and `wafId`. `wafId` names the rule set by its `name` in `waf` or by its ID. `mode` takes `learning` or `blocking` in this file: the same mode reads _Logging_ in Azion Console and `logging` in an API payload. For what each mode does, refer to [Scoring and modes](/en/documentation/platform/firewall/waf/scoring-and-modes/). For every field of the file, refer to [azion.config.js](/en/documentation/devtools/cli/azion-config-js/#firewall-rule-behaviors). --- diff --git a/apps/docs/src/content/docs/en/pages/secure/waf/how-it-works.mdx b/apps/docs/src/content/docs/en/pages/secure/waf/how-it-works.mdx index 7f51562ea0..e60efc4fb6 100644 --- a/apps/docs/src/content/docs/en/pages/secure/waf/how-it-works.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/waf/how-it-works.mdx @@ -41,7 +41,7 @@ Each mode trades one risk for another. _Logging_ records everything that would h One internal rule is not fully held back by the mode. Rule 13, invalid POST format, blocks some requests even when the rule set runs in _Logging_. For what each internal rule matches, refer to [WAF rule sets](/en/documentation/platform/firewall/waf/rules-set/#internal-rules). -Other Azion surfaces call the _Logging_ mode learning. [Real-Time Events](/en/documentation/platform/real-time-events/) reports it in the `wafLearning` field, the [Data Stream](/en/documentation/platform/data-stream/) payload carries `waf_learning`, and `azion.config.js` sets it as `wafMode`. The API itself refuses `learning` as a mode, with `10039`. +Other Azion surfaces call the _Logging_ mode learning. [Real-Time Events](/en/documentation/platform/real-time-events/) reports it in the `wafLearning` field, the [Data Stream](/en/documentation/platform/data-stream/) payload carries `waf_learning`, and `azion.config.js` sets it as `learning` in the `mode` of the `set_waf` behavior. The API itself refuses `learning` as a mode, with `10039`. --- diff --git a/apps/docs/src/content/docs/en/pages/secure/workloads/quickstart.mdx b/apps/docs/src/content/docs/en/pages/secure/workloads/quickstart.mdx index 0d61f0daf7..e990cfc3d7 100644 --- a/apps/docs/src/content/docs/en/pages/secure/workloads/quickstart.mdx +++ b/apps/docs/src/content/docs/en/pages/secure/workloads/quickstart.mdx @@ -308,7 +308,19 @@ The deployment of the workload names your application. ### CLI -The deployment of a workload is written by `azion deploy`, from the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry of `azion.config.js`. To bind the application on an existing workload, follow the Console panel. +The workload you created has no deployment yet. Create it with the ID of your application. Replace `` with the ID of your workload and `` with the ID of your application: + +```bash +azion create workload-deployment --workload-id --name my-deployment --application-id +``` + +The output carries the deployment's ID: + +```text +Created Workload Deployment with ID +``` + +The deployment of the workload names your application. A project that declares the workload in `azion.config.js` gets its deployment from `azion deploy` instead. That deployment names the application the deploy creates for the project, even when the [`deployments`](/en/documentation/devtools/cli/azion-config-js/#workload-deployments) entry carries the ID of another application. For every flag, refer to [Azion CLI workload-deployment](/en/documentation/devtools/cli/resources/workload-deployment/). @@ -316,7 +328,7 @@ The deployment of a workload is written by `azion deploy`, from the [`deployment ### API -The published Azion API v4 reference has no endpoint for the deployment of a workload. To bind your application to the workload you created, follow the Console panel. +The published Azion API v4 reference has no endpoint for the deployment of a workload. To bind your application to the workload you created, run the command of the CLI panel. diff --git a/apps/docs/src/content/docs/en/pages/style-guide/content/concept.mdx b/apps/docs/src/content/docs/en/pages/style-guide/content/concept.mdx index d35d2796ce..17ea61dd82 100644 --- a/apps/docs/src/content/docs/en/pages/style-guide/content/concept.mdx +++ b/apps/docs/src/content/docs/en/pages/style-guide/content/concept.mdx @@ -95,7 +95,7 @@ behaves, and what it costs.> - **Explain the thing before the Azion object.** `Cache stores a copy of a response in the data center that fetched it. That data center answers later requests for the same object from that copy, without reaching the origin.` Only then the objects that realize it. An opening whose every subject is an Azion Platform Resource or object is an inventory, not an explanation. - **Mirror the roadmap.** One noun-phrase `##` per mechanism, in the order the roadmap sentence names them. A section cut from the page is cut from the roadmap in the same edit. - **State the tradeoff.** Every design choice costs something, so say what. An explanation that presents only upsides is marketing. -- **No procedures.** Link the [how-to guide](/en/documentation/style-guide/content/how-to-guides/) that applies the concept. +- **No procedures.** Link the [how-to guide](/en/documentation/style-guide/content/how-to-guides/) that applies the concept. A Console path inside a sentence counts too: state the setting instead, per [Word choice](/en/documentation/style-guide/writing/word-choice/#state-the-setting-not-the-path-outside-a-task). - **Keep alternatives here.** Alternatives and "instead of" live on concept pages and nowhere else. - **Use passive voice narrowly.** Only where the actor is genuinely unknown or is the platform itself. - **Make diagrams carry load, and draw them in `mermaid`.** A text diagram reaches an agent reading the markdown twin; an image does not. Say in prose what the diagram shows, and never rely on color alone. diff --git a/apps/docs/src/content/docs/en/pages/style-guide/content/overview.mdx b/apps/docs/src/content/docs/en/pages/style-guide/content/overview.mdx index fd1abf5982..8723ec1928 100644 --- a/apps/docs/src/content/docs/en/pages/style-guide/content/overview.mdx +++ b/apps/docs/src/content/docs/en/pages/style-guide/content/overview.mdx @@ -38,8 +38,8 @@ Descriptive: 25 words per sentence, active voice, passive only when the actor is - **Definition block**, in three parts. First the Platform Resource: `**** is a that s .` That sentence names the resource, states its class, and stands on its own. The class is `Platform Resource`, on the Overview of a section and on the Overview of a nested Platform Resource alike, per [Documentation terminology](/en/documentation/style-guide/writing/terminology/#state-the-class-of-an-azion-element). The sentence never leans on a concept the reader has not met yet, as "runs that code" does. Then the concept: one or two sentences saying what the class of thing is, for a reader who has never used one, with any market term defined in place. Then one sentence naming the concrete jobs people use it for, in the reader's vocabulary, closing the block: `Use to handle A, run B, or serve C.` A bulleted benefit list is the weaker form of that sentence: it reads as a brochure and costs a screen. - **CTAs**: a primary `DocButton` labeled **Quickstart** and a secondary one labeled ` reference`. -- **The specimen**: where the Platform Resource has a code artifact, a configuration object, or a request, one complete, minimal example of it, in full, within the first screen. Two to four bullets name its parts, and one sentence says what prior knowledge transfers. A Platform Resource with no such artifact skips this section rather than inventing one. - **The mechanism**: where a request, an event, or a job crosses more than two objects before the Platform Resource runs, that chain as a `mermaid` diagram, then a numbered walk of at most six items. Open with what the reader would otherwise assume wrong, and say in the same sentence what happens instead: `Creating a Function does not expose it: a request reaches it only through a Function Instance that a rule invokes.` +- **The specimen**: where the Platform Resource has a code artifact, a configuration object, or a request, one complete, minimal example of it, in full, right after the mechanism, or right after the CTAs when the page has no mechanism section. Two to four bullets name its parts, and one sentence says what prior knowledge transfers. A Platform Resource with no such artifact skips this section rather than inventing one. - **The resources**: only on a Platform Resource that has other Platform Resources nested in it. For each nested one, say what it does on this resource and when the reader turns it on, in one or two sentences, the first stating its class: ` is a Platform Resource that…`. Then point to where the reader goes to use it. This is what the reader needs to decide whether to open the nested Platform Resource, never its feature list. - **The boundaries**: one compressed bulleted block with bolded lead-ins — languages, APIs, frameworks, integrations, and the headline limits. One block, not one section per feature. - **Capability sections**: only for a capability that changes what the reader would build, three at most. A capability that is one sentence and a link belongs in the boundaries block or the router. @@ -63,25 +63,25 @@ Use to , , or . -## +## - + -- ****: . -- ****: . + - +1. +2. <...> --- -## +## - + - +- ****: . +- ****: . -1. -2. <...> + ## @@ -100,14 +100,20 @@ Use to , , or . ## Rules -- **Never instruct.** No numbered steps, no procedures, no click-throughs. The specimen is not a walkthrough: it is shown once, complete, with nothing for the reader to do. An overview that instructs is a [quickstart page](/en/documentation/style-guide/content/quickstart/) filed wrong. +- **Never instruct.** No numbered steps, no procedures, no click-throughs. The specimen is not a walkthrough: it is shown once, complete, with nothing for the reader to do. An overview that instructs is a [quickstart page](/en/documentation/style-guide/content/quickstart/) filed wrong. A Console path inside a sentence counts too: state the setting instead, per [Word choice](/en/documentation/style-guide/writing/word-choice/#state-the-setting-not-the-path-outside-a-task). - **No quality adjectives.** Say what the Platform Resource does and where it stops. - **The title is the Platform Resource name, a noun.** Not "documentation", not a gerund. - **Put the Platform Resource before the concept.** The first sentence states the class of the Platform Resource and what it does on Azion; the concept sentences follow it. Cover the Platform Resource name in the concept sentences: what remains must be true of any vendor's version of the thing. +- **Make every word of position agree with the request path.** `for`, `of`, `in front of`, `behind`, and `before` each imply an arrow. Draw the arrows the sentence implies and compare them with the diagram of the page. Say the direction with the verb: `processes the requests received by your Workloads`. `runs a reverse proxy for your Workloads` puts the Workloads behind the proxy, and the request goes the other way. +- **Choose a verb that covers everything the Platform Resource does.** When a Platform Resource does two or more things at the same level, the first sentence states the role they share and the next sentence lists them: `**Applications** is a Platform Resource that processes the requests received by your Workloads. An Application can run serverless functions, act as a reverse proxy for your origins, or combine the two.` Test the sentence against the smallest configuration the documentation shows. +- **Read the definition as a reader from the market.** A developer who knows the vocabulary of other platforms reads a workload as what runs behind an entry point. When that reading says something untrue about Azion, reword the sentence so that it states the role or the direction. This is a way of reading, not a list of words to avoid. +- **Tell a relation between two Platform Resources forward.** The one that makes the connection is the subject, and the sentence runs in the order things happen: `An Application receives the requests of a Workload once that Workload's deployment sets that Application.` The sentence `An Application receives the requests of the Workloads whose deployment sets it.` starts at the end and leaves two pronouns that point backwards. In Brazilian Portuguese, the verb takes its object in full: `define essa Application`, never `a define`. +- **Choose the concept with care.** Several Azion elements do different things under one name. When one market concept fits everything the Platform Resource does, explain that concept. When none does, explain each thing in a sentence. +- **Name the Platform Resource that provides a concept.** When another Platform Resource provides one of those things, the sentence that explains the market term names its instance right after the term, and keeps the explanation: `A serverless function is a Function, code run on demand at each request, with no server for you to provision.` - **Cut from the definition block what the reader does not need.** Four kinds of sentence go: background the Platform Resource does not change, such as how a registry delegates a domain; the step the reader already assumes, such as a proxy opening its own connection to the origin; a point the block already made; and a contrast with something the page does not cover, such as `A log is the opposite view.` - **A use says what this Platform Resource adds.** The uses sentence names the jobs this Platform Resource does that another one does not. On Functions, the use is "block requests with your own logic", because Firewall already blocks requests by rule. A security Platform Resource names the public standard its pages document, such as the OWASP Top 10. - **Name the Platform Resource in the first sentence, and never open on the problem space.** A concept sentence explains a mechanism. A sentence about how important the problem is explains nothing. -- **Organize by the reader's questions, not by your feature list.** The sections answer, in order: what does the Azion Platform Resource do, what is the class of thing, what am I writing, how does it get called, which Products it hosts, what can it do and where does it stop, where do I go now. An outline that reproduces the Platform Resource's feature list is a catalog: it answers "what do we sell" instead of "what am I deciding". +- **Organize by the reader's questions, not by your feature list.** The sections answer, in order: what does the Azion Platform Resource do, what is the class of thing, how does it get called, what am I writing, which Products it hosts, what can it do and where does it stop, where do I go now. An outline that reproduces the Platform Resource's feature list is a catalog: it answers "what do we sell" instead of "what am I deciding". - **The questions shape the sections; they never become the headings.** A heading is a short noun phrase, never a question: `Function structure`, not `What a function looks like`. - **Draw the diagram from the documented sequence.** A diagram of a sequence the documentation already states in prose is a change of notation, not a new fact. Every node and every arrow matches a step the Platform Resource performs, and the numbered walk carries the meaning if the figure does not render. - **Send the reader to the [Quickstart](/en/documentation/style-guide/content/quickstart/)**, in the CTAs and again in the router. @@ -115,7 +121,7 @@ Use to , , or . ## Examples -This excerpt of the **Functions** overview shows the definition block in its three parts, then the specimen. The first sentence names the Platform Resource, states its class, and says what it does on Azion; the next ones explain what a function is to a reader who has never used one; the uses sentence closes the block; the specimen shows the artifact instead of describing it: +This excerpt of the **Functions** overview shows the definition block in its three parts and the specimen, and leaves out the mechanism. The first sentence names the Platform Resource, states its class, and says what it does on Azion; the next ones explain what a function is to a reader who has never used one; the uses sentence closes the block; the specimen shows the artifact instead of describing it: ```mdx **Functions** is a Platform Resource that runs JavaScript code on Azion's distributed infrastructure, inside the request path of an application or a firewall. A function is code that runs when a request arrives: you write a handler that receives the request and returns a response, and the platform starts it on demand and stops it when the response is sent, so there is no server to provision or scale. That model is called [serverless](https://www.azion.com/en/learning/serverless/what-is-serverless/). Use Functions to build APIs, manipulate request and response headers, apply logic from request metadata, or block traffic before it reaches your application. diff --git a/apps/docs/src/content/docs/en/pages/style-guide/writing/sentence-structure.mdx b/apps/docs/src/content/docs/en/pages/style-guide/writing/sentence-structure.mdx index aef7f7c7c9..90c5c21e0d 100644 --- a/apps/docs/src/content/docs/en/pages/style-guide/writing/sentence-structure.mdx +++ b/apps/docs/src/content/docs/en/pages/style-guide/writing/sentence-structure.mdx @@ -70,8 +70,23 @@ Write one topic per paragraph, in six sentences at most. Retrieval systems cut p Each sentence continues the topic of the sentence before it: its subject is the subject of that sentence, or something that sentence introduced. When the topic moves on purpose, open the sentence with the word that names the move: `Because`, `If`, `When`, `Otherwise`, `Each`. A consequence names its cause in the same way, so the reader never has to supply the link. -- Before: `**Applications** is a Platform Resource that runs a reverse proxy. Each Application serves the Workloads whose deployment sets it. A reverse proxy is a server in front of your origins.` -- After: `**Applications** is a Platform Resource that runs a reverse proxy. A reverse proxy is a server in front of your origins. Each Application serves the Workloads whose deployment sets it.` +- Before: `An Application can run serverless functions or act as a reverse proxy for your origins. An Application receives the requests of a Workload once that Workload's deployment sets that Application. A reverse proxy is a server in front of your origins.` +- After: `An Application can run serverless functions or act as a reverse proxy for your origins. A reverse proxy is a server in front of your origins. An Application receives the requests of a Workload once that Workload's deployment sets that Application.` + +## Check the prose when a section moves + +A section that changes place keeps its text and loses its context: what the reader had already met when they reached it. After a move, check five things, in English and in Portuguese: + +- **First use**: each term the moved section uses is defined at or before its first use in the new order. +- **A fact told twice in a row**: two sentences that sat a section apart and now sit back to back say one fact twice. Keep the full sentence where the content type asks for it, and shorten the other. +- **Words that point at a position**: `above`, `below`, `earlier`, and a step number still point at what they meant. +- **The joins**: a move creates three new joins, above the moved section, below it, and where it used to be. Each one still reads as a sequence. +- **The rest of the page**: a sentence that lists the sections of the page follows the new order. + +On the Applications overview, the request path moved above the rule structure, and its first sentence then repeated the definition block: + +- Before: `Creating an Application routes no request to it: an Application receives the requests of a Workload only after that Workload's deployment sets that Application.` +- After: `Creating an Application routes no request to it: a Workload's deployment has to set that Application first.` ## Let the first sentences carry the section @@ -80,7 +95,7 @@ Read alone, the first sentence of each paragraph and the bold lead-in of each bu In a compressed block of bullets, every sentence of a bullet stays on the topic of its lead-in. A fact on another topic opens its own bullet. - Before: `Creating an Application serves nothing.` -- After: `An Application handles only the requests of a Workload whose deployment sets it.` +- After: `An Application receives the requests of a Workload once that Workload's deployment sets that Application.` ## Introduce one new term per sentence @@ -149,6 +164,7 @@ Confirm each point before the page ships: - Every sentence keeps its subject, its verb, and its articles. - Every paragraph covers one topic in at most six sentences. - Every sentence continues the topic of the one before, or opens with the word that names the move. +- Every section that moved defines its terms before their first use, repeats no fact of the block above it, and reads as a sequence at each join. - The first sentences of the paragraphs and the lead-ins of the bullets, read alone, carry each section. - Every sentence introduces at most one new term. - Every sentence states the fact and what happens, and names the element instead of its role. diff --git a/apps/docs/src/content/docs/en/pages/style-guide/writing/terminology.mdx b/apps/docs/src/content/docs/en/pages/style-guide/writing/terminology.mdx index 9c04a04d5d..077e55e7cf 100644 --- a/apps/docs/src/content/docs/en/pages/style-guide/writing/terminology.mdx +++ b/apps/docs/src/content/docs/en/pages/style-guide/writing/terminology.mdx @@ -83,9 +83,9 @@ Product is a go-to-market term that names an offering, not a class: a page never - **Once per page, at the element's first definition.** That is the first sentence of an Overview, each entry of its resources section, the sentence of a concept page that introduces the element, a glossary row that defines it, and the first sentence of any other page that says what the element is. - **A mention in passing carries no class.** `Create a Firewall` and `Open the Application` stay as they are. A changelog entry describes a change, not the element, and keeps the opening that [Changelog pages](/en/documentation/style-guide/content/changelog/) sets. - **The class does not replace the concept.** The class says what the element is within Azion. The concept sentences after it still say what the class of thing is with any vendor: a reverse proxy is a server in front of your origins. -- **Brazilian Portuguese** writes the classes as `recurso de plataforma` and `feature`: `**Functions** é um recurso de plataforma que executa código JavaScript na infraestrutura distribuída da Azion.` +- **Brazilian Portuguese** writes the classes as `recurso da plataforma` and `feature`: `**Functions** é um recurso da plataforma que executa código JavaScript na infraestrutura distribuída da Azion.` -- Correct: `**Applications** is a Platform Resource that runs a reverse proxy on Azion's distributed infrastructure.` +- Correct: `**Applications** is a Platform Resource that processes the requests received by your Workloads.` - Incorrect: `Applications is a product.` The class is wrong. - Incorrect: `Application Accelerator is a Product that…` Product is not a class on a page. - Incorrect: `Functions is a serverless product.` A market category replaces the class. @@ -130,7 +130,7 @@ The reader tells the Platform Resource from its instances by the grammar. The Pl The name already ties the instance to its Platform Resource, so no sentence has to. When a sentence must say what an instance is, its class noun is `entity`, `entidade` in Brazilian Portuguese, never `object` or `objeto`: `A Workload is the entity that holds your domains…`. A lowercase or translated instance reads as the customer's own app or as a generic function, and a reader who knows the product reads the translation as a different name for it. - Correct: `Deploy your first Application.` -- Correct: `An Application receives the requests of the Workloads whose deployment sets it.` +- Correct: `An Application receives the requests of a Workload once that Workload's deployment sets that Application.` - Incorrect: `an application`, `uma aplicação`, `uma função`, or `um connector` for the entity created in Azion. - Incorrect: `Use **Applications** to build your own Applications.` The customer's own software stays `applications`. diff --git a/apps/docs/src/content/docs/en/pages/style-guide/writing/word-choice.mdx b/apps/docs/src/content/docs/en/pages/style-guide/writing/word-choice.mdx index 21fa67e3d5..e4e07a0a87 100644 --- a/apps/docs/src/content/docs/en/pages/style-guide/writing/word-choice.mdx +++ b/apps/docs/src/content/docs/en/pages/style-guide/writing/word-choice.mdx @@ -92,6 +92,26 @@ Do not use directional language. Name the element instead, per [Accessibility](/ The step grammar that uses these verbs is in [Procedures](/en/documentation/style-guide/writing/procedures/). +## Name the interface with each of its elements + +A bold label, a `›` path, a button, a tab, a field, or a switch exists in one interface only. A sentence that names one also names that interface, or the sentence before it in the same paragraph does. Without the name, a reader on the API or the CLI cannot act on the sentence, and a reader on Azion Console cannot tell that the sentence describes it. A panel under an interface heading, such as `### Console`, already names the interface. + +- Incorrect: `You set it in the **Application** field of **Deployment Settings**.` +- Correct: `In Azion Console, you set it in the **Application** field of **Deployment Settings**.` + +## State the setting, not the path, outside a task + +On a page that is not a task, state a setting by what it does and its default, with its API field where one exists. Then link the page that shows where to change it. This covers an overview, a concept page, a best-practices page, and a glossary. The path to a control is a procedure, and it belongs to the task page. + +- Incorrect: `Its switch, **Image Processor** in **Main Settings** › **Modules**, is off in a new Application.` +- Correct: ``Image Processor is off in a new Application, and each Application turns it on separately, in its `modules.image_processor.enabled` field in the API.`` + +A Console location stays where it is itself the fact, with the interface named: + +- The one place where Azion Console sets a relation. +- A Console string quoted as evidence. +- A table that maps each Console label to its API field. + ## Use inclusive language The documentation addresses the reader as "you", so the generic reader never needs a gendered pronoun. A generic third party — an attacker, a developer — takes "they", never "he" or "she". diff --git a/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-and-run-marketing-websites.mdx b/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-and-run-marketing-websites.mdx index 80edf5f756..361aefcee8 100644 --- a/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-and-run-marketing-websites.mdx +++ b/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-and-run-marketing-websites.mdx @@ -134,7 +134,7 @@ sequenceDiagram | Metric | Where to read it | What working looks like | | --- | --- | --- | | Time to first byte for visitors in every region | The `ttfb` field of Edge Pulse measurements, taken in the visitors' browsers by a tag the site's pages carry. Refer to [Edge Pulse quickstart](/en/documentation/platform/edge-pulse/quickstart/) | Low and comparable across regions, because every page is a prebuilt file in cache | -| Time from a content change to a live page | The time of each commit on GitHub, against the purge history of **Real-Time Purge**, which lists each purge when it is complete. Refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#confirmation) | The purge after each push completes, and no page waits for its Max Age to expire | +| Time from a content change to a live page | The time of each commit on GitHub, against the purge history of **Real-Time Purge**, which lists each purge when it is complete. Refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-queue-and-history) | The purge after each push completes, and no page waits for its Max Age to expire | | Share of requests answered from cache | **Requests Offloaded** in Real-Time Metrics, filtered to the site's domain. Refer to [Measure cache offload for a domain](/en/documentation/guides/platform/observability/measure-cache-offload/) | High between deploys, with a short dip after each purge. A miss reads the bucket, never a server the team runs | --- diff --git a/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-e-commerce-storefronts.mdx b/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-e-commerce-storefronts.mdx index 65b91076bb..cf2e1ea816 100644 --- a/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-e-commerce-storefronts.mdx +++ b/apps/docs/src/content/docs/en/pages/use-cases/build-and-run-applications/build-e-commerce-storefronts.mdx @@ -160,7 +160,7 @@ Azion accepts 2,000 wildcard purge requests in a 24-hour interval, so a wildcard | --- | --- | --- | | Share of catalog requests that never reach the store | **Requests Offloaded** in Real-Time Metrics, filtered to the store's domain. Refer to [Measure cache offload for a domain](/en/documentation/guides/platform/observability/measure-cache-offload/) | Rises after the catalog rule propagates, and holds during traffic peaks | | Time to first byte on catalog and product pages | The `ttfb` field of Edge Pulse measurements, taken in the visitors' browsers. Refer to [Edge Pulse quickstart](/en/documentation/platform/edge-pulse/quickstart/) | Lower on catalog pages than on cart and checkout pages, in every region | -| Time from a price or stock change to a live page | The purge history of **Real-Time Purge** in Azion Console, which lists each purge when it is complete. Refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#confirmation) | Each purge completes, and no product page waits for its 600-second **Max Age** to expire | +| Time from a price or stock change to a live page | The purge history of **Real-Time Purge** in Azion Console, which lists each purge when it is complete. Refer to [Real-Time Purge](/en/documentation/platform/applications/cache/real-time-purge/#purge-queue-and-history) | Each purge completes, and no product page waits for its 600-second **Max Age** to expire | --- @@ -169,7 +169,7 @@ Azion accepts 2,000 wildcard purge requests in a 24-hour interval, so a wildcard - **Exclude sessions with a criterion, not with cookie variation.** Varying the catalog cache key by `session_id` stores one copy per visitor, because the cookie is unique per visitor. The `does not exist` criterion keeps a single shared copy for every visitor without a session. For cookie variation and its cost, refer to [Applications best practices](/en/documentation/platform/applications/best-practices/). - **Never put Forward Cookies on a rule that caches.** On a cached response, **Forward Cookies** can hand one visitor the `Set-Cookie` of another visitor's session. On this page it sits only on the bypass rule, where nothing is cached. - **Purge on change instead of shortening Max Age.** A short **Max Age** sends more catalog requests to the store and still leaves a stale window. The purge refreshes the page when it changes, and **Max Age** stays a safety bound for a missed purge. -- **Use Bypass Cache for the cart, not a Max Age of 0.** A **Max Age** of `0` merges simultaneous requests for one path into one origin request, and two visitors who load their carts at the same moment need different answers. For the difference between the two, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). +- **Use Bypass Cache for the cart.** For the difference between **Bypass Cache** and a **Max Age** of `0`, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). --- diff --git a/apps/docs/src/content/docs/en/pages/use-cases/deliver-media-and-streaming/deliver-an-on-demand-video-library.mdx b/apps/docs/src/content/docs/en/pages/use-cases/deliver-media-and-streaming/deliver-an-on-demand-video-library.mdx index da88651717..fa49d60a72 100644 --- a/apps/docs/src/content/docs/en/pages/use-cases/deliver-media-and-streaming/deliver-an-on-demand-video-library.mdx +++ b/apps/docs/src/content/docs/en/pages/use-cases/deliver-media-and-streaming/deliver-an-on-demand-video-library.mdx @@ -89,7 +89,7 @@ The upload moves only when a title is added or re-encoded: the library lives on - **Object Storage**: holds the library, every playlist and segment under a prefix of one bucket. The bucket gives the platform read-only access, and the team writes to it through the API or the S3 protocol. - **application**: the Platform Resource that delivers the library. A connector to the bucket and a rule with _Set Connector_ make the bucket its source, and rules by file extension apply a cache setting to each kind of file. - **Cache**: keeps the segments and the playlists close to viewers. A segment under its key never changes, so it can stay cached for a long time, while a playlist that can be rewritten takes a shorter Max Age. -- **Tiered Cache**: the Feature that adds a second cache layer, shared by every data center, between Cache and the bucket. It concentrates the misses of all data centers, so the bucket is read rarely for each segment. +- **Tiered Cache**: the Feature that adds a second cache layer between Cache and the bucket, in the region that the topology of the cache setting selects. A segment missing in a data center is answered from that layer when it holds a valid copy, so fewer reads reach the bucket. - **Functions**: validate an access token before a paid title leaves the bucket, a design option for gated content. A request without a valid token never reads the bucket. - **Real-Time Metrics**: reports the requests and the data that Cache and the Tiered Cache layer answered, filtered to the library's hostname. diff --git a/apps/docs/src/content/docs/en/pages/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn.mdx b/apps/docs/src/content/docs/en/pages/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn.mdx index 2cdc864ed6..0d72ada5cf 100644 --- a/apps/docs/src/content/docs/en/pages/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn.mdx +++ b/apps/docs/src/content/docs/en/pages/use-cases/improve-performance-and-reliability/accelerate-websites-and-apis-with-a-cdn.mdx @@ -18,7 +18,7 @@ This use case does not cover moving the site off its origin, failover between or - An Azion account. If you do not have one, [create an account](https://console.azion.com/signup). - An application that serves your site through a connector and a workload, with a rule whose **Set Connector** behavior sends every request to the connector. To create them, refer to [Applications quickstart](/en/documentation/platform/applications/quickstart/). -- Application Accelerator on that application, which the **Bypass Cache** behavior and the `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS` methods of the API require. To turn it on, refer to [Turn on Application Accelerator](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#turn-on-application-accelerator). +- Application Accelerator on that application, which the **Bypass Cache** behavior requires. To turn it on, refer to [Turn on Application Accelerator](/en/documentation/guides/application-performance/cache-and-purge/cache-settings/#turn-on-application-accelerator). - Access to the firewall in front of your origin, where the allowlist goes. --- @@ -78,7 +78,7 @@ flowchart TD 1. Edge DNS resolves `www.example.com` to the workload, and the user's request reaches the application in a nearby data center. 2. The application's rules read the path in the Request Phase and apply a cache setting: `static-files` to a `/static/` file, `pages` to a page. A valid copy in the data center's cache answers the request through the application, and the origin is not asked. -3. On a miss for a static file, the data center asks the Tiered Cache layer, which is shared by every data center and keeps objects longer. A copy there answers the request without reaching the origin, and Cache stores it on the way back. +3. On a miss for a static file, the data center asks the Tiered Cache layer, in the region that the topology of the cache setting selects. A copy there answers the request without reaching the origin, and Cache stores it on the way back. 4. An `/api/` call bypasses the cache and reaches the origin through the `site-origin` connector, with every HTTP method, and its response is not stored. Any other miss also reaches the origin through `site-origin`. On the way back, the Tiered Cache layer keeps a static file, and Cache stores the file or the page for the next request. 5. The connector reaches the origin from an address on the `Azion Origin Shield` list, and the origin's firewall refuses every other source. 6. When a deploy changes static files, a cache key purge removes them before their TTL ends, from the Tiered Cache layer first and from Cache second, and the next request fetches the new version. A cache key purge is the only type that reaches the Tiered Cache layer. @@ -91,7 +91,7 @@ Every response returns through the application, which delivers it to the user. - **application**: the Platform Resource that holds the `static-files` and `pages` cache settings and the rules that apply them, path by path, beside the rule that bypasses the cache on `/api/`. - **Application Accelerator**: the Product the **Bypass Cache** behavior requires, so the application can send every call on `/api/` to the origin without storing the response. - **Cache**: stores responses in the data center that fetched them and answers repeated requests from the copy, for the TTL of the cache setting. -- **Tiered Cache**: the Feature that adds a second cache layer between Cache and the origin, in the region its topology names. It requires _Override cache behavior_ and a **Max Age** of at least 3 seconds, and on this page it covers the static files only. +- **Tiered Cache**: the Feature that adds a second cache layer between Cache and the origin, in the region its topology names. It requires _Override cache behavior_ and, with Application Accelerator on, a **Max Age** of at least 3 seconds, and on this page it covers the static files only. - **connector**: the Platform Resource that reaches the origin on a miss in every cache layer, and on every API call. On this page it is `site-origin`. - **Origin Shield**: with Origin IP ACL on the connector, the origin's own firewall allows the prefixes of the `Azion Origin Shield` list and refuses every other source. - **Real-Time Purge**: the Platform Resource that removes changed content from cache before its TTL ends. @@ -113,7 +113,7 @@ Each request reaches the Azion data center with the best route to the visitor, o The cache for this site is two cache settings, one per kind of content, each applied by its own rule. Static files change only when you deploy, so they stay cached long and go through Tiered Cache. Pages change between deploys, so they stay cached briefly. -The `static-files` setting uses _Override cache behavior_ with a **Max Age** of `86400` seconds, one day. The purge on deploy removes a changed file at deploy time, so the day only bounds how long a file stays stale when a purge is missed. **Tiered Cache** is on, with the nearest region as its topology: Tiered Cache is designed for objects that stay cached a long time, and it requires _Override cache behavior_. The browser cache honors the `Cache-Control` the origin sends for each file. +The `static-files` setting uses _Override cache behavior_ with a **Max Age** of `86400` seconds, one day. The purge on deploy removes a changed file at deploy time, so the day only bounds how long a file stays stale when a purge is missed. **Tiered Cache** is on, with the nearest region as its topology, and it requires _Override cache behavior_. The browser cache honors the `Cache-Control` the origin sends for each file. The `pages` setting uses a **Max Age** of `300` seconds, so a page edited at the origin reaches users within five minutes with no purge. Its browser cache is overridden to `0` seconds, because a copy in the user's browser cannot be purged. It has no Tiered Cache, because a five-minute object gains little from a second layer. @@ -121,7 +121,7 @@ Both settings keep **Stale cache** on, as Azion Console sets it for a new settin ### The API pass-through -API responses are different for each caller, so the API path bypasses the cache and every call reaches the origin. The rule matches `/api/` and carries **Bypass Cache**. Application Accelerator, already on the application, is what makes the application accept the API's `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS` calls, beyond `GET` and `HEAD`. A bypassed request keeps protocol optimizations and, where possible, a keep-alive connection to the origin, so each call skips a new connection. +API responses are different for each caller, so the API path bypasses the cache and every call reaches the origin. The rule matches `/api/` and carries **Bypass Cache**. Application Accelerator, already on the application, is what unlocks **Bypass Cache**. The API path has no cache setting with Tiered Cache, so no response of it lands in the Tiered Cache layer either: **Bypass Cache** acts on Azion's cache and not on that layer. @@ -175,7 +175,7 @@ A cache key purge takes up to 50 keys per request, so a deploy that changes more - **Keep Tiered Cache off any path you bypass.** **Bypass Cache** acts on Azion's cache and not on the Tiered Cache layer, so a path whose cache setting has Tiered Cache on keeps answering from that layer. On this page the bypassed `/api/` path has no cache setting at all. For the symptom, refer to [Troubleshoot Applications](/en/documentation/platform/applications/troubleshooting/#cache). - **Purge on deploy instead of shortening Max Age.** A short **Max Age** sends more requests to the origin and still leaves a stale window. The deploy knows which files changed, so it purges them, and **Max Age** stays a safety bound. -- **Use Bypass Cache for the API, not a Max Age of 0.** A **Max Age** of `0` merges simultaneous requests for one path into one origin request, and two callers of an API need two answers. For the difference, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). +- **Use Bypass Cache for the API.** For the difference between **Bypass Cache** and a **Max Age** of `0`, refer to [Cache variation](/en/documentation/platform/applications/application-accelerator/cache-variation/#bypass-cache-and-a-ttl-of-0). - **Allow both address families at the origin.** The `Azion Origin Shield` list carries IPv6 prefixes beside its IPv4 prefixes, and Azion connects to origins over both. An allowlist with only the IPv4 prefixes refuses the connections Azion opens over IPv6. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/application-acceleration.mdx b/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/application-acceleration.mdx index b2bab62e27..3ae456223d 100644 --- a/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/application-acceleration.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/application-acceleration.mdx @@ -11,7 +11,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Este design atende times cujas respostas de API são personalizadas ou transacionais e não podem ser cacheadas. A aplicação faz bypass do cache nesses caminhos, então cada chamada chega à origem por meio de um connector. Application Accelerator libera esse bypass e os métodos `OPTIONS`, `POST`, `PUT`, `PATCH` e `DELETE` de que uma API precisa. Os caminhos cacheáveis do mesmo site mantêm as suas regras de cache. O design implementa o caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/). +Este design atende times cujas respostas de API são personalizadas ou transacionais e não podem ser cacheadas. A aplicação faz bypass do cache nesses caminhos, então cada chamada chega à origem por meio de um connector. Application Accelerator libera esse bypass. Os caminhos cacheáveis do mesmo site mantêm as suas regras de cache. O design implementa o caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/). ## Diagrama de arquitetura @@ -43,7 +43,7 @@ flowchart TD 1. Um cliente envia uma requisição ao domínio de um workload, e o deployment do workload nomeia a aplicação. 2. A aplicação executa as suas regras da Request Phase em ordem. Uma regra que corresponde a um caminho dinâmico, como `/api/`, carrega o behavior **Bypass Cache**. 3. **Bypass Cache** envia a requisição à origem por meio do connector que uma regra com **Set Connector** nomeia, e a Azion não guarda nenhuma cópia da resposta. A resposta a uma requisição enviada com `Pragma: azion-debug-cache` informa `BYPASS` no seu header `x-cache`. -4. O connector alcança a origem com o protocolo que as suas configurações decidem. Quando possível, a requisição que fez bypass trafega em uma conexão keep-alive com a origem. +4. O connector alcança a origem com o protocolo que as suas configurações decidem. 5. Uma requisição em um caminho cacheável recebe o cache setting que uma regra com **Set Cache Policy** aplica. Cache responde a partir de uma cópia válida, e um miss chega à origem pelo mesmo connector. 6. Real-Time Metrics registra cada requisição ao domínio. Em um caminho dinâmico, o tempo de requisição sempre inclui o tempo que a origem leva para responder. @@ -51,10 +51,10 @@ Toda resposta volta pela aplicação, que a entrega ao cliente. Nada em um camin ## Componentes -- **aplicação**: o Platform Resource que contém as regras por caminho. Uma regra da Request Phase com **Bypass Cache** corresponde a cada caminho dinâmico, e regras com **Set Cache Policy** aplicam cache settings aos outros caminhos. Um **Max Age** de `0` não substitui o bypass. Ele agrupa requisições paralelas pelo mesmo objeto em uma única requisição à origem, então dois chamadores simultâneos recebem a mesma resposta. -- **Application Accelerator**: o Product que faz a aplicação aceitar `OPTIONS`, `POST`, `PUT`, `PATCH` e `DELETE`, além de `GET` e `HEAD`, que ela aceita nativamente. Ele também libera **Bypass Cache**. Uma requisição que **Bypass Cache** envia à origem mantém as otimizações de protocolo e, quando possível, uma conexão keep-alive com ela. O seu switch pertence à aplicação e fica desativado em uma aplicação nova. -- **connector**: o Platform Resource que carrega o endereço da origem e molda cada requisição a ela, para cada requisição dinâmica e cada miss de cache. A sua **Transport Protocol Policy** define o protocolo até a origem: forçar HTTPS protege esse trecho e custa um handshake TLS a cada nova conexão. Sem Load Balancer, os timeouts da conexão seguem os padrões da plataforma e não são configurações. -- **Cache**: guarda as respostas dos caminhos que continuam cacheáveis, sob o cache setting que a regra de cada caminho aplica. **Bypass Cache** não alcança a camada do Tiered Cache. Uma aplicação cujos cache settings têm Tiered Cache ativo continua a guardar objetos nessa camada pelo TTL mínimo. +- **aplicação**: o recurso da plataforma que contém as regras por caminho. Uma regra da Request Phase com **Bypass Cache** corresponde a cada caminho dinâmico, e regras com **Set Cache Policy** aplicam cache settings aos outros caminhos. +- **Application Accelerator**: o recurso da plataforma que libera **Bypass Cache** e torna cacheáveis as respostas `POST` e `OPTIONS`. O seu switch pertence à aplicação e fica desativado em uma aplicação nova. +- **connector**: o recurso da plataforma que carrega o endereço da origem e molda cada requisição a ela, para cada requisição dinâmica e cada miss de cache. A sua **Transport Protocol Policy** define o protocolo até a origem: forçar HTTPS protege esse trecho e custa um handshake TLS a cada nova conexão. Sem Load Balancer, os timeouts da conexão seguem os padrões da plataforma e não são configurações. +- **Cache**: guarda as respostas dos caminhos que continuam cacheáveis, sob o cache setting que a regra de cada caminho aplica. **Bypass Cache** não alcança a camada do Tiered Cache. Uma aplicação cujos cache settings têm Tiered Cache ativo continua a guardar objetos nessa camada pelo Max Age do cache setting. - **Real-Time Metrics**: mostra quanto tempo a aplicação leva para responder a uma requisição, filtrado pelo domínio. O dashboard **Requests** traz o gráfico **Average Request Time**, e um filtro em **Upstream Cache Status** com o valor `BYPASS` mantém só as requisições que fizeram bypass. Na API GraphQL, o campo `upstreamResponseTime` de [`workloadMetrics`](/pt-br/documentacao/devtools/graphql/campos-gql-real-time-metrics/#workloadmetrics) soma o tempo que a Azion leva para receber as respostas da origem. ## Implementação diff --git a/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/content-delivery.mdx b/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/content-delivery.mdx index 4aa6f11f84..3771048be4 100644 --- a/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/content-delivery.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/arquiteturas/edge-application/content-delivery.mdx @@ -51,7 +51,7 @@ flowchart TD 1. Edge DNS resolve o domínio para o workload, e a requisição do usuário chega à aplicação em um data center próximo. 2. As regras da aplicação leem o caminho na Request Phase e aplicam uma cache setting. Uma cópia válida no cache desse data center responde a requisição, e a origem não é consultada. -3. Em um miss de um arquivo estático, o data center consulta a camada do Tiered Cache, que todos os data centers compartilham, antes de consultar a origem. +3. Em um miss de um arquivo estático, o data center consulta a camada do Tiered Cache, na região que a topologia da cache setting seleciona, antes de consultar a origem. 4. Um miss em todas as camadas chega à origem pelo connector, e a resposta é guardada para a requisição seguinte. Uma chamada em um caminho com bypass, como `/api/`, sempre chega à origem, e a resposta dela nunca é guardada. 5. O connector chega à origem a partir de um endereço da lista `Azion Origin Shield`, e o firewall da origem recusa todas as outras fontes. 6. Quando o conteúdo muda, um purge por cache key o remove primeiro da camada do Tiered Cache e depois do Cache. A requisição seguinte então busca a nova versão na origem. @@ -63,7 +63,7 @@ Toda resposta volta pela aplicação, que a entrega ao usuário. A origem permit - **Edge DNS**: resolve o domínio para o workload. Um subdomínio aponta para o domínio do workload com um registro `CNAME`, e o apex aponta para ele com um registro `ANAME`. - **aplicação**: o Platform Resource que guarda as regras de cache. Cada regra corresponde a um conjunto de caminhos e aplica uma cache setting. Uma regra com o behavior **Bypass Cache** mantém um caminho fora do cache, e esse behavior exige Application Accelerator na aplicação. - **Cache**: guarda cada resposta no data center que a buscou, pelo TTL da sua cache setting, e responde às requisições repetidas com essa cópia. A cache key é o esquema, o host e o caminho, mais as variações que uma cache setting adiciona. Uma requisição que carrega `Pragma: azion-debug-cache` recebe a key no header `x-cache-key`. Para arquivos estáticos, o design mantém o TTL em 15 dias (`1296000` segundos) ou menos, o máximo padrão do [template Static Cache](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/frameworks/static-cache-template/). -- **Tiered Cache**: a Feature que adiciona uma segunda camada de cache entre o Cache e a origem, compartilhada por todos os data centers, na região que a sua topologia nomeia. Ela exige _Override cache behavior_ e um **Max Age** de pelo menos 3 segundos. +- **Tiered Cache**: a Feature que adiciona uma segunda camada de cache entre o Cache e a origem, na região que a sua topologia nomeia. Ela exige _Override cache behavior_ e, com Application Accelerator ativo, um **Max Age** de pelo menos 3 segundos. - **connector**: o Platform Resource que chega à origem em um miss em todas as camadas de cache e em toda chamada a um caminho com bypass. - **Origin Shield**: com Origin IP ACL no connector, o firewall da origem permite os prefixos da lista `Azion Origin Shield` e recusa todas as outras fontes. A Azion não aplica a allowlist, e a lista traz prefixos IPv4 e IPv6 de que a allowlist precisa juntos. - **Real-Time Purge**: o Platform Resource que remove o conteúdo alterado antes que o TTL dele termine. Um purge por cache key aceita até 50 keys por requisição, e é o único tipo de purge que chega à camada do Tiered Cache. diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/multiple-origins.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/multiple-origins.mdx index b90060fcb1..306ea5f002 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/multiple-origins.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/multiple-origins.mdx @@ -348,7 +348,7 @@ Para confirmar a rota, envie uma requisição ao domínio do seu workload, com e curl -i https:/// ``` -A resposta vem de um dos endereços ativos do connector. O domínio de um workload termina em `.map.azionedge.net`, e a API o retorna em `workload_domain` quando cria o workload. Se a resposta ainda não vier dos seus servidores de origem, envie a requisição novamente até que venha. Se nunca vier, consulte [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). +A resposta vem de um dos endereços ativos do connector. O domínio de um workload termina em `.map.azionedge.net`, e a API o retorna em `workload_domain` quando cria o workload. Se a resposta ainda não vier dos seus servidores de origem, envie a requisição novamente até que venha. Se nunca vier, consulte [Solucione problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/processar-imagens.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/processar-imagens.mdx index 481f5e7eda..e840ea7860 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/processar-imagens.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/configuracoes-avancadas/processar-imagens.mdx @@ -507,7 +507,7 @@ Solicite a mesma URL duas vezes com o header `Pragma: azion-debug-cache`: curl -sI -H "Accept: image/webp" -H "Pragma: azion-debug-cache" "https://www.example.com/images/blue-shirt.jpg?ims=fit-in/800x800/filters:quality(85)" ``` -A segunda resposta carrega `x-cache: HIT`, e `x-cache-key` termina com o valor de `ims` e `@@webp`, o formato para o qual a variação foi convertida. A URL `400x400`, solicitada com os mesmos headers, tem um `x-cache-key` diferente, e a sua primeira resposta carrega `x-cache: MISS`. A URL `800x800` solicitada com `-H "Accept: image/jpeg"` e o header `Pragma: azion-debug-cache` carrega o formato original em `content-type`, e o seu `x-cache-key` não carrega `@@webp`. Para saber como ler os headers de debug, consulte [Verifique o status de cache de uma resposta](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). +A segunda resposta carrega `x-cache: HIT`, e `x-cache-key` termina com o valor de `ims` seguido de `webp`, o formato para o qual a variação foi convertida. A URL `400x400`, solicitada com os mesmos headers, tem um `x-cache-key` diferente, e a sua primeira resposta carrega `x-cache: MISS`. A URL `800x800` solicitada com `-H "Accept: image/jpeg"` e o header `Pragma: azion-debug-cache` carrega o formato original em `content-type`, e o seu `x-cache-key` não carrega `webp` no final. Para saber como ler os headers de debug, consulte [Verifique o status de cache de uma resposta](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). No caso de uso [Criar e operar sites de marketing](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-e-operar-sites-de-marketing/), espere: @@ -517,7 +517,10 @@ No caso de uso [Criar vitrines de e-commerce](/pt-br/documentacao/casos-de-uso/c - **As imagens de produto são processadas.** Uma imagem requisitada com uma query string `ims`, como `https://www.example.com/media/blue-shirt.jpg?ims=400x`, carrega `x-ims: Enabled`. -Estas verificações confirmam o caso de uso [Otimizar imagens para sites e aplicações móveis](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/otimizar-imagens-para-sites-e-aplicacoes-moveis/). +No caso de uso [Otimizar imagens para sites e aplicações móveis](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/otimizar-imagens-para-sites-e-aplicacoes-moveis/), espere: + +- **Cada variante é convertida para um formato que o navegador aceita.** Uma requisição com `Accept: image/webp` carrega `x-ims: Enabled` e `content-type: image/webp`. +- **Cada tamanho fica no cache separadamente.** A segunda requisição da URL `800x800` carrega `x-cache: HIT`, e a URL `400x400` tem um `x-cache-key` diferente. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/contrua-uma-aplicacao/crie-uma-aplicacao.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/contrua-uma-aplicacao/crie-uma-aplicacao.mdx index 300265233e..8b1ad0036b 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/contrua-uma-aplicacao/crie-uma-aplicacao.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/contrua-uma-aplicacao/crie-uma-aplicacao.mdx @@ -65,7 +65,7 @@ Uma aplicação. Para criar uma, consulte [Primeiros passos com Applications](/p ## Habilite um Produto na aplicação -Uma aplicação nova executa Cache e Functions. Application Accelerator e Image Processor ficam desativados até que você os habilite. Azion Console rotula Cache como "Automatically enabled in all accounts." +Uma aplicação nova executa Cache e Functions. Application Accelerator e Image Processor ficam desativados até que você os habilite. Azion Console rotula Cache como "Automatically enabled in all accounts." Cache não pode ser desativado: a API recusa `modules.cache.enabled` definido como `false` com o erro `31001`, `Cache Cannot Be False`. Cada Produto muda o que as regras e as configurações da aplicação podem fazer: diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-astro.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-astro.mdx index bb2528da57..aff7b630f9 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-astro.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-astro.mdx @@ -362,7 +362,9 @@ O deploy retorna a URL do domínio da Azion do site, no formato `https://xxxxxxx O primeiro deploy pode levar vários minutos para responder a partir de todas as localidades; os deploys seguintes levam cerca de dois minutos. Até que uma localidade receba o site, o domínio responde com uma página `404` que diz `There's nothing here yet`. Diante dessa resposta, aguarde e solicite a URL novamente. -Estas verificações confirmam o caso de uso [Criar e operar sites de marketing](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-e-operar-sites-de-marketing/). +No caso de uso [Criar e operar sites de marketing](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-e-operar-sites-de-marketing/), espere: + +- **O site responde no domínio da Azion.** A URL que o deploy retorna, no formato `https://xxxxxxxxxx.map.azionedge.net`, abre o site Astro em um navegador. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-react.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-react.mdx index da1025cd91..c181d5257c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-react.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/desenvolva-com-azion/guias-frameworks/framework-react.mdx @@ -325,7 +325,9 @@ Todas as rotas retornam a URL do domínio da Azion do app, no formato `https://x O primeiro deploy pode levar vários minutos para responder em todas as localidades; os deploys seguintes levam cerca de dois minutos. Até que uma localidade receba o app, o domínio responde com uma página `404` que diz `There's nothing here yet`. Diante dessa resposta, aguarde e solicite a URL novamente. -Estas verificações confirmam o caso de uso [Implantar aplicações front-end](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-front-end/). +No caso de uso [Implantar aplicações front-end](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-front-end/), espere: + +- **O app responde no domínio da Azion.** A URL que o deploy retorna, no formato `https://xxxxxxxxxx.map.azionedge.net`, abre o app React em um navegador. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/cache-settings.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/cache-settings.mdx index 93d2aaf6c5..c6bc8ff913 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/cache-settings.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/cache-settings.mdx @@ -79,7 +79,7 @@ O drawer **Create Cache Settings** carrega cada campo de um setting. Para criar -O setting aparece na lista de **Cache Settings** com o seu **Name**, **ID**, **Browser Cache** e **Cache**. Para cada campo, com o seu tipo, o seu padrão e os seus limites, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). +O setting aparece na lista de **Cache Settings** com o seu **Name**, **Browser Cache** e **Cache**. Para cada campo, com o seu tipo, o seu padrão e os seus limites, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). No caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/), esta seção usa estes valores: diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/device-groups.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/device-groups.mdx index 2c30c73480..e16db072d1 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/device-groups.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/device-groups.mdx @@ -21,7 +21,7 @@ Para manter uma cópia em cache separada de cada objeto para cada device group, ## Pré-requisitos - Uma aplicação servida por um [workload](/pt-br/documentacao/plataforma/workloads/). Para criar os dois, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- Application Accelerator ativado na aplicação. A regra desta página lê a variável `${device_group}`, que exige esse Produto. Para ativá-lo, consulte [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#produtos). +- Application Accelerator ativado na aplicação. A regra desta página lê a variável `${device_group}`, que exige esse Produto. Para ativá-lo, consulte [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma). - Acesso ao Azion Console. Para entrar, consulte [Como acessar o Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/functions-instances.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/functions-instances.mdx index fd7c8bf3e9..5f37834048 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/functions-instances.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/functions-instances.mdx @@ -233,9 +233,9 @@ Args são os argumentos que uma instância passa para o contexto de execução d } ``` -O código lê a chave em tempo de execução e a instância decide o valor dela. Uma função pode definir Args padrão próprios, e os Args de uma instância substituem as chaves que repetem. O objeto Args comporta no máximo 100 KB, e um objeto acima desse teto faz a função falhar na instanciação. Valores sensíveis como chaves de API, credenciais e tokens de acesso pertencem às [variáveis de ambiente](/pt-br/documentacao/plataforma/functions/environment-variables/). +O código lê a chave em tempo de execução e a instância decide o valor dela. Uma função pode definir Args padrão próprios, e os Args definidos em uma instância substituem esses padrões por inteiro. O objeto Args comporta no máximo 100 KB, e um objeto acima desse teto faz a função falhar na instanciação. Valores sensíveis como chaves de API, credenciais e tokens de acesso pertencem às [variáveis de ambiente](/pt-br/documentacao/plataforma/functions/environment-variables/). -Para os valores padrão e as regras de substituição, consulte [Como Functions funciona](/pt-br/documentacao/plataforma/functions/como-funciona/). Para cada campo do objeto de instância, consulte [Instâncias de função](/pt-br/documentacao/plataforma/applications/functions-instances/). +Para os valores padrão e como os Args de uma instância os substituem, consulte [Como Functions funciona](/pt-br/documentacao/plataforma/functions/como-funciona/). Para cada campo do objeto de instância, consulte [Instâncias de função](/pt-br/documentacao/plataforma/applications/functions-instances/). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/main-settings.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/main-settings.mdx index d6358fc280..9d4308eb49 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/main-settings.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/main-settings.mdx @@ -79,7 +79,7 @@ Ainda não tem uma application? [Comece com um template](/pt-br/documentacao/pla **Módulos** - Os [Módulos de Applications](/pt-br/documentacao/plataforma/applications/main-settings/#produtos) podem desbloquear funcionalidades e recursos adicionais para suas aplicações. Veja a [página de preços](https://www.azion.com/pt-br/precos/) para mais detalhes. + Os [Módulos de Applications](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) podem desbloquear funcionalidades e recursos adicionais para suas aplicações. Veja a [página de preços](https://www.azion.com/pt-br/precos/) para mais detalhes. Por enquanto, você ativará dois módulos. Os módulos **Application Accelerator** e **Functions** serão usados quando você [ajustar suas configurações de cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/ajustar-cache-settings/), [instanciar uma function](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/) e [Trabalhar com Rules Engine](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/trabalhar-com-rules-engine/). diff --git a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/origins.mdx b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/origins.mdx index 36bbed2743..0430931b8b 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/origins.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build-jornada/edite-edge-app/origins.mdx @@ -392,7 +392,7 @@ Para confirmar a rota, envie uma requisição ao domínio do seu workload, com e curl -i https:/// ``` -A resposta é a que `httpbin.org` retorna para `/`. O domínio de um workload termina em `.map.azionedge.net`, e a API o retorna em `workload_domain` quando cria o workload. Se a resposta ainda não vier da origem, envie a requisição novamente até que venha. Se nunca vier, consulte [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). +A resposta é a que `httpbin.org` retorna para `/`. O domínio de um workload termina em `.map.azionedge.net`, e a API o retorna em `workload_domain` quando cria o workload. Se a resposta ainda não vier da origem, envie a requisição novamente até que venha. Se nunca vier, consulte [Solucione problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/como-funciona.mdx b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/como-funciona.mdx index 0485e46d42..5011768db4 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/como-funciona.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/como-funciona.mdx @@ -1,6 +1,6 @@ --- title: Variação de cache -description: O que Application Accelerator libera, o que cada variação de cache custa, como os purges alcançam objetos variados e como um TTL de 0 difere de Bypass Cache. +description: Veja o que Application Accelerator libera, o que cada variação custa, como os purges alcançam objetos variados e como um TTL de 0 difere de Bypass Cache. meta_tags: 'application accelerator, cache variation, cache key, advanced cache key, allowlist, sort, purge, bypass cache, TTL, post and options caching' namespace: documentation_products_application_accelerator_how_it_works permalink: /documentacao/plataforma/applications/application-accelerator/variacao-de-cache/ @@ -9,9 +9,9 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Quando a resposta de uma URL depende de um cookie, de um dispositivo ou do corpo de uma requisição, o cache precisa distinguir essas requisições. Em uma aplicação, um switch ativa Application Accelerator, e um cache setting então nomeia as entradas que tornam duas requisições diferentes. Como uma variação altera a cache key, com o diagrama correspondente, está na [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao). +Quando a resposta de uma URL depende de um cookie, de um dispositivo ou do corpo de uma requisição, o cache precisa distinguir essas requisições. Em uma [Application](/pt-br/documentacao/plataforma/applications/), acrescentar essas entradas à cache key exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/), um recurso da plataforma que libera quatro capacidades para o cache e para as regras. Application Accelerator vem desativado em uma Application nova, e cada Application o ativa separadamente, no campo `modules.application_accelerator.enabled` da Application na API. Cada [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) da Application guarda por quanto tempo uma resposta fica em cache. Ele define então as entradas que tornam duas requisições diferentes, no seu próprio objeto `modules.application_accelerator`. Como uma variação altera a cache key, com o diagrama correspondente, está na [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao). -As seções cobrem o que o switch libera, o que uma variação custa, como os purges alcançam as variações e como _Bypass Cache_ difere de um TTL de 0. +As seções cobrem o que ativar Application Accelerator libera, o que uma variação custa e como os purges alcançam as variações. A última seção compara _Bypass Cache_ com um tempo de vida (TTL) de 0. --- @@ -19,50 +19,50 @@ As seções cobrem o que o switch libera, o que uma variação custa, como os pu Ativar Application Accelerator libera quatro capacidades que parecem não ter relação entre si até você ver o que elas têm em comum: -- Variação de cache além da URL, por query string, por cookie, por device group e por método de requisição. A funcionalidade se chama [Advanced Cache Key](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#application-accelerator). -- Cache de respostas `POST` e `OPTIONS`, além das respostas `GET` e `HEAD` que uma aplicação armazena em cache nativamente. -- Um **Max Age** que pode chegar a 0 segundos, menor que o piso de 60 segundos que vale sem ele. -- Mais sete behaviors do Rules Engine e as variáveis `${request_uri}` e `${device_group}` nos critérios das regras. Os behaviors são _Add Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_, _Forward Cookies_, _Rewrite Request_ e _Run Function_. +- Variação de cache por query string, por cookie, por device group e por método de requisição, por meio da [Advanced Cache Key](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#application-accelerator), uma feature de Application Accelerator. +- Cache de respostas `POST` e `OPTIONS`, além das respostas `GET` e `HEAD` que uma Application armazena em cache sem ele. +- Um Max Age que pode chegar a 0 segundos, no campo `modules.cache.max_age` de um cache setting, menor que o piso de 60 segundos que vale sem ele. +- Mais behaviors do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) e as variáveis `${request_uri}` e `${device_group}` nos critérios das regras. Os behaviors são _Add Request Cookie_ e _Add Response Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_ e _Filter Response Cookie_, _Forward Cookies_ e _Rewrite Request_. -O que as quatro têm em comum é o conteúdo dinâmico. A variação de cache dá à cache key a entrada extra de que ela precisa para distinguir duas respostas corretas. O cache de `POST` e `OPTIONS` traz os métodos que carregam essa entrada no corpo da requisição. Um TTL menor que um minuto serve ao conteúdo que deixa de ser correto antes de um minuto passar. Vários dos behaviors liberados agem justamente sobre os cookies e os paths que carregam a diferença. +O que as quatro têm em comum é o conteúdo dinâmico. A variação de cache dá à cache key a entrada extra de que ela precisa para distinguir duas respostas corretas. O cache de respostas `POST` e `OPTIONS` estende o cache além de `GET` e `HEAD`, e um `POST` carrega essa entrada no corpo da requisição. Um TTL menor que um minuto serve ao conteúdo que deixa de ser correto antes de um minuto passar. Vários dos behaviors liberados agem justamente sobre os cookies e os paths que carregam a diferença. -O switch entrega as quatro capacidades ou nenhuma. Uma aplicação não recebe a variação de cache sem receber também os métodos e os behaviors extras. Um cache setting que define uma variação em uma aplicação com o switch desativado é recusado com `21013`. +Application Accelerator entrega as quatro capacidades ou nenhuma. Uma Application recebe a variação de cache só junto com as outras três capacidades. A API recusa um cache setting que define uma variação em uma Application com Application Accelerator desativado. Para o erro que a API retorna, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros). -Ativar o switch também não altera nenhum tráfego por si só. Os controles de query string, de cookie e de dispositivo de um cache setting começam em `ignore`, e a lista de métodos começa vazia. Um cache setting só alcança uma requisição quando um behavior [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) o aplica. +Ativar Application Accelerator mantém o tráfego como estava: os controles de query string, de cookie e de dispositivo de um cache setting começam em `ignore`, e a lista de métodos começa vazia. Um cache setting só alcança uma requisição quando um behavior [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) aplica esse cache setting. -Ativar um Produto pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). +Ativar Application Accelerator pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). --- ## O custo de uma variação -A variação de cache tem um custo, e ele decorre de como a key é montada: cada valor distinto de um atributo que varia produz um objeto em cache separado. Isso torna a escolha do atributo pelo qual variar mais consequente do que a decisão de variar. Um cookie cujo valor é único para cada visitante dá a cada visitante uma cópia do objeto. O cache ainda funciona, mas deixa de servir uma resposta armazenada para muitas requisições, e o número de objetos cresce com a audiência, e não com o conteúdo. +A variação de cache custa primeiro em armazenamento. O custo decorre de como a key é montada: cada valor distinto de um atributo que varia produz um objeto em cache separado. Isso torna a escolha do atributo pelo qual variar mais consequente do que a decisão de variar. Um cookie cujo valor é único para cada visitante dá a cada visitante uma cópia do objeto. O cache ainda funciona, mas cada resposta armazenada passa a servir um único visitante. O número de objetos cresce com a audiência, e não com o conteúdo. -Uma allowlist é o controle desse custo. O behavior `allowlist` nomeia os argumentos de query string ou os cookies que alteram a resposta, então um atributo que ninguém nomeou não pode criar outro objeto. O behavior `all` varia por todo atributo que chega, inclusive os que a aplicação ignora. Por exemplo, um link que chega com um argumento de campanha ganha o próprio objeto em cache sob `all`. Sob uma allowlist que não nomeia esse argumento, o mesmo link aponta para o objeto compartilhado. +Uma allowlist é o controle desse custo. O behavior `allowlist` nomeia os argumentos de query string ou os cookies que alteram a resposta, então só um atributo que ele nomeia pode criar outro objeto. O behavior `all` varia por todo argumento de query string ou cookie que a requisição carrega. Por exemplo, um link que chega com um argumento de campanha ganha o próprio objeto em cache sob `all`. Sob uma allowlist que não nomeia esse argumento, o mesmo link aponta para o objeto compartilhado. -A ordenação aplica a mesma economia à ordem dos argumentos. Os argumentos escolhidos entram na key na ordem em que a requisição os enviou, então `?a=1&b=2` e `?b=2&a=1` são dois objetos que guardam uma única resposta. Com **Sort** ativo, essas variações se agrupam sob uma única key, em ordem alfabética. Por exemplo, uma listagem de produtos que muda com os argumentos `category` e `page` nomeia os dois em uma allowlist. Com **Sort** ativo, toda ordem dos dois argumentos chega a um único objeto. O custo da ordenação é que a key deixa de corresponder à URL como o cliente a escreveu, o que importa na hora do purge. Para os passos no Console que definem esses controles, consulte [Configure a Advanced Cache Key para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/advanced-cache-key/). +A ordenação aplica a mesma economia à ordem dos argumentos. Os argumentos escolhidos entram na key na ordem em que a requisição os enviou, então `?a=1&b=2` e `?b=2&a=1` são dois objetos que guardam uma única resposta. Com `sort_enabled` ativo, essas variações se agrupam sob uma única key, em ordem alfabética. Por exemplo, uma listagem de produtos que muda com os argumentos `category` e `page` nomeia os dois em uma allowlist. Com `sort_enabled` ativo, toda ordem dos dois argumentos chega a um único objeto. O custo da ordenação é que a key passa a diferir da URL como o cliente a escreveu, o que importa na hora do purge. Para os passos no Console que definem esses controles, consulte [Configure a Advanced Cache Key para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/advanced-cache-key/). --- ## Variação de cache e purges -Um purge remove um objeto do cache e encontra esse objeto pela sua cache key. Um purge por URL converte a URL que recebe em uma cache key sem considerar a variação de conteúdo. Toda variação que a URL não carrega, portanto, sobrevive a ele. As variações por cookie e as variações por device group não expiram com um purge por URL, e as cópias delas permanecem no cache. +Um purge é uma requisição que remove um objeto do cache e encontra esse objeto pela sua cache key. Um purge por URL converte a URL que recebe em uma cache key sem considerar a variação de conteúdo. Então toda variação que a URL não carrega sobrevive a ele, como uma variação por cookie ou por device group, e as cópias dela permanecem no cache. -Dois tipos de purge alcançam essas cópias. Um purge por cache key nomeia cada variação, e um purge por wildcard termina a key com `@@*`. As variações por query string são a exceção, porque a query string faz parte da URL. Um purge por URL alcança essas variações quando os argumentos são enviados na ordem em que foram apresentados, ou em ordem alfabética quando **Sort** está ativo. +Dois tipos de purge alcançam essas cópias. Um purge por cache key nomeia cada variação, e um purge por wildcard termina a key com `@@*`. As variações por query string são a exceção, porque a query string faz parte da URL. Um purge por URL alcança essas variações quando os argumentos são enviados na ordem em que foram apresentados, ou em ordem alfabética quando `sort_enabled` está ativo. -As variações que você configura são também os objetos que um purge precisa alcançar. Uma variação com muitos valores distintos custa, portanto, tanto na hora do purge quanto em armazenamento. Para os tipos de purge e os passos para executar cada um, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). +As variações que você configura são também os objetos que um purge precisa alcançar. Então uma variação com muitos valores distintos custa tanto na hora do purge quanto em armazenamento. Para os tipos de purge e os passos para executar cada um, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). --- ## Bypass Cache e um TTL de 0 -Sem Application Accelerator, o **Max Age** mais curto que uma aplicação aceita é de 60 segundos, e a API recusa um valor menor com `21021`. Application Accelerator remove esse piso e permite 0 segundos, ou 3 segundos quando o cache setting também tem Tiered Cache ativo. Um TTL de 0 não é o mesmo que não armazenar em cache, e a diferença entre os dois é a razão de ambos existirem. Os dois precisam de Application Accelerator, porque _Bypass Cache_ é um dos behaviors que ele libera. +Sem Application Accelerator, o Max Age mais curto que um cache setting aceita, no seu campo `modules.cache.max_age`, é de 60 segundos, e a API recusa um valor menor. Para o erro, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros). Application Accelerator remove esse piso e permite 0 segundos, ou 3 segundos quando o cache setting também tem [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) ativo. Um TTL de 0 difere de não armazenar em cache, e essa diferença é a razão de ambos existirem. Os dois precisam de Application Accelerator, porque _Bypass Cache_ é um dos behaviors que ele libera. -O behavior [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) envia à origem cada requisição HTTP e HTTPS que corresponde à sua regra, e a Azion não armazena nada no próprio cache. Ele mantém as otimizações de protocolo e, quando possível, uma conexão keep-alive com a origem. Ele não altera o browser cache, que um behavior _Set Cache Policy_ define. Ele também não alcança a camada do Tiered Cache: uma aplicação com cache settings de Tiered Cache ativos continua a armazenar objetos em cache nessa camada pelo TTL mínimo. Use-o quando cada requisição precisa receber conteúdo diferente. +O behavior [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) envia à origem cada requisição HTTP e HTTPS que corresponde à sua regra, e a resposta contorna o próprio cache da Azion. Ele deixa o browser cache como um behavior _Set Cache Policy_ o define. O efeito dele também para no próprio cache da Azion: uma Application com cache settings de Tiered Cache ativos continua a armazenar objetos em cache na camada do Tiered Cache pelo Max Age do cache setting. Use-o quando cada requisição precisa receber conteúdo diferente. -Um **Max Age** de 0 segundos mantém a requisição no caminho do cache. Requisições paralelas pelo mesmo objeto chegam à origem como uma única requisição, e a Azion valida o objeto com uma requisição `If-Modified-Since`. Um objeto que não mudou não é transferido de novo, e a resposta pode ser um `304 Not Modified`. Um **Max Age** de 0 ainda cria um objeto em cache, que vive por 999 milissegundos. Use-o quando o conteúdo dinâmico pode ser entregue de forma idêntica a todos que o requisitam no mesmo momento. +Um Max Age de 0 segundos mantém a requisição no caminho do cache: a resposta carrega uma cache key e informa `MISS`, e toda requisição ainda chega à origem. -A troca é entre a atualidade de cada requisição e a carga na origem. _Bypass Cache_ dá a cada requisição a sua própria resposta, e abre mão tanto da requisição única à origem para requisições paralelas quanto da revalidação que evita a transferência de um objeto inalterado. Um TTL de 0 mantém as duas coisas, e abre mão da capacidade de responder de forma diferente a duas requisições simultâneas. +Os dois enviam toda requisição à origem. A diferença é o caminho do cache: um TTL de 0 mantém a requisição nele, e _Bypass Cache_ mantém a resposta fora do cache da Azion. --- @@ -72,7 +72,7 @@ A troca é entre a atualidade de cada requisição e a carga na origem. _Bypass Os controles por trás da variação de cache, das respostas POST e OPTIONS em cache e de um TTL menor que o piso. Os passos no Console que definem os controles de variação de um cache setting, incluindo Sort. - Os passos que ativam o cache para os dois métodos que Application Accelerator acrescenta. - O switch ativado e um primeiro cache setting que varia. + Os passos que ativam o cache para respostas de POST e OPTIONS. + Application Accelerator ativado e um primeiro cache setting que varia. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/configuracoes.mdx b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/configuracoes.mdx index f922b9f247..3ff59295a4 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/configuracoes.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/configuracoes.mdx @@ -11,58 +11,66 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -[Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) é um módulo de [Applications](/pt-br/documentacao/plataforma/applications/), ativado para uma aplicação por vez. O módulo libera os campos de cache que variam a cache key, o cache de respostas `POST` e `OPTIONS` e sete behaviors do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/). Esta página traz o nome, o tipo e o padrão de cada campo, e a interface que o define. +[Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) é um recurso da plataforma que libera quatro capacidades para o cache e para as regras de uma [Application](/pt-br/documentacao/plataforma/applications/). As capacidades são a variação de cache, o cache de respostas `POST` e `OPTIONS`, um Max Age abaixo de 60 segundos e os behaviors e as variáveis do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) que esta página lista. Cada Application ativa Application Accelerator separadamente. Esta página traz o nome, o tipo e o padrão de cada campo, e a interface que o define. --- -## Ativação do módulo +## Switch do Application Accelerator -O módulo vem desativado por padrão, e todas as interfaces abaixo acionam o mesmo controle. O controle pertence à aplicação, não a um cache setting, portanto uma aplicação pode tê-lo ativado enquanto outra não. +Application Accelerator vem desativado em uma Application nova, e a configuração pertence à Application, não a um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). Então uma Application pode ter Application Accelerator ativo enquanto outra o tem desativado. Cada interface ativa a mesma configuração, que a API v4 guarda em `modules.application_accelerator.enabled`: | Interface | Onde você define | Campo ou flag | | --- | --- | --- | -| Azion Console | A seção **Modules** da aba **Main Settings** de uma aplicação | O switch **Application Accelerator** | +| Azion Console | A seção **Modules** da aba **Main Settings** de uma Application | O switch **Application Accelerator** | | Azion API v4 | `PATCH /workspace/applications/{id}` | `modules.application_accelerator.enabled` | | [Azion CLI](/pt-br/documentacao/devtools/cli/) | `azion update application` | `--application-accelerator` | | [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) | O objeto `AzionApplication` | `applicationAcceleratorEnabled` | -| [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) | Os dados enviados na atualização de uma aplicação, porque API v3 recusa o campo na criação | `application_acceleration` | +| [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) | Os dados da atualização de uma Application, porque API v3 recusa o campo na criação | `application_acceleration` | -`modules.application_accelerator.enabled` é um booleano e assume `false` por padrão. `applicationAcceleratorEnabled` e `application_acceleration` são booleanos, e a flag do Azion CLI recebe uma string. +`modules.application_accelerator.enabled` é um booleano e assume `false` por padrão. `applicationAcceleratorEnabled` e `application_acceleration` são booleanos, e a flag da Azion CLI recebe uma string. -O [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/) gerencia o recurso de aplicação que carrega o módulo. Ativar um módulo pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). +O [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/) gerencia o recurso da Application que carrega o switch. Ativar Application Accelerator pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). --- ## Cache variation -Application Accelerator adiciona o objeto `modules.application_accelerator` a um cache setting, e os campos dele configuram **Advanced Cache Key**. Eles decidem quais partes de uma requisição, além da URL, produzem um objeto separado em cache. Em Azion Console, os mesmos campos ficam na seção **Application Accelerator** de um cache setting. Uma variação acrescenta o separador `@@` à cache key. Para o formato de uma cache key, consulte [Formato da cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key). +Todo cache setting carrega o seu próprio objeto `modules.application_accelerator`, que tem o mesmo nome do objeto da Application. O objeto da Application guarda só `enabled`, e o objeto do cache setting guarda as variações. Com Application Accelerator ativo na Application, os campos do objeto do cache setting podem sair do padrão. + +Esses campos configuram a Advanced Cache Key, uma feature de Application Accelerator. Eles decidem quais partes de uma requisição, além do scheme, do host e do path, produzem um objeto separado em cache. Uma variação por cookie, por device group ou de `POST` em cache acrescenta o separador `@@` à cache key, assim como uma variação por query string sob `allowlist` ou `denylist`, na forma `@@?` e os seus argumentos. Sob `all`, a query string inteira vem depois do path, antes de `@@`. Uma resposta `OPTIONS` em cache acrescenta só o prefixo `options`, sem `@@`. Para o formato de uma cache key, consulte [Formato da cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key). + +Cada campo corresponde a um controle da seção **Application Accelerator** de um cache setting, no Azion Console, que mostra essa seção só enquanto Application Accelerator está ativo na Application: | Campo | Tipo | Padrão | Controle no Console | O que define | | --- | --- | --- | --- | --- | | `cache_vary_by_method` | array de enum, no máximo 2 valores: `options`, `post` | `[]` | **Cache vary by Method**, um checkbox por método | Os métodos de requisição cujas respostas são armazenadas em cache. | | `cache_vary_by_querystring.behavior` | enum: `ignore`, `all`, `allowlist`, `denylist` | `ignore` | **Cache vary by Query String** > **Behavior** | O modo que decide como a query string varia a cache key. | -| `cache_vary_by_querystring.fields` | array de string | `[]` | A lista de campos em **Cache vary by Query String** | Os argumentos de query string aos quais o modo se aplica. | -| `cache_vary_by_querystring.sort_enabled` | boolean | `false` | **Cache vary by Query String** > **Sort** | Se as variações se agrupam sob uma única cache key, em ordem alfabética. | +| `cache_vary_by_querystring.fields` | array de string | `[]` | **Cache vary by Query String** > **Fields** | Os argumentos de query string aos quais o modo se aplica. | +| `cache_vary_by_querystring.sort_enabled` | booleano | `false` | **Cache vary by Query String** > **Sort** | Se as variações se agrupam sob uma única cache key, em ordem alfabética. | | `cache_vary_by_cookies.behavior` | enum: `ignore`, `all`, `allowlist`, `denylist` | `ignore` | **Cache vary by Cookies** > **Behavior** | O modo que decide como os cookies variam a cache key. | -| `cache_vary_by_cookies.cookie_names` | array de string | `[]` | A lista de cookies em **Cache vary by Cookies** | Os cookies aos quais o modo se aplica. | +| `cache_vary_by_cookies.cookie_names` | array de string | `[]` | **Cache vary by Cookies** > **Fields** | Os cookies aos quais o modo se aplica. | | `cache_vary_by_devices.behavior` | enum: `ignore`, `allowlist` | `ignore` | **Cache vary by Devices** > **Behavior** | O modo que decide como os device groups variam a cache key. | -| `cache_vary_by_devices.device_group` | array de integer | `[]` | A lista de device groups em **Cache vary by Devices** | Os device groups aos quais o modo se aplica. | +| `cache_vary_by_devices.device_group` | array de inteiros | `[]` | **Cache vary by Devices** > **Device Group** | Os [device groups](/pt-br/documentacao/plataforma/applications/device-groups/) aos quais o modo se aplica. | + +No Azion Console, os dropdowns **Behavior** de **Cache vary by Query String** e de **Cache vary by Cookies** mostram _Allowlist_, _Denylist_, _Ignore_ e _All_. O de **Cache vary by Devices** mostra _Allowlist_ e _Ignore_. -Cada dropdown **Behavior** exibe os valores do seu enum com a inicial maiúscula: _Allowlist_, _Denylist_, _Ignore_ e _All_. +`allowlist` e `denylist` na query string exigem pelo menos um argumento em `fields`, ou a API retorna o erro `21018`. Enquanto Application Accelerator está desativado na Application, a API recusa uma variação com o erro `21013`. Para todos os erros que um cache setting retorna, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros). -Um campo do mesmo cache setting fica fora desse objeto e ainda assim depende do módulo: +Um campo do mesmo cache setting fica fora desse objeto e ainda assim exige Application Accelerator: | Campo | Tipo | Padrão | Controle no Console | O que define | | --- | --- | --- | --- | --- | -| `modules.cache.max_age` | integer, de `0` a `31536000` segundos | `60` | **Cache** > **Max Age** | Por quanto tempo o cache mantém o objeto. Um valor abaixo de 60 exige o módulo. | +| `modules.cache.max_age` | inteiro, de `0` a `31536000` segundos | `60` | **Cache** > **Max Age** | Por quanto tempo o cache guarda o objeto. Abaixo de 60, exige Application Accelerator. | + +Sem Application Accelerator, um `max_age` abaixo de 60 retorna o erro `21021`. Com Application Accelerator e Tiered Cache ativos, um valor abaixo de 3 retorna o erro `21020`. Para os tetos que limitam um cache setting, consulte [Limites](/pt-br/documentacao/plataforma/applications/limites/#application-accelerator). --- -## Flags de cache setting no Azion CLI +## Flags de cache setting na Azion CLI -`azion create cache-setting` grava os mesmos campos pela linha de comando. Cada flag abaixo define um campo do cache setting. +`azion create cache-setting` grava a maior parte desses campos pela linha de comando. Cada flag define um campo do cache setting: | Flag | Campo que define | Padrão | | --- | --- | --- | @@ -73,17 +81,17 @@ Para os tetos que limitam um cache setting, consulte [Limites](/pt-br/documentac | `--enable-caching-for-post` | `options` e `post` em `cache_vary_by_method`, com qualquer um dos dois valores | Nenhum | | `--enable-caching-for-options` | `options` em `cache_vary_by_method`, com qualquer um dos dois valores | `false` | -Na criação, `false` não desativa um método, então armazenar `POST` em cache sem `OPTIONS` exige `cache_vary_by_method` no corpo do `--file`. [`azion update cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/#atualizar) respeita `true` e `false`. Na atualização, uma chamada que passa uma flag de método remove o outro método, então passe as duas flags para manter os dois. +Na criação, qualquer um dos dois valores ativa um método, então armazenar `POST` em cache sem `OPTIONS` exige `cache_vary_by_method` no corpo do `--file`. [`azion update cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/#atualizar) respeita `true` e `false`. Na atualização, uma chamada que passa uma flag de método remove o outro método, então passe as duas flags para manter os dois. -Nenhuma flag de `azion create cache-setting` define a variação por device group ou o **Max Age** do cache, então envie esses valores em um corpo `--file`. `--browser-cache-max-age` define apenas o valor do navegador. +`azion create cache-setting` recebe `sort_enabled`, a variação por device group e o `max_age` do cache só em um corpo `--file`. Em `azion update cache-setting`, `--enable-caching-string-sort` define `sort_enabled`. `--browser-cache-max-age` define apenas o valor do navegador. --- ## HTTP methods -Uma aplicação aceita nativamente `GET` e `HEAD`. Application Accelerator adiciona mais cinco métodos, e as respostas de dois deles podem ser armazenadas em cache por meio de `cache_vary_by_method`. +Uma Application repassa `OPTIONS`, `POST`, `PUT`, `PATCH` e `DELETE` à origem com ou sem Application Accelerator, como faz com `GET` e `HEAD`. Desses cinco métodos, Application Accelerator permite armazenar em cache as respostas de dois, por meio de `cache_vary_by_method`. -| Método adicionado pelo módulo | A resposta pode ser armazenada em cache | +| Método | A resposta pode ser armazenada em cache | | --- | --- | | `OPTIONS` | Sim, quando `cache_vary_by_method` carrega `options` | | `POST` | Sim, quando `cache_vary_by_method` carrega `post` | @@ -91,27 +99,30 @@ Uma aplicação aceita nativamente `GET` e `HEAD`. Application Accelerator adici | `PATCH` | Não | | `DELETE` | Não | -Um objeto `POST` ou `OPTIONS` em cache recebe a própria cache key. Para o formato dessa key, consulte [Métodos HTTP em cache](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#variacoes). +Um objeto `POST` ou `OPTIONS` em cache recebe a própria cache key. Para o formato dessa key, consulte [Variações da cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#variacoes). --- ## Behaviors do Rules Engine -Sete behaviors do Rules Engine exigem Application Accelerator na aplicação que executa a regra. A tabela indexa esses behaviors; [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/#behaviors) traz os argumentos e a sintaxe de cada um. +Estes behaviors do Rules Engine exigem Application Accelerator na Application que executa a regra. A tabela indexa esses behaviors; [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/#behaviors) traz os argumentos e a sintaxe de cada um. | Behavior | Fases | O que faz | | --- | --- | --- | -| [Add Cookie](/pt-br/documentacao/plataforma/applications/rules-engine/#add-cookie) | Request, Response | Adiciona um cookie ao header `Set-Cookie`. | -| [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) | Request | Impede que Azion armazene em cache a resposta da origem, e não altera o cache do navegador. | -| [Capture Match Groups](/pt-br/documentacao/plataforma/applications/rules-engine/#capture-match-groups) | Request, Response | Guarda em uma variável temporária o resultado da captura de uma expressão regular sobre um campo da requisição. | -| [Filter Cookie](/pt-br/documentacao/plataforma/applications/rules-engine/#filter-request-cookie) | Request, Response | Remove um cookie do header de requisição enviado à origem, ou do header de resposta enviado ao usuário. | +| [Add Request Cookie, Add Response Cookie](/pt-br/documentacao/plataforma/applications/rules-engine/#add-request-cookie-e-add-response-cookie) | Request, Response | Adiciona um cookie ao header `Set-Cookie`. | +| [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) | Request | Impede que o cache da Azion guarde a resposta da origem e não altera o cache do navegador. | +| [Capture Match Groups](/pt-br/documentacao/plataforma/applications/rules-engine/#capture-match-groups) | Request, Response | Guarda em uma variável temporária a captura de uma expressão regular sobre um campo da requisição. | +| [Filter Request Cookie, Filter Response Cookie](/pt-br/documentacao/plataforma/applications/rules-engine/#filter-request-cookie) | Request, Response | Remove um cookie da requisição à origem ou da resposta ao usuário. | | [Forward Cookies](/pt-br/documentacao/plataforma/applications/rules-engine/#forward-cookies) | Request | Encaminha o header `Set-Cookie` da origem aos usuários, inclusive em um cache hit. | | [Rewrite Request](/pt-br/documentacao/plataforma/applications/rules-engine/#rewrite-request) | Request | Altera o caminho do recurso requisitado à origem. | -| [Run Function](/pt-br/documentacao/plataforma/applications/rules-engine/#run-function) | Request, Response | Executa uma função instanciada na aplicação. Também exige [Functions](/pt-br/documentacao/plataforma/functions/). | -Os criteria de uma regra podem ler `${device_group}`, que também exige o módulo. Para a variável, consulte [Variáveis](/pt-br/documentacao/plataforma/applications/rules-engine/#variaveis), e para os grupos aos quais ela corresponde, consulte [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/). +_Bypass Cache_ age sobre o cache da Azion e não sobre a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). Uma Application cujos cache settings têm Tiered Cache ativo continua a armazenar objetos nessa camada pelo Max Age do cache setting. + +Os critérios de uma regra podem ler `${request_uri}` e `${device_group}`, e os dois exigem Application Accelerator. Uma regra que lê `${request_uri}` sem ele é recusada com `25047`. Para as variáveis, consulte [Variáveis](/pt-br/documentacao/plataforma/applications/rules-engine/#variaveis), e para os grupos aos quais `${device_group}` corresponde, consulte [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/). + +[Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) funciona sem Application Accelerator. Ele aplica um cache setting da Application, e é assim que um cache setting alcança uma requisição. -[Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) não exige o módulo. Ele atribui uma política de cache criada em [Cache Settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/), e é assim que um cache setting alcança uma requisição. +[Run Function](/pt-br/documentacao/plataforma/applications/rules-engine/#run-function) também funciona sem Application Accelerator. Ele executa uma Function Instance da Application e exige [Functions](/pt-br/documentacao/plataforma/functions/). --- @@ -120,7 +131,7 @@ Os criteria de uma regra podem ler `${device_group}`, que também exige o módul Como cada um desses campos altera a cache key, e quanto custa uma variação. - Ative o módulo e crie um cache setting que varia a cache key. + Ative Application Accelerator e crie um cache setting que varia a cache key. Os tetos que limitam os valores destas tabelas. Como purgar um objeto que varia por cookie, query string ou device group. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/primeiros-passos.mdx index 396525ee6f..e91f2eb371 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/primeiros-passos.mdx @@ -12,21 +12,22 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' Este guia conduz você pelo seu primeiro cache setting que varia a cache key. O exemplo é uma página de listagem cuja resposta muda com um argumento de query string. -- Ativar [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) em uma aplicação. -- Criar um cache setting que mantém a listagem por 30 segundos e varia pelo argumento `category`. +- Ativar [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) em uma Application. +- Criar um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) que mantém a listagem por 30 segundos e varia pelo argumento `category`. - Adicionar uma regra do Rules Engine que aplica o cache setting às requisições para `/products`. - Requisitar a listagem duas vezes, com dois valores de `category`, e ler a cache key de cada resposta. -Três objetos produzem esse resultado, e cada um depende do anterior: +Três partes da Application produzem esse resultado, e cada uma depende da anterior: -1. O switch **Application Accelerator** pertence à aplicação. Ele libera os campos que variam a cache key e remove o piso de 60 segundos do cache TTL. -2. O **cache setting** carrega o behavior de cache, o **Max Age** e a variação. Ele define o que o cache faz, não a quais requisições ele faz isso. -3. A regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) aplica o cache setting com o behavior **Set Cache Policy**. Os critérios dela decidem quais requisições o cache setting cobre. +1. Application Accelerator fica ativo ou desativado em cada Application separadamente. Ele libera os campos que variam a cache key e remove o piso de 60 segundos do cache TTL. +2. Um cache setting pertence à Application e guarda o behavior de cache, o Max Age e a variação. Ele define o que o cache faz, não a quais requisições ele faz isso. +3. A regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) aplica o cache setting com o behavior [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy). Os critérios dela decidem quais requisições o cache setting cobre. -Criar um cache setting não altera nenhum tráfego. Um cache setting que nenhuma regra aplica nunca alcança uma requisição. +Um cache setting só alcança uma requisição quando uma regra aplica esse cache setting, então criar um mantém o tráfego como estava. `azion.config.js` e Azion Lib carregam as mesmas configurações. Para o campo que cada interface define, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/). @@ -44,9 +45,10 @@ Criar um cache setting não altera nenhum tráfego. Um cache setting que nenhuma ### Console - Uma conta Azion. Para criar uma, consulte [Como criar uma conta na Azion](/pt-br/documentacao/fundamentos/criar-uma-conta/). -- A permissão **Edit Applications** na conta. Ela concede permissão para editar, criar e remover aplicações, e também requer a permissão **View Applications**. Consulte [Teams Permissions](/pt-br/documentacao/fundamentos/teams-permissions/). -- Uma aplicação que serve um path cuja resposta muda com um argumento de query string. Este guia usa o path `/products` e o argumento `category`. Para criar uma aplicação, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- A permissão **Edit Applications** na conta. Ela concede permissão para editar, criar e remover Applications, e também requer a permissão **View Applications**. Consulte [Permissões de equipes](/pt-br/documentacao/fundamentos/teams-permissions/). +- Uma Application que recebe as requisições de um Workload, com um path cuja resposta muda com um argumento de query string. Este guia usa o path `/products` e o argumento `category`. Para criar os dois, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). - Acesso ao Azion Console. Para entrar, consulte [Como acessar o Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). +- O `curl`, para requisitar a listagem. @@ -55,9 +57,10 @@ Criar um cache setting não altera nenhum tráfego. Um cache setting que nenhuma ### CLI - Uma conta Azion. Para criar uma, consulte [Como criar uma conta na Azion](/pt-br/documentacao/fundamentos/criar-uma-conta/). -- A permissão **Edit Applications** na conta. Ela concede permissão para editar, criar e remover aplicações, e também requer a permissão **View Applications**. Consulte [Teams Permissions](/pt-br/documentacao/fundamentos/teams-permissions/). -- Uma aplicação que serve um path cuja resposta muda com um argumento de query string. Este guia usa o path `/products` e o argumento `category`. Para criar uma aplicação, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- A permissão **Edit Applications** na conta. Ela concede permissão para editar, criar e remover Applications, e também requer a permissão **View Applications**. Consulte [Permissões de equipes](/pt-br/documentacao/fundamentos/teams-permissions/). +- Uma Application que recebe as requisições de um Workload, com um path cuja resposta muda com um argumento de query string. Este guia usa o path `/products` e o argumento `category`. Para criar os dois, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). - A [Azion CLI](/pt-br/documentacao/devtools/cli/) instalada e autorizada. +- O `curl`, para requisitar a listagem. @@ -66,8 +69,8 @@ Criar um cache setting não altera nenhum tráfego. Um cache setting que nenhuma ### API - Uma conta Azion. Para criar uma, consulte [Como criar uma conta na Azion](/pt-br/documentacao/fundamentos/criar-uma-conta/). -- A permissão **Edit Applications** na conta. Ela concede permissão para editar, criar e remover aplicações, e também requer a permissão **View Applications**. Consulte [Teams Permissions](/pt-br/documentacao/fundamentos/teams-permissions/). -- Uma aplicação que serve um path cuja resposta muda com um argumento de query string. Este guia usa o path `/products` e o argumento `category`. Para criar uma aplicação, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- A permissão **Edit Applications** na conta. Ela concede permissão para editar, criar e remover Applications, e também requer a permissão **View Applications**. Consulte [Permissões de equipes](/pt-br/documentacao/fundamentos/teams-permissions/). +- Uma Application que recebe as requisições de um Workload, com um path cuja resposta muda com um argumento de query string. Este guia usa o path `/products` e o argumento `category`. Para criar os dois, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). - Um [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e o `curl`. @@ -78,7 +81,7 @@ Criar um cache setting não altera nenhum tráfego. Um cache setting que nenhuma ## Ative Application Accelerator -O módulo vem desativado por padrão e pertence a uma aplicação por vez. +Application Accelerator vem desativado em uma Application nova, e cada Application o ativa separadamente. @@ -86,7 +89,7 @@ O módulo vem desativado por padrão e pertence a uma aplicação por vez. ### Console -Para ativar o módulo pelo Azion Console: +Para ativar Application Accelerator pelo Azion Console: @@ -94,9 +97,9 @@ Para ativar o módulo pelo Azion Console: Acesse [Azion Console](https://console.azion.com/) > **Applications**. - + - + Na seção **Modules**, ative **Application Accelerator**. @@ -104,7 +107,7 @@ Para ativar o módulo pelo Azion Console: -A aplicação agora aceita os campos de cache que o restante deste guia usa. +A Application agora aceita os campos de cache que o restante deste guia usa. @@ -112,19 +115,17 @@ A aplicação agora aceita os campos de cache que o restante deste guia usa. ### CLI -Para ativar o módulo com a Azion CLI, substitua `` pelo [ID da sua aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): +Encontre o ID da sua Application no endereço dela no Azion Console, `console.azion.com/applications/edit//main-settings`, ou na saída de `azion list application`. Para ativar Application Accelerator com a Azion CLI, substitua `` por esse ID: - ```bash - azion update application --application-id --application-accelerator true - ``` + --application-accelerator true`} /> - O comando confirma a aplicação que ele atualizou: + O comando confirma a Application que ele atualizou: ```text Updated Application with ID @@ -133,7 +134,7 @@ Para ativar o módulo com a Azion CLI, substitua `` pelo [ID da -A aplicação agora aceita os campos de cache que o restante deste guia usa. +A Application agora aceita os campos de cache que o restante deste guia usa. @@ -141,30 +142,28 @@ A aplicação agora aceita os campos de cache que o restante deste guia usa. ### API -Para ativar o módulo com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo [ID da sua aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): +Encontre o ID da sua Application no endereço dela no Azion Console, `console.azion.com/applications/edit//main-settings`. Para ativar Application Accelerator com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token e `` por esse ID: - ```bash - curl --request PATCH \ - --url https://api.azion.com/v4/workspace/applications/ \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "modules": { "application_accelerator": { "enabled": true } } - }' - ``` + }'`} /> - Um `202` carrega `"state": "pending"`, e a resposta repete todos os módulos da aplicação: + Um `202` carrega `"state": "pending"`, e a resposta repete cada chave de `modules`: ```json { @@ -175,26 +174,26 @@ Para ativar o módulo com a Azion API, substitua `[TOKEN VALUE]` pelo seu person } ``` - Os valores dos outros módulos são os que a aplicação já tinha. Só `application_accelerator` mudou. + As outras chaves de `modules` mantêm os valores que a Application já tinha. Só `application_accelerator` mudou. -A aplicação agora aceita os campos de cache que o restante deste guia usa. +A Application agora aceita os campos de cache que o restante deste guia usa. :::caution[Atenção] -Ativar um módulo pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). +Ativar Application Accelerator pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). ::: --- ## Crie um cache setting que varia por query string -Um cache setting é onde ficam o behavior de cache e a variação. O **Max Age** de `30` segundos abaixo é o ponto do exercício: sem Application Accelerator, o menor cache TTL que uma aplicação aceita é 60 segundos. +O cache setting guarda o behavior de cache e a variação. O Max Age de `30` segundos que esta etapa define é o ponto do exercício. Sem Application Accelerator, o menor cache TTL que uma Application aceita é 60 segundos. @@ -224,7 +223,7 @@ Para criar o cache setting pelo Azion Console: - Adicione `category` à lista de campos em **Behavior**. + Em **Fields**, digite `category`. @@ -243,15 +242,14 @@ O cache setting aparece na aba **Cache Settings**. Ele mantém um objeto por 30 ### CLI -Para criar o cache setting com a Azion CLI, envie o body a partir de um arquivo: as flags do comando não alcançam o **Max Age**. +`azion create cache-setting` recebe `max_age` só em um corpo `--file`. Para criar o cache setting com a Azion CLI, envie o corpo a partir de um arquivo: Salve o seguinte como `cache-setting.json`: - ```json - { + - ```bash - azion create cache-setting --application-id --file cache-setting.json - ``` + --file cache-setting.json`} /> O comando imprime o id do novo cache setting: @@ -286,9 +281,7 @@ Para criar o cache setting com a Azion CLI, envie o body a partir de um arquivo: - ```bash - azion describe cache-setting --application-id --cache-setting-id 123462 --format json - ``` + --cache-setting-id 123462 --format json`} /> Este trecho da saída carrega os campos que o arquivo definiu: @@ -314,7 +307,7 @@ Para criar o cache setting com a Azion CLI, envie o body a partir de um arquivo: -O cache setting mantém um objeto por 30 segundos e dá a cada valor de `category` o seu próprio objeto em cache. Guarde o id: a regra da próxima etapa seleciona o cache setting por ele. Para todas as flags que o comando aceita, consulte [Azion CLI create](/pt-br/documentacao/devtools/cli/recursos/). +O cache setting mantém um objeto por 30 segundos e dá a cada valor de `category` o seu próprio objeto em cache. Guarde o id: a regra da próxima etapa seleciona o cache setting por ele. Para todas as flags que o comando aceita, consulte [`azion create cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/#criar). @@ -322,17 +315,16 @@ O cache setting mantém um objeto por 30 segundos e dá a cada valor de `categor ### API -Para criar o cache setting com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo ID da sua aplicação: +Para criar o cache setting com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo ID da sua Application: - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//cache_settings \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + /cache_settings \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "name": "product-listing", "browser_cache": { "behavior": "honor" }, @@ -349,8 +341,7 @@ Para criar o cache setting com a Azion API, substitua `[TOKEN VALUE]` pelo seu p } } } - }' - ``` + }'`} /> @@ -395,7 +386,7 @@ O cache setting mantém um objeto por 30 segundos e dá a cada valor de `categor ## Aplique o cache setting com uma regra -Um cache setting alcança uma requisição apenas quando uma regra o aplica. +Um cache setting alcança uma requisição apenas quando uma regra aplica esse cache setting. @@ -435,7 +426,7 @@ Para aplicar o cache setting ao path da listagem pelo Azion Console: - Na seção **Behaviors**, selecione **Set Cache Policy**. + Na seção **Behaviors**, selecione _Set Cache Policy_. @@ -450,22 +441,21 @@ A regra aplica o cache setting a toda requisição cuja URI começa com `/produc ### CLI -Para adicionar a regra com a Azion CLI, envie o body a partir de um arquivo: os critérios carregam `${uri}`, que um shell expande. +Para adicionar a regra com a Azion CLI, envie o corpo a partir de um arquivo, para que o shell mantenha `${uri}` como está escrito. Salve o seguinte como `rule.json`, com o id do seu cache setting em `attributes.value`: - ```json - { + - ```bash - azion create rules-engine --application-id --phase request --file rule.json - ``` + --phase request --file rule.json`} /> O comando imprime o id da nova regra: @@ -504,22 +491,21 @@ A regra aplica o cache setting a toda requisição cuja URI começa com `/produc ### API -Para adicionar a regra com a Azion API, envie o body a partir de um arquivo: os critérios carregam `${uri}`, que um shell expande. +Para adicionar a regra com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo ID da sua Application. Envie o corpo a partir de um arquivo, para que o shell mantenha `${uri}` como está escrito. Salve o seguinte como `rule.json`, com o `id` que a criação do cache setting retornou em `attributes.value`: - ```json - { + - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json - ``` + /request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> - Um `202` carrega `"state": "pending"` e a regra, com o seu `id`, o seu `name`, se ela está `active`, os behaviors que ela carrega e o `order` que ela ocupa entre as regras da aplicação. + Um `202` carrega `"state": "pending"` e a regra. A regra carrega o seu `id`, o seu `name`, se ela está `active` e os behaviors que ela tem. Ela também carrega o `order` que ocupa entre as regras da Application. @@ -560,7 +543,7 @@ A regra aplica o cache setting a toda requisição cuja URI começa com `/produc -Uma nova regra leva alguns minutos para propagar. Aguarde antes de requisitar o path. +Uma nova regra pode levar alguns minutos para propagar. Aguarde antes de requisitar o path. --- @@ -568,38 +551,34 @@ Uma nova regra leva alguns minutos para propagar. Aguarde antes de requisitar o A Azion retorna a cache key de um objeto quando a requisição carrega o header de debug da Azion `Pragma: azion-debug-cache`. Ler essa key para dois valores de `category` mostra a variação que o cache setting criou. -Sua aplicação responde em um domínio no formato `xxxxxxxxx.map.azionedge.net`. Para definir o domínio da sua aplicação, consulte [Adicione um domínio a um workload](/pt-br/documentacao/guias/plataforma/migracao/configurar-dominio/). +A sua Application recebe as requisições de um Workload, e esse Workload responde no workload domain dele, no formato `xxxxxxxxx.map.azionedge.net`. Para adicionar um domínio a esse Workload, consulte [Adicione um domínio a um workload](/pt-br/documentacao/guias/plataforma/migracao/configurar-dominio/). -Substitua `` por esse domínio e requisite a listagem com um valor: +Substitua `` pelo domínio desse Workload e requisite a listagem com um valor: -```bash -curl -I -H "Pragma: azion-debug-cache" "https:///products?category=shoes" -``` +/products?category=shoes"`} /> -A resposta carrega dois headers de debug da Azion. Este trecho é de uma aplicação servida em `www.example.com`, e HTTP/2 envia os nomes dos headers em minúsculas: +A resposta carrega dois headers de debug da Azion. Este trecho é de uma Application servida em `www.example.com`, e HTTP/2 envia os nomes dos headers em minúsculas: ```text x-cache: MISS from 203.0.113.10 with HTTP/2.0 -x-cache-key: httpswww.example.com/products?category=shoes +x-cache-key: httpswww.example.com/products@@?category=shoes ``` -`x-cache` carrega o status de cache, o endereço do data center que respondeu e o protocolo da requisição. `x-cache-key` carrega a cache key, que concatena o scheme, o host, o path e os argumentos de query string que a allowlist nomeou. +`x-cache` carrega o status de cache, o endereço IP do servidor que respondeu e o protocolo da requisição. `x-cache-key` carrega a cache key, que concatena o scheme, o host, o path, `@@` e os argumentos de query string que a allowlist nomeou. Requisite o mesmo path com um valor diferente: -```bash -curl -I -H "Pragma: azion-debug-cache" "https:///products?category=hats" -``` +/products?category=hats"`} /> O argumento mudou, então a key mudou junto: ```text -x-cache-key: httpswww.example.com/products?category=hats +x-cache-key: httpswww.example.com/products@@?category=hats ``` Duas keys são dois objetos em cache, que é o que a allowlist pediu. Para o formato completo de uma cache key, consulte [Formato da cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key). -Sua aplicação agora mantém a listagem `/products` em cache por 30 segundos e guarda um objeto por valor de `category`. +Sua Application agora mantém a listagem `/products` em cache por 30 segundos e guarda um objeto por valor de `category`. --- @@ -610,6 +589,6 @@ Sua aplicação agora mantém a listagem `/products` em cache por 30 segundos e - - + + diff --git a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/visao-geral.mdx b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/visao-geral.mdx index ca44632cc7..8ab13ae316 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/visao-geral.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/application-accelerator/visao-geral.mdx @@ -10,18 +10,67 @@ import DocButton from '~/components/webkit/DocButton.vue' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -Um cache guarda cada resposta armazenada sob uma key montada a partir da requisição. Quando essa key contém apenas a URL, toda requisição para a URL recebe a mesma cópia. Essa cópia está errada para um conteúdo que muda com um cookie, um dispositivo ou um argumento. Acrescentar essa entrada à key dá a cada um dos seus valores uma cópia própria. Uma URL passa então a guardar várias respostas corretas, e nenhum visitante recebe a resposta destinada a outro. +**Application Accelerator** é um recurso da plataforma que libera quatro capacidades para o cache e para as regras de uma [Application](/pt-br/documentacao/plataforma/applications/). Com Application Accelerator ativo, uma Application pode acrescentar mais partes da requisição à cache key, armazenar em cache respostas `POST` e `OPTIONS` e manter uma resposta em cache por menos de 60 segundos. As regras da Application também podem usar mais behaviors do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/), como _Bypass Cache_ e _Forward Cookies_, e mais duas variáveis. -**Application Accelerator** coloca essas entradas na cache key de uma [aplicação](/pt-br/documentacao/plataforma/applications/): um argumento de query string, um cookie, o device group ou o método da requisição. O switch dele em **Main Settings** › **Modules** o ativa somente para aquela aplicação. Um cache setting então nomeia as entradas que variam as suas cópias, e uma regra com _Set Cache Policy_ aplica esse setting às requisições que correspondem a ela. Use Application Accelerator para armazenar em cache uma página personalizada, uma resposta de API que muda com a query string, um catálogo por dispositivo ou uma resposta a um `POST`. +Um cache guarda cada resposta armazenada sob uma key montada a partir da requisição. Quando essa key contém apenas a URL, todo visitante que requisita a URL recebe a mesma cópia, mesmo quando o conteúdo muda com um cookie, um dispositivo ou um argumento. Acrescentar uma dessas entradas à key dá a cada um dos seus valores uma cópia própria. Uma URL passa então a guardar várias respostas corretas, e cada visitante recebe a que corresponde à sua requisição. + +Em uma Application com Application Accelerator ativo, a key pode receber quatro entradas: um argumento de query string, um cookie, o device group e o método da requisição. Um [device group](/pt-br/documentacao/plataforma/applications/device-groups/) é um nome e uma expressão regular que a Application compara com o header `User-Agent` de cada requisição. + +Application Accelerator vem desativado em uma Application nova, e cada Application o ativa separadamente, no campo `modules.application_accelerator.enabled` da Application na API. Cada [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) da Application guarda por quanto tempo uma resposta fica em cache. Ele também define quais entradas variam a key, no seu próprio objeto `modules.application_accelerator`. Depois, uma [regra](/pt-br/documentacao/plataforma/applications/rules-engine/) com o behavior [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) aplica o cache setting às requisições que correspondem à regra. Use Application Accelerator para armazenar em cache cópias separadas de uma página personalizada por um cookie, de uma resposta de API que muda com a sua query string, de um catálogo que difere por dispositivo ou de uma resposta a um `POST`. --- +## Caminho da requisição + +Uma cache key é a entrada de índice de um objeto em cache. Por padrão, a Azion a monta a partir do scheme, do host e do path da requisição, então cada path é um objeto em cache. A menos que um cache setting varie a key por query string, toda query string de um path aponta para esse único objeto. Cada variação que um cache setting ativa acrescenta uma entrada à key, e cada tipo acrescenta o seu próprio marcador: + +- Uma variação por cookie acrescenta o separador `@@`, depois os nomes e os valores dos cookies, cada um seguido de `;`. +- Uma variação por dispositivo acrescenta `@@` e o nome do device group. +- Uma resposta `POST` em cache acrescenta `@@` e o hash MD5 do corpo da requisição. Uma resposta `OPTIONS` em cache acrescenta só o prefixo do método. +- Uma variação por query string sob `allowlist` ou `denylist`, os valores de `behavior` que nomeiam os argumentos a manter ou a deixar de fora, acrescenta `@@`, depois `?` e os argumentos escolhidos. Sob `all`, que varia a key por todo argumento, a query string inteira vem depois do path, antes de `@@`. + +Uma requisição que usa qualquer método diferente de `GET` ou `HEAD` é uma requisição complexa, e a key dela carrega o método como prefixo. + +As setas sólidas levam a requisição, e as setas pontilhadas levam a resposta. Cada rótulo começa com o número do seu passo abaixo. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Cliente"]) + App["Application"] + Setting["cache setting: Application Accelerator"] + Cache["Cache"] + Conn["Connector"] + Origin[["servidor de origem"]] + Client -->|"1. requisição"| App + App -->|"2. Set Cache Policy"| Setting + Setting -->|"3. cache key"| Cache + Cache -.->|"4. cópia válida"| App + App -->|"5. sem cópia válida"| Conn + Conn -->|"5. requisição"| Origin + Origin -.->|"5. resposta"| Conn + Conn -.->|"5. resposta"| App + App -.->|"4, 5. resposta"| Client +``` + +1. A requisição chega à Application com o seu scheme, host, path e query string. +2. Uma regra com _Set Cache Policy_ aplica um cache setting à requisição. +3. A key começa com o scheme, o host e o path. Cada variação do objeto `modules.application_accelerator` do cache setting acrescenta então a sua entrada, com o marcador que esta seção lista para ela. +4. Quando [Cache](/pt-br/documentacao/plataforma/applications/cache/) tem uma cópia válida sob essa key, essa cópia se torna a resposta. +5. Caso contrário, o [Connector](/pt-br/documentacao/plataforma/connectors/) encaminha a requisição ao servidor de origem, e Cache guarda a resposta sob essa key. + +Uma variação por cookie sobre um cookie `user` produz uma key no formato `httpwww.example.com/@@user=user;`. Um `POST` em cache produz uma no formato `posthttpsdynamic.example.com/path@@md5_of_post_body`. Duas requisições compartilham um objeto em cache quando produzem a mesma key, e recebem objetos separados quando não produzem. Para o formato completo e cada entrada que uma key carrega, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key). + +Para saber o que ativar Application Accelerator libera, o custo de uma variação e como funcionam os purges, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/). Essa página também compara _Bypass Cache_ com um tempo de vida (TTL) de 0. + +--- + ## Estrutura do cache setting -Application Accelerator age por meio do objeto `modules.application_accelerator` de um cache setting, que [Azion Console](https://console.azion.com) mostra como a seção **Application Accelerator** do setting. Este cache setting mantém uma listagem de produtos por 30 segundos e dá a cada valor do argumento `category` uma cópia própria, enviado como corpo de `POST /v4/workspace/applications//cache_settings`: +Um cache setting guarda as entradas que variam a cache key no seu objeto `modules.application_accelerator`, que [Azion Console](https://console.azion.com) mostra como a seção **Application Accelerator** do setting só enquanto Application Accelerator está ativo na Application. Este cache setting mantém uma listagem de produtos por 30 segundos e dá a cada valor do argumento `category` uma cópia própria. Envie-o como corpo de `POST /v4/workspace/applications//cache_settings`: ```json { @@ -43,58 +92,27 @@ Application Accelerator age por meio do objeto `modules.application_accelerator` } ``` -- `modules.application_accelerator` guarda os quatro controles **Cache vary by**: `cache_vary_by_querystring`, `cache_vary_by_cookies`, `cache_vary_by_devices` e `cache_vary_by_method`. Um controle que o corpo deixa de fora mantém o seu padrão, `ignore`, ou uma lista vazia para os métodos. +- `modules.application_accelerator` guarda os quatro controles de variação: `cache_vary_by_querystring`, `cache_vary_by_cookies`, `cache_vary_by_devices` e `cache_vary_by_method`. Um controle que o corpo deixa de fora mantém o seu padrão, `ignore`, ou uma lista vazia para os métodos. - `behavior` aceita `ignore`, `all`, `allowlist` ou `denylist`, e o controle de dispositivos aceita `ignore` ou `allowlist`. Aqui, `allowlist` varia a key apenas pelos argumentos em `fields`, e `sort_enabled` agrupa todas as ordens deles sob uma key. - `max_age` definido como `30` só é aceito enquanto Application Accelerator está ativo. Sem ele, o piso é de 60 segundos, e [Azion API](https://api.azion.com/) recusa um valor menor com `21021`. -- O switch pertence à aplicação, não ao cache setting. `PATCH /v4/workspace/applications/` o ativa com `{ "modules": { "application_accelerator": { "enabled": true } } }`, e, enquanto ele está desativado, a API recusa qualquer campo de `modules.application_accelerator` com `21013`. - -Se você configurou um header `Vary` ou uma regra de cache key em outro lugar, o modelo se mantém. Você nomeia as entradas que tornam duas requisições diferentes, e cada valor distinto recebe a sua própria cópia. - ---- - -## Caminho da requisição - -Uma cache key é a entrada de índice de um objeto em cache. Por padrão, a Azion a monta a partir do scheme, do host e do path da requisição, então cada path é um objeto em cache. Enquanto o controle de query string fica no seu padrão, `ignore`, uma query string não divide esse objeto. Cada variação que um cache setting ativa acrescenta uma entrada à key, e cada tipo acrescenta o seu próprio marcador: - -- Uma variação por cookie acrescenta o separador `@@`, depois os nomes e os valores dos cookies, cada um seguido de `;`. -- Uma variação por dispositivo acrescenta `@@` e o nome do device group. -- Uma resposta `POST` ou `OPTIONS` em cache acrescenta `@@` e o hash MD5 do corpo da requisição. -- Uma variação por query string acrescenta o separador de consulta e os argumentos escolhidos, na ordem em que a requisição os enviou. Os argumentos já fazem parte da URL, então essa variação não precisa de `@@`. - -Uma requisição que usa qualquer método diferente de `GET` ou `HEAD` é uma requisição complexa, e a key dela carrega o método como prefixo. Este diagrama mostra a partir do que a key padrão é montada e o que cada variação acrescenta a ela: - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Request["Requisição: scheme, host, path, query string"] --> Base["Cache key padrão: um objeto por path"] - Base --> Cookie["Variação por cookie: @@ e depois os nomes e os valores dos cookies"] - Base --> Device["Variação por dispositivo: @@ e depois o nome do device group"] - Base --> Method["POST ou OPTIONS em cache: @@ e depois o hash MD5 do corpo da requisição"] - Base --> Query["Variação por query string: o separador de consulta e depois os argumentos escolhidos"] - Cookie --> Object["Um objeto em cache separado por valor distinto"] - Device --> Object - Method --> Object - Query --> Object -``` - -Uma variação por cookie sobre um cookie `user` produz uma key no formato `httpwww.example.com/@@user=user;`. Um `POST` em cache produz uma no formato `httpsdynamic.example.com/path@@md5_of_post_arguments`. Duas requisições compartilham um objeto em cache quando produzem a mesma key, e recebem objetos separados quando não produzem. Para o formato completo e cada entrada que uma key carrega, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key). +- A Application carrega um objeto `modules.application_accelerator` próprio, e o campo `enabled` dele ativa Application Accelerator. `PATCH /v4/workspace/applications/` o define com `{ "modules": { "application_accelerator": { "enabled": true } } }`. Enquanto esse campo é `false`, a API recusa com `21013` um cache setting que varia o cache: uma variação por query string, por cookie ou por device group cujo `behavior` não é `ignore`, ou um método em `cache_vary_by_method`. -Para saber o que o switch libera, o custo de uma variação, como funcionam os purges e como _Bypass Cache_ difere de um tempo de vida (TTL) de 0, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/). +Se você configurou um header `Vary` ou uma regra de cache key em outro lugar, o modelo se mantém. Você nomeia as entradas que tornam duas requisições diferentes, e cada valor distinto recebe a sua própria cópia. Só os quatro controles de variação definem essas entradas, então um header da requisição como `Accept-Language` não varia a key. --- ## Escopo e limites -- **Aplicação**: o switch vem desativado em uma aplicação nova e pertence à aplicação, então uma aplicação pode tê-lo ativo enquanto outra não. Ativá-lo não altera nenhum tráfego por si só. Os controles de um cache setting começam em `ignore`, e um cache setting só alcança uma requisição por meio de uma regra com [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy). Para o switch, consulte [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#produtos). -- **O que o switch libera**: variação de cache, o cache de respostas `POST` e `OPTIONS` e um **Max Age** que pode chegar a 0 segundos. Ele também libera mais sete behaviors do Rules Engine e as variáveis `${request_uri}` e `${device_group}`, e uma aplicação recebe tudo isso ou nada. Os behaviors são _Add Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_, _Forward Cookies_, _Rewrite Request_ e _Run Function_. Além de `GET` e `HEAD`, que uma aplicação aceita nativamente, o switch acrescenta `OPTIONS`, `POST`, `PUT`, `PATCH` e `DELETE`. Desses, só as respostas `POST` e `OPTIONS` podem ser armazenadas em cache. -- **Tamanho da variação**: cada valor distinto de uma entrada variada é um objeto em cache separado. Um cookie único para cada visitante dá uma cópia a cada visitante, então o número de objetos cresce com a audiência, e não com o conteúdo. Para saber como uma allowlist e **Sort** limitam esse número, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#o-custo-de-uma-variacao) e, para as práticas, [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#application-accelerator). -- **Purges**: as variações por cookie e por device group sobrevivem a um purge por URL. Um purge por cache key as alcança, assim como um purge por wildcard que termina a key com `@@*`. As variações por query string são a exceção. Um purge por URL as alcança quando envia os argumentos na ordem em que foram apresentados, ou em ordem alfabética com **Sort** ativo. Para os tipos de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). -- **Bypass Cache e um TTL de 0**: [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) envia à origem cada requisição que corresponde à sua regra e não armazena nada no cache da Azion. Ele não alcança a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). Um **Max Age** de 0 segundos mantém a requisição no caminho do cache, então requisições paralelas pelo mesmo objeto chegam à origem como uma única requisição. Para saber quando usar cada um, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). -- **Produtos vizinhos**: Application Accelerator decide o que entra em uma key, e [Cache](/pt-br/documentacao/plataforma/applications/cache/) então mantém uma cópia separada para cada valor. Variar o cache pela string `ims` do [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) exige Application Accelerator, enquanto processar uma imagem não exige. -- **Interfaces**: você ativa o switch no Azion Console, pela Azion API em `/v4/workspace/applications/` e com `azion update application --application-accelerator` na [Azion CLI](/pt-br/documentacao/devtools/cli/). [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) o define com `applicationAcceleratorEnabled`, e [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) com `application_acceleration` em uma atualização. [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/) gerencia o recurso de aplicação que carrega o switch. Os controles de variação pertencem ao cache setting, em `/v4/workspace/applications//cache_settings` ou por meio de flags de `azion create cache-setting` como `--cache-by-query-string` e `--cache-by-cookies`. Nenhuma flag de `azion create cache-setting` define a variação por device group ou o **Max Age** do cache, então envie esses valores em um corpo `--file`. -- **Observabilidade**: com `Pragma: azion-debug-cache` em uma requisição, o header `x-cache-key` da resposta mostra o que cada variação acrescentou à key. Um `POST` informa `-` em `x-cache` até que o cache setting nomeie _POST_ em **Cache vary by Method**. Para ler os mesmos headers em um browser, consulte [Verificar indicadores de cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). -- **Limites**: com Application Accelerator ativo, **Max Age** desce até 0 segundos, ou até 3 segundos quando o cache setting também tem Tiered Cache ativo. Ativá-lo pode gerar custos relacionados ao uso. Para cada limite de TTL, a resposta quando ele é ultrapassado e o que cada plano inclui, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#application-accelerator) e, para os valores, [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). -- **Termos**: o [glossário de Applications](/pt-br/documentacao/plataforma/applications/glossario/) define as palavras às quais as páginas do Application Accelerator dão um significado específico, como Advanced Cache Key, allowlist, denylist e requisição complexa. +- **Application**: Application Accelerator vem desativado em uma Application nova e pertence à Application, então uma Application pode tê-lo ativo enquanto outra o tem desativado. Ativá-lo mantém o tráfego como estava: os controles de um cache setting começam em `ignore`, e um cache setting só alcança uma requisição por meio de uma regra com [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy). [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) mostra onde ativá-lo no Azion Console e na API. +- **O que Application Accelerator libera**: variação de cache, o cache de respostas `POST` e `OPTIONS` e um Max Age, o campo `modules.cache.max_age` do cache setting, que pode chegar a 0 segundos. Ele também libera behaviors do Rules Engine e as variáveis `${request_uri}` e `${device_group}`, e uma Application recebe tudo isso ou nada. Os behaviors são _Add Request Cookie_ e _Add Response Cookie_, _Bypass Cache_, _Capture Match Groups_, _Filter Request Cookie_ e _Filter Response Cookie_, _Forward Cookies_ e _Rewrite Request_. Uma Application repassa `POST`, `PUT`, `PATCH`, `DELETE` e `OPTIONS` à origem com ou sem Application Accelerator. Desses métodos, Application Accelerator permite armazenar em cache só as respostas `POST` e `OPTIONS`. +- **Tamanho da variação**: cada valor distinto de uma entrada variada é um objeto em cache separado. Um cookie único para cada visitante dá uma cópia a cada visitante, então o número de objetos cresce com a audiência, e não com o conteúdo. Para saber como uma allowlist e a ordenação, o campo `sort_enabled`, limitam esse número, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#o-custo-de-uma-variacao) e, para as práticas, [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#application-accelerator). +- **Purges**: as variações por cookie e por device group sobrevivem a um purge por URL. Um purge por cache key as alcança, assim como um purge por wildcard que termina a key com `@@*`. As variações por query string são a exceção. Um purge por URL as alcança quando envia os argumentos na ordem em que foram apresentados, ou em ordem alfabética com `sort_enabled` ativo. Para os tipos de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). +- **Bypass Cache e um TTL de 0**: [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) envia à origem cada requisição que corresponde à sua regra e mantém a resposta fora do cache da Azion. Ele age só sobre o cache da Azion, então a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) continua a armazenar objetos para uma Application cujos cache settings ativam o Tiered Cache. Um Max Age de 0 segundos mantém a requisição no caminho do cache, e toda requisição ainda chega à origem. Para comparar os dois, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). +- **Vizinhos**: com Application Accelerator ativo, os controles de variação de um cache setting decidem o que entra em uma key, e [Cache](/pt-br/documentacao/plataforma/applications/cache/) então mantém uma cópia separada para cada valor. Para variar o cache pela string `ims` do [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/), acrescente `ims` à allowlist de query string do cache setting que entrega as imagens. +- **Interfaces**: você ativa Application Accelerator no Azion Console, pela Azion API em `/v4/workspace/applications/` e com `azion update application --application-accelerator` na [Azion CLI](/pt-br/documentacao/devtools/cli/). [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) o define com `applicationAcceleratorEnabled`, e [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) com `application_acceleration` em uma atualização. [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/) gerencia o recurso da Application que carrega o switch. Os controles de variação pertencem ao cache setting, em `/v4/workspace/applications//cache_settings` ou por meio de flags de `azion create cache-setting` como `--cache-by-query-string` e `--cache-by-cookies`. `azion create cache-setting` recebe a variação por device group e o Max Age do cache só em um corpo `--file`. +- **Observabilidade**: com `Pragma: azion-debug-cache` em uma requisição, o header `x-cache-key` da resposta mostra o que cada variação acrescentou à key. Um `POST` informa `-` em `x-cache` até que o campo `cache_vary_by_method` do cache setting carregue `post`. Para verificar o status de cache de uma resposta, consulte [Verifique o status de cache de uma resposta](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). +- **Limites**: com Application Accelerator ativo, o Max Age de um cache setting desce até 0 segundos, ou até 3 segundos quando o cache setting também tem Tiered Cache ativo. Ativá-lo pode gerar custos relacionados ao uso. Para cada limite de TTL e a resposta quando ele é ultrapassado, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#application-accelerator) e, para os valores, [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). A página [Preços da Azion](https://www.azion.com/pt-br/precos/) lista o que cada plano inclui. +- **Termos**: o [glossário de Applications](/pt-br/documentacao/plataforma/applications/glossario/) define as palavras às quais as páginas do Application Accelerator dão um significado específico, como Advanced Cache Key, variação de cache e device group. --- @@ -103,8 +121,8 @@ Para saber o que o switch libera, o custo de uma variação, como funcionam os p - + - + diff --git a/apps/docs/src/content/docs/pt-br/pages/build/applications/boas-praticas.mdx b/apps/docs/src/content/docs/pt-br/pages/build/applications/boas-praticas.mdx index d001c21804..1e567fdb67 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/applications/boas-praticas.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/applications/boas-praticas.mdx @@ -15,27 +15,27 @@ import DocItem from '@aziontech/webkit/doc-item' A maioria dos erros na camada entre os seus usuários e a sua origem fica invisível até que um usuário encontre um deles. Um visitante vê uma versão de uma página que você já substituiu. A origem responde a requisições que uma cópia armazenada poderia ter respondido. Um cookie de sessão chega a um usuário para quem nunca foi emitido, ou uma imagem chega mais pesada ou recortada de forma diferente do que a página pediu. -A causa raramente é um único valor errado. Com mais frequência, uma cache key varia por algo que a resposta ignora, ou um único TTL cobre conteúdo que muda em ritmos diferentes. Ou uma mudança é avaliada antes que alguém leia a resposta. +A causa raramente é um único valor errado. Com mais frequência, uma [cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/), a string sob a qual a Azion guarda uma cópia armazenada, varia por algo que a resposta ignora. Ou um único time to live (TTL) cobre conteúdo que muda em ritmos diferentes, ou uma mudança é avaliada antes que alguém leia a resposta. -Estas práticas se aplicam a uma [aplicação](/pt-br/documentacao/plataforma/applications/), aos seus [device groups](/pt-br/documentacao/plataforma/applications/device-groups/), às regras do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que agem sobre o seu tráfego e aos cache settings que essas regras aplicam. [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/) explica os mecanismos por trás delas, e [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/) traz o valor de cada limite. +Estas práticas se aplicam a uma [Application](/pt-br/documentacao/plataforma/applications/) e aos seus [device groups](/pt-br/documentacao/plataforma/applications/device-groups/). Elas também cobrem as regras do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que agem sobre o seu tráfego e os cache settings que essas regras aplicam. [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/) explica os mecanismos por trás delas, e [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/) traz o valor de cada limite. Para as práticas das Functions que uma Application executa, consulte [Boas práticas de Functions](/pt-br/documentacao/plataforma/functions/boas-praticas/). -As duas primeiras práticas se aplicam à própria aplicação. Em seguida vêm as seções de Cache, Application Accelerator e Image Processor, uma por Produto que uma aplicação pode habilitar. Cada uma segue a ordem em que você encontra as suas decisões. +As duas primeiras práticas se aplicam à própria Application: as palavras que um device group compara e as requisições que enviam os headers de upgrade do WebSocket. Em seguida vêm as seções de [Cache](/pt-br/documentacao/plataforma/applications/cache/), [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/), uma por recurso da plataforma aninhado em Applications. Cada uma segue a ordem em que você encontra as suas decisões. --- ## Defina um device group pelas palavras que só esse dispositivo envia -A expressão regular de cada device group é testada contra o header `User-Agent`. O grupo que uma requisição recebe decide as suas regras e a sua variação de cache. `Google Chrome Android` e `Google Chrome Symbian` compartilham `Google Chrome`, então uma expressão sobre esse nome coloca as duas em um só grupo. +Um device group é um nome e uma expressão regular que uma Application compara com o header `User-Agent` de cada requisição. Uma regra pode testar o grupo por meio de `${device_group}`, e um cache setting pode variar por ele. `iPhone` e `iPod` compartilham `iP`, então uma expressão sobre `iP` coloca os dois em um só grupo. -Escreva cada expressão sobre as palavras que distinguem a sua classe de dispositivo. Um grupo chamado `Mobile` com `(Mobile|iP(hone|od)|BlackBerry|IEMobile)` captura a maioria dos dispositivos móveis. +Escreva cada expressão sobre as palavras que distinguem a sua classe de dispositivo. Este device group, na forma que a API aceita, captura a maioria dos dispositivos móveis: `{ "name": "Mobile", "user_agent": "(Mobile|iP(hone|od)|BlackBerry|IEMobile)" }`. -O custo é a cobertura: um dispositivo da classe cujo header não carrega nenhuma das palavras fica fora do grupo. Quando duas classes compartilham uma palavra, vence o primeiro grupo correspondente da lista, como mostra [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/#ordem-de-correspondencia). Para criar um grupo, consulte [Crie device groups](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/criar-device-groups/). +O custo é a cobertura: um dispositivo da classe cujo header não carrega nenhuma das palavras fica fora do grupo. Quando duas classes compartilham uma palavra, vence o primeiro grupo correspondente da lista, como mostra [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/#ordem-de-correspondencia). Com [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) ativado, o log de uma requisição dessa classe de dispositivo mostra quais regras que testam `${device_group}` rodaram nela. Para criar um grupo, consulte [Crie device groups](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/criar-device-groups/). --- ## Envie os headers de upgrade do WebSocket só nas requisições que abrem uma conexão -Por padrão, uma aplicação com [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) habilitado faz proxy de toda requisição com `Upgrade: websocket` e `Connection: upgrade` para a origem como uma conexão WebSocket. Ela não verifica o path. A Azion recomenda que a aplicação que você constrói controle esses headers e os envie só onde o protocolo WebSocket deve ser usado. +Por padrão, uma Application com [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) ativado faz proxy de toda requisição com `Upgrade: websocket` e `Connection: upgrade` para a origem como uma conexão WebSocket, qualquer que seja o path. Controle esses headers na aplicação que você constrói e envie-os só onde o protocolo WebSocket deve ser usado. A decisão fica então no código do seu cliente. O mesmo cliente também reabre uma conexão que se fecha. A Azion recicla as conexões keepalive aproximadamente a cada 15 minutos, o que pode fechar uma conexão WebSocket ativa. @@ -45,13 +45,13 @@ Uma conexão que se abre retorna `101 Switching Protocols`, e qualquer outro sta ## Cache -Um cache setting decide por quanto tempo a Azion mantém uma cópia de uma resposta. Mantida por tempo demais, a cópia mostra a um visitante um conteúdo que a origem já substituiu. Mantida por pouco tempo, ela envia à origem requisições que uma cópia armazenada poderia ter respondido. +Um cache setting pertence a uma Application e guarda por quanto tempo a Azion e o navegador mantêm uma resposta, e o que torna duas requisições diferentes. Mantida por tempo demais, uma cópia mostra a um visitante um conteúdo que a origem já substituiu. Mantida por pouco tempo, ela envia à origem requisições que uma cópia armazenada poderia ter respondido. -Estas práticas se aplicam aos [cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) de uma aplicação e às regras cujo behavior _Set Cache Policy_ os aplica. A primeira prática mostra um cache setting completo, na forma que a API aceita, e as práticas seguintes nomeiam só o campo que mudam. A última prática mostra como confirmar cada mudança na resposta. +Estas práticas se aplicam aos [cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) de uma Application e às regras que aplicam esses cache settings por meio do behavior _Set Cache Policy_. Elas tratam, em ordem, do TTL, do nome de um objeto, do purge das suas variações, de Tiered Cache, de stale cache e do status de cache de uma resposta. A primeira prática mostra um cache setting completo, na forma que a API aceita, e as práticas seguintes nomeiam só o campo que mudam. A última prática mostra como confirmar cada mudança na resposta. ### Ajuste cada TTL à frequência com que o seu conteúdo muda -Sob _Override cache behavior_, o **Max Age** define o TTL de uma cópia. Um TTL mais longo responde a mais requisições, mas fica mais atrasado em relação à origem. Assets podem mudar só quando um deploy os substitui, enquanto uma página muda ao longo do dia, então um único TTL não serve para parte do conteúdo. +Sob o comportamento `override`, o Max Age de um cache setting define o TTL de uma cópia, no seu campo `modules.cache.max_age`. Um TTL mais longo responde a mais requisições, mas fica mais atrasado em relação à origem. Assets podem mudar só quando um deploy os substitui, enquanto uma página muda ao longo do dia, então um único TTL não serve para parte do conteúdo. Dê a cada grupo de paths que muda em um mesmo ritmo o seu próprio cache setting e a sua própria regra. Este setting mantém os assets por 86.400 segundos no navegador e por 300 segundos na Azion: @@ -65,19 +65,19 @@ Dê a cada grupo de paths que muda em um mesmo ritmo o seu próprio cache settin } ``` -Páginas editadas durante o dia recebem um segundo setting e uma segunda regra, com um **Max Age** menor. Um **Max Age** menor que 60 segundos exige Application Accelerator, ou a API o recusa com `21021`. Para cada limite, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache). Para os passos, consulte [Crie um cache setting](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/ajustar-cache-settings/). +Páginas editadas durante o dia recebem um segundo setting e uma segunda regra, com um Max Age menor. Um Max Age menor que 60 segundos exige Application Accelerator, ou a API o recusa com `21021`. Para cada limite, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache). Para os passos, consulte [Crie um cache setting](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/ajustar-cache-settings/). ### Mude o nome de um objeto quando o conteúdo dele mudar Um objeto que mantém o nome exige um purge de cada camada de cache e de cada variação sempre que o seu conteúdo muda. Em vez disso, coloque uma versão no nome do arquivo. O cache trata cada versão como um objeto separado, e a primeira requisição para ela busca os bytes atuais na origem. Qualquer esquema serve, como um contador, um timestamp ou um hash do conteúdo, desde que conteúdo diferente sempre receba um nome diferente: `https://static.example.com/assets/image_1.jpg` passa a ser `https://static.example.com/assets/image_2.jpg`. -Nenhum purge é necessário para que uma atualização chegue aos usuários, e um navegador que ainda guarda o nome anterior mantém um objeto válido. As duas versões ficam disponíveis, então reverter significa apontar as suas páginas para o nome anterior. O custo é que toda referência ao objeto muda junto com ele, o que uma etapa de build pode automatizar e uma edição manual não pode. +Uma atualização chega aos usuários sem purge, e um navegador que ainda guarda o nome anterior mantém um objeto válido. As duas versões ficam disponíveis, então reverter significa apontar as suas páginas para o nome anterior. O custo é que toda referência ao objeto muda junto com ele, o que uma etapa de build pode automatizar e uma edição manual não pode. ### Purgue um objeto que varia por cache key ou wildcard [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) encontra uma cópia pela sua cache key, e um objeto que varia tem uma key por variação. Um purge por URL converte a URL em uma key. Uma cópia que varia por cookie, device group ou formato de imagem sobrevive a ele, enquanto o purge informa sucesso. -Nomeie essas keys em um purge por cache key, até 50 por requisição, ou alcance-as com um wildcard. Estes comandos do [Azion CLI](/pt-br/documentacao/devtools/cli/) enviam os dois, com o wildcard terminado em `@@*` para as variações por cookie: +Nomeie essas keys em um purge por cache key, até 50 por requisição, ou alcance-as com um wildcard. Estes comandos da [Azion CLI](/pt-br/documentacao/devtools/cli/) enviam os dois, com o wildcard terminado em `@@*` para as variações por cookie: ```bash azion purge --cachekey "httpwww.example.com/@@user=user;" @@ -88,15 +88,15 @@ Cada comando imprime `Purge carried out successfully`. Uma variação com muitos ### Reserve Tiered Cache para objetos de vida longa com corpo estável -[Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) acrescenta uma segunda camada de cache que os data centers consultam antes da origem, então uma busca na origem serve todos eles. Ative-o para objetos de vida longa com corpo estável, com `modules.cache.tiered_cache` definido como `{ "enabled": true, "topology": "nearest-region" }`. +[Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) adiciona uma segunda camada de cache entre o data center que responde a uma requisição e a sua origem. Uma cópia válida de um objeto nessa camada responde a um miss na primeira camada, e a origem não recebe nenhuma requisição. Ative Tiered Cache para objetos de vida longa com corpo estável, com `modules.cache.tiered_cache` definido como `{ "enabled": true, "topology": "nearest-region" }`. -O setting precisa de `override`, ou a API o recusa com `21001`. Com Application Accelerator ativo, o piso do **Max Age** é de 3 segundos, e um valor menor recebe `21020`. O custo é um salto a mais em um miss na primeira camada, e a camada não serve para conteúdo que muda a cada poucos segundos. +O setting precisa de `override`, ou a API o recusa com `21001`. Com Application Accelerator ativo, o piso do Max Age é de 3 segundos, e um valor menor recebe `21020`. O custo é um salto a mais em um miss na primeira camada, e a camada é inadequada para conteúdo que muda a cada poucos segundos. -Uma regra com _Bypass Cache_ não alcança a camada, como explica [Descarte Tiered Cache antes de contar com Bypass Cache](/pt-br/documentacao/plataforma/applications/boas-praticas/#descarte-tiered-cache-antes-de-contar-com-bypass-cache). Para remover um objeto das duas camadas, purgue o Tiered Cache antes do Cache, como mostra [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#purge). +A camada fica fora do alcance de uma regra com _Bypass Cache_, como explica [Descarte Tiered Cache antes de contar com Bypass Cache](/pt-br/documentacao/plataforma/applications/boas-praticas/#descarte-tiered-cache-antes-de-contar-com-bypass-cache). Para remover um objeto das duas camadas, purgue Tiered Cache antes do Cache, como mostra [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#purge). ### Ative stale cache onde uma página antiga é melhor que um erro -Com **Stale cache** ativo, a Azion serve uma cópia além do seu TTL quando a revalidação com a origem falha, enquanto durar a janela de stale. O visitante recebe a última versão boa em vez de uma página de erro. Defina `modules.cache.stale_cache.enabled` como `true` para um artigo, uma listagem ou uma página de produto. Mantenha-o desativado para um preço ou um dado de disponibilidade em que um visitante baseia uma decisão. +Com stale cache ativo em um cache setting, a Azion serve uma cópia além do seu TTL quando a revalidação com a origem falha. Ela faz isso pelo valor de `stale-while-revalidate` da origem sob o comportamento `honor`, e por 300 segundos nos demais casos. O visitante recebe a última versão boa em vez de uma página de erro. Defina `modules.cache.stale_cache.enabled` como `true` para um artigo, uma listagem ou uma página de produto. Mantenha-o desativado para um preço ou um dado de disponibilidade em que um visitante baseia uma decisão. Uma resposta servida assim informa `STALE` em `x-cache`. Para a duração da janela, o que faz uma revalidação falhar e quando um purge serve melhor que a expiração, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#stale-cache). @@ -118,7 +118,9 @@ Uma resposta descreve uma cópia em um servidor, então repita a requisição an Cada atributo pelo qual uma cache key varia multiplica as cópias que a Azion mantém de uma URL, uma cópia por valor. Quando o atributo não altera a resposta, essas cópias carregam bytes idênticos, dividem o tráfego entre si e acrescentam keys que um purge precisa alcançar. -[Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) acrescenta o objeto `modules.application_accelerator` a um cache setting e libera behaviors do Rules Engine como _Bypass Cache_ e _Forward Cookies_. Enquanto ele está desativado na aplicação, a API recusa qualquer campo desse objeto com `21013`. As quatro primeiras práticas moldam a key, e `x-cache-key` mostra o que cada uma acrescenta, como explica [Leia o status de cache depois de cada mudança de cache](/pt-br/documentacao/plataforma/applications/boas-praticas/#leia-o-status-de-cache-depois-de-cada-mudanca-de-cache). +[Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) libera behaviors do Rules Engine como _Bypass Cache_ e _Forward Cookies_ e permite que um cache setting altere os campos do seu objeto `modules.application_accelerator`. Enquanto ele está desativado na Application, a API recusa com `21013` uma variação nesses campos, um `behavior` diferente de `ignore` ou um método em `cache_vary_by_method`. + +As quatro primeiras práticas moldam a key: a query string, a ordem dela, os cookies e os cookies de sessão sob _Forward Cookies_. `x-cache-key` mostra o que cada uma delas acrescenta, como explica [Leia o status de cache depois de cada mudança de cache](/pt-br/documentacao/plataforma/applications/boas-praticas/#leia-o-status-de-cache-depois-de-cada-mudanca-de-cache). A última trata de _Bypass Cache_ e da camada do Tiered Cache que ele deixa intacta. ### Monte a cache key só com os argumentos de que a resposta depende @@ -145,75 +147,63 @@ Uma lista vazia é recusada com `21018`. Deixe de fora um argumento que muda a r Sem ordenação, os argumentos listados entram na cache key na ordem em que o cliente os escreveu. `?category=shoes&page=2` e `?page=2&category=shoes` passam então a ser duas cópias da mesma resposta. Com `sort_enabled` definido como `true` no mesmo objeto `cache_vary_by_querystring`, os argumentos entram na key em ordem alfabética, e as duas requisições chegam a uma única cópia. -O custo aparece na hora do purge: um purge por URL alcança a cópia só quando nomeia os argumentos em ordem alfabética. O Azion CLI define `sort_enabled` só por meio de `--file` e de um corpo JSON. Para ver qual purge alcança cada variação, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). +O custo aparece na hora do purge: um purge por URL alcança a cópia só quando nomeia os argumentos em ordem alfabética. Quando a Azion CLI cria um cache setting, só `--file` e um corpo JSON definem `sort_enabled`. Em uma atualização, `--enable-caching-string-sort` o define. Para ver qual purge alcança cada variação, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). ### Liste só os cookies que segmentam conteúdo -Os navegadores enviam todos os cookies que guardam para um domínio, e poucos deles mudam o que a origem retorna. Sob `all`, um identificador de analytics ou uma flag de consentimento entra na key, e as cópias se multiplicam com os valores dos cookies, e não com o conteúdo. Sob `allowlist`, só os cookies que você nomeia variam a key, e é assim que uma aplicação segmenta conteúdo por perfil de usuário ou por outro agrupamento. - -A Azion recomenda a allowlist quando cookies gerenciam sessões de usuário: `behavior` definido como `allowlist` e `session_id` em `cookie_names`, sob `modules.application_accelerator.cache_vary_by_cookies`. O custo são as cópias: um cookie único por visitante significa uma cópia por visitante. Para os passos, consulte [Configure a Advanced Cache Key para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/advanced-cache-key/). - -### Coloque os cookies de sessão na denylist onde Forward Cookies roda - -O behavior [Forward Cookies](/pt-br/documentacao/plataforma/applications/rules-engine/#forward-cookies) repassa aos usuários o header `Set-Cookie` da origem, incluindo os cache hits. Uma resposta em cache pode então entregar a um usuário o `Set-Cookie` da sessão de outro usuário. A solução que a Azion documenta é o behavior `denylist` da variação por cookie, nomeando os cookies de sessão que devem permanecer privados: `behavior` definido como `denylist`, com `session_id` em `cookie_names`. +Os navegadores enviam todos os cookies que guardam para um domínio, e poucos deles mudam o que a origem retorna. Sob `all`, um identificador de analytics ou uma flag de consentimento entra na key, e as cópias se multiplicam com os valores dos cookies, e não com o conteúdo. Sob `allowlist`, só os cookies que você nomeia variam a key, e é assim que uma Application segmenta conteúdo por perfil de usuário ou por outro agrupamento. -Coloque a denylist no cache setting que a regra com Forward Cookies aplica por meio de _Set Cache Policy_. Um cache setting tem um único behavior de cookie, então uma allowlist de segmentação exige um setting separado. Para os passos, consulte [Configure políticas de cache para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#encaminhe-cookies-da-origem-ao-usuario). +Use a allowlist quando cookies gerenciam sessões de usuário: `behavior` definido como `allowlist` e `session_id` em `cookie_names`, sob `modules.application_accelerator.cache_vary_by_cookies`. O custo são as cópias: um cookie único por visitante significa uma cópia por visitante. Para os passos, consulte [Configure a Advanced Cache Key para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/advanced-cache-key/). -### Prefira um TTL de 0 segundos onde todos podem compartilhar a resposta +### Coloque os cookies de sessão na allowlist onde Forward Cookies roda -Um **Max Age** de 0 e o behavior [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) impedem, ambos, que os usuários recebam uma cópia armazenada. _Bypass Cache_ encaminha cada requisição que corresponde a ele. Um TTL de 0 mantém a requisição no caminho do cache, onde requisições simultâneas chegam à origem como uma só. +O behavior [Forward Cookies](/pt-br/documentacao/plataforma/applications/rules-engine/#forward-cookies) repassa aos usuários o header `Set-Cookie` da origem, incluindo os cache hits. Uma resposta em cache pode então entregar a um usuário o `Set-Cookie` da sessão de outro usuário. Nomeie o cookie de sessão em uma allowlist, para que cada sessão receba a sua própria key: `behavior` definido como `allowlist`, com `session_id` em `cookie_names`. Uma `denylist` que nomeia `session_id` deixa o cookie fora da key, e as sessões compartilham um único objeto. -Use o TTL de 0 quando o conteúdo dinâmico é o mesmo para todos que o pedem no mesmo momento, com `modules.cache.max_age` definido como `0`. Use _Bypass Cache_, `{ "type": "bypass_cache" }` na API, quando duas requisições que chegam juntas precisam de respostas diferentes. Com Tiered Cache ativo, nenhuma das opções vale nas duas camadas: o **Max Age** para em 3 segundos, e _Bypass Cache_ não alcança a camada. Para saber como cada uma trata uma requisição, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). +Coloque a allowlist no cache setting que a regra com Forward Cookies aplica por meio de _Set Cache Policy_. Para os passos, consulte [Configure políticas de cache para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#encaminhe-cookies-da-origem-ao-usuario). ### Descarte Tiered Cache antes de contar com Bypass Cache -_Bypass Cache_ impede que o cache da Azion armazene a resposta da origem, mas a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache) fica fora do alcance da regra. Enquanto a regra está ativa, uma camada que os cache settings ativam continua armazenando objetos em cache pelo TTL mínimo. A regra não mostra nenhum sinal disso, então uma regra que parece certa ainda pode deixar conteúdo em cache. +O behavior [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) impede que o cache da Azion armazene a resposta da origem, mas a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache) fica fora do alcance da regra. Enquanto a regra está ativa, uma camada que os cache settings ativam continua armazenando objetos em cache pelo Max Age do cache setting, cujo piso é de 3 segundos com Tiered Cache ativo. A camada aparece só nos cache settings, e não na regra, então uma regra que parece certa ainda pode deixar conteúdo em cache. -Quando o requisito é conteúdo atualizado, procure `modules.cache.tiered_cache.enabled` definido como `true` nos cache settings que cobrem os paths da regra. Se nenhuma camada puder manter uma cópia, decida sobre Tiered Cache junto com a regra. Para o sintoma que uma camada esquecida produz e a sua correção, consulte [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). +Quando o requisito é conteúdo atualizado, procure `modules.cache.tiered_cache.enabled` definido como `true` nos cache settings que cobrem os paths da regra. Se nenhuma camada puder manter uma cópia, decida sobre Tiered Cache junto com a regra. Para o sintoma que uma camada esquecida produz e a sua correção, consulte [O conteúdo continua sendo entregue do cache depois de uma regra com Bypass Cache](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#o-conteudo-continua-sendo-entregue-do-cache-depois-de-uma-regra-com-bypass-cache). --- ## Image Processor -Uma imagem transformada pode prejudicar uma página de três formas. O arquivo pesa mais do que a página precisa, ou o recorte remove algo que ninguém pretendia remover. Ou a requisição falha por causa da posição de um parâmetro na URL. Em torno da transformação, o cache setting decide como as imagens derivadas são armazenadas e com que frequência o mesmo trabalho é executado de novo. +Uma imagem transformada pode prejudicar uma página de três formas. O arquivo pesa mais do que a página precisa, ou o recorte remove algo que ninguém pretendia remover. Ou a imagem chega em um formato que o cliente não consegue exibir. Em torno da transformação, o cache setting decide como as imagens derivadas são armazenadas e com que frequência a mesma requisição chega de novo a Image Processor. -Estas práticas se aplicam a [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/): a query string `ims`, a regra cujo behavior _Optimize Images_ age sobre ela e o cache setting dessa regra. As quatro primeiras práticas tratam da requisição, e as duas últimas tratam do cache setting. +Estas práticas se aplicam a [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/): a query string `ims`, a regra cujo behavior _Optimize Images_ age sobre essa query string e o cache setting dessa regra. As três primeiras práticas tratam da requisição: a qualidade, o redimensionamento e o header `Accept`. As duas últimas tratam do cache setting: a allowlist e o TTL dele. `x-cache` e `x-cache-key` mostram o resultado dessas duas, como explica [Leia o status de cache depois de cada mudança de cache](/pt-br/documentacao/plataforma/applications/boas-praticas/#leia-o-status-de-cache-depois-de-cada-mudanca-de-cache). ### Solicite qualidade 85, a menos que uma imagem precise de outro valor -O filtro de qualidade controla o quanto Image Processor comprime uma imagem derivada, trocando bytes por fidelidade visual. O seu argumento é um número inteiro de 0 a 100. A Azion recomenda `?ims=filters:quality(85)`, que otimiza o arquivo sem perda perceptível de qualidade visual. +O filtro de qualidade controla o quanto Image Processor comprime uma imagem derivada, trocando bytes por fidelidade visual. O seu argumento é um número inteiro de 0 a 100. Solicite `?ims=filters:quality(85)`, que otimiza o arquivo sem perda perceptível de qualidade visual. Um valor menor deixa o arquivo ainda menor, e a imagem entregue mostra a perda. Um valor maior acrescenta um peso que quem vê a imagem não consegue perceber. Afaste-se de 85 só para uma imagem que precisa parecer mais nítida, ou pesar menos, do que 85 entrega. Para o argumento e a sua faixa, consulte [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#qualidade). ### Use fit-in quando a imagem precisar manter as proporções -`?ims=WidthxHeight` preenche uma caixa exata, e, quando o formato solicitado difere do da imagem de origem, um recorte automático centralizado corta o eixo que ultrapassa a caixa. Parte do assunto pode ir junto. `fit-in`, por sua vez, coloca a imagem dentro da mesma caixa, mantendo a proporção e sem nunca ampliá-la. +`?ims=WidthxHeight` preenche uma caixa exata. Quando o formato solicitado difere do da imagem de origem, um recorte automático centralizado corta o eixo que ultrapassa a caixa. Parte do assunto pode ir junto. `fit-in`, por sua vez, coloca a imagem dentro da mesma caixa: ele mantém a proporção, e o resultado tem no máximo o tamanho da original. Em uma fotografia em paisagem, `?ims=400x400` recorta a imagem para preencher o quadrado. `?ims=fit-in/400x400` mantém a imagem inteira e não preenche o quadrado em um dos lados. Use o redimensionamento simples quando o layout precisa da caixa preenchida, e `fit-in` quando nenhuma margem da imagem pode ser perdida. Para cada forma de redimensionamento, consulte [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento). -### Mantenha ims como o último parâmetro da query string - -Image Processor espera que `ims` seja o último parâmetro da query string. Um parâmetro colocado depois dele pode fazer a requisição retornar um erro `504`. `example.com/image.jpeg?ims=1000x1000&ts=1234` é a forma incorreta, e `example.com/image.jpeg?ts=1234&ims=1000x1000` é a correta. - -Timestamps de cache-busting e valores de rastreamento que outro sistema acrescenta seguem a mesma regra. Um script que acrescenta um parâmetro precisa inseri-lo antes de `ims`, e não no final. Para a regra, consulte [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#posicao-do-parametro-ims). - -### Adicione o header Accept que uma conversão para WEBP ou AVIF exige +### Adicione o header Accept só onde todo cliente exibe WEBP -Uma conversão para WEBP ou AVIF exige um header de requisição correspondente. `filters:format(webp)` exige `Accept: image/webp`, e `filters:format(avif)` exige `Accept: image/avif`. Na Request Phase, o behavior [Add Request Header](/pt-br/documentacao/plataforma/applications/rules-engine/#add-request-header) fornece o header, de modo que a conversão deixa de depender do que o cliente envia. +Um behavior [Add Request Header](/pt-br/documentacao/plataforma/applications/rules-engine/#add-request-header) com `Accept: image/webp` faz a conversão automática entregar WEBP a toda requisição a que a regra corresponde, inclusive a uma cujo cliente pediu PNG. Um filtro `filters:format()` não precisa dele: a resposta traz o formato nomeado, qualquer que seja o header `Accept` da requisição. Adicione o header só quando todo cliente desses paths exibir WEBP. -Uma regra que converte para WEBP carrega `{ "type": "add_request_header", "attributes": { "value": "Accept: image/webp" } }`. A API rejeita o tipo `add_header` com `10039`. Mantenha cada valor em sincronia com o formato que a sua string `ims` solicita. Para o filtro de conversão, consulte [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#conversao-de-formato). Para os critérios que restringem uma regra a requisições de imagem, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#behaviors-do-rules-engine). +A API recebe o behavior como `{ "type": "add_request_header", "attributes": { "value": "Accept: image/webp" } }` na Request Phase da regra e rejeita o tipo `add_header` com `10039`. Para o filtro de conversão, consulte [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#conversao-de-formato). Para os critérios que restringem uma regra a requisições de imagem, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#behaviors-do-rules-engine). ### Coloque ims na allowlist do cache setting que serve imagens `ims` carrega a transformação, então é um argumento de que a resposta depende. [Monte a cache key só com os argumentos de que a resposta depende](/pt-br/documentacao/plataforma/applications/boas-praticas/#monte-a-cache-key-so-com-os-argumentos-de-que-a-resposta-depende) se aplica a ele. O cache setting que a regra de imagens aplica define `fields` como `["ims"]` sob uma `allowlist`. -A diferença é um segundo Produto: `cache_vary_by_querystring` pertence a `modules.application_accelerator`, então incluir `ims` na cache key exige Application Accelerator, embora transformar uma imagem não exija. Para os controles de Azion Console que definem o campo, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#cache-variation). +A diferença é um segundo recurso da plataforma: `cache_vary_by_querystring` pertence a `modules.application_accelerator`, então essa allowlist exige Application Accelerator, embora transformar uma imagem não exija. Para os controles do Azion Console que definem o campo, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#variacao-de-cache). ### Mantenha imagens derivadas em cache pelo tempo que as imagens de origem permitirem -Image Processor conta cada transformação, seja um redimensionamento, um recorte, uma conversão de formato ou um filtro, no medidor mensal Images. Uma requisição que o cache responde não executa transformação e não acrescenta nada. Um **Max Age** curto faz Image Processor refazer a mesma transformação em um intervalo sem relação com mudanças na imagem de origem. +Image Processor soma uma imagem ao medidor mensal Images para cada requisição que processa, seja para redimensionar, recortar, converter ou filtrar a imagem. Uma requisição que o cache responde não executa transformação e não acrescenta nada. Um Max Age curto envia a mesma requisição a Image Processor de novo, em um intervalo sem relação com mudanças na imagem de origem. -Dê ao cache setting das imagens derivadas o maior `modules.cache.max_age` que o seu conteúdo de origem tolera, até 31.536.000 segundos. O custo é a atualização do conteúdo. Uma imagem de origem substituída deixa as suas versões derivadas, uma key por processamento e por formato, em cache até expirarem ou até que um purge as remova. Para as imagens que cada plano inclui, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#image-processor). +Dê ao cache setting das imagens derivadas o maior `modules.cache.max_age` que o seu conteúdo de origem tolera, até 31.536.000 segundos. O custo é a atualização do conteúdo. Uma imagem de origem substituída deixa as suas versões derivadas, uma key por processamento e por formato, em cache até expirarem ou até que um purge as remova. Para as imagens que cada plano inclui, consulte [Preços da Azion](https://www.azion.com/pt-br/precos/). --- @@ -222,7 +212,7 @@ Dê ao cache setting das imagens derivadas o maior `modules.cache.max_age` que o Cada variável, operador e behavior que as regras desta página combinam. - O que cada variação de cache faz com a key e os behaviors que o Produto libera. + O que cada variação de cache faz com a key e os behaviors que Application Accelerator libera. A regra e o cache setting que as práticas de Image Processor pressupõem, construídos passo a passo. Os procedimentos que aplicam estas práticas, uma tarefa por guia. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/applications/como-funciona.mdx b/apps/docs/src/content/docs/pt-br/pages/build/applications/como-funciona.mdx index 09957d8ee1..2678920aa5 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/applications/como-funciona.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/applications/como-funciona.mdx @@ -1,6 +1,6 @@ --- title: Como Applications funciona -description: Acompanhe uma requisição por uma aplicação, do workload até a origem, e veja onde Cache, Application Accelerator e Image Processor agem sobre ela. +description: Acompanhe uma requisição por uma Application, do seu Workload até a origem, e veja onde Cache, Application Accelerator e Image Processor agem sobre ela. meta_tags: 'applications, how it works, request path, request phase, response phase, rules engine, connector, origin, workload, cache, application accelerator, image processor' namespace: documentation_products_applications_how_it_works permalink: /documentacao/plataforma/applications/como-funciona/ @@ -9,88 +9,152 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Uma requisição por uma página, um arquivo ou uma rota de API não precisa percorrer todo o caminho até o servidor que guarda o conteúdo. Uma camada na frente desse servidor pode ler a requisição primeiro e decidir o que acontece com ela. Essa camada pode responder a partir de uma cópia que armazenou antes, adicionar ou remover um header, ou escolher qual servidor recebe a requisição. No caminho de volta, a mesma camada pode alterar a resposta antes que o cliente a veja. +Entre um cliente e o seu conteúdo, uma camada pode ler cada requisição primeiro, seja ela para uma página, um arquivo ou uma rota de API. A camada então decide o que acontece com a requisição. Ela pode executar um código que constrói a resposta sem nenhum servidor atrás da camada, ficar na frente do servidor que guarda o seu conteúdo ou fazer as duas coisas. Na frente desse servidor, ela pode responder com uma cópia de uma resposta que o servidor enviou antes, adicionar ou remover um header ou escolher o servidor que recebe a requisição. Quando uma resposta volta desse servidor, a mesma camada pode alterá-la antes que o cliente a receba. -Na Azion, essa camada é uma [aplicação](/pt-br/documentacao/plataforma/applications/), uma instância do recurso da plataforma Applications. Um [workload](/pt-br/documentacao/plataforma/workloads/) recebe a requisição no seu domínio, e o deployment do workload nomeia a aplicação que a trata. A aplicação decide por meio das suas regras, escritas em [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/), em duas fases. As regras da Request Phase agem sobre a requisição, e as regras da Response Phase agem sobre a resposta entregue ao usuário. Uma regra cujo behavior _Set Connector_ nomeia um [connector](/pt-br/documentacao/plataforma/connectors/) envia a requisição à origem. +Na Azion, essa camada é uma Application. [Applications](/pt-br/documentacao/plataforma/applications/) é um recurso da plataforma que processa as requisições recebidas pelos seus [Workloads](/pt-br/documentacao/plataforma/workloads/), na infraestrutura distribuída da Azion, a partir do data center mais próximo ao seu usuário. Cada requisição chega a uma Application por meio de um Workload, que recebe a requisição em um dos seus domínios. O deployment do Workload define a Application que processa a requisição. -Três Produtos habilitados em uma aplicação agem ao longo desse caminho. Cache responde a partir de uma cópia armazenada, e Application Accelerator coloca mais da requisição na key que encontra essa cópia. Image Processor constrói uma imagem redimensionada ou convertida a partir da imagem que está na origem. +A Application age sobre a requisição por meio das suas regras, que você escreve em [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/). Cada regra pertence a uma de duas fases: as regras da Request Phase agem sobre a requisição, e as regras da Response Phase agem sobre a resposta que o usuário recebe. Para enviar a requisição à origem, uma regra da Request Phase usa o behavior _Set Connector_, que define o [Connector](/pt-br/documentacao/plataforma/connectors/) que encaminha a requisição até lá. Uma regra também pode executar o seu código sobre a requisição: o behavior _Run Function_ invoca uma [Function Instance](/pt-br/documentacao/plataforma/applications/functions-instances/) de uma das suas [Functions](/pt-br/documentacao/plataforma/functions/). -Esta página cobre os mecanismos, não os campos: cada variável, operador e behavior está em Rules Engine para Applications, e cada limite está em [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/). As seções seguem o caminho que uma requisição percorre, as duas fases, como as regras são executadas, o que uma aplicação nova tem e a propagação. Cache, Application Accelerator e Image Processor fecham a página, nessa ordem. Uma conexão WebSocket, que uma aplicação encaminha por proxy até a origem, tem uma página própria: [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/). +Três recursos da plataforma aninhados em Applications agem no caminho do Workload até a origem, cada um com o seu próprio switch na Application. [Cache](/pt-br/documentacao/plataforma/applications/cache/) responde com uma cópia armazenada de uma resposta anterior. [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) libera quatro capacidades para o cache e para as regras de uma Application. Entre elas, a variação de cache acrescenta mais partes da requisição, como um cookie ou um argumento de query string, à cache key, o índice sob o qual Cache arquiva cada cópia. [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) constrói uma imagem redimensionada ou convertida a partir de uma imagem na origem. + +Esta página explica os mecanismos, e outras duas páginas guardam os campos: Rules Engine para Applications lista cada variável, operador e behavior, e [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/) lista cada limite. As seções acompanham uma requisição pelo seu caminho e depois cobrem as duas fases, como as regras são executadas, o que uma Application nova tem e a propagação. Depois delas, uma seção para cada um cobre Cache, Application Accelerator e Image Processor. [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) cobre, em uma página própria, as conexões WebSocket que uma Application repassa à origem, e [Como Functions funciona](/pt-br/documentacao/plataforma/functions/como-funciona/) cobre como uma Function é executada. --- ## O caminho que uma requisição percorre -Uma aplicação não trata nenhuma requisição até que um workload a nomeie. O vínculo fica no deployment do workload, não na aplicação. No Azion Console, ele é o campo **Application** das **Deployment Settings** do workload. O mesmo deployment pode nomear um [firewall](/pt-br/documentacao/plataforma/firewall/), e uma requisição então atravessa o firewall antes de chegar à aplicação. Domínios, protocolos e certificados também pertencem ao workload, então uma aplicação não carrega configurações de entrega próprias. +Criar uma Application não a coloca no caminho de nenhuma requisição: uma requisição só chega à Application depois que o deployment de um Workload define essa Application. A relação fica guardada no deployment, não na Application, e no Azion Console você define essa relação no campo **Application** das **Deployment Settings** do Workload. O deployment também pode definir um [Firewall](/pt-br/documentacao/plataforma/firewall/), e a requisição então passa pelo Firewall antes que a Application a receba. Os domínios, os protocolos e os certificados também ficam no Workload, então você configura a entrega no Workload, não na Application. -O registro da aplicação também não nomeia nenhuma origem. Uma aplicação criada pela API somente com `name` e `active` retorna os seus campos `modules`, `active` e `debug`, e nada que aponte para um servidor. Uma requisição chega a uma origem porque uma regra a envia para lá: uma regra da Request Phase cujo behavior _Set Connector_ nomeia um connector. O connector guarda o endereço da origem. Azion Console informa que as origens foram redesenhadas como connectors. +A Application também não guarda uma origem: uma requisição só chega a uma origem quando uma regra da Request Phase a envia para lá com o behavior _Set Connector_. Esse behavior define um Connector, e o Connector guarda o endereço da origem. A API mostra isso: uma Application criada só com `name` e `active` volta com `modules`, `active` e `debug`, e sem nenhum campo que aponte para um servidor. Os Connectors substituem as origens que as versões anteriores de Applications configuravam na Application. No lugar de uma origem, uma Function pode responder a uma requisição: uma regra executa a Function com _Run Function_, e a Function constrói a resposta sem nenhum Connector. -Este diagrama acompanha uma requisição, do workload que ela alcança até a resposta que o cliente recebe: +O diagrama acompanha uma requisição no caminho até uma origem, do cliente até a resposta que ele recebe. As setas sólidas levam a requisição, e as setas pontilhadas levam a resposta. Cada rótulo começa com o número do seu passo abaixo. ```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% flowchart TD - Client["Um cliente envia uma requisição ao domínio de um workload"] --> Fw{"O deployment do workload nomeia um firewall?"} - Fw -->|"Sim"| Firewall["O firewall executa as suas regras primeiro e pode interromper a requisição"] - Fw -->|"Não"| Req["A aplicação executa as suas regras da Request Phase, em ordem"] - Firewall -->|"A requisição continua"| Req - Req -->|"Um behavior encerra o processamento, como um deny"| Answer["A aplicação responde ao cliente"] - Req --> Copy{"Uma regra com Set Cache Policy se aplicou, e há uma cópia válida armazenada?"} - Copy -->|"Sim"| Stored["A cópia armazenada responde, e a origem não é consultada"] - Copy -->|"Não"| Conn["O connector que uma regra com Set Connector nomeia leva a requisição à origem"] - Conn --> Origin["A origem responde"] - Stored --> Resp["A aplicação entrega a resposta, e as suas regras da Response Phase agem sobre ela"] - Origin --> Resp - Resp --> Done["O cliente recebe a resposta"] + Client(["Cliente"]) + WL["Workload"] + FW["Firewall"] + App["Application"] + Cache["Cache"] + Conn["Connector"] + Origin[["servidor de origem"]] + Client -->|"1. requisição"| WL + WL -->|"1. com Firewall"| FW + WL -->|"1. sem Firewall"| App + FW -->|"1. permitida"| App + FW -.->|"1. recusa"| Client + App -.->|"2. Deny (403)"| Client + App -->|"3. cache setting"| Cache + Cache -.->|"3. cópia válida"| App + App -->|"4. sem cópia válida"| Conn + Conn -->|"4. requisição"| Origin + Origin -.->|"4. resposta"| Conn + Conn -.->|"4. resposta"| App + App -.->|"5. resposta"| Client ``` -1. Um cliente envia uma requisição ao domínio de um workload. Quando o deployment do workload nomeia um firewall, o firewall executa as suas regras primeiro e pode interromper a requisição nesse ponto. -2. A aplicação que o deployment nomeia executa as suas regras da Request Phase, em ordem. Um behavior que encerra o processamento, como _Deny (403 Forbidden)_, responde ao cliente, e nada depois dele é executado. -3. Quando uma regra com _Set Cache Policy_ aplicou um cache setting e há uma cópia válida armazenada, a cópia responde, e a origem não é consultada. -4. Caso contrário, o connector que uma regra com _Set Connector_ nomeia leva a requisição à origem, e a origem responde. -5. A aplicação entrega a resposta, as suas regras da Response Phase agem sobre ela e o cliente a recebe. +1. O cliente envia a requisição para um dos domínios do Workload. Quando o deployment do Workload também define um Firewall, o Firewall executa as suas regras primeiro e pode recusar a requisição. +2. A Application que o deployment define executa as suas regras da Request Phase, em ordem. Quando um behavior encerra o processamento, como faz _Deny (403 Forbidden)_, a Application responde ao cliente e nenhum behavior ou regra posterior é executado. +3. Quando uma regra com _Set Cache Policy_ aplicou um cache setting, Cache procura uma cópia válida da resposta da origem. Se encontra uma, essa cópia se torna a resposta, e a origem não recebe nenhuma requisição. +4. Caso contrário, o Connector que uma regra com _Set Connector_ definiu encaminha a requisição à origem, e a resposta da origem volta por esse Connector. +5. A Application executa as suas regras da Response Phase sobre a resposta, e o cliente recebe o resultado. -Escolher a origem por requisição é o que permite que uma aplicação envie `/api/` para um servidor e todos os outros paths para outro, com duas regras e dois connectors. O preço é que nada chega a uma origem por padrão. Sem nenhuma regra que nomeie um connector, uma aplicação não tem origem para onde enviar uma requisição, e uma aplicação nova não tem regras. Para a primeira regra que envia as requisições de uma aplicação a uma origem, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +Como uma regra escolhe a origem de cada requisição, uma Application pode encaminhar `/api/` para um servidor e todos os outros paths para outro, com duas regras e dois Connectors. O custo é que nenhuma requisição chega a uma origem por padrão: uma Application nova não tem regras, então nenhum Connector é definido para as suas requisições. Para criar a primeira regra que encaminha as requisições de uma Application a uma origem, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). --- ## Fases de requisição e de resposta -Cada regra de uma aplicação pertence a uma de duas fases, e a aplicação as executa em uma sequência fixa. As regras da Request Phase são executadas quando a requisição chega, antes que a aplicação tenha uma resposta sobre a qual trabalhar. As regras da Response Phase são executadas quando a aplicação entrega a resposta ao usuário, e cada entrega é tratada separadamente. A fase é escolhida na seção **Phase** quando a regra é criada, e não pode ser alterada depois. Para executar a mesma lógica na outra fase, você cria uma regra nova nela. +Cada regra de uma Application pertence a uma fase, e as duas fases são executadas em uma ordem fixa: a Request Phase antes que exista uma resposta, depois a Response Phase sobre a resposta que a Application entrega. Você define a fase de uma regra quando a cria e não pode mudá-la depois. Na API, o endpoint que recebe a regra define a fase dela: `request_rules` ou `response_rules`. Para executar a mesma lógica na outra fase, adicione uma segunda regra nessa fase. + +O diagrama acompanha uma requisição no caminho até uma origem. As setas sólidas levam a requisição, e as setas pontilhadas levam a resposta. Cada rótulo começa com o número do seu passo abaixo. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Cliente"]) + ReqRules["Application: regras da Request Phase"] + RespRules["Application: regras da Response Phase"] + Cache["Cache"] + Conn["Connector"] + Origin[["servidor de origem"]] + Client -->|"1. requisição"| ReqRules + ReqRules -->|"2. Set Cache Policy"| Cache + ReqRules -->|"2. Set Connector, Bypass Cache"| Conn + Conn -->|"2. requisição"| Origin + Cache -.->|"3. cópia armazenada"| RespRules + Origin -.->|"3. resposta"| Conn + Conn -.->|"3. resposta"| RespRules + RespRules -.->|"4. resposta"| Client +``` -O que cada fase pode ler decorre dessa sequência. Uma regra da Request Phase lê o que a requisição carrega, como a URI, os headers e os cookies dela, mas nada sobre a resposta, que ainda não existe. Uma regra da Response Phase também pode ler o que voltou, como `${status}` e os headers que a origem enviou. Cada fase também oferece o seu próprio conjunto de behaviors: _Set Connector_, _Set Cache Policy_, _Bypass Cache_ e _Optimize Images_ são executados somente na Request Phase. +1. A requisição chega, e as regras da Request Phase são executadas sobre ela primeiro. Elas podem ler o que a requisição carrega, como a sua URI, os seus headers e os seus cookies, mas nada sobre a resposta, que ainda não existe. +2. Essas regras decidem o cache e a origem. _Set Cache Policy_ aplica um cache setting, _Bypass Cache_ faz a requisição ignorar o cache e _Set Connector_ define o Connector que encaminha a requisição à origem. Esses três behaviors e _Optimize Images_ só são executados na Request Phase. Nessa fase, _Add Request Header_ adiciona um header à requisição que a origem recebe. +3. A resposta volta: ou uma cópia de uma resposta da origem que Cache armazenou, ou a resposta da origem pelo Connector. +4. As regras da Response Phase são executadas sobre essa resposta, uma vez para cada entrega ao usuário. Elas também podem ler o que voltou, como `${status}` e os headers que a origem enviou. Nessa fase, _Add Response Header_ adiciona um header à resposta que o usuário recebe. -O cache é decidido na Request Phase. Uma regra com _Set Cache Policy_ escolhe o cache setting da requisição, e uma regra com _Bypass Cache_ envia a requisição para fora do cache. A resposta é desconhecida nesse ponto, então uma regra não pode escolher um cache setting a partir do status code que a origem retorna: `${status}` só pode ser lido na Response Phase, e _Set Cache Policy_ só é executado na Request Phase. +Como a Request Phase é executada primeiro, o cache é decidido antes que a resposta exista. Uma regra não pode aplicar um cache setting com base no status code que a origem retorna, porque `${status}` só pode ser lido na Response Phase e _Set Cache Policy_ só é executado na Request Phase. -Alguns behaviors funcionam nas duas fases e mudam de alvo conforme a fase. _Add Request Header_ adiciona um header à requisição enviada à origem, e o mesmo behavior em uma regra da Response Phase o adiciona à resposta enviada ao usuário. _Redirect To_ em uma regra da Response Phase só é executado quando a origem retorna `404`. Por exemplo, um redirecionamento na Response Phase pode enviar o usuário a outra página quando a origem não tem nada no path, enquanto uma requisição para um path que existe passa sem alteração. _Run Function_ também funciona nas duas fases, e o formulário de instância de função no Azion Console informa o limite da segunda: `Only Lua functions can be used in the Response phase.` Para as variáveis e os behaviors que cada fase aceita, consulte [Fases](/pt-br/documentacao/plataforma/applications/rules-engine/#fases). +Alguns behaviors funcionam nas duas fases, e a fase limita o que eles fazem. Em uma regra da Response Phase, _Redirect To_ só é executado quando a origem retorna `404`. Então, um redirecionamento nessa fase pode enviar o usuário para outra página quando a origem não tem nada no path e deixar intactas as requisições para paths que existem. _Run Function_ também funciona nas duas fases, mas a Response Phase só aceita Functions escritas em Lua. O formulário da Function Instance no Azion Console informa esse limite: `Only Lua functions can be used in the Response phase.` [Fases](/pt-br/documentacao/plataforma/applications/rules-engine/#fases) lista as variáveis e os behaviors que cada fase aceita. --- ## Como as regras são executadas -Dentro de uma fase, uma aplicação executa as suas regras na ordem delas. Cada regra compara os seus critérios com a requisição, e uma regra cujos critérios correspondem executa os seus behaviors na ordem em que estão dispostos. Uma regra cujos critérios não correspondem não executa nada, e a aplicação passa para a regra seguinte. A aplicação continua até que todas as regras da fase sejam executadas ou até que um behavior encerre o processamento. Para as variáveis, os operadores e os condicionais que os critérios combinam, consulte [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#criterios). +Dentro de uma fase, a Application pega as suas regras uma de cada vez, em ordem. Ela para quando todas as regras da fase foram executadas ou quando um behavior encerra o processamento. -Cada regra carrega um `order`, que a plataforma atribui conforme as regras são criadas, começando em `0` para a primeira regra de uma fase. A lista do **Rules Engine** no Azion Console pode ser reordenada, e a API reordena uma fase com uma única chamada. Alguns behaviors não podem ser adicionados juntos à mesma regra, ou só podem sob certas condições, e o Console recusa essas combinações. +As setas sólidas acompanham uma requisição pelas regras de uma fase. Cada rótulo começa com o número do seu passo abaixo. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Req(["requisição"]) + Next["Application: próxima regra, em ordem"] + Match{"os critérios correspondem?"} + Run["Application: behaviors da regra, em ordem"] + Stop["Application: processamento encerrado"] + Done["Application: fase concluída"] + Req -->|"1. entra na fase"| Next + Next -->|"2. regra encontrada"| Match + Match -->|"2. não"| Next + Match -->|"3. sim"| Run + Run -->|"4. um behavior o encerra"| Stop + Run -->|"5. nenhum behavior o encerra"| Next + Next -->|"5. nenhuma regra restante"| Done +``` + +1. A requisição entra em uma fase, e a Application pega a primeira regra dessa fase. +2. A Application compara os critérios da regra com a requisição. Se eles não correspondem, a regra não executa nada, e a Application passa para a próxima regra. +3. Se correspondem, a regra executa os seus behaviors um após o outro, na ordem em que você os organizou. +4. Quando um desses behaviors encerra o processamento, nada depois dele é executado na fase. +5. Caso contrário, a Application passa para a próxima regra, até que não reste nenhuma regra da fase. + +[Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#criterios) lista as variáveis, os operadores e os condicionais que os critérios combinam. + +A posição de uma regra é o seu `order`. A plataforma o atribui quando você cria a regra, a partir de `0` para a primeira regra de cada fase. Você pode mudar a ordem das regras no Azion Console ou reordenar uma fase com uma única chamada à API. + +Alguns behaviors não podem ficar juntos na mesma regra, e a API e Azion Console recusam essas combinações. [Behaviors](/pt-br/documentacao/plataforma/applications/rules-engine/#behaviors) as lista. ### Behaviors que se repetem -Várias regras que correspondem à requisição podem carregar o mesmo behavior, e o tipo do behavior decide o que acontece. Um behavior do tipo Set, como _Set Connector_, não se acumula: só é executado o da última regra cujos critérios corresponderam. Por exemplo, considere uma regra que nomeia um connector para todos os paths, seguida de uma regra que nomeia outro connector para `/api/`. Uma requisição para `/api/` corresponde às duas e passa pelo connector da segunda regra. +Quando várias regras correspondem a uma requisição e carregam o mesmo behavior do tipo Set, como _Set Connector_, o behavior não se acumula: só o da última regra correspondente é executado. Por exemplo, uma primeira regra define um Connector para todos os paths, e uma segunda regra define outro Connector para `/api/`. Uma requisição para `/api/` corresponde às duas regras, então o Connector da segunda regra a encaminha. -Já um behavior do tipo Add se acumula. _Add Cookie_ e _Add Request Header_ são executados uma vez para cada regra que os carrega, então o mesmo nome e o mesmo valor adicionados por duas regras chegam como duas entradas idênticas. +_Add Request Header_ também não repete um header: quando duas regras correspondentes adicionam um header com o mesmo nome, a origem o recebe uma vez, com o valor da última dessas regras. -A ordem das regras decide, portanto, o resultado tanto quanto as próprias regras. Uma regra ampla no início da lista define um padrão, e uma regra restrita mais adiante na lista o substitui para as requisições que correspondem a ela. O custo é que reordenar a lista pode mudar o connector que um path alcança, sem nenhuma alteração em nenhuma regra. +Então, a ordem das regras molda o resultado tanto quanto o conteúdo delas. Uma regra ampla perto do topo define um padrão, e uma regra mais específica mais abaixo substitui esse padrão para as requisições às quais ela corresponde. O mesmo mecanismo tem um custo: mover uma regra na lista pode mudar o Connector a que um path chega, mesmo sem nenhuma regra alterada. ### Behaviors que encerram o processamento -Alguns behaviors finalizam o processamento da requisição, e nenhum behavior ou regra depois deles é executado. _Deny (403 Forbidden)_ responde com uma página `403 Forbidden`. _Deliver_ entrega o conteúdo ao usuário, e _Redirect To_ envia o usuário a outra URL com `301` ou `302`. _Finish Request Phase_ encerra a Request Phase: os behaviors depois dele na sua regra e as regras depois dessa regra não são executados. +Alguns behaviors interrompem o processamento de uma requisição, e nada depois deles é executado: nenhum behavior posterior na regra deles e nenhuma regra posterior. _Deny (403 Forbidden)_ responde com uma página `403 Forbidden`, _Deliver_ entrega o conteúdo ao usuário e _Redirect To_ envia o usuário para outra URL com um status `301` ou `302`. _Finish Request Phase_ encerra a Request Phase no ponto em que é executado, então o restante da sua regra e todas as regras posteriores dessa fase são ignorados. -Um behavior que encerra o processamento é ao mesmo tempo um atalho e uma armadilha. Colocado no início, ele resolve a requisição antes que qualquer regra posterior atue sobre ela. Colocado antes de uma regra de que você ainda precisa, ele impede que essa regra seja executada para cada requisição que corresponde à regra anterior. Para ver quais regras foram executadas em uma requisição, ative **Debug Rules** em **Main Settings**. Para mais informações, consulte [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules). +Um behavior que encerra o processamento economiza trabalho e também pode esconder uma regra. No início da lista, ele resolve a requisição antes que as regras seguintes gastem tempo com ela. Colocado antes de uma regra de que você ainda precisa, ele impede que essa regra seja executada em cada requisição à qual a regra anterior corresponde. Com Debug Rules ativo, [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) e [Data Stream](/pt-br/documentacao/plataforma/data-stream/) mostram quais regras cada requisição executou. Debug Rules é o campo `debug` da Application na API, e [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) mostra onde ativá-lo no Azion Console. --- -## O que uma aplicação nova tem +## O que uma Application nova tem -Uma aplicação nova começa com dois Produtos ativos e nenhuma regra. Criada pela API somente com `name` e `active`, uma aplicação retorna estes campos: +Uma Application nova tem dois switches ativos, Cache e Functions, e nenhuma regra. Quando você cria uma Application pela API só com `name` e `active`, a resposta traz estes campos: ```json { @@ -105,11 +169,11 @@ Uma aplicação nova começa com dois Produtos ativos e nenhuma regra. Criada pe } ``` -A lista das suas regras de requisição volta vazia, com `count` igual a `0`. No Azion Console, os Produtos ficam na seção **Modules** de **Main Settings**, cujos **Default Modules** são **Application Accelerator**, **Cache**, **Functions** e **Image Processor**. O switch **Cache** carrega a nota `Automatically enabled in all accounts.` Tiered Cache não tem switch nessa seção, porque é um toggle dentro de cada cache setting. Para cada switch e o seu campo na API, consulte [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#produtos). +A lista das suas regras de requisição vem vazia, com `count` em `0`. As quatro chaves de `modules` são os quatro switches de uma Application, e [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) mostra cada um no Azion Console e na API. Cache não pode ser desativado: a API recusa `false` em `modules.cache.enabled` com `31001`, e, no Azion Console, o switch **Cache** fica travado como ativo, com a nota `Automatically enabled in all accounts.` [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) não é um desses switches: é uma feature de Cache, e cada cache setting a ativa no seu campo `modules.cache.tiered_cache.enabled`. -Ter Cache ativo não significa que algo seja armazenado em cache. Um cache setting só alcança uma requisição quando uma regra o aplica, e uma aplicação nova não tem cache settings nem regras. Cache em uma aplicação nova, portanto, não armazena nada até que você crie um cache setting e uma regra com _Set Cache Policy_ que o nomeie. +Cache está ativo, mas só armazena cópias depois que uma regra aplica um cache setting, e uma Application nova não tem cache settings nem regras. Cache começa a armazenar cópias quando você cria um cache setting e uma regra com _Set Cache Policy_ que o aplica. -Um Produto desativado mantém as suas opções fora de alcance. No formulário do **Rules Engine**, Azion Console marca uma opção que precisa de um Produto com _- Required Application Accelerator_, _- Required Image Processor_ ou _- Required Function_. A API recusa uma regra que usa uma dessas opções. Por exemplo, uma regra de requisição cujo critério lê `${request_uri}`, em uma aplicação com Application Accelerator desativado, retorna `400` com este corpo: +Enquanto um switch está desativado, as opções de regra que dependem dele ficam indisponíveis. O formulário do **Rules Engine** no Azion Console marca cada uma dessas opções com _- Required Application Accelerator_, _- Required Image Processor_ ou _- Required Function_, e a API recusa uma regra que usa uma delas. Por exemplo, em uma Application com Application Accelerator desativado, uma regra de requisição com um critério sobre `${request_uri}` retorna `400` com este corpo: ```json { @@ -130,49 +194,51 @@ Um Produto desativado mantém as suas opções fora de alcance. No formulário d } ``` -A mesma regra com `${uri}` no lugar de `${request_uri}` é aceita, porque `${uri}` não precisa de nenhum Produto. Essa restrição impede que uma regra dependa de um Produto que a aplicação não executa. O custo é uma escolha entre duas variáveis: `${uri}` guarda a URI decodificada sem a query string, e `${request_uri}`, que mantém a query string, precisa de Application Accelerator. Para as variáveis e os behaviors que cada Produto acrescenta, consulte [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#behaviors). +A API aceita a mesma regra com `${uri}` no lugar de `${request_uri}`, porque `${uri}` não depende de nenhum recurso da plataforma. Essa verificação impede que uma regra dependa de um recurso da plataforma que está desativado na Application. A contrapartida é escolher entre duas variáveis: `${uri}` guarda a URI decodificada sem a query string, enquanto `${request_uri}` mantém a query string e precisa de Application Accelerator. [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#behaviors) lista as variáveis e os behaviors que cada recurso da plataforma acrescenta. --- ## Propagação -Uma alteração em uma aplicação não chega ao tráfego de imediato. Ela se propaga pela infraestrutura distribuída da Azion, e nenhuma duração é garantida. Aplicar uma regra nova em uma aplicação que já atende tráfego pode levar alguns minutos. Um workload novo responde com o `404` de placeholder da Azion até que o seu vínculo com a aplicação se propague, o que pode levar vários minutos. +Uma alteração em uma Application só chega ao tráfego depois de se propagar pela infraestrutura distribuída da Azion, e a Azion não garante nenhum tempo de propagação. Uma regra nova em uma Application que já atende tráfego pode levar alguns minutos para valer. O deployment de um Workload novo pode levar vários minutos para se propagar e, até lá, o Workload responde com o `404` de placeholder da Azion. -Durante a propagação, as respostas se alternam. Uma requisição retorna o `404` de placeholder, e a seguinte retorna a resposta da aplicação, dependendo de qual data center responde. Uma única requisição depois de uma alteração, portanto, prova pouco: um workload que respondeu uma vez pode retornar o placeholder na requisição seguinte. Envie a requisição de novo até que ela responda como esperado e as respostas concordem. +Enquanto uma alteração se propaga, as respostas se alternam, porque cada requisição pode chegar a um data center diferente. Uma requisição retorna o `404` de placeholder, e a seguinte retorna a resposta da Application. Uma resposta correta depois de uma alteração não prova que a alteração está no ar, porque a requisição seguinte ainda pode retornar o placeholder. Repita a requisição até que todas as respostas sejam a que você espera. -Um firewall nomeado pelo mesmo deployment pode entrar no caminho muito depois da aplicação. Um domínio que responde, portanto, não significa que o firewall já está no caminho. Para mais informações, consulte [Firewall](/pt-br/documentacao/plataforma/firewall/). +Um Firewall que o mesmo deployment define pode entrar no caminho bem depois da Application. Então, um domínio que já responde ainda pode atender requisições que não passam pelo Firewall. Para ver como um Firewall age sobre as requisições, consulte [Firewall](/pt-br/documentacao/plataforma/firewall/). --- ## Cache -Um cache mantém uma cópia de uma resposta da origem no data center que a buscou. As requisições seguintes pelo mesmo objeto são respondidas por essa cópia, e a origem não é consultada de novo. A cópia é indexada por uma cache key montada a partir da requisição, e é mantida por um tempo de vida, o TTL. Quando o TTL termina, a cópia expira, e a requisição seguinte verifica a origem. +Um cache armazena uma cópia de uma resposta da origem no data center que a buscou. As requisições seguintes pelo mesmo objeto recebem essa cópia, e a origem não recebe nenhuma requisição por elas. Cada cópia é arquivada sob uma cache key, construída a partir da requisição, e mantida pelo seu tempo de vida (TTL). Quando o TTL termina, a cópia expira, e a próxima requisição por esse objeto consulta a origem. + +Em uma Application, Cache armazena essas cópias, e ele está ativo em toda Application que você cria. Um cache setting pertence a uma Application e guarda os TTLs e as entradas que tornam duas requisições diferentes. Um cache setting só age por meio de uma regra da Request Phase, que aplica esse cache setting com _Set Cache Policy_ às requisições às quais a regra corresponde. _Bypass Cache_ faz o contrário e faz a requisição ignorar o cache. -Em uma aplicação, Cache é o Produto que mantém essas cópias, e ele está ativo em cada aplicação que você cria. Um cache setting, criado com **+ Cache** na aba **Cache Settings**, guarda os TTLs e o que torna duas requisições diferentes. Uma regra da Request Phase com _Set Cache Policy_ aplica um cache setting às requisições que correspondem a ela, e uma regra com _Bypass Cache_ envia uma requisição para fora do cache. Cada campo e o seu padrão estão em [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/), e o formato completo da key está em [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). A variação de cache por query string, cookie, device group e método pertence a [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). Para criar um primeiro cache setting e a regra que o aplica, consulte [Primeiros passos com Cache](/pt-br/documentacao/plataforma/applications/cache/primeiros-passos/). +[Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) lista cada campo e o seu padrão, e [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/) traz o formato completo da key. Para variar o cache por query string, cookie, device group ou método, você precisa de [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). [Primeiros passos com Cache](/pt-br/documentacao/plataforma/applications/cache/primeiros-passos/) cria um primeiro cache setting e a regra que o aplica. -Para saber onde Cache age sobre uma requisição, consulte a [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao) e, para saber por quanto tempo uma cópia vive e o que a encerra, [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). +A [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao) mostra onde Cache age sobre uma requisição, e [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/) explica quanto tempo uma cópia dura e o que a encerra. --- ## Application Accelerator -Um cache encontra uma cópia armazenada por uma key montada a partir da requisição, e uma key montada apenas a partir da URL pressupõe que uma URL tem uma única resposta correta. Conteúdo dinâmico quebra essa premissa. Sob uma única URL, um visitante autenticado vê o próprio carrinho, uma listagem se reordena a partir de um filtro e um layout muda no celular. Um cache que monta a key apenas pela URL então entrega a resposta de um visitante a outro, ou o path deixa de ser armazenado em cache. +Uma cache key construída só a partir da URL supõe que cada URL tem uma única resposta correta. O conteúdo dinâmico quebra essa suposição: sob uma única URL, um visitante autenticado vê o próprio carrinho, uma listagem se reordena quando um filtro muda e o layout difere em um celular. Com uma key construída só a partir da URL, o cache ou entrega a resposta de um visitante a outro, ou não consegue armazenar o path em cache. -Em uma aplicação, Application Accelerator é o Produto que remove essa premissa. Um switch, **Application Accelerator** em **Main Settings** › **Modules**, o ativa somente para aquela aplicação, e o switch vem desativado em uma aplicação nova. As variações que ele permite ficam na seção **Application Accelerator** de um cache setting, que é o objeto `modules.application_accelerator` do setting na API. Se você já escreveu um header `Vary` ou uma regra de cache key, o modelo se mantém: você nomeia as entradas que tornam duas requisições diferentes. Os nomes dos campos, os tipos e os padrões estão em [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/), e os limites de TTL estão em [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#application-accelerator). Para ativar o switch e variar um primeiro cache setting, consulte [Primeiros passos com Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/primeiros-passos/). +Em uma Application, Application Accelerator libera a variação de cache, que remove essa suposição, e mais três capacidades para conteúdo dinâmico. Ele vem desativado em uma Application nova, e cada Application o ativa separadamente, no seu campo `modules.application_accelerator.enabled` na API. Cada cache setting guarda, então, as suas próprias variações, no seu próprio objeto `modules.application_accelerator`. Se você já escreveu um header `Vary` ou uma regra de cache key, o modelo é o mesmo: você lista as entradas que tornam duas requisições diferentes. [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) lista cada campo, o seu tipo e o seu padrão, e [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#application-accelerator) traz os limites de TTL. Para ativar Application Accelerator e acrescentar uma primeira variação a um cache setting, consulte [Primeiros passos com Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/primeiros-passos/). -Para saber como uma variação altera a cache key, consulte a [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao) e, para saber o que o switch libera e o que uma variação custa, [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/). +A [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao) mostra como uma variação muda a cache key, e [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/) explica o que ativá-lo libera e quanto custa cada variação. --- ## Image Processor -Uma imagem em uma página muitas vezes precisa chegar em vários tamanhos, recortes e formatos, um para cada layout e browser. Construir cada variante com antecedência significa armazenar um arquivo por variante e reconstruir todos quando o original muda. Uma transformação aplicada quando uma requisição a pede trabalha, em vez disso, a partir de um único original: a URL descreve a variante, e a plataforma a constrói sob demanda. +Uma página costuma precisar da mesma imagem em vários tamanhos, recortes e formatos, um para cada layout e browser. Preparar cada variante com antecedência significa um arquivo armazenado por variante e a reconstrução de todos eles sempre que o original muda. Transformar a imagem no momento da requisição evita as duas coisas: a URL descreve a variante, e a plataforma a constrói a partir de um único original quando uma requisição a pede. -Em uma aplicação, Image Processor é o Produto que constrói essas variantes. A URL carrega a descrição na query string `ims`. Image Processor aplica essa descrição à imagem de origem que está no servidor de origem e retorna o resultado, a imagem derivada. A imagem de origem nunca é modificada, e a imagem derivada nunca é armazenada como um ativo próprio. Um único arquivo responde, portanto, a cada tamanho, recorte, qualidade e formato que uma página pede. +Em uma Application, Image Processor constrói essas variantes. A URL da requisição descreve a variante na sua query string `ims`, e Image Processor aplica essa descrição à imagem de origem, que fica na origem. Mesmo sem a query string `ims`, Image Processor pode converter a imagem para um formato que o navegador aceita. O resultado, a imagem derivada, é o que o cliente recebe. Image Processor lê a imagem de origem sem alterá-la e retorna a imagem derivada sem salvá-la como um ativo da conta. Então, um único arquivo na origem atende a cada tamanho, recorte, qualidade e formato que uma página pede. -O switch, **Image Processor** em **Main Settings** › **Modules**, vem desativado em uma aplicação nova. As operações que `ims` aceita estão em [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/), e os headers e os behaviors estão em [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/). Para requisitar uma primeira imagem derivada, consulte [Primeiros passos com Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/primeiros-passos/). +Image Processor vem desativado em uma Application nova, e cada Application o ativa separadamente, no seu campo `modules.image_processor.enabled` na API. Mesmo ativo, Image Processor só age sobre as requisições às quais uma regra da Request Phase com _Optimize Images_ corresponde. [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/) lista as operações que `ims` aceita, e [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/) cobre os headers e os behaviors. Para ativar Image Processor e pedir uma primeira imagem derivada, siga [Primeiros passos com Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/primeiros-passos/). -Para saber onde Image Processor age sobre uma requisição, consulte a [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao) e, para saber como o formato entregue é escolhido e onde Image Processor para, [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/). +A [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao) mostra onde Image Processor age sobre uma requisição, e [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/) explica como o formato entregue é escolhido e onde Image Processor para. --- @@ -180,9 +246,9 @@ Para saber onde Image Processor age sobre uma requisição, consulte a [visão g - Cada variável, operador e behavior que uma regra combina, por fase, com o Produto que cada um exige. - O switch de cada Produto, Debug Rules e os campos da API por trás dos padrões de uma aplicação nova. - O caminho mais curto de uma aplicação nova até uma regra que envia as requisições dela a uma origem. - As recomendações que decorrem desses mecanismos, para a aplicação e para cada Produto habilitado nela. + As variáveis, os operadores e os behaviors de cada fase, com o recurso da plataforma de que cada um precisa. + Cada switch, Debug Rules e os campos da API por trás dos padrões de uma Application nova. + Crie a primeira regra que encaminha as requisições de uma Application nova à sua origem. + Recomendações que seguem desses mecanismos, para a Application e para cada recurso da plataforma ativo nela. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/applications/glossario.mdx b/apps/docs/src/content/docs/pt-br/pages/build/applications/glossario.mdx index 9a4cabf55b..6cb296bc0b 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/applications/glossario.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/applications/glossario.mdx @@ -1,78 +1,59 @@ --- title: Glossário -description: O que aplicação, regra, fase, critério, behavior, cache setting, cache key, Tiered Cache e os demais termos da documentação de Applications significam. +description: Consulte o que Application, regra, fase, critério, behavior, cache setting, cache key, Tiered Cache e os demais termos de Applications significam. meta_tags: 'applications, glossary, terms, cache, application accelerator, image processor, rules engine, cache key' namespace: documentation_products_applications_glossary permalink: /documentacao/plataforma/applications/glossario/ --- -[Applications](/pt-br/documentacao/plataforma/applications/) e os Produtos habilitados em uma aplicação, [Cache](/pt-br/documentacao/plataforma/applications/cache/), [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/), usam cada termo desta tabela em um sentido próprio. +Definições dos termos que a documentação de [Applications](/pt-br/documentacao/plataforma/applications/) usa, incluindo os de [Cache](/pt-br/documentacao/plataforma/applications/cache/), [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/). | Termo | Definição | | --- | --- | -| ação | O nome que outras plataformas dão ao que uma regra faz com uma requisição a que corresponde, e que uma aplicação chama de behavior. Uma regra que encaminha por path em outro lugar se transfere com a condição de correspondência como critérios, a ação como behaviors e o servidor de backend como um connector. [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#behaviors) lista cada behavior. | -| Add Request Header | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que adiciona um header na forma `Field: value` à requisição, na **Request Phase**, `add_request_header` na API. Uma requisição que Image Processor converte para WEBP precisa carregar `Accept: image/webp`, e este behavior o adiciona. A API recusa o nome `add_header` com `10039 Invalid Choice`. | -| Advanced Cache Key | O recurso que varia a cache key por partes de uma requisição além da URL: a query string, os cookies, os device groups e o método da requisição. Ele exige Application Accelerator na aplicação, e um cache setting o configura por meio dos seus quatro controles **Cache vary by**. Azion Console não dá o nome dele a nenhum controle: os controles ficam na seção **Application Accelerator** do cache setting, que [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) documenta. | -| allowlist | O valor do campo `behavior` de um controle **Cache vary by** que varia a cache key só pelos atributos que o cache setting nomeia e ignora todos os outros que a requisição carrega. O dropdown **Behavior** de Azion Console o mostra como _Allowlist_. Ele limita quantos objetos uma variação cria, porque um atributo que o setting não nomeia não produz mais nenhum objeto; [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) lista os valores que cada controle aceita. | -| aplicação | Uma instância de Applications, o recurso de plataforma que contém a lógica que um workload executa sobre as suas requisições, definida nas abas **Main Settings**, **Device Groups**, **Cache Settings**, **Functions Instances** e **Rules Engine**. Uma nova aplicação começa com Cache e Functions ativos, Application Accelerator e Image Processor desativados e nenhuma regra. Um [workload](/pt-br/documentacao/plataforma/workloads/) a seleciona no campo **Application** das suas **Deployment Settings**, a API a serve em `/v4/workspace/applications`, e [Applications](/pt-br/documentacao/plataforma/applications/) documenta o recurso. | -| Application Accelerator | O Produto habilitado em uma aplicação que coloca o restante de uma requisição na cache key. O seu switch, **Application Accelerator** em **Main Settings** › **Modules**, fica desativado em uma nova aplicação e libera a variação de cache, o cache de respostas `POST` e `OPTIONS`, um **Max Age** menor que 60 segundos, sete behaviors do Rules Engine e as variáveis `${request_uri}` e `${device_group}`. [Applications](/pt-br/documentacao/plataforma/applications/#application-accelerator) o descreve, e a [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao) acompanha uma requisição por ele. | -| behavior | A ação que uma regra executa sobre as requisições às quais os seus critérios correspondem, como **Set Cache Policy**, **Set Connector** ou **Run Function**. Uma regra executa os seus behaviors na ordem em que os lista, um behavior finalizador interrompe todo behavior e toda regra depois dele, e [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) nomeia o Produto que cada behavior exige. Em um cache setting, `behavior` também é o campo de cada controle **Cache vary by**, e [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) lista os valores de cada um. | -| Bypass Cache | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) que envia à origem cada requisição à qual a sua regra corresponde e mantém a resposta fora do cache da Azion, `bypass_cache` na API. Ele roda na **Request Phase**, exige Application Accelerator, deixa o browser cache a cargo de **Set Cache Policy** e difere de um TTL de 0 segundos, como [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0) explica. Ele não alcança [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache): uma aplicação com cache settings de Tiered Cache ativos continua armazenando objetos nessa camada pelo TTL mínimo. | -| Cache | O Produto habilitado em uma aplicação que armazena cópias de respostas na infraestrutura distribuída da Azion e responde a requisições posteriores a partir delas. O seu switch em **Main Settings** › **Modules** traz o texto de ajuda "Automatically enabled in all accounts.", e uma nova aplicação informa `modules.cache.enabled` como `true`. [Applications](/pt-br/documentacao/plataforma/applications/#cache) o descreve, e a [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao) acompanha uma requisição por ele. | -| cache key | A entrada de índice sob a qual Cache armazena um objeto, com diferenciação entre maiúsculas e minúsculas. No Cache, a configuração padrão ignora a query string, então a key concatena o scheme, o host e o path, como em `httpsstatic.example.com/page/site.js`, e cada variação acrescenta algo a ela: um prefixo de método, os argumentos de query string que um setting nomeia ou um valor depois do separador `@@`. No Image Processor, o cache setting que serve imagens nomeia `ims` na sua allowlist de query string, e uma imagem convertida carrega o seu formato depois de `@@`; [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key) documenta cada forma. | -| cache setting | O objeto, criado com **+ Cache** na aba **Cache Settings** de uma aplicação, que define por quanto tempo o cache da Azion e o navegador mantêm uma resposta e o que torna duas requisições diferentes. As suas seções **Browser Cache** e **Cache** trazem **Max Age**, **Stale cache**, **Large file optimization** e **Tiered Cache**, e a sua seção **Application Accelerator** traz os quatro controles **Cache vary by**. Ele pertence a uma aplicação e não se aplica a nenhuma requisição até que uma regra com **Set Cache Policy** o nomeie; [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) documenta cada campo. | -| Cache vary by Cookies | O controle do cache setting que varia a cache key pelo valor de cookies nomeados, `cache_vary_by_cookies` na API. Ele traz um `behavior` e, em `cookie_names`, a lista de cookies a que o behavior se aplica. | -| Cache vary by Devices | O controle do cache setting que varia a cache key por [device group](/pt-br/documentacao/plataforma/applications/device-groups/), `cache_vary_by_devices` na API. Ele traz um `behavior` e, em `device_group`, a lista de device groups a que o behavior se aplica. | -| Cache vary by Method | O controle do cache setting que nomeia os métodos de requisição cujas respostas a Azion coloca em cache, `cache_vary_by_method` na API e vazio por padrão. Ele aceita `POST`, `OPTIONS` ou os dois, enviados como `post` e `options`, e nada além disso. Sem Application Accelerator na aplicação, a API recusa um valor com `21013`. | -| Cache vary by Query String | O controle do cache setting que varia a cache key por argumentos de query string nomeados, `cache_vary_by_querystring` na API. Ele traz um **Behavior**, os **Fields** a que o behavior se aplica, um por linha em Azion Console, e **Sort**. | -| condição de correspondência | O nome que outras plataformas dão ao teste que decide se uma regra age sobre uma requisição, e que uma aplicação chama de critério. Os critérios se combinam com `and` e `or`, e [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#criterios) lista cada variável e operador. | -| connector | O objeto para o qual uma aplicação envia requisições para que elas cheguem à sua origem, criado em [Connectors](/pt-br/documentacao/plataforma/connectors/), o recurso de plataforma que assumiu as configurações antes feitas em **Origins**. Uma regra com o behavior **Set Connector** o seleciona pelo ID. Um connector pode alcançar várias origens e distribuir o tráfego entre elas por meio de [Load Balancer](/pt-br/documentacao/plataforma/connectors/load-balancer/). | -| critério | Uma condição única dentro de uma regra: uma variável como `${uri}`, um operador de comparação e um argumento quando o operador aceita um, enviados na API como `variable`, `operator`, `conditional` e `argument`. Os critérios se combinam com `and` e `or`, `and` tem precedência implícita, e a API os carrega como um array de grupos, `[[{...}]]`. [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) lista cada variável e operador. | -| Debug Rules | A seção de **Main Settings** que registra as regras do Rules Engine que cada requisição executou, `debug` na API e desativada em uma nova aplicação. Com ela ativa, as regras executadas aparecem no campo `$traceback` em Data Stream e em [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/), e no campo `stacktrace` da [API GraphQL do Real-Time Events](/pt-br/documentacao/devtools/graphql/campos-gql-real-time-events/). Para ler esses logs, consulte [Depure regras criadas com Rules Engine](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/debug-regras/). | -| denylist | O valor do campo `behavior` de um controle **Cache vary by** que varia a cache key por todos os atributos que a requisição carrega, exceto os que o cache setting nomeia. O dropdown **Behavior** o mostra como _Denylist_, e [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) lista os controles que o aceitam. | -| device group | Um conjunto nomeado de dispositivos que uma aplicação reconhece comparando o header `User-Agent` de uma requisição com uma expressão regular, criado na aba **Device Groups**. Uma regra o testa por meio da variável `${device_group}`, que exige Application Accelerator, e **Cache vary by Devices** varia a cache key por ele. [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/) documenta a correspondência. | -| edge hostname | O nome que outras plataformas dão ao hostname que elas atribuem à configuração que serve os seus domínios. Na Azion, é o domínio do workload, que a Azion atribui a um workload novo em `map.azionedge.net`. Os domínios pertencem ao [workload](/pt-br/documentacao/plataforma/workloads/), não à aplicação, e [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/) envia uma primeira requisição ao domínio do workload. | -| fase | Um dos dois estágios em que uma aplicação executa regras: a **Request Phase**, que trata a requisição antes que exista uma resposta, e a **Response Phase**, que trata a resposta entregue ao usuário. Você escolhe a fase ao criar uma regra, e ela não pode ser alterada depois, então uma regra na outra fase é uma nova regra. O cache é decidido na **Request Phase**, e [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) lista as fases em que cada variável e cada behavior estão disponíveis. | +| Add Request Header | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que adiciona um header na forma `Field: value` à requisição, na Request Phase, `add_request_header` na API. Com `Accept: image/webp`, ele faz a conversão automática do Image Processor entregar WEBP a toda requisição à qual a sua regra corresponde. A API recusa o nome `add_header` com `10039 Invalid Choice`. | +| Advanced Cache Key | Uma feature de Application Accelerator que varia a cache key por partes de uma requisição além da URL: a query string, os cookies, os device groups e o método da requisição. Ela exige Application Accelerator ativo na Application, e cada cache setting a configura no seu objeto `modules.application_accelerator`, por meio dos quatro controles Cache vary by. [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) documenta cada controle e onde ele fica no Azion Console e na API. | +| Application | A entidade que executa as suas regras nas requisições recebidas por um [Workload](/pt-br/documentacao/plataforma/workloads/), depois que o deployment desse Workload define essa Application. Uma Application nova começa com Cache e Functions ativos, Application Accelerator e Image Processor desativados e nenhuma regra. No Azion Console, o campo **Application** das **Deployment Settings** de um Workload define essa Application, a API serve as suas Applications em `/v4/workspace/applications`, e [Applications](/pt-br/documentacao/plataforma/applications/) documenta o recurso da plataforma. | +| Application Accelerator | Um recurso da plataforma aninhado em Applications que libera quatro capacidades para o cache e para as regras de uma Application: a variação de cache, o cache de respostas `POST` e `OPTIONS`, um Max Age menor que 60 segundos e os behaviors do Rules Engine que Azion Console marca com _- Required Application Accelerator_, com as variáveis `${request_uri}` e `${device_group}`. Ele vem desativado em uma Application nova, `modules.application_accelerator.enabled` na API, e, com a variação de cache, um cache setting pode acrescentar a query string, os cookies, o device group ou o método da requisição à cache key. [Applications](/pt-br/documentacao/plataforma/applications/#application-accelerator) o descreve, e a [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao) acompanha uma requisição por ele. | +| behavior | A ação que uma regra executa sobre as requisições às quais os seus critérios correspondem, como _Set Cache Policy_, _Set Connector_ ou _Run Function_. Uma regra executa os seus behaviors na ordem em que os lista, um behavior que encerra o processamento interrompe os behaviors e as regras depois dele na sua fase, e [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) nomeia o recurso da plataforma de que cada behavior precisa. Em um cache setting, `behavior` também é o campo de cada controle Cache vary by, e [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) lista os valores de cada um. | +| Bypass Cache | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) que envia à origem uma requisição que corresponde à regra e mantém a resposta fora do cache da Azion, `bypass_cache` na API. Ele roda na Request Phase, exige Application Accelerator, deixa o browser cache a cargo de _Set Cache Policy_ e difere de um TTL de 0 segundos, como [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0) explica. Ele age só sobre o cache da Azion, então uma Application com cache settings de Tiered Cache ativos continua armazenando objetos na camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache) pelo Max Age do cache setting. | +| Cache | Um recurso da plataforma aninhado em Applications que armazena cópias das respostas às requisições recebidas por uma Application, para atender às requisições seguintes pelo mesmo objeto com essas cópias. Cada cópia fica no data center que a armazenou. Ele está sempre ativo em uma Application: a API recusa `modules.cache.enabled` definido como `false` com `31001`, e Azion Console mostra o switch **Cache** travado como ativo, com a nota `Automatically enabled in all accounts.` [Applications](/pt-br/documentacao/plataforma/applications/#cache) o descreve, e a [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao) acompanha uma requisição por ele. | +| cache key | A entrada de índice sob a qual Cache armazena um objeto, com diferenciação entre maiúsculas e minúsculas. No Cache, a configuração padrão ignora a query string, então a key concatena o scheme, o host e o path, como em `httpsstatic.example.com/page/site.js`, e cada variação acrescenta um valor depois do separador `@@`: sob `allowlist` e `denylist`, esse valor inclui os argumentos de query string que um setting nomeia, mas sob `all`, a query string inteira segue o path, antes de `@@`. Quando o cache setting que serve imagens nomeia `ims` na sua allowlist, a key carrega a query string `ims` depois de `@@`, e uma imagem convertida carrega o seu formato no fim. Sob a configuração padrão, o valor de `ims` não faz parte da key, então todo tamanho e todo processamento do path compartilham uma key, e o primeiro armazenado responde a todo valor de `ims`; [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key) documenta cada forma. | +| cache setting | Um conjunto de valores que dizem ao Cache como armazenar e entregar uma resposta: os TTLs do cache da Azion e do navegador, e as entradas que distinguem duas requisições. Um cache setting pertence a uma Application e traz Max Age, stale cache, Large File Optimization e Tiered Cache, além dos quatro controles Cache vary by no seu objeto `modules.application_accelerator`. Ele só age por meio de uma regra que aplica esse cache setting com _Set Cache Policy_ às requisições às quais a regra corresponde; [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) documenta cada campo, e [Primeiros passos com Cache](/pt-br/documentacao/plataforma/applications/cache/primeiros-passos/) cria o primeiro. | +| Connector | A entidade que encaminha as requisições de uma Application à sua origem, depois que uma regra define o ID desse Connector no behavior _Set Connector_. Ela pertence a [Connectors](/pt-br/documentacao/plataforma/connectors/), o recurso da plataforma que substitui as origens que as versões anteriores de Applications configuravam na Application. Com [Load Balancer](/pt-br/documentacao/plataforma/connectors/load-balancer/) ativado, um Connector do tipo `http` pode distribuir o tráfego entre várias origens. | +| critério | Uma condição única dentro de uma regra: uma variável como `${uri}`, um operador de comparação e um argumento quando o operador aceita um, enviados na API como `variable`, `operator`, `conditional` e `argument`. Dentro de um grupo, os critérios se combinam com `and` e `or`, e `and` tem precedência sobre `or`. Os grupos de uma regra se unem por `and`, e a API os carrega como um array de grupos, `[[{...}]]`. [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) lista cada variável e operador. | +| Debug Rules | A configuração de uma Application que registra as regras do Rules Engine que cada requisição executou, `debug` na API e desativada em uma Application nova. Com ela ativa, as regras executadas aparecem no campo `$traceback` em Data Stream e em [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/), e no campo `stacktrace` da [API GraphQL do Real-Time Events](/pt-br/documentacao/devtools/graphql/campos-gql-real-time-events/). [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) mostra onde ativá-la no Azion Console, e [Depure regras criadas com Rules Engine](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/debug-regras/) mostra como ler esses logs. | +| device group | Um nome e uma expressão regular que uma Application compara com o header `User-Agent` de cada requisição. Uma requisição pertence ao grupo quando o header dela corresponde à expressão. Cada device group pertence a uma Application, e uma regra o testa por meio da variável `${device_group}`, que exige Application Accelerator. [Cache vary by Devices](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) varia a cache key por ele, e [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/) documenta a correspondência. | +| fase | Um dos dois estágios em que uma Application executa regras: a Request Phase, sobre a requisição antes que exista uma resposta, e a Response Phase, sobre a resposta entregue ao usuário. Você define a fase de uma regra ao criá-la e não pode mudá-la depois, então uma regra na outra fase é uma nova regra. O cache é decidido na Request Phase, e [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) lista as fases em que cada variável e cada behavior estão disponíveis. | | filtro | O componente de `ims` que transforma uma imagem além de um redimensionamento ou de um recorte, escrito `filters:name(argument)`, como em `filters:quality(15)`. Uma string `ims` combina vários filtros, separados por `:`. [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/) documenta `rotate`, `quality`, `watermark`, `format` e `fill`. | -| `fit-in` | O prefixo de `ims` que ajusta a imagem derivada dentro de uma caixa `WidthxHeight` e mantém a proporção da imagem de origem, como em `?ims=fit-in/400x400`. Uma imagem menor que a caixa não é ampliada e mantém o seu tamanho original. As duas dimensões são opcionais, e [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento) mostra cada forma. | -| Forward Cookies | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que envia ao usuário o header `Set-Cookie` da origem mesmo quando a resposta vem do cache. Ele roda na **Request Phase** e exige Application Accelerator. | -| Image Processor | O Produto habilitado em uma aplicação que retorna uma imagem derivada construída a partir de uma imagem de origem guardada na origem, seguindo a query string `ims` da requisição. O seu switch, **Image Processor** em **Main Settings** › **Modules**, fica desativado em uma nova aplicação, `modules.image_processor.enabled` na API e `--image-processor` no Azion CLI. [Applications](/pt-br/documentacao/plataforma/applications/#image-processor) o descreve, e a [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao) acompanha uma requisição por ele. | -| imagem de origem | A imagem original, armazenada na origem, que Image Processor lê para responder a uma requisição que carrega uma query string `ims`. A Azion não grava nada de volta nela, porque cada transformação produz uma imagem derivada e deixa o original onde está. O caminho entre as duas está na [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao). | -| imagem derivada | A saída que Image Processor constrói a partir da imagem de origem guardada na origem e retorna a uma requisição que carrega uma query string `ims`. O original permanece intacto, e a Azion não mantém nenhuma imagem derivada como um asset armazenado. A [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao) descreve como uma requisição produz uma. | -| Images | O medidor de uso que conta as imagens que Image Processor processa, seja para otimizar, recortar, redimensionar, aplicar filtros ou converter. Cada requisição que Image Processor trata conta como uma imagem, e uma imagem servida do cache sem processamento não conta. [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#image-processor) traz o volume que cada plano inclui, e [Preços](/pt-br/documentacao/fundamentos/precos/#image-processor) traz a tarifa. | -| `imagesProcessedMetrics` | O dataset GraphQL que contém as métricas de requisição das imagens que passaram por Image Processor. [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#dados-de-uso-e-eventos) o lista com as outras superfícies que informam a atividade de Image Processor. | -| `images_processed` | O `metricName` da query GraphQL de consumption que retorna o número total de imagens que Image Processor processou, sob o `productId` `1441110021`. [Consulte dados de uso do Image Processor](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-image-processor-com-graphql/) traz a query completa. | -| `ims` | O parâmetro de query string que informa a Image Processor qual transformação aplicar, como em `?ims=400x`. Ele vai por último na URL, porque uma requisição que carrega outro parâmetro depois de `ims=` pode retornar um erro `504`. [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#posicao-do-parametro-ims) documenta cada valor que ele aceita e a sua posição. | -| `ims_http` | O valor do campo **Proxy Upstream** em um registro de [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) quando Image Processor respondeu como o upstream. Em alguns casos, Image Processor é a origem do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) e processa a imagem antes de armazená-la em cache. | -| instância de função | O objeto que associa uma função criada em [Functions](/pt-br/documentacao/plataforma/functions/) a uma aplicação, com os argumentos com que ela roda, listado na aba **Functions Instances** e servido pela API em `/v4/workspace/applications//functions`. Uma regra com o behavior **Run Function** a invoca, nomeando o seu ID em `attributes.value`. [Instâncias de função](/pt-br/documentacao/plataforma/applications/functions-instances/) documenta os seus campos. | -| Large File Optimization | O recurso do Cache, ativado por cache setting com o toggle **Large file optimization**, que armazena um objeto grande em fragmentos de 1.024 kB. A Azion coloca cada fragmento em cache quando um usuário o requisita, sob a sua própria cache key terminada em `@@bytes=-`, e o recurso também se aplica ao Tiered Cache quando essa camada está ativa. [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#large-file-optimization) descreve o mecanismo. | -| Main Settings | A aba da aplicação cujas quatro seções são **General**, que traz o nome, **Modules**, **Debug Rules** e **Status**. As configurações de entrega e de protocolo não estão nela, porque pertencem ao [workload](/pt-br/documentacao/plataforma/workloads/) que serve a aplicação. [Main Settings de Applications](/pt-br/documentacao/plataforma/applications/main-settings/) documenta cada seção. | -| Max Age | O campo de Azion Console para quantos segundos o cache da Azion mantém uma cópia de um objeto, `modules.cache.max_age` na API, com padrão `60` no Console, na API e na CLI. A API recusa um valor menor que 60 com `21021` enquanto Application Accelerator está desativado, um valor menor que 3 com `21020` enquanto Tiered Cache está ativo e um valor maior que `31536000` com `10068`. A seção **Browser Cache** tem um **Max Age** próprio, `browser_cache.max_age`; [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#application-accelerator) traz os limites que dependem dos Produtos ativos. | -| `modules` | O objeto da API que traz os switches de uma aplicação, `application_accelerator`, `cache`, `functions` e `image_processor`, cada um com um valor `enabled`. Azion Console o apresenta como a seção **Modules** de **Main Settings**, cujos **Default Modules** são os mesmos quatro, ao lado de um grupo **Subscription modules** com uma ação **Contact sales**. Tiered Cache não tem chave nele, porque é um switch dentro de um cache setting. | -| Optimize Images | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que ativa Image Processor para as requisições às quais a sua regra corresponde, `optimize_images` na API. Ele roda na **Request Phase**, não aceita argumentos e exige Image Processor na aplicação. A API o aceita sozinho em uma regra, sem nenhum **Set Cache Policy** ao lado. | -| `orig` | O valor de dimensão de `ims` que mantém a medida original da imagem de origem em um eixo, enquanto o outro eixo recebe o valor solicitado. Uma imagem derivada com uma dimensão `orig` não sofre recorte automático, como [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento) mostra. | -| property | O nome que outras plataformas dão à configuração que serve um site: os seus hostnames e as regras aplicadas às requisições deles. Na Azion, são dois objetos: um [workload](/pt-br/documentacao/plataforma/workloads/) guarda os domínios, os protocolos e os certificados, e a aplicação que o deployment dele nomeia guarda as regras. [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/#o-caminho-que-uma-requisicao-percorre) acompanha uma requisição pelos dois. | +| `fit-in` | O prefixo de `ims` que ajusta a imagem derivada dentro de uma caixa `WidthxHeight` e mantém a proporção da imagem de origem, como em `?ims=fit-in/400x400`. Uma imagem menor que a caixa mantém o seu tamanho original. As duas dimensões são opcionais, e [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento) mostra cada forma. | +| Forward Cookies | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que envia ao usuário o header `Set-Cookie` da origem mesmo quando a resposta vem do cache. Ele roda na Request Phase e exige Application Accelerator. | +| Function Instance | A entidade que vincula uma das suas [Functions](/pt-br/documentacao/plataforma/functions/) a uma Application ou a um [Firewall](/pt-br/documentacao/plataforma/firewall/), com os argumentos com que ela roda. A API serve as Function Instances de uma Application em `/v4/workspace/applications//functions`, e uma regra com o behavior _Run Function_ invoca uma Function Instance pelo ID dela em `attributes.value`. [Function Instances](/pt-br/documentacao/plataforma/applications/functions-instances/) documenta os seus campos. | +| Image Processor | Um recurso da plataforma aninhado em Applications que constrói uma imagem nova, a imagem derivada, a partir de uma imagem na origem de uma Application. Ele vem desativado em uma Application nova, e cada Application o ativa separadamente, em `modules.image_processor.enabled` na API ou com `--image-processor` no Azion CLI. [Applications](/pt-br/documentacao/plataforma/applications/#image-processor) o descreve, e a [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao) acompanha uma requisição por ele. | +| imagem de origem | O arquivo de imagem na origem que Image Processor lê para construir uma imagem derivada. Image Processor o lê sem alterá-lo, e cada transformação produz uma imagem derivada separada. O caminho entre as duas está na [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao). | +| imagem derivada | A imagem que Image Processor constrói a partir da imagem de origem que está na origem. Image Processor a retorna sem salvá-la como um ativo da conta, e a imagem de origem permanece inalterada. A [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao) descreve como uma requisição produz uma. | +| `ims` | O parâmetro de query string que informa a Image Processor qual transformação aplicar, como em `?ims=400x`. Ele pode ficar em qualquer posição da query string, e um valor de `ims` que Image Processor não consegue interpretar retorna a imagem de origem sem transformação. [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#posicao-do-parametro-ims) documenta cada valor que ele aceita e a sua posição. | +| Large File Optimization | Uma feature de Cache que armazena um objeto grande em fragmentos de 1.024 kB, desativada por padrão e ativada por cache setting em `modules.cache.large_file_cache.enabled`. A Azion coloca cada fragmento em cache quando um usuário o requisita, sob a sua própria cache key terminada em `@@bytes=-`, e a feature também se aplica ao Tiered Cache quando essa camada está ativa. [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#large-file-optimization) descreve o mecanismo. | +| Main Settings | O conjunto de valores que se aplicam a uma Application como um todo: o nome, os recursos da plataforma ativados nela, se ela registra as regras que cada requisição executa e se ela está ativa. Azion Console agrupa esses valores na aba **Main Settings** da Application, em quatro seções: **General**, que traz o nome, **Modules**, **Debug Rules** e **Status**. As configurações de entrega e de protocolo pertencem ao [Workload](/pt-br/documentacao/plataforma/workloads/) que recebe as requisições, e não a Main Settings. [Main Settings de Applications](/pt-br/documentacao/plataforma/applications/main-settings/) documenta cada seção. | +| Max Age | O campo do cache setting para quantos segundos o cache da Azion mantém uma cópia de um objeto, `modules.cache.max_age` na API, com padrão `60` no Azion Console, na API e na CLI. A API recusa um valor menor que 60 com `21021` enquanto Application Accelerator está desativado, um valor menor que 3 com `21020` enquanto Application Accelerator e Tiered Cache estão ativos e um valor maior que `31536000` com `10068`. O cache do navegador tem um Max Age próprio, `browser_cache.max_age`; [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#application-accelerator) traz os limites que dependem dos recursos da plataforma ativos. | +| `modules` | O objeto da API que traz os switches de uma Application, `application_accelerator`, `cache`, `functions` e `image_processor`, cada um com um valor `enabled`. Azion Console o apresenta como a seção **Modules** de [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma), cujos **Default Modules** são os mesmos quatro, ao lado de um grupo **Subscription modules** com uma ação **Contact sales**. Tiered Cache não é um desses switches: cada cache setting a ativa no seu próprio campo `modules.cache.tiered_cache.enabled`. | +| Optimize Images | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que aplica Image Processor às requisições que correspondem à sua regra, `optimize_images` na API. Ele roda na Request Phase, não aceita argumentos e exige Image Processor ativo na Application. A API o aceita sozinho em uma regra, sem nenhum _Set Cache Policy_ ao lado. | | purge por cache key | Um tipo de [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purge-por-cache-key), `cachekey` na API, que remove os objetos armazenados sob cada key de uma lista. Uma key pode nomear uma variação, por query string, cookie ou formato de imagem, então um purge de todas as variações de um objeto lista cada key. É o único tipo de purge que alcança a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#purge). | | purge por URL | Um tipo de [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purge-por-url), `url` na API, que remove o objeto por trás de cada URL de uma lista. Ele não é recursivo, e a Azion converte cada URL na sua cache key sem as variações, então um objeto que varia por cookie, device group ou formato de imagem exige um purge por cache key ou por wildcard. Enviada sem scheme, uma URL remove a cópia em HTTP e a cópia em HTTPS. | -| purge por wildcard | Um tipo de [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purge-por-wildcard), `wildcard` na API, que remove todo objeto que corresponde a uma expressão com `*` no path ou na query string. Uma expressão pode ter mais de um `*`, mas uma requisição carrega uma expressão, e a API recusa uma segunda com `10065`. Ele não alcança a camada do Tiered Cache, e um purge por wildcard enviado a essa camada é recusado com `30001`. | -| Real-Time Purge | O recurso de plataforma que remove objetos do Cache ou do Tiered Cache antes do fim do seu TTL, para que a origem sirva a versão mais recente na próxima requisição. Um purge nomeia os seus objetos por URL, por cache key ou por uma expressão de wildcard, e a Azion o coloca em fila depois da mensagem de confirmação e o lista no histórico quando ele termina. [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) documenta os três tipos e a camada que cada um alcança. | -| recorte automático | O recorte centralizado que um redimensionamento `WidthxHeight` pode aplicar para que a imagem derivada preencha a caixa solicitada, na vertical ou na horizontal, dependendo de como as dimensões originais se encaixam nas solicitadas. Definir uma dimensão como `orig` o impede, como [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento) mostra. | -| regra | Uma entrada no Rules Engine para Applications que executa os seus behaviors, em uma fase, sobre as requisições às quais os seus critérios correspondem. As regras rodam na ordem em que você as organiza, e uma nova aplicação não tem nenhuma: você cria cada uma com **+ Rule**, nomeando-a em **General** antes de escolher a sua **Phase**. A API serve as regras da **Request Phase** em `/v4/workspace/applications//request_rules`, e [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) lista os seus campos. | -| requisição complexa | Uma requisição cujo método é qualquer um diferente de `GET` ou `HEAD`. A Azion prefixa o método à cache key de uma requisição complexa, como em `optionshttpsstatic.example.com/page`, então uma resposta `OPTIONS` e uma resposta `GET` para um mesmo path são objetos separados. [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#variacoes) lista o prefixo com as outras variações. | -| rota | O nome que outras plataformas dão a um padrão de path e ao que serve as requisições que correspondem a ele. Em uma aplicação, é uma regra da **Request Phase**: um critério em `${uri}` corresponde ao path, e **Set Connector** envia a requisição a um connector. Duas regras assim enviam `/api/` para uma origem e todo outro path para outra, como [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/#o-caminho-que-uma-requisicao-percorre) mostra. | -| Rules Engine para Applications | O recurso de uma aplicação que contém as suas regras e as executa em ordem, com lógica se/então: os critérios são o se, e os behaviors são o então. Azion Console o mostra como a aba **Rules Engine**, com as regras agrupadas por fase. [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) documenta cada variável, operador e behavior. | -| Run Function | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que executa uma instância de função sobre as requisições às quais a sua regra corresponde, `run_function` na API, com o ID da instância em `attributes.value`. Ele roda na **Request Phase** e na **Response Phase** e exige o switch **Functions** ativo em **Main Settings** › **Modules**. [Instâncias de função](/pt-br/documentacao/plataforma/applications/functions-instances/#comportamento-run-function) documenta como ele nomeia a instância. | -| Set Cache Policy | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) que nomeia um cache setting e o coloca em vigor para as requisições às quais a sua regra corresponde, `set_cache_policy` na API, com o ID do cache setting em `attributes.value`. Ele roda na **Request Phase** e não exige Application Accelerator. Um cache setting que nenhuma regra com **Set Cache Policy** nomeia não se aplica a nenhuma requisição, e a API se recusa a excluir um setting em uso com `21014 Cannot Delete Cache Setting`. | -| Set Connector | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que envia as requisições às quais a sua regra corresponde a um [connector](/pt-br/documentacao/plataforma/connectors/), `set_connector` na API, com o ID do connector em `attributes.value`. Ele roda na **Request Phase**, e, quando mais de uma regra correspondente o carrega, só a última roda. | -| Sort | O controle de **Cache vary by Query String** que agrupa os mesmos argumentos de query string sob uma única cache key, qualquer que seja a ordem em que chegam, `sort_enabled` na API e desativado por padrão. Sem ele, `?a=1&b=2` e `?b=2&a=1` são dois objetos que guardam uma mesma resposta. Com ele, um purge por URL precisa enviar os argumentos em ordem alfabética. | -| stale cache | O comportamento do Cache que responde com uma cópia expirada durante uma janela de stale quando a revalidação com a origem falha, ativado por cache setting com o toggle **Stale cache**. Sob _Honor cache policies_, a janela é o valor de `stale-while-revalidate` da origem, e sob _Override cache behavior_, ou quando a origem omite a diretiva, ela é de 300 segundos. Durante a janela, a Azion busca uma versão atual em background, como [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#stale-cache) descreve. | -| status de cache | O estado de uma resposta no Cache, no início do header `x-cache`: `HIT`, `MISS`, `EXPIRED`, `STALE`, `UPDATING`, `REVALIDATED` ou `BYPASS`. Uma resposta que a plataforma não coloca em cache informa `-`. [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#status-de-cache) dá o significado de cada um. | -| Tiered Cache | A segunda camada de cache entre o cache da Azion e a origem, mantida em uma região, compartilhada por todos os data centers e que guarda os objetos por mais tempo que a primeira camada. Todo plano a inclui, e o seu toggle **Tiered Cache** fica em um cache setting, e não em **Main Settings**. O setting precisa usar _Override cache behavior_, ou a API responde `21001`, e um **Max Age** de pelo menos 3 segundos; [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) cobre as regiões em que ela roda e o tipo de purge que a limpa. | -| topology | A configuração do Tiered Cache que seleciona a região onde a segunda camada de cache mantém os objetos, como `nearest-region` ou `us-east-1`, em `modules.cache.tiered_cache.topology`. A API recusa um valor que não aceita com `10039 Invalid Choice`, e [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#topology) documenta cada região. | -| TTL | O número de segundos que o cache da Azion ou o navegador mantém uma cópia de um objeto, definido por [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) pelo **Max Age**: `modules.cache.max_age` para o cache da Azion e `browser_cache.max_age` para o navegador. | -| variação de cache | No Cache, uma cópia adicional de um objeto armazenada sob a sua própria key porque o método da requisição, um argumento de query string, um cookie, um device group, um formato de imagem ou um intervalo de bytes de um arquivo grande difere. No Image Processor, o campo `cache_vary_by_querystring` que varia o cache em `ims`, definido pelos seus controles **Behavior**, **Fields** e **Sort**, como [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#cache-variation) mostra. Todo controle **Cache vary by** exige Application Accelerator, porque os seus campos pertencem a `modules.application_accelerator`, enquanto processar uma imagem não exige; [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) documenta os quatro controles. | -| variável | Um valor da requisição ou da resposta, escrito `${name}`, que um critério testa ou que um argumento de behavior insere, como `${uri}`, `${host}` ou `${device_group}`. Cada variável está disponível na **Request Phase**, na **Response Phase** ou nas duas. Em uma aplicação, `${request_uri}` exige Application Accelerator, e uma regra que a usa sem esse Produto é recusada com `25047 Missing Required Modules`, enquanto a mesma regra com `${uri}` é aceita. | -| WASM Image Processor | A biblioteca WebAssembly que processa imagens dentro de uma função de [Functions](/pt-br/documentacao/plataforma/functions/), por meio de `loadImage`, `resize`, `getImageResponse` e `clean`, para os formatos `webp`, `jpeg` e `png`. Ela não é o Produto Image Processor: Image Processor transforma uma requisição por meio da query string `ims`, e a biblioteca roda dentro do seu código. [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#biblioteca-wasm-image-processor) aponta para a sua referência. | -| WebSocket Proxy | O recurso da aplicação que mantém uma conexão WebSocket, uma única conexão TCP bidirecional, aberta entre os seus usuários e a sua origem. Uma aplicação com ele ativo trata uma requisição que carrega `Upgrade: websocket` e `Connection: upgrade` como uma conexão WebSocket e faz proxy dela para a origem, e uma conexão válida responde `101 Switching Protocols`. [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) documenta os seus requisitos e a sua disponibilidade. | +| purge por wildcard | Um tipo de [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purge-por-wildcard), `wildcard` na API, que remove todo objeto que corresponde a uma expressão com `*` no path ou na query string. Uma expressão pode ter mais de um `*`, mas uma requisição carrega uma expressão, e a API recusa uma segunda com `10065`. Ele age só sobre o cache da Azion: um purge por wildcard enviado à camada do Tiered Cache é recusado com `30001`. | +| Real-Time Purge | Um recurso da plataforma que remove objetos do Cache ou do Tiered Cache antes do fim do seu TTL. Quando um objeto não está mais no Cache nem no Tiered Cache, a requisição seguinte por esse objeto busca a versão atual na origem. Um purge nomeia os seus objetos por URL, por cache key ou por uma expressão de wildcard, e a Azion o coloca em fila e o lista no histórico de purges quando ele termina. [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) documenta os três tipos e a camada que cada um alcança. | +| recorte automático | O recorte centralizado que um redimensionamento `WidthxHeight` pode aplicar para que a imagem derivada preencha a caixa solicitada. O recorte é vertical ou horizontal, dependendo de como as dimensões originais se encaixam nas solicitadas, como [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento) mostra. | +| regra | Uma entrada no Rules Engine para Applications que executa os seus behaviors, em uma fase, sobre as requisições às quais os seus critérios correspondem. Cada regra traz um nome e a sua fase, as regras rodam na ordem em que você as organiza, e uma Application nova não tem nenhuma. A API serve as regras da Request Phase em `/v4/workspace/applications//request_rules` e as da Response Phase em `/v4/workspace/applications//response_rules`, e [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) lista os seus campos. | +| Rules Engine para Applications | Uma feature de Applications que contém as regras de uma Application. A Application as executa em ordem como lógica se/então, com os critérios como o se e os behaviors como o então. Azion Console a mostra como a aba **Rules Engine** de cada Application, com as regras agrupadas por fase. [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) documenta cada variável, operador e behavior. | +| Run Function | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que invoca uma Function Instance nas requisições às quais a sua regra corresponde, `run_function` na API, com o ID da Function Instance em `attributes.value`. Ele roda na Request Phase e na Response Phase, que aceita só Functions escritas em Lua, e exige Functions ativo na Application, `modules.functions.enabled` na API. [Function Instances](/pt-br/documentacao/plataforma/applications/functions-instances/#behavior-run-function) documenta como ele referencia a Function Instance. | +| Set Cache Policy | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) que aplica um cache setting a uma requisição que corresponde à regra, `set_cache_policy` na API, com o ID do cache setting em `attributes.value`. Ele roda na Request Phase e funciona com Application Accelerator ativo ou desativado. Um cache setting só age por meio de uma regra que carrega este behavior, e a API se recusa a excluir um setting em uso com `21014 Cannot Delete Cache Setting`. | +| Set Connector | O behavior do [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) que encaminha as requisições às quais a sua regra corresponde a um [Connector](/pt-br/documentacao/plataforma/connectors/), `set_connector` na API, com o ID do Connector em `attributes.value`. Ele roda na Request Phase, e, quando mais de uma regra correspondente o carrega, só a última roda. | +| stale cache | Uma feature de Cache que pode responder com uma cópia expirada durante uma janela de stale, quando uma tentativa de revalidação com a origem falha. Cada cache setting a ativa em `modules.cache.stale_cache.enabled`, e a janela é o valor de `stale-while-revalidate` da origem sob _Honor cache policies_, ou 300 segundos sob _Override cache behavior_ ou quando a origem omite a diretiva, como [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#stale-cache) descreve. | +| status de cache | O estado de uma resposta no Cache, no início do header `x-cache`: `HIT`, `MISS`, `EXPIRED`, `STALE`, `UPDATING`, `REVALIDATED` ou `BYPASS`. Uma resposta que a Azion não armazena informa `-` enquanto Application Accelerator está ativo, mas, com ele desativado, uma resposta `GET` ou `HEAD` que não é armazenada informa `MISS`, com `x-cache-expires-in: 0`. [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#status-de-cache) dá o significado de cada um. | +| Tiered Cache | Uma feature de Cache que adiciona uma segunda camada de cache entre o data center que responde a uma requisição e a origem, na região que a topology do cache setting seleciona. A primeira camada é o cache desse data center. Em um miss na primeira camada, o data center consulta a camada do Tiered Cache antes que a requisição siga para a origem, e cada cache setting ativa Tiered Cache no seu próprio campo `modules.cache.tiered_cache.enabled`, em todo plano. O setting precisa usar _Override cache behavior_, ou a API responde `21001`, e, com Application Accelerator ativo, um Max Age de pelo menos 3 segundos; [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) cobre as regiões em que ela roda e o tipo de purge que a limpa. | +| TTL | Tempo de vida (time to live): o número de segundos que o cache da Azion ou o navegador mantém uma cópia de um objeto. Sob _Honor cache policies_, os headers `Cache-Control` e `Expires` que a origem envia o definem. Quando um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) os substitui, o seu Max Age o define: `modules.cache.max_age` para o cache da Azion e `browser_cache.max_age` para o navegador. | +| variação de cache | Uma cópia adicional de um objeto armazenada sob a sua própria key porque o método da requisição, um argumento de query string, um cookie, um device group, um formato de imagem ou um intervalo de bytes de um arquivo grande difere. Enquanto Application Accelerator está desativado na Application, a API recusa uma variação com `21013`, e isso inclui a variação por query string em `ims` que [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#variacao-de-cache) descreve. Image Processor processa uma imagem com Application Accelerator ativo ou desativado; [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) documenta os quatro controles. | +| variável | Um valor da requisição ou da resposta, escrito `${name}`, que um critério testa ou que um argumento de behavior insere, como `${uri}`, `${host}` ou `${device_group}`. Cada variável está disponível na Request Phase, na Response Phase ou nas duas, como lista [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#variaveis). Em uma Application, `${request_uri}` exige Application Accelerator, e uma regra que a usa com Application Accelerator desativado é recusada com `25047 Missing Required Modules`, enquanto a mesma regra com `${uri}` é aceita. | +| WASM Image Processor | A biblioteca WebAssembly que processa imagens dentro de uma [Function](/pt-br/documentacao/plataforma/functions/), por meio de `loadImage`, `resize`, `getImageResponse` e `clean`, para os formatos `webp`, `jpeg` e `png`. Ela é separada do recurso da plataforma Image Processor: Image Processor transforma uma requisição por meio da query string `ims`, e a biblioteca roda dentro do seu código. [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#biblioteca-wasm-image-processor) aponta para a sua referência. | +| WebSocket Proxy | Uma feature de Applications que transporta uma conexão WebSocket, uma única conexão TCP bidirecional, entre os seus usuários e a sua origem. Uma Application com ela ativa trata uma requisição que carrega `Upgrade: websocket` e `Connection: upgrade` como uma conexão WebSocket e faz proxy dela para a origem, e uma conexão válida responde `101 Switching Protocols`. [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) documenta os seus requisitos e a sua disponibilidade. | | `x-cache` | O header de debug da resposta que traz o status de cache de uma resposta, o endereço IP do servidor que respondeu e o protocolo, na forma ` from with `. Uma requisição precisa carregar `Pragma: azion-debug-cache` para que a Azion o acrescente à resposta. [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#headers-de-debug) lista cada status que ele pode trazer. | -| `x-cache-key` | O header de debug da resposta que traz a cache key de uma resposta, como em `x-cache-key: httpsstatic.example.com/page/site.js`. Ele só volta em uma requisição enviada com `Pragma: azion-debug-cache`, e mostra `x-cache-key: -` em uma resposta que a plataforma não coloca em cache. [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key) decompõe a key elemento por elemento. | +| `x-cache-key` | O header de debug da resposta que traz a cache key de uma resposta, como em `x-cache-key: httpsstatic.example.com/page/site.js`. Ele só volta em uma requisição enviada com `Pragma: azion-debug-cache`, e mostra `x-cache-key: -` em uma resposta que a Azion não armazena enquanto Application Accelerator está ativo. [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#formato-da-key) decompõe a key elemento por elemento. | diff --git a/apps/docs/src/content/docs/pt-br/pages/build/applications/limites.mdx b/apps/docs/src/content/docs/pt-br/pages/build/applications/limites.mdx index d50f6486e4..1492f21b47 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/applications/limites.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/applications/limites.mdx @@ -1,6 +1,6 @@ --- title: Limites de Applications -description: Consulte os limites de uma aplicação, das suas regras e configurações e dos settings de Cache, Application Accelerator e Image Processor, por plano. +description: Consulte os limites de uma Application, das suas regras e configurações e das configurações de Cache, Application Accelerator e Image Processor que ela carrega. meta_tags: 'applications, limits, rules, criteria, cache, tiered cache, ttl, application accelerator, image processor, websocket, plans' namespace: documentation_products_applications_limits permalink: /documentacao/plataforma/applications/limites/ @@ -10,80 +10,78 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Uma [aplicação](/pt-br/documentacao/plataforma/applications/) executa [regras](/pt-br/documentacao/plataforma/applications/rules-engine/) de requisição e de resposta e pode fazer proxy de conexões WebSocket para a origem por meio de [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/). Cada Produto habilitado nela traz limites próprios: [cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) e requisições de [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) para Cache, o piso do TTL de cache para Application Accelerator e as imagens processadas para Image Processor. Esta página informa cada limite, a resposta que uma chamada recebe quando a API o recusa e o uso que cada plano de serviço inclui. +Uma [Application](/pt-br/documentacao/plataforma/applications/) processa as requisições recebidas pelos seus [Workloads](/pt-br/documentacao/plataforma/workloads/): ela executa as suas [regras](/pt-br/documentacao/plataforma/applications/rules-engine/) de requisição e de resposta em cada requisição. Com [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) ativado na conta, ela também pode fazer proxy de conexões WebSocket para a origem. Uma Application recebe as requisições de um Workload depois que o deployment desse Workload define essa Application. -Um limite padrão delimita um objeto, uma requisição ou uma conta. Uma quantidade incluída delimita um mês de uso, e cada plano de serviço inclui uma quantidade diferente. A Azion oferece três planos de serviço: Hobby, Pro e Enterprise. No Hobby, o uso além de uma quantidade incluída pode exigir um upgrade, e a Azion pode restringir a conta. No Pro e no Enterprise, a Azion cobra esse uso pelos preços On Demand, e no Pro você pode definir um limite de gasto para controlar a cobrança. +Cada recurso da plataforma ativado na Application acrescenta limites próprios. [Cache](/pt-br/documentacao/plataforma/applications/cache/) limita os [cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) e os objetos que armazena, e [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) limita as requisições de purge. [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) move o piso do time to live (TTL) de cache, e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) limita o tamanho, a largura e a altura de uma imagem. Esta página informa cada limite e a resposta que uma chamada recebe quando a API o recusa. + +Um plano de serviço também inclui uma quantidade de uso antes que uma tarifa se aplique. Essa quantidade é um valor de cobrança: ultrapassá-la muda o valor cobrado da conta, e não o que a chamada retorna. A página [Preços da Azion](https://www.azion.com/pt-br/precos/) lista os planos e o uso que cada um inclui. Para as tarifas, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#applications). --- -## Aplicações, regras e conexões +## Applications, regras e conexões -Estes limites se aplicam a toda aplicação, quaisquer que sejam os Produtos habilitados nela. Eles cobrem as regras do seu Rules Engine, o log de **Debug Rules** e as conexões que ela mantém abertas. +Estes limites se aplicam a toda Application, quaisquer que sejam os recursos da plataforma ativados nela. Eles cobrem as regras do seu Rules Engine, o log de [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) e as conexões que ela mantém abertas. ### Limites padrão -Cada linha nomeia o que é limitado e o limite. A Azion pode aumentar estes limites mediante solicitação, conforme o plano, e o tempo de conexão WebSocket é um deles. Para solicitar um aumento, entre em contato com o time de [suporte técnico](/pt-br/documentacao/suporte/). +Sete limites se aplicam a toda Application. | Escopo | Limite | | --- | --- | -| Regras em uma aplicação, fases de requisição e de resposta somadas | 200 | -| Grupos de critérios por regra | 1 a 5 | -| Critérios por grupo | 1 a 10 | -| Behaviors por regra | 1 a 10 | +| Regras em uma Application, fases de requisição e de resposta somadas | 200 regras | +| Grupos de critérios por regra | 1 a 5 grupos | +| Critérios por grupo | 1 a 10 critérios | +| Behaviors por regra | 1 a 10 behaviors | | Argumento de behavior | 1.600 caracteres | -| Tamanho do log de **Debug Rules** | 1,5 kB | -| Tempo máximo de uma conexão WebSocket | 15 minutos | -| Conexão keepalive entre um usuário e uma aplicação | Aproximadamente 15 minutos | - -As 200 regras são um único total que a fase de requisição e a fase de resposta compartilham. Por exemplo, uma aplicação pode ter 150 regras de requisição e 50 regras de resposta, mas não 200 de cada. +| Tamanho do log de Debug Rules | 1,5 kB | +| Tempo de conexão WebSocket | 15 minutos | -A Azion recicla as conexões keepalive dos seus servidores aproximadamente a cada 15 minutos. Esse ciclo limita por quanto tempo uma conexão entre um usuário e uma aplicação fica aberta. Uma conexão ativa que precisa de mais tempo pode ser encerrada. Quando uma conexão WebSocket é encerrada dessa forma, a aplicação trata a conexão fechada e a abre de novo. Para um arquivo grande, fragmentos ou compressão aumentam a velocidade de transferência, de modo que a transferência possa terminar a tempo. - -Para armazenar um arquivo grande em fragmentos, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#cache). Para comprimi-lo, consulte [Comprima as respostas de uma aplicação com gzip](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/gzip-compression/). +Outros três limites se aplicam a nomes: o nome de uma Application aceita de 1 a 100 caracteres, o nome de um device group aceita de 1 a 250 e a expressão `user_agent` de um device group aceita de 1 a 512. -### Regras incluídas por plano +As 200 regras são um único total que a fase de requisição e a fase de resposta compartilham. Por exemplo, uma Application pode ter 150 regras de requisição e 50 regras de resposta, mas não 200 de cada. -Applications é cobrado com base na métrica Rules, e cada plano de serviço inclui um número de regras por aplicação. +A Azion recicla as conexões keepalive dos seus servidores aproximadamente a cada 15 minutos. Esse ciclo limita por quanto tempo uma conexão entre um usuário e uma Application fica aberta. Uma conexão ativa que precisa de mais tempo pode ser encerrada. Quando uma conexão WebSocket se fecha dessa forma, o código do seu cliente precisa detectar a conexão fechada e abri-la de novo. -| Métrica | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Regras por aplicação | 10 | 20 | Personalizado | +Para um arquivo grande, qualquer uma de duas opções permite que cada transferência termine antes que a conexão seja reciclada. Com `modules.cache.large_file_cache.enabled` definido como `true` em um cache setting, Cache armazena o arquivo em fragmentos de 1.024 kB. A outra opção, a compressão, reduz o arquivo. -As regras incluídas são uma quantidade de cobrança, separada do limite padrão de 200 regras por aplicação. Para a tarifa que se aplica além das regras incluídas, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#applications). +Para armazenar um arquivo grande em fragmentos, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#cache). Para comprimi-lo, consulte [Comprima as respostas de uma aplicação com gzip](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/gzip-compression/). --- ## Cache -Cache limita um cache setting, o objeto que um cache setting mantém e uma requisição de Real-Time Purge. Além de um limite que a API verifica, a chamada retorna HTTP `400` com um código de erro e um título. [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) altera dois limites de um cache setting: o menor TTL que ele aceita e o comportamento de cache que ele permite. +Cache limita um cache setting e um objeto que ele armazena, e Real-Time Purge limita uma requisição de purge. Quando um valor ultrapassa um limite que a API verifica, a chamada retorna HTTP `400` com um código de erro e um título. [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) altera dois limites de um cache setting: o menor TTL que ele aceita e o comportamento de cache que ele permite. + +A API valida os limites de TTL em todo cache setting. -Para um limite maior na conta, entre em contato com o time de [suporte técnico](/pt-br/documentacao/suporte/). Os limites de TTL são a exceção: a API os valida em todo cache setting, e a Azion não os aumenta mediante solicitação. +Para as tarifas de Cache, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#cache). Para obter os dados que Tiered Cache transferiu, use o guia [Consulte dados de uso do Tiered Cache](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-tiered-cache-com-graphql/). ### Cache settings -Cada limite desta tabela se aplica a um cache setting, qualquer que seja a interface que o escreve. A coluna Escopo nomeia o campo da API e, quando existe, o rótulo do Console. A coluna Além do limite traz o código e o título da resposta `400`. +Cada limite desta tabela se aplica a um cache setting, qualquer que seja a interface que o escreve. A coluna Escopo nomeia o campo da API e, quando existe, o rótulo do Console. A coluna Além do limite traz o código e o título da resposta `400`. Os títulos dos erros mantêm nomes antigos: `Edge Cache` corresponde a Cache, e `Module` corresponde a um recurso da plataforma ativado na Application. | Escopo | Limite | Além do limite | | --- | --- | --- | -| TTL mínimo de cache, **Max Age** (`modules.cache.max_age`) | 60 segundos; 0 segundos com Application Accelerator habilitado na aplicação | Erro `21021`, `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module`, com `meta.min_value` definido como `60`. | +| TTL mínimo de cache, **Max Age** (`modules.cache.max_age`) | 60 segundos; 0 segundos com Application Accelerator ativo na Application | Erro `21021`, `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module`, com `meta.min_value` definido como `60`. | | TTL mínimo de cache com Tiered Cache ativo | 3 segundos, com Application Accelerator ativo; sem ele, o mínimo de 60 segundos continua valendo | Erro `21020`, `Edge Cache Max Age Lower Than The Minimum Allowed By The Tiered Cache Module`, com `meta.min_value` definido como `3`. | | TTL máximo de cache | 31.536.000 segundos, um ano | Erro `10068`, `Max Value`, com o detalhe `Ensure this value is less than or equal to 31536000.` | | Comportamento de cache com Tiered Cache ativo (`modules.cache.behavior`) | Apenas `override` | Erro `21001`, `It's Not Possible To Use This Edge Cache Behavior.` | | TTL do browser cache (`browser_cache.max_age`) | 0 a 31.536.000 segundos | Erro `10068`, `Max Value`. | | Nome do cache setting, **Name** (`name`) | 250 caracteres | Erro `10046`, `Max Length`, com o detalhe `Ensure this field has no more than 250 characters.` | -Um cache setting com `modules.cache.stale_cache.enabled` definido como `true` pode servir uma cópia expirada durante uma janela limitada. Sob o comportamento `honor`, a janela é o valor da diretiva `stale-while-revalidate=` da origem. Sob `override`, ou quando a origem omite a diretiva, a janela é de 300 segundos. +Outro limite se aplica a um cache setting: o seu array `cache_vary_by_method` aceita no máximo 2 valores, `post` e `options`. + +Com `modules.cache.stale_cache.enabled` definido como `true` em um cache setting, Cache pode servir uma cópia expirada de um objeto durante uma janela limitada. Sob o comportamento `honor`, a janela é o valor da diretiva `stale-while-revalidate=` da origem. Sob `override`, ou quando a origem omite a diretiva, a janela é de 300 segundos. ### Objetos em cache -Dois limites se aplicam a um objeto que Cache armazena: o seu tamanho e o tamanho de cada fragmento de um arquivo grande armazenado em partes. +Dois limites se aplicam a um objeto que Cache armazena: o seu tamanho e o tamanho de cada fragmento de um arquivo grande armazenado em partes. A API verifica o tamanho do fragmento em todo cache setting. -| Escopo | Limite | -| --- | --- | -| Objeto único em cache | 10 GB | -| Tamanho do fragmento de um arquivo grande (`modules.cache.large_file_cache.offset`) | 1.024 kB por fragmento, fixo | +| Escopo | Limite | Além do limite | +| --- | --- | --- | +| Tamanho do fragmento de um arquivo grande (`modules.cache.large_file_cache.offset`) | 1.024 kB por fragmento, fixo | Erro `10068`, `Max Value`, com o detalhe `Ensure this value is less than or equal to 1024.` | -Um tamanho de fragmento maior que 1.024 retorna o erro `10068`, `Max Value`, com o detalhe `Ensure this value is less than or equal to 1024.` Para alterar o tamanho do fragmento, entre em contato com o time de Vendas. +Um objeto único em cache aceita até 10 GB. ### Real-Time Purge @@ -93,36 +91,27 @@ Cada limite desta tabela se aplica a uma requisição de purge, qualquer que sej | --- | --- | --- | | Objetos em uma requisição de purge por URL ou por cache key | 50 objetos | Erro `10065`, `List Field Max Length`, com o detalhe `Ensure this field has no more than 50 elements.` | | Wildcards em uma requisição de purge | 1 wildcard | Erro `10065`, `List Field Max Length`, com o detalhe `Ensure this field has no more than 1 elements.` | -| Tamanho de uma URL ou cache key | 4.096 caracteres | A API não recusa uma URL mais longa quando recebe a requisição. Um purge de uma URL de 4.098 caracteres retorna HTTP `201`. | + +Uma URL ou uma cache key em um purge aceita até 4.096 caracteres. Outros seis limites definem a taxa de requisições de purge, o tamanho de um wildcard e quanto histórico de purges a Azion mantém. | Escopo | Limite | | --- | --- | -| Requisições de purge por URL e por cache key por cliente | 200 requisições, 50 objetos cada | +| Requisições de purge por URL e por cache key por cliente | 200 requisições, de 50 objetos cada | | Objetos purgados por URL e por cache key a cada 60 segundos | 10.000 objetos | | Requisições de purge por wildcard por dia, em um intervalo de 24 horas | 2.000 requisições | | Tamanho de um wildcard | 256 caracteres | | Requisições mantidas no histórico de purges | 1.000.000 de requisições | -| Tempo que uma requisição permanece no histórico de purges | 6 meses | - -### Uso incluído por plano - -Cache é cobrado com base na métrica Purges, e cada plano de serviço inclui um número de purges por mês. - -| Métrica | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Purges | 1.000 / mês | 2.000 / mês | Personalizado | - -A métrica Purges conta cada operação de purge que a conta executa durante o mês. Tiered Cache está incluído em todos os planos. A página de preços lista Data Transfer sob Application Accelerator, por isso essa quantidade fica com os limites de [Application Accelerator](#application-accelerator). - -Para a tarifa além dos purges incluídos, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#cache). Para obter os dados que Tiered Cache transferiu, consulte [Consulte dados de uso do Tiered Cache](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-tiered-cache-com-graphql/). +| Tempo de permanência de uma requisição no histórico de purges | 6 meses | --- ## Application Accelerator -Application Accelerator altera um limite de um cache setting: o menor tempo que Cache mantém um objeto. `modules.cache.max_age` define esse tempo em segundos, e Azion Console apresenta o campo como **Max Age** na seção **Cache** de um cache setting. O campo aceita um inteiro de 0 a 31.536.000 e recusa qualquer valor fora dessa faixa. O estado de Application Accelerator e de Tiered Cache, ativos ou não, decide até onde um cache setting desce dentro da faixa. +Application Accelerator altera um limite de um cache setting: o menor tempo que Cache mantém um objeto. O Max Age de um cache setting, o seu campo `modules.cache.max_age`, define em segundos por quanto tempo Cache mantém um objeto. O campo aceita um inteiro de 0 a 31.536.000 e recusa qualquer valor fora dessa faixa. O estado de Application Accelerator e de Tiered Cache, ativos ou não, decide até onde um cache setting desce dentro da faixa. + +Para as tarifas de Application Accelerator, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). ### Limites padrão @@ -130,59 +119,31 @@ Cada linha nomeia um limite de TTL de cache e a condição que o coloca em vigor | Escopo | Limite | Aplica-se quando | | --- | --- | --- | -| TTL mínimo de cache | 60 segundos | Application Accelerator está desativado na aplicação, com Tiered Cache ativo ou desativado. | +| TTL mínimo de cache | 60 segundos | Application Accelerator está desativado na Application, com Tiered Cache ativo ou desativado. | | TTL mínimo de cache | 0 segundos | Application Accelerator está ativo e Tiered Cache está desativado. | | TTL mínimo de cache | 3 segundos | Application Accelerator está ativo e Tiered Cache está ativo. | -| TTL máximo de cache | 31.536.000 segundos, um ano | Todo cache setting, quaisquer que sejam os Produtos ativos. | - -Um **Max Age** menor que o mínimo em vigor retorna HTTP `400`. O erro é `21021` enquanto Application Accelerator está desativado, e `21020` enquanto Application Accelerator e Tiered Cache estão ambos ativos. Um valor maior que o máximo retorna o erro `10068`. Para os títulos dos erros, consulte [Cache settings](#cache-settings). - -O piso de 3 segundos vem de Tiered Cache, e não de Application Accelerator. Tiered Cache exige pelo menos 3 segundos, o que estreita o piso de 0 segundos que Application Accelerator libera. Um **Max Age** de 0 segundos ainda mantém a requisição no caminho do cache, por isso ele difere de fazer bypass do cache. Para saber como cada um trata uma requisição, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). +| TTL máximo de cache | 31.536.000 segundos, um ano | Todo cache setting, quaisquer que sejam os recursos da plataforma ativos. | -Estes limites de TTL são validações que a API aplica a todo cache setting, e a Azion não os aumenta mediante solicitação. O array `cache_vary_by_method` de um cache setting aceita no máximo 2 valores, `post` e `options`, e a especificação da API define esse teto. +Um Max Age menor que o mínimo em vigor retorna HTTP `400`. O erro é `21021` enquanto Application Accelerator está desativado, e `21020` enquanto Application Accelerator e Tiered Cache estão ambos ativos. Um valor maior que o máximo retorna o erro `10068`. Para os títulos dos erros, consulte [Cache settings](#cache-settings). -Uma requisição que Application Accelerator varia continua limitada pelos Produtos que armazenam o objeto e executam código sobre ele. Cache limita o próprio objeto: o tamanho de um objeto em cache e o tamanho de cada fragmento de um arquivo grande. Para esses valores, consulte [Objetos em cache](#objetos-em-cache). Uma função que a aplicação executa em [Functions](/pt-br/documentacao/plataforma/functions/) tem os seus próprios limites de código e de cada invocação. Para esses valores, consulte [Limites de Functions](/pt-br/documentacao/plataforma/functions/limites/). +Para saber como um Max Age de 0 segundos e o behavior _Bypass Cache_ tratam uma requisição, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). -### Uso incluído por plano - -Application Accelerator é cobrado com base na métrica Data Transfer, e cada plano de serviço inclui uma quantidade de Data Transfer por mês. - -| Métrica | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Data Transfer | 1 TB / mês | 2 TB / mês | Personalizado | - -A variação de cache, que a página de preços lista como Custom Cache Keys, e as reescritas de path estão incluídas em todos os planos. Para as tarifas além do Data Transfer incluído, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#application-accelerator). +Uma requisição que Application Accelerator varia continua limitada pelos recursos da plataforma que armazenam o objeto e executam código sobre ele. Cache limita o próprio objeto: o tamanho de um objeto em cache e o tamanho de cada fragmento de um arquivo grande. Para esses valores, consulte [Objetos em cache](#objetos-em-cache). Uma [Function](/pt-br/documentacao/plataforma/functions/) que a Application executa tem os seus próprios limites de código e de cada invocação. Para esses valores, consulte [Limites de Functions](/pt-br/documentacao/plataforma/functions/limites/). --- ## Image Processor -Image Processor limita uma única imagem com três limites padrão, e cada plano de serviço inclui um número de imagens processadas por mês. O tamanho, a largura e a altura limitam uma imagem. A quantidade mensal limita a conta. +Image Processor limita uma única imagem com três limites padrão: o seu tamanho, a sua largura e a sua altura. -### Limites padrão +Para as tarifas da métrica Images, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#image-processor). Para obter o número de imagens que a conta processou, use o guia [Consulte dados de uso do Image Processor](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-image-processor-com-graphql/). -Image Processor aplica estes limites padrão a uma imagem. Para aumentar um deles para a conta, entre em contato com o time de [suporte técnico](/pt-br/documentacao/suporte/). +### Limites padrão -| Escopo | Limite | -| --- | --- | -| Tamanho máximo | 150 MB | -| Largura máxima | 3840 pixels | -| Altura máxima | 2160 pixels | +Image Processor aplica três limites padrão a uma imagem: um tamanho máximo de 150 MB, uma largura máxima de 3.840 pixels e uma altura máxima de 2.160 pixels. Cada parâmetro `ims` também aceita uma faixa de valores própria. Para a faixa de cada parâmetro, consulte [Parâmetros de URL](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/). -### Uso incluído por plano - -Todo plano de serviço inclui um número de imagens processadas por mês, e a quantidade difere por plano. - -| Métrica | Hobby | Pro | Enterprise | -| --- | --- | --- | --- | -| Images | 5.000 / mês | 10.000 / mês | Personalizado | - -Image Processor conta uma imagem cada vez que processa uma imagem em uma requisição, seja para otimizar, recortar, redimensionar, aplicar filtros ou converter o formato. Uma imagem que Cache serve sem processamento não conta, então uma imagem derivada já em cache não soma nada nas requisições que o cache responde. Por exemplo, uma fotografia servida em três larguras conta como três imagens. As requisições posteriores que o cache responde para essas larguras não contam nenhuma. - -Para as tarifas da métrica Images, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#image-processor). Para obter o número de imagens que a conta processou, consulte [Consulte dados de uso do Image Processor](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-image-processor-com-graphql/). - --- ## Recursos relacionados @@ -191,7 +152,7 @@ Para as tarifas da métrica Images, consulte [Preços](/pt-br/documentacao/funda Ative Application Accelerator e crie um cache setting dentro destes limites de TTL. Os campos que Application Accelerator libera, com os seus tipos, enums e defaults. - Como uma requisição passa por uma aplicação, e onde Cache, Application Accelerator e Image Processor agem sobre ela. - Onde a conta acompanha o seu tráfego de Cache, Tiered Cache e Image Processor diante das quantidades desta página. + Como uma requisição passa por uma Application, e onde Cache, Application Accelerator e Image Processor agem sobre ela. + Onde a conta acompanha o seu tráfego de Cache, Tiered Cache e Image Processor. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/applications/solucao-de-problemas.mdx b/apps/docs/src/content/docs/pt-br/pages/build/applications/solucao-de-problemas.mdx index 7b8abc68e6..08849c31a9 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/applications/solucao-de-problemas.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/applications/solucao-de-problemas.mdx @@ -1,6 +1,6 @@ --- -title: Solucionar problemas de Applications -description: Descubra por que uma aplicação não entrega o conteúdo da origem, por que uma regra não age e o que a Azion API retorna ao recusar um objeto de aplicação. +title: Solucione problemas de Applications +description: Descubra por que as requisições não chegam à origem, por que uma regra não age e o que a Azion API retorna ao recusar uma gravação em uma Application. meta_tags: 'applications, troubleshooting, rules engine, debug rules, cache, application accelerator, image processor, errors' namespace: documentation_products_applications_troubleshooting permalink: /documentacao/plataforma/applications/solucao-de-problemas/ @@ -10,21 +10,21 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Use esta página quando uma [aplicação](/pt-br/documentacao/plataforma/applications/) não trata as requisições da forma como você a configurou, ou quando a Azion API recusa um objeto que pertence a ela. Cada seção nomeia um sintoma, a sua causa e a sua correção, e pode ser lida sozinha. Os sintomas da própria aplicação vêm primeiro, depois os de [Cache](/pt-br/documentacao/plataforma/applications/cache/), [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/), os Produtos habilitados em uma aplicação. +Use esta página quando uma [Application](/pt-br/documentacao/plataforma/applications/) não processa as requisições da forma como você a configurou, ou quando a Azion API recusa uma regra, um setting ou outro objeto que pertence a ela. Os sintomas da própria Application vêm primeiro, depois os de [Cache](/pt-br/documentacao/plataforma/applications/cache/), [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/), os recursos da plataforma aninhados em Applications. --- ## As requisições nunca chegam à origem -Os clientes enviam requisições ao domínio de um workload, e a sua origem não registra nenhuma delas. +Os clientes enviam requisições ao domínio de um Workload, e a sua origem não registra nenhuma delas. -Dois vínculos ligam uma requisição a uma origem. O deployment do workload nomeia a aplicação, e uma regra da Request Phase com **Set Connector** nomeia o [connector](/pt-br/documentacao/plataforma/connectors/) que guarda o endereço da origem, já que o registro da aplicação não tem campo para uma origem. +Dois vínculos ligam uma requisição a uma origem. O deployment do Workload define a Application. Uma regra da Request Phase com _Set Connector_ então define o [Connector](/pt-br/documentacao/plataforma/connectors/), que guarda o endereço da origem, porque uma Application só chega a uma origem por meio de um Connector. -- **Nomeie a aplicação no deployment do workload**: no Azion Console, selecione-a no campo **Application** da seção **Deployment Settings** do workload. -- **Adicione uma regra que envia as requisições ao connector**: uma [aplicação nova](/pt-br/documentacao/plataforma/applications/como-funciona/#o-que-uma-aplicacao-nova-tem) não tem regras. Crie uma com **Set Connector** no Azion Console, como mostra [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/), ou com `set_connector` pela [API](/pt-br/documentacao/plataforma/applications/rules-engine/#api). +- **Defina a Application no deployment do Workload**: no Azion Console, selecione-a no campo **Application** da seção **Deployment Settings** do Workload. +- **Adicione uma regra que envia as requisições ao Connector**: uma [Application nova](/pt-br/documentacao/plataforma/applications/como-funciona/#o-que-uma-application-nova-tem) não tem regras. Crie uma com _Set Connector_ no Azion Console, como mostra [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/), ou com `set_connector` pela [API](/pt-br/documentacao/plataforma/applications/rules-engine/#api). - **Dê tempo para a mudança se propagar**: envie a requisição de novo até a origem recebê-la, pelos tempos que [Propagação](/pt-br/documentacao/plataforma/applications/como-funciona/#propagacao) informa. -As requisições que correspondem à regra então chegam à origem pelo connector, e as respostas da origem voltam ao cliente. +As requisições que correspondem à regra então chegam à origem pelo Connector, e as respostas da origem voltam ao cliente. --- @@ -32,10 +32,10 @@ As requisições que correspondem à regra então chegam à origem pelo connecto A sua origem responde a uma requisição com um status `4xx` ou `5xx`, e o cliente recebe uma página de erro. -O connector que uma regra com **Set Connector** nomeia recebe o erro da origem. A página de erro é definida no workload, não na aplicação: o deployment dele seleciona a página ao lado da aplicação e do firewall. +O Connector que uma regra com _Set Connector_ define recebe o erro da origem. A página de erro é definida no Workload, não na Application: o deployment do Workload define a página ao lado da Application e do Firewall. -- **Sirva a sua própria página de erro**: crie-a em [Custom Pages](/pt-br/documentacao/plataforma/workloads/#custom-pages) e selecione-a no campo **Custom Page** das **Deployment Settings** do workload. -- **Sirva a última cópia armazenada no lugar de um `5xx`**: ative o [Stale cache](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#stale-cache) no cache setting que uma regra com **Set Cache Policy** aplica ao path. +- **Sirva a sua própria página de erro**: crie-a como mostra [Primeiros passos com Custom Pages](/pt-br/documentacao/plataforma/workloads/custom-pages/primeiros-passos/). Depois, no Azion Console, selecione-a no campo **Custom Page** da seção **Deployment Settings** do Workload. +- **Sirva a última cópia armazenada no lugar de um `5xx`**: ative o [stale cache](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#stale-cache) no cache setting que uma regra com _Set Cache Policy_ aplica ao path, com `modules.cache.stale_cache.enabled` definido como `true` na API. O cliente então recebe a sua página para um erro da origem, ou a cópia expirada de um objeto em cache dentro da janela de stale. @@ -49,12 +49,12 @@ Uma regra age apenas sobre as requisições que correspondem aos seus critérios - **A regra ainda não se propagou**: a API aceita uma regra com `202` e `state` igual a `pending`. Envie a requisição de novo antes de alterar a regra, pelo tempo que [Propagação](/pt-br/documentacao/plataforma/applications/como-funciona/#propagacao) descreve. - **Os critérios não correspondem à requisição**: [Critérios](/pt-br/documentacao/plataforma/applications/rules-engine/#criterios) lista cada variável, operador e condicional. -- **Uma regra anterior encerrou o processamento**: um behavior como **Finish Request Phase** interrompe os behaviors e as regras depois dele, como explica [Como as regras são executadas](/pt-br/documentacao/plataforma/applications/como-funciona/#como-as-regras-sao-executadas). +- **Uma regra anterior encerrou o processamento**: um behavior como _Deny (403 Forbidden)_ interrompe os behaviors e as regras depois dele, como explica [Como as regras são executadas](/pt-br/documentacao/plataforma/applications/como-funciona/#como-as-regras-sao-executadas). -Para distinguir as três, verifique quais regras rodaram na requisição. **Debug Rules** registra as regras do Rules Engine que rodam em cada requisição, e ele vem desativado em uma aplicação nova. +Para distinguir as três, verifique quais regras rodaram na requisição. Debug Rules registra as regras do Rules Engine que rodam em cada requisição, e ele vem desativado em uma Application nova. -- **Ative Debug Rules**: na aba **Main Settings** da aplicação, ative **Debug Rules** e selecione **Save**. -- **Leia as regras que rodaram**: [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) nomeia o campo que as lista em cada log. Uma regra ausente do log de uma requisição não rodou nela: refaça os critérios dela, ou mova-a para antes da regra que encerrou o processamento. +- **Ative Debug Rules**: no Azion Console, na aba **Main Settings** da Application, ative **Debug Rules** e selecione **Save**. Pela API, defina o campo `debug` da Application como `true`. +- **Leia as regras que rodaram**: o campo `$traceback` de cada log as lista, como descreve [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules). Uma regra ausente do log de uma requisição não rodou nela: refaça os critérios dela, ou mova-a para antes da regra que encerrou o processamento. A regra então aparece no log de cada requisição a que ela corresponde, e os seus behaviors rodam. @@ -62,12 +62,12 @@ A regra então aparece no log de cada requisição a que ela corresponde, e os s ## Um problema aparece no tráfego, mas não nas respostas que você solicita -Os usuários relatam erros ou respostas lentas, mas cada requisição que você envia à aplicação retorna o que você espera. +Os usuários relatam erros ou respostas lentas, mas cada requisição que você envia à Application retorna o que você espera. Uma requisição que você envia mostra uma resposta, de um servidor, em um momento, como mostra [Headers de debug](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#headers-de-debug). Um problema que afeta alguns servidores, alguns paths ou algumas horas não aparece em uma única resposta. -- **Leia métricas agregadas**: [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/dashboards-build/#applications) mostra em gráficos os dados agregados das suas aplicações e os mantém por períodos de armazenamento mais longos. -- **Leia o log bruto de cada requisição**: o [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) guarda os dados brutos de cada requisição. +- **Leia métricas agregadas**: [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/dashboards-build/#applications) mostra em gráficos os dados agregados das suas Applications e os mantém por períodos de armazenamento mais longos. +- **Leia o log bruto de cada requisição**: [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) guarda os dados brutos de cada requisição. - **Consulte apenas os dados de que você precisa**: a GraphQL API retorna [dados agregados e brutos](/pt-br/documentacao/devtools/graphql/recursos/#datasets), limitados aos campos que uma consulta pede, como mostra [Consulte os dados de uso de Applications](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-edge-application-com-graphql/). - **Rastreie as regras que rodaram**: [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) as registra por requisição. @@ -79,10 +79,10 @@ As métricas e os logs então mostram quais requisições, paths ou períodos ca Salvar uma regra de requisição que lê `${request_uri}` falha com `400` e o código `25047` enquanto Application Accelerator está desativado, como [Erros](/pt-br/documentacao/plataforma/applications/rules-engine/#erros) mostra por completo. -Algumas variáveis e alguns behaviors pertencem a um Produto, e a API recusa uma regra que use um deles enquanto esse Produto estiver desativado: `meta.missing_required_modules` nomeia o Produto. +Algumas variáveis e alguns behaviors pertencem a um recurso da plataforma, e a API recusa uma regra que use um deles enquanto esse recurso da plataforma estiver desativado: `meta.missing_required_modules` nomeia o recurso da plataforma. -- **Use `${uri}` no critério em vez disso**: ele não exige nenhum Produto, então a mesma regra retorna `202`, como [Variáveis](/pt-br/documentacao/plataforma/applications/rules-engine/#variaveis) lista para cada variável. -- **Ative o Produto que o erro nomeia**: o switch dele fica na seção **Modules** da aba **Main Settings** da aplicação, e **Save** o aplica. [Produtos](/pt-br/documentacao/plataforma/applications/main-settings/#produtos) informa a flag da Azion CLI e a key da API dele. +- **Use `${uri}` no critério em vez disso**: ele não exige nenhum recurso da plataforma, então a mesma regra retorna `202`, como [Variáveis](/pt-br/documentacao/plataforma/applications/rules-engine/#variaveis) lista para cada variável. +- **Ative o recurso da plataforma que o erro nomeia**: no Azion Console, o switch dele fica na seção **Modules** da aba **Main Settings** da Application, e **Save** o aplica. [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) informa a flag da Azion CLI e a key da API dele. Com Application Accelerator ativado, a regra com `${request_uri}` é aceita. @@ -92,7 +92,7 @@ Com Application Accelerator ativado, a regra com `${request_uri}` é aceita. O corpo de uma regra copiado de um exemplo mais antigo falha com `400`, o código `10039` e `Invalid Choice`, que [Erros](/pt-br/documentacao/plataforma/applications/rules-engine/#erros) lista com o detalhe e o ponteiro. -A API aceita apenas os tipos de behavior que ela define. O que adiciona um header à requisição é `add_request_header`, **Add Request Header** no Azion Console, e não `add_header`. +A API aceita apenas os tipos de behavior que ela define. O que adiciona um header à requisição é `add_request_header`, _Add Request Header_ no Azion Console, e não `add_header`. - **Envie `add_request_header`**: leve o header como `name: value` em `attributes.value`, como em `{ "type": "add_request_header", "attributes": { "value": "Accept: image/webp" } }`. - **Procure os outros tipos**: [Behaviors](/pt-br/documentacao/plataforma/applications/rules-engine/#behaviors) lista cada behavior e o seu tipo. @@ -103,9 +103,9 @@ A regra então é aceita e, lida de volta, traz o tipo `add_request_header`. ## Uma conexão WebSocket não retorna 101 Switching Protocols -Uma conexão WebSocket pela aplicação retorna um status diferente de `101 Switching Protocols`, mesmo um `2xx` ou um `3xx`. +Uma conexão WebSocket pela Application retorna um status diferente de `101 Switching Protocols`, mesmo um `2xx` ou um `3xx`. -Apenas `101` significa uma conexão com upgrade: qualquer outro status significa que o cliente, a aplicação ou a origem não a completou. +Apenas `101` significa uma conexão com upgrade: qualquer outro status significa que o cliente, a Application ou a origem não a completou. - **Confirme o suporte nativo a WebSocket**: o cliente e a origem precisam dele, como exige [Suporte no cliente e na origem](/pt-br/documentacao/plataforma/applications/websocket/#suporte-no-cliente-e-na-origem). - **Envie os dois headers de upgrade**: `Upgrade: websocket` e `Connection: upgrade`, como exige [Headers de upgrade](/pt-br/documentacao/plataforma/applications/websocket/#headers-de-upgrade). @@ -115,17 +115,29 @@ A conexão então retorna `101 Switching Protocols`. --- +## Uma conexão WebSocket se fecha depois de cerca de 15 minutos + +Uma conexão WebSocket pela Application se fecha depois de cerca de 15 minutos, enquanto o cliente e a origem ainda a usam. + +A Azion recicla as conexões keepalive dos seus servidores aproximadamente a cada 15 minutos, e essa reciclagem pode fechar uma conexão WebSocket ativa, como informa [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/#limites). + +- **Reabra a conexão a partir do cliente**: detecte a conexão fechada no código do seu cliente e abra uma nova. + +O cliente então mantém uma nova conexão, que retorna `101 Switching Protocols`. + +--- + ## Cache -Toda aplicação nova tem Cache ativado, mas um cache setting altera apenas as requisições às quais uma regra o aplica. Para saber como Cache responde a uma requisição, consulte a [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao). +Toda Application nova tem Cache ativado, mas um cache setting altera uma requisição apenas depois que uma regra aplica esse cache setting à requisição. Para saber como Cache responde a uma requisição, consulte a [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao). ### Um cache setting salvo não tem efeito e as respostas continuam MISS -`x-cache` mostra `MISS` em cada resposta para o path, e a sua origem recebe tantas requisições quanto antes. +`x-cache` mostra `MISS` em cada resposta para o path, ou `-` enquanto Application Accelerator está ativado, e a sua origem recebe tantas requisições quanto antes. -Um cache setting salvo age apenas sobre as requisições às quais uma regra da Request Phase já propagada o aplica por meio de **Set Cache Policy**. +Um cache setting salvo age sobre uma requisição apenas depois que uma regra da Request Phase já propagada aplica esse cache setting à requisição por meio de _Set Cache Policy_. -- **Aplique o setting com uma regra**: adicione **Set Cache Policy** com o setting a uma regra da Request Phase que cubra o path, como mostra [Crie um cache setting](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/ajustar-cache-settings/). +- **Aplique o setting com uma regra**: adicione _Set Cache Policy_ com o setting a uma regra da Request Phase que cubra o path, como mostra [Crie um cache setting](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/ajustar-cache-settings/). - **Aguarde a propagação da regra**: [Propagação](/pt-br/documentacao/plataforma/applications/como-funciona/#propagacao) informa o tempo que ela leva. - **Leia o status de várias requisições**: cada uma pode vir de um servidor diferente. [Verifique o status de cache de uma resposta](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/) mostra como lê-lo. @@ -135,30 +147,42 @@ Com a regra em vigor, a requisição que armazena a cópia informa `MISS`, e as Os dois headers de debug trazem um traço, `x-cache: -` e `x-cache-key: -`, então a resposta não tem nem status de cache nem key. -O traço marca conteúdo restrito de cache, como lista [Status de cache](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#status-de-cache). As respostas `GET` e `HEAD` são armazenadas em cache nativamente, enquanto as respostas `POST` e `OPTIONS` exigem Application Accelerator e um cache setting que varie pelo seu método. +O traço marca uma resposta que a Azion não armazena, como lista [Status de cache](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#status-de-cache), e em um `GET` ou em um `HEAD` ele aparece só enquanto Application Accelerator está ativado. As respostas `GET` e `HEAD` são armazenadas em cache nativamente, enquanto as respostas `POST` e `OPTIONS` exigem Application Accelerator e um cache setting que varie pelo seu método. -- **Ative Application Accelerator primeiro**: com ele desativado, a API recusa o campo do método com o erro `21013`. [Produtos](/pt-br/documentacao/plataforma/applications/main-settings/#produtos) tem o switch. -- **Armazene o método em cache**: selecione-o em **Cache vary by Method**, na seção **Application Accelerator** do cache setting, que então é lido de volta com `"cache_vary_by_method":["post"]` para _POST_. [Armazene em cache respostas de POST e OPTIONS](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-de-respostas-post-e-options/) tem os passos. -- **Distinga os casos pelo método**: em um `GET` ou em um `HEAD`, o traço vem de outro lugar, como de uma resposta que uma função constrói. +- **Ative Application Accelerator primeiro**: com ele desativado, a API recusa o campo do método com o erro `21013`. [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) tem o switch. +- **Armazene o método em cache**: no Azion Console, selecione-o em **Cache vary by Method**, na seção **Application Accelerator** do cache setting, que então é lido de volta com `"cache_vary_by_method":["post"]` para _POST_. [Armazene em cache respostas de POST e OPTIONS](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-de-respostas-post-e-options/) tem os passos. +- **Distinga os casos pelo método**: em um `GET` ou em um `HEAD`, o traço significa apenas que a Azion não armazena a resposta, seja ela construída pela origem ou por uma Function. Com Application Accelerator desativado, a mesma resposta informa `MISS`, com `x-cache-expires-in: 0`. -As respostas ao método armazenado em cache então trazem um status, e uma key que termina com um hash MD5 do corpo da requisição. +As respostas ao método armazenado em cache então trazem um status, e uma key que começa com o método. A key de um `POST` também termina com `@@` e um hash MD5 do corpo da requisição. ### O conteúdo continua sendo entregue do cache depois de uma regra com Bypass Cache -As requisições que uma regra com **Bypass Cache** corresponde continuam recebendo uma cópia armazenada, e a origem não as vê. +As requisições às quais uma regra com _Bypass Cache_ corresponde continuam recebendo uma cópia armazenada, e a origem não as vê. -**Bypass Cache** alcança o cache da Azion, mas não a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache), que mantém os objetos pelo TTL mínimo, então a primeira camada ainda pode responder a partir dela. +_Bypass Cache_ impede que o cache da Azion armazene a resposta, mas a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache) fica fora do seu alcance. Enquanto um cache setting mantém Tiered Cache ativado, essa camada continua armazenando objetos pelo Max Age do cache setting e responde antes da origem. -- **Desative Tiered Cache**: na seção **Cache** do cache setting que atende o path. +- **Desative Tiered Cache**: no Azion Console, na seção **Cache** do cache setting que atende o path. Pela API, defina `modules.cache.tiered_cache.enabled` como `false` nesse setting. - **Purgue as duas camadas, a do Tiered Cache primeiro**: purgue Tiered Cache por cache key e depois Cache, para que a primeira camada não se encha de novo com uma cópia desatualizada, como mostra [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). -As requisições que a regra envia à origem então trazem `x-cache: BYPASS`. +As requisições que a regra envia à origem então trazem `-` ou `BYPASS` em `x-cache`. + +### As respostas mantêm uma versão antiga depois que você substitui um arquivo na origem + +Você substituiu um arquivo na origem, e as respostas para a URL dele mantêm a versão antiga. + +Uma cópia armazenada fica em cache até o fim do seu TTL ou até que um purge a remova, mesmo depois que você substitui o arquivo na origem, como explica [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). + +- **Purgue a URL**: remova a cópia armazenada, como mostra [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). +- **Purgue Tiered Cache primeiro quando ele estiver ativado**: purgue a camada do Tiered Cache por cache key e depois Cache, como explica [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#purge). +- **Mude o nome do objeto**: coloque uma versão no nome do arquivo, para que cada versão seja um objeto separado, como descreve [Mude o nome de um objeto quando o conteúdo dele mudar](/pt-br/documentacao/plataforma/applications/boas-praticas/#mude-o-nome-de-um-objeto-quando-o-conteudo-dele-mudar). + +Na sua requisição seguinte, a URL purgada informa `x-cache: MISS`, e a resposta traz a nova versão. ### Um purge não expirou uma variação do objeto O purge foi aceito, mas alguns visitantes, ou algumas query strings, continuam recebendo o conteúdo antigo. -Um purge por URL mapeia cada URL para uma única cache key sem variação, então as cópias que variam por cookie, device group ou formato de imagem sobrevivem a ele, por mais que você o repita. Ele alcança uma variação por query string apenas quando a URL lista os argumentos na ordem em que a key os armazena, alfabética quando **Sort** está ativado. +Um purge por URL mapeia cada URL para uma única cache key sem variação, então as cópias que variam por cookie, device group ou formato de imagem sobrevivem a ele, por mais que você o repita. Ele alcança uma variação por query string apenas quando a URL lista os argumentos na ordem em que a key os armazena, alfabética quando a variação tem `sort_enabled` definido como `true`. - **Purgue por cache key**: liste cada variação do objeto, no máximo 50 keys em uma requisição, cada uma copiada do header `x-cache-key` da sua resposta. - **Purgue por wildcard**: termine a expressão com `@@*` para as variações que acrescentam o separador `@@`, como as por cookie e por device group, ou com `?*` para as variações por query string. @@ -167,20 +191,20 @@ Na sua requisição seguinte, cada variação purgada informa `x-cache: MISS`, c ### Um Max Age menor que 60 segundos é recusado com o erro 21021 -Criar ou atualizar um cache setting com um **Max Age** menor que 60 segundos retorna `400` e o código `21021`, como [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha. +Criar ou atualizar um cache setting com um Max Age menor que 60 segundos retorna `400` e o código `21021`, como [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha. -Sem Application Accelerator, o piso é de 60 segundos, com Tiered Cache ativado ou desativado. Com ele, um **Max Age** de `30` ou de `0` é salvo, a menos que Tiered Cache esteja ativado, cujo piso é de 3 segundos. +Sem Application Accelerator, o piso é de 60 segundos, com Tiered Cache ativado ou desativado. Com ele, um Max Age de `30` ou de `0` é salvo, a menos que Tiered Cache esteja ativado, cujo piso é de 3 segundos. -- **Ative Application Accelerator**: o switch fica em **Main Settings** › **Modules**. -- **Mantenha-o desativado e aumente o valor**: um **Max Age** de 60 segundos ou mais é salvo sem ele. +- **Ative Application Accelerator**: no Azion Console, o switch fica em **Main Settings** › **Modules**. +- **Mantenha-o desativado e aumente o valor**: um Max Age de 60 segundos ou mais é salvo sem ele. O cache setting então é aceito, dentro dos limites que [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache) lista. ### Tiered Cache não pode ser ativado e a API retorna 21001 ou 21020 -Um cache setting que envia `tiered_cache.enabled` como `true` é recusado com `400`: o código `21001` responde ao comportamento de cache `honor`, e o código `21020` a um **Max Age** menor que 3 segundos, como [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha para cada um. +Um cache setting que envia `tiered_cache.enabled` como `true` é recusado com `400`: o código `21001` responde ao comportamento de cache `honor`, e o código `21020` a um Max Age menor que 3 segundos, como [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha para cada um. -Tiered Cache exige o _Override cache behavior_, `override` na API, e um **Max Age** de pelo menos 3 segundos. Com Application Accelerator desativado, o piso de 60 segundos do erro `21021` se aplica primeiro, então de 3 a 59 segundos continua sendo recusado. +Tiered Cache exige o _Override cache behavior_ no Azion Console, `override` na API, e um Max Age de pelo menos 3 segundos. Com Application Accelerator desativado, o piso de 60 segundos do erro `21021` se aplica primeiro, então de 3 a 59 segundos continua sendo recusado. - **Envie o comportamento e o Max Age em uma requisição**: `modules.cache.behavior` igual a `override`, com um `max_age` de pelo menos 3, ou de pelo menos 60 com Application Accelerator desativado. - **Use `--file` na Azion CLI**: nenhuma flag da CLI define o comportamento de cache, então `--tiered-caching-enabled` sozinho sempre termina em `21001`. Este comando grava o corpo em um arquivo e cria o setting a partir dele: @@ -198,16 +222,16 @@ A CLI imprime `Created Cache Settings configuration with ID `, Um `DELETE` em um cache setting responde `400` e o código `21014`, que [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) lista com o detalhe. -O behavior **Set Cache Policy** de alguma regra ainda nomeia o setting, e um setting em uso não pode ser removido. +O behavior _Set Cache Policy_ de alguma regra ainda aplica o setting, e um setting em uso não pode ser removido. -- **Libere o setting**: na aba **Rules Engine**, aponte o **Set Cache Policy** dessa regra para outro setting, ou exclua a regra. -- **Exclua-o de novo**: com Azion CLI, a exclusão recebe o ID da aplicação e o ID do setting: +- **Libere o setting**: no Azion Console, na aba **Rules Engine** da Application, aponte o _Set Cache Policy_ dessa regra para outro setting, ou exclua a regra. +- **Exclua-o de novo**: com Azion CLI, a exclusão recebe o ID da Application e o ID do setting: ```bash azion delete cache-setting --application-id --cache-setting-id --format json ``` -Sem nenhuma regra que nomeie o setting, a CLI imprime `{"message": "Caches settings configuration was successfully deleted"}`, e o setting sai da lista de **Cache Settings**. +Sem nenhuma regra que aplique o setting, a CLI imprime `{"message": "Caches settings configuration was successfully deleted"}`, e o setting sai da lista de **Cache Settings** no Azion Console. ### Uma requisição de purge é rejeitada com 30001, 30003 ou 30005 @@ -216,7 +240,7 @@ Um purge volta com `400` em vez de `201`, com um de três códigos que [Erros](/ | Código | Título | Causa | Correção | | --- | --- | --- | --- | | `30001` | `Invalid Purge Layer For Purge Type` | `layer` é `tiered_cache` em um purge por URL ou por wildcard | Purgue por cache key para alcançar a camada do Tiered Cache, ou altere `layer` para `cache` | -| `30003` | `Unauthorized Domain` | Um item nomeia um domínio fora da conta. Um purge alcança apenas os domínios que pertencem à conta que o envia | Corrija o domínio no item | +| `30003` | `Unauthorized Domain` | Um item nomeia um domínio que não pertence à conta que envia o purge | Corrija o domínio no item | | `30005` | `Invalid Purge Cachekey` | Um purge por cache key traz um item que não é uma key válida | Copie a key do header `x-cache-key` como ela é, sem separador de scheme nem espaços | Azion CLI informa `30001` com o detalhe da API, como mostra este purge por URL na camada do Tiered Cache: @@ -229,67 +253,67 @@ O comando imprime `Error: ["Invalid purge layer for purge type \"url\"."]`. Um p ### Azion CLI imprime um objeto de erro vazio -Um `create` ou `update` de cache setting falha, e com `--format json` a Azion CLI imprime apenas `{"error": {}}`. +Um `create` ou `update` de cache setting falha, e com `--format json` Azion CLI imprime apenas `{"error": {}}`. -Com saída JSON, Azion CLI 4.23.0 perde o código e o título com que a API respondeu. +Com saída JSON, Azion CLI 4.23.0 e 4.24.0 perdem o código e o título com que a API respondeu. -- **Repita o comando sem `--format json`**: a saída simples traz a mensagem da API, como `Error: Failed to create the Cache Settings configuration: ["It's not possible to use this edge cache behavior while using Tiered Cache."]` para Tiered Cache com `honor`. +- **Repita o comando sem `--format json`**: a saída simples traz a mensagem da API, como `Error: Failed to create the Cache Settings configuration: ["It's not possible to use this edge cache behavior while using Tiered Cache."]` para Tiered Cache com `honor`. A mensagem mantém um nome antigo do Cache. - **Procure a mensagem**: nesta página, ou em [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros), que lista todos os códigos do endpoint de cache settings. -Corrija a requisição com esse motivo e envie-a de novo. +A saída simples então mostra por que a API recusou a requisição, e a requisição corrigida é salva. --- ## Application Accelerator -Application Accelerator decide três coisas em uma aplicação: o que entra em uma cache key, quais métodos HTTP são armazenados em cache e quais behaviors do Rules Engine uma regra pode usar. Ele vem desativado em uma aplicação nova. Para saber como uma variação altera a key, consulte a [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao). +Application Accelerator libera quatro capacidades para o cache e para as regras de uma Application: a variação de cache, o cache de respostas `POST` e `OPTIONS`, um Max Age menor que 60 segundos e mais behaviors e variáveis do Rules Engine. Ele vem desativado em uma Application nova. Para saber como uma variação altera a key, consulte a [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/#caminho-da-requisicao). ### Uma requisição POST não informa status de cache -Um `POST` informa `-` em `X-Cache` até que Application Accelerator esteja ativado e o cache setting nomeie _POST_ em **Cache vary by Method**, um campo que [HTTP methods](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#http-methods) lista para cada interface. Para a correção, consulte [O header x-cache informa um traço em cada resposta de um path](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#o-header-x-cache-informa-um-traco-em-cada-resposta-de-um-path). +Um `POST` informa `-` em `x-cache` até que Application Accelerator esteja ativado e o cache setting armazene o método em cache: _POST_ em **Cache vary by Method** no Azion Console, ou `post` em `cache_vary_by_method` na API. [HTTP methods](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#http-methods) mostra o campo para cada interface. Para a correção, consulte [O header x-cache informa um traço em cada resposta de um path](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#o-header-x-cache-informa-um-traco-em-cada-resposta-de-um-path). ### Variações por cookie e por device group sobrevivem a um purge -Essas variações vêm da seção **Application Accelerator** do cache setting, e cada uma é um objeto sob a sua própria key, que um purge por URL nunca alcança. Para o purge por cache key ou pelo wildcard `@@*` que a alcança, consulte [Um purge não expirou uma variação do objeto](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#um-purge-nao-expirou-uma-variacao-do-objeto). +Essas variações vêm do objeto `modules.application_accelerator` do cache setting, a seção **Application Accelerator** no Azion Console. Cada uma é um objeto sob a sua própria key, fora do alcance de um purge por URL. Para o purge por cache key ou pelo wildcard `@@*` que as alcança, consulte [Um purge não expirou uma variação do objeto](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#um-purge-nao-expirou-uma-variacao-do-objeto). ### Um purge por URL não alcança uma variação por query string -Um purge por URL alcança uma variação por query string apenas quando lista os argumentos pelos quais a key varia, na ordem em que a key os armazena, que é alfabética quando **Sort** está ativado em **Cache vary by Query String**. Para esse purge e o wildcard `?*`, consulte [Um purge não expirou uma variação do objeto](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#um-purge-nao-expirou-uma-variacao-do-objeto). +Um purge por URL alcança uma variação por query string apenas quando lista os argumentos pelos quais a key varia, na ordem em que a key os armazena. Essa ordem é alfabética quando **Sort** está ativado em **Cache vary by Query String** no Azion Console, `sort_enabled` na API. Para esse purge e o wildcard `?*`, consulte [Um purge não expirou uma variação do objeto](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#um-purge-nao-expirou-uma-variacao-do-objeto). ### Um behavior ou uma variável não pode ser selecionado no Rules Engine -Na aba **Rules Engine** de uma aplicação, um behavior como **Bypass Cache**, **Forward Cookies** ou **Rewrite Request** não pode ser adicionado a uma regra, e a variável `${device_group}` não está disponível nos critérios. +No Azion Console, na aba **Rules Engine** de uma Application, um behavior como _Bypass Cache_, _Forward Cookies_ ou _Rewrite Request_ não pode ser adicionado a uma regra. Na lista, o nome dele termina com `- Required Application Accelerator`, e a variável `${device_group}` não está disponível nos critérios. -Sete behaviors e a variável `${device_group}` ficam bloqueados enquanto Application Accelerator está desativado na aplicação. +Seis behaviors e a variável `${device_group}` ficam bloqueados enquanto Application Accelerator está desativado na Application. -- **Ative Application Accelerator**: o switch fica em **Main Settings** › **Modules**. -- **Ative Functions para Run Function**: **Run Function** também exige [Functions](/pt-br/documentacao/plataforma/functions/) ativado na aplicação, como explica [Run Function não aparece na lista de comportamentos](/pt-br/documentacao/plataforma/functions/solucao-de-problemas/#run-function-nao-aparece-na-lista-de-comportamentos). +- **Ative Application Accelerator**: no Azion Console, o switch fica em **Main Settings** › **Modules**. +- **Ative Functions para Run Function**: _Run Function_ depende de [Functions](/pt-br/documentacao/plataforma/functions/) ativado na Application, e não de Application Accelerator, como explica [Run Function não aparece na lista de comportamentos](/pt-br/documentacao/plataforma/functions/solucao-de-problemas/#run-function-nao-aparece-na-lista-de-comportamentos). -Uma regra então pode receber os sete behaviors, e os critérios dela podem usar `${device_group}`, como [Behaviors do Rules Engine](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#behaviors-do-rules-engine) lista por fase. +Uma regra então pode receber os seis behaviors, e os critérios dela podem usar `${device_group}`, como [Behaviors do Rules Engine](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#behaviors-do-rules-engine) lista por fase. ### O conteúdo é entregue do cache com Bypass Cache configurado -**Bypass Cache** exige Application Accelerator, e uma regra que o aplica ainda pode ser respondida pela camada do Tiered Cache, que [Bypass Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache) não alcança. A regra funciona, então alterá-la não corrige nada: desative Tiered Cache e purgue as duas camadas, como descreve [O conteúdo continua sendo entregue do cache depois de uma regra com Bypass Cache](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#o-conteudo-continua-sendo-entregue-do-cache-depois-de-uma-regra-com-bypass-cache). +_Bypass Cache_ exige Application Accelerator, e uma requisição a que uma regra com _Bypass Cache_ corresponde ainda pode ser respondida pela camada do Tiered Cache, que [Bypass Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/#bypass-cache) não alcança. A regra funciona, então alterá-la não corrige nada: desative Tiered Cache e purgue as duas camadas, como descreve [O conteúdo continua sendo entregue do cache depois de uma regra com Bypass Cache](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#o-conteudo-continua-sendo-entregue-do-cache-depois-de-uma-regra-com-bypass-cache). ### Uma variação de cache é recusada com o erro 21013 -Salvar um cache setting que define um campo da sua seção **Application Accelerator** retorna `400` e o código `21013`, como [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha. +Salvar um cache setting retorna `400` e o código `21013` quando ele define uma variação na sua seção **Application Accelerator** no Azion Console, ou um `behavior` diferente de `ignore` ou um método em `modules.application_accelerator` na API. [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha o código. -Esses campos, em `modules.application_accelerator`, variam o cache por método, query string, cookie e device group, e cada um exige Application Accelerator. +Uma variação de cache por método, query string, cookie ou device group exige Application Accelerator. -- **Ative Application Accelerator e depois salve o setting de novo**: o switch fica em **Main Settings** › **Modules**. -- **Leia o motivo quando Azion CLI o esconde**: com `--format json`, Azion CLI 4.23.0 imprime essa recusa como `{"error": {}}` para um setting com um allowlist de query string, como explica [Azion CLI imprime um objeto de erro vazio](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#azion-cli-imprime-um-objeto-de-erro-vazio). +- **Ative Application Accelerator e depois salve o setting de novo**: no Azion Console, o switch fica em **Main Settings** › **Modules**. +- **Leia o motivo quando Azion CLI o esconde**: com `--format json`, Azion CLI 4.23.0 imprime essa recusa como `{"error": {}}` para um setting com uma allowlist de query string, e a 4.24.0 também perde o código e o título de uma recusa. Para ler o motivo, consulte [Azion CLI imprime um objeto de erro vazio](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#azion-cli-imprime-um-objeto-de-erro-vazio). O setting então é salvo, e a sua variação é lida de volta como foi enviada. ### Uma variação por query string é recusada com o erro 21018 -Um cache setting cujo comportamento de query string é _Allowlist_ ou _Denylist_, enviado com uma lista de campos vazia, retorna `400` e o código `21018`, como [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha. +Um cache setting cujo comportamento de query string é `allowlist` ou `denylist`, enviado com uma lista de campos vazia, retorna `400` e o código `21018`, como [Erros](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#erros) detalha. -Esses comportamentos nomeiam os campos pelos quais a key varia, então cada um precisa de pelo menos um, e o Azion Console torna **Fields** obrigatório. +`allowlist` nomeia os campos pelos quais a key varia, e `denylist` nomeia os que ela deixa de fora. Cada um precisa de pelo menos um, e Azion Console torna **Fields** obrigatório. -- **Liste os campos**: insira pelo menos um parâmetro de query string em **Fields**, um por linha, ou envie-os em `fields` pela API. -- **Mantenha o padrão quando a key não deve variar**: _Ignore_, o comportamento padrão, é salvo com uma lista `fields` vazia. +- **Liste os campos**: no Azion Console, insira pelo menos um parâmetro de query string em **Fields**, um por linha, ou envie-os em `fields` pela API. +- **Mantenha o padrão quando a key não deve variar**: o comportamento padrão, `ignore` na API e _Ignore_ no Azion Console, é salvo com uma lista `fields` vazia. O setting então é salvo, com `cache_vary_by_querystring` guardando o que você enviou, como [Cache variation](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation) lista. @@ -297,58 +321,70 @@ O setting então é salvo, com `cache_vary_by_querystring` guardando o que você ## Image Processor -Image Processor constrói uma imagem derivada a partir da imagem de origem quando uma regra aplica **Optimize Images**, e ele vem desativado em uma aplicação nova. Para o caminho da imagem de origem até a imagem derivada, consulte a [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao). +Image Processor constrói uma imagem derivada a partir da imagem de origem quando uma regra aplica _Optimize Images_, e ele vem desativado em uma Application nova. Para o caminho da imagem de origem até a imagem derivada, consulte a [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao). -### Um erro 504 em uma requisição cujo ims não é o último parâmetro +### A imagem volta sem transformação, embora x-ims informe Enabled -Uma requisição de uma imagem retorna um erro `504`, e a URL dela tem outro parâmetro de query string depois de `ims=`. +Uma requisição com uma query string `ims` retorna a imagem de origem como ela é, e a resposta traz `x-ims: Enabled`. -`ims=` precisa vir por último entre os parâmetros da URL: um parâmetro depois dele pode fazer a requisição retornar um `504`, embora nem toda requisição assim falhe. +Image Processor não consegue interpretar o valor de `ims`, como `450xOrig`, então retorna a imagem de origem sem transformação. `ims` pode ficar em qualquer posição da query string, então só o valor dele decide o resultado. -- **Coloque `ims` por último**: mova os outros parâmetros para antes de `ims=`, como em `example.com/image.jpeg?ts=1234&ims=1000x1000`. Para a regra, consulte [Posição do parâmetro ims](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#posicao-do-parametro-ims). +- **Escreva o valor em uma forma que Image Processor interpreta**: por exemplo, `?ims=400x` para uma largura de 400 pixels, como [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/) mostra para cada parâmetro. -Com `ims=` por último, a URL retorna a imagem derivada, e não um `504`. +A URL então retorna a imagem derivada, com a transformação que o valor de `ims` solicita. ### A imagem é entregue sem processamento e a sua query string ims é ignorada A query string `ims` de uma requisição é válida, mas a imagem de origem volta como está, sem redimensionamento, recorte ou filtro. -Uma query string `ims` não inicia uma transformação sozinha: uma regra precisa corresponder à requisição e aplicar **Optimize Images**. +Uma transformação só começa quando uma regra corresponde à requisição e aplica _Optimize Images_, qualquer que seja o pedido da query string `ims`. -- **Verifique a que a regra corresponde**: na aba **Rules Engine**, compare o critério da regra com a requisição. Um critério para imagens compara `${uri}`, ou `${request_uri}` com Application Accelerator ativado, por meio de `matches` com um argumento como `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. -- **Verifique o behavior**: **Optimize Images** precisa ser um behavior da Request Phase da regra, ao lado de **Set Cache Policy** quando a regra também armazena o resultado em cache, como descreve [Behaviors do Rules Engine](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#behaviors-do-rules-engine). +- **Verifique a que a regra corresponde**: no Azion Console, na aba **Rules Engine** da Application, compare o critério da regra com a requisição. Um critério para imagens compara `${uri}`, ou `${request_uri}` com Application Accelerator ativado, por meio de `matches` com um argumento como `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. +- **Verifique o behavior**: _Optimize Images_ precisa ser um behavior da Request Phase da regra. Quando a regra também armazena o resultado em cache, _Set Cache Policy_ fica ao lado dele, como descreve [Behaviors do Rules Engine](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#behaviors-do-rules-engine). - **Siga o guia**: [Configure Image Processor em uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/processar-imagens/) constrói a regra passo a passo. Uma requisição que corresponde à regra então recebe uma imagem derivada, com `x-ims: Enabled` nos headers de resposta. -### A imagem não é convertida para WEBP +### Um arquivo que não é imagem retorna um 400 vazio + +Uma requisição a que uma regra com _Optimize Images_ corresponde retorna `400` com o corpo vazio. A resposta traz `server: Azion IMS` e nenhum header `x-ims`. + +A regra corresponde a um path que não retorna uma imagem, como um arquivo de texto ou uma resposta JSON, e _Optimize Images_ faz essa requisição falhar. Os critérios da regra precisam corresponder só a paths de imagens. + +- **Restrinja o critério às extensões de imagem**: um critério para imagens compara `${uri}`, ou `${request_uri}` com Application Accelerator ativado, por meio de `matches` com um argumento como `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. Para a regra, consulte [Behaviors do Rules Engine](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#behaviors-do-rules-engine). + +Uma requisição de um arquivo fora do critério então recebe a resposta da origem. + +### A imagem não é convertida para WEBP ou AVIF + +Você solicita uma conversão para WEBP ou AVIF, e a imagem chega em outro formato. -Você solicita uma conversão para WEBP, e a imagem chega em outro formato. +Um filtro `filters:format()` retorna o formato que nomeia, qualquer que seja o header `Accept` da requisição, como informa [Conversão de formato](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#conversao-de-formato), então uma imagem em outro formato significa que a conversão não é executada. O header `x-ims` da resposta distingue as duas causas: -Uma conversão para WEBP acontece apenas para uma requisição cujo header `Accept` nomeia o formato, `Accept: image/webp`, como exige [Conversão de formato](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#conversao-de-formato). +- **Verifique a que a regra corresponde quando a resposta não tem `x-ims`**: nenhuma regra com _Optimize Images_ corresponde à requisição. [A imagem é entregue sem processamento e a sua query string ims é ignorada](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#a-imagem-e-entregue-sem-processamento-e-a-sua-query-string-ims-e-ignorada) mostra a que a regra precisa corresponder. +- **Verifique o valor de `ims` quando a resposta traz `x-ims: Enabled`**: Image Processor não consegue interpretar o valor, como descreve [A imagem volta sem transformação, embora x-ims informe Enabled](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#a-imagem-volta-sem-transformacao-embora-x-ims-informe-enabled). -- **Defina o header a partir de uma regra**: dê à regra um behavior **Add Request Header** na Request Phase dela, com o valor `Accept: image/webp`, `add_request_header` na API. Para o behavior, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#behaviors-do-rules-engine). +As requisições correspondentes então recebem a imagem como `image/webp` ou `image/avif`, o formato que a string `ims` solicita. -As requisições correspondentes então recebem a imagem como `image/webp`. +### Cada requisição para a mesma imagem derivada chega a Image Processor -### Cada requisição para a mesma imagem derivada é processada de novo +Requisições repetidas para a mesma imagem com o mesmo valor de `ims` nunca informam `HIT` em `x-cache`. -Cada requisição para a mesma imagem com o mesmo valor de `ims` soma uma imagem processada ao medidor de Images da conta, em vez de vir do cache. +Nenhum cache setting se aplica às requisições de imagens, então o cache da Application não guarda nenhuma imagem derivada. Toda requisição chega a Image Processor, que responde a uma transformação repetida a partir do seu próprio cache. -**Optimize Images** processa a imagem, e guardar o resultado exige um cache setting que uma regra aplica com **Set Cache Policy**. Variar esse setting por `ims` é uma variação por query string, então exige Application Accelerator, que o processamento não exige. +- **Aplique um cache setting às requisições de imagens**: adicione _Set Cache Policy_, com o cache setting que atende as imagens, à regra que aplica _Optimize Images_. Para a allowlist de query string que esse setting carrega, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#variacao-de-cache). -- **Aplique um cache setting às requisições de imagens**: adicione **Set Cache Policy**, com o cache setting que atende as imagens, à regra que aplica **Optimize Images**. -- **Adicione ims ao allowlist de query string**: em **Cache vary by Query String**, na seção **Application Accelerator** desse setting, escolha _Allowlist_ como **Behavior** e insira `ims` em **Fields**, como descreve [Cache variation](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#cache-variation). +A regra então aplica o cache setting a cada requisição de imagem a que corresponde, e uma requisição que o cache responde não chega a Image Processor. -Lido de volta, o cache setting então guarda `{ "behavior": "allowlist", "fields": ["ims"], "sort_enabled": false }` em `cache_vary_by_querystring`. +### Um redimensionamento com fit-in não amplia a imagem -### Um redimensionamento maior que a original não amplia a imagem +Você pede `fit-in/WidthxHeight` com dimensões além das da imagem de origem, e a imagem derivada volta sem ser maior que a original. -Você pede `fit-in/WidthxHeight`, ou dimensões além das da imagem de origem, e a imagem derivada volta sem ser maior que a original. +`fit-in` apenas reduz uma imagem. Sem `fit-in`, um tamanho maior amplia a imagem. -O redimensionamento funciona como projetado, e nenhuma configuração o altera. `fit-in` não amplia uma imagem, e, sem `fit-in`, pedir mais resolução do que a original tem retorna a maior resolução que a imagem de origem permite. +- **Peça o tamanho sem `fit-in`**: `?ims=1200x` amplia a largura e mantém a proporção, e `?ims=1200x900` preenche a caixa exata, como [Redimensionamento](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento) mostra para cada forma. -O resultado mantém o tamanho da imagem de origem, ou assume o maior tamanho que cabe na caixa solicitada, como [Redimensionamento](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/#redimensionamento) mostra para cada forma. +A imagem derivada então volta no tamanho solicitado, maior que a imagem de origem. ### Um valor de rotação não tem efeito @@ -367,7 +403,7 @@ A imagem derivada então gira para a esquerda pelo ângulo que você solicitou. Cada variável, operador e behavior de uma regra, e os erros retornados quando uma regra é recusada. - Os switches dos Produtos, a configuração Debug Rules e os erros que uma gravação de aplicação retorna. + Os switches dos recursos da plataforma, a configuração Debug Rules e os erros que uma gravação em uma Application retorna. Os headers de upgrade, o suporte de que um cliente e uma origem precisam e o status que uma conexão retorna. Os tipos de purge, as duas camadas e o purge que alcança cada tipo de variação. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/cache/cache-keys.mdx b/apps/docs/src/content/docs/pt-br/pages/build/cache/cache-keys.mdx index e840d89ae8..1b5d155cda 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/cache/cache-keys.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/cache/cache-keys.mdx @@ -12,83 +12,86 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Uma cache key é a entrada de índice sob a qual o [Cache](/pt-br/documentacao/plataforma/applications/cache/) armazena um objeto. A Azion a monta a partir da requisição: o scheme, o host, o path e as variações que um cache setting acrescenta. Uma requisição cuja key casa com um objeto armazenado é respondida pela cópia. Caso contrário, a requisição vai à origem, e a Azion armazena a resposta sob essa key. Para o processo de busca, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/); para os campos que acrescentam variações, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). +Uma cache key é a entrada de índice sob a qual [Cache](/pt-br/documentacao/plataforma/applications/cache/) armazena um objeto. A Azion a monta a partir da requisição: o scheme, o host, o path e as variações que um cache setting ou [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) acrescenta. Uma requisição cuja key casa com um objeto válido armazenado é respondida com esse objeto. Caso contrário, a origem ou uma [Function](/pt-br/documentacao/plataforma/functions/) constrói a resposta, e a Azion pode armazenar essa resposta sob essa key. Para o processo de busca, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). Para os campos que acrescentam variações, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). --- ## Formato da key -A key padrão concatena quatro elementos da URI da requisição, nesta ordem: +A key padrão concatena três elementos da URI da requisição, nesta ordem: | Elemento | Exemplo | | --- | --- | | Scheme | `https` | | Host | `static.example.com` | | Path | `/page/site.js` | -| Separador de variação e variações | `@@Mobile` | A query string não faz parte da key padrão: `https://static.example.com/page/site.js?city=city&name=name` gera a mesma key que a URI sem ela. A variação por query string, em Variações, a acrescenta. -A URI `https://static.example.com/page/site.js` gera a key `httpsstatic.example.com/page/site.js`. As keys diferenciam maiúsculas de minúsculas: caracteres maiúsculos e minúsculos são distintos. Quando um cache setting ativa uma variação, a key pode terminar com o separador `@@`, como em `httpsstatic.example.com/page/site.js@@`. Cada variação listada em Variações é acrescentada depois desse separador. +A URI `https://static.example.com/page/site.js` gera a key `httpsstatic.example.com/page/site.js`. As keys diferenciam maiúsculas de minúsculas: caracteres maiúsculos e minúsculos são distintos. Quando um cache setting ativa uma variação, a key pode terminar com o separador `@@`, como em `httpsstatic.example.com/page/site.js@@`. A tabela em Variações mostra onde cada variação entra: o método da requisição é um prefixo, e as outras variações vêm depois de `@@`, inclusive a query string quando o behavior dela é `allowlist` ou `denylist`. Com `all`, a query string inteira vem depois do path, antes de `@@`. --- ## Variações -Uma variação é acrescentada à key padrão, de modo que uma URI pode manter mais de um objeto no cache. A tabela lista o que cada variação acrescenta e a key que ela gera. +Uma variação altera a key padrão, de modo que uma URI pode manter mais de um objeto no cache. A tabela lista o que cada variação acrescenta e a key que ela gera. | Variação | O que é acrescentado | Exemplo de key | | --- | --- | --- | | Requisição complexa | O método da requisição, como prefixo da key. Uma requisição `GET` ou `HEAD` não recebe prefixo. | `optionshttpsstatic.example.com/page` | -| Query string | O separador `?` e os argumentos que o cache setting nomeia, na ordem em que a requisição os envia. Com **Sort** ativo, `?name=name&city=city` e `?city=city&name=name` compartilham uma key, com os argumentos em ordem alfabética. | `httpstatic.example.com/page?name=name`, `httpstatic.example.com/page?city=city&name=name`, `httpstatic.example.com/page?name=name&city=city` | -| Cookies | `@@` e, em seguida, cada nome e valor de cookie que o cache setting nomeia, seguidos de `;`. A variação vazia, sem valor de cookie, é `@@;`. | `httpwww.example.com/@@;`, `httpwww.example.com/@@user=user;` | +| Query string | Com `allowlist` e `denylist`: `@@` e, em seguida, `?` e os argumentos que o cache setting mantém. Com `all`: `?` e a query string inteira, depois do path e antes de `@@`. | `httpstatic.example.com/page@@?name=name`, `httpstatic.example.com/page?city=city&name=name@@` | +| Cookies | Com `allowlist` e `denylist`: `@@` e, em seguida, cada nome e valor de cookie que o cache setting mantém, seguidos de `;`. A variação vazia, sem valor de cookie, é `@@;`. Com `all`, o header `Cookie` inteiro vem depois de `@@` como chegou, com os espaços. | `httpwww.example.com/@@;`, `httpwww.example.com/@@user=user;` | | Device group | `@@` e o nome do device group. | `httpwww.example.com/@@Mobile` | -| [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) | A query string `ims` e o formato de imagem convertido depois de `@@`. | `httpsstatic.example.com/static/images/image_1.jpg?ims=880x@@webp` | -| Large File Optimization | `@@bytes=-` para cada fragmento, de modo que cada fragmento tem sua própria key. Um arquivo de 2.097.151 bytes gera duas keys. | `httpsstatic.example.com/media/file.mp4@@bytes=0-1048575`, `httpsstatic.example.com/media/file.mp4@@bytes=1048576-2097151` | -| `POST` ou `OPTIONS` em cache | `@@` e o hash MD5 do corpo da requisição. | `httpsdynamic.example.com/path@@md5_of_post_arguments`, `httpsdynamic.example.com/path@@md5_of_options_arguments` | +| [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) | O formato de imagem convertido, no fim da key e sem separador. Quando o cache setting nomeia `ims` na allowlist de query string, a query string `ims` vem depois de `@@`, e o formato vem depois dela. Quando o cache setting não varia a key por query string, o valor de `ims` não faz parte da key, então todos os tamanhos e processamentos do path compartilham uma key, e o primeiro armazenado responde a todos os valores de `ims`. | `httpsstatic.example.com/static/images/image_1.jpg@@webp`, `httpsstatic.example.com/static/images/image_1.jpg@@?ims=880xwebp` | +| Large File Optimization | `@@bytes=-` para cada fragmento, de modo que cada fragmento tem sua própria key. Um arquivo de 2.097.152 bytes gera duas keys. | `httpsstatic.example.com/media/file.mp4@@bytes=0-1048575`, `httpsstatic.example.com/media/file.mp4@@bytes=1048576-2097151` | +| `POST` em cache | `@@` e o hash MD5 (Message Digest 5) do corpo da requisição, depois do prefixo `post`. Um `OPTIONS` em cache carrega apenas o prefixo `options`. | `posthttpsdynamic.example.com/path@@`, `optionshttpsdynamic.example.com/path` | -Os campos de query string e de cookie diferenciam maiúsculas de minúsculas, então `user` e `User` são duas variações. Para uma requisição `POST` ou `OPTIONS` em cache, o corpo da requisição faz parte da key. As variações por query string, por cookie, por device group e por método da requisição são o recurso chamado Advanced Cache Key. Para saber o que cada behavior faz com a key, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation). +Os campos de query string e de cookie diferenciam maiúsculas de minúsculas, então `user` e `User` são duas variações. Com `sort_enabled` ativo no cache setting, `?name=name&city=city` e `?city=city&name=name` compartilham uma key, com os argumentos em ordem alfabética. -Estes controles geram as variações: +As variações por query string, por cookie, por device group e por método da requisição formam Advanced Cache Key, uma feature de [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). Cada uma delas exige Application Accelerator na Application. Para saber o que cada behavior faz com a key, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation). -- **Cache vary by Method** coloca em cache requisições `POST` e `OPTIONS`. -- **Cache vary by Query String**, com seu **Behavior** e seu **Sort**, define a variação por query string. -- **Cache vary by Cookies** define a variação por cookie. -- **Cache vary by Devices** define a variação por device group, para os grupos definidos em [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/). -- **Large file optimization** divide o objeto em fragmentos, cada um com sua própria key. -- O Image Processor acrescenta a variação de formato. +No Azion Console, estes controles geram as variações, com o campo da API de cada um entre parênteses: -Para o campo por trás de cada controle, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). +- **Cache vary by Method** (`cache_vary_by_method`) permite colocar em cache as respostas `POST` e `OPTIONS`. +- **Cache vary by Query String** (`cache_vary_by_querystring`) define a variação por query string, com o seu **Behavior** e o seu **Sort**. +- **Cache vary by Cookies** (`cache_vary_by_cookies`) define a variação por cookie. +- **Cache vary by Devices** (`cache_vary_by_devices`) define a variação por device group, para os grupos definidos em [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/). +- **Large file optimization** (`large_file_cache.enabled`) divide um objeto grande em fragmentos, cada um com a sua própria key. +- Image Processor, ativado na Application (`modules.image_processor.enabled`), acrescenta a variação de formato. + +Para o tipo e o padrão de cada campo, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). --- ## Headers de debug -Para ler o status e a key de uma resposta, envie a requisição com o header `Pragma: azion-debug-cache`. A resposta carrega dois headers. O `x-cache` carrega o status de cache, o endereço IP do servidor que respondeu a requisição e o protocolo. O `x-cache-key` carrega a key: +Para ler o status e a key de uma resposta, envie a requisição com o header `Pragma: azion-debug-cache`. A resposta carrega vários headers `x-cache-*`, e dois deles carregam o status e a key. O `x-cache` carrega o status de cache, o endereço IP do servidor que respondeu a requisição e o protocolo. O `x-cache-key` carrega a key: -```http +```text x-cache: MISS from 192.0.2.10 with HTTP/2.0 x-cache-key: httpsstatic.example.com/page/site.js ``` -Em HTTP/2, os nomes dos headers chegam em minúsculas. Uma resposta que a plataforma não coloca em cache carrega `-` nos dois headers. Requisições seguidas para um path podem ser respondidas, cada uma, por um servidor diferente, que o `x-cache` nomeia. Para o procedimento, consulte [Verifique o status de cache de uma resposta](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). +Em HTTP/2, os nomes dos headers chegam em minúsculas. Uma resposta `GET` ou `HEAD` que a Azion não armazena carrega `-` nos dois headers enquanto Application Accelerator está ativo; com ele desativado, a mesma resposta reporta `MISS`, com a sua key em `x-cache-key` e `x-cache-expires-in: 0`. Uma resposta `POST`, `PUT`, `PATCH`, `DELETE` ou `OPTIONS` que a Azion não armazena carrega `-` nos dois casos. Cada uma das requisições seguidas para um path pode ser respondida por um servidor diferente, que o `x-cache` nomeia. Para o procedimento, consulte [Verifique o status de cache de uma resposta](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). --- ## Status de cache -O header `x-cache` começa com um de oito valores. Cada um nomeia o que o Cache fez com a requisição. +O header `x-cache` começa com um de oito valores. Cada um nomeia o que Cache fez com a requisição. | Status | Significado | | --- | --- | -| `HIT` | Conteúdo válido e atualizado entregue pelo cache do data center mais próximo do usuário. A origem não é acessada. | +| `HIT` | Conteúdo válido e atualizado entregue pelo cache do data center que respondeu a requisição. A origem não recebe nenhuma requisição. | | `MISS` | O conteúdo não está no cache. A Azion o busca na origem, e a resposta pode ser armazenada para requisições seguintes. | -| `EXPIRED` | A cópia em cache passou do seu TTL. Quando a origem responde, a resposta atualiza a cópia para as requisições seguintes. | -| `STALE` | O stale cache está ativo, a cópia expirou e a origem não respondeu, então a Azion entrega a cópia expirada. Para mais informações, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). | -| `UPDATING` | A cópia expirou, e a Azion a entrega enquanto o conteúdo é atualizado a partir da origem. Para mais informações, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). | +| `EXPIRED` | A cópia em cache passou do seu tempo de vida (TTL). Quando a origem responde, a resposta atualiza a cópia para as requisições seguintes. | +| `STALE` | O stale cache está ativo, a cópia expirou e a origem não respondeu, então a Azion entrega a cópia expirada. | +| `UPDATING` | A cópia expirou, e a Azion a entrega enquanto o conteúdo é atualizado a partir da origem. | | `REVALIDATED` | A Azion verificou a cópia junto à origem com headers condicionais, e ela ainda estava atual, então a origem não a enviou novamente. | -| `BYPASS` | A requisição foi à origem porque um behavior [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) se aplica. | -| `-` | Sem status: o conteúdo está restrito de cache. Por exemplo, uma requisição `POST` quando o cache para `POST` está desativado. Uma resposta `GET` ou `HEAD` que uma função constrói também pode trazê-lo. | +| `BYPASS` | A requisição foi à origem porque um behavior [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) se aplica. Uma resposta sob esse behavior pode informar `-` em vez disso. | +| `-` | Sem status: a Azion não armazenou a resposta. Um `POST` o reporta quando o cache para `POST` está desativado, e uma resposta `GET` ou `HEAD` que não é armazenada o reporta enquanto Application Accelerator está ativo. Com Application Accelerator desativado, essa resposta `GET` ou `HEAD` reporta `MISS` com `x-cache-expires-in: 0`. | + +Para mais informações sobre o status `STALE`, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). --- @@ -99,6 +102,6 @@ O header `x-cache` começa com um de oito valores. Cada um nomeia o que o Cache Como uma requisição é comparada a um objeto armazenado, e o que o TTL e o stale cache fazem com a cópia. A requisição que retorna os headers de debug, e como lê-los. Um purge por cache key recebe as keys desta página, uma por variação. - Como uma imagem derivada é armazenada sob a sua própria key. + Como uma imagem derivada é armazenada sob a sua própria key. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/cache/como-funciona.mdx b/apps/docs/src/content/docs/pt-br/pages/build/cache/como-funciona.mdx index 5f3bb5fa83..4189b1188f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/cache/como-funciona.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/cache/como-funciona.mdx @@ -1,6 +1,6 @@ --- title: Expiração e atualização -description: Por quanto tempo uma cópia em cache vive, quando uma cópia expirada ainda pode responder e como arquivos grandes, variações, Tiered Cache e purges a alteram. +description: Veja por quanto tempo uma cópia em cache vive, quando uma cópia expirada ainda pode responder e como fragmentos, variações, Tiered Cache e purges a alteram. meta_tags: 'cache, expiration, freshness, TTL, max age, stale cache, large file optimization, cache key, cache variation, tiered cache, purge' namespace: documentation_products_cache_how_it_works permalink: /documentacao/plataforma/applications/cache/expiracao-e-atualizacao/ @@ -9,7 +9,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Por quanto tempo uma cópia em cache responde no lugar da origem decide quão atualizada é uma resposta e com que frequência a origem é consultada. Em uma aplicação, um cache setting decide esse tempo e o que acontece depois dele, e um purge encerra uma cópia antes do prazo. Como uma requisição chega a uma cópia em cache, com o diagrama do caminho do cache, está na [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao). +O tempo durante o qual uma cópia em cache responde no lugar da origem decide duas coisas: quão atualizada é uma resposta e com que frequência a origem é consultada. Em uma Application, [Cache](/pt-br/documentacao/plataforma/applications/cache/) é o recurso da plataforma que armazena a cópia, e um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) define esse tempo como o tempo de vida (TTL) dela. O cache setting também decide o que acontece depois que o TTL termina. Um purge encerra uma cópia antes do prazo. A [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/#caminho-da-requisicao) mostra como uma requisição chega a uma cópia em cache, com um diagrama do caminho do cache. As seções cobrem TTL e expiração, stale cache, Large File Optimization, cache keys e variações, Tiered Cache e purge. @@ -17,42 +17,41 @@ As seções cobrem TTL e expiração, stale cache, Large File Optimization, cach ## TTL e expiração -Um cache setting carrega dois TTLs. O TTL de browser controla por quanto tempo o browser de um visitante mantém a sua cópia, e o TTL de cache controla por quanto tempo a Azion mantém a dela. Uma requisição que o browser responde pela sua cópia nunca chega à Azion, e uma requisição que a Azion responde pela cópia dela nunca chega à origem. +Um cache setting carrega dois TTLs. O TTL de browser controla por quanto tempo o browser de um visitante mantém a sua cópia. O TTL de cache controla por quanto tempo a Azion mantém a dela. Uma requisição que o browser responde pela sua cópia termina no browser, e uma requisição que a Azion responde pela cópia dela termina na Azion. -De onde vem cada TTL depende do comportamento que o setting seleciona. Na seção **Cache**, _Honor cache policies_ mantém os headers `Cache-Control` e `Expires` que a origem envia e os repassa ao browser, então a origem decide por quanto tempo o seu conteúdo vive. _Override cache behavior_ substitui esses headers, para o cache da Azion, pelo valor de **Max Age**. A seção **Browser Cache** carrega a sua própria escolha para a cópia do browser: _Honor cache policies_, _Override cache settings_ ou _No cache_. Quando a origem não envia TTL sob _Honor cache policies_, a Azion mantém a cópia por um TTL padrão. +De onde vem cada TTL depende do comportamento que o setting seleciona para cada cópia. Para a cópia da Azion, o comportamento é o campo `modules.cache.behavior`. _Honor cache policies_ (`honor`) mantém os headers `Cache-Control` e `Expires` da origem e os repassa ao browser, então a origem decide por quanto tempo o seu conteúdo vive. _Override cache behavior_ (`override`) substitui esses headers, para o cache da Azion, pelo Max Age, o campo `modules.cache.max_age`. Quando a origem não envia TTL sob _Honor cache policies_, a Azion mantém a cópia pelo Max Age do setting. A cópia do browser tem o seu próprio comportamento no campo `browser_cache.behavior`: _Honor cache policies_, _Override cache settings_ ou _No cache_. -A cópia expira quando o TTL de cache termina, e a requisição seguinte pelo objeto vai à origem. Quando a origem retorna o objeto, essa resposta atualiza a cópia, e a resposta informa `EXPIRED`. Uma verificação com headers condicionais também pode encontrar a cópia inalterada. A resposta então informa `REVALIDATED`, e a origem não transmite o objeto de novo. +A cópia expira quando o TTL de cache termina, e a requisição seguinte pelo objeto vai à origem. Quando a origem retorna o objeto, essa resposta atualiza a cópia. A resposta informa `EXPIRED`. Uma verificação com headers condicionais também pode encontrar a cópia inalterada. A resposta então informa `REVALIDATED`, e a origem confirma a cópia em vez de enviar o objeto de novo. -Uma requisição que não encontra uma cópia válida é um cache miss, e em um miss a plataforma limita o que a origem precisa fazer. Quando várias requisições pelo mesmo objeto fora do cache chegam ao mesmo tempo, a Azion abre uma conexão com a origem para todas elas. Sempre que possível, a Azion também mantém abertas as suas conexões com a origem entre as buscas, em vez de abrir uma nova a cada vez. Sob uma rajada de requisições por um objeto fora do cache, a origem vê, portanto, uma busca por data center, não uma por visitante. +Uma requisição que não encontra uma cópia válida é um cache miss. Em um miss, a plataforma limita o trabalho da origem. Quando várias requisições pelo mesmo objeto fora do cache chegam ao mesmo servidor ao mesmo tempo, esse servidor abre uma conexão com a origem para todas elas. Então, sob uma rajada de requisições por um objeto fora do cache, a origem vê uma busca por servidor que recebeu a rajada, não uma por visitante. -O TTL é uma troca entre a carga na origem e a idade do que um visitante vê. Um TTL longo responde mais requisições pela cópia e chega menos à origem, mas o conteúdo que a origem já alterou permanece na cópia até ela expirar. Um TTL curto mantém a cópia próxima da versão da origem, ao preço de mais buscas na origem. Por exemplo, uma aplicação pode ter dois cache settings, cada um aplicado pela sua própria regra. Imagens que raramente mudam recebem um TTL de um dia, e uma listagem que muda ao longo do dia recebe um TTL de alguns minutos. +O TTL é uma troca entre a carga na origem e a idade do que um visitante vê. Um TTL longo responde mais requisições pela cópia e chega menos à origem, mas o conteúdo que a origem já alterou permanece na cópia até ela expirar. Um TTL curto mantém a cópia próxima da versão da origem, ao preço de mais buscas na origem. Por exemplo, uma Application pode ter dois cache settings, cada um aplicado pela sua própria regra. Imagens que raramente mudam recebem um TTL de um dia, e uma listagem que muda ao longo do dia recebe um TTL de alguns minutos. -**Max Age** tem um piso e um teto. Sem Application Accelerator, o piso é de 60 segundos, e Application Accelerator o reduz. Para cada limite de TTL, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache-settings). Para saber como um TTL de 0 segundos difere de contornar o cache, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). +O Max Age tem um piso e um teto, e [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) reduz o piso. Para cada limite de TTL, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache-settings). Para saber como um TTL de 0 segundos difere de contornar o cache, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). --- ## Stale cache -Uma cópia além do seu TTL ainda tem utilidade. Com **Stale cache** ativo no cache setting, a Azion pode reutilizar uma cópia expirada quando uma tentativa de revalidação falha por um de quatro motivos: +Uma cópia além do seu TTL ainda tem utilidade. Com o stale cache ativo no cache setting, a Azion pode reutilizar uma cópia expirada quando uma tentativa de revalidação falha, por um de três motivos: - A origem retorna um erro `5xx`. - A conexão excede o tempo limite, ou a origem está inacessível. - Os headers de cache-control da origem são inválidos ou estão ausentes. -- O objeto está em atualização, com uma revalidação em andamento. -O tempo durante o qual a cópia expirada pode ser entregue é a janela de stale. Sob _Honor cache policies_, a janela é o valor da diretiva `stale-while-revalidate=` que a origem fornece. Sob _Override cache behavior_, ou quando a origem omite a diretiva, a janela é de 300 segundos. Durante a janela, o data center entrega a cópia expirada de imediato e busca uma versão atualizada em segundo plano. Quando o novo objeto é armazenado, as requisições seguintes recebem o conteúdo atualizado. +O tempo durante o qual a cópia expirada pode ser entregue é a janela de stale. Sob _Honor cache policies_, a janela é o valor da diretiva `stale-while-revalidate=` que a origem fornece. Sob _Override cache behavior_, ou quando a origem omite a diretiva, a janela é de 300 segundos. -A resposta diz qual caso se aplica. Uma resposta entregue a partir de uma cópia expirada porque a origem não respondeu informa `STALE`. Uma resposta entregue enquanto a versão atualizada está a caminho, vinda da origem, informa `UPDATING`. +Uma resposta entregue a partir de uma cópia expirada porque a origem não respondeu informa `STALE`. -Stale cache mostra aos visitantes uma página antiga em vez de uma página de erro durante uma indisponibilidade da origem, pelo tempo que a janela durar. O custo é a atualidade: um visitante dentro da janela pode receber conteúdo que a origem já substituiu. Uma alteração que cada visitante precisa ver de imediato é, portanto, um caso para um purge, e não para a expiração. +Stale cache mostra aos visitantes uma página antiga em vez de uma página de erro durante uma indisponibilidade da origem, pelo tempo que a janela durar. O custo é a atualidade: um visitante dentro da janela pode receber conteúdo que a origem já substituiu. Então uma alteração que cada visitante precisa ver de imediato é um caso para um purge, e não para a expiração. -Se um setting novo começa com o toggle ativo depende da interface. Um setting criado pela API ou pela CLI tem stale cache desativado, e Azion Console o ativa em um setting novo. Para o campo, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#cache). +Se o stale cache começa ativo em um setting novo depende da interface. O campo dele é `modules.cache.stale_cache.enabled`. Um setting criado pela API ou pela CLI o tem desativado, e Azion Console o ativa em um setting novo. [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#cache) mostra onde alterá-lo em cada interface. --- ## Large File Optimization -Um objeto grande pode ser armazenado em cache em fragmentos, e não como uma peça única. Com **Large file optimization** ativo no cache setting, a Azion divide o arquivo em fragmentos de 1.024 kB. Cada fragmento é entregue conforme o usuário o consome e é armazenado em cache sob demanda, no momento em que é requisitado. A cache key de um fragmento termina em `@@bytes=` e no byte range que o fragmento contém, então cada fragmento é um objeto próprio. +Um objeto grande pode ser armazenado em cache em fragmentos, e não como uma peça única. Com a Large File Optimization ativa no cache setting, no campo `modules.cache.large_file_cache.enabled` dele, a Azion divide o arquivo em fragmentos de 1.024 kB. Cada fragmento é entregue conforme o usuário o consome e é armazenado em cache sob demanda, no momento em que é requisitado. A cache key de um fragmento termina em `@@bytes=` e no byte range do fragmento. Então cada fragmento é um objeto próprio. Por exemplo, um vídeo de 2.097.151 bytes em `https://static.example.com/media/file.mp4` gera dois fragmentos. Eles são armazenados sob estas keys: @@ -61,7 +60,7 @@ httpsstatic.example.com/media/file.mp4@@bytes=0-1048575 httpsstatic.example.com/media/file.mp4@@bytes=1048576-2097151 ``` -Um fragmento só é buscado quando um usuário chega a ele, então um download interrompido no meio deixa os fragmentos seguintes sem busca. Os fragmentos que foram buscados permanecem em cache para a requisição seguinte. A fragmentação se aplica ao cache da Azion e à camada do Tiered Cache quando o setting tem esse toggle ativo. +Um fragmento só é buscado quando um usuário chega a ele, então um download interrompido no meio deixa os fragmentos seguintes sem busca. Os fragmentos que foram buscados permanecem em cache para a requisição seguinte. A fragmentação se aplica ao cache da Azion e à camada do Tiered Cache quando o setting tem Tiered Cache ativo. O custo aparece na hora do purge. Um arquivo se torna muitas keys, então um purge lista a key de cada fragmento ou usa um wildcard que termina o path do arquivo com `*`. Um purge que remove alguns fragmentos e não outros deixa uma mistura de fragmentos novos e antigos no cache. Para os tipos de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#tipos-de-purge). @@ -69,43 +68,44 @@ O custo aparece na hora do purge. Um arquivo se torna muitas keys, então um pur ## Cache keys e variações -Uma variação é uma segunda cópia de uma URL, armazenada sob uma cache key diferente. Enquanto nenhuma variação está ativa, um path é um objeto armazenado. A Azion monta a key padrão a partir do scheme, do host e do path da requisição. O controle de query string de um cache setting começa em `ignore`, o que mantém a query string fora da key. Quando algo além do path altera a resposta, o cache setting o nomeia, e a key carrega um marcador para ele. +Uma variação é uma cópia adicional de um path, armazenada sob a sua própria cache key porque algo além do path é diferente. Enquanto nenhuma variação está ativa, um path é um objeto armazenado. A Azion monta a key padrão a partir do scheme, do host e do path da requisição. Um cache setting guarda a sua variação por query string no campo `cache_vary_by_querystring.behavior`, que começa em `ignore` e mantém a query string fora da key. Quando algo além do path altera a resposta, o cache setting o nomeia, e a key carrega um marcador para ele. -Quatro entradas podem variar uma cópia pela seção **Application Accelerator** de um cache setting: um argumento de query string, um cookie, o device group em que a requisição se encaixa e o método da requisição. Outras duas vêm de outros lugares. Image Processor acrescenta o formato da imagem quando converte uma imagem, e Large File Optimization acrescenta o byte range de cada fragmento. Cada valor distinto é uma key separada, então cada um é armazenado e purgado separadamente. +Quatro entradas podem variar uma cópia pelo objeto `modules.application_accelerator` de um cache setting: -Os device groups vêm da aba **Device Groups** da aplicação, que [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/) documenta. Com **Cache vary by Devices**, um setting entrega uma única versão independentemente do dispositivo, ou mantém uma cópia para cada grupo que nomeia. +- Um argumento de query string. +- Um cookie. +- O device group em que a requisição se encaixa. +- O método da requisição. -O método também é uma variação. Respostas `GET` e `HEAD` são armazenadas em cache nativamente, e respostas `POST` e `OPTIONS` só são armazenadas em cache com Application Accelerator ativo. O corpo da requisição então passa a fazer parte da key como um hash MD5, então dois corpos diferentes enviados a um path são dois objetos. +Outras duas vêm de outros lugares. [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) acrescenta o formato da imagem quando converte uma imagem, e Large File Optimization acrescenta o byte range de cada fragmento. Cada valor distinto é uma key separada, então cada um é armazenado e purgado separadamente. -Uma variação divide as requisições por uma URL entre várias cópias. Menos requisições encontram uma cópia já presente, e um purge precisa alcançar cada cópia. Por exemplo, uma página de listagem que varia por um argumento `page` armazena uma cópia por número de página, e um purge da listagem precisa nomear cada uma delas. Para o marcador que cada variação acrescenta, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#variacoes). Para os controles que ativam uma variação, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation). +Os device groups pertencem à Application, e [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/) os documenta. Com `cache_vary_by_devices`, um setting entrega uma única versão independentemente do dispositivo, ou mantém uma cópia por grupo nomeado. + +O método também é uma variação. Respostas `GET` e `HEAD` são armazenadas em cache nativamente, e respostas `POST` e `OPTIONS` só são armazenadas em cache com Application Accelerator ativo e o método listado em `cache_vary_by_method`. O corpo de um `POST` então passa a fazer parte da key como um hash MD5, então dois corpos diferentes enviados a um path são dois objetos. A key de um `OPTIONS` carrega apenas o prefixo do método. + +Uma variação divide as requisições por um path entre várias cópias. Menos requisições encontram uma cópia já presente, e um purge precisa alcançar cada cópia. Por exemplo, uma página de listagem que varia por um argumento `page` armazena uma cópia por número de página, e um purge da listagem precisa nomear cada uma delas. Para o marcador que cada variação acrescenta, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#variacoes). Para os campos que ativam uma variação, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation). --- ## Tiered Cache -[Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) adiciona uma segunda camada de cache entre o cache da Azion e a origem. Quando o data center que recebeu uma requisição não tem uma cópia válida, ele consulta a camada do Tiered Cache antes de consultar a origem. Um miss na primeira camada pode, portanto, ainda ser respondido pelo cache, e a segunda camada mantém os objetos por mais tempo que a primeira. +[Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) é uma feature de Cache que adiciona uma segunda camada de cache entre o data center que responde a uma requisição e a origem. Quando esse data center não tem uma cópia válida, ele consulta a camada do Tiered Cache antes que a requisição siga para a origem. Uma cópia válida nessa camada responde ao miss, e a origem não recebe nenhuma requisição. -A camada é ativada por cache setting com o toggle **Tiered Cache**, e todos os planos a incluem. O setting nomeia uma topologia, a região que mantém a camada, como `nearest-region` ou `us-east-1`. Tiered Cache também exige _Override cache behavior_, porque a API o recusa sob _Honor cache policies_ com `21001`. +Cada cache setting ativa a camada no seu campo `modules.cache.tiered_cache.enabled`, e todos os planos a incluem. O setting nomeia uma topologia em `modules.cache.tiered_cache.topology`: a região que mantém a camada, como `nearest-region` ou `us-east-1`. Tiered Cache também exige _Override cache behavior_. Sob _Honor cache policies_, a API recusa o setting com `21001`. -A troca é um salto extra e um piso no TTL. Um miss na primeira camada vai até a segunda antes de chegar à origem. Um setting com Tiered Cache ativo também carrega um TTL mínimo, porque a camada se destina a objetos que permanecem em cache por muito tempo. Em troca, menos requisições chegam à origem. Para o mínimo, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache-settings). +A troca é um salto extra e um piso no TTL. Um miss na primeira camada vai até a segunda antes de chegar à origem. Um setting com Tiered Cache ativo também carrega um TTL mínimo. Em troca, menos requisições chegam à origem. Para o mínimo, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache-settings). -Uma regra com _Bypass Cache_ afeta o cache da Azion, e não a camada do Tiered Cache. Uma aplicação com cache settings de Tiered Cache ativos continua a armazenar objetos em cache nessa camada pelo TTL mínimo. A camada é purgada por cache key. Quando você purga um objeto mantido nas duas camadas, purgue primeiro a camada do Tiered Cache e depois a camada do Cache. Caso contrário, a primeira camada é reabastecida com conteúdo desatualizado do Tiered Cache. Para as camadas de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#camadas). +Uma regra com _Bypass Cache_ afeta o cache da Azion, e não a camada do Tiered Cache. Uma Application com cache settings de Tiered Cache ativos continua a armazenar objetos em cache nessa camada pelo Max Age do cache setting. A camada é purgada por cache key. Quando você purga um objeto mantido nas duas camadas, purgue primeiro a camada do Tiered Cache e depois a camada do Cache. Caso contrário, a primeira camada é reabastecida com conteúdo desatualizado do Tiered Cache. Para as camadas de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#camadas). --- ## Purge -Um purge remove uma cópia armazenada antes do fim do seu TTL. A requisição seguinte pelo objeto não encontra cópia e vai à origem, a resposta informa `MISS` e a versão que a origem retorna é armazenada. Um purge entra em fila depois que você o confirma, porque o resultado leva tempo para se propagar. Ele aparece no histórico de purges quando termina em toda a infraestrutura da Azion. - -Um purge encontra um objeto pela sua cache key, então o tipo de purge importa para um objeto que varia. Um purge por URL converte cada URL em uma cache key sem considerar a variação de conteúdo. Uma cópia que varia por cookie, device group ou formato de imagem, portanto, sobrevive a ele. Um purge por cache key nomeia cada variação, e um purge por wildcard alcança cada key que corresponde a uma expressão com `*`. As variações por query string são a exceção que um purge por URL alcança. Os argumentos precisam ser enviados na ordem em que foram apresentados, ou em ordem alfabética quando **Sort** está ativo. - -Remover um objeto com o método HTTP `DEL` em vez de um purge também faz a primeira requisição `GET` de um usuário ir à origem. A diferença é a rede de proteção. O método impede que a Azion entregue uma cópia desatualizada quando a origem está inacessível, e uma página de erro é entregue no lugar dela. Ele se adequa a três casos: +Um purge remove uma cópia armazenada antes do fim do seu TTL. Quando nenhuma camada tem uma cópia, a requisição seguinte pelo objeto vai à origem, a resposta informa `MISS` e a versão que a origem retorna é armazenada. Um purge entra em fila depois que você o confirma, porque o resultado leva tempo para se propagar. Ele aparece no histórico de purges quando termina em toda a infraestrutura da Azion. -- O conteúdo saiu da origem e precisa sair do cache também. -- Um conteúdo cujo timestamp não é confiável precisa de uma remoção forçada e de uma atualização posterior. -- Uma página de erro é preferível a uma cópia desatualizada enquanto a origem está inacessível. +Um purge encontra um objeto pela sua cache key, então o tipo de purge importa para um objeto que varia. Um purge por URL converte cada URL em uma cache key sem considerar a variação de conteúdo. Então uma cópia que varia por cookie, device group ou formato de imagem sobrevive a ele. Um purge por cache key nomeia cada variação. Um purge por wildcard alcança cada key que corresponde a uma expressão com `*`. As variações por query string são a exceção que um purge por URL alcança. Os argumentos precisam ser enviados na ordem em que foram apresentados, ou em ordem alfabética quando o cache setting os ordena, no campo `cache_vary_by_querystring.sort_enabled` dele. -Um purge é a ferramenta para uma alteração que não pode esperar o TTL. O seu custo é a busca na origem que reabastece cada key purgada, e quanto mais keys um objeto tem, por variações ou por fragmentos, mais um purge precisa nomear. Para os tipos de purge e os seus argumentos, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/). Para os passos, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). +Um purge é a ferramenta para uma alteração que não pode esperar o TTL. O seu custo é a busca na origem que reabastece cada key purgada. Quanto mais keys um objeto tem, por variações ou por fragmentos, mais um purge precisa nomear. Para os tipos de purge e os seus argumentos, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/). Para os passos, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build/cache/primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/build/cache/primeiros-passos.mdx index 0cbe026cd5..4b2f5d8c4f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/cache/primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/cache/primeiros-passos.mdx @@ -13,14 +13,17 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' -Este guia orienta você a colocar em cache um path da sua aplicação pela primeira vez. No fim, você vai ter: +Este guia orienta você a colocar em cache um path da sua Application pela primeira vez. No fim, você vai ter: - Um cache setting que mantém uma cópia de cada resposta por 300 segundos. - Uma regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) que aplica o setting a um prefixo de path. - O status de cache de uma resposta, lido no seu header `x-cache`. -O resultado se apoia em quatro objetos, nesta ordem. A **aplicação** carrega o módulo [Cache](/pt-br/documentacao/plataforma/applications/cache/), que está ativo em cada aplicação. O **cache setting** pertence à aplicação e carrega o TTL, o tempo que a Azion mantém uma cópia. A **regra**, também na aplicação, casa requisições por path e aplica o setting pelo behavior **Set Cache Policy**. Uma **requisição** que casa é respondida pela cópia armazenada quando existe uma, e a sua resposta carrega o `x-cache` com `HIT`. Enquanto uma regra não o nomear, um cache setting não faz nada. +O resultado se apoia em quatro objetos, nesta ordem. A **Application** tem [Cache](/pt-br/documentacao/plataforma/applications/cache/) ativo, como toda Application. O **cache setting** pertence à Application. Ele carrega o tempo de vida (TTL), por quanto tempo a Azion mantém uma cópia. Ele também carrega o que a Azion faz com essa cópia. + +A **regra**, também na Application, corresponde a requisições por path e aplica o setting pelo behavior _Set Cache Policy_. Um cache setting só age depois que uma regra aplica esse cache setting. Uma **requisição** correspondente é respondida pela cópia armazenada quando existe uma. Com o header `Pragma: azion-debug-cache`, a sua resposta informa `HIT` no `x-cache`. --- @@ -35,8 +38,8 @@ O resultado se apoia em quatro objetos, nesta ordem. A **aplicação** carrega o ### Console -- Uma aplicação que já entrega conteúdo em um domínio. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- A URL de um objeto estático que a aplicação entrega, como uma imagem, para verificar no fim. +- Uma Application que já entrega conteúdo em um domínio. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- A URL de um objeto estático que a Application entrega sob um prefixo de path como `/static/`, para verificar no fim. - O `curl` na sua máquina, para a verificação do status de cache no fim. - Acesso ao Azion Console. Para entrar, consulte [Como acessar o Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). @@ -46,8 +49,8 @@ O resultado se apoia em quatro objetos, nesta ordem. A **aplicação** carrega o ### CLI -- Uma aplicação que já entrega conteúdo em um domínio. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- A URL de um objeto estático que a aplicação entrega, como uma imagem, para verificar no fim. +- Uma Application que já entrega conteúdo em um domínio. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- A URL de um objeto estático que a Application entrega sob um prefixo de path como `/static/`, para verificar no fim. - O `curl` na sua máquina, para a verificação do status de cache no fim. - A [Azion CLI](/pt-br/documentacao/devtools/cli/) instalada e autorizada. @@ -57,8 +60,8 @@ O resultado se apoia em quatro objetos, nesta ordem. A **aplicação** carrega o ### API -- Uma aplicação que já entrega conteúdo em um domínio. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- A URL de um objeto estático que a aplicação entrega, como uma imagem, para verificar no fim. +- Uma Application que já entrega conteúdo em um domínio. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- A URL de um objeto estático que a Application entrega sob um prefixo de path como `/static/`, para verificar no fim. - O `curl` na sua máquina, para a verificação do status de cache no fim. - Um [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/). @@ -70,7 +73,7 @@ O resultado se apoia em quatro objetos, nesta ordem. A **aplicação** carrega o ## Crie um cache setting -Um cache setting carrega por quanto tempo a Azion mantém uma cópia de uma resposta. Este mantém cada cópia por 300 segundos. +Um cache setting carrega por quanto tempo a Azion mantém uma cópia de uma resposta e o que a Azion faz com essa cópia. Este mantém cada cópia por 300 segundos. @@ -81,9 +84,9 @@ Um cache setting carrega por quanto tempo a Azion mantém uma cópia de uma resp Para criar o cache setting pelo Azion Console: - + - Acesse [Azion Console](https://console.azion.com/) > **Applications** e selecione a aplicação que entrega o seu conteúdo. + Acesse [Azion Console](https://console.azion.com/) > **Applications** e selecione a Application que entrega o seu conteúdo. @@ -106,7 +109,7 @@ Para criar o cache setting pelo Azion Console: -O novo setting aparece na lista de **Cache Settings**, que mostra o seu **Name**, **ID**, **Browser Cache** e **Cache**. +O novo setting aparece na lista de **Cache Settings**, que mostra o seu **Name**, **Browser Cache** e **Cache**. @@ -114,32 +117,29 @@ O novo setting aparece na lista de **Cache Settings**, que mostra o seu **Name** ### CLI -Para criar o cache setting com a Azion CLI, substitua `` pelo ID da sua aplicação: +Para criar o cache setting com a Azion CLI, substitua `` pelo ID da sua Application: - O comando lê o setting de um arquivo JSON. Salve este corpo como `cache-setting.json`: + O comando lê o setting de um arquivo JSON. O `stale_cache` ativa o stale cache, como Azion Console faz em um setting novo. Salve este corpo como `cache-setting.json`: - ```json - { + - ```bash - azion create cache-setting --application-id --file cache-setting.json - ``` + --file cache-setting.json`} /> O comando confirma o setting e retorna o seu ID: @@ -152,19 +152,17 @@ Para criar o cache setting com a Azion CLI, substitua `` pelo ID Substitua `123460` pelo ID que o comando de criação retornou: - ```bash - azion describe cache-setting --application-id --cache-setting-id 123460 --format json - ``` + --cache-setting-id 123460 --format json`} /> A saída reporta o `modules.cache.max_age` como `300`. -O cache setting existe na aplicação. Registre o seu ID: a regra da próxima etapa o nomeia. +O cache setting existe na Application. Registre o seu ID: a regra da próxima etapa aplica o setting por esse ID. :::note[nota] -As flags do comando não definem o **Max Age**, o comportamento de cache, o stale cache, a Large File Optimization nem o Tiered Cache. Passe o corpo da requisição com `--file` para esses campos. Para todas as flags que o comando aceita, consulte [Azion CLI create](/pt-br/documentacao/devtools/cli/recursos/). +Só o corpo da requisição, passado com `--file`, define o `max_age`, o comportamento de cache, o stale cache e a Large File Optimization. A flag `--tiered-caching-enabled` falha sem o behavior `override`, e só o corpo define esse behavior. Para todas as flags que o comando aceita, consulte [Azion CLI cache-setting](/pt-br/documentacao/devtools/cli/recursos/cache-setting/#criar). ::: @@ -173,33 +171,34 @@ As flags do comando não definem o **Max Age**, o comportamento de cache, o stal ### API -Para criar o cache setting com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo ID da sua aplicação: +Para criar o cache setting com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token. Substitua `` pelo ID da sua Application: - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//cache_settings \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + O `stale_cache` ativa o stale cache, como Azion Console faz em um setting novo: + + /cache_settings \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "name": "static-assets", "browser_cache": { "behavior": "honor" }, "modules": { "cache": { "behavior": "override", - "max_age": 300 + "max_age": 300, + "stale_cache": { "enabled": true } } } - }' - ``` + }'`} /> - Um `201` carrega o setting, com cada campo que a requisição deixou de fora preenchido pelo seu padrão: + Um `201` carrega o setting, com os seus padrões preenchidos. Este trecho deixa de fora `modules.application_accelerator` e `created_at`: ```json { @@ -212,7 +211,7 @@ Para criar o cache setting com a Azion API, substitua `[TOKEN VALUE]` pelo seu p "cache": { "behavior": "override", "max_age": 300, - "stale_cache": { "enabled": false }, + "stale_cache": { "enabled": true }, "large_file_cache": { "enabled": false, "offset": 1024 }, "tiered_cache": { "enabled": false } } @@ -224,21 +223,21 @@ Para criar o cache setting com a Azion API, substitua `[TOKEN VALUE]` pelo seu p -O cache setting existe na aplicação. Registre o `id`: a regra da próxima etapa o nomeia. +O cache setting existe na Application. Registre o `id`: a regra da próxima etapa aplica o setting por esse ID. :::note[nota] -Um **Max Age** abaixo de 60 segundos exige o módulo [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) na aplicação. +Um Max Age abaixo de 60 segundos, no campo `modules.cache.max_age`, exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) ativo na Application. ::: --- ## Aplique o setting com uma regra -Um cache setting não faz nada enquanto uma regra não o nomear. Esta regra aplica o `static-assets` a cada requisição cujo path casa com um prefixo que você escolhe. +Um cache setting só age depois que uma regra aplica esse cache setting. Esta regra aplica o `static-assets` a cada requisição cujo path corresponde a um prefixo que você escolhe. @@ -249,17 +248,22 @@ Um cache setting não faz nada enquanto uma regra não o nomear. Esta regra apli Para criar a regra pelo Azion Console: + + + Acesse [Azion Console](https://console.azion.com/) > **Applications** e selecione a Application que entrega o seu conteúdo. + + - Insira um nome como `cache-static-assets`. + Em **Name**, insira `cache-static-assets`. - + - Em **Criteria**, selecione `${uri}` e um operador. Como argumento, insira o prefixo de path a colocar em cache, como `/static/`. + Em **Criteria**, selecione `${uri}` e _starts with_. Como argumento, insira `/static/` ou o prefixo de path do seu objeto. @@ -270,7 +274,7 @@ Para criar a regra pelo Azion Console: -A regra aparece na lista e aplica o `static-assets` a cada requisição cujo path casa com os seus criteria. +A regra aparece na lista e aplica o `static-assets` a cada requisição cujo path começa com `/static/`. @@ -278,22 +282,21 @@ A regra aparece na lista e aplica o `static-assets` a cada requisição cujo pat ### CLI -Para criar a regra com a Azion CLI, substitua `` pelo ID da sua aplicação: +Para criar a regra com a Azion CLI, substitua `` pelo ID da sua Application: - Os criteria carregam `${uri}`, que um shell expande, então a regra vai em um arquivo. Salve este corpo como `rule.json` e substitua `123460` pelo ID do cache setting da etapa anterior: + O comando lê a regra de um arquivo JSON. Salve este corpo como `rule.json` e substitua `123460` pelo ID do cache setting da etapa anterior. Se o seu objeto fica sob outro prefixo, substitua `/static/` por ele: - ```json - { + ` pelo ID da sua "attributes": { "value": 123460 } } ] - } - ``` + }`} /> - ```bash - azion create rules-engine --application-id --phase request --file rule.json - ``` + --phase request --file rule.json`} /> O comando confirma a regra e retorna o seu ID: @@ -324,7 +324,7 @@ Para criar a regra com a Azion CLI, substitua `` pelo ID da sua -A regra existe na aplicação e aplica o `static-assets` a cada requisição cujo path começa com `/static/`. +A regra existe na Application e aplica o `static-assets` a cada requisição cujo path começa com `/static/`. @@ -332,22 +332,21 @@ A regra existe na aplicação e aplica o `static-assets` a cada requisição cuj ### API -Para criar a regra com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo ID da sua aplicação: +Para criar a regra com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal token. Substitua `` pelo ID da sua Application: - Os criteria carregam `${uri}`, que um shell expande, então o corpo vai em um arquivo em vez da linha de comando. Salve este corpo como `rule.json` e substitua `123459` pelo ID do cache setting da etapa anterior: + Salve este corpo como `rule.json` e substitua `123459` pelo ID do cache setting da etapa anterior. Se o seu objeto fica sob outro prefixo, substitua `/static/` por ele: - ```json - { + - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json - ``` + /request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> - Um `202` carrega a regra, e o state `pending` significa que a plataforma ainda está aplicando-a: + Um `202` carrega a regra, e o state `pending` significa que a plataforma ainda está aplicando-a. Este trecho deixa de fora `criteria`, `description`, `order`, `last_editor`, `last_modified` e `created_at`: ```json { @@ -391,8 +387,7 @@ Para criar a regra com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal "type": "set_cache_policy", "attributes": { "value": 123459 } } - ], - "order": 2 + ] } } ``` @@ -400,7 +395,7 @@ Para criar a regra com a Azion API, substitua `[TOKEN VALUE]` pelo seu personal -A regra existe na aplicação e aplica o `static-assets` a cada requisição cujo path começa com `/static/`. +A regra existe na Application e aplica o `static-assets` a cada requisição cujo path começa com `/static/`. @@ -419,44 +414,42 @@ O header de requisição `Pragma: azion-debug-cache` faz a resposta carregar doi - Requisite um objeto sob o path que a regra casa, com o seu próprio host e path: + Requisite um objeto sob o path a que a regra corresponde, com o seu próprio host e path: - ```bash - curl -sI -H "Pragma: azion-debug-cache" https://www.example.com/static/site.js - ``` + A resposta carrega os dois headers de debug. Em HTTP/2, os nomes dos headers chegam em minúsculas: - ```http + ```text x-cache: MISS from 192.0.2.10 with HTTP/2.0 x-cache-key: httpswww.example.com/static/site.js ``` - `MISS` significa que o objeto não estava no cache: a Azion o buscou na origem e pode armazenar a resposta. + `MISS` significa que o objeto não estava no cache. A Azion o buscou na origem e pode armazenar a resposta. - Uma resposta entregue pela cópia armazenada carrega `HIT`. O `x-cache` também nomeia o servidor que respondeu. + Uma resposta entregue pela cópia armazenada carrega `HIT`. O `x-cache` também nomeia o servidor que respondeu. Cada servidor guarda a sua própria cópia, então uma requisição que outro servidor responde pode informar `MISS` mais uma vez. Execute o comando novamente. -A sua aplicação agora mantém uma cópia de cada resposta que casa por 300 segundos. O `x-cache` informa quando uma resposta veio dessa cópia. Uma resposta também pode carregar outro status, como `REVALIDATED`. Para cada valor de status, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). +A sua Application agora mantém uma cópia de cada resposta correspondente por 300 segundos. O `x-cache` informa quando uma resposta veio dessa cópia. Uma resposta também pode carregar outro status, como `REVALIDATED`. Para cada valor de status, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#status-de-cache). --- ## Próximos passos - - - + + + - - + + diff --git a/apps/docs/src/content/docs/pt-br/pages/build/cache/visao-geral.mdx b/apps/docs/src/content/docs/pt-br/pages/build/cache/visao-geral.mdx index 8a7b4a0b74..106f758300 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/cache/visao-geral.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/cache/visao-geral.mdx @@ -1,6 +1,6 @@ --- title: Cache -description: Armazene cópias das respostas da origem em uma aplicação com Cache e responda às requisições seguintes sem consultar a origem. +description: Armazene cópias das respostas às requisições recebidas por uma Application e responda às requisições seguintes sem consultar a origem. meta_tags: 'cache, cache setting, ttl, max age, set cache policy, cache key, x-cache, stale cache, large file optimization, tiered cache, real-time purge, applications' namespace: documentation_products_cache_overview permalink: /documentacao/plataforma/applications/cache/ @@ -10,18 +10,58 @@ import DocButton from '~/components/webkit/DocButton.vue' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -Um cache mantém uma cópia de uma resposta para que o servidor que guarda o conteúdo, a origem, não responda a cada requisição por ele. A primeira requisição por um objeto chega à origem, e o cache armazena a resposta sob uma key montada a partir da requisição. As requisições seguintes que produzem a mesma key recebem a cópia armazenada até que o tempo de vida (TTL) dela termine. Assim, a origem responde apenas à primeira requisição e às que chegam depois que a cópia expira. +**Cache** é um recurso da plataforma que armazena cópias das respostas às requisições recebidas pelas suas [Applications](/pt-br/documentacao/plataforma/applications/), na infraestrutura distribuída da Azion. Um cache é um armazenamento de cópias de respostas entre os clientes e a origem, o servidor que guarda o conteúdo. Ele responde às requisições repetidas com essas cópias. -**Cache** mantém essas cópias para uma [aplicação](/pt-br/documentacao/plataforma/applications/), no data center que buscou cada resposta. Ele vem ativo em toda aplicação nova e armazena as respostas das requisições que correspondem a uma regra da Request Phase com o behavior _Set Cache Policy_. Essa regra nomeia um cache setting, o objeto que guarda os TTLs. Use Cache para manter arquivos estáticos perto dos usuários, entregar vídeos grandes em fragmentos, responder com a origem fora do ar ou remover uma cópia quando a origem muda. +A primeira requisição por um objeto chega à origem, e o cache armazena a resposta sob uma key montada a partir da requisição. As requisições seguintes com a mesma key recebem a cópia armazenada. A cópia dura até que o seu tempo de vida (TTL), um período em segundos, termine. Assim, a origem responde apenas à primeira requisição e às que chegam depois que a cópia expira. + +Cache está sempre ativo em uma Application. Ele armazena apenas as respostas às requisições que correspondem a uma regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) com o behavior _Set Cache Policy_. Essa regra aplica um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/), que guarda os TTLs e decide como a Azion armazena e varia cada cópia. Cache pode armazenar uma resposta construída pela origem ou por uma [Function](/pt-br/documentacao/plataforma/functions/). Cada cópia fica no data center que a armazenou. Use Cache para manter arquivos estáticos no data center mais próximo ao seu usuário, entregar vídeos grandes em fragmentos com a Large File Optimization, responder com uma cópia expirada por meio do stale cache enquanto a origem está fora do ar ou remover uma cópia com [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) quando a origem muda. --- +## Caminho da requisição + +Criar um cache setting não armazena nada em cache: uma requisição só chega a uma cópia armazenada por meio de uma regra que aplica o setting. + +As setas sólidas levam a requisição, e as setas pontilhadas levam a resposta. Cada rótulo começa com o número do seu passo abaixo. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Cliente"]) + App["Application"] + Cache["Cache"] + Conn["Connector"] + Origin[["servidor de origem"]] + Client -->|"1. requisição"| App + App -->|"2. cache setting"| Cache + Cache -.->|"3. cópia válida"| App + App -->|"4. sem cópia válida"| Conn + App -->|"5. sem cache setting, ou Bypass Cache"| Conn + Conn -->|"4, 5. requisição"| Origin + Origin -.->|"4, 5. resposta"| Conn + Conn -.->|"4, 5. resposta"| App + App -.->|"4. cópia a armazenar"| Cache + App -.->|"3, 4, 5. resposta"| Client +``` + +1. A requisição do cliente chega a uma Application, e as regras da Request Phase da Application são executadas em ordem. +2. Quando uma regra com _Set Cache Policy_ aplica um cache setting, Cache monta a cache key a partir da requisição e de cada variação que o setting nomeia. +3. Quando Cache tem uma cópia válida sob essa key, o data center que recebeu a requisição responde a partir dela. A resposta informa `HIT`. +4. Caso contrário, o Connector definido por uma regra com _Set Connector_ encaminha a requisição à origem, e a resposta informa `MISS`. Cache pode armazenar a resposta sob a key para as requisições seguintes. +5. Quando nenhuma regra aplica um cache setting, ou uma regra com _Bypass Cache_ corresponde à requisição, a requisição vai à origem sem passar por Cache. _Bypass Cache_ exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). Com _Bypass Cache_, nada é armazenado, e a resposta informa `-` ou `BYPASS` em `x-cache`. + +Uma cópia armazenada responde até que o seu TTL termine ou um purge a remova. O status volta no header `x-cache` da resposta a uma requisição enviada com `Pragma: azion-debug-cache`. Para cada status e os headers de debug, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#status-de-cache). + +Para TTL e expiração, stale cache, Large File Optimization, cache keys e variações, Tiered Cache e purge, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). + +--- + ## Estrutura do cache setting -Cache age por meio de um cache setting. O setting guarda por quanto tempo a Azion e o browser mantêm uma cópia e o que a Azion faz com ela em torno desse tempo. Este cache setting mantém cada resposta por 300 segundos no cache da Azion e por um dia no browser, enviado como corpo de `POST /v4/workspace/applications//cache_settings`: +Cache age por meio de um cache setting. O setting guarda por quanto tempo a Azion e o browser mantêm uma cópia, o que a Azion faz com uma cópia expirada e o que torna duas requisições diferentes. Para manter cada resposta por 300 segundos no cache da Azion e por um dia no browser, envie este cache setting como corpo de `POST /v4/workspace/applications//cache_settings`: ```json { @@ -39,55 +79,27 @@ Cache age por meio de um cache setting. O setting guarda por quanto tempo a Azio } ``` -- `browser_cache` decide o que o browser de um visitante mantém. `honor` repassa os headers `Cache-Control` e `Expires` que a origem envia, `override` os substitui por `max_age`, em segundos, e `no-cache` desativa o cache no browser. -- `modules.cache` decide o que a Azion mantém. Com `behavior` definido como `override`, `max_age` substitui os headers da origem. Em `honor`, a Azion mantém esses headers e guarda uma resposta cuja origem não envia TTL por um TTL padrão. -- `stale_cache`, `large_file_cache` e `tiered_cache` ativam o stale cache, fragmentos de 1.024 kB e uma segunda camada de cache na região que `topology` nomeia. Um corpo que deixa um deles de fora o recebe desativado, e `tiered_cache` exige o behavior `override`. -- Um cache setting não armazena nada sozinho: uma regra da Request Phase o aplica com `{ "type": "set_cache_policy", "attributes": { "value": } }`. [Azion Console](https://console.azion.com) monta o mesmo setting a partir de **+ Cache** na aba **Cache Settings** de uma aplicação. +- `browser_cache` decide o que o browser de um visitante mantém. `honor` repassa os headers `Cache-Control` e `Expires` da origem. `override` os substitui por `max_age`, em segundos. `no-cache` desativa o cache no browser. +- `modules.cache` decide o que a Azion mantém. Com `behavior` definido como `override`, `max_age` substitui os headers da origem. Em `honor`, a Azion mantém esses headers. Quando a origem não envia TTL, a Azion guarda a resposta pelo `max_age` do setting. +- `stale_cache`, `large_file_cache` e `tiered_cache` ativam o stale cache, fragmentos de 1.024 kB e uma segunda camada de cache na região que `topology` nomeia. O stale cache pode entregar uma cópia expirada quando a Azion não consegue confirmar a cópia com a origem. Um corpo que deixa um desses três campos de fora recebe esse campo desativado. O `tiered_cache` também exige o behavior `override`. +- Um cache setting só age depois que uma regra da Request Phase aplica esse cache setting com `{ "type": "set_cache_policy", "attributes": { "value": } }`. Você também pode montar o mesmo setting no Azion Console, como mostra [Primeiros passos com Cache](/pt-br/documentacao/plataforma/applications/cache/primeiros-passos/). Se você define headers `Cache-Control` na sua origem, o modelo se mantém: `honor` os preserva e `override` os substitui. --- -## Caminho da requisição - -Uma requisição chega a uma cópia em cache por uma cadeia de objetos. Este diagrama mostra a cadeia, da requisição até a cópia armazenada ou até a origem: - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Request["Uma requisição chega a uma aplicação em que Cache está ativo"] --> Rules{"Qual regra da Request Phase corresponde à requisição?"} - Rules -->|"Uma regra com Set Cache Policy"| Setting["O cache setting que a regra nomeia se aplica"] - Rules -->|"Uma regra com Bypass Cache"| Bypass["A origem responde, e nada é armazenado: BYPASS"] - Setting --> Lookup{"Existe uma cópia armazenada sob esta cache key?"} - Lookup -->|"Sim"| Hit["A cópia armazenada é entregue: HIT"] - Lookup -->|"Não"| Origin["A origem é consultada: MISS"] - Origin --> Store["A resposta é entregue, e a Azion pode armazená-la sob a key"] -``` - -1. Uma regra da Request Phase corresponde à requisição e aplica um cache setting por meio de _Set Cache Policy_. -2. A Azion monta a cache key a partir da requisição e de cada variação que o setting nomeia. -3. Quando há uma cópia armazenada sob essa key, o data center que recebeu a requisição responde a partir dela, e a resposta informa `HIT`. -4. Caso contrário, a requisição vai à origem, a resposta informa `MISS` e a Azion pode armazenar a resposta para as requisições seguintes. -5. A cópia responde até que o seu TTL termine, um purge a remova ou uma regra envie a requisição para fora do cache. - -Uma regra com _Bypass Cache_, em vez disso, envia as suas requisições à origem, nada é armazenado e a resposta informa `BYPASS`. O status volta no header `x-cache` da resposta a uma requisição enviada com `Pragma: azion-debug-cache`. Para cada status e os headers de debug, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#status-de-cache). - -Para TTL e expiração, stale cache, Large File Optimization, cache keys e variações, Tiered Cache e purge, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). - ---- - ## Escopo e limites -- **Aplicação**: Cache vem ativo em toda aplicação nova, em que `modules.cache.enabled` mostra `true`. O switch dele em [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#produtos) › **Modules** carrega a nota `Automatically enabled in all accounts.` Uma aplicação nova não tem cache settings nem regras, então Cache não armazena nada até que uma regra com _Set Cache Policy_ nomeie um cache setting. -- **Cópias expiradas**: com **Stale cache** ativo, a Azion pode servir uma cópia expirada quando uma revalidação com a origem falha, e a resposta informa `STALE`. Um setting criado pela [Azion API](https://api.azion.com/) ou pela [Azion CLI](/pt-br/documentacao/devtools/cli/) vem com ele desativado, enquanto Azion Console o ativa em um setting novo. Para saber quando uma página antiga é melhor que um erro, consulte [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#cache). -- **Arquivos grandes**: **Large file optimization** armazena em cache um objeto grande em fragmentos de 1.024 kB, cada um buscado quando um usuário chega a ele e armazenado sob uma key própria. Um purge do arquivo precisa, portanto, nomear cada fragmento ou usar um wildcard. -- **Tiered Cache**: [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) adiciona uma segunda camada de cache entre o cache da Azion e a origem, ativada por cache setting e incluída em todos os planos. Um data center que não tem uma cópia válida consulta essa camada antes de consultar a origem. Ela exige _Override cache behavior_ e um TTL mínimo, e uma regra com _Bypass Cache_ não a alcança. -- **Keys e variação**: a Azion monta a [cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/) padrão a partir do scheme, do host e do path. Um path é, portanto, um objeto armazenado, e a query string fica fora da key. Variar uma cópia por query string, cookie, device group ou método exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) acrescenta à key o formato de uma imagem convertida. -- **Purge**: [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) remove uma cópia armazenada antes do fim do seu TTL, por URL, por cache key ou por wildcard. A Azion coloca um purge em fila depois que você o confirma, porque o resultado leva tempo para se propagar. O purge aparece no histórico de purges quando termina. Um purge por URL não alcança uma cópia que varia por cookie, device group ou formato de imagem. -- **Código**: Cache não executa código, então uma função que lê e grava entradas em cache chama [Cache API](/pt-br/documentacao/devtools/runtime/api-reference/cache/). -- **Interfaces**: você cria cache settings na aba **Cache Settings** de uma aplicação no Azion Console, pela Azion API em `/v4/workspace/applications//cache_settings` e com comandos da Azion CLI como `azion create cache-setting`. [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) declara um setting como uma entrada do seu array `cache`, [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) cria um com `createCacheSetting` e [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/applications/) gerencia um com o recurso `azion_application_cache_setting`. Um purge é enviado de **Real-Time Purge** no Azion Console, para `POST /v4/workspace/purge/` ou com `azion purge`. -- **Observabilidade**: uma requisição enviada com `Pragma: azion-debug-cache` recebe `x-cache`, que carrega o status de cache, e `x-cache-key`, que carrega a key que indexa a cópia. [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) mostra o tráfego de Cache e de Tiered Cache, e [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) traz um dataset de Tiered Cache. -- **Limites**: um único objeto em cache pode chegar a 10 GB. **Max Age** aceita de 60 segundos a um ano, e a partir de 0 segundos com Application Accelerator. Para cada limite de um cache setting, de um objeto e de um purge, e o que cada plano inclui, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache) e, para os valores, [Preços](/pt-br/documentacao/fundamentos/precos/#cache). +- **Application**: Cache fica sempre ativo em uma Application, no campo `modules.cache.enabled` dela na API, que recusa `false` com `31001`. [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) mostra o switch dele travado como ativo no Azion Console, com a nota `Automatically enabled in all accounts.` Uma Application nova não tem cache settings nem regras, então Cache começa a armazenar cópias quando uma regra com _Set Cache Policy_ aplica um cache setting. +- **Cópias expiradas**: com o stale cache ativo, no campo `modules.cache.stale_cache.enabled` de um cache setting, a Azion pode servir uma cópia expirada quando não consegue confirmar a cópia com a origem. A resposta então informa `STALE`. Um setting criado pela [Azion API](https://api.azion.com/) ou pela [Azion CLI](/pt-br/documentacao/devtools/cli/) vem com ele desativado, enquanto Azion Console o ativa em um setting novo. [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#cache) mostra onde alterá-lo em cada interface. Para saber quando uma página antiga é melhor que um erro, consulte [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#cache). +- **Arquivos grandes**: a Large File Optimization, o campo `modules.cache.large_file_cache.enabled` de um cache setting, armazena em cache um objeto grande em fragmentos de 1.024 kB. Ela vem desativada em um cache setting novo. Cada fragmento é buscado quando um usuário chega a ele e armazenado sob uma key própria, então um purge do arquivo precisa nomear cada fragmento ou usar um wildcard. +- **Tiered Cache**: [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) é uma feature de Cache que adiciona uma segunda camada de cache entre o data center que responde a uma requisição e a origem. Cada cache setting ativa essa feature no seu campo `modules.cache.tiered_cache.enabled`, e todos os planos a incluem. Um data center que não tem uma cópia válida consulta essa camada antes que a requisição siga para a origem. Tiered Cache exige o behavior `override` e um TTL mínimo. Uma regra com _Bypass Cache_ age apenas sobre o cache da Azion, então a camada do Tiered Cache continua a armazenar objetos pelo Max Age do cache setting. +- **Keys e variação**: a Azion monta a [cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/) padrão a partir do scheme, do host e do path, então um path é um objeto armazenado, e a query string fica fora da key. Variar uma cópia por query string, cookie, device group ou método exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) acrescenta à key o formato de uma imagem convertida. +- **Purge**: [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) é um recurso da plataforma que remove uma cópia armazenada antes do fim do seu TTL, por URL, por cache key ou por wildcard. A Azion coloca um purge em fila depois que você o confirma, porque o resultado leva tempo para se propagar. O purge aparece no histórico de purges quando termina. Uma cópia que varia por cookie, device group ou formato de imagem sobrevive a um purge por URL, e um purge por cache key ou por wildcard a alcança. +- **Código**: o código que lê e grava entradas em cache é executado em uma [Function](/pt-br/documentacao/plataforma/functions/) e chama [Cache API](/pt-br/documentacao/devtools/runtime/api-reference/cache/), porque o próprio Cache não pode executar código. +- **Interfaces**: você cria cache settings na aba **Cache Settings** de uma Application no Azion Console, pela Azion API em `/v4/workspace/applications//cache_settings` e com comandos da Azion CLI como `azion create cache-setting`. [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) declara um setting como uma entrada do seu array `cache`, [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) cria um com `createCacheSetting` e [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/applications/) gerencia um com o recurso `azion_application_cache_setting`. Um purge é enviado de **Real-Time Purge** no Azion Console, para `POST /v4/workspace/purge/` ou com `azion purge`. +- **Observabilidade**: uma requisição enviada com `Pragma: azion-debug-cache` recebe dois headers. O `x-cache` carrega o status de cache, e o `x-cache-key` carrega a key da cópia. [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) mostra o tráfego de Cache e de Tiered Cache, e [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) traz um dataset de Tiered Cache. +- **Limites**: um único objeto em cache pode chegar a 10 GB. O Max Age, o campo `modules.cache.max_age` de um cache setting, aceita de 60 segundos a um ano. Com Application Accelerator ativo, a Azion API aceita a partir de 0 segundos. Para cada limite de um cache setting, de um objeto e de um purge, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache). Para os valores, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#cache) e, para o que cada plano inclui, [Preços da Azion](https://www.azion.com/pt-br/precos/). - **Termos**: o [glossário de Applications](/pt-br/documentacao/plataforma/applications/glossario/) define as palavras às quais as páginas de Cache dão um significado específico, como cache setting, cache key, status de cache e stale cache. --- @@ -99,6 +111,6 @@ Para TTL e expiração, stale cache, Large File Optimization, cache keys e varia - + diff --git a/apps/docs/src/content/docs/pt-br/pages/build/functions/como-funciona.mdx b/apps/docs/src/content/docs/pt-br/pages/build/functions/como-funciona.mdx index bc3e2b119a..6a4b03b983 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/functions/como-funciona.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/functions/como-funciona.mdx @@ -124,13 +124,13 @@ Os dois contextos trocam em direções opostas. Uma função em um firewall deci Os Args são os argumentos que uma instância passa para o contexto de execução da função, escritos como um objeto JSON. Eles existem para que uma mesma função se comporte de forma diferente em cada lugar onde é instanciada, sem nenhuma edição no código. O código lê uma chave em tempo de execução; a instância decide o valor. -Uma função pode definir Args default próprios, e esses defaults são a base para toda instância dessa função. Os Args de uma instância sobrescrevem as chaves que repetem, e toda chave que a instância deixa de fora mantém o seu default. Uma função cujos defaults definem `threshold`, `action` e `log_level`, instanciada com Args que definem apenas as duas primeiras, é executada com estes valores: +Uma função pode definir Args default próprios, e a função só os lê quando uma instância não define Args. Uma instância que define Args substitui os defaults por inteiro, então uma chave que a instância deixa de fora fica ausente, em vez de manter o seu default. Uma função cujos defaults definem `threshold`, `action` e `log_level`, instanciada com Args que definem apenas as duas primeiras, é executada com estes valores: | Chave | Default da função | Args da instância | Passado para a função | | --- | --- | --- | --- | | `threshold` | `100` | `50` | `50` | | `action` | `"deny"` | `"block"` | `"block"` | -| `log_level` | `"info"` | não definido | `"info"` | +| `log_level` | `"info"` | não definido | não passado | No padrão Service Worker, o código lê os Args do objeto `event.args`, uma propriedade por chave: diff --git a/apps/docs/src/content/docs/pt-br/pages/build/functions/glossario.mdx b/apps/docs/src/content/docs/pt-br/pages/build/functions/glossario.mdx index 9f1537b8ee..f1cfd493a8 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/functions/glossario.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/functions/glossario.mdx @@ -12,7 +12,7 @@ Definições para os termos que a documentação de [Functions](/pt-br/documenta | Termo | Definição | | --- | --- | -| Args | O objeto JSON que uma [instância de função](/pt-br/documentacao/plataforma/applications/functions-instances/) passa para o contexto de execução da função. Uma instância sobrescreve, chave por chave, os Args padrão definidos na função. [Como funciona](/pt-br/documentacao/plataforma/functions/como-funciona/) mostra como os dois se combinam. | +| Args | O objeto JSON que uma [instância de função](/pt-br/documentacao/plataforma/applications/functions-instances/) passa para o contexto de execução da função. Uma instância que define Args substitui por inteiro os Args padrão da função. [Como funciona](/pt-br/documentacao/plataforma/functions/como-funciona/) mostra quais Args a função recebe. | | Azion Bundler | O adaptador de frameworks open source que transforma um projeto de framework em funções que rodam no Azion Runtime. [Como funciona](/pt-br/documentacao/plataforma/functions/como-funciona/) descreve as quatro etapas do build, da detecção do framework ao deploy das funções geradas. | | Azion Runtime | O ambiente que executa o handler de uma função. [Azion Runtime](/pt-br/documentacao/devtools/runtime/) executa JavaScript construído sobre padrões Web. Uma função também chama as [APIs da Azion](/pt-br/documentacao/devtools/runtime/api-reference/azion-runtime-globals/), que acessam variáveis de ambiente, stores e AI Inference. | | Cell | O ambiente de isolamento dentro do qual uma função roda, baseado em isolates V8. Cada Cell é um contexto de execução leve, sem acesso direto ao sistema operacional subjacente, e é por isso que uma função não consegue ler propriedades do SO, resolver DNS por chamadas nativas de sistema nem abrir sockets de baixo nível. [Compatibilidade com Node.js](/pt-br/documentacao/devtools/runtime/node/) lista o que isso exclui. | diff --git a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/como-funciona.mdx b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/como-funciona.mdx index 0e9b3cf4d7..e7de6fca0a 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/como-funciona.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/como-funciona.mdx @@ -1,6 +1,6 @@ --- title: Entrega de imagens -description: Como Image Processor escolhe o formato entregue, mantém uma entrada de cache por transformação e onde ele para, sem armazenamento e sem uploads. +description: Entenda como Image Processor escolhe o formato entregue, como mantém uma entrada de cache por transformação e onde ele para. meta_tags: 'image processor, image delivery, derived image, format negotiation, webp, ims, cache key, response headers, wasm image processor' namespace: documentation_products_image_processor_how_it_works permalink: /documentacao/plataforma/applications/image-processor/entrega-de-imagens/ @@ -9,7 +9,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Uma imagem construída sob demanda ainda precisa chegar ao browser em um formato que ele lê, e ser construída uma vez, e não para cada leitor. Em uma aplicação, Image Processor constrói uma imagem derivada a partir da imagem de origem que está no servidor de origem. Como uma requisição se torna uma imagem derivada, com o diagrama dessa cadeia, está na [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao). +Uma imagem construída sob demanda ainda precisa chegar ao navegador em um formato que ele lê, e ser construída uma vez, e não para cada leitor. Em uma [Application](/pt-br/documentacao/plataforma/applications/), [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) é o recurso da plataforma que constrói essa imagem, a imagem derivada, a partir da imagem de origem que está no servidor de origem. Como uma requisição se torna uma imagem derivada, com o diagrama dessa cadeia, está na [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/#caminho-da-requisicao). As seções cobrem como o formato entregue é escolhido, como o cache diferencia uma imagem derivada de outra e onde Image Processor para. @@ -17,19 +17,19 @@ As seções cobrem como o formato entregue é escolhido, como o cache diferencia ## Negociação de formato -O formato entregue nem sempre é o formato da imagem de origem. Dois mecanismos o alteram, e eles se comportam de forma diferente. +O formato entregue pode ser diferente do formato da imagem de origem. Dois mecanismos o alteram, e eles se comportam de forma diferente. -O primeiro é explícito. Um filtro `filters:format()` na string `ims` pede um formato de saída nomeado. Converter para WEBP também exige que a requisição carregue `Accept: image/webp`, e o behavior [Add Request Header](/pt-br/documentacao/plataforma/applications/rules-engine/#add-request-header) adiciona esse header quando o browser não o envia. +O primeiro é explícito. Um filtro `filters:format()` na string `ims` pede um formato de saída nomeado, e a resposta carrega esse formato qualquer que seja o header `Accept` que a requisição enviou, ou sem nenhum. -O segundo é automático e não precisa de nenhum parâmetro `ims`. Image Processor detecta se o browser aceita WEBP e converte a imagem quando aceita. Uma imagem BMP é convertida para JPEG ou WEBP dependendo do mesmo suporte. Por exemplo, uma requisição cujo header `Accept` lista `image/webp`, sem query string, pode receber `image/webp` para uma imagem de origem armazenada como PNG. +O segundo é automático e não precisa de nenhum parâmetro `ims`. Image Processor detecta quais formatos o navegador aceita e, quando possível, converte a imagem para um deles, como WEBP ou AVIF. Uma imagem BMP é convertida para JPEG ou WEBP dependendo do mesmo suporte. Por exemplo, uma requisição cujo header `Accept` lista `image/webp`, sem query string, pode receber `image/webp` para uma imagem de origem armazenada como PNG. Uma resposta pode carregar um formato diferente do que está na origem mesmo quando a URL não tem filtro. -Os bytes na origem e os bytes transmitidos são, portanto, duas medidas diferentes, e a resposta informa isso. Uma resposta processada carrega `x-ims: Enabled`, e `x-original-image-size` carrega o tamanho da imagem de origem antes da transformação. Um leitor que nunca escreve um filtro ainda pode receber um formato diferente do que está na origem. Leia esses headers antes de comparar uma resposta com o arquivo na origem. Para os headers, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#headers-de-resposta). +Então, os bytes na origem e os bytes transmitidos são duas medidas diferentes, e a resposta informa isso. Uma resposta processada carrega `x-ims: Enabled`, e `x-original-image-size` carrega o tamanho da imagem de origem antes da transformação. Leia esses headers antes de comparar uma resposta com o arquivo na origem. Para os headers, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#headers-de-resposta). --- ## Uma entrada de cache por transformação -Uma imagem derivada só vale a pena ser construída uma vez. A prática para o cache setting que serve imagens é listar `ims` no seu controle de query string: **Cache vary by Query String**, com o **Behavior** _Allowlist_ e `ims` em **Fields**. Cada string `ims` distinta tem então uma cache key própria. Esse controle pertence à seção **Application Accelerator** de um cache setting, `cache_vary_by_querystring` em `modules.application_accelerator`. Variar o cache por `ims` exige, portanto, Application Accelerator, enquanto processar uma imagem não exige. +Uma imagem derivada só vale a pena ser construída uma vez. A prática para o cache setting que serve imagens é variar o cache por `ims`: o seu campo `cache_vary_by_querystring` recebe o behavior `allowlist`, com `ims` em `fields`. Cada string `ims` distinta tem então uma cache key própria. Esse campo fica em `modules.application_accelerator` no cache setting, então variar o cache por `ims` exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/), enquanto processar uma imagem não exige. [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/#variacao-de-cache) relaciona cada um desses campos ao seu controle no Azion Console. Um cache setting criado com essa allowlist é lido de volta com este objeto `modules`: @@ -57,21 +57,21 @@ Um cache setting criado com essa allowlist é lido de volta com este objeto `mod } ``` -Uma imagem derivada convertida para outro formato também carrega o formato depois do separador `@@`, como em `httpsstatic.example.com/static/images/image_1.jpg?ims=880x@@webp`. +A cache key de uma imagem derivada convertida para outro formato também carrega o formato no fim da key, sem separador, como em `httpsstatic.example.com/static/images/image_1.jpg@@?ims=880xwebp`. -Essa key tem um custo, e o custo é a cardinalidade. Cada string `ims` distinta é um objeto armazenado distinto. Uma página que pede larguras arbitrárias armazena um objeto por largura, enquanto uma página que pede quatro larguras fixas armazena quatro. Escolher um conjunto pequeno de tamanhos é, portanto, tanto uma decisão de cache quanto uma decisão de layout. +Essa key tem um custo, e o custo é a cardinalidade. Cada string `ims` distinta, em cada formato entregue, é um objeto armazenado distinto. Uma página que pede larguras arbitrárias armazena um objeto por largura e formato, enquanto uma página que pede quatro larguras fixas armazena quatro por formato. Então, escolher um conjunto pequeno de tamanhos é tanto uma decisão de cache quanto uma decisão de layout. -Também é uma decisão de cobrança. Uma imagem servida a partir do cache sem processamento não conta para o medidor mensal de Images, então uma imagem derivada bem armazenada em cache custa uma imagem processada, não importa quantos leitores a recebam. Para o que cada plano inclui, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#image-processor). +Também é uma decisão de cobrança, porque o medidor mensal de Images conta as imagens que Image Processor processa, e não as imagens que o cache serve. Então, uma imagem derivada que permanece em cache é contada quando Image Processor a constrói, e não cada vez que um leitor a recebe. O cache pode remover um objeto pouco acessado antes do fim da idade máxima dele, e a próxima requisição por essa imagem é processada e contada de novo. Para a tarifa, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#image-processor). --- ## Onde Image Processor para -Image Processor lê uma imagem de origem e retorna uma derivada. Ele não armazena imagens e não aceita uploads: a imagem de origem permanece onde já está, e nenhuma imagem derivada se torna um ativo da conta. Um workflow que precisa manter um arquivo transformado precisa salvar a resposta por conta própria. +Image Processor lê uma imagem de origem a partir da origem e retorna uma derivada sem salvá-la como um ativo da conta. Não é possível fazer upload de imagens para Image Processor: a imagem de origem permanece onde já está, e o cache guarda as imagens derivadas. Um workflow que precisa manter um arquivo transformado precisa salvar a resposta por conta própria. O que a string `ims` pode expressar e o tamanho da imagem limitam a transformação. As operações que a string aceita estão em [Parâmetros de URL do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/), e o tamanho e as dimensões máximas estão em [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#image-processor). -Um limite merece ser nomeado, porque duas superfícies compartilham um nome. **WASM Image Processor** é uma biblioteca WebAssembly que processa imagens dentro de uma função em [Functions](/pt-br/documentacao/plataforma/functions/). É uma superfície diferente, com uma interface diferente, e nada nesta página a configura. +Vale nomear uma distinção, porque duas superfícies compartilham um nome. [WASM Image Processor](/pt-br/documentacao/devtools/azion-lib/wasm-image-processor/) é uma biblioteca WebAssembly que processa imagens dentro de uma [Function](/pt-br/documentacao/plataforma/functions/). Ela é executada no código dessa Function, separada do recurso da plataforma Image Processor e de tudo o que esta página descreve. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/configuracoes.mdx b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/configuracoes.mdx index b900c3731e..61e22e8d87 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/configuracoes.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/configuracoes.mdx @@ -13,25 +13,25 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -[Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) é um módulo de [Applications](/pt-br/documentacao/plataforma/applications/), ativado para uma aplicação por vez. Com o módulo ativado, uma requisição de imagem pode carregar uma query string `ims` que descreve uma transformação. Azion retorna uma imagem derivada, construída a partir da imagem de origem no servidor de origem. Esta página traz o campo, a flag e a interface que define cada um, além dos behaviors, campos de cache, headers e datasets que o módulo alcança. +[Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) é um recurso da plataforma que constrói uma imagem derivada a partir da imagem de origem na origem de uma [Application](/pt-br/documentacao/plataforma/applications/). Ele vem desativado em uma Application nova, e cada Application o ativa separadamente. Com Image Processor ativado, uma requisição de imagem pode carregar uma query string `ims` que descreve uma transformação. Esta página traz o campo, a flag e a interface que define cada um, além dos behaviors, campos de cache, headers e datasets que Image Processor alcança. --- -## Ativação do módulo +## Ativação -Cinco interfaces definem o mesmo switch, e o switch pertence à aplicação: uma aplicação pode carregar o módulo enquanto outra não. +Cinco interfaces definem o mesmo switch, e o switch pertence à Application: uma Application pode ter Image Processor ativado enquanto outra não. | Interface | Onde você define | Campo ou flag | | --- | --- | --- | -| Azion Console | O grupo **Default Modules** da seção **Modules**, na aba **Main Settings** de uma aplicação | O switch **Image Processor**, com o texto de ajuda "Enable dynamic image editing options." | +| Azion Console | O grupo **Default Modules** da seção **Modules**, na aba **Main Settings** de uma Application | O switch **Image Processor**, com o texto de ajuda "Enable dynamic image editing options." | | Azion API v4 | `PATCH /v4/workspace/applications/` | `modules.image_processor.enabled` | | Azion API v3 | `PATCH https://api.azionapi.net/edge_applications/` | `image_optimization` | | [Azion CLI](/pt-br/documentacao/devtools/cli/) | `azion create application` e `azion update application` | `--image-processor` | -| [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) e [Azion Lib](/pt-br/documentacao/devtools/azion-lib/) | O objeto da aplicação | `imageProcessorEnabled` | +| [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) e [Azion Lib](/pt-br/documentacao/devtools/azion-lib/) | Uma entrada de `applications`, uma por Application | `imageProcessorEnabled` | -`modules.image_processor.enabled` e `imageProcessorEnabled` são booleanos, e `imageProcessorEnabled` assume `false` por padrão. A flag do Azion CLI recebe uma string: `--image-processor true`. Em Azion Console, o switch é salvo com **Save**. +`modules.image_processor.enabled` e `imageProcessorEnabled` são booleanos, e os dois assumem `false` por padrão. A flag da Azion CLI recebe uma string: `--image-processor true`. Em Azion Console, o switch é salvo com **Save**. -API v4 carrega o switch no objeto `modules` da aplicação: +API v4 carrega o switch no objeto `modules` da Application: ```json { @@ -43,43 +43,47 @@ API v4 carrega o switch no objeto `modules` da aplicação: } ``` -O mesmo objeto `modules` carrega `application_accelerator`, `cache` e `functions`, cada um com seu próprio booleano `enabled`. API v3 nomeia o switch `image_optimization` e o recebe no nível superior do corpo. +O mesmo objeto `modules` carrega `application_accelerator`, `cache` e `functions`, cada um com seu próprio booleano `enabled`. API v3 nomeia o switch `image_optimization` e o recebe no nível superior do corpo. Em uma Application criada pela API v4, API v3 lê `websocket` como `true`, e o `PATCH` retorna `400` até o corpo também carregar `"websocket": false`. --- ## Behaviors do Rules Engine -Três behaviors do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) compõem a regra que processa uma imagem. **Optimize Images** exige o módulo Image Processor na aplicação que executa a regra. +Uma regra para imagens pode carregar três behaviors do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/). Só **Optimize Images** é necessário para processar uma imagem, e ele exige Image Processor ativado na Application que executa a regra. | Behavior | Fase | Tipo na API | O que faz | | --- | --- | --- | --- | -| **Optimize Images** | **Request Phase** | `optimize_images` | Ativa Image Processor para a requisição correspondente. Não recebe atributos. | -| **Set Cache Policy** | **Request Phase** | `set_cache_policy` | Aplica um cache setting à requisição correspondente. `attributes.value` carrega o id do cache setting, e Azion Console o nomeia em um segundo dropdown. | -| **Add Request Header** | **Request Phase** | `add_request_header` | Adiciona um header à requisição. `attributes.value` assume o formato `Field: value`, como `Accept: image/webp` ou `Accept: image/avif`, que é o que uma conversão para esses formatos exige. | +| **Optimize Images** | **Request Phase** | `optimize_images` | Aplica Image Processor à requisição correspondente. Não recebe atributos. | +| **Set Cache Policy** | **Request Phase** | `set_cache_policy` | Aplica um cache setting à requisição correspondente. | +| **Add Request Header** | **Request Phase** | `add_request_header` | Adiciona um header à requisição. | -Um criterion da mesma regra carrega `variable`, `operator`, `conditional` e `argument`. Uma regra que corresponde a requisições de imagem lê `${request_uri}` ou `${uri}` com o operador `matches`, usando um argumento como `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. +Em **Set Cache Policy**, `attributes.value` carrega o id do cache setting, e no Azion Console você o seleciona em um segundo dropdown. Em **Add Request Header**, `attributes.value` assume o formato `Field: value`, como `Accept: image/webp` ou `Accept: image/avif`. + +Um critério da mesma regra carrega `variable`, `operator`, `conditional` e `argument`. Uma regra que corresponde a requisições de imagem lê `${request_uri}` ou `${uri}` com o operador `matches`, usando um argumento como `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. `${request_uri}` exige Application Accelerator na Application: enquanto Application Accelerator está desativado, a API recusa uma regra que o lê e retorna o erro `25047`. `${uri}` não depende de nenhum recurso da plataforma. --- -## Cache variation +## Variação de cache + +Uma imagem derivada é armazenada em cache sob uma cache key própria quando o cache setting dela varia o cache por `ims`, porque a cache key passa a incluir a query string `ims` depois de `@@`. Uma variação com um formato convertido também carrega o formato do arquivo no fim da key, sem separador, como em `httpsstatic.example.com/static/images/image_1.jpg@@?ims=880xwebp`. -Uma imagem derivada é armazenada em cache sob a própria cache key. A cache key inclui a query string `ims`, e uma variação com um formato convertido carrega o formato do arquivo após o separador, como em `httpsstatic.yourdomain.com/static/images/image_1.jpg?ims=880x@@webp`. +Variar o cache por query string usa um campo do [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/): `cache_vary_by_querystring`, sob `modules.application_accelerator` em um cache setting. Então, variar o cache por `ims` exige Application Accelerator, enquanto processar uma imagem não o exige. -Variar o cache por query string é um campo do [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/): `cache_vary_by_querystring` está sob `modules.application_accelerator` em um cache setting. Variar o cache por `ims`, portanto, exige esse módulo. Processar uma imagem não o exige. +No Azion Console, cada campo corresponde a um controle do painel **Cache vary by Query String**, na seção **Application Accelerator** de um cache setting: | Campo | Controle no Console | O que define | | --- | --- | --- | | `cache_vary_by_querystring.behavior` | **Behavior** | Como o cache trata os parâmetros da query string. O dropdown oferece _Allowlist_, _Denylist_, _Ignore_ e _All_. | -| `cache_vary_by_querystring.fields` | **Fields** | Os parâmetros de query string considerados para a variação de cache, um por linha. Um cache setting para imagens carrega `ims`. | +| `cache_vary_by_querystring.fields` | **Fields** | Os parâmetros de query string considerados para a variação de cache, um por linha. | | `cache_vary_by_querystring.sort_enabled` | **Sort** | Se os parâmetros de query string são ordenados, de forma que o comportamento do cache não dependa da ordem em que chegam. | -Em Azion Console, os três controles ficam no painel **Cache vary by Query String** da seção **Application Accelerator** de um cache setting. Para o restante dos campos que um cache setting carrega, incluindo a idade máxima do objeto em cache, consulte [Cache Settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). Para os demais campos que o módulo libera, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/). +Um cache setting para imagens carrega `ims` em `fields`. Para o restante dos campos que um cache setting carrega, incluindo a idade máxima do objeto em cache, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). Para os demais campos que Application Accelerator libera, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/). --- ## Headers de resposta -Azion retorna dois headers na resposta a uma requisição que carrega uma query string `ims`. +Azion retorna dois headers em uma resposta que Image Processor processou. | Header | O que carrega | | --- | --- | @@ -90,24 +94,24 @@ Azion retorna dois headers na resposta a uma requisição que carrega uma query ## Dados de uso e eventos -Azion reporta a atividade de Image Processor em seis superfícies: duas em Real-Time Metrics, duas em Real-Time Events e duas em GraphQL. +Azion reporta a atividade de Image Processor em seis superfícies: quatro no Azion Console, duas em Real-Time Metrics e duas em Real-Time Events, e duas em GraphQL. | Superfície | O que carrega | | --- | --- | | A aba **Image Processor** de [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) | Métricas das requisições feitas às imagens processadas por Image Processor na sua conta, nos gráficos Total Requests e Total Requests per Second. | -| O gráfico **Bandwidth Saving** de Real-Time Metrics, em Applications | O tráfego que a conta economizou. | -| O dataset **Image Processor** de [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) | Os registros de eventos das requisições feitas a aplicações que usam Image Processor. O dataset exige o módulo. | -| O campo **Proxy Upstream** de Real-Time Events | `ims_http`, o valor que o campo assume quando a origem do Tiered Cache é Image Processor. | +| O dashboard **Bandwidth Saving** na aba **Applications** de Real-Time Metrics | Os bytes que Image Processor economizou nas imagens que processou e entregou. | +| O dataset **Image Processor** de [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) | Os registros de eventos das requisições feitas a Applications que usam Image Processor. | +| O campo **Proxy Upstream** da fonte de dados Tiered Cache de Real-Time Events | `ims_http`, o valor que o campo assume quando Image Processor é o upstream da camada de Tiered Cache. | | O dataset de consumo de [GraphQL](/pt-br/documentacao/devtools/graphql/campos-gql-consumption/) | `productId` `1441110021` e a métrica `images_processed`, o número total de imagens processadas por Image Processor. | | Os [datasets de métricas](/pt-br/documentacao/devtools/graphql/campos-gql-real-time-metrics/) de GraphQL | O dataset `imagesProcessedMetrics` e seus campos. | -Os dados ficam disponíveis por até 24 meses. Para criar a consulta de consumo e ler sua resposta, consulte [Consultar dados de uso do Image Processor](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-image-processor-com-graphql/). +No Azion Console, o dataset **Image Processor** de Real-Time Events exige Image Processor ativado, e em GraphQL ele é o dataset `imagesProcessedEvents`. Os dados de consumo ficam disponíveis por até 24 meses, e um registro de Real-Time Events é mantido por 7 dias. Para criar a consulta de consumo e ler sua resposta, consulte [Consultar dados de uso do Image Processor](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-image-processor-com-graphql/). --- ## Biblioteca WASM Image Processor -WASM Image Processor é uma biblioteca WebAssembly que processa imagens dentro de uma função do [Functions](/pt-br/documentacao/plataforma/functions/). Ela carrega `loadImage`, `resize`, `getImageResponse` e `clean`, e grava `webp`, `jpeg` e `png`. É uma superfície de produto diferente do módulo Image Processor, e nenhum campo desta página a configura. Para mais informações, consulte [WASM Image Processor](/pt-br/documentacao/devtools/azion-lib/wasm-image-processor/). +WASM Image Processor é uma biblioteca WebAssembly que processa imagens dentro de uma [Function](/pt-br/documentacao/plataforma/functions/). Ela fornece `loadImage`, `resize`, `getImageResponse` e `clean`, e grava `webp`, `jpeg` e `png`. Ela é executada no código dessa Function, separada do recurso da plataforma Image Processor e dos campos desta página. Para mais informações, consulte [WASM Image Processor](/pt-br/documentacao/devtools/azion-lib/wasm-image-processor/). --- @@ -115,9 +119,9 @@ WASM Image Processor é uma biblioteca WebAssembly que processa imagens dentro d - Ative o módulo e solicite uma imagem transformada pela primeira vez. - O caminho que uma requisição de imagem derivada percorre, e onde a transformação acontece. + Ative Image Processor e solicite uma imagem transformada pela primeira vez. + Como o formato entregue é escolhido, como uma imagem derivada é armazenada em cache e onde Image Processor para. A gramática da query string `ims` que estas configurações ativam. - As etapas que ativam o módulo e criam a regra, interface por interface. + As etapas que ativam Image Processor e criam a regra, interface por interface. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/parametros-de-url.mdx b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/parametros-de-url.mdx index 1cce080a4e..5dc297b35b 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/parametros-de-url.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/parametros-de-url.mdx @@ -13,7 +13,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -A query string `ims` carrega a transformação que [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) aplica a uma imagem. Uma única string pode conter um redimensionamento, um recorte e uma cadeia de filtros. A plataforma retorna uma imagem derivada, construída a partir da imagem de origem hospedada no servidor de origem, e o original nunca é modificado. Esta página traz a sintaxe de cada operação, os valores que os seus argumentos aceitam e um resultado renderizado. +A query string `ims` carrega a transformação que [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) aplica a uma imagem. Uma única string pode conter um redimensionamento, um recorte e uma cadeia de filtros. Image Processor retorna uma imagem derivada, construída a partir da imagem de origem hospedada no servidor de origem, e lê a imagem de origem sem alterá-la. Esta página traz a sintaxe de cada operação, os valores que os seus argumentos aceitam e um resultado renderizado. --- @@ -26,6 +26,8 @@ Um redimensionamento define o tamanho da imagem derivada. O tamanho vai na query | `Width` | Número inteiro de pixels, ou `orig` | Não | Calculado a partir de `Height`, com a proporção preservada | Define a largura da imagem derivada. `orig` mantém a largura original. | | `Height` | Número inteiro de pixels, ou `orig` | Não | Calculado a partir de `Width`, com a proporção preservada | Define a altura da imagem derivada. `orig` mantém a altura original. | +Quando `Width` e `Height` são definidos, a imagem pode ser recortada automaticamente para se ajustar ao tamanho solicitado. O recorte é centralizado, e ocorre na vertical ou na horizontal, dependendo de como as dimensões originais se ajustam às solicitadas. + Os argumentos se combinam em cinco formas: | Forma | Resultado | @@ -33,12 +35,14 @@ Os argumentos se combinam em cinco formas: | `?ims=WidthxHeight` | Redimensiona a imagem para esse tamanho. A imagem pode ser recortada automaticamente para se ajustar. | | `?ims=Widthx` | Define a largura e calcula a altura, com a proporção preservada. | | `?ims=xHeight` | Define a altura e calcula a largura, com a proporção preservada. | -| `?ims=WidthxOrig` | Define a largura e mantém a altura original, sem recorte automático. | +| `?ims=Widthxorig` | Define a largura e mantém a altura original. | | `?ims=fit-in/WidthxHeight` | Ajusta a imagem dentro da área, com a proporção preservada e sem ampliação. | -Quando `Width` e `Height` são definidos, a imagem pode ser recortada automaticamente para se ajustar ao tamanho solicitado. O recorte é centralizado, e ocorre na vertical ou na horizontal, dependendo de como as dimensões originais se ajustam às solicitadas. +Image Processor não aplica `orig` em todas as URLs: algumas requisições que o carregam retornam a imagem de origem sem transformação. -`fit-in` nunca amplia a imagem: quando a área é maior que as dimensões da imagem, a imagem mantém o tamanho original. As duas dimensões são opcionais, e a imagem cresce até atingir a largura ou a altura, o que vier primeiro. Por exemplo, `?ims=fit-in/400x400` em uma imagem paisagem para em 400 pixels de largura, e a altura fica abaixo de 400. +Sem `fit-in`, um tamanho pedido maior que a imagem de origem a amplia: `?ims=1200x`, `?ims=x900` e `?ims=1200x900` retornam, todas, uma imagem maior que a de origem. Para manter o tamanho original quando o tamanho pedido é maior, use `fit-in`. + +`fit-in` nunca amplia a imagem: quando a área é maior que as dimensões da imagem, a imagem mantém o tamanho original. As duas dimensões são opcionais, e a imagem é reduzida até caber na largura ou na altura, a que ela atingir primeiro. Por exemplo, `?ims=fit-in/400x400` em uma imagem paisagem para em 400 pixels de largura, e a altura fica abaixo de 400. A imagem abaixo carrega `?ims=400x400`, que redimensiona com recorte automático: @@ -55,11 +59,11 @@ Um recorte mantém o retângulo entre duas coordenadas da imagem de origem e des | `AxB` | Par de coordenadas em pixels | Sim | O canto superior esquerdo onde o recorte começa. | | `CxD` | Par de coordenadas em pixels | Sim | O canto inferior direito onde o recorte termina. | -Por exemplo, `?ims=430x20:910x730` inicia o recorte na coordenada 430x20 pixels e o termina na coordenada 910x730 pixels. +Por exemplo, `?ims=430x20:800x500` inicia o recorte na coordenada 430x20 pixels e o termina na coordenada 800x500 pixels. A imagem abaixo carrega essa query: -![A fotografia de origem recortada para o retângulo entre as coordenadas 430x20 e 910x730 pixels](/assets/docs/images/image-processor/Image_Processor_1.png?ims=430x20:910x730) +![A fotografia de origem recortada para o retângulo entre as coordenadas 430x20 e 800x500 pixels](/assets/docs/images/image-processor/Image_Processor_1.png?ims=430x20:800x500) --- @@ -93,18 +97,14 @@ A imagem abaixo carrega `?ims=filters:rotate(270)`: ## Qualidade -O filtro de qualidade define o quanto a imagem derivada é comprimida, o que altera o tamanho do arquivo e o tempo de transferência. O valor vai na query string como `?ims=filters:quality(value)`. +O filtro de qualidade define a compressão da imagem derivada, o que altera o tamanho do arquivo e o tempo de transferência. O valor vai na query string como `?ims=filters:quality(value)`. | Argumento | Tipo | Obrigatório | O que faz | | --- | --- | --- | --- | -| `value` | Número inteiro, de `0` a `100` | Sim | O nível de qualidade aplicado à imagem. | +| `value` | Número inteiro, de `0` a `100` | Sim | A qualidade da imagem derivada. `0` a comprime ao máximo, e `100`, ao mínimo. | O valor recomendado é `85`. Ele otimiza a imagem sem perda perceptível de qualidade visual. -:::note[nota] -Uma requisição para uma resolução maior que a original não amplia a imagem. A imagem é exibida na maior resolução possível. -::: - A imagem abaixo carrega `?ims=filters:quality(15)`, bem abaixo do valor recomendado: ![A fotografia de origem entregue com um valor de qualidade de 15](/assets/docs/images/image-processor/Image_Processor_1.png?ims=filters:quality(15)) @@ -117,12 +117,14 @@ Uma marca d'água posiciona uma segunda imagem sobre a imagem de origem. O filtr | Argumento | Tipo | Obrigatório | O que faz | | --- | --- | --- | --- | -| `WatermarkURL` | URL de uma imagem | Sim | A imagem posicionada sobre a imagem de origem. Parênteses na URL são codificados como `%28` para `(` e `%29` para `)`. | -| `X` | Número inteiro de pixels, `center`, ou `repeat` | Sim | A posição horizontal. Um número positivo desloca a partir da borda esquerda em direção à direita, e um número negativo a partir da borda direita em direção à esquerda. `center` centraliza a marca d'água horizontalmente, e `repeat` preenche a imagem horizontalmente com cópias dela. | -| `Y` | Número inteiro de pixels, `center`, ou `repeat` | Sim | A posição vertical. Um número positivo desloca de cima para baixo, e um número negativo de baixo para cima. `center` centraliza a marca d'água verticalmente, e `repeat` preenche a imagem verticalmente com cópias dela. | +| `WatermarkURL` | URL de uma imagem | Sim | A imagem posicionada sobre a imagem de origem. | +| `X` | Número inteiro de pixels, `center` ou `repeat` | Sim | A posição horizontal. | +| `Y` | Número inteiro de pixels, `center` ou `repeat` | Sim | A posição vertical. | | `Alpha` | Número inteiro, de `0` a `100` | Sim | A transparência da marca d'água. `0` é completamente opaco e `100` é completamente transparente. | -Por exemplo, `?ims=filters:watermark(https://example.com/watermark-image.png,-25,-10,50)` aplica a marca d'água 25 pixels à esquerda do centro e 10 pixels abaixo do centro, com 50% de transparência. +Um `X` positivo desloca a marca d'água a partir da borda esquerda, e um `X` negativo a desloca a partir da borda direita. Um `Y` positivo a desloca a partir da borda superior, e um `Y` negativo a desloca a partir da borda inferior. `center` a centraliza nesse eixo, e `repeat` preenche a imagem com cópias dela ao longo desse eixo. Parênteses em `WatermarkURL` são codificados como `%28` para `(` e `%29` para `)`. + +Por exemplo, `?ims=filters:watermark(https://example.com/watermark-image.png,-25,-10,50)` posiciona a marca d'água a 25 pixels da borda direita e a 10 pixels da borda inferior, com 50% de transparência. A imagem abaixo carrega uma marca d'água centralizada nos dois eixos, com 50% de transparência: @@ -138,14 +140,7 @@ A conversão de formato retorna a imagem em um formato de arquivo diferente. O f | --- | --- | --- | --- | | `ImageFormat` | Um dos valores `webp`, `avif`, `jpeg`, `gif`, `png` | Sim | O formato de arquivo da imagem derivada. | -Converter para WEBP ou AVIF exige que a requisição carregue um header `Accept` que nomeie o formato: - -| Formato de saída | Header que a requisição deve carregar | -| --- | --- | -| `webp` | `Accept: image/webp` | -| `avif` | `Accept: image/avif` | - -Para adicionar esse header com uma regra, consulte [Configurar Image Processor](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/processar-imagens/). +A resposta carrega o formato que o filtro nomeia, qualquer que seja o header `Accept` da requisição. Um navegador que não suporta WEBP ou AVIF não consegue exibir a imagem. A imagem abaixo carrega `?ims=filters:format(gif)`: @@ -155,15 +150,15 @@ A imagem abaixo carrega `?ims=filters:format(gif)`: ## Preenchimento -O preenchimento cria uma imagem derivada maior que a original e pinta a área ao redor dela com uma cor. O filtro vai na query string como `?ims=fit-in/WidthxHeight/filters:fill(Color)`. +O preenchimento ajusta a imagem dentro de uma área do tamanho pedido e pinta com uma cor o restante da área. A imagem derivada fica com o tamanho da área. O filtro vai na query string como `?ims=fit-in/WidthxHeight/filters:fill(Color)`. | Argumento | Tipo | Obrigatório | O que faz | | --- | --- | --- | --- | -| `Width` | Número inteiro de pixels | Não | A largura da área em que a imagem se ajusta. Se você omiti-la, a largura é calculada a partir de `Height`, preservando a proporção. | -| `Height` | Número inteiro de pixels | Não | A altura da área em que a imagem se ajusta. Se você omiti-la, a altura é calculada a partir de `Width`, preservando a proporção. | +| `Width` | Número inteiro de pixels | Não | A largura da área em que a imagem se ajusta. | +| `Height` | Número inteiro de pixels | Não | A altura da área em que a imagem se ajusta. | | `Color` | Valor de cor hexadecimal, ou o valor nomeado `gray` | Sim | A cor pintada ao redor da imagem. | -O preenchimento usa o mesmo comportamento de `fit-in` que um redimensionamento: a imagem mantém a proporção, e uma área maior que a imagem não a amplia. O espaço que sobra é o que a cor preenche. +Se você omitir `Width` ou `Height`, a dimensão omitida é calculada a partir da outra, preservando a proporção. O preenchimento usa o mesmo comportamento de `fit-in` que um redimensionamento: a imagem mantém a proporção, e uma área maior que a imagem não a amplia. O espaço que sobra é o que a cor preenche. Por exemplo, `?ims=fit-in/300x400/filters:fill(008080)` ajusta a imagem a uma área de 300 por 400 pixels e pinta o espaço ao redor dela com a cor `008080`. @@ -179,11 +174,11 @@ Uma única string `ims` pode carregar mais de um filtro. Os filtros ficam dentro | Segmento | Exemplo | O que faz | | --- | --- | --- | -| Segmento de redimensionamento | `fit-in/400x400` | Define o tamanho da imagem derivada. Vem primeiro, e uma `/` o separa do grupo de filtros. | +| Segmento de redimensionamento | `fit-in/400x400` | Define o tamanho da imagem derivada. | | Grupo de filtros | `filters:fill(00ffff):quality(100)` | Carrega um ou mais filtros, aberto por `filters:`. | | Separador de filtro | `:` | Separa um filtro do próximo dentro do grupo. | -Por exemplo, `?ims=fit-in/400x400/filters:fill(00ffff):quality(100)` ajusta a imagem a uma área de 400 por 400 pixels. Em seguida, pinta o espaço ao redor da imagem com a cor `00ffff` e aplica um valor de qualidade de `100`. +O segmento de redimensionamento vem primeiro, e uma `/` o separa do grupo de filtros. Por exemplo, `?ims=fit-in/400x400/filters:fill(00ffff):quality(100)` ajusta a imagem a uma área de 400 por 400 pixels. Em seguida, pinta o espaço ao redor da imagem com a cor `00ffff` e aplica um valor de qualidade de `100`. A imagem abaixo carrega essa query: @@ -203,20 +198,15 @@ Image Processor aceita estes formatos de imagem de origem: - WEBP - AVIF -WEBP e AVIF dependem do navegador. Para os navegadores que suportam cada um, consulte [Suporte de navegadores para WEBP](https://caniuse.com/webp) e [Suporte de navegadores para AVIF](https://caniuse.com/avif). +Um navegador exibe uma imagem derivada em WEBP ou AVIF somente quando suporta esse formato. Para os navegadores que suportam cada um, consulte [Suporte de navegadores para WEBP](https://caniuse.com/webp) e [Suporte de navegadores para AVIF](https://caniuse.com/avif). -Image Processor também converte um formato sem o parâmetro `ims` na requisição. Ele detecta se o navegador suporta WEBP e converte a imagem quando possível, e imagens BMP são convertidas para JPEG ou WEBP dependendo do mesmo suporte de navegador. Para mais informações, consulte [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/). +Image Processor também converte um formato sem o parâmetro `ims` na requisição. Ele detecta quais formatos o navegador suporta e, quando possível, converte a imagem para um deles, como WEBP ou AVIF. Imagens BMP são convertidas para JPEG ou WEBP dependendo do mesmo suporte de navegador. Para mais informações, consulte [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/). --- ## Posição do parâmetro ims -O parâmetro de query string `ims=` deve ser o último parâmetro na URL. Quando outro parâmetro de query string vem depois de `ims=`, a requisição pode retornar um erro `504`. - -| URL | Posição de `ims=` | -| --- | --- | -| `example.com/image.jpeg?ts=1234&ims=1000x1000` | Último. A requisição é válida. | -| `example.com/image.jpeg?ims=1000x1000&ts=1234` | Não é o último. A requisição pode retornar um erro `504`. | +`ims` pode ficar em qualquer posição da query string: `example.com/image.jpeg?ims=1000x1000&ts=1234` e `example.com/image.jpeg?ts=1234&ims=1000x1000` retornam a mesma imagem derivada. Um valor de `ims` que Image Processor não consegue interpretar, como `450xOrig`, retorna a imagem de origem sem transformação, ainda com `x-ims: Enabled`. --- @@ -224,9 +214,9 @@ O parâmetro de query string `ims=` deve ser o último parâmetro na URL. Quando - O caminho que uma requisição percorre pelo módulo, e como uma imagem derivada é armazenada em cache. - Os campos e as interfaces que ativam o módulo para uma aplicação. + Como o formato entregue é escolhido, como uma imagem derivada é armazenada em cache e onde Image Processor para. + Os campos e as interfaces que ativam Image Processor para uma Application. Os tetos de tamanho e dimensão que limitam os valores nestas tabelas. - Ative o módulo, adicione as regras que processam imagens e configure o cache. + Ative Image Processor, adicione as regras que processam imagens e configure o cache. diff --git a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/primeiros-passos.mdx index bb111b6add..6bc9a040ac 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/primeiros-passos.mdx @@ -13,15 +13,16 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' -Este guia conduz você pela requisição da sua primeira imagem derivada a partir de uma aplicação. Ao final, você terá: +Este guia conduz você pela requisição da sua primeira imagem derivada a partir de uma Application. Ao final, você terá: -- Image Processor ativado em uma aplicação. +- [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) ativado em uma Application. - Um cache setting que armazena cada transformação como um objeto próprio. -- Uma regra do Rules Engine que envia requisições de imagem para o módulo. +- Uma regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) que envia requisições de imagem ao Image Processor. - Uma imagem redimensionada retornada a partir de uma URL que você escreveu. -Quatro objetos produzem esse resultado, e cada um está ligado ao anterior. A **aplicação** carrega o switch do módulo. O **cache setting** pertence à aplicação e decide que duas transformações diferentes são dois objetos diferentes em cache. A **regra** pertence à aplicação, corresponde a requisições de imagem e aplica tanto o cache setting quanto o behavior **Optimize Images**. A URL da imagem carrega então a transformação na própria query string `ims`. Uma requisição que nenhuma regra corresponde é entregue sem processamento, então é a regra que dá sentido à query string. +Três entidades e uma URL produzem esse resultado, nesta ordem. A **Application** tem Image Processor ativado. O **cache setting** pertence à Application e faz o cache armazenar duas transformações diferentes como dois objetos diferentes. A **regra** pertence à Application, corresponde a requisições de imagem e aplica tanto o cache setting quanto o behavior _Optimize Images_. A URL da imagem carrega então a transformação na própria query string `ims`. Uma requisição à qual nenhuma regra corresponde é entregue sem processamento, então é a regra que dá sentido à query string. --- @@ -37,9 +38,9 @@ Quatro objetos produzem esse resultado, e cada um está ligado ao anterior. A ** ### Console - Uma [conta Azion](/pt-br/documentacao/fundamentos/criar-uma-conta/). -- Uma aplicação que já entrega imagens a partir de uma origem. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- O path de uma imagem que a aplicação serve, para que você possa requisitá-la ao final. -- Acesso ao Azion Console. Para entrar, consulte [Como acessar o Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). +- Uma Application que já entrega imagens a partir de uma origem. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- O path de uma imagem que a Application serve, para que você possa requisitá-la ao final. +- Acesso ao Azion Console. Para entrar, consulte [Acesse Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). @@ -48,8 +49,8 @@ Quatro objetos produzem esse resultado, e cada um está ligado ao anterior. A ** ### CLI - Uma [conta Azion](/pt-br/documentacao/fundamentos/criar-uma-conta/). -- Uma aplicação que já entrega imagens a partir de uma origem. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- O path de uma imagem que a aplicação serve, para que você possa requisitá-la ao final. +- Uma Application que já entrega imagens a partir de uma origem. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- O path de uma imagem que a Application serve, para que você possa requisitá-la ao final. - A [Azion CLI](/pt-br/documentacao/devtools/cli/) instalada e autorizada. @@ -59,8 +60,8 @@ Quatro objetos produzem esse resultado, e cada um está ligado ao anterior. A ** ### API - Uma [conta Azion](/pt-br/documentacao/fundamentos/criar-uma-conta/). -- Uma aplicação que já entrega imagens a partir de uma origem. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- O path de uma imagem que a aplicação serve, para que você possa requisitá-la ao final. +- Uma Application que já entrega imagens a partir de uma origem. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- O path de uma imagem que a Application serve, para que você possa requisitá-la ao final. - Um [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e o `curl`. @@ -69,11 +70,11 @@ Quatro objetos produzem esse resultado, e cada um está ligado ao anterior. A ** --- -## Ative Image Processor +## Ative Image Processor e Application Accelerator -O módulo é um switch na aplicação, e fica desativado até você configurá-lo. Esta etapa ativa dois módulos. +Image Processor é um recurso da plataforma que vem desativado em uma Application nova. Esta etapa ativa dois recursos da plataforma. -**Application Accelerator** é o segundo por um motivo: o campo que varia o cache por uma query string pertence a ele, e o cache setting usa esse campo. Processar uma imagem não exige o módulo, mas armazenar cada transformação separadamente em cache exige. +[Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) é o segundo por dois motivos. O campo que varia o cache por uma query string pertence a ele, e o cache setting usa esse campo. A regra deste guia também lê `${request_uri}`, e a Azion recusa uma regra que o lê enquanto Application Accelerator está desativado. Processar uma imagem não exige Application Accelerator, mas armazenar cada transformação separadamente em cache exige. @@ -81,12 +82,12 @@ O módulo é um switch na aplicação, e fica desativado até você configurá-l ### Console -Para ativar os dois módulos pelo Azion Console: +Para ativar os dois recursos da plataforma pelo Azion Console: - + - Acesse [Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/) > **Applications** e selecione a aplicação que entrega suas imagens. + Acesse [Azion Console](https://console.azion.com/) > **Applications** > **sua Application**. @@ -103,7 +104,7 @@ Para ativar os dois módulos pelo Azion Console: -A aplicação agora carrega os dois módulos, e o behavior **Optimize Images** fica disponível para as suas regras. +A Application agora tem os dois recursos da plataforma ativados, e o behavior _Optimize Images_ fica disponível para as suas regras. @@ -111,19 +112,17 @@ A aplicação agora carrega os dois módulos, e o behavior **Optimize Images** f ### CLI -Um comando ativa os dois módulos. Substitua `` pelo [ID da sua aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): +Um comando ativa os dois recursos da plataforma. Substitua `` pelo [ID da sua Application](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): - ```bash - azion update application --application-id --image-processor true --application-accelerator true - ``` + --image-processor true --application-accelerator true`} /> - O comando confirma a aplicação que alterou: + O comando confirma a Application que alterou: ```text Updated Application with ID @@ -132,7 +131,7 @@ Um comando ativa os dois módulos. Substitua `` pelo [ID da sua -A aplicação agora carrega os dois módulos, e o behavior **Optimize Images** fica disponível para as suas regras. +A Application agora tem os dois recursos da plataforma ativados, e o behavior _Optimize Images_ fica disponível para as suas regras. @@ -140,29 +139,27 @@ A aplicação agora carrega os dois módulos, e o behavior **Optimize Images** f ### API -Uma requisição ativa os dois módulos. Substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo [ID da sua aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): +Uma requisição ativa os dois recursos da plataforma. Substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo [ID da sua Application](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): - ```bash - curl --request PATCH \ - --url https://api.azion.com/v4/workspace/applications/ \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "modules": { "application_accelerator": { "enabled": true }, "image_processor": { "enabled": true } } - }' - ``` +}'`} /> - Um `202` carrega `"state": "pending"`, porque a alteração ainda está propagando. O objeto `modules` da resposta repete todos os módulos da aplicação, inclusive os que você não alterou: + Um `202` carrega `"state": "pending"`, porque a alteração ainda está propagando. O objeto `modules` da resposta repete todos os switches da Application, inclusive os que você não alterou: ```json { @@ -176,7 +173,7 @@ Uma requisição ativa os dois módulos. Substitua `[TOKEN VALUE]` pelo seu pers -A aplicação agora carrega os dois módulos, e o behavior **Optimize Images** fica disponível para as suas regras. +A Application agora tem os dois recursos da plataforma ativados, e o behavior _Optimize Images_ fica disponível para as suas regras. @@ -186,7 +183,7 @@ A aplicação agora carrega os dois módulos, e o behavior **Optimize Images** f ## Crie um cache setting que varia pela query string ims -Sem esta etapa, o cache não consegue diferenciar uma transformação de outra, e pode responder a uma requisição de imagem de 400 pixels com uma de 200 pixels. +Sem esta etapa, o cache não consegue diferenciar uma transformação de outra. Ele pode responder a uma requisição de imagem de 400 pixels com uma de 200 pixels. @@ -197,12 +194,27 @@ Sem esta etapa, o cache não consegue diferenciar uma transformação de outra, Para criar o cache setting pelo Azion Console: + + + Acesse [Azion Console](https://console.azion.com/) > **Applications** > **sua Application**. + + Em **Name**, digite `images`. + + + + Na seção **Cache**, defina **Cache Behavior** como _Override cache behavior_. + + + + + Na seção **Cache**, em **Max Age**, digite `31536000`. + @@ -215,10 +227,11 @@ Para criar o cache setting pelo Azion Console: Em **Fields**, digite `ims`. + -A aplicação agora tem um cache setting que armazena um objeto por valor distinto de `ims`. +A Application agora tem um cache setting que armazena um objeto por valor distinto de `ims`. @@ -226,15 +239,14 @@ A aplicação agora tem um cache setting que armazena um objeto por valor distin ### CLI -As flags de criação não alcançam a idade máxima, então o comando envia o body inteiro a partir de um arquivo. +O comando da Azion CLI envia o body inteiro a partir de um arquivo, porque nenhuma flag de criação define o `max_age` do cache nem o `sort_enabled`. Salve o conteúdo a seguir como `cache-setting.json`: - ```json - { + `31536000` segundos é o teto de `max_age`, o que serve bem para imagens, porque elas mudam raramente. - Substitua `` pelo [ID da sua aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): + Substitua `` pelo [ID da sua Application](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): - ```bash - azion create cache-setting --application-id --file cache-setting.json - ``` + --file cache-setting.json`} /> O comando imprime o id do novo cache setting: @@ -270,16 +279,14 @@ As flags de criação não alcançam a idade máxima, então o comando envia o b - ```bash - azion describe cache-setting --application-id --cache-setting-id 123464 --format json - ``` + --cache-setting-id 123464 --format json`} /> A saída informa a allowlist de `ims` e a idade máxima que o arquivo definiu. -A aplicação agora tem um cache setting que armazena um objeto por valor distinto de `ims`. Registre o id que o comando imprimiu, porque a regra o aplica. Para todas as flags que o comando aceita, consulte [Azion CLI create](/pt-br/documentacao/devtools/cli/recursos/). +A Application agora tem um cache setting que armazena um objeto por valor distinto de `ims`. Registre o id que o comando imprimiu, porque a regra o aplica. Para todas as flags que o comando aceita, consulte [Azion CLI cache-setting](/pt-br/documentacao/devtools/cli/recursos/cache-setting/). @@ -292,14 +299,13 @@ Uma requisição carrega o comportamento de cache e a allowlist de query string - Substitua `` pelo [ID da sua aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): + Substitua `` pelo [ID da sua Application](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/definir-configuracoes-principais/): - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//cache_settings \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ + /cache_settings \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ --data '{ "name": "images", "browser_cache": { "behavior": "honor" }, @@ -313,8 +319,7 @@ Uma requisição carrega o comportamento de cache e a allowlist de query string } } } - }' - ``` +}'`} /> `31536000` segundos é o teto de `max_age`, o que serve bem para imagens, porque elas mudam raramente. @@ -328,19 +333,19 @@ Uma requisição carrega o comportamento de cache e a allowlist de query string -A aplicação agora tem um cache setting que armazena um objeto por valor distinto de `ims`. +A Application agora tem um cache setting que armazena um objeto por valor distinto de `ims`. -Para o restante dos campos que um cache setting carrega, incluindo por quanto tempo um objeto permanece em cache, consulte [Cache Settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). +Para o restante dos campos que um cache setting carrega, incluindo por quanto tempo um objeto permanece em cache, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). --- -## Crie uma regra que envia as requisições de imagem para o módulo +## Crie uma regra que envia as requisições de imagem ao Image Processor -A regra é o que converte a query string em uma transformação. Ela corresponde a requisições de paths de imagem, aplica o cache setting que você criou e adiciona o behavior **Optimize Images**. +A regra é o que converte a query string em uma transformação. Ela corresponde a requisições de paths de imagem, aplica o cache setting que você criou e carrega o behavior _Optimize Images_. @@ -351,6 +356,11 @@ A regra é o que converte a query string em uma transformação. Ela corresponde Para criar a regra pelo Azion Console: + + + Acesse [Azion Console](https://console.azion.com/) > **Applications** > **sua Application**. + + @@ -380,7 +390,7 @@ Para criar a regra pelo Azion Console: -Toda requisição para um path terminado em uma dessas extensões agora alcança Image Processor, carrega o cache setting `images` e é processada quando a URL dela pede uma transformação. +Toda requisição para um path com uma dessas extensões agora recebe o cache setting `images` e o behavior _Optimize Images_. Image Processor transforma a imagem quando a URL dela carrega `ims`. @@ -395,8 +405,7 @@ Os critérios carregam `${request_uri}`, que um shell expande, e o argumento car Salve o conteúdo a seguir como `rule.json`, com o id do seu cache setting no behavior `set_cache_policy`: - ```json - { + - Uma regra carrega os dois behaviors, e `optimize_images` não recebe attributes. + Uma regra carrega os dois behaviors, e `optimize_images` não recebe atributos. - ```bash - azion create rules-engine --application-id --phase request --file rule.json - ``` + --phase request --file rule.json`} /> O comando imprime o id da nova regra: @@ -435,7 +441,7 @@ Os critérios carregam `${request_uri}`, que um shell expande, e o argumento car -Toda requisição para um path terminado em uma dessas extensões agora alcança Image Processor, carrega o cache setting `images` e é processada quando a URL dela pede uma transformação. +Toda requisição para um path com uma dessas extensões agora recebe o cache setting `images` e o behavior _Optimize Images_. Image Processor transforma a imagem quando a URL dela carrega `ims`. @@ -450,8 +456,7 @@ Os critérios carregam `${request_uri}`, que um shell expande, e o argumento car Salve o conteúdo a seguir como `rule.json`, com o id do seu cache setting no behavior `set_cache_policy`: - ```json - { + - Uma regra carrega os dois behaviors, e `optimize_images` não recebe attributes. + Uma regra carrega os dois behaviors, e `optimize_images` não recebe atributos. - ```bash - curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json - ``` + /request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> - Um `202` carrega `"state": "pending"`, porque a regra ainda está propagando. Ela repete os critérios e os dois behaviors, e carrega o `order` que a regra ocupa entre as regras da aplicação. + Um `202` carrega `"state": "pending"`, porque a regra ainda está propagando. Ela repete os critérios e os dois behaviors, e carrega o `order` que a regra ocupa entre as regras da Application. -Toda requisição para um path terminado em uma dessas extensões agora alcança Image Processor, carrega o cache setting `images` e é processada quando a URL dela pede uma transformação. +Toda requisição para um path com uma dessas extensões agora recebe o cache setting `images` e o behavior _Optimize Images_. Image Processor transforma a imagem quando a URL dela carrega `ims`. :::note[nota] -Esta parte é opcional. Converter uma imagem para WEBP ou AVIF exige que a requisição carregue `Accept: image/webp` ou `Accept: image/avif`. O behavior **Add Request Header** o adiciona à mesma regra, então a conversão deixa de depender do que o navegador enviou. Na Azion CLI e na API, é um behavior do tipo `add_request_header`, cujos `attributes` carregam `"value": "Accept: image/webp"`. Para os campos do behavior, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/). +Esta parte é opcional. Um behavior **Add Request Header** com `Accept: image/webp` na mesma regra faz a conversão automática entregar WEBP a toda requisição à qual a regra corresponde, inclusive a uma cujo navegador pediu PNG. Adicione-o somente quando todos os clientes desses paths exibirem WEBP. Na Azion CLI e na API, é um behavior do tipo `add_request_header`, cujos `attributes` carregam `"value": "Accept: image/webp"`. Para os campos do behavior, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/). ::: --- @@ -512,11 +514,9 @@ Peça uma largura e veja a resposta mudar. Requisite uma das suas imagens com uma query string `ims`, substituindo o host e o path pelos seus próprios: -```bash -curl -s -o /dev/null -w "%{http_code} %{content_type} %{size_download} bytes\n" \ - -H "Accept: image/webp,image/*" \ - "https://www.example.com/images/photo.jpg?ims=400x" -``` + A resposta informa o status, o tipo e o tamanho dela: @@ -524,13 +524,11 @@ A resposta informa o status, o tipo e o tamanho dela: 200 image/webp 8312 bytes ``` -Requisite a mesma imagem sem query string e compare o tamanho. A resposta processada é menor, e também pode carregar um formato diferente do arquivo na sua origem, porque Image Processor entrega WEBP para os navegadores que o aceitam. +Requisite a mesma imagem sem query string e compare o tamanho. A resposta redimensionada é menor quando a imagem de origem tem mais de 400 pixels de largura. As duas respostas podem carregar um formato diferente do arquivo na sua origem, porque Image Processor converte as imagens para os navegadores que aceitam outro formato, como WEBP. -Para confirmar que foi o módulo, e não a origem, que processou a resposta, leia os headers: +Para confirmar que Image Processor, e não a origem, processou a resposta, leia os headers: -```bash -curl -sI -H "Accept: image/webp" "https://www.example.com/images/photo.jpg?ims=400x" -``` + Uma resposta processada carrega `x-ims: Enabled` e o tamanho da imagem de origem antes da transformação: @@ -541,11 +539,7 @@ x-ims: Enabled x-original-image-size: 484156 ``` -Agora você tem uma aplicação que transforma imagens sob demanda, e uma URL que descreve a transformação. - -:::tip[dica] -Mantenha `ims=` como o último parâmetro na URL. Uma requisição que carrega outro parâmetro de query string depois dele pode retornar um erro `504`. -::: +Agora você tem uma Application que transforma imagens sob demanda, e uma URL que descreve a transformação. --- @@ -553,9 +547,9 @@ Mantenha `ims=` como o último parâmetro na URL. Uma requisição que carrega o - + - - - + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/visao-geral.mdx b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/visao-geral.mdx index 574230f3eb..d52969528f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/build/image-processor/visao-geral.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/build/image-processor/visao-geral.mdx @@ -1,6 +1,6 @@ --- title: Image Processor -description: Redimensione, recorte, filtre e converta imagens sob demanda com Image Processor, a partir de uma imagem de origem na origem de uma aplicação. +description: Redimensione, recorte, filtre e converta imagens sob demanda com Image Processor, a partir de uma imagem de origem na origem de uma Application. meta_tags: 'image processor, ims, derived image, source image, resize, crop, filters, webp, avif, optimize images, applications' namespace: documentation_products_image_optimization permalink: /documentacao/plataforma/applications/image-processor/ @@ -10,18 +10,55 @@ import DocButton from '~/components/webkit/DocButton.vue' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -Transformar uma imagem sob demanda constrói cada variante quando uma requisição a pede, e não com antecedência. A URL descreve a variante, como uma largura, um recorte, uma qualidade ou um formato, e o servidor a constrói a partir de um único arquivo original. Nenhuma variante precisa ser construída, armazenada ou reconstruída com antecedência, porque cada uma vem desse único original quando é pedida. +**Image Processor** é um recurso da plataforma que constrói uma imagem nova, a imagem derivada, a partir de uma imagem na origem de uma [Application](/pt-br/documentacao/plataforma/applications/). A transformação de imagens sob demanda é um modelo de entrega em que o servidor constrói cada variante de uma imagem no momento da requisição. A URL da requisição descreve a variante, como uma largura, um recorte, uma qualidade ou um formato. Cada variante vem do único original, então o original é o único arquivo que você armazena e atualiza. -**Image Processor** constrói essa variante, a imagem derivada, a partir da imagem de origem que está no servidor de origem de uma [aplicação](/pt-br/documentacao/plataforma/applications/). A query string `ims` da requisição a descreve, como `?ims=fit-in/400x400`, e a imagem de origem nunca é modificada. Ele roda nas requisições que uma regra da Request Phase com o behavior _Optimize Images_ entrega a ele. Use Image Processor para entregar uma imagem em vários tamanhos, recortes, qualidades ou formatos, como WEBP para os browsers que o aceitam, sem um arquivo por variante. +Em uma Application, Image Processor lê a imagem de origem, o arquivo na origem, sem alterá-la. A query string `ims` da requisição descreve a imagem derivada, como `?ims=fit-in/400x400`. Mesmo sem a query string `ims`, Image Processor pode converter uma imagem para um formato que o navegador aceita. Image Processor processa somente as requisições às quais uma regra da Request Phase com o behavior _Optimize Images_ corresponde, e você escreve essa regra no [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) da Application. Use Image Processor para entregar uma imagem em vários tamanhos, recortes, qualidades ou formatos, como WEBP para os navegadores que o aceitam, sem um arquivo por variante. --- +## Caminho da requisição + +Uma query string `ims` não transforma uma imagem por si só: antes, uma regra com o behavior [Optimize Images](/pt-br/documentacao/plataforma/applications/rules-engine/#optimize-images) precisa corresponder à requisição. Ativar Image Processor em uma Application apenas disponibiliza esse behavior para as regras dela. + +As setas sólidas levam a requisição, e as setas pontilhadas levam a resposta. Cada rótulo começa com o número do seu passo abaixo. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Cliente"]) + App["Application"] + Cache["Cache"] + IP["Image Processor"] + Origin[["servidor de origem"]] + Client -->|"1. requisição por uma imagem"| App + App -.->|"2. sem regra: imagem sem processamento"| Client + App -->|"3. cache setting"| Cache + Cache -.->|"4. imagem derivada em cache"| App + App -->|"5. sem cópia em cache"| IP + IP -->|"5. requisição da imagem de origem"| Origin + Origin -.->|"5. imagem de origem"| IP + IP -.->|"5. imagem derivada"| App + App -.->|"4, 5. imagem derivada"| Client +``` + +1. Uma requisição para um path que contém uma imagem chega à Application, que executa as suas regras da Request Phase. Uma regra para imagens compara `${uri}`, ou `${request_uri}` com [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) ativo, com um argumento como `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. +2. Quando nenhuma regra com _Optimize Images_ corresponde à requisição, a imagem de origem é entregue sem processamento, mesmo quando a requisição carrega `ims`. +3. Uma regra que corresponde à requisição aplica os seus behaviors. _Optimize Images_ marca a requisição para Image Processor. Quando a regra também carrega _Set Cache Policy_, esse behavior aplica o [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) que guarda a imagem derivada. Uma regra pode carregar _Optimize Images_ sozinho, porque o behavior não recebe argumento. +4. Quando a imagem derivada já está em cache, [Cache](/pt-br/documentacao/plataforma/applications/cache/) a entrega sem processamento. +5. Caso contrário, Image Processor lê a imagem de origem a partir da origem e aplica a query string `ims` a ela. A imagem derivada é entregue. O cache da Application só a armazena quando a regra aplica um cache setting com _Set Cache Policy_. Sem esse cache setting, toda requisição chega ao Image Processor, que responde a uma transformação repetida a partir do próprio cache. + +Quando uma regra com _Optimize Images_ corresponde a um path que não retorna uma imagem, a requisição falha com um `400` vazio, então os critérios da regra precisam corresponder somente a paths de imagem. Para criar essa regra passo a passo, consulte [Configure Image Processor em uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/processar-imagens/). + +Para saber como o formato entregue é escolhido, como o cache diferencia as imagens derivadas e onde Image Processor para, consulte [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/). + +--- + ## Estrutura da regra -Image Processor age por meio de uma regra da Request Phase que carrega o behavior _Optimize Images_. Esta regra entrega ao Image Processor cada requisição por um path de imagem e aplica o cache setting que armazena cada imagem derivada. Ela é enviada como corpo de `POST /v4/workspace/applications//request_rules`: +Image Processor age por meio de uma regra da Request Phase que carrega o behavior _Optimize Images_. Para processar cada requisição por um path de imagem e armazenar em cache cada imagem derivada, envie esta regra como corpo de `POST /v4/workspace/applications//request_rules`: ```json { @@ -45,56 +82,25 @@ Image Processor age por meio de uma regra da Request Phase que carrega o behavio } ``` -- `criteria` compara o path com uma lista de extensões de imagem por meio de `matches`. `${request_uri}` exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/), e `${uri}` corresponde aos mesmos paths sem ele. -- `optimize_images` não recebe atributos e marca a requisição para Image Processor. Ele exige Image Processor ativo na aplicação que executa a regra. -- `set_cache_policy` nomeia o cache setting que armazena cada imagem derivada. Com `ims` na allowlist do controle **Cache vary by Query String** desse setting, cada string `ims` distinta recebe uma cache key própria. Esse controle exige Application Accelerator. +- `criteria` compara o path com uma lista de extensões de imagem por meio de `matches`. `${request_uri}` exige Application Accelerator, e `${uri}` corresponde aos mesmos paths sem ele. +- `optimize_images` não recebe atributos e marca a requisição para Image Processor. Ele exige Image Processor ativo na Application que executa a regra. +- `set_cache_policy` aplica o cache setting cujo ID está em `attributes.value`, e esse cache setting armazena cada imagem derivada. Com `ims` nos `fields` da allowlist `cache_vary_by_querystring` dele, cada string `ims` distinta recebe uma cache key própria. Esse campo pertence ao Application Accelerator, então exige Application Accelerator ativo. - Cada requisição então carrega a sua transformação na URL, como `?ims=400x`. Uma resposta processada carrega `x-ims: Enabled`, e `x-original-image-size` carrega o tamanho da imagem de origem antes da transformação. --- -## Caminho da requisição - -Uma transformação não acontece porque uma query string `ims` está presente. Ela acontece porque uma regra da Request Phase foi executada e aplicou o behavior [Optimize Images](/pt-br/documentacao/plataforma/applications/rules-engine/#optimize-images) à requisição. Ativar Image Processor disponibiliza esse behavior, e ele não processa nada sozinho. - -Este diagrama mostra a cadeia, de uma requisição por uma imagem até a imagem derivada: - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Request["Uma requisição por uma imagem"] --> Rules{"Uma regra da Request Phase com Optimize Images corresponde à requisição?"} - Rules -->|"Não"| Unprocessed["A imagem de origem é entregue sem processamento"] - Rules -->|"Sim"| Optimize["Optimize Images marca a requisição, e Set Cache Policy, quando presente, aplica um cache setting"] - Optimize --> Cached{"Esta imagem derivada já está em cache?"} - Cached -->|"Sim"| Hit["A imagem derivada em cache é entregue"] - Cached -->|"Não"| Origin["A imagem de origem é lida a partir da origem"] - Origin --> Apply["A query string ims é aplicada à imagem de origem"] - Apply --> Store["A imagem derivada é entregue e armazenada em cache"] -``` - -1. Uma requisição chega para um path que contém uma imagem. -2. A aplicação executa as suas regras da Request Phase. Uma regra para imagens compara `${uri}`, ou `${request_uri}` com Application Accelerator ativo, com um argumento como `\.(jpg|jpeg|gif|bmp|png|ico|webp|avif)`. -3. Uma regra que corresponde à requisição aplica os seus behaviors. _Optimize Images_ marca a requisição para Image Processor, e _Set Cache Policy_, quando a regra o carrega, escolhe o cache setting que guarda a imagem derivada. Uma regra pode carregar _Optimize Images_ sozinho, porque o behavior não recebe argumento. -4. Quando a imagem derivada já está em cache, o cache a entrega, e nenhum processamento acontece. -5. Caso contrário, a imagem de origem é lida a partir da origem, a query string `ims` é aplicada a ela, e o resultado é entregue e armazenado. - -Duas consequências decorrem do passo 2, e as duas surpreendem quem espera que a query string sozinha faça o trabalho. Uma requisição que não corresponde a nenhuma regra é entregue sem processamento, mesmo quando carrega `ims`. Quando uma regra corresponde a um path sem nenhuma imagem, ela é executada mesmo assim, então são os critérios que decidem quais requisições chegam ao Image Processor. Para a regra que envia requisições de imagens ao Image Processor, consulte [Configure Image Processor em uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/processar-imagens/). - -Para saber como o formato entregue é escolhido, como o cache diferencia as imagens derivadas e onde Image Processor para, consulte [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/). - ---- - ## Escopo e limites -- **Aplicação**: Image Processor vem desativado em uma aplicação nova, e ativá-lo não processa nada por si só. O toggle dele em [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#produtos) › **Modules** define `modules.image_processor.enabled`, e uma regra com _Optimize Images_ decide quais requisições chegam a ele. +- **Application**: Image Processor vem desativado em uma Application nova, e cada Application o ativa separadamente, no seu campo `modules.image_processor.enabled` na API. Mesmo ativo, Image Processor processa somente as requisições às quais uma regra com _Optimize Images_ corresponde. [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) mostra onde ativá-lo no Azion Console e na API. - **Operações**: uma string `ims` pode carregar um redimensionamento, um recorte e uma cadeia de filtros. As operações são redimensionamento, recorte, rotação, qualidade, marca d'água, conversão de formato e preenchimento, e `fit-in` encaixa uma imagem em uma área sem ampliá-la. Para a sintaxe e os valores que cada uma aceita, consulte [Parâmetros de URL](/pt-br/documentacao/plataforma/applications/image-processor/parametros-de-url/). -- **Posição do parâmetro**: `ims` precisa ser o último parâmetro da URL. Uma requisição com outro parâmetro de query string depois dele pode retornar `504`. -- **Formatos**: Image Processor lê JPEG, GIF, PNG, BMP, ICO, WEBP e AVIF. Sem nenhum parâmetro `ims`, ele converte uma imagem para WEBP para um browser que aceita o formato, e uma imagem BMP para JPEG ou WEBP. Uma conversão para WEBP ou AVIF que um filtro pede exige `Accept: image/webp` ou `Accept: image/avif`, que o behavior _Add Request Header_ pode acrescentar. Para saber como o formato entregue é escolhido, consulte [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/#negociacao-de-formato). -- **Cache**: quando `ims` está na allowlist do cache setting, cada string `ims` distinta é um objeto armazenado separado. Uma página que pede quatro larguras fixas armazena quatro objetos, enquanto uma página que pede larguras arbitrárias armazena um por largura. Quando uma imagem derivada já está em cache, ela é entregue sem processamento. Para as práticas, consulte [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#image-processor). -- **Armazenamento**: Image Processor não armazena imagens e não aceita uploads. A imagem de origem permanece onde já está, e nenhuma imagem derivada se torna um ativo da conta. Um workflow que precisa manter um arquivo transformado salva a resposta por conta própria. -- **Produtos vizinhos**: [WASM Image Processor](/pt-br/documentacao/devtools/azion-lib/wasm-image-processor/) é uma biblioteca WebAssembly que processa imagens dentro de uma função em [Functions](/pt-br/documentacao/plataforma/functions/). É uma superfície diferente, com uma interface diferente, e nenhuma configuração do Image Processor a configura. -- **Interfaces**: você ativa Image Processor na aba **Main Settings** de uma aplicação no [Azion Console](https://console.azion.com) e pela [Azion API](https://api.azion.com/) em `/v4/workspace/applications/`. [Azion CLI](/pt-br/documentacao/devtools/cli/) o define com `--image-processor` em `azion create application` ou `azion update application`. [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) e [Azion Lib](/pt-br/documentacao/devtools/azion-lib/) o definem com `imageProcessorEnabled`. Para cada campo, flag, behavior e header, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/). -- **Observabilidade**: [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) tem uma aba **Image Processor** com gráficos de requisições, e [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) tem um dataset **Image Processor**, que exige Image Processor ativo. -- **Limites**: uma imagem aceita até 150 MB, 3840 pixels de largura e 2160 pixels de altura. Para cada limite e o que cada plano inclui, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#image-processor) e, para os valores, [Preços](/pt-br/documentacao/fundamentos/precos/#image-processor). +- **Posição do parâmetro**: `ims` pode ficar em qualquer posição da query string. Um valor de `ims` que Image Processor não consegue interpretar retorna a imagem de origem sem transformação. +- **Formatos**: Image Processor lê JPEG, GIF, PNG, BMP, ICO, WEBP e AVIF. Mesmo sem nenhum parâmetro `ims`, ele pode converter uma imagem para um formato que o navegador aceita, como WEBP ou AVIF, e converte uma imagem BMP para JPEG ou WEBP. Um filtro `filters:format()` retorna o formato que ele nomeia, qualquer que seja o header `Accept` da requisição. Para saber como o formato entregue é escolhido, consulte [Entrega de imagens](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/#negociacao-de-formato). +- **Cache**: quando `ims` está na allowlist do cache setting, cada string `ims` distinta, em cada formato entregue, é um objeto armazenado separado. Uma página que pede quatro larguras fixas armazena quatro objetos por formato entregue, enquanto uma página que pede larguras arbitrárias armazena um por largura e formato. Quando uma imagem derivada já está em cache, ela é entregue sem processamento. Para as práticas, consulte [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#image-processor). +- **Armazenamento**: Image Processor retorna cada imagem derivada sem salvá-la como um ativo da conta, e não é possível fazer upload de imagens para Image Processor. O cache guarda as imagens derivadas, e a imagem de origem permanece onde já está. Um workflow que precisa manter um arquivo transformado salva a resposta por conta própria. +- **Vizinhos**: [WASM Image Processor](/pt-br/documentacao/devtools/azion-lib/wasm-image-processor/) é uma biblioteca WebAssembly que processa imagens dentro de uma [Function](/pt-br/documentacao/plataforma/functions/). Ela é executada no código dessa Function, separada do recurso da plataforma Image Processor e das configurações dele. +- **Interfaces**: você ativa Image Processor na aba **Main Settings** de uma Application no [Azion Console](https://console.azion.com) e pela [Azion API](https://api.azion.com/) em `/v4/workspace/applications/`. [Azion CLI](/pt-br/documentacao/devtools/cli/) o define com `--image-processor` em `azion create application` ou `azion update application`. [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/) e [Azion Lib](/pt-br/documentacao/devtools/azion-lib/) o definem com `imageProcessorEnabled`. Para cada campo, flag, behavior e header, consulte [Configurações do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/). +- **Observabilidade**: no Azion Console, [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) tem uma aba **Image Processor** com gráficos de requisições, e [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) tem um dataset **Image Processor**, que exige Image Processor ativo. +- **Limites**: uma imagem aceita até 150 MB, 3840 pixels de largura e 2160 pixels de altura. Para cada limite, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#image-processor) e, para os valores, consulte [Preços](/pt-br/documentacao/fundamentos/precos/#image-processor). A página [Preços da Azion](https://www.azion.com/pt-br/precos/) lista o que cada plano inclui. - **Termos**: o [glossário de Applications](/pt-br/documentacao/plataforma/applications/glossario/) define as palavras às quais as páginas do Image Processor dão um significado específico, como imagem derivada, imagem de origem, recorte automático e `fit-in`. --- @@ -102,10 +108,10 @@ Para saber como o formato entregue é escolhido, como o cache diferencia as imag ## Próximos passos - + - + diff --git a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-e-operar-sites-de-marketing.mdx b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-e-operar-sites-de-marketing.mdx index d2b2660369..ef42aea217 100644 --- a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-e-operar-sites-de-marketing.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-e-operar-sites-de-marketing.mdx @@ -134,7 +134,7 @@ sequenceDiagram | Métrica | Onde ler | Como fica quando funciona | | --- | --- | --- | | Time to first byte para visitantes em todas as regiões | O campo `ttfb` das medições do Edge Pulse, feitas nos navegadores dos visitantes por uma tag que as páginas do site carregam. Consulte [Primeiros passos com Edge Pulse](/pt-br/documentacao/plataforma/edge-pulse/primeiros-passos/) | Baixo e comparável entre regiões, porque cada página é um arquivo pré-construído em cache | -| Tempo entre uma mudança de conteúdo e a página atualizada no ar | O horário de cada commit no GitHub, comparado ao histórico de purges do **Real-Time Purge**, que lista cada purge quando ele termina. Consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#confirmacao) | O purge depois de cada push termina, e nenhuma página espera o Max Age dela expirar | +| Tempo entre uma mudança de conteúdo e a página atualizada no ar | O horário de cada commit no GitHub, comparado ao histórico de purges do **Real-Time Purge**, que lista cada purge quando ele termina. Consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#fila-e-historico-de-purges) | O purge depois de cada push termina, e nenhuma página espera o Max Age dela expirar | | Parcela das requisições respondidas pelo cache | **Requests Offloaded** no Real-Time Metrics, filtrado pelo domínio do site. Consulte [Meça o offload de cache de um domínio](/pt-br/documentacao/guias/plataforma/observabilidade/medir-offload-de-cache/) | Alta entre deploys, com uma queda curta depois de cada purge. Um miss lê o bucket, nunca um servidor que o time opera | --- diff --git a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce.mdx b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce.mdx index 8db4aa744e..63f25ae9df 100644 --- a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce.mdx @@ -160,7 +160,7 @@ A Azion aceita 2.000 requisições de purge por wildcard em um intervalo de 24 h | --- | --- | --- | | Parcela das requisições de catálogo que nunca chega à loja | **Requests Offloaded** no Real-Time Metrics, filtrado pelo domínio da loja. Consulte [Meça o offload de cache de um domínio](/pt-br/documentacao/guias/plataforma/observabilidade/medir-offload-de-cache/) | Sobe depois que a regra de catálogo se propaga e se mantém durante picos de tráfego | | Time to first byte nas páginas de catálogo e de produto | O campo `ttfb` das medições do Edge Pulse, feitas nos navegadores dos visitantes. Consulte [Primeiros passos com Edge Pulse](/pt-br/documentacao/plataforma/edge-pulse/primeiros-passos/) | Menor nas páginas de catálogo do que nas páginas de carrinho e checkout, em todas as regiões | -| Tempo entre uma mudança de preço ou estoque e a página atualizada no ar | O histórico de purges do **Real-Time Purge** no Azion Console, que lista cada purge quando ele termina. Consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#confirmacao) | Cada purge termina, e nenhuma página de produto espera o **Max Age** de 600 segundos expirar | +| Tempo entre uma mudança de preço ou estoque e a página atualizada no ar | O histórico de purges do **Real-Time Purge** no Azion Console, que lista cada purge quando ele termina. Consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#fila-e-historico-de-purges) | Cada purge termina, e nenhuma página de produto espera o **Max Age** de 600 segundos expirar | --- @@ -169,7 +169,7 @@ A Azion aceita 2.000 requisições de purge por wildcard em um intervalo de 24 h - **Exclua sessões com um critério, não com variação por cookie.** Variar a chave de cache do catálogo por `session_id` guarda uma cópia por visitante, porque o cookie é único por visitante. O critério `does not exist` mantém uma única cópia compartilhada para todo visitante sem sessão. Para a variação por cookie e o custo dela, consulte [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/). - **Nunca coloque Forward Cookies em uma regra que guarda em cache.** Em uma resposta em cache, **Forward Cookies** pode entregar a um visitante o `Set-Cookie` da sessão de outro visitante. Nesta página, ele fica só na regra de bypass, onde nada é guardado em cache. - **Purgue na mudança em vez de encurtar o Max Age.** Um **Max Age** curto envia mais requisições de catálogo para a loja e ainda deixa uma janela de conteúdo desatualizado. O purge atualiza a página quando ela muda, e o **Max Age** fica como limite de segurança para um purge não enviado. -- **Use Bypass Cache para o carrinho, não um Max Age de 0.** Um **Max Age** de `0` junta requisições simultâneas para um mesmo caminho em uma única requisição à origem, e dois visitantes que carregam os carrinhos no mesmo momento precisam de respostas diferentes. Para a diferença entre os dois, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). +- **Use Bypass Cache para o carrinho.** Para a diferença entre **Bypass Cache** e um **Max Age** de `0`, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/entregar-midia-e-streaming/entregar-uma-biblioteca-de-videos-sob-demanda.mdx b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/entregar-midia-e-streaming/entregar-uma-biblioteca-de-videos-sob-demanda.mdx index 787fd42ea9..332778a752 100644 --- a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/entregar-midia-e-streaming/entregar-uma-biblioteca-de-videos-sob-demanda.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/entregar-midia-e-streaming/entregar-uma-biblioteca-de-videos-sob-demanda.mdx @@ -89,7 +89,7 @@ O upload só se move quando um título é adicionado ou recodificado: a bibliote - **Object Storage**: guarda a biblioteca, toda playlist e todo segmento sob um prefixo de um bucket. O bucket dá à plataforma acesso somente leitura, e a equipe escreve nele pela API ou pelo protocolo S3. - **aplicação**: o Platform Resource que entrega a biblioteca. Um connector para o bucket e uma regra com _Set Connector_ fazem do bucket a fonte dela, e regras por extensão de arquivo aplicam uma cache setting a cada tipo de arquivo. - **Cache**: mantém os segmentos e as playlists perto dos espectadores. Um segmento sob a key dele nunca muda, então pode ficar em cache por muito tempo, enquanto uma playlist que pode ser reescrita recebe um Max Age menor. -- **Tiered Cache**: a Feature que adiciona uma segunda camada de cache, compartilhada por todos os data centers, entre Cache e o bucket. Ela concentra os misses de todos os data centers, então o bucket é lido raramente para cada segmento. +- **Tiered Cache**: a Feature que adiciona uma segunda camada de cache entre Cache e o bucket, na região que a topologia da cache setting seleciona. Um segmento ausente em um data center é respondido por essa camada quando ela tem uma cópia válida, então menos leituras chegam ao bucket. - **Functions**: validam um token de acesso antes que um título pago saia do bucket, uma opção de design para conteúdo restrito. Uma requisição sem um token válido nunca lê o bucket. - **Real-Time Metrics**: informa as requisições e os dados que Cache e a camada do Tiered Cache responderam, filtrados pelo hostname da biblioteca. diff --git a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn.mdx b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn.mdx index 89bb2e7330..46f171c209 100644 --- a/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn.mdx @@ -18,7 +18,7 @@ Este caso de uso não cobre a saída do site da sua origem, o failover entre ori - Uma conta Azion. Se você ainda não tem uma, [crie uma conta](https://console.azion.com/signup). - Uma aplicação que serve o seu site por meio de um connector e de um workload, com uma regra cujo behavior **Set Connector** envia todas as requisições ao connector. Para criá-los, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -- Application Accelerator nessa aplicação, que o behavior **Bypass Cache** e os métodos `POST`, `PUT`, `PATCH`, `DELETE` e `OPTIONS` da API exigem. Para ativá-lo, consulte [Ative Application Accelerator](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#ative-application-accelerator). +- Application Accelerator nessa aplicação, que o behavior **Bypass Cache** exige. Para ativá-lo, consulte [Ative Application Accelerator](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#ative-application-accelerator). - Acesso ao firewall na frente da sua origem, onde fica a allowlist. --- @@ -78,7 +78,7 @@ flowchart TD 1. Edge DNS resolve `www.example.com` para o workload, e a requisição do usuário chega à aplicação em um data center próximo. 2. As regras da aplicação leem o caminho na Request Phase e aplicam uma cache setting: `static-files` a um arquivo de `/static/`, `pages` a uma página. Uma cópia válida no cache do data center responde a requisição pela aplicação, e a origem não é consultada. -3. Em um miss de um arquivo estático, o data center consulta a camada do Tiered Cache, que é compartilhada por todos os data centers e guarda objetos por mais tempo. Uma cópia ali responde a requisição sem chegar à origem, e o Cache a guarda no caminho de volta. +3. Em um miss de um arquivo estático, o data center consulta a camada do Tiered Cache, na região que a topologia da cache setting seleciona. Uma cópia ali responde a requisição sem chegar à origem, e o Cache a guarda no caminho de volta. 4. Uma chamada de `/api/` faz bypass do cache e chega à origem pelo connector `site-origin`, com todos os métodos HTTP, e a resposta dela não é guardada. Qualquer outro miss também chega à origem por `site-origin`. No caminho de volta, a camada do Tiered Cache mantém um arquivo estático, e o Cache guarda o arquivo ou a página para a requisição seguinte. 5. O connector chega à origem a partir de um endereço da lista `Azion Origin Shield`, e o firewall da origem recusa todas as outras fontes. 6. Quando um deploy muda arquivos estáticos, um purge por cache key os remove antes que o seu TTL termine, primeiro da camada do Tiered Cache e depois do Cache, e a requisição seguinte busca a nova versão. Um purge por cache key é o único tipo que chega à camada do Tiered Cache. @@ -91,7 +91,7 @@ Toda resposta volta pela aplicação, que a entrega ao usuário. - **aplicação**: o Platform Resource que guarda as cache settings `static-files` e `pages` e as regras que as aplicam, caminho por caminho, ao lado da regra que faz bypass do cache em `/api/`. - **Application Accelerator**: o Product que o behavior **Bypass Cache** exige, para que a aplicação envie cada chamada em `/api/` à origem sem guardar a resposta. - **Cache**: guarda as respostas no data center que as buscou e responde às requisições repetidas com a cópia, pelo TTL da cache setting. -- **Tiered Cache**: a Feature que adiciona uma segunda camada de cache entre o Cache e a origem, na região que a sua topologia nomeia. Ela exige _Override cache behavior_ e um **Max Age** de pelo menos 3 segundos, e nesta página cobre só os arquivos estáticos. +- **Tiered Cache**: a Feature que adiciona uma segunda camada de cache entre o Cache e a origem, na região que a sua topologia nomeia. Ela exige _Override cache behavior_ e, com Application Accelerator ativo, um **Max Age** de pelo menos 3 segundos, e nesta página cobre só os arquivos estáticos. - **connector**: o Platform Resource que chega à origem em um miss em todas as camadas de cache e em todas as chamadas de API. Nesta página, é `site-origin`. - **Origin Shield**: com Origin IP ACL no connector, o próprio firewall da origem permite os prefixos da lista `Azion Origin Shield` e recusa todas as outras fontes. - **Real-Time Purge**: o Platform Resource que remove do cache o conteúdo alterado antes que o seu TTL termine. @@ -113,7 +113,7 @@ Cada requisição chega ao data center da Azion com a melhor rota até o visitan O cache deste site são duas cache settings, uma por tipo de conteúdo, cada uma aplicada pela sua própria regra. Os arquivos estáticos só mudam quando você faz deploy, então ficam em cache por muito tempo e passam pelo Tiered Cache. As páginas mudam entre deploys, então ficam em cache por pouco tempo. -A setting `static-files` usa _Override cache behavior_ com um **Max Age** de `86400` segundos, um dia. O purge no deploy remove um arquivo alterado no momento do deploy, então o dia só limita quanto tempo um arquivo fica desatualizado quando um purge não é enviado. **Tiered Cache** fica ativo, com a região mais próxima como topologia: o Tiered Cache foi projetado para objetos que ficam em cache por muito tempo, e exige _Override cache behavior_. O cache do navegador respeita o `Cache-Control` que a origem envia para cada arquivo. +A setting `static-files` usa _Override cache behavior_ com um **Max Age** de `86400` segundos, um dia. O purge no deploy remove um arquivo alterado no momento do deploy, então o dia só limita quanto tempo um arquivo fica desatualizado quando um purge não é enviado. **Tiered Cache** fica ativo, com a região mais próxima como topologia, e exige _Override cache behavior_. O cache do navegador respeita o `Cache-Control` que a origem envia para cada arquivo. A setting `pages` usa um **Max Age** de `300` segundos, então uma página editada na origem chega aos usuários em até cinco minutos sem purge. O cache do navegador dela é sobrescrito para `0` segundos, porque uma cópia no navegador do usuário não pode ser purgada. Ela não tem Tiered Cache, porque um objeto de cinco minutos ganha pouco com uma segunda camada. @@ -121,7 +121,7 @@ As duas settings mantêm **Stale cache** ativo, como o Azion Console o define pa ### Repasse da API -As respostas da API são diferentes para cada chamador, então o caminho da API faz bypass do cache e todas as chamadas chegam à origem. A regra corresponde a `/api/` e carrega **Bypass Cache**. Application Accelerator, já ativo na aplicação, é o que faz a aplicação aceitar as chamadas `POST`, `PUT`, `PATCH`, `DELETE` e `OPTIONS` da API, além de `GET` e `HEAD`. Uma requisição com bypass mantém as otimizações de protocolo e, quando possível, uma conexão keep-alive com a origem, então cada chamada evita abrir uma nova conexão. +As respostas da API são diferentes para cada chamador, então o caminho da API faz bypass do cache e todas as chamadas chegam à origem. A regra corresponde a `/api/` e carrega **Bypass Cache**. Application Accelerator, já ativo na aplicação, é o que libera **Bypass Cache**. O caminho da API não tem cache setting com Tiered Cache, então nenhuma resposta dele vai parar na camada do Tiered Cache: **Bypass Cache** age no cache da Azion, e não nessa camada. @@ -173,9 +173,9 @@ Um purge por cache key aceita até 50 chaves por requisição, então um deploy ## Boas práticas -- **Mantenha o Tiered Cache desligado em qualquer caminho com bypass.** **Bypass Cache** age no cache da Azion, e não na camada do Tiered Cache, então um caminho cuja cache setting tem o Tiered Cache ativo continua respondendo dessa camada. Nesta página, o caminho `/api/` com bypass não tem nenhuma cache setting. Para o sintoma, consulte [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#cache). +- **Mantenha o Tiered Cache desligado em qualquer caminho com bypass.** **Bypass Cache** age no cache da Azion, e não na camada do Tiered Cache, então um caminho cuja cache setting tem o Tiered Cache ativo continua respondendo dessa camada. Nesta página, o caminho `/api/` com bypass não tem nenhuma cache setting. Para o sintoma, consulte [Solucione problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#cache). - **Purgue no deploy em vez de encurtar o Max Age.** Um **Max Age** curto envia mais requisições à origem e ainda deixa uma janela de conteúdo desatualizado. O deploy sabe quais arquivos mudaram, então ele os purga, e o **Max Age** fica como um limite de segurança. -- **Use Bypass Cache para a API, e não um Max Age de 0.** Um **Max Age** de `0` junta requisições simultâneas para um caminho em uma única requisição à origem, e dois chamadores de uma API precisam de duas respostas. Para a diferença, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). +- **Use Bypass Cache para a API.** Para a diferença entre **Bypass Cache** e um **Max Age** de `0`, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). - **Permita as duas famílias de endereços na origem.** A lista `Azion Origin Shield` traz prefixos IPv6 ao lado dos seus prefixos IPv4, e a Azion se conecta às origens pelas duas. Uma allowlist só com os prefixos IPv4 recusa as conexões que a Azion abre por IPv6. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/api-graphql/recursos/events-campos.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/api-graphql/recursos/events-campos.mdx index 26b0ad8b9f..f36acdeecf 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/api-graphql/recursos/events-campos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/api-graphql/recursos/events-campos.mdx @@ -378,7 +378,7 @@ A resposta contém cinco registros e é cortada aqui após o terceiro: | `host` | String | Host da requisição: o nome do host da linha de requisição, o header de requisição `Host` ou o nome do servidor que correspondeu à requisição. Exemplo: `hello.myhost.net` | | `proxyHost` | String | Nome do host para o qual a requisição é encaminhada por proxy. Exemplo: `storage.googleapis.com:443` | | `proxyStatus` | Int | Código de status HTTP de erro, ou da origem, quando o upstream não retorna resposta. Exemplo: `520`. Para uma resposta cacheada, o valor é `-`. | -| `proxyUpstream` | String | Endereço da origem (upstream). A segunda origem pode ser Image Processor, que processa a imagem antes que ela seja cacheada. Exemplo: `ims_http` | +| `proxyUpstream` | String | Endereço da origem (upstream). Quando Image Processor respondeu como o upstream, o campo assume o valor `ims_http`. | | `referenceError` | String | ID de referência da requisição, gerado quando o código de status é `4xx` ou `5xx`. Exemplo: `#AECFE66100000000C947B9B3B3BFBE46FFFFFFFF9401`. Também pode ser `-` | | `remoteAddr` | String | Endereço IP da origem que gerou a requisição. Exemplo: `127.0.0.1` | | `remotePort` | Int | Porta da origem que gerou a requisição. Exemplo: `8080` | diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/azion-edge-runtime/visao-geral/visao-geral-runtime.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/azion-edge-runtime/visao-geral/visao-geral-runtime.mdx index a4af7c509c..7d9fa88adb 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/azion-edge-runtime/visao-geral/visao-geral-runtime.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/azion-edge-runtime/visao-geral/visao-geral-runtime.mdx @@ -70,7 +70,7 @@ flowchart TD ``` 1. `azion build` executa o Azion Bundler, que empacota o seu código e resolve com polyfills, em tempo de build, as APIs do Node.js que ele chama. `azion deploy` publica o resultado como uma function. -2. Uma [instância de function](/pt-br/documentacao/plataforma/applications/functions-instances/#campos-da-instancia) coloca a function em uma aplicação. O campo `active` dela impede a instância de rodar sem excluí-la. A aplicação precisa ter **Functions** ativado na seção **Modules** das suas [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#produtos). +2. Uma [instância de function](/pt-br/documentacao/plataforma/applications/functions-instances/#campos-da-function-instance) coloca a function em uma aplicação. O campo `active` dela impede a instância de rodar sem excluí-la. A aplicação precisa ter **Functions** ativado na seção **Modules** das suas [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma). 3. Uma requisição chega, e uma regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) cujos critérios correspondem executa o seu comportamento **Run Function**, que nomeia a instância. 4. O Azion Runtime executa a function em um isolate, um contexto de execução do V8, no [data center que atende a requisição](/pt-br/documentacao/fundamentos/como-funciona/#infraestrutura-distribuida). 5. O runtime chama o handler, e o handler retorna um `Response`. Um trabalho passado para `ctx.waitUntil()` pode terminar depois que o handler retorna. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/azion-cli/configs/azion-config-js.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/azion-cli/configs/azion-config-js.mdx index 65e694c23d..5834c70b69 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/azion-cli/configs/azion-config-js.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/azion-cli/configs/azion-config-js.mdx @@ -524,6 +524,8 @@ Cada entrada do `deployments` de um workload define qual aplicação, firewall e | `strategy.attributes.firewall` | `string \| number \| null` | Não | O firewall, pelo nome ou ID. | | `strategy.attributes.customPage` | `string \| number \| null` | Não | A custom page, pelo nome ou ID. | +Com `azion deploy`, um deployment serve a Application que o deploy cria para o projeto, mesmo quando `strategy.attributes.application` traz o ID de outra Application. + ### customPages Cada entrada de `customPages` declara um conjunto de [custom pages](/pt-br/documentacao/plataforma/workloads/custom-pages/configuracoes/), as páginas que a Azion retorna no lugar de uma resposta de erro. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/glossary.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/glossary.mdx index 3e96a400bb..0b6a54d345 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/glossary.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/glossary.mdx @@ -14,7 +14,7 @@ Este glossário define os termos que a [Azion CLI](/pt-br/documentacao/devtools/ | Azion GitHub App | O GitHub App que conecta a sua conta do GitHub à sua conta Azion, para que você importe um repositório e faça o build, o deploy e a gestão dele como uma aplicação. [Gerencie o Azion GitHub App](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/azion-github-app/) descreve como gerenciar a conexão. | | `azion.config.js` | O arquivo de infraestrutura como código de um projeto, criado a partir das configurações padrão do preset dele e usado como a fonte da verdade da sua configuração. `azion link` o grava como `azion.config.cjs` e `azion sync --iac` como `azion.config.mjs` por padrão, o que `--extension` altera, e `azion deploy` lê o arquivo `.mjs` quando os dois existem, como [azion.config.js](/pt-br/documentacao/devtools/cli/azion-config-js/) descreve. | | `azion.json` | O arquivo na pasta `azion` de um projeto em que `azion deploy` grava o ID de cada recurso que cria. O próximo deploy lê esses IDs e atualiza os mesmos recursos em vez de criar novos, como [Azion CLI deploy](/pt-br/documentacao/devtools/cli/deploy/) descreve. | -| deployment do workload | O objeto que indica a aplicação, o firewall e o conjunto de custom pages que atendem o tráfego de um workload. Um workload guarda um deployment, que o `azion deploy` cria a partir da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`. | +| deployment do workload | O objeto que indica a aplicação, o firewall e o conjunto de custom pages que atendem o tráfego de um workload. Um workload guarda um deployment, que os comandos [`workload-deployment`](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/) criam e atualizam e que o `azion deploy` grava a partir da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`. | | exclusão em cascata | A flag `--cascade` de `azion delete application`, que exclui os recursos listados em `azion/azion.json` do diretório atual. Qualquer flag `--cascade`, inclusive `--cascade=false`, exclui esses recursos, então omita a flag para excluir somente a aplicação, como [Azion CLI application](/pt-br/documentacao/devtools/cli/recursos/application/#excluir) descreve. | | Git Scope | O campo obrigatório **Git Scope** no Azion Console que escolhe a conta do GitHub cujos repositórios você importa, com **Add GitHub Account** no fim da sua lista suspensa. O campo **Repository** fica desativado até você escolher um escopo, como [Importe um projeto do GitHub](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/importar-um-projeto-existente-do-github/) descreve. | | noun | A palavra do recurso em `azion `, como `application` em `azion create application`. [Comandos de recursos](/pt-br/documentacao/devtools/cli/recursos/) lista todos os nouns e os verbos que cada um recebe. | diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/application.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/application.mdx index 695dd008dc..f5069d89c5 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/application.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/application.mdx @@ -26,7 +26,7 @@ azion create application [flags] | --- | --- | --- | --- | --- | | `--active` | — | string | — | Ativa (`true`) ou desativa (`false`) a aplicação. | | `--application-accelerator` | — | string | — | Ativa (`true`) ou desativa (`false`) [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) na aplicação. | -| `--cache` | — | string | — | Ativa (`true`) ou desativa (`false`) [Cache](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) na aplicação. | +| `--cache` | — | string | — | Mantém [Cache](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) ativado (`true`) na aplicação. Cache não pode ser desativado, e `false` falha com `The cache cannot be false.` | | `--debug-enabled` | — | string | — | Aceita `true` ou `false`. Com `true`, você pode verificar se as regras do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) da aplicação foram executadas. | | `--file` | — | string | — | Caminho de um arquivo JSON com os atributos da aplicação. Use `-` para ler o JSON da entrada padrão. | | `--function` | — | string | — | Ativa (`true`) ou desativa (`false`) [Functions](/pt-br/documentacao/plataforma/functions/) na aplicação. | @@ -124,7 +124,7 @@ azion update application [flags] | `--active` | — | string | — | Ativa (`true`) ou desativa (`false`) a aplicação. | | `--application-accelerator` | — | string | — | Ativa (`true`) ou desativa (`false`) Application Accelerator na aplicação. | | `--application-id` | — | int | — | ID da aplicação a atualizar. Você pode omiti-lo quando o JSON de `--file` traz `"id"`. | -| `--cache` | — | string | — | Ativa (`true`) ou desativa (`false`) Cache na aplicação. | +| `--cache` | — | string | — | Mantém Cache ativado (`true`) na aplicação. Cache não pode ser desativado, e `false` falha com `The cache cannot be false.` | | `--debug-enabled` | — | string | — | Aceita `true` ou `false`. Com `true`, você pode verificar se as regras do Rules Engine da aplicação foram executadas. | | `--file` | — | string | — | Caminho de um arquivo JSON com os atributos a alterar. Use `-` para ler o JSON da entrada padrão. | | `--functions` | — | string | — | Ativa (`true`) ou desativa (`false`) Functions na aplicação. | diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/custom-pages.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/custom-pages.mdx index fbd1618efc..de51025739 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/custom-pages.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/custom-pages.mdx @@ -10,7 +10,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Os comandos `custom-pages` da Azion CLI criam, listam, descrevem, atualizam e excluem conjuntos de custom pages, o recurso [Custom Pages](/pt-br/documentacao/plataforma/workloads/custom-pages/configuracoes/) que substitui as respostas de erro de um workload por páginas servidas a partir de um connector. Esses comandos gerenciam o conjunto e não o atribuem a um workload: defina **Custom Page** nas configurações de deployment do workload no Azion Console ou indique o conjunto na entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`. As opções que todo comando aceita, como `--format`, `--out` e `-y`, estão em [Opções globais da Azion CLI](/pt-br/documentacao/devtools/cli/globals/). +Os comandos `custom-pages` da Azion CLI criam, listam, descrevem, atualizam e excluem conjuntos de custom pages, o recurso [Custom Pages](/pt-br/documentacao/plataforma/workloads/custom-pages/configuracoes/) que substitui as respostas de erro de um workload por páginas servidas a partir de um connector. Esses comandos gerenciam o conjunto e não o atribuem a um workload: defina **Custom Page** nas configurações de deployment do workload no Azion Console, rode o [`azion update workload-deployment`](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/#atualizar) com `--custom-page` ou indique o conjunto na entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`. O `azion update workload-deployment` só envia `--custom-page` junto com `--strategy-type`. Ele envia a estratégia como um objeto só, então passe também a aplicação e o firewall que o deployment indica. As opções que todo comando aceita, como `--format`, `--out` e `-y`, estão em [Opções globais da Azion CLI](/pt-br/documentacao/devtools/cli/globals/). --- @@ -223,6 +223,7 @@ Na atualização, o arquivo traz somente os campos a alterar, e os campos que el As opções que todo comando aceita, como `--format`, `--out` e `-y`. Os campos de um conjunto de custom pages, os códigos de status que ele pode substituir e como uma página obtém seu conteúdo de um connector. Os comandos que criam e gerenciam o connector que serve as páginas de um conjunto. + Os comandos que atribuem um conjunto de custom pages no deployment de um workload. A entrada `deployments` que atribui um conjunto de custom pages a um workload. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/firewall.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/firewall.mdx index 2f8fb53a26..8ac7e568c9 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/firewall.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/firewall.mdx @@ -10,7 +10,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Os comandos `firewall` da Azion CLI criam, listam, descrevem, atualizam e excluem firewalls. Um [firewall](/pt-br/documentacao/plataforma/firewall/) inspeciona as requisições de um workload antes da aplicação dele, e esses comandos ativam ou desativam WAF, Network Shield e Functions no firewall. Um firewall não inspeciona nenhuma requisição até que o deployment de um workload o indique: defina **Firewall** nas configurações de deployment do workload no Azion Console ou indique o firewall na entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js` e rode `azion deploy`. As opções que todo comando aceita, como `--format`, `--out` e `-y`, estão em [Opções globais](/pt-br/documentacao/devtools/cli/globals/). +Os comandos `firewall` da Azion CLI criam, listam, descrevem, atualizam e excluem firewalls. Um [firewall](/pt-br/documentacao/plataforma/firewall/) inspeciona as requisições de um workload antes da aplicação dele, e esses comandos ativam ou desativam WAF, Network Shield e Functions no firewall. Um firewall não inspeciona nenhuma requisição até que o deployment de um workload o indique: defina **Firewall** nas configurações de deployment do workload no Azion Console, rode o [`azion update workload-deployment`](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/#atualizar) com `--edge-firewall` ou indique o firewall na entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js` e rode `azion deploy`. O `azion update workload-deployment` só envia `--edge-firewall` junto com `--strategy-type`. Ele envia a estratégia como um objeto só, então passe também a aplicação e o conjunto de custom pages que o deployment indica. As opções que todo comando aceita, como `--format`, `--out` e `-y`, estão em [Opções globais](/pt-br/documentacao/devtools/cli/globals/). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/resources.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/resources.mdx index 998ba98a2b..9a16311a32 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/resources.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/resources.mdx @@ -43,6 +43,7 @@ Cada tabela marca com ✓ os verbos que um recurso recebe. O nome do recurso lev | Recurso | Criar | Listar | Descrever | Atualizar | Excluir | | --- | --- | --- | --- | --- | --- | | [`workload`](/pt-br/documentacao/devtools/cli/recursos/workload/) | ✓ | ✓ | ✓ | ✓ | ✓ | +| [`workload-deployment`](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/) | ✓ | ✓ | ✓ | ✓ | | ### Connectors diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/workload-deployment.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/workload-deployment.mdx new file mode 100644 index 0000000000..bec50ae20a --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/workload-deployment.mdx @@ -0,0 +1,186 @@ +--- +title: Azion CLI workload-deployment +description: Comandos da Azion CLI que criam, listam, descrevem e atualizam o deployment de um workload, o objeto que nomeia a aplicação, o firewall e as custom pages. +meta_tags: 'azion cli, azion create workload-deployment, azion list workload-deployment, azion update workload-deployment, deployment do workload, custom page, firewall' +namespace: documentation_cli_resource_workload_deployment +permalink: /documentacao/devtools/cli/recursos/workload-deployment/ +--- + +import FrameBox from '@aziontech/webkit/frame-box' +import ItemList from '@aziontech/webkit/item-list' +import DocItem from '@aziontech/webkit/doc-item' + +Os comandos `workload-deployment` da Azion CLI criam, listam, descrevem e atualizam o deployment de um [workload](/pt-br/documentacao/plataforma/workloads/). O deployment nomeia a aplicação que responde aos domínios do workload e, opcionalmente, o [firewall](/pt-br/documentacao/plataforma/firewall/) que inspeciona as requisições antes e o [conjunto de custom pages](/pt-br/documentacao/plataforma/workloads/custom-pages/configuracoes/) que substitui as respostas de erro. Um workload tem um deployment. A CLI não tem comando que exclui um deployment. As opções que todo comando aceita, como `--format`, `--out` e `-y`, estão em [Opções globais](/pt-br/documentacao/devtools/cli/globals/). Esta página corresponde à Azion CLI 4.24.0. + +--- + +## Criar + +`azion create workload-deployment` cria o deployment de um workload: + +```bash +azion create workload-deployment [flags] +``` + +| Flag | Curta | Tipo | Padrão | Descrição | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID do workload ao qual o deployment pertence. Sem ela, e sem `--file`, o comando pede o valor. | +| `--name` | — | string | — | Nome do deployment. Sem ela, e sem `--file`, o comando pede o valor. | +| `--application-id` | — | int | — | ID da aplicação que o deployment serve. Sem ela, e sem `--file`, o comando pede o valor. | +| `--firewall-id` | — | int | — | ID do firewall que inspeciona as requisições do workload. | +| `--custom-page` | — | string | — | ID do conjunto de custom pages que substitui as respostas de erro do workload. | +| `--strategy-type` | — | string | `default` | Tipo da estratégia do deployment. | +| `--active` | — | string | — | Se o deployment está ativo, `true` ou `false`. | +| `--current` | — | string | — | Se o deployment é o atual, `true` ou `false`. | +| `--file` | — | string | — | Caminho para um arquivo JSON com os atributos do deployment. Use `-` para ler o JSON da entrada padrão. Com `--file`, o comando não lê nenhuma outra flag de atributo. | + +Este comando cria um deployment para o workload com ID `1234` que serve a aplicação com ID `5678` e substitui as respostas de erro pelo conjunto de custom pages com ID `123`: + +```bash +azion create workload-deployment --workload-id 1234 --name my-deployment --application-id 5678 --custom-page 123 +``` + +O comando imprime o ID do deployment: + +```text +Created Workload Deployment with ID 4321 +``` + +--- + +## Listar + +`azion list workload-deployment` lista os deployments de um workload, 50 por página: + +```bash +azion list workload-deployment [flags] +``` + +| Flag | Curta | Tipo | Padrão | Descrição | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID do workload cujos deployments serão listados. Sem ela, o comando pede o valor. | +| `--details` | — | — | — | Adiciona as colunas `EDGE APPLICATION` e `EDGE FIREWALL` às colunas `ID` e `CURRENT`. | +| `--filter` | — | string | — | Nome pelo qual filtrar a lista. | +| `--order-by` | — | string | — | Campo pelo qual ordenar a lista. | +| `--page` | — | int | `1` | Número da página a retornar. | +| `--page-size` | — | int | `50` | Número de deployments em cada página. | + +Este comando lista o deployment do workload com ID `1234`, com a aplicação e o firewall que ele nomeia: + +```bash +azion list workload-deployment --workload-id 1234 --details +``` + +O comando imprime uma linha por deployment. `EDGE APPLICATION` e `EDGE FIREWALL` trazem IDs, e um `EDGE FIREWALL` igual a `0` indica que o deployment não nomeia firewall. A lista não tem coluna para o conjunto de custom pages; para vê-lo, use `azion describe workload-deployment --format json`. + +--- + +## Descrever + +`azion describe workload-deployment` imprime as configurações do deployment de um workload: + +```bash +azion describe workload-deployment [flags] +``` + +| Flag | Curta | Tipo | Padrão | Descrição | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID do workload. Sem ela, o comando pede o valor. | +| `--deployment-id` | — | int | — | ID do deployment a descrever. Sem ela, o comando pede o valor. | + +Este comando descreve o deployment com ID `4321` do workload com ID `1234`, em JSON: + +```bash +azion describe workload-deployment --workload-id 1234 --deployment-id 4321 --format json +``` + +Sem `--format json`, o comando imprime só o ID, a tag e o estado atual do deployment. + +--- + +## Atualizar + +`azion update workload-deployment` altera o nome, o estado ou a estratégia do deployment de um workload: + +```bash +azion update workload-deployment [flags] +``` + +| Flag | Curta | Tipo | Padrão | Descrição | +| --- | --- | --- | --- | --- | +| `--workload-id` | — | int | — | ID do workload. Sem ela, e sem `--file`, o comando pede o valor. | +| `--deployment-id` | — | int | — | ID do deployment a atualizar. Sem ela, e sem `--file`, o comando pede o valor. | +| `--name` | — | string | — | Novo nome do deployment. | +| `--active` | — | string | — | Se o deployment está ativo, `true` ou `false`. | +| `--current` | — | string | — | Se o deployment é o atual, `true` ou `false`. | +| `--strategy-type` | — | string | — | Tipo da estratégia do deployment. O comando envia `--edge-application`, `--edge-firewall` e `--custom-page` só quando esta flag está definida. | +| `--edge-application` | — | string | — | ID da aplicação que o deployment serve. | +| `--edge-firewall` | — | string | — | ID do firewall que inspeciona as requisições do workload. | +| `--custom-page` | — | string | — | ID do conjunto de custom pages que substitui as respostas de erro do workload. | +| `--file` | — | string | — | Caminho para um arquivo JSON com os atributos a alterar. Use `-` para ler o JSON da entrada padrão. Com `--file`, o comando não lê nenhuma outra flag de atributo e não pede os IDs, então passe `--workload-id` e `--deployment-id` junto com ela. | + +As flags que nomeiam a aplicação e o firewall são `--edge-application` e `--edge-firewall` aqui, e `--application-id` e `--firewall-id` no create. + +O comando envia a estratégia como um objeto só. Para trocar o conjunto de custom pages, passe `--strategy-type` e a aplicação e o firewall que o deployment já nomeia, como `azion list workload-deployment --details` os mostra. Este comando atribui o conjunto de custom pages com ID `123` e mantém a aplicação com ID `5678` e o firewall com ID `910`: + +```bash +azion update workload-deployment --workload-id 1234 --deployment-id 4321 --strategy-type default --edge-application 5678 --edge-firewall 910 --custom-page 123 +``` + +O comando imprime o ID do deployment atualizado: + +```text +Updated Workload Deployment with ID 4321 +``` + +--- + +## Usar um arquivo JSON + +`azion create workload-deployment` e `azion update workload-deployment` leem o deployment de um arquivo JSON com `--file`. Os IDs do workload e do deployment não fazem parte do arquivo: passe-os com `--workload-id` e, no update, `--deployment-id`. + +O arquivo traz os campos do deployment: + +- `name`, `active` e `current` descrevem o deployment. +- `strategy.type` é o tipo da estratégia, como `default`. +- `strategy.attributes` traz `application`, o ID da aplicação, e opcionalmente `firewall` e `custom_page`, os IDs do firewall e do conjunto de custom pages. + +Este arquivo cria um deployment atual e ativo que serve a aplicação com ID `5678` atrás do firewall com ID `910`, com o conjunto de custom pages com ID `123`: + +```json +{ + "name": "my-deployment", + "active": true, + "current": true, + "strategy": { + "type": "default", + "attributes": { + "application": 5678, + "firewall": 910, + "custom_page": 123 + } + } +} +``` + +Passe o arquivo para o comando create com o ID do workload: + +```bash +azion create workload-deployment --workload-id 1234 --file deployment.json +``` + +Para declarar o deployment em um projeto, use a entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js` e rode `azion deploy`. O `strategy.attributes.customPage` dela recebe o conjunto por nome ou por ID. Com o `azion deploy`, o deployment nomeia a aplicação que o deploy cria para o projeto, mesmo quando `strategy.attributes.application` traz o ID de outra aplicação. + +--- + +## Recursos relacionados + + + + As opções que todo comando aceita, como `--format`, `--out` e `-y`. + Os comandos que criam e gerenciam o workload ao qual um deployment pertence. + Os comandos que criam e gerenciam o conjunto de custom pages que um deployment nomeia. + Cada campo do deployment no Azion Console. + A entrada `deployments` que o `azion deploy` grava no workload. + + diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/workload.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/workload.mdx index ac4ff577a3..ee0628478c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/workload.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/cli/resources/workload.mdx @@ -10,7 +10,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Os comandos `workload` da Azion CLI criam, listam, descrevem, atualizam e excluem [Workloads](/pt-br/documentacao/plataforma/workloads/), o recurso que responde aos domínios de um site ou de uma API e guarda as configurações de TLS, mTLS e portas deles. A aplicação que responde a esses domínios é definida pelo deployment do workload: o `azion deploy` o cria a partir da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`, e no Azion Console você o define nas configurações de deployment do workload. As opções que todo comando aceita, como `--format`, `--out` e `-y`, estão em [Opções globais](/pt-br/documentacao/devtools/cli/globals/). +Os comandos `workload` da Azion CLI criam, listam, descrevem, atualizam e excluem [Workloads](/pt-br/documentacao/plataforma/workloads/), o recurso que responde aos domínios de um site ou de uma API e guarda as configurações de TLS, mTLS e portas deles. A aplicação que responde a esses domínios é definida pelo deployment do workload, que os comandos [`workload-deployment`](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/) criam e atualizam. O `azion deploy` também o grava a partir da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`, e no Azion Console você o define nas configurações de deployment do workload. As opções que todo comando aceita, como `--format`, `--out` e `-y`, estão em [Opções globais](/pt-br/documentacao/devtools/cli/globals/). --- @@ -233,6 +233,7 @@ Error: Failed to update the Workload: ["This account is not allowed to use the f As opções que todo comando aceita, como `--format`, `--out` e `-y`. O que um workload guarda e como ele coloca uma aplicação nos seus domínios. + Os comandos que criam e atualizam o deployment que indica a aplicação, o firewall e o conjunto de custom pages de um workload. A entrada `deployments` que indica a aplicação e o firewall que um workload usa. Os comandos que criam e gerenciam a aplicação que um deployment define. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/mcp/mcp-teste-cache.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/mcp/mcp-teste-cache.mdx index 7ddc17c1e7..5c2eb66d6e 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/mcp/mcp-teste-cache.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/mcp/mcp-teste-cache.mdx @@ -63,7 +63,7 @@ O header de requisição `Pragma: azion-debug-cache` faz a Azion adicionar os he curl -sI -H "Pragma: azion-debug-cache" https://www.example.com/ ``` -A resposta abaixo está cortada nos headers de cache. A página requisitada não está em cache, então todos os headers, exceto `x-cache-config`, `x-cache-id` e `x-cache-location`, trazem `-`: +A resposta abaixo está cortada nos headers de cache. A página requisitada não é armazenada, e a Application dela tem Application Accelerator ativo, então todos os headers, exceto `x-cache-config`, `x-cache-id` e `x-cache-location`, trazem `-`: ```text cache-control: max-age=0, no-cache, no-store @@ -79,7 +79,7 @@ x-cache-id: 0123456789abcdef0123456789abcdef x-cache-location: / ``` -Um `-` em `x-cache` significa que não há status: o conteúdo está impedido de ir para o cache. Para cada valor de status, como `HIT` e `MISS`, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). Sem `Pragma: azion-debug-cache`, a resposta não traz nenhum desses headers; dos headers da Azion, restam apenas `x-azion-request-id` e `x-azion-edge-location`. +Um `-` em `x-cache` significa que não há status: o conteúdo está impedido de ir para o cache. Com Application Accelerator desativado, a mesma resposta traz `MISS` em `x-cache`, a key dela em `x-cache-key` e `0` em `x-cache-expires-in`. Para cada valor de status, como `HIT` e `MISS`, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). Sem `Pragma: azion-debug-cache`, a resposta não traz nenhum desses headers; dos headers da Azion, restam apenas `x-azion-request-id` e `x-azion-edge-location`. Execute a mesma requisição duas vezes para ver se a segunda resposta vem do cache. Requisições consecutivas podem chegar a servidores diferentes, e `x-cache` nomeia o servidor que respondeu a cada uma. Depois, repita a requisição para um asset estático, com uma query string ou com um header `Cookie`, e compare `x-cache-key`. A key mostra quais parâmetros de query e quais cookies variam o cache. @@ -112,5 +112,5 @@ Quando uma cópia continua desatualizada, `x-cache-valid` e `x-cache-expire` mos - + diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/examples.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/examples.mdx index 08707bbd3a..61bbc07b66 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/examples.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/examples.mdx @@ -28,7 +28,7 @@ Estes recursos e data sources gerenciam workloads e os seus deployments. Para ma | Recurso | Descrição | | --- | --- | | [`azion_workload`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload) | Cria e gerencia um workload. | -| [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload_deployment) | Cria e gerencia um deployment de workload. | +| [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload_deployment) | Cria e gerencia um deployment de workload, que vincula ao workload uma aplicação e, opcionalmente, um firewall e uma custom page. | | Data source | Descrição | | --- | --- | @@ -37,23 +37,41 @@ Estes recursos e data sources gerenciam workloads e os seus deployments. Para ma | [`azion_workload_deployments`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/workload_deployments) | Lista deployments de workload. | | [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/workload_deployment) | Lê um deployment. | -Este bloco cria um workload e um deployment dele e, em seguida, consulta os workloads existentes: +Este bloco cria uma aplicação, um workload e um deployment que vincula a aplicação ao workload e, em seguida, consulta os workloads existentes: ```hcl +# Create the application that the deployment binds +resource "azion_application_main_setting" "app" { + application = { + name = "my-application" + active = true + } +} + # Create a workload resource "azion_workload" "example" { - name = "my-workload" - - application_id = azion_application_main_setting.app.id - - active = true + workload = { + name = "my-workload" + active = true + } } -# Create a deployment +# Deploy the application on the workload resource "azion_workload_deployment" "example" { - workload_id = azion_workload.example.id - - active = true + workload_id = azion_workload.example.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true + + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.app.application.application_id + } + } + } } # Query existing workloads @@ -75,16 +93,30 @@ Estes recursos e data sources gerenciam connectors, que ligam uma aplicação a | [`azion_connectors`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/connectors) | Lista connectors. | | [`azion_connector`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/connector) | Lê um connector. | -Este bloco cria um connector para uma origem HTTPS e, em seguida, consulta os connectors existentes: +Este bloco cria um connector do tipo `http` para uma origem HTTPS e, em seguida, consulta os connectors existentes: ```hcl # Create a connector resource "azion_connector" "example" { - name = "my-connector" - - origin = { - address = "origin.example.com" - protocol = "https" + connector = { + name = "my-connector" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + https_port = 443 + } + } + ] + connection_options = { + host = "origin.example.com" + transport_policy = "force_https" + } + } } } @@ -104,37 +136,53 @@ Estes recursos e data sources gerenciam aplicações e as suas configurações: | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_cache_setting) | Cria e gerencia uma configuração de cache. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_device_group) | Cria e gerencia um device group. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine) | Cria e gerencia uma regra do Rules Engine. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Cria e gerencia uma instância de function em uma aplicação. | +| [`azion_application_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine_order) | Define a ordem das regras do Rules Engine de uma fase. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Cria e gerencia uma instância de function em uma aplicação. | | Data source | Descrição | | --- | --- | -| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Consulta as configurações principais de aplicações. | +| [`azion_applications_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/applications_main_settings) | Lista as configurações principais de aplicações. | +| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Lê as configurações principais de uma aplicação. | | [`azion_application_cache_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_settings) | Lista configurações de cache. | | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_setting) | Lê uma configuração de cache. | | [`azion_application_device_groups`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_groups) | Lista device groups. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_group) | Lê um device group. | | [`azion_application_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rules_engine) | Lista regras do Rules Engine. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rule_engine) | Lê uma regra do Rules Engine. | -| [`azion_application_functions_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lista instâncias de function. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lê uma instância de function. | +| [`azion_application_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lista instâncias de function. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_function_instance) | Lê uma instância de function. | -Este bloco cria uma aplicação e uma configuração de cache que respeita a política de cache da origem: +Este bloco cria uma aplicação com o módulo de cache ativado e uma configuração de cache que respeita a política de cache da origem: ```hcl -# Create an Application +# Create an application resource "azion_application_main_setting" "app" { - name = "my-application" - - active = true + application = { + name = "my-application" + active = true + modules = { + cache = { + enabled = true + } + } + } } # Configure cache resource "azion_application_cache_setting" "cache" { - application_id = azion_application_main_setting.app.id - name = "cache-default" - - browser_cache_settings = "honor" - cdn_cache_settings = "honor" + application_id = azion_application_main_setting.app.application.application_id + + cache_setting = { + name = "cache-default" + browser_cache = { + behavior = "honor" + } + modules = { + cache = { + behavior = "honor" + } + } + } } ``` @@ -162,20 +210,24 @@ Este bloco cria uma zona e um registro `A` nela e, em seguida, consulta as zonas ```hcl # Create a DNS zone resource "azion_intelligent_dns_zone" "zone" { - name = "example.com" - domain = "example.com" - - active = true + zone = { + name = "example-zone" + domain = "example.com" + active = true + } } # Create a DNS record resource "azion_intelligent_dns_record" "www" { zone_id = azion_intelligent_dns_zone.zone.id - name = "www" - type = "A" - ttl = 3600 - - value = "192.0.2.1" + + record = { + name = "www" + type = "A" + rdata = ["192.0.2.1"] + policy = "simple" + ttl = 3600 + } } # Query existing DNS zones @@ -186,79 +238,138 @@ data "azion_intelligent_dns_zones" "all" {} ## Segurança -Estes recursos e data sources gerenciam firewalls, as suas regras do Rules Engine e instâncias de function, as configurações do Web Application Firewall (WAF) e network lists. Para mais informações, consulte [Recursos de segurança](/pt-br/documentacao/devtools/terraform/security/). +Estes recursos e data sources gerenciam firewalls, as suas regras do Rules Engine e instâncias de function, os rule sets e as exceções do Web Application Firewall (WAF) e network lists. Para mais informações, consulte [Recursos de segurança](/pt-br/documentacao/devtools/terraform/security/). | Recurso | Descrição | | --- | --- | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_main_setting) | Cria e gerencia as configurações principais de um firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine) | Cria e gerencia uma regra do Rules Engine de um firewall. | +| [`azion_firewall_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine_order) | Define a ordem das regras do Rules Engine de um firewall. | | [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_functions_instance) | Cria e gerencia uma instância de function em um firewall. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/network_list) | Cria e gerencia uma network list. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Cria e gerencia um WAF. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Cria e gerencia um rule set do WAF. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Cria e gerencia um WAF rule set. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Cria e gerencia uma exceção do WAF, que pertence ao rule set indicado no seu `waf_id`. | | Data source | Descrição | | --- | --- | | [`azion_firewall_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_settings) | Lista firewalls. | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_setting) | Lê um firewall. | -| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lista as regras do Rules Engine de firewalls. | +| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lista as regras do Rules Engine de um firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rule_engine) | Lê uma regra do Rules Engine de um firewall. | -| [`azion_firewall_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lista as instâncias de function de firewalls. | -| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lê uma instância de function de um firewall. | +| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lista as instâncias de function de um firewall. | +| [`azion_firewall_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_function_instance) | Lê uma instância de function de um firewall. | | [`azion_network_lists`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_lists) | Lista network lists. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_list) | Lê uma network list. | -| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lista WAFs. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Lê um WAF. | -| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lista rule sets do WAF. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Lê um rule set do WAF. | +| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lista WAF rule sets. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Lê um WAF rule set. | +| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lista as exceções de um WAF rule set. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Lê uma exceção do WAF. | -Este bloco cria um firewall no modo `waf` e uma network list com dois intervalos de IP: +Este bloco cria um firewall com o módulo WAF ativado, um WAF rule set e uma regra de firewall que aplica o rule set em modo de bloqueio a todas as requisições. Ele também cria uma network list com dois intervalos de IP: ```hcl -# Create a Firewall +# Create a firewall with the WAF module on resource "azion_firewall_main_setting" "firewall" { - name = "my-firewall" - - active = true - mode = "waf" + data = { + name = "my-firewall" + active = true + modules = { + waf = { + enabled = true + } + } + } } -# Create a Network List +# Create a WAF rule set +resource "azion_waf" "waf" { + result = { + name = "my-waf" + active = true + } +} + +# Apply the WAF to every request that reaches the firewall +resource "azion_firewall_rule_engine" "waf" { + firewall_id = azion_firewall_main_setting.firewall.data.id + + results = { + name = "Enable WAF" + active = true + behaviors = [ + { + behavior = { + type = "set_waf" + attributes = { + waf_id = azion_waf.waf.result.id + mode = "blocking" + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${request_uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } +} + +# Create a network list resource "azion_network_list" "allowlist" { - name = "allowlist-ips" - list_type = "ip_cidr" - - items = [ - "192.0.2.0/24", - "10.0.0.0/8" - ] + results = { + name = "allowlist-ips" + type = "ip_cidr" + items = [ + "192.0.2.0/24", + "198.51.100.0/24", + ] + } } ``` +O argumento `$${request_uri}` escapa o `$`, então o Terraform passa ao firewall a variável literal `${request_uri}` em vez de interpolá-la. + --- ## Certificados -Estes recursos e data sources gerenciam certificados digitais. Para mais informações, consulte [Recursos de certificados](/pt-br/documentacao/devtools/terraform/certificates/). +Estes recursos e data sources gerenciam certificados digitais, solicitações de certificado e listas de revogação de certificados (CRLs). Para mais informações, consulte [Recursos de certificados](/pt-br/documentacao/devtools/terraform/certificates/). | Recurso | Descrição | | --- | --- | | [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/digital_certificate) | Cria e gerencia um certificado digital. | +| [`azion_certificate_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_request) | Solicita um certificado a uma autoridade certificadora. | +| [`azion_certificate_signing_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_signing_request) | Cria uma solicitação de assinatura de certificado (CSR). | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/crl) | Cria e gerencia uma CRL. | | Data source | Descrição | | --- | --- | | [`azion_digital_certificates`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificates) | Lista certificados digitais. | | [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificate) | Lê um certificado digital. | +| [`azion_crls`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crls) | Lista CRLs. | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crl) | Lê uma CRL. | Este bloco cria um certificado a partir de um arquivo de certificado e de um arquivo de chave privada na pasta do módulo Terraform e, em seguida, consulta os certificados existentes: +{/* terraform-validate: skip — file() needs cert.pem and key.pem on disk; the block itself matches the 2.10.0 schema */} ```hcl # Create a certificate resource "azion_digital_certificate" "cert" { - name = "my-certificate" - - certificate = file("${path.module}/cert.pem") - private_key = file("${path.module}/key.pem") + results = { + name = "my-certificate" + certificate_content = file("${path.module}/cert.pem") + private_key = file("${path.module}/key.pem") + } } # Query existing certificates @@ -297,16 +408,49 @@ Este recurso e estes data sources gerenciam custom pages. Nenhuma página de ref --- +## Object Storage + +Este recurso e estes data sources gerenciam os buckets do [Object Storage](/pt-br/documentacao/plataforma/object-storage/). Nenhuma página de referência do provider cobre esses nomes. + +| Recurso | Descrição | +| --- | --- | +| [`azion_bucket`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/bucket) | Cria e gerencia um bucket. | + +| Data source | Descrição | +| --- | --- | +| [`azion_buckets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/buckets) | Lista buckets. | +| [`azion_bucket`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/bucket) | Lê um bucket. | + +--- + +## Data Stream + +Estes recursos e data sources gerenciam streams do [Data Stream](/pt-br/documentacao/plataforma/data-stream/) e os seus templates. Nenhuma página de referência do provider cobre esses nomes. + +| Recurso | Descrição | +| --- | --- | +| [`azion_data_stream`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/data_stream) | Cria e gerencia um data stream. | +| [`azion_data_stream_template`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/data_stream_template) | Cria e gerencia um template de data stream. | + +| Data source | Descrição | +| --- | --- | +| [`azion_data_streams`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_streams) | Lista data streams. | +| [`azion_data_stream`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_stream) | Lê um data stream. | +| [`azion_data_stream_templates`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_stream_templates) | Lista templates de data stream. | +| [`azion_data_stream_template`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/data_stream_template) | Lê um template de data stream. | + +--- + ## Exemplo completo -Esta configuração fixa o provider na versão 2.0.0 e cria uma aplicação com uma configuração de cache, um connector, um workload com um deployment e um firewall. Ela retorna como outputs os IDs da aplicação, do workload e do connector, e lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. +Esta configuração fixa o provider na versão 2.10.0 e cria uma aplicação com uma configuração de cache, um connector e uma regra que envia as requisições para ele, um firewall que aplica um WAF rule set e um workload com um deployment que vincula a aplicação e o firewall a ele. Ela retorna como outputs os IDs da aplicação, do workload e do connector, e lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -317,58 +461,187 @@ provider "azion" { # Application resource "azion_application_main_setting" "app" { - name = "my-application" - active = true + application = { + name = "my-application" + active = true + modules = { + cache = { + enabled = true + } + } + } } -# Cache Setting +# Cache setting resource "azion_application_cache_setting" "cache" { - application_id = azion_application_main_setting.app.id - name = "cache-default" - browser_cache_settings = "honor" - cdn_cache_settings = "honor" + application_id = azion_application_main_setting.app.application.application_id + + cache_setting = { + name = "cache-default" + browser_cache = { + behavior = "honor" + } + modules = { + cache = { + behavior = "honor" + } + } + } } # Connector resource "azion_connector" "origin" { - name = "my-origin" - origin = { - address = "origin.example.com" - protocol = "https" + connector = { + name = "my-origin" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + https_port = 443 + } + } + ] + connection_options = { + host = "origin.example.com" + transport_policy = "force_https" + } + } + } +} + +# Rule that sends every request to the connector +resource "azion_application_rule_engine" "origin" { + application_id = azion_application_main_setting.app.application.application_id + + results = { + name = "Send requests to the origin" + phase = "request" + active = true + behaviors = [ + { + behavior = { + type = "set_connector" + attributes = { + value = azion_connector.origin.connector.id + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } +} + +# Firewall with the WAF module on +resource "azion_firewall_main_setting" "firewall" { + data = { + name = "my-firewall" + active = true + modules = { + waf = { + enabled = true + } + } + } +} + +# WAF rule set +resource "azion_waf" "waf" { + result = { + name = "my-waf" + active = true + } +} + +# Firewall rule that applies the WAF +resource "azion_firewall_rule_engine" "waf" { + firewall_id = azion_firewall_main_setting.firewall.data.id + + results = { + name = "Enable WAF" + active = true + behaviors = [ + { + behavior = { + type = "set_waf" + attributes = { + waf_id = azion_waf.waf.result.id + mode = "blocking" + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${request_uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] } } # Workload resource "azion_workload" "main" { - name = "my-workload" - application_id = azion_application_main_setting.app.id - active = true + workload = { + name = "my-workload" + active = true + } } -# Workload Deployment +# Workload deployment resource "azion_workload_deployment" "main" { - workload_id = azion_workload.main.id - active = true -} - -# Firewall -resource "azion_firewall_main_setting" "firewall" { - name = "my-firewall" - active = true - mode = "waf" + workload_id = azion_workload.main.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true + + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.app.application.application_id + firewall = azion_firewall_main_setting.firewall.data.id + } + } + } } # Outputs output "application_id" { - value = azion_application_main_setting.app.id + value = azion_application_main_setting.app.application.application_id } output "workload_id" { - value = azion_workload.main.id + value = azion_workload.main.workload.id } output "connector_id" { - value = azion_connector.origin.id + value = azion_connector.origin.connector.id } ``` diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/best-practices.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/best-practices.mdx index cc418b5844..bd02f07e65 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/best-practices.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/best-practices.mdx @@ -13,7 +13,7 @@ import DocItem from '@aziontech/webkit/doc-item' Uma configuração do Terraform descreve uma infraestrutura que várias pessoas e pipelines alteram ao longo do tempo. Quando os arquivos seguem um único layout, o state fica em um único lugar compartilhado e o token fica fora do repositório, cada execução começa com a mesma visão da conta. Sem isso, dois applies podem gravar o mesmo state ao mesmo tempo, um token vaza junto com um commit e uma versão do provider chega a uma configuração que nunca a pediu. -Estas práticas se aplicam a configurações que usam o [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/) v2.0, que funciona apenas com a Azion API v4. +Estas práticas se aplicam a configurações que usam o [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/) v2, que funciona apenas com a Azion API v4. Os exemplos foram escritos para o provider 2.10.0. Na ordem, as práticas cobrem o layout de arquivos, os nomes dos recursos, o backend remoto e o seu lock, a variável sensível do token, o arquivo `.gitignore` e o token no ambiente. Em seguida, cobrem módulos, o pipeline de CI/CD, a versão do provider, outputs, referências entre recursos, comentários e arquivos README de módulos. @@ -55,19 +55,23 @@ Para verificar, confirme que cada arquivo contém apenas os blocos que o seu nom ## Nomeie cada recurso pelo que ele atende -O Terraform identifica um recurso pelo seu tipo e pelo seu nome local, como em `azion_workload.api_gateway`, e o `terraform state show` e todas as referências usam esse endereço. Um nome local como `w1` não diz a ninguém qual workload ele é. Um nome local como `api_gateway`, com um argumento `name` como `api-gateway-prod`, diz o que o workload atende e em qual ambiente. O custo é uma convenção de nomes que a equipe combina e mantém. +O Terraform identifica um recurso pelo seu tipo e pelo seu nome local, como em `azion_workload.api_gateway`, e o `terraform state show` e todas as referências usam esse endereço. Um nome local como `w1` não diz a ninguém qual workload ele é. Um nome local como `api_gateway`, com um `name` como `api-gateway-prod` no seu bloco `workload`, diz o que o workload atende e em qual ambiente. O custo é uma convenção de nomes que a equipe combina e mantém. O primeiro bloco mostra o nome a evitar, e o segundo, o nome a usar: ```hcl # Avoid: the names say nothing about the workload resource "azion_workload" "w1" { - name = "w1" + workload = { + name = "w1" + } } # Use: the names say what the workload serves and where resource "azion_workload" "api_gateway" { - name = "api-gateway-prod" + workload = { + name = "api-gateway-prod" + } } ``` @@ -175,16 +179,19 @@ variable "environment" { } resource "azion_workload" "this" { - name = "${var.name}-${var.environment}" + workload = { + name = "${var.name}-${var.environment}" + } } output "workload_id" { - value = azion_workload.this.id + value = azion_workload.this.workload.id } ``` O `main.tf` raiz chama o módulo uma vez por workload, com os valores de cada um: +{/* terraform-validate: skip */} ```hcl # main.tf module "api_workload" { @@ -252,7 +259,7 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" # An exact version, not a range + version = "2.10.0" # An exact version, not a range } } } @@ -260,7 +267,7 @@ terraform { O custo é que uma versão posterior só chega quando você edita a versão fixada e executa `terraform init -upgrade`. -Para verificar, execute `terraform init` e confirme que ele instala `aziontech/azion` na versão `2.0.0`. +Para verificar, execute `terraform init` e confirme que ele instala `aziontech/azion` na versão `2.10.0`. --- @@ -268,21 +275,33 @@ Para verificar, execute `terraform init` e confirme que ele instala `aziontech/a Um output publica um valor depois do `terraform apply`, então outra configuração, um script ou uma pessoa lê o ID de um workload ou de uma aplicação em vez de procurá-lo. Uma `description` diz o que é o valor a quem ler os outputs depois. O custo é um contrato estável: tudo o que lê um output deixa de funcionar quando você o renomeia ou o remove. -Os outputs abaixo exportam os IDs do workload e da aplicação: +Estes outputs exportam os IDs de um workload e de uma aplicação declarados na mesma configuração. O provider v2 retorna cada ID dentro do bloco aninhado do recurso, como `workload.id` e `application.application_id`: ```hcl +resource "azion_workload" "main" { + workload = { + name = "main-workload" + } +} + +resource "azion_application_main_setting" "main" { + application = { + name = "main-application" + } +} + output "workload_id" { description = "ID of the created workload" - value = azion_workload.main.id + value = azion_workload.main.workload.id } output "application_id" { description = "ID of the created application" - value = azion_application_main_setting.main.id + value = azion_application_main_setting.main.application.application_id } ``` -Dentro de um módulo, os mesmos blocos ficam no seu `outputs.tf`. Por exemplo, `modules/application/outputs.tf` exporta `application_id` a partir de `azion_application_main_setting.this.id` e `application_name` a partir de `azion_application_main_setting.this.name`. +Dentro de um módulo, os mesmos blocos ficam no seu `outputs.tf`. Por exemplo, `modules/application/outputs.tf` exporta `application_id` a partir de `azion_application_main_setting.this.application.application_id` e `application_name` a partir de `azion_application_main_setting.this.application.name`. Para verificar, confirme que cada output tem uma `description` e lê um atributo de recurso, nunca um ID literal. @@ -290,25 +309,56 @@ Para verificar, confirme que cada output tem uma `description` e lê um atributo ## Referencie recursos em vez de fixar IDs no código -Uma referência como `azion_application_main_setting.example.id` passa o ID que o Terraform conhece depois de criar a aplicação e faz o Terraform criar a aplicação primeiro. Um ID fixo no código, como `"12345"`, pertence a uma única conta, deixa de funcionar quando a aplicação é criada de novo com outro ID e não dá ao Terraform nenhuma ordem a seguir. O custo é que o recurso referenciado precisa estar na mesma configuração ou ser lido por um data source. +Uma referência como `azion_application_main_setting.example.application.application_id` passa o ID que o Terraform conhece depois de criar a aplicação e faz o Terraform criar a aplicação primeiro. Um ID fixo no código, como `12345`, pertence a uma única conta, deixa de funcionar quando a aplicação é criada de novo com outro ID e não dá ao Terraform nenhuma ordem a seguir. O custo é que o recurso referenciado precisa estar na mesma configuração ou ser lido por um data source. -O primeiro bloco mostra o ID fixo a evitar, e o segundo, a referência a usar: +A configuração a seguir declara uma aplicação e uma regra, guardada em um bloco `locals`, que dois recursos de Rules Engine aplicam. O primeiro recurso mostra o ID fixo a evitar, e o segundo, a referência a usar: ```hcl +resource "azion_application_main_setting" "example" { + application = { + name = "my-application" + } +} + +# The rule that both Rules Engine resources apply +locals { + deliver_rule = { + name = "Deliver all requests" + phase = "request" + behaviors = [{ behavior = { type = "deliver" } }] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } +} + # Avoid: an ID copied from one account -resource "azion_application_rule_engine" "example" { - application_id = "12345" +resource "azion_application_rule_engine" "hardcoded" { + application_id = 12345 + results = local.deliver_rule } # Use: a reference that also sets the order -resource "azion_application_rule_engine" "example" { - application_id = azion_application_main_setting.example.id +resource "azion_application_rule_engine" "referenced" { + application_id = azion_application_main_setting.example.application.application_id + results = local.deliver_rule } ``` -Como uma referência já define a ordem, uma lista `depends_on` que nomeia o mesmo recurso a repete. Um deployment com `workload_id = azion_workload.main.id` não precisa de `depends_on = [azion_workload.main]`. Para saber como as referências ordenam os recursos, consulte [Como o Terraform Provider funciona](/pt-br/documentacao/devtools/terraform/como-funciona/). +Como uma referência já define a ordem, uma lista `depends_on` que nomeia o mesmo recurso a repete. Um deployment com `workload_id = azion_workload.main.workload.id` não precisa de `depends_on = [azion_workload.main]`. Para saber como as referências ordenam os recursos, consulte [Como o Terraform Provider funciona](/pt-br/documentacao/devtools/terraform/como-funciona/). -Para verificar, procure na configuração IDs entre aspas em argumentos `_id` e substitua cada um por uma referência ou por um data source. +Para verificar, procure na configuração IDs literais em argumentos `_id` e substitua cada um por uma referência ou por um data source. --- @@ -322,7 +372,9 @@ O comentário abaixo diz qual API o workload atende e em qual ambiente: # Workload for the main API # This workload manages the production API resource "azion_workload" "api" { - name = "api-prod" + workload = { + name = "api-prod" + } } ``` @@ -334,7 +386,7 @@ Para verificar, leia cada bloco comentado depois de uma alteração e confirme q Um arquivo `README.md` em cada módulo mostra como chamá-lo, quais entradas ele recebe e quais outputs ele retorna. Assim, quem chama o módulo não precisa ler o seu código. O custo é a manutenção manual: atualize o README na mesma alteração que muda as variáveis e os outputs do módulo. -O README abaixo documenta um módulo de workload com uma entrada e um output: +Este README documenta um módulo de workload com duas entradas e um output: ````markdown # Workload Module @@ -343,8 +395,9 @@ O README abaixo documenta um módulo de workload com uma entrada e um output: ```hcl module "workload" { - source = "./modules/workload" - name = "api" + source = "./modules/workload" + name = "api" + environment = "prod" } ``` @@ -353,6 +406,7 @@ module "workload" { | Name | Description | Type | Default | |------|-------------|------|---------| | name | Workload name | string | n/a | +| environment | Environment suffix of the workload name | string | n/a | ## Outputs diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/getting-started.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/getting-started.mdx index 7d093816ee..3d0f038b78 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/getting-started.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/getting-started.mdx @@ -31,7 +31,7 @@ Para mais informações sobre o provider, consulte [Azion Terraform Provider](/p ## Pré-requisitos - [Terraform](https://developer.hashicorp.com/terraform/downloads) 1.0 ou posterior. -- O Azion Terraform Provider 2.0 ou posterior, que este guia fixa no `main.tf`. A versão 2.0 funciona somente com a Azion API v4, e as versões anteriores funcionam com a API v3. Para as versões e o que cada uma suporta, consulte [Migre do provider v1.x para o v2.0](/pt-br/documentacao/devtools/terraform/migration-v3-to-v4/). +- O Azion Terraform Provider na versão 2.10.0, que este guia fixa no `main.tf`. A versão 2.0 e as posteriores funcionam somente com a Azion API v4, e as versões anteriores funcionam com a API v3. Para as versões e o que cada uma suporta, consulte [Migre do provider v1.x para o v2.0](/pt-br/documentacao/devtools/terraform/migration-v3-to-v4/). - Uma conta Azion. Para criar uma, consulte [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/). - Um personal token com as permissões que os seus recursos exigem. Para mais informações, consulte [Tokens pessoais](/pt-br/documentacao/fundamentos/personal-tokens/). @@ -60,14 +60,14 @@ mkdir azion-terraform cd azion-terraform ``` -No diretório `azion-terraform`, crie um arquivo `main.tf` com o conteúdo a seguir. O bloco `required_providers` define a origem do provider como `aziontech/azion` e fixa a versão `2.0.0`: +No diretório `azion-terraform`, crie um arquivo `main.tf` com o conteúdo a seguir. O bloco `required_providers` define a origem do provider como `aziontech/azion` e fixa a versão `2.10.0`: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -127,27 +127,50 @@ No diretório `azion-terraform`, crie um arquivo `resources.tf`. Ele declara um ```hcl # Create a workload resource "azion_workload" "my_workload" { - name = "my-first-workload" + workload = { + name = "my-first-workload" + active = true + } } -# Create a connector +# Create a connector to your origin resource "azion_connector" "my_connector" { - name = "my-connector" + connector = { + name = "my-connector" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + } + } + ] + } + } } # Create an application resource "azion_application_main_setting" "my_app" { - name = "my-application" + application = { + name = "my-application" + active = true + } } # Create a DNS zone resource "azion_intelligent_dns_zone" "my_zone" { - name = "example.com" - active = true + zone = { + name = "my-zone" + domain = "example.com" + active = true + } } ``` -Substitua `example.com` pelo domínio da sua zona. O projeto declara quatro recursos que ainda não existem na sua conta. +Cada recurso guarda os seus argumentos em um único bloco aninhado com o nome do objeto, como `workload = { ... }` ou `zone = { ... }`. Substitua `origin.example.com` pelo endereço do seu servidor de origem e `example.com` pelo domínio da sua zona. O projeto declara quatro recursos que ainda não existem na sua conta. --- @@ -195,14 +218,14 @@ O state guarda os quatro recursos, e `terraform state show` exibe os atributos q ## Exemplo completo -A configuração a seguir, para a versão `2.0.0` do provider, reúne o provider e três recursos em um único arquivo. Ela declara o próprio provider, então use-a em um diretório vazio, e não ao lado de outro arquivo que declara o provider. Ela lê o token da variável `api_token`, então precisa de um arquivo `variables.tf` que declara `api_token` e de um arquivo `terraform.tfvars` que define o valor dela. Cada bloco de recurso marca onde ficam os seus outros argumentos: +A configuração a seguir, para a versão `2.10.0` do provider, reúne o provider e três recursos em um único arquivo. Ela declara o próprio provider, então use-a em um diretório vazio, e não ao lado de outro arquivo que declara o provider. Ela lê o token da variável `api_token`, então precisa de um arquivo `variables.tf` que declara `api_token` e de um arquivo `terraform.tfvars` que define o valor dela. Cada bloco aninhado marca onde ficam os seus outros argumentos: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -213,20 +236,37 @@ provider "azion" { # Create a workload resource "azion_workload" "example" { - name = "my-workload" - # Additional configuration... + workload = { + name = "my-workload" + # Additional configuration... + } } # Create a connector resource "azion_connector" "example" { - name = "my-connector" - # Additional configuration... + connector = { + name = "my-connector" + type = "http" + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + } + } + ] + } + # Additional configuration... + } } # Create an application resource "azion_application_main_setting" "example" { - name = "my-application" - # Additional configuration... + application = { + name = "my-application" + # Additional configuration... + } } ``` @@ -237,6 +277,6 @@ resource "azion_application_main_setting" "example" { - + diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/migration-v3-to-v4.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/migration-v3-to-v4.mdx index 19b35bf515..c5b1d8057e 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/migration-v3-to-v4.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/guides/migration-v3-to-v4.mdx @@ -12,7 +12,7 @@ import DocCard from '@aziontech/webkit/doc-card' Você pode mover uma configuração Terraform e o state dela do [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/) v1.x, que chama a Azion API v3, para o v2.0, que chama a Azion API v4. Para manter uma configuração na v1.x, consulte [Azion Terraform Provider v1.x (API v3)](/pt-br/documentacao/devtools/terraform/terraform-provider-v3/). -O provider v2.0 é uma versão major. Ele adiciona recursos e remove os descontinuados para corresponder à Azion API v4, então uma configuração v1.x não roda na v2.0 sem mudanças. +O provider v2.0 é uma versão major. Ele adiciona recursos e remove os descontinuados para corresponder à Azion API v4, então uma configuração v1.x não roda na v2.0 sem mudanças. Os exemplos da v2.0 nesta página foram escritos para o provider 2.10.0. --- @@ -61,6 +61,7 @@ Cada linha de versões do provider chama uma versão da Azion API: A versão 1.41.0 é a última versão v1.x. Para continuar usando a v1.x enquanto prepara a migração, fixe o provider nessa versão: +{/* terraform-validate: skip */} ```hcl terraform { required_providers { @@ -82,7 +83,9 @@ O provider 1.41.0 e as versões anteriores não recebem atualizações nem corre ## Mudanças de recursos na v2.0 -O provider v2.0 remove, renomeia e adiciona recursos. As quatro tabelas abaixo listam cada recurso e data source da v1.x com a contraparte dele na v2.0. Para todos os argumentos de um recurso da v2.0, consulte [Terraform Registry](https://registry.terraform.io/providers/aziontech/azion/latest/docs). +O provider v2.0 remove, renomeia e adiciona recursos. As quatro tabelas desta seção listam cada recurso e data source da v1.x com a contraparte dele na v2.0, e os recursos que a v2 adiciona. Para todos os argumentos de um recurso da v2.0, consulte [Terraform Registry](https://registry.terraform.io/providers/aziontech/azion/latest/docs). + +Todo recurso da v2.0 que tem contraparte na v1.x, inclusive os que mantêm o nome da v1.x, recebe as configurações em um único bloco aninhado, como `workload = {}`, `connector = {}`, `application = {}`, `function = {}`, `data = {}` ou `results = {}`. Um bloco da v1.x com os argumentos no nível superior falha no `terraform validate` da v2.0, então todo bloco de recurso precisa ser reescrito. ### Recursos removidos @@ -94,6 +97,9 @@ O provider v2.0 não tem recurso nem data source com estes nomes da v1.x: | `azion_domains` (data source) | `azion_workloads` (data source) | | `azion_edge_application_origin` | `azion_connector` | | `azion_edge_applications_origins` (data source) | `azion_connectors` (data source) | +| `azion_environment_variable` | Nenhum. O provider v2.0 não tem recurso para variáveis de ambiente, então gerencie-as fora do Terraform, por exemplo no Azion Console. | +| `azion_environment_variables` (data source) | Nenhum | +| `azion_waf_domains` (data source) | Nenhum | ### Recursos renomeados @@ -106,24 +112,39 @@ Estes recursos da v1.x mantêm a mesma função na v2.0 com outro nome. Os nomes | `azion_edge_application_main_setting` | `azion_application_main_setting` | | `azion_edge_application_cache_setting` | `azion_application_cache_setting` | | `azion_edge_application_rule_engine` | `azion_application_rule_engine` | -| `azion_edge_application_edge_functions_instance` | `azion_application_functions_instance` | +| `azion_edge_application_edge_functions_instance` | `azion_application_function_instance` | | `azion_edge_firewall_main_setting` | `azion_firewall_main_setting` | | `azion_edge_firewall_edge_functions_instance` | `azion_firewall_functions_instance` | +| `azion_waf_rule_set` | `azion_waf` | +| `azion_waf_rule_sets` (data source) | `azion_wafs` (data source) | + +O `azion_waf_rule_set` da v1.x gerencia um WAF rule set, com a sensibilidade de cada família de ameaças. Na v2.0, esse objeto é o `azion_waf`, então um bloco de rule set da v1.x vira um bloco `azion_waf`. O modo do WAF passa para o behavior `set_waf` da regra de firewall que executa o WAF, onde recebe `logging` ou `blocking`. Os data sources seguem o mesmo mapeamento, e os nomes `azion_waf_rule_set` e `azion_waf_rule_sets` continuam na v2.0 para outro objeto, uma exceção do WAF. -### Recursos adicionados na v2.0 +### Recursos adicionados na v2 -O provider v2.0 adiciona quatro recursos: +Estes recursos da v2 não têm contraparte na v1.x. Alguns deles chegaram depois da 2.0.0, em versões 2.x posteriores, e o provider 2.10.0 inclui todos: | Recurso | O que gerencia | | --- | --- | | `azion_workload` | Workloads. Substitui `azion_domain` em conjunto com `azion_workload_deployment`. | -| `azion_workload_deployment` | Deployments de workloads. | +| `azion_workload_deployment` | Deployments de workloads, que vinculam uma aplicação e, opcionalmente, um firewall e uma custom page a um workload. | | `azion_connector` | Connectors. Substitui `azion_edge_application_origin`. | | `azion_custom_page` | Custom pages. O provider v1.x não tem recurso para elas. | +| `azion_application_device_group` | Device groups de uma aplicação. | +| `azion_application_rule_engine_order` | A ordem das regras em uma fase do Rules Engine de uma aplicação. | +| `azion_firewall_rule_engine` | Regras do Rules Engine de um firewall. | +| `azion_firewall_rule_engine_order` | A ordem das regras no Rules Engine de um firewall. | +| `azion_waf_rule_set` | Exceções do WAF. Cada uma pertence ao rule set que o seu `waf_id` indica. O recurso da v1.x com esse nome corresponde ao `azion_waf`. | +| `azion_bucket` | Buckets do Object Storage. | +| `azion_certificate_request` | Solicitações de certificado da Let's Encrypt. | +| `azion_certificate_signing_request` | Solicitações de assinatura de certificado (CSRs). | +| `azion_crl` | Listas de revogação de certificados. | +| `azion_data_stream` | Streams do Data Stream. | +| `azion_data_stream_template` | Templates do Data Stream. | ### Recursos inalterados -Estes recursos mantêm os nomes da v1.x na v2.0: +Estes recursos mantêm os nomes da v1.x na v2.0. Os argumentos deles também passam para um bloco aninhado, então reescreva cada um como descrito em [Mudanças de recursos na v2.0](#mudancas-de-recursos-na-v20): | Recurso | O que gerencia | | --- | --- | @@ -131,9 +152,7 @@ Estes recursos mantêm os nomes da v1.x na v2.0: | `azion_intelligent_dns_record` | Registros DNS | | `azion_intelligent_dns_dnssec` | Configurações de DNSSEC | | `azion_network_list` | Network lists | -| `azion_waf_rule_set` | Conjuntos de regras do WAF | | `azion_digital_certificate` | Certificados digitais | -| `azion_environment_variable` | Variáveis de ambiente | --- @@ -141,26 +160,26 @@ Estes recursos mantêm os nomes da v1.x na v2.0: A atualização exige duas mudanças: a restrição de versão na configuração e o provider instalado no projeto. -Para mudar a restrição de versão, defina `version` como `2.0.0` no bloco `required_providers`: +Para mudar a restrição de versão, defina `version` como `2.10.0` no bloco `required_providers`: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } ``` -Para baixar o provider 2.0.0, execute: +Para baixar o provider 2.10.0, execute: ```bash terraform init -upgrade ``` -O Terraform instala o provider 2.0.0 no projeto. +O Terraform instala o provider 2.10.0 no projeto. --- @@ -168,7 +187,7 @@ O Terraform instala o provider 2.0.0 no projeto. Remova os recursos descontinuados da v1.x do state do Terraform antes de importá-los com os tipos da v2.0. -Para remover as entradas de domínio, origin e function do state do Terraform: +Para remover as entradas de domínio, origin, function e WAF rule set do state do Terraform: ```bash # Remove domain resources @@ -179,6 +198,9 @@ terraform state rm azion_edge_application_origin.example # Remove function resources (will be recreated as azion_function) terraform state rm azion_edge_function.example + +# Remove WAF rule set resources (will be imported as azion_waf) +terraform state rm azion_waf_rule_set.example ``` Substitua `example` pelo nome que cada recurso tem na sua configuração. O state deixa de listar esses recursos, que continuam na sua conta Azion. @@ -195,6 +217,7 @@ Na v1.x, um recurso `azion_domain` gerenciava todo o ciclo de vida do domínio. A configuração da v1.x: +{/* terraform-validate: skip */} ```hcl terraform { required_providers { @@ -213,8 +236,8 @@ provider "azion" { resource "azion_domain" "example" { name = "my-domain" cname_access_only = false - digital_certificate = 1234 - edge_application = 5678 + digital_certificate = var.certificate_id + edge_application = var.application_id is_active = true # Domain name binding @@ -229,38 +252,70 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } +variable "api_token" { + type = string + sensitive = true +} + +variable "certificate_id" { + type = number +} + +variable "application_id" { + type = number +} + provider "azion" { api_token = var.api_token } # Workload resource (v2.0) resource "azion_workload" "example" { - name = "my-workload" - - # Workload configuration options - # Refer to the Terraform Registry documentation for the complete options + workload = { + name = "my-workload" + active = true + domains = ["example.com"] + workload_domain_allow_access = true + + tls = { + certificate = var.certificate_id + } + } } # Workload deployment (v2.0) resource "azion_workload_deployment" "example" { - workload_id = azion_workload.example.id - - # Deployment configuration - # Refer to the Terraform Registry documentation for the complete options + workload_id = azion_workload.example.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true + + strategy = { + type = "default" + attributes = { + application = var.application_id + } + } + } } ``` +Os dois blocos leem os IDs do certificado e da aplicação das variáveis `certificate_id` e `application_id`. Cada argumento da v1.x tem um lugar na v2.0. O domínio passa para `workload.domains`, o certificado para `workload.tls.certificate` e `is_active` para `workload.active`. `workload_domain_allow_access = true` mantém acessível o domínio que a Azion atribui ao workload, como fazia `cname_access_only = false`. A aplicação que a v1.x definia em `edge_application` passa para o deployment, em `deployment.strategy.attributes.application`. + ### Substitua uma origin por um connector Na v1.x, uma origin pertencia a uma aplicação e recebia o `edge_application_id` dela. Na v2.0, um connector é um recurso independente. Para todos os argumentos de `azion_connector`, consulte [Recursos de Connectors](/pt-br/documentacao/devtools/terraform/connectors/). A configuração da v1.x: +{/* terraform-validate: skip */} ```hcl # Origin (v1.x) resource "azion_edge_application_origin" "example" { @@ -284,30 +339,40 @@ A configuração da v2.0: ```hcl # Connector (v2.0) resource "azion_connector" "example" { - name = "my-connector" - - # Connector configuration - # Refer to the Terraform Registry documentation for the complete options - - # Example configuration - origin = { - address = "origin.example.com" - protocol = "https" - path = "/api" + connector = { + name = "my-connector" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + https_port = 443 + } + } + ] + + connection_options = { + host = "origin.example.com" + path_prefix = "/api" + transport_policy = "force_https" + } + } } - - # Connection settings - connection_timeout = 30 - read_timeout = 60 } ``` +Um connector `http` lista os servidores de origem em `http_attributes.addresses`. Os argumentos `host_header`, `origin_path` e `origin_protocol` da v1.x passam para `http_attributes.connection_options` como `host`, `path_prefix` e `transport_policy`. Os timeouts da v1.x não têm argumento nesse nível: na v2.0, `connection_timeout` e `read_write_timeout` pertencem ao módulo de load balancer, em `http_attributes.modules.load_balancer.config`. Como um connector não recebe o ID de uma aplicação, a aplicação envia requisições para ele por uma regra do Rules Engine com o behavior `set_connector`, como mostra [Migre uma configuração completa](#migre-uma-configuracao-completa). + ### Renomeie um recurso de function -O recurso de function mantém os mesmos argumentos na v2.0: `name`, `active`, `code` e `json_args`. Só o tipo do recurso muda, de `azion_edge_function` para `azion_function`. +O recurso de function muda de tipo, de `azion_edge_function` para `azion_function`, e muda a forma dos argumentos. Na v2.0, eles ficam em um bloco `function`: `name`, `code`, `active`, `default_args`, `execution_environment` e `runtime`. O argumento `json_args` da v1.x não existe com esse nome na v2.0: passe o mesmo valor de `jsonencode()` em `default_args`. A configuração da v1.x: +{/* terraform-validate: skip */} ```hcl # Function (v1.x) resource "azion_edge_function" "example" { @@ -327,23 +392,35 @@ A configuração da v2.0: ```hcl # Function (v2.0) resource "azion_function" "example" { - name = "my-function" - active = true - code = file("${path.module}/function.js") - - # Function arguments - json_args = jsonencode({ - key = "value" - }) + function = { + name = "my-function" + active = true + code = trimspace(<<-EOT + addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello from my-function")); + }); + EOT + ) + execution_environment = "application" + runtime = "azion_js" + + # Function arguments + default_args = jsonencode({ + key = "value" + }) + } } ``` +O exemplo mantém o código inline. Para lê-lo de um arquivo do módulo, como faz o bloco da v1.x, defina `code = trimspace(file("${path.module}/function.js"))`. O provider recomenda envolver `code` em `trimspace()`. + ### Migre uma configuração completa -Uma configuração com uma aplicação, uma origin, um domínio e uma function muda em quatro pontos: o main setting da aplicação recebe o nome da v2.0, um connector substitui a origin, um workload e um deployment substituem o domínio e a function recebe o tipo da v2.0. Para os recursos de aplicação, consulte [Recursos de Applications](/pt-br/documentacao/devtools/terraform/applications/). +Uma configuração com uma aplicação, uma origin, um domínio e uma function muda em cinco pontos: o main setting da aplicação recebe o nome da v2.0, um connector substitui a origin, uma regra do Rules Engine encaminha as requisições da aplicação para o connector, um workload e um deployment substituem o domínio e a function recebe o tipo da v2.0. Para os recursos de aplicação, consulte [Recursos de Applications](/pt-br/documentacao/devtools/terraform/applications/). A configuração da v1.x: +{/* terraform-validate: skip */} ```hcl terraform { required_providers { @@ -393,42 +470,116 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } +variable "api_token" { + type = string + sensitive = true +} + provider "azion" { api_token = var.api_token } # Application resource "azion_application_main_setting" "app" { - name = "my-application" + application = { + name = "my-application" + } } # Connector (replaces origin) resource "azion_connector" "connector" { - name = "my-connector" - # Connector configuration + connector = { + name = "my-connector" + type = "http" + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + } + } + ] + } + } +} + +# Rule that routes the application's requests to the connector +resource "azion_application_rule_engine" "route_to_connector" { + application_id = azion_application_main_setting.app.application.application_id + results = { + name = "Route to my-connector" + phase = "request" + behaviors = [ + { + behavior = { + type = "set_connector" + attributes = { + value = azion_connector.connector.connector.id + } + } + } + ] + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + } } # Workload (replaces domain) resource "azion_workload" "workload" { - name = "my-workload" + workload = { + name = "my-workload" + active = true + domains = ["example.com"] + } } -# Workload deployment +# Workload deployment (binds the application to the workload) resource "azion_workload_deployment" "deployment" { - workload_id = azion_workload.workload.id - # Deployment configuration + workload_id = azion_workload.workload.workload.id + deployment = { + name = "my-deployment" + active = true + current = true + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.app.application.application_id + } + } + } } # Function (renamed) resource "azion_function" "func" { - name = "my-function" - active = true - code = file("${path.module}/function.js") + function = { + name = "my-function" + active = true + code = trimspace(<<-EOT + addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello from my-function")); + }); + EOT + ) + execution_environment = "application" + runtime = "azion_js" + } } ``` @@ -438,7 +589,7 @@ resource "azion_function" "func" { Os recursos que você removeu do state continuam na sua conta Azion. Importe cada um com o tipo de recurso da v2.0 usando `terraform import . `. -Para importar o workload, o connector e a function: +Para importar o workload, o connector, a function e o WAF rule set: ```bash # Import workloads @@ -449,6 +600,9 @@ terraform import azion_connector.example # Import functions terraform import azion_function.example + +# Import WAF rule sets +terraform import azion_waf.example ``` Substitua cada ID pelo ID do recurso na Azion API v4. Um recurso da API v3 pode ter outro ID na API v4, então consulte os IDs no [Azion Console](https://console.azion.com/). O state lista os recursos importados com os tipos da v2.0. @@ -477,7 +631,7 @@ Para aplicar as mudanças, execute o comando primeiro em um ambiente de teste: terraform apply ``` -O Terraform gerencia os recursos pelo provider 2.0.0 e pela Azion API v4. Para erros durante a migração, consulte [Solucionar problemas do Terraform Provider](/pt-br/documentacao/devtools/terraform/solucao-de-problemas/). +O Terraform gerencia os recursos pelo provider 2.10.0 e pela Azion API v4. Para erros durante a migração, consulte [Solucionar problemas do Terraform Provider](/pt-br/documentacao/devtools/terraform/solucao-de-problemas/). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/how-it-works.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/how-it-works.mdx index 5621c32510..17b8ba9d0a 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/how-it-works.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/how-it-works.mdx @@ -40,7 +40,7 @@ terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -81,24 +81,44 @@ O Terraform altera a sua conta em um ciclo de três comandos, cada um com a sua - `terraform plan` mostra as alterações que `terraform apply` faria, sem fazê-las. - `terraform apply` faz as alterações por meio do provider, depois que você digita `yes` na pergunta dele. -O Terraform lê a ordem das alterações na própria configuração. Uma referência a outro recurso, como `azion_workload.example.id`, faz um recurso depender do outro, então o Terraform cria o workload antes do deployment que usa o ID dele: +O Terraform lê a ordem das alterações na própria configuração. Uma referência a outro recurso, como `azion_workload.example.workload.id`, faz um recurso depender do outro, então o Terraform cria o workload antes do deployment que usa o ID dele. Neste bloco, o deployment recebe o ID de uma aplicação existente da variável `application_id`: ```hcl resource "azion_workload" "example" { - name = "my-workload" + workload = { + name = "my-workload" + } } resource "azion_workload_deployment" "example" { - workload_id = azion_workload.example.id - - # Deployment configuration + workload_id = azion_workload.example.workload.id + + deployment = { + name = "my-deployment" + strategy = { + type = "default" + attributes = { + application = var.application_id + } + } + } } ``` -O argumento `depends_on`, em vez disso, declara uma dependência pelo nome. Um ID fixo no código, como `application_id = "12345"`, não carrega nenhuma dependência, então referências são a escolha mais segura. +O argumento `depends_on`, em vez disso, declara uma dependência pelo nome. Um ID fixo no código, como `workload_id = 12345`, não carrega nenhuma dependência, então referências são a escolha mais segura. Separar o plan do apply custa um passo a mais e garante uma revisão antes de qualquer alteração. Por exemplo, um pipeline pode executar `terraform plan` em toda alteração e executar `terraform apply -auto-approve` apenas na branch `main`. Para executar o ciclo pela primeira vez, consulte [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/). +### A configuração é o estado desejado + +A maioria dos recursos da Azion guarda os seus argumentos em um único bloco aninhado, como `workload = { ... }` ou `cache_setting = { ... }`, e o provider trata esse bloco como o estado desejado do objeto. Cada recurso impõe o seu próprio conjunto de campos, e o provider envia esse conjunto a cada `terraform apply`. Daí decorrem três coisas: + +- **Um campo imposto e omitido volta ao padrão**: deixar um campo imposto fora do bloco não significa "manter o que já existe". Significa "usar o padrão", e o apply redefine o campo para ele. Por exemplo, `azion_firewall_main_setting` envia o firewall completo, então um bloco sem `modules.waf.enabled = true` desativa o WAF. Para manter um valor diferente do padrão, declare-o. +- **Um campo omitido que o recurso não impõe mantém o valor**: `azion_workload`, por exemplo, envia `domains`, `active` e `tls.certificate` só quando o bloco os declara. Sem eles, o apply mantém os valores que a API guarda. +- **Alterações feitas fora do Terraform são revertidas nos campos impostos e declarados**: uma configuração alterada no [Azion Console](https://console.azion.com/) ou pela API aparece como drift no próximo `terraform plan`, e o próximo apply a devolve ao que a configuração declara. + +O Terraform só detecta drift quando atualiza o state, então `terraform plan -refresh=false` não o mostra. Os campos que cada recurso impõe, e os padrões deles, estão listados na página do recurso no [Terraform Registry](https://registry.terraform.io/providers/aziontech/azion/latest/docs). + --- ## Nomes de recursos e data sources @@ -109,7 +129,7 @@ Os nomes de data sources seguem um padrão. O nome no plural lista objetos, e o O nome no singular muitas vezes é um recurso e um data source ao mesmo tempo. `azion_workload` é os dois, então a palavra-chave do bloco decide se o Terraform gerencia o objeto ou apenas o lê. Uma configuração que lê todos os workloads declara `data "azion_workloads" "all" {}`. -As configurações principais da aplicação quebram o padrão. O recurso é `azion_application_main_setting`, e o data source que consulta as configurações principais é `azion_application_main_settings`, com grafia no plural. Confira cada nome na página de referência dele, como [Recursos de Applications](/pt-br/documentacao/devtools/terraform/applications/), antes de usá-lo. +Alguns nomes quebram o padrão. O recurso das configurações principais da aplicação é `azion_application_main_setting`, mas o data source que lê uma aplicação é `azion_application_main_settings`, com grafia no plural, e o que lista as aplicações é `azion_applications_main_settings`. Nas instâncias de function do firewall, `azion_firewall_functions_instance` lista as instâncias e `azion_firewall_function_instance` lê uma. Confira cada nome na página de referência dele, como [Recursos de Applications](/pt-br/documentacao/devtools/terraform/applications/), antes de usá-lo. Um data source permite que uma configuração use um objeto que ela não possui, como um workload que outra configuração gerencia. O custo é que o Terraform não pode alterar esse objeto. Para gerenciá-lo, importe-o para o state como um recurso. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/applications.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/applications.mdx index c6d54b1864..85135c3ff3 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/applications.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/applications.mdx @@ -15,7 +15,7 @@ import DocItem from '@aziontech/webkit/doc-item' -Uma aplicação reúne a lógica de entrega de conteúdo da Azion Platform: as suas [configurações de cache](/pt-br/documentacao/plataforma/applications/cache/cache-settings/), as regras do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) que processam cada requisição, os seus [device groups](/pt-br/documentacao/plataforma/applications/device-groups/) e as [instâncias de function](/pt-br/documentacao/plataforma/applications/functions-instances/) que ela executa. O Azion Terraform Provider gerencia [Applications](/pt-br/documentacao/plataforma/applications/) com cinco recursos e lê aplicações com nove data sources. Para migrar uma configuração v1.x para esses recursos, consulte [Migre do provider v1.x para o v2.0](/pt-br/documentacao/devtools/terraform/migration-v3-to-v4/). +Uma aplicação reúne a lógica de entrega de conteúdo da Azion Platform: as suas [configurações de cache](/pt-br/documentacao/plataforma/applications/cache/cache-settings/), as regras do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) que processam cada requisição, os seus [device groups](/pt-br/documentacao/plataforma/applications/device-groups/) e as [instâncias de function](/pt-br/documentacao/plataforma/applications/functions-instances/) que ela executa. O Azion Terraform Provider gerencia [Applications](/pt-br/documentacao/plataforma/applications/) com seis recursos e lê aplicações com dez data sources. Para migrar uma configuração v1.x para esses recursos, consulte [Migre do provider v1.x para o v2.0](/pt-br/documentacao/devtools/terraform/migration-v3-to-v4/). --- @@ -27,9 +27,20 @@ Uma aplicação reúne a lógica de entrega de conteúdo da Azion Platform: as s | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_cache_setting) | Cria e gerencia uma configuração de cache. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_device_group) | Cria e gerencia um device group. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine) | Cria e gerencia uma regra do Rules Engine. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Cria e gerencia uma instância de function em uma aplicação. | +| [`azion_application_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_rule_engine_order) | Define a ordem das regras do Rules Engine de uma fase. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/application_functions_instance) | Cria e gerencia uma instância de function em uma aplicação. | -`azion_application_main_setting` exige `name`, uma string que contém o nome da aplicação. Uma configuração de cache, uma regra do Rules Engine e uma instância de function pertencem a uma aplicação, então cada um desses recursos recebe o ID dessa aplicação em `application_id`. Configurações de cache e regras também recebem um `name`, e uma regra recebe a `phase` em que ela é executada. `azion_application_functions_instance` recebe `function_id`, o ID de uma function que o recurso `azion_function` gerencia. A página de cada recurso no Terraform Registry lista todos os argumentos. +Estes recursos recebem as suas configurações em um único atributo aninhado: + +| Recurso | Atributo aninhado | Campos | +| --- | --- | --- | +| `azion_application_main_setting` | `application` | Exige `name`. O opcional `modules` ativa os módulos `cache`, `functions`, `application_accelerator` e `image_processor`. | +| `azion_application_cache_setting` | `cache_setting` | Exige `name`. Os opcionais `browser_cache` e `modules` guardam a política de cache. | +| `azion_application_device_group` | `device_group` | Exige `name` e `user_agent`, a expressão regular que identifica os dispositivos do grupo. | +| `azion_application_rule_engine` | `results` | Exige `name`, `phase` (`request` ou `response`), `criteria` e `behaviors`. | +| `azion_application_function_instance` | `data` | Exige `name` e `function_id`, o ID de uma function que o recurso `azion_function` gerencia. | + +Depois do apply, `application.application_id` contém o ID numérico da aplicação. Uma configuração de cache, um device group, uma regra do Rules Engine e uma instância de function pertencem a uma aplicação, então cada um desses recursos recebe esse ID em `application_id`, fora do atributo aninhado. `azion_application_rule_engine_order` recebe `application_id`, a `phase` e `order`, a lista de IDs das regras na ordem em que elas são executadas. Um módulo que `modules` omite volta ao seu padrão a cada apply. A página de cada recurso no Terraform Registry lista todos os argumentos. --- @@ -37,28 +48,29 @@ Uma aplicação reúne a lógica de entrega de conteúdo da Azion Platform: as s | Data source | Descrição | | --- | --- | -| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Consulta as configurações principais de aplicações. | +| [`azion_applications_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/applications_main_settings) | Lista as configurações principais de aplicações. | +| [`azion_application_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_main_settings) | Lê as configurações principais de uma aplicação. | | [`azion_application_cache_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_settings) | Lista configurações de cache. | | [`azion_application_cache_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_cache_setting) | Lê uma configuração de cache. | | [`azion_application_device_groups`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_groups) | Lista device groups. | | [`azion_application_device_group`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_device_group) | Lê um device group. | | [`azion_application_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rules_engine) | Lista regras do Rules Engine. | | [`azion_application_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_rule_engine) | Lê uma regra do Rules Engine. | -| [`azion_application_functions_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lista instâncias de function. | -| [`azion_application_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lê uma instância de function. | +| [`azion_application_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_functions_instance) | Lista instâncias de function. | +| [`azion_application_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/application_function_instance) | Lê uma instância de function. | --- ## Exemplo -Esta configuração fixa o provider na versão 2.0.0, cria uma aplicação, adiciona uma configuração de cache e uma regra do Rules Engine na fase `request`, instancia uma function na aplicação e retorna o ID da aplicação em um output. Ela lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. A instância de function lê `function_id` de um recurso `azion_function` chamado `my_function`, que esta configuração não declara. Para encontrar esse recurso, consulte [Recursos e data sources](/pt-br/documentacao/devtools/terraform/examples/#functions). +Esta configuração fixa o provider na versão 2.10.0 e cria uma aplicação com os módulos de cache e functions ativos. Ela adiciona uma configuração de cache e uma regra do Rules Engine na fase `request` que ignora o cache para os caminhos sob `/api/`. Ela também cria uma function, instancia essa function na aplicação e retorna o ID da aplicação em um output. Ela lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. Para saber mais sobre o recurso `azion_function`, consulte [Recursos e data sources](/pt-br/documentacao/devtools/terraform/examples/#functions). ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -69,39 +81,111 @@ provider "azion" { # Create main application resource "azion_application_main_setting" "my_app" { - name = "my-application" + application = { + name = "my-application" + active = true + + modules = { + cache = { + enabled = true + } + functions = { + enabled = true + } + } + } } # Configure cache resource "azion_application_cache_setting" "my_cache" { - application_id = azion_application_main_setting.my_app.id - name = "static-cache" + application_id = azion_application_main_setting.my_app.application.application_id + + cache_setting = { + name = "static-cache" + + browser_cache = { + behavior = "override" + max_age = 3600 + } - # Cache configuration + modules = { + cache = { + behavior = "override" + max_age = 86400 + } + } + } } # Create rule in Rules Engine resource "azion_application_rule_engine" "my_rule" { - application_id = azion_application_main_setting.my_app.id - name = "redirect-rule" - phase = "request" + application_id = azion_application_main_setting.my_app.application.application_id + + results = { + name = "bypass-cache-api" + phase = "request" + active = true + + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${uri}" + operator = "starts_with" + conditional = "if" + argument = "/api/" + } + } + ] + } + ] + + behaviors = [ + { + behavior = { + type = "bypass_cache" + } + } + ] + } +} - # Criteria and behaviors +# Create a function +resource "azion_function" "my_function" { + function = { + name = "my-function" + active = true + runtime = "azion_js" + execution_environment = "application" + default_args = jsonencode({}) + code = trimspace(<<-EOT + addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello from Azion")); + }); + EOT + ) + } } -# Instantiate a function -resource "azion_application_functions_instance" "my_function" { - application_id = azion_application_main_setting.my_app.id - function_id = azion_function.my_function.id +# Instantiate the function in the application +resource "azion_application_function_instance" "my_function" { + application_id = azion_application_main_setting.my_app.application.application_id - # Instance configuration + data = { + name = "my-function-instance" + function_id = azion_function.my_function.function.id + active = true + } } output "application_id" { - value = azion_application_main_setting.my_app.id + value = azion_application_main_setting.my_app.application.application_id } ``` +O critério escreve a variável `${uri}` como `$${uri}`. Com um único `$`, o Terraform lê a variável como uma interpolação e falha. + --- ## Recursos relacionados diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/certificates.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/certificates.mdx index b5dc8cb612..1a8fa16eb6 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/certificates.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/certificates.mdx @@ -15,7 +15,7 @@ import DocItem from '@aziontech/webkit/doc-item' -Um certificado digital é o par de certificado SSL/TLS e chave privada que permite a uma aplicação responder por HTTPS. O Azion Terraform Provider gerencia os certificados do [Certificate Manager](/pt-br/documentacao/plataforma/workloads/certificate-manager/certificados/) com um recurso e os lê com dois data sources. +Um certificado digital é o par de certificado SSL/TLS e chave privada que permite a uma aplicação responder por HTTPS. O Azion Terraform Provider gerencia os certificados do [Certificate Manager](/pt-br/documentacao/plataforma/workloads/certificate-manager/certificados/) com quatro recursos e os lê com quatro data sources. Além de enviar um certificado que você já tem, o provider pode solicitar um certificado Let's Encrypt, criar uma solicitação de assinatura de certificado (CSR) e enviar uma lista de revogação de certificados (CRL) para mTLS. --- @@ -23,9 +23,14 @@ Um certificado digital é o par de certificado SSL/TLS e chave privada que permi | Recurso | Descrição | | --- | --- | -| [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/digital_certificate) | Cria e gerencia um certificado digital. | +| [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/digital_certificate) | Cria e gerencia um certificado digital a partir de um certificado e de uma chave privada que você envia. | +| [`azion_certificate_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_request) | Solicita um certificado Let's Encrypt. | +| [`azion_certificate_signing_request`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/certificate_signing_request) | Cria uma solicitação de assinatura de certificado (CSR). | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/crl) | Cria e gerencia uma lista de revogação de certificados (CRL). | -`azion_digital_certificate` exige três argumentos do tipo string: `name`, o nome do certificado; `certificate`, o certificado SSL/TLS em formato PEM; e `private_key`, a chave privada em formato PEM. Ele exporta `id`, uma string que contém o ID único do certificado. A página do recurso no Terraform Registry lista todos os argumentos. +`azion_digital_certificate` recebe as suas configurações em um único atributo aninhado, `results`, que exige três argumentos do tipo string: `name`, o nome do certificado; `certificate_content`, o certificado SSL/TLS em formato PEM; e `private_key`, a chave privada em formato PEM. O provider trata `certificate_content` e `private_key` como sensíveis. Depois do apply, `results.id` contém o ID numérico do certificado. + +`azion_certificate_request` também recebe `results`, com `name`, `common_name`, `authority` (`lets_encrypt`) e `challenge` (`dns` ou `http`). O provider só consegue criar uma solicitação de certificado: ele não tem operação de atualização para ela. `azion_certificate_signing_request` recebe os campos de subject da CSR em `results`, e uma mudança em qualquer um deles recria a CSR. `azion_crl` recebe `crl`, com `name`, `issuer` e o conteúdo da lista em `crl`. A página de cada recurso no Terraform Registry lista todos os argumentos. --- @@ -35,19 +40,22 @@ Um certificado digital é o par de certificado SSL/TLS e chave privada que permi | --- | --- | | [`azion_digital_certificates`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificates) | Lista certificados digitais. | | [`azion_digital_certificate`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/digital_certificate) | Lê um certificado digital. | +| [`azion_crls`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crls) | Lista listas de revogação de certificados. | +| [`azion_crl`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/crl) | Lê uma lista de revogação de certificados. | --- ## Exemplo -Esta configuração fixa a versão do provider, cria um certificado a partir de um arquivo de certificado e de um arquivo de chave privada na pasta `certificates` do diretório indicado por `path.module`, lê os certificados existentes e exibe o ID do certificado em um output. Ela lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. +Esta configuração fixa o provider na versão 2.10.0, cria um certificado a partir de um arquivo de certificado e de um arquivo de chave privada na pasta `certificates` do diretório indicado por `path.module`, lê os certificados existentes e exibe o ID do certificado em um output. Ela lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. +{/* terraform-validate: skip — file() needs the PEM files on disk; the next sample validates the same resource with variables */} ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -58,16 +66,18 @@ provider "azion" { # Create digital certificate resource "azion_digital_certificate" "my_cert" { - name = "certificate-mydomain" - certificate = file("${path.module}/certificates/mydomain.pem") - private_key = file("${path.module}/certificates/mydomain-key.pem") + results = { + name = "certificate-mydomain" + certificate_content = file("${path.module}/certificates/mydomain.pem") + private_key = file("${path.module}/certificates/mydomain-key.pem") + } } # Query existing certificates data "azion_digital_certificates" "all" {} output "certificate_id" { - value = azion_digital_certificate.my_cert.id + value = azion_digital_certificate.my_cert.results.id } ``` @@ -87,9 +97,11 @@ variable "ssl_private_key" { } resource "azion_digital_certificate" "my_cert" { - name = "my-certificate" - certificate = var.ssl_certificate - private_key = var.ssl_private_key + results = { + name = "my-certificate" + certificate_content = var.ssl_certificate + private_key = var.ssl_private_key + } } ``` @@ -103,7 +115,7 @@ Uma forma mais curta, com `cert.pem` e `key.pem` na raiz do diretório indicado Os recursos que gerenciam aplicações, as suas configurações de cache, regras, device groups e instâncias de functions. Os recursos que gerenciam zonas DNS, os seus registros e as suas configurações de DNSSEC. - Os recursos que gerenciam firewalls, rule sets do WAF e network lists. + Os recursos que gerenciam firewalls, WAF rule sets e as suas exceções, e network lists. As mudanças a fazer quando uma configuração ainda usa o provider v1.x e a API v3. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/connectors.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/connectors.mdx index a1c7d712f8..9d97e8a3c3 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/connectors.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/connectors.mdx @@ -25,7 +25,12 @@ Um connector define como as suas aplicações se comunicam com as origens que gu | --- | --- | | [`azion_connector`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/connector) | Cria e gerencia um connector. | -`azion_connector` exige `name`, uma string que contém o nome único do connector, e exporta `id`, uma string que contém o ID único do connector. A página do recurso no Terraform Registry lista todos os argumentos. +`azion_connector` recebe as suas configurações em um único atributo aninhado, `connector`. Ele exige `name`, uma string que contém o nome único do connector, e `type`, que é `http` ou `storage`: + +- Um connector `http` exige `http_attributes.addresses`, uma lista de endereços de origem. Cada item recebe um `endpoint` com o `address` da origem e os opcionais `http_port`, `https_port` e `active`. `http_attributes` também recebe os opcionais `connection_options` e os módulos `load_balancer` e `origin_shield`. +- Um connector `storage` exige `storage_attributes.bucket`, o nome do bucket que guarda o conteúdo, e recebe um `prefix` opcional. + +Depois do apply, `connector.id` contém o ID numérico do connector. A página do recurso no Terraform Registry lista todos os argumentos. --- @@ -40,14 +45,14 @@ Um connector define como as suas aplicações se comunicam com as origens que gu ## Exemplo -Esta configuração fixa a versão do provider, cria um connector, lê os connectors existentes e exibe o ID do connector em um output. Ela lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. +Esta configuração fixa o provider na versão 2.10.0, cria um connector HTTP para a origem `origin.example.com` nas portas 80 e 443, lê os connectors existentes e exibe o ID do connector em um output. Ela lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -56,18 +61,32 @@ provider "azion" { api_token = var.api_token } -# Create a connector +# Create an HTTP connector resource "azion_connector" "my_origin" { - name = "my-origin" - - # Origin configuration + connector = { + name = "my-origin" + type = "http" + active = true + + http_attributes = { + addresses = [ + { + endpoint = { + address = "origin.example.com" + http_port = 80 + https_port = 443 + } + } + ] + } + } } # Query existing connectors data "azion_connectors" "all" {} output "connector_id" { - value = azion_connector.my_origin.id + value = azion_connector.my_origin.connector.id } ``` diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/security.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/security.mdx index 6a86f60be9..3cdd2d1228 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/security.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/security.mdx @@ -2,7 +2,7 @@ title: Recursos de segurança description: >- Recursos e data sources do Azion Terraform Provider que gerenciam firewalls, - as suas regras e instâncias de functions, WAFs e network lists. + regras e instâncias de functions, WAF rule sets e network lists. meta_tags: 'terraform, firewall, WAF, segurança, network lists, infraestrutura como código, api v4' namespace: documentation_terraform_resources_security permalink: /documentacao/devtools/terraform/security/ @@ -15,7 +15,7 @@ import DocItem from '@aziontech/webkit/doc-item' -Os recursos de segurança do Azion Terraform Provider configuram o que bloqueia uma requisição antes que ela chegue à sua aplicação: proteção contra ameaças, bloqueio por geolocalização e rate limiting. O provider gerencia um [Firewall](/pt-br/documentacao/plataforma/firewall/) e as suas regras e instâncias de functions, as configurações de Web Application Firewall (WAF) e os seus [conjuntos de regras](/pt-br/documentacao/plataforma/firewall/waf/rule-sets/), e [Network Lists](/pt-br/documentacao/plataforma/firewall/network-shield/network-lists/) com seis recursos. Doze data sources leem os mesmos objetos de volta: para cada tipo de recurso, um lista os objetos e outro lê um único objeto. +Os recursos de segurança do Azion Terraform Provider configuram o que bloqueia uma requisição antes que ela chegue à sua aplicação: proteção contra ameaças, bloqueio por geolocalização e rate limiting. O provider gerencia um [Firewall](/pt-br/documentacao/plataforma/firewall/) e as suas regras, a ordem delas e as suas instâncias de functions, os [rule sets](/pt-br/documentacao/plataforma/firewall/waf/rule-sets/) do Web Application Firewall (WAF) e as suas [exceções](/pt-br/documentacao/plataforma/firewall/waf/custom-allowed-rules/), e [Network Lists](/pt-br/documentacao/plataforma/firewall/network-shield/network-lists/) com sete recursos. Doze data sources leem os mesmos objetos de volta: para cada tipo de objeto, exceto a ordem das regras, um lista os objetos e outro lê um único objeto. --- @@ -25,12 +25,24 @@ Os recursos de segurança do Azion Terraform Provider configuram o que bloqueia | --- | --- | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_main_setting) | Cria e gerencia as configurações principais de um firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine) | Cria e gerencia uma regra do Rules Engine de um firewall. | +| [`azion_firewall_rule_engine_order`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine_order) | Define a ordem das regras do Rules Engine de um firewall. | | [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_functions_instance) | Cria e gerencia uma instância de function em um firewall. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Cria e gerencia um WAF. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Cria e gerencia um conjunto de regras de WAF. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | Cria e gerencia um WAF rule set, que Azion Console lista em **WAF Rules**. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | Cria e gerencia uma [exceção de WAF](/pt-br/documentacao/plataforma/firewall/waf/custom-allowed-rules/), que Azion Console lista como uma allowed rule, em um rule set. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/network_list) | Cria e gerencia uma network list de endereços IP e intervalos CIDR, países ou ASNs. | -`azion_firewall_main_setting` exige `name`, uma string que contém o nome do firewall, e aceita `active`, um booleano que define se o firewall está ativo. `azion_network_list` exige `name`, uma string que contém o nome da lista, e `list_type`, uma string que aceita `ip_cidr`, `countries` ou `asns`. `azion_waf_rule_set` aceita um `name`. A página de cada recurso no Terraform Registry lista todos os argumentos. +Estes recursos recebem as suas configurações em um único atributo aninhado: + +| Recurso | Atributo aninhado | Campos | +| --- | --- | --- | +| `azion_firewall_main_setting` | `data` | Exige `name`. O opcional `active` define se o firewall está ativo, e `modules` ativa os módulos `waf`, `network_protection` e `functions`. | +| `azion_firewall_rule_engine` | `results` | Exige `name`, `criteria` e `behaviors`, como `deny`, `drop`, `set_waf` ou `set_rate_limit`. | +| `azion_firewall_functions_instance` | `data` | Exige `name` e `function`, o ID de uma function que o recurso `azion_function` gerencia. | +| `azion_waf` | `result` | Exige `name`. O opcional `engine_settings` guarda as famílias de ameaças e a sensibilidade delas. | +| `azion_waf_rule_set` | `result` | Exige `name` e `conditions`, as partes da requisição que a exceção isenta. O opcional `rule_id` é a regra interna que ela isenta, e `0` isenta todas. | +| `azion_network_list` | `results` | Exige `name`, `type` (`ip_cidr`, `countries` ou `asn`) e `items`, os endereços IP e intervalos CIDR, os códigos de país ou os ASNs da lista. | + +Os recursos de regra, de ordem das regras e de instância de function recebem o ID do firewall em `firewall_id`, e `azion_waf_rule_set` recebe o ID do rule set em `waf_id`, fora do atributo aninhado. Depois do apply, `data.id` contém o ID numérico de um firewall e `result.id`, o ID numérico de um WAF rule set. Um rule set só pontua requisições quando o firewall tem o módulo `waf` ativo e uma regra do firewall executa o behavior `set_waf` com o ID do rule set e o modo `logging` ou `blocking`. Um firewall é executado em um workload pelo atributo `firewall` da strategy de um deployment; para mais informações, consulte [Recursos de Workloads](/pt-br/documentacao/devtools/terraform/workloads/). Um módulo que `modules` omite volta ao seu padrão a cada apply. A página de cada recurso no Terraform Registry lista todos os argumentos. --- @@ -40,14 +52,14 @@ Os recursos de segurança do Azion Terraform Provider configuram o que bloqueia | --- | --- | | [`azion_firewall_main_settings`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_settings) | Lista firewalls. | | [`azion_firewall_main_setting`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_setting) | Lê um firewall. | -| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lista as regras do Rules Engine de firewalls. | +| [`azion_firewall_rules_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | Lista as regras do Rules Engine de um firewall. | | [`azion_firewall_rule_engine`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rule_engine) | Lê uma regra do Rules Engine de um firewall. | -| [`azion_firewall_function_instances`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lista as instâncias de functions de firewalls. | -| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lê uma instância de function de um firewall. | -| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lista WAFs. | -| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Lê um WAF. | -| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lista conjuntos de regras de WAF. | -| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Lê um conjunto de regras de WAF. | +| [`azion_firewall_functions_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | Lista as instâncias de functions de um firewall. | +| [`azion_firewall_function_instance`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_function_instance) | Lê uma instância de function de um firewall. | +| [`azion_wafs`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | Lista WAF rule sets. | +| [`azion_waf`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf) | Lê um WAF rule set. | +| [`azion_waf_rule_sets`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | Lista as exceções de um WAF rule set. | +| [`azion_waf_rule_set`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_set) | Lê uma exceção de WAF. | | [`azion_network_lists`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_lists) | Lista network lists. | | [`azion_network_list`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_list) | Lê uma network list. | @@ -55,14 +67,14 @@ Os recursos de segurança do Azion Terraform Provider configuram o que bloqueia ## Exemplo -Esta configuração fixa a versão do provider, cria uma network list de intervalos IP, um firewall ativo e um conjunto de regras de WAF, e exibe o ID do firewall em um output. Ela lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. +Esta configuração fixa o provider na versão 2.10.0 e cria uma network list de intervalos IP bloqueados e um firewall ativo com os módulos de WAF e de proteção de rede ativos. Ela cria um WAF rule set com uma exceção para o caminho `/health`, adiciona uma regra de firewall que nega as requisições vindas da network list e uma regra que executa o rule set no modo `blocking` em todas as requisições. Ela exibe o ID do firewall em um output e lê o seu personal token da variável `api_token` que [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/) declara. ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -73,30 +85,137 @@ provider "azion" { # Create network list for blocked IPs resource "azion_network_list" "blocked_ips" { - name = "blocked-ips" - list_type = "ip_cidr" + results = { + name = "blocked-ips" + type = "ip_cidr" + items = ["192.0.2.0/24", "198.51.100.10"] + } } # Create firewall resource "azion_firewall_main_setting" "my_firewall" { - name = "my-firewall" - active = true + data = { + name = "my-firewall" + active = true + + modules = { + waf = { + enabled = true + } + network_protection = { + enabled = true + } + } + } +} + +# Create a WAF rule set +resource "azion_waf" "my_waf" { + result = { + name = "my-waf" + active = true + } +} - # Link to workload/application +# Create WAF exception for the health check path +resource "azion_waf_rule_set" "health_check" { + waf_id = azion_waf.my_waf.result.id + + result = { + name = "allow-health-check" + active = true + path = "/health" + operator = "contains" + rule_id = 0 + + conditions = [ + { + condition = { + match = "any_url" + condition_type = "generic" + } + } + ] + } } -# Create WAF rule set -resource "azion_waf_rule_set" "my_waf" { - name = "my-waf" +# Deny requests from the network list +resource "azion_firewall_rule_engine" "deny_blocked_ips" { + firewall_id = azion_firewall_main_setting.my_firewall.data.id + + results = { + name = "deny-blocked-ips" + active = true + + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${network}" + operator = "is_in_list" + conditional = "if" + argument = azion_network_list.blocked_ips.id + } + } + ] + } + ] + + behaviors = [ + { + behavior = { + type = "deny" + } + } + ] + } +} - # WAF configuration +# Run the WAF on every request +resource "azion_firewall_rule_engine" "run_waf" { + firewall_id = azion_firewall_main_setting.my_firewall.data.id + + results = { + name = "run-waf" + active = true + + criteria = [ + { + entries = [ + { + criterion = { + variable = "$${request_uri}" + operator = "starts_with" + conditional = "if" + argument = "/" + } + } + ] + } + ] + + behaviors = [ + { + behavior = { + type = "set_waf" + attributes = { + waf_id = azion_waf.my_waf.result.id + mode = "blocking" + } + } + } + ] + } } output "firewall_id" { - value = azion_firewall_main_setting.my_firewall.id + value = azion_firewall_main_setting.my_firewall.data.id } ``` +Os critérios escrevem as variáveis `${network}` e `${request_uri}` como `$${network}` e `$${request_uri}`. Com um único `$`, o Terraform lê as variáveis como interpolações e falha. Para `is_in_list`, o `argument` é o ID da network list. + --- ## Recursos relacionados @@ -107,5 +226,6 @@ output "firewall_id" { Todos os recursos e data sources do provider, com um exemplo por família. Os recursos que gerenciam aplicações, as suas configurações de cache, regras, device groups e instâncias de functions. Os nomes de recursos e os argumentos que mudaram entre o provider v1.x e a v2.0. + Os recursos que fazem o deploy de uma aplicação e de um firewall em um workload. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/workloads.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/workloads.mdx index 3e9758b0e4..f84660dddb 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/workloads.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/resources/workloads.mdx @@ -26,7 +26,9 @@ Um workload é o objeto que recebe o tráfego de um conjunto de domínios e guar | [`azion_workload`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload) | Cria e gerencia um workload. | | [`azion_workload_deployment`](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/workload_deployment) | Cria e gerencia um deployment de um workload. | -`azion_workload` exige `name`, uma string que contém o nome único do workload, e exporta `id`, uma string que contém o ID único do workload. `azion_workload_deployment` exige `workload_id`, uma string que contém o ID do workload do qual ele faz o deploy. A página de cada recurso no Terraform Registry lista todos os argumentos. +Cada recurso recebe as suas configurações em um único atributo aninhado. `azion_workload` recebe `workload`, que exige `name`, uma string que contém o nome único do workload. O mesmo atributo guarda as configurações opcionais `domains`, `active`, `tls`, `protocols` e `mtls`. Depois do apply, `workload.id` contém o ID numérico do workload. + +`azion_workload_deployment` exige `workload_id`, o ID numérico do workload do qual ele faz o deploy, e `deployment`, que exige um `name` e uma `strategy`. A strategy recebe `type = "default"` e, em `attributes`, o ID numérico da aplicação que responde em `application`, além dos IDs opcionais `firewall` e `custom_page`. O deployment é o único lugar que vincula uma aplicação a um workload: `azion_workload` não recebe ID de aplicação. A página de cada recurso no Terraform Registry lista todos os argumentos. --- @@ -43,14 +45,14 @@ Um workload é o objeto que recebe o tráfego de um conjunto de domínios e guar ## Exemplo -Esta configuração fixa a versão do provider, cria um workload e um deployment dele, lê os workloads existentes e retorna o ID do workload em um output. Ela lê o seu personal token da variável `api_token`, declarada em [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/). +Esta configuração fixa o provider na versão 2.10.0, cria uma aplicação, cria um workload para o domínio `www.example.com` e faz o deploy da aplicação no workload. Ela também lê os workloads existentes e retorna o ID do workload em um output. Ela lê o seu personal token da variável `api_token`, declarada em [Primeiros passos com o Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/getting-started/). ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -59,23 +61,46 @@ provider "azion" { api_token = var.api_token } +# Create the application that answers on the workload +resource "azion_application_main_setting" "my_app" { + application = { + name = "my-application" + active = true + } +} + # Create a workload -resource "azion_workload" "my_app" { - name = "my-application" +resource "azion_workload" "my_workload" { + workload = { + name = "my-workload" + active = true + domains = ["www.example.com"] + } } -# Create a deployment for the workload -resource "azion_workload_deployment" "my_app_deployment" { - workload_id = azion_workload.my_app.id +# Deploy the application on the workload +resource "azion_workload_deployment" "my_deployment" { + workload_id = azion_workload.my_workload.workload.id + + deployment = { + name = "my-deployment" + active = true + current = true - # Additional deployment configuration + strategy = { + type = "default" + attributes = { + application = azion_application_main_setting.my_app.application.application_id + } + } + } } # Query existing workloads data "azion_workloads" "all" {} output "workload_id" { - value = azion_workload.my_app.id + value = azion_workload.my_workload.workload.id } ``` diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraform.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraform.mdx index 9b55688c31..8c16e19aee 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraform.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraform.mdx @@ -26,14 +26,14 @@ A versão 2.0 do provider funciona apenas com a Azion API v4. Se a sua conta usa ## Configuração do provider -Um projeto Terraform para a Azion declara o provider uma vez e, em seguida, um bloco por resource. Esta configuração fixa a versão 2.0.0 do provider e declara um workload: +Um projeto Terraform para a Azion declara o provider uma vez e, em seguida, um bloco por resource. Esta configuração fixa a versão 2.10.0 do provider e declara um workload: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -45,13 +45,16 @@ provider "azion" { # Create a workload resource "azion_workload" "my_workload" { - name = "my-first-workload" + workload = { + name = "my-first-workload" + active = true + } } ``` - O bloco `required_providers` indica a origem no Registry, `aziontech/azion`, e uma versão fixa do provider. O `terraform init` instala essa versão. - O bloco `provider "azion"` configura o provider. Ele fica vazio quando o seu personal token está na variável de ambiente `AZION_API_TOKEN`; caso contrário, o argumento `api_token` passa o token. -- Cada bloco `resource` declara um objeto da sua conta. O tipo, como `azion_workload`, indica o tipo de objeto, e o rótulo, como `my_workload`, dá nome ao objeto dentro da configuração. +- Cada bloco `resource` declara um objeto da sua conta. O tipo, como `azion_workload`, indica o tipo de objeto, e o rótulo, como `my_workload`, dá nome ao objeto dentro da configuração. A maioria dos tipos de recurso recebe os argumentos em um único bloco aninhado, como `workload = { ... }`. Os blocos seguem a linguagem padrão do Terraform, então uma configuração escrita para outro provider tem o mesmo formato. Só os tipos `azion_*` mudam. diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraformV3.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraformV3.mdx index 17999d933d..a964e1037e 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraformV3.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/terraformV3.mdx @@ -3,7 +3,7 @@ title: Azion Terraform Provider v1.x (API v3) description: >- Documentação legada do Azion Terraform Provider v1.x, compatível com a Azion API v3. Para novos projetos, use o Terraform Provider v2.0 com a API v4. -meta_tags: 'terraform, javascript' +meta_tags: 'terraform, terraform provider, provider v1.x, infraestrutura como código, azion, api v3' namespace: documentation_terraform_provider_v3 permalink: /documentacao/devtools/terraform/terraform-provider-v3/ --- @@ -40,37 +40,56 @@ O **Terraform** funciona [com base em providers](https://developer.hashicorp.com ## Primeiros passos -Em seu arquivo `.tf`, você deve definir o **Azion Terraform Provider** como o provider e definir também a versão dele, como neste exemplo: +Em seu arquivo `.tf`, você deve definir o **Azion Terraform Provider** como o provider e definir também a versão dele, dentro do bloco `terraform`, como neste exemplo: -```json - required_providers { - source = "aziontech/azion" - version = "1.x.y" // it depends on the version you're willing to use. +{/* terraform-validate: skip */} +```hcl +terraform { + required_providers { + azion = { + source = "aziontech/azion" + version = "1.41.0" # The last v1.x release. Pin the v1.x version you use. } + } +} ``` -Com o provider configurado, é recomendado configurar um [personal token](/pt-br/documentacao/fundamentos/personal-tokens/): +Com o provider configurado, é recomendado configurar um [personal token](/pt-br/documentacao/fundamentos/personal-tokens/). O bloco `provider "azion"` lê o token de uma variável, então ele fica fora do arquivo: -```json - provider "azion" { - api_token = "token" // Here you place your personal token - } +{/* terraform-validate: skip */} +```hcl +provider "azion" { + api_token = var.api_token +} ``` -> **Nota**: se o personal token não for fornecido como mostrado acima, um prompt pedirá que você o informe ao tentar executar qualquer comando do Terraform. +:::note[nota] +Se a variável `api_token` não tiver valor, por exemplo vindo de `TF_VAR_api_token` ou de um arquivo `.tfvars`, um prompt pede o valor quando você executa um comando do Terraform. +::: Após essas etapas, você estará pronto para começar a gerenciar sua infraestrutura usando o Azion Terraform Provider. Seu arquivo `.tf` deve ficar assim neste ponto: -```json - required_providers { - source = "aziontech/azion" - version = "1.x.y" // it depends on the version you're willing to use. - } - provider "azion" { - api_token = "token" // Here you place your personal token - } +{/* terraform-validate: skip */} +```hcl +terraform { + required_providers { + azion = { + source = "aziontech/azion" + version = "1.41.0" # The last v1.x release. Pin the v1.x version you use. + } + } +} + +variable "api_token" { + type = string + sensitive = true +} + +provider "azion" { + api_token = var.api_token +} ``` --- diff --git a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/troubleshooting.mdx b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/troubleshooting.mdx index 48fab5f39c..535344d713 100644 --- a/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/troubleshooting.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/devtools/terraform/troubleshooting.mdx @@ -71,17 +71,17 @@ Could not retrieve the list of available versions for provider aziontech/azion O Terraform localiza o provider pela source e pela versão do bloco `required_providers`. A source do Azion Terraform Provider é `aziontech/azion`. -- **Verifique a source e a versão**: defina `source` como `aziontech/azion` e `version` como a versão do provider que você usa, como `2.0.0`. +- **Verifique a source e a versão**: defina `source` como `aziontech/azion` e `version` como a versão do provider que você usa, como `2.10.0`. - **Atualize o provider instalado**: `terraform init -upgrade` baixa a versão que o bloco define. Para a atualização completa para a v2.0, consulte [Atualize o provider para a v2.0](/pt-br/documentacao/devtools/terraform/migration-v3-to-v4/). -Este bloco `required_providers` define a source e fixa a versão `2.0.0` do provider: +Este bloco `required_providers` define a source e fixa a versão `2.10.0` do provider: ```hcl terraform { required_providers { azion = { source = "aziontech/azion" - version = "2.0.0" + version = "2.10.0" } } } @@ -93,7 +93,7 @@ Para baixar a versão do provider que o bloco define, execute este comando no di terraform init -upgrade ``` -O Terraform instala no projeto a versão do provider que o bloco define, como `2.0.0`. +O Terraform instala no projeto a versão do provider que o bloco define, como `2.10.0`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/componentes.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/componentes.mdx index bfe28a6bd5..1f076f0234 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/componentes.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/componentes.mdx @@ -124,7 +124,7 @@ import Tag from '~/components/webkit/Tag.vue' ``` - Sem diretiva client: o selo é HTML estático. -- `severity` é `success`, `info`, `warning` ou `danger`. `info` é o chip neutro de rótulo, usado para "Preview" e selos de recurso de plataforma; os outros três são cores de status. +- `severity` é `success`, `info`, `warning` ou `danger`. `info` é o chip neutro de rótulo, usado para "Preview" e selos de recurso da plataforma; os outros três são cores de status. - O rótulo vai nos filhos. `value="Preview"` também é aceito. ## Video @@ -163,7 +163,7 @@ Todo diagrama segue as mesmas regras: - **Abra com a linha `init` compartilhada** que o exemplo mostra. Ela organiza o diagrama com o ELK, dá espaço aos rótulos e reduz um diagrama mais largo que a coluna até caber nela. Quando o primeiro nó não aparece no topo, adicione um objeto `elk` logo depois de `"layout": "elk",`. Em um diagrama com um ciclo, como uma requisição e a resposta dela, use as opções de ordem do modelo do ELK, para que a ordem de declaração decida as camadas: `"cycleBreakingStrategy": "MODEL_ORDER"`, ou `"preset": "modelOrder", "keepEntryNodeOnTop": true`. Em um diagrama com mais de um nó de partida, use `"layeringStrategy": "LONGEST_PATH_SOURCE"`, que põe todos os nós de partida na primeira linha. - **Desenhe todo flowchart de cima para baixo** (`flowchart TD`), inclusive uma cadeia de etapas. Uma cadeia desenhada da esquerda para a direita fica mais larga que a coluna e reduz os rótulos para caber. -- **Dê uma forma a cada papel.** O cliente é um estádio (`(["Cliente"])`), tudo o que está na Azion, um produto ou um recurso de plataforma, é um retângulo (`["aplicação"]`), um armazenamento de dados é um cilindro (`[("KV Store")]`), e um sistema fora da Azion é uma sub-rotina (`[["servidor de origem"]]`). Uma etapa, um estado ou uma decisão mantém o retângulo ou o losango. +- **Dê uma forma a cada papel.** O cliente é um estádio (`(["Cliente"])`), tudo o que está na Azion, um produto ou um recurso da plataforma, é um retângulo (`["aplicação"]`), um armazenamento de dados é um cilindro (`[("KV Store")]`), e um sistema fora da Azion é uma sub-rotina (`[["servidor de origem"]]`). Uma etapa, um estado ou uma decisão mantém o retângulo ou o losango. - **Deixe o estilo da linha dizer para onde o fluxo vai.** Quando um diagrama desenha uma requisição e a resposta dela, setas contínuas (`-->`) levam a requisição e setas pontilhadas (`-.->`) levam a resposta. Um fluxo que roda separado de qualquer requisição, como um purge ou um stream de logs, usa setas grossas (`==>`). ## Passos @@ -323,7 +323,7 @@ Uma página sobre um recurso que existe na API v3 e na API v4 tem exatamente um | `versionDualSteps` | O fim da introdução de um guia com passos para a API v4 e para a API v3 | Nenhuma | A API v4 chega a todas as contas. Os passos da API v3 saem junto | | `versionDeprecated` | O topo de uma página da API v3 | Um link para a página da API v4, com o título dela | A API v4 chega a todas as contas. A página passa a redirecionar para a contraparte na API v4, nunca para uma página inicial | -Uma página da API v3 não aparece na navegação. A linha dela na árvore de navegação tem `"hidden": true`, então a página mantém a sidebar e o breadcrumb do recurso de plataforma, e o leitor chega a ela pelo aviso da contraparte na API v4. +Uma página da API v3 não aparece na navegação. A linha dela na árvore de navegação tem `"hidden": true`, então a página mantém a sidebar e o breadcrumb do recurso da plataforma, e o leitor chega a ela pelo aviso da contraparte na API v4. A data em que a API v3 for desligada aparece só em `versionDeprecated` e em [Migração para API v4](/pt-br/documentacao/fundamentos/api-v4-migration/). @@ -333,7 +333,7 @@ O bloco de cabeçalho de uma página de vitrine de template. Importe de `~/compo ## ProductGuidesSection -Renderiza o hub de Guias e tutoriais como uma tabela de nome, tipo e última atualização. Usado na página de hub da seção de um recurso de plataforma, e em nenhum outro lugar. +Renderiza o hub de Guias e tutoriais como uma tabela de nome, tipo e última atualização. Usado na página de hub da seção de um recurso da plataforma, e em nenhum outro lugar. ```mdx import ProductGuidesSection from '~/components/ProductGuidesSection.astro' @@ -341,7 +341,7 @@ import ProductGuidesSection from '~/components/ProductGuidesSection.astro' ``` -- `product` — o id da seção, como `applications`. A tabela lista todo guia que o catálogo de guias marca com a seção ou com um recurso de plataforma aninhado nela. +- `product` — o id da seção, como `applications`. A tabela lista todo guia que o catálogo de guias marca com a seção ou com um recurso da plataforma aninhado nela. - A data é a da última alteração da página, preenchida automaticamente. Nunca escreva a data à mão. - A coluna de tipo mostra o tipo de conteúdo de cada página, no idioma do leitor. - As linhas ordenam em ordem alfabética pelo rótulo de navegação de cada página, no idioma do leitor, nunca por data. A coluna de nome mostra esse rótulo, não o título da página. @@ -350,7 +350,7 @@ import ProductGuidesSection from '~/components/ProductGuidesSection.astro' ## GlossaryFilter -Filtro no navegador sobre uma tabela de glossário. Usado na página de Glossário de um recurso de plataforma, e em nenhum outro lugar. +Filtro no navegador sobre uma tabela de glossário. Usado na página de Glossário de um recurso da plataforma, e em nenhum outro lugar. ```mdx import GlossaryFilter from '~/components/GlossaryFilter.astro' diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura-de-informacao.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura-de-informacao.mdx index 8bc518340e..8c41691c1e 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura-de-informacao.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura-de-informacao.mdx @@ -2,7 +2,7 @@ title: Arquitetura de informação description: >- Siga a estrutura alvo da documentação da Azion: o esqueleto de seção de - recurso de plataforma, a ordem da jornada do leitor e onde uma página nova entra. + recurso da plataforma, a ordem da jornada do leitor e onde uma página nova entra. meta_tags: 'style guide, information architecture, navigation, sidebar' namespace: documentation_style_guide_information_architecture permalink: /documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/ @@ -10,26 +10,26 @@ permalink: /documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/ Esta página define a estrutura alvo da documentação da Azion. Seções novas seguem esta estrutura, e as seções existentes convergem para ela conforme são revisadas. Não copie a estrutura de uma seção existente: este padrão vence. -Dois princípios organizam tudo. As seções seguem a ordem da jornada do leitor com o recurso de plataforma. Cada seção contém um [tipo de conteúdo](/pt-br/documentacao/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo/), então a jornada decide onde a seção fica e o tipo decide como as páginas dela são. +Dois princípios organizam tudo. As seções seguem a ordem da jornada do leitor com o recurso da plataforma. Cada seção contém um [tipo de conteúdo](/pt-br/documentacao/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo/), então a jornada decide onde a seção fica e o tipo decide como as páginas dela são. -## O esqueleto de seção de recurso de plataforma +## O esqueleto de seção de recurso da plataforma -Toda seção de recurso de plataforma segue esta ordem. A tabela mostra o que cada slot contém e quando ele existe. +Toda seção de recurso da plataforma segue esta ordem. A tabela mostra o que cada slot contém e quando ele existe. -Um tipo de recurso de plataforma com seção própria (Workloads, Edge DNS, Applications, Connectors, Firewall) segue o mesmo esqueleto. A visão geral descreve o tipo de recurso, o quickstart cria a primeira instância, e Glossário, Preços e Changelog são obrigatórios, como em toda seção. Um recurso de plataforma aninhado em outro não mantém seção própria: ele entra na seção do recurso pai como uma linha dropdown na posição do slot 4, e a URL dele fica aninhada sob o pai, como em `/documentacao/plataforma/firewall/waf/`. A regra de aninhamento e o que o dropdown contém estão em [Recursos de plataforma aninhados](#recursos-de-plataforma-aninhados). +Um tipo de recurso da plataforma com seção própria (Workloads, Edge DNS, Applications, Connectors, Firewall) segue o mesmo esqueleto. A visão geral descreve o tipo de recurso, o quickstart cria a primeira instância, e Glossário, Preços e Changelog são obrigatórios, como em toda seção. Um recurso da plataforma aninhado em outro não mantém seção própria: ele entra na seção do recurso pai como uma linha dropdown na posição do slot 4, e a URL dele fica aninhada sob o pai, como em `/documentacao/plataforma/firewall/waf/`. A regra de aninhamento e o que o dropdown contém estão em [Recursos da plataforma aninhados](#recursos-da-plataforma-aninhados). | Ordem | Slot | Obrigatório | Contém | | --- | --- | --- | --- | -| 1 | Visão geral | Sim | A página raiz da seção: o que o recurso de plataforma é, o que ele faz, quando usar | -| 2 | Primeiros passos | Sim | [Páginas de quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/): de não usar o recurso de plataforma ao menor resultado funcional | -| 3 | Como funciona | Quando o recurso de plataforma precisa de explicação | [Páginas de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/): o mecanismo, o trade-off, como escolher entre opções | -| 4 | Features | Quando o recurso de plataforma tem superfícies próprias ou recursos de plataforma aninhados | As superfícies do próprio recurso, como um rules engine, o Tiered Cache ou uma API de runtime, e as linhas dropdown dos recursos de plataforma aninhados nele | -| 5 | Guias e tutoriais | Quando o recurso de plataforma tem tarefas | Um [hub de navegação](/pt-br/documentacao/guia-de-estilo/conteudo/hubs-de-navegacao/) que lista os [guias how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) e os [tutoriais](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) | -| 6 | Exemplos | Somente Functions | Código funcional que o leitor copia, agrupado por linguagem ou por tarefa. Uma configuração pronta de qualquer outro recurso de plataforma é um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) no catálogo de guias, listado pelo hub de Guias e tutoriais do recurso | -| 7 | Referência | Quando o recurso de plataforma tem configurações | [Páginas de referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/): campos, valores, padrões | -| 8 | Limites | Quando o recurso de plataforma tem limites | A tabela de limites, dimensionada por plano | -| 9 | Boas práticas | Opcional | Como operar bem o recurso de plataforma, e o raciocínio por trás de cada recomendação | -| 10 | Solução de problemas | Quando o recurso de plataforma tem sintomas conhecidos | [Páginas de troubleshooting](/pt-br/documentacao/guia-de-estilo/conteudo/troubleshooting/): sintoma, causa, correção | +| 1 | Visão geral | Sim | A página raiz da seção: o que o recurso da plataforma é, o que ele faz, quando usar | +| 2 | Primeiros passos | Sim | [Páginas de quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/): de não usar o recurso da plataforma ao menor resultado funcional | +| 3 | Como funciona | Quando o recurso da plataforma precisa de explicação | [Páginas de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/): o mecanismo, o trade-off, como escolher entre opções | +| 4 | Features | Quando o recurso da plataforma tem superfícies próprias ou recursos da plataforma aninhados | As superfícies do próprio recurso, como um rules engine, o Tiered Cache ou uma API de runtime, e as linhas dropdown dos recursos da plataforma aninhados nele | +| 5 | Guias e tutoriais | Quando o recurso da plataforma tem tarefas | Um [hub de navegação](/pt-br/documentacao/guia-de-estilo/conteudo/hubs-de-navegacao/) que lista os [guias how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) e os [tutoriais](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) | +| 6 | Exemplos | Somente Functions | Código funcional que o leitor copia, agrupado por linguagem ou por tarefa. Uma configuração pronta de qualquer outro recurso da plataforma é um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) no catálogo de guias, listado pelo hub de Guias e tutoriais do recurso | +| 7 | Referência | Quando o recurso da plataforma tem configurações | [Páginas de referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/): campos, valores, padrões | +| 8 | Limites | Quando o recurso da plataforma tem limites | A tabela de limites, dimensionada por plano | +| 9 | Boas práticas | Opcional | Como operar bem o recurso da plataforma, e o raciocínio por trás de cada recomendação | +| 10 | Solução de problemas | Quando o recurso da plataforma tem sintomas conhecidos | [Páginas de troubleshooting](/pt-br/documentacao/guia-de-estilo/conteudo/troubleshooting/): sintoma, causa, correção | | 11 | Glossário | Sim | [Páginas de glossário](/pt-br/documentacao/guia-de-estilo/conteudo/glossario/): os termos que a documentação do recurso usa, definidos em uma tabela filtrável | | 12 | Preços | Sim | Um link para a seção do recurso na página de Preços | | 13 | Changelog | Sim | Um link para as entradas de changelog do recurso | @@ -40,7 +40,7 @@ Dois slots têm uma forma fixa na sidebar. A tabela é gerada, não escrita. A data é a da última alteração da página e o tipo é o tipo de conteúdo que o catálogo de guias registra para a página, então o hub não diverge das páginas que lista. -**Referência é um grupo fixo.** A sidebar mostra um pai **Referência** com uma linha por página de referência. O nome do grupo é o mesmo em toda seção de recurso de plataforma, então o leitor encontra os campos no mesmo lugar em todas. +**Referência é um grupo fixo.** A sidebar mostra um pai **Referência** com uma linha por página de referência. O nome do grupo é o mesmo em toda seção de recurso da plataforma, então o leitor encontra os campos no mesmo lugar em todas. Outras linhas podem se agrupar da mesma forma. Um grupo é um pai da sidebar, não uma página, e fica em um único nível. Ele guarda as páginas de um slot sob o nome padrão do slot. Referência é o caso canônico. O slot Primeiros passos se agrupa da mesma forma no único caso em que ainda se divide: um primeiro uso que a interface não consegue compartilhar. @@ -50,21 +50,21 @@ Não agrupe linhas que funcionam bem planas. Um pai custa um clique ao leitor em Uma feature com superfície própria repete o padrão um nível abaixo: Tiered Cache sob Cache, com o mesmo esqueleto reduzido às partes de que precisa. -## Recursos de plataforma aninhados +## Recursos da plataforma aninhados -Um recurso de plataforma aninhado em outro é uma linha dropdown dentro da seção do recurso pai, na posição do slot 4, sem rótulo de grupo: WAF, Network Shield e Bot Manager dentro de Firewall; Cache, Application Accelerator e Image Processor dentro de Applications; Load Balancer, Origin Shield e Live Ingest dentro de Connectors; Certificate Manager, Custom Pages e DDoS Protection dentro de Workloads. Em uma página, a classe dele é recurso de plataforma, qualquer que seja a classe no catálogo de nomes. Ele mantém só as páginas que são dele: as páginas de referência, um Quickstart quando tem uma configuração inicial própria e, opcionalmente, uma visão geral própria, para a qual a visão geral do pai aponta. Quando ele tem um mecanismo a explicar, o grupo Referência dele abre com uma página de mecanismo: uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/) com o título do mecanismo, como Score e modos para o WAF. Todo o resto que o leitor precisa saber sobre ele é escrito uma vez, nas páginas do pai: o que ele faz e quando ativá-lo na visão geral do pai, uma seção `## ` na página Como funciona do pai que o apresenta e aponta para a página de mecanismo dele, os limites, as práticas e os sintomas nas páginas Limites, Boas práticas e Troubleshooting do pai, os termos no glossário do pai e os guias no hub do pai. +Um recurso da plataforma aninhado em outro é uma linha dropdown dentro da seção do recurso pai, na posição do slot 4, sem rótulo de grupo: WAF, Network Shield e Bot Manager dentro de Firewall; Cache, Application Accelerator e Image Processor dentro de Applications; Load Balancer, Origin Shield e Live Ingest dentro de Connectors; Certificate Manager, Custom Pages e DDoS Protection dentro de Workloads. Em uma página, a classe dele é recurso da plataforma, qualquer que seja a classe no catálogo de nomes. Ele mantém só as páginas que são dele: as páginas de referência, um Quickstart quando tem uma configuração inicial própria e, opcionalmente, uma visão geral própria, para a qual a visão geral do pai aponta. Quando ele tem um mecanismo a explicar, o grupo Referência dele abre com uma página de mecanismo: uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/) com o título do mecanismo, como Score e modos para o WAF. Todo o resto que o leitor precisa saber sobre ele é escrito uma vez, nas páginas do pai: o que ele faz e quando ativá-lo na visão geral do pai, uma seção `## ` na página Como funciona do pai que o apresenta e aponta para a página de mecanismo dele, os limites, as práticas e os sintomas nas páginas Limites, Boas práticas e Troubleshooting do pai, os termos no glossário do pai e os guias no hub do pai. -Um recurso de plataforma se aninha quando a configuração dele vive nas configurações ou nas regras do próprio recurso pai: uma flag em `modules`, um behavior do Rules Engine ou um campo do pai. Um recurso de plataforma que o leitor consome do código (Functions, Object Storage, SQL Database, KV Store, AI Inference) e um serviço autônomo (Edge DNS, Data Stream, Orchestrator) ficam na raiz de Recursos de Plataforma. Uma feature é uma página dentro do recurso de plataforma dela, nunca um dropdown. +Um recurso da plataforma se aninha quando a configuração dele vive nas configurações ou nas regras do próprio recurso pai: uma flag em `modules`, um behavior do Rules Engine ou um campo do pai. Um recurso da plataforma que o leitor consome do código (Functions, Object Storage, SQL Database, KV Store, AI Inference) e um serviço autônomo (Edge DNS, Data Stream, Orchestrator) ficam na raiz de Recursos de Plataforma. Uma feature é uma página dentro do recurso da plataforma dela, nunca um dropdown. -O Quickstart carrega a interface dentro da página. Um recurso de plataforma cujo primeiro uso passa por Azion Console, pela Azion CLI ou pela API mantém uma página e seleciona a interface com tabs, então o slot tem uma linha e uma URL. O slot se divide apenas quando as interfaces não podem compartilhar um esqueleto de etapas, e para um agente de IA, cujo caminho é conduzido por prompt e não compartilha etapa com os outros. Essas páginas ficam agrupadas sob Quickstart, com o Console primeiro; o grupo é um pai da sidebar, não uma página. [Páginas de quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/) tem o teste. +O Quickstart carrega a interface dentro da página. Um recurso da plataforma cujo primeiro uso passa por Azion Console, pela Azion CLI ou pela API mantém uma página e seleciona a interface com tabs, então o slot tem uma linha e uma URL. O slot se divide apenas quando as interfaces não podem compartilhar um esqueleto de etapas, e para um agente de IA, cujo caminho é conduzido por prompt e não compartilha etapa com os outros. Essas páginas ficam agrupadas sob Quickstart, com o Console primeiro; o grupo é um pai da sidebar, não uma página. [Páginas de quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/) tem o teste. -O onboarding da plataforma, como [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/) em Fundamentos, é outra coisa. Primeiros passos é o slot de um recurso de plataforma. O onboarding é a porta de entrada da plataforma, e não pertence a nenhum recurso de plataforma. +O onboarding da plataforma, como [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/) em Fundamentos, é outra coisa. Primeiros passos é o slot de um recurso da plataforma. O onboarding é a porta de entrada da plataforma, e não pertence a nenhum recurso da plataforma. ## A ordem, e o que justifica um slot - **A ordem espelha a adoção.** Um slot nunca fica à frente da sua etapa. - **Preços e Changelog fecham a seção.** O leitor os consulta em vez de passar por eles. -- **A coluna Obrigatório decide o que é publicado.** Todo outro slot existe somente quando conteúdo real o preenche. A coluna vale para uma seção; um recurso de plataforma aninhado precisa somente das páginas de referência, de uma página de mecanismo quando tem um mecanismo a explicar e de um Quickstart quando tem uma configuração inicial própria. +- **A coluna Obrigatório decide o que é publicado.** Todo outro slot existe somente quando conteúdo real o preenche. A coluna vale para uma seção; um recurso da plataforma aninhado precisa somente das páginas de referência, de uma página de mecanismo quando tem um mecanismo a explicar e de um Quickstart quando tem uma configuração inicial própria. - **Nunca adicione um slot para completar o padrão**, e nunca mantenha um vazio como marcador. - **A lista de slots é fechada. Cresça dividindo um slot que a seção já tem:** Guias e tutoriais em grupos de tarefa nomeados na página de hub, Features por superfície. O slot Primeiros passos cresce dentro da própria página, por tabs de interface, e se divide apenas quando as etapas não podem ser compartilhadas. Uma lista fixa é o que permite ao leitor achar o mesmo slot no mesmo lugar em toda seção. @@ -72,9 +72,9 @@ O onboarding da plataforma, como [Criar uma conta](/pt-br/documentacao/fundament Preços vêm da Pricing API, nunca de texto. A [página de Preços](/pt-br/documentacao/fundamentos/precos/) renderiza todo preço on-demand com o componente `TablePricing`, que lê a API no build. -- **Preços é um link, nunca uma página.** O slot 12 aponta para a seção do recurso na página de Preços, como em `/documentacao/fundamentos/precos/#`. Confirme que a âncora resolve antes de publicar. Um recurso de plataforma aninhado não tem linha de Preços; o link do recurso pai o cobre. -- **Nunca digite um preço, uma cota ou uma métrica de cobrança** em uma página. Uma página que mostra preços on-demand renderiza `TablePricing` com o `product_slug` e o `metric_slug` do recurso de plataforma. Um preço digitado fica errado no dia em que muda. -- **Encontre os slugs na API.** `api/pricing/get` lista todos os registros, e `api/pricing/get/product_slug/` retorna um recurso de plataforma. Vários slugs mantêm um nome depreciado: Functions é `edge_functions`, Edge DNS é `edge_dns`, Real-Time Events é `realtime_events`, e Load Balancer e Origin Shield compartilham `connector`. Confira as chamadas de `TablePricing` que já existem na página de Preços antes de adicionar uma. +- **Preços é um link, nunca uma página.** O slot 12 aponta para a seção do recurso na página de Preços, como em `/documentacao/fundamentos/precos/#`. Confirme que a âncora resolve antes de publicar. Um recurso da plataforma aninhado não tem linha de Preços; o link do recurso pai o cobre. +- **Nunca digite um preço, uma cota ou uma métrica de cobrança** em uma página. Uma página que mostra preços on-demand renderiza `TablePricing` com o `product_slug` e o `metric_slug` do recurso da plataforma. Um preço digitado fica errado no dia em que muda. +- **Encontre os slugs na API.** `api/pricing/get` lista todos os registros, e `api/pricing/get/product_slug/` retorna um recurso da plataforma. Vários slugs mantêm um nome depreciado: Functions é `edge_functions`, Edge DNS é `edge_dns`, Real-Time Events é `realtime_events`, e Load Balancer e Origin Shield compartilham `connector`. Confira as chamadas de `TablePricing` que já existem na página de Preços antes de adicionar uma. - **O build depende da API.** Uma resposta que não é OK interrompe o build, então um build quebrado depois de uma mudança de preço pode ser a API, e não a página. - **Os planos ainda não estão na API.** Os planos atuais, o preço mensal e o uso que cada um inclui vêm do site. Use o link da página de planos para preço de plano e uso incluído, e nunca os repita. - **Nomeie o plano quando a disponibilidade faz parte do comportamento**, e use o link de pricing para os números. @@ -84,13 +84,13 @@ Preços vêm da Pricing API, nunca de texto. A [página de Preços](/pt-br/docum ## Posicione uma página nova -Conteúdo que nenhum recurso de plataforma possui sozinho vive ao lado das seções de recurso, não dentro de uma delas. Decida pelo leitor que a página serve: +Conteúdo que nenhum recurso da plataforma possui sozinho vive ao lado das seções de recurso, não dentro de uma delas. Decida pelo leitor que a página serve: -- A página documenta um recurso de plataforma: entra na seção desse recurso, no slot que o tipo de conteúdo indica. +- A página documenta um recurso da plataforma: entra na seção desse recurso, no slot que o tipo de conteúdo indica. - A página explica a plataforma, contas ou billing: entra em Fundamentos. - A página diagnostica problemas de plataforma ou leva ao time de suporte: entra em Suporte. - A página constrói um caso de uso do catálogo: é um [caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/), e entra em Casos de uso, na área da solução da sua entrada. -- A página mostra uma arquitetura de referência do catálogo, como produtos e recursos de plataforma se combinam em um design: entra em Architectures, sob a sua solução. +- A página mostra uma arquitetura de referência do catálogo, como produtos e recursos da plataforma se combinam em um design: entra em Architectures, sob a sua solução. - A página reúne links de uma área: é um [hub de navegação](/pt-br/documentacao/guia-de-estilo/conteudo/hubs-de-navegacao/), e precisa de um público real antes de existir. Quando nenhuma seção serve, abra uma issue antes de criar uma. Uma seção nova muda a navegação para todos os leitores. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura.mdx index bc74f8f87a..b44dbfdae3 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/arquitetura.mdx @@ -13,7 +13,7 @@ import DocItem from '@aziontech/webkit/doc-item' ## Propósito -Uma página de arquitetura mostra uma arquitetura de referência do catálogo de casos de uso: como produtos e recursos de plataforma se combinam em um design. O leitor quer entender o formato do design antes de construí-lo. +Uma página de arquitetura mostra uma arquitetura de referência do catálogo de casos de uso: como produtos e recursos da plataforma se combinam em um design. O leitor quer entender o formato do design antes de construí-lo. Ela aplica a forma base de **explicação**, a mesma de uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/). A diferença é o assunto: uma página de conceito explica uma coisa, uma página de arquitetura explica como muitas coisas se encaixam. @@ -21,13 +21,13 @@ Ela aplica a forma base de **explicação**, a mesma de uma [página de conceito Escreva uma página de arquitetura quando: -- Um design precisa de mais de um produto ou recurso de plataforma, e a relação entre eles é o ponto. +- Um design precisa de mais de um produto ou recurso da plataforma, e a relação entre eles é o ponto. - O leitor precisa ver a ordem de uma requisição ou de um fluxo de dados para entender o design. - Um guia fica redesenhando o mesmo sistema em texto corrido. Não escreva uma página de arquitetura quando: -- O assunto é um recurso de plataforma ou uma ideia. Escreva uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/). +- O assunto é um recurso da plataforma ou uma ideia. Escreva uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/). - O leitor quer construir a coisa. Escreva a [página de caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/) que a constrói, ou um [guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/), e aponte para ela daqui. - O catálogo não tem entrada para o design. Proponha o design ao catálogo de casos de uso primeiro; a página vem depois da entrada. - O design não pode ser desenhado. Um design que você não consegue desenhar é um design que você ainda não entende bem o suficiente para publicar. @@ -44,7 +44,7 @@ O título é o nome da arquitetura de referência no catálogo, sem alteração, - **`## Diagrama de arquitetura`**: uma legenda de uma ou duas frases, depois o diagrama como um bloco de código `mermaid`, com o `### Fluxo de dados` logo abaixo dele. - **`### Fluxo de dados`**: um passo a passo numerado do que vai para onde, com no máximo seis itens. Depois da lista, o que o design mostra e nenhuma etapa diz, como qual parte fica no fluxo de falha. -- **`## Componentes`**: um item por componente da entrada do catálogo, com o seu papel. Produtos e recursos de plataforma entram pelo nome, uma instância leva o nome do seu recurso de plataforma (uma Application, uma Function), e features e integrações entram rotuladas como o catálogo as rotula. +- **`## Componentes`**: um item por componente da entrada do catálogo, com o seu papel. Produtos e recursos da plataforma entram pelo nome, uma instância leva o nome do seu recurso da plataforma (uma Application, uma Function), e features e integrações entram rotuladas como o catálogo as rotula. - **`## Implementação`**: apenas links. A página de caso de uso entra aqui quando ela constrói este design, seguida dos guias e templates do Marketplace que implementam todo o design ou parte dele. Uma página de caso de uso que constrói um design irmão recebe o link no parágrafo de abertura, como o caso de uso que a arquitetura implementa, e não aqui. - **`## Recursos relacionados`**: a seção de fechamento, uma lista de `DocItem`, cada linha com sua razão. @@ -103,9 +103,9 @@ flowchart TD - **Desenhe a requisição e o caminho de volta.** Setas contínuas (`-->`) levam a requisição, e setas pontilhadas (`-.->`) levam a resposta. Um fluxo que roda separado de qualquer requisição, como uma publicação, um purge ou um stream de logs, usa setas grossas (`==>`). Uma seta de resposta começa onde a resposta começa: o Cache em um hit, o firewall em um bloqueio, a origem em um miss. Ela passa por um componente só quando esse componente age sobre a resposta, como o Cache que armazena uma cópia. Uma resposta que a aplicação trata volta pela aplicação, que a entrega. Uma resposta que o firewall dá vai direto ao cliente, porque a aplicação nunca recebe essa requisição. Uma leitura também tem caminho de volta: uma seta pontilhada do armazenamento de dados até o componente que leu, com o rótulo do que ele devolve. A legenda acima do diagrama diz o que cada estilo de seta leva. - **Numere cada seta pela etapa do fluxo de dados.** Cada rótulo de seta começa pelo número do item do `### Fluxo de dados` a que pertence, como `2, 4. miss`. Todo item tem pelo menos uma seta, e toda seta tem um item. O caminho de volta pertence à etapa que ele responde, então nunca acrescenta uma etapa. - **Ponha o fluxo de dados logo abaixo do diagrama.** A legenda fica acima do diagrama, e o `### Fluxo de dados` vem logo depois do bloco, sem nada entre os dois, para que as setas e as etapas que elas numeram fiquem na tela ao mesmo tempo. Uma frase que só reconta uma etapa não acrescenta nada e sai. -- **Nomeie cada componente e diga por que ele está ali.** Uma lista de nomes de recurso de plataforma é uma lista de peças. +- **Nomeie cada componente e diga por que ele está ali.** Uma lista de nomes de recurso da plataforma é uma lista de peças. - **Aponte para a implementação, não a coloque aqui.** Os passos vão em um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) ou em um [guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/). -- **Escreva só as seções que você consegue confirmar.** Uma seção obrigatória cujo conteúdo você não consegue confirmar com o time que cuida do recurso de plataforma fica de fora até que consiga, nunca é preenchida com um palpite. +- **Escreva só as seções que você consegue confirmar.** Uma seção obrigatória cujo conteúdo você não consegue confirmar com o time que cuida do recurso da plataforma fica de fora até que consiga, nunca é preenchida com um palpite. - **Informe o permalink quando a página é publicada**, para que o campo Docs da entrada do catálogo passe a Published. ## Exemplos diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/casos-de-uso.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/casos-de-uso.mdx index 81bc339abe..d7cc2a6c43 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/casos-de-uso.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/casos-de-uso.mdx @@ -18,13 +18,13 @@ Uma página de caso de uso explica uma entrada do catálogo de casos de uso como Um caso de uso é teoria, não um procedimento. Ele carrega o que o leitor precisa para entender e decidir: os produtos que o cenário exige, a arquitetura, como cada parte do design funciona e a razão por trás dela, e as métricas que mostram o design funcionando. Os valores de cada configuração, todo procedimento, todo comando e toda verificação ficam nos guias para os quais a página aponta. Cada seção de guia que aplica uma parte do design nomeia o caso de uso e traz os valores que ela usa ali, para que quem implementa, muitas vezes um agente, construa o design a partir desses guias sem fazer uma pergunta. -Casos de uso ficam na seção [Casos de uso](/pt-br/documentacao/casos-de-uso/), nunca dentro da seção de um recurso de plataforma, na área da solução da sua entrada no catálogo. O rótulo da área é o nome da solução. Os guias para os quais um caso de uso aponta ficam na seção Guias. +Casos de uso ficam na seção [Casos de uso](/pt-br/documentacao/casos-de-uso/), nunca dentro da seção de um recurso da plataforma, na área da solução da sua entrada no catálogo. O rótulo da área é o nome da solução. Os guias para os quais um caso de uso aponta ficam na seção Guias. ## Quando usar **Reconheça um caso de uso por:** -- Um título que é o nome de um caso de uso do catálogo, sem alteração, traduzido na página em português do Brasil: uma frase verbal no infinitivo que nomeia um workload, sem nomes de produto ou de recurso de plataforma, como "Criar vitrines de e-commerce". +- Um título que é o nome de um caso de uso do catálogo, sem alteração, traduzido na página em português do Brasil: uma frase verbal no infinitivo que nomeia um workload, sem nomes de produto ou de recurso da plataforma, como "Criar vitrines de e-commerce". - Um leitor que chegou com uma situação de negócio, e não com uma tarefa. - Uma tabela de requisitos ligando cada necessidade de negócio ao produto que a atende. - Um resultado que continua mensurável depois que a configuração funciona. @@ -41,7 +41,7 @@ Casos de uso ficam na seção [Casos de uso](/pt-br/documentacao/casos-de-uso/), - A página descreve uma arquitetura de referência sem um cenário de cliente em volta. Isso é uma [página de arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/). - A configuração é uma tarefa só, sem cenário em volta. Isso é um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/). - O catálogo não tem entrada para ele, e o objetivo não precisa de uma situação de cliente. Isso é um [guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/). Uma entrada faz da página um caso de uso, qualquer que seja a redação do objetivo. -- O leitor não tem cenário, só o recurso de plataforma. Isso é um [tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/). +- O leitor não tem cenário, só o recurso da plataforma. Isso é um [tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/). ## Registro @@ -53,8 +53,8 @@ Descritivo: 20 palavras por frase, voz ativa, presente. Um caso de uso diz o que - **Cenário**: três a cinco frases tiradas do Cenário da entrada do catálogo. Elas nomeiam o ator, o workload e a situação em que ele está, o que esta página configura e o resultado mensurável. Seguidas de uma linha declarando o que o caso de uso não cobre, a exclusão da própria entrada. - **Pré-requisitos**: uma seção `## Pré-requisitos`, cada item um link. O primeiro item é a conta Azion, com um link inline para a página de cadastro: `Uma conta Azion. Se você ainda não tem uma, [crie uma conta](https://console.azion.com/signup).` Os outros itens nomeiam o que o leitor já precisa ter, como uma origem, um domínio ou um repositório. Ferramentas, tokens e os valores do exemplo pertencem aos guias. -- **Produtos necessários**: a tabela de requisitos. Uma linha por requisito, nomeando a necessidade técnica, o produto que a atende e a página que a documenta. A coluna Produto contém os produtos da entrada do catálogo. Uma dependência que a documentação do recurso de plataforma confirma e a entrada omite também entra na tabela, e a lacuna é informada ao catálogo. A necessidade técnica nomeia o recurso de plataforma que o leitor configura. -- **Arquitetura de referência**: uma seção `## Arquitetura de referência`. Ela abre nomeando qual das arquiteturas de referência da entrada esta página constrói, e depois traz uma legenda de uma ou duas frases, um diagrama em `mermaid` e um `### Fluxo de dados` numerado logo abaixo dele. Depois da lista vêm o que o design mostra e nenhuma etapa diz, uma lista `### Recursos de plataforma` com cada recurso de plataforma e cada Feature e seu papel neste design, e `### Outros designs para este caso de uso`, com um item por outra arquitetura de referência da entrada. +- **Produtos necessários**: a tabela de requisitos. Uma linha por requisito, nomeando a necessidade técnica, o produto que a atende e a página que a documenta. A coluna Produto contém os produtos da entrada do catálogo. Uma dependência que a documentação do recurso da plataforma confirma e a entrada omite também entra na tabela, e a lacuna é informada ao catálogo. A necessidade técnica nomeia o recurso da plataforma que o leitor configura. +- **Arquitetura de referência**: uma seção `## Arquitetura de referência`. Ela abre nomeando qual das arquiteturas de referência da entrada esta página constrói, e depois traz uma legenda de uma ou duas frases, um diagrama em `mermaid` e um `### Fluxo de dados` numerado logo abaixo dele. Depois da lista vêm o que o design mostra e nenhuma etapa diz, uma lista `### Recursos da plataforma` com cada recurso da plataforma e cada Feature e seu papel neste design, e `### Outros designs para este caso de uso`, com um item por outra arquitetura de referência da entrada. - **Como o design funciona**: uma seção `## Como o design funciona` que abre com uma frase nomeando o que ela explica, e depois um `###` por parte do design específica deste caso de uso, no máximo quatro, cada um com um título nominal, como `### Cache do catálogo`. Cada um explica o que aquela parte faz e por quê: o raciocínio, a lógica da regra e um diagrama quando a lógica se ramifica. Um valor aparece só dentro da frase que dá a razão dele. A seção não tem tabela de valores, passo, verificação nem linha de link para um procedimento. Uma parte atendida pelos padrões de um guia não ganha subseção: a tabela de requisitos aponta o guia que a documenta. - **Medição de resultados**: uma seção `## Medindo resultados` nomeando as métricas que mostram a configuração funcionando, e onde ler cada uma. - **Boas práticas**: uma seção `## Boas práticas` com recomendações sobre o design e o raciocínio por trás de cada uma. @@ -122,9 +122,9 @@ flowchart TD -### Recursos de plataforma +### Recursos da plataforma -- ****: . +- ****: . ### Outros designs para este caso de uso @@ -178,14 +178,14 @@ flowchart TD - **Explique o design e deixe a execução para os guias.** Toda escolha carrega a sua razão, e nada diz "dependendo da sua configuração". O leitor pode ser um agente, e um agente não resolve uma ambiguidade perguntando. - **Mantenha valores, passos, verificações e código fora da página.** Nenhum bloco de código além do diagrama, nenhuma tabela de configurações, nenhum ``, nenhum ``, nenhuma verificação e nenhum comando. Os valores de uma parte do design vão para a seção do guia que a aplica, abaixo de uma linha que nomeia o caso de uso, e os resultados esperados vão para a seção de confirmação desse guia. Quando nenhum guia tem o procedimento, amplie um guia ou escreva um novo [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) primeiro, e depois aponte para ele. - **Reduza o cenário a uma configuração construível.** Declare assim: `Um ](/pt-br/documentacao/.../).` **Componentes opcionais** -- **O recurso de plataforma e a versão**: `tags={['']}` e `description="Versão "`, quando a release nomeia um recurso de plataforma ou uma versão. +- **O recurso da plataforma e a versão**: `tags={['']}` e `description="Versão "`, quando a release nomeia um recurso da plataforma ou uma versão. - **Títulos de tipo**: `### Funcionalidades`, `### Melhorias`, `### Correções de bugs` dentro das notas, quando uma entrada lista mais de um tipo de mudança. - **Passos de migração ou adesão**: com um exemplo de código, quando uma API, a CLI ou uma configuração mudou. @@ -53,9 +53,9 @@ Cada entrada é um `DocUpdate`: a data, a versão e o recurso de plataforma fica ```mdx import DocUpdate from '@aziontech/webkit/doc-update' -']} anchor="-de--de-"> +']} anchor="-de--de-"> -**** agora , . +**** agora , . @@ -70,7 +70,7 @@ Para mais informações, consulte [](/pt-br/ ## Regras -- **Abra com o elemento que mudou como sujeito.** `**** agora .` Uma mudança em um recurso de plataforma aninhado abre com ele: `**Bot Manager** agora…`. Tempo presente, nunca `nós`, nunca `a Azion tem o prazer de`. +- **Abra com o elemento que mudou como sujeito.** `**** agora .` Uma mudança em um recurso da plataforma aninhado abre com ele: `**Bot Manager** agora…`. Tempo presente, nunca `nós`, nunca `a Azion tem o prazer de`. - **Diga quem não é afetado.** A primeira pergunta do leitor sobre qualquer mudança é se ela o quebra; responda antes que ele pergunte. - **Mostre a migração ou a adesão quando a superfície mudou.** Uma mudança de API, CLI ou configuração recebe um exemplo de código; duas linhas bastam. - **Feche cada entrada com o link da documentação.** Uma entrada que documenta a funcionalidade por completo é uma página arquivada no lugar errado. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/conceito.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/conceito.mdx index c6ca938f91..6c62e873c9 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/conceito.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/conceito.mdx @@ -15,13 +15,13 @@ import DocItem from '@aziontech/webkit/doc-item' Uma página de conceito constrói entendimento. O leitor não está no meio de uma tarefa; ele quer entender como algo funciona e por que é construído assim, normalmente antes de decidir usar. -Ela aplica a forma base de **explicação**, uma das quatro formas do Diátaxis. Quando recursos de plataforma se combinam em uma arquitetura de referência, escreva uma [página de arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/): é a mesma forma base, com diagrama e fluxo de dados. +Ela aplica a forma base de **explicação**, uma das quatro formas do Diátaxis. Quando recursos da plataforma se combinam em uma arquitetura de referência, escreva uma [página de arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/): é a mesma forma base, com diagrama e fluxo de dados. ## Quando usar Escreva uma página de conceito quando: -- O leitor quer a razão de o recurso de plataforma funcionar assim, e não os passos. +- O leitor quer a razão de o recurso da plataforma funcionar assim, e não os passos. - Um guia how-to ganha um preâmbulo longo, ou uma página de referência para para justificar um design. - A página precisa comparar alternativas e nomear um trade-off. @@ -29,7 +29,7 @@ Não escreva uma página de conceito quando: - O leitor precisa consultar um valor, um campo ou um limite. Escreva uma [página de referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/). - O leitor precisa de passos para uma tarefa. Escreva um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) ou um [tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/). -- O assunto é como recursos de plataforma se combinam em uma arquitetura de referência. Escreva uma [página de arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/). +- O assunto é como recursos da plataforma se combinam em uma arquitetura de referência. Escreva uma [página de arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/). Este é o tipo de página que mais falta. Quando outro tipo começa a explicar, escreva a página de conceito e mantenha aquele tipo limpo. @@ -41,7 +41,7 @@ Descritivo: 25 palavras por frase, voz ativa, passiva apenas quando o ator é ge O título é `Como funciona`, `Sobre ` ou uma frase nominal curta: `Como o Tiered Cache funciona`. -Uma página de mecanismo é a página de conceito de um recurso de plataforma aninhado em outro. Ela abre o grupo Referência do aninhado na sidebar, e o título dela nomeia o mecanismo, como `Score e modos` para o WAF. Ela nunca tem o título `Como o funciona`, porque a página Como funciona do recurso pai já o apresenta em uma seção `## ` que aponta para ela. +Uma página de mecanismo é a página de conceito de um recurso da plataforma aninhado em outro. Ela abre o grupo Referência do aninhado na sidebar, e o título dela nomeia o mecanismo, como `Score e modos` para o WAF. Ela nunca tem o título `Como o funciona`, porque a página Como funciona do recurso pai já o apresenta em uma seção `## ` que aponta para ela. **Componentes obrigatórios** @@ -92,10 +92,10 @@ ele se comporta e o que ele custa.> ## Regras - **Abra com comportamento, não com moldura.** Declare como o sistema se comporta; nunca `Esta página explica`. -- **Explique a coisa antes do objeto da Azion.** `Cache armazena uma cópia de uma resposta no data center que a buscou. Esse data center responde às requisições seguintes do mesmo objeto com essa cópia, sem chegar à origem.` Só depois os objetos que a realizam. Uma abertura em que todo sujeito é um recurso de plataforma ou objeto da Azion é um inventário, não uma explicação. +- **Explique a coisa antes do objeto da Azion.** `Cache armazena uma cópia de uma resposta no data center que a buscou. Esse data center responde às requisições seguintes do mesmo objeto com essa cópia, sem chegar à origem.` Só depois os objetos que a realizam. Uma abertura em que todo sujeito é um recurso da plataforma ou objeto da Azion é um inventário, não uma explicação. - **Espelhe a frase-roteiro.** Uma seção `##` em frase nominal por mecanismo, na ordem em que a frase-roteiro os nomeia. Uma seção cortada da página é cortada da frase-roteiro na mesma edição. - **Declare o trade-off.** Toda escolha de design custa algo, então diga o quê. Uma explicação que apresenta só vantagens é marketing. -- **Sem procedimentos.** Aponte o [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) que aplica o conceito. +- **Sem procedimentos.** Aponte o [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) que aplica o conceito. Um caminho do Console dentro de uma frase também conta: declare a configuração no lugar dele, conforme [Escolha de palavras](/pt-br/documentacao/guia-de-estilo/escrita/escolha-de-palavras/#declare-a-configuracao-nao-o-caminho-fora-de-uma-tarefa). - **Mantenha as alternativas aqui.** Alternativas e "em vez de" vivem nas páginas de conceito e em nenhum outro lugar. - **Use a voz passiva de forma restrita.** Apenas quando o ator é genuinamente desconhecido ou é a própria plataforma. - **Faça os diagramas carregarem significado, e desenhe em `mermaid`.** Um diagrama em texto alcança um agente que lê a versão em Markdown; uma imagem não. Diga em prosa o que o diagrama mostra, e nunca dependa apenas de cor. @@ -121,7 +121,7 @@ Os usuários finais enviam requisições à infraestrutura distribuída da Azion - A mesma forma base, para um design que atravessa recursos de plataforma. + A mesma forma base, para um design que atravessa recursos da plataforma. Onde as configurações e os limites pertencem. Onde os passos pertencem. O catálogo completo de tipos de página. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo.mdx index 1fb9e79421..968013e7f0 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo.mdx @@ -14,7 +14,7 @@ Toda página de documentação é escrita em uma de quatro formas base, do Diát | O leitor quer | A forma é | | --- | --- | -| Aprender um recurso de plataforma ao construir algo que funciona | [Tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) | +| Aprender um recurso da plataforma ao construir algo que funciona | [Tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) | | Realizar uma tarefa específica que já tem em mente | [Guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) | | Consultar um fato: um limite, um campo, uma flag, um código de resposta | [Referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/) | | Entender por que algo funciona do jeito que funciona | Explicação, como página de [conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/) ou [arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/) | @@ -27,25 +27,25 @@ Um tipo de página é uma forma base mais um lugar na [arquitetura de informaç | Tipo | Forma base | Obrigatório por seção | Propósito | | --- | --- | --- | --- | -| [Visão geral](/pt-br/documentacao/guia-de-estilo/conteudo/visao-geral/) | Referência | Sim | A raiz da seção: o que o recurso de plataforma é, o que faz, quando usar | -| [Quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/) | Tutorial | Sim | De não usar o recurso de plataforma ao menor resultado funcional | -| [Tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) | Tutorial | Não | Ensinar o recurso de plataforma ao construir um objetivo que o autor escolheu | +| [Visão geral](/pt-br/documentacao/guia-de-estilo/conteudo/visao-geral/) | Referência | Sim | A raiz da seção: o que o recurso da plataforma é, o que faz, quando usar | +| [Quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/) | Tutorial | Sim | De não usar o recurso da plataforma ao menor resultado funcional | +| [Tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) | Tutorial | Não | Ensinar o recurso da plataforma ao construir um objetivo que o autor escolheu | | [Guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) | How-to | Não | Completar uma tarefa com a qual o leitor chegou | -| [Guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/) | How-to | Não | Alcançar um objetivo que cruza recursos de plataforma, em um caminho recomendado | +| [Guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/) | How-to | Não | Alcançar um objetivo que cruza recursos da plataforma, em um caminho recomendado | | [Caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/) | How-to | Não | Explicar um caso de uso do catálogo como um design, com os guias que o constroem | | [Troubleshooting](/pt-br/documentacao/guia-de-estilo/conteudo/troubleshooting/) | How-to | Não | De um sintoma que o leitor vê a uma correção | | [Referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/) | Referência | Não | Consultar campos, valores, padrões e limites | | [Conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/) | Explicação | Não | Entender como algo funciona e por que é construído assim | -| [Arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/) | Explicação | Não | Uma arquitetura de referência do catálogo: como produtos e recursos de plataforma se combinam em um design | +| [Arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/) | Explicação | Não | Uma arquitetura de referência do catálogo: como produtos e recursos da plataforma se combinam em um design | | [Changelog](/pt-br/documentacao/guia-de-estilo/conteudo/changelog/) | Registro | Não | Registrar mudanças notáveis, somente por acréscimo | | [Glossário](/pt-br/documentacao/guia-de-estilo/conteudo/glossario/) | Referência | Sim | Definir os termos que a documentação da seção usa, em uma tabela filtrável | | [Hub de navegação](/pt-br/documentacao/guia-de-estilo/conteudo/hubs-de-navegacao/) | Nenhuma | Não | Levar o leitor mais fundo na documentação. Links mais uma frase de orientação | -Obrigatório por seção significa obrigatório em toda seção de recurso de plataforma. Um recurso de plataforma aninhado como dropdown em outro precisa somente das páginas de referência, de uma página de mecanismo quando tem um mecanismo a explicar e de um Quickstart quando tem uma configuração inicial própria; toda outra página que ele teria é uma seção das páginas do recurso. A regra de aninhamento está em [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/#recursos-de-plataforma-aninhados). +Obrigatório por seção significa obrigatório em toda seção de recurso da plataforma. Um recurso da plataforma aninhado como dropdown em outro precisa somente das páginas de referência, de uma página de mecanismo quando tem um mecanismo a explicar e de um Quickstart quando tem uma configuração inicial própria; toda outra página que ele teria é uma seção das páginas do recurso. A regra de aninhamento está em [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/#recursos-da-plataforma-aninhados). ## Slots não são tipos -Um slot é uma posição na seção de recurso de plataforma; um tipo é o formato de uma página. A [arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/) lista os slots, e este catálogo lista os tipos. As duas listas não se mapeiam uma na outra, mesmo quando têm o mesmo tamanho. +Um slot é uma posição na seção de recurso da plataforma; um tipo é o formato de uma página. A [arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/) lista os slots, e este catálogo lista os tipos. As duas listas não se mapeiam uma na outra, mesmo quando têm o mesmo tamanho. Vários slots compartilham um tipo. Limites, Exemplos e Features contêm páginas de referência, colocadas em slots diferentes porque o leitor chega a elas em momentos diferentes. Boas práticas e Como funciona contêm páginas de conceito. Um slot também pode conter vários tipos: Guias e tutoriais contém um hub de navegação, os guias how-to e os tutoriais. Adicionar um slot nunca adiciona um tipo, e uma página que não cabe em nenhum tipo é uma página cujo tipo de conteúdo ainda não foi decidido. @@ -55,7 +55,7 @@ Alguns tipos comuns em outras documentações estão ausentes de propósito, por - **FAQ**: uma lista de perguntas é uma lista de páginas disfarçada. Direcione cada resposta ao seu tipo, e a pergunta vira um título que a busca encontra. - **Configuration**: exemplos de configurações e valores são conteúdo de referência. O tipo adiciona um segundo nome para a mesma página. -- **Guias de design, implementação e solução**: três nomes para conteúdo que o catálogo já tem. Um objetivo que cruza recursos de plataforma é um [guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/). Um caso de uso do catálogo, construído do início ao fim, é um [caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/). O raciocínio por trás de um design é uma página de [conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/) ou de [arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/). +- **Guias de design, implementação e solução**: três nomes para conteúdo que o catálogo já tem. Um objetivo que cruza recursos da plataforma é um [guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/). Um caso de uso do catálogo, construído do início ao fim, é um [caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/). O raciocínio por trás de um design é uma página de [conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/) ou de [arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/). - **Guia de integração com terceiros**: um guia how-to que cruza a interface de um fornecedor. As [regras de terceiros](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) cobrem esse caso. - **Página de solução**: uma solução vive no site, não na documentação. Aqui uma solução é o rótulo de uma área de Guias e de um grupo de Architectures. As páginas são os casos de uso e as arquiteturas sob ela. - **Diretrizes de API** ainda não são cobertas por este guia. @@ -80,11 +80,11 @@ Explicação é a discussão. Ela traz contexto, alternativas e razões. É a ú ## Separe guias multirrecurso de casos de uso -As duas formas partem do how-to e as duas cruzam recursos de plataforma, então vale declarar a divisão. +As duas formas partem do how-to e as duas cruzam recursos da plataforma, então vale declarar a divisão. -Um guia multirrecurso parte de um objetivo técnico. O leitor sabe o que quer construir e precisa da rota entre os recursos de plataforma. Ele termina quando a tarefa está feita. +Um guia multirrecurso parte de um objetivo técnico. O leitor sabe o que quer construir e precisa da rota entre os recursos da plataforma. Ele termina quando a tarefa está feita. -Um caso de uso parte de uma entrada do catálogo: uma situação de cliente que o catálogo de casos de uso já nomeia e posiciona sob a sua solução. O leitor chega com uma situação, não com uma tarefa. A página nomeia os recursos de plataforma que o cenário exige, mostra a arquitetura, configura tudo e prova que funciona. Ele é escrito como uma especificação que um agente executa. É por isso que carrega uma tabela de requisitos e um resultado mensurável, que o guia multirrecurso não tem. +Um caso de uso parte de uma entrada do catálogo: uma situação de cliente que o catálogo de casos de uso já nomeia e posiciona sob a sua solução. O leitor chega com uma situação, não com uma tarefa. A página nomeia os recursos da plataforma que o cenário exige, mostra a arquitetura, configura tudo e prova que funciona. Ele é escrito como uma especificação que um agente executa. É por isso que carrega uma tabela de requisitos e um resultado mensurável, que o guia multirrecurso não tem. O teste tem dois passos. Primeiro, ligue o objetivo ao catálogo de casos de uso: uma entrada faz da página um caso de uso, qualquer que seja a redação do objetivo. Sem entrada, um objetivo que o leitor declara sem uma situação de cliente é um guia multirrecurso. Uma situação de cliente que o catálogo deveria ter é uma proposta de entrada nova, não uma página. @@ -100,7 +100,7 @@ Uma forma por página funciona porque links conectam as páginas. Cada forma apo | Uma página desta forma | Aponta para | Quando | | --- | --- | --- | -| Tutorial | Os guias how-to do seu recurso de plataforma | Em uma seção final "Próximos passos" | +| Tutorial | Os guias how-to do seu recurso da plataforma | Em uma seção final "Próximos passos" | | Guia how-to | Referência | Para cada configuração que os passos tocam | | Referência | O guia how-to que muda uma configuração | Com parcimônia: no máximo um link por configuração | | Conceito ou arquitetura | A referência e os guias que implementam o design | Onde o design encontra a prática | @@ -108,7 +108,7 @@ Uma forma por página funciona porque links conectam as páginas. Cada forma apo Duas regras mantêm os links verificáveis: - **Toda página fecha com links.** A página termina com o fechamento que o tipo dela exige, `## Próximos passos` ou `## Recursos relacionados`, com pelo menos um link para uma página da documentação. Glossário, changelog e hubs de navegação são as exceções, porque cada um já é uma lista de links. -- **Sem becos sem saída.** Pelo menos um link do fechamento leva mais fundo no recurso de plataforma da própria página: uma página daquela seção que não seja a visão geral. Um fechamento cujos links apontam todos de volta para onde o leitor veio é um beco sem saída vestido de seção de fechamento. +- **Sem becos sem saída.** Pelo menos um link do fechamento leva mais fundo no recurso da plataforma da própria página: uma página daquela seção que não seja a visão geral. Um fechamento cujos links apontam todos de volta para onde o leitor veio é um beco sem saída vestido de seção de fechamento. A reciprocidade só é exigida na espinha da seção: a visão geral aponta para toda página da seção, e toda página da seção aponta para a visão geral. Entre quaisquer outras duas páginas o link corre em um sentido só. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/glossario.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/glossario.mdx index b02f28f2bc..bb2c5d67c9 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/glossario.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/glossario.mdx @@ -1,7 +1,7 @@ --- title: Páginas de glossário description: >- - Escreva o glossário de uma seção de recurso de plataforma: uma + Escreva o glossário de uma seção de recurso da plataforma: uma tabela filtrável e alfabética cujas definições apontam as páginas onde o termo é usado. meta_tags: 'style guide, glossary, terms, definitions' @@ -14,15 +14,15 @@ import DocItem from '@aziontech/webkit/doc-item' ## Propósito -Um glossário define os termos que uma seção de recurso de plataforma usa. É material de consulta: o leitor chega com uma palavra, encontra a definição e segue um link quando a definição não basta. +Um glossário define os termos que uma seção de recurso da plataforma usa. É material de consulta: o leitor chega com uma palavra, encontra a definição e segue um link quando a definição não basta. -Um glossário guarda o vocabulário específico da Azion: produtos, recursos de plataforma, features e os termos que a Azion usa do seu próprio jeito. Um termo genérico da indústria, como CDN, serverless ou máquina virtual, pertence ao [Learning Center](https://www.azion.com/pt-br/learning/), não a um glossário da documentação. Um termo que a indústria também usa, mas que a Azion usa de forma diferente, mantém a entrada aqui e aponta o Learning Center para o sentido genérico. +Um glossário guarda o vocabulário específico da Azion: produtos, recursos da plataforma, features e os termos que a Azion usa do seu próprio jeito. Um termo genérico da indústria, como CDN, serverless ou máquina virtual, pertence ao [Learning Center](https://www.azion.com/pt-br/learning/), não a um glossário da documentação. Um termo que a indústria também usa, mas que a Azion usa de forma diferente, mantém a entrada aqui e aponta o Learning Center para o sentido genérico. Não é uma página de regras de nomes. As regras de nomes pertencem à [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/); o glossário define o que os termos significam para o leitor. ## Quando usar -Toda seção de recurso de plataforma carrega um glossário, um slot obrigatório do [esqueleto de seção de recurso de plataforma](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/). Escreva o glossário quando a seção é construída, e estenda quando uma página introduz um termo que o leitor precisa dominar para acompanhar a prosa. +Toda seção de recurso da plataforma carrega um glossário, um slot obrigatório do [esqueleto de seção de recurso da plataforma](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/). Escreva o glossário quando a seção é construída, e estenda quando uma página introduz um termo que o leitor precisa dominar para acompanhar a prosa. Não escreva uma entrada para um termo que nenhuma página usa. Não escreva uma entrada para um termo genérico da indústria: aponte o artigo do [Learning Center](https://www.azion.com/pt-br/learning/) na página que precisa dele. Não use o glossário para explicar em profundidade. Um termo que precisa de mais de três frases precisa de uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/), e a definição aponta para ela. @@ -32,7 +32,7 @@ Descritivo: 25 palavras por frase. O tom é neutro e lexicográfico: uma defini ## Estrutura -- Uma frase de orientação nomeando o recurso de plataforma cujos termos a página define. +- Uma frase de orientação nomeando o recurso da plataforma cujos termos a página define. - Um componente `` envolvendo uma tabela GFM, `| Termo | Definição |`. O componente adiciona a caixa de filtro e dá a cada linha uma âncora derivada do termo (`#cache-key`). Mecânica em [Componentes](/pt-br/documentacao/guia-de-estilo/componentes/). - Nenhuma seção de fechamento. A tabela é a página. @@ -41,7 +41,7 @@ Descritivo: 25 palavras por frase. O tom é neutro e lexicográfico: uma defini ```mdx import GlossaryFilter from '~/components/GlossaryFilter.astro' -Definições dos termos que a documentação de **** usa. +Definições dos termos que a documentação de **** usa. @@ -55,7 +55,7 @@ Definições dos termos que a documentação de **** usa. ## Regras - **As linhas ordenam alfabeticamente pelo termo, por idioma.** A página em português do Brasil alfabetiza pelo termo em português do Brasil; termos da lista que fica em inglês dos EUA mantêm a forma em inglês dos EUA e ordenam por ela. -- **Um termo fica em minúscula**, a menos que seja um nome de recurso de plataforma ou outro nome próprio. +- **Um termo fica em minúscula**, a menos que seja um nome de recurso da plataforma ou outro nome próprio. - **Uma definição tem de uma a três frases**, e a primeira diz o que o termo é. Aponte a página canônica no próprio texto da definição. - **Toda definição corresponde a uma página da documentação.** O glossário registra como a documentação usa um termo; ele nunca introduz um. - **O glossário é uma estrutura de crosslinks.** Cada definição aponta sua página canônica no próprio texto e as páginas onde o leitor encontra o termo. Toda entrada mantém um caminho de volta para a documentação. @@ -64,13 +64,13 @@ Definições dos termos que a documentação de **** usa. ## Exemplos -O primeiro glossário de recurso de plataforma é o [glossário do Functions](/pt-br/documentacao/plataforma/functions/glossario/): 22 termos, cada definição apontando sua página canônica. +O primeiro glossário de recurso da plataforma é o [glossário do Functions](/pt-br/documentacao/plataforma/functions/glossario/): 22 termos, cada definição apontando sua página canônica. ## Relacionados - O slot que o glossário preenche em toda seção de recurso de plataforma. + O slot que o glossário preenche em toda seção de recurso da plataforma. As regras de nomes que o glossário nunca repete. A mecânica do GlossaryFilter. Para onde um termo vai quando três frases não bastam. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-how-to.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-how-to.mdx index 80882988b9..c9b39cc3c1 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-how-to.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-how-to.mdx @@ -18,7 +18,7 @@ Um guia how-to leva um leitor com um problema até o problema resolvido. O leito ## Quando usar - O leitor chegou com uma tarefa específica e uma situação real. -- Não use um how-to para o leitor que está aprendendo o recurso de plataforma: essa página é um [tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/). +- Não use um how-to para o leitor que está aprendendo o recurso da plataforma: essa página é um [tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/). - Um how-to cuja tarefa é um conserto é uma [página de troubleshooting](/pt-br/documentacao/guia-de-estilo/conteudo/troubleshooting/). - Na dúvida, [Escolher um tipo de conteúdo](/pt-br/documentacao/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo/) tem o roteiro. @@ -94,8 +94,8 @@ Separe as seções principais da página com uma régua `---`, e nunca coloque u - **Ramifique onde a tarefa ramifica.** Tarefas com mais de uma interface ramificam pela única faixa da página, painel do Console primeiro — nunca seções sequenciais por interface, e nunca uma faixa por tarefa. - **Não ensine.** Uma frase de contexto, depois os passos. Um parágrafo de contexto pertence a uma página de conceito; aponte para ela. - **Use um verbo por ação**, em todas as menções da página. -- **Aponte para os vizinhos.** Guias how-to irmãos e a página de referência do recurso de plataforma, no corpo ou em `## Próximos passos`. -- **Mande um objetivo que cruza recursos de plataforma** para um [guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/). +- **Aponte para os vizinhos.** Guias how-to irmãos e a página de referência do recurso da plataforma, no corpo ou em `## Próximos passos`. +- **Mande um objetivo que cruza recursos da plataforma** para um [guia multirrecurso](/pt-br/documentacao/guia-de-estilo/conteudo/guias-multirrecurso/). - **Aponte para fora em produtos de terceiros.** Nomeie o passo do fornecedor; não documente a interface dele. - **Guarde os valores dos casos de uso que uma seção atende.** Um [caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/) explica um design e mantém os valores fora da própria página. A seção do guia que aplica parte desse design termina com uma linha que nomeia o caso de uso, `No caso de uso [](/caminho/), esta seção usa estes valores:`, depois uma tabela `Configuração | Valor` e o resultado. Quando o próprio exemplo da seção já usa esses valores, a linha diz isso e nenhuma tabela vem depois. A seção de confirmação termina com os resultados esperados do caso de uso, sob `No caso de uso [](/caminho/), espere:`. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-multirrecurso.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-multirrecurso.mdx index a40394f8ca..c98575c48c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-multirrecurso.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/guias-multirrecurso.mdx @@ -1,7 +1,7 @@ --- title: Guias multirrecurso description: >- - Escreva um guia para um objetivo que atravessa recursos de plataforma: um + Escreva um guia para um objetivo que atravessa recursos da plataforma: um caminho recomendado, organizado por etapa do fluxo e não por recurso da plataforma. meta_tags: 'style guide, multi-resource guide, solution guide' @@ -14,7 +14,7 @@ import DocItem from '@aziontech/webkit/doc-item' ## Propósito -Um guia multirrecurso leva o leitor a um objetivo que nenhum recurso de plataforma alcança sozinho. Ele aplica a forma base de [how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/). +Um guia multirrecurso leva o leitor a um objetivo que nenhum recurso da plataforma alcança sozinho. Ele aplica a forma base de [how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/). Outros conjuntos de documentação dividem esse tipo em guias de solução, guias de design e guias de implementação. Esta documentação usa um nome e um conjunto de regras, porque os três descrevem a mesma página. @@ -22,13 +22,13 @@ Outros conjuntos de documentação dividem esse tipo em guias de solução, guia Escreva um guia multirrecurso quando: -- O objetivo precisa de dois ou mais recursos de plataforma, e nenhuma seção de recurso de plataforma é dona dele. -- O leitor pensa em resultados, como proteger um checkout, e não em nomes de recurso de plataforma. -- Um guia de um único recurso de plataforma fica mandando o leitor para outro recurso de plataforma no meio da tarefa. +- O objetivo precisa de dois ou mais recursos da plataforma, e nenhuma seção de recurso da plataforma é dona dele. +- O leitor pensa em resultados, como proteger um checkout, e não em nomes de recurso da plataforma. +- Um guia de um único recurso da plataforma fica mandando o leitor para outro recurso da plataforma no meio da tarefa. Não escreva um guia multirrecurso quando: -- Um recurso de plataforma alcança o objetivo. Escreva um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) na seção daquele recurso de plataforma. +- Um recurso da plataforma alcança o objetivo. Escreva um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/) na seção daquele recurso da plataforma. - O leitor quer entender o design em vez de construí-lo. Escreva uma [página de arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/). - O objetivo é um caso de uso do catálogo. Isso é um [caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/), e usa a mesma forma base com um cenário e uma tabela de requisitos. @@ -40,15 +40,15 @@ Procedural: 20 palavras por frase, uma instrução por passo, imperativo e ativo **Componentes obrigatórios** -- **Abertura pelo problema**: uma ou duas frases declaram o problema, antes de qualquer nome de recurso de plataforma. Os recursos de plataforma, e os produtos configurados neles, entram depois do problema, pelo papel: "Você configura o cache na aplicação e a filtragem de requisições no firewall." +- **Abertura pelo problema**: uma ou duas frases declaram o problema, antes de qualquer nome de recurso da plataforma. Os recursos da plataforma, e os produtos configurados neles, entram depois do problema, pelo papel: "Você configura o cache na aplicação e a filtragem de requisições no firewall." - **Pré-requisitos**: uma seção `## Pré-requisitos`, em lista; cada item é um link ou um comando de uma linha. Um único pré-requisito é uma frase, não uma lista. -- **Etapas**: um `##` por etapa do fluxo, nunca por recurso de plataforma, cada um com um título imperativo que nomeia a etapa. Cada etapa nomeia seu recurso de plataforma na entrada, contém um procedimento comum e se sustenta sozinha. +- **Etapas**: um `##` por etapa do fluxo, nunca por recurso da plataforma, cada um com um título imperativo que nomeia a etapa. Cada etapa nomeia seu recurso da plataforma na entrada, contém um procedimento comum e se sustenta sozinha. - **Frase de resultado**: todo procedimento termina declarando o que o leitor agora tem ou vê. - **Próximos passos**: uma seção final `## Próximos passos`, um `DocCardGroup` com um card por destino: o título, o link e o motivo como texto do card. **Componentes opcionais** -- **Uma tabela de recursos de plataforma**: o que cada recurso de plataforma contribui, quando há mais de três envolvidos. +- **Uma tabela de recursos da plataforma**: o que cada recurso da plataforma contribui, quando há mais de três envolvidos. - **Um diagrama**: quando a ordem das peças é difícil de segurar em texto. Aponte para a [página de arquitetura](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura/) quando existir uma. ## Template @@ -60,7 +60,7 @@ import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' [Uma ou duas frases: o problema primeiro, depois os -recursos de plataforma, e os produtos configurados neles, pelo papel.] +recursos da plataforma, e os produtos configurados neles, pelo papel.] ## Pré-requisitos @@ -70,7 +70,7 @@ recursos de plataforma, e os produtos configurados neles, pelo papel.] ## - + Para : @@ -96,16 +96,16 @@ Separe as seções principais da página com uma régua `---`, e nunca coloque u ## Regras -- **Nomeie o objetivo, não os recursos de plataforma.** O título declara o objetivo em linguagem simples, sem nomes de recurso de plataforma: `Sirva um site com conteúdo em cache e um checkout protegido`. O leitor busca pelo resultado. -- **Declare o problema primeiro.** Uma ou duas frases, depois os recursos de plataforma, e os produtos configurados neles, pelo papel: "Você configura o cache na aplicação e a filtragem de requisições no firewall." -- **Ordene pelo fluxo, nunca pelo catálogo de recursos de plataforma.** Uma página organizada um recurso de plataforma por vez é um pacote de guias how-to com um só título. -- **Nomeie o recurso de plataforma em cada etapa.** Um nome de interface sem qualificação fica ambíguo quando a página cruza recursos de plataforma. -- **Continue sendo um how-to.** Os recursos de plataforma são a rota, não o assunto. Um parágrafo de contexto de recurso de plataforma pertence a uma página de conceito; aponte para ela. +- **Nomeie o objetivo, não os recursos da plataforma.** O título declara o objetivo em linguagem simples, sem nomes de recurso da plataforma: `Sirva um site com conteúdo em cache e um checkout protegido`. O leitor busca pelo resultado. +- **Declare o problema primeiro.** Uma ou duas frases, depois os recursos da plataforma, e os produtos configurados neles, pelo papel: "Você configura o cache na aplicação e a filtragem de requisições no firewall." +- **Ordene pelo fluxo, nunca pelo catálogo de recursos da plataforma.** Uma página organizada um recurso da plataforma por vez é um pacote de guias how-to com um só título. +- **Nomeie o recurso da plataforma em cada etapa.** Um nome de interface sem qualificação fica ambíguo quando a página cruza recursos da plataforma. +- **Continue sendo um how-to.** Os recursos da plataforma são a rota, não o assunto. Um parágrafo de contexto de recurso da plataforma pertence a uma página de conceito; aponte para ela. - **Siga as regras de passos.** Os passos seguem [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/), e todo procedimento termina com sua frase de resultado. - **Mostre a saída depois de cada comando.** O leitor vê como o sucesso se parece antes que o próximo passo dependa dele. A regra está em [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/). - **Comprometa-se com um caminho recomendado.** Alternativas vão em um aside, nunca como bifurcações nos passos. - **Verifique o caminho inteiro.** Esses guias falham nas emendas, então cheque o resultado e não o último passo. -- **Aponte para os vizinhos.** Os guias how-to e a página de referência de cada recurso de plataforma, no corpo ou em `## Próximos passos`. +- **Aponte para os vizinhos.** Os guias how-to e a página de referência de cada recurso da plataforma, no corpo ou em `## Próximos passos`. ## Exemplos @@ -139,7 +139,7 @@ O Application Accelerator está ativado na aplicação. A forma base que este tipo aplica. A página que descreve o design que este guia constrói. - Onde fica um guia que não pertence a nenhuma seção de recurso de plataforma. + Onde fica um guia que não pertence a nenhuma seção de recurso da plataforma. O catálogo completo de tipos de página. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/hubs-de-navegacao.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/hubs-de-navegacao.mdx index c3273ef360..4eb1329050 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/hubs-de-navegacao.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/hubs-de-navegacao.mdx @@ -20,12 +20,12 @@ Ele **não** aplica nenhuma forma base do Diátaxis. Um hub não ensina, não in ## Quando usar - Escreva um hub quando uma seção tem mais páginas do que a sidebar consegue mostrar de forma legível. -- Escreva um para uma seção que reúne páginas de vários recursos de plataforma, como uma área de solução do hub de guias, ou o índice de arquiteturas. -- Escreva um para o slot Guias e tutoriais da seção de um recurso de plataforma, que é uma única linha na sidebar apontando para um hub, e não um dropdown. [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/) carrega essa regra. +- Escreva um para uma seção que reúne páginas de vários recursos da plataforma, como uma área de solução do hub de guias, ou o índice de arquiteturas. +- Escreva um para o slot Guias e tutoriais da seção de um recurso da plataforma, que é uma única linha na sidebar apontando para um hub, e não um dropdown. [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/) carrega essa regra. Não escreva um hub quando: -- A seção é um recurso de plataforma. A seção de um recurso de plataforma abre com uma [visão geral](/pt-br/documentacao/guia-de-estilo/conteudo/visao-geral/), que orienta e aponta. +- A seção é um recurso da plataforma. A seção de um recurso da plataforma abre com uma [visão geral](/pt-br/documentacao/guia-de-estilo/conteudo/visao-geral/), que orienta e aponta. - A página explicaria longamente do que a seção trata. Isso é uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/). - A sidebar já torna as páginas encontráveis. Um hub que duplica a sidebar é mais uma coisa para manter e mais uma coisa para desatualizar. @@ -49,11 +49,11 @@ O padrão. Use quando os destinos são diferentes entre si e o leitor precisa de ### Forma 2: uma tabela -Use quando o hub lista um conjunto homogêneo e o leitor escolhe por tipo e atualidade, e não por descrição. O slot Guias e tutoriais tem essa forma, porque cada linha é um how-to ou um tutorial do mesmo recurso de plataforma e uma frase por linha repetiria o título da página. +Use quando o hub lista um conjunto homogêneo e o leitor escolhe por tipo e atualidade, e não por descrição. O slot Guias e tutoriais tem essa forma, porque cada linha é um how-to ou um tutorial do mesmo recurso da plataforma e uma frase por linha repetiria o título da página. - **Corpo**: um ``, sem títulos `##` e sem grupos. - **Colunas**: nome, tipo, última atualização. -- **A tabela é gerada, nunca digitada.** Uma página aparece quando o catálogo de guias a marca com o recurso de plataforma, o tipo vem do catálogo e a data vem da última alteração da página, então o hub não fica dessincronizado das páginas que lista. O hub de um recurso também lista os guias dos recursos de plataforma aninhados nele; um recurso de plataforma aninhado não tem hub próprio. +- **A tabela é gerada, nunca digitada.** Uma página aparece quando o catálogo de guias a marca com o recurso da plataforma, o tipo vem do catálogo e a data vem da última alteração da página, então o hub não fica dessincronizado das páginas que lista. O hub de um recurso também lista os guias dos recursos da plataforma aninhados nele; um recurso da plataforma aninhado não tem hub próprio. ## Template @@ -89,10 +89,10 @@ import ProductGuidesSection from '~/components/ProductGuidesSection.astro' - **Nenhum fechamento e nenhum outro texto.** Uma frase de orientação; a explicação vai em uma [página de conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/). - **Faça cada link justificar o seu lugar.** Um hub é julgado pelo que ele deixa de fora; um hub que lista tudo não hierarquiza nada. - **Escreva descrições que diferenciam.** Diga o que esta página dá que as vizinhas não dão. -- **Agrupe quando a lista passa de sete**, pelo que o leitor está tentando fazer. Uma tabela não agrupa: ela ordena em ordem alfabética pelo rótulo de navegação de cada linha, no idioma do leitor. O grupo Recursos de Plataforma da sidebar raiz é a única exceção: todos os recursos de plataforma na ordem em que o leitor os adota, por decisão, porque agrupá-los por intenção traria de volta os pilares aposentados. +- **Agrupe quando a lista passa de sete**, pelo que o leitor está tentando fazer. Uma tabela não agrupa: ela ordena em ordem alfabética pelo rótulo de navegação de cada linha, no idioma do leitor. O grupo Recursos de Plataforma da sidebar raiz é a única exceção: todos os recursos da plataforma na ordem em que o leitor os adota, por decisão, porque agrupá-los por intenção traria de volta os pilares aposentados. - **Escolha a forma pelo que o leitor compara.** Destinos variados precisam de uma frase cada, então pedem links agrupados. Um conjunto homogêneo de páginas, comparado por tipo e atualidade, pede a tabela. - **Nunca escreva uma linha de tabela à mão.** Uma data digitada fica errada na primeira vez que alguém esquece, e é por isso que este é o único lugar em que o guia permite uma data fora de um changelog. -- **Registre a página no catálogo de guias.** Uma página que o catálogo não lista falta no hub. O primeiro recurso de plataforma que o catálogo indica para uma página é o dono dela e dá nome ao tópico dela na seção de Guias. +- **Registre a página no catálogo de guias.** Uma página que o catálogo não lista falta no hub. O primeiro recurso da plataforma que o catálogo indica para uma página é o dono dela e dá nome ao tópico dela na seção de Guias. - **Mantenha o hub em dia com a seção.** Atualize o hub na mesma mudança que adiciona uma página. - **Defina `type: homepage` somente em um hub em grade de cards.** Todas as outras páginas omitem o campo. Para mais informações, consulte [Frontmatter](/pt-br/documentacao/guia-de-estilo/convencoes/frontmatter/). @@ -117,7 +117,7 @@ Esta seção reúne os guias para gerenciar buckets e objetos do Object Storage, - A raiz do recurso de plataforma, que orienta e aponta, mas também descreve. + A raiz do recurso da plataforma, que orienta e aponta, mas também descreve. Onde os hubs ficam e quais seções precisam de um. O campo `type: homepage` que um hub em grade de cards define. O catálogo completo de tipos de página. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/quickstart.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/quickstart.mdx index a1beff2248..2f98d700ac 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/quickstart.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/quickstart.mdx @@ -2,7 +2,7 @@ title: Páginas de quickstart description: >- Escreva uma página de quickstart: um tutorial cujo objetivo é a primeira - ativação de um recurso de plataforma, com um caminho por interface e pré-requisitos mínimos. + ativação de um recurso da plataforma, com um caminho por interface e pré-requisitos mínimos. meta_tags: 'style guide, quickstart, get started' namespace: documentation_style_guide_quickstart permalink: /documentacao/guia-de-estilo/conteudo/quickstart/ @@ -13,18 +13,18 @@ import DocItem from '@aziontech/webkit/doc-item' ## Propósito -Uma página de quickstart é um tutorial cujo objetivo é a primeira ativação de um recurso de plataforma: de não usar o recurso até o menor resultado que funciona. Ela segue a forma base do [tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/). +Uma página de quickstart é um tutorial cujo objetivo é a primeira ativação de um recurso da plataforma: de não usar o recurso até o menor resultado que funciona. Ela segue a forma base do [tutorial](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/). -Quickstart é um slot de toda seção de recurso de plataforma. O onboarding da plataforma, como [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/) em Fundamentos, tem nome parecido e é outra coisa: ele não pertence a nenhum recurso de plataforma. +Quickstart é um slot de toda seção de recurso da plataforma. O onboarding da plataforma, como [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/) em Fundamentos, tem nome parecido e é outra coisa: ele não pertence a nenhum recurso da plataforma. ## Quando usar -- Escreva uma página de quickstart quando um recurso de plataforma precisa de um caminho documentado até o primeiro resultado que funciona. -- Escreva pelo menos uma página de quickstart por recurso de plataforma, como ponto de entrada logo depois da visão geral dele. -- Adicione um painel de interface quando o primeiro uso de um recurso de plataforma passa por Azion Console, pela Azion CLI ou pela API. +- Escreva uma página de quickstart quando um recurso da plataforma precisa de um caminho documentado até o primeiro resultado que funciona. +- Escreva pelo menos uma página de quickstart por recurso da plataforma, como ponto de entrada logo depois da visão geral dele. +- Adicione um painel de interface quando o primeiro uso de um recurso da plataforma passa por Azion Console, pela Azion CLI ou pela API. - Não escreva uma página de quickstart para uma tarefa que o leitor já tem em mente. Essa tarefa precisa de um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/). - Não compare interfaces nem ofereça opções dentro de um painel. Um painel documenta uma interface, do início ao fim. -- Não escreva uma página de quickstart separada para uma feature. O padrão cobre um recurso de plataforma inteiro. +- Não escreva uma página de quickstart separada para uma feature. O padrão cobre um recurso da plataforma inteiro. ## Registro @@ -32,7 +32,7 @@ Procedural: 20 palavras por frase, uma instrução por passo, imperativo e ativo ## Estrutura -Uma página de quickstart segue o esqueleto do tutorial, com uma diferença: os títulos de etapa não levam número. [Tutoriais](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) argumenta cada parte, e esta lista nomeia o que o padrão exige. Uma página leva o título `Primeiros passos com `, documente ela uma interface ou várias em tabs. Uma página que existe porque as etapas não puderam ser compartilhadas leva `Primeiros passos com `: `pelo Azion Console`, `pela Azion CLI`, `pela API` ou `por um agente de IA`. +Uma página de quickstart segue o esqueleto do tutorial, com uma diferença: os títulos de etapa não levam número. [Tutoriais](/pt-br/documentacao/guia-de-estilo/conteudo/tutoriais/) argumenta cada parte, e esta lista nomeia o que o padrão exige. Uma página leva o título `Primeiros passos com `, documente ela uma interface ou várias em tabs. Uma página que existe porque as etapas não puderam ser compartilhadas leva `Primeiros passos com `: `pelo Azion Console`, `pela Azion CLI`, `pela API` ou `por um agente de IA`. **Componentes obrigatórios** @@ -50,7 +50,7 @@ Uma página de quickstart segue o esqueleto do tutorial, com uma diferença: os ## Template -Copie o template e substitua cada ``. Um recurso de plataforma com uma única interface dispensa o bloco `` e escreve o procedimento diretamente sob o título da etapa: +Copie o template e substitua cada ``. Um recurso da plataforma com uma única interface dispensa o bloco `` e escreve o procedimento diretamente sob o título da etapa: ```mdx import DocCardGroup from '@aziontech/webkit/doc-card-group' @@ -150,8 +150,8 @@ Para no Azion Console: - **Dê a todos os blocos o mesmo `sharedStore="interface"` e as mesmas chaves de painel.** A seleção única então governa todas as etapas, e acompanha o leitor até a página seguinte. Uma etapa que omite uma interface que o seletor oferece abre no próprio primeiro painel, o que move o leitor para outra interface no meio da página, sem avisar. - **Escreva cada painel para ser lido sozinho.** A frase de entrada nomeia a interface, e a frase de resultado fica dentro do painel: o Azion Console mostra uma lista onde a API retorna um corpo de resposta. Nunca escreva "como você selecionou acima": a seleção acompanha o leitor até a página seguinte, mas uma página que não oferece aquela interface abre no próprio primeiro painel. - **Abra cada painel com o nome da interface como título.** O título fica um nível abaixo da etapa e repete o rótulo da tab: `### Console`, `### CLI`, `### API`. O leitor que já rolou para além do seletor continua vendo a qual interface os passos pertencem. Os títulos de painel ficam fora do sumário. Cada um aponta para a sua etapa com a interface selecionada, `?interface=api#crie-um-banco-de-dados`, então um link compartilhado abre a etapa certa na tab certa. -- **Divida em páginas separadas quando as etapas não podem ser compartilhadas.** Interfaces que precisam de etapas diferentes, ou de outra cadeia de objetos, são caminhos diferentes, não mecânicas diferentes. Dê a cada uma sua própria página, com o título `Primeiros passos com `, sob um único grupo Primeiros passos na sidebar, com o Console primeiro. O grupo é um pai da sidebar, não uma página. Nomeie os irmãos em uma linha logo abaixo da abertura: `Prefere a CLI? Consulte [Primeiros passos com pela Azion CLI](/caminho/).` -- **Um primeiro uso por agente de IA é sempre sua própria página.** Um caminho que o leitor conduz por prompt não compartilha etapa com um caminho de cliques nem com um comando. Dê a ela o título `Primeiros passos com por um agente de IA`, conectada pelo [servidor MCP da Azion](/pt-br/documentacao/agent-setup/), e nomeie-a na linha dos irmãos. +- **Divida em páginas separadas quando as etapas não podem ser compartilhadas.** Interfaces que precisam de etapas diferentes, ou de outra cadeia de objetos, são caminhos diferentes, não mecânicas diferentes. Dê a cada uma sua própria página, com o título `Primeiros passos com `, sob um único grupo Primeiros passos na sidebar, com o Console primeiro. O grupo é um pai da sidebar, não uma página. Nomeie os irmãos em uma linha logo abaixo da abertura: `Prefere a CLI? Consulte [Primeiros passos com pela Azion CLI](/caminho/).` +- **Um primeiro uso por agente de IA é sempre sua própria página.** Um caminho que o leitor conduz por prompt não compartilha etapa com um caminho de cliques nem com um comando. Dê a ela o título `Primeiros passos com por um agente de IA`, conectada pelo [servidor MCP da Azion](/pt-br/documentacao/agent-setup/), e nomeie-a na linha dos irmãos. - **Documente apenas a interface que você rodou do início ao fim.** Deixe de fora o painel que você ainda não consegue verificar, em vez de preencher os passos dele a partir dos outros painéis. Um caminho de primeiro uso desatualizado falha com o leitor no primeiro contato. - **Escreva cada etapa como um procedimento.** Os passos seguem [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/), e cada etapa termina com sua frase de resultado. - **Refira-se a uma etapa pelo que ela produz, nunca pelo número.** Os títulos não levam número, então "o ID da etapa 1" não aponta para nada. Nomeie o objeto: "o `id` da zona que você criou", "`curl`, para enviar a requisição final". @@ -160,7 +160,7 @@ Para no Azion Console: - **Aponte tutoriais e os principais how-tos em `## Próximos passos`.** Dê a cada card seu motivo. - **Teste todo comando antes de publicar.** Uma instrução por passo, e um resultado visível em cada um. - **Mostre a saída depois de cada comando.** O leitor vê como o sucesso se parece antes que o próximo passo dependa dele. A regra está em [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/). -- **Coloque a página logo depois da visão geral do recurso de plataforma.** +- **Coloque a página logo depois da visão geral do recurso da plataforma.** ## Exemplos @@ -261,7 +261,7 @@ Os dois painéis alcançam o mesmo objeto, então o título da etapa e a cadeia A forma base que este padrão aplica. Para onde vão as opções e as alternativas. - Onde a página fica na seção do recurso de plataforma. + Onde a página fica na seção do recurso da plataforma. O catálogo completo de tipos de página. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/referencia.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/referencia.mdx index a4d041e19f..0adc22355b 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/referencia.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/referencia.mdx @@ -38,7 +38,7 @@ Descritivo: 25 palavras por frase, voz ativa, passiva apenas quando o agente é - **Título**: uma expressão nominal que nomeia a coisa: `Object Storage`, `Configurações de cache`, `azion create bucket`. - **Abertura**: uma a três frases definicionais sobre o artefato, e depois direto para os dados. Sem enquadramento de procedimento. - **Seções**: `##`s como expressões nominais que nomeiam o objeto, o grupo de campos ou o nível real. As tabelas carregam a informação — campos, valores, padrões, limites — com fraseado consistente em cada coluna e unidade em cada número. A prosa entre as tabelas é uma ou duas frases de orientação. -- **Limites**: uma seção `## Limites` quando o recurso de plataforma os tem, **dimensionada por plano**. Use `| Escopo | Plano | Limite |` quando um escopo se repete entre planos, ou uma coluna por plano quando o conjunto é curto o bastante para ler na horizontal. Cada linha carrega sua unidade e diz se o limite é rígido ou ajustável. +- **Limites**: uma seção `## Limites` quando o recurso da plataforma os tem, **dimensionada por plano**. Use `| Escopo | Plano | Limite |` quando um escopo se repete entre planos, ou uma coluna por plano quando o conjunto é curto o bastante para ler na horizontal. Cada linha carrega sua unidade e diz se o limite é rígido ou ajustável. - **Fechamento**: `## Recursos relacionados`, uma lista de `DocItem` cobrindo a página de conceito e os principais how-tos, cada linha com seu motivo. **Componentes opcionais** @@ -47,7 +47,7 @@ Descritivo: 25 palavras por frase, voz ativa, passiva apenas quando o agente é As seções mantêm essa ordem. -Quando o conjunto de limites cresce o bastante para ser consultado sozinho, ele vai para o slot Limites da seção do recurso de plataforma. Estas regras não mudam: só o lugar muda. [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/) tem a lista de slots. +Quando o conjunto de limites cresce o bastante para ser consultado sozinho, ele vai para o slot Limites da seção do recurso da plataforma. Estas regras não mudam: só o lugar muda. [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/) tem a lista de slots. ## Template @@ -58,7 +58,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -**** é . +**** é . ## @@ -106,7 +106,7 @@ O suporte pode aumentar os limites marcados como ajustáveis. Entre em contato c - **Dimensione todo limite por plano.** Um limite que muda entre planos não é um fato só. Um número publicado sem o plano a que pertence está errado para todo leitor que está em outro plano. - **Separe limite de valor padrão.** Um valor padrão é um campo e fica na tabela de campos. Um limite é um teto e fica em `## Limites`. - **Diga se cada limite é rígido ou ajustável.** A próxima ação do leitor depende disso: um limite ajustável é um chamado no suporte, um limite rígido é uma restrição de design. -- **Nunca invente um limite nem um nome de plano.** Tire os dois da página de pricing, do contrato de planos ou do time responsável pelo recurso de plataforma. Um valor que você não consegue confirmar não é publicado: estreite a tabela até as dimensões que você consegue confirmar. +- **Nunca invente um limite nem um nome de plano.** Tire os dois da página de pricing, do contrato de planos ou do time responsável pelo recurso da plataforma. Um valor que você não consegue confirmar não é publicado: estreite a tabela até as dimensões que você consegue confirmar. - **Nunca repita um preço.** Valores, cotas vendidas por unidade e métricas de cobrança vivem só na página de pricing. Aponte para ela; não copie. - **Sem marketing.** Diga o que faz e onde para. - **Uma página de comando da CLI tem sua própria forma.** Um resumo de uma linha, depois `## Uso` com o comando, depois `## Flags opcionais` com uma entrada por flag. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/troubleshooting.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/troubleshooting.mdx index 8c26ad7928..c8a8759679 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/troubleshooting.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/troubleshooting.mdx @@ -20,7 +20,7 @@ Uma página de troubleshooting corrige um sintoma que o leitor está vendo agora - Escreva uma página de troubleshooting quando uma falha conhecida tem uma correção que o leitor aplica sozinho. - Escreva uma página para um grupo de sintomas relacionados, com uma seção por sintoma. - Não escreva uma página de troubleshooting para uma tarefa que o leitor planeja. Uma tarefa planejada precisa de um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/). -- Não escreva uma página quando o recurso de plataforma funciona como projetado. As razões de um design pertencem a uma página de [conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/). +- Não escreva uma página quando o recurso da plataforma funciona como projetado. As razões de um design pertencem a uma página de [conceito](/pt-br/documentacao/guia-de-estilo/conteudo/conceito/). - Não escreva uma página quando a única correção é um ticket de suporte. Uma página cujo único passo é "abra um ticket" é um link, não uma página. ## Registro @@ -33,8 +33,8 @@ O título tem a forma `Solucione problemas de `: **Componentes obrigatórios** -- **Abertura**: uma frase de escopo que nomeia o recurso de plataforma e a classe de sintomas que a página cobre. -- **Seções de sintoma**: uma seção `##` por sintoma, cada uma autossuficiente e legível em qualquer ordem. Em um recurso de plataforma com recursos de plataforma aninhados, os sintomas do pai vêm primeiro, depois uma seção `## ` por aninhado, com os sintomas dele em `###`. As regras de uma seção de sintoma valem da mesma forma para cada `###`. +- **Abertura**: uma frase de escopo que nomeia o recurso da plataforma e a classe de sintomas que a página cobre. +- **Seções de sintoma**: uma seção `##` por sintoma, cada uma autossuficiente e legível em qualquer ordem. Em um recurso da plataforma com recursos da plataforma aninhados, os sintomas do pai vêm primeiro, depois uma seção `## ` por aninhado, com os sintomas dele em `###`. As regras de uma seção de sintoma valem da mesma forma para cada `###`. - **Títulos de sintoma**: uma frase nominal que declara o comportamento observável, com a mensagem de erro citada literalmente como texto simples: `## 403 Forbidden em requisições legítimas`. Sem código inline em título: as crases renderizam um chip de código que quebra a linha do título. - **O sintoma**: o que o leitor vê, em uma ou duas frases, primeiro em cada seção. - **A causa**: o que produz o sintoma. @@ -56,7 +56,7 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -[Uma frase de escopo: o recurso de plataforma e a classe de sintomas +[Uma frase de escopo: o recurso da plataforma e a classe de sintomas que a página cobre.] --- @@ -102,7 +102,7 @@ Separe as seções de sintoma com uma linha `---` e nunca coloque uma imediatame ## Regras - **Nomeie a página pela classe de sintomas.** O título tem a forma `Solucione problemas de `, e `Troubleshoot ` em inglês dos EUA. -- **Abra com uma frase de escopo** que nomeia o recurso de plataforma e a classe de sintomas que a página cobre. +- **Abra com uma frase de escopo** que nomeia o recurso da plataforma e a classe de sintomas que a página cobre. - **Nomeie o sintoma, não a causa.** O leitor busca com o que ele vê. Cite as mensagens de erro literalmente: no corpo em monospace, em um título como texto simples, porque as crases renderizam um chip de código que quebra a linha do título. - **Faça cada seção de sintoma ficar de pé sozinha.** O leitor chega a qualquer seção primeiro; nomeie o assunto em cada uma. - **Mantenha a ordem dentro de cada seção**: o sintoma, a causa, a correção, o resultado. @@ -110,7 +110,7 @@ Separe as seções de sintoma com uma linha `---` e nunca coloque uma imediatame - **Escreva as correções como passos numerados e imperativos** conforme [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/), ou como marcadores na forma `****: o que ela faz e seu link`. - **Aponte procedimentos longos em vez de repeti-los.** A correção contém o que é específico do sintoma; o caminho genérico é um link. - **Feche com `## Recursos relacionados`**: uma lista de `DocItem` com os guias how-to e as páginas de referência em que as correções se apoiam. Um aside de suporte pode vir antes. -- **Posicione pelo escopo.** Problemas da plataforma em Suporte, problemas de um recurso de plataforma nos guias daquele recurso. +- **Posicione pelo escopo.** Problemas da plataforma em Suporte, problemas de um recurso da plataforma nos guias daquele recurso. ## Exemplos diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/tutoriais.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/tutoriais.mdx index 771051ee7d..7bc8cfeef1 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/tutoriais.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/tutoriais.mdx @@ -13,20 +13,20 @@ import DocItem from '@aziontech/webkit/doc-item' ## Propósito -Um tutorial ensina um recurso de plataforma ao levar o leitor a construir algo que funciona. O autor escolhe o objetivo, garante o resultado e mantém todas as decisões longe do leitor. +Um tutorial ensina um recurso da plataforma ao levar o leitor a construir algo que funciona. O autor escolhe o objetivo, garante o resultado e mantém todas as decisões longe do leitor. ## Quando usar **Reconheça um tutorial por:** -- Um leitor que já escolheu o recurso de plataforma e ainda não construiu nada com ele. +- Um leitor que já escolheu o recurso da plataforma e ainda não construiu nada com ele. - Um artefato que funciona quando a última etapa termina. - Um caminho único que o autor escolheu e garante, do primeiro comando até um resultado verificado. - Aprendizado que chega como efeito de construir, nunca como aula. **Continua sendo um tutorial quando:** -- Usa mais de um recurso de plataforma, porque o artefato precisa deles. O autor escolheu o objetivo, e é isso que decide o tipo. +- Usa mais de um recurso da plataforma, porque o artefato precisa deles. O autor escolheu o objetivo, e é isso que decide o tipo. - Constrói sobre um serviço de terceiro que faz parte do artefato. Nomeie o passo do fornecedor e aponte para fora; nunca documente a interface dele. - Roda inteiramente no Azion Console, porque esse é o caminho honesto até o resultado. - Deixa de fora uma capacidade que o artefato não precisa. Completude é assunto de [referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/). @@ -34,7 +34,7 @@ Um tutorial ensina um recurso de plataforma ao levar o leitor a construir algo q **Escreva outra coisa quando:** - O leitor chegou com a tarefa já em mente. Isso é um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/). -- A página ativa um recurso de plataforma pela primeira vez. Isso é um [quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/). +- A página ativa um recurso da plataforma pela primeira vez. Isso é um [quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/). - A página explica um caso de uso do catálogo. Isso é um [caso de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/). - O assunto é campos, valores e padrões. Isso é [referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/). - Nada fica pronto no fim. Passos que não terminam em nada não ensinam nada, então encontre o artefato ou descarte a página. @@ -111,7 +111,7 @@ Você vai criar <...>, configurar <...> e fazer o deploy de <...>. - **Aponte para fora nos serviços de terceiros.** Nomeie o passo do fornecedor; não documente a interface dele. - **Dê a cada bloco de código uma introdução com dois-pontos.** "Instale a CLI:" e depois o comando. Use `` para tudo que o leitor copia. - **Mostre a saída depois de cada comando.** O leitor vê como o sucesso se parece antes que o próximo passo dependa dele. A regra está em [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/). -- **Mantenha tutoriais escassos.** Um por área de recurso de plataforma. Tutoriais são caros de manter funcionando. +- **Mantenha tutoriais escassos.** Um por área de recurso da plataforma. Tutoriais são caros de manter funcionando. - **Aponte os how-tos e conceitos que o tutorial tocou em `## Próximos passos`.** Dê a cada card seu motivo. ## Exemplos diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/visao-geral.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/visao-geral.mdx index 2fd819d910..d25118cefc 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/visao-geral.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/conteudo/visao-geral.mdx @@ -1,8 +1,8 @@ --- title: Páginas de visão geral description: >- - Escreva a visão geral de um recurso de plataforma: a raiz da seção, que diz - o que o recurso de plataforma é, o que ele faz e quando usá-lo. + Escreva a visão geral de um recurso da plataforma: a raiz da seção, que diz + o que o recurso da plataforma é, o que ele faz e quando usá-lo. meta_tags: 'style guide, overview' namespace: documentation_style_guide_overview_pages permalink: /documentacao/guia-de-estilo/conteudo/visao-geral/ @@ -13,18 +13,18 @@ import DocItem from '@aziontech/webkit/doc-item' ## Propósito -Uma página de visão geral é a raiz da seção de um recurso de plataforma. Ela diz o que o recurso de plataforma é, o que ele faz e quando o leitor o usaria. Ela aplica a forma base de [referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/). +Uma página de visão geral é a raiz da seção de um recurso da plataforma. Ela diz o que o recurso da plataforma é, o que ele faz e quando o leitor o usaria. Ela aplica a forma base de [referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/). -Todo recurso de plataforma tem uma. É a página onde o leitor chega pela busca, pela sidebar e por outro recurso de plataforma que aponta para este. +Todo recurso da plataforma tem uma. É a página onde o leitor chega pela busca, pela sidebar e por outro recurso da plataforma que aponta para este. ## Quando usar -- Escreva uma visão geral para cada recurso de plataforma, como a primeira página da seção. +- Escreva uma visão geral para cada recurso da plataforma, como a primeira página da seção. - Escreva-a antes de qualquer outra página da seção. A visão geral define do que a seção trata. Não escreva uma visão geral quando: -- O assunto é uma feature, como o Tiered Cache ou as regras personalizadas de firewall. Isso vai em uma [página de referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/) dentro da seção. Um recurso de plataforma aninhado em outro não é uma feature: ele pode ter uma página de visão geral própria, e a visão geral do recurso pai aponta para ela. +- O assunto é uma feature, como o Tiered Cache ou as regras personalizadas de firewall. Isso vai em uma [página de referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/) dentro da seção. Um recurso da plataforma aninhado em outro não é uma feature: ele pode ter uma página de visão geral própria, e a visão geral do recurso pai aponta para ela. - A página levaria o leitor por uma tarefa. Isso é um [guia how-to](/pt-br/documentacao/guia-de-estilo/conteudo/guias-how-to/), com link a partir daqui. - A página só listaria links. Isso é um [hub de navegação](/pt-br/documentacao/guia-de-estilo/conteudo/hubs-de-navegacao/). @@ -36,11 +36,11 @@ Descritivo: 25 palavras por frase, voz ativa, passiva apenas quando o agente é **Componentes obrigatórios** -- **Bloco de definição**, em três partes. Primeiro o recurso de plataforma: `**** é um que .` Essa frase nomeia o recurso, declara a classe dele e se sustenta sozinha. A classe é `recurso de plataforma`, tanto na visão geral de uma seção quanto na de um recurso de plataforma aninhado, conforme [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/#declare-a-classe-de-um-elemento-da-azion). A frase nunca depende de um conceito que o leitor ainda não conheceu, como faz "executa esse código". Depois o conceito: uma ou duas frases dizendo o que é a classe da coisa, para um leitor que nunca usou uma, com qualquer termo do mercado definido no próprio texto. Depois uma frase nomeando as tarefas concretas para as quais as pessoas o usam, no vocabulário do leitor, fechando o bloco: `Use para fazer A, executar B ou servir C.` Uma lista de benefícios em bullets é a forma mais fraca dessa frase: parece um folheto e custa uma tela. -- **CTAs**: um `DocButton` primário com o rótulo **Primeiros passos** e um secundário com o rótulo `Referência de `. -- **A amostra**: quando o recurso de plataforma tem um artefato de código, um objeto de configuração ou uma requisição, um exemplo completo e mínimo dele, inteiro, na primeira tela. Dois a quatro bullets nomeiam as partes, e uma frase diz qual conhecimento prévio se aproveita. Um recurso de plataforma sem esse artefato pula a seção em vez de inventar uma. -- **O mecanismo**: quando uma requisição, um evento ou um job atravessa mais de dois objetos antes de o recurso de plataforma executar, essa cadeia como um diagrama `mermaid`, seguido de um percurso numerado com no máximo seis itens. Abra com o que o leitor presumiria errado e diga na mesma frase o que acontece no lugar: `Criar uma Function não a expõe: uma requisição só chega a ela por uma Function Instance que uma regra invoca.` -- **Os recursos**: somente em um recurso de plataforma que tem outros recursos de plataforma aninhados nele. Para cada aninhado, diga o que ele faz neste recurso e quando o leitor o ativa, em uma ou duas frases, a primeira declarando a classe dele: ` é um recurso de plataforma que…`. Depois aponte para onde o leitor vai para usá-lo. É o que o leitor precisa para decidir se abre o recurso de plataforma aninhado, nunca a lista de features. +- **Bloco de definição**, em três partes. Primeiro o recurso da plataforma: `**** é um que .` Essa frase nomeia o recurso, declara a classe dele e se sustenta sozinha. A classe é `recurso da plataforma`, tanto na visão geral de uma seção quanto na de um recurso da plataforma aninhado, conforme [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/#declare-a-classe-de-um-elemento-da-azion). A frase nunca depende de um conceito que o leitor ainda não conheceu, como faz "executa esse código". Depois o conceito: uma ou duas frases dizendo o que é a classe da coisa, para um leitor que nunca usou uma, com qualquer termo do mercado definido no próprio texto. Depois uma frase nomeando as tarefas concretas para as quais as pessoas o usam, no vocabulário do leitor, fechando o bloco: `Use para fazer A, executar B ou servir C.` Uma lista de benefícios em bullets é a forma mais fraca dessa frase: parece um folheto e custa uma tela. +- **CTAs**: um `DocButton` primário com o rótulo **Primeiros passos** e um secundário com o rótulo `Referência de `. +- **O mecanismo**: quando uma requisição, um evento ou um job atravessa mais de dois objetos antes de o recurso da plataforma executar, essa cadeia como um diagrama `mermaid`, seguido de um percurso numerado com no máximo seis itens. Abra com o que o leitor presumiria errado e diga na mesma frase o que acontece no lugar: `Criar uma Function não a expõe: uma requisição só chega a ela por uma Function Instance que uma regra invoca.` +- **A amostra**: quando o recurso da plataforma tem um artefato de código, um objeto de configuração ou uma requisição, um exemplo completo e mínimo dele, inteiro, logo depois do mecanismo, ou logo depois dos CTAs quando a página não tem a seção de mecanismo. Dois a quatro bullets nomeiam as partes, e uma frase diz qual conhecimento prévio se aproveita. Um recurso da plataforma sem esse artefato pula a seção em vez de inventar uma. +- **Os recursos**: somente em um recurso da plataforma que tem outros recursos da plataforma aninhados nele. Para cada aninhado, diga o que ele faz neste recurso e quando o leitor o ativa, em uma ou duas frases, a primeira declarando a classe dele: ` é um recurso da plataforma que…`. Depois aponte para onde o leitor vai para usá-lo. É o que o leitor precisa para decidir se abre o recurso da plataforma aninhado, nunca a lista de features. - **As fronteiras**: um único bloco compacto de bullets com introduções em negrito — linguagens, APIs, frameworks, integrações e os principais limites. Um bloco, não uma seção por feature. - **Seções de capacidade**: só para uma capacidade que muda o que o leitor construiria, no máximo três. Uma capacidade que cabe em uma frase e um link pertence ao bloco de fronteiras ou ao roteador. - **Fechamento**: `## Próximos passos`, um `DocCardGroup` indexado pelo que o leitor quer fazer: cada card nomeia o destino, e seu texto é a intenção (`Rode o primeiro agora.`). @@ -56,32 +56,32 @@ import DocButton from '~/components/webkit/DocButton.vue' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -**** é um que . +**** é um que . -Use para , ou . +Use para , ou . - + -## +## - + -- ****: . -- ****: . + - +1. +2. <...> --- -## +## - + - +- ****: . +- ****: . -1. -2. <...> + ## @@ -100,22 +100,28 @@ Use para , ou . ## Regras -- **Nunca instrua.** Sem passos numerados, sem procedimentos, sem sequências de cliques. A amostra não é um passo a passo: ela aparece uma vez, completa, sem nada para o leitor fazer. Uma visão geral que instrui é uma página de [quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/) arquivada no lugar errado. -- **Sem adjetivos de qualidade.** Diga o que o recurso de plataforma faz e onde para. -- **O título é o nome do recurso de plataforma, um substantivo.** Não "documentação", não um gerúndio. -- **Coloque o recurso de plataforma antes do conceito.** A primeira frase declara a classe do recurso de plataforma e o que ele faz na Azion; as frases de conceito vêm depois. Cubra o nome do recurso de plataforma nas frases de conceito: o que sobra precisa valer para a versão de qualquer fornecedor. -- **Corte do bloco de definição o que o leitor não precisa.** Quatro tipos de frase saem: o contexto que o recurso de plataforma não muda, como a delegação de um domínio a partir do registro; o passo que o leitor já presume, como um proxy abrindo a própria conexão com a origem; um ponto que o bloco já fez; e um contraste com algo que a página não cobre, como `Um log é a visão oposta.` -- **Um uso diz o que este recurso de plataforma acrescenta.** A frase de usos nomeia as tarefas que este recurso de plataforma faz e outro não. Em Functions, o uso é "bloquear requisições com a sua própria lógica", porque o Firewall já bloqueia requisições por regra. Um recurso de plataforma de segurança nomeia o padrão público que as páginas dele documentam, como o OWASP Top 10. -- **Nomeie o recurso de plataforma na primeira frase, e nunca abra com o contexto do problema.** Uma frase de conceito explica um mecanismo. Uma frase sobre a importância do problema não explica nada. -- **Organize pelas perguntas do leitor, não pela sua lista de features.** As seções respondem, na ordem: o que o recurso de plataforma da Azion faz, o que é a classe da coisa, o que eu escrevo, como isso é chamado, quais produtos ele hospeda, o que faz e onde para, para onde vou agora. Um sumário que reproduz a lista de features do recurso de plataforma é um catálogo: responde "o que vendemos" em vez de "o que estou decidindo". +- **Nunca instrua.** Sem passos numerados, sem procedimentos, sem sequências de cliques. A amostra não é um passo a passo: ela aparece uma vez, completa, sem nada para o leitor fazer. Uma visão geral que instrui é uma página de [quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/) arquivada no lugar errado. Um caminho do Console dentro de uma frase também conta: declare a configuração no lugar dele, conforme [Escolha de palavras](/pt-br/documentacao/guia-de-estilo/escrita/escolha-de-palavras/#declare-a-configuracao-nao-o-caminho-fora-de-uma-tarefa). +- **Sem adjetivos de qualidade.** Diga o que o recurso da plataforma faz e onde para. +- **O título é o nome do recurso da plataforma, um substantivo.** Não "documentação", não um gerúndio. +- **Coloque o recurso da plataforma antes do conceito.** A primeira frase declara a classe do recurso da plataforma e o que ele faz na Azion; as frases de conceito vêm depois. Cubra o nome do recurso da plataforma nas frases de conceito: o que sobra precisa valer para a versão de qualquer fornecedor. +- **Faça cada palavra de posição concordar com o caminho da requisição.** `para`, `de`, `na frente de`, `atrás de` e `antes de` implicam, cada uma, uma seta. Desenhe as setas que a frase implica e compare com o diagrama da página. Diga a direção com o verbo: `processa as requisições recebidas pelos seus Workloads`. `executa um proxy reverso para os seus Workloads` põe os Workloads atrás do proxy, e a requisição vai no sentido contrário. +- **Escolha um verbo que cubra tudo o que o recurso da plataforma faz.** Quando um recurso da plataforma faz duas ou mais coisas no mesmo nível, a primeira frase declara o papel que elas têm em comum e a frase seguinte as lista: `**Applications** é um recurso da plataforma que processa as requisições recebidas pelos seus Workloads. Uma Application pode executar funções serverless, atuar como proxy reverso para as suas origens ou combinar os dois.` Teste a frase contra a menor configuração que a documentação mostra. +- **Leia a definição como um leitor do mercado.** Um desenvolvedor que conhece o vocabulário de outras plataformas lê workload como aquilo que roda atrás de um ponto de entrada. Quando essa leitura diz algo falso sobre a Azion, reescreva a frase para que ela declare o papel ou a direção. Isto é um modo de ler, não uma lista de palavras a evitar. +- **Conte para a frente a relação entre dois recursos da plataforma.** Quem faz a ligação é o sujeito, e a frase segue a ordem em que as coisas acontecem: `Uma Application recebe as requisições de um Workload depois que o deployment desse Workload define essa Application.` A frase `Uma Application recebe as requisições dos Workloads cujo deployment a define.` começa pelo fim e deixa dois pronomes apontando para trás. O verbo leva o objeto por extenso: `define essa Application`, nunca `a define`. +- **Escolha o conceito com cuidado.** Vários elementos da Azion fazem coisas diferentes sob um mesmo nome. Quando um conceito de mercado cobre tudo o que o recurso da plataforma faz, explique esse conceito. Quando nenhum cobre, explique cada coisa em uma frase. +- **Nomeie o recurso da plataforma que fornece um conceito.** Quando outro recurso da plataforma fornece uma dessas coisas, a frase que explica o termo de mercado nomeia a instância dele logo depois do termo e mantém a explicação: `Uma função serverless é uma Function, um código executado sob demanda a cada requisição, sem um servidor para você provisionar.` +- **Corte do bloco de definição o que o leitor não precisa.** Quatro tipos de frase saem: o contexto que o recurso da plataforma não muda, como a delegação de um domínio a partir do registro; o passo que o leitor já presume, como um proxy abrindo a própria conexão com a origem; um ponto que o bloco já fez; e um contraste com algo que a página não cobre, como `Um log é a visão oposta.` +- **Um uso diz o que este recurso da plataforma acrescenta.** A frase de usos nomeia as tarefas que este recurso da plataforma faz e outro não. Em Functions, o uso é "bloquear requisições com a sua própria lógica", porque o Firewall já bloqueia requisições por regra. Um recurso da plataforma de segurança nomeia o padrão público que as páginas dele documentam, como o OWASP Top 10. +- **Nomeie o recurso da plataforma na primeira frase, e nunca abra com o contexto do problema.** Uma frase de conceito explica um mecanismo. Uma frase sobre a importância do problema não explica nada. +- **Organize pelas perguntas do leitor, não pela sua lista de features.** As seções respondem, na ordem: o que o recurso da plataforma da Azion faz, o que é a classe da coisa, como isso é chamado, o que eu escrevo, quais produtos ele hospeda, o que faz e onde para, para onde vou agora. Um sumário que reproduz a lista de features do recurso da plataforma é um catálogo: responde "o que vendemos" em vez de "o que estou decidindo". - **As perguntas moldam as seções; elas nunca viram títulos.** Um título é uma expressão nominal curta, nunca uma pergunta: `Estrutura de uma função`, não `Como é uma função`. -- **Desenhe o diagrama a partir da sequência documentada.** Um diagrama de uma sequência que a documentação já descreve em prosa é uma mudança de notação, não um fato novo. Cada nó e cada seta corresponde a um passo que o recurso de plataforma executa, e o percurso numerado carrega o significado se a figura não renderizar. +- **Desenhe o diagrama a partir da sequência documentada.** Um diagrama de uma sequência que a documentação já descreve em prosa é uma mudança de notação, não um fato novo. Cada nó e cada seta corresponde a um passo que o recurso da plataforma executa, e o percurso numerado carrega o significado se a figura não renderizar. - **Envie o leitor para o [Quickstart](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/)**, nos CTAs e de novo no roteador. - **Nunca encurte a amostra nem tire o diagrama para deixar a página mais curta.** Eles são as duas coisas que o leitor veio buscar. Quando uma página fica longa, o excesso está nas seções de capacidade; comprima-as no bloco de fronteiras. ## Exemplos -Este trecho, em inglês dos EUA, da visão geral de **Functions** mostra o bloco de definição nas suas três partes e depois a amostra. A primeira frase nomeia o recurso de plataforma, declara a classe dele e diz o que ele faz na Azion; as seguintes explicam o que é uma função para um leitor que nunca usou uma; a frase de usos fecha o bloco; a amostra mostra o artefato em vez de descrevê-lo: +Este trecho, em inglês dos EUA, da visão geral de **Functions** mostra o bloco de definição nas suas três partes e a amostra, e deixa o mecanismo de fora. A primeira frase nomeia o recurso da plataforma, declara a classe dele e diz o que ele faz na Azion; as seguintes explicam o que é uma função para um leitor que nunca usou uma; a frase de usos fecha o bloco; a amostra mostra o artefato em vez de descrevê-lo: ```mdx **Functions** is a Platform Resource that runs JavaScript code on Azion's distributed infrastructure, inside the request path of an application or a firewall. A function is code that runs when a request arrives: you write a handler that receives the request and returns a response, and the platform starts it on demand and stops it when the response is sent, so there is no server to provision or scale. That model is called [serverless](https://www.azion.com/en/learning/serverless/what-is-serverless/). Use Functions to build APIs, manipulate request and response headers, apply logic from request metadata, or block traffic before it reaches your application. @@ -161,7 +167,7 @@ import DocCard from '@aziontech/webkit/doc-card' A forma base que a visão geral aplica. A página para onde a visão geral envia o leitor. - Onde a visão geral fica na seção do recurso de plataforma. + Onde a visão geral fica na seção do recurso da plataforma. O catálogo completo de tipos de página. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/frontmatter.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/frontmatter.mdx index 04b67e1934..33de74a436 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/frontmatter.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/frontmatter.mdx @@ -39,7 +39,7 @@ Duas regras se aplicam: A segunda regra não tem rede de proteção. O seletor perde a conexão entre as duas páginas em silêncio; confira o valor manualmente. -Escreva o valor em palavras minúsculas unidas por underscore. Construa o valor a partir do recurso de plataforma e da feature: `documentation_products_object_storage_bucket`. +Escreva o valor em palavras minúsculas unidas por underscore. Construa o valor a partir do recurso da plataforma e da feature: `documentation_products_object_storage_bucket`. ## Defina o permalink diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/paginas-bilingues.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/paginas-bilingues.mdx index aef2b8db40..157fd3e1e4 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/paginas-bilingues.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/convencoes/paginas-bilingues.mdx @@ -68,7 +68,7 @@ As regras estruturais de [Estrutura de frases](/pt-br/documentacao/guia-de-estil Seis regras cobrem a maior parte do trabalho em uma página em português do Brasil: - Não traduza termos técnicos genéricos: `data center`, `serverless`, `template`, `compliance`, `on-premise`, `authoritative DNS`. As strings `edge` e `edge computing` permanecem sem tradução onde já aparecem, mas textos novos não as introduzem. -- Não traduza nomes de recursos de plataforma nem outros nomes da Azion: **Applications**, **Functions**, **Firewall**, **Azion Platform**, **Azion Marketplace**. A instância também mantém o nome: `uma Function`, `as suas Applications`. Nunca troque um nome por uma descrição dele em português: `firewall de aplicação web` para Web Application Firewall, `gerenciamento de bots` para Bot Manager, `armazenamento de objetos` para Object Storage e `funções` para Functions escondem o nome que o leitor procura. +- Não traduza nomes de recursos da plataforma nem outros nomes da Azion: **Applications**, **Functions**, **Firewall**, **Azion Platform**, **Azion Marketplace**. A instância também mantém o nome: `uma Function`, `as suas Applications`. Nunca troque um nome por uma descrição dele em português: `firewall de aplicação web` para Web Application Firewall, `gerenciamento de bots` para Bot Manager, `armazenamento de objetos` para Object Storage e `funções` para Functions escondem o nome que o leitor procura. - Aplique as substituições: `aplicação`, não `aplicativo`, só para o software do próprio cliente, porque a instância criada na Azion é uma `Application`; `rede distribuída`, não `borda`, ao traduzir texto existente; `performance`, não `desempenho`. Texto novo em português do Brasil que nomeia onde a plataforma roda escreve `infraestrutura distribuída`. - Escreva a frase que um leitor brasileiro usa, não a frase em inglês palavra por palavra: `experimentaram` vira `experienciaram` ou `vivenciaram`, `nenhum servidor sozinho carrega toda ela` vira `nenhum servidor fica sobrecarregado`, e `nunca consulta uma API` vira `sem a necessidade de consultar uma API`. - Escreva títulos com maiúscula só na primeira palavra e nos nomes próprios. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/escolha-de-palavras.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/escolha-de-palavras.mdx index e13fbbeda6..9ef3b39106 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/escolha-de-palavras.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/escolha-de-palavras.mdx @@ -21,7 +21,7 @@ Mantenha uma palavra dessa família quando ela carrega significado técnico. Cor ## Evite adjetivos vazios -Um adjetivo vazio afirma qualidade sem descrever comportamento. Retire o adjetivo e diga o que o recurso de plataforma faz, o que ele aguenta ou o que ele cobre. [Voz da documentação](/pt-br/documentacao/guia-de-estilo/escrita/voz/) é a dona da regra de registro. Esta página cobre o vocabulário. +Um adjetivo vazio afirma qualidade sem descrever comportamento. Retire o adjetivo e diga o que o recurso da plataforma faz, o que ele aguenta ou o que ele cobre. [Voz da documentação](/pt-br/documentacao/guia-de-estilo/escrita/voz/) é a dona da regra de registro. Esta página cobre o vocabulário. O teste é se a palavra afirma *qualidade* ou descreve *comportamento*. "Segurança robusta" pede que o leitor confie em um adjetivo. "Um retry robusto com backoff exponencial" nomeia o mecanismo, e o adjetivo agora descreve algo testável. Mantenha uma palavra que passa nesse teste. Substitua a que não passa. @@ -94,6 +94,26 @@ Não use linguagem direcional. Nomeie o elemento, conforme [Acessibilidade](/pt- A gramática de passos que usa esses verbos está em [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/). +## Nomeie a interface junto com cada elemento dela + +Um rótulo em negrito, um caminho com `›`, um botão, uma aba, um campo ou um switch existe em uma interface só. Uma frase que nomeia um deles também nomeia essa interface, ou a frase anterior do mesmo parágrafo a nomeia. Sem o nome, quem usa a API ou a CLI não consegue agir sobre a frase, e quem usa o Azion Console não sabe que a frase o descreve. Um painel sob um título de interface, como `### Console`, já nomeia a interface. + +- Incorreto: `Você a define no campo **Application** de **Deployment Settings**.` +- Correto: `No Azion Console, você a define no campo **Application** de **Deployment Settings**.` + +## Declare a configuração, não o caminho, fora de uma tarefa + +Em uma página que não é uma tarefa, declare uma configuração pelo que ela faz e pelo padrão dela, com o campo da API quando existe um. Depois, aponte a página que mostra onde mudá-la. Isso vale para uma visão geral, uma página de conceito, uma página de boas práticas e um glossário. O caminho até um controle é um procedimento e pertence à página da tarefa. + +- Incorreto: `O switch dele, **Image Processor** em **Main Settings** › **Modules**, vem desativado em uma Application nova.` +- Correto: ``Image Processor vem desativado em uma Application nova, e cada Application o ativa separadamente, no seu campo `modules.image_processor.enabled` na API.`` + +Um local do Console fica onde ele é o próprio fato, com a interface nomeada: + +- O único lugar em que o Azion Console define uma relação. +- Uma string do Console citada como evidência. +- Uma tabela que mapeia cada rótulo do Console para o campo da API. + ## Use linguagem inclusiva A documentação trata o leitor por "você", e o leitor genérico nunca precisa de um pronome de gênero. No texto em inglês dos EUA, um terceiro genérico — quem ataca, quem desenvolve — recebe "they", nunca "he" ou "she". @@ -112,14 +132,14 @@ Substitua um termo técnico carregado quando a indústria aceita uma alternativa Não use referências culturais nem expressões idiomáticas. Elas fazem sentido em um único lugar e não sobrevivem à tradução. Cada página aqui é publicada em dois idiomas, conforme [Páginas bilíngues](/pt-br/documentacao/guia-de-estilo/convencoes/paginas-bilingues/). -## Use o artigo antes de um nome de recurso de plataforma +## Use o artigo antes de um nome de recurso da plataforma -Em português do Brasil, o artigo antes de um nome de recurso de plataforma é natural, como antes de qualquer nome próprio usado como sujeito ou complemento. Mantenha-o quando a frase pede. +Em português do Brasil, o artigo antes de um nome de recurso da plataforma é natural, como antes de qualquer nome próprio usado como sujeito ou complemento. Mantenha-o quando a frase pede. - `O WAF inspeciona cada requisição antes que ela chegue à origem.` - `Acesse a página do Console e selecione o bucket.` -A regra de retirar o artigo vale só para o texto em inglês dos EUA, em que um nome de recurso de plataforma não leva artigo: `Access Azion Console.`, nunca `Access the Azion Console.` +A regra de retirar o artigo vale só para o texto em inglês dos EUA, em que um nome de recurso da plataforma não leva artigo: `Access Azion Console.`, nunca `Access the Azion Console.` ## Use a grafia do inglês dos EUA @@ -129,7 +149,7 @@ Nos trechos em inglês dos EUA, escreva `organize`, `behavior` e `license`. Graf O primeiro uso em cada página escreve o termo por extenso e coloca a sigla entre parênteses: `time to live (TTL)`. Depois disso, apenas a sigla. O leitor chega a qualquer página diretamente, por um resultado de busca, e uma definição em outra página não existe para ele. -Nomes de recursos de plataforma não são siglas. Escreva o nome conforme as regras em [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/) e não o expanda. +Nomes de recursos da plataforma não são siglas. Escreva o nome conforme as regras em [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/) e não o expanda. ## Escreva exatamente o que a plataforma faz @@ -139,12 +159,12 @@ Uma frase que afirma mais do que a plataforma faz é um fato errado, mesmo quand - **Uma capacidade nomeia a configuração que a habilita.** `distribuir requisições entre vários servidores` vira `distribuir requisições entre vários servidores com Load Balancer ativado em um Connector do tipo http`. - **O sujeito faz o que a frase diz.** `Use Edge DNS para receber e-mails` vira `Use Edge DNS para os seus serviços de e-mail`. - **Uma verificação não afirma certeza.** `requisições que carregam as ameaças` vira `requisições que carregam possíveis ameaças`. -- **O verbo combina com o tipo de elemento.** Código executa, e um banco de dados ou um store disponibiliza e serve dados: `SQL Database executa bancos de dados` vira `SQL Database disponibiliza bancos de dados`. Isso estende a regra de [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/) que liga um recurso de plataforma a outro com um verbo. +- **O verbo combina com o tipo de elemento.** Código executa, e um banco de dados ou um store disponibiliza e serve dados: `SQL Database executa bancos de dados` vira `SQL Database disponibiliza bancos de dados`. Isso estende a regra de [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/) que liga um recurso da plataforma a outro com um verbo. ## Confirme cada dado Um dado inventado é a pior falha da documentação. Um limite, um valor padrão, um nome de campo, uma flag ou uma mensagem de erro inventados parecem iguais aos corretos. O leitor descobre a diferença só quando tenta usar e falha. -Cada número, nome de campo e comando vem de algum lugar que você consegue apontar: o próprio recurso de plataforma, a API dele ou o time que cuida dele. Quando não consegue confirmar um valor, deixe-o de fora. Uma página que diz menos é recuperável. Uma página com um valor errado e confiante não é, porque ninguém sabe que precisa conferir. +Cada número, nome de campo e comando vem de algum lugar que você consegue apontar: o próprio recurso da plataforma, a API dele ou o time que cuida dele. Quando não consegue confirmar um valor, deixe-o de fora. Uma página que diz menos é recuperável. Uma página com um valor errado e confiante não é, porque ninguém sabe que precisa conferir. -Os nomes de recursos de plataforma seguem regras próprias, em [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/). +Os nomes de recursos da plataforma seguem regras próprias, em [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/). diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/estrutura-de-frases.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/estrutura-de-frases.mdx index a3395d7ff2..45bc559f6f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/estrutura-de-frases.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/estrutura-de-frases.mdx @@ -29,7 +29,7 @@ Um procedimento tem o limite mais rígido porque o leitor executa cada passo sob ## Use apenas tempos verbais simples -Escreva com o imperativo, o presente simples, o passado simples e o futuro simples. Não construa tempos compostos com verbos auxiliares. Prefira o presente simples para comportamento do recurso de plataforma, porque a plataforma se comporta da mesma forma em cada requisição. +Escreva com o imperativo, o presente simples, o passado simples e o futuro simples. Não construa tempos compostos com verbos auxiliares. Prefira o presente simples para comportamento do recurso da plataforma, porque a plataforma se comporta da mesma forma em cada requisição. - Antes: `O deploy está sendo processado.` - Depois: `O deploy está em andamento.` @@ -47,7 +47,7 @@ A mesma lógica vale para títulos de tarefa, que começam com um verbo no imper ## Limite os agrupamentos de substantivos a três palavras -Em inglês dos EUA, uma pilha de quatro ou mais substantivos não tem gramática entre as palavras. O leitor não sabe qual palavra modifica qual. Desfaça o agrupamento com preposições. Um nome de recurso de plataforma conta como uma unidade, então **Real-Time Metrics** ocupa uma das três posições. +Em inglês dos EUA, uma pilha de quatro ou mais substantivos não tem gramática entre as palavras. O leitor não sabe qual palavra modifica qual. Desfaça o agrupamento com preposições. Um nome de recurso da plataforma conta como uma unidade, então **Real-Time Metrics** ocupa uma das três posições. - Antes: `the request phase behavior execution order` - Depois: `the execution order of the behaviors in the request phase` @@ -72,8 +72,23 @@ Escreva um tópico por parágrafo, em no máximo seis frases. Sistemas de busca Cada frase continua o tópico da frase anterior: o sujeito dela é o sujeito daquela frase ou algo que aquela frase apresentou. Quando o tópico muda de propósito, abra a frase com a palavra que nomeia a mudança: `Porque`, `Se`, `Quando`, `Caso contrário`, `Cada`. Uma consequência nomeia a causa da mesma forma, para que o leitor nunca precise completar a ligação. -- Antes: `**Applications** é um recurso de plataforma que executa um proxy reverso. Cada Application atende os Workloads cujo deployment a define. Um proxy reverso é um servidor na frente das suas origens.` -- Depois: `**Applications** é um recurso de plataforma que executa um proxy reverso. Um proxy reverso é um servidor na frente das suas origens. Cada Application atende os Workloads cujo deployment a define.` +- Antes: `Uma Application pode executar funções serverless ou atuar como proxy reverso para as suas origens. Uma Application recebe as requisições de um Workload depois que o deployment desse Workload define essa Application. Um proxy reverso é um servidor na frente das suas origens.` +- Depois: `Uma Application pode executar funções serverless ou atuar como proxy reverso para as suas origens. Um proxy reverso é um servidor na frente das suas origens. Uma Application recebe as requisições de um Workload depois que o deployment desse Workload define essa Application.` + +## Confira a prosa quando uma seção muda de lugar + +Uma seção que muda de lugar mantém o texto e perde o contexto: o que o leitor já tinha visto quando chegava a ela. Depois de mover uma seção, confira cinco pontos, em inglês e em português: + +- **Primeiro uso**: cada termo que a seção movida usa está definido no primeiro uso dele na nova ordem, ou antes. +- **Um fato dito duas vezes em sequência**: duas frases que ficavam a uma seção de distância e agora ficam lado a lado dizem um fato duas vezes. Mantenha a frase completa onde o tipo de conteúdo a pede e encurte a outra. +- **Palavras que apontam para uma posição**: `acima`, `abaixo`, `antes` e um número de passo ainda apontam para o que apontavam. +- **As junções**: mover uma seção cria três junções novas, acima da seção movida, abaixo dela e onde ela estava. Cada uma ainda se lê como uma sequência. +- **O resto da página**: uma frase que lista as seções da página segue a nova ordem. + +Na visão geral de Applications, o caminho da requisição subiu para antes da estrutura da regra, e a primeira frase dele passou a repetir o bloco de definição: + +- Antes: `Criar uma Application não encaminha nenhuma requisição a ela: uma Application só recebe as requisições de um Workload depois que o deployment desse Workload define essa Application.` +- Depois: `Criar uma Application não encaminha nenhuma requisição a ela: antes, o deployment de um Workload precisa definir essa Application.` ## Deixe as primeiras frases carregarem a seção @@ -82,7 +97,7 @@ Lidas sozinhas, a primeira frase de cada parágrafo e a introdução em negrito Em um bloco compacto de bullets, cada frase de um bullet fica no tópico da introdução dele. Um fato de outro tópico abre um bullet próprio. - Antes: `Criar uma Application não atende nada.` -- Depois: `Uma Application trata só as requisições de um Workload cujo deployment a define.` +- Depois: `Uma Application recebe as requisições de um Workload depois que o deployment desse Workload define essa Application.` ## Apresente um termo novo por frase @@ -145,12 +160,13 @@ O ASD-STE100 acompanha suas regras com um dicionário aprovado. As regras 1.5 e Confirme cada ponto antes de publicar a página: -- Cada tempo verbal é simples, e o comportamento do recurso de plataforma usa o presente simples. +- Cada tempo verbal é simples, e o comportamento do recurso da plataforma usa o presente simples. - Cada termo em -ing funciona como substantivo e nenhuma frase termina em gerúndio. -- Cada agrupamento de substantivos tem no máximo três palavras, com um nome de recurso de plataforma contado como uma. +- Cada agrupamento de substantivos tem no máximo três palavras, com um nome de recurso da plataforma contado como uma. - Cada frase mantém o sujeito, o verbo e os artigos. - Cada parágrafo cobre um tópico em no máximo seis frases. - Cada frase continua o tópico da anterior, ou abre com a palavra que nomeia a mudança. +- Cada seção que mudou de lugar define os termos antes do primeiro uso, não repete um fato do bloco acima dela e se lê como uma sequência em cada junção. - As primeiras frases dos parágrafos e as introduções dos bullets, lidas sozinhas, carregam cada seção. - Cada frase apresenta no máximo um termo novo. - Cada frase declara o fato e o que acontece, e nomeia o elemento em vez do papel dele. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/procedimentos.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/procedimentos.mdx index b35af13687..ecbf091741 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/procedimentos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/procedimentos.mdx @@ -15,10 +15,10 @@ Todo procedimento numerado da documentação segue estas regras, em qualquer tip Procedimentos no Console começam com a string canônica: ``` -1. Acesse [Azion Console](https://console.azion.com/) > ****. +1. Acesse [Azion Console](https://console.azion.com/) > ****. ``` -Preencha o recurso de plataforma: `> **Object Storage**`, `> **Firewall**`. Uma navegação mais profunda estende a cadeia: `> **Applications** > **sua aplicação**`. +Preencha o recurso da plataforma: `> **Object Storage**`, `> **Firewall**`. Uma navegação mais profunda estende a cadeia: `> **Applications** > **sua aplicação**`. Um procedimento de um único comando não é uma lista numerada. Escreva uma frase de introdução terminada em dois-pontos e depois o comando: @@ -78,7 +78,7 @@ Termine todo procedimento com uma frase de resultado. Diga o que o leitor agora - `O bucket aparece na lista de buckets.` - `A resposta retorna "state": "executed" com o nome do bucket.` -Quando a interface não mostra saída, declare o estado resultante: `O bucket tem o novo nível de acesso.` Nunca escreva saída da interface, códigos de resposta, headers ou mensagens que você não viu o recurso de plataforma produzir. Essa distinção separa uma frase de resultado de um fato inventado. +Quando a interface não mostra saída, declare o estado resultante: `O bucket tem o novo nível de acesso.` Nunca escreva saída da interface, códigos de resposta, headers ou mensagens que você não viu o recurso da plataforma produzir. Essa distinção separa uma frase de resultado de um fato inventado. Avise sobre o tempo de propagação. Se um resultado demora a propagar, diga isso e diga o que fazer: "Novas regras podem levar alguns minutos para propagar. Diante de uma resposta inesperada, aguarde e tente novamente antes de diagnosticar." diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/terminologia.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/terminologia.mdx index cc3a6931d6..27fe64f127 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/terminologia.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/terminologia.mdx @@ -2,7 +2,7 @@ title: Terminologia da documentação description: >- Aplique as regras de nomes: os quatro termos da plataforma, os nomes oficiais - de recurso de plataforma e os termos que ficam em inglês dos EUA. + de recurso da plataforma e os termos que ficam em inglês dos EUA. meta_tags: 'style guide, terminology, platform resource names' namespace: documentation_style_guide_terminology permalink: /documentacao/guia-de-estilo/escrita/terminologia/ @@ -10,7 +10,7 @@ permalink: /documentacao/guia-de-estilo/escrita/terminologia/ ## Use os nomes oficiais -Toda oferta tem um nome oficial, e toda página usa esse nome. Os nomes vêm do catálogo oficial de nomes da Azion, que Product Marketing mantém para todo o conteúdo da Azion: documentação, site e material de vendas. A visão geral de cada recurso de plataforma, a raiz da seção, reflete esse catálogo. Este guia não repete os nomes atuais, porque uma cópia fica errada no dia em que um nome muda. +Toda oferta tem um nome oficial, e toda página usa esse nome. Os nomes vêm do catálogo oficial de nomes da Azion, que Product Marketing mantém para todo o conteúdo da Azion: documentação, site e material de vendas. A visão geral de cada recurso da plataforma, a raiz da seção, reflete esse catálogo. Este guia não repete os nomes atuais, porque uma cópia fica errada no dia em que um nome muda. O catálogo dá um nome por oferta. Não existe um nome de marketing separado do nome da documentação. A primeira menção pode trazer o nome completo com a sigla entre parênteses, e toda menção depois dela usa só a sigla: @@ -46,37 +46,37 @@ A Azion renomeou suas ofertas ao longo do tempo. Os nomes antigos ainda aparecem ## Nomeie o recurso em que o leitor trabalha -A Azion descreve o que oferece com quatro termos: plataforma, produto, recurso de plataforma e feature. Eles são conceitos relacionados, não quatro níveis de uma hierarquia: um recurso de plataforma pode ou não ser um produto, e uma feature pode pertencer à plataforma ou a um recurso de plataforma. +A Azion descreve o que oferece com quatro termos: plataforma, produto, recurso da plataforma e feature. Eles são conceitos relacionados, não quatro níveis de uma hierarquia: um recurso da plataforma pode ou não ser um produto, e uma feature pode pertencer à plataforma ou a um recurso da plataforma. | Termo | Responde | Definição | | --- | --- | --- | | Plataforma | O que é a experiência integrada da Azion? | A infraestrutura distribuída da Azion, sua tecnologia integrada e as interfaces para construir, proteger e escalar workloads, como o Console, a API e a CLI | -| Produto | Que oferta a Azion leva ao mercado? | Uma oferta de mercado formada por um ou mais recursos de plataforma e features que resolve um problema do cliente, como WAF ou Object Storage | -| Recurso de plataforma | O que o leitor cria ou gerencia? | Uma entidade identificável que o cliente cria, configura, opera ou gerencia, e que o Console, a API, a CLI ou a documentação podem referenciar, como uma Application, um Firewall, uma Function ou um bucket | -| Feature | O que o leitor pode fazer ou ativar? | Uma funcionalidade visível da plataforma ou de um recurso de plataforma, que um produto pode incluir, como regras personalizadas de firewall ou DNSSEC | +| Produto | Que oferta a Azion leva ao mercado? | Uma oferta de mercado formada por um ou mais recursos da plataforma e features que resolve um problema do cliente, como WAF ou Object Storage | +| Recurso da plataforma | O que o leitor cria ou gerencia? | Uma entidade identificável que o cliente cria, configura, opera ou gerencia, e que o Console, a API, a CLI ou a documentação podem referenciar, como uma Application, um Firewall, uma Function ou um bucket | +| Feature | O que o leitor pode fazer ou ativar? | Uma funcionalidade visível da plataforma ou de um recurso da plataforma, que um produto pode incluir, como regras personalizadas de firewall ou DNSSEC | -A documentação usa a nomenclatura de recurso de plataforma. Produto é um termo de go-to-market, usado principalmente em material de marketing e vendas, e a tabela o define para o leitor reconhecê-lo lá. Uma página de documentação chama cada seção pelo nome oficial e chama a oferta de recurso de plataforma, nunca de produto: ela nomeia o que o leitor cria ou gerencia, e liga um recurso de plataforma a outro com um verbo. Produto nunca classifica um elemento em uma página, conforme [Declare a classe de um elemento da Azion](#declare-a-classe-de-um-elemento-da-azion). +A documentação usa a nomenclatura de recurso da plataforma. Produto é um termo de go-to-market, usado principalmente em material de marketing e vendas, e a tabela o define para o leitor reconhecê-lo lá. Uma página de documentação chama cada seção pelo nome oficial e chama a oferta de recurso da plataforma, nunca de produto: ela nomeia o que o leitor cria ou gerencia, e liga um recurso da plataforma a outro com um verbo. Produto nunca classifica um elemento em uma página, conforme [Declare a classe de um elemento da Azion](#declare-a-classe-de-um-elemento-da-azion). -Uma feature sempre tem escopo, então diga se ela vale para a plataforma ou para um recurso de plataforma. Um campo ou uma opção de um recurso é uma configuração, não uma feature. +Uma feature sempre tem escopo, então diga se ela vale para a plataforma ou para um recurso da plataforma. Um campo ou uma opção de um recurso é uma configuração, não uma feature. -**Applications**, **Firewall**, **Connectors**, **Workloads**, **Custom Pages** e **Certificate Manager** são exemplos de tipos de recurso de plataforma; o catálogo de nomes tem a lista completa. A coisa que o leitor cria é uma instância, com o nome do seu recurso de plataforma: uma Application, um Firewall, um Connector, conforme [Nomeie a instância pelo seu recurso de plataforma](#nomeie-a-instancia-pelo-seu-recurso-de-plataforma). +**Applications**, **Firewall**, **Connectors**, **Workloads**, **Custom Pages** e **Certificate Manager** são exemplos de tipos de recurso da plataforma; o catálogo de nomes tem a lista completa. A coisa que o leitor cria é uma instância, com o nome do seu recurso da plataforma: uma Application, um Firewall, um Connector, conforme [Nomeie a instância pelo seu recurso da plataforma](#nomeie-a-instancia-pelo-seu-recurso-da-plataforma). -Azion Console, a API, a CLI, o Terraform Provider e o Copilot também são recursos de plataforma. São eles que o leitor usa para chegar à plataforma, então uma página pode chamá-los de interfaces: `Crie a Application no Console ou com a API.` +Azion Console, a API, a CLI, o Terraform Provider e o Copilot também são recursos da plataforma. São eles que o leitor usa para chegar à plataforma, então uma página pode chamá-los de interfaces: `Crie a Application no Console ou com a API.` - Correto: `Configure um Firewall para proteger a Application.` - Correto: a linha da sidebar que abre o WAF dentro de Firewall diz `WAF`, nunca `Firewall WAF` nem `Web Application Firewall`, porque um rótulo nunca repete o pai. ## Declare a classe de um elemento da Azion -A frase que define um elemento da Azion declara a classe dele: recurso de plataforma ou feature. `**Functions** é um recurso de plataforma que executa código JavaScript na infraestrutura distribuída da Azion.` Uma feature leva o escopo: `O Tiered Cache é uma feature do Cache que…`. +A frase que define um elemento da Azion declara a classe dele: recurso da plataforma ou feature. `**Functions** é um recurso da plataforma que executa código JavaScript na infraestrutura distribuída da Azion.` Uma feature leva o escopo: `O Tiered Cache é uma feature do Cache que…`. A classe segue a nomenclatura da documentação, não a lista de produtos do catálogo de nomes: | O elemento | A classe dele em uma página | Exemplos | | --- | --- | --- | -| A raiz de uma seção da documentação | Recurso de plataforma, mesmo quando o catálogo também o lista como produto | Applications, Firewall, Functions, Object Storage, Workloads | -| Aninhado em um recurso de plataforma, qualquer que seja a classe no catálogo | Recurso de plataforma | Cache, Application Accelerator, Image Processor, Load Balancer, Origin Shield, Live Ingest, WAF, Network Shield, Bot Manager, Certificate Manager, Custom Pages, DDoS Protection | -| Uma funcionalidade da plataforma ou de um recurso de plataforma, em nenhuma das listas | Feature, com o escopo | Tiered Cache, regras personalizadas de firewall, DNSSEC | +| A raiz de uma seção da documentação | Recurso da plataforma, mesmo quando o catálogo também o lista como produto | Applications, Firewall, Functions, Object Storage, Workloads | +| Aninhado em um recurso da plataforma, qualquer que seja a classe no catálogo | Recurso da plataforma | Cache, Application Accelerator, Image Processor, Load Balancer, Origin Shield, Live Ingest, WAF, Network Shield, Bot Manager, Certificate Manager, Custom Pages, DDoS Protection | +| Uma funcionalidade da plataforma ou de um recurso da plataforma, em nenhuma das listas | Feature, com o escopo | Tiered Cache, regras personalizadas de firewall, DNSSEC | Produto é um termo de go-to-market que nomeia uma oferta, não uma classe: uma página nunca o declara como a classe de um elemento. @@ -85,16 +85,16 @@ Produto é um termo de go-to-market que nomeia uma oferta, não uma classe: uma - **A classe não substitui o conceito.** A classe diz o que o elemento é dentro da Azion. As frases de conceito depois dela continuam dizendo o que é a classe da coisa em qualquer fornecedor: um proxy reverso é um servidor na frente das suas origens. - **Em inglês dos EUA**, as classes são `Platform Resource` e `Feature`: `**Functions** is a Platform Resource that runs JavaScript code on Azion's distributed infrastructure.` -- Correto: `**Applications** é um recurso de plataforma que executa um proxy reverso na infraestrutura distribuída da Azion.` +- Correto: `**Applications** é um recurso da plataforma que processa as requisições recebidas pelos seus Workloads.` - Incorreto: `Applications é um produto.` A classe está errada. - Incorreto: `Application Accelerator é um produto que…` Produto não é uma classe em uma página. - Incorreto: `Functions é um produto serverless.` Uma categoria de mercado substitui a classe. ## Classifique o que vive dentro de um recurso -As palavras *módulo* e *add-on* estão aposentadas. O que uma página chamava de módulo é um recurso de plataforma aninhado em outro e ativado nele, como Application Accelerator, Image Processor, WAF ou Network Shield. Também pode ser uma feature de um recurso, como o Tiered Cache, ou uma Function instanciada em uma Application ou em um Firewall. A aposentadoria cobre a classificação de uma oferta da Azion, e nada mais. +As palavras *módulo* e *add-on* estão aposentadas. O que uma página chamava de módulo é um recurso da plataforma aninhado em outro e ativado nele, como Application Accelerator, Image Processor, WAF ou Network Shield. Também pode ser uma feature de um recurso, como o Tiered Cache, ou uma Function instanciada em uma Application ou em um Firewall. A aposentadoria cobre a classificação de uma oferta da Azion, e nada mais. -- Correto: `Web Application Firewall (WAF) é um recurso de plataforma que inspeciona as requisições HTTP e HTTPS que chegam a um Firewall. Aplique um conjunto de regras WAF ao Firewall.` +- Correto: `Web Application Firewall (WAF) é um recurso da plataforma que inspeciona as requisições HTTP e HTTPS que chegam a um Firewall. Aplique um conjunto de regras WAF ao Firewall.` - Incorreto: `Firewall é um produto que inclui o WAF.` - Incorreto: `O WAF é um produto que…` - Incorreto: `WAF é um módulo do Firewall.` @@ -103,13 +103,13 @@ As palavras *módulo* e *add-on* estão aposentadas. O que uma página chamava d ## Use verbo no singular com um nome de forma plural -Um nome de recurso de plataforma nomeia uma coisa só, qualquer que seja a forma. Applications, Functions e Connectors levam verbo no singular: `Applications armazena conteúdo em cache`, `Functions executa seu código` — nunca `Applications armazenam`. O inglês dos EUA concorda da mesma forma: `Applications caches content`, nunca `Applications cache`. +Um nome de recurso da plataforma nomeia uma coisa só, qualquer que seja a forma. Applications, Functions e Connectors levam verbo no singular: `Applications armazena conteúdo em cache`, `Functions executa seu código` — nunca `Applications armazenam`. O inglês dos EUA concorda da mesma forma: `Applications caches content`, nunca `Applications cache`. -## Nomeie a instância pelo seu recurso de plataforma +## Nomeie a instância pelo seu recurso da plataforma -A coisa que o cliente cria com um recurso de plataforma leva o nome desse recurso, no singular, com maiúscula e sem tradução, nos dois idiomas: +A coisa que o cliente cria com um recurso da plataforma leva o nome desse recurso, no singular, com maiúscula e sem tradução, nos dois idiomas: -| Recurso de plataforma | Uma instância | Várias | Inglês dos EUA | +| Recurso da plataforma | Uma instância | Várias | Inglês dos EUA | | --- | --- | --- | --- | | Applications | uma Application | as suas Applications | an Application | | Firewall | um Firewall | os seus Firewalls | a Firewall | @@ -125,12 +125,12 @@ Três coisas continuam substantivos comuns, em minúscula: - **O software do próprio cliente**, o app na origem: `a sua aplicação`, `your application`. - **O conceito genérico** nas frases de conceito de um bloco de definição, que valem para qualquer fornecedor: `Um firewall para tráfego web é um ponto de controle entre os clientes na internet e uma aplicação.` -O leitor distingue o recurso de plataforma das instâncias dele pela gramática. O recurso de plataforma leva verbo no singular e, quando o nome tem forma de plural, nenhum artigo: `Applications encaminha…`, `Applications routes…`. Uma instância leva artigo indefinido, possessivo ou número: `uma Application`, `as suas Applications`, `duas Applications`, `an Application`. +O leitor distingue o recurso da plataforma das instâncias dele pela gramática. O recurso da plataforma leva verbo no singular e, quando o nome tem forma de plural, nenhum artigo: `Applications encaminha…`, `Applications routes…`. Uma instância leva artigo indefinido, possessivo ou número: `uma Application`, `as suas Applications`, `duas Applications`, `an Application`. -O nome já liga a instância ao seu recurso de plataforma, então nenhuma frase precisa fazer isso. Quando uma frase precisa dizer o que uma instância é, o substantivo de classe é `entidade`, `entity` em inglês dos EUA, nunca `objeto` nem `object`: `Um Workload é a entidade que guarda os seus domínios…`. Uma instância em minúscula ou traduzida se lê como o app do próprio cliente ou como uma função genérica, e um leitor que conhece o produto lê a tradução como outro nome para ele. +O nome já liga a instância ao seu recurso da plataforma, então nenhuma frase precisa fazer isso. Quando uma frase precisa dizer o que uma instância é, o substantivo de classe é `entidade`, `entity` em inglês dos EUA, nunca `objeto` nem `object`: `Um Workload é a entidade que guarda os seus domínios…`. Uma instância em minúscula ou traduzida se lê como o app do próprio cliente ou como uma função genérica, e um leitor que conhece o produto lê a tradução como outro nome para ele. - Correto: `Faça o deploy da sua primeira Application.` -- Correto: `Uma Application recebe as requisições dos Workloads cujo deployment a define.` +- Correto: `Uma Application recebe as requisições de um Workload depois que o deployment desse Workload define essa Application.` - Incorreto: `uma aplicação`, `uma função`, `um connector` ou `an application` para a entidade criada na Azion. - Incorreto: `Use **Applications** para construir as suas próprias Applications.` O software do próprio cliente continua `aplicações`. @@ -142,9 +142,9 @@ Não renomeie uma oferta em um documento histórico. Um nome atualizado reescrev ## Deixe estes termos em inglês dos EUA -Os nomes da plataforma, dos produtos e dos recursos de plataforma nunca são traduzidos, e a instância também não, conforme [Nomeie a instância pelo seu recurso de plataforma](#nomeie-a-instancia-pelo-seu-recurso-de-plataforma): `Functions executa as suas Functions`. +Os nomes da plataforma, dos produtos e dos recursos da plataforma nunca são traduzidos, e a instância também não, conforme [Nomeie a instância pelo seu recurso da plataforma](#nomeie-a-instancia-pelo-seu-recurso-da-plataforma): `Functions executa as suas Functions`. -Estes termos são vocabulário técnico genérico, não nomes de recurso de plataforma. Eles ficam em inglês dos EUA nos dois idiomas: +Estes termos são vocabulário técnico genérico, não nomes de recurso da plataforma. Eles ficam em inglês dos EUA nos dois idiomas: `data center` · `serverless` · `on-premise` · `template` · `compliance` · `e-commerce` · `e-mail` · `keywords` · `meta description` · `authoritative DNS` @@ -154,6 +154,6 @@ As strings `edge` e `edge computing` também ficam sem tradução onde já apare ## Nomeie a infraestrutura -A plataforma roda na infraestrutura distribuída da Azion, nunca "na rede global". O local físico é um `data center`, nunca um edge location nem um PoP; `data center` fica em inglês, nunca "centro de dados". A unidade de infraestrutura dentro de um data center não tem nome oficial: escreva `a infraestrutura no data center`, nunca `nó` nem `edge node`. A rede em si aparece só como o recurso de plataforma **Our Network**. +A plataforma roda na infraestrutura distribuída da Azion, nunca "na rede global". O local físico é um `data center`, nunca um edge location nem um PoP; `data center` fica em inglês, nunca "centro de dados". A unidade de infraestrutura dentro de um data center não tem nome oficial: escreva `a infraestrutura no data center`, nunca `nó` nem `edge node`. A rede em si aparece só como o recurso da plataforma **Our Network**. Nomeie o data center que atende a requisição, não uma distância: `do data center mais próximo ao seu usuário`, nunca `perto dos seus usuários` nem `próximo aos seus usuários`. O data center mais próximo é escolhido por latência, condições de rede e carga, então nunca escreva `geograficamente mais próximo`. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/voz.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/voz.mdx index 406466df94..415bae1229 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/voz.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/escrita/voz.mdx @@ -18,7 +18,7 @@ A documentação fala com a pessoa que executa o trabalho. A segunda pessoa mant ## Use o presente simples -Descreva o comportamento do recurso de plataforma no presente simples. O presente afirma o que a plataforma faz todas as vezes, e é sobre essa afirmação que o leitor age. +Descreva o comportamento do recurso da plataforma no presente simples. O presente afirma o que a plataforma faz todas as vezes, e é sobre essa afirmação que o leitor age. - Antes: `Applications armazenará conteúdo em cache na infraestrutura distribuída da Azion.` - Depois: `Applications armazena conteúdo em cache na infraestrutura distribuída da Azion.` @@ -40,7 +40,7 @@ Um passo é uma instrução, então ele começa pelo verbo: `Selecione **Save**. ## Descreva comportamento, não qualidade -A documentação descreve comportamento e limites. Ela não vende, porque o leitor já escolheu o recurso de plataforma. Um adjetivo que afirma qualidade não dá ao leitor nada para fazer; um comportamento e um limite dão. +A documentação descreve comportamento e limites. Ela não vende, porque o leitor já escolheu o recurso da plataforma. Um adjetivo que afirma qualidade não dá ao leitor nada para fazer; um comportamento e um limite dão. - Antes: `Applications oferece capacidades de cache poderosas e flexíveis.` - Depois: `Applications armazena conteúdo em cache na infraestrutura distribuída da Azion. O TTL padrão é de 60 segundos.` diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/codigo.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/codigo.mdx index 483814a635..85034ff714 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/codigo.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/codigo.mdx @@ -16,7 +16,7 @@ Execute cada comando e cada snippet antes de publicar a página. Quando não pud ## Componha, não invente -Um bloco de código mistura dois tipos de conteúdo: os fatos que ele carrega e a sintaxe que os expressa. A sintaxe de ferramenta necessária para expressar um fato com fonte é composição, não invenção. Flags de `curl`, um cabeçalho `Content-Type` para um dado corpo JSON e as aspas do shell entram nessa categoria. Um novo valor de recurso de plataforma, campo, endpoint ou valor padrão é invenção. +Um bloco de código mistura dois tipos de conteúdo: os fatos que ele carrega e a sintaxe que os expressa. A sintaxe de ferramenta necessária para expressar um fato com fonte é composição, não invenção. Flags de `curl`, um cabeçalho `Content-Type` para um dado corpo JSON e as aspas do shell entram nessa categoria. Um novo valor de recurso da plataforma, campo, endpoint ou valor padrão é invenção. Para a regra de que cada dado rastreia até uma fonte, consulte [Escolha de palavras](/pt-br/documentacao/guia-de-estilo/escrita/escolha-de-palavras/). diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/numeros.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/numeros.mdx index 3d9fdc2d74..e871df7c6c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/numeros.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/numeros.mdx @@ -35,7 +35,7 @@ O inglês dos EUA inverte os dois separadores e escreve `10,000` e `9.5`. Um nú Todo valor em uma tabela carrega sua unidade. Uma célula com `100` deixa o leitor escolhendo entre megabytes, segundos e requisições. [Referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/) trata um limite sem unidade como um fato incompleto. -`MB` e `MiB` são números diferentes. Escreva a unidade que o recurso de plataforma declara e nunca converta entre as formas decimais (`kB`, `MB`, `GB`) e binárias (`KiB`, `MiB`, `GiB`). O mesmo vale para taxas: `Gbps` conta bits e `MB/s` conta bytes, oito vezes de diferença, então mantenha a forma que o recurso de plataforma usa. +`MB` e `MiB` são números diferentes. Escreva a unidade que o recurso da plataforma declara e nunca converta entre as formas decimais (`kB`, `MB`, `GB`) e binárias (`KiB`, `MiB`, `GiB`). O mesmo vale para taxas: `Gbps` conta bits e `MB/s` conta bytes, oito vezes de diferença, então mantenha a forma que o recurso da plataforma usa. Um limite é exato e nunca é arredondado. Arredonde apenas um número ilustrativo, e marque: `cerca de 200 ms`. @@ -66,6 +66,6 @@ Não escreva `24/7`. Escreva `o tempo todo` ou nomeie a disponibilidade real. ## Formate moeda apenas na página de pricing -Um preço, uma cota vendida por unidade e uma métrica de cobrança vivem só na página de pricing. [Referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/) proíbe repetir qualquer um deles em uma página de recurso de plataforma. +Um preço, uma cota vendida por unidade e uma métrica de cobrança vivem só na página de pricing. [Referência](/pt-br/documentacao/guia-de-estilo/conteudo/referencia/) proíbe repetir qualquer um deles em uma página de recurso da plataforma. Onde o valor é permitido, o símbolo vem antes do número, separado por um espaço: `US$ 1.000` ou `R$ 1.000`. Em português do Brasil, `$` sozinho é ambíguo, então escreva sempre o símbolo da moeda completo. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/texto.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/texto.mdx index 8f179ad21e..170220d425 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/texto.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/texto.mdx @@ -8,9 +8,9 @@ namespace: documentation_style_guide_text_formatting permalink: /documentacao/guia-de-estilo/formatacao/texto/ --- -## Use negrito para rótulos da interface e nomes de recursos de plataforma +## Use negrito para rótulos da interface e nomes de recursos da plataforma -O negrito marca um rótulo que o leitor precisa encontrar na tela e marca um nome de recurso de plataforma. Todo o resto fica em texto simples, porque o negrito de ênfase compete com esses dois usos. Um parágrafo com três frases em negrito não tem nenhuma. +O negrito marca um rótulo que o leitor precisa encontrar na tela e marca um nome de recurso da plataforma. Todo o resto fica em texto simples, porque o negrito de ênfase compete com esses dois usos. Um parágrafo com três frases em negrito não tem nenhuma. - Incorreto: `Você **precisa** limpar o cache **antes** do deploy da **nova versão**.` - Correto: `Limpe o cache antes do deploy da nova versão.` @@ -27,7 +27,7 @@ O itálico também marca um termo no momento em que a página o define: `Uma *ca O monoespaçado marca código e tudo o que o leitor digita: comandos, caminhos, nomes de campo, flags, cabeçalhos, códigos de status e nomes de arquivo. -Nomes de ferramenta ficam em monoespaçado, nunca em negrito: `azion`, `npm`, `curl`. O negrito nomeia um recurso de plataforma; o monoespaçado nomeia o comando que o leitor executa. +Nomes de ferramenta ficam em monoespaçado, nunca em negrito: `azion`, `npm`, `curl`. O negrito nomeia um recurso da plataforma; o monoespaçado nomeia o comando que o leitor executa. Os três estilos dividem o trabalho: negrito para o rótulo, itálico para o valor, monoespaçado para o texto digitado. @@ -73,7 +73,7 @@ Links dentro de um parágrafo apontam para páginas da documentação. Links ext ## Aponte a primeira menção de outro elemento documentado -Quando a prosa nomeia um recurso de plataforma, aninhado ou não, ou uma feature que tem página própria, a primeira menção na página aponta para essa página: `Configure um [firewall](/pt-br/documentacao/plataforma/firewall/) para proteger a aplicação.` As menções seguintes ficam em texto simples, ou em negrito onde a regra de nomes de produto pede. +Quando a prosa nomeia um recurso da plataforma, aninhado ou não, ou uma feature que tem página própria, a primeira menção na página aponta para essa página: `Configure um [firewall](/pt-br/documentacao/plataforma/firewall/) para proteger a aplicação.` As menções seguintes ficam em texto simples, ou em negrito onde a regra de nomes de produto pede. O link substitui o negrito nessa primeira menção, porque o texto dentro de um link nunca fica em negrito. Um leitor que encontra um nome desconhecido sempre tem a página dele a um clique. diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/titulos.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/titulos.mdx index 9c4940b6e5..9e0ec487bd 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/titulos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/formatacao/titulos.mdx @@ -17,7 +17,7 @@ Em um título, apenas a primeira palavra e os nomes próprios começam com maiú A capitalização por palavra exige uma decisão a cada palavra, e essas decisões divergem entre as páginas. A maiúscula única remove as decisões, e os títulos ficam consistentes nos dois idiomas. -Um nome de recurso de plataforma mantém as maiúsculas em qualquer posição, porque é um nome próprio. +Um nome de recurso da plataforma mantém as maiúsculas em qualquer posição, porque é um nome próprio. ## Comece com um verbo no imperativo diff --git a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/index.mdx b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/index.mdx index 9323d7c5c6..cb3763bd84 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/index.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guia-de-estilo/index.mdx @@ -16,10 +16,10 @@ Este guia descreve como a Azion escreve sua documentação. Use este guia quando - [Estrutura de frases](/pt-br/documentacao/guia-de-estilo/escrita/estrutura-de-frases/): as regras de frase, adaptadas do ASD-STE100. - [Procedimentos](/pt-br/documentacao/guia-de-estilo/escrita/procedimentos/): a gramática de passo que todo procedimento numerado segue. - [Escolha de palavras](/pt-br/documentacao/guia-de-estilo/escrita/escolha-de-palavras/): o vocabulário a evitar e os padrões de enchimento a cortar. -- [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/): nomes de recursos de plataforma, os quatro termos da plataforma e regras de tradução. +- [Terminologia da documentação](/pt-br/documentacao/guia-de-estilo/escrita/terminologia/): nomes de recursos da plataforma, os quatro termos da plataforma e regras de tradução. - [Títulos](/pt-br/documentacao/guia-de-estilo/formatacao/titulos/), [formatação de texto](/pt-br/documentacao/guia-de-estilo/formatacao/texto/), [código](/pt-br/documentacao/guia-de-estilo/formatacao/codigo/), [pontuação](/pt-br/documentacao/guia-de-estilo/formatacao/pontuacao/) e [números e unidades](/pt-br/documentacao/guia-de-estilo/formatacao/numeros/): como o conteúdo é formatado. - [Estrutura de conteúdo](/pt-br/documentacao/guia-de-estilo/conteudo/escolher-um-tipo-de-conteudo/): os tipos de página e como escolher um, incluindo [quickstarts](/pt-br/documentacao/guia-de-estilo/conteudo/quickstart/) e [casos de uso](/pt-br/documentacao/guia-de-estilo/conteudo/casos-de-uso/). -- [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/): os slots que a seção de um recurso de plataforma pode preencher, na ordem em que o leitor os encontra. +- [Arquitetura de informação](/pt-br/documentacao/guia-de-estilo/conteudo/arquitetura-de-informacao/): os slots que a seção de um recurso da plataforma pode preencher, na ordem em que o leitor os encontra. - [Convenções de arquivos](/pt-br/documentacao/guia-de-estilo/convencoes/frontmatter/): frontmatter e [páginas bilíngues](/pt-br/documentacao/guia-de-estilo/convencoes/paginas-bilingues/). - [Componentes](/pt-br/documentacao/guia-de-estilo/componentes/): o conjunto de componentes MDX ativos e as regras de cada um. - [Como escrevemos a documentação](/pt-br/documentacao/guia-de-estilo/como-documentamos/): como a documentação é produzida, em dois idiomas, para pessoas e agentes. diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/pausar-um-agente-para-aprovacao-com-kv-store.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/pausar-um-agente-para-aprovacao-com-kv-store.mdx index 730424dd67..2e19df8b9f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/pausar-um-agente-para-aprovacao-com-kv-store.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/pausar-um-agente-para-aprovacao-com-kv-store.mdx @@ -268,7 +268,10 @@ Para ler os eventos da tarefa de reembolso, envie a instrução `SELECT event, s O agente pausa antes do reembolso, o executa uma vez depois da aprovação e registra cada evento em `task_events`. -Estas verificações confirmam o caso de uso [Criar agentes de IA](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/criar-agentes-de-ia/). +No caso de uso [Criar agentes de IA](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/criar-agentes-de-ia/), espere: + +- **O agente pausa antes do reembolso.** Uma tarefa de reembolso responde `"status":"awaiting_approval"` com uma `action` que indica `refund_order`, e o serviço de pedidos não recebe nenhum reembolso. +- **A aprovação executa o reembolso uma vez.** A aprovação responde `"status":"completed"`, a mesma aprovação enviada de novo responde `404`, e `task_events` lista `started`, `awaiting_approval`, `approved` e `completed`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/responder-perguntas-a-partir-de-uma-tabela-vetorial.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/responder-perguntas-a-partir-de-uma-tabela-vetorial.mdx index 46556ae5f5..232d17d01f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/responder-perguntas-a-partir-de-uma-tabela-vetorial.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/agentes-e-rag/responder-perguntas-a-partir-de-uma-tabela-vetorial.mdx @@ -156,7 +156,9 @@ A única entrada em `data` traz `results`, cuja única linha guarda o mesmo núm O caso de uso [Criar e executar assistentes de IA para suporte ao cliente](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/criar-e-executar-assistentes-de-ia-para-suporte-ao-cliente/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Criar e executar assistentes de IA para suporte ao cliente](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/criar-e-executar-assistentes-de-ia-para-suporte-ao-cliente/). +No caso de uso [Criar e executar assistentes de IA para suporte ao cliente](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/criar-e-executar-assistentes-de-ia-para-suporte-ao-cliente/), espere: + +- **O documento fica guardado em trechos.** A ingestão de `returns-policy.md` responde com o número de trechos que guardou, e uma contagem das linhas do documento com embedding retorna o mesmo número. --- @@ -285,7 +287,9 @@ Faça uma pergunta que nenhum documento cobre, como `What is the capital of Fran A function responde a partir dos trechos da tabela, e apenas deles. -Estas verificações confirmam o caso de uso [Criar e executar assistentes de IA para suporte ao cliente](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/criar-e-executar-assistentes-de-ia-para-suporte-ao-cliente/). +No caso de uso [Criar e executar assistentes de IA para suporte ao cliente](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/criar-e-executar-assistentes-de-ia-para-suporte-ao-cliente/), espere: + +- **As respostas citam os documentos, e apenas eles.** Uma pergunta que `returns-policy.md` responde retorna um `answer` com pelo menos uma citação `[n]` e `sources` que indicam o documento. Uma pergunta que nenhum documento cobre retorna uma resposta sem citação. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/automacao/rotear-um-caminho-de-api-para-um-backend.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/automacao/rotear-um-caminho-de-api-para-um-backend.mdx index 36d47f81ed..2f20873361 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/automacao/rotear-um-caminho-de-api-para-um-backend.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/automacao/rotear-um-caminho-de-api-para-um-backend.mdx @@ -139,7 +139,9 @@ curl -s -D - https:///api/health A resposta é a própria resposta do backend para `/api/health`. Quando não for, a regra pode ainda estar em propagação, ou outra regra foi executada antes. Para ver quais regras foram executadas em uma requisição, ative [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules). -Estas verificações confirmam o caso de uso [Implantar aplicações front-end](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-front-end/). +No caso de uso [Implantar aplicações front-end](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-front-end/), espere: + +- **Os caminhos de API chegam ao backend.** Uma requisição para `/api/health` retorna a própria resposta do backend. --- @@ -153,7 +155,9 @@ curl -s https:///orders/42 O corpo é o mesmo HTML de entrada que `/` retorna. O roteador no navegador então renderiza a rota. -Estas verificações confirmam o caso de uso [Implantar aplicações front-end](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-front-end/). +No caso de uso [Implantar aplicações front-end](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-front-end/), espere: + +- **As rotas do lado do cliente continuam carregando a interface.** Uma requisição para uma rota que a interface trata, como `/orders/42`, retorna o mesmo HTML de entrada que `/`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/aws-to-azion/aws-to-azion-comprehensive-guide.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/aws-to-azion/aws-to-azion-comprehensive-guide.mdx index a1118d8017..d6825469fa 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/aws-to-azion/aws-to-azion-comprehensive-guide.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/aws-to-azion/aws-to-azion-comprehensive-guide.mdx @@ -894,7 +894,7 @@ Para recriar uma origem e seu comportamento no Azion Console: Para _HTTP_, informe o host da origem em **Address**, sem protocolo nem porta. Em **Host**, informe o nome pelo qual a origem responde. - + Vá para **Applications**, selecione a aplicação e selecione a aba **Rules Engine**. diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/executar-bot-manager-em-caminhos-selecionados.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/executar-bot-manager-em-caminhos-selecionados.mdx index 59e3fe6ab7..fdacc80bf6 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/executar-bot-manager-em-caminhos-selecionados.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/executar-bot-manager-em-caminhos-selecionados.mdx @@ -557,8 +557,6 @@ Uma linha de report aparece para `/login`, e nenhuma para `/`. Quando o score de O caso de uso [Bloquear account takeover em fluxos de login e checkout](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/bloquear-account-takeover-em-fluxos-de-login-e-checkout/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Bloquear account takeover em fluxos de login e checkout](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/bloquear-account-takeover-em-fluxos-de-login-e-checkout/). - No caso de uso [Bloquear account takeover em fluxos de login e checkout](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/bloquear-account-takeover-em-fluxos-de-login-e-checkout/), espere: - **Uma pessoa passa pelo desafio.** Abra `https://www.example.com/login` em um navegador, a partir de um cliente que a instância sinaliza, e resolva o desafio. A página de login carrega, e as requisições seguintes passam sem um novo desafio. diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/restringir-uma-origem-a-azion-com-origin-ip-acl.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/restringir-uma-origem-a-azion-com-origin-ip-acl.mdx index ef827c738b..43d8921c5f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/restringir-uma-origem-a-azion-com-origin-ip-acl.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/bots-e-rede/restringir-uma-origem-a-azion-com-origin-ip-acl.mdx @@ -182,9 +182,13 @@ Para confirmar a restrição: O firewall da origem recusa a conexão direta ou deixa que ela expire, enquanto as requisições para `www.example.com` continuam respondendo. A sua origem aceita conexões só da Azion. -Estas verificações confirmam o caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/). +No caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/), espere: -Estas verificações confirmam o caso de uso [Proteger aplicações web contra ataques do OWASP Top 10 e zero-day](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-aplicacoes-web-contra-ataques-do-owasp-top-10-e-zero-day/). +- **O tráfego chega à origem só pela Azion.** As requisições para `www.example.com` continuam respondendo, e uma conexão direta ao endereço da origem é recusada ou expira. + +No caso de uso [Proteger aplicações web contra ataques do OWASP Top 10 e zero-day](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-aplicacoes-web-contra-ataques-do-owasp-top-10-e-zero-day/), espere: + +- **Nenhuma requisição chega à origem por fora da Azion.** Uma conexão direta ao endereço da origem é recusada ou expira, enquanto as requisições para `www.example.com` continuam respondendo. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/connectors/assine-requisicoes-de-origem-com-hmac.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/connectors/assine-requisicoes-de-origem-com-hmac.mdx index 30b8d9ab29..7acac97927 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/connectors/assine-requisicoes-de-origem-com-hmac.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/connectors/assine-requisicoes-de-origem-com-hmac.mdx @@ -137,7 +137,7 @@ Para criar o connector no Azion Console: Em **Access Key** e **Secret Key**, informe as credenciais que podem ler o bucket. - + O connector existe na sua conta e assina cada requisição que envia ao endpoint. diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/dados/deduplicar-entregas-de-webhook-com-kv-store.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/dados/deduplicar-entregas-de-webhook-com-kv-store.mdx index 592875e621..81a9b2d8fc 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/dados/deduplicar-entregas-de-webhook-com-kv-store.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/dados/deduplicar-entregas-de-webhook-com-kv-store.mdx @@ -200,7 +200,9 @@ O handler responde `{ "received": true }`, e o Stripe Dashboard lista a entrega O caso de uso [Criar APIs orientadas a eventos](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-apis-orientadas-a-eventos/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Criar APIs orientadas a eventos](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-apis-orientadas-a-eventos/). +No caso de uso [Criar APIs orientadas a eventos](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-apis-orientadas-a-eventos/), espere: + +- **A rota coloca cada evento na fila.** Um evento de teste enviado com `stripe trigger payment_intent.succeeded` responde `{ "received": true }`, e `azion logs cells --tail` não exibe nenhuma linha `QStash answered`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/dados/ler-e-gravar-no-sql-database-a-partir-de-um-app-nextjs.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/dados/ler-e-gravar-no-sql-database-a-partir-de-um-app-nextjs.mdx index 5a4a0dd9e4..09d55feba7 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/dados/ler-e-gravar-no-sql-database-a-partir-de-um-app-nextjs.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/dados/ler-e-gravar-no-sql-database-a-partir-de-um-app-nextjs.mdx @@ -175,7 +175,10 @@ Cada verificação requisita a aplicação no domínio dela. Uma localidade que A página lê a tabela por uma read replica, e o route handler grava nela pela Azion API. -Estas verificações confirmam o caso de uso [Implantar aplicações full-stack globalmente](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-full-stack-globalmente/). +No caso de uso [Implantar aplicações full-stack globalmente](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/implantar-aplicacoes-full-stack-globalmente/), espere: + +- **O app grava no banco de dados e mostra a gravação.** Um `POST` para `/api/projects` responde `201` com o ID que o banco de dados atribuiu, e a página inicial passa a listar os dois projetos. +- **Um push implanta.** Depois que um push na branch padrão se propaga, a página inicial traz o novo texto do `

`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/dados/servir-uma-api-rest-de-uma-function-apoiada-no-sql-database.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/dados/servir-uma-api-rest-de-uma-function-apoiada-no-sql-database.mdx index f2e121cd6d..8a62f23bb9 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/dados/servir-uma-api-rest-de-uma-function-apoiada-no-sql-database.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/dados/servir-uma-api-rest-de-uma-function-apoiada-no-sql-database.mdx @@ -221,7 +221,10 @@ Cada verificação chama a API no domínio dela. Um primeiro deploy que ainda n A API lê, grava e apaga tarefas, e serve a lista pela cópia em cache entre uma gravação e outra. -Estas verificações confirmam o caso de uso [Criar APIs REST e GraphQL](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-apis-rest-e-graphql/). +No caso de uso [Criar APIs REST e GraphQL](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-apis-rest-e-graphql/), espere: + +- **A API grava no banco de dados.** Um `POST` para `/api/tasks` responde `201` com o ID que o banco de dados atribuiu, e um segundo `DELETE` da mesma tarefa responde `404`. +- **A lista vem do cache entre uma gravação e outra.** Uma requisição repetida da lista em até 60 segundos traz o mesmo valor de `x-tasks-cached-at`, e uma gravação o altera. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/data-streaming/debug-functions-dts.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/data-streaming/debug-functions-dts.mdx index fa0f842b1f..0c6ddc947c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/data-streaming/debug-functions-dts.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/data-streaming/debug-functions-dts.mdx @@ -264,7 +264,9 @@ No caso de uso [Governar o acesso a múltiplos modelos de IA](/pt-br/documentaca - **Cada chamada é registrada.** A sua plataforma de analytics recebe uma linha `model_call` para cada requisição enviada ao gateway, com `"team":"checkout-team"`. Para ler as linhas de uma requisição, abra a fonte de dados **Functions Console** no [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/primeiros-passos/), onde a variável `ID` agrupa as linhas de uma única requisição. -Estas verificações confirmam o caso de uso [Inspecionar uploads de arquivos em busca de conteúdo malicioso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/inspecionar-uploads-de-arquivos-em-busca-de-conteudo-malicioso/). +No caso de uso [Inspecionar uploads de arquivos em busca de conteúdo malicioso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/inspecionar-uploads-de-arquivos-em-busca-de-conteudo-malicioso/), espere: + +- **O veredito de cada upload chega ao SIEM.** Depois do upload do arquivo de teste, o SIEM recebe uma linha de aviso cujo `logMessage` diz `[AI] true`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/debug-regras/debug-regras.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/debug-regras/debug-regras.mdx index cf08331820..b5d1b7f5b2 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/debug-regras/debug-regras.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/debug-regras/debug-regras.mdx @@ -137,5 +137,5 @@ Uma regra de firewall que aplica WAF permite que as outras regras do firewall ro - + diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mostrar-a-sua-propria-pagina-quando-nenhuma-origem-responde.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mostrar-a-sua-propria-pagina-quando-nenhuma-origem-responde.mdx index b7a1cd2190..cbbe45d1f3 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mostrar-a-sua-propria-pagina-quando-nenhuma-origem-responde.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mostrar-a-sua-propria-pagina-quando-nenhuma-origem-responde.mdx @@ -238,7 +238,9 @@ Para confirmar a página: A resposta traz o status `503`, do **Response Custom Status Code** da página, e o corpo de `/errors/503.html`, não a página intitulada `Azion - Default error page`. Ela não traz header `Location`, então o cliente não é redirecionado. Se a página padrão ainda chegar depois que a alteração do deployment se propagou, consulte [Solucionar problemas de Workloads](/pt-br/documentacao/plataforma/workloads/solucao-de-problemas/#custom-pages). -Estas verificações confirmam o caso de uso [Manter uma aplicação no ar quando uma origem falha](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/manter-uma-aplicacao-no-ar-quando-uma-origem-falha/). +No caso de uso [Manter uma aplicação no ar quando uma origem falha](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/manter-uma-aplicacao-no-ar-quando-uma-origem-falha/), espere: + +- **Os visitantes recebem a sua página quando nenhuma origem responde.** Com todas as origens paradas, uma requisição ao seu domínio responde `503` com o corpo de `/errors/503.html`, não `Azion - Default error page`, e sem header `Location`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mover-o-trafego-entre-duas-origens-por-peso.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mover-o-trafego-entre-duas-origens-por-peso.mdx index fd7cb070ad..80af585df8 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mover-o-trafego-entre-duas-origens-por-peso.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/mover-o-trafego-entre-duas-origens-por-peso.mdx @@ -481,7 +481,10 @@ Cada etapa é avaliada pelo que cada origem recebeu e por como ela respondeu. As Uma etapa que parece não ter efeito ainda pode estar se propagando. Repita a verificação depois de alguns minutos antes de alterar os pesos de novo. -Estas verificações confirmam o caso de uso [Migrar uma aplicação para uma nova origem sem downtime](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/migrar-uma-aplicacao-para-uma-nova-origem-sem-downtime/). +No caso de uso [Migrar uma aplicação para uma nova origem sem downtime](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/migrar-uma-aplicacao-para-uma-nova-origem-sem-downtime/), espere: + +- **A nova origem recebe a sua parte sem novos erros.** As requisições agrupadas por endereço de upstream acompanham a proporção dos pesos, e o Real-Time Events não lista nenhum `502` da nova origem. +- **Uma reversão tem efeito.** Depois de uma reversão, os registros de requisições à nova origem param quando todos os data centers têm a mudança. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/rotear-requisicoes-por-pais-ou-continente.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/rotear-requisicoes-por-pais-ou-continente.mdx index 64c976be8a..9756729552 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/rotear-requisicoes-por-pais-ou-continente.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/disponibilidade/rotear-requisicoes-por-pais-ou-continente.mdx @@ -85,7 +85,7 @@ O critério nomeia a localização a corresponder. O Rules Engine a lê do ender | Um país | `${geoip_country_code}`, o código de país de duas letras | _is equal_, `is_equal` | Um código como `RU`, para a Rússia | | Uma lista de países | `${geoip_country_code}` | _matches_, `matches` | Uma expressão regular de códigos de país, como `^(BR\|AR)$` | -Um código de continente é geografia, não uma jurisdição. Quando uma regra deve seguir os países que uma lei ou um contrato nomeia, corresponda à lista de países. As variáveis `${geoip_city_*}` leem outra base de geolocalização, `geoip_city`. Para todas as variáveis de geolocalização, consulte [Variáveis](/pt-br/documentacao/plataforma/applications/rules-engine/#variaveis). +Um código de continente é geografia, não uma jurisdição. Quando uma regra deve seguir os países que uma lei ou um contrato nomeia, corresponda à lista de países. Para todas as variáveis de geolocalização, consulte [Variáveis](/pt-br/documentacao/plataforma/applications/rules-engine/#variaveis). Os procedimentos correspondem ao continente `NA`. Para uma lista de países, troque o critério pelo da tabela. @@ -317,7 +317,9 @@ Todas as respostas carregam `x-origin-region: us`. Em HTTP/2, os nomes dos heade Para comparar a localização que a Azion leu com a origem que respondeu, acesse [Azion Console](https://console.azion.com/) > **Real-Time Events**, selecione a fonte de dados _HTTP Requests_ e informe `host='www.example.com'` em **Filter by**. Cada registro das suas requisições carrega **Geoloc Country Name** e **Upstream Addr**, o endereço da origem que respondeu. Para a sintaxe do filtro, consulte [Filtrar eventos](/pt-br/documentacao/guias/plataforma/observabilidade/adicionar-filtros-events/). -Estas verificações confirmam o caso de uso [Rotear usuários para origens regionais](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/rotear-usuarios-para-origens-regionais/). +No caso de uso [Rotear usuários para origens regionais](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/rotear-usuarios-para-origens-regionais/), espere: + +- **Cada região chega à sua própria origem.** Uma requisição de fora da Europa carrega `x-origin-region: us`, e a mesma requisição a partir da Europa carrega `x-origin-region: eu`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-policies.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-policies.mdx index ecefb5b99d..b985c1da52 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-policies.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-policies.mdx @@ -207,7 +207,9 @@ A resposta carrega `x-cache: BYPASS`. Para saber como ler o header, consulte [Ve O caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/). +No caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/), espere: + +- **As respostas da API não ficam em cache.** Uma requisição para `/api/status` com o header `Pragma: azion-debug-cache` carrega `x-cache: BYPASS`. --- @@ -255,9 +257,9 @@ O header encaminhado pode carregar cookies de sessão. Para impedir que um usuá Em **Name**, digite um nome que identifique o cache setting. Por exemplo: `/target-uri - Private cookies`. - + - Em **Application Accelerator**, abra **Cache vary by Cookies** e defina **Behavior** como _Denylist_. + Em **Application Accelerator**, abra **Cache vary by Cookies** e defina **Behavior** como _Allowlist_. @@ -268,7 +270,7 @@ O header encaminhado pode carregar cookies de sessão. Para impedir que um usuá -O cache setting aparece na aba **Cache Settings**, e ele mantém os cookies listados fora da cache key. +O cache setting aparece na aba **Cache Settings**, e ele coloca os cookies listados na cache key, então cada sessão recebe a sua própria cópia em cache da resposta. Para aplicar esse cache setting à regra que encaminha os cookies: @@ -397,7 +399,7 @@ O caso de uso [Criar vitrines de e-commerce](/pt-br/documentacao/casos-de-uso/co ## Ignore o cache em vários caminhos e em um cookie de sessão -Uma única regra pode enviar toda requisição por visitante para a origem. A regra desta seção casa com os caminhos de carrinho, checkout e conta e com qualquer requisição que carregue o cookie de sessão, então um visitante com sessão ignora o cache em todos os caminhos. Ela também carrega **Forward Cookies**, para que o cookie de sessão que a origem define chegue ao visitante. Nada que essa regra casa fica em cache, então o cache setting de denylist de [Encaminhe cookies da origem ao usuário](#encaminhe-cookies-da-origem-ao-usuario) não é necessário aqui. O exemplo usa `/cart`, `/checkout`, `/account` e `session_id`. Substitua cada um pelo seu. +Uma única regra pode enviar toda requisição por visitante para a origem. A regra desta seção casa com os caminhos de carrinho, checkout e conta e com qualquer requisição que carregue o cookie de sessão, então um visitante com sessão ignora o cache em todos os caminhos. Ela também carrega **Forward Cookies**, para que o cookie de sessão que a origem define chegue ao visitante. Nada que essa regra casa fica em cache, então o cache setting de allowlist de [Encaminhe cookies da origem ao usuário](#encaminhe-cookies-da-origem-ao-usuario) não é necessário aqui. O exemplo usa `/cart`, `/checkout`, `/account` e `session_id`. Substitua cada um pelo seu. @@ -482,7 +484,9 @@ A segunda requisição de catálogo carrega `x-cache: HIT`. O carrinho e a requi O caso de uso [Criar vitrines de e-commerce](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Criar vitrines de e-commerce](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce/). +No caso de uso [Criar vitrines de e-commerce](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce/), espere: + +- **As páginas de catálogo ficam em cache, e as páginas pessoais não.** A segunda requisição de uma página de catálogo carrega `x-cache: HIT`. O carrinho, e uma página de catálogo requisitada com o cookie de sessão, carregam `x-cache: BYPASS`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-post-options.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-post-options.mdx index 997235d23b..984d24edb1 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-post-options.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cache-post-options.mdx @@ -14,7 +14,7 @@ import DocStep from '@aziontech/webkit/doc-step' [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) libera o cache de respostas `POST` e `OPTIONS`, além das requisições `GET` e `HEAD` que uma aplicação armazena em cache nativamente. Você seleciona os métodos em um cache setting a partir de Azion Console e depois aplica esse cache setting com o [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/). -Um objeto `POST` em cache não compartilha a [cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/) com a resposta `GET` do mesmo path. A Azion adiciona o método como prefixo à key de qualquer requisição diferente de `GET` ou `HEAD`. Para um objeto `POST` ou `OPTIONS` em cache, a key também acrescenta `@@` e o hash MD5 do corpo da requisição. Uma requisição `OPTIONS` para `https://static.yourdomain.com/page` é armazenada sob a key `optionshttpsstatic.yourdomain.com/page`. Um `POST` para um path dinâmico é armazenado sob `httpsdynamic.yourdomain.com/path@@md5_of_post_arguments`. +Um objeto `POST` em cache não compartilha a [cache key](/pt-br/documentacao/plataforma/applications/cache/cache-keys/) com a resposta `GET` do mesmo path. A Azion adiciona o método como prefixo à key de qualquer requisição diferente de `GET` ou `HEAD`. Para um objeto `POST` em cache, a key também acrescenta `@@` e o hash MD5 do corpo da requisição. Uma key de `OPTIONS` carrega só o prefixo do método, sem `@@` e sem hash, mesmo quando a requisição traz um corpo: uma requisição `OPTIONS` para `https://static.yourdomain.com/page` é armazenada sob a key `optionshttpsstatic.yourdomain.com/page`. Um `POST` para um path dinâmico é armazenado sob `posthttpsdynamic.yourdomain.com/path@@md5_of_post_body`. Um corpo de `POST` que varia a cada requisição produz, portanto, um objeto em cache por requisição. Para o que uma variação custa, consulte [Variação de cache](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/). @@ -116,7 +116,7 @@ As requisições cuja URI começa com `/api/search` carregam o cache setting. A Antes de um cache setting selecionar **POST**, uma requisição `POST` não registra status de cache: o header `X-Cache` carrega `-`, porque o conteúdo está restrito de permanecer em cache. Para ler o header em uma requisição, consulte [Verificar indicadores de cache com o ModHeader](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). ::: -Um objeto `POST` ou `OPTIONS` em cache expira com um purge por cache key que lista cada variação, ou com um purge por wildcard terminado em `@@*`. Para os tipos de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). +Um objeto `POST` em cache expira com um purge por cache key que lista cada variação, ou com um purge por wildcard terminado em `@@*`. Para os tipos de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purgue-conteudo-que-varia). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cors/check-cors-permissions.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cors/check-cors-permissions.mdx index a151015a99..9b385a6e57 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cors/check-cors-permissions.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-cors/check-cors-permissions.mdx @@ -164,7 +164,7 @@ http://app.example.com http://example.org ``` -Uma regra que permite origens específicas exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#ativacao-do-modulo) na aplicação. +Uma regra que permite origens específicas exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#switch-do-application-accelerator) na aplicação. Para ativar Application Accelerator pelo Azion Console: diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-purge-on-publish.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-purge-on-publish.mdx index 15f400c991..6c503c8a01 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-purge-on-publish.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-purge-on-publish.mdx @@ -229,7 +229,7 @@ A API responde com HTTP `201` e, sem `layer`, purga `cache`: -Todos os tamanhos e formatos das imagens alteradas saem do cache. Quando o sistema de publicação conhece as variações exatas que serve, um purge por cache key que lista cada key faz o mesmo trabalho sem contar no limite de wildcard. Uma key carrega os argumentos de processamento depois de `?` e o formato depois de `@@`, como em `httpswww.example.com/media/blue-shirt.jpg?ims=400x@@webp`. Para o formato, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). +Todos os tamanhos e formatos das imagens alteradas saem do cache. Quando o sistema de publicação conhece as variações exatas que serve, um purge por cache key que lista cada key faz o mesmo trabalho sem contar no limite de wildcard. Com `ims` na allowlist de query string do cache setting, uma key carrega `@@`, depois os argumentos de processamento e, no final, o formato, como em `httpswww.example.com/media/blue-shirt.jpg@@?ims=400xwebp`. Para o formato, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). :::caution[Atenção] Purges por URL e por wildcard limpam só a camada do Cache. Em uma aplicação cuja cache setting tem o [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) ativado, purgue primeiro a camada do Tiered Cache com um purge por cache key e depois a camada do Cache, para que o cache não seja preenchido de novo a partir de uma cópia desatualizada. Para os passos, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/#escolha-o-tipo-de-purge). @@ -290,7 +290,9 @@ No caso de uso [Criar e operar sites de marketing](/pt-br/documentacao/casos-de- - **Um push chega à página.** Mude o texto da página `/about/`, faça o commit e o push. Espere o deploy terminar, envie o purge por wildcard e requisite a página de novo. A resposta carrega `x-cache: MISS` e o novo texto, e a requisição seguinte carrega `HIT`. -Estas verificações confirmam o caso de uso [Criar vitrines de e-commerce](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce/). +No caso de uso [Criar vitrines de e-commerce](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/criar-vitrines-de-e-commerce/), espere: + +- **Uma página de produto após o purge serve a nova versão.** Depois que o purge aparece no histórico, uma requisição para `/products/blue-shirt` carrega `x-cache: MISS` e a versão que a origem publicou, e a requisição seguinte carrega `HIT`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-test-locally.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-test-locally.mdx index cd74319f62..9bf79f970a 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-test-locally.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-test-locally.mdx @@ -198,5 +198,5 @@ Teste a aplicação antes de alterar o DNS público do domínio. Depois, aponte - + diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-use-modheader-to-check-cache-indicators.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-use-modheader-to-check-cache-indicators.mdx index 64b40daa34..c3493be73e 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-use-modheader-to-check-cache-indicators.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-application/ea-use-modheader-to-check-cache-indicators.mdx @@ -97,7 +97,7 @@ No caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos- - + diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-firewall/ai-inference-upload-scanning.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-firewall/ai-inference-upload-scanning.mdx index 28f58989e2..d49a80d988 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-firewall/ai-inference-upload-scanning.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-firewall/ai-inference-upload-scanning.mdx @@ -269,7 +269,9 @@ curl -s -o /dev/null -w '%{http_code}\n' -X POST --data-binary @test-malicious.p O primeiro comando imprime o status que a sua aplicação responde para um upload. Quando o modelo responde `true`, o segundo imprime `403`, e o dataset `functionConsoleEvents` do Real-Time Events guarda uma linha de aviso com o texto `[AI] true`. Uma requisição a uma rota fora de `/upload` não grava nenhuma linha da função. -Estas verificações confirmam o caso de uso [Inspecionar uploads de arquivos em busca de conteúdo malicioso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/inspecionar-uploads-de-arquivos-em-busca-de-conteudo-malicioso/). +No caso de uso [Inspecionar uploads de arquivos em busca de conteúdo malicioso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/inspecionar-uploads-de-arquivos-em-busca-de-conteudo-malicioso/), espere: + +- **Um upload malicioso nunca chega à aplicação.** Quando o modelo responde `true`, o upload do arquivo de teste responde `403`, e `functionConsoleEvents` guarda uma linha de aviso com o texto `[AI] true`. Um documento seguro recebe o status de costume da sua aplicação. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/listar-dados/index.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/listar-dados/index.mdx index ef5f2a43fd..cb541f5efb 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/listar-dados/index.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/listar-dados/index.mdx @@ -249,7 +249,9 @@ O corpo traz as linhas da tabela `stores`: O caso de uso [Modernizar uma aplicação monolítica sem reescrevê-la](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/modernizar-uma-aplicacao-monolitica-sem-reescreve-la/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Modernizar uma aplicação monolítica sem reescrevê-la](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/modernizar-uma-aplicacao-monolitica-sem-reescreve-la/). +No caso de uso [Modernizar uma aplicação monolítica sem reescrevê-la](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/modernizar-uma-aplicacao-monolitica-sem-reescreve-la/), espere: + +- **A rota migrada responde a partir do SQL Database.** Uma requisição para `/api/stores` retorna as linhas da tabela `stores` como um array JSON. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/vector-search-guia.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/vector-search-guia.mdx index e20a1d7c13..8d3982d271 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/vector-search-guia.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-sql/vector-search-guia.mdx @@ -16,31 +16,32 @@ import DocStep from '@aziontech/webkit/doc-step' Neste tutorial, você vai construir uma busca semântica que retorna os documentos de significado mais próximo a uma pergunta, sobre dados armazenados em [SQL Database](/pt-br/documentacao/plataforma/sql-database/). Você vai criar um banco de dados, adicionar uma tabela com uma coluna vetorial e um índice sobre ela, gerar embeddings com a OpenAI, armazená-los e consultar a tabela por similaridade. -O artefato é uma função TypeScript que roda em uma aplicação Azion. Ela acessa o banco de dados pela [biblioteca SQL da Azion](/pt-br/documentacao/devtools/azion-lib/sql/) e produz seus embeddings com o pacote LangChain OpenAI. +O trabalho é dividido em duas partes. Um script de setup roda uma vez a partir da sua máquina: ele cria o banco de dados, espera até que o banco aceite instruções e armazena os embeddings. Uma função então responde a cada requisição com uma busca sobre essas linhas. Os dois acessam o banco de dados pela [biblioteca SQL da Azion](/pt-br/documentacao/devtools/azion-lib/sql/) e produzem embeddings com o pacote LangChain OpenAI. A função roda localmente com `azion dev`. --- ## Pré-requisitos -- Node.js instalado. A aplicação e a biblioteca `azion` rodam sobre ele. -- Azion CLI instalada. Para mais informações, consulte [Azion CLI](/pt-br/documentacao/devtools/cli/). +- Node.js versão 20.6 ou superior. O script de setup lê suas credenciais com `node --env-file`, que versões anteriores não têm. +- Azion CLI instalada e autorizada. Para mais informações, consulte [Azion CLI](/pt-br/documentacao/devtools/cli/). +- Um projeto de função criado com `azion init`, com o preset _Javascript_ e o template _Hello World_. Para criar um, consulte [Faça o deploy de uma function com a Azion CLI](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/functions-e-runtime/deploy-function-with-cli/). Os passos abaixo rodam na pasta do projeto. - Um personal token da Azion. Para mais informações, consulte [Como criar um personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/). - SQL Database habilitado na conta. O produto está em Preview, e o acesso é solicitado pelo time de suporte técnico. Para solicitá-lo, consulte [Technical Support](/pt-br/documentacao/suporte/). - Uma OpenAI API key. A etapa de embedding chama a OpenAI API com ela. Para criar uma, consulte [Create and export an API key](https://developers.openai.com/api/docs/quickstart#create-and-export-an-api-key). --- -## 1. Crie o banco de dados +## 1. Prepare o projeto -O banco de dados é o contêiner em que a tabela vive, e `createDatabase` o cria a partir do código da aplicação. Para configurar o projeto e criá-lo: +O script de setup e a função compartilham as mesmas dependências e credenciais. Para preparar o projeto: - No diretório da aplicação, instale a biblioteca `azion` e o pacote LangChain OpenAI: + Na pasta do projeto, instale a biblioteca SQL da Azion e o pacote LangChain OpenAI: ```bash - npm install azion @langchain/openai + npm install @aziontech/sql @langchain/openai ``` Os dois pacotes ficam listados nas dependências do projeto. @@ -48,115 +49,158 @@ O banco de dados é o contêiner em que a tabela vive, e `createDatabase` o cria - No arquivo `.env`, adicione o personal token e a OpenAI API key: + No arquivo `.env` da pasta do projeto, adicione o personal token e a OpenAI API key: ```bash AZION_TOKEN=[TOKEN VALUE] OPENAI_API_KEY=[OPENAI API KEY] ``` - `AZION_TOKEN` autentica a biblioteca, e `OPENAI_API_KEY` autentica as chamadas de embedding. + `AZION_TOKEN` autentica a biblioteca, e `OPENAI_API_KEY` autentica as chamadas de embedding. Nunca faça commit do arquivo `.env` no seu repositório de código. - + + +O projeto passa a ter os dois pacotes e as duas credenciais que as próximas etapas leem. + +--- + +## 2. Crie o banco de dados e espere até que ele fique pronto - Em `main.ts`, importe o que a função usa e crie o banco de dados. `createDatabase` responde com `data` e `error`, e uma falha carrega sua mensagem em `error`: +`createDatabase` retorna enquanto o banco de dados ainda está sendo provisionado: seu `status` é `creating` e passa a `created` cerca de 15 segundos depois. Uma instrução enviada antes disso falha, então o script consulta `getDatabase` até que o status seja `created`. O nome de um banco de dados é único na conta, e `createDatabase` com um nome que a conta já tem falha com o erro `14001` `Name Already In Use.`. O script lê o banco de dados primeiro e só o cria quando ele não existe, então uma segunda execução reaproveita o banco em vez de falhar. - ```typescript - import { createDatabase, useExecute, useQuery } from 'azion/sql' - import { OpenAIEmbeddings } from '@langchain/openai' +Crie um arquivo chamado `setup.mjs` na pasta do projeto e comece pela etapa do banco de dados: - export default async function vectorSearch() { - const { error: createError } = await createDatabase('vectorDatabase', { debug: true }) +```javascript +import { createDatabase, getDatabase, useExecute, useQuery } from '@aziontech/sql' +import { OpenAIEmbeddings } from '@langchain/openai' - if (createError) { - return Response.json({ error: createError.message }, { status: 500 }) +const DATABASE = 'vectorDatabase' + +async function ensureDatabase() { + let { data: database } = await getDatabase(DATABASE) + + if (!database) { + const { error } = await createDatabase(DATABASE) + // 14001 Name Already In Use: another run created it between the two calls. + // Read it again, and stop only when it still does not exist. + if (error) { + ;({ data: database } = await getDatabase(DATABASE)) + if (!database) throw new Error(`createDatabase failed: ${error.message}`) } - ``` + } - - + for (let attempt = 1; attempt <= 20; attempt++) { + const { data, error } = await getDatabase(DATABASE) + if (error) throw new Error(`getDatabase failed: ${error.message}`) + if (data?.status === 'created') return + console.log(`Database status is ${data?.status}, waiting...`) + await new Promise((resolve) => setTimeout(resolve, 3000)) + } + + throw new Error('The database did not reach the created status in 60 seconds') +} +``` -A conta passa a ter um banco de dados chamado `vectorDatabase`. O provisionamento é assíncrono: o status é `creating` primeiro e passa a `created` cerca de 15 segundos depois, e uma instrução só roda contra o banco de dados depois que o status é `created`. +`getDatabase` retorna um objeto vazio para um nome que não corresponde a nenhum banco de dados, então `database` é `undefined` até que o banco exista. O loop verifica o status a cada 3 segundos e desiste depois de 20 tentativas. --- -## 2. Crie a tabela e o índice vetorial +## 3. Crie a tabela e o índice vetorial A tabela guarda o texto de cada documento e seu embedding. Um vetor vive em uma coluna própria, declarada com um tipo blob que carrega sua contagem de dimensões: `F32_BLOB(1536)` guarda 1.536 elementos de ponto flutuante de 32 bits, que é o número de dimensões que o modelo `text-embedding-3-small` retorna. O índice faz uma busca consultar uma estrutura de vizinhos aproximados mais próximos em vez de cada linha. Ele é construído sobre `libsql_vector_idx(embedding, 'metric=cosine')`, e a tabela que ele cobre precisa de um `ROWID` ou de uma `PRIMARY KEY` de coluna única, que `id INTEGER PRIMARY KEY AUTOINCREMENT` fornece. -Continue em `main.ts` e rode as duas instruções com `useExecute`, que atende as instruções que criam e escrevem: +Continue em `setup.mjs`. As duas instruções carregam `IF NOT EXISTS`, então uma segunda execução deixa a tabela e o índice como estão. Rode-as com `useExecute`, que atende as instruções que criam e escrevem: -```typescript - const setupStatements = [ - `CREATE TABLE documents ( +```javascript +async function ensureTable() { + const { error } = await useExecute(DATABASE, [ + `CREATE TABLE IF NOT EXISTS documents ( id INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT NOT NULL, embedding F32_BLOB(1536) );`, - `CREATE INDEX documents_idx ON documents ( + `CREATE INDEX IF NOT EXISTS documents_idx ON documents ( libsql_vector_idx(embedding, 'metric=cosine') );` - ] + ]) - const { error: setupError } = await useExecute('vectorDatabase', setupStatements) - - if (setupError) { - return Response.json({ error: setupError.message }, { status: 500 }) - } + if (error) throw new Error(`Table setup failed: ${error.message}`) +} ``` O banco de dados passa a ter uma tabela `documents` e um índice `documents_idx`. Criar um índice vetorial também adiciona uma tabela sombra chamada `documents_idx_shadow`, que tanto `getTables` quanto o EdgeSQL Shell listam ao lado da tabela. --- -## 3. Gere e armazene os embeddings - -O modelo de embedding transforma texto em um vetor. `text-embedding-3-small` retorna 1.536 dimensões, o número que a coluna `embedding` declara, e o mesmo modelo produz os vetores armazenados aqui e o vetor que a busca usa na etapa 4. - -Continue em `main.ts`. Construa o modelo, gere o embedding de cada documento com `embedQuery` e envolva o resultado em `vector('[...]')`, que converte um array de números no tipo que a coluna guarda: +## 4. Gere e armazene os embeddings + +O modelo de embedding transforma texto em um vetor. `text-embedding-3-small` retorna 1.536 dimensões, o número que a coluna `embedding` declara, e o mesmo modelo produz os vetores armazenados aqui e o vetor que a busca usa na etapa 5. + +Continue em `setup.mjs`. `seedDocuments` conta as linhas primeiro e só armazena os documentos quando a tabela está vazia, então uma segunda execução não os duplica. Ela gera o embedding de cada documento com `embedQuery` e envolve o resultado em `vector('[...]')`, que converte um array de números no tipo que a coluna guarda: + +```javascript +const documents = [ + 'Paris is the capital of France', + 'The Eiffel Tower is a French landmark', + 'London is the capital of England', + 'Big Ben is located in London', + 'Canberra is the capital of Australia', + 'The Great Barrier Reef is in Australia', + 'French cuisine is world-famous', + 'Tea is popular in England', + 'The English Channel separates Britain and France' +] + +async function seedDocuments() { + const { data: count, error: countError } = await useQuery(DATABASE, [ + 'SELECT COUNT(*) AS total FROM documents;' + ]) + if (countError) throw new Error(`Count failed: ${countError.message}`) + + if (count.results[0].rows[0][0] > 0) { + console.log('The documents table already holds rows, skipping the insert') + return + } -```typescript const embeddings = new OpenAIEmbeddings({ model: 'text-embedding-3-small', - verbose: false, apiKey: process.env.OPENAI_API_KEY }) - const documents = [ - 'Paris is the capital of France', - 'The Eiffel Tower is a French landmark', - 'London is the capital of England', - 'Big Ben is located in London', - 'Canberra is the capital of Australia', - 'The Great Barrier Reef is in Australia', - 'French cuisine is world-famous', - 'Tea is popular in England', - 'The English Channel separates Britain and France' - ] - const insertStatements = [] for (const doc of documents) { const embedding = await embeddings.embedQuery(doc) + // The body carries SQL text, so double every single quote inside a value. + const content = doc.replaceAll("'", "''") insertStatements.push( - `INSERT INTO documents (content, embedding) VALUES ('${doc}', vector('[${embedding}]'));` + `INSERT INTO documents (content, embedding) VALUES ('${content}', vector('[${embedding}]'));` ) } - const { error: insertError } = await useExecute('vectorDatabase', insertStatements, { debug: true }) + const { error } = await useExecute(DATABASE, insertStatements) + if (error) throw new Error(`Insert failed: ${error.message}`) +} - if (insertError) { - return Response.json({ error: insertError.message }, { status: 500 }) - } +await ensureDatabase() +await ensureTable() +await seedDocuments() +console.log('Setup complete') ``` -A tabela `documents` passa a ter uma linha por entrada da lista, cada uma com seu texto e seu embedding, e o índice cobre essas linhas. `vector('[...]')` rejeita um vetor com mais de 65.536 dimensões. +Rode o script na pasta do projeto: + +```bash +node --env-file=.env setup.mjs +``` + +O script imprime `Database status is creating, waiting...` enquanto o banco de dados é provisionado e `Setup complete` no final. A tabela `documents` passa a ter uma linha por entrada da lista, cada uma com seu texto e seu embedding, e o índice cobre essas linhas. Rodar o script de novo imprime `Setup complete` sem criar nada duas vezes. `vector('[...]')` rejeita um vetor com mais de 65.536 dimensões. --- -## 4. Consulte por similaridade +## 5. Consulte por similaridade Uma busca gera o embedding da pergunta com o mesmo modelo e pede ao índice as linhas mais próximas. `vector_top_k` recebe o nome do índice, o vetor de consulta e o número de linhas a retornar, e responde com uma coluna `id` pela qual a tabela é juntada em `rowid`: @@ -164,30 +208,39 @@ Uma busca gera o embedding da pergunta com o mesmo modelo e pede ao índice as l SELECT content FROM vector_top_k('documents_idx', vector('[...]'), 2) JOIN documents ON documents.rowid = id; ``` -Continue em `main.ts` e rode a instrução com `useQuery`, que atende as instruções que retornam linhas: +A função apenas lê, então não cria nada e responde a toda requisição da mesma forma. Substitua o conteúdo do `index.js`, o entrypoint que o build lê por padrão, pela busca, e rode a instrução com `useQuery`, que atende as instruções que retornam linhas: -```typescript - const query = 'What is the capital of Australia?' - const queryEmbedding = await embeddings.embedQuery(query) +```javascript +import { useQuery } from '@aziontech/sql' +import { OpenAIEmbeddings } from '@langchain/openai' - const searchStatements = [ - `SELECT content FROM vector_top_k('documents_idx', vector('[${queryEmbedding}]'), 2) - JOIN documents ON documents.rowid = id;` - ] +export default { + async fetch(request) { + const embeddings = new OpenAIEmbeddings({ + model: 'text-embedding-3-small', + apiKey: process.env.OPENAI_API_KEY + }) - const { data: searchData, error: searchError } = await useQuery('vectorDatabase', searchStatements) + const query = 'What is the capital of Australia?' + const queryEmbedding = await embeddings.embedQuery(query) - if (searchError) { - return Response.json({ error: searchError.message }, { status: 500 }) - } + const { data: searchData, error: searchError } = await useQuery('vectorDatabase', [ + `SELECT content FROM vector_top_k('documents_idx', vector('[${queryEmbedding}]'), 2) + JOIN documents ON documents.rowid = id;` + ]) + + if (searchError) { + return Response.json({ error: searchError.message }, { status: 500 }) + } - return Response.json({ data: searchData }) + return Response.json({ data: searchData }) + } } ``` -A resposta carrega `results`, uma entrada por instrução, cada uma com suas `columns` e suas `rows`. Uma instrução que falha não faz a chamada falhar: sua mensagem chega em `error` e na entrada correspondente de `results`, e é por isso que cada operação acima lê `error` antes de ler `data`. +A resposta carrega `results`, uma entrada por instrução, cada uma com suas `columns` e suas `rows`. Uma instrução que falha faz a chamada inteira falhar: `error` guarda a mensagem do banco de dados, como `no such table: documents`, e `data` não é preenchido. É por isso que a função lê `error` antes de ler `data`. -A função retorna as duas linhas cujos embeddings estão mais próximos da pergunta, e uma falha em qualquer ponto da cadeia retorna uma mensagem JSON com status `500`. +A função retorna as duas linhas cujos embeddings estão mais próximos da pergunta, e uma busca que falha retorna uma mensagem JSON com status `500`. :::note[nota] SQL Database também suporta a integração LangChain Vector Store para armazenamento de documentos e o LangChain Retriever para busca híbrida, que combina busca vetorial com busca full-text. @@ -195,14 +248,14 @@ SQL Database também suporta a integração LangChain Vector Store para armazena --- -## 5. Execute a função +## 6. Execute a busca localmente -A função cria seu próprio banco de dados, tabela, índice e linhas na primeira requisição. Para executá-la localmente: +A função lê as linhas que o script de setup armazenou. Para executá-la localmente: - + - No diretório da aplicação, construa-a: + Na pasta do projeto, faça o build: ```bash azion build @@ -219,17 +272,21 @@ A função cria seu próprio banco de dados, tabela, índice e linhas na primeir azion dev ``` - A função responde no endereço local que o comando imprime. + A função responde no endereço local que o comando imprime, `http://localhost:3333` por padrão. - Requisite esse endereço local. A função cria o banco de dados, armazena os embeddings, gera o embedding de `What is the capital of Australia?` e busca no índice. + ```bash + curl http://localhost:3333 + ``` + + A função gera o embedding de `What is the capital of Australia?` e busca no índice. -A resposta carrega os documentos cujos embeddings estão mais próximos da pergunta, e a conta passa a ter o banco de dados `vectorDatabase` com a tabela `documents` e suas linhas. Para buscar outra coisa, mude o valor de `query` e envie a requisição novamente. +A resposta carrega os dois documentos cujos embeddings estão mais próximos da pergunta. Toda requisição seguinte roda a mesma busca, porque a função não cria nada. Para buscar outra coisa, mude o valor de `query`, faça o build de novo e envie a requisição novamente. Para armazenar outros documentos, mude a lista `documents`, apague as linhas da tabela `documents` e rode `setup.mjs` de novo. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/edge-storage/camada-autenticacao-object-storage-functions/index.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/edge-storage/camada-autenticacao-object-storage-functions/index.mdx index 881e548715..6c97076f8e 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/edge-storage/camada-autenticacao-object-storage-functions/index.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/edge-storage/camada-autenticacao-object-storage-functions/index.mdx @@ -58,10 +58,10 @@ A Azion CLI cria a estrutura do projeto e o `npm` adiciona a biblioteca que veri ```bash - azion init my-auth-storage + azion init --name my-auth-storage ``` - Nos prompts, defina **Template** como _JavaScript_ e **Runtime** como _Azion Runtime_. A Azion CLI escreve o projeto em uma pasta `my-auth-storage`. + A flag `--name` define o nome do projeto, então o comando não pergunta por ele. Em `Choose a preset:`, selecione _Javascript_. Em `Choose a template:`, selecione _Hello World_. Responda `Y` à pergunta sobre as dependências e `N` às perguntas sobre o servidor de desenvolvimento local e o deploy. A Azion CLI escreve o projeto em uma pasta `my-auth-storage`. @@ -217,17 +217,27 @@ O handler lê `JWT_SECRET` e `BUCKET_NAME` com `Azion.env.get`, então nenhum do --- -## Configure as variáveis de ambiente +## Armazene as variáveis de ambiente -Crie um arquivo `.env` na raiz do projeto, com o bucket que o handler lê e o secret contra o qual ele verifica: +O handler lê o nome do bucket e o secret de assinatura da sua conta em tempo de execução, então nenhum dos dois valores entra no código ou no seu repositório. O nome do bucket não é confidencial, e o secret é: uma variável secreta nunca é impressa de volta pela Azion CLI. + +Para criar as duas variáveis com a Azion CLI: + +```bash +azion create variables --key BUCKET_NAME --value --secret false +azion create variables --key JWT_SECRET --value --secret true +``` + +Cada comando imprime o UUID da variável que criou: ```text -BUCKET_NAME=your-bucket-name -JWT_SECRET=your-secret +Created variable with UUID 00000000-0000-0000-0000-000000000005 ``` +Uma variável só chega a uma função depois do deploy da função, então crie as duas antes de fazer o deploy do projeto. A conta guarda as duas variáveis, e o handler lê cada uma com `Azion.env.get()`. Para os limites das variáveis, consulte [Variáveis de ambiente](/pt-br/documentacao/plataforma/functions/environment-variables/). + :::caution[Atenção] -Nunca faça commit do arquivo `.env` nem de um secret como `JWT_SECRET` no seu repositório de código. Adicione `.env` ao seu `.gitignore`. +Nunca escreva `JWT_SECRET` no código nem faça commit dele no seu repositório de código. Mantenha o valor apenas na variável secreta. ::: --- @@ -253,30 +263,13 @@ Substitua `your-bucket-name`, `your-bucket-prefix` e `./path/to/storage/files` p ## Faça o deploy da função -O deploy envia o código e `azion sync` envia os valores que o código lê. Para colocar os dois na sua conta: - - - - - ```bash - azion deploy - ``` - - A Azion CLI faz o build do projeto e envia a função para a sua conta. +As variáveis já estão na sua conta, então o deploy é o último passo antes de a função responder às requisições. Na pasta do projeto, rode: - - - - ```bash - azion sync - ``` - - O handler lê `BUCKET_NAME` e `JWT_SECRET` em tempo de execução. Sem este passo, as variáveis existem apenas no seu arquivo `.env` e a função não as encontra. - - - +```bash +azion deploy +``` -A função roda na sua conta com o nome do bucket e o secret de assinatura de que ela precisa. +A Azion CLI faz o build do projeto e envia a função para a sua conta, e a função lê `BUCKET_NAME` e `JWT_SECRET` das variáveis que você criou. Se você criar ou alterar uma variável depois deste deploy, rode `azion deploy` de novo para que a função leia o novo valor. --- @@ -292,7 +285,7 @@ Assine um token com o mesmo secret, depois requisite um objeto três vezes: com ```javascript import { SignJWT } from 'jose'; - const secret = new TextEncoder().encode('your-secret-key'); + const secret = new TextEncoder().encode(''); const token = await new SignJWT({ sub: 'user123', @@ -306,7 +299,7 @@ Assine um token com o mesmo secret, depois requisite um objeto três vezes: com console.log(token); ``` - O script imprime o token assinado. Defina `secret` com o valor que você armazenou em `JWT_SECRET`, ou a função recusa todo token que o script emite. + O script imprime o token assinado. Substitua `` pelo valor que você armazenou em `JWT_SECRET`, ou a função recusa todo token que o script emite. @@ -349,7 +342,9 @@ Assine um token com o mesmo secret, depois requisite um objeto três vezes: com Um token assinado retorna o objeto, e um token ausente ou não verificável retorna `401` sem alcançar o bucket. -Estas verificações confirmam o caso de uso [Entregar uma biblioteca de vídeos sob demanda](/pt-br/documentacao/casos-de-uso/entregar-midia-e-streaming/entregar-uma-biblioteca-de-videos-sob-demanda/). +No caso de uso [Entregar uma biblioteca de vídeos sob demanda](/pt-br/documentacao/casos-de-uso/entregar-midia-e-streaming/entregar-uma-biblioteca-de-videos-sob-demanda/), espere: + +- **Só uma requisição assinada recebe o objeto.** Uma requisição com um token válido retorna o objeto, e uma requisição sem token responde `401` sem alcançar o bucket. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/firewall-e-waf/aplicar-waf-e-rate-limit-a-um-caminho.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/firewall-e-waf/aplicar-waf-e-rate-limit-a-um-caminho.mdx index b3bf28d432..3151e0549a 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/firewall-e-waf/aplicar-waf-e-rate-limit-a-um-caminho.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/firewall-e-waf/aplicar-waf-e-rate-limit-a-um-caminho.mdx @@ -272,7 +272,10 @@ No caso de uso [Implantar servidores MCP remotos](/pt-br/documentacao/casos-de-u - **O rate limit recusa um loop.** Sessenta requisições `tools/list` enviadas 30 de cada vez, para que cheguem mais rápido que 10 por segundo, respondem com `200` e `429`: a taxa e o burst admitem algumas das requisições, e o firewall recusa as outras. -Estas verificações confirmam o caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-apis-publicas-contra-abuso/). +No caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-apis-publicas-contra-abuso/), espere: + +- **O caminho da API recusa uma inundação.** As requisições a `/api/` além do burst respondem `429`, e as mesmas requisições a um caminho fora de `/api/` não. +- **O WAF registra ataques no caminho.** Uma requisição com formato de injeção para `/api/` tem um registro do WAF e, depois da mudança para _Blocking_, responde `400`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/functions-e-runtime/resolver-tenants-pelo-hostname-em-uma-funcao.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/functions-e-runtime/resolver-tenants-pelo-hostname-em-uma-funcao.mdx index 5bf189a9b1..508a72edab 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/functions-e-runtime/resolver-tenants-pelo-hostname-em-uma-funcao.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/functions-e-runtime/resolver-tenants-pelo-hostname-em-uma-funcao.mdx @@ -237,7 +237,10 @@ Cada verificação requisita um hostname de tenant ou o domínio do workload: Um tenant que responde a página `404` padrão da Azion em vez de `Unknown tenant` ainda está esperando a mudança no workload se propagar. Quando a função não responder de forma alguma, ative [Debug Rules](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) para ver quais regras foram executadas. -Estas verificações confirmam o caso de uso [Executar aplicações SaaS multi-tenant](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/executar-aplicacoes-saas-multi-tenant/). +No caso de uso [Executar aplicações SaaS multi-tenant](/pt-br/documentacao/casos-de-uso/construir-e-executar-aplicacoes/executar-aplicacoes-saas-multi-tenant/), espere: + +- **Cada tenant vê só os próprios dados.** Uma requisição para `acme.app.example.com` indica `Acme` e traz só as linhas dele, e a mesma requisição para `globex.app.example.com` não traz nenhum projeto da Acme. +- **Um hostname desconhecido não recebe nada.** Uma requisição ao workload domain responde `404`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/graphql/query-tiered-cache-usage-data.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/graphql/query-tiered-cache-usage-data.mdx index a83a5a617a..456a700de8 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/graphql/query-tiered-cache-usage-data.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/graphql/query-tiered-cache-usage-data.mdx @@ -152,7 +152,7 @@ Para cada campo do dataset, consulte [Campos da API GraphQL de Consumption](/pt- - + diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/resumir-texto-com-ai-inference-e-armazenar-o-resumo-em-cache.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/resumir-texto-com-ai-inference-e-armazenar-o-resumo-em-cache.mdx index 59e8282dda..e50251dd84 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/resumir-texto-com-ai-inference-e-armazenar-o-resumo-em-cache.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/resumir-texto-com-ai-inference-e-armazenar-o-resumo-em-cache.mdx @@ -120,8 +120,6 @@ A resposta traz `x-summary-cache: miss` e um corpo JSON com `summary`. Envie a m A rota retorna o resumo de um texto e responde o mesmo texto a partir do cache por um dia. -Estas verificações confirmam o caso de uso [Adicionar funcionalidades de IA a aplicações existentes](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/adicionar-funcionalidades-de-ia-a-aplicacoes-existentes/). - No caso de uso [Adicionar funcionalidades de IA a aplicações existentes](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/adicionar-funcionalidades-de-ia-a-aplicacoes-existentes/), espere: - **A rota é executada apenas no seu caminho.** Qualquer outro caminho da sua aplicação responde como respondia antes de a regra existir. diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/rotear-chamadas-de-modelo-por-uma-function-de-gateway.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/rotear-chamadas-de-modelo-por-uma-function-de-gateway.mdx index a644a553bc..3578d65237 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/rotear-chamadas-de-modelo-por-uma-function-de-gateway.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/inferencia/rotear-chamadas-de-modelo-por-uma-function-de-gateway.mdx @@ -289,7 +289,10 @@ Uma requisição sem o header `Authorization` responde `401`. Uma requisição p O gateway roteia a requisição de cada equipe por alias, faz fallback quando uma rota falha e recusa o que o registro da equipe não permite. Remova o alias `fallback-test` de `ROUTES` e do registro da equipe depois que a verificação de fallback passar. -Estas verificações confirmam o caso de uso [Governar o acesso a múltiplos modelos de IA](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/governar-o-acesso-a-multiplos-modelos-de-ia/). +No caso de uso [Governar o acesso a múltiplos modelos de IA](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/governar-o-acesso-a-multiplos-modelos-de-ia/), espere: + +- **Cada equipe chama só os modelos que o registro dela permite.** Uma requisição para `general` retorna um objeto `chat.completion`, e uma requisição para `long-context`, que `checkout-team` não pode chamar, responde `403`. +- **Uma rota que falha faz fallback.** Uma requisição para `fallback-test` traz `x-gateway-route: provider`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/jwt.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/jwt.mdx index 65c30cef1c..6db71fb42c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/jwt.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/jwt.mdx @@ -235,7 +235,9 @@ O comando imprime `400` ou `401`. A mesma requisição com um header `Authorizat O caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-apis-publicas-contra-abuso/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-apis-publicas-contra-abuso/). +No caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-apis-publicas-contra-abuso/), espere: + +- **As requisições sem um token válido param na Azion.** Uma requisição para `/v1/orders` sem o header `Authorization` responde `400` ou `401`, e a mesma requisição com um token `Bearer` válido chega à API. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/paywall-edge-function-jwt.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/paywall-edge-function-jwt.mdx index 9c3d99339c..e6567f1f30 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/paywall-edge-function-jwt.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/integrations/paywall-edge-function-jwt.mdx @@ -3,7 +3,7 @@ title: Configure um paywall com a função JWT description: >- Valide um JSON Web Token em cada requisição a conteúdo restrito e controle o acesso por assinatura com a função JWT do Azion Marketplace. -meta_tags: 'paywall, jwt, functions, args, rules engine, marketplace' +meta_tags: 'paywall, jwt, functions, firewall, function instance, rules engine, marketplace' namespace: docs_use_case_paywall_edge_function_jwt permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/functions-e-runtime/paywall-function-jwt/ --- @@ -12,7 +12,7 @@ import DocStep from '@aziontech/webkit/doc-step' import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -Um paywall construído com a função JWT tem duas partes: uma instância de função que valida o token e uma regra do Rules Engine que executa a instância no conteúdo que você restringe. A função JWT é uma solução serverless disponível no Azion Marketplace. +Um paywall construído com a função JWT tem duas partes: uma instância de função em um [firewall](/pt-br/documentacao/plataforma/firewall/) que valida o token e uma regra de firewall que executa a instância no conteúdo que você restringe. A função JWT é uma solução serverless disponível no Azion Marketplace e roda em um firewall, não em uma aplicação. A aplicação de origem gera o token e define sua expiração. Ela também determina como o acesso é controlado: @@ -22,31 +22,45 @@ A aplicação de origem gera o token e define sua expiração. Ela também deter O token segue o Bearer Authentication Scheme, o padrão de autenticação HTTP. Cada requisição carrega no cabeçalho um objeto JSON com as informações de autenticação. -A função JWT valida esse token em cada requisição que a aplicação recebe. Ela segue as regras de negócio definidas no token e essas regras se combinam com os critérios que você define no Rules Engine. O resultado determina o comportamento aplicado: a requisição alcança o conteúdo ou vai para a página de login da aplicação de origem. A validação acontece antes de a requisição chegar à origem, então a origem não processa uma requisição não autorizada. +A função JWT valida esse token em cada requisição que o firewall inspeciona. Ela segue as regras de negócio definidas no token e essas regras se combinam com os critérios que você define no Rules Engine do firewall. O resultado determina o comportamento aplicado: a requisição alcança o conteúdo ou vai para a página de login da aplicação de origem. A validação acontece no firewall, antes de a requisição chegar à aplicação ou à origem, então a origem não processa uma requisição não autorizada. --- ## Pré-requisitos -- Uma aplicação. Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). +- Uma aplicação servida por um [workload](/pt-br/documentacao/plataforma/workloads/). Para criar uma, consulte [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). - A função JWT instalada na conta. Para instalar, consulte [Use a integração JWT no Azion Marketplace](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/integracoes/jwt/). +- Um firewall com **Functions** ativado na seção **Modules**, vinculado ao deployment do workload. Para criar um, consulte [Crie o firewall](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/integracoes/jwt/#crie-o-firewall) e, para vinculá-lo, [Vincule um firewall a um workload](/pt-br/documentacao/guias/seguranca-de-aplicacoes/firewall-e-waf/proteja-seu-dominio/#vincule-o-firewall-ao-workload). - A lista de pares de KID e chave secreta que a aplicação de origem usa para assinar o token. --- -## Instancie a função JWT na aplicação +## Instancie a função JWT no firewall -Uma aplicação executa uma função por meio de uma instância de função e a instância carrega os Args passados para o contexto de execução. Para o procedimento completo em Azion Console e na Azion API, consulte [Instancie uma função em uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/). +Um firewall executa uma função por meio de uma instância de função e a instância carrega os argumentos passados para o contexto de execução. Para o procedimento completo em Azion Console e na Azion API, consulte [Instancie uma função em um firewall](/pt-br/documentacao/guias/seguranca-de-aplicacoes/firewall-e-waf/instanciar-functions/). -O formulário da instância mostra o código-fonte da função no campo **Code**. Esse campo é informativo e você não pode alterá-lo. A aba **Args** recebe a lista de pares de KID (key ID) e chave secreta que geram a assinatura do token. - -A aplicação de origem define os pares. Para passá-los para a instância: +O campo **Arguments** recebe a lista de pares de KID (key ID) e chave secreta que geram a assinatura do token. A aplicação de origem define os pares. Para criar a instância: - + + + Acesse [Azion Console](https://console.azion.com/) > **Firewalls**, selecione seu firewall e, em seguida, a aba **Functions Instances**. + + + + + Um firewall que não tem instância mostra a mesma ação como **Function Instance**. A gaveta **Create Instance** se abre. + + + + + Insira um nome para a instância. Por exemplo: `paywall-jwt`. + + + - Insira os pares neste formato: + Em **Arguments**, insira os pares neste formato: ```json [{ @@ -62,20 +76,20 @@ A aplicação de origem define os pares. Para passá-los para a instância: -A instância aparece na aba **Functions Instances** da aplicação. Ela não é executada até que uma regra do Rules Engine a selecione. +A instância aparece na aba **Functions Instances** do firewall. Ela não é executada até que uma regra de firewall a selecione. --- ## Adicione a regra que executa a função -Uma regra define as condições que uma requisição atende para que seus comportamentos sejam executados. Um critério é formado por operador lógico, variável, operador de comparação e string. Um comportamento é formado por operador lógico, ação e função. O comportamento que executa a função vai na **Default Rule** da aplicação ou em uma regra que você criar. Ajuste os critérios aos caminhos que você vende por assinatura e à autenticação que a aplicação de origem já usa. +Uma regra de firewall define as condições que uma requisição atende para que seus comportamentos sejam executados. Um critério é formado por variável, operador de comparação e string. O comportamento que executa a função é o **Run Function**, com a instância que você criou. Ajuste os critérios aos caminhos que você vende por assinatura e à autenticação que a aplicação de origem já usa. -Para colocar o comportamento em uma nova regra: +Para criar a regra: - + - Acesse [Azion Console](https://console.azion.com/) > **Applications** > **sua aplicação**. + Acesse [Azion Console](https://console.azion.com/) > **Firewalls** > **seu firewall**. @@ -85,28 +99,20 @@ Para colocar o comportamento em uma nova regra: Insira um nome para a regra. Por exemplo: `Paywall on news`. - - - - Na seção **Criteria**, selecione a variável `${uri}`. - - - - + - Insira `/news` como string. O critério fica `If ${uri} starts with /news`. + Na seção **Criteria**, selecione `Request Uri`, _starts with_ e insira `/news`. O critério fica `If ${request_uri} starts with /news`. - - + - Selecione a instância que você nomeou ao instanciar a função. + Na seção **Behaviors**, selecione **Run Function** e, em seguida, a instância pelo nome que você deu a ela. -A regra executa a função JWT em toda requisição cuja URI começa com `/news`. Novas regras podem levar alguns minutos para propagar. +O firewall executa a função JWT em toda requisição ao workload cuja URI começa com `/news`. Novas regras podem levar alguns minutos para propagar. :::note[nota] A função retorna um código de status HTTP `400` ou `401` quando o token recebido é inválido. O código depende do erro. @@ -117,8 +123,8 @@ A função retorna um código de status HTTP `400` ou `401` quando o token receb ## Próximos passos - - - + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/azion-starter-kit.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/azion-starter-kit.mdx index acdb6c4934..6bf962f33c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/azion-starter-kit.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/azion-starter-kit.mdx @@ -79,7 +79,7 @@ A application implantada inclui as seguintes regras e configurações: - Para otimização e cache de imagens, as extensões de arquivo que podem ser aprimoradas são `.jpg`, `.jpeg`, `.bmp`, `.ico`, `.gif`, `.png`. - Para conteúdo estático, o template suporta as extensões de arquivo estático comuns. - Além disso, o template: - - Respeita as configurações de cache da origem (ou usa um TTL padrão para cache). + - Respeita as configurações de cache da origem (ou, quando a origem não envia nenhuma, usa o Max Age do cache setting). - Fornece regras que alteram as configurações de cache para arquivos estáticos com base na extensão do arquivo solicitado para melhorar a entrega. Além disso, o firewall aprimora a segurança por meio da network list [IP Tor Exit Nodes da Azion](/pt-br/documentacao/guias/seguranca-de-aplicacoes/bots-e-rede/bloquear-redes-tor/) e do [Bot Manager Lite da Azion](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/integracoes/bot-manager-lite/). diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/dynamic-and-static-file-optimization.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/dynamic-and-static-file-optimization.mdx index 46c8e646ef..b804f0d536 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/dynamic-and-static-file-optimization.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/dynamic-and-static-file-optimization.mdx @@ -69,7 +69,7 @@ A application implantada inclui as seguintes regras e configurações: - Para otimização e cache de imagens, as extensões de arquivo que podem ser aprimoradas com essas configurações são `.jpg`, `.jpeg`, `.bmp`, `.ico`, `.gif`, `.png`. - Para conteúdo estático, o template suporta as extensões de arquivo estático comuns. - Além disso, o template: - - Respeita as configurações de cache da origem (ou usa um TTL padrão para cache). + - Respeita as configurações de cache da origem (ou, quando a origem não envia nenhuma, usa o Max Age do cache setting). - Fornece regras que alteram as configurações de cache para arquivos estáticos com base na extensão do arquivo solicitado para melhorar a entrega. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/edge-application-proxy.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/edge-application-proxy.mdx index 7f1e0a702a..7d696b8563 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/edge-application-proxy.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/edge-application-proxy.mdx @@ -21,7 +21,7 @@ O critério da regra compara a variável `${uri}` com a rota que você informa, - [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) impede que a Azion armazene em cache a resposta da origem, então os cache settings da aplicação não se aplicam à rota. - [Forward Cookies](/pt-br/documentacao/plataforma/applications/rules-engine/#forward-cookies) envia o header `Set-Cookie` da origem para o usuário. -Bypass Cache age sobre o cache da Azion e não sobre a camada do Tiered Cache. Se um cache setting da aplicação ativa Tiered Cache, essa camada ainda armazena em cache os objetos da rota pelo TTL mínimo dela. Para mais informações, consulte [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). +Bypass Cache age sobre o cache da Azion e não sobre a camada do Tiered Cache. Se um cache setting da aplicação ativa Tiered Cache, essa camada ainda armazena em cache os objetos da rota pelo Max Age desse cache setting. Para mais informações, consulte [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). ## Pré-requisitos diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/static-cache.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/static-cache.mdx index 607c18f266..172c97dc7f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/static-cache.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/marketplace/templates/static-cache.mdx @@ -12,7 +12,7 @@ import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import DocButton from '~/components/webkit/DocButton.vue' -O template **Static Cache** implanta uma aplicação que coloca arquivos estáticos em cache, como JavaScript e CSS, pela extensão do arquivo. As suas regras são aplicadas pelo [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/), e elas respeitam as configurações de cache que a origem envia ou aplicam um TTL padrão. As regras cobrem os métodos **GET**, **HEAD** e **OPTIONS**. +O template **Static Cache** implanta uma aplicação que coloca arquivos estáticos em cache, como JavaScript e CSS, pela extensão do arquivo. As suas regras são aplicadas pelo [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/), e elas respeitam as configurações de cache que a origem envia ou, quando a origem não envia nenhuma, aplicam o Max Age do cache setting. As regras cobrem os métodos **GET**, **HEAD** e **OPTIONS**. Você liga o template à sua própria origem, e a implantação cria uma aplicação na [Azion Platform](/pt-br/documentacao/plataforma/applications/), onde cada configuração continua editável. diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/mcp/create-mcp.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/mcp/create-mcp.mdx index 5a1f3625d8..5df57bd9bc 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/mcp/create-mcp.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/mcp/create-mcp.mdx @@ -588,7 +588,10 @@ O servidor expõe duas ferramentas que chamam o serviço de pedidos, e cada tool O caso de uso [Implantar servidores MCP remotos](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/implantar-servidores-mcp-remotos/) usa os valores deste exemplo. -Estas verificações confirmam o caso de uso [Implantar servidores MCP remotos](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/implantar-servidores-mcp-remotos/). +No caso de uso [Implantar servidores MCP remotos](/pt-br/documentacao/casos-de-uso/construir-e-executar-workloads-de-ai/implantar-servidores-mcp-remotos/), espere: + +- **O servidor lista as suas ferramentas.** `tools/list` retorna `get_order` e `list_customer_orders`, cada uma com o input schema que o código declara. +- **Uma tool call retorna só os campos do pedido.** Uma chamada a `get_order` com o ID de um pedido que existe retorna `id`, `status`, `total` e `created_at`, e nenhum outro campo. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/observabilidade/enviar-registros-de-requisicoes-e-waf-a-um-siem.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/observabilidade/enviar-registros-de-requisicoes-e-waf-a-um-siem.mdx index 80d47813d7..b1ddc24104 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/observabilidade/enviar-registros-de-requisicoes-e-waf-a-um-siem.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/observabilidade/enviar-registros-de-requisicoes-e-waf-a-um-siem.mdx @@ -242,7 +242,10 @@ No SIEM, cada linha de log carrega as chaves do template, nomeadas pelas variáv O SIEM recebe uma linha por requisição ao workload, cada uma com os campos do WAF. O SIEM guarda as linhas pelo tempo que você configurar. -Estas verificações confirmam o caso de uso [Preparar aplicações web reguladas para auditorias de segurança](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/preparar-aplicacoes-web-reguladas-para-auditorias-de-seguranca/). +No caso de uso [Preparar aplicações web reguladas para auditorias de segurança](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/preparar-aplicacoes-web-reguladas-para-auditorias-de-seguranca/), espere: + +- **O stream entrega ao SIEM.** Os envios do stream mostram o status `200` em `dataStreamedEvents`. +- **Toda requisição deixa um registro.** O SIEM recebe uma linha por requisição ao workload, com `request_id`, `status`, `waf_score`, `waf_match` e `waf_block`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/streaming/entregar-uma-transmissao-ao-vivo-do-live-ingest.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/streaming/entregar-uma-transmissao-ao-vivo-do-live-ingest.mdx index b807ef1b0b..bc9929c645 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/streaming/entregar-uma-transmissao-ao-vivo-do-live-ingest.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/streaming/entregar-uma-transmissao-ao-vivo-do-live-ingest.mdx @@ -359,8 +359,6 @@ curl -sI -H "Pragma: azion-debug-cache" https://live.example.com/.ts A segunda resposta traz `x-cache: HIT`. Para saber como ler o header, consulte [Verifique o status de cache de uma resposta](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/verificar-tempo-de-cache-da-pagina/). -Estas verificações confirmam o caso de uso [Transmitir eventos ao vivo para grandes audiências](/pt-br/documentacao/casos-de-uso/entregar-midia-e-streaming/transmitir-eventos-ao-vivo-para-grandes-audiencias/). - No caso de uso [Transmitir eventos ao vivo para grandes audiências](/pt-br/documentacao/casos-de-uso/entregar-midia-e-streaming/transmitir-eventos-ao-vivo-para-grandes-audiencias/), espere: - **Os espectadores conseguem reproduzir a transmissão.** Carregue `https://live.example.com/.m3u8` em um player HLS, como a configuração do hls.js em [Boas práticas de Connectors](/pt-br/documentacao/plataforma/connectors/boas-praticas/#de-ao-player-um-fallback-para-erros-de-carregamento). O player inicia a transmissão e continua avançando conforme o encoder a envia. diff --git a/apps/docs/src/content/docs/pt-br/pages/guias/tls-e-certificados/redirecionar-http-para-https.mdx b/apps/docs/src/content/docs/pt-br/pages/guias/tls-e-certificados/redirecionar-http-para-https.mdx index a2823238e1..4c954024b1 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guias/tls-e-certificados/redirecionar-http-para-https.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guias/tls-e-certificados/redirecionar-http-para-https.mdx @@ -294,7 +294,9 @@ curl -s -o /dev/null -w '%{redirect_url}\n' http://www.example.com/ O comando imprime `https://www.example.com/`. -Estas verificações confirmam o caso de uso [Preparar aplicações web reguladas para auditorias de segurança](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/preparar-aplicacoes-web-reguladas-para-auditorias-de-seguranca/). +No caso de uso [Preparar aplicações web reguladas para auditorias de segurança](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/preparar-aplicacoes-web-reguladas-para-auditorias-de-seguranca/), espere: + +- **O HTTP sem criptografia nunca serve conteúdo.** Uma requisição para `http://www.example.com/` redireciona para `https://www.example.com/`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/guides/mcp/troubleshoot-deployments.mdx b/apps/docs/src/content/docs/pt-br/pages/guides/mcp/troubleshoot-deployments.mdx index 9bbe47f920..8c9874da66 100644 --- a/apps/docs/src/content/docs/pt-br/pages/guides/mcp/troubleshoot-deployments.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/guides/mcp/troubleshoot-deployments.mdx @@ -109,5 +109,5 @@ Você aplica as regras e as alterações de cache na sua aplicação, ou pede a - + diff --git a/apps/docs/src/content/docs/pt-br/pages/hubs/guias/applications.mdx b/apps/docs/src/content/docs/pt-br/pages/hubs/guias/applications.mdx index 23f4086da1..1bfc97fc39 100644 --- a/apps/docs/src/content/docs/pt-br/pages/hubs/guias/applications.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/hubs/guias/applications.mdx @@ -1,10 +1,10 @@ --- title: Guias e tutoriais de Applications -description: Todos os guias e tutoriais de Applications, cada um cobrindo uma tarefa. +description: Todos os guias e tutoriais de Applications e dos recursos da plataforma aninhados nele. meta_tags: 'applications, guias, tutoriais' namespace: documentation_products_applications_guides permalink: /documentacao/plataforma/applications/guias/ guides_hub: applications --- -Todos os guias e tutoriais de Applications, cada um cobrindo uma tarefa. Abra um deles e você vai para a seção Guias, onde todos os guias ficam. +Cada guia abre na seção Guias, onde todos os guias ficam. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/cache-settings.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/cache-settings.mdx index 390e77226e..278edd68de 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/cache-settings.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/cache-settings.mdx @@ -12,53 +12,55 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Um cache setting é um objeto em uma aplicação que diz ao [Cache](/pt-br/documentacao/plataforma/applications/cache/) como armazenar e entregar uma resposta. Ele carrega o TTL de browser, o TTL e o comportamento de cache, o stale cache, o Large File Optimization, o [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) e as regras de variação de cache. Uma regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) com o behavior [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) aplica o cache setting às requisições que ela casa. Enquanto nenhuma regra o nomear, um cache setting não faz nada. Para criar um, consulte [Crie um cache setting](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/ajustar-cache-settings/). +Um cache setting é um conjunto de valores que dizem ao [Cache](/pt-br/documentacao/plataforma/applications/cache/) como armazenar e entregar uma resposta. Ele pertence a uma Application, e os seus valores são o tempo de vida (TTL) de browser, o TTL e o comportamento de cache, o stale cache, a Large File Optimization, [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) e as variações de cache. Uma regra do [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) com o behavior [Set Cache Policy](/pt-br/documentacao/plataforma/applications/rules-engine/#set-cache-policy) aplica o cache setting, e ele age apenas sobre as requisições às quais essa regra corresponde. Para criar um, consulte [Crie um cache setting](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/ajustar-cache-settings/). --- ## Interfaces -Seis interfaces escrevem o mesmo objeto. As tabelas desta página nomeiam o controle do Console, o campo da API e a flag da CLI de cada campo. +Seis interfaces criam e alteram o mesmo cache setting. As tabelas desta página nomeiam o controle do Console, o campo da API e a flag da CLI de cada campo. | Interface | Criar | Ler, atualizar, excluir | | --- | --- | --- | -| [Azion Console](https://console.azion.com/) | A aba **Cache Settings** de uma aplicação em [Applications](/pt-br/documentacao/plataforma/applications/) e, em seguida, **+ Cache**, que abre o drawer **Create Cache Settings** | A mesma aba lista cada setting com seu **Name**, **ID**, **Browser Cache** e **Cache** | -| [Azion API v4](/pt-br/documentacao/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `GET`, `PATCH` e `DELETE /v4/workspace/applications/{application_id}/cache_settings/{cache_setting_id}`; `GET /v4/workspace/applications/{application_id}/cache_settings` lista todos | -| Azion CLI | [`azion create cache-setting`](/pt-br/documentacao/devtools/cli/recursos/) | [`azion describe cache-setting`](/pt-br/documentacao/devtools/cli/recursos/), [`azion list cache-setting`](/pt-br/documentacao/devtools/cli/recursos/), [`azion update cache-setting`](/pt-br/documentacao/devtools/cli/recursos/), [`azion delete cache-setting`](/pt-br/documentacao/devtools/cli/recursos/) | -| `azion.config.js` | Uma entrada do array `cache`, do tipo `AzionCache` | A mesma entrada | +| [Azion Console](https://console.azion.com/) | A aba **Cache Settings** de uma Application em [Applications](/pt-br/documentacao/plataforma/applications/) e, em seguida, **+ Cache**, que abre o drawer **Create Cache Settings** | A mesma aba lista cada setting com seu **Name**, **Browser Cache** e **Cache** | +| [Azion API v4](/pt-br/documentacao/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `GET`, `PUT`, `PATCH` e `DELETE /v4/workspace/applications/{application_id}/cache_settings/{cache_setting_id}`; `GET /v4/workspace/applications/{application_id}/cache_settings` lista todos | +| Azion CLI | [`azion create cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/) | [`azion describe cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/), [`azion list cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/), [`azion update cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/), [`azion delete cache-setting`](/pt-br/documentacao/devtools/cli/recursos/cache-setting/) | +| `azion.config.js` | Uma entrada do array `cache` de uma Application, do tipo `AzionCache` | A mesma entrada | | [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) | `createCacheSetting`, de `azion/applications` | `getCacheSetting`, `getCacheSettings`, `updateCacheSetting` e `deleteCacheSetting`, de `azion/applications` | | [Terraform](/pt-br/documentacao/devtools/terraform/applications/) | O recurso `azion_application_cache_setting`, cuja página documenta `application_id` e `name` | O mesmo recurso | -A API autentica com um personal token no header `Authorization: Token `. Para mais informações, consulte [Personal tokens](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/). Uma entrada `AzionCache` carrega `name`, `stale`, `queryStringSort`, `tieredCache`, `methods`, `browser.maxAgeSeconds`, `edge.maxAgeSeconds`, `cacheByCookie` e `cacheByQueryString`. +O `PUT` substitui o cache setting inteiro, e o `PATCH` altera apenas os campos que envia. O endpoint de listagem filtra por `id` e `name` e pagina com `page` e `page_size`. A API autentica com um personal token no header `Authorization: Token `. Para mais informações, consulte [Personal tokens](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/). + +No `azion.config.js`, uma entrada `AzionCache` carrega `name`, `stale`, `queryStringSort`, `tieredCache`, `methods`, `browser.maxAgeSeconds`, `edge.maxAgeSeconds`, `cacheByCookie` e `cacheByQueryString`. --- -## Geral +## General -A seção **General** do drawer carrega o nome. A API exige `name` e nada mais. +No Azion Console, a seção **General** do drawer **Create Cache Settings** carrega o nome. O `name` é o único campo que a API exige. | Controle do Console | Campo da API | Tipo | Valores | Padrão | Flag da CLI | | --- | --- | --- | --- | --- | --- | -| **Name** | `name` | string | 1 a 250 caracteres | obrigatório, sem padrão | `--name` | +| **Name** | `name` | string | 1 a 250 caracteres, único entre os cache settings da Application | obrigatório, sem padrão | `--name` | --- ## Browser Cache -A seção **Browser Cache** define o que o browser recebe instrução de guardar, pelo objeto `browser_cache`. +O objeto `browser_cache` define o que o browser é instruído a guardar. No Azion Console, os seus controles ficam na seção **Browser Cache**. | Controle do Console | Campo da API | Tipo | Valores | Padrão | Flag da CLI | | --- | --- | --- | --- | --- | --- | | Radios de **Browser Cache** | `browser_cache.behavior` | enum | _Honor cache policies_ (`honor`), _Override cache settings_ (`override`), _No cache_ (`no-cache`) | `honor` | `--browser-cache-behavior` | -| O campo de TTL sob _Override cache settings_ | `browser_cache.max_age` | integer, segundos | 0 a 31.536.000 | `0` | `--browser-cache-max-age` | +| **Max Age** sob _Override cache settings_ | `browser_cache.max_age` | integer, segundos | 0 a 31.536.000 | `0` | `--browser-cache-max-age` | -_Honor cache policies_ mantém os headers `Cache-Control` e `Expires` enviados pela origem e os repassa ao browser. _Override cache settings_ substitui esses headers pelo TTL em `browser_cache.max_age`. Para _No cache_, o Console diz: "Disable browser caching to ensure content is always fetched directly from the server". No `azion update cache-setting`, a flag de `browser_cache.behavior` é `--browser-cache-settings`. +`honor` mantém os headers `Cache-Control` e `Expires` enviados pela origem e os repassa ao browser. `override` substitui esses headers pelo TTL em `browser_cache.max_age`. Para `no-cache`, a opção _No cache_ do Azion Console diz: "Disable browser caching to ensure content is always fetched directly from the server". No `azion update cache-setting`, a flag de `browser_cache.behavior` é `--browser-cache-settings`. --- ## Cache -A seção **Cache** define por quanto tempo a Azion mantém a cópia e o que faz com ela, pelo objeto `modules.cache`. +O objeto `modules.cache` define por quanto tempo a Azion mantém uma cópia de uma resposta e o que faz com essa cópia. No Azion Console, os seus controles ficam na seção **Cache**. | Controle do Console | Campo da API | Tipo | Valores | Padrão | Flag da CLI | | --- | --- | --- | --- | --- | --- | @@ -67,37 +69,43 @@ A seção **Cache** define por quanto tempo a Azion mantém a cópia e o que faz | **Stale cache** | `modules.cache.stale_cache.enabled` | boolean | `true`, `false` | `false` (API, CLI); ativado no Console | apenas `--file` | | **Large file optimization** | `modules.cache.large_file_cache.enabled` | boolean | `true`, `false` | `false` (API, CLI); desativado no Console | apenas `--file` | | **Offset (KB)** | `modules.cache.large_file_cache.offset` | integer, kB | `1024`, fixo | `1024` | apenas `--file` | -| **Tiered Cache** | `modules.cache.tiered_cache.enabled` | boolean | `true`, `false` | `false` quando nenhum objeto `tiered_cache` é enviado; `true` dentro de um objeto `tiered_cache` que o omite; desativado no Console | `--tiered-caching-enabled` sozinho falha com o erro `21001`; use `--file` | -| **Tiered Cache Region** | `modules.cache.tiered_cache.topology` | enum | Como `nearest-region` ou `us-east-1` | nenhum | apenas `--file` | +| **Tiered Cache** | `modules.cache.tiered_cache.enabled` | boolean | `true`, `false` | `false` (API); desativado no Console | `--tiered-caching-enabled` sozinho falha com o erro `21001`; use `--file` | +| **Tiered Cache Region** | `modules.cache.tiered_cache.topology` | enum | Como `nearest-region` ou `us-east-1` | `nearest-region` (API); `nearest-region`, pré-selecionado no Console | apenas `--file` | + +`honor` mantém os headers `Cache-Control` e `Expires` enviados pela origem, e `override` os substitui pelo TTL em `modules.cache.max_age`. Quando a origem não envia nem `Cache-Control` nem `Expires`, `honor` mantém a cópia pelo Max Age do cache setting, `modules.cache.max_age`. -_Honor cache policies_ mantém os headers `Cache-Control` e `Expires` enviados pela origem; _Override cache behavior_ os substitui por **Max Age**. **Stale cache** permite que a Azion entregue uma cópia expirada quando a origem falha. **Large file optimization** armazena um objeto grande em fragmentos de 1.024 kB. **Tiered Cache** adiciona uma segunda camada de cache entre o cache da Azion e a origem. Para saber como cada um se comporta em uma requisição, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). +O stale cache, o campo `stale_cache.enabled`, permite que a Azion entregue uma cópia expirada por uma janela limitada quando a origem não responde. A Large File Optimization, o campo `large_file_cache.enabled`, armazena um objeto grande em fragmentos, e `large_file_cache.offset` carrega o tamanho deles, fixo em 1.024 kB. Tiered Cache é uma feature de Cache que adiciona uma segunda camada de cache entre o data center que responde a uma requisição e a sua origem. O `tiered_cache.enabled` a ativa para os objetos que esse cache setting coloca em cache, e o `tiered_cache.topology` seleciona onde essa camada os mantém. Um objeto `tiered_cache` enviado sem `enabled` ativa a camada. Para saber como cada um se comporta em uma requisição, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). :::note[nota] -Duas restrições se aplicam a esses valores. Um **Max Age** abaixo de 60 segundos exige o módulo [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) na aplicação; sem ele, a API rejeita o cache setting com o erro `21021`. O Tiered Cache exige _Override cache behavior_; com `honor`, a API rejeita o cache setting com o erro `21001`. +Duas restrições se aplicam a esses valores. Um `modules.cache.max_age` abaixo de 60 segundos exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) na Application; sem ele, a API recusa o cache setting com o erro `21021`. No Azion Console, o campo **Max Age** informa um mínimo de 3 segundos assim que **Large file optimization** é ativado; sem Application Accelerator, a API continua recusando um valor abaixo de 60 segundos com o erro `21021`. Tiered Cache exige `override` em `modules.cache.behavior`; com `honor`, a API recusa o cache setting com o erro `21001`. No Azion Console, ativar **Large file optimization** ou **Tiered Cache** desabilita a opção _Honor cache policies_ e seleciona _Override cache behavior_, mas a API aceita `honor` com a Large File Optimization. ::: --- ## Application Accelerator -Os quatro controles **Cache vary by** da seção **Application Accelerator** escrevem o objeto `modules.application_accelerator`. Cada campo dele exige o módulo [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) na aplicação, ou a API retorna o erro `21013`. Os campos de query string e de cookie configuram a **Advanced Cache Key**; os campos de dispositivo usam os grupos definidos em [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/). Para saber o que cada behavior faz com a cache key, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/). +O objeto `modules.application_accelerator` guarda as variações de cache de um cache setting. No Azion Console, os seus quatro controles **Cache vary by** ficam na seção **Application Accelerator**, que o drawer **Create Cache Settings** mostra apenas enquanto [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) está ativo na Application. Enquanto Application Accelerator está desativado, a API recusa com o erro `21013` qualquer variação nesse objeto: um `behavior` diferente de `ignore`, ou um método em `cache_vary_by_method`. Um objeto que mantém esses padrões é aceito, mesmo com `sort_enabled` igual a `true`. + +Juntos, os campos de `modules.application_accelerator` configuram Advanced Cache Key, uma feature de Application Accelerator. O `cache_vary_by_devices` usa os device groups definidos em [Device Groups](/pt-br/documentacao/plataforma/applications/device-groups/). Para saber o que cada behavior faz com a cache key, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/). | Controle do Console | Campo da API | Tipo | Valores | Padrão | Flag da CLI | | --- | --- | --- | --- | --- | --- | -| **Cache vary by Method** > **POST**, **OPTIONS** | `cache_vary_by_method` | array de enum, no máximo 2 valores | `post`, `options` | `[]` | Na criação, `--enable-caching-for-options` para `options` e `--file` para `post`. Na atualização, `--enable-caching-for-options` e `--enable-caching-for-post`; uma chamada que passa uma delas remove o outro método, então passe as duas para manter os dois | +| **Cache vary by Method** > **POST**, **OPTIONS** | `cache_vary_by_method` | array de enum, no máximo 2 valores | `post`, `options` | `[]` | Na criação, `--enable-caching-for-options` e `--file`. Na atualização, `--enable-caching-for-options` e `--enable-caching-for-post` | | **Cache vary by Query String** > **Behavior** | `cache_vary_by_querystring.behavior` | enum | _Ignore_ (`ignore`), _All_ (`all`), _Allowlist_ (`allowlist`), _Denylist_ (`denylist`) | `ignore` | `--cache-by-query-string` | -| A lista de campos sob **Cache vary by Query String** | `cache_vary_by_querystring.fields` | array de string | nomes de argumentos de query string | `[]` | `--query-string-fields` | +| **Cache vary by Query String** > **Fields** | `cache_vary_by_querystring.fields` | array de string | nomes de argumentos de query string | `[]` | `--query-string-fields` | | **Cache vary by Query String** > **Sort** | `cache_vary_by_querystring.sort_enabled` | boolean | `true`, `false` | `false` | Na criação, apenas `--file`. Na atualização, `--enable-caching-string-sort` | | **Cache vary by Cookies** > **Behavior** | `cache_vary_by_cookies.behavior` | enum | _Ignore_ (`ignore`), _All_ (`all`), _Allowlist_ (`allowlist`), _Denylist_ (`denylist`) | `ignore` | `--cache-by-cookies` | -| A lista de cookies sob **Cache vary by Cookies** | `cache_vary_by_cookies.cookie_names` | array de string | nomes de cookies | `[]` | `--cookie-names` | +| **Cache vary by Cookies** > **Fields** | `cache_vary_by_cookies.cookie_names` | array de string | nomes de cookies | `[]` | `--cookie-names` | | **Cache vary by Devices** > **Behavior** | `cache_vary_by_devices.behavior` | enum | _Ignore_ (`ignore`), _Allowlist_ (`allowlist`) | `ignore` | apenas `--file` | -| A lista de device groups sob **Cache vary by Devices** | `cache_vary_by_devices.device_group` | array de integer | ids de device group | `[]` | apenas `--file` | +| **Cache vary by Devices** > **Device Group** | `cache_vary_by_devices.device_group` | array de integer | ids de device group | `[]` | apenas `--file` | -_Ignore_ não varia a key por nenhum dos valores, e _All_ varia por todos os valores que chegam. _Allowlist_ varia pelos valores nomeados, e _Denylist_ por todos os valores exceto os nomeados. _Allowlist_ e _Denylist_ na query string exigem pelo menos um campo, ou a API retorna o erro `21018`. Para os passos no Console que configuram esses controles, consulte [Configure a Advanced Cache Key para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/advanced-cache-key/). +No `azion create cache-setting`, a `--enable-caching-for-options` escreve `options` qualquer que seja o seu valor, e `post` exige `--file`. No `azion update cache-setting`, uma chamada que passa uma flag de método remove o outro método, então passe as duas flags para manter os dois. + +`ignore` mantém a mesma key, quaisquer que sejam os valores, e `all` varia a key por todos os valores que chegam. `allowlist` varia a key pelos valores nomeados, e `denylist` varia a key por todos os valores exceto os nomeados. `fields`, `cookie_names` e `device_group` carregam os valores nomeados. `sort_enabled` agrupa os mesmos argumentos sob uma key, em qualquer ordem que cheguem. `allowlist` e `denylist` na query string exigem pelo menos um campo, ou a API retorna o erro `21018`. Para os passos no Azion Console que configuram esses controles, consulte [Configure a Advanced Cache Key para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/advanced-cache-key/). --- -## Corpo da requisição +## Corpo da requisição e comando da CLI O corpo abaixo cria um cache setting completo pelo `POST /v4/workspace/applications/{application_id}/cache_settings`: @@ -117,13 +125,13 @@ O corpo abaixo cria um cache setting completo pelo `POST /v4/workspace/applicati } ``` -A API responde com HTTP `201`, `state` igual a `executed` e o novo objeto com seu `id` em `data`: +A API responde com HTTP `201`, `state` igual a `executed` e o novo cache setting com o seu `id` em `data`: ```json {"state":"executed","data":{"id":123456,"name":"static-assets",...,"created_at":"2026-01-01T12:00:00.577248Z"}} ``` -O endpoint de listagem envolve os settings de uma aplicação em um envelope de página: +O endpoint de listagem envolve os cache settings de uma Application em um envelope de página: ```json {"count":2,"total_pages":1,"page":1,"page_size":10,"next":null,"previous":null,"results":[...]} @@ -149,25 +157,28 @@ O comando imprime o id do novo cache setting: Created Cache Settings configuration with ID 123457 ``` -As flags cobrem o browser cache, a variação por query string e por cookie e o cache de `OPTIONS`. Cada um dos outros campos, incluindo **Max Age**, o comportamento de cache, o stale cache, o Large File Optimization e o Tiered Cache, é definido pelo `--file` com o corpo JSON. +No `azion create cache-setting`, as flags cobrem o browser cache, a variação por query string e por cookie e o cache de `OPTIONS`, e o `azion update cache-setting` também define `sort_enabled` e o cache de `POST`. Cada um dos outros campos é definido pelo `--file` com o corpo JSON: `modules.cache.max_age`, o comportamento de cache, o stale cache, a Large File Optimization e Tiered Cache. --- ## Erros -A API responde cada requisição abaixo com HTTP `400`. O corpo carrega o código e o título, e um erro de campo também aponta o campo. +A API responde cada requisição abaixo com HTTP `400`. O corpo carrega o código, o título e um detalhe, e um erro de campo também aponta o campo. + +| Código | Título | Causa | Detalhe | O que fazer | +| --- | --- | --- | --- | --- | +| `21021` | `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module` | `modules.cache.max_age` está abaixo de 60 em uma Application sem Application Accelerator. | `The value is lower than the minimum required when the Application's Application Accelerator Module is disabled.`, em `/data/modules/cache/max_age`, com `meta.min_value` igual a `60` | Defina `modules.cache.max_age` como 60 ou mais, ou ative Application Accelerator na Application. | +| `21020` | `Edge Cache Max Age Lower Than The Minimum Allowed By The Tiered Cache Module` | `modules.cache.max_age` está abaixo de 3, com `tiered_cache.enabled` igual a `true` e Application Accelerator ativo. | `The value is lower than the minimum required by the Tiered Cache Module.`, em `/data/modules/cache/max_age`, com `meta.min_value` igual a `3` | Defina `modules.cache.max_age` como 3 ou mais, ou desative Tiered Cache. | +| `21001` | `It's Not Possible To Use This Edge Cache Behavior.` | `tiered_cache.enabled` é `true` enquanto `modules.cache.behavior` é `honor`. | `It's not possible to use this edge cache behavior while using Tiered Cache.`, em `/data/modules/cache/behavior` | Defina `modules.cache.behavior` como `override`; pela CLI, envie o corpo com `--file`. | +| `21013` | `This Configuration Requires The Edge Application's Application Accelerator Module` | Um campo de `modules.application_accelerator` varia o cache, com um `behavior` diferente de `ignore` ou um método em `cache_vary_by_method`, em uma Application sem Application Accelerator. | `To use this value, you must first enable the Application Accelerator module in Edge Application's Main Settings.`, no campo, como `/data/modules/application_accelerator/cache_vary_by_method` | Defina `modules.application_accelerator.enabled` como `true` na Application, ou remova o campo. [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/) mostra onde no Azion Console. | +| `21018` | `Query String Fields Are Required For Current Cache Vary By Query String Behavior` | `cache_vary_by_querystring.behavior` é `allowlist` ou `denylist`, e `fields` está vazio. | `The current behavior requires you to configure query string fields.`, em `/data/modules/application_accelerator/cache_vary_by_querystring/fields` | Liste pelo menos um campo, ou defina o behavior como `ignore` ou `all`. | +| `21014` | `Cannot Delete Cache Setting` | Um `DELETE` atinge um cache setting que o behavior _Set Cache Policy_ de uma regra ainda usa. | `This Cache Setting cannot be deleted because it is being used.`, em `/data` | Altere ou exclua essa regra e repita o `DELETE`. | +| `10068` | `Max Value` | `modules.cache.max_age` ou `browser_cache.max_age` está acima de 31.536.000, ou `large_file_cache.offset` está acima de 1.024. | `Ensure this value is less than or equal to 31536000.`; para o offset, `Ensure this value is less than or equal to 1024.` | Reduza o valor até o limite que o detalhe nomeia. | +| `10046` | `Max Length` | `name` tem mais de 250 caracteres. | `Ensure this field has no more than 250 characters.` | Reduza o nome para 250 caracteres ou menos. | +| `10039` | `Invalid Choice` | `tiered_cache.topology` não é uma topologia que a API aceita. | `"" is not a valid choice.`, em `/data/modules/cache/tiered_cache/topology` | Envie uma topologia que a [referência da Azion API](https://api.azion.com/) lista, como `nearest-region` ou `us-east-1`. | +| `10012` | `Unique Field` | `name` repete o nome de outro cache setting da mesma Application. | `This field must be unique.`, em `/data/name` | Escolha um nome que nenhum outro cache setting da Application use. | -| Código | Título | Causa | O que fazer | -| --- | --- | --- | --- | -| `21021` | `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module` | `modules.cache.max_age` está abaixo de 60 em uma aplicação sem o Application Accelerator; `meta.min_value` é `60`, e o detalhe diz `The value is lower than the minimum required when the Application's Application Accelerator Module is disabled.` e aponta `/data/modules/cache/max_age`. | Defina **Max Age** como 60 ou mais, ou ative o Application Accelerator na aplicação. | -| `21020` | `Edge Cache Max Age Lower Than The Minimum Allowed By The Tiered Cache Module` | `modules.cache.max_age` está abaixo de 3 com `tiered_cache.enabled` igual a `true`; `meta.min_value` é `3`, e o detalhe diz `The value is lower than the minimum required by the Tiered Cache Module.` e aponta `/data/modules/cache/max_age`. | Defina **Max Age** como 3 ou mais, ou desative o Tiered Cache. | -| `21001` | `It's Not Possible To Use This Edge Cache Behavior.` | `tiered_cache.enabled` é `true` enquanto `modules.cache.behavior` é `honor`; o detalhe diz `It's not possible to use this edge cache behavior while using Tiered Cache.` e aponta `/data/modules/cache/behavior`. O `azion create cache-setting --tiered-caching-enabled true` envia essa combinação, porque nenhuma flag define o comportamento. | Defina `modules.cache.behavior` como `override`; pela CLI, envie o corpo com `--file`. | -| `21013` | `This Configuration Requires The Edge Application's Application Accelerator Module` | Um campo de `modules.application_accelerator` é enviado para uma aplicação sem o módulo; o detalhe diz `To use this value, you must first enable the Application Accelerator module in Edge Application's Main Settings.` e aponta o campo, como `/data/modules/application_accelerator/cache_vary_by_method`. | Ative o **Application Accelerator** em **Main Settings** > **Modules**, ou remova o campo. | -| `21018` | `Query String Fields Are Required For Current Cache Vary By Query String Behavior` | `cache_vary_by_querystring.behavior` é `allowlist` ou `denylist` e `fields` está vazio; o detalhe diz `The current behavior requires you to configure query string fields.` e aponta `/data/modules/application_accelerator/cache_vary_by_querystring/fields`. | Liste pelo menos um campo, ou defina o behavior como `ignore` ou `all`. | -| `21014` | `Cannot Delete Cache Setting` | Um `DELETE` atinge um cache setting que o behavior **Set Cache Policy** de uma regra ainda nomeia; o detalhe diz `This Cache Setting cannot be deleted because it is being used.` e aponta `/data`. | Altere ou exclua essa regra e repita o `DELETE`. | -| `10068` | `Max Value` | `modules.cache.max_age` ou `browser_cache.max_age` está acima de 31.536.000, com o detalhe `Ensure this value is less than or equal to 31536000.`; ou `large_file_cache.offset` está acima de 1.024, com o detalhe `Ensure this value is less than or equal to 1024.` | Reduza o valor até o limite que o detalhe nomeia. | -| `10046` | `Max Length` | `name` tem mais de 250 caracteres; o detalhe diz `Ensure this field has no more than 250 characters.` | Reduza o nome para 250 caracteres ou menos. | -| `10039` | `Invalid Choice` | `tiered_cache.topology` não é uma topologia que a API aceita. | Envie uma topologia como `nearest-region` ou `us-east-1`. | +O `azion create cache-setting --tiered-caching-enabled true` retorna `21001`, porque a CLI só define o comportamento de cache pelo `--file`, então o cache setting mantém o padrão `honor`. --- @@ -179,13 +190,12 @@ Os limites abaixo se aplicam a um cache setting. Cada linha nomeia a resposta da | --- | --- | --- | | `name` | 1 a 250 caracteres | HTTP `400`, erro `10046` | | `modules.cache.max_age` | 0 a 31.536.000 segundos | HTTP `400`, erro `10068` acima do máximo | -| `modules.cache.max_age` sem o Application Accelerator | pelo menos 60 segundos | HTTP `400`, erro `21021` | -| `modules.cache.max_age` com o Tiered Cache ativo | pelo menos 3 segundos | HTTP `400`, erro `21020` | +| `modules.cache.max_age` sem Application Accelerator | pelo menos 60 segundos | HTTP `400`, erro `21021` | +| `modules.cache.max_age` com Tiered Cache e Application Accelerator ativos | pelo menos 3 segundos | HTTP `400`, erro `21020` | | `browser_cache.max_age` | 0 a 31.536.000 segundos | HTTP `400`, erro `10068` | -| `cache_vary_by_method` | no máximo 2 valores | A especificação limita o array a 2 itens; nenhuma string de erro é documentada | -| `large_file_cache.offset` | 1.024 kB, fixo | HTTP `400`, erro `10068` acima de 1.024. Para alterar o tamanho do fragmento, entre em contato com o time de Vendas | +| `large_file_cache.offset` | 1.024 kB, fixo | HTTP `400`, erro `10068` acima de 1.024 | -Para os limites de purge e as quantidades incluídas em cada plano, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache). +O `cache_vary_by_method` aceita no máximo 2 valores. A API aceita apenas 1.024 em `large_file_cache.offset`. Para alterar o tamanho do fragmento, entre em contato com o [time de Vendas](https://www.azion.com/pt-br/contato/). Para o tamanho de um objeto em cache e os limites de purge, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache). --- @@ -194,7 +204,7 @@ Para os limites de purge e as quantidades incluídas em cada plano, consulte [Li Os passos no Console, na API e na CLI que criam um cache setting e o aplicam com uma regra. - O que o TTL, o stale cache, o Large File Optimization e o Tiered Cache fazem em uma requisição. + O que o TTL, o stale cache, a Large File Optimization e Tiered Cache fazem em uma requisição. A key a que cada variação destas tabelas é acrescentada, e os headers de debug que a mostram. Os passos no Console que definem um TTL para um path e ignoram o cache em outro. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/device-groups.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/device-groups.mdx index b1cc205318..b2195dfc35 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/device-groups.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/device-groups.mdx @@ -10,19 +10,30 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Um device group é um nome e uma expressão regular que uma [aplicação](/pt-br/documentacao/plataforma/applications/) compara com o header `User-Agent` de cada requisição. Uma requisição cujo header corresponde à expressão pertence ao grupo, então uma [regra](/pt-br/documentacao/plataforma/applications/rules-engine/) ou um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) pode tratar esses dispositivos de forma separada do restante. Cada aplicação tem os seus próprios device groups, e Azion Console os lista na aba **Device Groups** da aplicação. +Device Groups é uma feature de Applications que agrupa as requisições recebidas por uma [Application](/pt-br/documentacao/plataforma/applications/) de acordo com o dispositivo do cliente. Um device group é um nome e uma expressão regular que a Application compara com o header `User-Agent` de cada requisição. Uma requisição pertence ao grupo quando o header dela corresponde à expressão. Os device groups exigem [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) ativado na Application. Uma [regra](/pt-br/documentacao/plataforma/applications/rules-engine/) ou um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) pode, então, tratar esses dispositivos de forma separada do restante. Cada Application tem os seus próprios device groups, e [Crie device groups](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/criar-device-groups/) mostra como adicionar um no Azion Console. --- ## Campos do device group -Um device group carrega dois campos que você define e um ID que a plataforma atribui. Uma regra se refere a um device group pelo nome, e um cache setting se refere a ele pelo ID. +Um device group carrega dois campos que você define, e um ID e uma data de criação que a plataforma atribui. Uma regra se refere a um device group pelo nome, e um cache setting se refere a ele pelo ID. Para os dois campos que você define, a coluna Campo traz o rótulo que o Azion Console mostra. -| Campo | Tipo | Descrição | -| --- | --- | --- | -| **Name** | string | O nome do grupo. Uma regra compara `${device_group}` com esse nome, e a cache key de uma cópia que varia por dispositivo termina com ele. Azion Console mostra `Name must be alphanumeric` para um nome com outros caracteres | -| **Regular Expression** | string | A expressão comparada com o conteúdo do header `User-Agent`, na seção **Match to User-Agent** do formulário. Ela segue o padrão PCRE. Azion Console mostra `Enter a valid regular expression pattern.` para uma expressão que não consegue ler, e `User Agent cannot contain emojis or null bytes` para uma expressão que carrega um dos dois | -| ID | integer | O identificador do grupo. O campo `cache_vary_by_devices.device_group` de um cache setting lista os device groups por esse ID | +| Campo | Campo da API | Tipo | Limites na API | Descrição | +| --- | --- | --- | --- | --- | +| **Name** | `name` | string | De 1 a 250 caracteres, somente letras e números | O nome do grupo. Uma regra compara `${device_group}` com esse nome | +| **Regular Expression**, em **Match to User-Agent** | `user_agent` | string | De 1 a 512 caracteres | A expressão comparada com o conteúdo do header `User-Agent` | +| ID | `id` | integer | Somente leitura | O identificador do grupo | +| Data de criação | `created_at` | date-time | Somente leitura | Quando o grupo foi criado | + +A cache key de uma cópia que varia por dispositivo termina com o nome do grupo. O nome aceita somente letras e números, sem espaços nem símbolos, e a API recusa outro nome com HTTP `400` e o erro `27003`, `Device Group Invalid Name`. No Azion Console, o campo **Name** informa `Use only letters and numbers, without spaces or symbols.` Azion Console mostra `Name must be alphanumeric` para um nome com outros caracteres. + +A expressão regular segue as Perl Compatible Regular Expressions (PCRE). Azion Console mostra estas mensagens para uma expressão que ele recusa: + +- `Enter a valid regular expression pattern.` para uma expressão que ele não consegue ler. +- `User Agent cannot contain emojis or null bytes` para uma expressão que carrega um dos dois. +- `User Agent cannot contain < > " or '` para uma expressão que carrega um desses caracteres. + +O campo `cache_vary_by_devices.device_group` de um cache setting lista os device groups pelo ID. --- @@ -48,7 +59,7 @@ User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Fir ## Correspondência com o User-Agent -Uma aplicação compara a **Regular Expression** de um device group com o conteúdo do header `User-Agent`, e uma requisição pertence ao grupo quando a expressão corresponde. A expressão não precisa corresponder ao header inteiro, porque uma correspondência com parte dele basta. Por exemplo, um grupo chamado `Mobile` com esta expressão corresponde aos headers da maioria dos dispositivos móveis: +Uma Application compara a expressão regular de cada device group com o header `User-Agent`. Uma requisição pertence a um grupo quando a expressão corresponde. A expressão não precisa corresponder ao header inteiro, porque uma correspondência com parte dele basta. Por exemplo, um grupo chamado `Mobile` com esta expressão corresponde aos headers da maioria dos dispositivos móveis: ```text (Mobile|iP(hone|od)|BlackBerry|IEMobile) @@ -56,7 +67,7 @@ Uma aplicação compara a **Regular Expression** de um device group com o conte ### Ordem de correspondência -Quando um header `User-Agent` corresponde a mais de um device group, a requisição recebe o primeiro grupo que corresponde, do primeiro ao último na lista de device groups. A posição das palavras que correspondem dentro do header não muda o resultado. Por exemplo, uma aplicação tem estes três device groups, nesta ordem: +Quando um header `User-Agent` corresponde a mais de um device group, a requisição recebe o primeiro grupo que corresponde, do primeiro ao último na lista de device groups. A posição das palavras que correspondem dentro do header não muda o resultado. Por exemplo, uma Application tem estes três device groups, nesta ordem: | Ordem | Device group | Expressão regular | | --- | --- | --- | @@ -70,7 +81,7 @@ Um header que contém `Android Tablet Mobile (Mozilla Firefox)` corresponde às ## Variável do Rules Engine -No Rules Engine para Applications, a variável `${device_group}` contém o nome do device group ao qual a requisição pertence. Um critério a compara com o nome de um grupo, usado como argumento, então os behaviors da regra se aplicam somente às requisições desse grupo. A variável exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) na aplicação. +No Rules Engine para Applications, a variável `${device_group}` contém o nome do device group ao qual a requisição pertence. Um critério a compara com o nome de um grupo, usado como argumento. Os behaviors da regra se aplicam, então, somente às requisições desse grupo. A variável exige [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) ativado na Application. Este critério corresponde a uma requisição do device group `Mobile`: @@ -90,11 +101,44 @@ Para todas as variáveis e todos os operadores que uma regra pode usar, consulte ## Variação de cache -Um cache setting pode entregar uma versão de um objeto a todos os dispositivos, ou manter uma cópia separada para cada device group que ele nomeia. No Azion Console, o controle é **Cache vary by Devices** › **Behavior**, na seção **Application Accelerator** do cache setting. Na API, o controle grava `modules.application_accelerator.cache_vary_by_devices`, cujo campo `device_group` lista os device groups por ID. Um cache setting que não define o controle carrega `"behavior": "ignore"` e uma lista `device_group` vazia. Azion CLI não tem flag para a variação por device group. +Um cache setting pode variar a cache key por device group. Com a variação, [Cache](/pt-br/documentacao/plataforma/applications/cache/) armazena uma cópia separada de um objeto para cada device group que o cache setting lista. Caso contrário, Cache responde a todos os dispositivos com a mesma cópia. Na API, a variação é o campo `modules.application_accelerator.cache_vary_by_devices`, cujo campo `device_group` lista os device groups por ID. Um cache setting que não define a variação carrega `"behavior": "ignore"` e uma lista `device_group` vazia. [Azion CLI](/pt-br/documentacao/devtools/cli/) não tem flag para a variação por device group. + +O objeto `modules.application_accelerator` de um cache setting exige Application Accelerator ativado na Application. Sem ele, a API recusa com o erro `21013` uma variação desse objeto cujo `behavior` não é `ignore`. Para os valores que cada campo aceita e o rótulo dele no Azion Console, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation). + +Cada cópia que varia por device group tem a sua própria cache key. A key termina em `@@` e no nome do device group, como `httpwww.example.com/@@Mobile`. Um purge por URL não alcança essas cópias, então purgue-as por cache key ou com um wildcard. Para o formato da key, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#variacoes). Para os tipos de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purge-por-url). + +--- + +## API -A seção **Application Accelerator** de um cache setting exige Application Accelerator na aplicação, e, sem esse Produto, a API recusa os campos da seção com o erro `21013`. Para os valores que cada campo aceita, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/#cache-variation). +A API serve os device groups de uma Application em `https://api.azion.com/v4/workspace/applications//device_groups`. Cada chamada se autentica com um [personal token](/pt-br/documentacao/fundamentos/personal-tokens/) no header `Authorization: Token [TOKEN VALUE]`, e uma chamada com corpo também envia `Content-Type: application/json`. + +| Operação | Método e path | +| --- | --- | +| Criar um device group | `POST /workspace/applications//device_groups` | +| Listar os device groups de uma Application | `GET /workspace/applications//device_groups` | +| Ler um device group | `GET /workspace/applications//device_groups/` | +| Substituir um device group | `PUT /workspace/applications//device_groups/` | +| Alterar parte de um device group | `PATCH /workspace/applications//device_groups/` | +| Excluir um device group | `DELETE /workspace/applications//device_groups/` | + +Uma requisição de criação exige `name` e `user_agent`. A plataforma atribui `id` e `created_at`. Enquanto Application Accelerator está desativado na Application, a API recusa a requisição de criação com HTTP `403` e o erro `27002`, `Application Acceleration Not Enabled`. + +--- + +## CLI + +Azion CLI gerencia device groups com cinco comandos sob o substantivo `device-group`. Todo comando recebe `--application-id`, e um comando que age sobre um device group recebe o ID dele em `--group-id`. + +| Comando | O que faz | Flags | +| --- | --- | --- | +| `azion create device-group` | Cria um device group | `--application-id`, `--name`, `--user-agent`, `--file` | +| `azion list device-group` | Lista os device groups de uma Application | `--application-id`, `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion describe device-group` | Retorna um device group | `--application-id`, `--group-id` | +| `azion update device-group` | Altera um device group | `--application-id`, `--group-id`, `--name`, `--user-agent`, `--file` | +| `azion delete device-group` | Exclui um device group | `--application-id`, `--group-id` | -Cada cópia que varia por device group tem a sua própria cache key, que termina em `@@` e no nome do device group, como `httpwww.example.com/@@Mobile`. Um purge por URL não alcança essas cópias, então purgue-as por cache key ou com um wildcard. Para o formato da key, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/#variacoes). Para os tipos de purge, consulte [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/#purge-por-url). +`--name` define o campo `name`, e `--user-agent` define a expressão regular em `user_agent`. `--file` lê o device group de um arquivo JSON em vez disso. --- @@ -102,9 +146,9 @@ Cada cópia que varia por device group tem a sua própria cache key, que termina - Como uma aplicação executa as suas regras e o seu cache sobre uma requisição. + Como uma Application executa as suas regras e o seu cache sobre uma requisição. O procedimento que cria um device group no Azion Console. - A primeira aplicação, antes de você adicionar device groups a ela. - Os termos que uma aplicação usa, device group entre eles. + A primeira Application, antes de você adicionar device groups a ela. + As palavras que as páginas de Applications usam com um sentido específico, device group entre elas. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-app-primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-app-primeiros-passos.mdx index dfd8992e0e..379156f07c 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-app-primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-app-primeiros-passos.mdx @@ -1,6 +1,6 @@ --- title: Primeiros passos com Applications -description: Crie uma aplicação que envia toda requisição para a sua origem por um connector, entregue-a por um workload e faça uma requisição a ela. +description: Crie uma Application que envia toda requisição para a sua origem por um Connector, entregue-a por um Workload e faça uma requisição a ela. meta_tags: 'applications, quickstart, connector, origin, set connector, rules engine, workload, deployment, azion cli, api' namespace: documentation_products_edge_application_first_steps permalink: /documentacao/plataforma/applications/primeiros-passos/ @@ -10,26 +10,27 @@ import DocCard from '@aziontech/webkit/doc-card' import DocSteps from '@aziontech/webkit/doc-steps' import DocStep from '@aziontech/webkit/doc-step' import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' -Este guia orienta você a entregar o conteúdo da sua origem pela sua primeira [aplicação](/pt-br/documentacao/plataforma/applications/). +Este guia orienta você a entregar o conteúdo da sua origem pela sua primeira [Application](/pt-br/documentacao/plataforma/applications/). -- Crie um [connector](/pt-br/documentacao/plataforma/connectors/) que alcança a sua origem por HTTPS. -- Crie uma aplicação. -- Adicione uma regra que envia toda requisição para o connector. -- Entregue a aplicação por um [workload](/pt-br/documentacao/plataforma/workloads/). -- Envie uma requisição para o domínio do workload e receba a resposta da sua origem. +- Crie um [Connector](/pt-br/documentacao/plataforma/connectors/) que alcança a sua origem por HTTPS. +- Crie uma Application. +- Adicione uma regra que envia toda requisição para o Connector. +- Entregue a Application por um [Workload](/pt-br/documentacao/plataforma/workloads/). +- Envie uma requisição para o domínio de workload e receba a resposta da sua origem. Cinco partes formam a cadeia, listadas na ordem em que este guia as usa: -1. O **connector** guarda o endereço da sua origem e a forma como a Azion se conecta a ela. -2. A **aplicação** guarda as regras que decidem o que acontece com uma requisição. Uma aplicação nova não tem regras. -3. A **regra** na aplicação combina um critério com um behavior. Neste guia, o critério corresponde a toda requisição, e o behavior **Set Connector** nomeia o connector. -4. O **workload** guarda o domínio que recebe as requisições. O **deployment** dele nomeia a aplicação. -5. A **requisição** para o domínio do workload encontra a regra, e o connector a passa para a sua origem. +1. O **Connector** guarda o endereço da sua origem e a forma como a Azion se conecta a ela. +2. A **Application** guarda as regras que decidem o que acontece com uma requisição. Uma Application nova não tem regras. +3. A **regra** na Application combina uma condição sobre a requisição, chamada critério, com uma ação chamada behavior. Neste guia, o critério corresponde a toda requisição, e o behavior _Set Connector_ envia a requisição para o Connector. +4. O **Workload** guarda um domínio e recebe as requisições enviadas a ele. O **deployment** dele, uma configuração do Workload, define a Application que recebe essas requisições. +5. A **requisição** vai para o domínio de workload, o hostname que a Azion atribui ao Workload. A regra da Application corresponde à requisição, e o Connector a encaminha para a sua origem. -Um connector só recebe requisições depois que uma regra o nomeia, e uma aplicação só depois que um deployment a nomeia. +Um Connector só recebe requisições depois que uma regra define esse Connector. Uma Application só recebe as requisições de um Workload depois que o deployment desse Workload define essa Application. -Em uma aplicação, você habilita três Produtos: Cache, Application Accelerator e Image Processor. Uma aplicação nova começa com Cache ativado e os outros dois desativados, e este guia não altera nenhum deles. Para ativar um deles depois, abra a aba **Main Settings** da aplicação, ative o interruptor dele em **Modules** e selecione **Save**. Os primeiros passos de cada Produto começam onde este guia termina, com uma aplicação que já entrega conteúdo. +Cada Application tem quatro interruptores: [Cache](/pt-br/documentacao/plataforma/applications/cache/), [Functions](/pt-br/documentacao/plataforma/functions/), [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/). No Azion Console, os interruptores ficam em **Main Settings** > **Modules**, e na API, eles são as chaves de `modules`. Uma Application nova começa com Cache e Functions ativados e os outros dois desativados, e este guia mantém os quatro como estão. Os primeiros passos de Cache, Application Accelerator e Image Processor começam onde este guia termina, com uma Application que já entrega conteúdo. --- @@ -46,9 +47,8 @@ Em uma aplicação, você habilita três Produtos: Cache, Application Accelerato - Uma conta Azion. Para mais informações, consulte [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/). - Um servidor de origem que responde a requisições HTTPS na porta `443` em um hostname público. Este guia escreve esse hostname como ``. -- O `curl`, para enviar uma requisição pelo workload. - -Você também precisa de acesso ao Azion Console. Para mais informações, consulte [Como acessar o Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). +- O `curl`, para enviar uma requisição pelo Workload. +- Acesso ao Azion Console. Para mais informações, consulte [Acesse Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). @@ -58,9 +58,8 @@ Você também precisa de acesso ao Azion Console. Para mais informações, consu - Uma conta Azion. Para mais informações, consulte [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/). - Um servidor de origem que responde a requisições HTTPS na porta `443` em um hostname público. Este guia escreve esse hostname como ``. -- O `curl`, para enviar uma requisição pelo workload. - -Você também precisa da [Azion CLI](/pt-br/documentacao/devtools/cli/) na sua máquina, autorizada com um personal token. +- O `curl`, para enviar uma requisição pelo Workload. +- A [Azion CLI](/pt-br/documentacao/devtools/cli/) na sua máquina, autorizada com um personal token. @@ -70,9 +69,9 @@ Você também precisa da [Azion CLI](/pt-br/documentacao/devtools/cli/) na sua m - Uma conta Azion. Para mais informações, consulte [Criar uma conta](/pt-br/documentacao/fundamentos/criar-uma-conta/). - Um servidor de origem que responde a requisições HTTPS na porta `443` em um hostname público. Este guia escreve esse hostname como ``. -- O `curl`, para enviar uma requisição pelo workload. - -Você também precisa de um personal token para o header `Authorization`. Para criar um, consulte [Como criar um personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/). Para vincular a aplicação ao workload, você também precisa da [Azion CLI](/pt-br/documentacao/devtools/cli/), autorizada com um personal token. +- O `curl`, para enviar uma requisição pelo Workload. +- Um personal token para o header `Authorization`. Para criar um, consulte [Gerencie personal tokens](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/). +- A [Azion CLI](/pt-br/documentacao/devtools/cli/), autorizada com um personal token, para criar o deployment que define a Application. @@ -80,9 +79,11 @@ Você também precisa de um personal token para o header `Authorization`. Para c --- -## Crie um connector para a sua origem +## Crie um Connector para a sua origem + +Um Connector guarda o endereço da sua origem e as configurações que a Azion usa para alcançá-la. Você o cria à parte, fora de qualquer Application, e uma regra define o Connector depois. Este Connector tem um endereço e se conecta à sua origem por HTTPS. Ele envia o hostname da sua origem no header `Host`. -Um connector guarda o endereço da sua origem e as configurações que a Azion usa para alcançá-la. Você o cria à parte, fora de qualquer aplicação, e uma regra o nomeia depois. Este connector tem um endereço e se conecta à sua origem por HTTPS. Ele envia o hostname da sua origem no header `Host`. +Por padrão, um Connector envia o host que o cliente requisitou, que aqui é o seu domínio de workload. Uma origem que roteia por nome pode não responder a esse host. Para mais informações, consulte [Header Host](/pt-br/documentacao/plataforma/connectors/como-funciona/#header-host). @@ -90,7 +91,7 @@ Um connector guarda o endereço da sua origem e as configurações que a Azion u ### Console -Para criar o connector pelo Azion Console: +Para criar o Connector pelo Azion Console: @@ -98,15 +99,19 @@ Para criar o connector pelo Azion Console: Acesse [Azion Console](https://console.azion.com/) > **Connectors**. - - + + + Selecione **+ Connectors**. + + + Em **General**, insira `origin-connector` como **Name**. - + - Em **Connector Type**, selecione o tipo HTTP. + Em **Connector Type**, mantenha _HTTP_ selecionado. @@ -116,18 +121,18 @@ Para criar o connector pelo Azion Console: - Em **Host Header**, insira ``, o mesmo valor de **Address**. + Em **Connection Options**, substitua `${host}` em **Host** por ``, o mesmo valor de **Address**. - Em **Transport Protocol Policy**, selecione a opção que usa somente HTTPS. + Em **Transport Protocol Policy**, selecione _Force HTTPS_. - + -O connector existe na sua conta, e a regra que você adiciona à aplicação o seleciona. Para todos os campos do formulário do connector, consulte [Connectors](/pt-br/documentacao/plataforma/connectors/). +Azion Console mostra a mensagem "Connector successfully created". O Connector existe na sua conta, e a regra que você adiciona à Application define esse Connector. Para todos os campos do formulário do Connector, consulte [Configurações de connector](/pt-br/documentacao/plataforma/connectors/configuracoes/). @@ -135,33 +140,35 @@ O connector existe na sua conta, e a regra que você adiciona à aplicação o s ### CLI -Para criar o connector pela Azion CLI, coloque-o primeiro em um arquivo JSON. Salve este corpo como `connector.json` e substitua `` nos dois lugares: +Para criar o Connector pela Azion CLI, coloque-o primeiro em um arquivo JSON. Salve este corpo como `connector.json` e substitua `` nos dois lugares: -```json -{ - "name": "origin-connector", - "type": "http", - "attributes": { - "addresses": [ - { "address": "" } - ], - "connection_options": { - "transport_policy": "force_https", - "host": "" +" } + ], + "connection_options": { + "transport_policy": "force_https", + "host": "" + } } - } -} -``` +}`} /> + +`addresses` lista os servidores de origem, e `connection_options.host` é o header `Host` que o Connector envia. `force_https` faz toda conexão com a origem usar HTTPS. -`addresses` lista os servidores de origem, e `connection_options.host` é o header `Host` que o connector envia. `force_https` faz toda conexão com a origem usar HTTPS. +Crie o Connector a partir do arquivo: -Crie o connector a partir do arquivo: + -```bash -azion create connector --type http --file connector.json +A saída traz o ID do Connector: + +```text +Created Connector with ID ``` -Anote o ID do connector novo na saída do comando: a regra o passa como ``. +Anote o ID: a regra o passa como ``. @@ -169,28 +176,26 @@ Anote o ID do connector novo na saída do comando: a regra o passa como `` pelo hostname da sua origem: - -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/connectors \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data '{ - "name": "origin-connector", - "type": "http", - "attributes": { - "addresses": [{ "address": "" }], - "connection_options": { - "transport_policy": "force_https", - "host": "" +Para criar o Connector pela API, envie uma requisição `POST` para o endpoint de connectors. Substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo hostname da sua origem: + +" }], + "connection_options": { + "transport_policy": "force_https", + "host": "" + } } - } -}' -``` +}'`} /> -A resposta retorna o connector, com um valor para cada configuração que a requisição omitiu. Este trecho mostra esses valores: +A resposta retorna o Connector, com um valor para cada configuração que a requisição omitiu. Este trecho mostra esses valores: ```json { @@ -233,7 +238,7 @@ A resposta retorna o connector, com um valor para cada configuração que a requ } ``` -O connector está ativo, e o endereço dele aceita conexões HTTPS na `https_port` `443`. [Load Balancer](/pt-br/documentacao/plataforma/connectors/load-balancer/) e [Origin Shield](/pt-br/documentacao/plataforma/connectors/origin-shield/) começam desativados. Anote o `id`: a regra o passa como ``. +O Connector está ativo, e o endereço dele aceita conexões HTTPS na `https_port` `443`. [Load Balancer](/pt-br/documentacao/plataforma/connectors/load-balancer/) e [Origin Shield](/pt-br/documentacao/plataforma/connectors/origin-shield/) começam desativados. Anote o `id`: a regra o passa como ``. @@ -241,9 +246,9 @@ O connector está ativo, e o endereço dele aceita conexões HTTPS na `https_por --- -## Crie a aplicação +## Crie a Application -Uma aplicação guarda as regras que decidem o que acontece com cada requisição. Ela precisa apenas de um nome, e todas as outras configurações mantêm o valor padrão. Enquanto uma regra não nomear um connector, a aplicação não tem uma origem para onde enviar as requisições. +Uma Application guarda as regras que decidem o que acontece com cada requisição. Ela precisa apenas de um nome, e todas as outras configurações mantêm o valor padrão. A Application só alcança a sua origem por uma regra que define um Connector. @@ -251,7 +256,7 @@ Uma aplicação guarda as regras que decidem o que acontece com cada requisiçã ### Console -Para criar a aplicação pelo Azion Console: +Para criar a Application pelo Azion Console: @@ -259,8 +264,12 @@ Para criar a aplicação pelo Azion Console: Acesse [Azion Console](https://console.azion.com/) > **Applications**. - - + + + Selecione **+ Application**. + + + Em **General**, insira `first-application` como **Name**. @@ -268,7 +277,7 @@ Para criar a aplicação pelo Azion Console: -A aplicação existe, e a aba **Rules Engine** dela ainda não tem regras. +A Application existe, e a aba **Rules Engine** dela ainda não tem regras. @@ -276,19 +285,17 @@ A aplicação existe, e a aba **Rules Engine** dela ainda não tem regras. ### CLI -Para criar a aplicação pela Azion CLI: +Para criar a Application pela Azion CLI: -```bash -azion create application --name first-application --active true -``` + -A saída traz o ID da aplicação: +A saída traz o ID da Application: ```text Created Application with ID ``` -A aplicação está ativa e não tem regras. Cache e Functions começam ativados, e Application Accelerator e Image Processor começam desativados. Anote o ID: a regra e o deployment o passam como ``. +A Application está ativa e não tem regras. Cache e Functions começam ativados, e Application Accelerator e Image Processor começam desativados. Anote o ID: a regra e o deployment o passam como ``. @@ -296,18 +303,16 @@ A aplicação está ativa e não tem regras. Cache e Functions começam ativados ### API -Para criar a aplicação pela API, envie uma requisição `POST` para o endpoint de applications. Substitua `[TOKEN VALUE]` pelo seu personal token: +Para criar a Application pela API, envie uma requisição `POST` para o endpoint de applications. Substitua `[TOKEN VALUE]` pelo seu personal token: -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/applications \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data '{"name": "first-application", "active": true}' -``` + -Na resposta, `modules` lista os interruptores com que a aplicação começa: +Na resposta, `modules` lista os interruptores com que a Application começa: ```json { @@ -331,7 +336,7 @@ Na resposta, `modules` lista os interruptores com que a aplicação começa: } ``` -A aplicação está ativa e não tem regras. Em `modules`, `cache` e `functions` começam ativados, enquanto `application_accelerator` e `image_processor` começam desativados. Anote o `id`: a regra e o deployment o passam como ``. +A Application está ativa e não tem regras. Em `modules`, `cache` e `functions` começam ativados, e `application_accelerator` e `image_processor` começam desativados. Anote o `id`: a regra e o deployment o passam como ``. @@ -339,11 +344,11 @@ A aplicação está ativa e não tem regras. Em `modules`, `cache` e `functions` --- -## Envie toda requisição para o connector +## Envie toda requisição para o Connector -Uma regra no [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) combina critérios com behaviors. Esta regra roda na fase de requisição. O critério dela, `${uri}` começando com `/`, corresponde a toda requisição. O behavior dela, **Set Connector**, envia cada requisição correspondente para o seu connector. Para mais informações, consulte [Set Connector](/pt-br/documentacao/plataforma/applications/rules-engine/#set-connector). +Uma regra no [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/) combina critérios com behaviors. Esta regra roda na Request Phase. O critério dela, `${uri}` começando com `/`, corresponde a toda requisição. O behavior dela, _Set Connector_, envia cada requisição correspondente para o seu Connector. Para mais informações, consulte [Set Connector](/pt-br/documentacao/plataforma/applications/rules-engine/#set-connector). -O critério usa `${uri}`, não `${request_uri}`. `${request_uri}` precisa de Application Accelerator ativado. Em uma aplicação sem ele, a API recusa a regra com `400` e o erro `25047`, `Missing Required Modules`. +O critério usa `${uri}`, não `${request_uri}`. `${request_uri}` precisa de Application Accelerator ativado. Em uma Application com Application Accelerator desativado, a API recusa a regra com `400` e o erro `25047`, `Missing Required Modules`. @@ -354,9 +359,9 @@ O critério usa `${uri}`, não `${request_uri}`. `${request_uri}` precisa de App Para criar a regra pelo Azion Console: - + - Acesse [Azion Console](https://console.azion.com/) > **Applications** e selecione a aplicação que você criou. + Acesse [Azion Console](https://console.azion.com/) > **Applications** e selecione a Application que você criou. @@ -366,24 +371,24 @@ Para criar a regra pelo Azion Console: Em **General**, insira `send-to-origin` como **Name**. - + Em **Phase**, selecione _Request Phase_. A fase de uma regra não pode mudar depois que você cria a regra. - Em **Criteria**, selecione a variável `${uri}` e o operador `starts_with`. Em seguida, insira `/` como argumento. + Em **Criteria**, mantenha `${uri}` e _starts with_. Em seguida, insira `/` como argumento. - Em **Behaviors**, selecione **Set Connector**. + Em **Behaviors**, selecione _Set Connector_. - + - Em **Connector**, selecione o connector que você criou. + Na lista do behavior _Set Connector_, selecione `origin-connector`. @@ -397,36 +402,34 @@ A regra aparece na aba **Rules Engine**, sob o título **Request**. ### CLI -Para criar a regra pela Azion CLI, mantenha a regra em um arquivo: em uma linha de comando, o shell expandiria `${uri}`. Salve este corpo como `rule.json` e substitua `` pelo ID do seu connector: +Para criar a regra pela Azion CLI, mantenha a regra em um arquivo: em uma linha de comando, o shell expandiria `${uri}`. Salve este corpo como `rule.json` e substitua `` pelo ID do seu Connector: -```json -{ - "name": "send-to-origin", - "active": true, - "criteria": [ - [ + } } ] - ], - "behaviors": [ - { - "type": "set_connector", - "attributes": { "value": } - } - ] -} -``` +}`} /> -Cada grupo em `criteria` abre com uma condição cujo conditional é `if`. Crie a regra na fase de requisição da sua aplicação. Substitua `` pelo ID da sua aplicação: +Cada grupo em `criteria` abre com uma condição cujo conditional é `if`. -```bash -azion create rules-engine --application-id --phase request --file rule.json -``` +Crie a regra na Request Phase da sua Application. Substitua `` pelo ID da sua Application: + + --phase request --file rule.json`} /> A saída traz o ID da regra: @@ -434,7 +437,7 @@ A saída traz o ID da regra: Created Rules Engine with ID ``` -A regra está ativa na sua aplicação e envia toda requisição para o seu connector. +A regra está ativa na sua Application e envia toda requisição para o seu Connector. @@ -442,41 +445,39 @@ A regra está ativa na sua aplicação e envia toda requisição para o seu conn ### API -Para criar a regra pela API, mantenha o corpo da requisição em um arquivo: em uma linha de comando, o shell expandiria `${uri}`. Salve este corpo como `rule.json` e substitua `` pelo ID do seu connector: +Para criar a regra pela API, mantenha o corpo da requisição em um arquivo: em uma linha de comando, o shell expandiria `${uri}`. Salve este corpo como `rule.json` e substitua `` pelo ID do seu Connector: -```json -{ - "name": "send-to-origin", - "active": true, - "criteria": [ - [ + } } ] - ], - "behaviors": [ - { - "type": "set_connector", - "attributes": { "value": } - } - ] -} -``` +}`} /> -Cada grupo em `criteria` abre com uma condição cujo conditional é `if`. Envie uma requisição `POST` para as regras da fase de requisição da sua aplicação. Substitua `` pelo ID da sua aplicação: +Cada grupo em `criteria` abre com uma condição cujo conditional é `if`. -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//request_rules \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data @rule.json -``` +Envie uma requisição `POST` para as regras da Request Phase da sua Application. Substitua `[TOKEN VALUE]` pelo seu personal token e `` pelo ID da sua Application: + +/request_rules \\ + --header 'Accept: application/json' \\ + --header 'Authorization: Token [TOKEN VALUE]' \\ + --header 'Content-Type: application/json' \\ + --data @rule.json`} /> A resposta traz a regra armazenada. Este trecho mantém o `id`, o critério, o behavior e o `order` dela: @@ -510,7 +511,7 @@ A resposta traz a regra armazenada. Este trecho mantém o `id`, o critério, o b } ``` -`order` é `0`, a posição da primeira regra na aplicação. A regra está ativa e envia toda requisição para o seu connector. +`order` é `0`, a posição da primeira regra na Application. A regra está ativa e envia toda requisição para o seu Connector. @@ -518,9 +519,9 @@ A resposta traz a regra armazenada. Este trecho mantém o `id`, o critério, o b --- -## Entregue a aplicação por um workload +## Entregue a Application por um Workload -Um workload guarda o que recebe as requisições: o domínio, os protocolos e os certificados. A aplicação não guarda nenhuma dessas configurações. O deployment do workload nomeia a aplicação que ele executa, e o deployment atual é o que atende as requisições. Um workload novo responde em um domínio de workload que a Azion atribui sob `map.azionedge.net`. +Um Workload recebe as requisições enviadas aos domínios dele. Ele guarda esses domínios, os protocolos e os certificados, então você configura a entrega no Workload, não na Application. O deployment do Workload define a Application que recebe essas requisições, e um Workload tem um único deployment. Um Workload novo responde em um domínio de workload que a Azion atribui sob `map.azionedge.net`. @@ -528,7 +529,7 @@ Um workload guarda o que recebe as requisições: o domínio, os protocolos e os ### Console -Para criar o workload e o deployment dele pelo Azion Console: +Para criar o Workload e o deployment dele pelo Azion Console: @@ -536,26 +537,26 @@ Para criar o workload e o deployment dele pelo Azion Console: Acesse [Azion Console](https://console.azion.com/) > **Workloads**. - + - A página **Create Workload** abre. + Selecione **+ Workload**. A página **Create Workload** abre. - + Insira um nome, como `first-workload`. - + - Em **Deployment Settings**, defina **Application** como a aplicação que você criou. + Em **Deployment Settings**, defina **Application** como a Application que você criou. - + -O workload existe, e o deployment dele nomeia a sua aplicação. Para copiar o endereço para onde vai a requisição final, selecione **Copy Workload URL**. +O Workload existe, e o deployment dele define a sua Application. Para copiar o endereço para onde vai a requisição final, selecione **Copy Workload URL** na mensagem que Azion Console mostra. A mensagem fecha depois de alguns segundos, e a coluna **Workload Domain** da lista de Workloads também mostra o endereço. @@ -563,27 +564,54 @@ O workload existe, e o deployment dele nomeia a sua aplicação. Para copiar o e ### CLI -Para criar o workload pela Azion CLI: +Para criar o Workload pela Azion CLI: -```bash -azion create workload --name first-workload --active true -``` + -A saída traz o ID do workload: +A saída traz o ID do Workload: ```text Created Workload with ID ``` -O workload entrega a sua aplicação por meio do deployment dele. Indique a aplicação no campo **Application** de **Deployment Settings** no [Azion Console](https://console.azion.com/) ou declare-a na entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js` e rode `azion deploy`. +Crie o deployment do Workload. Esse deployment define a sua Application. Substitua `` pelo ID do Workload e `` pelo ID da sua Application: + + --name first-deployment --application-id `} /> -Para encontrar o domínio de workload, descreva o workload em JSON: +O comando imprime o ID do deployment novo: -```bash -azion describe workload --workload-id --format json +```text +Created Workload Deployment with ID ``` -O campo `workload_domain` guarda o domínio para onde vai a requisição final. +Para conferir que o deployment define a sua Application, liste os deployments do Workload com os detalhes deles: + + --details`} /> + +A coluna `EDGE APPLICATION` mostra o ID da sua Application: + +```text +ID CURRENT EDGE APPLICATION EDGE FIREWALL + true 0 +``` + +O deployment do Workload define a sua Application. Um projeto que declara o Workload no `azion.config.js` recebe o deployment do `azion deploy` no lugar desse comando, e esse deployment define a Application que o deploy cria para o projeto, mesmo quando a entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) nomeia outra Application pelo ID dela. + +Para encontrar o domínio de workload, descreva o Workload em JSON: + + --format json`} /> + +Na saída, o campo `workload_domain` guarda o domínio para onde vai a requisição final: + +```json +{ + … + "id": , + … + "workload_domain": "", + … +} +``` @@ -591,23 +619,21 @@ O campo `workload_domain` guarda o domínio para onde vai a requisição final. ### API -Para criar o workload pela API, envie uma requisição `POST` para o endpoint de workloads. `infrastructure` definido como `1` seleciona a infraestrutura de produção, e `workload_domain_allow_access` definido como `true` deixa o workload responder no domínio de workload dele: - -```bash -curl --request POST \ - --url https://api.azion.com/v4/workspace/workloads \ - --header 'Accept: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ - --header 'Content-Type: application/json' \ - --data '{ - "name": "first-workload", - "active": true, - "infrastructure": 1, - "workload_domain_allow_access": true -}' -``` +Para criar o Workload pela API, envie uma requisição `POST` para o endpoint de workloads. `infrastructure` definido como `1` seleciona a infraestrutura de produção, e `workload_domain_allow_access` definido como `true` deixa o Workload responder no domínio de workload dele. Substitua `[TOKEN VALUE]` pelo seu personal token: -A resposta traz as configurações iniciais do workload e o domínio que a Azion atribuiu a ele: + + +A resposta traz as configurações iniciais do Workload e o domínio que a Azion atribuiu a ele: ```json { @@ -640,9 +666,9 @@ A resposta traz as configurações iniciais do workload e o domínio que a Azion } ``` -O workload não tem domínios próprios, e `workload_domain` guarda o domínio que a Azion atribuiu. Anote o `id` e o `workload_domain`. +`domains` está vazio, e `workload_domain` guarda o domínio que a Azion atribuiu ao Workload. Anote o `id` e o `workload_domain`. -A referência publicada da API v4 da Azion não tem endpoint para o deployment de um workload. Para vincular a sua aplicação ao workload que você criou, siga o passo do deployment no painel CLI. +Para definir a sua Application no deployment do Workload que você criou, execute o comando do painel CLI que cria o deployment. Você usa a CLI aqui porque a referência publicada da API v4 da Azion não tem endpoint para o deployment de um Workload. @@ -650,19 +676,19 @@ A referência publicada da API v4 da Azion não tem endpoint para o deployment d --- -## Envie uma requisição pelo workload +## Envie uma requisição pelo Workload -Esta etapa precisa apenas do `curl`, qualquer que seja a interface que você usou para montar a cadeia. No comando, substitua `` pelo domínio de workload do workload que você criou. +Esta etapa precisa apenas do `curl`, qualquer que seja a interface que você usou para montar a cadeia. No comando, substitua `` pelo domínio de workload do Workload que você criou. -Um workload novo não responde de imediato. O primeiro deployment dele pode levar vários minutos para chegar ao tráfego, e nenhuma duração é garantida. Até lá, o domínio de workload responde `404` com uma página provisória. Enquanto o deployment se propaga, as respostas à mesma requisição podem alternar entre esse `404` e a resposta da sua origem. Repita a requisição até a resposta vir da sua origem. +Um Workload novo só retorna a resposta da sua origem depois que o primeiro deployment dele chega ao tráfego. Isso pode levar vários minutos, e a Azion não garante nenhuma duração. Até lá, o domínio de workload responde `404` com uma página provisória. Enquanto o deployment se propaga, as respostas à mesma requisição podem alternar entre esse `404` e a resposta da sua origem. Repita a requisição até a resposta vir da sua origem. Para mais informações, consulte [Propagação](/pt-br/documentacao/plataforma/applications/como-funciona/#propagacao). Envie uma requisição para o caminho raiz do seu domínio de workload: -```bash -curl -i https:/// -``` +/`} /> + +A resposta é a que a sua origem retorna para `/`: o status, os headers e o corpo dela. Qualquer outro caminho chega à sua origem da mesma forma, porque a regra corresponde a toda URI que começa com `/`. A sua Application agora envia toda requisição no domínio de workload para a sua origem pelo Connector. -A resposta é a que a sua origem retorna para `/`: o status, os headers e o corpo dela. Qualquer outro caminho chega à sua origem da mesma forma, porque a regra corresponde a toda URI que começa com `/`. A sua aplicação agora envia toda requisição no domínio de workload dela para a sua origem pelo connector. +Quando a sua origem recusa o handshake TLS, a resposta é um `502` com a página intitulada `Azion - Default error page`, não uma página da sua origem. Para mais informações, consulte [Reutilização de conexões e timeouts](/pt-br/documentacao/plataforma/connectors/como-funciona/#reutilizacao-de-conexoes-e-timeouts). --- @@ -672,7 +698,7 @@ A resposta é a que a sua origem retorna para `/`: o status, os headers e o corp - - - + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-application.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-application.mdx index 9af2778d9b..7594454b10 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-application.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-application.mdx @@ -1,6 +1,6 @@ --- title: Applications -description: 'Uma aplicação decide aonde vai cada requisição, o que fica em cache e qual código é executado. Habilite Cache, Application Accelerator e Image Processor nela.' +description: 'Encaminhe requisições, armazene respostas em cache e execute código com as regras de uma Application, e ative Application Accelerator ou Image Processor.' meta_tags: 'applications, rules engine, connector, origin, cache, application accelerator, image processor, functions, workload' namespace: documentation_products_edge_applications permalink: /documentacao/plataforma/applications/ @@ -13,18 +13,61 @@ import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet. [Applications | v3](/pt-br/documentacao/plataforma/applications/v3/) -Um proxy reverso é um servidor que recebe requisições no lugar dos servidores que guardam o seu conteúdo, as origens. Ele lê cada requisição antes de uma origem e decide o que acontece com ela. Ele pode responder a partir de uma cópia que armazenou antes, adicionar ou remover um header, executar código, ou passar a requisição a uma origem e repassar a resposta. Os clientes acessam um único domínio, e a lógica que cada origem carregaria de outra forma é executada na frente de todas elas. +**Applications** é um recurso da plataforma que processa as requisições recebidas pelos seus [Workloads](/pt-br/documentacao/plataforma/workloads/). Uma Application pode executar funções serverless, atuar como proxy reverso para as suas origens ou combinar os dois, na infraestrutura distribuída da Azion, a partir do data center mais próximo ao seu usuário. Uma função serverless é uma [Function](/pt-br/documentacao/plataforma/functions/), um código executado sob demanda a cada requisição, sem um servidor para você provisionar. Um proxy reverso é um servidor na frente da sua origem, o servidor que guarda o seu conteúdo. O proxy pode responder a cada requisição com uma cópia em cache de uma resposta anterior da origem, adicionar ou remover headers ou encaminhar a requisição à sua origem. Toda requisição passa pelo proxy, então os seus clientes acessam um único domínio, e o proxy aplica a lógica que cada origem teria de repetir. -**Applications** é o recurso da plataforma que executa esse proxy na infraestrutura distribuída da Azion, perto dos seus usuários, para cada [workload](/pt-br/documentacao/plataforma/workloads/) cujo deployment o nomeia. Uma aplicação age por meio de regras, que são executadas em uma fase de requisição e em uma fase de resposta. As regras dela decidem qual [connector](/pt-br/documentacao/plataforma/connectors/) leva uma requisição até a sua origem, o que é respondido a partir de uma cópia armazenada e qual função é executada. Use Applications para encaminhar cada path à sua origem, armazenar respostas em cache, adicionar ou filtrar headers, reescrever requisições, executar o seu próprio código ou redimensionar e converter imagens sob demanda. +Uma Application recebe as requisições de um Workload depois que o deployment desse Workload define essa Application. Em cada requisição, a Application executa as suas regras. Uma regra pode definir o [Connector](/pt-br/documentacao/plataforma/connectors/) que encaminha a requisição à sua origem, decidir se a resposta é armazenada em cache ou executar uma Function. Use Applications para encaminhar cada path à sua origem, armazenar respostas em cache, adicionar ou remover headers, reescrever requisições, executar o seu próprio código nas requisições a que uma regra corresponde ou redimensionar e converter imagens sob demanda. --- +## Caminho da requisição + +Criar uma Application não encaminha nenhuma requisição a ela: antes, o deployment de um Workload precisa definir essa Application. Uma Application também só chega a uma origem por meio de uma regra que define um Connector. O diagrama acompanha uma requisição que segue esse caminho. No lugar de uma origem, uma Function pode responder a uma requisição: uma regra executa a Function com _Run Function_, e a Function constrói a resposta sem nenhum Connector. + +As setas sólidas levam a requisição, e as setas pontilhadas levam a resposta. Cada rótulo começa com o número do seu passo abaixo. + +```mermaid +%%{init: {"layout": "elk", "elk": {"cycleBreakingStrategy": "MODEL_ORDER"}, "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% +flowchart TD + Client(["Cliente"]) + WL["Workload"] + FW["Firewall"] + App["Application"] + Cache["Cache"] + Conn["Connector"] + Origin[["servidor de origem"]] + Client -->|"1. requisição"| WL + WL -->|"1. com Firewall"| FW + WL -->|"1. sem Firewall"| App + FW -->|"1. permitida"| App + FW -.->|"1. recusa"| Client + App -.->|"2. Deny (403)"| Client + App -->|"3. cache setting"| Cache + Cache -.->|"3. cópia válida"| App + App -->|"4. sem cópia válida"| Conn + Conn -->|"4. requisição"| Origin + Origin -.->|"4. resposta"| Conn + Conn -.->|"4. resposta"| App + App -.->|"5. resposta"| Client +``` + +1. A requisição chega a um Workload por um dos domínios dele, e o deployment do Workload define a Application. No Azion Console, você define essa Application no campo **Application** de **Deployment Settings**. Um [Firewall](/pt-br/documentacao/plataforma/firewall/) que o deployment também define executa as suas regras primeiro e pode interromper a requisição ali. +2. As regras da Request Phase da Application são executadas em ordem. Quando um behavior, a ação que uma regra executa, encerra o processamento, como faz _Deny (403 Forbidden)_, a Application responde ao cliente e nenhuma regra posterior é executada. +3. Se uma regra com o behavior _Set Cache Policy_ aplicou um cache setting, [Cache](/pt-br/documentacao/plataforma/applications/cache/) procura uma cópia válida da resposta da origem. Quando Cache tem uma, essa cópia se torna a resposta, e a origem não recebe nenhuma requisição. +4. Caso contrário, o Connector definido por uma regra com _Set Connector_ encaminha a requisição à origem. Se várias regras que correspondem à requisição carregam _Set Connector_, somente a última delas é executada. +5. Depois, as regras da Response Phase da Application são executadas sobre a resposta, e a resposta chega ao cliente. + +Uma Application nova começa com Cache e [Functions](/pt-br/documentacao/plataforma/functions/) ativos, Application Accelerator e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) desativados e nenhuma regra. + +Uma alteração não vale de imediato: ela se propaga, e a Azion não garante nenhum tempo de propagação. Até que o deployment de um Workload novo se propague, o que pode levar vários minutos, o Workload responde com o `404` de placeholder da Azion. Nesse intervalo, as respostas se alternam entre o placeholder e a resposta da Application, então repita a requisição até que elas concordem. Para o funcionamento das duas fases, a ordem das regras e dos behaviors e a propagação, consulte [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/). + +--- + ## Estrutura da regra -As regras carregam a lógica de uma aplicação. Uma regra testa cada requisição contra os seus critérios e, quando a requisição corresponde, executa os seus behaviors. Enviada como corpo de `POST /v4/workspace/applications//request_rules`, esta regra entrega toda requisição ao connector que alcança a sua origem: +Uma regra é a unidade de lógica de uma Application. Os critérios dela testam cada requisição, e os behaviors dela são executados sobre uma requisição que corresponde a eles. Para encaminhar toda requisição ao Connector que alcança a sua origem, envie esta regra como corpo de `POST /v4/workspace/applications//request_rules`: ```json { @@ -49,91 +92,75 @@ As regras carregam a lógica de uma aplicação. Uma regra testa cada requisiç } ``` -- `criteria` guarda grupos de condições, e a primeira condição de um grupo abre com `if`. Aqui, `${uri}`, a URI sem a query string, corresponde a toda requisição com `starts_with` e `/`, porque todo path começa com `/`. A mesma regra sobre `${request_uri}`, que mantém a query string, é recusada com `400` e o erro `25047` enquanto Application Accelerator está desativado. -- `behaviors` lista o que a regra faz com cada requisição que corresponde a ela. `set_connector` entrega a requisição ao connector cujo ID está em `attributes.value`, e o connector guarda o endereço da sua origem. -- `name` e `active` são campos da própria regra. A API responde `202` e retorna a regra com `order` igual a `0`, a sua posição entre as regras da Request Phase da aplicação. -- Azion Console monta a mesma regra na aba **Rules Engine** da aplicação, a partir de **+ Rule**, _Request Phase_, um critério sobre `${uri}` e o behavior _Set Connector_. +- `criteria` guarda grupos de condições, e cada grupo começa com uma condição cujo `conditional` é `if`. Aqui, `${uri}` é a URI sem a query string. Todo path começa com `/`, então `starts_with` e `/` correspondem a toda requisição. Se a regra testar `${request_uri}`, que mantém a query string, no lugar de `${uri}`, a API a recusa com `400` e o erro `25047` enquanto [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) está desativado. +- `behaviors` lista as ações que a regra executa sobre uma requisição que corresponde a ela. `set_connector` encaminha a requisição ao Connector cujo ID está em `attributes.value`. Esse Connector guarda o endereço da sua origem. +- `name` e `active` pertencem à própria regra. +- Você também pode montar a mesma regra no Azion Console, como mostra [Primeiros passos com Applications](/pt-br/documentacao/plataforma/applications/primeiros-passos/). -Se você já encaminhou tráfego por path em um proxy reverso, o modelo se mantém: os critérios são a condição de correspondência, os behaviors são a ação e um connector é o servidor de backend. +Quando você envia a regra, a API responde `202` e a retorna com `order` igual a `0`. Esse valor é a posição da regra entre as regras da Request Phase da Application. ---- - -## Caminho da requisição - -Criar uma aplicação não serve nada. Uma aplicação trata somente as requisições de um workload cujo deployment a nomeia, e só chega a uma origem por meio de uma regra que nomeia um connector. - -```mermaid -%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%% -flowchart TD - Q["Requisição para o domínio de um workload"] --> D["Deployment do workload: nomeia uma aplicação"] - D -->|"O deployment também nomeia um firewall"| FW["Firewall: executa as suas regras primeiro e pode interromper a requisição"] - D -->|"Nenhum firewall"| R["Aplicação: executa as suas regras da Request Phase, em ordem"] - FW -->|"A requisição continua"| R - R -->|"Uma regra com Set Cache Policy se aplicou, e há uma cópia válida armazenada"| C["Cache responde a partir da cópia armazenada"] - R -->|"Nenhuma cópia armazenada"| O["O connector que uma regra com Set Connector nomeia leva a requisição à origem"] - C --> P["Aplicação: executa as suas regras da Response Phase sobre a resposta"] - O --> P - P --> A["O cliente recebe a resposta"] -``` - -1. Um workload recebe a requisição, e o deployment dele nomeia a aplicação. No Azion Console, o vínculo é o campo **Application** de **Deployment Settings**. Quando o deployment também nomeia um [firewall](/pt-br/documentacao/plataforma/firewall/), o firewall executa as suas regras primeiro e pode interromper a requisição. -2. A aplicação executa as suas regras da Request Phase, em ordem. Um behavior que encerra o processamento, como _Deny (403 Forbidden)_, responde ao cliente, e nenhuma regra posterior é executada. -3. Quando uma regra com _Set Cache Policy_ aplicou um cache setting e há uma cópia válida armazenada, Cache responde a partir da cópia, e a origem não é consultada. -4. Caso contrário, o connector que uma regra com _Set Connector_ nomeia leva a requisição à origem. Quando várias regras que correspondem à requisição carregam _Set Connector_, somente a última é executada. -5. A aplicação executa as suas regras da Response Phase sobre a resposta, e o cliente a recebe. - -Uma aplicação nova tem Cache e Functions ativos, Application Accelerator e Image Processor desativados e nenhuma regra. Até que uma regra nomeie um connector, ela não tem origem para onde enviar uma requisição. Nenhum tempo de propagação é garantido para uma alteração. Um workload novo responde com o `404` de placeholder da Azion até que o seu vínculo com a aplicação se propague, o que pode levar vários minutos. Até lá, as respostas se alternam entre o placeholder e a aplicação, então envie a requisição de novo até que elas concordem. Para as duas fases, a ordem em que as regras e os behaviors são executados e a propagação, consulte [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/). +O modelo corresponde ao roteamento por path em um proxy reverso: cada critério é uma condição de correspondência, cada behavior é uma ação e um Connector guarda o endereço do servidor de backend. --- ## Recursos -Cache, Application Accelerator e Image Processor são Produtos habilitados em uma aplicação, cada um com o seu próprio switch em [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#produtos) › **Modules**. +Cache, Application Accelerator e Image Processor agem sobre as requisições de uma Application. Cada Application ativa Application Accelerator e Image Processor separadamente, e [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma) mostra onde, no Azion Console e na API. ### Cache -Cache responde às requisições seguintes por um objeto a partir de uma cópia da resposta da origem, mantida no data center que a buscou até que o seu tempo de vida (TTL) termine. Use-o para manter arquivos estáticos perto dos seus usuários, entregar arquivos de vídeo grandes em fragmentos, continuar a responder enquanto a origem está fora do ar ou remover uma cópia no momento em que a origem muda. Cache vem ativo em toda aplicação nova, mas não armazena nada até que uma regra com _Set Cache Policy_ aplique um cache setting, o objeto que guarda os TTLs. +Cache é um recurso da plataforma que armazena cópias das respostas às requisições recebidas por uma Application. Cada cópia fica no data center que a armazenou, e as requisições seguintes pelo mesmo objeto recebem essa cópia até que o tempo de vida (TTL) dela termine. Cache está sempre ativo em uma Application. Ele começa a armazenar cópias quando uma regra com _Set Cache Policy_ aplica um cache setting, que guarda os TTLs. Use Cache para: + +- Manter arquivos estáticos no data center mais próximo ao seu usuário +- Entregar arquivos de vídeo grandes em fragmentos, com a Large File Optimization ativada no cache setting +- Responder às requisições com uma cópia expirada quando a origem não responde, com o stale cache ativado no cache setting +- Remover uma cópia quando a origem muda, com [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) -Para saber o que um cache setting guarda, como uma requisição chega a uma cópia armazenada e por onde começar, consulte a [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/). +A [visão geral do Cache](/pt-br/documentacao/plataforma/applications/cache/) explica o que um cache setting guarda, como uma requisição chega a uma cópia armazenada e por onde começar. ### Application Accelerator -Application Accelerator decide o que, além da URL, torna duas requisições diferentes, como um argumento de query string, um cookie, o device group ou o método da requisição, e Cache então mantém uma cópia separada para cada um. Ative-o quando uma URL tem mais de uma resposta correta, como uma página personalizada, uma resposta de API que muda com uma query string, um catálogo que difere por dispositivo ou uma resposta a um `POST`. O switch dele vem desativado em uma aplicação nova. +Application Accelerator é um recurso da plataforma que libera quatro capacidades para o cache e para as regras de uma Application: a variação de cache, o cache de respostas `POST` e `OPTIONS`, um Max Age menor que 60 segundos e mais behaviors e variáveis do Rules Engine. Com a variação de cache, um cache setting diferencia duas requisições para a mesma URL por um argumento de query string, um cookie, o device group ou o método da requisição, e Cache mantém uma cópia separada para cada valor. Application Accelerator começa desativado em uma Application nova. Ative-o quando uma URL tem mais de uma resposta correta, por exemplo: + +- Uma página personalizada +- Uma resposta de API que muda com a sua query string +- Um catálogo que difere por dispositivo +- Uma resposta a um `POST` -Para saber o que uma variação acrescenta à cache key, o que o switch libera e por onde começar, consulte a [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). +A [visão geral do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) explica o que uma variação acrescenta à cache key, o que ativá-lo libera e por onde começar. ### Image Processor -Image Processor constrói uma imagem derivada a partir da imagem de origem que está no servidor de origem, conforme a query string `ims` da requisição, como `?ims=fit-in/400x400`, e nunca salva o resultado como um ativo da conta. Ative-o quando as páginas precisam de uma imagem em vários tamanhos, recortes, qualidades ou formatos, como WEBP para os browsers que o aceitam, sem armazenar ou fazer upload de um arquivo para cada variante. O switch dele vem desativado em uma aplicação nova, e ativá-lo não processa nada por si só: uma regra da Request Phase com _Optimize Images_ decide quais requisições chegam a ele. +Image Processor é um recurso da plataforma que constrói uma imagem nova, a imagem derivada, a partir de uma imagem na sua origem. A query string `ims` da requisição descreve a imagem derivada, como `?ims=fit-in/400x400`, e, mesmo sem a query string `ims`, Image Processor pode converter uma imagem para um formato que o navegador aceita. Ele retorna a imagem derivada sem salvá-la como um ativo da conta. Ele começa desativado em uma Application nova e, mesmo ativo, Image Processor processa somente as requisições às quais uma regra da Request Phase com _Optimize Images_ corresponde. Ative-o quando as suas páginas precisam de uma imagem em vários tamanhos, recortes, qualidades ou formatos, como WEBP para os browsers que o aceitam. Todas as variantes saem, então, de um único arquivo na sua origem, e você armazena e faz upload só desse arquivo. -Para saber como uma requisição se torna uma imagem derivada, o que `ims` aceita e por onde começar, consulte a [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/). +A [visão geral do Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) explica como uma requisição se torna uma imagem derivada, o que `ims` aceita e por onde começar. --- ## Escopo e limites -- **Fases**: uma regra é executada na Request Phase, sobre a requisição antes que exista uma resposta, ou na Response Phase, sobre a resposta entregue ao usuário. A fase é definida quando a regra é criada e não pode mudar, e a escolha da origem e do cache setting acontece somente na Request Phase. Para as variáveis e os behaviors de cada fase e o Produto de que cada um precisa, consulte [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#fases). -- **Origens**: o registro da aplicação não nomeia nenhuma origem, então duas regras com dois connectors podem enviar `/api/` para um servidor e todos os outros paths para outro. Por trás de um connector, a origem pode ser servidores web na sua infraestrutura, um serviço em cloud ou um bucket do [Object Storage](/pt-br/documentacao/plataforma/object-storage/), como mostra [Use um bucket como origem de uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/dados/bucket-como-connector/). Um connector pode distribuir o tráfego entre várias origens por meio de [Load Balancer](/pt-br/documentacao/plataforma/connectors/load-balancer/). Azion Console informa que as origens foram redesenhadas como connectors. -- **Functions**: uma aplicação executa o seu código por meio de uma [instância de função](/pt-br/documentacao/plataforma/applications/functions-instances/), que vincula uma função de [Functions](/pt-br/documentacao/plataforma/functions/) à aplicação com os seus próprios argumentos. Uma regra com _Run Function_ invoca a instância, e uma instância que nenhuma regra nomeia nunca é executada. **Functions** vem ativo em uma aplicação nova. Para a Response Phase, o formulário de instância no Azion Console informa `Only Lua functions can be used in the Response phase.` Para vincular a sua primeira função, consulte [Instancie uma função em uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/). -- **Cache e imagens em código**: Cache não executa código, então uma função que lê e grava entradas em cache usa a [Cache API](/pt-br/documentacao/devtools/runtime/api-reference/cache/). Uma função que processa imagens por conta própria usa a biblioteca WASM Image Processor, uma superfície diferente de Image Processor, como explica [Onde Image Processor para](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/#onde-image-processor-para). -- **Dispositivos**: um [device group](/pt-br/documentacao/plataforma/applications/device-groups/) nomeia os dispositivos cujo header `User-Agent` corresponde a uma expressão regular. Uma regra o testa por meio de `${device_group}`, e um cache setting pode manter uma cópia por grupo, ambos com Application Accelerator ativo. Para uma expressão que corresponda somente aos dispositivos que você pretende alcançar, consulte [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#defina-um-device-group-pelas-palavras-que-so-esse-dispositivo-envia). -- **WebSocket**: [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) transporta uma conexão WebSocket, aberta com os headers `Upgrade: websocket` e `Connection: upgrade`, entre os seus usuários e a origem por meio de uma aplicação. Ele não vem habilitado na conta por padrão, e a Azion o habilita mediante solicitação. Para solicitá-lo, consulte [Diretrizes de suporte](/pt-br/documentacao/suporte/). A Azion recicla as conexões keepalive aproximadamente a cada 15 minutos, então o cliente reabre uma conexão WebSocket que se fecha. -- **Workloads**: domínios, protocolos e certificados pertencem ao workload que serve a aplicação, então uma aplicação não carrega configurações de entrega próprias. _Redirect HTTP to HTTPS_ precisa de HTTPS no workload. A página de erro que um cliente vê quando o connector recebe uma resposta 4xx ou 5xx da sua origem é definida por [Custom Pages](/pt-br/documentacao/plataforma/workloads/#custom-pages) no workload. Para requisitar uma aplicação no seu próprio domínio a partir de um dispositivo antes de alterar os registros DNS dele, consulte [Teste uma aplicação pelo arquivo hosts](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/testar-edge-application-atraves-do-arquivo-hosts/). -- **Interfaces**: você cria e gerencia aplicações na página **Applications** do [Azion Console](https://console.azion.com). Cada aplicação tem as abas **Main Settings**, **Device Groups**, **Cache Settings**, **Functions Instances** e **Rules Engine**. **Clone**, uma ação de linha da lista **Applications**, cria uma aplicação separada que começa com as configurações da original, como mostra [Clone uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/clonar-applications/). [Azion API](https://api.azion.com/) serve as aplicações em `/v4/workspace/applications`, e [Azion CLI](/pt-br/documentacao/devtools/cli/) as gerencia com comandos como `azion create application`, `azion update application` e `azion create rules-engine`. [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/), [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) e [Azion Terraform provider](/pt-br/documentacao/devtools/terraform/) também criam e configuram aplicações. Uma conta que não migrou para a API v4 segue [Applications | v3](/pt-br/documentacao/plataforma/applications/v3/). -- **Observabilidade**: com **Debug Rules** ativo em [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules), [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) e [Data Stream](/pt-br/documentacao/plataforma/data-stream/) mostram as regras que cada requisição executou, no campo `$traceback`. A configuração vem desativada em uma aplicação nova. A resposta a uma requisição enviada com `Pragma: azion-debug-cache` informa o seu status de cache, como `HIT` ou `MISS`, no header `x-cache`. [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) mostra o tráfego de Cache e de Tiered Cache. Para as ferramentas e as consultas, consulte [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/) e [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). -- **Limites**: uma aplicação guarda até 200 regras somando as duas fases. Uma regra carrega de 1 a 5 grupos de 1 a 10 critérios, e de 1 a 10 behaviors. Um cache setting aceita um **Max Age** de no mínimo 60 segundos sem Application Accelerator, e um único objeto em cache pode chegar a 10 GB. Para cada limite, a resposta quando ele é ultrapassado e os limites de cada Produto, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/). -- **Cobrança**: Cache é cobrado por purges, Application Accelerator por transferência de dados e Image Processor por imagens processadas, e ativar um Produto pode gerar custos relacionados ao uso. Cada plano inclui uma quantidade de cada um, como 1.000 purges por mês no Hobby e 2.000 no Pro. Para as quantidades, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#uso-incluido-por-plano), e para os valores, consulte [Preços](/pt-br/documentacao/fundamentos/precos/). -- **Termos**: o [glossário de Applications](/pt-br/documentacao/plataforma/applications/glossario/) define as palavras às quais as páginas de Applications dão um significado específico, como regra, fase, behavior, cache setting, cache key e imagem derivada. +- **Fases**: toda regra pertence a uma de duas fases. A Request Phase age sobre a requisição antes que exista uma resposta, e a Response Phase age sobre a resposta que o usuário recebe. Você escolhe a fase quando cria a regra e não pode mudá-la depois. Somente as regras da Request Phase podem escolher a origem e o cache setting. [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/#fases) lista as variáveis e os behaviors de cada fase e o recurso da plataforma de que cada um precisa. +- **Origens**: uma Application chega a cada origem por meio de um Connector, então duas regras com dois Connectors podem encaminhar `/api/` para um servidor e todos os outros paths para outro. A origem por trás de um Connector pode ser um servidor web na sua infraestrutura, um serviço em cloud ou um bucket do [Object Storage](/pt-br/documentacao/plataforma/object-storage/). [Use um bucket como origem de uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/dados/bucket-como-connector/) mostra o caso do bucket. Com [Load Balancer](/pt-br/documentacao/plataforma/connectors/load-balancer/) ativado, um Connector do tipo `http` pode distribuir o tráfego entre várias origens. Os Connectors substituem as origens que as versões anteriores de Applications configuravam na Application. +- **Functions**: uma [Function Instance](/pt-br/documentacao/plataforma/applications/functions-instances/) vincula uma das suas [Functions](/pt-br/documentacao/plataforma/functions/) à Application, com os seus próprios argumentos. Uma Function Instance pertence a uma Application, e ela só é executada quando uma regra com _Run Function_ invoca essa Function Instance. Functions começa ativo em uma Application nova, no campo `modules.functions.enabled` dela na API. Somente Functions escritas em Lua são executadas na Response Phase, como informa o formulário da Function Instance no Azion Console: `Only Lua functions can be used in the Response phase.` Para os passos de adicionar a sua primeira Function, consulte [Instancie uma função em uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/). +- **Cache e imagens em código**: o código que lê ou grava entradas em cache é executado em uma Function e usa a [Cache API](/pt-br/documentacao/devtools/runtime/api-reference/cache/), porque o próprio Cache não pode executar código. Uma Function que processa imagens por conta própria usa a biblioteca WASM Image Processor, que é separada do recurso da plataforma Image Processor. [Onde Image Processor para](/pt-br/documentacao/plataforma/applications/image-processor/entrega-de-imagens/#onde-image-processor-para) explica a diferença. +- **Dispositivos**: um [device group](/pt-br/documentacao/plataforma/applications/device-groups/) é um nome e uma expressão regular que a Application compara com o header `User-Agent` de cada requisição. Os dois usos de um grupo precisam de Application Accelerator ativo: uma regra testa o grupo por meio de `${device_group}`, e um cache setting pode manter uma cópia por grupo. [Boas práticas de Applications](/pt-br/documentacao/plataforma/applications/boas-praticas/#defina-um-device-group-pelas-palavras-que-so-esse-dispositivo-envia) mostra como escrever uma expressão que corresponda somente aos dispositivos que você pretende alcançar. +- **WebSocket**: [WebSocket Proxy](/pt-br/documentacao/plataforma/applications/websocket/) é uma feature de Applications que transporta uma conexão WebSocket entre os seus usuários e a origem. A conexão abre com os headers `Upgrade: websocket` e `Connection: upgrade`. A Azion ativa a feature em uma conta somente mediante solicitação, e [Diretrizes de suporte](/pt-br/documentacao/suporte/) explica como pedir. Como a Azion recicla as conexões keepalive aproximadamente a cada 15 minutos, o cliente precisa reabrir uma conexão WebSocket quando ela se fecha. +- **Workloads**: um Workload guarda os domínios, os protocolos e os certificados que servem a Application, então você configura a entrega no Workload, não na Application. [Teste uma aplicação pelo arquivo hosts](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/testar-edge-application-atraves-do-arquivo-hosts/) mostra como requisitar uma Application no seu próprio domínio a partir de um dispositivo antes de alterar os registros DNS dele. _Redirect HTTP to HTTPS_ só funciona quando o Workload tem HTTPS. Quando o Connector recebe uma resposta 4xx ou 5xx da sua origem, [Custom Pages](/pt-br/documentacao/plataforma/workloads/#custom-pages) no Workload define a página de erro que o cliente vê. +- **Interfaces**: no [Azion Console](https://console.azion.com), você cria e gerencia as suas Applications na página **Applications**, onde cada Application tem cinco abas: **Main Settings**, **Device Groups**, **Cache Settings**, **Functions Instances** e **Rules Engine**. No Console, a ação de linha **Clone** da lista **Applications** cria uma Application separada com as configurações da original, como mostra [Clone uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/clonar-applications/). [Azion API](https://api.azion.com/) serve as suas Applications em `/v4/workspace/applications`, e [Azion CLI](/pt-br/documentacao/devtools/cli/) as gerencia com comandos como `azion create application`, `azion update application` e `azion create rules-engine`. Você também pode criar e configurar as suas Applications com [`azion.config.js`](/pt-br/documentacao/devtools/cli/azion-config-js/), [Azion Lib](/pt-br/documentacao/devtools/azion-lib/application/) ou [Azion Terraform Provider](/pt-br/documentacao/devtools/terraform/). Se a sua conta não migrou para a API v4, use [Applications | v3](/pt-br/documentacao/plataforma/applications/v3/). +- **Observabilidade**: com Debug Rules ativo, [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) e [Data Stream](/pt-br/documentacao/plataforma/data-stream/) mostram as regras que cada requisição executou, no campo `$traceback`. Debug Rules começa desativado em uma Application nova. Ele é o campo `debug` da Application na API, e [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#debug-rules) mostra onde ativá-lo no Azion Console. Para verificar uma resposta, envie a requisição com `Pragma: azion-debug-cache`: a resposta informa o seu status de cache, como `HIT` ou `MISS`, no header `x-cache`. Em todas as requisições, [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) mostra o tráfego de Cache e de [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). [Solucione problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/) lista as ferramentas e as consultas. Para um tráfego que difere do que você vê, consulte [Um problema aparece no tráfego, mas não nas respostas que você solicita](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#um-problema-aparece-no-trafego-mas-nao-nas-respostas-que-voce-solicita). +- **Limites**: uma Application aceita no máximo 200 regras, somando as duas fases. Cada regra tem de 1 a 5 grupos de 1 a 10 critérios, além de 1 a 10 behaviors. Sem Application Accelerator, um cache setting precisa de um Max Age, o seu campo `modules.cache.max_age`, de no mínimo 60 segundos. Um único objeto em cache pode chegar a 10 GB. [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/) lista cada limite, o que acontece quando ele é ultrapassado e os limites de cada recurso da plataforma aninhado em Applications. +- **Cobrança**: um recurso da plataforma que você ativa pode gerar custos que dependem do uso. A página [Preços da Azion](https://www.azion.com/pt-br/precos/) lista os planos e o uso que cada plano inclui, e [Preços](/pt-br/documentacao/fundamentos/precos/) lista as tarifas e a métrica pela qual cada recurso da plataforma é cobrado. +- **Termos**: o [glossário de Applications](/pt-br/documentacao/plataforma/applications/glossario/) define as palavras que as páginas de Applications usam com um significado específico, como regra, fase, behavior, cache setting, cache key e imagem derivada. --- ## Próximos passos - - - - - - + + + + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-functions-instances.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-functions-instances.mdx index 034f2d350d..da54a57a96 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-functions-instances.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-functions-instances.mdx @@ -1,8 +1,8 @@ --- -title: Instâncias de função +title: Function Instances description: >- - Vincule uma função a uma aplicação, defina os Args em JSON que ela recebe e - invoque-a com o comportamento Run Function em Rules Engine. + Consulte os campos de uma Function Instance, os Args dela e como o behavior + Run Function a invoca. meta_tags: 'function instance, args, run function, rules engine, applications' namespace: documentation_products_edge_applications_edge_functions_instances permalink: /documentacao/plataforma/applications/functions-instances/ @@ -12,54 +12,61 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Uma instância de função vincula uma função a uma [aplicação](/pt-br/documentacao/plataforma/applications/). A instância carrega os **Args**, os argumentos passados para o contexto da execução da função em formato JSON. O código da função não pode ser editado na instanciação: uma instância define os Args e nada mais. +Uma Function Instance é a entidade que vincula uma [Function](/pt-br/documentacao/plataforma/functions/) a uma [Application](/pt-br/documentacao/plataforma/applications/) ou a um [Firewall](/pt-br/documentacao/plataforma/firewall/). A Function Instance carrega os Args, os argumentos passados para o contexto da execução da Function em formato JSON: `args` na API, e a seção **Arguments** no Azion Console. Uma Function Instance define o nome, os Args, o schema do formulário e se ela está ativa, e mantém o código da Function como ele está. -Uma regra em [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) invoca a instância, não a função. A mesma função pode ser instanciada em mais de uma aplicação, e cada instância carrega os próprios Args. Uma instância que nenhuma regra nomeia nunca é executada. +Uma regra em [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) invoca a Function Instance, não a Function. A mesma Function pode ser instanciada em mais de uma Application, e cada Function Instance carrega os próprios Args. Uma Function Instance só é executada quando uma regra com _Run Function_ invoca essa Function Instance. -Um firewall instancia funções da mesma forma. Uma instância em um firewall executa a sua função antes que a requisição chegue à aplicação, então a função pode interromper a requisição ali. Uma instância em uma aplicação executa a sua função como parte de servir a requisição. Consulte [Instâncias de função no Firewall](/pt-br/documentacao/plataforma/firewall/functions-instances/) para conhecer o objeto do firewall, e [Limites de Firewall](/pt-br/documentacao/plataforma/firewall/limites/#regras-e-instancias-de-funcao) para conhecer os limites dele. +Um Firewall tem as suas próprias Function Instances. Uma Function Instance em um Firewall executa a sua Function antes que a requisição chegue à Application, então a Function pode interromper a requisição ali. Uma Function Instance em uma Application executa a sua Function como parte de servir a requisição. Para as Function Instances de um Firewall, consulte [Instâncias de função no Firewall](/pt-br/documentacao/plataforma/firewall/functions-instances/). Para os limites delas, consulte [Limites de Firewall](/pt-br/documentacao/plataforma/firewall/limites/#regras-e-instancias-de-funcao). --- -## Campos da instância +## Campos da Function Instance -A [API da Azion](https://api.azion.com/) cria uma instância sob a aplicação à qual ela pertence. Estes são os campos que você define: +A [API da Azion](https://api.azion.com/) cria uma Function Instance de uma Application sob essa Application. Estes são os campos que você define: | Campo | Tipo | Obrigatório | Descrição | | --- | --- | --- | --- | -| `name` | string | Sim | Nome da instância. | -| `function` | integer | Sim | ID da função que a instância vincula. Esse ID é diferente do ID da instância. | -| `args` | JSON object ou array | Não | Argumentos passados para o contexto da execução da função. Quando a instância não define args, os `default_args` da função são usados. | -| `azion_form` | JSON object | Não | Um JSON Schema que renderiza os args como formulário. Quando nenhum é definido, um objeto vazio é usado. | -| `active` | boolean | Não | Se a instância está ativa. | +| `name` | string, de 1 a 100 caracteres | Sim | Nome da Function Instance. | +| `function` | integer | Sim | ID da Function que a Function Instance vincula, não da Function Instance. | +| `args` | JSON object ou array | Não | Argumentos passados para o contexto da execução da Function. | +| `azion_form` | JSON object | Não | Um JSON Schema que renderiza os args como formulário. | +| `active` | boolean | Não | Se a Function Instance está ativa. | -A API retorna mais quatro campos: `id`, o ID da instância; `last_editor`, o endereço de e-mail da conta que a alterou pela última vez; `last_modified`, o timestamp dessa alteração; e `created_at`, o timestamp da criação. +Quando a Function Instance não define args, os `default_args` da Function são usados. Quando ela não define `azion_form`, um objeto vazio é usado. -Uma requisição `POST` ao recurso `functions` de uma aplicação cria uma instância: +A API retorna mais quatro campos: + +- `id`, o ID da Function Instance. +- `last_editor`, o endereço de e-mail da conta que a alterou pela última vez. +- `last_modified`, o timestamp dessa alteração. +- `created_at`, o timestamp da criação. + +Uma requisição `POST` ao recurso `functions` de uma Application cria uma Function Instance: ```bash curl --request POST \ - --url https://api.azion.com/v4/workspace/applications//functions \ + --url https://api.azion.com/v4/workspace/applications//functions \ --header 'Accept: application/json' \ --header 'Authorization: Token [TOKEN VALUE]' \ --header 'Content-Type: application/json' \ --data '{ "name": "My instance Name", - "function": , + "function": , "active": true }' ``` -A API responde com o objeto criado: +A API responde `202` com o objeto criado: ```json { "state": "pending", "data": { - "id": , - "name": "My Function Instance", + "id": , + "name": "My instance Name", "args": {}, "azion_form": {}, - "function": 123456, + "function": , "active": true, "last_editor": "your-email@example.com", "last_modified": "2025-08-14T16:41:56.699896Z", @@ -70,13 +77,24 @@ A API responde com o objeto criado: O valor `"state": "pending"` significa que a alteração leva alguns minutos para propagar antes de entrar em vigor. -Você cria o mesmo objeto na aba **Functions Instances** de uma aplicação em Azion Console. No arquivo `azion.config.js` que [Azion CLI](/pt-br/documentacao/devtools/cli/) lê, uma instância carrega `name`, `args` e `active`, e `ref` nomeia a função por nome ou por ID. +A API serve as Function Instances de uma Application em `/workspace/applications//functions`. No path de uma Function Instance, `` é o ID da Function Instance, não da Function: + +| Operação | Método e path | +| --- | --- | +| Criar uma Function Instance | `POST /workspace/applications//functions` | +| Listar as Function Instances de uma Application | `GET /workspace/applications//functions` | +| Ler uma Function Instance | `GET /workspace/applications//functions/` | +| Substituir uma Function Instance | `PUT /workspace/applications//functions/` | +| Alterar parte de uma Function Instance | `PATCH /workspace/applications//functions/` | +| Excluir uma Function Instance | `DELETE /workspace/applications//functions/` | + +[Instancie uma função em uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/) mostra como criar uma Function Instance no Azion Console. No arquivo `azion.config.js` que [Azion CLI](/pt-br/documentacao/devtools/cli/) lê, uma Function Instance carrega `name`, `args` e `active`, e `ref` nomeia a Function por nome ou por ID. --- ## Args -Args são os argumentos que uma instância passa para o contexto da execução da função, escritos como um objeto JSON. O código lê uma chave em tempo de execução e a instância decide o valor dela, então uma mesma função se comporta de forma diferente em cada lugar onde é instanciada. Uma função pode definir Args padrão próprios: os Args de uma instância sobrescrevem as chaves que repetem, e toda chave que a instância deixa de fora mantém o valor padrão. +Args são os argumentos que uma Function Instance passa para o contexto da execução da Function, escritos como um objeto ou um array JSON. O código lê uma chave em tempo de execução e a Function Instance decide o valor dela, então uma mesma Function se comporta de forma diferente em cada lugar onde é instanciada. Uma Function pode definir Args padrão próprios, e a Function os lê somente quando a Function Instance não define Args. Os Args definidos na Function Instance substituem os padrões por inteiro, então uma chave que a Function Instance deixa de fora fica ausente, em vez de manter o valor padrão. Um objeto Args que define uma chave: @@ -86,19 +104,35 @@ Um objeto Args que define uma chave: } ``` -O objeto Args comporta no máximo 100 KB, e um objeto acima desse teto faz a função falhar na instanciação. Para todos os limites de Functions, consulte [Limites](/pt-br/documentacao/plataforma/functions/limites/). +O objeto Args comporta no máximo 100 KB, e um objeto acima desse teto faz a Function falhar na instanciação. Para todos os limites de Functions, consulte [Limites de Functions](/pt-br/documentacao/plataforma/functions/limites/). + +Args são a configuração de uma Function Instance. Valores sensíveis, como chaves de API, credenciais e tokens de acesso, pertencem às [variáveis de ambiente](/pt-br/documentacao/plataforma/functions/environment-variables/). + +--- + +## Behavior Run Function + +_Run Function_ é o behavior de [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/#run-function) que invoca uma Function Instance. A regra guarda o ID da Function Instance, e a fase e os critérios da regra decidem quando ela é executada. Quando uma requisição atende a esses critérios, a Function é executada na infraestrutura distribuída da Azion. + +_Run Function_ está disponível na Request Phase e na Response Phase, e exige [Functions](/pt-br/documentacao/plataforma/functions/) ativado na Application. Na Response Phase, ele executa somente Functions escritas em Lua. Na API da Azion, o behavior é `run_function`, e o atributo `value` dele carrega o ID da Function Instance. Enquanto Functions está desativado, a API também recusa criar uma Function Instance na Application, com HTTP `400` e o erro `29003`, `Edge Functions Module Is Not Enabled`. -Args são configuração por instância. Valores sensíveis, como chaves de API, credenciais e tokens de acesso, pertencem às [variáveis de ambiente](/pt-br/documentacao/plataforma/functions/environment-variables/). +Para as fases de execução, os critérios e a ordem em que os behaviors são executados, consulte [Como Functions funciona](/pt-br/documentacao/plataforma/functions/como-funciona/). --- -## Comportamento Run Function +## CLI -**Run Function** é o comportamento de [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/#run-function) que invoca uma instância. A regra nomeia a instância, a fase de execução e os critérios que a acionam. Quando uma requisição atende a esses critérios, a função é executada na infraestrutura distribuída da Azion. +Azion CLI gerencia as Function Instances de uma Application com cinco comandos sob o substantivo `function-instance`. Todo comando recebe `--application-id`, e um comando que age sobre uma Function Instance recebe o ID dela em `--instance-id`. -Run Function está disponível na Request Phase e na Response Phase, e exige o módulo [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). Na API da Azion, o comportamento é `run_function` e o atributo `value` dele carrega o ID da instância. +| Comando | O que faz | Flags | +| --- | --- | --- | +| `azion create function-instance` | Cria uma Function Instance | `--application-id`, `--function-id`, `--name`, `--args`, `--active`, `--file` | +| `azion list function-instance` | Lista as Function Instances de uma Application | `--application-id`, `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion describe function-instance` | Retorna uma Function Instance | `--application-id`, `--instance-id` | +| `azion update function-instance` | Altera uma Function Instance | `--application-id`, `--instance-id`, `--function-id`, `--name`, `--args`, `--active`, `--file` | +| `azion delete function-instance` | Exclui uma Function Instance | `--application-id`, `--instance-id` | -Para as fases de execução, os critérios e a ordem em que os comportamentos são executados, consulte [Como funciona](/pt-br/documentacao/plataforma/functions/como-funciona/). +`--function-id` define o campo `function`, e `--args` define `args`. Em `azion create function-instance` e `azion update function-instance`, o padrão de `--active` é `true`. --- @@ -106,9 +140,9 @@ Para as fases de execução, os critérios e a ordem em que os comportamentos s - O caminho que uma requisição percorre de uma regra do Rules Engine até o código da sua função. - Os passos para criar uma instância em Azion Console e pela API da Azion. - Uma função que lê uma chave dos Args e responde com o valor. - O teto de tamanho dos Args e todos os outros limites de Functions. + O caminho que uma requisição percorre de uma regra do Rules Engine até o código da sua Function. + Os passos para criar uma Function Instance no Azion Console e pela API da Azion. + Uma Function que lê uma chave dos Args e responde com o valor. + O teto de tamanho dos Args e todos os outros limites de Functions. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/l2-caching.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/l2-caching.mdx index 0fb9b6c526..721a0a94b6 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/l2-caching.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/l2-caching.mdx @@ -1,8 +1,8 @@ --- title: Tiered Cache description: >- - Ative uma segunda camada de cache entre o cache da Azion e a sua origem, - defina a sua topology e o seu piso de TTL, e purgue-a por cache key. + Ative uma segunda camada de cache entre o data center que responde a uma + requisição e a sua origem, escolha a sua topology e purgue-a por cache key. meta_tags: 'tiered cache, camada de cache, topology, cache settings, max age, purge de cache, real-time purge, cache' namespace: documentation_products_edge_application_l2_caching permalink: /documentacao/plataforma/applications/cache/tiered-cache/ @@ -12,45 +12,42 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -O **Tiered Cache** é uma segunda camada de cache entre o [Cache](/pt-br/documentacao/plataforma/applications/cache/) e a sua origem, mantida em uma região. A primeira camada é o cache do data center que respondeu a requisição. A segunda camada é compartilhada por cada data center e mantém objetos por mais tempo do que a primeira. +**Tiered Cache** é uma feature de [Cache](/pt-br/documentacao/plataforma/applications/cache/) que adiciona uma segunda camada de cache entre o data center que responde a uma requisição e a sua origem. A primeira camada é o cache desse data center. A segunda camada fica na região que a `topology` de um cache setting seleciona. -Quando uma requisição não encontra a cópia na primeira camada, o data center consulta a camada do Tiered Cache antes de consultar a origem. Um objeto buscado uma vez na origem é então entregue a cada data center por essa camada. Você ativa a camada por cache setting, e ela se aplica aos objetos que esse setting coloca em cache. Para o caminho completo da requisição, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/). +Quando uma requisição resulta em um miss na primeira camada, o data center consulta a camada do Tiered Cache antes que a requisição siga para a origem. Uma cópia válida do objeto requisitado nessa camada responde ao miss, e a origem não recebe nenhuma requisição. Você ativa a camada por cache setting, e ela se aplica aos objetos que esse setting coloca em cache. Para saber como as duas camadas respondem a uma requisição, consulte [Expiração e atualização](/pt-br/documentacao/plataforma/applications/cache/expiracao-e-atualizacao/#tiered-cache). -Um miss na primeira camada é respondido pela infraestrutura da Azion em vez da sua origem. A resposta chega com menos latência, e menos requisições chegam à origem. A origem lida com menos carga a um custo de infraestrutura menor, e um objeto permanece em cache por mais tempo. O preço é um salto extra em um miss na primeira camada e um piso no TTL do setting. +Uma resposta da camada do Tiered Cache chega com menos latência do que uma resposta da origem, e menos requisições chegam à origem. A origem lida com menos carga a um custo de infraestrutura menor. O preço é um salto extra em um miss na primeira camada. Com [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) ativo, Tiered Cache também define um piso de 3 segundos no tempo de vida (TTL) do cache setting. --- ## Interfaces -O Tiered Cache é um campo de um cache setting, então cada interface que escreve um cache setting o ativa. A tabela nomeia onde o controle fica em cada uma. +Um cache setting ativa Tiered Cache no seu objeto `modules.cache.tiered_cache`, e as quatro interfaces abaixo escrevem esse objeto. A tabela nomeia onde o controle fica em cada uma. | Interface | Onde | Valor | | --- | --- | --- | -| [Azion Console](https://console.azion.com/) | A seção **Cache** do drawer **Create Cache Settings**, na aba **Cache Settings** de uma aplicação em [Applications](/pt-br/documentacao/plataforma/applications/) | O toggle **Tiered Cache**, desativado em um setting novo | -| [Azion API v4](/pt-br/documentacao/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `modules.cache.tiered_cache.enabled`, `true` ou `false`, e `modules.cache.tiered_cache.topology` | -| [Azion CLI](/pt-br/documentacao/devtools/cli/) | `azion create cache-setting --file` com o corpo JSON | O mesmo objeto `tiered_cache`. A flag `--tiered-caching-enabled` sozinha é rejeitada com o erro `21001`, porque nenhuma flag define o comportamento de cache | +| [Azion Console](https://console.azion.com/) | A seção **Cache** do drawer **Create Cache Settings**, na aba **Cache Settings** de uma Application em [Applications](/pt-br/documentacao/plataforma/applications/) | O toggle **Tiered Cache**, desativado em um setting novo, e o select **Tiered Cache Region**, com `nearest-region` como padrão. Ativar o toggle desabilita _Honor cache policies_ e seleciona _Override cache behavior_ | +| [Azion API v4](/pt-br/documentacao/devtools/api/) | `POST /v4/workspace/applications/{application_id}/cache_settings` | `modules.cache.tiered_cache.enabled`, `true` ou `false`, e `modules.cache.tiered_cache.topology`, `nearest-region` quando o corpo não o envia | +| [Azion CLI](/pt-br/documentacao/devtools/cli/) | `azion create cache-setting --file` com o corpo JSON | O mesmo objeto `tiered_cache`. A flag `--tiered-caching-enabled` sozinha é recusada com o erro `21001` | | `azion.config.js` | Uma entrada do array `cache`, do tipo `AzionCache` | `tieredCache: { enabled, topology }` | -Duas condições se aplicam ao setting. O seu comportamento de cache precisa ser _Override cache behavior_, porque a API rejeita o Tiered Cache sob _Honor cache policies_ com o erro `21001`. O seu **Max Age** precisa ser de pelo menos 3 segundos, ou a API retorna o erro `21020`. +:::note[nota] +Duas condições se aplicam ao cache setting. O seu `modules.cache.behavior` precisa ser `override`, porque a API recusa Tiered Cache sob `honor` com o erro `21001`. A CLI só define o comportamento de cache no corpo JSON do `--file`. Com [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) ativo na Application, o `modules.cache.max_age` do cache setting precisa ser de pelo menos 3 segundos, ou a API retorna o erro `21020`. Sem Application Accelerator, vale o piso de 60 segundos de todo cache setting, e a API retorna `21021`. +::: -O Tiered Cache está incluído em todos os planos de serviço e é ativado por cache setting. Para todos os campos de um cache setting, com o título e a correção de cada erro, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). Para os passos no Console que aplicam um setting a um path, consulte [Configure políticas de cache para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/). +Tiered Cache está incluído em todos os planos de serviço. Para todos os campos de um cache setting, com o título e a correção de cada erro, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/). Para os passos no Console que aplicam um setting a um path, consulte [Configure políticas de cache para uma aplicação](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/). --- ## Topology -A `topology` de um cache setting nomeia a região que hospeda a camada do Tiered Cache para os objetos que esse setting coloca em cache. A API, o corpo JSON da CLI e o `azion.config.js` aceitam valores como os abaixo. Um valor que a API não aceita retorna o erro `10039`, `Invalid Choice`. - -| Valor | Significado | -| --- | --- | -| `nearest-region` | Região mais próxima | -| `us-east-1` | Estados Unidos, leste | +A `topology` de um cache setting seleciona onde a camada do Tiered Cache mantém os objetos que esse setting coloca em cache. Azion Console, a API, o corpo JSON da CLI e o `azion.config.js` aceitam valores como `nearest-region` e `us-east-1`, e a [referência da Azion API](https://api.azion.com/) lista todos os valores aceitos. Um valor que a API não aceita retorna o erro `10039`, `Invalid Choice`. --- ## TTL -O tempo de vida (TTL) de um objeto na camada do Tiered Cache é o **Max Age** do seu cache setting. Enquanto o toggle está ativo, esse campo carrega um piso de 3 segundos. Um setting novo começa em 60 segundos, o padrão do **Max Age** no Console, na API e na CLI. Por exemplo, um **Max Age** de 2 segundos com o Tiered Cache ativo é rejeitado com o erro `21020`. O mesmo setting com 3 segundos é aceito. O Tiered Cache é feito para objetos que permanecem em cache por muito tempo. +O tempo de vida (TTL) de um objeto na camada do Tiered Cache é o Max Age do seu cache setting, o campo `modules.cache.max_age`. Enquanto Tiered Cache e Application Accelerator estão ativos, esse campo tem um piso de 3 segundos. Um cache setting novo começa em 60 segundos, o padrão do Max Age no Azion Console, na API e na CLI. Por exemplo, em uma Application com Application Accelerator ativo, um Max Age de 2 segundos com Tiered Cache ativo é recusado com o erro `21020`. O mesmo setting com 3 segundos é aceito. O teto é o teto do próprio TTL de cache. Para o valor e o erro além dele, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache). @@ -58,21 +55,21 @@ O teto é o teto do próprio TTL de cache. Para o valor e o erro além dele, con ## Purge -O [Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) remove um objeto da camada do Tiered Cache antes do fim do seu TTL. A camada é `tiered_cache` no corpo da API e na flag `--layer` do `azion purge`. Um purge por cache key é o único tipo que a alcança. Um purge por URL ou por wildcard com essa camada retorna o erro `30001`, `Invalid Purge Layer For Purge Type`. +[Real-Time Purge](/pt-br/documentacao/plataforma/applications/cache/real-time-purge/) remove um objeto da camada do Tiered Cache antes do fim do seu TTL. A camada é `tiered_cache` no corpo da API e na flag `--layer` do `azion purge`. Um purge por cache key é o único tipo que a alcança. Um purge por URL ou por wildcard com essa camada retorna o erro `30001`, `Invalid Purge Layer For Purge Type`. -Para remover um objeto mantido nas duas camadas, purgue primeiro o Tiered Cache e depois o Cache, para que a primeira camada não seja reabastecida por uma cópia desatualizada do Tiered Cache. Para os passos no Console, na API e na CLI, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). +Para remover um objeto mantido nas duas camadas, purgue primeiro Tiered Cache e depois Cache. Nessa ordem, a primeira camada não é reabastecida por uma cópia desatualizada do Tiered Cache. Para os passos no Console, na API e na CLI, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). --- ## Bypass Cache -Uma regra com [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) no Rules Engine afeta o cache da Azion, e não a camada do Tiered Cache. Uma aplicação com cache settings de Tiered Cache ativos continua a colocar objetos em cache nessa camada pelo TTL mínimo. Para o sintoma que isso produz e o que fazer a respeito, consulte [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#cache). +Uma regra com o behavior [Bypass Cache](/pt-br/documentacao/plataforma/applications/rules-engine/#bypass-cache) no [Rules Engine](/pt-br/documentacao/plataforma/applications/rules-engine/) afeta o cache da Azion, e não a camada do Tiered Cache. Uma Application cujos cache settings ativam Tiered Cache continua a colocar objetos em cache nessa camada pelo Max Age do cache setting, o seu campo `modules.cache.max_age`. Para o sintoma que isso produz e o que fazer a respeito, consulte [Solucione problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/#cache). --- ## Observabilidade -O [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) carrega um dataset **Tiered Cache** ao lado do seu dataset de Cache. O [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) também carrega um dataset **Tiered Cache**. Os dados que o Tiered Cache transferiu são consultados por GraphQL. Para a consulta e a sua resposta, consulte [Consulte dados de uso do Tiered Cache](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-tiered-cache-com-graphql/). +[Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) carrega um dataset de Tiered Cache ao lado do seu dataset de Cache. [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) também carrega um dataset de Tiered Cache. Por GraphQL, você consulta os dados que Tiered Cache transfere. Para a consulta e a sua resposta, consulte [Consulte dados de uso do Tiered Cache](/pt-br/documentacao/guias/plataforma/observabilidade/consultar-dados-de-uso-tiered-cache-com-graphql/). --- @@ -82,7 +79,7 @@ O [Real-Time Metrics](/pt-br/documentacao/plataforma/real-time-metrics/) carrega Todos os campos de um cache setting, com as linhas do Tiered Cache, os erros e o corpo da requisição. O caminho que uma requisição percorre pela primeira camada, pela camada do Tiered Cache e pela origem. - O piso e o teto do TTL com o Tiered Cache ativo, e o que cada plano inclui. + O piso e o teto do TTL com Tiered Cache ativo. Os passos no Console, na API e na CLI que purgam um objeto da camada do Tiered Cache por cache key. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/main-settings.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/main-settings.mdx index ba95fb39b5..84551d3617 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/main-settings.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/main-settings.mdx @@ -1,6 +1,6 @@ --- title: Main Settings -description: 'Consulte as configurações de uma aplicação: o nome, os Produtos habilitados nela, Debug Rules e o status.' +description: 'Consulte as configurações de uma Application: o nome, os recursos da plataforma ativados nela, Debug Rules e o status.' meta_tags: 'applications, main settings, modules, application accelerator, cache, functions, image processor, debug rules, status' namespace: documentation_products_edge_application_delivery permalink: /documentacao/plataforma/applications/main-settings/ @@ -13,78 +13,87 @@ import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet. [Main Settings | v3](/pt-br/documentacao/plataforma/applications/main-settings-v3/) -Main Settings é o conjunto de valores que se aplicam a uma [aplicação](/pt-br/documentacao/plataforma/applications/) como um todo: o nome, os Produtos habilitados nela, Debug Rules e o status. Azion Console agrupa esses valores na aba **Main Settings** da aplicação, e a API os retorna como campos do objeto da aplicação. Para o caminho que uma requisição percorre em uma aplicação, consulte [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/). +Main Settings é o conjunto de valores que se aplicam a uma [Application](/pt-br/documentacao/plataforma/applications/) como um todo: o nome, os recursos da plataforma ativados nela, se ela registra as regras que cada requisição executa e se ela está ativa. Azion Console agrupa esses valores na aba **Main Settings** da Application, e a API os retorna como campos da Application. Para o caminho que uma requisição percorre em uma Application, consulte [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/). --- ## Seções e campos -A aba **Main Settings** tem quatro seções: **General**, **Modules**, **Debug Rules** e **Status**. **General** guarda o **Name** da aplicação. A aba traz **Cancel** e **Save**, e uma alteração é salva com **Save**. +No Azion Console, a aba **Main Settings** de uma Application tem quatro seções: **General**, **Modules**, **Debug Rules** e **Status**. A aba traz **Cancel** e **Save**, e uma alteração é salva com **Save**. -Cada seção corresponde a um ou mais campos da aplicação na API. A última coluna traz o valor que cada campo assume quando uma requisição de criação envia apenas `name` e `active`. +Cada seção corresponde a um ou mais campos da Application na API. A última coluna traz o valor que cada campo assume quando uma requisição de criação envia apenas `name` e `active`. | Seção | Configuração | Campo da API | Tipo | Valor na criação | | --- | --- | --- | --- | --- | -| **General** | **Name** | `name` | string | O valor que a requisição de criação envia | -| **Modules** | Um toggle por Produto | `modules..enabled` | boolean | `true` para `cache` e `functions`, `false` para `application_accelerator` e `image_processor` | -| **Debug Rules** | **Debug Rules** | `debug` | boolean | `false` | -| **Status** | **Status** | `active` | boolean | O valor que a requisição de criação envia | +| **General** | **Name** | `name` | string, de 1 a 100 caracteres | O valor que a requisição de criação envia | +| **Modules** | Um switch por recurso da plataforma | `modules..enabled` | boolean | `true` para `cache` e `functions`, `false` para `application_accelerator` e `image_processor` | +| **Debug Rules** | **Active** | `debug` | boolean | `false` | +| **Status** | **Active** | `active` | boolean | O valor que a requisição de criação envia, ou `true` quando a requisição o omite | -Por exemplo, uma aplicação que você cria pela API apenas com `name` e `active` tem Cache e [Functions](/pt-br/documentacao/plataforma/functions/) ativados desde o início, e Application Accelerator fica desativado até você ativá-lo. +Por exemplo, uma Application que você cria pela API apenas com `name` e `active` tem [Cache](/pt-br/documentacao/plataforma/applications/cache/) e [Functions](/pt-br/documentacao/plataforma/functions/) ativados desde o início. [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/) fica desativado até você ativá-lo. -O toggle **Status** desativa a aplicação e a ativa de novo sem excluí-la. A API carrega o mesmo estado no boolean `active`. +O status, o boolean `active` na API, desativa a Application e a ativa de novo sem excluí-la. --- -## Produtos +## Recursos da plataforma -A seção **Modules** ativa ou desativa Produtos em uma aplicação, e cada aplicação mantém o próprio conjunto. O grupo **Default Modules** dessa seção tem um toggle por Produto: **Application Accelerator**, **Cache**, **Functions** e **Image Processor**. Um grupo **Subscription modules** traz uma ação **Contact sales**, e a seção informa que "Some modules require subscription." +No Azion Console, os switches que ativam ou desativam recursos da plataforma em uma Application ficam na seção **Modules**, e cada Application mantém o próprio conjunto. O grupo **Default Modules** dessa seção tem um switch por recurso da plataforma: **Application Accelerator**, **Cache**, **Functions** e **Image Processor**. Um grupo **Subscription modules** traz uma ação **Contact sales**, e a seção informa `Some modules require subscription.` -| Produto | Chave em `modules` | Flag da CLI | O que cobre na aplicação | +| Recurso da plataforma | Chave em `modules` | Flag da CLI | O que cobre na Application | | --- | --- | --- | --- | -| Application Accelerator | `application_accelerator` | `--application-accelerator` | As variáveis e os behaviors do Rules Engine que Azion Console marca com `- Required Application Accelerator`. Um cache setting precisa dele para as variações da seção **Application Accelerator** e para um **Max Age** menor que 60 segundos | -| Cache | `cache` | `--cache` | O armazenamento em cache do conteúdo que a aplicação entrega. Os cache settings são criados na aba **Cache Settings** e aplicados por um behavior **Set Cache Policy** | -| Functions | `functions` | `--functions` | As instâncias de função, listadas na aba **Functions Instances** e executadas por um behavior **Run Function**. Azion Console marca um behavior que precisa de Functions com `- Required Function` | -| Image Processor | `image_processor` | `--image-processor` | O behavior **Optimize Images**. Azion Console marca um behavior que precisa de Image Processor com `- Required Image Processor` | +| Application Accelerator | `application_accelerator` | `--application-accelerator` | Os behaviors marcados com `- Required Application Accelerator` e a variável `${request_uri}` | +| Cache | `cache` | `--cache` | O armazenamento em cache do conteúdo que a Application entrega | +| Functions | `functions` | `--function` na criação, `--functions` na atualização | As Function Instances, invocadas por um behavior _Run Function_ | +| [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) | `image_processor` | `--image-processor` | O behavior _Optimize Images_ | -Cache fica ativado quando você cria uma aplicação, e Azion Console informa que ele é "Automatically enabled in all accounts." Você pode ativar um Produto quando a sua conta oferece suporte a ele, e desativá-lo quando nada na aplicação depende dele. Ativar um Produto pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/). +No Azion Console, o formulário do **Rules Engine** marca um behavior cujo recurso da plataforma está desativado com `- Required Application Accelerator`, `- Required Function` ou `- Required Image Processor`. Um cache setting também precisa de Application Accelerator para as variações do seu objeto `modules.application_accelerator`, e para um Max Age, o seu campo `modules.cache.max_age`, menor que 60 segundos. -Uma regra ou um cache setting que precisa de um Produto desativado na aplicação é recusado quando você o salva, com um dos códigos da seção Erros. Por exemplo, uma regra de requisição cujo critério lê `${request_uri}` é recusada enquanto Application Accelerator está desativado, e a mesma regra com `${uri}` é aceita. Para as variáveis e os behaviors que cada Produto adiciona, consulte [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/). +Os cache settings e as Function Instances pertencem à Application, fora de Main Settings. Um behavior _Set Cache Policy_ aplica um cache setting, e um behavior _Run Function_ invoca uma Function Instance. [Primeiros passos com Cache](/pt-br/documentacao/plataforma/applications/cache/primeiros-passos/) e [Instancie uma função em uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/) mostram onde criar cada um no Azion Console. -Tiered Cache não tem toggle na seção **Modules**. Ele é um switch dentro de cada cache setting. Para mais informações, consulte [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). +Cache fica sempre ativado em uma Application: a API recusa `modules.cache.enabled` definido como `false` com o erro `31001`, `Cache Cannot Be False`. Azion Console mostra o switch **Cache** travado como ativado, com a nota `Automatically enabled in all accounts.` Você pode ativar outro recurso da plataforma quando a sua conta oferece suporte a ele, e desativá-lo quando nada na Application depende dele. Ativar um recurso da plataforma pode gerar custos relacionados ao uso. Para mais informações, consulte [Preços](/pt-br/documentacao/fundamentos/precos/). + +Enquanto Application Accelerator está desativado, a API recusa uma regra de requisição cujo critério lê `${request_uri}`. Ela também recusa um cache setting que varia o cache por método, query string, cookie ou device group, ou que define um Max Age menor que 60 segundos. Cada recusa traz um dos códigos da seção Erros, e a mesma regra com `${uri}` é aceita. Para as variáveis e os behaviors que cada recurso da plataforma adiciona, consulte [Rules Engine para Applications](/pt-br/documentacao/plataforma/applications/rules-engine/). + +[Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/) não é um dos quatro switches de `modules` de uma Application: é uma feature de Cache, e cada cache setting o ativa no seu campo `modules.cache.tiered_cache.enabled`. --- ## Debug Rules -Debug Rules registra as regras do Rules Engine executadas em cada requisição à aplicação. A configuração fica desativada quando você cria uma aplicação, e a API a guarda no boolean `debug`. No Azion Console, o toggle **Debug Rules** a define. +Debug Rules registra as regras do Rules Engine executadas em cada requisição à Application. A configuração fica desativada quando você cria uma Application, e a API a guarda no boolean `debug`. No Azion Console, o switch **Active** da seção **Debug Rules** define essa configuração. Na [Azion CLI](/pt-br/documentacao/devtools/cli/), `--debug-enabled` define essa configuração em `azion create application` e em `azion update application`. -Com Debug Rules ativado, as regras executadas em uma requisição aparecem no campo `$traceback` do Data Stream e do [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/). A API GraphQL do Real-Time Events retorna as mesmas regras no campo `stacktrace`. Uma regra que não está nessa lista não foi executada na requisição. +Com Debug Rules ativado, as regras executadas em uma requisição aparecem no campo `$traceback` do [Data Stream](/pt-br/documentacao/plataforma/data-stream/) e do [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/). A API GraphQL do Real-Time Events retorna as mesmas regras no campo `stacktrace`. Uma regra que não está nessa lista não foi executada na requisição. -Por exemplo, quando uma regra **Set Cache Policy** parece não ter efeito em um path, o `$traceback` de uma requisição a esse path mostra se a regra chegou a ser executada. Para as consultas que leem o campo em cada ferramenta, consulte [Depure regras criadas com Rules Engine](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/debug-regras/). +Por exemplo, uma regra _Set Cache Policy_ pode parecer sem efeito em um path. O `$traceback` de uma requisição a esse path mostra, então, se a regra chegou a ser executada. Para as consultas que leem o campo em cada ferramenta, consulte [Depure regras criadas com Rules Engine](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/debug-regras/). --- ## Configurações de entrega e protocolo -Main Settings não traz configurações de entrega nem de protocolo. Domínios, protocolos e certificados pertencem ao [workload](/pt-br/documentacao/plataforma/workloads/) que serve a aplicação, e as **Deployment Settings** do workload selecionam a **Application** que ele executa. +Domínios, protocolos e certificados pertencem a um [Workload](/pt-br/documentacao/plataforma/workloads/), então você configura a entrega no Workload, não em Main Settings. Um Workload recebe cada requisição, e o deployment desse Workload define a Application que processa a requisição. No Azion Console, você define essa Application no campo **Application** das **Deployment Settings** do Workload. -Em uma conta que não migrou para a API v4, a própria aplicação guarda os protocolos de entrega, as portas e as configurações de TLS. Para essas configurações, consulte [Main Settings | v3](/pt-br/documentacao/plataforma/applications/main-settings-v3/). +Em uma conta que não migrou para a API v4, a própria Application guarda os protocolos de entrega, as portas e as configurações de TLS. Para essas configurações, consulte [Main Settings | v3](/pt-br/documentacao/plataforma/applications/main-settings-v3/). --- ## API -A API serve as aplicações em `https://api.azion.com/v4/workspace/applications`. Cada chamada se autentica com um [personal token](/pt-br/documentacao/fundamentos/personal-tokens/) no header `Authorization: Token [TOKEN VALUE]`, e uma chamada com corpo também envia `Content-Type: application/json`. +A API serve as suas Applications em `https://api.azion.com/v4/workspace/applications`. Cada chamada se autentica com um [personal token](/pt-br/documentacao/fundamentos/personal-tokens/) no header `Authorization: Token [TOKEN VALUE]`, e uma chamada com corpo também envia `Content-Type: application/json`. -| Operação | Método e path | Status | -| --- | --- | --- | -| Criar uma aplicação | `POST /workspace/applications` | `202`, com `state` definido como `pending` | -| Listar as aplicações da conta | `GET /workspace/applications` | `200` | -| Ler uma aplicação | `GET /workspace/applications/` | `200` | -| Alterar parte de uma aplicação | `PATCH /workspace/applications/` | `202`, com `state` definido como `pending` | +| Operação | Método e path | +| --- | --- | +| Criar uma Application | `POST /workspace/applications` | +| Listar as Applications da conta | `GET /workspace/applications` | +| Ler uma Application | `GET /workspace/applications/` | +| Substituir uma Application | `PUT /workspace/applications/` | +| Alterar parte de uma Application | `PATCH /workspace/applications/` | +| Excluir uma Application | `DELETE /workspace/applications/` | +| Clonar uma Application | `POST /workspace/applications//clone` | -Esta chamada cria uma aplicação apenas com um nome e um status: +Uma criação e um `PATCH` respondem `202`, com `state` definido como `pending`. Uma listagem e uma leitura respondem `200`. + +`name` é o único campo que uma requisição de criação exige. Esta chamada cria uma Application apenas com um nome e um status: ```bash curl --request POST \ @@ -104,9 +113,9 @@ A API responde `202`. Neste trecho do corpo, `modules` e `debug` trazem os valor {"state":"pending","data":{"id":,"name":"my-application",…,"modules":{"cache":{"enabled":true},"functions":{"enabled":true},"application_accelerator":{"enabled":false},"image_processor":{"enabled":false}},"active":true,"debug":false,…}} ``` -O `id` em `data` identifica a aplicação em todas as chamadas seguintes, incluindo os paths das regras dela, como `/workspace/applications//request_rules`. +O `id` em `data` identifica a Application em todas as chamadas seguintes, incluindo os paths das regras dela, como `/workspace/applications//request_rules`. -Esta chamada ativa Application Accelerator em uma aplicação existente: +Esta chamada ativa Application Accelerator em uma Application existente: ```bash curl --request PATCH \ @@ -129,13 +138,18 @@ A API responde `202` com `state` definido como `pending`. Um corpo com `function ## CLI -[Azion CLI](/pt-br/documentacao/devtools/cli/) lê e altera uma aplicação com três comandos sob o substantivo `application`. Cada flag de Produto recebe uma string, como `true`. +[Azion CLI](/pt-br/documentacao/devtools/cli/) lê e altera uma Application com seis comandos sob o substantivo `application`. Cada flag de um recurso da plataforma recebe uma string, como `true`. -| Comando | O que faz | -| --- | --- | -| `azion create application` | Cria uma aplicação. `--cache` e `--image-processor` definem esses Produtos na criação | -| `azion update application` | Altera a aplicação que `--application-id` nomeia. `--application-accelerator`, `--functions` e `--image-processor` ativam ou desativam um Produto | -| `azion describe application` | Retorna a aplicação que `--application-id` nomeia, com o objeto `modules` dela | +| Comando | O que faz | Flags | +| --- | --- | --- | +| `azion create application` | Cria uma Application | `--name`, `--active`, `--debug-enabled`, `--application-accelerator`, `--cache`, `--function`, `--image-processor`, `--file` | +| `azion update application` | Altera a Application que `--application-id` nomeia | `--application-id`, `--name`, `--active`, `--debug-enabled`, `--application-accelerator`, `--cache`, `--functions`, `--image-processor`, `--file` | +| `azion describe application` | Retorna uma Application, com o objeto `modules` dela | `--application-id` | +| `azion list application` | Lista as Applications da conta | `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion delete application` | Exclui a Application que `--application-id` nomeia | `--application-id`, `--cascade` | +| `azion clone application` | Copia uma Application com o nome em `--name` | `--application-id`, `--name` | + +A flag de Functions é `--function` em `azion create application` e `--functions` em `azion update application`. Em `azion delete application`, `--cascade` também exclui os recursos que `azion deploy` criou, e o padrão dela é `true`. Este comando ativa Application Accelerator: @@ -147,13 +161,13 @@ azion update application --application-id --application-acceler Updated Application with ID ``` -A saída de `azion describe application` inclui o objeto `modules` da aplicação: +A saída de `azion describe application` inclui o objeto `modules` da Application: ```bash azion describe application --application-id ``` -Em uma aplicação com os quatro Produtos ativados, o objeto fica assim: +Em uma Application com os quatro recursos da plataforma ativados, o objeto fica assim: ```json "modules": { @@ -168,7 +182,7 @@ Em uma aplicação com os quatro Produtos ativados, o objeto fica assim: ## Erros -Um Produto desativado na aplicação aparece como a recusa do objeto que precisa dele, com `400`. Cada uma dessas recusas nomeia Application Accelerator. Este corpo responde a uma regra de requisição com `${request_uri}`: +Um recurso da plataforma desativado na Application aparece como a recusa do objeto que precisa dele, com `400`. Cada uma dessas recusas nomeia Application Accelerator, exceto `31001`, que recusa desativar Cache. Este corpo responde a uma regra de requisição com `${request_uri}`: ```json { @@ -189,13 +203,14 @@ Um Produto desativado na aplicação aparece como a recusa do objeto que precisa } ``` -`meta.missing_required_modules` lista as chaves que devem ser ativadas no objeto `modules` da aplicação. +`meta.missing_required_modules` lista as chaves que devem ser ativadas no objeto `modules` da Application. | Código | Título | Status | O que causa | O que fazer | | --- | --- | --- | --- | --- | -| `25047` | Missing Required Modules | 400 | Uma regra de requisição cujos critérios leem `${request_uri}`, em uma aplicação com Application Accelerator desativado | Ative Application Accelerator, ou faça a correspondência com `${uri}`, que a API aceita sem ele | -| `21013` | This Configuration Requires The Edge Application's Application Accelerator Module | 400 | Um cache setting que varia o cache por método ou por query string, em uma aplicação com Application Accelerator desativado. O pointer nomeia a variação, como `/data/modules/application_accelerator/cache_vary_by_method` | Ative Application Accelerator e, em seguida, salve o cache setting novamente | -| `21021` | Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module | 400 | Um cache setting cujo `modules.cache.max_age` é menor que 60, em uma aplicação com Application Accelerator desativado. `meta.min_value` é `60` | Ative Application Accelerator, ou defina **Max Age** como 60 segundos ou mais | +| `25047` | `Missing Required Modules` | 400 | Uma regra de requisição cujos critérios leem `${request_uri}`, em uma Application com Application Accelerator desativado | Ative Application Accelerator, ou faça a correspondência com `${uri}`, que a API aceita sem ele | +| `21013` | `This Configuration Requires The Edge Application's Application Accelerator Module` | 400 | Um cache setting que varia o cache por método, query string, cookie ou device group, em uma Application com Application Accelerator desativado. O pointer nomeia a variação, como `/data/modules/application_accelerator/cache_vary_by_method` | Ative Application Accelerator e, em seguida, salve o cache setting novamente | +| `21021` | `Edge Cache Max Age Lower Than The Minimum Allowed By Application's Application Accelerator Module` | 400 | Um cache setting cujo `modules.cache.max_age` é menor que 60, em uma Application com Application Accelerator desativado. `meta.min_value` é `60` | Ative Application Accelerator, ou defina `modules.cache.max_age` como 60 segundos ou mais | +| `31001` | `Cache Cannot Be False` | 400 | Um `PATCH` que define `modules.cache.enabled` como `false` | Mantenha Cache ativado: ele não pode ser desativado | --- @@ -203,8 +218,8 @@ Um Produto desativado na aplicação aparece como a recusa do objeto que precisa - O mecanismo por trás de uma aplicação, das regras dela e dos Produtos que ela executa. - As variações de cache e os behaviors do Rules Engine que Application Accelerator adiciona a uma aplicação. + O mecanismo por trás de uma Application, das regras dela e dos recursos da plataforma ativados nela. + As variações de cache e os behaviors do Rules Engine que Application Accelerator adiciona a uma Application. Os campos Browser Cache, Cache e Application Accelerator de um cache setting. As consultas que leem as regras executadas em cada requisição quando Debug Rules está ativado. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/real-time-purge.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/real-time-purge.mdx index 19b507db9f..767829b222 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/real-time-purge.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/real-time-purge.mdx @@ -12,17 +12,19 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -O **Real-Time Purge** remove um objeto em cache do [Cache](/pt-br/documentacao/plataforma/applications/cache/), ou do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/), antes do fim do seu TTL, de modo que a requisição seguinte busca a versão atual na origem. Um purge recebe um de três argumentos: uma lista de URLs, uma lista de cache keys ou uma expressão com wildcard. A Azion coloca o purge em fila depois da confirmação e o lista no histórico de purges quando ele termina. Use um purge para entregar uma atualização que a origem já tem, para remover um objeto obsoleto, ou para manter o controle do que a Azion entrega em conteúdo dinâmico. Para os passos, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). Para o formato de uma key, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). +**Real-Time Purge** é um recurso da plataforma que remove um objeto em cache do [Cache](/pt-br/documentacao/plataforma/applications/cache/), ou do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/), antes do fim do seu tempo de vida (TTL). Quando o objeto não está mais no Cache nem no Tiered Cache, a requisição seguinte por esse objeto busca a versão atual na origem. Use um purge para entregar uma atualização que a origem já tem, para remover um objeto obsoleto ou para manter o controle do que a Azion entrega em conteúdo dinâmico. + +Um purge recebe um de três argumentos: uma lista de URLs, uma lista de cache keys ou uma expressão com wildcard. A Azion confirma cada purge, o coloca em fila e o lista no histórico de purges quando ele termina. Para os passos, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/). Para o formato de uma key, consulte [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). --- ## Interfaces -Cinco interfaces enviam o mesmo purge. Cada uma nomeia o tipo de purge, carrega a lista de argumentos e nomeia a camada. +Cinco interfaces enviam o mesmo purge. Cada uma nomeia o tipo de purge e carrega a lista de argumentos. Cada interface, exceto a Azion Lib, também nomeia a camada, e a Azion Lib purga a camada do Cache. | Interface | Purge | | --- | --- | -| [Azion Console](https://console.azion.com/) | **Real-Time Purge**, onde você escolhe o tipo de purge e a camada e insere a lista de argumentos. Para os passos, consulte [Purgue conteúdo em cache](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/purgar-conteudo-em-cache/) | +| [Azion Console](https://console.azion.com/) | **Real-Time Purge** > **Purge** abre **Create Real-Time Purge**, com **Layer Settings**, **Purge Type** e **Arguments List**, um argumento por linha | | [Azion API v4](/pt-br/documentacao/devtools/api/) | `POST /v4/workspace/purge/{purge_type}`, com `purge_type` igual a `url`, `cachekey` ou `wildcard`, e um corpo com `items` e `layer` | | Azion CLI | [`azion purge`](/pt-br/documentacao/devtools/cli/purge/) com `--urls`, `--cachekey` ou `--wildcard`, e `--layer` | | `azion.config.js` | Uma entrada do array `purge`, do tipo `AzionPurge`, com `type`, `items` e `layer` | @@ -39,9 +41,9 @@ Um purge nomeia a camada que ele limpa. O campo `layer` do corpo da API e a flag | Camada | Valor na API | O que ela purga | | --- | --- | --- | | Cache | `cache`, o padrão | Os objetos em cache na infraestrutura distribuída da Azion | -| Tiered Cache | `tiered_cache` | Os objetos da segunda camada de cache, em aplicações cujo cache setting tem o módulo ativo; apenas por cache key. Um purge por URL ou por wildcard com essa camada retorna o erro `30001` | +| Tiered Cache | `tiered_cache` | Os objetos da segunda camada de cache, em Applications cujos cache settings ativam Tiered Cache; apenas por cache key | -Para purgar um objeto das duas camadas, purgue primeiro o Tiered Cache e depois o Cache, para que o cache não seja reabastecido por uma cópia desatualizada do Tiered Cache. +Um purge por URL ou por wildcard com a camada `tiered_cache` retorna o erro `30001`. Para purgar um objeto das duas camadas, purgue primeiro Tiered Cache e depois Cache. Nessa ordem, o cache não é reabastecido por uma cópia desatualizada do Tiered Cache. --- @@ -57,7 +59,9 @@ O segmento `purge_type` do path da API, a flag da CLI e o tipo de purge do Conso ### Purge por URL -Um purge por URL recebe uma lista de URLs e não é recursivo: apenas as URLs da lista saem do cache. A Azion converte cada URL na sua cache key sem variação de conteúdo, então uma variação por cookie, device group ou formato de imagem não expira com ele. Purgue essas variações com um purge por cache key ou por wildcard. Uma variação por query string faz parte da URL, então ela expira quando os argumentos estão na mesma ordem da cache key. Com o **Sort** ativo no cache setting, envie os argumentos em ordem alfabética, ou use um purge por cache key ou por wildcard. Para o controle **Sort**, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#application-accelerator). +Um purge por URL recebe uma lista de URLs e não é recursivo: apenas as URLs da lista saem do cache. A Azion converte cada URL na sua cache key sem variação de conteúdo. Então uma variação por cookie, device group, formato de imagem ou corpo da requisição não expira com ele. Purgue essas variações com um purge por cache key ou por wildcard. + +Uma variação por query string faz parte da URL, então ela expira quando os argumentos estão na mesma ordem da cache key. Com o `sort_enabled` ativo no cache setting, envie os argumentos em ordem alfabética, ou use um purge por cache key ou por wildcard. Para o campo `sort_enabled`, consulte [Cache settings](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#application-accelerator). Uma URL é `scheme://host` ou `host`, com um `/path` e uma `?query-string` opcionais. Sem scheme, a Azion purga as cópias em HTTP e em HTTPS. Um asterisco (`*`) em um purge por URL é um caractere literal, e não um wildcard. A lista abaixo carrega quatro argumentos válidos de URL: @@ -68,11 +72,11 @@ Uma URL é `scheme://host` ou `host`, com um `/path` e uma `?query-string` opcio ### Purge por cache key -Um purge por cache key recebe uma lista de cache keys. Uma key nomeia uma variação de um objeto. Ela pode variar por query string, com ou sem **Sort**, por cookie, por device group ou por método da requisição pela **Advanced Cache Key** do [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/), ou por formato de imagem pelo [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/). Para purgar todas as variações de um objeto, liste cada key. Um purge por cache key é o único tipo que alcança a camada do Tiered Cache. +Um purge por cache key recebe uma lista de cache keys. Uma key nomeia uma variação de um objeto. Com Advanced Cache Key, uma feature de [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/), uma key pode variar por query string, ordenada ou não, e por cookie, device group ou método da requisição. Pelo [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/), uma key também pode variar por formato de imagem. Para purgar todas as variações de um objeto, liste cada key. Um purge por cache key é o único tipo que alcança a camada do Tiered Cache. ### Purge por wildcard -Um purge por wildcard recebe uma expressão: `scheme://host` ou `host`, com um `/path` e uma `?query-string` opcionais, e um asterisco (`*`) no path ou na query string. Vários asteriscos casam um path mais complexo. Cada requisição carrega uma expressão, e um purge por wildcard alcança apenas a camada do Cache, e não o Tiered Cache. A lista abaixo carrega dez expressões válidas: +Um purge por wildcard recebe uma expressão: `scheme://host` ou `host`, com um `/path` e uma `?query-string` opcionais. A expressão carrega um asterisco (`*`) no path ou na query string. Vários asteriscos casam um path mais complexo. Cada requisição carrega uma expressão, e um purge por wildcard alcança apenas a camada do Cache, e não a do Tiered Cache. A lista abaixo carrega dez expressões válidas: - `www.example.com/*` - `static.example.com/include/*.css` @@ -94,22 +98,22 @@ Quando um cache setting varia a cache key, um objeto tem uma key por variação. | Variação | Como purgar | | --- | --- | | Cookies | Um purge por cache key que lista cada variação, ou um purge por wildcard com `@@*` no fim | -| Query string | Um purge por cache key que lista cada variação, um purge por wildcard com `?*` no fim, ou um purge por URL que nomeia apenas os argumentos da key, em ordem alfabética quando o **Sort** está ativo | -| Device group | Um purge por cache key que lista cada variação, ou um purge por wildcard | +| Query string | Um purge por cache key que lista cada variação, um purge por wildcard com `?*` no fim, ou um purge por URL que nomeia apenas os argumentos da key, em ordem alfabética quando o `sort_enabled` está ativo | +| Device group | Um purge por cache key que lista cada variação, ou um purge por wildcard com `@@*` no fim | | Image Processor | Um purge por cache key que lista cada variação, ou um purge por wildcard com `*` no fim | | Large File Optimization | Um purge por cache key que lista a key de cada fragmento, ou um purge por wildcard como `static.example.com/media/file.mp4*` | | `POST` e `OPTIONS` em cache | Um purge por cache key que lista cada variação, ou um purge por wildcard com `@@*` no fim | -As variações por query string, por cookie, por device group e por método da requisição vêm da **Advanced Cache Key**, um recurso do [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). O mesmo módulo coloca em cache respostas `POST` e `OPTIONS`; sem ele, a Azion coloca em cache apenas `GET` e `HEAD`. Para os behaviors, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/). +As variações por query string, por cookie, por device group e por método da requisição vêm de Advanced Cache Key, em [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/). Application Accelerator também coloca em cache respostas `POST` e `OPTIONS`; sem ele, a Azion coloca em cache apenas `GET` e `HEAD`. Para os behaviors, consulte [Configurações do Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/). -Uma imagem que o [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) entrega tem uma key por processamento e por formato. A key carrega o host e o path, os argumentos de processamento depois do separador `?`, e o formato depois de `@@`. As quatro keys abaixo pertencem a uma imagem: +Uma imagem que [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) entrega tem uma key por processamento e por formato quando o cache setting nomeia `ims` na allowlist de query string. Quando o cache setting não varia a key por query string, o valor de `ims` não faz parte da key, então todos os tamanhos e processamentos do path compartilham uma key, e o primeiro armazenado responde a todos os valores de `ims`. Com `ims` na allowlist, a key carrega o host e o path, depois `@@`, a query string `ims` e, no fim, o formato convertido, sem separador. As quatro keys abaixo pertencem a uma imagem: - `httpstatic.example.com/static/images/image.jpg@@` - `httpstatic.example.com/static/images/image.jpg@@webp` -- `httpstatic.example.com/static/images/image.jpg?ims=88x@@` -- `httpstatic.example.com/static/images/image.jpg?ims=88x@@webp` +- `httpstatic.example.com/static/images/image.jpg@@?ims=88x` +- `httpstatic.example.com/static/images/image.jpg@@?ims=88xwebp` -Com o **Large file optimization** ativo, a Azion coloca um objeto grande em cache em fragmentos, cada um com a sua própria key. O arquivo pode permanecer em cache depois de um purge da sua URL. Para purgá-lo, liste a key de cada fragmento, ou use o wildcard `static.example.com/media/file.mp4*`, que limpa cada fragmento de um arquivo. +Com a Large File Optimization ativa no cache setting, a Azion coloca um objeto grande em cache em fragmentos, cada um com a sua própria key. O arquivo pode permanecer em cache depois de um purge da sua URL. Para purgá-lo, liste a key de cada fragmento, ou use o wildcard `static.example.com/media/file.mp4*`. Esse wildcard limpa cada fragmento de um arquivo. :::caution[Atenção] Um purge de fragmentos individuais pode deixar fragmentos antigos e novos lado a lado. Quando o arquivo muda na origem, um fragmento que não foi purgado permanece no cache ao lado dos fragmentos buscados novamente. @@ -157,13 +161,13 @@ Cada comando imprime uma linha: Purge carried out successfully ``` -Depois do purge, a requisição seguinte pelo objeto retorna `x-cache: MISS`, porque a Azion o busca na origem novamente. +Quando um purge da camada do Cache termina, uma requisição pelo objeto enviada com `Pragma: azion-debug-cache` retorna `x-cache: MISS`, porque essa camada não tem mais o objeto. --- -## Confirmação +## Fila e histórico de purges -Depois que você cria um purge, uma mensagem confirma a criação. A Azion então coloca o purge em fila, e ele aparece no histórico de purges quando termina, porque o resultado leva tempo para propagar pela infraestrutura distribuída da Azion. O histórico pode ser filtrado pelo usuário que fez o purge, pelo horário, pela lista de argumentos, pelo tipo de purge e pelo método. +Depois que você cria um purge, uma mensagem confirma a criação. A Azion então coloca o purge em fila. O purge aparece no histórico de purges quando termina, porque o resultado leva tempo para propagar pela infraestrutura distribuída da Azion. No Azion Console, a lista do **Real-Time Purge** mostra cada purge com **Date**, **User**, **Layer**, **Type** e **Arguments**, e a ação **Repurge** envia o mesmo purge novamente. --- @@ -171,31 +175,37 @@ Depois que você cria um purge, uma mensagem confirma a criação. A Azion entã A API responde cada requisição abaixo com HTTP `400`. O corpo carrega o código, o título e um detalhe. -| Código | Título | Causa | O que fazer | -| --- | --- | --- | --- | -| `30001` | `Invalid Purge Layer For Purge Type` | `layer` é `tiered_cache` em um purge `url` ou `wildcard`; o detalhe diz `Invalid purge layer for purge type "url".` | Purgue o Tiered Cache por cache key, ou defina `layer` como `cache`. | -| `30003` | `Unauthorized Domain` | Um item nomeia um domínio que a conta não possui; o detalhe diz `The domain is not authorized for your account.` | Corrija o domínio no item. Um purge alcança apenas os domínios da conta. | -| `30005` | `Invalid Purge Cachekey` | Um item de um purge `cachekey` não é uma cache key válida; o detalhe diz `The Content must be a valid cachekey.` | Envie a key como o header `x-cache-key` a mostra; o formato está em [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). | -| `10065` | `List Field Max Length` | `items` tem mais de 50 elementos em um purge `url` ou `cachekey`, com o detalhe `Ensure this field has no more than 50 elements.`; ou mais de 1 elemento em um purge `wildcard`, com o detalhe `Ensure this field has no more than 1 elements.` e `meta.max_length` igual a `1`. | Divida a lista em requisições de 50 itens ou menos, e envie uma expressão com wildcard por requisição. | +| Código | Título | Causa | Detalhe | O que fazer | +| --- | --- | --- | --- | --- | +| `30001` | `Invalid Purge Layer For Purge Type` | `layer` é `tiered_cache` em um purge `url` ou `wildcard`. | `Invalid purge layer for purge type "url".` | Purgue Tiered Cache por cache key, ou defina `layer` como `cache`. | +| `30003` | `Unauthorized Domain` | Um item nomeia um domínio que a conta não possui. | `The domain is not authorized for your account.` | Corrija o domínio no item. Um purge alcança apenas os domínios da conta. | +| `30005` | `Invalid Purge Cachekey` | Um item de um purge `cachekey` não é uma cache key válida. | `The Content must be a valid cachekey.` | Envie a key como o header `x-cache-key` a mostra; o formato está em [Cache keys](/pt-br/documentacao/plataforma/applications/cache/cache-keys/). | +| `10065` | `List Field Max Length` | `items` tem mais de 50 elementos em um purge `url` ou `cachekey`, ou mais de 1 em um purge `wildcard`. | `Ensure this field has no more than 50 elements.`; em um purge `wildcard`, `Ensure this field has no more than 1 elements.`, com `meta.max_length` igual a `1` | Divida a lista em requisições de 50 itens ou menos, e envie uma expressão com wildcard por requisição. | --- ## Limites -Os limites abaixo se aplicam a requisições de purge. Cada linha nomeia a resposta da API além do valor, onde uma fonte a informa. +Os limites abaixo se aplicam a requisições de purge. Cada linha nomeia a resposta da API além do valor. | Valor | Limite | Além do limite | | --- | --- | --- | -| Tamanho de uma URL ou cache key | 4.096 caracteres | Nenhum erro é documentado | -| Requisições por URL e cache key por cliente | 200 requisições, 50 objetos por requisição | HTTP `400`, erro `10065` acima de 50 objetos em uma requisição | -| Objetos por minuto em purges por URL e cache key | 10.000 objetos a cada 60 segundos | Nenhum erro é documentado | -| Requisições de purge por wildcard por dia | 2.000 requisições em um intervalo de 24 horas | Nenhum erro é documentado | -| Tamanho de uma expressão com wildcard | 256 caracteres | Nenhum erro é documentado | +| Tamanho de uma URL ou cache key | 4.096 caracteres | A API aceita uma URL mais longa quando recebe a requisição: um purge de uma URL de 4.098 caracteres retorna HTTP `201`. | +| Objetos por requisição de purge por URL e cache key | 50 objetos | HTTP `400`, erro `10065` | | Expressões com wildcard por requisição | 1 | HTTP `400`, erro `10065` | -| Histórico de purges | 1.000.000 de requisições | Nenhum erro é documentado | -| Retenção do histórico de purges | 6 meses | Nenhum erro é documentado | -Para os purges que cada plano inclui, consulte [Limites de Applications](/pt-br/documentacao/plataforma/applications/limites/#cache). +Outros seis limites definem a taxa de requisições de purge, o tamanho de um wildcard e quanto histórico de purges a Azion mantém. + +| Valor | Limite | +| --- | --- | +| Requisições por URL e cache key por cliente | 200 requisições | +| Objetos por minuto em purges por URL e cache key | 10.000 objetos a cada 60 segundos | +| Requisições de purge por wildcard por dia | 2.000 requisições em um intervalo de 24 horas | +| Tamanho de uma expressão com wildcard | 256 caracteres | +| Histórico de purges | 1.000.000 de requisições | +| Retenção do histórico de purges | 6 meses | + +A página [Preços da Azion](https://www.azion.com/pt-br/precos/) lista os purges que cada plano inclui. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/rules-engine-edge-app.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/rules-engine-edge-app.mdx index f2aa511f7e..2bf30f1f44 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/rules-engine-edge-app.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/rules-engine-edge-app.mdx @@ -1,6 +1,6 @@ --- title: Rules Engine para Applications -description: Consulte cada variável de critério, operador e behavior que uma regra de aplicação pode usar, por fase, e o Produto que cada um exige. +description: Consulte cada variável de critério, operador e behavior que uma regra de uma Application pode usar, por fase, e o recurso da plataforma que cada um exige. meta_tags: 'applications, rules engine, request phase, response phase, criteria, variables, operators, behaviors, set connector, set cache policy, run function' namespace: documentation_products_edge_applications_rules_engine permalink: /documentacao/plataforma/applications/rules-engine/ @@ -10,22 +10,24 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -Rules Engine para Applications guarda a lógica condicional de uma [aplicação](/pt-br/documentacao/plataforma/applications/). Cada regra testa uma requisição contra os seus critérios, o _se_ da regra, e executa os seus behaviors, o _então_, somente quando a requisição corresponde. Toda regra pertence a uma fase: ela age sobre a requisição que o usuário envia ou sobre a resposta que o usuário recebe. Algumas variáveis e alguns behaviors exigem um Produto habilitado na aplicação, e cada tabela desta página indica qual. Para a ordem em que uma aplicação executa as suas regras e os seus behaviors, consulte [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/). +Rules Engine para Applications é uma feature de Applications que guarda as regras de uma [Application](/pt-br/documentacao/plataforma/applications/). Uma regra é uma lógica condicional que a Application aplica a uma requisição ou à resposta dela. Por exemplo, uma regra pode enviar a requisição a um [Connector](/pt-br/documentacao/plataforma/connectors/), aplicar um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) ou invocar uma [Function Instance](/pt-br/documentacao/plataforma/applications/functions-instances/). Cada regra tem critérios, o _se_ dela, e behaviors, o _então_. Ela executa os seus behaviors somente quando uma requisição corresponde aos seus critérios. Toda regra pertence a uma fase: a Request Phase age sobre a requisição, e a Response Phase age sobre a resposta. -Uma regra de aplicação decide como a aplicação trata uma requisição que chegou a ela, como o connector ou o cache setting que a requisição usa. Quando o deployment do workload nomeia um firewall, o firewall decide antes se a requisição chega ou não à aplicação. Para as regras dele, consulte [Rules Engine para Firewall](/pt-br/documentacao/plataforma/firewall/rules-engine/). +Algumas variáveis e alguns behaviors exigem um recurso da plataforma ativado na Application, e cada tabela desta página indica qual. Para a ordem em que uma Application executa as suas regras e os seus behaviors, consulte [Como Applications funciona](/pt-br/documentacao/plataforma/applications/como-funciona/). + +Quando o deployment de um [Workload](/pt-br/documentacao/plataforma/workloads/) define a Application e também um [Firewall](/pt-br/documentacao/plataforma/firewall/), o Firewall decide antes se a requisição chega ou não à Application. Para as regras dele, consulte [Rules Engine para Firewall](/pt-br/documentacao/plataforma/firewall/rules-engine/). --- ## Campos da regra -Uma aplicação guarda as suas regras na aba **Rules Engine** do Azion Console, onde **+ Rule** cria uma regra. Uma aplicação nova não tem regras. Na API, uma regra é um objeto JSON: uma requisição define cinco dos seus campos, e a plataforma define e retorna os outros cinco. +Uma Application nova não tem regras, e [Crie regras de request e response](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/rules-engine/) mostra como criar uma no Azion Console. Na API, uma regra é um objeto JSON: uma requisição define cinco dos seus campos, e a plataforma define e retorna os outros cinco. Para os campos que você define, a coluna Descrição também indica o rótulo de cada um no formulário de regra do Azion Console. | Campo | Tipo | Obrigatório | Descrição | | --- | --- | --- | --- | -| `id` | integer | Somente leitura | O identificador que toda chamada posterior sobre a regra usa. A lista de regras do Azion Console não o mostra, e `azion list rules-engine` o imprime como `ID` | -| `name` | string, de 1 a 250 caracteres | Sim | O nome que a lista de regras mostra. Azion Console o exibe como **Name**, na seção **General**. Dê a cada regra um nome único | -| `description` | string, até 1.000 caracteres | Não | Um comentário mostrado na lista de regras, exibido como **Description** em **General**. O padrão é uma string vazia. Com mais de 1.000 caracteres, Azion Console mostra `Description should not exceed 1000 characters` | -| `active` | boolean | Não | Se a regra é executada. O padrão é `true`. Azion Console o exibe como o switch **Active**, na seção **Status** | +| `id` | integer | Somente leitura | O identificador que toda chamada posterior sobre a regra usa | +| `name` | string, de 1 a 250 caracteres | Sim | O nome que a lista de regras mostra, exibido como **Name** em **General** | +| `description` | string, até 1.000 caracteres | Não | Um comentário que a lista de regras mostra, exibido como **Description** em **General**. O padrão é uma string vazia | +| `active` | boolean | Não | Se a regra é executada, o switch **Active** em **Status**. O padrão é `true` | | `criteria` | array de 1 a 5 grupos, cada um sendo um array de 1 a 10 critérios | Sim | As condições que uma requisição precisa atender. Critérios lista todas as variáveis e todos os operadores | | `behaviors` | array de 1 a 10 objetos de behavior | Sim | O que a regra faz quando a requisição corresponde. Behaviors lista cada um deles | | `order` | integer, de 0 a 199 | Somente leitura | A posição da regra na lista da sua fase | @@ -33,26 +35,28 @@ Uma aplicação guarda as suas regras na aba **Rules Engine** do Azion Console, | `last_modified` | date-time | Somente leitura | Quando a regra foi alterada pela última vez | | `created_at` | date-time | Somente leitura | Quando a regra foi criada | +A lista de regras do Azion Console não mostra `id`, e `azion list rules-engine` o imprime como `ID`. Dê a cada regra um nome único. Com mais de 1.000 caracteres em `description`, Azion Console mostra `Description should not exceed 1000 characters`. + A plataforma atribui `order` à medida que as regras são criadas: a primeira regra de uma fase carrega `0`, e a regra seguinte carrega `1`. Azion Console numera as mesmas posições a partir de `1`, então a regra cujo `order` é `0` é a que a lista dele mostra como `1`. A lista de regras do Azion Console permite mover uma regra, e uma posição além do fim da lista coloca a regra em último lugar. A API reordena uma fase com uma única chamada, que a seção API lista. --- ## Fases -Uma regra é executada na fase escolhida na seção **Phase** quando a regra é criada, e essa escolha é definitiva. Para executar a mesma lógica na outra fase, crie uma regra nova nessa fase. Azion Console agrupa a lista de regras por fase, e a API mantém cada fase em uma coleção própria. +Você define a fase de uma regra quando a cria, e não pode mudá-la depois. Para executar a mesma lógica na outra fase, crie uma regra nova nessa fase. No Azion Console, a lista de regras agrupa as regras por fase, e a API mantém cada fase em uma coleção própria. | Fase | Sobre o que as suas regras agem | Coleção na API | | --- | --- | --- | -| Request Phase | A requisição que o usuário envia à aplicação | `/v4/workspace/applications//request_rules` | -| Response Phase | A resposta que a aplicação entrega ao usuário | `/v4/workspace/applications//response_rules` | +| Request Phase | A requisição que o usuário envia à Application | `/v4/workspace/applications//request_rules` | +| Response Phase | A resposta que a Application entrega ao usuário | `/v4/workspace/applications//response_rules` | -Cada fase oferece o seu próprio conjunto de variáveis e behaviors. Um valor que só existe depois que a origem responde, como `${status}`, só pode ser lido na Response Phase. A coluna Fases da tabela de variáveis e as duas colunas de API da tabela de behaviors indicam qual fase aceita cada um. +Cada fase oferece o seu próprio conjunto de variáveis e behaviors. Um valor que só existe depois que a origem ou uma [Function](/pt-br/documentacao/plataforma/functions/) responde, como `${status}`, só pode ser lido na Response Phase. A coluna Fases da tabela de variáveis e as duas colunas de API da tabela de behaviors indicam qual fase aceita cada um. --- ## Critérios -Os critérios decidem sobre quais requisições uma regra age. Um critério nomeia uma variável, um operador e, para a maioria dos operadores, um argumento com o qual a variável é comparada. Na API, um critério é um objeto com quatro chaves: `variable`, `operator`, `conditional` e `argument`. +Um critério é uma condição que uma requisição precisa atender: uma variável, um operador e, para a maioria dos operadores, um argumento com o qual a variável é comparada. Na API, um critério é um objeto com quatro chaves: `variable`, `operator`, `conditional` e `argument`. Este critério corresponde a uma requisição de um navegador desktop, com uma expressão regular sobre o header `User-Agent`: @@ -62,30 +66,30 @@ Este critério corresponde a uma requisição de um navegador desktop, com uma e ### Variáveis -Uma variável contém um valor da requisição ou da resposta, e a coluna Fases indica onde um critério pode lê-la. `${request_uri}` e `${device_group}` exigem [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) na aplicação. Uma regra que lê uma das duas em uma aplicação sem o Produto é recusada: a API responde HTTP `400` com o código de erro `25047`, `Missing Required Modules`, cujo corpo completo está na seção Erros. `${uri}` não exige nenhum Produto, então é a variável de URI para uma aplicação sem Application Accelerator. +Uma variável é um valor da requisição ou da resposta, escrito `${name}`. A coluna Fases indica onde um critério pode lê-la. `${request_uri}` e `${device_group}` exigem [Application Accelerator](/pt-br/documentacao/plataforma/applications/application-accelerator/configuracoes/) ativado na Application. Uma regra que lê uma das duas em uma Application com Application Accelerator desativado é recusada. A API responde HTTP `400` com o código de erro `25047`, `Missing Required Modules`, e a seção Erros traz o corpo completo. `${uri}` não exige nenhum recurso da plataforma, então é a variável de URI para uma Application sem Application Accelerator. Seis linhas nomeiam um padrão, e não uma variável. Em `${arg_name}`, `${cookie_name}`, `${http_name}`, `${sent_http_name}`, `${upstream_cookie_name}` e `${upstream_http_name}`, substitua `name` pelo argumento, pelo cookie ou pelo header a ser lido. | Variável | O que contém | Exemplo | Fases | | --- | --- | --- | --- | -| `${arg_name}` | O valor do argumento de query string `name` | `${arg_search}` contém `test` para `/path?search=test` | Request, Response | +| `${arg_name}` | O valor do argumento de query string `name`. Troque cada hífen de `name` por um underscore | `${arg_search}` contém `test` para `/path?search=test` | Request, Response | | `${args}` | Todos os nomes e valores de argumentos da query string | `${args}` contém `search=test` para `/path?search=test` | Request, Response | -| `${cookie_name}` | O valor do cookie `name` | `${cookie_icl_current_language}` contém `pt-br` para `icl_current_language = pt-br` | Request, Response | -| `${device_group}` | O nome do [device group](/pt-br/documentacao/plataforma/applications/device-groups/) ao qual a requisição corresponde, da aba **Device Groups** da aplicação. Exige Application Accelerator | `Mobile` | Request, Response | +| `${cookie_name}` | O valor do cookie `name`. Troque cada hífen de `name` por um underscore | `${cookie_icl_current_language}` contém `pt-br` para `icl_current_language = pt-br` | Request, Response | +| `${device_group}` | O nome do [device group](/pt-br/documentacao/plataforma/applications/device-groups/) ao qual a requisição corresponde, entre os device groups da Application. Exige Application Accelerator | `Mobile` | Request, Response | | `${domain}` | O host name ou o header `Host` da requisição, como `${host}` o lê, sem o último subdomínio depois do domínio de segundo nível | `blog.domain.com` para `az.blog.domain.com` | Request, Response | -| `${geoip_city}` | O nome da cidade, da base de geolocalização `geoip_city` | `Frankfurt am Main` | Request, Response | -| `${geoip_city_continent_code}` | O código de duas letras do continente, da base de geolocalização `geoip_city` | `EU`, para Europa | Request, Response | -| `${geoip_city_country_code}` | O código de duas letras do país, da base de geolocalização `geoip_city` | `IN`, para Índia | Request, Response | -| `${geoip_city_country_name}` | O nome do país, da base de geolocalização `geoip_city` | `United States` | Request, Response | +| `${geoip_city}` | O nome da cidade | `Frankfurt am Main` | Request, Response | +| `${geoip_city_continent_code}` | O código de duas letras do continente | `EU`, para Europa | Request, Response | +| `${geoip_city_country_code}` | O código de duas letras do país | `IN`, para Índia | Request, Response | +| `${geoip_city_country_name}` | O nome do país | `United States` | Request, Response | | `${geoip_continent_code}` | O código de duas letras do continente | `NA`, para América do Norte | Request, Response | -| `${geoip_country_code}` | O código de duas letras do país, da base de geolocalização `geoip_country` | `RU`, para Rússia | Request, Response | -| `${geoip_country_name}` | O nome do país, da base de geolocalização `geoip_country` | `France` | Request, Response | +| `${geoip_country_code}` | O código de duas letras do país | `RU`, para Rússia | Request, Response | +| `${geoip_country_name}` | O nome do país | `France` | Request, Response | | `${geoip_region}` | O código de duas letras da região | `FL`, para Flórida | Request, Response | -| `${geoip_region_name}` | O nome da região, da base de geolocalização `geoip_region` | `Ontario` | Request, Response | +| `${geoip_region_name}` | O nome da região | `Ontario` | Request, Response | | `${host}` | Em ordem de precedência: o host name na linha da requisição, o valor do header `Host` ou o nome do servidor que atende a requisição | `blog.domain.com` | Request, Response | | `${http_name}` | O valor do header de requisição `name`. Escreva `name` em letras minúsculas e substitua cada hífen por um underscore. `name` precisa ser um [header de requisição HTTP](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) válido | `${http_accept}` contém `image/webp,image/apng` para `Accept: image/webp,image/apng` | Request, Response | | `${remote_addr}` | O endereço IP do cliente que envia a requisição | `200.10.2.50` | Request, Response | -| `${remote_port}` | A porta que o cliente usa na URL da sua requisição | `443` | Request, Response | +| `${remote_port}` | A porta TCP de origem da conexão do cliente, que muda de uma conexão para outra | `6742` | Request, Response | | `${remote_user}` | O nome de usuário enviado por autenticação básica, quando a requisição carrega um | `username` | Request, Response | | `${request}` | A primeira linha da requisição como o cliente a enviou: o método, a URI e a versão HTTP | `GET /path HTTP/2.0` | Request, Response | | `${request_body}` | O conteúdo do corpo da requisição, sem a linha de requisição nem os headers | `{"name": "azion", "action": "login"}` | Request, Response | @@ -105,23 +109,23 @@ Seis linhas nomeiam um padrão, e não uma variável. Em `${arg_name}`, `${cooki ### Variáveis de Mutual Transport Layer Security (mTLS) -Estas variáveis contêm o certificado de cliente que uma requisição apresenta por mTLS, em que o cliente também se autentica com um certificado. Um critério as lê somente na Request Phase. Para saber como um workload pede e valida certificados de cliente, consulte [mTLS](/pt-br/documentacao/plataforma/workloads/mtls/). +Estas variáveis contêm o certificado de cliente que uma requisição apresenta por mTLS, em que o cliente também se autentica com um certificado. Um critério as lê somente na Request Phase. Para saber como um Workload pede e valida certificados de cliente, consulte [mTLS](/pt-br/documentacao/plataforma/workloads/mtls/). | Variável | O que contém | Exemplo | | --- | --- | --- | | `${ssl_client_cert}` | O certificado de cliente no formato Privacy-Enhanced Mail (PEM). Descontinuada: leia `${ssl_client_escaped_cert}` em vez dela | `-----BEGIN CERTIFICATE-----` `MIICnz...` `-----END CERTIFICATE-----` | | `${ssl_client_escaped_cert}` | O certificado de cliente no formato PEM, como uma string codificada para URL | `-----BEGIN%20CERTIFICATE-----%0AMIICnz...%0A-----END%20CERTIFICATE-----` | | `${ssl_client_fingerprint}` | O fingerprint Secure Hash Algorithm 1 (SHA-1) do certificado de cliente | `2fd4e1c67a2d28fced849` | -| `${ssl_client_i_dn}` | A string do issuer DN do certificado de cliente | `/C=US/ST=California/L=San Francisco/O=Example CA/CN=issuer.com` | +| `${ssl_client_i_dn}` | A string do issuer Distinguished Name (DN) do certificado de cliente | `/C=US/ST=California/L=San Francisco/O=Example CA/CN=issuer.com` | | `${ssl_client_s_dn}` | A string do subject DN do certificado de cliente | `/C=US/ST=California/L=San Francisco/O=Example CA/CN=example.com` | -| `${ssl_client_s_dn_parsed}` | O subject CN extraído do certificado de cliente, como string | `example.com` | +| `${ssl_client_s_dn_parsed}` | O subject Common Name (CN) extraído do certificado de cliente, como string | `example.com` | | `${ssl_client_serial}` | O número de série do certificado de cliente | `6C:0A:83:7E:92:3B:D6:C6:E3:56:50:E7` | | `${ssl_client_v_end}` | A data de expiração do certificado de cliente, no formato `YYYYMMDDHHmmSS` | `20230115120000` | | `${ssl_client_v_remain}` | O número de dias até o certificado de cliente expirar | `100` | | `${ssl_client_v_start}` | A data de início do certificado de cliente, no formato `YYYYMMDDHHmmSS` | `20230115120000` | | `${ssl_client_verify}` | O resultado da verificação do certificado de cliente | `SUCCESS`, `FAILED:reason` ou `NONE` | -A maioria dos serviços mTLS espera receber o próprio certificado de cliente. Uma regra da Request Phase pode enviar `${ssl_client_escaped_cert}` à origem no header `X-Forward-Client-Cert` (XFCC) com _Add Request Header_, e a origem então lê os dados do certificado nesse header. +A maioria dos serviços mTLS espera receber o próprio certificado de cliente. Uma regra da Request Phase pode enviar `${ssl_client_escaped_cert}` à origem com _Add Request Header_, no header `X-Forward-Client-Cert` (XFCC). A origem então lê os dados do certificado nesse header. ### Variáveis em argumentos de behaviors @@ -143,12 +147,12 @@ Outras duas variáveis agem como funções: cada uma recebe um argumento, e as d | Variável | O que retorna | Exemplo | | --- | --- | --- | -| `${cookie_time_offset(number)}` | A data atual mais um offset de `number` segundos, para a expiração de um cookie | `cookie-name=cookie-value; Expires=${cookie_time_offset(3600)}` em [Add Cookie](#add-cookie) faz o cookie expirar 1 hora depois de ser criado | +| `${cookie_time_offset(number)}` | A data atual mais um offset de `number` segundos, para a expiração de um cookie | `cookie-name=cookie-value; Expires=${cookie_time_offset(3600)}` em [Add Response Cookie](#add-request-cookie-e-add-response-cookie) faz o cookie expirar 1 hora depois de ser criado | | `${encode_base64(string)}` | `string`, codificada em base64 | `${encode_base64(http://www.yourdomain.com/)}` retorna `aHR0cDovL3d3dy55b3VyZG9tYWluLmNvbS8=` | ### Operadores -Um critério compara a sua variável com o seu argumento por meio de um operador, e a API envia o operador como um destes valores em `operator`. Os operadores que Azion Console oferece podem variar conforme a variável que o critério usa. +Um critério compara a sua variável com o seu argumento por meio de um operador, e a API envia o operador como um destes valores em `operator`. | Operador | O critério corresponde quando | Argumento | | --- | --- | --- | @@ -158,14 +162,14 @@ Um critério compara a sua variável com o seu argumento por meio de um operador | `does_not_start_with` | O valor não começa com o argumento | String | | `matches` | O valor corresponde à expressão regular do argumento | Expressão regular | | `does_not_match` | O valor não corresponde à expressão regular do argumento | Expressão regular | -| `exists` | A variável tem um valor. `${arg_search}` existe quando a query string carrega um argumento `search` | Nenhum | -| `does_not_exist` | A variável não tem valor. `${arg_search}` não existe quando a query string não carrega um argumento `search` | Nenhum | +| `exists` | A variável tem um valor, como `${arg_search}` com um argumento `search` | Nenhum | +| `does_not_exist` | A variável não tem valor, como `${arg_search}` sem um argumento `search` | Nenhum | ### Condicionais -Os critérios se combinam dentro de grupos, e uma regra tem de 1 a 5 grupos de 1 a 10 critérios cada. Em um grupo, o primeiro critério carrega o condicional `if`, e cada critério seguinte carrega `and` ou `or`. Azion Console une os critérios com **And** e **Or**. +Os critérios se combinam dentro de grupos, e uma regra tem de 1 a 5 grupos de 1 a 10 critérios cada. Em um grupo, o primeiro critério carrega o condicional `if`, e cada critério seguinte carrega `and` ou `or`. No Azion Console, o formulário de regra une os critérios com **And** e **Or**. -Dentro de um grupo, `and` tem precedência sobre `or`. Para definir a precedência você mesmo, divida as condições em grupos: os grupos de uma regra são unidos por `and`, então uma requisição corresponde à regra somente quando corresponde a todos os grupos. Por exemplo, uma regra que precisa de `A or B`, e também de `C`, coloca `A or B` em um grupo e `C` em um segundo grupo. +Dentro de um grupo, `and` tem precedência sobre `or`. Para definir a precedência você mesmo, divida as condições em grupos. Os grupos de uma regra são unidos por `and`, então uma requisição corresponde à regra somente quando corresponde a todos os grupos. Por exemplo, uma regra que precisa de `A or B`, e também de `C`, coloca `A or B` em um grupo e `C` em um segundo grupo. Na API, `criteria` é uma lista de grupos, e cada grupo é uma lista de objetos de critério, como em `[[{ … }]]`. @@ -173,39 +177,45 @@ Na API, `criteria` é uma lista de grupos, e cada grupo é uma lista de objetos ## Behaviors -Behaviors são o que uma regra faz com uma requisição, ou com uma resposta, que corresponde aos seus critérios, e uma regra carrega de 1 a 10 deles. Azion Console rotula a primeira linha de behavior como **Then** e cada linha seguinte como **And**, e **+ Add Behavior** adiciona uma linha. Alguns behaviors não podem ser adicionados juntos, ou só podem sob algumas condições, e Azion Console recusa essas combinações. +Um behavior é uma ação que uma regra executa sobre uma requisição, ou sobre uma resposta, que corresponde aos seus critérios. Uma regra carrega de 1 a 10 behaviors. No Azion Console, o formulário de regra rotula a primeira linha de behavior como **Then** e cada linha seguinte como **And**. Alguns behaviors não podem ser adicionados juntos, e a API recusa essas combinações com HTTP `400`: + +- Um behavior depois de um behavior final, como _Deliver_, com `25010`. +- Um behavior que uma regra aceita só uma vez, como _Bypass Cache_, repetido na regra, com `25011`. +- _Set Cache Policy_ junto de _Deny (403 Forbidden)_, _Redirect To (301 Moved Permanently)_, _Redirect To (302 Found)_ ou _No Content (204)_, com `25012`. + +No Azion Console, **Add Behavior** fica desativado quando _Deliver_ está na regra. Na API, cada behavior é um objeto com um `type`. Um behavior que recebe um argumento o carrega em `attributes.value`, e _Capture Match Groups_ carrega, em vez disso, três atributos nomeados. Azion Console recusa alguns argumentos que contêm um espaço, com `Argument cannot contain spaces, use %20 instead`. -As duas colunas de API indicam o `type` que cada fase aceita, e a coluna Exige indica o Produto que a aplicação precisa ter habilitado. Quando esse Produto está desativado, Azion Console acrescenta _- Required Application Accelerator_, _- Required Image Processor_ ou _- Required Function_ ao rótulo. Uma aplicação nova tem Cache e Functions ativados, e Application Accelerator e Image Processor desativados. +As duas colunas de API indicam o `type` que cada fase aceita, e a coluna Exige indica o recurso da plataforma que precisa estar ativado na Application. Quando esse recurso da plataforma está desativado, Azion Console acrescenta _- Required Application Accelerator_, _- Required Image Processor_ ou _- Required Function_ ao rótulo. Uma Application nova tem [Cache](/pt-br/documentacao/plataforma/applications/cache/) e [Functions](/pt-br/documentacao/plataforma/functions/) ativados, e Application Accelerator e [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/) desativados. | Behavior | `type` na API, Request Phase | `type` na API, Response Phase | Exige | | --- | --- | --- | --- | -| Add Cookie | `add_request_cookie` | `set_cookie` | Application Accelerator | -| Add Request Header | `add_request_header` | `add_response_header` | Nenhum | +| Add Request Cookie / Add Response Cookie | `add_request_cookie` | `set_cookie` | Application Accelerator | +| Add Request Header / Add Response Header | `add_request_header` | `add_response_header` | Nenhum | | Bypass Cache | `bypass_cache` | Não disponível | Application Accelerator | | Capture Match Groups | `capture_match_groups` | `capture_match_groups` | Application Accelerator | | Deliver | `deliver` | `deliver` | Nenhum | | Deny (403 Forbidden) | `deny` | Não disponível | Nenhum | | Enable Gzip | `enable_gzip` | `enable_gzip` | Nenhum | | Enforce HLS cache | Adicionado pela Azion | Não disponível | Live Ingest | -| Filter Request Cookie | `filter_request_cookie` | `filter_response_cookie` | Application Accelerator | -| Filter Request Header | `filter_request_header` | `filter_response_header` | Nenhum | +| Filter Request Cookie / Filter Response Cookie | `filter_request_cookie` | `filter_response_cookie` | Application Accelerator | +| Filter Request Header / Filter Response Header | `filter_request_header` | `filter_response_header` | Nenhum | | Finish Request Phase | `finish_request_phase` | Não disponível | Nenhum | | Forward Cookies | `forward_cookies` | Não disponível | Application Accelerator | | No Content (204) | `no_content` | Não disponível | Nenhum | | Optimize Images | `optimize_images` | Não disponível | Image Processor | -| Redirect HTTP to HTTPS | `redirect_http_to_https` | Não disponível | HTTPS no workload | +| Redirect HTTP to HTTPS | `redirect_http_to_https` | Não disponível | HTTPS no Workload | | Redirect To (301 Moved Permanently) | `redirect_to_301` | `redirect_to_301` | Nenhum | | Redirect To (302 Found) | `redirect_to_302` | `redirect_to_302` | Nenhum | | Rewrite Request | `rewrite_request` | Não disponível | Application Accelerator | -| Run Function | `run_function` | `run_function` | Application Accelerator e Functions | +| Run Function | `run_function` | `run_function` | Functions | | Set Cache Policy | `set_cache_policy` | Não disponível | Nenhum | | Set Connector | `set_connector` | Não disponível | Nenhum | -### Add Cookie +### Add Request Cookie e Add Response Cookie -_Add Cookie_ adiciona um cookie no header `Set-Cookie`, em qualquer uma das fases, e exige Application Accelerator na aplicação. Em uma regra da Response Phase, o behavior é _Add Response Cookie_. O argumento tem a forma `cookie-name=cookie-value`, e o valor pode ser uma variável, como em `cookie-name=${arg_cookie}`. Azion Console verifica o argumento e mostra `This cookie is not valid` quando não consegue ler um cookie nele. +_Add Request Cookie_ adiciona um cookie no header `Set-Cookie` na Request Phase, e _Add Response Cookie_ faz o mesmo na Response Phase. Os dois exigem Application Accelerator ativado na Application. O argumento tem a forma `cookie-name=cookie-value`, e o valor pode ser uma variável, como em `cookie-name=${arg_cookie}`. Azion Console verifica o argumento e mostra `This cookie is not valid` quando não consegue ler um cookie nele. Na Response Phase, o argumento pode carregar atributos de [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) depois do valor, cada um depois de um ponto e vírgula (`;`): @@ -220,14 +230,16 @@ Um cookie com vários atributos os encadeia, como em `cookie-name=cookie-value; ### Add Request Header -_Add Request Header_ adiciona um header à requisição que a Azion envia à origem, na Request Phase, e não exige nenhum Produto. Uma regra da Response Phase adiciona, em vez disso, o header à resposta enviada ao usuário, com o `type` de API `add_response_header`. O argumento tem a forma `Field: value`, e Azion Console recusa qualquer outro formato com `Header must follow the header-name: value format`. +_Add Request Header_ adiciona um header à requisição que a Azion envia à origem, na Request Phase, e não exige nenhum recurso da plataforma. Uma regra da Response Phase adiciona, em vez disso, o header à resposta enviada ao usuário, com _Add Response Header_, o `type` de API `add_response_header`. O argumento tem a forma `Field: value`, e Azion Console recusa qualquer outro formato com `Header must follow the header-name: value format`. -O nome do header aceita somente letras (`a-z`, `A-Z`), números (`0-9`), hífens e underscores, e qualquer outro caractere torna o header inválido. O valor do header aceita letras, números e estes caracteres: +No Azion Console, o nome do header aceita letras, dígitos e os caracteres ``!#$%&'*+-.^_`|~``. Azion Console recusa qualquer outro caractere no nome com ``Header name can only use letters, digits and !#$%&'*+-.^_`|~``. O valor do header aceita letras, números e estes caracteres: ```text _ :;.,/"'?!(){}[]@<>=-+*#$&`|~^% ``` +Azion Console recusa um valor vazio com `Header value cannot be empty`, e um valor com quebra de linha ou caractere de controle com `Header value cannot contain line breaks or control characters`. A API verifica o valor com as próprias regras: ela aceita uma barra invertida, que a lista do Azion Console não traz, e recusa a letra acentuada `é` com HTTP `400` e o erro `25024`, `Invalid Header`. + O argumento comporta até 1.600 caracteres, e um argumento mais longo falha com `Argument too long`. Este argumento é um header válido: ```text @@ -238,20 +250,22 @@ Na API, o behavior é `add_request_header`, com o header em `attributes.value`, ### Bypass Cache -_Bypass Cache_ envia à origem as requisições que correspondem à regra, e a Azion não armazena a resposta em cache. Ele é executado na Request Phase e exige Application Accelerator na aplicação. O behavior não altera o cache do navegador, que _Set Cache Policy_ define por meio de um cache setting. Na API, ele é `{ "type": "bypass_cache" }`, sem atributos. +_Bypass Cache_ envia à origem as requisições que correspondem à regra, e a Azion não armazena a resposta em cache. Ele é executado na Request Phase e exige Application Accelerator ativado na Application. O behavior não altera o cache do navegador, que _Set Cache Policy_ define por meio de um cache setting. Na API, ele é `{ "type": "bypass_cache" }`, sem atributos. -Bypass Cache age sobre o cache da Azion, e não sobre a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). Uma aplicação cujos cache settings têm Tiered Cache ativado continua armazenando objetos em cache nessa camada pelo TTL mínimo. Para saber como Bypass Cache difere de um TTL de cache igual a 0, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). Para ignorar o cache em um path, consulte [Ignore o cache em um path](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#ignore-o-cache-em-um-path). +Bypass Cache age sobre o cache da Azion, e não sobre a camada do [Tiered Cache](/pt-br/documentacao/plataforma/applications/cache/tiered-cache/). Uma Application cujos cache settings têm Tiered Cache ativado continua armazenando objetos em cache nessa camada pelo Max Age do cache setting. Para saber como Bypass Cache difere de um TTL de cache igual a 0, consulte [Bypass Cache e um TTL de 0](/pt-br/documentacao/plataforma/applications/application-accelerator/variacao-de-cache/#bypass-cache-e-um-ttl-de-0). Para ignorar o cache em um path, consulte [Ignore o cache em um path](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#ignore-o-cache-em-um-path). ### Capture Match Groups -_Capture Match Groups_ aplica uma expressão regular a um campo da requisição e guarda os grupos que ela captura em um array temporário. Ele é executado em qualquer uma das fases e exige Application Accelerator na aplicação. _Rewrite Request_ lê o array para montar um novo caminho. O array é local, então somente a regra que o captura pode lê-lo. +_Capture Match Groups_ aplica uma expressão regular a um campo da requisição e guarda os grupos que ela captura em um array temporário. Ele é executado em qualquer uma das fases e exige Application Accelerator ativado na Application. _Rewrite Request_ lê o array para montar um novo caminho. O array é local, então somente a regra que o captura pode lê-lo. -| Argumento | Atributo na API | Valores | Descrição | +| Argumento no Azion Console | Atributo na API | Valores | Descrição | | --- | --- | --- | --- | -| _captured array name_ | `captured_array` | String, de 1 a 10 caracteres | O nome do array que guarda as capturas. Fora desse intervalo, Azion Console mostra `Captured array name must have at least 1 character.` ou `Captured array name must have at most 10 characters.` | +| _captured array name_ | `captured_array` | String, de 1 a 10 caracteres | O nome do array que guarda as capturas | | **Subject** | `subject` | String, de 4 a 50 caracteres | O campo da requisição a ser lido, escrito como uma variável, como `${uri}` | | **Regex** | `regex` | String, de 1 a 255 caracteres | A expressão regular. Cada grupo a ser capturado fica entre parênteses | +Fora do intervalo do _captured array name_, Azion Console mostra `Captured array name must have at least 1 character.` ou `Captured array name must have at most 10 characters.` Para um nome em outro formato, ele mostra `Captured array name must start with a letter and contain only letters or underscores (maximum 10 characters).` + Uma captura é lida como `%{name[index]}`. Por exemplo, com `capture` como nome do array, `${uri}` como subject e `^(.*/)([^/]*)$` como expressão regular, uma requisição para `/path/image.jpg` preenche três entradas: - `%{capture[0]} = "/path/image.jpg"` @@ -262,19 +276,19 @@ Um grupo também pode ter um nome, na notação `?`, e a sua captura é en ### Deliver -_Deliver_ encerra o processamento da requisição e entrega o conteúdo ao usuário, e as regras seguintes não são executadas. Ele é executado em qualquer uma das fases, não exige nenhum Produto e não recebe argumento. Na API, ele é `{ "type": "deliver" }`. +_Deliver_ encerra o processamento da requisição e entrega o conteúdo ao usuário, e as regras seguintes não são executadas. Ele é executado em qualquer uma das fases, não exige nenhum recurso da plataforma e não recebe argumento. Na API, ele é `{ "type": "deliver" }`. ### Deny (403 Forbidden) -_Deny (403 Forbidden)_ responde à requisição com uma página `403 Forbidden` e encerra o processamento da requisição. Ele é executado na Request Phase, não exige nenhum Produto e não recebe argumento. Na API, ele é `{ "type": "deny" }`. +_Deny (403 Forbidden)_ responde à requisição com uma página `403 Forbidden` e encerra o processamento da requisição. Ele é executado na Request Phase, não exige nenhum recurso da plataforma e não recebe argumento. Na API, ele é `{ "type": "deny" }`. ### Enable Gzip -_Enable Gzip_ comprime o conteúdo com gzip quando o navegador do usuário oferece suporte a isso. Ele é executado em qualquer uma das fases, não exige nenhum Produto e é `{ "type": "enable_gzip" }` na API. Para ativar a compressão em uma aplicação, consulte [Comprima as respostas de uma aplicação com gzip](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/gzip-compression/). +_Enable Gzip_ comprime o conteúdo com gzip quando o navegador do usuário oferece suporte a isso. Ele é executado em qualquer uma das fases, não exige nenhum recurso da plataforma e é `{ "type": "enable_gzip" }` na API. Para ativar a compressão em uma Application, consulte [Comprima as respostas de uma aplicação com gzip](/pt-br/documentacao/guias/performance-e-confiabilidade/otimizacao-de-entrega/gzip-compression/). ### Enforce HLS cache -_Enforce HLS cache_ impõe a política de cache que a Azion define para transmissões HLS ao vivo, e exige Live Ingest. A Azion adiciona o behavior a uma regra da Request Phase toda vez que você seleciona uma fonte Live Ingest. O behavior faz duas coisas: ignora as regras de cache da aplicação e aplica a política de HLS ao vivo. +_Enforce HLS cache_ impõe a política de cache que a Azion define para transmissões HLS ao vivo, e exige Live Ingest. A Azion adiciona o behavior a uma regra da Request Phase toda vez que você seleciona uma fonte Live Ingest. O behavior faz duas coisas: ignora as regras de cache da Application e aplica a política de HLS ao vivo. | Objeto | Tempo de cache | | --- | --- | @@ -285,11 +299,13 @@ Para aplicar a política a um stream, consulte [Implemente cache HLS para stream ### Filter Request Cookie -_Filter Request Cookie_ remove um cookie da requisição que a Azion envia à origem, e exige Application Accelerator na aplicação. Uma regra da Response Phase remove, em vez disso, um cookie da resposta enviada ao usuário, com o `type` de API `filter_response_cookie`. O argumento é `cookie-name`, para remover o cookie, ou `cookie-name=cookie-value`, para remover somente esse valor. Na API, o `type` da Request Phase é `filter_request_cookie`. +_Filter Request Cookie_ remove um cookie da requisição que a Azion envia à origem, e exige Application Accelerator ativado na Application. Uma regra da Response Phase remove, em vez disso, um cookie da resposta enviada ao usuário, com _Filter Response Cookie_, o `type` de API `filter_response_cookie`. O argumento é `cookie-name`, para remover o cookie, ou `cookie-name=cookie-value`, para remover somente esse valor. Na API, o `type` da Request Phase é `filter_request_cookie`. + +Azion Console recusa um argumento sem o nome do cookie com `This filter is not valid, missing cookie name`, e um sem o valor do cookie com `This filter is not valid, missing cookie value`. ### Filter Request Header -_Filter Request Header_ remove um header da requisição que a Azion envia à origem, e não exige nenhum Produto. Uma regra da Response Phase remove, em vez disso, um header da resposta enviada ao usuário, com o `type` de API `filter_response_header`. O argumento é o nome do header, como `Header-Name`. Na API, o `type` da Request Phase é `filter_request_header`. +_Filter Request Header_ remove um header da requisição que a Azion envia à origem, e não exige nenhum recurso da plataforma. Uma regra da Response Phase remove, em vez disso, um header da resposta enviada ao usuário, com _Filter Response Header_, o `type` de API `filter_response_header`. O argumento é o nome do header, como `Header-Name`. Na API, o `type` da Request Phase é `filter_request_header`. Cinco headers não podem ser filtrados nem sobrescritos: @@ -301,37 +317,31 @@ Cinco headers não podem ser filtrados nem sobrescritos: ### Finish Request Phase -_Finish Request Phase_ encerra a Request Phase. Os behaviors depois dele na regra, e as regras depois dessa regra, não são executados. Ele é executado na Request Phase, não exige nenhum Produto e é `{ "type": "finish_request_phase" }` na API. +_Finish Request Phase_ encerra a Request Phase. Os behaviors depois dele na regra, e as regras depois dessa regra, não são executados. Ele é executado na Request Phase, não exige nenhum recurso da plataforma e é `{ "type": "finish_request_phase" }` na API. Azion Console não o oferece na lista de behaviors: envie-o pela API, ou a partir do mesmo JSON com `azion create rules-engine` na Azion CLI. ### Forward Cookies -_Forward Cookies_ faz a Azion encaminhar aos usuários o header `Set-Cookie` que a origem retorna, mesmo quando a resposta vem do cache. Ele é executado na Request Phase, exige Application Accelerator na aplicação e é `{ "type": "forward_cookies" }` na API. Uma resposta em cache pode então carregar o `Set-Cookie` da sessão de outro usuário. Para manter as sessões separadas, consulte [Encaminhe cookies da origem ao usuário](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#encaminhe-cookies-da-origem-ao-usuario). +_Forward Cookies_ faz a Azion encaminhar aos usuários o header `Set-Cookie` que a origem retorna, mesmo quando a resposta vem do cache. Ele é executado na Request Phase, exige Application Accelerator ativado na Application e é `{ "type": "forward_cookies" }` na API. Uma resposta em cache pode então carregar o `Set-Cookie` da sessão de outro usuário. Para manter as sessões separadas, consulte [Encaminhe cookies da origem ao usuário](/pt-br/documentacao/guias/performance-e-confiabilidade/cache-e-purge/cache-settings/#encaminhe-cookies-da-origem-ao-usuario). -Cookies criados com JavaScript são uma alternativa ao header de resposta `Set-Cookie`: um script os cria, lê e expira por meio da propriedade `document.cookie`. Um cookie JavaScript tem este formato: - -```javascript -document.cookie = "username=John Doe; expires=Thu, 18 Dec 2020 12:00:00 UTC; path=/"; -``` - -A Azion não filtra o header de requisição `Cookie` por padrão, qualquer que seja a configuração de Forward Cookies, então os cookies JavaScript chegam à origem. Para mais informações, consulte [JavaScript Cookies](https://www.w3schools.com/js/js_cookies.asp). +A Azion não filtra o header de requisição `Cookie` por padrão, qualquer que seja a configuração de Forward Cookies, então os cookies que um script define com `document.cookie` chegam à origem. ### No Content (204) -_No Content (204)_ responde com `204` em vez do status code que a origem retorna. Ele é executado na Request Phase, não exige nenhum Produto e é `{ "type": "no_content" }` na API. +_No Content (204)_ responde com `204` em vez do status code que a origem retorna. Ele é executado na Request Phase, não exige nenhum recurso da plataforma e é `{ "type": "no_content" }` na API. ### Optimize Images -_Optimize Images_ aplica [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/) às requisições que correspondem à regra, e exige Image Processor na aplicação. Ele é executado na Request Phase. Na API, ele é `{ "type": "optimize_images" }`: não recebe atributos, e uma regra pode carregá-lo como o seu único behavior. +_Optimize Images_ aplica [Image Processor](/pt-br/documentacao/plataforma/applications/image-processor/configuracoes/) às requisições que correspondem à regra, e exige Image Processor ativado na Application. Ele é executado na Request Phase. Na API, ele é `{ "type": "optimize_images" }`: não recebe atributos, e uma regra pode carregá-lo como o seu único behavior. ### Redirect HTTP to HTTPS -_Redirect HTTP to HTTPS_ redireciona para HTTPS uma requisição feita por HTTP, e não faz nada com uma requisição já feita por HTTPS. Ele é executado na Request Phase e é `{ "type": "redirect_http_to_https" }` na API. Ele exige HTTPS habilitado nas configurações de protocolo do [workload](/pt-br/documentacao/plataforma/workloads/) que entrega a aplicação. +_Redirect HTTP to HTTPS_ redireciona para HTTPS uma requisição feita por HTTP, e não faz nada com uma requisição já feita por HTTPS. Ele é executado na Request Phase e é `{ "type": "redirect_http_to_https" }` na API. Ele exige HTTPS habilitado nas configurações de protocolo do [Workload](/pt-br/documentacao/plataforma/workloads/) que recebe a requisição. ### Redirect To -_Redirect To (301 Moved Permanently)_ e _Redirect To (302 Found)_ enviam o usuário para a URL ou a URI do argumento, com esse status code. Use `301` quando um caminho muda de forma definitiva, e `302` quando a mudança é temporária. Os dois behaviors encerram o processamento da requisição, são executados em qualquer uma das fases e não exigem nenhum Produto. Em uma regra da Response Phase, eles são executados somente quando a origem retorna `404`. +_Redirect To (301 Moved Permanently)_ e _Redirect To (302 Found)_ enviam o usuário para a URL ou a URI do argumento, com esse status code. Use `301` quando um caminho muda de forma definitiva, e `302` quando a mudança é temporária. Os dois behaviors encerram o processamento da requisição, são executados em qualquer uma das fases e não exigem nenhum recurso da plataforma. Em uma regra da Response Phase, eles são executados somente quando a origem retorna `404`. -Azion Console pede o argumento com `Redirect target is required` e recusa um espaço nele com `Redirect target cannot contain spaces, use %20 instead`. Na API, os tipos são `redirect_to_301` e `redirect_to_302`, com o destino em `attributes.value`. Este behavior envia o leitor de uma FAQ para a versão em inglês dela: +Azion Console pede o argumento com `Redirect target is required` e recusa um espaço nele com `Redirect target cannot contain spaces, use %20 instead`. Ele recusa um destino com outro início com `Redirect target must start with /, http://, https://, #, ?, ${variable} or %{captured}`, e uma variável em outro formato com `Variables must use the ${lowercase_name} format`. Na API, os tipos são `redirect_to_301` e `redirect_to_302`, com o destino em `attributes.value`. Este behavior envia o leitor de uma FAQ para a versão em inglês dela: | Behavior | Argumento | | --- | --- | @@ -339,7 +349,7 @@ Azion Console pede o argumento com `Redirect target is required` e recusa um esp ### Rewrite Request -_Rewrite Request_ altera o caminho do recurso que a Azion requisita à origem. Ele é executado na Request Phase, exige Application Accelerator na aplicação e é `rewrite_request` na API, com o novo caminho em `attributes.value`. O novo caminho pode combinar uma string, as variáveis da Request Phase e as capturas de _Capture Match Groups_, escritas como `%{name[index]}`. +_Rewrite Request_ altera o caminho do recurso que a Azion requisita à origem. Ele é executado na Request Phase, exige Application Accelerator ativado na Application e é `rewrite_request` na API, com o novo caminho em `attributes.value`. O novo caminho pode combinar uma string, as variáveis da Request Phase e as capturas de _Capture Match Groups_, escritas como `%{name[index]}`. Azion Console recusa um caminho com outro início com `Argument should start with /, ${uri}, ${request_uri}, or ${domain}`. Por exemplo, dois behaviors em uma regra enviam à origem uma requisição para `/original/image.jpg` como `/new/image.jpg`: @@ -350,19 +360,19 @@ Por exemplo, dois behaviors em uma regra enviam à origem uma requisição para ### Run Function -_Run Function_ executa uma [instância de função](/pt-br/documentacao/plataforma/applications/functions-instances/) da aplicação sobre o que corresponde à regra. Ele é executado em qualquer uma das fases e exige Application Accelerator e [Functions](/pt-br/documentacao/plataforma/functions/) na aplicação. As instâncias ficam na aba **Functions Instances** da aplicação, e uma aplicação nova tem Functions ativado. Para a Response Phase, o formulário de instância de função do Azion Console informa `Only Lua functions can be used in the Response phase.` +_Run Function_ invoca uma [Function Instance](/pt-br/documentacao/plataforma/applications/functions-instances/) da Application sobre o que corresponde à regra. Ele é executado em qualquer uma das fases e exige [Functions](/pt-br/documentacao/plataforma/functions/) ativado na Application, e uma Application nova tem Functions ativado. Na Response Phase, ele executa somente Functions escritas em Lua. No Azion Console, o formulário de regra informa `Only functions with Lua runtime are available for Response phase.`, e o formulário da Function Instance informa `Only Lua functions can be used in the Response phase.` -Na API, `attributes.value` contém o ID da instância de função, e não o da função, como em `{ "type": "run_function", "attributes": { "value": } }`. Para criar uma instância, consulte [Instancie uma função em uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/). +Na API, `attributes.value` contém o ID da Function Instance, e não o da Function, como em `{ "type": "run_function", "attributes": { "value": } }`. Para criar uma Function Instance, consulte [Instancie uma função em uma aplicação](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/instanciar-functions/). ### Set Cache Policy -_Set Cache Policy_ aplica um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) às requisições que correspondem à regra, e é assim que um cache setting chega a uma requisição. Ele é executado na Request Phase e não exige nenhum outro Produto. O cache setting vem primeiro, na aba **Cache Settings** da aplicação, e o behavior então o nomeia em uma segunda lista. +_Set Cache Policy_ aplica um [cache setting](/pt-br/documentacao/plataforma/applications/cache/cache-settings/) às requisições que correspondem à regra, e é assim que um cache setting chega a uma requisição. Ele é executado na Request Phase e não exige nenhum outro recurso da plataforma. O cache setting precisa existir antes que uma regra possa aplicá-lo, e [Primeiros passos com Cache](/pt-br/documentacao/plataforma/applications/cache/primeiros-passos/) cria um primeiro cache setting e a regra que o aplica. -O cache setting define por quanto tempo um objeto fica em cache. A sua seção [Application Accelerator](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#application-accelerator) contém as variações que definem a cache key. Na API, `attributes.value` contém o ID do cache setting. A API retorna esse ID como um inteiro, mesmo quando a requisição o envia como string. Um cache setting que uma regra aplica não pode ser excluído: a API responde `400` com o código `21014`. +O cache setting define por quanto tempo um objeto fica em cache. Os seus [campos de Application Accelerator](/pt-br/documentacao/plataforma/applications/cache/cache-settings/#application-accelerator) contêm as variações que definem a cache key. Na API, `attributes.value` contém o ID do cache setting. A API retorna esse ID como um inteiro, mesmo quando a requisição o envia como string. Um cache setting que uma regra aplica não pode ser excluído: a API responde `400` com o código `21014`. ### Set Connector -_Set Connector_ envia as requisições que correspondem à regra a um [connector](/pt-br/documentacao/plataforma/connectors/), que alcança a origem. No Azion Console, as origens foram redesenhadas como connectors, e este behavior nomeia um connector. Ele é executado na Request Phase e não exige nenhum Produto, então uma regra com `${uri}` e _Set Connector_ funciona em uma aplicação sem Application Accelerator. Na API, `attributes.value` contém o ID do connector, como mostra a seção API. +_Set Connector_ envia as requisições que correspondem à regra a um [Connector](/pt-br/documentacao/plataforma/connectors/), que as encaminha à origem. Ele é executado na Request Phase e não exige nenhum recurso da plataforma, então uma regra com `${uri}` e _Set Connector_ funciona em uma Application sem Application Accelerator. Na API, `attributes.value` contém o ID do Connector, como mostra a seção API. --- @@ -382,7 +392,7 @@ Toda operação de regra é autenticada e fica em `https://api.azion.com/v4/work Uma criação responde `202` com um `state` igual a `pending`, e uma listagem responde `200`. A chamada de reordenação recebe um array `order` que lista os IDs das regras da fase na nova ordem. -Esta chamada cria uma regra da Request Phase que envia toda requisição da aplicação a um connector: +Esta chamada cria uma regra da Request Phase que envia toda requisição da Application a um Connector: ```bash curl --request POST \ @@ -404,13 +414,13 @@ A resposta carrega `202` e um `state` igual a `pending`. Este trecho mantém a r {"state":"pending","data":{"id":,"name":"send-to-connector","active":true,"criteria":[[{"conditional":"if","variable":"${uri}","operator":"starts_with","argument":"/"}]],"behaviors":[{"type":"set_connector","attributes":{"value":}}],"description":"","order":0,…}} ``` -A plataforma adiciona `description`, uma string vazia quando a criação não envia nenhuma, e `order`, a posição da regra na sua fase. O mesmo corpo com `${request_uri}` no lugar de `${uri}` falha com o código `25047` em uma aplicação sem Application Accelerator. +A plataforma adiciona `description`, uma string vazia quando a criação não envia nenhuma, e `order`, a posição da regra na sua fase. O mesmo corpo com `${request_uri}` no lugar de `${uri}` falha com o código `25047` em uma Application sem Application Accelerator. --- ## CLI -Azion CLI cria uma regra com `azion create rules-engine`, que lê a regra de um arquivo JSON no formato que a API recebe. `--phase` indica a fase, e o padrão é `request`. +[Azion CLI](/pt-br/documentacao/devtools/cli/) cria uma regra com `azion create rules-engine`, que lê a regra de um arquivo JSON no formato que a API recebe. `--phase` indica a fase, e `azion create rules-engine` não tem padrão para ela: em um terminal, o comando pede a fase, e sem terminal ele falha com `Error: Failed to parse your response.` Este arquivo aplica um cache setting a toda requisição cujo caminho começa com `/static/`: @@ -424,7 +434,7 @@ Este arquivo aplica um cache setting a toda requisição cujo caminho começa co } ``` -Salve-o como `rule.json`, substitua `` pelo ID de um cache setting da aplicação e crie a regra: +Salve-o como `rule.json`, substitua `` pelo ID de um cache setting da Application e crie a regra: ```bash azion create rules-engine --application-id --phase request --file rule.json @@ -436,11 +446,24 @@ Created Rules Engine with ID Azion CLI recusa dois formatos antigos de arquivo de regra. Um critério com `input_value` no lugar de `argument` falha com `json: unknown field "input_value"`. Um behavior escrito como `{"type":"set_cache_settings","cache_settings_id":""}` falha com `data failed to match schemas in oneOf(RequestPhaseBehaviorRequest)`: o behavior é `set_cache_policy`, com o ID em `attributes.value`. +Seis comandos cobrem as regras de uma fase. Cada um recebe `--application-id` e `--phase`, e um comando que age sobre uma regra recebe o ID dela em `--rule-id`: + +| Comando | O que faz | Flags | +| --- | --- | --- | +| `azion create rules-engine` | Cria uma regra a partir de um arquivo JSON | `--application-id`, `--phase`, `--file` | +| `azion list rules-engine` | Lista as regras de uma fase | `--application-id`, `--phase`, `--details`, `--filter`, `--order-by`, `--page`, `--page-size` | +| `azion describe rules-engine` | Retorna uma regra | `--application-id`, `--phase`, `--rule-id` | +| `azion update rules-engine` | Altera uma regra a partir de um arquivo JSON | `--application-id`, `--phase`, `--rule-id`, `--file` | +| `azion delete rules-engine` | Exclui uma regra | `--application-id`, `--phase`, `--rule-id` | +| `azion update rules-engine-order` | Reordena as regras de uma fase | `--application-id`, `--phase`, `--rule-ids` | + +`--rule-ids` recebe os IDs das regras da fase na nova ordem, separados por vírgulas, como `123,456,789`. Em `azion list rules-engine` e `azion delete rules-engine`, o padrão de `--phase` é `request`. + --- ## Erros -Uma regra recusada retorna um array `errors`. Cada entrada carrega um `code`, um `title`, um `detail`, o `status` e um ponteiro `source` que indica o campo, e algumas entradas adicionam um objeto `meta`. Este corpo responde a uma regra com `${request_uri}` em uma aplicação sem Application Accelerator: +Uma regra recusada retorna um array `errors`. Cada entrada carrega um `code`, um `title`, um `detail`, o `status` e um ponteiro `source` que indica o campo. Algumas entradas adicionam um objeto `meta`. Este corpo responde a uma regra com `${request_uri}` em uma Application sem Application Accelerator: ```json { @@ -463,9 +486,15 @@ Uma regra recusada retorna um array `errors`. Cada entrada carrega um `code`, um | Código | Título | Status | O que causa | O que fazer | | --- | --- | --- | --- | --- | -| `10039` | Invalid Choice | 400 | Um `type` de behavior que não é uma opção válida, como `add_header`, com o detalhe `"add_header" is not a valid choice.` O ponteiro `source` indica o behavior, como em `/data/behaviors/0/type`, e `meta.input` repete o valor | Envie um `type` da tabela de behaviors, como `add_request_header` | -| `21014` | Cannot Delete Cache Setting | 400 | Excluir um cache setting que uma regra aplica com `set_cache_policy` | Remova o behavior que nomeia o cache setting, ou exclua a regra, e depois exclua o cache setting | -| `25047` | Missing Required Modules | 400 | Uma variável de critério cujo Produto está desativado na aplicação, como `${request_uri}` sem Application Accelerator. `meta.missing_required_modules` indica o Produto | Habilite Application Accelerator na seção **Modules** de [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/) da aplicação, ou compare `${uri}` no critério | +| `10039` | Invalid Choice | 400 | Um `type` de behavior que não é uma opção válida, como `add_header` | Envie um `type` da tabela de behaviors, como `add_request_header` | +| `21014` | Cannot Delete Cache Setting | 400 | Excluir um cache setting que uma regra aplica com `set_cache_policy` | Remova o behavior ou a regra que o aplica, e depois exclua o cache setting | +| `25010` | Behavior Marked As Final | 400 | Um behavior depois de um behavior final, como _Deliver_ | Deixe o behavior final como o último da regra | +| `25011` | Duplicated Behavior | 400 | Um behavior que uma regra aceita uma vez, como _Bypass Cache_, repetido na regra | Mantenha um só | +| `25012` | Incompatible Behavior | 400 | _Set Cache Policy_ junto de _Deny (403 Forbidden)_, _Redirect To_ ou _No Content (204)_ | Mova um deles para outra regra | +| `25024` | Invalid Header | 400 | Um argumento de header que a API não aceita, como um valor com `é` | Remova o caractere que a API recusa | +| `25047` | Missing Required Modules | 400 | Uma variável de critério cujo recurso da plataforma está desativado, como `${request_uri}` sem Application Accelerator | Ative Application Accelerator, como mostra [Main Settings](/pt-br/documentacao/plataforma/applications/main-settings/#recursos-da-plataforma), ou compare `${uri}` no critério | + +Para `10039`, o detalhe diz `"add_header" is not a valid choice.`, o ponteiro `source` indica o behavior, como em `/data/behaviors/0/type`, e `meta.input` repete o valor. Para `25047`, `meta.missing_required_modules` indica a chave de `modules` do recurso da plataforma a ser ativado. --- @@ -473,9 +502,9 @@ Uma regra recusada retorna um array `errors`. Cada entrada carrega um `code`, um - Como uma aplicação executa as suas regras em cada fase, em que ordem e quando um behavior interrompe o restante. + Como uma Application executa as suas regras em cada fase, em que ordem e quando um behavior interrompe o restante. O procedimento que cria uma regra no Azion Console. Os procedimentos que aplicam um cache setting, ignoram o cache em um path e encaminham cookies da origem. - Faça o debug das regras de uma aplicação com a GraphQL API, Data Stream ou Real-Time Events. + Faça o debug das regras de uma Application com a GraphQL API, Data Stream ou Real-Time Events. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/websocket.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/websocket.mdx index f860772dda..2b16088f6d 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/websocket.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/websocket.mdx @@ -1,6 +1,6 @@ --- title: WebSocket Proxy -description: Consulte o que WebSocket Proxy exige em uma aplicação, os headers de upgrade, os erros que ele retorna e os seus limites de conexão. +description: Consulte o que WebSocket Proxy exige em uma Application, os headers de upgrade, os erros que ele retorna e os seus limites de conexão. meta_tags: 'applications, websocket, websocket proxy, upgrade, connection, keepalive, errors' namespace: documentation_products_edge_application_websocket permalink: /documentacao/plataforma/applications/websocket/ @@ -10,40 +10,44 @@ import FrameBox from '@aziontech/webkit/frame-box' import ItemList from '@aziontech/webkit/item-list' import DocItem from '@aziontech/webkit/doc-item' -WebSocket, especificado na [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455), é um protocolo que mantém uma conexão TCP bidirecional aberta entre um cliente e um servidor, então os dois lados trocam dados em tempo real depois de um único handshake, sem reiniciar a conexão. **WebSocket Proxy** transporta essa conexão entre os seus usuários e a sua origem por meio de uma [aplicação](/pt-br/documentacao/plataforma/applications/), que funciona como um proxy reverso. Use-o para aplicações em tempo real, como jogos online, chat, notificações e streaming ao vivo. WebSocket Proxy serve quando o servidor WebSocket é a sua origem, porque a aplicação apenas transporta a conexão até ela. Quando uma função deve agir ela mesma como servidor ou cliente WebSocket, use a [WebSocket API](/pt-br/documentacao/devtools/runtime/api-reference/websocket/), que trata um upgrade do lado do servidor com `upgradeWebSocket()`. +WebSocket é um protocolo, especificado na [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455), que mantém uma conexão TCP aberta nos dois sentidos entre um cliente e um servidor. Depois de um handshake, os dois lados trocam dados por ela em tempo real. **WebSocket Proxy** é uma feature de Applications que transporta essa conexão entre os seus usuários e a sua origem. A conexão passa por uma [Application](/pt-br/documentacao/plataforma/applications/) que atua como proxy reverso para essa origem. Use WebSocket Proxy para aplicações em tempo real, como jogos online, chat, notificações e streaming ao vivo. + +WebSocket Proxy serve quando o servidor WebSocket é a sua origem, porque a Application apenas transporta a conexão até ela. Quando uma [Function](/pt-br/documentacao/plataforma/functions/) deve agir ela mesma como servidor ou cliente WebSocket, use a [WebSocket API](/pt-br/documentacao/devtools/runtime/api-reference/websocket/), que trata um upgrade do lado do servidor com `upgradeWebSocket()`. --- ## Disponibilidade -WebSocket Proxy não vem habilitado na conta por padrão, e a Azion o habilita mediante solicitação. Para solicitá-lo, consulte [Diretrizes de suporte](/pt-br/documentacao/suporte/). +A Azion ativa WebSocket Proxy em uma conta somente mediante solicitação. Para solicitá-lo, consulte [Diretrizes de suporte](/pt-br/documentacao/suporte/). ## Suporte no cliente e na origem -Uma conexão WebSocket por meio de uma aplicação precisa de suporte nativo a WebSocket nas duas pontas: o cliente que abre a conexão e o servidor na origem. A maioria dos navegadores oferece suporte nativo a WebSocket. Para a lista de navegadores com suporte nativo, consulte [Can I use](https://caniuse.com/websockets). +Uma conexão WebSocket por meio de uma Application precisa de suporte nativo a WebSocket nas duas pontas: o cliente que abre a conexão e o servidor na origem. A maioria dos navegadores oferece suporte nativo a WebSocket. Para a lista de navegadores com suporte nativo, consulte [Can I use](https://caniuse.com/websockets). ## Headers de upgrade -Uma aplicação com WebSocket Proxy habilitado lê dois headers de requisição para decidir se uma requisição abre uma conexão WebSocket. Por padrão, ela trata toda requisição que carrega os dois headers, com os valores desta tabela, como uma conexão WebSocket e faz o proxy dela até a origem. +Uma Application com WebSocket Proxy habilitado lê dois headers de requisição para decidir se uma requisição abre uma conexão WebSocket. Ela trata a requisição como uma conexão WebSocket, e faz o proxy dela até a origem, quando `Upgrade` traz `websocket` e `Connection` traz o token `upgrade`, com qualquer combinação de maiúsculas e minúsculas, sozinho ou em uma lista como `Connection: keep-alive, Upgrade`. | Header | Valor | | --- | --- | | `Upgrade` | `websocket` | | `Connection` | `upgrade` | -Quando o cliente envia um dos headers com outro valor, ou omite um deles, a aplicação não realiza o upgrade em direção à origem. +Quando o cliente omite um dos headers, ou envia um valor que não indica o upgrade, a Application não realiza o upgrade em direção à origem. -As regras de um firewall podem inspecionar uma requisição WebSocket antes que o upgrade seja concluído. +As regras de um Firewall, em [Rules Engine para Firewall](/pt-br/documentacao/plataforma/firewall/rules-engine/), podem inspecionar uma requisição WebSocket antes que o upgrade seja concluído. --- ## Erros -Uma conexão WebSocket por meio de uma aplicação se completa com `101 Switching Protocols`. Qualquer outro status significa que o upgrade não foi concluído, mesmo um status das famílias de sucesso `2xx` ou `3xx`: +Uma conexão WebSocket por meio de uma Application se completa com `101 Switching Protocols`. Qualquer outro status significa que o upgrade não foi concluído, mesmo um `2xx` de sucesso ou um `3xx` de redirecionamento: | Status | Causa | O que fazer | | --- | --- | --- | -| Qualquer status diferente de `101` | O cliente, a aplicação ou a origem não completou a conexão WebSocket | Verifique se o cliente e a origem oferecem suporte nativo a WebSocket, e se a requisição carrega os dois [headers de upgrade](/pt-br/documentacao/plataforma/applications/websocket/#headers-de-upgrade) com os seus valores | +| Qualquer status diferente de `101` | O cliente, a Application ou a origem não completou a conexão WebSocket | Verifique o cliente, a origem e os [headers de upgrade](/pt-br/documentacao/plataforma/applications/websocket/#headers-de-upgrade) | + +O cliente e a origem precisam de suporte nativo a WebSocket, e a requisição precisa dos dois headers de upgrade com os seus valores. --- @@ -57,9 +61,9 @@ A Azion recicla as conexões keepalive nos seus servidores aproximadamente a cad - A primeira aplicação, antes de você fazer o proxy de conexões WebSocket por meio dela. - Onde são definidas as origens às quais uma aplicação envia requisições. - Como descobrir quais regras de uma aplicação são executadas em uma requisição. - Os sintomas que uma aplicação pode produzir, e como encontrar a causa deles. + A primeira Application, antes de você fazer o proxy de conexões WebSocket por meio dela. + Onde são definidas as origens às quais uma Application envia requisições. + O tempo máximo de uma conexão WebSocket, e os outros limites de uma Application. + Os sintomas que uma Application pode produzir, e como encontrar a causa deles. diff --git a/apps/docs/src/content/docs/pt-br/pages/menu-principal/trabalhe-com-dominios/apontar-dominio.mdx b/apps/docs/src/content/docs/pt-br/pages/menu-principal/trabalhe-com-dominios/apontar-dominio.mdx index 87f50e64bf..8479a69db1 100644 --- a/apps/docs/src/content/docs/pt-br/pages/menu-principal/trabalhe-com-dominios/apontar-dominio.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/menu-principal/trabalhe-com-dominios/apontar-dominio.mdx @@ -89,9 +89,13 @@ As requisições ao seu hostname passam então a chegar à aplicação do deploy Uma requisição `https://` ao seu hostname também exige um certificado de servidor que cubra o hostname, vinculado ao workload. Para obter um, consulte [Solicite um certificado Let's Encrypt](/pt-br/documentacao/guias/seguranca-de-aplicacoes/tls-e-certificados/como-gerar-um-certificado-lets-encrypt/) ou [Envie um certificado digital](/pt-br/documentacao/guias/seguranca-de-aplicacoes/tls-e-certificados/certificado-digital/). -Estas verificações confirmam o caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/). +No caso de uso [Acelerar sites e APIs com uma CDN](/pt-br/documentacao/casos-de-uso/melhorar-performance-e-confiabilidade/acelerar-sites-e-apis-com-uma-cdn/), espere: -Estas verificações confirmam o caso de uso [Transmitir eventos ao vivo para grandes audiências](/pt-br/documentacao/casos-de-uso/entregar-midia-e-streaming/transmitir-eventos-ao-vivo-para-grandes-audiencias/). +- **O hostname chega ao workload.** `dig +short www.example.com` lista o workload domain como valor do registro `CNAME`. + +No caso de uso [Transmitir eventos ao vivo para grandes audiências](/pt-br/documentacao/casos-de-uso/entregar-midia-e-streaming/transmitir-eventos-ao-vivo-para-grandes-audiencias/), espere: + +- **O hostname da transmissão chega ao workload.** `dig +short` para o hostname que os espectadores carregam, como `live.example.com`, lista o workload domain como valor do registro `CNAME`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/observe/real-time-events/fontes-de-dados.mdx b/apps/docs/src/content/docs/pt-br/pages/observe/real-time-events/fontes-de-dados.mdx index af9020d296..87a5d1acd2 100644 --- a/apps/docs/src/content/docs/pt-br/pages/observe/real-time-events/fontes-de-dados.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/observe/real-time-events/fontes-de-dados.mdx @@ -157,7 +157,7 @@ Na API GraphQL, esses mesmos registros são o dataset `tieredCacheEvents`, que n | Host | Informação de host enviada na linha da requisição. Armazena: o nome do host da linha da requisição, ou o nome do host do campo de cabeçalho `Host` da requisição, ou o nome do servidor que corresponde a uma requisição. Exemplo: `xxxxxxxxxx.map.azionedge.net` | | Proxy Host | Hostname que está sendo proxiado. Exemplo: `storage.googleapis.com:443` | | Proxy Status | Código de status de erro HTTP ou da origem quando nenhuma resposta é obtida do upstream. Exemplo: `520`. **Em caso de cache, a resposta é `-`.** | -| Proxy Upstream | Endereço da origem (upstream). Em alguns casos, a origem do Tiered Cache pode ser Image Processor (IMS), para processar a imagem e depois armazená-la em cache. Exemplo: `ims_http` | +| Proxy Upstream | Endereço da origem (upstream). Quando Image Processor respondeu como o upstream, o campo assume o valor `ims_http`. | | Reference Error | ID de referência da requisição. Gerado quando o código de status é `4xx` ou `5xx`. Exemplo: `#AECFE66100000000C947B9B3B3BFBE46FFFFFFFF9401` | | Remote Addr | Endereço IP da origem que gerou a requisição. Exemplo: `127.0.0.1` | | Remote Port | Porta da origem que gerou a requisição. Exemplo: `8080` | diff --git a/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/integrar-siems.mdx b/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/integrar-siems.mdx index 181b7c6a59..da6aa6e08f 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/integrar-siems.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/integrar-siems.mdx @@ -250,11 +250,17 @@ No SIEM, cada linha de log traz as chaves do template *WAF Event Collector*. Lei Para correlacionar esses eventos com os dados de requisição das suas aplicações em uma única linha de log, use a fonte de dados *Applications* com o template *Applications + WAF Event Collector*. Para o trade-off, consulte [Boas práticas para Data Stream](/pt-br/documentacao/plataforma/data-stream/boas-praticas/#use-o-template-predefinido-applications--waf-event-collector-para-alimentar-um-siem). -Estas verificações confirmam o caso de uso [Proteger aplicações web contra ataques do OWASP Top 10 e zero-day](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-aplicacoes-web-contra-ataques-do-owasp-top-10-e-zero-day/). +No caso de uso [Proteger aplicações web contra ataques do OWASP Top 10 e zero-day](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-aplicacoes-web-contra-ataques-do-owasp-top-10-e-zero-day/), espere: -Estas verificações confirmam o caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-apis-publicas-contra-abuso/). +- **As decisões do WAF chegam ao SIEM.** Os envios mais recentes mostram um **Status Code** `200`, e cada linha no SIEM traz `waf_attack_action`, `waf_attack_family` e `waf_match`. -Estas verificações confirmam o caso de uso [Bloquear atacantes automaticamente a partir de detecções do SIEM](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/bloquear-atacantes-automaticamente-a-partir-de-deteccoes-do-siem/). +No caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/proteger-apis-publicas-contra-abuso/), espere: + +- **As requisições bloqueadas na API ficam registradas.** Cada linha no SIEM traz `waf_score` e `waf_match`, e `blocked` vale `1` para uma requisição que o WAF bloqueou. + +No caso de uso [Bloquear atacantes automaticamente a partir de detecções do SIEM](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/bloquear-atacantes-automaticamente-a-partir-de-deteccoes-do-siem/), espere: + +- **O SIEM recebe os eventos que as detecções dele leem.** Os envios mais recentes mostram um **Status Code** `200`, e cada linha traz `waf_attack_action` e `waf_attack_family`, como `$BLOCK` e `SQL`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/terraform.mdx b/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/terraform.mdx index c0837cc191..e8bc8f51cb 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/terraform.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure-jornada/automatizar/terraform.mdx @@ -35,12 +35,14 @@ Um dos principais benefícios do Terraform é a sua capacidades de automação. | Escopo | Recurso | Fonte de dados | | --- | --- | --- | | Firewall Main Settings | [Gerenciando Firewall Main Settings ](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_main_setting) | [Consultando Firewall Main Settings](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_main_settings) | +| Firewall Rules Engine | [Gerenciando regras do Firewall](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_rule_engine) | [Consultando regras do Firewall](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_rules_engine) | | Firewall Functions Instances | [Gerenciando Firewall Functions Instances](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/firewall_functions_instance) | [Consultando Firewall Functions Instances ](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/firewall_functions_instance) | | Network list | [Gerenciando Network list](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/network_list) | [Consultando Network lists](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/network_lists) | -| WAF Rules set | [Gerenciando WAF Rules set](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | [Consultando WAF Rules set](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | +| WAF rule sets | [Gerenciando WAF rule sets](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf) | [Consultando WAF rule sets](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/wafs) | +| [Exceções de WAF](/pt-br/documentacao/plataforma/firewall/waf/custom-allowed-rules/) | [Gerenciando exceções de WAF](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/waf_rule_set) | [Consultando exceções de WAF](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/waf_rule_sets) | | Edge DNS Zones | [Gerenciando zonas](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/intelligent_dns_zone)| [Consultando zonas](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/intelligent_dns_zones) | | Edge DNS Records | [Gerenciando registros](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/intelligent_dns_record) | | -| Edge DNS Records | [Gerenciando DNSSEC](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/intelligent_dns_dnssec) | [Consultando DNSSEC](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/intelligent_dns_dnssec)| +| Edge DNS DNSSEC | [Gerenciando DNSSEC](https://registry.terraform.io/providers/aziontech/azion/latest/docs/resources/intelligent_dns_dnssec) | [Consultando DNSSEC](https://registry.terraform.io/providers/aziontech/azion/latest/docs/data-sources/intelligent_dns_dnssec)| --- diff --git a/apps/docs/src/content/docs/pt-br/pages/secure-jornada/editar-edge-firewall/proteja-seu-dominio.mdx b/apps/docs/src/content/docs/pt-br/pages/secure-jornada/editar-edge-firewall/proteja-seu-dominio.mdx index 5ba63d3fb5..d10bdb24f7 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure-jornada/editar-edge-firewall/proteja-seu-dominio.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure-jornada/editar-edge-firewall/proteja-seu-dominio.mdx @@ -102,7 +102,21 @@ Depois de salvar, o deployment do workload nomeia o seu firewall. ### CLI -O deployment de um workload é escrito pelo `azion deploy`, a partir da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`. Para vincular o firewall em um workload que já existe, siga o painel do Console. +Liste o deployment do seu workload para encontrar o ID dele e a aplicação que ele nomeia. Substitua `` pelo ID do seu workload: + +```bash +azion list workload-deployment --workload-id --details +``` + +A saída mostra o `ID` e o `EDGE APPLICATION` do deployment. A atualização envia a estratégia do deployment como um objeto só, então passe essa aplicação de novo ao lado do seu firewall. Se o workload usa um conjunto de custom pages, adicione também `--custom-page `. A saída de `azion describe workload-deployment --format json` traz o ID do conjunto como `custom_page`. + +Nomeie o seu firewall no deployment: + +```bash +azion update workload-deployment --workload-id --deployment-id --strategy-type default --edge-application --edge-firewall +``` + +A Azion CLI imprime `Updated Workload Deployment with ID `, e o deployment do workload nomeia o seu firewall. Para todas as flags, consulte [Azion CLI workload-deployment](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/). diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/connectors/primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/connectors/primeiros-passos.mdx index f59372f5c1..9df5e3b790 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/connectors/primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/connectors/primeiros-passos.mdx @@ -128,7 +128,7 @@ Para criar o connector no Azion Console: Em **Transport Protocol Policy**, selecione _Force HTTPS_. - + O connector existe na sua conta, e a regra que você adiciona à sua aplicação o seleciona. diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/connectors/solucao-de-problemas.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/connectors/solucao-de-problemas.mdx index 873c48664b..20fab1d311 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/connectors/solucao-de-problemas.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/connectors/solucao-de-problemas.mdx @@ -229,7 +229,7 @@ A API então retorna `202` com `"attributes": {"region": "us-east-1"}`, ou a reg Cada campo de um connector, com a tabela completa de recusas e o que fazer em cada uma. O caminho que uma requisição percorre de uma regra até o connector e como uma mudança se propaga, base da maioria das correções desta página. - As correções para requisições que nunca chegam à origem e para uma regra que não age sobre uma requisição. + As correções para requisições que nunca chegam à origem e para uma regra que não age sobre uma requisição. Como a allowlist e a assinatura da requisição protegem a origem, e o que cada uma comprova. diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/custom-pages/primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/custom-pages/primeiros-passos.mdx index 93d759e7a5..104c91b9c7 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/custom-pages/primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/custom-pages/primeiros-passos.mdx @@ -24,7 +24,7 @@ Quatro objetos participam, e cada um se liga ao seguinte: 3. O **deployment** do workload nomeia o conjunto, ao lado da aplicação que ele já nomeia. 4. A **requisição** chega a um caminho que o connector da aplicação responde com `404`, e o conjunto substitui essa resposta. -Um conjunto não altera nada até que um deployment o nomeie. Quando o connector da aplicação responde `404`, o visitante recebe o conteúdo da sua página no lugar, sem redirecionamento e com o código de status que a página define. Este guia trata do Azion Console e da API, e você atribui o conjunto no Azion Console. Azion CLI não altera um deployment que já existe, e a referência publicada da API v4 não tem endpoint para um deployment. +Um conjunto não altera nada até que um deployment o nomeie. Quando o connector da aplicação responde `404`, o visitante recebe o conteúdo da sua página no lugar, sem redirecionamento e com o código de status que a página define. Este guia trata do Azion Console e da API. Você atribui o conjunto no Azion Console, porque a referência publicada da API v4 não tem endpoint para um deployment. Para atribuir o conjunto com a Azion CLI, rode o [`azion update workload-deployment`](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/#atualizar) com `--strategy-type`, `--custom-page` e a aplicação e o firewall que o deployment já nomeia. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/firewall/glossario.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/firewall/glossario.mdx index 0dc71e7063..d6bd50e7de 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/firewall/glossario.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/firewall/glossario.mdx @@ -51,7 +51,7 @@ permalink: /documentacao/plataforma/firewall/glossario/ | lista IP/CIDR | Uma network list do tipo `ip_cidr`, _IP/CIDR_ no Azion Console, que contém endereços IPv4 e IPv6 e intervalos CIDR como `198.51.100.0/24`. Uma regra corresponde a uma requisição quando o endereço IP do cliente dela está dentro de uma das entradas. É o único tipo cujos itens aceitam uma data de expiração e um comentário, e [Network Lists](/pt-br/documentacao/plataforma/firewall/network-shield/network-lists/#tipos-de-lista) compara os três tipos. | | lista mantida pela Azion | Uma network list que a Azion cria e mantém atualizada, como Azion IP Tor Exit Nodes. Uma regra a referencia como qualquer outra network list, mas qualquer gravação nela falha com `22004 Cannot Change Global Network List`. [Network Lists](/pt-br/documentacao/plataforma/firewall/network-shield/network-lists/#listas-mantidas-pela-azion) relaciona essas listas, e as contas com [Origin Shield](/pt-br/documentacao/plataforma/connectors/origin-shield/) também recebem `Azion Origin Shield`, que contém os prefixos IPv4 e IPv6 que a infraestrutura da Azion usa. | | log tag | O identificador que uma instância carimba nas linhas de report que escreve, para você separar os registros de uma instância dos de outra em [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/). O argumento `log_tag` o define, como [Argumentos](/pt-br/documentacao/plataforma/firewall/bot-manager/argumentos/#campos) documenta. Bot Manager Lite o grava no prefixo da linha, `[Bot-Protection][]`, e Bot Manager o grava como um campo `log_tag`. | -| Logging | O modo do WAF que pontua uma requisição e registra a correspondência sem bloqueá-la, `logging` na API e o outro modo que o comportamento _Set WAF_ aceita. A API recusa `learning` com `10039`, mas outras superfícies mantêm esse nome: [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) informa o estado em `wafLearning`, rotulado **WAF Learning**, [Data Stream](/pt-br/documentacao/plataforma/data-stream/) em `waf_learning`, e `azion.config.js` recebe `wafMode` definido como `learning`. [Score e modos](/pt-br/documentacao/plataforma/firewall/waf/score-e-modos/#modos) compara os dois modos. | +| Logging | O modo do WAF que pontua uma requisição e registra a correspondência sem bloqueá-la, `logging` na API e o outro modo que o comportamento _Set WAF_ aceita. A API recusa `learning` com `10039`, mas outras superfícies mantêm esse nome: [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) informa o estado em `wafLearning`, rotulado **WAF Learning**, [Data Stream](/pt-br/documentacao/plataforma/data-stream/) em `waf_learning`, e `azion.config.js` recebe `mode` definido como `learning` no behavior `set_waf`. [Score e modos](/pt-br/documentacao/plataforma/firewall/waf/score-e-modos/#modos) compara os dois modos. | | Main Settings | A aba de um firewall que guarda as configurações dele em quatro seções: **General**, para o nome, **Modules**, **Debug Rules** e **Status**. Ela não guarda domínios, porque um workload seleciona o firewall pelo deployment dele. [Defina as configurações principais de um firewall](/pt-br/documentacao/guias/seguranca-de-aplicacoes/firewall-e-waf/firewall-definir-main-settings/) cobre cada seção. | | match target | O nome que outras plataformas dão às requisições a que uma política de segurança se aplica. Um firewall o define em dois lugares: os workloads cujo deployment nomeia o firewall e os critérios de cada regra. Um rule set de WAF não carrega domínio nem caminho e pontua as requisições que os critérios de uma regra entregam a ele, como a [visão geral do WAF](/pt-br/documentacao/plataforma/firewall/waf/#caminho-da-requisicao) descreve. | | match zone | A parte de uma requisição que uma condição do WAF inspeciona, como o valor de uma query string, o nome de um cabeçalho ou o corpo bruto, entre 15 no total. Azion Console seleciona uma pelo campo **Condition**, e não por um controle chamado match zone, e a API a recebe como `conditions[].match`. [Exceções](/pt-br/documentacao/plataforma/firewall/waf/custom-allowed-rules/#match-zones) lista as 15. | diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/firewall/primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/firewall/primeiros-passos.mdx index 09ab4a13c1..12d179598e 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/firewall/primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/firewall/primeiros-passos.mdx @@ -369,7 +369,21 @@ O deployment do workload nomeia o seu firewall, ao lado da aplicação e da cust ### CLI -O deployment de um workload é escrito pelo `azion deploy`, a partir da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`. Para vincular o firewall em um workload que já existe, siga o painel do Console. +Liste o deployment do seu workload para encontrar o ID dele e a aplicação que ele nomeia. Substitua `` pelo ID do seu workload: + +```bash +azion list workload-deployment --workload-id --details +``` + +A saída mostra o `ID` e o `EDGE APPLICATION` do deployment. A atualização envia a estratégia do deployment como um objeto só, então passe essa aplicação de novo ao lado do seu firewall. Se o workload usa um conjunto de custom pages, adicione também `--custom-page `. A saída de `azion describe workload-deployment --format json` traz o ID do conjunto como `custom_page`. + +Nomeie o seu firewall no deployment: + +```bash +azion update workload-deployment --workload-id --deployment-id --strategy-type default --edge-application --edge-firewall +``` + +A Azion CLI imprime `Updated Workload Deployment with ID `, e o deployment do workload nomeia o seu firewall. Para todas as flags, consulte [Azion CLI workload-deployment](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/). @@ -377,7 +391,7 @@ O deployment de um workload é escrito pelo `azion deploy`, a partir da entrada ### API -A referência publicada da API v4 da Azion não tem endpoint para o deployment de um workload. Para vincular o firewall, siga o painel do Console. +A referência publicada da API v4 da Azion não tem endpoint para o deployment de um workload. Para vincular o firewall, siga o painel do Console ou o da CLI. diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/firewall/solucao-de-problemas.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/firewall/solucao-de-problemas.mdx index 1832a401d0..ce0ce258fe 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/firewall/solucao-de-problemas.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/firewall/solucao-de-problemas.mdx @@ -35,7 +35,7 @@ As regras de um firewall nunca tocam as requisições que um workload recebe, me Um firewall inspeciona apenas os workloads cujo [deployment](/pt-br/documentacao/plataforma/workloads/) o nomeia, já que o registro do workload não tem campo de firewall. - **No Azion Console**: escolha o firewall em **Deployment Settings** › **Firewall**, que mostra `Select a Firewall` enquanto está vazio. -- **Com Azion CLI**: crie um deployment com `--firewall-id`, como [Vincule um firewall a um workload](/pt-br/documentacao/guias/seguranca-de-aplicacoes/firewall-e-waf/proteja-seu-dominio/#vincule-o-firewall-ao-workload) mostra para cada interface. +- **Com Azion CLI**: passe `--firewall-id` para `azion create workload-deployment` ao criar o deployment. Em um projeto que declara o workload no `azion.config.js`, nomeie o firewall em `strategy.attributes.firewall` da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) dele e execute `azion deploy`. Para cada interface, consulte [Vincule um firewall a um workload](/pt-br/documentacao/guias/seguranca-de-aplicacoes/firewall-e-waf/proteja-seu-dominio/#vincule-o-firewall-ao-workload). Quando o vínculo se [propaga](/pt-br/documentacao/plataforma/firewall/como-funciona/#propagacao), toda requisição ao workload passa pelas regras do firewall. diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/waf/como-funciona.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/waf/como-funciona.mdx index 2773d8f492..90b1184fea 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/waf/como-funciona.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/waf/como-funciona.mdx @@ -42,7 +42,7 @@ Cada modo troca um risco por outro. _Logging_ registra tudo o que teria sido blo Uma regra interna não é totalmente contida pelo modo. A regra 13, formato de POST inválido, bloqueia algumas requisições mesmo quando o rule set roda em _Logging_. Para o que cada regra interna corresponde, consulte [Rule sets do WAF](/pt-br/documentacao/plataforma/firewall/waf/rule-sets/#regras-internas). -Outras superfícies da Azion chamam o modo _Logging_ de learning. [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) o reporta no campo `wafLearning`, o payload do [Data Stream](/pt-br/documentacao/plataforma/data-stream/) carrega `waf_learning`, e o `azion.config.js` o define como `wafMode`. A própria API recusa `learning` como modo, com `10039`. +Outras superfícies da Azion chamam o modo _Logging_ de learning. [Real-Time Events](/pt-br/documentacao/plataforma/real-time-events/) o reporta no campo `wafLearning`, o payload do [Data Stream](/pt-br/documentacao/plataforma/data-stream/) carrega `waf_learning`, e o `azion.config.js` o define como `learning` no `mode` do behavior `set_waf`. A própria API recusa `learning` como modo, com `10039`. --- diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/aplicar-rule-set.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/aplicar-rule-set.mdx index 80fe789594..b39fa6f5e7 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/aplicar-rule-set.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/aplicar-rule-set.mdx @@ -323,7 +323,9 @@ No caso de uso [Proteger APIs públicas contra abuso](/pt-br/documentacao/casos- - **O WAF pontua um padrão de ataque.** Com um token válido, uma requisição com uma query string com formato de injeção, `https://api.example.com/v1/orders?q=1%27%20OR%20%271%27%3D%271`, é respondida como de costume em _Logging_, e recebe `HTTP/2 400` depois da mudança para _Blocking_. O seu `x-azion-request-id` encontra o registro no Real-Time Events. -Estas verificações confirmam o caso de uso [Bloquear account takeover em fluxos de login e checkout](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/bloquear-account-takeover-em-fluxos-de-login-e-checkout/). +No caso de uso [Bloquear account takeover em fluxos de login e checkout](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/bloquear-account-takeover-em-fluxos-de-login-e-checkout/), espere: + +- **O WAF pontua ataques em `/v1/`.** Uma requisição para `/v1/` com uma query string com formato de injeção é respondida como de costume em _Logging_, e recebe `HTTP/2 400` depois da mudança para _Blocking_. O `x-azion-request-id` dela encontra o registro no Real-Time Events. No caso de uso [Preparar aplicações web reguladas para auditorias de segurança](/pt-br/documentacao/casos-de-uso/proteger-aplicacoes-e-redes/preparar-aplicacoes-web-reguladas-para-auditorias-de-seguranca/), espere: diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/binding-no-arquivo-de-config.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/binding-no-arquivo-de-config.mdx index b40a28dc0f..cec7b40dec 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/binding-no-arquivo-de-config.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/waf/exemplos/binding-no-arquivo-de-config.mdx @@ -3,7 +3,7 @@ title: Vincule um rule set no azion.config.js description: >- Declare o WAF rule set e a regra do firewall que o aplica no azion.config.js, para que a Azion CLI crie os dois a partir do repositório. -meta_tags: 'waf, azion config js, set waf ruleset, waf mode, firewall, rules, criteria, thresholds, azion cli' +meta_tags: 'waf, azion config js, set_waf, waf mode, firewall, rules, criteria, thresholds, workload deployment, azion cli' namespace: documentation_products_waf_examples_config_file_binding permalink: /documentacao/guias/seguranca-de-aplicacoes/firewall-e-waf/binding-no-arquivo-de-config/ --- @@ -11,51 +11,24 @@ permalink: /documentacao/guias/seguranca-de-aplicacoes/firewall-e-waf/binding-no import DocCardGroup from '@aziontech/webkit/doc-card-group' import DocCard from '@aziontech/webkit/doc-card' -Você pode declarar um WAF rule set e a regra do firewall que o aplica no `azion.config.js`, e deixar que a [Azion CLI](/pt-br/documentacao/devtools/cli/) crie os dois a partir do arquivo. Os dois passam a ficar no repositório, em revisão junto da aplicação que eles protegem. +Você pode declarar um WAF rule set e a regra do firewall que o aplica no `azion.config.js`, com o deployment que vincula o firewall a um workload. A [Azion CLI](/pt-br/documentacao/devtools/cli/) cria todos eles a partir do arquivo, então eles ficam no repositório, em revisão junto da aplicação que protegem. --- ## Pré-requisitos -Você precisa da Azion CLI instalada e de um personal token configurado. +Você precisa da Azion CLI instalada, de um personal token configurado e do pacote `@aziontech/config` no projeto, que `npm install -D @aziontech/config` adiciona. --- ## Declare o rule set e a regra -No `azion.config.js`, declare o firewall com `waf: true`, a regra que carrega o behavior `setWafRuleset` e o rule set sob `waf`: +No `azion.config.js`, declare o rule set sob `waf`, o firewall com `waf: true` e a regra que carrega o behavior `set_waf` sob `firewall`, e o deployment do workload que nomeia o firewall sob `workloads`. O exemplo supõe que o mesmo arquivo declara uma aplicação chamada `storefront` em `applications`, já que um deployment só pode nomear uma aplicação que o arquivo declara: ```javascript -import { defineConfig } from 'azion'; +import { defineConfig } from '@aziontech/config'; export default defineConfig({ - firewall: { - name: 'storefront-firewall', - active: true, - waf: true, - rules: [ - { - name: 'Apply storefront-waf', - active: true, - criteria: [ - { - variable: 'request_uri', - conditional: 'if', - operator: 'starts_with', - argument: '/', - }, - ], - behaviors: [ - { - setWafRuleset: { - wafMode: 'blocking', - wafId: '', - }, - }, - ], - }, - ], - }, waf: [ { name: 'storefront-waf', @@ -72,12 +45,58 @@ export default defineConfig({ }, }, ], + firewall: [ + { + name: 'storefront-firewall', + active: true, + waf: true, + rules: [ + { + name: 'Apply storefront-waf', + active: true, + criteria: [ + { + variable: '${request_uri}', + conditional: 'if', + operator: 'starts_with', + argument: '/', + }, + ], + behaviors: [ + { + type: 'set_waf', + attributes: { mode: 'blocking', wafId: 'storefront-waf' }, + }, + ], + }, + ], + }, + ], + workloads: [ + { + name: 'storefront', + deployments: [ + { + name: 'storefront', + current: true, + active: true, + strategy: { + type: 'default', + attributes: { + application: 'storefront', + firewall: 'storefront-firewall', + }, + }, + }, + ], + }, + ], }); ``` -A Azion CLI lê o arquivo e cria o que ele declara: o firewall com o WAF ativado, o rule set e a regra que o aplica. +Execute `azion deploy` na pasta do projeto. A Azion CLI lê o arquivo e cria o que ele declara: o rule set, o firewall com o WAF ativado, a regra que aplica o rule set e o deployment que vincula o firewall ao workload. Enquanto nenhum deployment nomeia o firewall, as regras dele não veem nenhuma requisição. -`waf: true` no firewall ativa o WAF, que fica desativado até você ativá-lo. Uma família que você deixa de fora de `thresholds` não é configurada, então liste toda família que você quer pontuada. `setWafRuleset` aceita exatamente duas chaves, `wafMode` e `wafId`. `wafMode` aceita `learning` ou `blocking` neste arquivo: o mesmo modo se lê _Logging_ no Azion Console e `logging` em um payload da API. Para o que cada modo faz, consulte [Score e modos](/pt-br/documentacao/plataforma/firewall/waf/score-e-modos/). +`waf: true` no firewall ativa o WAF, que fica desativado até você ativá-lo. Uma família que você deixa de fora de `thresholds` não é configurada, então liste toda família que você quer pontuada. O behavior `set_waf` aceita dois atributos, `mode` e `wafId`. `wafId` nomeia o rule set pelo `name` dele em `waf` ou pelo ID. `mode` aceita `learning` ou `blocking` neste arquivo: o mesmo modo se lê _Logging_ no Azion Console e `logging` em um payload da API. Para o que cada modo faz, consulte [Score e modos](/pt-br/documentacao/plataforma/firewall/waf/score-e-modos/). Para cada campo do arquivo, consulte [azion.config.js](/pt-br/documentacao/devtools/cli/azion-config-js/#behaviors-da-regra-de-firewall). --- diff --git a/apps/docs/src/content/docs/pt-br/pages/secure/workloads/primeiros-passos.mdx b/apps/docs/src/content/docs/pt-br/pages/secure/workloads/primeiros-passos.mdx index cd137483a9..394b89ef0a 100644 --- a/apps/docs/src/content/docs/pt-br/pages/secure/workloads/primeiros-passos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/secure/workloads/primeiros-passos.mdx @@ -308,7 +308,19 @@ O deployment do workload nomeia a sua aplicação. ### CLI -O deployment de um workload é escrito pelo `azion deploy`, a partir da entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) do `azion.config.js`. Para vincular a aplicação em um workload que já existe, siga o painel do Console. +O workload que você criou ainda não tem deployment. Crie-o com o ID da sua aplicação. Substitua `` pelo ID do seu workload e `` pelo ID da sua aplicação: + +```bash +azion create workload-deployment --workload-id --name my-deployment --application-id +``` + +A saída traz o ID do deployment: + +```text +Created Workload Deployment with ID +``` + +O deployment do workload nomeia a sua aplicação. Um projeto que declara o workload no `azion.config.js` recebe o deployment do `azion deploy`, em vez desse comando. Esse deployment nomeia a aplicação que o deploy cria para o projeto, mesmo quando a entrada [`deployments`](/pt-br/documentacao/devtools/cli/azion-config-js/#deployments-do-workload) traz o ID de outra aplicação. Para todas as flags, consulte [Azion CLI workload-deployment](/pt-br/documentacao/devtools/cli/recursos/workload-deployment/). @@ -316,7 +328,7 @@ O deployment de um workload é escrito pelo `azion deploy`, a partir da entrada ### API -A referência publicada da API v4 da Azion não tem endpoint para o deployment de um workload. Para vincular a sua aplicação ao workload que você criou, siga o painel do Console. +A referência publicada da API v4 da Azion não tem endpoint para o deployment de um workload. Para vincular a sua aplicação ao workload que você criou, rode o comando do painel da CLI. diff --git a/apps/docs/src/content/docs/pt-br/pages/store-jornada/storage/usar-bucket-como-origem.mdx b/apps/docs/src/content/docs/pt-br/pages/store-jornada/storage/usar-bucket-como-origem.mdx index 1998929ee8..e494abd8b2 100644 --- a/apps/docs/src/content/docs/pt-br/pages/store-jornada/storage/usar-bucket-como-origem.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/store-jornada/storage/usar-bucket-como-origem.mdx @@ -407,7 +407,7 @@ O corpo da resposta é o objeto armazenado sob `src/index.html`, que o prefixo ` Acesse o mesmo endereço em um navegador. O navegador renderiza a página com a folha de estilos aplicada, que ele carrega de `/styles/style.css` sob o mesmo prefixo. -Se o domínio ainda não retorna o objeto, a regra não propagou. Envie a requisição de novo e procure outra causa somente depois disso. Para mais informações, consulte [Solucionar problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). +Se o domínio ainda não retorna o objeto, a regra não propagou. Envie a requisição de novo e procure outra causa somente depois disso. Para mais informações, consulte [Solucione problemas de Applications](/pt-br/documentacao/plataforma/applications/solucao-de-problemas/). No caso de uso [Entregar uma biblioteca de vídeos sob demanda](/pt-br/documentacao/casos-de-uso/entregar-midia-e-streaming/entregar-uma-biblioteca-de-videos-sob-demanda/), espere: diff --git a/apps/docs/src/env.d.ts b/apps/docs/src/env.d.ts index acef35f175..63a7cea702 100644 --- a/apps/docs/src/env.d.ts +++ b/apps/docs/src/env.d.ts @@ -1,2 +1,4 @@ /// /// + +declare module '@aziontech/icons'; diff --git a/apps/docs/src/nav/trees/applications.json b/apps/docs/src/nav/trees/applications.json index 1c941ef4db..2a09b1d5c3 100644 --- a/apps/docs/src/nav/trees/applications.json +++ b/apps/docs/src/nav/trees/applications.json @@ -288,7 +288,11 @@ "hidden": true }, { - "page": "documentation_products_edge_applications_rules_engine" + "page": "documentation_products_edge_applications_rules_engine", + "label": { + "en": "Rules Engine", + "pt-br": "Rules Engine" + } }, { "page": "documentation_products_edge_application_websocket" @@ -347,27 +351,19 @@ } }, { + "page": "documentation_pricing", + "hash": "applications", "label": { - "en": "Management", - "pt-br": "Gerenciamento" + "en": "Pricing", + "pt-br": "Preços" }, - "items": [ - { - "page": "documentation_pricing", - "hash": "applications", - "label": { - "en": "Pricing", - "pt-br": "Preços" - }, - "linkOnly": true - }, - { - "tree": "changelog", - "label": { - "en": "Changelog" - } - } - ] + "linkOnly": true + }, + { + "tree": "changelog", + "label": { + "en": "Changelog" + } } ] } diff --git a/apps/docs/src/nav/trees/cli.json b/apps/docs/src/nav/trees/cli.json index 202d0e268d..e529d33fce 100644 --- a/apps/docs/src/nav/trees/cli.json +++ b/apps/docs/src/nav/trees/cli.json @@ -308,6 +308,17 @@ "pt-br": "workload" } }, + { + "page": "documentation_cli_resource_workload_deployment", + "label": { + "en": "workload-deployment", + "pt-br": "workload-deployment" + }, + "slug": { + "en": "workload-deployment", + "pt-br": "workload-deployment" + } + }, { "page": "documentation_cli_resource_connector", "label": { diff --git a/apps/docs/src/util/markdownTwin/index.ts b/apps/docs/src/util/markdownTwin/index.ts index 437ab2a140..0516c358c0 100644 --- a/apps/docs/src/util/markdownTwin/index.ts +++ b/apps/docs/src/util/markdownTwin/index.ts @@ -52,7 +52,6 @@ const serializer = remark() // Two lists in a row (cards, then related items) stay apart without an HTML comment. bulletOther: '*', bulletOrdered: '.', - bulletOrderedOther: ')', emphasis: '*', strong: '*', fence: '`', @@ -173,7 +172,7 @@ async function convert( const [first, ...rest] = node.children ?? []; const labelled = (first?.data as { directiveLabel?: boolean })?.directiveLabel; const title = labelled ? plainText(first) : calloutTitle(options.lang, String(node.name)); - return callout(title, await ctx.transform(labelled ? rest : node.children ?? [])); + return callout(title, await ctx.transform(labelled ? rest : (node.children ?? []))); } case 'leafDirective': return [paragraph([text(sourceOf(node, source))])]; diff --git a/deployments/production.json b/deployments/production.json index 57d1818a29..2631fbdb23 100644 --- a/deployments/production.json +++ b/deployments/production.json @@ -3,10 +3,10 @@ "environment": "production", "state": "ready", "release": { - "version": "2.4.2", - "gitTag": "docs-v2.4.2", - "sourceCommit": "7169d549b908cb4aeeff8959e540aa6823245d43", - "githubReleaseUrl": "https://github.com/aziontech/docs/releases/tag/docs-v2.4.2" + "version": "2.4.4", + "gitTag": "docs-v2.4.4", + "sourceCommit": "47236e0792715a260cdd9650f816de3d3b6e32d4", + "githubReleaseUrl": "https://github.com/aziontech/docs/releases/tag/docs-v2.4.4" }, "build": { "nodeVersion": "26", @@ -16,7 +16,7 @@ "deploy": { "trigger": "release", "requestedBy": "github-actions[bot]", - "previousVersion": "2.4.1", + "previousVersion": "2.4.3", "reason": null, "workflowRunId": null, "workflowRunAttempt": null, @@ -24,12 +24,12 @@ "deployedAt": null }, "stage": { - "deploymentId": 7657228493, - "gitTag": "docs-v2.4.2", - "sourceCommit": "7169d549b908cb4aeeff8959e540aa6823245d43", + "deploymentId": 7691701302, + "gitTag": "docs-v2.4.4", + "sourceCommit": "47236e0792715a260cdd9650f816de3d3b6e32d4", "state": "success", - "logUrl": "https://github.com/aziontech/docs/actions/runs/42633156207", - "deployedAt": "2026-11-09T14:26:08Z" + "logUrl": "https://github.com/aziontech/docs/actions/runs/42881580409", + "deployedAt": "2026-11-10T19:12:09Z" }, "approval": { "mechanism": "GitHub pull request — main ruleset: 1 approval, code owner review, no bypass actors", diff --git a/package.json b/package.json index fb25d22c83..24fc49f890 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "tsc": "pnpm -F docs run tsc", "add-language": "pnpm -F docs run add-language", "replace:links": "pnpm -F docs run replace:links", + "lint:terraform": "node scripts/ci/terraform-validate.mjs", "lint:linkcheck": "pnpm -F docs run lint:linkcheck", "lint:linkcheck:nobuild": "pnpm -F docs run lint:linkcheck:nobuild", "lint:slugcheck": "pnpm -F docs run lint:slugcheck", @@ -38,7 +39,7 @@ "format:imports": "pnpm -F docs run format:imports", "format": "pnpm run format:code", "format:ci": "pnpm run format:imports && pnpm run format:code", - "format:code": "prettier -w . --cache --plugin-search-dir=.", + "format:code": "prettier -w . --cache", "lint:eslint": "eslint .", "lint:style": "stylelint \"apps/docs/src/**/*.{css,scss,vue,astro}\"", "lint:webkit": "eslint . -f json -o .eslint-report.json || true", @@ -49,20 +50,20 @@ "devDependencies": { "@aziontech/webkit": "5.3.0", "@eslint/js": "^10.0.1", - "eslint": "^10.13.0", - "eslint-plugin-astro": "^1.7.0", - "eslint-plugin-mdx": "^3.8.2", + "eslint": "^10.14.0", + "eslint-plugin-astro": "^3.2.1", + "eslint-plugin-mdx": "~3.8.3", "eslint-plugin-vue": "^10.11.1", "eslint-plugin-vuejs-accessibility": "latest", - "globals": "^17.13.0", + "globals": "^17.14.0", "husky": "latest", - "postcss-html": "^1.8.1", + "postcss-html": "^2.0.0", "postcss-scss": "^4.0.9", - "prettier": "^2.8.8", - "prettier-plugin-astro": "^0.8.0", - "stylelint": "^16.26.1", - "typescript": "^5.3.2", + "prettier": "^3.9.10", + "prettier-plugin-astro": "^1.1.2", + "stylelint": "^18.0.0", + "typescript": "^6.0.3", "typescript-eslint": "^8.72.0", - "vue-eslint-parser": "^10.4.1" + "vue-eslint-parser": "^10.4.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9467eb2d55..c37b51a6dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,6 +9,9 @@ overrides: undici@>=8.0.0 <8.12.2: ^8.12.3 lodash-es@<4.17.24: ^4.18.1 brace-expansion@^5.0.0: ^5.0.12 + '@napi-rs/wasm-runtime>@emnapi/runtime': ^1.11.3 + '@napi-rs/wasm-runtime>@emnapi/core': ^1.11.3 + eslint-mdx: ~3.8.3 patchedDependencies: '@aziontech/webkit@5.3.0': 2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9 @@ -19,76 +22,76 @@ importers: devDependencies: '@aziontech/webkit': specifier: 5.3.0 - version: 5.3.0(patch_hash=2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9)(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.9.3))(supports-color@9.4.0)(vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0))(vue@3.5.44(typescript@5.9.3)) + version: 5.3.0(patch_hash=2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9)(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(stylelint@18.0.0)(supports-color@10.2.2)(vue-eslint-parser@10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(vue@3.5.45(typescript@6.0.3)) '@eslint/js': specifier: ^10.0.1 - version: 10.0.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0)) + version: 10.0.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2)) eslint: - specifier: ^10.13.0 - version: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) + specifier: ^10.14.0 + version: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) eslint-plugin-astro: - specifier: ^1.7.0 - version: 1.7.0(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0) + specifier: ^3.2.1 + version: 3.2.1(@typescript-eslint/parser@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript-eslint@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)) eslint-plugin-mdx: - specifier: ^3.8.2 - version: 3.8.2(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0) + specifier: ~3.8.3 + version: 3.8.3(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) eslint-plugin-vue: specifier: ^10.11.1 - version: 10.12.0(@typescript-eslint/parser@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0)) + version: 10.12.0(@typescript-eslint/parser@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(vue-eslint-parser@10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)) eslint-plugin-vuejs-accessibility: specifier: latest - version: 2.6.3(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(globals@17.13.0)(supports-color@9.4.0) + version: 2.6.3(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(globals@17.14.0)(supports-color@10.2.2) globals: - specifier: ^17.13.0 - version: 17.13.0 + specifier: ^17.14.0 + version: 17.14.0 husky: specifier: latest version: 9.1.7 postcss-html: - specifier: ^1.8.1 - version: 1.8.1 + specifier: ^2.0.0 + version: 2.0.0(postcss@8.5.32) postcss-scss: specifier: ^4.0.9 - version: 4.0.9(postcss@8.5.28) + version: 4.0.9(postcss@8.5.32) prettier: - specifier: ^2.8.8 - version: 2.8.8 + specifier: ^3.9.10 + version: 3.9.10 prettier-plugin-astro: - specifier: ^0.8.0 - version: 0.8.1 + specifier: ^1.1.2 + version: 1.1.2(prettier@3.9.10) stylelint: - specifier: ^16.26.1 - version: 16.26.1(supports-color@7.2.0)(typescript@5.9.3) + specifier: ^18.0.0 + version: 18.0.0 typescript: - specifier: ^5.3.2 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 typescript-eslint: specifier: ^8.72.0 - version: 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) + version: 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) vue-eslint-parser: - specifier: ^10.4.1 - version: 10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0) + specifier: ^10.4.2 + version: 10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) apps/docs: dependencies: '@astrojs/vue': specifier: ^7.1.2 - version: 7.1.2(@types/node@18.19.130)(astro@7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(supports-color@9.4.0)(terser@5.51.2)(tsx@4.23.15)(vue@3.5.44(typescript@5.9.3))(yaml@2.9.1) + version: 7.1.2(@types/node@26.6.6)(astro@7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(supports-color@10.2.2)(terser@5.51.2)(tsx@4.23.15)(vue@3.5.45(typescript@6.0.3))(yaml@2.9.1) '@aziontech/icons': - specifier: ^4.2.0 - version: 4.3.0 + specifier: ^4.4.0 + version: 4.4.0 '@aziontech/theme': - specifier: 5.2.0 - version: 5.2.0 + specifier: 5.2.2 + version: 5.2.2 '@aziontech/webkit': specifier: 5.3.0 - version: 5.3.0(patch_hash=2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9)(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(stylelint@16.26.1(supports-color@9.4.0)(typescript@5.9.3))(supports-color@9.4.0)(vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0))(vue@3.5.44(typescript@5.9.3)) + version: 5.3.0(patch_hash=2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9)(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(stylelint@18.0.0)(supports-color@10.2.2)(vue-eslint-parser@10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(vue@3.5.45(typescript@6.0.3)) '@babel/types': - specifier: ^8.0.6 - version: 8.0.8 + specifier: ^8.1.0 + version: 8.1.0 '@tailwindcss/vite': - specifier: ^4.3.3 - version: 4.3.3(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + specifier: ^4.3.5 + version: 4.3.5(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) github-slugger: specifier: ^2.0.0 version: 2.0.0 @@ -102,8 +105,8 @@ importers: specifier: ^3.0.0 version: 3.0.0 mermaid: - specifier: ^12.2.0 - version: 12.2.0 + specifier: ^12.3.0 + version: 12.3.0 nanostores: specifier: ^0.10.3 version: 0.10.3 @@ -111,96 +114,96 @@ importers: specifier: ^7.1.0 version: 7.1.0 remark-smartypants: - specifier: ^2.0.0 - version: 2.1.0 + specifier: ^3.0.2 + version: 3.0.3 sharp: specifier: ^0.35.5 - version: 0.35.5(@types/node@18.19.130) + version: 0.35.5(@types/node@26.6.6) tailwindcss: - specifier: ^4.3.3 - version: 4.3.3 + specifier: ^4.3.5 + version: 4.3.5 vue: - specifier: ^3.5.44 - version: 3.5.44(typescript@5.9.3) + specifier: ^3.5.45 + version: 3.5.45(typescript@6.0.3) devDependencies: '@actions/core': specifier: ^3.0.1 version: 3.0.1 '@astrojs/check': specifier: ^0.9.12 - version: 0.9.12(@emnapi/runtime@1.11.3)(prettier-plugin-astro@0.8.1)(prettier@2.8.8)(typescript@5.9.3) + version: 0.9.12(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.2(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3) '@astrojs/markdown-remark': - specifier: ^7.3.4 - version: 7.3.5(supports-color@9.4.0) + specifier: ^7.3.6 + version: 7.3.6(supports-color@10.2.2) '@astrojs/mdx': - specifier: ^7.0.5 - version: 7.0.5(@astrojs/markdown-satteri@0.3.6)(astro@7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(supports-color@9.4.0) + specifier: ^8.1.3 + version: 8.1.3(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@astrojs/markdown-satteri@0.4.7)(astro@7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) '@astrojs/sitemap': specifier: 3.7.4 version: 3.7.4 '@tailwindcss/typography': specifier: ^0.5.20 - version: 0.5.20(tailwindcss@4.3.3) + version: 0.5.20(tailwindcss@4.3.5) '@types/hast': - specifier: ^2.3.4 - version: 2.3.10 + specifier: ^3.0.5 + version: 3.0.5 '@types/html-escaper': specifier: ^3.0.0 version: 3.0.4 '@types/mdast': - specifier: ^3.0.10 - version: 3.0.15 + specifier: ^4.0.4 + version: 4.0.4 '@types/node': - specifier: ^18.6.4 - version: 18.19.130 + specifier: ^26.6.6 + version: 26.6.6 algoliasearch: specifier: ^4.22.1 - version: 4.25.3 + version: 4.27.0 astro: - specifier: ^7.3.8 - version: 7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + specifier: ^7.4.7 + version: 7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) astro-auto-import: specifier: ^0.6.0 - version: 0.6.0(astro@7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 0.6.0(astro@7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) bcp-47-normalize: specifier: ^2.1.0 version: 2.3.0 cssnano: - specifier: ^6.0.3 - version: 6.1.2(postcss@8.5.31) + specifier: ^9.9.0 + version: 9.9.0(postcss@8.5.32) dedent-js: specifier: ^1.0.1 version: 1.0.1 domhandler: - specifier: ^4.3.1 - version: 4.3.1 + specifier: ^6.0.1 + version: 6.0.1 fast-glob: specifier: ^3.2.11 version: 3.3.3 hast-util-to-html: - specifier: ^8.0.4 - version: 8.0.4 + specifier: ^9.0.6 + version: 9.0.6 hast-util-to-string: specifier: ^3.0.1 version: 3.0.1 hastscript: - specifier: ^7.0.2 - version: 7.2.0 + specifier: ^9.0.3 + version: 9.0.3 html-escaper: specifier: ^3.0.3 version: 3.0.3 htmlparser2: - specifier: ^7.2.0 - version: 7.2.0 + specifier: ^12.0.0 + version: 12.0.0 kleur: specifier: ^4.1.5 version: 4.1.5 mdast-util-mdx-jsx: - specifier: ^2.1.2 - version: 2.1.4(supports-color@9.4.0) + specifier: ^3.2.1 + version: 3.2.1(supports-color@10.2.2) mdast-util-to-string: - specifier: ^3.1.1 - version: 3.2.0 + specifier: ^4.0.0 + version: 4.0.0 node-fetch: specifier: ^3.2.10 version: 3.3.2 @@ -208,32 +211,32 @@ importers: specifier: ^1.0.2 version: 1.0.2 p-retry: - specifier: ^5.1.1 - version: 5.1.2 + specifier: ^9.0.0 + version: 9.0.0 postcss: - specifier: ^8.5.31 - version: 8.5.31 + specifier: ^8.5.32 + version: 8.5.32 prompts: specifier: ^2.4.2 version: 2.4.2 remark: - specifier: ^14.0.2 - version: 14.0.3(supports-color@9.4.0) + specifier: ^15.0.1 + version: 15.0.1(supports-color@10.2.2) remark-directive: - specifier: ^2.0.1 - version: 2.0.1(supports-color@9.4.0) - remark-gfm: specifier: ^3.0.1 - version: 3.0.1(supports-color@9.4.0) + version: 3.0.1(supports-color@10.2.2) + remark-gfm: + specifier: ^4.0.1 + version: 4.0.1(supports-color@10.2.2) remark-mdx: - specifier: ^2.3.0 - version: 2.3.0(supports-color@9.4.0) + specifier: ^3.1.1 + version: 3.1.1(supports-color@10.2.2) simple-git: specifier: ^4.0.2 - version: 4.0.2(supports-color@9.4.0) + version: 4.0.2(supports-color@10.2.2) stream-json: - specifier: ^3.7.0 - version: 3.7.0 + specifier: ^3.8.0 + version: 3.8.0 tsm: specifier: ^2.3.0 version: 2.3.0 @@ -241,26 +244,26 @@ importers: specifier: ^4.23.15 version: 4.23.15 typescript: - specifier: ^5.3.2 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 unified: - specifier: ^10.1.2 - version: 10.1.2 + specifier: ^11.0.5 + version: 11.0.5 unist-util-remove: specifier: ^4.0.0 version: 4.0.0 unist-util-visit: - specifier: ^5.1.0 - version: 5.1.0 + specifier: ^5.2.0 + version: 5.2.0 unist-util-walker: specifier: ^1.0.0 version: 1.0.0 vfile: - specifier: ^5.3.6 - version: 5.3.7 + specifier: ^6.0.3 + version: 6.0.3 vitest: - specifier: ^5.0.5 - version: 5.0.5(@edge-runtime/vm@3.2.0)(@types/node@18.19.130)(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + specifier: ^5.1.0 + version: 5.1.0(@edge-runtime/vm@3.2.0)(@types/node@26.6.6)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) packages: @@ -276,50 +279,50 @@ packages: '@actions/io@3.0.2': resolution: {integrity: sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==} - '@algolia/cache-browser-local-storage@4.25.3': - resolution: {integrity: sha512-J0vrnbIYmDIf9d9qQwBXaHn10VoQ/rA+2iBMr/idfsjHhL9I4h2pC9Dj1i0ggDLv9sPajbeVVh0BdC+mDbo7Tw==} + '@algolia/cache-browser-local-storage@4.27.0': + resolution: {integrity: sha512-YGog2s57sO20lvpa+hv5XLAAmiTI1kHsCMRtPVfiaOdIQnvRla21lfH08onqEbZihOPVI8GULwt79zQB2ymKzg==} - '@algolia/cache-common@4.25.3': - resolution: {integrity: sha512-dDls2jhGFdkGnoKwXADBnjosHKdKiwlY+tzaua5J0q9XJptn6DCBDUt3pg46GhTRz+64x08M+dyp8nNoV+3/Jw==} + '@algolia/cache-common@4.27.0': + resolution: {integrity: sha512-Sr8zjNXj82p6lO4W9CdzfF0m0/9h/H6VAdSHOTtimm/cTzXIYXRI2IZq7+Nt2ljJ7Ukx+7dIFcxQjE57eQSPsw==} - '@algolia/cache-in-memory@4.25.3': - resolution: {integrity: sha512-6u/fVDr3ZIJIgtqdgUDB5kL9KcOdowmxf052bjfI1XhFTpxmIa49HcAEh1y2R0YqmmNDQHaPCT0QzwkINhWbug==} + '@algolia/cache-in-memory@4.27.0': + resolution: {integrity: sha512-abgMRTcVD0IllNvMM9JFhxtyLn1v6Ey7mQ7+BGS3JCzvkCX7KZqlS0BIuVUDgx9sPIfOeNsG/awGzMmP50TwZw==} - '@algolia/client-account@4.25.3': - resolution: {integrity: sha512-TkSVT5+davX4Dzt3gyEJ+SAfaVT5bHrZctAiup/AGPV7sNBigv4kuZv40OEbMMgu1uPJ4zw3tA39Oj/mOjd6gg==} + '@algolia/client-account@4.27.0': + resolution: {integrity: sha512-sSHxwrKTKJrwfoR/LcQJZfmiWJcM5d9Rp7afMChxOcdGdkSdIwrNBC8SCcHRenA3GsZ6mg+j6px7KWYxJ34btA==} - '@algolia/client-analytics@4.25.3': - resolution: {integrity: sha512-vHSU4zBaENbRjzwFYB3OQuDlKXwe+YDRgyGh1kKZhcMRDSsEBH/PGNWn+2ZmtbgrNS52TC+TJ8oUOg5wXIeISw==} + '@algolia/client-analytics@4.27.0': + resolution: {integrity: sha512-MqIDyxODljn9ZC4oqjQD0kez2a4zjIJ9ywA/b7cIiUiK/tDjZNTVjYd9WXMKQlXnWUwfrfXJZClVVqN1iCXS+Q==} - '@algolia/client-common@4.25.3': - resolution: {integrity: sha512-ExRdFnJDe7t1/DgJUsqjzZKeI9gkLft4oVttlyTMru8TRNWA6eZ0wHRj4uQ9N3sxmzPiw3C53wigor705n1yQw==} + '@algolia/client-common@4.27.0': + resolution: {integrity: sha512-ZrT6l/YPQgyIUuBCxcYPeXol2VBLUMuNb1rKXrm6z1f/iTiwqtnEEb16/6CC11+Re0ZGXrdcMVrgDRrzveQ1aQ==} - '@algolia/client-personalization@4.25.3': - resolution: {integrity: sha512-ycCkQ0nWoH+sf0Gh20kk4NfJ+iUBc59ailqNCFcVl/0th1dtHF0P61IGetTsSmxVPZedDvnHop2z1ujWpYzNmw==} + '@algolia/client-personalization@4.27.0': + resolution: {integrity: sha512-OZqaFFVm+10hAlmxpiTWi/o2n+YKBESbSqSy2yXAumPH/kaK4moJHFblbh8IkV3KZR0lLm4hzPtn8Q2nWNiDUA==} - '@algolia/client-search@4.25.3': - resolution: {integrity: sha512-GFA99zL6cfNSDEDHfEJ0TmVYmXCJofQpForFhCShQLfRQgBYud9UBHOh4LB6ZSzmtVDIfP33joCA9hxQWPIbFw==} + '@algolia/client-search@4.27.0': + resolution: {integrity: sha512-qmX/f67ay0eZ4V5Io8fWWOcUVo/gqre2yei1PnmEhQU2Gul6ushg25QnNrfu4BODiRrw1rwYveZaLCiHvcUxrQ==} - '@algolia/logger-common@4.25.3': - resolution: {integrity: sha512-RrlmuHNTc9CIgykWh37QduDAkpX4745KQ75I+vhgT5ER3BBykaYByDTyWkyFSSlZjpDHXtOymu9epNbI5V6OWQ==} + '@algolia/logger-common@4.27.0': + resolution: {integrity: sha512-pIrmQRXtDV+zTMVXKtKCosC2rWhn0F0TdUeb9etA6RiAz6jY6bY6f0+JX7YekDK09SnmZMLIyUa7Jci+Ied9bw==} - '@algolia/logger-console@4.25.3': - resolution: {integrity: sha512-s8AtfF9W+6Pbxfwkmzywd8ThVJ04D4JZlNyBdCuWpC5b3jzx1JAXT9ZL8K2faUsO4rEdHpy9LXMURvF7cQAE0w==} + '@algolia/logger-console@4.27.0': + resolution: {integrity: sha512-UWvta8BxsR/u5z9eI088mOSLQaGtmoCtXeN3DYJurlxAdJwPuKtEb5+433kxA6/E9f2/JgoW89KZ1vNP9pcHBQ==} - '@algolia/recommend@4.25.3': - resolution: {integrity: sha512-/vpXzDFLmrkcM1UOvZae8i/z8wRs2uaKKlPaHqN24ySADWKyf2zxVsDmtcaGMYzBYqYsKR1XKFvwGA5HQxaZxQ==} + '@algolia/recommend@4.27.0': + resolution: {integrity: sha512-CFy54xDjrsazPi3KN04yPmLRDT72AKokc3RLOdWQvG0/uEUjj7dhWqe9qenxpL4ydsjO7S1eY5YqmX+uMGonlg==} - '@algolia/requester-browser-xhr@4.25.3': - resolution: {integrity: sha512-5ZXO55IDqXUehQKilVYU6OdUBT2XGI+JIki2UsxUkMykH4ksA9EU8YZJth1ZwEYTDC50bVSH32VCYsOFB0MUTA==} + '@algolia/requester-browser-xhr@4.27.0': + resolution: {integrity: sha512-dTenMBIIpyp5o3C2ZnfbsuSlD/lL9jPkk6T+2+qm38fyw2nf49ANbcHFE79NgiGrnmw7QrYveCs9NIP3Wk4v6g==} - '@algolia/requester-common@4.25.3': - resolution: {integrity: sha512-n5dJA5jlIle5IQavlDWBXC46lw/VuwFbbknWJcPiJ6nJ6lRllpLOhV2ZJeUdCvRyg/6zG18h+9+Q/m2d/vLEIw==} + '@algolia/requester-common@4.27.0': + resolution: {integrity: sha512-VC3prAQVgWTubMStb3mJz6i61Hqbtagi2LeIbgNtoFJFff3XZDcAaO1D5r0GYl2+DrB2VzUHnQXbkiuI+HHYyg==} - '@algolia/requester-node-http@4.25.3': - resolution: {integrity: sha512-7BXWAyVMK1Z3gT+2RPv0I48HfaIlho3nCQaB/tjziw+DdPigHRDq+xjtdzL8y+5O1g7LEdlPI9QHAgDbW/BLXw==} + '@algolia/requester-node-http@4.27.0': + resolution: {integrity: sha512-y8nUqaUQeSOQ5oaNo0b2QPznyBFW9LoIwljyUphJ+gUZpU6O/j2/C8ovoqDpIe6J0etqHg5RCcBizrCFZuLpyw==} - '@algolia/transporter@4.25.3': - resolution: {integrity: sha512-2yji+TKjC1uOxhJ9pCdw7lQm6GSiQ+fMvNH4es6oz82DrBpkVHkeU49HmpyTqz8Ai9e+nW/UBz8T9+UyBul3dA==} + '@algolia/transporter@4.27.0': + resolution: {integrity: sha512-PvSbELU4VjN3xSX79ki+zIdOGhTxyJXWvRDzkUjfTx2iNfPWDdTjzKbP1o+268coJztxrkuBwJz90Urek7o1Kw==} '@antfu/install-pkg@2.1.0': resolution: {integrity: sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw==} @@ -405,20 +408,8 @@ packages: resolution: {integrity: sha512-IvwYLB8t1M86rKO4oPdBi9GP4gzXcgrVlNgocjwos1jeeUuEIV8d9Crn1PvYD/5IKteWOxpIHomf7e8iYlkE+Q==} engines: {node: '>=22.12.0'} - '@astrojs/compiler@1.8.2': - resolution: {integrity: sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==} - - '@astrojs/compiler@2.13.1': - resolution: {integrity: sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg==} - - '@astrojs/internal-helpers@0.10.2': - resolution: {integrity: sha512-yt7fMgPYqSM4Tmr+taTW6Per+hjJ8Pk6lA1PAcDyqzOt8HzJ6Kje5WzCxA2Sd+9wsUW7uhkLeoTMK0cXPwH9rQ==} - - '@astrojs/internal-helpers@0.10.3': - resolution: {integrity: sha512-HIx/t1NywcqSTFaVwZh15n8JsC3YQdCaJZDaTS/aurYTEvNiWDXUGS3Z9uQX3bFB+B1pCgN/nljckkzYTpHZ2w==} - - '@astrojs/internal-helpers@0.13.0': - resolution: {integrity: sha512-20jxQqnSmpskcGyad7N5l6Xf1gz0UCa6lNde44bEBdaXGpncEYfAZJ142r2ZgzBaG4dUyzGmhqZWv1INU2eiHQ==} + '@astrojs/internal-helpers@0.13.1': + resolution: {integrity: sha512-LgGLGzoC0wCT3mjDYrxz+hct/tws0enpWsLJW3bswHR3PKgusp/H9xRIT8rTdsyvLM0TcRhhvRL30J2oaZNcqA==} '@astrojs/language-server@2.17.3': resolution: {integrity: sha512-QIAFu1e/4quJMTPdmBOm+ZPXc5NDGZE4/YQjgR3EgjhGLl/tdidaWJDr5WmO2lesVc+BW1qN/xNBURmuePDG2A==} @@ -432,32 +423,23 @@ packages: prettier-plugin-astro: optional: true - '@astrojs/markdown-remark@7.2.2': - resolution: {integrity: sha512-FGfmK84zSNcrsBd0dl1gXE9JvZYElp8EXQa2jpHVAxG4deGKAp43wspxFupjADJX7MSsMRHwYCnfT6EyVmgeFQ==} - - '@astrojs/markdown-remark@7.3.5': - resolution: {integrity: sha512-Xk0gvOMEpBul2zj5jZXS5WH2Gng/6dW7c3WWLXgip+LZGpY64frwTvBChznMtpnNIqVgFXSsu44RYrISojcodQ==} - - '@astrojs/markdown-satteri@0.3.6': - resolution: {integrity: sha512-kkeWP4Lh6Do/qz2R0DIAtPWCh6WPr1J4UrzDItVmHMK1HwyLHxG4JxM8uBNavhD7ivGOO9BUTsAP5D7ppa68CA==} + '@astrojs/markdown-remark@7.3.6': + resolution: {integrity: sha512-L90VeM6yRCjTiqJvHmIZo2GwSYcWlvX/30T8S03NH2LUShiKIfCQusvQWFUU6sjmI07WouDPv2kz30SEaVCcdQ==} - '@astrojs/markdown-satteri@0.4.6': - resolution: {integrity: sha512-6biKp2lEAYycF3jhv91br+Otyf4EgDFkF1oRL9ks0u/m/YRGmI7XkGQ2MgaM35DslT03f7NtozKtlqfBNkp6bw==} + '@astrojs/markdown-satteri@0.4.7': + resolution: {integrity: sha512-MZvnec/898GGGHQZfkArVbkdZmL1imjIM8RWkmzbAmse737zr8D9inUjFQ5eLBXV3vPobOUs/ZRV/D6Po/bVDg==} - '@astrojs/mdx@7.0.5': - resolution: {integrity: sha512-wEM/HH1RiEntyPVagdiF+yArzfcYLKBB0C1RZspVidKZ97rRMbaqP1Nbl/GR0sJs8zwaceqxRymw8aOKKJRdYw==} - engines: {node: '>=22.12.0'} + '@astrojs/mdx@8.1.3': + resolution: {integrity: sha512-Fd72Sy0AvFqXSC/RR7icvNi27T5KWNojnvuHgu38lx6RkevRzLWDxzHk3sbtL2z17yvVr7j28KCyHcLr2jQ7Pg==} + engines: {node: '>=22.23.4'} peerDependencies: - '@astrojs/markdown-satteri': ^0.3.1 - astro: ^7.0.0 + '@astrojs/markdown-remark': ^7.3.0 + '@astrojs/markdown-satteri': ^0.4.0 + astro: ^7.2.10 peerDependenciesMeta: - '@astrojs/markdown-satteri': + '@astrojs/markdown-remark': optional: true - '@astrojs/prism@4.0.2': - resolution: {integrity: sha512-KTivpmnz6lDsC6o9H4+DNm2SrE/GHzw8cNAvEJwAvUT+eoaEnn/4NtbDNfRRaxaJHdp15gf+tfHAWiXR4wB3BA==} - engines: {node: '>=22.12.0'} - '@astrojs/prism@4.1.2': resolution: {integrity: sha512-jMrUEpFDarDO1KWPvVc9eSa8DSfwBlwEOHwX+8zvZQpiqXRGDxFnOXHsYqV6DP7w+0qIgTr98gS1GdQlm8ypWg==} engines: {node: '>=22.23.4'} @@ -479,14 +461,14 @@ packages: '@astrojs/yaml2ts@0.2.4': resolution: {integrity: sha512-8oddpOae35pJsXPQXhTkM0ypfKPskVsh2bCxRtbf7e+/Epw2nReakFYpLKjZMEr75CsoF203PMnCocpfz0s69A==} - '@aziontech/icons@4.3.0': - resolution: {integrity: sha512-M7NR+QPKvj83nJ+tSBhE7FJpmyTiHii75Tk3UEvY+GHR0ToJsgt/Sjr0FJhDsBUWgz/lPqAalzO2ftpa2/TfIg==} + '@aziontech/icons@4.4.0': + resolution: {integrity: sha512-29M2tGaEYdYAZDLOTj7EvsJj8qKGZcFw0hZtgrnYrW6yP4oaOEWTf7lpo59ZuKlIHwz9sjYyFaUWxIYWQxegbA==} '@aziontech/theme@4.3.1': resolution: {integrity: sha512-MorGzsZ5H0+ehojMjZNNgM9Jb+Uv6JFUmxls5KguNc6FQW+RdCqXdxMxiYPfgFYzuHNxZEkVVlfBO9VvEKtChQ==} - '@aziontech/theme@5.2.0': - resolution: {integrity: sha512-ULlbmZWiOZqqhy/u3Zm/3fjk/OHZafnZEcikrVp68LE9NqvNc/GQDl+EgocOwJ9q3dEDMRvKoRn62V6fsxZ9og==} + '@aziontech/theme@5.2.2': + resolution: {integrity: sha512-Fd4hNL3lLUNsDqqlQZBsWtKX/4bRZEuhF+1Xoz8Z+F4xyQi+g3axr/cQC759dgb0JBYs20dWSwPyuwFkTfonaQ==} '@aziontech/webkit@5.3.0': resolution: {integrity: sha512-EuG5YLN35PZmgm/aukKCRys5656sayoClzGBeWadG+XwiUB8jDL0OPeua3EMQxaeU8UqIC6kbwDVJaDzKLfeAQ==} @@ -570,8 +552,8 @@ packages: resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.29.11': - resolution: {integrity: sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==} + '@babel/helper-string-parser@7.29.13': + resolution: {integrity: sha512-fWegr+WsEsiMVW4KUNdIIzzMTZSzNiqhy0//6+2MRi2d5NFNsL/AYwBQW8eBnRbTBVRnDVzjaJEUqKaCWjMMdQ==} engines: {node: '>=6.9.0'} '@babel/helper-string-parser@8.0.8': @@ -594,8 +576,8 @@ packages: resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} engines: {node: '>=6.9.0'} - '@babel/parser@7.29.11': - resolution: {integrity: sha512-OZ6+oaK7GMyg3IfCpj8JOmn8n+w2rJbDT0LLfVDTLb1ZFeKDh3AiNELgCMUw175IJHSkLl74hG0M0VLsvx+gag==} + '@babel/parser@7.29.13': + resolution: {integrity: sha512-fJM50YYjlTiBhgdkGmC1tBpv+FMAyo4annf2X6Aks+0yRlaiVkYW/3f07xAfVVkYIoZ9fFZp+mEThUFnuybhkQ==} engines: {node: '>=6.0.0'} hasBin: true @@ -652,108 +634,69 @@ packages: resolution: {integrity: sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==} engines: {node: '>=6.9.0'} - '@babel/types@8.0.8': - resolution: {integrity: sha512-iXSSZAKQWmaeAwGtFw10v9fg5hUiUs0L+w+Z2K11kym3pDNK+SF0VcAQPsEFvWcTSZ7LMgClMXDBvTbH0IlICg==} + '@babel/types@8.1.0': + resolution: {integrity: sha512-8V8aSTDx012YPmDQF30vrokyxVFdRAU2YBS2VzrnfLAGkP8floVnjckwgFcD0Jrvf6GWMSRdCrYVsk3tyMwZRg==} engines: {node: ^22.18.0 || >=24.11.0} '@braintree/sanitize-url@7.1.2': resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} - '@bruits/satteri-darwin-arm64@0.10.5': - resolution: {integrity: sha512-27KTVl4TJkVahMy/ohyA7qd4938G5UNneFUz/PsScYfpIhj0IVAS23mpcJXdPF44sa6nva198lmV/cKIb2YPyA==} + '@bruits/satteri-android-arm64@0.11.7': + resolution: {integrity: sha512-ej+1rIKs+yb6/OtcIe1SO22OXjJV0qqUopl5VNZF8Sqc/Pj4m1DXoqBQsPxW5OUYYiDUymIy6hnnn8M78VYk2w==} cpu: [arm64] - os: [darwin] + os: [android] - '@bruits/satteri-darwin-arm64@0.9.5': - resolution: {integrity: sha512-iw4nZgx9v30lWo/MTngQqi1pI78KI0DnkSm+lVJGYdmPLgAyDNJigVhpG42/Iq55A6c1Ll8q66ljyyRiQUxwow==} + '@bruits/satteri-darwin-arm64@0.11.7': + resolution: {integrity: sha512-yllQOX1kVWrwqL7tamQlp4NP0loIb4KuadjuNrAe4JEOerHpgYISPRDb8DqLipgvP7Ks4e87LydZpdakMR1rhQ==} cpu: [arm64] os: [darwin] - '@bruits/satteri-darwin-x64@0.10.5': - resolution: {integrity: sha512-IjnLe3nKspq6qaeqGgjT7MT8VrTV74yWRlaag7ZdNsI8TDAYZ0iPxMCo+9KQZHUk5EyVB+reBI/PFWL5KuFw9Q==} + '@bruits/satteri-darwin-x64@0.11.7': + resolution: {integrity: sha512-RMQrKzEZRZSiYyLFifiSuk0nBH6uAY1TVMNR/h/aE4rr2OS6l82e4MJTpC6H/tqSMoE+3CwbkUKBQGLHIweYlg==} cpu: [x64] os: [darwin] - '@bruits/satteri-darwin-x64@0.9.5': - resolution: {integrity: sha512-6T26Z5Kf3cFW2PSlk9p7zT7yVxvuBSiJvYyz9u8KjYwMTqZyIDOj2wDyNpxKV4+6yUVG7rddq2QwvG/8LJA2+Q==} + '@bruits/satteri-freebsd-x64@0.11.7': + resolution: {integrity: sha512-EFlqw+RDRo3wYdy1ZSR/dNYhfWjuZL86PYwRcpLWWEZskjfpNnhIdxS13Xw2QJE1hSjTGVq4aZaVvlUjoj8p5A==} cpu: [x64] - os: [darwin] - - '@bruits/satteri-linux-arm64-gnu@0.10.5': - resolution: {integrity: sha512-glkYXZCJywjP13v67eAyAMSJdF+ncvEbYvgi/wOtffL9tQ27lr/zsyzUfgs+ovjJ9d8JNQKiXeiArJcX8PJL9w==} - cpu: [arm64] - os: [linux] - libc: [glibc] + os: [freebsd] - '@bruits/satteri-linux-arm64-gnu@0.9.5': - resolution: {integrity: sha512-u51id17uJwNEMK9nBlICsq6U31c+XVqQueVBkwRIzZG+gMpS8TOJctt5h5Wz33Z8xnMdTd+adtACVz0yHgGuOA==} + '@bruits/satteri-linux-arm64-gnu@0.11.7': + resolution: {integrity: sha512-aeH365GHaqv01wRSiHaGUlpL28U8e9UnV9LxjIF6BOyTj71/M5bop4HKomcis4VxFZjd68fDqNyU22yFkF/h7A==} cpu: [arm64] os: [linux] libc: [glibc] - '@bruits/satteri-linux-arm64-musl@0.10.5': - resolution: {integrity: sha512-yWdgG1g17Nh2QyGVlFUxGRa3FEFwiMcpZEyMNWkbM3deC94cmVc+/i9OuyFpdKuWo3GkgoCtYVOoxk1uCnCZIA==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@bruits/satteri-linux-arm64-musl@0.9.5': - resolution: {integrity: sha512-v39HxiwGC5Rqm01HksP6+5Y+xKLPlsuVFgIgpEAo+SiQ22c+mJVhS3u7Z6ePAKdhL5NJoK1xq70kLz3L13AhpQ==} + '@bruits/satteri-linux-arm64-musl@0.11.7': + resolution: {integrity: sha512-72WlBhuwOHm+2Nv4Qf1WzfS75PHOLz81sYkDJnmj0Rm2C4Xax5faSiTDt7vWo1IcK6rDlkuRDNnWIw8uIKWuVQ==} cpu: [arm64] os: [linux] libc: [musl] - '@bruits/satteri-linux-x64-gnu@0.10.5': - resolution: {integrity: sha512-FVaLoPT1fBgGl0J+AYebyyXJYBachGl8Oyyrf1lye4RTqCB4S0Gwkj1uM9RJyThUOvx5VUmAT1CnNh1SFHA+kw==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@bruits/satteri-linux-x64-gnu@0.9.5': - resolution: {integrity: sha512-F3uO8uFp3pAP5ZGXttwvh57GS7s0lL953tnNdyI2gRyP4kOOkp6pyGojNJzCjkDvWI2Cvb9iNrKok3aqQPauAw==} + '@bruits/satteri-linux-x64-gnu@0.11.7': + resolution: {integrity: sha512-gDp4v1jjckeNCetLtrMUfDV4CKGYL6fayDPdoaQq09nkDCSrclxEFK7kAmRuHhoalgsao4bZMFqQr3HQtN2NEQ==} cpu: [x64] os: [linux] libc: [glibc] - '@bruits/satteri-linux-x64-musl@0.10.5': - resolution: {integrity: sha512-EHpVAx2bqW3GINHTKkljtxVfQmVDGWIuwOYOP5YghTj+0PkBa2o8oKPRtQ9Kbsr1Fye8jtUcDjhwj2jMNugZKg==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@bruits/satteri-linux-x64-musl@0.9.5': - resolution: {integrity: sha512-bicEqglLlz++mWyADaZoP0JY20s4vDfLjaPYgQqC+NI4zZLTOOg1T4GB8aqtc822Pqji8SQBmSrTb7CrP8i08Q==} + '@bruits/satteri-linux-x64-musl@0.11.7': + resolution: {integrity: sha512-zqzSpQLA6V3J/TO2Vjuc1VRQPIQQdoSYmzKKFL+3GwGlbXiFQP2ZUDSLw9xlm0tTKXkCM9ANr4jMiDASZ+JGUw==} cpu: [x64] os: [linux] libc: [musl] - '@bruits/satteri-wasm32-wasi@0.10.5': - resolution: {integrity: sha512-ypz8c/Zmipxp4IoeDa228Gstv6TLzVmNs3yC6wKCoNSOjx1iwpgzu87Y3hTkXFdwChVGU85qeUDuOIarGUZQLw==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@bruits/satteri-wasm32-wasi@0.9.5': - resolution: {integrity: sha512-zauAuMwfPnKPUkd4AFixRFpXdgKwP2mKgxrIIo2gJzW0/ZneF9dbHnLkojSpaBnCCp7VUL1hIi5WWZvB1CqmAQ==} + '@bruits/satteri-wasm32-wasi@0.11.7': + resolution: {integrity: sha512-L46f6rtlaBR4fsTWGCTFcXtbtka2GyM3l9TsmE0FgTxjXGq+sndYg5X3hzlhWDkNvJpRtCHCmgTRJ5+cIi4o3A==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@bruits/satteri-win32-arm64-msvc@0.10.5': - resolution: {integrity: sha512-siTV88nb0LRqNpkL2gXboqCwVdq95sLtzMHS1/3eONV2gLbB3NAK46wmSMvCO/yquBvI2lvaFIfd8P12ecsxBw==} - cpu: [arm64] - os: [win32] - - '@bruits/satteri-win32-arm64-msvc@0.9.5': - resolution: {integrity: sha512-SrfE7NEsgZjBvU3c+RR6oQRu0ToXY5uVJEbieXEF0YTctIV2zAVlbaMjWLts074QCgh3a+XHWkR/lWh2VH2LUg==} + '@bruits/satteri-win32-arm64-msvc@0.11.7': + resolution: {integrity: sha512-R2+o6EbJK4pqbd086H9BGUVYAyZ5F6FnShfoyRIu0Zu9DTE3H6EU/Z+ua7p9dmYf6JQQbE9DCwwavi4xiaGAhQ==} cpu: [arm64] os: [win32] - '@bruits/satteri-win32-x64-msvc@0.10.5': - resolution: {integrity: sha512-C3IfPvfvMXmlzBxaMPKFS1XiuV9pu2mC7YqkPk7PSvTgPZ8gbdASIpHpztDLvTTQjqZ0z1Ol8tK5X+V6XXC0wQ==} - cpu: [x64] - os: [win32] - - '@bruits/satteri-win32-x64-msvc@0.9.5': - resolution: {integrity: sha512-5Kw9ZAtTGS8WHizyn+CJhjjfIQrw+7jcZodpmpXJjefnO15M8UexIi6JR2E5thyvsmHyhL6ZDDMUNR4bKJPd4g==} + '@bruits/satteri-win32-x64-msvc@0.11.7': + resolution: {integrity: sha512-OIyBFJ35uMu5CH5RWnIR3bKsZwScKZ7vXmhCohZ+qonT1SkxmHCEf4H8YRWThRL2EXdVDjkjhfOsaiA4O24Vvw==} cpu: [x64] os: [win32] @@ -790,36 +733,52 @@ packages: resolution: {integrity: sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ==} engines: {node: '>= 20.12.0'} - '@csstools/css-parser-algorithms@3.0.5': - resolution: {integrity: sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==} - engines: {node: '>=18'} + '@colordx/core@7.3.0': + resolution: {integrity: sha512-LVzTTPhX7wpy7TkGjouA9zbbCBIw92RGm7ZQqSKFE0oYE3sMx2FGXz90eVpgw7k/+wrrY+qJ86nHXifZWMS5jA==} + + '@csstools/css-calc@3.4.3': + resolution: {integrity: sha512-iex20d8CHVkyvg6B7UKV7uHnI2Bqo9g+EFfT9E0y+GvTvhZ/DwONJ+9aKb1dlqm0ZiGsL5RXjp0fCoJYnkeDjA==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@csstools/css-parser-algorithms': ^4.0.2 + '@csstools/css-tokenizer': ^4.0.2 + + '@csstools/css-parser-algorithms@4.0.2': + resolution: {integrity: sha512-40cSKyMvK+tq4qz6Awrlye2WGuOKt3FwPgtGg6KTfbHOWNw+Rk1rzbAtZnZ6IBhsY491HLRnDXwoyBAijmmILA==} + engines: {node: '>=20.19.0'} peerDependencies: - '@csstools/css-tokenizer': ^3.0.4 + '@csstools/css-tokenizer': ^4.0.2 - '@csstools/css-syntax-patches-for-csstree@1.1.12': - resolution: {integrity: sha512-3vLQK+dXxhBMR2Wx99PTCifE+vHtW2ndZWyla8yK813ev6oGhyn8Lja8jCyGAWTJ+LEYZK7EVtJxrDj8ztevJw==} + '@csstools/css-syntax-patches-for-csstree@1.1.16': + resolution: {integrity: sha512-LsDbJPP/B8cPasUJyTA5S99F7C4G93ngW8hUluXz8CFeOaaRnBPtBiIlvgcPYU0HmHNz8CXg+1vwFrIB4F6Dgw==} peerDependencies: css-tree: ^3.2.1 peerDependenciesMeta: css-tree: optional: true - '@csstools/css-tokenizer@3.0.4': - resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} - engines: {node: '>=18'} + '@csstools/css-tokenizer@4.0.2': + resolution: {integrity: sha512-OoKoR0f76dCY666JlcbhmVTs2drYj1GUXZTYTcbUgJjh9Nv41aFfZ21bPQTERm5+L5cBDo466NltB2lplS5GBw==} + engines: {node: '>=20.19.0'} - '@csstools/media-query-list-parser@4.0.3': - resolution: {integrity: sha512-HAYH7d3TLRHDOUQK4mZKf9k9Ph/m8Akstg66ywKR4SFAigjs3yBiUeZtFxywiTm5moZMAp/5W/ZuFnNXXYLuuQ==} - engines: {node: '>=18'} + '@csstools/media-query-list-parser@5.0.2': + resolution: {integrity: sha512-qx19O8AbbLLbDSAcI6YOby/Vq8rV51psgIvlF5OZT/L8fQJDCyQifL6k+kYU4a8ySpzJ4RBzZkIs530bAn8y4Q==} + engines: {node: '>=20.19.0'} peerDependencies: - '@csstools/css-parser-algorithms': ^3.0.5 - '@csstools/css-tokenizer': ^3.0.4 + '@csstools/css-parser-algorithms': ^4.0.2 + '@csstools/css-tokenizer': ^4.0.2 - '@csstools/selector-specificity@5.0.0': - resolution: {integrity: sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==} - engines: {node: '>=18'} + '@csstools/selector-resolve-nested@4.0.2': + resolution: {integrity: sha512-JpjNBJFA+4OnAHKRK4AMp8xrYyLhI9XapOeBlP2PhRU/IylSw+1ep3BFNTksBJnrTS3KT6kqKNVfpzLLwZUW5Q==} + engines: {node: '>=20.19.0'} peerDependencies: - postcss-selector-parser: ^7.0.0 + postcss-selector-parser: ^7.1.1 + + '@csstools/selector-specificity@6.0.1': + resolution: {integrity: sha512-MBuqFIIvqk4S593MGAskTkPpEUUzZNvGzh8mMxEwl3oHwjQlXmqHEDxNbN3Y0Tsh+xjmem4GZjeg7I0qkwBivg==} + engines: {node: '>=20.19.0'} + peerDependencies: + postcss-selector-parser: ^7.1.1 '@dual-bundle/import-meta-resolve@4.2.1': resolution: {integrity: sha512-id+7YRUgoUX6CgV0DtuhirQWodeeA7Lf4i2x71JS/vtA5pRb/hIGWlw+G6MeXvsM+MXrz0VAydTGElX1rAfgPg==} @@ -1045,14 +1004,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.9.0': - resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.2': - resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + '@eslint-community/regexpp@4.12.3': + resolution: {integrity: sha512-R76UKbvsqI68DJJVTVyqFKqU98CN4+B+acxNfEA2IFarSzP0SjtKf/3+fFiXzTyv5Fj3PxLkGHe2wnVWWMxobQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/config-array@0.23.5': @@ -1295,9 +1248,6 @@ packages: '@jridgewell/source-map@0.3.11': resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} - '@jridgewell/sourcemap-codec@1.5.5': - resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@jridgewell/sourcemap-codec@1.6.0': resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} @@ -1340,15 +1290,15 @@ packages: resolution: {integrity: sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==} engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} peerDependencies: - '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4 - '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4 + '@emnapi/core': ^1.11.3 + '@emnapi/runtime': ^1.11.3 - '@napi-rs/wasm-runtime@1.2.6': - resolution: {integrity: sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==} + '@napi-rs/wasm-runtime@1.2.7': + resolution: {integrity: sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} peerDependencies: - '@emnapi/core': ^1.7.1 || 2.0.0-beta.2 - '@emnapi/runtime': ^1.7.1 || 2.0.0-beta.2 + '@emnapi/core': ^1.11.3 + '@emnapi/runtime': ^1.11.3 '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -1392,8 +1342,8 @@ packages: '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} - '@oxc-project/types@0.154.0': - resolution: {integrity: sha512-KYOUGQFlLWR+s4QMV2Q9ko38TZm7EdO87Qm7rvZLqk/webse/cDjtyxKhg/47l0byCbs/k46LT8qc4PKjAikzA==} + '@oxc-project/types@0.156.0': + resolution: {integrity: sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==} '@parcel/watcher-android-arm64@2.6.0': resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} @@ -1481,10 +1431,6 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@pkgr/core@0.1.2': - resolution: {integrity: sha512-fdDH1LSGfZdTH2sxdpVMw31BanV28K/Gry0cVFxaNP77neJSkd82mM8ErPNYs9e+0O7SdHBLTDzDgwUuy18RnQ==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@pkgr/core@0.3.6': resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -1492,98 +1438,101 @@ packages: '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} - '@rolldown/binding-android-arm-eabi@1.2.14': - resolution: {integrity: sha512-aWR+XKH9+rW7m5fWq/5360J3mHycrx/o6xZM2DQFdJnTMdyP7/WzxPjhtLbVWdKo2y612/4U1bWqb3HQhiF7vg==} + '@prettier/parse-srcset@3.1.0': + resolution: {integrity: sha512-FIRv2rZotO9NP/r66taYqD1zICpPiBbrECqjKV/xqNotqDxF7fLzzUeK+1RSRx9Tenk0DajR/GcRmTJ2qtHaKQ==} + + '@rolldown/binding-android-arm-eabi@1.2.16': + resolution: {integrity: sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@rolldown/binding-android-arm64@1.2.14': - resolution: {integrity: sha512-QiVxHofl6A8lQU7WAtOUY4QMVZXohxwz7WJJoeh8NBEUyKfIkMRKhYyq8az/1RypNiIXzNTtiS6KwHz0erxYRQ==} + '@rolldown/binding-android-arm64@1.2.16': + resolution: {integrity: sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.2.14': - resolution: {integrity: sha512-lTQOzHuBIooh3jIr5XINQkjPGEuGy+Dsy0meXDr6Sjty0b99kYgGh4uBC/8mJX1T0kC8d6S0aPP1Y+bHkh6aBw==} + '@rolldown/binding-darwin-arm64@1.2.16': + resolution: {integrity: sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.2.14': - resolution: {integrity: sha512-hyMKEGatjmBYCs/Q4sbIcL/GqpFEqsX3wc+HYVQ/85A4rxc1o7rPm4DUI4GV4k/h0ITddwFSGpqQunI14GXjTA==} + '@rolldown/binding-darwin-x64@1.2.16': + resolution: {integrity: sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.2.14': - resolution: {integrity: sha512-u371GbXoVXrEgP20PwzoGNOdAOqAMhzo19JzzY+V4YmmnC+DTOoqdbMu+O+54emM59Mik/UdrtWgcuEDKWRPKA==} + '@rolldown/binding-freebsd-x64@1.2.16': + resolution: {integrity: sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.2.14': - resolution: {integrity: sha512-BqwKsdZQf6EqVWr8fv2MrDYzAvOZ7+NYFSJESRGs87fkseEhs0TU9TXgRJTkZoRRkxTizyEg1LKUXfU3/78uqg==} + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': + resolution: {integrity: sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.2.14': - resolution: {integrity: sha512-SD9kY8M009x/7s57Z1dgUVlP5+uYBgKQK0Tkr1WIWngrtUJmRCW1RJFMY7QDla2khXhmg2i5Io7MUjcmZNZ/KQ==} + '@rolldown/binding-linux-arm64-gnu@1.2.16': + resolution: {integrity: sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-arm64-musl@1.2.14': - resolution: {integrity: sha512-BJ2CL19M6uuWesMgnqJzgxoI+N+eV7b0A9O9vLV42y+gitC41fNa8KElau1tHVzuLWX5GzEuxMPhAO0tQXQMkg==} + '@rolldown/binding-linux-arm64-musl@1.2.16': + resolution: {integrity: sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@rolldown/binding-linux-ppc64-gnu@1.2.14': - resolution: {integrity: sha512-4+Kl8daPV8NDHaD7mfCcc1pRM+Qg7ab8DyMm5FG5WoZgv4h2i3KFN1CybYBNbQqmuYm7ftJLvmMI1eHYJ22S/Q==} + '@rolldown/binding-linux-ppc64-gnu@1.2.16': + resolution: {integrity: sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-s390x-gnu@1.2.14': - resolution: {integrity: sha512-V/h8ePq1fKDrmtFMz6xcCN3DKvuvMRrwwD1q0PkBeeo4DpK64biaKvqWGVxqCeYKqeRk7gE7/iKPxLCn08O97A==} + '@rolldown/binding-linux-s390x-gnu@1.2.16': + resolution: {integrity: sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-gnu@1.2.14': - resolution: {integrity: sha512-WxalXzgrLVpKC93xfpaJ3gCXUWzeCr+FRCbDVD2mUAy4L6Vo3lNVz0epUEUpxPWJkLNYUwM4OSIikv36OJ9mLg==} + '@rolldown/binding-linux-x64-gnu@1.2.16': + resolution: {integrity: sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-musl@1.2.14': - resolution: {integrity: sha512-3G3tnAmTpdk9jO3GQtyHXqeFD2SlecfTws/Y3M2mmj9nMBwwuLT4kur8sZKeu7ENUHSpVO3cIsm5A52LEWWwlg==} + '@rolldown/binding-linux-x64-musl@1.2.16': + resolution: {integrity: sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@rolldown/binding-openharmony-arm64@1.2.14': - resolution: {integrity: sha512-qyr5XiNGxm2ytx17vvtcJ9nXn6v1gENETi503bJx3OGwZ1tSonj7BosxbMa/xeAfSl5iS9X6KjEWYXLu6v1L7Q==} + '@rolldown/binding-openharmony-arm64@1.2.16': + resolution: {integrity: sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-win32-arm64-msvc@1.2.14': - resolution: {integrity: sha512-oA4o5o0S2yB199YyYXDzKUv1Z56Rc+mgOjwm7Z/vJ9Z8igiDPYvoOuDyo6g7AK/ZaF09nPhDKVnGBcYHO11GXA==} + '@rolldown/binding-win32-arm64-msvc@1.2.16': + resolution: {integrity: sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.2.14': - resolution: {integrity: sha512-9mE94bf2GZUaR/fUSXCMpBoWkctu421Mi0ORpm4zqfbkjKep7RxzPFa5etcGs5h+2KApoWBOA/hAJa/7saGgEQ==} + '@rolldown/binding-win32-x64-msvc@1.2.16': + resolution: {integrity: sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -1591,64 +1540,36 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@shikijs/core@4.4.3': - resolution: {integrity: sha512-QCR4q2ZO/ILJEuwiBMel4wdcTDb1JGwfjKTxPDF6x8ixOaluPrVqIn06C99AcRPhmYlBR56d/Fb+GN58GzExpg==} - engines: {node: '>=20'} - - '@shikijs/core@4.5.0': - resolution: {integrity: sha512-6CIgwq+bt2JZ3OSjb/nBkkwEf/CfpHcbam+Mg5Pllco7HAGRQ2/EFhZrrJtbyNTgKwknfVS+llsXGygiDGwJWw==} - engines: {node: '>=20'} - - '@shikijs/engine-javascript@4.4.3': - resolution: {integrity: sha512-FbOjFJp9VLdo1Wevs10BBtVxiTWwNLqZh5Gkhjgda/ioL15YOgeSl9n+6XMa3qRlPQzfhFNe641SrynFHYG0nQ==} - engines: {node: '>=20'} - - '@shikijs/engine-javascript@4.5.0': - resolution: {integrity: sha512-Ed6UdEj84LyYkwnxM5CvSMWAD+id9ExTYri0/+x41U9zrgNifPSS9lZm0JqBP0VfYI8yr8tY5nbNq9+p9R0kFA==} - engines: {node: '>=20'} - - '@shikijs/engine-oniguruma@4.4.3': - resolution: {integrity: sha512-EcOQkxdxGQrc1Row/cC2c96/v1dbZqGnEVu1qTuT/MJmp6+cXCvQussowVmCv5Tqr3KuY3c7IbM6HTW3LJ1k9w==} - engines: {node: '>=20'} - - '@shikijs/engine-oniguruma@4.5.0': - resolution: {integrity: sha512-dKVmbJecVdB9recl8a/CU4jdpNXyjJQrIcesIkpS70s5HS02ohpnCSpMUbotPnEUzbAcLQ+S4hwZYbkBBiTcJw==} - engines: {node: '>=20'} - - '@shikijs/langs@4.4.3': - resolution: {integrity: sha512-ePic0yfAJGOF83D5wBHK/00EjK65oahBYxFk5epgq33WRv7X9UuxLEV8PtR0szC0z8dl7INIpIodB99JRFlR+A==} - engines: {node: '>=20'} - - '@shikijs/langs@4.5.0': - resolution: {integrity: sha512-wwBTqwduXSz0X4v9Qa2EWeFaYJEw1clCncWjoRNQRbVDu3SPRTRWucnouYapKj3b8Q+sk/41Vbc4B5c8nuYzLA==} + '@shikijs/core@4.6.0': + resolution: {integrity: sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw==} engines: {node: '>=20'} - '@shikijs/primitive@4.4.3': - resolution: {integrity: sha512-m0wBeLDQDeIxRdUmrCPdQqfuUamDwRL5isCfYbguKD6NiaKpVbsv+3J81DyIKgNW5h4WAIIr8T4EkgQrBBxvaQ==} + '@shikijs/engine-javascript@4.6.0': + resolution: {integrity: sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg==} engines: {node: '>=20'} - '@shikijs/primitive@4.5.0': - resolution: {integrity: sha512-UM7ShlA8oz0OWxLLO8BmO9Ip6fVqdkt8yF0EH7nOCqHfrx1eEAzF0ZUVK7L+I8NEgeu1PEWSRlxaiPPeCb4iDg==} + '@shikijs/engine-oniguruma@4.6.0': + resolution: {integrity: sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w==} engines: {node: '>=20'} - '@shikijs/themes@4.4.3': - resolution: {integrity: sha512-w8UHjeUnIR965KMWJHUPXOc2mNJUnK3vpVLYLvw5IYU2mnTTJ89E24OrJDBNiJDQ0qzb0tc4l7mrIXx5cFeIyw==} + '@shikijs/langs@4.6.0': + resolution: {integrity: sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg==} engines: {node: '>=20'} - '@shikijs/themes@4.5.0': - resolution: {integrity: sha512-zGb87H3UBbpuI4yoh5UguB1XbU+2BDU3kflM7UfZ+Cy2hWo9lBtqjSVK20gmLY6ukYl040hAypGXMgud9vul8Q==} + '@shikijs/primitive@4.6.0': + resolution: {integrity: sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag==} engines: {node: '>=20'} - '@shikijs/types@4.4.3': - resolution: {integrity: sha512-UEJxmRR++MAGR6hugn0vgVS2W/6lWAts84FFSrnlH9sP0LNol7E5+NQ792pH8liWUhyMyjhTgSUH3k7iD7tc5g==} + '@shikijs/themes@4.6.0': + resolution: {integrity: sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ==} engines: {node: '>=20'} - '@shikijs/types@4.5.0': - resolution: {integrity: sha512-drtPrtD8N0DENyD2cyt6Ajy+IWsiCLgMxODwLTpvH1UsN6a9jf90tNTPjqwHvA+0Lzu9e0txk8DjfqH1p9UJRw==} + '@shikijs/types@4.6.0': + resolution: {integrity: sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw==} engines: {node: '>=20'} - '@shikijs/vscode-textmate@10.0.2': - resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + '@shikijs/vscode-textmate@10.1.0': + resolution: {integrity: sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ==} '@simple-git/args-pathspec@1.0.4': resolution: {integrity: sha512-EtMX6XjRWSastG2SdkmSQByPtJ9dx/NIjnHbpQPCYt62j4RmSx5rgLTGpw0YCjF5h191gZOmBfheOT23cRSFdw==} @@ -1656,71 +1577,70 @@ packages: '@simple-git/argv-parser@2.0.1': resolution: {integrity: sha512-M++IaVWrN+vYalilOHfwvT2IL3wYZtVEBQpmX6DLSOJLtxbZ+SUeIDE3IiPogzhPACLajwtxfa5rp+ZX1FczzQ==} - '@tailwindcss/node@4.3.3': - resolution: {integrity: sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==} + '@tailwindcss/node@4.3.5': + resolution: {integrity: sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g==} - '@tailwindcss/oxide-android-arm64@4.3.3': - resolution: {integrity: sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==} + '@tailwindcss/oxide-android-arm64@4.3.5': + resolution: {integrity: sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q==} engines: {node: '>= 20'} cpu: [arm64] os: [android] - '@tailwindcss/oxide-darwin-arm64@4.3.3': - resolution: {integrity: sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==} + '@tailwindcss/oxide-darwin-arm64@4.3.5': + resolution: {integrity: sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ==} engines: {node: '>= 20'} cpu: [arm64] os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.3.3': - resolution: {integrity: sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==} + '@tailwindcss/oxide-darwin-x64@4.3.5': + resolution: {integrity: sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ==} engines: {node: '>= 20'} cpu: [x64] os: [darwin] - '@tailwindcss/oxide-freebsd-x64@4.3.3': - resolution: {integrity: sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==} + '@tailwindcss/oxide-freebsd-x64@4.3.5': + resolution: {integrity: sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg==} engines: {node: '>= 20'} cpu: [x64] os: [freebsd] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': - resolution: {integrity: sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==} + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.5': + resolution: {integrity: sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA==} engines: {node: '>= 20'} cpu: [arm] os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': - resolution: {integrity: sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==} + '@tailwindcss/oxide-linux-arm64-gnu@4.3.5': + resolution: {integrity: sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-arm64-musl@4.3.3': - resolution: {integrity: sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==} + '@tailwindcss/oxide-linux-arm64-musl@4.3.5': + resolution: {integrity: sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] libc: [musl] - '@tailwindcss/oxide-linux-x64-gnu@4.3.3': - resolution: {integrity: sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==} + '@tailwindcss/oxide-linux-x64-gnu@4.3.5': + resolution: {integrity: sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g==} engines: {node: '>= 20'} cpu: [x64] os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-x64-musl@4.3.3': - resolution: {integrity: sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==} + '@tailwindcss/oxide-linux-x64-musl@4.3.5': + resolution: {integrity: sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg==} engines: {node: '>= 20'} cpu: [x64] os: [linux] libc: [musl] - '@tailwindcss/oxide-wasm32-wasi@4.3.3': - resolution: {integrity: sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] + '@tailwindcss/oxide-wasm32-wasi@4.3.5': + resolution: {integrity: sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} bundledDependencies: - '@napi-rs/wasm-runtime' - '@emnapi/core' @@ -1729,20 +1649,20 @@ packages: - '@emnapi/wasi-threads' - tslib - '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': - resolution: {integrity: sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==} + '@tailwindcss/oxide-win32-arm64-msvc@4.3.5': + resolution: {integrity: sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg==} engines: {node: '>= 20'} cpu: [arm64] os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.3.3': - resolution: {integrity: sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==} + '@tailwindcss/oxide-win32-x64-msvc@4.3.5': + resolution: {integrity: sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg==} engines: {node: '>= 20'} cpu: [x64] os: [win32] - '@tailwindcss/oxide@4.3.3': - resolution: {integrity: sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==} + '@tailwindcss/oxide@4.3.5': + resolution: {integrity: sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg==} engines: {node: '>= 20'} '@tailwindcss/typography@0.5.20': @@ -1750,8 +1670,8 @@ packages: peerDependencies: tailwindcss: '>=3.0.0 || >=4.0.0 || insiders' - '@tailwindcss/vite@4.3.3': - resolution: {integrity: sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==} + '@tailwindcss/vite@4.3.5': + resolution: {integrity: sha512-BCNiY0a1ZjdOHVqw7kyb7U72BwfMF3dfUuN+tQsLWky/J5JOI/r7abibglXfygrZhVO/3u3V+E25kkKTeMkXaQ==} peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 @@ -1765,11 +1685,8 @@ packages: peerDependencies: vue: '>=3.2' - '@tybys/wasm-util@0.10.3': - resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} - - '@types/acorn@4.0.6': - resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} + '@tybys/wasm-util@0.10.4': + resolution: {integrity: sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==} '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} @@ -1870,8 +1787,8 @@ packages: '@types/d3@7.4.3': resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} - '@types/debug@4.1.12': - resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/debug@4.1.13': + resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -1882,15 +1799,12 @@ packages: '@types/estree-jsx@1.0.5': resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} - '@types/estree@1.0.9': - resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + '@types/estree@1.0.10': + resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} '@types/geojson@7946.0.16': resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==} - '@types/hast@2.3.10': - resolution: {integrity: sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==} - '@types/hast@3.0.5': resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==} @@ -1903,38 +1817,26 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/mdast@3.0.15': - resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} - '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - '@types/mdx@2.0.13': - resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} + '@types/mdx@2.0.14': + resolution: {integrity: sha512-T48PeuJtvLosNTPVhfnIp3i/n3a4g4Bad7YCq5k64D4u7NwDrAotikQ+5+sjtUvBmxCMlbo3dVL+C2dP0rWHzg==} '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/nlcst@1.0.4': - resolution: {integrity: sha512-ABoYdNQ/kBSsLvZAekMhIPMQ3YUZvavStpKYs7BjLLuKVmIMA0LUgZ7b54zzuWJRbHF80v1cNf4r90Vd6eMQDg==} - '@types/nlcst@2.0.3': resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==} - '@types/node@18.19.130': - resolution: {integrity: sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==} - - '@types/node@22.20.2': - resolution: {integrity: sha512-xlvWf4Vs9n1PEVYwP1n4vvG07M6y8WgvJ2t0vbrWTmijsIHp1cS+uJ2kMIRdY3nHZK0nCYKrPeD171+SzF4/zw==} + '@types/node@22.20.5': + resolution: {integrity: sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==} '@types/node@24.13.3': resolution: {integrity: sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==} - '@types/parse5@6.0.3': - resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} - - '@types/retry@0.12.1': - resolution: {integrity: sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==} + '@types/node@26.6.6': + resolution: {integrity: sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==} '@types/sax@1.2.7': resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} @@ -1975,10 +1877,6 @@ packages: peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/scope-manager@8.69.0': - resolution: {integrity: sha512-ewfspqWvSxKSOaplqAUNbaSFO0eB6w1EtQ+esfYFRm3614Ty4uNtExkcbgd6nWsXphbqKyf9ZYdbZdv2xEoWEQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.72.1': resolution: {integrity: sha512-lC/t6eMCZZQAAKZEYGL6RDVSuFehpdmMT6h+nJIjIa6oylN/PwDgDVtEIbB7O9xFfZYtZAYLoLlDNWKJhtF+uQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1996,10 +1894,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.69.0': - resolution: {integrity: sha512-K3VrubUPhlo9VDBS6QdI8YB5j7ClpqLRdefcz6PFrhnwicehBweqQ9Evhl4l+FYz0HdDmMqIiSX0aldGRYtDCA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.72.1': resolution: {integrity: sha512-LmE5IhQet1BWOWEXqBrVtBPsMAOQ6Nzk35d+WLh3mk4EUF33sqlfxjio1MdYeSvKSG5skactKKuixBIKXhL4Rw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2017,17 +1911,12 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/visitor-keys@8.69.0': - resolution: {integrity: sha512-+rmdgPA+EXkNgKYvHvFfhrs35utXbwaC5PGpDquSXcoXQDKUA5UjV0LmTucG/4JXkM31BTu4TilHtrN8IVBe8w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.72.1': resolution: {integrity: sha512-SB8xqipSzZHUePCCLNeYxqnxq83X61/qzNhjQGbTfjxGZIeOEP7tBgWYX05Tcd6CgE02WdTJnh5b8kMZJ/+bnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.3.0': - resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - deprecated: Potential CWE-502 - Update to 1.3.1 or higher + '@ungap/structured-clone@1.4.0': + resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} '@upsetjs/venn.js@2.0.0': resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} @@ -2046,8 +1935,8 @@ packages: vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 vue: ^3.2.25 || ^3.6.0-rc.10 - '@vitest/mocker@5.0.5': - resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + '@vitest/mocker@5.1.0': + resolution: {integrity: sha512-5umB9/jlWcqVS6fsrFmv5Gdnpu6wAUio/lEOwAmvB7v+lFo/IW2B9FhAD0p19GCULTgMzLCdUmuCDCnAzWgppQ==} peerDependencies: msw: ^2.4.9 || ^3.0.0 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2057,8 +1946,8 @@ packages: vite: optional: true - '@vitest/spy@5.0.5': - resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + '@vitest/spy@5.1.0': + resolution: {integrity: sha512-2DPO5OMHWKrBngC+fCmTQqemNF0gidRhp3lxbBmRhW+M1XJrfgPpqNqWVevXtn2f2ufD5ZaR1B6B641aAlcX5A==} '@volar/kit@2.4.28': resolution: {integrity: sha512-cKX4vK9dtZvDRaAzeoUdaAJEew6IdxHNCRrdp5Kvcl6zZOqb6jTOfk3kXkIkG3T7oTFXguEMt5+9ptyqYR84Pg==} @@ -2133,29 +2022,17 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@vue/compiler-core@3.5.42': - resolution: {integrity: sha512-2Ye1ilMtKXxl8qZUrQ5j0CdgenFp/HFQmta6rfRyfEsTG69L6Wk+tWuNoHYHMx9E8tF2Slvdg1FuwDvAXdy1LQ==} - - '@vue/compiler-core@3.5.44': - resolution: {integrity: sha512-k34nCytbK8PQ1gR2mGROYOw6Pnv/mumqIdrZ3x2tbyXZDWm7ViKGLTfdB+DRrWqEQsLgGJvn0WN9jBif5zCTLQ==} + '@vue/compiler-core@3.5.45': + resolution: {integrity: sha512-XGHJrM6ufZARAc/w+tyOswStw9tdKiqCKBScI4gGaNxD+aaGu/HQWgKJ+JItjRLPqenQ7iE7G8AJC7T5ew1p+g==} - '@vue/compiler-dom@3.5.42': - resolution: {integrity: sha512-qbhQZEFmycr+ni/qyuccS4sucNN7VAbDfbkvNxWOX2VfgFm90MNs3/UhRNKoPMEIVn0F8gdlYjLPvqxHwHeQOA==} + '@vue/compiler-dom@3.5.45': + resolution: {integrity: sha512-LbP2d19GSOYGPmvMBBCVJVlv7TKtjM1Cfeyu3cYia720pknZP+1cLX7H5MVatvruT6MuJhiPuNbQBW/MDn/EwA==} - '@vue/compiler-dom@3.5.44': - resolution: {integrity: sha512-W5AoBFWdw1lQAKiHowkfgFKFab82oSRT6sGsPfw/q1GRjsy/ZJFLHGhJyBRIFN9APLTUduDH9U2JAiPOIyKuYg==} + '@vue/compiler-sfc@3.5.45': + resolution: {integrity: sha512-MKFjb2UX0M/l/jhfzqMLrI8VM4pfvFKG3pqFZkSZFHRLtNld/O4RtUPZFWSwhro/14qP88UQEkWzHxAZAQ0tsw==} - '@vue/compiler-sfc@3.5.42': - resolution: {integrity: sha512-fkCAFB4okcAANGMThboWnScp/gzWjU0ZSkVnjTIiplmMDq2uq0tIB3j+xVu4rhv5rvOgBySCysudmbMd6xRRqw==} - - '@vue/compiler-sfc@3.5.44': - resolution: {integrity: sha512-dzHmQ4jXTpdr5FjIQUeykVakN/uzqFbUo9/C5ikBFg3a3PeM6uRxeczx1ZbXBML0/zJstEh3ygYipzR5Z7b2Pw==} - - '@vue/compiler-ssr@3.5.42': - resolution: {integrity: sha512-xmLk3wLkbizPAiLyomjgFFosf2ys9b5Ghb+oh/k2tnvipNz8OFrQOiTcWCzyK7MpBp9KkyGtfvgfLUivbmuGYA==} - - '@vue/compiler-ssr@3.5.44': - resolution: {integrity: sha512-xr5gb1JVHlfXJwSlRz1FeP6uxoazdzHuMTVLE7up+4Vrqxk219CvxLPxD9NXBt47yvZW7+p4DXfyp4O1fkByIA==} + '@vue/compiler-ssr@3.5.45': + resolution: {integrity: sha512-RF5sbZOfYz5AK00tOJUn2PwFXR2fS1u2HVzI8D9VF9rGAFxuGBqg2bB1kJ3ZHMprqSltXnT9MZE1IsqjSM8oew==} '@vue/devtools-api@7.7.10': resolution: {integrity: sha512-KxtEpUOOpFz/qOGRrAwA36QF7DqIA+FXgCYit9mk9wjbaZt0sXOFz81ElOZtKA4HbWHUdwNjZHBFsFFyp5BZiA==} @@ -2177,23 +2054,20 @@ packages: '@vue/devtools-shared@8.2.1': resolution: {integrity: sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==} - '@vue/reactivity@3.5.44': - resolution: {integrity: sha512-u+QJdKeBBEADkPdevsL+6E12QlYVfBD8Zcw5qjDQKtamI6l14KyqazJMobhCKelhWN5zpyKUiEDoTyHE93cqWw==} - - '@vue/runtime-core@3.5.44': - resolution: {integrity: sha512-uEa/ndwjhrrhnOfb2p+sZy6zeoamJOISqaLSJGk/8R6nABT1ZldpzcJoPzKj+zHVomVBPcmQYyC2r4LtvDV6CQ==} + '@vue/reactivity@3.5.45': + resolution: {integrity: sha512-WqkyubNWpI4OYBOipSrjIssMdJO8K1i9Zts/Wm8Er10/0msOEwCyWWWvZnAI7WW3kQsTong6DJp8Cbb+vd4cPA==} - '@vue/runtime-dom@3.5.44': - resolution: {integrity: sha512-3fc4ARcXVhVBaJ3ujWiNZJARD6pkyRcwG+ZYhMzjKtKUp7MAY0HLwr7r3Smep3Li6ZaWT6ewdmx8XqdaD5oNZg==} + '@vue/runtime-core@3.5.45': + resolution: {integrity: sha512-bzIO3+FABjpj85uIKSc+Qnj36/sxDNI3tcH9i6w6xKA1k6e0ejv0G0jMCfeJBvK3yGL5XbJ3DMZj+ClqyCHFYw==} - '@vue/server-renderer@3.5.44': - resolution: {integrity: sha512-R4S1UoH4h5Frrauv8Z5XE5TxV9oBiUSgWIC4TyVK1FK+RocRnOLwFA5Xcmo2011RlgJp+AbZCnw6afrhlgRuUQ==} + '@vue/runtime-dom@3.5.45': + resolution: {integrity: sha512-ZvRTFMDgfqTDYWvJfoVpQTJx1RN5M6l7Pyd6wfdY2NaXzbPQVh9ezeQYFbNPP6bIcRVn2SqSSR25N/jSW69BFw==} - '@vue/shared@3.5.42': - resolution: {integrity: sha512-2rPxex1jQf4jvl9MOHl6YaXCPcrNqz/FstMOEh3QWY+/OME9nQTvl9WYeCwhW7AFjaR0SnngZGlp/wkR6rkI6g==} + '@vue/server-renderer@3.5.45': + resolution: {integrity: sha512-1fNXUHhhsWf4EVL4XixbGBU5mKdiIXJAB82feHRTyPPo6ZUEYWIJuEeUl3mVV6QDBp50HJOX4obLhxYXlrjrzA==} - '@vue/shared@3.5.44': - resolution: {integrity: sha512-H82XLH0DjmSOdbEwO15x3QTo1f5PWEtv237eLpYKc0mqLu+B8hnq16lFWmuBmNurkeiG3wr+oM1FhOll/YVFRg==} + '@vue/shared@3.5.45': + resolution: {integrity: sha512-ue9fgHmVNPlP7iW3+cxoBX/Cnlw53dHlVSw0JKGY6z1lObg8pHoj928M2nzG4/yVsMZ3NaRZ2s2z61uC16NDwQ==} '@vueuse/core@10.11.1': resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==} @@ -2217,11 +2091,6 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.18.0: - resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.19.0: resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} engines: {node: '>=0.4.0'} @@ -2254,8 +2123,8 @@ packages: ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} - algoliasearch@4.25.3: - resolution: {integrity: sha512-kgeIixgDiB+FbH1cHDFUtTNkxdJadHryF8lSPIHHQkEeUrzZA1Hi3PLL+EgNubO0dch4ALNb5G4rw+FDCv3Vbw==} + algoliasearch@4.27.0: + resolution: {integrity: sha512-C88C5grLa5VOCp9eYZJt+q99ik7yNdm92l7Q9+4XK0Md8kL05Lg8l2v9ZVX0uMW3mH9pAFxMMXlLOvqNumA4lw==} am-i-vibing@0.5.0: resolution: {integrity: sha512-KLcsDhqf1XRrJmJr+9I/C0EX2K+sGrAGZFgkmd84c8TJO9zJBu+/kFInjazu1KfJWFhWDKdRWkpBzEs7s35DVA==} @@ -2265,8 +2134,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.2.2: - resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + ansi-regex@6.6.0: + resolution: {integrity: sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==} engines: {node: '>=12'} ansi-styles@4.3.0: @@ -2291,8 +2160,8 @@ packages: argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + argparse@3.0.4: + resolution: {integrity: sha512-fwWK3Zq22l4XJJjx5mcBHGikIk+hJqO+32dPm0Jur7+rtG5x1scOjSfdT9ZKeWHPpsya/l0HHK4tDImBkTrtvA==} aria-query@5.3.2: resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} @@ -2301,18 +2170,10 @@ packages: array-iterate@2.0.1: resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - astring@1.9.0: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} hasBin: true @@ -2322,12 +2183,12 @@ packages: peerDependencies: astro: ^7.2.4 - astro-eslint-parser@1.4.0: - resolution: {integrity: sha512-+QDcgc7e+au6EZ0YjMmRRjNoQo5bDMlaR45aWDoFsuxQTCM9qmCHRoiKJPELgckJ8Wmr7vcfpa9eCDHBFh6G4w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + astro-eslint-parser@3.2.0: + resolution: {integrity: sha512-WavQUarfgwSbpCq4xsdcIBdX5KArfI2d6DD8EIloJIMthnB1508iNpx4C77EhUyMd03LpEt8HAPzwF/cG0V39g==} + engines: {node: ^22.22.3 || ^24.16.0 || >=26.3.0} - astro@7.4.3: - resolution: {integrity: sha512-gIytSwggVMj+/Az9sXSyqFrxpHfO2KpvefEJNJfwvQGDMarNRoNvZOjxal1+52maOIRt2m4PlrVHvOVPisxtxw==} + astro@7.4.7: + resolution: {integrity: sha512-fH54IOaCkZY1paEjygKn8CPfuJ3w8ns7PourcPML5AouJkQuTBqBQ2RbbIbBhutZbg2qn5se6Yl9DYybzqjC0Q==} engines: {node: '>=22.23.4', npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true peerDependencies: @@ -2336,12 +2197,6 @@ packages: '@astrojs/markdown-remark': optional: true - astrojs-compiler-sync@1.1.1: - resolution: {integrity: sha512-0mKvB9sDQRIZPsEJadw6OaFbGJ92cJPPR++ICca9XEyiUAZqgVuk25jNmzHPT0KF80rI94trSZrUR5iHFXGGOQ==} - engines: {node: ^18.18.0 || >=20.9.0} - peerDependencies: - '@astrojs/compiler': '>=0.27.0' - axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} @@ -2352,15 +2207,12 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - balanced-match@2.0.0: - resolution: {integrity: sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==} - balanced-match@4.0.4: resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} engines: {node: 18 || 20 || >=22} - baseline-browser-mapping@2.11.27: - resolution: {integrity: sha512-ElY12DaROGuan+lMmZ8Cvo/ZUbXPe7Enc/9VU/b1T3Kp4dwytRcNdR8DoSJN5SNJT/CuvcCA0DHDVmMOCePdRQ==} + baseline-browser-mapping@2.11.35: + resolution: {integrity: sha512-GNk8KX52CHqeNKGk8+7tZnQab/2k1t/BgrUHPKNdijzpEhF1saPQZHVKb6m5loSAxB39gyrTYw34Qf9CQ3u1qQ==} engines: {node: '>=6.0.0'} hasBin: true @@ -2397,8 +2249,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.29.3: - resolution: {integrity: sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==} + browserslist@4.29.5: + resolution: {integrity: sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -2424,15 +2276,11 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - - caniuse-api@3.0.0: - resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} + caniuse-api@4.0.0: + resolution: {integrity: sha512-B0hQ1OLyJuHTQSOWXvwibWqM6DCoqJdvBA6X1S/53bd4XU7LJ1yurIPlrsouol3mw1jh9pGI4ivubSpmJeIqCA==} - caniuse-lite@1.0.30001814: - resolution: {integrity: sha512-/Uaf1lAzr59XcMpW0o96WoEfr+VXK2OX4U9AgFoiSHsVJ4HppnIFUjtYzsyDH2+tgANaQb2/oxYGwCPapN1FpA==} + caniuse-lite@1.0.30001823: + resolution: {integrity: sha512-TQ5s/djDjNk1axreUW+4rULH+BmdCMLiJkhaXnO5wqivG7tITkSUj4ItIdzqdZHKaXcHAV8dhH3JxOM7/7bwqw==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -2487,8 +2335,8 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - colord@2.9.3: - resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} + colord@2.10.0: + resolution: {integrity: sha512-AidJptpBJmjTclAp9BkLwJi0T93fo5epJnbaZslpg6QVzpHjAiveF55mE9AcUJiGMqRHgMDY8soMsQtuNYMHfw==} comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -2501,8 +2349,8 @@ packages: resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} engines: {node: '>=20'} - commander@15.0.0: - resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + commander@15.1.0: + resolution: {integrity: sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ==} engines: {node: '>=22.12.0'} commander@2.20.3: @@ -2546,8 +2394,8 @@ packages: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} - cookie@2.0.1: - resolution: {integrity: sha512-yuToqVvRrj6pfDXREyQAAv8SkAEk/8GS3jQRTiUMm66TVtBYmqQeoEjL2Lmq8Rpo6271vH76InTChTitEAm65w==} + cookie@2.0.2: + resolution: {integrity: sha512-SL0cVuEdETEp7pN0FuZb01toc3vnODEfVUCooxG1SJN0yIirh7JMb9X9bvfCFf0vzzbT68RdbKDHYTiWy7a7iw==} engines: {node: '>=22'} copy-anything@4.0.5: @@ -2564,14 +2412,9 @@ packages: cose-base@2.2.0: resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==} - cosmiconfig@9.0.2: - resolution: {integrity: sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==} - engines: {node: '>=14'} - peerDependencies: - typescript: '>=4.9.5' - peerDependenciesMeta: - typescript: - optional: true + cosmiconfig@10.0.1: + resolution: {integrity: sha512-/zvGoYn0y27QTBmK+0B+oPdEPC4fKGUmJsMTQbDjqph00TrkqfVFW/M+C6ya54sYCgHC6QCwK/mI6djt8cEGHQ==} + engines: {node: ^22.18 || >= 24} cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} @@ -2580,19 +2423,6 @@ packages: crossws@0.3.5: resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} - css-declaration-sorter@7.3.0: - resolution: {integrity: sha512-LQF6N/3vkAMYF4xoHLJfG718HRJh34Z8BnNhd6bosOMIVjMlhuZK5++oZa3uYAgrI5+7x2o27gUqTR2U/KjUOQ==} - engines: {node: ^14 || ^16 || >=18} - peerDependencies: - postcss: ^8.0.9 - - css-functions-list@3.3.3: - resolution: {integrity: sha512-8HFEBPKhOpJPEPu70wJJetjKta86Gw9+CCyCnB3sui2qQfOvRyqBy4IKLKKAwdMpWb2lHXWk9Wb4Z6AmaUT1Pg==} - engines: {node: '>=12'} - - css-select@5.2.2: - resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} - css-select@6.0.0: resolution: {integrity: sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==} @@ -2600,18 +2430,10 @@ packages: resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} - css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - - css-tree@3.1.0: - resolution: {integrity: sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==} + css-tree@3.2.1: + resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - css-what@6.2.2: - resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} - engines: {node: '>= 6'} - css-what@7.0.0: resolution: {integrity: sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ==} engines: {node: '>= 6'} @@ -2621,23 +2443,11 @@ packages: engines: {node: '>=4'} hasBin: true - cssnano-preset-default@6.1.2: - resolution: {integrity: sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - cssnano-utils@4.0.2: - resolution: {integrity: sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - cssnano@6.1.2: - resolution: {integrity: sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==} - engines: {node: ^14 || ^16 || >=18.0} + cssnano@9.9.0: + resolution: {integrity: sha512-JS914Th2NRk2979JHJvbE3UjPtLmyXtPnr23NNul9BOQwEt9r/A2aM1STrKtKHAPc3XRaUDwMoqkXnjEpgHkAw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0} peerDependencies: - postcss: ^8.4.31 + postcss: ^8.5.29 csso@5.0.5: resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==} @@ -2656,147 +2466,147 @@ packages: peerDependencies: cytoscape: ^3.2.0 - cytoscape@3.34.3: - resolution: {integrity: sha512-yfYGhRcGAntq6YBD583j4n0Eg3jIxvWmZtz/5uz9UYkeIStSlMxuUja+ec5j3iBD8nv1rwaOAYMW09tBdkSeaQ==} + cytoscape@3.34.4: + resolution: {integrity: sha512-msY99tMY8iWTg+sIPGfSqDcPNOt4xcj+v/K/7qUFaCUxxlqnMkUYLBjRUzn9W5CU/R2hrmtJa5+UtovrEM2ctg==} engines: {node: '>=0.10'} d3-array@2.12.1: resolution: {integrity: sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==} - d3-array@3.2.4: - resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + d3-array@3.2.5: + resolution: {integrity: sha512-Th8qGXoBalmWsstpkuhmBuTsBQIFqYOJtjlBvNVvBfJ8E3uYusBUwUR8HU20U0qKKQkgCvKyR1YjiozWadk5QA==} engines: {node: '>=12'} - d3-axis@3.0.0: - resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + d3-axis@3.0.1: + resolution: {integrity: sha512-E5QCXfaf/uJZEHHiqoWRq+bQEm2PzoVFv2rDC7CZ3wwI0MjfMW3w83J3ubobG4IJj3lShAI5eiPJhOu/8wHofA==} engines: {node: '>=12'} - d3-brush@3.0.0: - resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} + d3-brush@3.0.1: + resolution: {integrity: sha512-L5Glqa/Gb7LU3ndIOMtA5mDzlJ0aXKp5ELP2X09ctWF23jO7+faIUVDbmaIi+D6k3EemXFWn1F3lkfguExoVhA==} engines: {node: '>=12'} - d3-chord@3.0.1: - resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==} + d3-chord@3.0.2: + resolution: {integrity: sha512-cGmADo5M2PTi3ewJZ2lcE32eURd4JmHtQ5JwRIUcas5L1SXqufG9yPyjWp8fW0gRi7aZi9bgbZPFZO1eyZ+1CQ==} engines: {node: '>=12'} - d3-color@3.1.0: - resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + d3-color@3.1.1: + resolution: {integrity: sha512-lfab8x0Bj0UO7SNsY8dZSbNIA6ipbkE3X0NG9nqjCu6CfCHZseuDnOSJY7hidKrjpP++i1M2qT+FlAdPKYRilA==} engines: {node: '>=12'} - d3-contour@4.0.2: - resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==} + d3-contour@4.0.3: + resolution: {integrity: sha512-5DYURc8KwXPOhSUBblU0P9rVcArsSPxPOxsfO0Eud0s28oU0sB2e80aRHRL9AZW3usT8ikFKyIHpHHLNWLdRVA==} engines: {node: '>=12'} - d3-delaunay@6.0.4: - resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==} + d3-delaunay@6.0.6: + resolution: {integrity: sha512-DMQIEvSJhZCB6pwedcXaAlQ+MeKU5LlM2XakKtc73b/VM+RBiI1SRXycOEOKg2jsKj4zZ9F0KGYG6nCGwwWu/g==} engines: {node: '>=12'} - d3-dispatch@3.0.1: - resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + d3-dispatch@3.0.2: + resolution: {integrity: sha512-sAzH4Y4nsLo8eSqw5jKiZt+LU2wZmL/qS+OkxQGjhwazB/D7TY34R/QK1eshfGr7cZEKymKZ/Haem7m+lu98Sg==} engines: {node: '>=12'} - d3-drag@3.0.0: - resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + d3-drag@3.0.1: + resolution: {integrity: sha512-OWeoayCq8J69hUIjvL+Mb6Q6Oaj/fyHV5XaXByEUAG+JUjIfTGDnk3qGpcXrD3VmQ3BSV96fcbM6fqq7C0tbPA==} engines: {node: '>=12'} - d3-dsv@3.0.1: - resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} + d3-dsv@3.0.2: + resolution: {integrity: sha512-FUnXhX7I4/AXyRCZzwfZTDGSq8PGZ4oR0tiCBqNGOZMsDrQ+6sIWNQnBzcCGhzJKZ6uCvCezTwflUqI209RRiQ==} engines: {node: '>=12'} hasBin: true - d3-ease@3.0.1: - resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + d3-ease@3.0.2: + resolution: {integrity: sha512-B5znKqRmKROAN4oHWQ50W/qisVjA9GXh2WMsVKdFVp4DxWmcrOsweqgUOUVsv5th96kwaZlokU6SlV4J3gak1w==} engines: {node: '>=12'} - d3-fetch@3.0.1: - resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==} + d3-fetch@3.0.2: + resolution: {integrity: sha512-1wGF62bgjMRbF6mqbD+6rRWBL2hwWVYQjFO2UP3Wm1nIAvJZKaQxXM5caVY7athoCa8wIq9lCf7g44lPWFk50g==} engines: {node: '>=12'} - d3-force@3.0.0: - resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} + d3-force@3.0.1: + resolution: {integrity: sha512-kAaaHLFebBYwgi5cYBXAI8vKrQFMCD2MEswj2QuPKKbdU1wYLc8WXtS7O8F/b6POCIe3gJjY6hkDstHi1yMETQ==} engines: {node: '>=12'} - d3-format@3.1.2: - resolution: {integrity: sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==} + d3-format@3.1.3: + resolution: {integrity: sha512-+F+/49swqmGuQJmSKnVMIDH/QkEFV5li9QRj0xm/KhyAUBv099O5PrvpQFxBp24PYph17Mnvt9mjKQV0ii0nMA==} engines: {node: '>=12'} - d3-geo@3.1.1: - resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==} + d3-geo@3.1.2: + resolution: {integrity: sha512-5R8ZgDQorIxmauv7R6gpE/ndz+Z0qAZssigq0aXFdvPHdY41RqtW02jrRUQAL724NdPABYXo1+gQEGBBr7uKNg==} engines: {node: '>=12'} - d3-hierarchy@3.1.2: - resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==} + d3-hierarchy@3.1.3: + resolution: {integrity: sha512-GRajN5ZcnEwYFWqqdzhG1qJ3+fDg6WWzk47TJg7ePY7yvYAgRfD2r1mUx+wviBOWuCwamCUzjwMSdato43jbGA==} engines: {node: '>=12'} - d3-interpolate@3.0.1: - resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + d3-interpolate@3.0.2: + resolution: {integrity: sha512-IRzGU62DtxhvsnSTWMQIdnoZ6gA+BCWwBon1EJI6SjoN595799b6z/QRBzXfFhE8iupUPp3042yBNo0STPqnzQ==} engines: {node: '>=12'} d3-path@1.0.9: resolution: {integrity: sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==} - d3-path@3.1.0: - resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + d3-path@3.1.1: + resolution: {integrity: sha512-jsbgV8zIT38ReB9O7X7gcLndTQRONSqNNd+oGIaTBdUug4r5jFmp0N6RY9R5GWbdUDucn0qoTGyfjapT4tDhcg==} engines: {node: '>=12'} - d3-polygon@3.0.1: - resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==} + d3-polygon@3.0.2: + resolution: {integrity: sha512-WAUvPudGU1Dn4mDPfb6+JnnbeVEV53hG/BoT+bxts6AkZsOpTEiV1jHYX+2vtwCICNFG9Wxv8QS+eW1zE/Dwfg==} engines: {node: '>=12'} - d3-quadtree@3.0.1: - resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} + d3-quadtree@3.0.2: + resolution: {integrity: sha512-9Lu9mqJKRbIk0d6mKDjpvPURaPdwHVK5CYbcdd0/4vBgz4ldz/7TIOse3kNERsByGNfld58KEco507AztJWyTQ==} engines: {node: '>=12'} - d3-random@3.0.1: - resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + d3-random@3.0.2: + resolution: {integrity: sha512-PxJi9LNV+7mulaYO77nd+oGurXGL1fhedXjHnB3pWLUcqDnQtF4VASoqnQGHgoXLByVdv5QJ/2kfwkGn5HTS8g==} engines: {node: '>=12'} d3-sankey@0.12.3: resolution: {integrity: sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==} - d3-scale-chromatic@3.1.0: - resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} + d3-scale-chromatic@3.1.1: + resolution: {integrity: sha512-lA5gfN2yMvmChubmptnDiBfeGpHD7Yb1EbvCz0TZE0WHXhyR6W2allPuhKtzV5ILQRqeOdefF0qYtERReLUBDg==} engines: {node: '>=12'} - d3-scale@4.0.2: - resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + d3-scale@4.0.3: + resolution: {integrity: sha512-66cWobCNzcMvlfoaDHCxuIv9TBUWG1BLOWdv9kHHFuCr1JdqAWPvTmsaEYDD5NRMyWZ5+7u0GqiCDfMXMqh3hg==} engines: {node: '>=12'} - d3-selection@3.0.0: - resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + d3-selection@3.0.1: + resolution: {integrity: sha512-ODSf35vqCrlCfp7hrm0eZjvOosSXSYLjqvIlhMBV9q9VOx7EBJG6pc+uXBswEZNJgCGJ+qnKYcWutbZDIxe/Xg==} engines: {node: '>=12'} d3-shape@1.3.7: resolution: {integrity: sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==} - d3-shape@3.2.0: - resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + d3-shape@3.2.1: + resolution: {integrity: sha512-dm2o+lbKdzg9tY7GEag/dB9hcbodLfwkE/DkvqbELJXaMz0yKzWWhZqhbI7CKubukA7HnRyz0avdtvi7EPxPvw==} engines: {node: '>=12'} - d3-time-format@4.1.0: - resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + d3-time-format@4.1.1: + resolution: {integrity: sha512-22XaqjyCjpqgda20erhsOjGmC3vvYwTNYniKAd45W5UWLDF43moeOuV9qYpRqobIlsnK0UhnKZjUUJm3VgORUA==} engines: {node: '>=12'} - d3-time@3.1.0: - resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + d3-time@3.1.1: + resolution: {integrity: sha512-Ze7rjrhMzdeulh0/hjcfFj7XLAHOfowtEMfsoG6DU866HPynQNW7Wfen6hzXcqKTv8XzxvF6Hzr5XD6bMHr2ug==} engines: {node: '>=12'} - d3-timer@3.0.1: - resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + d3-timer@3.0.2: + resolution: {integrity: sha512-1Il1aliroVSErrv5aulRBxAY+7+DnaoLIWGd1C6SsBTWDeobWiP/V69vwb8vT6abR1kKwaNe1196pmaQ1fK90A==} engines: {node: '>=12'} - d3-transition@3.0.1: - resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + d3-transition@3.0.2: + resolution: {integrity: sha512-RcjCsdFgyFoDB+QXLC5m60ZkTN0k9zH+ovoLlTdJnDS1AbfbcuowiM4pCKSTOclNibS4f4J4cbv2m7O7y8NTOQ==} engines: {node: '>=12'} peerDependencies: d3-selection: 2 - 3 - d3-zoom@3.0.0: - resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + d3-zoom@3.0.1: + resolution: {integrity: sha512-kfjD3BDQu/FOatpZ6JdMSyIoDwTxIpI29ySTI2J5ZlDaH1WbuJGQJ2Q9oJkWTEZEW98j6idezoomSD3Cn2zwiw==} engines: {node: '>=12'} - d3@7.9.0: - resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} + d3@7.9.2: + resolution: {integrity: sha512-ZKb/mONPVKzaO5UlcWcwN8bS4ezvQaYu+bsou+XgNABdGC800kwH651ADTbbTxMPHW13UlvbQafdmJQDk1w7Mg==} engines: {node: '>=12'} dagre-d3-es@7.0.14: @@ -2818,8 +2628,8 @@ packages: supports-color: optional: true - decode-named-character-reference@1.2.0: - resolution: {integrity: sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==} + decode-named-character-reference@1.3.0: + resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} dedent-js@1.0.1: resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} @@ -2867,44 +2677,42 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - diff@5.2.0: - resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} - engines: {node: '>=0.3.1'} - diff@9.0.0: resolution: {integrity: sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==} engines: {node: '>=0.3.1'} - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - - dom-serializer@1.4.1: - resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} - dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + dom-serializer@3.1.1: + resolution: {integrity: sha512-4MEa38/QexBob6gFNwu+EGdWvhJ1OKuNwdYY3Y3NyeWDQfnGeDYQUDfIRzWu5B5gsv03so2Uxd28YC6zrsx3Lw==} + engines: {node: '>=20.19.0'} + domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - domhandler@4.3.1: - resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} - engines: {node: '>= 4'} + domelementtype@3.0.0: + resolution: {integrity: sha512-umCQid3jKbDmVjx8jGaW7uUykm4DEUeyV21hPxNMo2nV955DhUThwqyOIDtreepP31hl84X7G5U9ZfsWvIB3Pg==} + engines: {node: '>=20.19.0'} domhandler@5.0.3: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} + domhandler@6.0.1: + resolution: {integrity: sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg==} + engines: {node: '>=20.19.0'} + dompurify@3.4.17: resolution: {integrity: sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==} - domutils@2.8.0: - resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} - domutils@3.2.2: resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} + domutils@4.0.2: + resolution: {integrity: sha512-qI4JLRKnSzqFqr7hAlS5xQDusBCjKSEG4t4+7aNrIQMHBcsC2TGEhuyABJdYkgSewL57PNLYEiibY2iPKhKpaA==} + engines: {node: '>=20.19.0'} + dset@3.1.4: resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} engines: {node: '>=4'} @@ -2924,11 +2732,11 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.444: - resolution: {integrity: sha512-5ss/uJfoDYDHT0lfJzT6FbcskIzROIOPf0BbbFkGcvDzoJU7i//9GDrwwIHQVmIsrAGiF3ihpADBRIsrEFt1rQ==} + electron-to-chromium@1.5.478: + resolution: {integrity: sha512-pftG+ma5Lm8O6/p45bhYT6StBN5ziQymaRzmCZwFl8DwWHKPPD93FdOmP1aqftcepolQYvrcyTLa17kE8Yf+jg==} - elkjs@0.9.3: - resolution: {integrity: sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==} + elkjs@0.12.1: + resolution: {integrity: sha512-IhMYKHE4S2vtx0QrhBP3lYOIKDeIiJXBrdq9MGYkuB8ZHqhrBnHNfSUndjXFewrX1CPK8chwq+2NA0K0hliYuw==} emmet@2.4.11: resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==} @@ -2946,29 +2754,26 @@ packages: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} - enhanced-resolve@5.24.5: - resolution: {integrity: sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==} + enhanced-resolve@5.26.1: + resolution: {integrity: sha512-PPnnSJq3azKOIewXR/uppBV/6h98dprBJ/WaQ9Qgj10xX1lJLNfg+XShpbsrSqcDSy2yYYyhfXM1wWhftqgyzw==} engines: {node: '>=10.13.0'} - entities@2.2.0: - resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} - - entities@3.0.1: - resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} - engines: {node: '>=0.12'} - entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} - entities@6.0.1: - resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} - engines: {node: '>=0.12'} - entities@7.0.1: resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} engines: {node: '>=0.12'} + entities@8.1.0: + resolution: {integrity: sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==} + engines: {node: '>=20.19.0'} + + entities@9.0.0: + resolution: {integrity: sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==} + engines: {node: '>=20.19.0'} + env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -3000,8 +2805,8 @@ packages: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} - es-toolkit@1.52.0: - resolution: {integrity: sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==} + es-toolkit@1.53.2: + resolution: {integrity: sha512-iUqZ+NlwH4jUgRmXZUxFBsV/9762TQEa1O4IXLFBmDEjVHScBytKuseX23I0+v9ShZ5MYxEx6WKNzm6IPnex8g==} esast-util-from-estree@2.0.0: resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} @@ -3154,14 +2959,8 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - eslint-compat-utils@0.6.5: - resolution: {integrity: sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=6.0.0' - - eslint-mdx@3.8.2: - resolution: {integrity: sha512-mgHCDubLWobY6hMbBTSOTCn6YBw3BcnCt5Qp8OaoE9UdJHm5+d7Ai+5rY1tpsziCo+VVUrAGCfcTtapPVApkIg==} + eslint-mdx@3.8.3: + resolution: {integrity: sha512-7ddtVFCzCXHgjAIhx6IVBTF7PKtr6gOPp1xfHebqdZ2jU0H1DUmxfkjaNLQxIpYGPOPGDIx+rqjSeEN4Vl+DvQ==} engines: {node: '>=18.0.0'} peerDependencies: eslint: '>=8.0.0' @@ -3170,14 +2969,27 @@ packages: remark-lint-file-extension: optional: true - eslint-plugin-astro@1.7.0: - resolution: {integrity: sha512-89xpAn528UKCdmyysbg0AHHqi6sqcK89wXnJIpu4F0mFBN03zATEBNK7pRtMfl6gwtMOm5ECXs+Wz5qDHhwTFw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-plugin-astro@3.2.1: + resolution: {integrity: sha512-IgU7LIkpEg0r6bQGwc3Ck5jHgkUk3rOrEfRhUxDtMx/M0GD3SG/turMtvwj989KRR12Wt1l89faZ5ynjvVL7hg==} + engines: {node: ^22.22.3 || ^24.16.0 || >=26.3.0} peerDependencies: - eslint: '>=8.57.0' + '@typescript-eslint/parser': '>=8.61.0' + eslint: '>=10.0.0' + eslint-plugin-jsx-a11y: '>=6.10.2' + eslint-plugin-jsx-a11y-x: '>=0.2.0' + typescript-eslint: '>=8.61.0' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint-plugin-jsx-a11y: + optional: true + eslint-plugin-jsx-a11y-x: + optional: true + typescript-eslint: + optional: true - eslint-plugin-mdx@3.8.2: - resolution: {integrity: sha512-A0rcLaVZTwDovNrPBCDWzcNe4Mzu9rW+C/uLeF/j7/aDOlviRlqOowCe6ntjVnlIyUGAjnKv5EW5UoQY4UlbYg==} + eslint-plugin-mdx@3.8.3: + resolution: {integrity: sha512-edGjhHRtwG3C16XwcEbGmYSqa8tZsb91d0V7gwy62zc26eNvFxpSBhpfzCTq7yEpxx21Oo2yAVqLJNGzZDjtuA==} engines: {node: '>=18.0.0'} peerDependencies: eslint: '>=8.0.0' @@ -3203,10 +3015,6 @@ packages: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 globals: '>= 13.12.1' - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint-scope@9.1.2: resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} @@ -3215,16 +3023,12 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint-visitor-keys@5.0.1: resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@10.13.0: - resolution: {integrity: sha512-UohDjD4zSzEwhf58M3O7vc/ycc8O1I7dNlhtD0WxE8Px8EHNJKtUwzBqrzeGhisRuv2ag4sAYswszCJRgKXYUg==} + eslint@10.14.0: + resolution: {integrity: sha512-T0pNsxkb9IKmtQjhpK3d7nWOpFv+YHuMbTJnSVMoQblF0onvXfErrtp4V1jHtsQPan7dKaGVD0q1WCXnzMF31A==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: @@ -3233,10 +3037,6 @@ packages: jiti: optional: true - espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - espree@11.2.0: resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} @@ -3246,10 +3046,6 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} - esquery@1.7.0: resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} engines: {node: '>=0.10'} @@ -3268,21 +3064,15 @@ packages: estree-util-build-jsx@3.0.1: resolution: {integrity: sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==} - estree-util-is-identifier-name@2.1.0: - resolution: {integrity: sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==} - estree-util-is-identifier-name@3.0.0: resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} - estree-util-scope@1.0.0: - resolution: {integrity: sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==} + estree-util-scope@1.0.1: + resolution: {integrity: sha512-B0np3dcdxqILX5e9nEi5/Fr4K7gL4oYFVPV1zRa2e9wRCbQoZZNWOZFYyoInvXUPJXBXjss+QXlWLJChDEHDkA==} estree-util-to-js@2.0.0: resolution: {integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==} - estree-util-visit@1.2.1: - resolution: {integrity: sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==} - estree-util-visit@2.0.0: resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} @@ -3300,9 +3090,6 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} - eventemitter3@5.0.4: - resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} - eventsource-parser@3.0.6: resolution: {integrity: sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==} engines: {node: '>=18.0.0'} @@ -3357,10 +3144,6 @@ packages: fast-wrap-ansi@0.2.2: resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} - fastest-levenshtein@1.0.16: - resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} - engines: {node: '>= 4.9.1'} - fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} @@ -3476,29 +3259,10 @@ packages: deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true - global-modules@2.0.0: - resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} - engines: {node: '>=6'} - - global-prefix@3.0.0: - resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} - engines: {node: '>=6'} - - globals@16.5.0: - resolution: {integrity: sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==} + globals@17.14.0: + resolution: {integrity: sha512-UtdkTVyAJePQv0J2M9Xe4L0ruNSDV314XiIJsADI2Zf40bcdAonE/D/OhAU8AT99oij9mhLByb+NvA3QWZYgCg==} engines: {node: '>=18'} - globals@17.13.0: - resolution: {integrity: sha512-RwMTC61u7hrG3ZJMkZQOK4JLJrKS8QtoTii63EmWvFXHqycY9FObBJQCbsLxSO8kjKhWE5kV1GC+Vb1g3RI0Zg==} - engines: {node: '>=18'} - - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - - globjoin@0.1.4: - resolution: {integrity: sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==} - gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -3516,10 +3280,6 @@ packages: hachure-fill@0.5.2: resolution: {integrity: sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - has-symbols@1.1.0: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} @@ -3532,14 +3292,11 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - hast-util-from-html@2.0.3: - resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==} - - hast-util-from-parse5@7.1.2: - resolution: {integrity: sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==} + hast-util-from-html@2.1.0: + resolution: {integrity: sha512-873p9AuH93gBnATbH8rU3YvjTKxyrIeWd/M9tiLMzn3G82Os0xhQurctfnbYUSrDXoyjbJGpJ2qmTpefMw7ZaQ==} - hast-util-from-parse5@8.0.3: - resolution: {integrity: sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==} + hast-util-from-parse5@8.0.4: + resolution: {integrity: sha512-Yq7XlXor0Cpb71sI2E0zpv8QxQ5a6rfhDEETk4bcgrFX2SvJAY2PHocWwFtL6U9qyfiyByW3wZ6sZEfP2kW81g==} hast-util-has-property@3.0.0: resolution: {integrity: sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==} @@ -3550,32 +3307,20 @@ packages: hast-util-is-element@3.0.0: resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==} - hast-util-parse-selector@3.1.1: - resolution: {integrity: sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==} - hast-util-parse-selector@4.0.0: resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} - hast-util-raw@7.2.3: - resolution: {integrity: sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==} - - hast-util-raw@9.1.0: - resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==} + hast-util-raw@9.2.0: + resolution: {integrity: sha512-1zVq3M9AlZiBZ4mlMPnLtkK2rdd+I8VhmFLNLb//XJm6xA2AVH2tz19EHy25RgRWut6z6FpTARAs7P8rnmRJUQ==} hast-util-to-estree@3.1.3: resolution: {integrity: sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w==} - hast-util-to-html@8.0.4: - resolution: {integrity: sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==} - - hast-util-to-html@9.0.5: - resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} - - hast-util-to-jsx-runtime@2.3.6: - resolution: {integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==} + hast-util-to-html@9.0.6: + resolution: {integrity: sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA==} - hast-util-to-parse5@7.1.0: - resolution: {integrity: sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==} + hast-util-to-jsx-runtime@2.3.7: + resolution: {integrity: sha512-F7DNV2NMcTxA4GqPVHnXzX+mpoPHAIY9rJAVH3CZ1FdBZOcBUEjUuvMkMpHVs/sicEtznh9tMGj5WUR9S4E2rg==} hast-util-to-parse5@8.0.1: resolution: {integrity: sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==} @@ -3583,20 +3328,14 @@ packages: hast-util-to-string@3.0.1: resolution: {integrity: sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==} - hast-util-to-text@4.0.2: - resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==} - - hast-util-whitespace@2.0.1: - resolution: {integrity: sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==} + hast-util-to-text@4.0.3: + resolution: {integrity: sha512-5yrlWOvGFs6CqHriUpSsNrjzT/Tdo+IOQudbznxOn8K5qblp18MJyzOg8IgDOKQ8MYgQcJA7SusuCjSpDr8mSA==} hast-util-whitespace@3.0.0: resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} - hastscript@7.2.0: - resolution: {integrity: sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==} - - hastscript@9.0.1: - resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} + hastscript@9.0.3: + resolution: {integrity: sha512-1ALZXSmCGmW3h8AMz4R4+QKSKFi7sNgXLVwmwB8FYVtl1CwQ3WDkSAEY/d5tp1g/vbQgq2s1WlHgfO3jbw1TsA==} hono@4.13.3: resolution: {integrity: sha512-r8AO2mYHoLxSHkgafNeC/BXyb2vWRxD3jem4Ts+ptav8oTG5FIRifAjuJEmZI4bSvvc2ns0GxmIYiZnHqN3mMw==} @@ -3618,21 +3357,15 @@ packages: html-escaper@3.0.3: resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} - html-tags@3.3.1: - resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} - engines: {node: '>=8'} - - html-void-elements@2.0.1: - resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==} - html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} - htmlparser2@7.2.0: - resolution: {integrity: sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==} + htmlparser2@12.0.0: + resolution: {integrity: sha512-Tz7u1i95/g2x2jz81+x0FBVhBhY5aRTvD3tXXdFaljuNdzDLJ8UGNRrTcj2cgQvAg3iW/h77Fz15nLW0L0CrZw==} + engines: {node: '>=20.19.0'} - htmlparser2@8.0.2: - resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + htmlparser2@9.1.0: + resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} http-cache-semantics@4.3.0: resolution: {integrity: sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==} @@ -3662,17 +3395,13 @@ packages: resolution: {integrity: sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==} engines: {node: '>= 4'} - ignore@7.0.8: - resolution: {integrity: sha512-YYNsSlXBjMk92SKnkwvB5LOVSa6OznlFUGcsvrFgNJbJCd0M1XKeFVRc8ZByeCqz32FivYNHJVooLmdqrmvp/Q==} + ignore@7.0.14: + resolution: {integrity: sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ==} engines: {node: '>= 4'} immutable@5.1.9: resolution: {integrity: sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==} - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - import-meta-resolve@4.2.0: resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} @@ -3683,9 +3412,6 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - ini@4.1.3: resolution: {integrity: sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -3693,6 +3419,9 @@ packages: inline-style-parser@0.2.7: resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==} + inline-style-parser@0.2.9: + resolution: {integrity: sha512-IttN8BqKLxzUrnTqHI+/hwAJQItBAUjdoHERCDv+oOuX48VP6bzW8+QjOXSfoevzq3YrYAwX1uLHp8TqO9yIeg==} + internmap@1.0.1: resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} @@ -3768,6 +3497,10 @@ packages: engines: {node: '>=14.16'} hasBin: true + is-network-error@1.3.2: + resolution: {integrity: sha512-PhBY86zaxNZUuWP6h13Vu5oFe0XY6/UlKzQnYFELzGVHygP3MxmvTfYSG7GN3aIab/iWudSMgjSnG9Dq+nHrgA==} + engines: {node: '>=16'} + is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -3776,10 +3509,6 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} - is-plain-object@5.1.0: - resolution: {integrity: sha512-bUi/yjmtKYcRVUtWRGr0UA6xEFh2I6zWUwMrUXB3s7bmYCaZ8a+0ZsTRkrawh/mzlSD1Y0Ph8bp/U+TvBpWDNw==} - engines: {node: '>=0.10.0'} - is-promise@4.0.0: resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} @@ -3818,8 +3547,8 @@ packages: resolution: {integrity: sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==} hasBin: true - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + js-yaml@5.5.0: + resolution: {integrity: sha512-paNr4LFIFPjeeSmwNYdrb8FafLLG/Cr2Af3GjbsHJ5CxIjH4r0c2emlmRdAtpPAieP1gRVzk6buBbVP5gBMGAg==} hasBin: true jsesc@3.1.0: @@ -3827,9 +3556,6 @@ packages: engines: {node: '>=6'} hasBin: true - json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - json-parse-even-better-errors@3.0.2: resolution: {integrity: sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -3857,9 +3583,8 @@ packages: jsonc-parser@3.3.1: resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} - katex@0.18.11: - resolution: {integrity: sha512-yvyz/2VMKqoho/35Hat5w37wIEdWJ5ElVMidTAlWrxr5uW4aBGsEpveTmKh18/zw08v/7lGswCPon4OhqmqrTA==} - deprecated: Accidentally published with breaking changes. Use 0.19.0 instead. + katex@0.18.10: + resolution: {integrity: sha512-/B6p9eY9DX7aHBfpkHdpirDTZ5QH9xTwL9y837PWuzuv41O5jFdqNQwVQEQsimY0/iVNkwBY4+4hMfhQ7d4Dbw==} hasBin: true keyv@5.6.0: @@ -3880,9 +3605,6 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} - known-css-properties@0.37.0: - resolution: {integrity: sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==} - kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -3896,73 +3618,36 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - lightningcss-android-arm64@1.32.0: - resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [android] - lightningcss-android-arm64@1.33.0: resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [android] - lightningcss-darwin-arm64@1.32.0: - resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [darwin] - lightningcss-darwin-arm64@1.33.0: resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] - lightningcss-darwin-x64@1.32.0: - resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [darwin] - lightningcss-darwin-x64@1.33.0: resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] - lightningcss-freebsd-x64@1.32.0: - resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [freebsd] - lightningcss-freebsd-x64@1.33.0: resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] - lightningcss-linux-arm-gnueabihf@1.32.0: - resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} - engines: {node: '>= 12.0.0'} - cpu: [arm] - os: [linux] - lightningcss-linux-arm-gnueabihf@1.33.0: resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] - lightningcss-linux-arm64-gnu@1.32.0: - resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - libc: [glibc] - lightningcss-linux-arm64-gnu@1.33.0: resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} engines: {node: '>= 12.0.0'} @@ -3970,27 +3655,13 @@ packages: os: [linux] libc: [glibc] - lightningcss-linux-arm64-musl@1.32.0: - resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] libc: [musl] - lightningcss-linux-arm64-musl@1.33.0: - resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - libc: [musl] - - lightningcss-linux-x64-gnu@1.32.0: - resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - libc: [glibc] - lightningcss-linux-x64-gnu@1.33.0: resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} engines: {node: '>= 12.0.0'} @@ -3998,13 +3669,6 @@ packages: os: [linux] libc: [glibc] - lightningcss-linux-x64-musl@1.32.0: - resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - libc: [musl] - lightningcss-linux-x64-musl@1.33.0: resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} engines: {node: '>= 12.0.0'} @@ -4012,45 +3676,22 @@ packages: os: [linux] libc: [musl] - lightningcss-win32-arm64-msvc@1.32.0: - resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [win32] - lightningcss-win32-arm64-msvc@1.33.0: resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [win32] - lightningcss-win32-x64-msvc@1.32.0: - resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [win32] - lightningcss-win32-x64-msvc@1.33.0: resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] - lightningcss@1.32.0: - resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} - engines: {node: '>= 12.0.0'} - lightningcss@1.33.0: resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} engines: {node: '>= 12.0.0'} - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} - engines: {node: '>=14'} - - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lines-and-columns@2.0.4: resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4065,23 +3706,14 @@ packages: lodash-es@4.18.1: resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} - lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - - lodash.truncate@4.4.2: - resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} - - lodash.uniq@4.5.0: - resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} - longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - lru-cache@11.5.2: - resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==} + lru-cache@11.5.3: + resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} engines: {node: 20 || >=22} lru-cache@5.1.1: @@ -4112,107 +3744,56 @@ packages: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} - mathml-tag-names@2.1.3: - resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} - mdast-util-definitions@6.0.0: resolution: {integrity: sha512-scTllyX6pnYNZH/AIp/0ePz6s4cZtARxImwoPJ7kS42n+MnVsI4XbnG6d4ibehRIldYMWM2LD7ImQblVhUejVQ==} - mdast-util-directive@2.2.4: - resolution: {integrity: sha512-sK3ojFP+jpj1n7Zo5ZKvoxP1MvLyzVG63+gm40Z/qI00avzdPCYxt7RBMgofwAva9gBjbDBWVRB/i+UD+fUCzQ==} - - mdast-util-find-and-replace@2.2.2: - resolution: {integrity: sha512-MTtdFRz/eMDHXzeK6W3dO7mXUlF82Gom4y0oOgvHhh/HXZAGvIQDUvQ0SuUx+j2tv44b8xTHOm8K/9OoRFnXKw==} + mdast-util-directive@3.2.0: + resolution: {integrity: sha512-Yxq+hH4pBEmtaLIJyMVcNbtBiCIKzdOK3HvDeM+JAqC8XVAT1e5PUYbHBpwFvQLIJuJfO2zCu7aNUXWoyZLmhw==} mdast-util-find-and-replace@3.0.2: resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==} - mdast-util-from-markdown@1.3.1: - resolution: {integrity: sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==} - - mdast-util-from-markdown@2.0.2: - resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} - mdast-util-from-markdown@2.1.0: resolution: {integrity: sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A==} - mdast-util-gfm-autolink-literal@1.0.3: - resolution: {integrity: sha512-My8KJ57FYEy2W2LyNom4n3E7hKTuQk/0SES0u16tjA9Z3oFkF4RrC/hPAPgjlSpezsOvI8ObcXcElo92wn5IGA==} - mdast-util-gfm-autolink-literal@2.0.1: resolution: {integrity: sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==} - mdast-util-gfm-footnote@1.0.2: - resolution: {integrity: sha512-56D19KOGbE00uKVj3sgIykpwKL179QsVFwx/DCW0u/0+URsryacI4MAdNJl0dh+u2PSsD9FtxPFbHCzJ78qJFQ==} - mdast-util-gfm-footnote@2.1.0: resolution: {integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==} - mdast-util-gfm-strikethrough@1.0.3: - resolution: {integrity: sha512-DAPhYzTYrRcXdMjUtUjKvW9z/FNAMTdU0ORyMcbmkwYNbKocDpdk+PX1L1dQgOID/+vVs1uBQ7ElrBQfZ0cuiQ==} - mdast-util-gfm-strikethrough@2.0.0: resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} - mdast-util-gfm-table@1.0.7: - resolution: {integrity: sha512-jjcpmNnQvrmN5Vx7y7lEc2iIOEytYv7rTvu+MeyAsSHTASGCCRA79Igg2uKssgOs1i1po8s3plW0sTu1wkkLGg==} - mdast-util-gfm-table@2.0.0: resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} - mdast-util-gfm-task-list-item@1.0.2: - resolution: {integrity: sha512-PFTA1gzfp1B1UaiJVyhJZA1rm0+Tzn690frc/L8vNX1Jop4STZgOE6bxUhnzdVSB+vm2GU1tIsuQcA9bxTQpMQ==} - mdast-util-gfm-task-list-item@2.0.0: resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} - mdast-util-gfm@2.0.2: - resolution: {integrity: sha512-qvZ608nBppZ4icQlhQQIAdc6S3Ffj9RGmzwUKUWuEICFnd1LVkN3EktF7ZHAgfcEdvZB5owU9tQgt99e2TlLjg==} - mdast-util-gfm@3.1.0: resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==} - mdast-util-mdx-expression@1.3.2: - resolution: {integrity: sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==} - mdast-util-mdx-expression@2.0.1: resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} - mdast-util-mdx-jsx@2.1.4: - resolution: {integrity: sha512-DtMn9CmVhVzZx3f+optVDF8yFgQVt7FghCRNdlIaS3X5Bnym3hZwPbg/XW86vdpKjlc1PVj26SpnLGeJBXD3JA==} - - mdast-util-mdx-jsx@3.2.0: - resolution: {integrity: sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==} - - mdast-util-mdx@2.0.1: - resolution: {integrity: sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==} + mdast-util-mdx-jsx@3.2.1: + resolution: {integrity: sha512-oXp1GIa+E9IwIs3a106+tr3Bz2MlTTBvlXjOZMoIat11kk7vjqgmBnksB9WHmWv+gZh7k3IUgpAHlwHB7DH4GQ==} mdast-util-mdx@3.0.0: resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==} - mdast-util-mdxjs-esm@1.3.1: - resolution: {integrity: sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w==} - mdast-util-mdxjs-esm@2.0.1: resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==} - mdast-util-phrasing@3.0.1: - resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==} - mdast-util-phrasing@4.1.0: resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} mdast-util-to-hast@13.2.1: resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} - mdast-util-to-markdown@1.5.0: - resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} - - mdast-util-to-markdown@2.1.2: - resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} - - mdast-util-to-string@3.2.0: - resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} + mdast-util-to-markdown@2.2.3: + resolution: {integrity: sha512-dImdB6VZRMRac1SwAW6o1c0ESk/7pFFAMCMuKM+9v7LpTSthMM5nzXpqKw4Mjo66aXVKhNkyrP4bMB9MurPyWg==} mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} @@ -4220,20 +3801,13 @@ packages: mdn-data@2.0.28: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} - mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - - mdn-data@2.12.2: - resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} + mdn-data@2.27.1: + resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} media-typer@1.1.1: resolution: {integrity: sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==} engines: {node: '>= 0.8'} - meow@13.2.0: - resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==} - engines: {node: '>=18'} - merge-descriptors@2.0.0: resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} engines: {node: '>=18'} @@ -4242,222 +3816,120 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - mermaid@12.2.0: - resolution: {integrity: sha512-w7nr/SFrLO7BaVTs3dQTvYSV6nYSBj0Yy9DjBhsIJtAcHqRzXSq4Pg32ujHZ/AdWsAMNEvvhbm5dt9E2tOiHzw==} + mermaid@12.3.0: + resolution: {integrity: sha512-4113TdXeLAsMruJ79OpFL5O8+LTFXhQqZ260rF3tgUmiNAtRm4Uume04I+65PRN6yZ69J4f8rVYWW8zRk65UYw==} engines: {node: '>=22.12.0'} - micromark-core-commonmark@1.1.0: - resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} + micromark-core-commonmark@2.0.4: + resolution: {integrity: sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w==} - micromark-core-commonmark@2.0.3: - resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} - - micromark-extension-directive@2.2.1: - resolution: {integrity: sha512-ZFKZkNaEqAP86IghX1X7sE8NNnx6kFNq9mSBRvEHjArutTCJZ3LYg6VH151lXVb1JHpmIcW/7rX25oMoIHuSug==} - - micromark-extension-gfm-autolink-literal@1.0.5: - resolution: {integrity: sha512-z3wJSLrDf8kRDOh2qBtoTRD53vJ+CWIyo7uyZuxf/JAbNJjiHsOpG1y5wxk8drtv3ETAHutCu6N3thkOOgueWg==} + micromark-extension-directive@3.0.2: + resolution: {integrity: sha512-wjcXHgk+PPdmvR58Le9d7zQYWy+vKEU9Se44p2CrCDPiLr2FMyiT4Fyb5UFKFC66wGB3kPlgD7q3TnoqPS7SZA==} micromark-extension-gfm-autolink-literal@2.1.0: resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} - micromark-extension-gfm-footnote@1.1.2: - resolution: {integrity: sha512-Yxn7z7SxgyGWRNa4wzf8AhYYWNrwl5q1Z8ii+CSTTIqVkmGZF1CElX2JI8g5yGoM3GAman9/PVCUFUSJ0kB/8Q==} - micromark-extension-gfm-footnote@2.1.0: resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==} - micromark-extension-gfm-strikethrough@1.0.7: - resolution: {integrity: sha512-sX0FawVE1o3abGk3vRjOH50L5TTLr3b5XMqnP9YDRb34M0v5OoZhG+OHFz1OffZ9dlwgpTBKaT4XW/AsUVnSDw==} - micromark-extension-gfm-strikethrough@2.1.0: resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==} - micromark-extension-gfm-table@1.0.7: - resolution: {integrity: sha512-3ZORTHtcSnMQEKtAOsBQ9/oHp9096pI/UvdPtN7ehKvrmZZ2+bbWhi0ln+I9drmwXMt5boocn6OlwQzNXeVeqw==} - micromark-extension-gfm-table@2.1.1: resolution: {integrity: sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==} - micromark-extension-gfm-tagfilter@1.0.2: - resolution: {integrity: sha512-5XWB9GbAUSHTn8VPU8/1DBXMuKYT5uOgEjJb8gN3mW0PNW5OPHpSdojoqf+iq1xo7vWzw/P8bAHY0n6ijpXF7g==} - micromark-extension-gfm-tagfilter@2.0.0: resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==} - micromark-extension-gfm-task-list-item@1.0.5: - resolution: {integrity: sha512-RMFXl2uQ0pNQy6Lun2YBYT9g9INXtWJULgbt01D/x8/6yJ2qpKyzdZD3pi6UIkzF++Da49xAelVKUeUMqd5eIQ==} - micromark-extension-gfm-task-list-item@2.1.0: resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==} - micromark-extension-gfm@2.0.3: - resolution: {integrity: sha512-vb9OoHqrhCmbRidQv/2+Bc6pkP0FrtlhurxZofvOEy5o8RtuuvTq+RQ1Vw5ZDNrVraQZu3HixESqbG+0iKk/MQ==} - micromark-extension-gfm@3.0.0: resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} - micromark-extension-mdx-expression@1.0.8: - resolution: {integrity: sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==} - micromark-extension-mdx-expression@3.0.1: resolution: {integrity: sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==} - micromark-extension-mdx-jsx@1.0.5: - resolution: {integrity: sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA==} - micromark-extension-mdx-jsx@3.0.2: resolution: {integrity: sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==} - micromark-extension-mdx-md@1.0.1: - resolution: {integrity: sha512-7MSuj2S7xjOQXAjjkbjBsHkMtb+mDGVW6uI2dBL9snOBCbZmoNgDAeZ0nSn9j3T42UE/g2xVNMn18PJxZvkBEA==} - micromark-extension-mdx-md@2.0.0: resolution: {integrity: sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==} - micromark-extension-mdxjs-esm@1.0.5: - resolution: {integrity: sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w==} - micromark-extension-mdxjs-esm@3.0.0: resolution: {integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==} - micromark-extension-mdxjs@1.0.1: - resolution: {integrity: sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q==} - micromark-extension-mdxjs@3.0.0: resolution: {integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==} - micromark-factory-destination@1.1.0: - resolution: {integrity: sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==} - micromark-factory-destination@2.0.1: resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} - micromark-factory-label@1.1.0: - resolution: {integrity: sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==} - micromark-factory-label@2.0.1: resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} - micromark-factory-mdx-expression@1.0.9: - resolution: {integrity: sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA==} - micromark-factory-mdx-expression@2.0.3: resolution: {integrity: sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==} - micromark-factory-space@1.1.0: - resolution: {integrity: sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==} - - micromark-factory-space@2.0.1: - resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} - - micromark-factory-title@1.1.0: - resolution: {integrity: sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==} + micromark-factory-space@2.1.0: + resolution: {integrity: sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q==} micromark-factory-title@2.0.1: resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} - micromark-factory-whitespace@1.1.0: - resolution: {integrity: sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==} - micromark-factory-whitespace@2.0.1: resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} - micromark-util-character@1.2.0: - resolution: {integrity: sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==} - micromark-util-character@2.1.1: resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} - micromark-util-chunked@1.1.0: - resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} - micromark-util-chunked@2.0.1: resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} - micromark-util-classify-character@1.1.0: - resolution: {integrity: sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==} - micromark-util-classify-character@2.0.1: resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} - micromark-util-combine-extensions@1.1.0: - resolution: {integrity: sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==} - micromark-util-combine-extensions@2.0.1: resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} - micromark-util-decode-numeric-character-reference@1.1.0: - resolution: {integrity: sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==} - micromark-util-decode-numeric-character-reference@2.0.2: resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} - micromark-util-decode-string@1.1.0: - resolution: {integrity: sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==} - micromark-util-decode-string@2.0.1: resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} - micromark-util-encode@1.1.0: - resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} + micromark-util-edit-map@1.0.0: + resolution: {integrity: sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==} micromark-util-encode@2.0.1: resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} - micromark-util-events-to-acorn@1.2.3: - resolution: {integrity: sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==} - micromark-util-events-to-acorn@2.0.3: resolution: {integrity: sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==} - micromark-util-html-tag-name@1.2.0: - resolution: {integrity: sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==} - micromark-util-html-tag-name@2.0.1: resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} - micromark-util-normalize-identifier@1.1.0: - resolution: {integrity: sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==} - micromark-util-normalize-identifier@2.0.1: resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} - micromark-util-resolve-all@1.1.0: - resolution: {integrity: sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==} - micromark-util-resolve-all@2.0.1: resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} - micromark-util-sanitize-uri@1.2.0: - resolution: {integrity: sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==} - micromark-util-sanitize-uri@2.0.1: resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} - micromark-util-subtokenize@1.1.0: - resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} - micromark-util-subtokenize@2.1.0: resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==} - micromark-util-symbol@1.1.0: - resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} - micromark-util-symbol@2.0.1: resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} - micromark-util-types@1.1.0: - resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} + micromark-util-types@2.0.3: + resolution: {integrity: sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==} - micromark-util-types@2.0.2: - resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} - - micromark@3.2.0: - resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} - - micromark@4.0.2: - resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} + micromark@4.0.3: + resolution: {integrity: sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==} micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} @@ -4486,10 +3958,6 @@ packages: mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} - mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} @@ -4520,9 +3988,6 @@ packages: resolution: {integrity: sha512-WmmLty1YWwJl9yZi77v2dVIV6X2kuYV8YYBI/G3LWGKdGHmHUvL1z7FW0iDvEvGAwNEoc5x1tOOOyDnf5jJw/w==} engines: {node: '>= 10'} - nlcst-to-string@3.1.1: - resolution: {integrity: sha512-63mVyqaqt0cmn2VcI2aH6kxe1rLAmSROqHMA0i4qqg1tidkfExgpb0FGMikMCn86mw5dFtBtEANfmSSK7TjNHw==} - nlcst-to-string@4.0.0: resolution: {integrity: sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==} @@ -4541,11 +4006,11 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-mock-http@1.0.4: - resolution: {integrity: sha512-8DY+kFsDkNXy1sJglUfuODx1/opAGJGyrTuFqEoN90oRc2Vk0ZbD4K2qmKXBBEhZQzdKHIVfEJpDU8Ak2NJEvQ==} + node-mock-http@1.0.5: + resolution: {integrity: sha512-KQyt/wLjG3TAc7DOUhpqWzgd4ERxR80JOlTK5VE5R1S12IaPVN5qkj4klBce9HPG1Njuup4Sb5bljaT34lIyjw==} - node-releases@2.0.57: - resolution: {integrity: sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw==} + node-releases@2.0.63: + resolution: {integrity: sha512-6li2QanLsAXpIH2R6j77MzRyvOyrvdTqlKtO4CgBdHGNvN99ZZfyxszHc5o5+IZBWD5u6Hzwg83JoGXmqZNG9Q==} engines: {node: '>=18'} nopt@7.2.1: @@ -4640,53 +4105,32 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - p-queue@9.3.5: - resolution: {integrity: sha512-Lki/zhXFVmDhesBUn/yHRLW9Bte7mE7xoFHzTR8sIomV7a2z+LxYAPkGvdfidNiu4fKSfjtawixxSHcZci5QcQ==} - engines: {node: '>=20'} - - p-retry@5.1.2: - resolution: {integrity: sha512-couX95waDu98NfNZV+i/iLt+fdVxmI7CbrrdC2uDWfPdUAApyxT4wmDlyOtR5KtTDmkDO0zDScDjDou9YHhd9g==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-queue@10.0.0: + resolution: {integrity: sha512-P2wrCri3bhGLPo3kX7qYVXbo/5GvaVATU0DpO24CbeT53Y4z35t8JUWku04ERpXHUYB5rPMi3TkWE3fmJgx5rA==} + engines: {node: '>=22'} - p-timeout@7.0.1: - resolution: {integrity: sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==} - engines: {node: '>=20'} + p-retry@9.0.0: + resolution: {integrity: sha512-HuEats8gYn/UUYa5uyveyQGv75mQmwdFtuMgnZlS12dj/7bdnJSO6keaTjgcZUhvkANTj5EO3lACUmV3xmgj0Q==} + engines: {node: '>=22'} package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - package-manager-detector@1.8.0: - resolution: {integrity: sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==} - package-manager-detector@1.9.0: resolution: {integrity: sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - parse-entities@4.0.2: resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} - parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - parse-json@7.1.1: resolution: {integrity: sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==} engines: {node: '>=16'} - parse-latin@5.0.1: - resolution: {integrity: sha512-b/K8ExXaWC9t34kKeDV8kGXBkXZ1HCSAZRYE7HR14eA1GlXX5L8iWhs8USJNhQU9q5ci413jCKF0gOyovvyRBg==} - parse-latin@7.0.0: resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==} - parse5@6.0.1: - resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} - - parse5@7.3.0: - resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} + parse5@8.1.1: + resolution: {integrity: sha512-EcR/6WDcU7b2N3vQSxKALCk9lXGtUMQxXio008OEMBE0kavu/7JLfBEeFPzi43nMqVDSbEn3QCK+BMCc9zO//w==} parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} @@ -4713,10 +4157,6 @@ packages: path-to-regexp@8.4.2: resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -4750,171 +4190,20 @@ packages: points-on-path@0.2.1: resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==} - postcss-calc@9.0.1: - resolution: {integrity: sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.2.2 - - postcss-colormin@6.1.0: - resolution: {integrity: sha512-x9yX7DOxeMAR+BgGVnNSAxmAj98NX/YxEMNFP+SDCEeNLb2r3i6Hh1ksMsnW8Ub5SLCpbescQqn9YEbE9554Sw==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-convert-values@6.1.0: - resolution: {integrity: sha512-zx8IwP/ts9WvUM6NkVSkiU902QZL1bwPhaVaLynPtCsOTqp+ZKbNi+s6XJg3rfqpKGA/oc7Oxk5t8pOQJcwl/w==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-discard-comments@6.0.2: - resolution: {integrity: sha512-65w/uIqhSBBfQmYnG92FO1mWZjJ4GL5b8atm5Yw2UgrwD7HiNiSSNwJor1eCFGzUgYnN/iIknhNRVqjrrpuglw==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-discard-duplicates@6.0.3: - resolution: {integrity: sha512-+JA0DCvc5XvFAxwx6f/e68gQu/7Z9ud584VLmcgto28eB8FqSFZwtrLwB5Kcp70eIoWP/HXqz4wpo8rD8gpsTw==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-discard-empty@6.0.3: - resolution: {integrity: sha512-znyno9cHKQsK6PtxL5D19Fj9uwSzC2mB74cpT66fhgOadEUPyXFkbgwm5tvc3bt3NAy8ltE5MrghxovZRVnOjQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-discard-overridden@6.0.2: - resolution: {integrity: sha512-j87xzI4LUggC5zND7KdjsI25APtyMuynXZSujByMaav2roV6OZX+8AaCUcZSWqckZpjAjRyFDdpqybgjFO0HJQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-html@1.8.1: - resolution: {integrity: sha512-OLF6P7qctfAWayOhLpcVnTGqVeJzu2W3WpIYelfz2+JV5oGxfkcEvweN9U4XpeqE0P98dcD9ssusGwlF0TK0uQ==} - engines: {node: ^12 || >=14} - - postcss-merge-longhand@6.0.5: - resolution: {integrity: sha512-5LOiordeTfi64QhICp07nzzuTDjNSO8g5Ksdibt44d+uvIIAE1oZdRn8y/W5ZtYgRH/lnLDlvi9F8btZcVzu3w==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-merge-rules@6.1.1: - resolution: {integrity: sha512-KOdWF0gju31AQPZiD+2Ar9Qjowz1LTChSjFFbS+e2sFgc4uHOp3ZvVX4sNeTlk0w2O31ecFGgrFzhO0RSWbWwQ==} - engines: {node: ^14 || ^16 || >=18.0} + postcss-calc@11.2.3: + resolution: {integrity: sha512-pFW3MR2a4W7uHcSGUiyQGGXZWHon83ljbNwnUJ1mRKublWQbv+3o9NiqhlV4TJfNby+U+zLY2OgiywzhA5eFqw==} + engines: {node: ^22.22.3 || ^24.15 || >=26.0} peerDependencies: - postcss: ^8.4.31 - - postcss-minify-font-values@6.1.0: - resolution: {integrity: sha512-gklfI/n+9rTh8nYaSJXlCo3nOKqMNkxuGpTn/Qm0gstL3ywTr9/WRKznE+oy6fvfolH6dF+QM4nCo8yPLdvGJg==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-minify-gradients@6.0.3: - resolution: {integrity: sha512-4KXAHrYlzF0Rr7uc4VrfwDJ2ajrtNEpNEuLxFgwkhFZ56/7gaE4Nr49nLsQDZyUe+ds+kEhf+YAUolJiYXF8+Q==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-minify-params@6.1.0: - resolution: {integrity: sha512-bmSKnDtyyE8ujHQK0RQJDIKhQ20Jq1LYiez54WiaOoBtcSuflfK3Nm596LvbtlFcpipMjgClQGyGr7GAs+H1uA==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-minify-selectors@6.0.4: - resolution: {integrity: sha512-L8dZSwNLgK7pjTto9PzWRoMbnLq5vsZSTu8+j1P/2GB8qdtGQfn+K1uSvFgYvgh83cbyxT5m43ZZhUMTJDSClQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-charset@6.0.2: - resolution: {integrity: sha512-a8N9czmdnrjPHa3DeFlwqst5eaL5W8jYu3EBbTTkI5FHkfMhFZh1EGbku6jhHhIzTA6tquI2P42NtZ59M/H/kQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-display-values@6.0.2: - resolution: {integrity: sha512-8H04Mxsb82ON/aAkPeq8kcBbAtI5Q2a64X/mnRRfPXBq7XeogoQvReqxEfc0B4WPq1KimjezNC8flUtC3Qz6jg==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-positions@6.0.2: - resolution: {integrity: sha512-/JFzI441OAB9O7VnLA+RtSNZvQ0NCFZDOtp6QPFo1iIyawyXg0YI3CYM9HBy1WvwCRHnPep/BvI1+dGPKoXx/Q==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-repeat-style@6.0.2: - resolution: {integrity: sha512-YdCgsfHkJ2jEXwR4RR3Tm/iOxSfdRt7jplS6XRh9Js9PyCR/aka/FCb6TuHT2U8gQubbm/mPmF6L7FY9d79VwQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-string@6.0.2: - resolution: {integrity: sha512-vQZIivlxlfqqMp4L9PZsFE4YUkWniziKjQWUtsxUiVsSSPelQydwS8Wwcuw0+83ZjPWNTl02oxlIvXsmmG+CiQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-timing-functions@6.0.2: - resolution: {integrity: sha512-a+YrtMox4TBtId/AEwbA03VcJgtyW4dGBizPl7e88cTFULYsprgHWTbfyjSLyHeBcK/Q9JhXkt2ZXiwaVHoMzA==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-unicode@6.1.0: - resolution: {integrity: sha512-QVC5TQHsVj33otj8/JD869Ndr5Xcc/+fwRh4HAsFsAeygQQXm+0PySrKbr/8tkDKzW+EVT3QkqZMfFrGiossDg==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-url@6.0.2: - resolution: {integrity: sha512-kVNcWhCeKAzZ8B4pv/DnrU1wNh458zBNp8dh4y5hhxih5RZQ12QWMuQrDgPRw3LRl8mN9vOVfHl7uhvHYMoXsQ==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-normalize-whitespace@6.0.2: - resolution: {integrity: sha512-sXZ2Nj1icbJOKmdjXVT9pnyHQKiSAyuNQHSgRCUgThn2388Y9cGVDR+E9J9iAYbSbLHI+UUwLVl1Wzco/zgv0Q==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-ordered-values@6.0.2: - resolution: {integrity: sha512-VRZSOB+JU32RsEAQrO94QPkClGPKJEL/Z9PCBImXMhIeK5KAYo6slP/hBYlLgrCjFxyqvn5VC81tycFEDBLG1Q==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-reduce-initial@6.1.0: - resolution: {integrity: sha512-RarLgBK/CrL1qZags04oKbVbrrVK2wcxhvta3GCxrZO4zveibqbRPmm2VI8sSgCXwoUHEliRSbOfpR0b/VIoiw==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-reduce-transforms@6.0.2: - resolution: {integrity: sha512-sB+Ya++3Xj1WaT9+5LOOdirAxP7dJZms3GRcYheSPi1PiTMigsxHAdkrbItHxwYHr4kt1zL7mmcHstgMYT+aiA==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - - postcss-resolve-nested-selector@0.1.6: - resolution: {integrity: sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==} + postcss: ^8.5.29 - postcss-safe-parser@6.0.0: - resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} - engines: {node: '>=12.0'} + postcss-html@2.0.0: + resolution: {integrity: sha512-f2Rvw5FCollEfVj3wfN7JdQb7n2rNIthW+epw2EByio7M6P7RH0BTj8a/ODHrUXd0cmO7ychb6YniymV93182Q==} + engines: {node: ^22.12 || >=24} peerDependencies: - postcss: ^8.3.3 + postcss: ^8.5.0 - postcss-safe-parser@7.0.1: - resolution: {integrity: sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==} + postcss-safe-parser@7.1.0: + resolution: {integrity: sha512-1WzZxRLaAFwEh6Do+zyGpjWV3nGJNxxhuh7Ubu/q1ICImMgZJnLwhoaEpRbG4pJppp2Y1ncL9ffA2f+LhrefQg==} engines: {node: '>=18.0'} peerDependencies: postcss: ^8.4.31 @@ -4929,35 +4218,15 @@ packages: resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} engines: {node: '>=4'} - postcss-selector-parser@6.1.2: - resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} - engines: {node: '>=4'} - - postcss-selector-parser@7.1.5: - resolution: {integrity: sha512-KvvtD7SrlBP7dlgkBghEE3r84CABm5SmV2aNcG4oCA+qDnJ/tvKonFVvwWAyyWUEwxuNawdfEAZKP9zM3oZ2Uw==} + postcss-selector-parser@7.1.7: + resolution: {integrity: sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==} engines: {node: '>=4'} - postcss-svgo@6.0.3: - resolution: {integrity: sha512-dlrahRmxP22bX6iKEjOM+c8/1p+81asjKT+V5lrgOH944ryx/OHpclnIbGsKVd3uWOXFLYJwCVf0eEkJGvO96g==} - engines: {node: ^14 || ^16 || >= 18} - peerDependencies: - postcss: ^8.4.31 - - postcss-unique-selectors@6.0.4: - resolution: {integrity: sha512-K38OCaIrO8+PzpArzkLKB42dSARtC2tmG6PvD4b1o1Q2E9Os8jzfWFfSy/rixsHwohtsDdFtAWGjFVFUdwYaMg==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 - postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.5.28: - resolution: {integrity: sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==} - engines: {node: ^10 || ^12 || >=14} - - postcss@8.5.31: - resolution: {integrity: sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==} + postcss@8.5.32: + resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==} engines: {node: ^10 || ^12 || >=14} powershell-utils@0.1.0: @@ -4972,17 +4241,14 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-plugin-astro@0.8.1: - resolution: {integrity: sha512-lJ/mG/Lz/ccSwNtwqpFS126mtMVzFVyYv0ddTF9wqwrEG4seECjKDAyw/oGv915rAcJi8jr89990nqfpmG+qdg==} - engines: {node: ^14.15.0 || >=16.0.0, pnpm: '>=7.14.0'} - - prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true + prettier-plugin-astro@1.1.2: + resolution: {integrity: sha512-vKyJW7Bb/QcIPUebEehbG+Tn+3yTIhoJ8ecm6NyJgcOj5T2xP+eF1IxY4zv809YyA69nV4ZFj+H9mdpC5cTaQA==} + engines: {node: '>=22.12.0'} + peerDependencies: + prettier: ^3.5.3 - prettier@3.9.6: - resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} + prettier@3.9.10: + resolution: {integrity: sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==} engines: {node: '>=14'} hasBin: true @@ -5014,11 +4280,8 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} - property-information@6.5.0: - resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} - - property-information@7.1.0: - resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==} + property-information@7.2.0: + resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} proxy-addr@2.0.8: resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} @@ -5097,50 +4360,30 @@ packages: rehype-stringify@10.0.1: resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} - remark-directive@2.0.1: - resolution: {integrity: sha512-oosbsUAkU/qmUE78anLaJePnPis4ihsE7Agp0T/oqTzvTea8pOiaYEtfInU/+xMOVTS9PN5AhGOiaIVe4GD8gw==} - - remark-gfm@3.0.1: - resolution: {integrity: sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==} + remark-directive@3.0.1: + resolution: {integrity: sha512-gwglrEQEZcZYgVyG1tQuA+h58EZfq5CSULw7J90AFuCTyib1thgHPoqQ+h9iFvU6R+vnZ5oNFQR5QKgGpk741A==} remark-gfm@4.0.1: resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==} - remark-mdx@2.3.0: - resolution: {integrity: sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==} - remark-mdx@3.1.1: resolution: {integrity: sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg==} - remark-parse@10.0.2: - resolution: {integrity: sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==} - remark-parse@11.0.0: resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} remark-rehype@11.1.2: resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==} - remark-smartypants@2.1.0: - resolution: {integrity: sha512-qoF6Vz3BjU2tP6OfZqHOvCU0ACmu/6jhGaINSQRI9mM7wCxNQTKB3JUAN4SVoN2ybElEDTxBIABRep7e569iJw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - remark-smartypants@3.0.2: - resolution: {integrity: sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==} - engines: {node: '>=16.0.0'} - remark-smartypants@3.0.3: resolution: {integrity: sha512-gCaK+ndZ0hYezlqFegHFCVh2CQemsi0Npdh1qVM9bxlUFknjkbP6VmojWhddOCrbK0PbbacmYLWfTULRiT1eWA==} engines: {node: '>=16.0.0'} - remark-stringify@10.0.3: - resolution: {integrity: sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==} - remark-stringify@11.0.0: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} - remark@14.0.3: - resolution: {integrity: sha512-bfmJW1dmR2LvaMJuAnE88pZP9DktIFYXazkTfOIKZzi3Knk9lT0roItIA24ydOucI3bV/g/tXBA6hzqq3FV9Ew==} + remark@15.0.1: + resolution: {integrity: sha512-Eht5w30ruCXgFmxVUSlNWQ9iiimq07URKeFS3hNc8cUWy1llX4KDWfyEDZRycMc+znsN9Ux5/tJ/BFdgdOwA3A==} request-light@0.5.8: resolution: {integrity: sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==} @@ -5152,38 +4395,18 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - - resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - retext-latin@3.1.0: - resolution: {integrity: sha512-5MrD1tuebzO8ppsja5eEu+ZbBeUNCjoEarn70tkXOS7Bdsdf6tNahsv2bY0Z8VooFF6cw7/6S+d3yI/TMlMVVQ==} - retext-latin@4.0.0: resolution: {integrity: sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA==} - retext-smartypants@5.2.0: - resolution: {integrity: sha512-Do8oM+SsjrbzT2UNIKgheP0hgUQTDDQYyZaIY3kfq0pdFzoPk+ZClYJ+OERNXveog4xf1pZL4PfRxNoVL7a/jw==} - retext-smartypants@6.2.0: resolution: {integrity: sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==} - retext-stringify@3.1.0: - resolution: {integrity: sha512-767TLOaoXFXyOnjx/EggXlb37ZD2u4P1n0GJqVdpipqACsQP+20W+BNpMYrlJkq7hxffnFk+jc6mAK9qrbuB8w==} - retext-stringify@4.0.0: resolution: {integrity: sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA==} - retext@8.1.0: - resolution: {integrity: sha512-N9/Kq7YTn6ZpzfiGW45WfEGJqFf1IM1q8OsRa1CGzIebCJBNCANDRmOrholiDRGKo/We7ofKR4SEvcGAWEMD3Q==} - retext@9.0.0: resolution: {integrity: sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==} @@ -5191,10 +4414,6 @@ packages: resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} engines: {node: '>= 4'} - retry@0.13.1: - resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} - engines: {node: '>= 4'} - reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -5205,8 +4424,8 @@ packages: robust-predicates@3.0.3: resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} - rolldown@1.2.14: - resolution: {integrity: sha512-eTBTTqMR6uHKLgcUqpJP8ntzDI6V4LYA8negAMBEI7gkgVvOdrx6VsvS2Ym+83KhOPdLCHWJu0w7UQFJZhHKNw==} + rolldown@1.2.16: + resolution: {integrity: sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -5230,29 +4449,23 @@ packages: s.color@0.0.15: resolution: {integrity: sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==} - sade@1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} - safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass-formatter@0.7.9: - resolution: {integrity: sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==} + sass-formatter@0.8.0: + resolution: {integrity: sha512-Nf4eMGE2O5vnJG7KPCRyksWS9gVKSYoUWtPeMXRRxwZSPVQhSGtL602xVYS65LvMkHmkvKa7xpauF0+/5pPwrg==} + hasBin: true sass@1.102.0: resolution: {integrity: sha512-NSOyTnaQF7rTAEOtI2fwb386vL+akyiQLBZu8Na7hXCb+umJy0GAqlcMIaqACZ6Z1VgTBS4K9PG6B3IdjHGJsw==} engines: {node: '>=20.19.0'} hasBin: true - satteri@0.10.5: - resolution: {integrity: sha512-Ao1LKpAEa9Wdg0otgbVKViZHEq9ebdXe4DMrp3s9vQAU0HNIuHnFEuMuOcm0ZIXyV0Yzxj91NvhLpvXZJO/5ZQ==} - - satteri@0.9.5: - resolution: {integrity: sha512-ZuWVl+vnM64y+/TtX8Kosv2c00W+hLQiiwnEL6H0UKVVrxFqMw4D2CJHHQaouVd89OAhtBBfjWLqhKi3TVUV4w==} + satteri@0.11.7: + resolution: {integrity: sha512-xDOSxkc1ew3z3IovIjmsqJaVHRXTGYJkPvx0LL/U6o90km8kSU+pmrZVvnWd5creJeE0UnvMEienlkPuYQdJaA==} sax@1.6.1: resolution: {integrity: sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==} @@ -5266,8 +4479,8 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.8.5: - resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + semver@7.8.6: + resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==} engines: {node: '>=10'} hasBin: true @@ -5299,12 +4512,8 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shiki@4.4.3: - resolution: {integrity: sha512-Mb/GvXPHBAXdgGIcnfU5L3ldpn1XcxrGkPHwqgRx17/I2XRfqlFKk2vGkHWINn1kdXvzJZeuO3is6I9KLPFm0g==} - engines: {node: '>=20'} - - shiki@4.5.0: - resolution: {integrity: sha512-OcRW72ngQvc+MSVWBRIovC/BTW589iUE/Vxav7VeM4RcY9MUjqB+IR6ILG1k9nuW6LiG/nct9uma4/MBtnZbmQ==} + shiki@4.6.0: + resolution: {integrity: sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA==} engines: {node: '>=20'} side-channel-list@1.0.1: @@ -5342,18 +4551,6 @@ packages: engines: {node: '>=20.19.5', npm: '>=10.8.2'} hasBin: true - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - - slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - - smol-toml@1.8.0: - resolution: {integrity: sha512-kCZr2V3ch9i00x8zXRhjUNVcjG9ijES5dDudkXvUVCT5QlJNQWElSJdZqyPemffHoLNUYwOcou0Fy+ojN0uHSQ==} - engines: {node: '>= 18'} - smol-toml@1.9.1: resolution: {integrity: sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ==} engines: {node: '>= 18'} @@ -5389,8 +4586,8 @@ packages: spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - spdx-license-ids@3.0.23: - resolution: {integrity: sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==} + spdx-license-ids@3.0.24: + resolution: {integrity: sha512-cLS9TtWkIQFyLkJ3/5aFQAOHOSKTlOs/7WDut/XPSdjom1fJhUdkepeJAKXa9Y05+FabHd0sti+Et559vDtkpQ==} speakingurl@14.0.1: resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} @@ -5406,11 +4603,11 @@ packages: std-env@4.3.0: resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} - stream-chain@4.3.0: - resolution: {integrity: sha512-01QSuOXnqVS/eP67NMvXfpbwNSovfSpK1QWi6zg4EIArO7O8tQMhPT0cMRXl2wwK80gBjrPxgaLDSNzdQiKIuw==} + stream-chain@4.4.1: + resolution: {integrity: sha512-4MWXw+Si0RW3HAYQN3MdxpgTJA6Te9StiLtdkZO248DLPsRipqBbuiQSkyYLpCDEuvqGfqb2B5dEGxiEfHYkNQ==} - stream-json@3.7.0: - resolution: {integrity: sha512-rCSBdcBP/bPk6T8QFcxAj1MSzAuc5i49cYW6IE7sYObNEPccBJIUiL6fU9c9BWt40aJK0siVynLX7lWaW8alXw==} + stream-json@3.8.0: + resolution: {integrity: sha512-xD0bPEoPgaaEpEu2HSq1spYAs5LSJrLAlo44SHycE+aI8W0IrU2cklY7fiQKhRTVbuvxNUij06vIiz1NBT+AZA==} string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} @@ -5442,8 +4639,8 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-ansi@7.1.2: - resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} engines: {node: '>=12'} strip-bom-string@1.0.0: @@ -5456,15 +4653,12 @@ packages: style-to-object@1.0.14: resolution: {integrity: sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==} - stylehacks@6.1.1: - resolution: {integrity: sha512-gSTTEQ670cJNoaeIp9KX6lZmm8LJ3jPB5yJmX8Zq/wQxOsAFXV3qjWzHas3YYk1qesuVIyYWWUpZ0vSE/dTSGg==} - engines: {node: ^14 || ^16 || >=18.0} - peerDependencies: - postcss: ^8.4.31 + style-to-object@2.0.2: + resolution: {integrity: sha512-QmbXPUylqU80HAgTOJeEOdbA40W9KtxmjMhQy+tq+b8F2aoh3aQLuy82hh2jm2qsC9hR9eI0+eQidTMydKcqRA==} - stylelint@16.26.1: - resolution: {integrity: sha512-v20V59/crfc8sVTAtge0mdafI3AdnzQ2KsWe6v523L4OA1bJO02S7MO2oyXDCS6iWb9ckIPnqAFVItqSBQr7jw==} - engines: {node: '>=18.12.0'} + stylelint@18.0.0: + resolution: {integrity: sha512-kI10GsHXQvsH/AcklVZdQgwDuxtHi+A+h1Ujzd7h9LDf3e5jQiLQkWFlPtpynX3E6oVWHG1wo9v6dL0Mr+nnSA==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} hasBin: true stylis@4.4.0: @@ -5477,26 +4671,14 @@ packages: resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==} engines: {node: '>=16'} - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} + supports-color@10.2.2: + resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} + engines: {node: '>=18'} supports-color@9.4.0: resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} engines: {node: '>=12'} - supports-hyperlinks@3.2.0: - resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==} - engines: {node: '>=14.18'} - - svg-tags@1.0.0: - resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==} - - svgo@3.3.5: - resolution: {integrity: sha512-8SQMzdrvWaD8deUmrnYB+ASyxBVgWUOilg+A75nE/76WdLpj6LopCwiAVvkzkcqy/9b7t2Mg7faFLjg0ZRcZ3w==} - engines: {node: '>=14.0.0'} - hasBin: true - svgo@4.1.0: resolution: {integrity: sha512-bkxnTg1kSU0guhIBmibA6UUhrQmPVA1XsQLN+ylCd+UWzbnLkySOcXpyk1mrl05f+pcaCx2eHb+sp6BgMZWX+Q==} engines: {node: '>=16'} @@ -5510,19 +4692,11 @@ packages: resolution: {integrity: sha512-U+/AXT6LWsxnj2vz9HeUuPWBNgdWxjyIEjEPdbJARC9txmgPzo2VEdqnFo4hHaNyMPtycyVJrSaQYeQv/PoyyA==} engines: {node: ^14.18.0 || >=16.0.0} - synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} - - table@6.9.0: - resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} - engines: {node: '>=10.0.0'} - tailwind-merge@3.6.0: resolution: {integrity: sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w==} - tailwindcss@4.3.3: - resolution: {integrity: sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==} + tailwindcss@4.3.5: + resolution: {integrity: sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ==} tapable@2.3.3: resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} @@ -5536,8 +4710,8 @@ packages: tiny-inflate@1.0.3: resolution: {integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==} - tinybench@6.2.2: - resolution: {integrity: sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==} + tinybench@6.2.3: + resolution: {integrity: sha512-Al01C2JIBnO2CXCAPbpAl6sUiOZHeThGtHYNTa51JRw9PyWOCdr+9Ong05R4qg/Sk3+H645E8ov1h2c58ityNw==} engines: {node: '>=20.0.0'} tinyclip@1.0.3: @@ -5552,8 +4726,8 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} - tinyps@0.5.1: - resolution: {integrity: sha512-B6Ykif5HflC3AdDkS4Zst/2muYVfeXoVMy+KorqH80s/1x4vunIORpNySH681X7fjj+dFM9MDKD6/Hsccjb87Q==} + tinyps@0.5.2: + resolution: {integrity: sha512-sYhvdbpuo2rGE7u/jPUMiZz4H2LCaOodUtRD9ot4DLNFQbr884g9zozoJnxLI+1r4hXqWkmdHUl8Yig2Rllxxw==} to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} @@ -5583,8 +4757,8 @@ packages: resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} engines: {node: '>=6.10'} - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tslib@2.9.1: + resolution: {integrity: sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==} tsm@2.3.0: resolution: {integrity: sha512-++0HFnmmR+gMpDtKTnW3XJ4yv9kVGi20n+NfyQWB9qwJvTaIWY9kBmzek2YUQK5APTQ/1DTrXmm4QtFPmW9Rzw==} @@ -5632,11 +4806,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} - engines: {node: '>=14.17'} - hasBin: true - typescript@6.0.3: resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} @@ -5651,26 +4820,23 @@ packages: uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} undici-types@7.18.2: resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} + undici-types@8.9.0: + resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} + undici@6.29.1: resolution: {integrity: sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==} engines: {node: '>=18.17'} - undici@8.12.3: - resolution: {integrity: sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==} + undici@8.12.4: + resolution: {integrity: sha512-8Mx+uNKKER2bA4AdtedkqRbwUCIJFr2nJckXRe5yrDqzePqwLP7VNcctN8/XdmDSbF7mS+jJKIszlL+vbam1VA==} engines: {node: '>=22.19.0'} - unherit@3.0.1: - resolution: {integrity: sha512-akOOQ/Yln8a2sgcLj4U0Jmx0R5jpIg2IUyRrWOzmEbjBtGzBdHtSeFKgoEcoH4KYIG/Pb8GQ/BwtYm0GCq1Sqg==} - unified-engine@11.2.2: resolution: {integrity: sha512-15g/gWE7qQl9tQ3nAEbMd5h9HV1EACtFs6N9xaRBZICoCwnNGbal1kOs++ICf4aiTdItZxU2s/kYWhW7htlqJg==} @@ -5683,39 +4849,21 @@ packages: unifont@1.0.3: resolution: {integrity: sha512-XGnEwj5sWdCbiBX01mWLSBncS0yMRjnLygau3IfdOlfjMacNIQvTGW4VH7pWBq+gGWArfSef/CensMLjMmIr/A==} - unist-util-find-after@5.0.0: - resolution: {integrity: sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==} - unist-util-inspect@8.1.0: resolution: {integrity: sha512-mOlg8Mp33pR0eeFpo5d2902ojqFFOKMMG2hF8bmH7ZlhnmjFgh0NI3/ZDwdaBJNbvrS7LZFVrBVtIE9KZ9s7vQ==} - unist-util-is@5.2.1: - resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} - unist-util-is@6.0.1: resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} - unist-util-modify-children@3.1.1: - resolution: {integrity: sha512-yXi4Lm+TG5VG+qvokP6tpnk+r1EPwyYL04JWDxLvgvPV40jANh7nm3udk65OOWquvbMDe+PL9+LmkxDpTv/7BA==} - unist-util-modify-children@4.0.0: resolution: {integrity: sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw==} - unist-util-position-from-estree@1.1.2: - resolution: {integrity: sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==} - unist-util-position-from-estree@2.0.0: resolution: {integrity: sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==} - unist-util-position@4.0.4: - resolution: {integrity: sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==} - unist-util-position@5.0.0: resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} - unist-util-remove-position@4.0.2: - resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} - unist-util-remove-position@5.0.0: resolution: {integrity: sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==} @@ -5728,23 +4876,14 @@ packages: unist-util-stringify-position@4.0.0: resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} - unist-util-visit-children@2.0.2: - resolution: {integrity: sha512-+LWpMFqyUwLGpsQxpumsQ9o9DG2VGLFrpz+rpVXYIEdPy57GSy5HioC0g3bg/8WP9oCLlapQtklOzQ8uLS496Q==} - unist-util-visit-children@3.0.0: resolution: {integrity: sha512-RgmdTfSBOg04sdPcpTSD1jzoNBjt9a80/ZCzp5cI9n1qPzLZWF9YdvWGN2zmTumP1HWhXKdUWexjy/Wy/lJ7tA==} - unist-util-visit-parents@5.1.3: - resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} - - unist-util-visit-parents@6.0.2: - resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} + unist-util-visit-parents@6.1.0: + resolution: {integrity: sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==} - unist-util-visit@4.1.2: - resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} - - unist-util-visit@5.1.0: - resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} + unist-util-visit@5.2.0: + resolution: {integrity: sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ==} unist-util-walker@1.0.0: resolution: {integrity: sha512-XxadVB7qdSH6LBwhyHozj1VltpnK9m3/Zt/E/WFLaEt9eRQ0RkbsUb0lP9e1anQCEOXxf4X3NYtZQSpzqzTptw==} @@ -5757,8 +4896,8 @@ packages: resolution: {integrity: sha512-xVToRh2CTmLk2HnEG7ac4rl1MJTT3RFkpS8B++/SnB0kXvuaavD+n3m/vrzyWQOdJNSZQACnbz01pnppbwV5BA==} engines: {node: '>=20.19.0'} - unstorage@1.17.5: - resolution: {integrity: sha512-0i3iqvRfx29hkNntHyQvJTpf5W9dQ9ZadSoRU8+xVlhVtT7jAX57fazYO9EHvcRCfBCyi5YRya7XCDOsbTgkPg==} + unstorage@1.17.6: + resolution: {integrity: sha512-gjKtcmn/KwZuJZO9o2sc0esAQnhmTw0LviDHwevTXbJMYs0dRTp8ZEEWXHU0vTpzbN3cA0yxlTeyXssMp3zDqw==} peerDependencies: '@azure/app-configuration': ^1.8.0 '@azure/cosmos': ^4.2.0 @@ -5768,7 +4907,7 @@ packages: '@azure/storage-blob': ^12.26.0 '@capacitor/preferences': ^6 || ^7 || ^8 '@deno/kv': '>=0.9.0' - '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 + '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 '@planetscale/database': ^1.19.0 '@upstash/redis': ^1.34.3 '@vercel/blob': '>=0.27.1' @@ -5819,8 +4958,8 @@ packages: uploadthing: optional: true - update-browserslist-db@1.3.3: - resolution: {integrity: sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ==} + update-browserslist-db@1.3.4: + resolution: {integrity: sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -5831,17 +4970,8 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - uuid@14.0.2: - resolution: {integrity: sha512-xZe/16rV4aa+HGSOCiY2YeLT1OybRLrrkL/Rqaq7p7GMVXjFh+6wN4oMYgjFmnSnhY8t6Xpdl2l9qmnHYuMHwQ==} - hasBin: true - - uvu@0.5.6: - resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} - engines: {node: '>=8'} - hasBin: true - - validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} validate-npm-package-name@5.0.1: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} @@ -5860,17 +4990,14 @@ packages: resolution: {integrity: sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==} engines: {node: '>=18.12.0'} - vfile-location@4.1.0: - resolution: {integrity: sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==} - - vfile-location@5.0.3: - resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==} + vfile-location@5.0.4: + resolution: {integrity: sha512-vEvxatYZCIpNvzGk2UD+u4I/sZkSKoOsdRCbkOIsN73QpJbriJ1qvvBAL1PeI0y55Leoqf7pORbaSPpG/smmOg==} vfile-message@3.1.4: resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} - vfile-message@4.0.3: - resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} + vfile-message@4.0.4: + resolution: {integrity: sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg==} vfile-reporter@8.1.1: resolution: {integrity: sha512-qxRZcnFSQt6pWKn3PAk81yLK2rO2i7CDXpy8v8ZquiEOMLSnPw6BMSi9Y1sUCwGGl7a9b3CJT1CKpnRF7pp66g==} @@ -5919,51 +5046,8 @@ packages: peerDependencies: vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 - vite@8.3.4: - resolution: {integrity: sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - peerDependencies: - '@types/node': ^20.19.0 || >=22.12.0 - '@vitejs/devtools': ^0.7.1 - esbuild: ^0.27.0 || ^0.28.0 - jiti: '>=1.21.0' - less: ^4.0.0 - sass: ^1.70.0 - sass-embedded: ^1.70.0 - stylus: '>=0.54.8' - sugarss: ^5.0.0 - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - '@types/node': - optional: true - '@vitejs/devtools': - optional: true - esbuild: - optional: true - jiti: - optional: true - less: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - tsx: - optional: true - yaml: - optional: true - - vite@8.3.5: - resolution: {integrity: sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==} + vite@8.3.6: + resolution: {integrity: sha512-UI7dK29NnS54Fk+mmo7o+jI6U8Fp7hDl+X5Q1k45WH+d4dSlbLVUETGQ+hfkNgvLQGyoElPj837nZyv4MBc0VA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -6013,20 +5097,20 @@ packages: vite: optional: true - vitest@5.0.5: - resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + vitest@5.1.0: + resolution: {integrity: sha512-MzmNFnrwa8v8lF1bLxw3UJ4EREwVOVb75VqJZmUDRjJ6EluK/x9th7qTbaeDk41WxE1GxWqmTXcdsfobfH5sOA==} engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 5.0.5 - '@vitest/browser-preview': 5.0.5 + '@vitest/browser-playwright': 5.1.0 + '@vitest/browser-preview': 5.1.0 '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 - '@vitest/coverage-istanbul': 5.0.5 - '@vitest/coverage-v8': 5.0.5 - '@vitest/ui': 5.0.5 + '@vitest/coverage-istanbul': 5.1.0 + '@vitest/coverage-v8': 5.1.0 + '@vitest/ui': 5.1.0 happy-dom: '*' jsdom: '*' vite: ^6.4.0 || ^7.0.0 || ^8.0.0 @@ -6149,9 +5233,6 @@ packages: vscode-nls@5.2.0: resolution: {integrity: sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==} - vscode-uri@3.1.0: - resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} - vscode-uri@3.2.0: resolution: {integrity: sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==} @@ -6166,14 +5247,14 @@ packages: '@vue/composition-api': optional: true - vue-eslint-parser@10.4.1: - resolution: {integrity: sha512-Gk6gRDj0n/fkRa3C3l0bBheoBckUq/Rs0F/TvMWIS6nzzx67amAViMe9CkNgsP2tXyQONvGiHQESHwFtZ3aYDA==} + vue-eslint-parser@10.4.2: + resolution: {integrity: sha512-WMpzulb50kb6snghzoGzS++62wcOszAk/piYcnvzdStM8Wni/BmogYltpoOFv2eK9hDbXxvwFQgnwZGpAoUfpA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - vue@3.5.44: - resolution: {integrity: sha512-dvvmaOCG7lAMkJTPqPwWeGMsPS6DIsFsfZDUgBp9V6mHf9b3+/wyVwYR4Es+WV6uJC0FKRxp81Obcq0ZwUcGFQ==} + vue@3.5.45: + resolution: {integrity: sha512-3cvsib8m9c0vB24+MDKsgcW4+Da4xaBl9Z/5Tbm2pmSIsRPxcil4cdXjXlVsmJ2g64XJo5h+IRd7rsdGT9pZaw==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -6190,10 +5271,6 @@ packages: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -6228,9 +5305,9 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - write-file-atomic@5.0.1: - resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + write-file-atomic@8.0.0: + resolution: {integrity: sha512-dYwyZredl67GyLLIHJnRM3h2PcOmN5SkcgC7eM5DPDEOEl6dLFqVrMg3F1Ea32usj4VSVZtd2H4MtKTNOf6nPg==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} wsl-utils@1.0.0: resolution: {integrity: sha512-Hl0ZOAs672vg+06kfujwRhoS6/jehvULrlFkuF2dRu6pHgA8U06h3xqNIqNNU1LTXPcedxByAR4GS6pwQK0mgA==} @@ -6259,11 +5336,6 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yaml@2.9.0: - resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} - engines: {node: '>= 14.6'} - hasBin: true - yaml@2.9.1: resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} engines: {node: '>= 14.6'} @@ -6293,9 +5365,6 @@ packages: zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} - zod@4.4.3: - resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} - zod@4.6.7: resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} @@ -6320,85 +5389,85 @@ snapshots: '@actions/io@3.0.2': {} - '@algolia/cache-browser-local-storage@4.25.3': + '@algolia/cache-browser-local-storage@4.27.0': dependencies: - '@algolia/cache-common': 4.25.3 + '@algolia/cache-common': 4.27.0 - '@algolia/cache-common@4.25.3': {} + '@algolia/cache-common@4.27.0': {} - '@algolia/cache-in-memory@4.25.3': + '@algolia/cache-in-memory@4.27.0': dependencies: - '@algolia/cache-common': 4.25.3 + '@algolia/cache-common': 4.27.0 - '@algolia/client-account@4.25.3': + '@algolia/client-account@4.27.0': dependencies: - '@algolia/client-common': 4.25.3 - '@algolia/client-search': 4.25.3 - '@algolia/transporter': 4.25.3 + '@algolia/client-common': 4.27.0 + '@algolia/client-search': 4.27.0 + '@algolia/transporter': 4.27.0 - '@algolia/client-analytics@4.25.3': + '@algolia/client-analytics@4.27.0': dependencies: - '@algolia/client-common': 4.25.3 - '@algolia/client-search': 4.25.3 - '@algolia/requester-common': 4.25.3 - '@algolia/transporter': 4.25.3 + '@algolia/client-common': 4.27.0 + '@algolia/client-search': 4.27.0 + '@algolia/requester-common': 4.27.0 + '@algolia/transporter': 4.27.0 - '@algolia/client-common@4.25.3': + '@algolia/client-common@4.27.0': dependencies: - '@algolia/requester-common': 4.25.3 - '@algolia/transporter': 4.25.3 + '@algolia/requester-common': 4.27.0 + '@algolia/transporter': 4.27.0 - '@algolia/client-personalization@4.25.3': + '@algolia/client-personalization@4.27.0': dependencies: - '@algolia/client-common': 4.25.3 - '@algolia/requester-common': 4.25.3 - '@algolia/transporter': 4.25.3 + '@algolia/client-common': 4.27.0 + '@algolia/requester-common': 4.27.0 + '@algolia/transporter': 4.27.0 - '@algolia/client-search@4.25.3': + '@algolia/client-search@4.27.0': dependencies: - '@algolia/client-common': 4.25.3 - '@algolia/requester-common': 4.25.3 - '@algolia/transporter': 4.25.3 + '@algolia/client-common': 4.27.0 + '@algolia/requester-common': 4.27.0 + '@algolia/transporter': 4.27.0 - '@algolia/logger-common@4.25.3': {} + '@algolia/logger-common@4.27.0': {} - '@algolia/logger-console@4.25.3': + '@algolia/logger-console@4.27.0': dependencies: - '@algolia/logger-common': 4.25.3 + '@algolia/logger-common': 4.27.0 - '@algolia/recommend@4.25.3': + '@algolia/recommend@4.27.0': dependencies: - '@algolia/cache-browser-local-storage': 4.25.3 - '@algolia/cache-common': 4.25.3 - '@algolia/cache-in-memory': 4.25.3 - '@algolia/client-common': 4.25.3 - '@algolia/client-search': 4.25.3 - '@algolia/logger-common': 4.25.3 - '@algolia/logger-console': 4.25.3 - '@algolia/requester-browser-xhr': 4.25.3 - '@algolia/requester-common': 4.25.3 - '@algolia/requester-node-http': 4.25.3 - '@algolia/transporter': 4.25.3 + '@algolia/cache-browser-local-storage': 4.27.0 + '@algolia/cache-common': 4.27.0 + '@algolia/cache-in-memory': 4.27.0 + '@algolia/client-common': 4.27.0 + '@algolia/client-search': 4.27.0 + '@algolia/logger-common': 4.27.0 + '@algolia/logger-console': 4.27.0 + '@algolia/requester-browser-xhr': 4.27.0 + '@algolia/requester-common': 4.27.0 + '@algolia/requester-node-http': 4.27.0 + '@algolia/transporter': 4.27.0 - '@algolia/requester-browser-xhr@4.25.3': + '@algolia/requester-browser-xhr@4.27.0': dependencies: - '@algolia/requester-common': 4.25.3 + '@algolia/requester-common': 4.27.0 - '@algolia/requester-common@4.25.3': {} + '@algolia/requester-common@4.27.0': {} - '@algolia/requester-node-http@4.25.3': + '@algolia/requester-node-http@4.27.0': dependencies: - '@algolia/requester-common': 4.25.3 + '@algolia/requester-common': 4.27.0 - '@algolia/transporter@4.25.3': + '@algolia/transporter@4.27.0': dependencies: - '@algolia/cache-common': 4.25.3 - '@algolia/logger-common': 4.25.3 - '@algolia/requester-common': 4.25.3 + '@algolia/cache-common': 4.27.0 + '@algolia/logger-common': 4.27.0 + '@algolia/requester-common': 4.27.0 '@antfu/install-pkg@2.1.0': dependencies: - package-manager-detector: 1.8.0 + package-manager-detector: 1.9.0 tinyexec: 1.3.1 '@astrojs/astro2tsx@0.1.3(@emnapi/runtime@1.11.3)': @@ -6408,12 +5477,12 @@ snapshots: transitivePeerDependencies: - '@emnapi/runtime' - '@astrojs/check@0.9.12(@emnapi/runtime@1.11.3)(prettier-plugin-astro@0.8.1)(prettier@2.8.8)(typescript@5.9.3)': + '@astrojs/check@0.9.12(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.2(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3)': dependencies: - '@astrojs/language-server': 2.17.3(@emnapi/runtime@1.11.3)(prettier-plugin-astro@0.8.1)(prettier@2.8.8)(typescript@5.9.3) + '@astrojs/language-server': 2.17.3(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.2(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3) chokidar: 5.0.0 kleur: 4.1.5 - typescript: 5.9.3 + typescript: 6.0.3 yargs: 18.2.0 transitivePeerDependencies: - '@emnapi/runtime' @@ -6445,7 +5514,7 @@ snapshots: dependencies: '@emnapi/core': 1.11.3 '@emnapi/runtime': 1.11.3 - '@napi-rs/wasm-runtime': 1.2.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + '@napi-rs/wasm-runtime': 1.2.7(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) optional: true '@astrojs/compiler-binding-win32-arm64-msvc@0.5.2': @@ -6471,160 +5540,85 @@ snapshots: dependencies: '@astrojs/compiler-binding': 0.5.2 - '@astrojs/compiler@1.8.2': {} - - '@astrojs/compiler@2.13.1': {} - - '@astrojs/internal-helpers@0.10.2': - dependencies: - '@types/hast': 3.0.5 - '@types/mdast': 4.0.4 - js-yaml: 4.3.2 - picomatch: 4.0.7 - retext-smartypants: 6.2.0 - shiki: 4.4.3 - smol-toml: 1.8.0 - unified: 11.0.5 - - '@astrojs/internal-helpers@0.10.3': - dependencies: - '@types/hast': 3.0.5 - '@types/mdast': 4.0.4 - js-yaml: 4.3.2 - picomatch: 4.0.7 - retext-smartypants: 6.2.0 - shiki: 4.5.0 - smol-toml: 1.9.1 - unified: 11.0.5 - optional: true - - '@astrojs/internal-helpers@0.13.0': + '@astrojs/internal-helpers@0.13.1': dependencies: '@types/hast': 3.0.5 '@types/mdast': 4.0.4 picomatch: 4.0.7 retext-smartypants: 6.2.0 - shiki: 4.5.0 + shiki: 4.6.0 smol-toml: 1.9.1 unified: 11.0.5 yaml: 2.9.1 - '@astrojs/language-server@2.17.3(@emnapi/runtime@1.11.3)(prettier-plugin-astro@0.8.1)(prettier@2.8.8)(typescript@5.9.3)': + '@astrojs/language-server@2.17.3(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.2(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3)': dependencies: '@astrojs/astro2tsx': 0.1.3(@emnapi/runtime@1.11.3) '@astrojs/yaml2ts': 0.2.4 - '@volar/kit': 2.4.28(typescript@5.9.3) + '@volar/kit': 2.4.28(typescript@6.0.3) '@volar/language-core': 2.4.28 - '@volar/language-server': 2.4.28(typescript@5.9.3) - '@volar/language-service': 2.4.28(typescript@5.9.3) + '@volar/language-server': 2.4.28(typescript@6.0.3) + '@volar/language-service': 2.4.28(typescript@6.0.3) muggle-string: 0.4.1 tinyglobby: 0.2.17 - volar-service-css: 0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)) - volar-service-emmet: 0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)) - volar-service-html: 0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)) - volar-service-prettier: 0.0.71(@volar/language-service@2.4.28(typescript@5.9.3))(prettier@2.8.8) - volar-service-typescript: 0.0.71(@volar/language-service@2.4.28(typescript@5.9.3))(typescript@5.9.3) - volar-service-typescript-twoslash-queries: 0.0.71(@volar/language-service@2.4.28(typescript@5.9.3))(typescript@5.9.3) - volar-service-yaml: 0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)) + volar-service-css: 0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)) + volar-service-emmet: 0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)) + volar-service-html: 0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)) + volar-service-prettier: 0.0.71(@volar/language-service@2.4.28(typescript@6.0.3))(prettier@3.9.10) + volar-service-typescript: 0.0.71(@volar/language-service@2.4.28(typescript@6.0.3))(typescript@6.0.3) + volar-service-typescript-twoslash-queries: 0.0.71(@volar/language-service@2.4.28(typescript@6.0.3))(typescript@6.0.3) + volar-service-yaml: 0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)) vscode-html-languageservice: 5.6.2 vscode-uri: 3.2.0 optionalDependencies: - prettier: 2.8.8 - prettier-plugin-astro: 0.8.1 + prettier: 3.9.10 + prettier-plugin-astro: 1.1.2(prettier@3.9.10) transitivePeerDependencies: - '@emnapi/runtime' - typescript - '@astrojs/markdown-remark@7.2.2(supports-color@9.4.0)': - dependencies: - '@astrojs/internal-helpers': 0.10.2 - '@astrojs/prism': 4.0.2 - github-slugger: 2.0.0 - hast-util-from-html: 2.0.3 - hast-util-to-text: 4.0.2 - mdast-util-definitions: 6.0.0 - rehype-raw: 7.0.0 - rehype-stringify: 10.0.1 - remark-gfm: 4.0.1(supports-color@9.4.0) - remark-parse: 11.0.0(supports-color@9.4.0) - remark-rehype: 11.1.2 - remark-smartypants: 3.0.2 - unified: 11.0.5 - unist-util-remove-position: 5.0.0 - unist-util-visit: 5.1.0 - unist-util-visit-parents: 6.0.2 - vfile: 6.0.3 - transitivePeerDependencies: - - supports-color - - '@astrojs/markdown-remark@7.3.5(supports-color@9.4.0)': + '@astrojs/markdown-remark@7.3.6(supports-color@10.2.2)': dependencies: - '@astrojs/internal-helpers': 0.13.0 + '@astrojs/internal-helpers': 0.13.1 '@astrojs/prism': 4.1.2 - '@mdx-js/mdx': 3.1.1(supports-color@9.4.0) + '@mdx-js/mdx': 3.1.1(supports-color@10.2.2) acorn: 8.19.0 estree-util-visit: 2.0.0 github-slugger: 2.0.0 - hast-util-from-html: 2.0.3 - hast-util-to-html: 9.0.5 - hast-util-to-text: 4.0.2 + hast-util-from-html: 2.1.0 + hast-util-to-html: 9.0.6 + hast-util-to-text: 4.0.3 mdast-util-definitions: 6.0.0 rehype-raw: 7.0.0 rehype-stringify: 10.0.1 - remark-gfm: 4.0.1(supports-color@9.4.0) - remark-parse: 11.0.0(supports-color@9.4.0) + remark-gfm: 4.0.1(supports-color@10.2.2) + remark-parse: 11.0.0(supports-color@10.2.2) remark-rehype: 11.1.2 remark-smartypants: 3.0.3 source-map: 0.8.0 unified: 11.0.5 unist-util-remove-position: 5.0.0 - unist-util-visit: 5.1.0 - unist-util-visit-parents: 6.0.2 + unist-util-visit: 5.2.0 + unist-util-visit-parents: 6.1.0 vfile: 6.0.3 transitivePeerDependencies: - supports-color - '@astrojs/markdown-satteri@0.3.6': - dependencies: - '@astrojs/internal-helpers': 0.10.3 - '@astrojs/prism': 4.0.2 - github-slugger: 2.0.0 - hast-util-from-html: 2.0.3 - satteri: 0.9.5 - optional: true - - '@astrojs/markdown-satteri@0.4.6': + '@astrojs/markdown-satteri@0.4.7': dependencies: - '@astrojs/internal-helpers': 0.13.0 + '@astrojs/internal-helpers': 0.13.1 '@astrojs/prism': 4.1.2 github-slugger: 2.0.0 - satteri: 0.10.5 + satteri: 0.11.7 - '@astrojs/mdx@7.0.5(@astrojs/markdown-satteri@0.3.6)(astro@7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(supports-color@9.4.0)': + '@astrojs/mdx@8.1.3(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@astrojs/markdown-satteri@0.4.7)(astro@7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': dependencies: - '@astrojs/internal-helpers': 0.10.2 - '@astrojs/markdown-remark': 7.2.2(supports-color@9.4.0) - '@mdx-js/mdx': 3.1.1(supports-color@9.4.0) - acorn: 8.18.0 - astro: 7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - es-module-lexer: 2.3.2 - estree-util-visit: 2.0.0 - hast-util-to-html: 9.0.5 - piccolore: 0.1.3 - rehype-raw: 7.0.0 - remark-gfm: 4.0.1(supports-color@9.4.0) - remark-smartypants: 3.0.2 - source-map: 0.7.6 - unist-util-visit: 5.1.0 - vfile: 6.0.3 + '@astrojs/internal-helpers': 0.13.1 + '@astrojs/markdown-satteri': 0.4.7 + astro: 7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + es-module-lexer: 3.0.4 optionalDependencies: - '@astrojs/markdown-satteri': 0.3.6 - transitivePeerDependencies: - - supports-color - - '@astrojs/prism@4.0.2': - dependencies: - prismjs: 1.30.0 + '@astrojs/markdown-remark': 7.3.6(supports-color@10.2.2) '@astrojs/prism@4.1.2': dependencies: @@ -6633,7 +5627,7 @@ snapshots: '@astrojs/sitemap@3.7.4': dependencies: sitemap: 9.0.1 - zod: 4.4.3 + zod: 4.6.7 '@astrojs/telemetry@3.4.2': dependencies: @@ -6642,15 +5636,15 @@ snapshots: is-docker: 4.0.0 package-manager-detector: 1.9.0 - '@astrojs/vue@7.1.2(@types/node@18.19.130)(astro@7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(supports-color@9.4.0)(terser@5.51.2)(tsx@4.23.15)(vue@3.5.44(typescript@5.9.3))(yaml@2.9.1)': + '@astrojs/vue@7.1.2(@types/node@26.6.6)(astro@7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(supports-color@10.2.2)(terser@5.51.2)(tsx@4.23.15)(vue@3.5.45(typescript@6.0.3))(yaml@2.9.1)': dependencies: - '@vitejs/plugin-vue': 6.0.10(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3)) - '@vitejs/plugin-vue-jsx': 5.1.6(supports-color@9.4.0)(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3)) - '@vue/compiler-sfc': 3.5.44 - astro: 7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vite-plugin-vue-devtools: 8.2.1(supports-color@9.4.0)(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3)) - vue: 3.5.44(typescript@5.9.3) + '@vitejs/plugin-vue': 6.0.10(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.45(typescript@6.0.3)) + '@vitejs/plugin-vue-jsx': 5.1.6(supports-color@10.2.2)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.45(typescript@6.0.3)) + '@vue/compiler-sfc': 3.5.45 + astro: 7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite-plugin-vue-devtools: 8.2.1(supports-color@10.2.2)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.45(typescript@6.0.3)) + vue: 3.5.45(typescript@6.0.3) transitivePeerDependencies: - '@nuxt/kit' - '@types/node' @@ -6669,49 +5663,29 @@ snapshots: '@astrojs/yaml2ts@0.2.4': dependencies: - yaml: 2.9.0 + yaml: 2.9.1 - '@aziontech/icons@4.3.0': {} + '@aziontech/icons@4.4.0': {} '@aziontech/theme@4.3.1': {} - '@aziontech/theme@5.2.0': {} - - '@aziontech/webkit@5.3.0(patch_hash=2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9)(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.9.3))(supports-color@9.4.0)(vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0))(vue@3.5.44(typescript@5.9.3))': - dependencies: - '@aziontech/theme': 4.3.1 - '@modelcontextprotocol/sdk': 1.32.1(supports-color@9.4.0)(zod@3.25.76) - '@tanstack/vue-table': 8.21.3(vue@3.5.44(typescript@5.9.3)) - '@vueuse/core': 10.11.1(vue@3.5.44(typescript@5.9.3)) - clsx: 2.1.1 - tailwind-merge: 3.6.0 - vee-validate: 4.15.1(vue@3.5.44(typescript@5.9.3)) - vue: 3.5.44(typescript@5.9.3) - zod: 3.25.76 - optionalDependencies: - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - stylelint: 16.26.1(supports-color@7.2.0)(typescript@5.9.3) - vue-eslint-parser: 10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0) - transitivePeerDependencies: - - '@cfworker/json-schema' - - '@vue/composition-api' - - supports-color + '@aziontech/theme@5.2.2': {} - '@aziontech/webkit@5.3.0(patch_hash=2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9)(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(stylelint@16.26.1(supports-color@9.4.0)(typescript@5.9.3))(supports-color@9.4.0)(vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0))(vue@3.5.44(typescript@5.9.3))': + '@aziontech/webkit@5.3.0(patch_hash=2a96310f7158727c08be8de8866d7cddfd458a351bb1c132b9ebf2494f6941a9)(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(stylelint@18.0.0)(supports-color@10.2.2)(vue-eslint-parser@10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(vue@3.5.45(typescript@6.0.3))': dependencies: '@aziontech/theme': 4.3.1 - '@modelcontextprotocol/sdk': 1.32.1(supports-color@9.4.0)(zod@3.25.76) - '@tanstack/vue-table': 8.21.3(vue@3.5.44(typescript@5.9.3)) - '@vueuse/core': 10.11.1(vue@3.5.44(typescript@5.9.3)) + '@modelcontextprotocol/sdk': 1.32.1(supports-color@10.2.2)(zod@3.25.76) + '@tanstack/vue-table': 8.21.3(vue@3.5.45(typescript@6.0.3)) + '@vueuse/core': 10.11.1(vue@3.5.45(typescript@6.0.3)) clsx: 2.1.1 tailwind-merge: 3.6.0 - vee-validate: 4.15.1(vue@3.5.44(typescript@5.9.3)) - vue: 3.5.44(typescript@5.9.3) + vee-validate: 4.15.1(vue@3.5.45(typescript@6.0.3)) + vue: 3.5.45(typescript@6.0.3) zod: 3.25.76 optionalDependencies: - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - stylelint: 16.26.1(supports-color@9.4.0)(typescript@5.9.3) - vue-eslint-parser: 10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + stylelint: 18.0.0 + vue-eslint-parser: 10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) transitivePeerDependencies: - '@cfworker/json-schema' - '@vue/composition-api' @@ -6725,20 +5699,20 @@ snapshots: '@babel/compat-data@7.29.7': {} - '@babel/core@7.29.6(supports-color@9.4.0)': + '@babel/core@7.29.6(supports-color@10.2.2)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 '@babel/helper-compilation-targets': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) '@babel/helpers': 7.29.7 - '@babel/parser': 7.29.11 + '@babel/parser': 7.29.13 '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) '@babel/types': 7.29.11 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -6747,7 +5721,7 @@ snapshots: '@babel/generator@7.29.7': dependencies: - '@babel/parser': 7.29.11 + '@babel/parser': 7.29.13 '@babel/types': 7.29.11 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 @@ -6761,45 +5735,45 @@ snapshots: dependencies: '@babel/compat-data': 7.29.7 '@babel/helper-validator-option': 7.29.7 - browserslist: 4.29.3 + browserslist: 4.29.5 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@9.4.0) + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@10.2.2) '@babel/helper-optimise-call-expression': 7.29.7 - '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@9.4.0) - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@10.2.2) + '@babel/traverse': 7.29.7(supports-color@10.2.2) semver: 6.3.1 transitivePeerDependencies: - supports-color '@babel/helper-globals@7.29.7': {} - '@babel/helper-member-expression-to-functions@7.29.7(supports-color@9.4.0)': + '@babel/helper-member-expression-to-functions@7.29.7(supports-color@10.2.2)': dependencies: - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) '@babel/types': 7.29.11 transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.29.7(supports-color@9.4.0)': + '@babel/helper-module-imports@7.29.7(supports-color@10.2.2)': dependencies: - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) '@babel/types': 7.29.11 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) - '@babel/helper-module-imports': 7.29.7(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) + '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) transitivePeerDependencies: - supports-color @@ -6809,23 +5783,23 @@ snapshots: '@babel/helper-plugin-utils@7.29.7': {} - '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) - '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@10.2.2) '@babel/helper-optimise-call-expression': 7.29.7 - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.29.7(supports-color@9.4.0)': + '@babel/helper-skip-transparent-expression-wrappers@7.29.7(supports-color@10.2.2)': dependencies: - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) '@babel/types': 7.29.11 transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.29.11': {} + '@babel/helper-string-parser@7.29.13': {} '@babel/helper-string-parser@8.0.8': {} @@ -6840,145 +5814,120 @@ snapshots: '@babel/template': 7.29.7 '@babel/types': 7.29.11 - '@babel/parser@7.29.11': + '@babel/parser@7.29.13': dependencies: '@babel/types': 7.29.11 - '@babel/plugin-proposal-decorators@7.28.0(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@babel/plugin-proposal-decorators@7.28.0(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-decorators': 7.27.1(@babel/core@7.29.6(supports-color@9.4.0)) + '@babel/plugin-syntax-decorators': 7.27.1(@babel/core@7.29.6(supports-color@10.2.2)) transitivePeerDependencies: - supports-color - '@babel/plugin-syntax-decorators@7.27.1(@babel/core@7.29.6(supports-color@9.4.0))': + '@babel/plugin-syntax-decorators@7.27.1(@babel/core@7.29.6(supports-color@10.2.2))': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.29.6(supports-color@9.4.0))': + '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.29.6(supports-color@10.2.2))': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.29.6(supports-color@9.4.0))': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.29.6(supports-color@10.2.2))': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.29.6(supports-color@9.4.0))': + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.29.6(supports-color@10.2.2))': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.6(supports-color@9.4.0))': + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.6(supports-color@10.2.2))': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@9.4.0) - '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0)) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@10.2.2) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2)) transitivePeerDependencies: - supports-color '@babel/template@7.29.7': dependencies: '@babel/code-frame': 7.29.7 - '@babel/parser': 7.29.11 + '@babel/parser': 7.29.13 '@babel/types': 7.29.11 - '@babel/traverse@7.29.7(supports-color@9.4.0)': + '@babel/traverse@7.29.7(supports-color@10.2.2)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 '@babel/helper-globals': 7.29.7 - '@babel/parser': 7.29.11 + '@babel/parser': 7.29.13 '@babel/template': 7.29.7 '@babel/types': 7.29.11 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) transitivePeerDependencies: - supports-color '@babel/types@7.29.11': dependencies: - '@babel/helper-string-parser': 7.29.11 + '@babel/helper-string-parser': 7.29.13 '@babel/helper-validator-identifier': 7.29.7 - '@babel/types@8.0.8': + '@babel/types@8.1.0': dependencies: '@babel/helper-string-parser': 8.0.8 '@babel/helper-validator-identifier': 8.0.6 '@braintree/sanitize-url@7.1.2': {} - '@bruits/satteri-darwin-arm64@0.10.5': - optional: true - - '@bruits/satteri-darwin-arm64@0.9.5': - optional: true - - '@bruits/satteri-darwin-x64@0.10.5': + '@bruits/satteri-android-arm64@0.11.7': optional: true - '@bruits/satteri-darwin-x64@0.9.5': + '@bruits/satteri-darwin-arm64@0.11.7': optional: true - '@bruits/satteri-linux-arm64-gnu@0.10.5': + '@bruits/satteri-darwin-x64@0.11.7': optional: true - '@bruits/satteri-linux-arm64-gnu@0.9.5': + '@bruits/satteri-freebsd-x64@0.11.7': optional: true - '@bruits/satteri-linux-arm64-musl@0.10.5': + '@bruits/satteri-linux-arm64-gnu@0.11.7': optional: true - '@bruits/satteri-linux-arm64-musl@0.9.5': + '@bruits/satteri-linux-arm64-musl@0.11.7': optional: true - '@bruits/satteri-linux-x64-gnu@0.10.5': + '@bruits/satteri-linux-x64-gnu@0.11.7': optional: true - '@bruits/satteri-linux-x64-gnu@0.9.5': - optional: true - - '@bruits/satteri-linux-x64-musl@0.10.5': - optional: true - - '@bruits/satteri-linux-x64-musl@0.9.5': - optional: true - - '@bruits/satteri-wasm32-wasi@0.10.5': - dependencies: - '@emnapi/core': 1.11.1 - '@emnapi/runtime': 1.11.1 - '@napi-rs/wasm-runtime': 1.2.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + '@bruits/satteri-linux-x64-musl@0.11.7': optional: true - '@bruits/satteri-wasm32-wasi@0.9.5': + '@bruits/satteri-wasm32-wasi@0.11.7': dependencies: '@emnapi/core': 1.11.1 '@emnapi/runtime': 1.11.1 - '@napi-rs/wasm-runtime': 1.2.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) - optional: true - - '@bruits/satteri-win32-arm64-msvc@0.10.5': - optional: true - - '@bruits/satteri-win32-arm64-msvc@0.9.5': + '@napi-rs/wasm-runtime': 1.2.7(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) optional: true - '@bruits/satteri-win32-x64-msvc@0.10.5': + '@bruits/satteri-win32-arm64-msvc@0.11.7': optional: true - '@bruits/satteri-win32-x64-msvc@0.9.5': + '@bruits/satteri-win32-x64-msvc@0.11.7': optional: true '@cacheable/memory@2.2.0': @@ -7024,24 +5973,35 @@ snapshots: fast-wrap-ansi: 0.2.2 sisteransi: 1.0.5 - '@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4)': + '@colordx/core@7.3.0': {} + + '@csstools/css-calc@3.4.3(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2)': + dependencies: + '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) + '@csstools/css-tokenizer': 4.0.2 + + '@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2)': dependencies: - '@csstools/css-tokenizer': 3.0.4 + '@csstools/css-tokenizer': 4.0.2 - '@csstools/css-syntax-patches-for-csstree@1.1.12(css-tree@3.1.0)': + '@csstools/css-syntax-patches-for-csstree@1.1.16(css-tree@3.2.1)': optionalDependencies: - css-tree: 3.1.0 + css-tree: 3.2.1 - '@csstools/css-tokenizer@3.0.4': {} + '@csstools/css-tokenizer@4.0.2': {} - '@csstools/media-query-list-parser@4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': + '@csstools/media-query-list-parser@5.0.2(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2)': dependencies: - '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) - '@csstools/css-tokenizer': 3.0.4 + '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) + '@csstools/css-tokenizer': 4.0.2 - '@csstools/selector-specificity@5.0.0(postcss-selector-parser@7.1.5)': + '@csstools/selector-resolve-nested@4.0.2(postcss-selector-parser@7.1.7)': dependencies: - postcss-selector-parser: 7.1.5 + postcss-selector-parser: 7.1.7 + + '@csstools/selector-specificity@6.0.1(postcss-selector-parser@7.1.7)': + dependencies: + postcss-selector-parser: 7.1.7 '@dual-bundle/import-meta-resolve@4.2.1': {} @@ -7079,31 +6039,31 @@ snapshots: '@emnapi/core@1.11.1': dependencies: '@emnapi/wasi-threads': 1.2.2 - tslib: 2.8.1 + tslib: 2.9.1 optional: true '@emnapi/core@1.11.3': dependencies: '@emnapi/wasi-threads': 1.2.3 - tslib: 2.8.1 + tslib: 2.9.1 '@emnapi/runtime@1.11.1': dependencies: - tslib: 2.8.1 + tslib: 2.9.1 optional: true '@emnapi/runtime@1.11.3': dependencies: - tslib: 2.8.1 + tslib: 2.9.1 '@emnapi/wasi-threads@1.2.2': dependencies: - tslib: 2.8.1 + tslib: 2.9.1 optional: true '@emnapi/wasi-threads@1.2.3': dependencies: - tslib: 2.8.1 + tslib: 2.9.1 '@esbuild/aix-ppc64@0.28.2': optional: true @@ -7189,22 +6149,17 @@ snapshots: '@esbuild/win32-x64@0.28.2': optional: true - '@eslint-community/eslint-utils@4.10.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))': - dependencies: - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - eslint-visitor-keys: 3.4.3 - - '@eslint-community/eslint-utils@4.9.0(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))': + '@eslint-community/eslint-utils@4.10.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))': dependencies: - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.12.2': {} + '@eslint-community/regexpp@4.12.3': {} - '@eslint/config-array@0.23.5(supports-color@9.4.0)': + '@eslint/config-array@0.23.5(supports-color@10.2.2)': dependencies: '@eslint/object-schema': 3.0.5 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) minimatch: 10.2.6 transitivePeerDependencies: - supports-color @@ -7217,9 +6172,9 @@ snapshots: dependencies: '@types/json-schema': 7.0.15 - '@eslint/js@10.0.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))': + '@eslint/js@10.0.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))': optionalDependencies: - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) '@eslint/object-schema@3.0.5': {} @@ -7366,7 +6321,7 @@ snapshots: dependencies: string-width: 5.1.2 string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 strip-ansi-cjs: strip-ansi@6.0.1 wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 @@ -7389,8 +6344,6 @@ snapshots: '@jridgewell/trace-mapping': 0.3.31 optional: true - '@jridgewell/sourcemap-codec@1.5.5': {} - '@jridgewell/sourcemap-codec@1.6.0': {} '@jridgewell/trace-mapping@0.3.31': @@ -7406,40 +6359,40 @@ snapshots: '@keyv/serialize@1.1.1': {} - '@kwsites/file-exists@1.1.1(supports-color@9.4.0)': + '@kwsites/file-exists@1.1.1(supports-color@10.2.2)': dependencies: - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) transitivePeerDependencies: - supports-color '@kwsites/promise-deferred@1.1.1': {} - '@mdx-js/mdx@3.1.1(supports-color@9.4.0)': + '@mdx-js/mdx@3.1.1(supports-color@10.2.2)': dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 - '@types/mdx': 2.0.13 - acorn: 8.18.0 + '@types/mdx': 2.0.14 + acorn: 8.19.0 collapse-white-space: 2.1.0 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 - estree-util-scope: 1.0.0 + estree-util-scope: 1.0.1 estree-walker: 3.0.3 - hast-util-to-jsx-runtime: 2.3.6(supports-color@9.4.0) + hast-util-to-jsx-runtime: 2.3.7(supports-color@10.2.2) markdown-extensions: 2.0.0 recma-build-jsx: 1.0.0 - recma-jsx: 1.0.1(acorn@8.18.0) + recma-jsx: 1.0.1(acorn@8.19.0) recma-stringify: 1.0.0 - rehype-recma: 1.0.0(supports-color@9.4.0) - remark-mdx: 3.1.1(supports-color@9.4.0) - remark-parse: 11.0.0(supports-color@9.4.0) + rehype-recma: 1.0.0(supports-color@10.2.2) + remark-mdx: 3.1.1(supports-color@10.2.2) + remark-parse: 11.0.0(supports-color@10.2.2) remark-rehype: 11.1.2 source-map: 0.7.6 unified: 11.0.5 unist-util-position-from-estree: 2.0.0 unist-util-stringify-position: 4.0.0 - unist-util-visit: 5.1.0 + unist-util-visit: 5.2.0 vfile: 6.0.3 transitivePeerDependencies: - supports-color @@ -7448,7 +6401,7 @@ snapshots: dependencies: '@chevrotain/types': 13.2.0 - '@modelcontextprotocol/sdk@1.32.1(supports-color@9.4.0)(zod@3.25.76)': + '@modelcontextprotocol/sdk@1.32.1(supports-color@10.2.2)(zod@3.25.76)': dependencies: '@hono/node-server': 2.1.1(hono@4.13.3) ajv: 8.17.1 @@ -7458,8 +6411,8 @@ snapshots: cross-spawn: 7.0.6 eventsource: 3.0.7 eventsource-parser: 3.0.6 - express: 5.2.1(supports-color@9.4.0) - express-rate-limit: 8.6.2(express@5.2.1(supports-color@9.4.0))(supports-color@9.4.0) + express: 5.2.1(supports-color@10.2.2) + express-rate-limit: 8.6.2(express@5.2.1(supports-color@10.2.2))(supports-color@10.2.2) hono: 4.13.3 jose: 6.2.9 json-schema-typed: 8.0.2 @@ -7470,24 +6423,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@napi-rs/wasm-runtime@1.2.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': - dependencies: - '@emnapi/core': 1.11.1 - '@emnapi/runtime': 1.11.1 - '@tybys/wasm-util': 0.10.3 - optional: true - '@napi-rs/wasm-runtime@1.2.4(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': dependencies: '@emnapi/core': 1.11.3 '@emnapi/runtime': 1.11.3 - '@tybys/wasm-util': 0.10.3 + '@tybys/wasm-util': 0.10.4 + + '@napi-rs/wasm-runtime@1.2.7(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.4 + optional: true - '@napi-rs/wasm-runtime@1.2.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': + '@napi-rs/wasm-runtime@1.2.7(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': dependencies: '@emnapi/core': 1.11.3 '@emnapi/runtime': 1.11.3 - '@tybys/wasm-util': 0.10.3 + '@tybys/wasm-util': 0.10.4 optional: true '@nodelib/fs.scandir@2.1.5': @@ -7510,7 +6463,7 @@ snapshots: ini: 4.1.3 nopt: 7.2.1 proc-log: 4.2.0 - semver: 7.8.5 + semver: 7.8.6 walk-up-path: 3.0.1 transitivePeerDependencies: - bluebird @@ -7524,7 +6477,7 @@ snapshots: proc-log: 4.2.0 promise-inflight: 1.0.1 promise-retry: 2.0.1 - semver: 7.8.5 + semver: 7.8.6 which: 4.0.0 transitivePeerDependencies: - bluebird @@ -7546,7 +6499,7 @@ snapshots: json-parse-even-better-errors: 3.0.2 normalize-package-data: 6.0.2 proc-log: 4.2.0 - semver: 7.8.5 + semver: 7.8.6 transitivePeerDependencies: - bluebird @@ -7558,7 +6511,7 @@ snapshots: '@oslojs/encoding@1.1.0': {} - '@oxc-project/types@0.154.0': {} + '@oxc-project/types@0.156.0': {} '@parcel/watcher-android-arm64@2.6.0': optional: true @@ -7620,136 +6573,98 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@pkgr/core@0.1.2': {} - '@pkgr/core@0.3.6': {} '@polka/url@1.0.0-next.29': {} - '@rolldown/binding-android-arm-eabi@1.2.14': + '@prettier/parse-srcset@3.1.0': {} + + '@rolldown/binding-android-arm-eabi@1.2.16': optional: true - '@rolldown/binding-android-arm64@1.2.14': + '@rolldown/binding-android-arm64@1.2.16': optional: true - '@rolldown/binding-darwin-arm64@1.2.14': + '@rolldown/binding-darwin-arm64@1.2.16': optional: true - '@rolldown/binding-darwin-x64@1.2.14': + '@rolldown/binding-darwin-x64@1.2.16': optional: true - '@rolldown/binding-freebsd-x64@1.2.14': + '@rolldown/binding-freebsd-x64@1.2.16': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.2.14': + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': optional: true - '@rolldown/binding-linux-arm64-gnu@1.2.14': + '@rolldown/binding-linux-arm64-gnu@1.2.16': optional: true - '@rolldown/binding-linux-arm64-musl@1.2.14': + '@rolldown/binding-linux-arm64-musl@1.2.16': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.2.14': + '@rolldown/binding-linux-ppc64-gnu@1.2.16': optional: true - '@rolldown/binding-linux-s390x-gnu@1.2.14': + '@rolldown/binding-linux-s390x-gnu@1.2.16': optional: true - '@rolldown/binding-linux-x64-gnu@1.2.14': + '@rolldown/binding-linux-x64-gnu@1.2.16': optional: true - '@rolldown/binding-linux-x64-musl@1.2.14': + '@rolldown/binding-linux-x64-musl@1.2.16': optional: true - '@rolldown/binding-openharmony-arm64@1.2.14': + '@rolldown/binding-openharmony-arm64@1.2.16': optional: true - '@rolldown/binding-win32-arm64-msvc@1.2.14': + '@rolldown/binding-win32-arm64-msvc@1.2.16': optional: true - '@rolldown/binding-win32-x64-msvc@1.2.14': + '@rolldown/binding-win32-x64-msvc@1.2.16': optional: true '@rolldown/pluginutils@1.0.1': {} - '@shikijs/core@4.4.3': - dependencies: - '@shikijs/primitive': 4.4.3 - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 - hast-util-to-html: 9.0.5 - - '@shikijs/core@4.5.0': + '@shikijs/core@4.6.0': dependencies: - '@shikijs/primitive': 4.5.0 - '@shikijs/types': 4.5.0 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/primitive': 4.6.0 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 - hast-util-to-html: 9.0.5 - - '@shikijs/engine-javascript@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - oniguruma-to-es: 4.3.6 + hast-util-to-html: 9.0.6 - '@shikijs/engine-javascript@4.5.0': + '@shikijs/engine-javascript@4.6.0': dependencies: - '@shikijs/types': 4.5.0 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 oniguruma-to-es: 4.3.6 - '@shikijs/engine-oniguruma@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - - '@shikijs/engine-oniguruma@4.5.0': - dependencies: - '@shikijs/types': 4.5.0 - '@shikijs/vscode-textmate': 10.0.2 - - '@shikijs/langs@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - - '@shikijs/langs@4.5.0': + '@shikijs/engine-oniguruma@4.6.0': dependencies: - '@shikijs/types': 4.5.0 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 - '@shikijs/primitive@4.4.3': + '@shikijs/langs@4.6.0': dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 + '@shikijs/types': 4.6.0 - '@shikijs/primitive@4.5.0': + '@shikijs/primitive@4.6.0': dependencies: - '@shikijs/types': 4.5.0 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 - '@shikijs/themes@4.4.3': + '@shikijs/themes@4.6.0': dependencies: - '@shikijs/types': 4.4.3 + '@shikijs/types': 4.6.0 - '@shikijs/themes@4.5.0': + '@shikijs/types@4.6.0': dependencies: - '@shikijs/types': 4.5.0 - - '@shikijs/types@4.4.3': - dependencies: - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 - - '@shikijs/types@4.5.0': - dependencies: - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 - '@shikijs/vscode-textmate@10.0.2': {} + '@shikijs/vscode-textmate@10.1.0': {} '@simple-git/args-pathspec@1.0.4': {} @@ -7757,93 +6672,89 @@ snapshots: dependencies: '@simple-git/args-pathspec': 1.0.4 - '@tailwindcss/node@4.3.3': + '@tailwindcss/node@4.3.5': dependencies: '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.24.5 + enhanced-resolve: 5.26.1 jiti: 2.7.0 - lightningcss: 1.32.0 - magic-string: 0.30.21 + lightningcss: 1.33.0 + magic-string: 1.4.5 source-map-js: 1.2.2 - tailwindcss: 4.3.3 + tailwindcss: 4.3.5 - '@tailwindcss/oxide-android-arm64@4.3.3': + '@tailwindcss/oxide-android-arm64@4.3.5': optional: true - '@tailwindcss/oxide-darwin-arm64@4.3.3': + '@tailwindcss/oxide-darwin-arm64@4.3.5': optional: true - '@tailwindcss/oxide-darwin-x64@4.3.3': + '@tailwindcss/oxide-darwin-x64@4.3.5': optional: true - '@tailwindcss/oxide-freebsd-x64@4.3.3': + '@tailwindcss/oxide-freebsd-x64@4.3.5': optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.5': optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': + '@tailwindcss/oxide-linux-arm64-gnu@4.3.5': optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.3.3': + '@tailwindcss/oxide-linux-arm64-musl@4.3.5': optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.3.3': + '@tailwindcss/oxide-linux-x64-gnu@4.3.5': optional: true - '@tailwindcss/oxide-linux-x64-musl@4.3.3': + '@tailwindcss/oxide-linux-x64-musl@4.3.5': optional: true - '@tailwindcss/oxide-wasm32-wasi@4.3.3': + '@tailwindcss/oxide-wasm32-wasi@4.3.5': optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': + '@tailwindcss/oxide-win32-arm64-msvc@4.3.5': optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.3.3': + '@tailwindcss/oxide-win32-x64-msvc@4.3.5': optional: true - '@tailwindcss/oxide@4.3.3': + '@tailwindcss/oxide@4.3.5': optionalDependencies: - '@tailwindcss/oxide-android-arm64': 4.3.3 - '@tailwindcss/oxide-darwin-arm64': 4.3.3 - '@tailwindcss/oxide-darwin-x64': 4.3.3 - '@tailwindcss/oxide-freebsd-x64': 4.3.3 - '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.3 - '@tailwindcss/oxide-linux-arm64-gnu': 4.3.3 - '@tailwindcss/oxide-linux-arm64-musl': 4.3.3 - '@tailwindcss/oxide-linux-x64-gnu': 4.3.3 - '@tailwindcss/oxide-linux-x64-musl': 4.3.3 - '@tailwindcss/oxide-wasm32-wasi': 4.3.3 - '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3 - '@tailwindcss/oxide-win32-x64-msvc': 4.3.3 - - '@tailwindcss/typography@0.5.20(tailwindcss@4.3.3)': + '@tailwindcss/oxide-android-arm64': 4.3.5 + '@tailwindcss/oxide-darwin-arm64': 4.3.5 + '@tailwindcss/oxide-darwin-x64': 4.3.5 + '@tailwindcss/oxide-freebsd-x64': 4.3.5 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.5 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.5 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.5 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.5 + '@tailwindcss/oxide-linux-x64-musl': 4.3.5 + '@tailwindcss/oxide-wasm32-wasi': 4.3.5 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.5 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.5 + + '@tailwindcss/typography@0.5.20(tailwindcss@4.3.5)': dependencies: postcss-selector-parser: 6.0.10 - tailwindcss: 4.3.3 + tailwindcss: 4.3.5 - '@tailwindcss/vite@4.3.3(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': + '@tailwindcss/vite@4.3.5(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': dependencies: - '@tailwindcss/node': 4.3.3 - '@tailwindcss/oxide': 4.3.3 - tailwindcss: 4.3.3 - vite: 8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + '@tailwindcss/node': 4.3.5 + '@tailwindcss/oxide': 4.3.5 + tailwindcss: 4.3.5 + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) '@tanstack/table-core@8.21.3': {} - '@tanstack/vue-table@8.21.3(vue@3.5.44(typescript@5.9.3))': + '@tanstack/vue-table@8.21.3(vue@3.5.45(typescript@6.0.3))': dependencies: '@tanstack/table-core': 8.21.3 - vue: 3.5.44(typescript@5.9.3) + vue: 3.5.45(typescript@6.0.3) - '@tybys/wasm-util@0.10.3': + '@tybys/wasm-util@0.10.4': dependencies: - tslib: 2.8.1 - - '@types/acorn@4.0.6': - dependencies: - '@types/estree': 1.0.9 + tslib: 2.9.1 '@types/chai@5.2.3': dependencies: @@ -7852,7 +6763,7 @@ snapshots: '@types/concat-stream@2.0.3': dependencies: - '@types/node': 18.19.130 + '@types/node': 26.6.6 '@types/d3-array@3.2.2': {} @@ -7971,7 +6882,7 @@ snapshots: '@types/d3-transition': 3.0.9 '@types/d3-zoom': 3.0.9 - '@types/debug@4.1.12': + '@types/debug@4.1.13': dependencies: '@types/ms': 2.1.0 @@ -7981,16 +6892,12 @@ snapshots: '@types/estree-jsx@1.0.5': dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 - '@types/estree@1.0.9': {} + '@types/estree@1.0.10': {} '@types/geojson@7946.0.16': {} - '@types/hast@2.3.10': - dependencies: - '@types/unist': 2.0.11 - '@types/hast@3.0.5': dependencies: '@types/unist': 3.0.3 @@ -8001,31 +6908,19 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/mdast@3.0.15': - dependencies: - '@types/unist': 2.0.11 - '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 - '@types/mdx@2.0.13': {} + '@types/mdx@2.0.14': {} '@types/ms@2.1.0': {} - '@types/nlcst@1.0.4': - dependencies: - '@types/unist': 2.0.11 - '@types/nlcst@2.0.3': dependencies: '@types/unist': 3.0.3 - '@types/node@18.19.130': - dependencies: - undici-types: 5.26.5 - - '@types/node@22.20.2': + '@types/node@22.20.5': dependencies: undici-types: 6.21.0 @@ -8033,13 +6928,13 @@ snapshots: dependencies: undici-types: 7.18.2 - '@types/parse5@6.0.3': {} - - '@types/retry@0.12.1': {} + '@types/node@26.6.6': + dependencies: + undici-types: 8.9.0 '@types/sax@1.2.7': dependencies: - '@types/node': 18.19.130 + '@types/node': 26.6.6 '@types/supports-color@8.1.3': {} @@ -8052,190 +6947,178 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@typescript-eslint/eslint-plugin@8.72.1(@typescript-eslint/parser@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.72.1(@typescript-eslint/parser@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)': dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) + '@eslint-community/regexpp': 4.12.3 + '@typescript-eslint/parser': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) '@typescript-eslint/scope-manager': 8.72.1 - '@typescript-eslint/type-utils': 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) - '@typescript-eslint/utils': 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) + '@typescript-eslint/type-utils': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) + '@typescript-eslint/utils': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.72.1 - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - ignore: 7.0.8 + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + ignore: 7.0.14 natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3)': + '@typescript-eslint/parser@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)': dependencies: '@typescript-eslint/scope-manager': 8.72.1 '@typescript-eslint/types': 8.72.1 - '@typescript-eslint/typescript-estree': 8.72.1(supports-color@9.4.0)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.72.1(supports-color@10.2.2)(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.72.1 - debug: 4.4.3(supports-color@9.4.0) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - typescript: 5.9.3 + debug: 4.4.3(supports-color@10.2.2) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.72.1(supports-color@9.4.0)(typescript@5.9.3)': + '@typescript-eslint/project-service@8.72.1(supports-color@10.2.2)(typescript@6.0.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.72.1(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.72.1(typescript@6.0.3) '@typescript-eslint/types': 8.72.1 - debug: 4.4.3(supports-color@9.4.0) - typescript: 5.9.3 + debug: 4.4.3(supports-color@10.2.2) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.69.0': - dependencies: - '@typescript-eslint/types': 8.69.0 - '@typescript-eslint/visitor-keys': 8.69.0 - '@typescript-eslint/scope-manager@8.72.1': dependencies: '@typescript-eslint/types': 8.72.1 '@typescript-eslint/visitor-keys': 8.72.1 - '@typescript-eslint/tsconfig-utils@8.72.1(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.72.1(typescript@6.0.3)': dependencies: - typescript: 5.9.3 + typescript: 6.0.3 - '@typescript-eslint/type-utils@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)': dependencies: '@typescript-eslint/types': 8.72.1 - '@typescript-eslint/typescript-estree': 8.72.1(supports-color@9.4.0)(typescript@5.9.3) - '@typescript-eslint/utils': 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) - debug: 4.4.3(supports-color@9.4.0) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 + '@typescript-eslint/typescript-estree': 8.72.1(supports-color@10.2.2)(typescript@6.0.3) + '@typescript-eslint/utils': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) + debug: 4.4.3(supports-color@10.2.2) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.69.0': {} - '@typescript-eslint/types@8.72.1': {} - '@typescript-eslint/typescript-estree@8.72.1(supports-color@9.4.0)(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.72.1(supports-color@10.2.2)(typescript@6.0.3)': dependencies: - '@typescript-eslint/project-service': 8.72.1(supports-color@9.4.0)(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.72.1(typescript@5.9.3) + '@typescript-eslint/project-service': 8.72.1(supports-color@10.2.2)(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.72.1(typescript@6.0.3) '@typescript-eslint/types': 8.72.1 '@typescript-eslint/visitor-keys': 8.72.1 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) minimatch: 10.2.6 - semver: 7.8.5 + semver: 7.8.6 tinyglobby: 0.2.17 - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3)': + '@typescript-eslint/utils@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)': dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2)) '@typescript-eslint/scope-manager': 8.72.1 '@typescript-eslint/types': 8.72.1 - '@typescript-eslint/typescript-estree': 8.72.1(supports-color@9.4.0)(typescript@5.9.3) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - typescript: 5.9.3 + '@typescript-eslint/typescript-estree': 8.72.1(supports-color@10.2.2)(typescript@6.0.3) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.69.0': - dependencies: - '@typescript-eslint/types': 8.69.0 - eslint-visitor-keys: 5.0.1 - '@typescript-eslint/visitor-keys@8.72.1': dependencies: '@typescript-eslint/types': 8.72.1 eslint-visitor-keys: 5.0.1 - '@ungap/structured-clone@1.3.0': {} + '@ungap/structured-clone@1.4.0': {} '@upsetjs/venn.js@2.0.0': optionalDependencies: - d3-selection: 3.0.0 - d3-transition: 3.0.1(d3-selection@3.0.0) + d3-selection: 3.0.1 + d3-transition: 3.0.2(d3-selection@3.0.1) - '@vitejs/plugin-vue-jsx@5.1.6(supports-color@9.4.0)(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3))': + '@vitejs/plugin-vue-jsx@5.1.6(supports-color@10.2.2)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.45(typescript@6.0.3))': dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) - '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0)) - '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2)) + '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) '@rolldown/pluginutils': 1.0.1 - '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vue: 3.5.44(typescript@5.9.3) + '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vue: 3.5.45(typescript@6.0.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@6.0.10(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3))': + '@vitejs/plugin-vue@6.0.10(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.45(typescript@6.0.3))': dependencies: '@rolldown/pluginutils': 1.0.1 - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vue: 3.5.44(typescript@5.9.3) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vue: 3.5.45(typescript@6.0.3) - '@vitest/mocker@5.0.5(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': + '@vitest/mocker@5.1.0(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': dependencies: '@jridgewell/trace-mapping': 0.3.31 - '@vitest/spy': 5.0.5 + '@vitest/spy': 5.1.0 estree-walker: 3.0.3 magic-string: 1.4.5 optionalDependencies: - vite: 8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - '@vitest/spy@5.0.5': {} + '@vitest/spy@5.1.0': {} - '@volar/kit@2.4.28(typescript@5.9.3)': + '@volar/kit@2.4.28(typescript@6.0.3)': dependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) - '@volar/typescript': 2.4.28(typescript@5.9.3) + '@volar/language-service': 2.4.28(typescript@6.0.3) + '@volar/typescript': 2.4.28(typescript@6.0.3) typesafe-path: 0.2.2 - typescript: 5.9.3 + typescript: 6.0.3 vscode-languageserver-textdocument: 1.0.12 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 '@volar/language-core@2.4.28': dependencies: '@volar/source-map': 2.4.28 - '@volar/language-server@2.4.28(typescript@5.9.3)': + '@volar/language-server@2.4.28(typescript@6.0.3)': dependencies: '@volar/language-core': 2.4.28 - '@volar/language-service': 2.4.28(typescript@5.9.3) - '@volar/typescript': 2.4.28(typescript@5.9.3) + '@volar/language-service': 2.4.28(typescript@6.0.3) + '@volar/typescript': 2.4.28(typescript@6.0.3) path-browserify: 1.0.1 request-light: 0.7.0 vscode-languageserver: 9.0.1 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.12 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.3 - '@volar/language-service@2.4.28(typescript@5.9.3)': + '@volar/language-service@2.4.28(typescript@6.0.3)': dependencies: '@volar/language-core': 2.4.28 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.12 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.3 '@volar/source-map@2.4.28': {} - '@volar/typescript@2.4.28(typescript@5.9.3)': + '@volar/typescript@2.4.28(typescript@6.0.3)': dependencies: '@volar/language-core': 2.4.28 path-browserify: 1.0.1 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.3 '@vscode/emmet-helper@2.11.0': dependencies: @@ -8243,7 +7126,7 @@ snapshots: jsonc-parser: 2.3.1 vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 '@vscode/l10n@0.0.18': {} @@ -8251,129 +7134,99 @@ snapshots: '@vue/babel-helper-vue-transform-on@2.0.1': {} - '@vue/babel-plugin-jsx@1.5.0(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@vue/babel-plugin-jsx@1.5.0(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: - '@babel/helper-module-imports': 7.29.7(supports-color@9.4.0) + '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.6(supports-color@9.4.0)) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.6(supports-color@10.2.2)) '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) '@babel/types': 7.29.11 '@vue/babel-helper-vue-transform-on': 1.5.0 - '@vue/babel-plugin-resolve-type': 1.5.0(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) - '@vue/shared': 3.5.42 + '@vue/babel-plugin-resolve-type': 1.5.0(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) + '@vue/shared': 3.5.45 optionalDependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) transitivePeerDependencies: - supports-color - '@vue/babel-plugin-jsx@2.0.1(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@vue/babel-plugin-jsx@2.0.1(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: - '@babel/helper-module-imports': 7.29.7(supports-color@9.4.0) + '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.6(supports-color@9.4.0)) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.6(supports-color@10.2.2)) '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7(supports-color@9.4.0) + '@babel/traverse': 7.29.7(supports-color@10.2.2) '@babel/types': 7.29.11 '@vue/babel-helper-vue-transform-on': 2.0.1 - '@vue/babel-plugin-resolve-type': 2.0.1(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) - '@vue/shared': 3.5.42 + '@vue/babel-plugin-resolve-type': 2.0.1(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) + '@vue/shared': 3.5.45 optionalDependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) transitivePeerDependencies: - supports-color - '@vue/babel-plugin-resolve-type@1.5.0(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@vue/babel-plugin-resolve-type@1.5.0(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: '@babel/code-frame': 7.29.7 - '@babel/core': 7.29.6(supports-color@9.4.0) - '@babel/helper-module-imports': 7.29.7(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) + '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/parser': 7.29.11 - '@vue/compiler-sfc': 3.5.42 + '@babel/parser': 7.29.13 + '@vue/compiler-sfc': 3.5.45 transitivePeerDependencies: - supports-color - '@vue/babel-plugin-resolve-type@2.0.1(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0)': + '@vue/babel-plugin-resolve-type@2.0.1(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: '@babel/code-frame': 7.29.7 - '@babel/core': 7.29.6(supports-color@9.4.0) - '@babel/helper-module-imports': 7.29.7(supports-color@9.4.0) + '@babel/core': 7.29.6(supports-color@10.2.2) + '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) '@babel/helper-plugin-utils': 7.29.7 - '@babel/parser': 7.29.11 - '@vue/compiler-sfc': 3.5.42 + '@babel/parser': 7.29.13 + '@vue/compiler-sfc': 3.5.45 transitivePeerDependencies: - supports-color - '@vue/compiler-core@3.5.42': - dependencies: - '@babel/parser': 7.29.11 - '@vue/shared': 3.5.42 - entities: 7.0.1 - estree-walker: 2.0.2 - source-map-js: 1.2.2 - - '@vue/compiler-core@3.5.44': + '@vue/compiler-core@3.5.45': dependencies: - '@babel/parser': 7.29.11 - '@vue/shared': 3.5.44 + '@babel/parser': 7.29.13 + '@vue/shared': 3.5.45 entities: 7.0.1 estree-walker: 2.0.2 source-map-js: 1.2.2 - '@vue/compiler-dom@3.5.42': - dependencies: - '@vue/compiler-core': 3.5.42 - '@vue/shared': 3.5.42 - - '@vue/compiler-dom@3.5.44': + '@vue/compiler-dom@3.5.45': dependencies: - '@vue/compiler-core': 3.5.44 - '@vue/shared': 3.5.44 - - '@vue/compiler-sfc@3.5.42': - dependencies: - '@babel/parser': 7.29.11 - '@vue/compiler-core': 3.5.42 - '@vue/compiler-dom': 3.5.42 - '@vue/compiler-ssr': 3.5.42 - '@vue/shared': 3.5.42 - estree-walker: 2.0.2 - magic-string: 0.30.21 - postcss: 8.5.31 - source-map-js: 1.2.2 + '@vue/compiler-core': 3.5.45 + '@vue/shared': 3.5.45 - '@vue/compiler-sfc@3.5.44': + '@vue/compiler-sfc@3.5.45': dependencies: - '@babel/parser': 7.29.11 - '@vue/compiler-core': 3.5.44 - '@vue/compiler-dom': 3.5.44 - '@vue/compiler-ssr': 3.5.44 - '@vue/shared': 3.5.44 + '@babel/parser': 7.29.13 + '@vue/compiler-core': 3.5.45 + '@vue/compiler-dom': 3.5.45 + '@vue/compiler-ssr': 3.5.45 + '@vue/shared': 3.5.45 estree-walker: 2.0.2 magic-string: 0.30.21 - postcss: 8.5.31 + postcss: 8.5.32 source-map-js: 1.2.2 - '@vue/compiler-ssr@3.5.42': - dependencies: - '@vue/compiler-dom': 3.5.42 - '@vue/shared': 3.5.42 - - '@vue/compiler-ssr@3.5.44': + '@vue/compiler-ssr@3.5.45': dependencies: - '@vue/compiler-dom': 3.5.44 - '@vue/shared': 3.5.44 + '@vue/compiler-dom': 3.5.45 + '@vue/shared': 3.5.45 '@vue/devtools-api@7.7.10': dependencies: '@vue/devtools-kit': 7.7.10 - '@vue/devtools-core@8.2.1(vue@3.5.44(typescript@5.9.3))': + '@vue/devtools-core@8.2.1(vue@3.5.45(typescript@6.0.3))': dependencies: '@vue/devtools-kit': 8.2.1 '@vue/devtools-shared': 8.2.1 - vue: 3.5.44(typescript@5.9.3) + vue: 3.5.45(typescript@6.0.3) '@vue/devtools-kit@7.7.10': dependencies: @@ -8398,47 +7251,45 @@ snapshots: '@vue/devtools-shared@8.2.1': {} - '@vue/reactivity@3.5.44': + '@vue/reactivity@3.5.45': dependencies: - '@vue/shared': 3.5.44 + '@vue/shared': 3.5.45 - '@vue/runtime-core@3.5.44': + '@vue/runtime-core@3.5.45': dependencies: - '@vue/reactivity': 3.5.44 - '@vue/shared': 3.5.44 + '@vue/reactivity': 3.5.45 + '@vue/shared': 3.5.45 - '@vue/runtime-dom@3.5.44': + '@vue/runtime-dom@3.5.45': dependencies: - '@vue/reactivity': 3.5.44 - '@vue/runtime-core': 3.5.44 - '@vue/shared': 3.5.44 + '@vue/reactivity': 3.5.45 + '@vue/runtime-core': 3.5.45 + '@vue/shared': 3.5.45 csstype: 3.2.3 - '@vue/server-renderer@3.5.44': + '@vue/server-renderer@3.5.45': dependencies: - '@vue/compiler-ssr': 3.5.44 - '@vue/runtime-dom': 3.5.44 - '@vue/shared': 3.5.44 - - '@vue/shared@3.5.42': {} + '@vue/compiler-ssr': 3.5.45 + '@vue/runtime-dom': 3.5.45 + '@vue/shared': 3.5.45 - '@vue/shared@3.5.44': {} + '@vue/shared@3.5.45': {} - '@vueuse/core@10.11.1(vue@3.5.44(typescript@5.9.3))': + '@vueuse/core@10.11.1(vue@3.5.45(typescript@6.0.3))': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 10.11.1 - '@vueuse/shared': 10.11.1(vue@3.5.44(typescript@5.9.3)) - vue-demi: 0.14.10(vue@3.5.44(typescript@5.9.3)) + '@vueuse/shared': 10.11.1(vue@3.5.45(typescript@6.0.3)) + vue-demi: 0.14.10(vue@3.5.45(typescript@6.0.3)) transitivePeerDependencies: - '@vue/composition-api' - vue '@vueuse/metadata@10.11.1': {} - '@vueuse/shared@10.11.1(vue@3.5.44(typescript@5.9.3))': + '@vueuse/shared@10.11.1(vue@3.5.45(typescript@6.0.3))': dependencies: - vue-demi: 0.14.10(vue@3.5.44(typescript@5.9.3)) + vue-demi: 0.14.10(vue@3.5.45(typescript@6.0.3)) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -8450,16 +7301,10 @@ snapshots: mime-types: 3.0.2 negotiator: 1.0.0 - acorn-jsx@5.3.2(acorn@8.18.0): - dependencies: - acorn: 8.18.0 - acorn-jsx@5.3.2(acorn@8.19.0): dependencies: acorn: 8.19.0 - acorn@8.18.0: {} - acorn@8.19.0: {} ajv-draft-04@1.0.0(ajv@8.17.1): @@ -8488,23 +7333,23 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - algoliasearch@4.25.3: - dependencies: - '@algolia/cache-browser-local-storage': 4.25.3 - '@algolia/cache-common': 4.25.3 - '@algolia/cache-in-memory': 4.25.3 - '@algolia/client-account': 4.25.3 - '@algolia/client-analytics': 4.25.3 - '@algolia/client-common': 4.25.3 - '@algolia/client-personalization': 4.25.3 - '@algolia/client-search': 4.25.3 - '@algolia/logger-common': 4.25.3 - '@algolia/logger-console': 4.25.3 - '@algolia/recommend': 4.25.3 - '@algolia/requester-browser-xhr': 4.25.3 - '@algolia/requester-common': 4.25.3 - '@algolia/requester-node-http': 4.25.3 - '@algolia/transporter': 4.25.3 + algoliasearch@4.27.0: + dependencies: + '@algolia/cache-browser-local-storage': 4.27.0 + '@algolia/cache-common': 4.27.0 + '@algolia/cache-in-memory': 4.27.0 + '@algolia/client-account': 4.27.0 + '@algolia/client-analytics': 4.27.0 + '@algolia/client-common': 4.27.0 + '@algolia/client-personalization': 4.27.0 + '@algolia/client-search': 4.27.0 + '@algolia/logger-common': 4.27.0 + '@algolia/logger-console': 4.27.0 + '@algolia/recommend': 4.27.0 + '@algolia/requester-browser-xhr': 4.27.0 + '@algolia/requester-common': 4.27.0 + '@algolia/requester-node-http': 4.27.0 + '@algolia/transporter': 4.27.0 am-i-vibing@0.5.0: dependencies: @@ -8512,7 +7357,7 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.2.2: {} + ansi-regex@6.6.0: {} ansi-styles@4.3.0: dependencies: @@ -8533,47 +7378,40 @@ snapshots: dependencies: sprintf-js: 1.0.3 - argparse@2.0.1: {} + argparse@3.0.4: {} aria-query@5.3.2: {} array-iterate@2.0.1: {} - array-union@2.1.0: {} - assertion-error@2.0.1: {} - astral-regex@2.0.0: {} - astring@1.9.0: {} - astro-auto-import@0.6.0(astro@7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): + astro-auto-import@0.6.0(astro@7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): dependencies: - acorn: 8.18.0 - astro: 7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + acorn: 8.19.0 + astro: 7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - astro-eslint-parser@1.4.0(supports-color@7.2.0): + astro-eslint-parser@3.2.0(supports-color@10.2.2): dependencies: - '@astrojs/compiler': 2.13.1 - '@typescript-eslint/scope-manager': 8.69.0 - '@typescript-eslint/types': 8.69.0 - astrojs-compiler-sync: 1.1.1(@astrojs/compiler@2.13.1) - debug: 4.4.3(supports-color@7.2.0) - entities: 7.0.1 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - fast-glob: 3.3.3 - is-glob: 4.0.3 - semver: 7.8.5 + '@astrojs/compiler-rs': 0.5.2 + '@typescript-eslint/scope-manager': 8.72.1 + '@typescript-eslint/types': 8.72.1 + debug: 4.4.3(supports-color@10.2.2) + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 + semver: 7.8.6 + tinyglobby: 0.2.17 transitivePeerDependencies: - supports-color - astro@7.4.3(@astrojs/markdown-remark@7.3.5(supports-color@9.4.0))(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1): + astro@7.4.7(@astrojs/markdown-remark@7.3.6(supports-color@10.2.2))(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1): dependencies: '@astrojs/compiler-rs': 0.5.2 - '@astrojs/internal-helpers': 0.13.0 - '@astrojs/markdown-satteri': 0.4.6 + '@astrojs/internal-helpers': 0.13.1 + '@astrojs/markdown-satteri': 0.4.7 '@astrojs/telemetry': 3.4.2 '@capsizecss/unpack': 4.0.1 '@clack/prompts': 1.8.1 @@ -8584,7 +7422,7 @@ snapshots: ci-info: 4.4.0 clsx: 2.1.1 common-ancestor-path: 2.0.0 - cookie: 2.0.1 + cookie: 2.0.2 devalue: 6.0.3 diff: 9.0.0 dset: 3.1.4 @@ -8602,30 +7440,30 @@ snapshots: neotraverse: 1.0.1 obug: 3.0.0 p-limit: 7.3.3 - p-queue: 9.3.5 + p-queue: 10.0.0 package-manager-detector: 1.9.0 piccolore: 0.1.3 picomatch: 4.0.7 - rolldown: 1.2.14 - shiki: 4.5.0 + rolldown: 1.2.16 + shiki: 4.6.0 smol-toml: 1.9.1 svgo: 4.1.0 tinyclip: 1.0.3 tinyexec: 1.3.1 tinyglobby: 0.2.17 - tinyps: 0.5.1 + tinyps: 0.5.2 ultrahtml: 1.7.0 unifont: 1.0.3 - unstorage: 1.17.5 + unstorage: 1.17.6 verkit: 0.5.0 - vite: 8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vitefu: 1.1.3(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vitefu: 1.1.3(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) xxhash-wasm: 1.1.0 yargs-parser: 22.0.0 zod: 4.6.7 optionalDependencies: - '@astrojs/markdown-remark': 7.3.5(supports-color@9.4.0) - sharp: 0.35.5(@types/node@18.19.130) + '@astrojs/markdown-remark': 7.3.6(supports-color@10.2.2) + sharp: 0.35.5(@types/node@26.6.6) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -8659,22 +7497,15 @@ snapshots: - uploadthing - yaml - astrojs-compiler-sync@1.1.1(@astrojs/compiler@2.13.1): - dependencies: - '@astrojs/compiler': 2.13.1 - synckit: 0.11.13 - axobject-query@4.1.0: {} bail@2.0.2: {} balanced-match@1.0.2: {} - balanced-match@2.0.0: {} - balanced-match@4.0.4: {} - baseline-browser-mapping@2.11.27: {} + baseline-browser-mapping@2.11.35: {} bcp-47-match@2.0.3: {} @@ -8693,11 +7524,11 @@ snapshots: birpc@4.1.0: {} - body-parser@2.3.0(supports-color@9.4.0): + body-parser@2.3.0(supports-color@10.2.2): dependencies: bytes: 3.1.2 content-type: 2.1.0 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) http-errors: 2.0.1 iconv-lite: 0.7.3 on-finished: 2.4.1 @@ -8721,13 +7552,13 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.29.3: + browserslist@4.29.5: dependencies: - baseline-browser-mapping: 2.11.27 - caniuse-lite: 1.0.30001814 - electron-to-chromium: 1.5.444 - node-releases: 2.0.57 - update-browserslist-db: 1.3.3(browserslist@4.29.3) + baseline-browser-mapping: 2.11.35 + caniuse-lite: 1.0.30001823 + electron-to-chromium: 1.5.478 + node-releases: 2.0.63 + update-browserslist-db: 1.3.4(browserslist@4.29.5) buffer-from@1.1.2: {} @@ -8755,16 +7586,12 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 - callsites@3.1.0: {} - - caniuse-api@3.0.0: + caniuse-api@4.0.0: dependencies: - browserslist: 4.29.3 - caniuse-lite: 1.0.30001814 - lodash.memoize: 4.1.2 - lodash.uniq: 4.5.0 + browserslist: 4.29.5 + caniuse-lite: 1.0.30001823 - caniuse-lite@1.0.30001814: {} + caniuse-lite@1.0.30001823: {} ccount@2.0.1: {} @@ -8797,7 +7624,7 @@ snapshots: cliui@9.0.1: dependencies: string-width: 7.2.0 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 wrap-ansi: 9.0.2 clsx@2.1.1: {} @@ -8810,7 +7637,7 @@ snapshots: color-name@1.1.4: {} - colord@2.9.3: {} + colord@2.10.0: {} comma-separated-tokens@2.0.3: {} @@ -8818,7 +7645,7 @@ snapshots: commander@14.0.3: {} - commander@15.0.0: {} + commander@15.1.0: {} commander@2.20.3: optional: true @@ -8848,7 +7675,7 @@ snapshots: cookie@0.7.2: {} - cookie@2.0.1: {} + cookie@2.0.2: {} copy-anything@4.0.5: dependencies: @@ -8867,14 +7694,10 @@ snapshots: dependencies: layout-base: 2.0.1 - cosmiconfig@9.0.2(typescript@5.9.3): + cosmiconfig@10.0.1: dependencies: env-paths: 2.2.1 - import-fresh: 3.3.1 - js-yaml: 4.3.2 - parse-json: 5.2.0 - optionalDependencies: - typescript: 5.9.3 + js-yaml: 5.5.0 cross-spawn@7.0.6: dependencies: @@ -8886,92 +7709,36 @@ snapshots: dependencies: uncrypto: 0.1.3 - css-declaration-sorter@7.3.0(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - - css-functions-list@3.3.3: {} - - css-select@5.2.2: + css-select@6.0.0: dependencies: boolbase: 1.0.0 - css-what: 6.2.2 + css-what: 7.0.0 domhandler: 5.0.3 domutils: 3.2.2 nth-check: 2.1.1 - css-select@6.0.0: - dependencies: - boolbase: 1.0.0 - css-what: 7.0.0 - domhandler: 5.0.3 - domutils: 3.2.2 - nth-check: 2.1.1 - - css-tree@2.2.1: + css-tree@2.2.1: dependencies: mdn-data: 2.0.28 source-map-js: 1.2.2 - css-tree@2.3.1: + css-tree@3.2.1: dependencies: - mdn-data: 2.0.30 + mdn-data: 2.27.1 source-map-js: 1.2.2 - css-tree@3.1.0: - dependencies: - mdn-data: 2.12.2 - source-map-js: 1.2.2 - - css-what@6.2.2: {} - css-what@7.0.0: {} cssesc@3.0.0: {} - cssnano-preset-default@6.1.2(postcss@8.5.31): - dependencies: - browserslist: 4.29.3 - css-declaration-sorter: 7.3.0(postcss@8.5.31) - cssnano-utils: 4.0.2(postcss@8.5.31) - postcss: 8.5.31 - postcss-calc: 9.0.1(postcss@8.5.31) - postcss-colormin: 6.1.0(postcss@8.5.31) - postcss-convert-values: 6.1.0(postcss@8.5.31) - postcss-discard-comments: 6.0.2(postcss@8.5.31) - postcss-discard-duplicates: 6.0.3(postcss@8.5.31) - postcss-discard-empty: 6.0.3(postcss@8.5.31) - postcss-discard-overridden: 6.0.2(postcss@8.5.31) - postcss-merge-longhand: 6.0.5(postcss@8.5.31) - postcss-merge-rules: 6.1.1(postcss@8.5.31) - postcss-minify-font-values: 6.1.0(postcss@8.5.31) - postcss-minify-gradients: 6.0.3(postcss@8.5.31) - postcss-minify-params: 6.1.0(postcss@8.5.31) - postcss-minify-selectors: 6.0.4(postcss@8.5.31) - postcss-normalize-charset: 6.0.2(postcss@8.5.31) - postcss-normalize-display-values: 6.0.2(postcss@8.5.31) - postcss-normalize-positions: 6.0.2(postcss@8.5.31) - postcss-normalize-repeat-style: 6.0.2(postcss@8.5.31) - postcss-normalize-string: 6.0.2(postcss@8.5.31) - postcss-normalize-timing-functions: 6.0.2(postcss@8.5.31) - postcss-normalize-unicode: 6.1.0(postcss@8.5.31) - postcss-normalize-url: 6.0.2(postcss@8.5.31) - postcss-normalize-whitespace: 6.0.2(postcss@8.5.31) - postcss-ordered-values: 6.0.2(postcss@8.5.31) - postcss-reduce-initial: 6.1.0(postcss@8.5.31) - postcss-reduce-transforms: 6.0.2(postcss@8.5.31) - postcss-svgo: 6.0.3(postcss@8.5.31) - postcss-unique-selectors: 6.0.4(postcss@8.5.31) - - cssnano-utils@4.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - - cssnano@6.1.2(postcss@8.5.31): - dependencies: - cssnano-preset-default: 6.1.2(postcss@8.5.31) - lilconfig: 3.1.3 - postcss: 8.5.31 + cssnano@9.9.0(postcss@8.5.32): + dependencies: + '@colordx/core': 7.3.0 + '@csstools/css-tokenizer': 4.0.2 + browserslist: 4.29.5 + caniuse-api: 4.0.0 + postcss: 8.5.32 + postcss-calc: 11.2.3(postcss@8.5.32) csso@5.0.5: dependencies: @@ -8979,207 +7746,202 @@ snapshots: csstype@3.2.3: {} - cytoscape-cose-bilkent@4.1.0(cytoscape@3.34.3): + cytoscape-cose-bilkent@4.1.0(cytoscape@3.34.4): dependencies: cose-base: 1.0.3 - cytoscape: 3.34.3 + cytoscape: 3.34.4 - cytoscape-fcose@2.2.0(cytoscape@3.34.3): + cytoscape-fcose@2.2.0(cytoscape@3.34.4): dependencies: cose-base: 2.2.0 - cytoscape: 3.34.3 + cytoscape: 3.34.4 - cytoscape@3.34.3: {} + cytoscape@3.34.4: {} d3-array@2.12.1: dependencies: internmap: 1.0.1 - d3-array@3.2.4: + d3-array@3.2.5: dependencies: internmap: 2.0.3 - d3-axis@3.0.0: {} + d3-axis@3.0.1: {} - d3-brush@3.0.0: + d3-brush@3.0.1: dependencies: - d3-dispatch: 3.0.1 - d3-drag: 3.0.0 - d3-interpolate: 3.0.1 - d3-selection: 3.0.0 - d3-transition: 3.0.1(d3-selection@3.0.0) + d3-dispatch: 3.0.2 + d3-drag: 3.0.1 + d3-interpolate: 3.0.2 + d3-selection: 3.0.1 + d3-transition: 3.0.2(d3-selection@3.0.1) - d3-chord@3.0.1: + d3-chord@3.0.2: dependencies: - d3-path: 3.1.0 + d3-path: 3.1.1 - d3-color@3.1.0: {} + d3-color@3.1.1: {} - d3-contour@4.0.2: + d3-contour@4.0.3: dependencies: - d3-array: 3.2.4 + d3-array: 3.2.5 - d3-delaunay@6.0.4: + d3-delaunay@6.0.6: dependencies: delaunator: 5.1.0 - d3-dispatch@3.0.1: {} + d3-dispatch@3.0.2: {} - d3-drag@3.0.0: + d3-drag@3.0.1: dependencies: - d3-dispatch: 3.0.1 - d3-selection: 3.0.0 + d3-dispatch: 3.0.2 + d3-selection: 3.0.1 - d3-dsv@3.0.1: + d3-dsv@3.0.2: dependencies: commander: 7.2.0 iconv-lite: 0.6.3 rw: 1.3.3 - d3-ease@3.0.1: {} + d3-ease@3.0.2: {} - d3-fetch@3.0.1: + d3-fetch@3.0.2: dependencies: - d3-dsv: 3.0.1 + d3-dsv: 3.0.2 - d3-force@3.0.0: + d3-force@3.0.1: dependencies: - d3-dispatch: 3.0.1 - d3-quadtree: 3.0.1 - d3-timer: 3.0.1 + d3-dispatch: 3.0.2 + d3-quadtree: 3.0.2 + d3-timer: 3.0.2 - d3-format@3.1.2: {} + d3-format@3.1.3: {} - d3-geo@3.1.1: + d3-geo@3.1.2: dependencies: - d3-array: 3.2.4 + d3-array: 3.2.5 - d3-hierarchy@3.1.2: {} + d3-hierarchy@3.1.3: {} - d3-interpolate@3.0.1: + d3-interpolate@3.0.2: dependencies: - d3-color: 3.1.0 + d3-color: 3.1.1 d3-path@1.0.9: {} - d3-path@3.1.0: {} + d3-path@3.1.1: {} - d3-polygon@3.0.1: {} + d3-polygon@3.0.2: {} - d3-quadtree@3.0.1: {} + d3-quadtree@3.0.2: {} - d3-random@3.0.1: {} + d3-random@3.0.2: {} d3-sankey@0.12.3: dependencies: d3-array: 2.12.1 d3-shape: 1.3.7 - d3-scale-chromatic@3.1.0: + d3-scale-chromatic@3.1.1: dependencies: - d3-color: 3.1.0 - d3-interpolate: 3.0.1 + d3-color: 3.1.1 + d3-interpolate: 3.0.2 + d3-scale: 4.0.3 - d3-scale@4.0.2: + d3-scale@4.0.3: dependencies: - d3-array: 3.2.4 - d3-format: 3.1.2 - d3-interpolate: 3.0.1 - d3-time: 3.1.0 - d3-time-format: 4.1.0 + d3-array: 3.2.5 + d3-format: 3.1.3 + d3-interpolate: 3.0.2 + d3-time: 3.1.1 + d3-time-format: 4.1.1 - d3-selection@3.0.0: {} + d3-selection@3.0.1: {} d3-shape@1.3.7: dependencies: d3-path: 1.0.9 - d3-shape@3.2.0: - dependencies: - d3-path: 3.1.0 - - d3-time-format@4.1.0: - dependencies: - d3-time: 3.1.0 - - d3-time@3.1.0: - dependencies: - d3-array: 3.2.4 - - d3-timer@3.0.1: {} - - d3-transition@3.0.1(d3-selection@3.0.0): - dependencies: - d3-color: 3.1.0 - d3-dispatch: 3.0.1 - d3-ease: 3.0.1 - d3-interpolate: 3.0.1 - d3-selection: 3.0.0 - d3-timer: 3.0.1 - - d3-zoom@3.0.0: - dependencies: - d3-dispatch: 3.0.1 - d3-drag: 3.0.0 - d3-interpolate: 3.0.1 - d3-selection: 3.0.0 - d3-transition: 3.0.1(d3-selection@3.0.0) - - d3@7.9.0: - dependencies: - d3-array: 3.2.4 - d3-axis: 3.0.0 - d3-brush: 3.0.0 - d3-chord: 3.0.1 - d3-color: 3.1.0 - d3-contour: 4.0.2 - d3-delaunay: 6.0.4 - d3-dispatch: 3.0.1 - d3-drag: 3.0.0 - d3-dsv: 3.0.1 - d3-ease: 3.0.1 - d3-fetch: 3.0.1 - d3-force: 3.0.0 - d3-format: 3.1.2 - d3-geo: 3.1.1 - d3-hierarchy: 3.1.2 - d3-interpolate: 3.0.1 - d3-path: 3.1.0 - d3-polygon: 3.0.1 - d3-quadtree: 3.0.1 - d3-random: 3.0.1 - d3-scale: 4.0.2 - d3-scale-chromatic: 3.1.0 - d3-selection: 3.0.0 - d3-shape: 3.2.0 - d3-time: 3.1.0 - d3-time-format: 4.1.0 - d3-timer: 3.0.1 - d3-transition: 3.0.1(d3-selection@3.0.0) - d3-zoom: 3.0.0 + d3-shape@3.2.1: + dependencies: + d3-path: 3.1.1 + + d3-time-format@4.1.1: + dependencies: + d3-time: 3.1.1 + + d3-time@3.1.1: + dependencies: + d3-array: 3.2.5 + + d3-timer@3.0.2: {} + + d3-transition@3.0.2(d3-selection@3.0.1): + dependencies: + d3-color: 3.1.1 + d3-dispatch: 3.0.2 + d3-ease: 3.0.2 + d3-interpolate: 3.0.2 + d3-selection: 3.0.1 + d3-timer: 3.0.2 + + d3-zoom@3.0.1: + dependencies: + d3-dispatch: 3.0.2 + d3-drag: 3.0.1 + d3-interpolate: 3.0.2 + d3-selection: 3.0.1 + d3-transition: 3.0.2(d3-selection@3.0.1) + + d3@7.9.2: + dependencies: + d3-array: 3.2.5 + d3-axis: 3.0.1 + d3-brush: 3.0.1 + d3-chord: 3.0.2 + d3-color: 3.1.1 + d3-contour: 4.0.3 + d3-delaunay: 6.0.6 + d3-dispatch: 3.0.2 + d3-drag: 3.0.1 + d3-dsv: 3.0.2 + d3-ease: 3.0.2 + d3-fetch: 3.0.2 + d3-force: 3.0.1 + d3-format: 3.1.3 + d3-geo: 3.1.2 + d3-hierarchy: 3.1.3 + d3-interpolate: 3.0.2 + d3-path: 3.1.1 + d3-polygon: 3.0.2 + d3-quadtree: 3.0.2 + d3-random: 3.0.2 + d3-scale: 4.0.3 + d3-scale-chromatic: 3.1.1 + d3-selection: 3.0.1 + d3-shape: 3.2.1 + d3-time: 3.1.1 + d3-time-format: 4.1.1 + d3-timer: 3.0.2 + d3-transition: 3.0.2(d3-selection@3.0.1) + d3-zoom: 3.0.1 dagre-d3-es@7.0.14: dependencies: - d3: 7.9.0 + d3: 7.9.2 lodash-es: 4.18.1 data-uri-to-buffer@4.0.1: {} dayjs@1.11.23: {} - debug@4.4.3(supports-color@7.2.0): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 7.2.0 - - debug@4.4.3(supports-color@9.4.0): + debug@4.4.3(supports-color@10.2.2): dependencies: ms: 2.1.3 optionalDependencies: - supports-color: 9.4.0 + supports-color: 10.2.2 - decode-named-character-reference@1.2.0: + decode-named-character-reference@1.3.0: dependencies: character-entities: 2.0.2 @@ -9216,52 +7978,48 @@ snapshots: dependencies: dequal: 2.0.3 - diff@5.2.0: {} - diff@9.0.0: {} - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - - dom-serializer@1.4.1: - dependencies: - domelementtype: 2.3.0 - domhandler: 4.3.1 - entities: 2.2.0 - dom-serializer@2.0.0: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 entities: 4.5.0 + dom-serializer@3.1.1: + dependencies: + domelementtype: 3.0.0 + domhandler: 6.0.1 + entities: 8.1.0 + domelementtype@2.3.0: {} - domhandler@4.3.1: - dependencies: - domelementtype: 2.3.0 + domelementtype@3.0.0: {} domhandler@5.0.3: dependencies: domelementtype: 2.3.0 + domhandler@6.0.1: + dependencies: + domelementtype: 3.0.0 + dompurify@3.4.17: optionalDependencies: '@types/trusted-types': 2.0.7 - domutils@2.8.0: - dependencies: - dom-serializer: 1.4.1 - domelementtype: 2.3.0 - domhandler: 4.3.1 - domutils@3.2.2: dependencies: dom-serializer: 2.0.0 domelementtype: 2.3.0 domhandler: 5.0.3 + domutils@4.0.2: + dependencies: + dom-serializer: 3.1.1 + domelementtype: 3.0.0 + domhandler: 6.0.1 + dset@3.1.4: {} dunder-proto@1.0.1: @@ -9277,13 +8035,13 @@ snapshots: '@one-ini/wasm': 0.2.1 commander: 14.0.3 minimatch: 10.2.6 - semver: 7.8.5 + semver: 7.8.6 ee-first@1.1.1: {} - electron-to-chromium@1.5.444: {} + electron-to-chromium@1.5.478: {} - elkjs@0.9.3: {} + elkjs@0.12.1: {} emmet@2.4.11: dependencies: @@ -9298,21 +8056,19 @@ snapshots: encodeurl@2.0.0: {} - enhanced-resolve@5.24.5: + enhanced-resolve@5.26.1: dependencies: graceful-fs: 4.2.11 tapable: 2.3.3 - entities@2.2.0: {} - - entities@3.0.1: {} - entities@4.5.0: {} - entities@6.0.1: {} - entities@7.0.1: {} + entities@8.1.0: {} + + entities@9.0.0: {} + env-paths@2.2.1: {} err-code@2.0.3: {} @@ -9335,7 +8091,7 @@ snapshots: dependencies: es-errors: 1.3.0 - es-toolkit@1.52.0: {} + es-toolkit@1.53.2: {} esast-util-from-estree@2.0.0: dependencies: @@ -9347,9 +8103,9 @@ snapshots: esast-util-from-js@2.0.1: dependencies: '@types/estree-jsx': 1.0.5 - acorn: 8.18.0 + acorn: 8.19.0 esast-util-from-estree: 2.0.0 - vfile-message: 4.0.3 + vfile-message: 4.0.4 esbuild-android-64@0.15.18: optional: true @@ -9473,53 +8229,52 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-compat-utils@0.6.5(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0)): - dependencies: - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - semver: 7.8.5 - - eslint-mdx@3.8.2(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0): + eslint-mdx@3.8.3(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): dependencies: acorn: 8.19.0 acorn-jsx: 5.3.2(acorn@8.19.0) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) espree: 11.2.0 estree-util-visit: 2.0.0 - remark-mdx: 3.1.1(supports-color@9.4.0) - remark-parse: 11.0.0(supports-color@9.4.0) + remark-mdx: 3.1.1(supports-color@10.2.2) + remark-parse: 11.0.0(supports-color@10.2.2) remark-stringify: 11.0.0 synckit: 0.12.3 unified: 11.0.5 - unified-engine: 11.2.2(supports-color@9.4.0) - unist-util-visit: 5.1.0 + unified-engine: 11.2.2(supports-color@10.2.2) + unist-util-visit: 5.2.0 vfile: 6.0.3 transitivePeerDependencies: - bluebird - supports-color - eslint-plugin-astro@1.7.0(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0): - dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0)) - '@jridgewell/sourcemap-codec': 1.5.5 - '@typescript-eslint/types': 8.69.0 - astro-eslint-parser: 1.4.0(supports-color@7.2.0) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - eslint-compat-utils: 0.6.5(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0)) - globals: 16.5.0 - postcss: 8.5.28 - postcss-selector-parser: 7.1.5 + eslint-plugin-astro@3.2.1(@typescript-eslint/parser@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript-eslint@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2)) + '@jridgewell/sourcemap-codec': 1.6.0 + '@typescript-eslint/types': 8.72.1 + astro-eslint-parser: 3.2.0(supports-color@10.2.2) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + espree: 11.2.0 + globals: 17.14.0 + postcss: 8.5.32 + postcss-selector-parser: 7.1.7 + synckit: 0.11.13 + optionalDependencies: + '@typescript-eslint/parser': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) + typescript-eslint: 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) transitivePeerDependencies: - supports-color - eslint-plugin-mdx@3.8.2(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0): + eslint-plugin-mdx@3.8.3(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): dependencies: - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - eslint-mdx: 3.8.2(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0) - mdast-util-from-markdown: 2.1.0(supports-color@9.4.0) - mdast-util-mdx: 3.0.0(supports-color@9.4.0) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + eslint-mdx: 3.8.3(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-mdx: 3.0.0(supports-color@10.2.2) micromark-extension-mdxjs: 3.0.0 - remark-mdx: 3.1.1(supports-color@9.4.0) - remark-parse: 11.0.0(supports-color@9.4.0) + remark-mdx: 3.1.1(supports-color@10.2.2) + remark-parse: 11.0.0(supports-color@10.2.2) remark-stringify: 11.0.0 synckit: 0.12.3 unified: 11.0.5 @@ -9529,61 +8284,54 @@ snapshots: - remark-lint-file-extension - supports-color - eslint-plugin-vue@10.12.0(@typescript-eslint/parser@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0)): + eslint-plugin-vue@10.12.0(@typescript-eslint/parser@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(vue-eslint-parser@10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)): dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0)) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2)) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) natural-compare: 1.4.0 nth-check: 2.1.1 - postcss-selector-parser: 7.1.5 - semver: 7.8.5 - vue-eslint-parser: 10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0) + postcss-selector-parser: 7.1.7 + semver: 7.8.6 + vue-eslint-parser: 10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) xml-name-validator: 5.0.0 optionalDependencies: - '@typescript-eslint/parser': 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) + '@typescript-eslint/parser': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) - eslint-plugin-vuejs-accessibility@2.6.3(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(globals@17.13.0)(supports-color@9.4.0): + eslint-plugin-vuejs-accessibility@2.6.3(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(globals@17.14.0)(supports-color@10.2.2): dependencies: aria-query: 5.3.2 - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - globals: 17.13.0 - vue-eslint-parser: 10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + globals: 17.14.0 + vue-eslint-parser: 10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) transitivePeerDependencies: - supports-color - eslint-scope@8.4.0: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - eslint-scope@9.1.2: dependencies: '@types/esrecurse': 4.3.1 - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.2.1: {} - eslint-visitor-keys@5.0.1: {} - eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0): + eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2): dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0)) - '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.23.5(supports-color@9.4.0) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/regexpp': 4.12.3 + '@eslint/config-array': 0.23.5(supports-color@10.2.2) '@eslint/config-helpers': 0.7.0 '@eslint/core': 1.2.1 '@eslint/plugin-kit': 0.7.3 '@humanfs/node': 0.16.8 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 ajv: 6.15.0 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) escape-string-regexp: 4.0.0 eslint-scope: 9.1.2 eslint-visitor-keys: 5.0.1 @@ -9606,24 +8354,14 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.4.0: - dependencies: - acorn: 8.18.0 - acorn-jsx: 5.3.2(acorn@8.18.0) - eslint-visitor-keys: 4.2.1 - espree@11.2.0: dependencies: - acorn: 8.18.0 - acorn-jsx: 5.3.2(acorn@8.18.0) + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) eslint-visitor-keys: 5.0.1 esprima@4.0.1: {} - esquery@1.6.0: - dependencies: - estraverse: 5.3.0 - esquery@1.7.0: dependencies: estraverse: 5.3.0 @@ -9636,7 +8374,7 @@ snapshots: estree-util-attach-comments@3.0.0: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 estree-util-build-jsx@3.0.1: dependencies: @@ -9645,13 +8383,11 @@ snapshots: estree-util-is-identifier-name: 3.0.0 estree-walker: 3.0.3 - estree-util-is-identifier-name@2.1.0: {} - estree-util-is-identifier-name@3.0.0: {} - estree-util-scope@1.0.0: + estree-util-scope@1.0.1: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 devlop: 1.1.0 estree-util-to-js@2.0.0: @@ -9660,11 +8396,6 @@ snapshots: astring: 1.9.0 source-map: 0.7.6 - estree-util-visit@1.2.1: - dependencies: - '@types/estree-jsx': 1.0.5 - '@types/unist': 2.0.11 - estree-util-visit@2.0.0: dependencies: '@types/estree-jsx': 1.0.5 @@ -9674,14 +8405,12 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 esutils@2.0.3: {} etag@1.8.1: {} - eventemitter3@5.0.4: {} - eventsource-parser@3.0.6: {} eventsource@3.0.7: @@ -9690,28 +8419,28 @@ snapshots: expect-type@1.4.0: {} - express-rate-limit@8.6.2(express@5.2.1(supports-color@9.4.0))(supports-color@9.4.0): + express-rate-limit@8.6.2(express@5.2.1(supports-color@10.2.2))(supports-color@10.2.2): dependencies: - debug: 4.4.3(supports-color@9.4.0) - express: 5.2.1(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) + express: 5.2.1(supports-color@10.2.2) ip-address: 10.5.0 transitivePeerDependencies: - supports-color - express@5.2.1(supports-color@9.4.0): + express@5.2.1(supports-color@10.2.2): dependencies: accepts: 2.0.0 - body-parser: 2.3.0(supports-color@9.4.0) + body-parser: 2.3.0(supports-color@10.2.2) content-disposition: 1.1.0 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 2.1.1(supports-color@9.4.0) + finalhandler: 2.1.1(supports-color@10.2.2) fresh: 2.0.0 http-errors: 2.0.1 merge-descriptors: 2.0.0 @@ -9722,9 +8451,9 @@ snapshots: proxy-addr: 2.0.8 qs: 6.15.3 range-parser: 1.3.0 - router: 2.2.0(supports-color@9.4.0) - send: 1.2.1(supports-color@9.4.0) - serve-static: 2.2.1(supports-color@9.4.0) + router: 2.2.0(supports-color@10.2.2) + send: 1.2.1(supports-color@10.2.2) + serve-static: 2.2.1(supports-color@10.2.2) statuses: 2.0.2 type-is: 2.1.0 vary: 1.1.2 @@ -9763,8 +8492,6 @@ snapshots: dependencies: fast-string-width: 3.0.2 - fastest-levenshtein@1.0.16: {} - fastq@1.19.1: dependencies: reusify: 1.1.0 @@ -9786,9 +8513,9 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@2.1.1(supports-color@9.4.0): + finalhandler@2.1.1(supports-color@10.2.2): dependencies: - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -9887,30 +8614,7 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 - global-modules@2.0.0: - dependencies: - global-prefix: 3.0.0 - - global-prefix@3.0.0: - dependencies: - ini: 1.3.8 - kind-of: 6.0.3 - which: 1.3.1 - - globals@16.5.0: {} - - globals@17.13.0: {} - - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.3 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - - globjoin@0.1.4: {} + globals@17.14.0: {} gopd@1.2.0: {} @@ -9930,15 +8634,13 @@ snapshots: defu: 6.1.7 destr: 2.0.5 iron-webcrypto: 1.2.1 - node-mock-http: 1.0.4 + node-mock-http: 1.0.5 radix3: 1.1.2 ufo: 1.6.4 uncrypto: 0.1.3 hachure-fill@0.5.2: {} - has-flag@4.0.0: {} - has-symbols@1.1.0: {} hashery@1.5.1: @@ -9949,34 +8651,24 @@ snapshots: dependencies: function-bind: 1.1.2 - hast-util-from-html@2.0.3: + hast-util-from-html@2.1.0: dependencies: '@types/hast': 3.0.5 devlop: 1.1.0 - hast-util-from-parse5: 8.0.3 - parse5: 7.3.0 + hast-util-from-parse5: 8.0.4 + parse5: 8.1.1 vfile: 6.0.3 - vfile-message: 4.0.3 + vfile-message: 4.0.4 - hast-util-from-parse5@7.1.2: - dependencies: - '@types/hast': 2.3.10 - '@types/unist': 2.0.11 - hastscript: 7.2.0 - property-information: 6.5.0 - vfile: 5.3.7 - vfile-location: 4.1.0 - web-namespaces: 2.0.1 - - hast-util-from-parse5@8.0.3: + hast-util-from-parse5@8.0.4: dependencies: '@types/hast': 3.0.5 '@types/unist': 3.0.3 devlop: 1.1.0 - hastscript: 9.0.1 - property-information: 7.1.0 + hastscript: 9.0.3 + property-information: 7.2.0 vfile: 6.0.3 - vfile-location: 5.0.3 + vfile-location: 5.0.4 web-namespaces: 2.0.1 hast-util-has-property@3.0.0: @@ -9991,47 +8683,29 @@ snapshots: dependencies: '@types/hast': 3.0.5 - hast-util-parse-selector@3.1.1: - dependencies: - '@types/hast': 2.3.10 - hast-util-parse-selector@4.0.0: dependencies: '@types/hast': 3.0.5 - hast-util-raw@7.2.3: - dependencies: - '@types/hast': 2.3.10 - '@types/parse5': 6.0.3 - hast-util-from-parse5: 7.1.2 - hast-util-to-parse5: 7.1.0 - html-void-elements: 2.0.1 - parse5: 6.0.1 - unist-util-position: 4.0.4 - unist-util-visit: 4.1.2 - vfile: 5.3.7 - web-namespaces: 2.0.1 - zwitch: 2.0.4 - - hast-util-raw@9.1.0: + hast-util-raw@9.2.0: dependencies: '@types/hast': 3.0.5 '@types/unist': 3.0.3 - '@ungap/structured-clone': 1.3.0 - hast-util-from-parse5: 8.0.3 + '@ungap/structured-clone': 1.4.0 + hast-util-from-parse5: 8.0.4 hast-util-to-parse5: 8.0.1 html-void-elements: 3.0.0 mdast-util-to-hast: 13.2.1 - parse5: 7.3.0 + parse5: 8.1.1 unist-util-position: 5.0.0 - unist-util-visit: 5.1.0 + unist-util-visit: 5.2.0 vfile: 6.0.3 web-namespaces: 2.0.1 zwitch: 2.0.4 - hast-util-to-estree@3.1.3(supports-color@9.4.0): + hast-util-to-estree@3.1.3(supports-color@10.2.2): dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 comma-separated-tokens: 2.0.3 @@ -10039,10 +8713,10 @@ snapshots: estree-util-attach-comments: 3.0.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.1(supports-color@9.4.0) - mdast-util-mdx-jsx: 3.2.0(supports-color@9.4.0) - mdast-util-mdxjs-esm: 2.0.1(supports-color@9.4.0) - property-information: 7.1.0 + mdast-util-mdx-expression: 2.0.1(supports-color@10.2.2) + mdast-util-mdx-jsx: 3.2.1(supports-color@10.2.2) + mdast-util-mdxjs-esm: 2.0.1(supports-color@10.2.2) + property-information: 7.2.0 space-separated-tokens: 2.0.2 style-to-js: 1.1.21 unist-util-position: 5.0.0 @@ -10050,21 +8724,7 @@ snapshots: transitivePeerDependencies: - supports-color - hast-util-to-html@8.0.4: - dependencies: - '@types/hast': 2.3.10 - '@types/unist': 2.0.11 - ccount: 2.0.1 - comma-separated-tokens: 2.0.3 - hast-util-raw: 7.2.3 - hast-util-whitespace: 2.0.1 - html-void-elements: 2.0.1 - property-information: 6.5.0 - space-separated-tokens: 2.0.2 - stringify-entities: 4.0.4 - zwitch: 2.0.4 - - hast-util-to-html@9.0.5: + hast-util-to-html@9.0.6: dependencies: '@types/hast': 3.0.5 '@types/unist': 3.0.3 @@ -10073,46 +8733,37 @@ snapshots: hast-util-whitespace: 3.0.0 html-void-elements: 3.0.0 mdast-util-to-hast: 13.2.1 - property-information: 7.1.0 + property-information: 7.2.0 space-separated-tokens: 2.0.2 stringify-entities: 4.0.4 zwitch: 2.0.4 - hast-util-to-jsx-runtime@2.3.6(supports-color@9.4.0): + hast-util-to-jsx-runtime@2.3.7(supports-color@10.2.2): dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 '@types/hast': 3.0.5 '@types/unist': 3.0.3 comma-separated-tokens: 2.0.3 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.1(supports-color@9.4.0) - mdast-util-mdx-jsx: 3.2.0(supports-color@9.4.0) - mdast-util-mdxjs-esm: 2.0.1(supports-color@9.4.0) - property-information: 7.1.0 + mdast-util-mdx-expression: 2.0.1(supports-color@10.2.2) + mdast-util-mdx-jsx: 3.2.1(supports-color@10.2.2) + mdast-util-mdxjs-esm: 2.0.1(supports-color@10.2.2) + property-information: 7.2.0 space-separated-tokens: 2.0.2 - style-to-js: 1.1.21 + style-to-object: 2.0.2 unist-util-position: 5.0.0 - vfile-message: 4.0.3 + vfile-message: 4.0.4 transitivePeerDependencies: - supports-color - hast-util-to-parse5@7.1.0: - dependencies: - '@types/hast': 2.3.10 - comma-separated-tokens: 2.0.3 - property-information: 6.5.0 - space-separated-tokens: 2.0.2 - web-namespaces: 2.0.1 - zwitch: 2.0.4 - hast-util-to-parse5@8.0.1: dependencies: '@types/hast': 3.0.5 comma-separated-tokens: 2.0.3 devlop: 1.1.0 - property-information: 7.1.0 + property-information: 7.2.0 space-separated-tokens: 2.0.2 web-namespaces: 2.0.1 zwitch: 2.0.4 @@ -10121,33 +8772,20 @@ snapshots: dependencies: '@types/hast': 3.0.5 - hast-util-to-text@4.0.2: + hast-util-to-text@4.0.3: dependencies: '@types/hast': 3.0.5 - '@types/unist': 3.0.3 - hast-util-is-element: 3.0.0 - unist-util-find-after: 5.0.0 - - hast-util-whitespace@2.0.1: {} hast-util-whitespace@3.0.0: dependencies: '@types/hast': 3.0.5 - hastscript@7.2.0: - dependencies: - '@types/hast': 2.3.10 - comma-separated-tokens: 2.0.3 - hast-util-parse-selector: 3.1.1 - property-information: 6.5.0 - space-separated-tokens: 2.0.2 - - hastscript@9.0.1: + hastscript@9.0.3: dependencies: '@types/hast': 3.0.5 comma-separated-tokens: 2.0.3 hast-util-parse-selector: 4.0.0 - property-information: 7.1.0 + property-information: 7.2.0 space-separated-tokens: 2.0.2 hono@4.13.3: {} @@ -10164,20 +8802,16 @@ snapshots: html-escaper@3.0.3: {} - html-tags@3.3.1: {} - - html-void-elements@2.0.1: {} - html-void-elements@3.0.0: {} - htmlparser2@7.2.0: + htmlparser2@12.0.0: dependencies: - domelementtype: 2.3.0 - domhandler: 4.3.1 - domutils: 2.8.0 - entities: 3.0.1 + domelementtype: 3.0.0 + domhandler: 6.0.1 + domutils: 4.0.2 + entities: 8.1.0 - htmlparser2@8.0.2: + htmlparser2@9.1.0: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 @@ -10208,28 +8842,23 @@ snapshots: ignore@6.0.2: {} - ignore@7.0.8: {} + ignore@7.0.14: {} immutable@5.1.9: optional: true - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - import-meta-resolve@4.2.0: {} imurmurhash@0.1.4: {} inherits@2.0.4: {} - ini@1.3.8: {} - ini@4.1.3: {} inline-style-parser@0.2.7: {} + inline-style-parser@0.2.9: {} + internmap@1.0.1: {} internmap@2.0.3: {} @@ -10277,12 +8906,12 @@ snapshots: dependencies: is-docker: 3.0.0 + is-network-error@1.3.2: {} + is-number@7.0.0: {} is-plain-obj@4.1.0: {} - is-plain-object@5.1.0: {} - is-promise@4.0.0: {} is-what@5.5.0: {} @@ -10314,14 +8943,12 @@ snapshots: argparse: 1.0.10 esprima: 4.0.1 - js-yaml@4.3.2: + js-yaml@5.5.0: dependencies: - argparse: 2.0.1 + argparse: 3.0.4 jsesc@3.1.0: {} - json-parse-even-better-errors@2.3.1: {} - json-parse-even-better-errors@3.0.2: {} json-schema-traverse@0.4.1: {} @@ -10338,9 +8965,9 @@ snapshots: jsonc-parser@3.3.1: {} - katex@0.18.11: + katex@0.18.10: dependencies: - commander: 15.0.0 + commander: 15.1.0 keyv@5.6.0: dependencies: @@ -10354,8 +8981,6 @@ snapshots: kleur@4.1.5: {} - known-css-properties@0.37.0: {} - kolorist@1.8.0: {} layout-base@1.0.2: {} @@ -10367,88 +8992,39 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lightningcss-android-arm64@1.32.0: - optional: true - lightningcss-android-arm64@1.33.0: optional: true - lightningcss-darwin-arm64@1.32.0: - optional: true - lightningcss-darwin-arm64@1.33.0: optional: true - lightningcss-darwin-x64@1.32.0: - optional: true - lightningcss-darwin-x64@1.33.0: optional: true - lightningcss-freebsd-x64@1.32.0: - optional: true - lightningcss-freebsd-x64@1.33.0: optional: true - lightningcss-linux-arm-gnueabihf@1.32.0: - optional: true - lightningcss-linux-arm-gnueabihf@1.33.0: optional: true - lightningcss-linux-arm64-gnu@1.32.0: - optional: true - lightningcss-linux-arm64-gnu@1.33.0: optional: true - lightningcss-linux-arm64-musl@1.32.0: - optional: true - lightningcss-linux-arm64-musl@1.33.0: optional: true - lightningcss-linux-x64-gnu@1.32.0: - optional: true - lightningcss-linux-x64-gnu@1.33.0: optional: true - lightningcss-linux-x64-musl@1.32.0: - optional: true - lightningcss-linux-x64-musl@1.33.0: optional: true - lightningcss-win32-arm64-msvc@1.32.0: - optional: true - lightningcss-win32-arm64-msvc@1.33.0: optional: true - lightningcss-win32-x64-msvc@1.32.0: - optional: true - lightningcss-win32-x64-msvc@1.33.0: optional: true - lightningcss@1.32.0: - dependencies: - detect-libc: 2.1.2 - optionalDependencies: - lightningcss-android-arm64: 1.32.0 - lightningcss-darwin-arm64: 1.32.0 - lightningcss-darwin-x64: 1.32.0 - lightningcss-freebsd-x64: 1.32.0 - lightningcss-linux-arm-gnueabihf: 1.32.0 - lightningcss-linux-arm64-gnu: 1.32.0 - lightningcss-linux-arm64-musl: 1.32.0 - lightningcss-linux-x64-gnu: 1.32.0 - lightningcss-linux-x64-musl: 1.32.0 - lightningcss-win32-arm64-msvc: 1.32.0 - lightningcss-win32-x64-msvc: 1.32.0 - lightningcss@1.33.0: dependencies: detect-libc: 2.1.2 @@ -10465,10 +9041,6 @@ snapshots: lightningcss-win32-arm64-msvc: 1.33.0 lightningcss-win32-x64-msvc: 1.33.0 - lilconfig@3.1.3: {} - - lines-and-columns@1.2.4: {} - lines-and-columns@2.0.4: {} load-plugin@6.0.3: @@ -10484,17 +9056,11 @@ snapshots: lodash-es@4.18.1: {} - lodash.memoize@4.1.2: {} - - lodash.truncate@4.4.2: {} - - lodash.uniq@4.5.0: {} - longest-streak@3.1.0: {} lru-cache@10.4.3: {} - lru-cache@11.5.2: {} + lru-cache@11.5.3: {} lru-cache@5.1.1: dependencies: @@ -10510,7 +9076,7 @@ snapshots: magicast@0.5.5: dependencies: - '@babel/parser': 7.29.11 + '@babel/parser': 7.29.13 '@babel/types': 7.29.11 source-map-js: 1.2.2 @@ -10522,98 +9088,50 @@ snapshots: math-intrinsics@1.1.0: {} - mathml-tag-names@2.1.3: {} - mdast-util-definitions@6.0.0: dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 - unist-util-visit: 5.1.0 + unist-util-visit: 5.2.0 - mdast-util-directive@2.2.4(supports-color@9.4.0): + mdast-util-directive@3.2.0(supports-color@10.2.2): dependencies: - '@types/mdast': 3.0.15 - '@types/unist': 2.0.11 - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - mdast-util-to-markdown: 1.5.0 + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 + micromark-util-character: 2.1.1 parse-entities: 4.0.2 stringify-entities: 4.0.4 - unist-util-visit-parents: 5.1.3 transitivePeerDependencies: - supports-color - mdast-util-find-and-replace@2.2.2: - dependencies: - '@types/mdast': 3.0.15 - escape-string-regexp: 5.0.0 - unist-util-is: 5.2.1 - unist-util-visit-parents: 5.1.3 - mdast-util-find-and-replace@3.0.2: dependencies: '@types/mdast': 4.0.4 escape-string-regexp: 5.0.0 unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 - - mdast-util-from-markdown@1.3.1(supports-color@9.4.0): - dependencies: - '@types/mdast': 3.0.15 - '@types/unist': 2.0.11 - decode-named-character-reference: 1.2.0 - mdast-util-to-string: 3.2.0 - micromark: 3.2.0(supports-color@9.4.0) - micromark-util-decode-numeric-character-reference: 1.1.0 - micromark-util-decode-string: 1.1.0 - micromark-util-normalize-identifier: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - unist-util-stringify-position: 3.0.3 - uvu: 0.5.6 - transitivePeerDependencies: - - supports-color - - mdast-util-from-markdown@2.0.2(supports-color@9.4.0): - dependencies: - '@types/mdast': 4.0.4 - '@types/unist': 3.0.3 - decode-named-character-reference: 1.2.0 - devlop: 1.1.0 - mdast-util-to-string: 4.0.0 - micromark: 4.0.2(supports-color@9.4.0) - micromark-util-decode-numeric-character-reference: 2.0.2 - micromark-util-decode-string: 2.0.1 - micromark-util-normalize-identifier: 2.0.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - unist-util-stringify-position: 4.0.0 - transitivePeerDependencies: - - supports-color + unist-util-visit-parents: 6.1.0 - mdast-util-from-markdown@2.1.0(supports-color@9.4.0): + mdast-util-from-markdown@2.1.0(supports-color@10.2.2): dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 - decode-named-character-reference: 1.2.0 + decode-named-character-reference: 1.3.0 devlop: 1.1.0 mdast-util-to-string: 4.0.0 - micromark: 4.0.2(supports-color@9.4.0) + micromark: 4.0.3(supports-color@10.2.2) micromark-util-decode-numeric-character-reference: 2.0.2 micromark-util-decode-string: 2.0.1 micromark-util-normalize-identifier: 2.0.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 + micromark-util-types: 2.0.3 unist-util-stringify-position: 4.0.0 transitivePeerDependencies: - supports-color - mdast-util-gfm-autolink-literal@1.0.3: - dependencies: - '@types/mdast': 3.0.15 - ccount: 2.0.1 - mdast-util-find-and-replace: 2.2.2 - micromark-util-character: 1.2.0 - mdast-util-gfm-autolink-literal@2.0.1: dependencies: '@types/mdast': 4.0.4 @@ -10622,131 +9140,67 @@ snapshots: mdast-util-find-and-replace: 3.0.2 micromark-util-character: 2.1.1 - mdast-util-gfm-footnote@1.0.2: - dependencies: - '@types/mdast': 3.0.15 - mdast-util-to-markdown: 1.5.0 - micromark-util-normalize-identifier: 1.1.0 - - mdast-util-gfm-footnote@2.1.0(supports-color@9.4.0): + mdast-util-gfm-footnote@2.1.0(supports-color@10.2.2): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 micromark-util-normalize-identifier: 2.0.1 transitivePeerDependencies: - supports-color - mdast-util-gfm-strikethrough@1.0.3: - dependencies: - '@types/mdast': 3.0.15 - mdast-util-to-markdown: 1.5.0 - - mdast-util-gfm-strikethrough@2.0.0(supports-color@9.4.0): + mdast-util-gfm-strikethrough@2.0.0(supports-color@10.2.2): dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 transitivePeerDependencies: - supports-color - mdast-util-gfm-table@1.0.7(supports-color@9.4.0): - dependencies: - '@types/mdast': 3.0.15 - markdown-table: 3.0.4 - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - mdast-util-to-markdown: 1.5.0 - transitivePeerDependencies: - - supports-color - - mdast-util-gfm-table@2.0.0(supports-color@9.4.0): + mdast-util-gfm-table@2.0.0(supports-color@10.2.2): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 markdown-table: 3.0.4 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 transitivePeerDependencies: - supports-color - mdast-util-gfm-task-list-item@1.0.2: - dependencies: - '@types/mdast': 3.0.15 - mdast-util-to-markdown: 1.5.0 - - mdast-util-gfm-task-list-item@2.0.0(supports-color@9.4.0): + mdast-util-gfm-task-list-item@2.0.0(supports-color@10.2.2): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 - transitivePeerDependencies: - - supports-color - - mdast-util-gfm@2.0.2(supports-color@9.4.0): - dependencies: - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - mdast-util-gfm-autolink-literal: 1.0.3 - mdast-util-gfm-footnote: 1.0.2 - mdast-util-gfm-strikethrough: 1.0.3 - mdast-util-gfm-table: 1.0.7(supports-color@9.4.0) - mdast-util-gfm-task-list-item: 1.0.2 - mdast-util-to-markdown: 1.5.0 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 transitivePeerDependencies: - supports-color - mdast-util-gfm@3.1.0(supports-color@9.4.0): + mdast-util-gfm@3.1.0(supports-color@10.2.2): dependencies: - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) mdast-util-gfm-autolink-literal: 2.0.1 - mdast-util-gfm-footnote: 2.1.0(supports-color@9.4.0) - mdast-util-gfm-strikethrough: 2.0.0(supports-color@9.4.0) - mdast-util-gfm-table: 2.0.0(supports-color@9.4.0) - mdast-util-gfm-task-list-item: 2.0.0(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 - transitivePeerDependencies: - - supports-color - - mdast-util-mdx-expression@1.3.2(supports-color@9.4.0): - dependencies: - '@types/estree-jsx': 1.0.5 - '@types/hast': 2.3.10 - '@types/mdast': 3.0.15 - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - mdast-util-to-markdown: 1.5.0 + mdast-util-gfm-footnote: 2.1.0(supports-color@10.2.2) + mdast-util-gfm-strikethrough: 2.0.0(supports-color@10.2.2) + mdast-util-gfm-table: 2.0.0(supports-color@10.2.2) + mdast-util-gfm-task-list-item: 2.0.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 transitivePeerDependencies: - supports-color - mdast-util-mdx-expression@2.0.1(supports-color@9.4.0): + mdast-util-mdx-expression@2.0.1(supports-color@10.2.2): dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 transitivePeerDependencies: - supports-color - mdast-util-mdx-jsx@2.1.4(supports-color@9.4.0): - dependencies: - '@types/estree-jsx': 1.0.5 - '@types/hast': 2.3.10 - '@types/mdast': 3.0.15 - '@types/unist': 2.0.11 - ccount: 2.0.1 - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - mdast-util-to-markdown: 1.5.0 - parse-entities: 4.0.2 - stringify-entities: 4.0.4 - unist-util-remove-position: 4.0.2 - unist-util-stringify-position: 3.0.3 - vfile-message: 3.1.4 - transitivePeerDependencies: - - supports-color - - mdast-util-mdx-jsx@3.2.0(supports-color@9.4.0): + mdast-util-mdx-jsx@3.2.1(supports-color@10.2.2): dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 @@ -10754,61 +9208,36 @@ snapshots: '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 parse-entities: 4.0.2 stringify-entities: 4.0.4 unist-util-stringify-position: 4.0.0 - vfile-message: 4.0.3 - transitivePeerDependencies: - - supports-color - - mdast-util-mdx@2.0.1(supports-color@9.4.0): - dependencies: - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - mdast-util-mdx-expression: 1.3.2(supports-color@9.4.0) - mdast-util-mdx-jsx: 2.1.4(supports-color@9.4.0) - mdast-util-mdxjs-esm: 1.3.1(supports-color@9.4.0) - mdast-util-to-markdown: 1.5.0 - transitivePeerDependencies: - - supports-color - - mdast-util-mdx@3.0.0(supports-color@9.4.0): - dependencies: - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-mdx-expression: 2.0.1(supports-color@9.4.0) - mdast-util-mdx-jsx: 3.2.0(supports-color@9.4.0) - mdast-util-mdxjs-esm: 2.0.1(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 + vfile-message: 4.0.4 transitivePeerDependencies: - supports-color - mdast-util-mdxjs-esm@1.3.1(supports-color@9.4.0): + mdast-util-mdx@3.0.0(supports-color@10.2.2): dependencies: - '@types/estree-jsx': 1.0.5 - '@types/hast': 2.3.10 - '@types/mdast': 3.0.15 - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - mdast-util-to-markdown: 1.5.0 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-mdx-expression: 2.0.1(supports-color@10.2.2) + mdast-util-mdx-jsx: 3.2.1(supports-color@10.2.2) + mdast-util-mdxjs-esm: 2.0.1(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 transitivePeerDependencies: - supports-color - mdast-util-mdxjs-esm@2.0.1(supports-color@9.4.0): + mdast-util-mdxjs-esm@2.0.1(supports-color@10.2.2): dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - mdast-util-to-markdown: 2.1.2 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + mdast-util-to-markdown: 2.2.3 transitivePeerDependencies: - supports-color - mdast-util-phrasing@3.0.1: - dependencies: - '@types/mdast': 3.0.15 - unist-util-is: 5.2.1 - mdast-util-phrasing@4.1.0: dependencies: '@types/mdast': 4.0.4 @@ -10818,60 +9247,43 @@ snapshots: dependencies: '@types/hast': 3.0.5 '@types/mdast': 4.0.4 - '@ungap/structured-clone': 1.3.0 + '@ungap/structured-clone': 1.4.0 devlop: 1.1.0 micromark-util-sanitize-uri: 2.0.1 trim-lines: 3.0.1 unist-util-position: 5.0.0 - unist-util-visit: 5.1.0 + unist-util-visit: 5.2.0 vfile: 6.0.3 - mdast-util-to-markdown@1.5.0: - dependencies: - '@types/mdast': 3.0.15 - '@types/unist': 2.0.11 - longest-streak: 3.1.0 - mdast-util-phrasing: 3.0.1 - mdast-util-to-string: 3.2.0 - micromark-util-decode-string: 1.1.0 - unist-util-visit: 4.1.2 - zwitch: 2.0.4 - - mdast-util-to-markdown@2.1.2: + mdast-util-to-markdown@2.2.3: dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 longest-streak: 3.1.0 mdast-util-phrasing: 4.1.0 mdast-util-to-string: 4.0.0 + micromark-util-character: 2.1.1 micromark-util-classify-character: 2.0.1 micromark-util-decode-string: 2.0.1 - unist-util-visit: 5.1.0 + micromark-util-html-tag-name: 2.0.1 + unist-util-visit: 5.2.0 zwitch: 2.0.4 - mdast-util-to-string@3.2.0: - dependencies: - '@types/mdast': 3.0.15 - mdast-util-to-string@4.0.0: dependencies: '@types/mdast': 4.0.4 mdn-data@2.0.28: {} - mdn-data@2.0.30: {} - - mdn-data@2.12.2: {} + mdn-data@2.27.1: {} media-typer@1.1.1: {} - meow@13.2.0: {} - merge-descriptors@2.0.0: {} merge2@1.4.1: {} - mermaid@12.2.0: + mermaid@12.3.0: dependencies: '@braintree/sanitize-url': 7.1.2 '@iconify/utils': 3.1.7 @@ -10879,116 +9291,70 @@ snapshots: '@types/d3': 7.4.3 '@upsetjs/venn.js': 2.0.0 chevrotain: 13.2.0 - cytoscape: 3.34.3 - cytoscape-cose-bilkent: 4.1.0(cytoscape@3.34.3) - cytoscape-fcose: 2.2.0(cytoscape@3.34.3) - d3: 7.9.0 + cytoscape: 3.34.4 + cytoscape-cose-bilkent: 4.1.0(cytoscape@3.34.4) + cytoscape-fcose: 2.2.0(cytoscape@3.34.4) + d3: 7.9.2 d3-sankey: 0.12.3 dagre-d3-es: 7.0.14 dayjs: 1.11.23 dompurify: 3.4.17 - elkjs: 0.9.3 - es-toolkit: 1.52.0 - katex: 0.18.11 + elkjs: 0.12.1 + es-toolkit: 1.53.2 + katex: 0.18.10 khroma: 2.1.0 marked: 16.4.2 roughjs: 4.6.6 stylis: 4.4.0 ts-dedent: 2.3.0 - uuid: 14.0.2 - - micromark-core-commonmark@1.1.0: - dependencies: - decode-named-character-reference: 1.2.0 - micromark-factory-destination: 1.1.0 - micromark-factory-label: 1.1.0 - micromark-factory-space: 1.1.0 - micromark-factory-title: 1.1.0 - micromark-factory-whitespace: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-chunked: 1.1.0 - micromark-util-classify-character: 1.1.0 - micromark-util-html-tag-name: 1.2.0 - micromark-util-normalize-identifier: 1.1.0 - micromark-util-resolve-all: 1.1.0 - micromark-util-subtokenize: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - - micromark-core-commonmark@2.0.3: - dependencies: - decode-named-character-reference: 1.2.0 + + micromark-core-commonmark@2.0.4: + dependencies: + decode-named-character-reference: 1.3.0 devlop: 1.1.0 micromark-factory-destination: 2.0.1 micromark-factory-label: 2.0.1 - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-factory-title: 2.0.1 micromark-factory-whitespace: 2.0.1 micromark-util-character: 2.1.1 micromark-util-chunked: 2.0.1 micromark-util-classify-character: 2.0.1 + micromark-util-edit-map: 1.0.0 micromark-util-html-tag-name: 2.0.1 micromark-util-normalize-identifier: 2.0.1 micromark-util-resolve-all: 2.0.1 micromark-util-subtokenize: 2.1.0 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 + micromark-util-types: 2.0.3 - micromark-extension-directive@2.2.1: + micromark-extension-directive@3.0.2: dependencies: - micromark-factory-space: 1.1.0 - micromark-factory-whitespace: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 + devlop: 1.1.0 + micromark-factory-space: 2.1.0 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 parse-entities: 4.0.2 - uvu: 0.5.6 - - micromark-extension-gfm-autolink-literal@1.0.5: - dependencies: - micromark-util-character: 1.2.0 - micromark-util-sanitize-uri: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 micromark-extension-gfm-autolink-literal@2.1.0: dependencies: micromark-util-character: 2.1.1 micromark-util-sanitize-uri: 2.0.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm-footnote@1.1.2: - dependencies: - micromark-core-commonmark: 1.1.0 - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-normalize-identifier: 1.1.0 - micromark-util-sanitize-uri: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 + micromark-util-types: 2.0.3 micromark-extension-gfm-footnote@2.1.0: dependencies: devlop: 1.1.0 - micromark-core-commonmark: 2.0.3 - micromark-factory-space: 2.0.1 + micromark-core-commonmark: 2.0.4 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-normalize-identifier: 2.0.1 micromark-util-sanitize-uri: 2.0.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm-strikethrough@1.0.7: - dependencies: - micromark-util-chunked: 1.1.0 - micromark-util-classify-character: 1.1.0 - micromark-util-resolve-all: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 + micromark-util-types: 2.0.3 micromark-extension-gfm-strikethrough@2.1.0: dependencies: @@ -10997,58 +9363,27 @@ snapshots: micromark-util-classify-character: 2.0.1 micromark-util-resolve-all: 2.0.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm-table@1.0.7: - dependencies: - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 + micromark-util-types: 2.0.3 micromark-extension-gfm-table@2.1.1: dependencies: devlop: 1.1.0 - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 + micromark-util-types: 2.0.3 - micromark-extension-gfm-tagfilter@1.0.2: + micromark-extension-gfm-tagfilter@2.0.0: dependencies: - micromark-util-types: 1.1.0 - - micromark-extension-gfm-tagfilter@2.0.0: - dependencies: - micromark-util-types: 2.0.2 - - micromark-extension-gfm-task-list-item@1.0.5: - dependencies: - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 + micromark-util-types: 2.0.3 micromark-extension-gfm-task-list-item@2.1.0: dependencies: devlop: 1.1.0 - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm@2.0.3: - dependencies: - micromark-extension-gfm-autolink-literal: 1.0.5 - micromark-extension-gfm-footnote: 1.1.2 - micromark-extension-gfm-strikethrough: 1.0.7 - micromark-extension-gfm-table: 1.0.7 - micromark-extension-gfm-tagfilter: 1.0.2 - micromark-extension-gfm-task-list-item: 1.0.5 - micromark-util-combine-extensions: 1.1.0 - micromark-util-types: 1.1.0 + micromark-util-types: 2.0.3 micromark-extension-gfm@3.0.0: dependencies: @@ -11059,309 +9394,159 @@ snapshots: micromark-extension-gfm-tagfilter: 2.0.0 micromark-extension-gfm-task-list-item: 2.1.0 micromark-util-combine-extensions: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-mdx-expression@1.0.8: - dependencies: - '@types/estree': 1.0.9 - micromark-factory-mdx-expression: 1.0.9 - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-events-to-acorn: 1.2.3 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 + micromark-util-types: 2.0.3 micromark-extension-mdx-expression@3.0.1: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 devlop: 1.1.0 micromark-factory-mdx-expression: 2.0.3 - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-events-to-acorn: 2.0.3 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-mdx-jsx@1.0.5: - dependencies: - '@types/acorn': 4.0.6 - '@types/estree': 1.0.9 - estree-util-is-identifier-name: 2.1.0 - micromark-factory-mdx-expression: 1.0.9 - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - vfile-message: 3.1.4 + micromark-util-types: 2.0.3 micromark-extension-mdx-jsx@3.0.2: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 micromark-factory-mdx-expression: 2.0.3 - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-events-to-acorn: 2.0.3 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - vfile-message: 4.0.3 - - micromark-extension-mdx-md@1.0.1: - dependencies: - micromark-util-types: 1.1.0 + micromark-util-types: 2.0.3 + vfile-message: 4.0.4 micromark-extension-mdx-md@2.0.0: dependencies: - micromark-util-types: 2.0.2 - - micromark-extension-mdxjs-esm@1.0.5: - dependencies: - '@types/estree': 1.0.9 - micromark-core-commonmark: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-events-to-acorn: 1.2.3 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - unist-util-position-from-estree: 1.1.2 - uvu: 0.5.6 - vfile-message: 3.1.4 + micromark-util-types: 2.0.3 micromark-extension-mdxjs-esm@3.0.0: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 devlop: 1.1.0 - micromark-core-commonmark: 2.0.3 + micromark-core-commonmark: 2.0.4 micromark-util-character: 2.1.1 micromark-util-events-to-acorn: 2.0.3 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 + micromark-util-types: 2.0.3 unist-util-position-from-estree: 2.0.0 - vfile-message: 4.0.3 - - micromark-extension-mdxjs@1.0.1: - dependencies: - acorn: 8.18.0 - acorn-jsx: 5.3.2(acorn@8.18.0) - micromark-extension-mdx-expression: 1.0.8 - micromark-extension-mdx-jsx: 1.0.5 - micromark-extension-mdx-md: 1.0.1 - micromark-extension-mdxjs-esm: 1.0.5 - micromark-util-combine-extensions: 1.1.0 - micromark-util-types: 1.1.0 + vfile-message: 4.0.4 micromark-extension-mdxjs@3.0.0: dependencies: - acorn: 8.18.0 - acorn-jsx: 5.3.2(acorn@8.18.0) + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) micromark-extension-mdx-expression: 3.0.1 micromark-extension-mdx-jsx: 3.0.2 micromark-extension-mdx-md: 2.0.0 micromark-extension-mdxjs-esm: 3.0.0 micromark-util-combine-extensions: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-destination@1.1.0: - dependencies: - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 + micromark-util-types: 2.0.3 micromark-factory-destination@2.0.1: dependencies: micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-label@1.1.0: - dependencies: - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 + micromark-util-types: 2.0.3 micromark-factory-label@2.0.1: dependencies: devlop: 1.1.0 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-mdx-expression@1.0.9: - dependencies: - '@types/estree': 1.0.9 - micromark-util-character: 1.2.0 - micromark-util-events-to-acorn: 1.2.3 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - unist-util-position-from-estree: 1.1.2 - uvu: 0.5.6 - vfile-message: 3.1.4 + micromark-util-types: 2.0.3 micromark-factory-mdx-expression@2.0.3: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 devlop: 1.1.0 - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-events-to-acorn: 2.0.3 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 + micromark-util-types: 2.0.3 unist-util-position-from-estree: 2.0.0 - vfile-message: 4.0.3 + vfile-message: 4.0.4 - micromark-factory-space@1.1.0: - dependencies: - micromark-util-character: 1.2.0 - micromark-util-types: 1.1.0 - - micromark-factory-space@2.0.1: + micromark-factory-space@2.1.0: dependencies: micromark-util-character: 2.1.1 - micromark-util-types: 2.0.2 - - micromark-factory-title@1.1.0: - dependencies: - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 + micromark-util-types: 2.0.3 micromark-factory-title@2.0.1: dependencies: - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-whitespace@1.1.0: - dependencies: - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 + micromark-util-types: 2.0.3 micromark-factory-whitespace@2.0.1: dependencies: - micromark-factory-space: 2.0.1 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-character@1.2.0: - dependencies: - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 + micromark-util-types: 2.0.3 micromark-util-character@2.1.1: dependencies: micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-chunked@1.1.0: - dependencies: - micromark-util-symbol: 1.1.0 + micromark-util-types: 2.0.3 micromark-util-chunked@2.0.1: dependencies: micromark-util-symbol: 2.0.1 - micromark-util-classify-character@1.1.0: - dependencies: - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - micromark-util-classify-character@2.0.1: dependencies: micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-combine-extensions@1.1.0: - dependencies: - micromark-util-chunked: 1.1.0 - micromark-util-types: 1.1.0 + micromark-util-types: 2.0.3 micromark-util-combine-extensions@2.0.1: dependencies: micromark-util-chunked: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-decode-numeric-character-reference@1.1.0: - dependencies: - micromark-util-symbol: 1.1.0 + micromark-util-types: 2.0.3 micromark-util-decode-numeric-character-reference@2.0.2: dependencies: micromark-util-symbol: 2.0.1 - micromark-util-decode-string@1.1.0: - dependencies: - decode-named-character-reference: 1.2.0 - micromark-util-character: 1.2.0 - micromark-util-decode-numeric-character-reference: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-decode-string@2.0.1: dependencies: - decode-named-character-reference: 1.2.0 + decode-named-character-reference: 1.3.0 micromark-util-character: 2.1.1 micromark-util-decode-numeric-character-reference: 2.0.2 micromark-util-symbol: 2.0.1 - micromark-util-encode@1.1.0: {} + micromark-util-edit-map@1.0.0: + dependencies: + micromark-util-types: 2.0.3 micromark-util-encode@2.0.1: {} - micromark-util-events-to-acorn@1.2.3: - dependencies: - '@types/acorn': 4.0.6 - '@types/estree': 1.0.9 - '@types/unist': 2.0.11 - estree-util-visit: 1.2.1 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - vfile-message: 3.1.4 - micromark-util-events-to-acorn@2.0.3: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 '@types/unist': 3.0.3 devlop: 1.1.0 estree-util-visit: 2.0.0 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - vfile-message: 4.0.3 - - micromark-util-html-tag-name@1.2.0: {} + micromark-util-types: 2.0.3 + vfile-message: 4.0.4 micromark-util-html-tag-name@2.0.1: {} - micromark-util-normalize-identifier@1.1.0: - dependencies: - micromark-util-symbol: 1.1.0 - micromark-util-normalize-identifier@2.0.1: dependencies: micromark-util-symbol: 2.0.1 - micromark-util-resolve-all@1.1.0: - dependencies: - micromark-util-types: 1.1.0 - micromark-util-resolve-all@2.0.1: dependencies: - micromark-util-types: 2.0.2 - - micromark-util-sanitize-uri@1.2.0: - dependencies: - micromark-util-character: 1.2.0 - micromark-util-encode: 1.1.0 - micromark-util-symbol: 1.1.0 + micromark-util-types: 2.0.3 micromark-util-sanitize-uri@2.0.1: dependencies: @@ -11369,69 +9554,37 @@ snapshots: micromark-util-encode: 2.0.1 micromark-util-symbol: 2.0.1 - micromark-util-subtokenize@1.1.0: - dependencies: - micromark-util-chunked: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - micromark-util-subtokenize@2.1.0: dependencies: devlop: 1.1.0 micromark-util-chunked: 2.0.1 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-symbol@1.1.0: {} + micromark-util-types: 2.0.3 micromark-util-symbol@2.0.1: {} - micromark-util-types@1.1.0: {} - - micromark-util-types@2.0.2: {} - - micromark@3.2.0(supports-color@9.4.0): - dependencies: - '@types/debug': 4.1.12 - debug: 4.4.3(supports-color@9.4.0) - decode-named-character-reference: 1.2.0 - micromark-core-commonmark: 1.1.0 - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-chunked: 1.1.0 - micromark-util-combine-extensions: 1.1.0 - micromark-util-decode-numeric-character-reference: 1.1.0 - micromark-util-encode: 1.1.0 - micromark-util-normalize-identifier: 1.1.0 - micromark-util-resolve-all: 1.1.0 - micromark-util-sanitize-uri: 1.2.0 - micromark-util-subtokenize: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - transitivePeerDependencies: - - supports-color + micromark-util-types@2.0.3: {} - micromark@4.0.2(supports-color@9.4.0): + micromark@4.0.3(supports-color@10.2.2): dependencies: - '@types/debug': 4.1.12 - debug: 4.4.3(supports-color@9.4.0) - decode-named-character-reference: 1.2.0 + '@types/debug': 4.1.13 + debug: 4.4.3(supports-color@10.2.2) + decode-named-character-reference: 1.3.0 devlop: 1.1.0 - micromark-core-commonmark: 2.0.3 - micromark-factory-space: 2.0.1 + micromark-core-commonmark: 2.0.4 + micromark-factory-space: 2.1.0 micromark-util-character: 2.1.1 micromark-util-chunked: 2.0.1 micromark-util-combine-extensions: 2.0.1 micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-edit-map: 1.0.0 micromark-util-encode: 2.0.1 micromark-util-normalize-identifier: 2.0.1 micromark-util-resolve-all: 2.0.1 micromark-util-sanitize-uri: 2.0.1 micromark-util-subtokenize: 2.1.0 micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 + micromark-util-types: 2.0.3 transitivePeerDependencies: - supports-color @@ -11458,8 +9611,6 @@ snapshots: mitt@3.0.1: {} - mri@1.2.0: {} - mrmime@2.0.1: {} ms@2.1.3: {} @@ -11476,10 +9627,6 @@ snapshots: neotraverse@1.0.1: {} - nlcst-to-string@3.1.1: - dependencies: - '@types/nlcst': 1.0.4 - nlcst-to-string@4.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -11497,9 +9644,9 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-mock-http@1.0.4: {} + node-mock-http@1.0.5: {} - node-releases@2.0.57: {} + node-releases@2.0.63: {} nopt@7.2.1: dependencies: @@ -11508,14 +9655,14 @@ snapshots: normalize-package-data@6.0.2: dependencies: hosted-git-info: 7.0.2 - semver: 7.8.5 + semver: 7.8.6 validate-npm-package-license: 3.0.4 normalize-path@3.0.0: {} npm-install-checks@6.3.0: dependencies: - semver: 7.8.5 + semver: 7.8.6 npm-normalize-package-bin@3.0.1: {} @@ -11523,7 +9670,7 @@ snapshots: dependencies: hosted-git-info: 7.0.2 proc-log: 4.2.0 - semver: 7.8.5 + semver: 7.8.6 validate-npm-package-name: 5.0.1 npm-pick-manifest@9.1.0: @@ -11531,7 +9678,7 @@ snapshots: npm-install-checks: 6.3.0 npm-normalize-package-bin: 3.0.1 npm-package-arg: 11.0.3 - semver: 7.8.5 + semver: 7.8.6 nth-check@2.1.1: dependencies: @@ -11605,45 +9752,26 @@ snapshots: dependencies: p-limit: 3.1.0 - p-queue@9.3.5: - dependencies: - eventemitter3: 5.0.4 - p-timeout: 7.0.1 + p-queue@10.0.0: {} - p-retry@5.1.2: + p-retry@9.0.0: dependencies: - '@types/retry': 0.12.1 - retry: 0.13.1 - - p-timeout@7.0.1: {} + is-network-error: 1.3.2 package-json-from-dist@1.0.1: {} - package-manager-detector@1.8.0: {} - package-manager-detector@1.9.0: {} - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - parse-entities@4.0.2: dependencies: '@types/unist': 2.0.11 character-entities-legacy: 3.0.0 character-reference-invalid: 2.0.1 - decode-named-character-reference: 1.2.0 + decode-named-character-reference: 1.3.0 is-alphanumerical: 2.0.1 is-decimal: 2.0.1 is-hexadecimal: 2.0.1 - parse-json@5.2.0: - dependencies: - '@babel/code-frame': 7.29.7 - error-ex: 1.3.4 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - parse-json@7.1.1: dependencies: '@babel/code-frame': 7.29.7 @@ -11652,12 +9780,6 @@ snapshots: lines-and-columns: 2.0.4 type-fest: 3.13.1 - parse-latin@5.0.1: - dependencies: - nlcst-to-string: 3.1.1 - unist-util-modify-children: 3.1.1 - unist-util-visit-children: 2.0.2 - parse-latin@7.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -11667,11 +9789,9 @@ snapshots: unist-util-visit-children: 3.0.0 vfile: 6.0.3 - parse5@6.0.1: {} - - parse5@7.3.0: + parse5@8.1.1: dependencies: - entities: 6.0.1 + entities: 9.0.0 parseurl@1.3.3: {} @@ -11690,8 +9810,6 @@ snapshots: path-to-regexp@8.4.2: {} - path-type@4.0.0: {} - pathe@2.0.3: {} perfect-debounce@1.0.0: {} @@ -11715,198 +9833,39 @@ snapshots: path-data-parser: 0.1.0 points-on-curve: 0.2.0 - postcss-calc@9.0.1(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-selector-parser: 6.1.2 - postcss-value-parser: 4.2.0 - - postcss-colormin@6.1.0(postcss@8.5.31): - dependencies: - browserslist: 4.29.3 - caniuse-api: 3.0.0 - colord: 2.9.3 - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-convert-values@6.1.0(postcss@8.5.31): - dependencies: - browserslist: 4.29.3 - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-discard-comments@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - - postcss-discard-duplicates@6.0.3(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - - postcss-discard-empty@6.0.3(postcss@8.5.31): + postcss-calc@11.2.3(postcss@8.5.32): dependencies: - postcss: 8.5.31 + '@csstools/css-tokenizer': 4.0.2 + postcss: 8.5.32 - postcss-discard-overridden@6.0.2(postcss@8.5.31): + postcss-html@2.0.0(postcss@8.5.32): dependencies: - postcss: 8.5.31 - - postcss-html@1.8.1: - dependencies: - htmlparser2: 8.0.2 + htmlparser2: 9.1.0 js-tokens: 9.0.1 - postcss: 8.5.28 - postcss-safe-parser: 6.0.0(postcss@8.5.28) - - postcss-merge-longhand@6.0.5(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - stylehacks: 6.1.1(postcss@8.5.31) - - postcss-merge-rules@6.1.1(postcss@8.5.31): - dependencies: - browserslist: 4.29.3 - caniuse-api: 3.0.0 - cssnano-utils: 4.0.2(postcss@8.5.31) - postcss: 8.5.31 - postcss-selector-parser: 6.1.2 - - postcss-minify-font-values@6.1.0(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-minify-gradients@6.0.3(postcss@8.5.31): - dependencies: - colord: 2.9.3 - cssnano-utils: 4.0.2(postcss@8.5.31) - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-minify-params@6.1.0(postcss@8.5.31): - dependencies: - browserslist: 4.29.3 - cssnano-utils: 4.0.2(postcss@8.5.31) - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-minify-selectors@6.0.4(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-selector-parser: 6.1.2 - - postcss-normalize-charset@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - - postcss-normalize-display-values@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-normalize-positions@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-normalize-repeat-style@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-normalize-string@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-normalize-timing-functions@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-normalize-unicode@6.1.0(postcss@8.5.31): - dependencies: - browserslist: 4.29.3 - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-normalize-url@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-normalize-whitespace@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-ordered-values@6.0.2(postcss@8.5.31): - dependencies: - cssnano-utils: 4.0.2(postcss@8.5.31) - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-reduce-initial@6.1.0(postcss@8.5.31): - dependencies: - browserslist: 4.29.3 - caniuse-api: 3.0.0 - postcss: 8.5.31 - - postcss-reduce-transforms@6.0.2(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - - postcss-resolve-nested-selector@0.1.6: {} - - postcss-safe-parser@6.0.0(postcss@8.5.28): - dependencies: - postcss: 8.5.28 + postcss: 8.5.32 + postcss-safe-parser: 7.1.0(postcss@8.5.32) - postcss-safe-parser@7.0.1(postcss@8.5.28): + postcss-safe-parser@7.1.0(postcss@8.5.32): dependencies: - postcss: 8.5.28 + postcss: 8.5.32 - postcss-scss@4.0.9(postcss@8.5.28): + postcss-scss@4.0.9(postcss@8.5.32): dependencies: - postcss: 8.5.28 + postcss: 8.5.32 postcss-selector-parser@6.0.10: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-selector-parser@6.1.2: + postcss-selector-parser@7.1.7: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-selector-parser@7.1.5: - dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 - - postcss-svgo@6.0.3(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-value-parser: 4.2.0 - svgo: 3.3.5 - - postcss-unique-selectors@6.0.4(postcss@8.5.31): - dependencies: - postcss: 8.5.31 - postcss-selector-parser: 6.1.2 - postcss-value-parser@4.2.0: {} - postcss@8.5.28: - dependencies: - nanoid: 3.3.20 - picocolors: 1.1.1 - source-map-js: 1.2.2 - - postcss@8.5.31: + postcss@8.5.32: dependencies: nanoid: 3.3.20 picocolors: 1.1.1 @@ -11918,16 +9877,14 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-astro@0.8.1: + prettier-plugin-astro@1.1.2(prettier@3.9.10): dependencies: - '@astrojs/compiler': 1.8.2 - prettier: 2.8.8 - sass-formatter: 0.7.9 - synckit: 0.8.8 - - prettier@2.8.8: {} + '@astrojs/compiler-rs': 0.5.2 + '@prettier/parse-srcset': 3.1.0 + prettier: 3.9.10 + sass-formatter: 0.8.0 - prettier@3.9.6: {} + prettier@3.9.10: {} prismjs@1.30.0: {} @@ -11947,9 +9904,7 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 - property-information@6.5.0: {} - - property-information@7.1.0: {} + property-information@7.2.0: {} proxy-addr@2.0.8: dependencies: @@ -11995,14 +9950,14 @@ snapshots: recma-build-jsx@1.0.0: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 estree-util-build-jsx: 3.0.1 vfile: 6.0.3 - recma-jsx@1.0.1(acorn@8.18.0): + recma-jsx@1.0.1(acorn@8.19.0): dependencies: - acorn: 8.18.0 - acorn-jsx: 5.3.2(acorn@8.18.0) + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) estree-util-to-js: 2.0.0 recma-parse: 1.0.0 recma-stringify: 1.0.0 @@ -12010,14 +9965,14 @@ snapshots: recma-parse@1.0.0: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 esast-util-from-js: 2.0.1 unified: 11.0.5 vfile: 6.0.3 recma-stringify@1.0.0: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 estree-util-to-js: 2.0.0 unified: 11.0.5 vfile: 6.0.3 @@ -12035,88 +9990,64 @@ snapshots: rehype-autolink-headings@7.1.0: dependencies: '@types/hast': 3.0.5 - '@ungap/structured-clone': 1.3.0 + '@ungap/structured-clone': 1.4.0 hast-util-heading-rank: 3.0.0 hast-util-is-element: 3.0.0 unified: 11.0.5 - unist-util-visit: 5.1.0 + unist-util-visit: 5.2.0 rehype-raw@7.0.0: dependencies: '@types/hast': 3.0.5 - hast-util-raw: 9.1.0 + hast-util-raw: 9.2.0 vfile: 6.0.3 - rehype-recma@1.0.0(supports-color@9.4.0): + rehype-recma@1.0.0(supports-color@10.2.2): dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 '@types/hast': 3.0.5 - hast-util-to-estree: 3.1.3(supports-color@9.4.0) + hast-util-to-estree: 3.1.3(supports-color@10.2.2) transitivePeerDependencies: - supports-color rehype-stringify@10.0.1: dependencies: '@types/hast': 3.0.5 - hast-util-to-html: 9.0.5 + hast-util-to-html: 9.0.6 unified: 11.0.5 - remark-directive@2.0.1(supports-color@9.4.0): - dependencies: - '@types/mdast': 3.0.15 - mdast-util-directive: 2.2.4(supports-color@9.4.0) - micromark-extension-directive: 2.2.1 - unified: 10.1.2 - transitivePeerDependencies: - - supports-color - - remark-gfm@3.0.1(supports-color@9.4.0): + remark-directive@3.0.1(supports-color@10.2.2): dependencies: - '@types/mdast': 3.0.15 - mdast-util-gfm: 2.0.2(supports-color@9.4.0) - micromark-extension-gfm: 2.0.3 - unified: 10.1.2 + '@types/mdast': 4.0.4 + mdast-util-directive: 3.2.0(supports-color@10.2.2) + micromark-extension-directive: 3.0.2 + unified: 11.0.5 transitivePeerDependencies: - supports-color - remark-gfm@4.0.1(supports-color@9.4.0): + remark-gfm@4.0.1(supports-color@10.2.2): dependencies: '@types/mdast': 4.0.4 - mdast-util-gfm: 3.1.0(supports-color@9.4.0) + mdast-util-gfm: 3.1.0(supports-color@10.2.2) micromark-extension-gfm: 3.0.0 - remark-parse: 11.0.0(supports-color@9.4.0) + remark-parse: 11.0.0(supports-color@10.2.2) remark-stringify: 11.0.0 unified: 11.0.5 transitivePeerDependencies: - supports-color - remark-mdx@2.3.0(supports-color@9.4.0): + remark-mdx@3.1.1(supports-color@10.2.2): dependencies: - mdast-util-mdx: 2.0.1(supports-color@9.4.0) - micromark-extension-mdxjs: 1.0.1 - transitivePeerDependencies: - - supports-color - - remark-mdx@3.1.1(supports-color@9.4.0): - dependencies: - mdast-util-mdx: 3.0.0(supports-color@9.4.0) + mdast-util-mdx: 3.0.0(supports-color@10.2.2) micromark-extension-mdxjs: 3.0.0 transitivePeerDependencies: - supports-color - remark-parse@10.0.2(supports-color@9.4.0): - dependencies: - '@types/mdast': 3.0.15 - mdast-util-from-markdown: 1.3.1(supports-color@9.4.0) - unified: 10.1.2 - transitivePeerDependencies: - - supports-color - - remark-parse@11.0.0(supports-color@9.4.0): + remark-parse@11.0.0(supports-color@10.2.2): dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.2(supports-color@9.4.0) - micromark-util-types: 2.0.2 + mdast-util-from-markdown: 2.1.0(supports-color@10.2.2) + micromark-util-types: 2.0.3 unified: 11.0.5 transitivePeerDependencies: - supports-color @@ -12129,44 +10060,25 @@ snapshots: unified: 11.0.5 vfile: 6.0.3 - remark-smartypants@2.1.0: - dependencies: - retext: 8.1.0 - retext-smartypants: 5.2.0 - unist-util-visit: 5.1.0 - - remark-smartypants@3.0.2: - dependencies: - retext: 9.0.0 - retext-smartypants: 6.2.0 - unified: 11.0.5 - unist-util-visit: 5.1.0 - remark-smartypants@3.0.3: dependencies: retext: 9.0.0 retext-smartypants: 6.2.0 unified: 11.0.5 - unist-util-visit: 5.1.0 - - remark-stringify@10.0.3: - dependencies: - '@types/mdast': 3.0.15 - mdast-util-to-markdown: 1.5.0 - unified: 10.1.2 + unist-util-visit: 5.2.0 remark-stringify@11.0.0: dependencies: '@types/mdast': 4.0.4 - mdast-util-to-markdown: 2.1.2 + mdast-util-to-markdown: 2.2.3 unified: 11.0.5 - remark@14.0.3(supports-color@9.4.0): + remark@15.0.1(supports-color@10.2.2): dependencies: - '@types/mdast': 3.0.15 - remark-parse: 10.0.2(supports-color@9.4.0) - remark-stringify: 10.0.3 - unified: 10.1.2 + '@types/mdast': 4.0.4 + remark-parse: 11.0.0(supports-color@10.2.2) + remark-stringify: 11.0.0 + unified: 11.0.5 transitivePeerDependencies: - supports-color @@ -12176,43 +10088,19 @@ snapshots: require-from-string@2.0.2: {} - resolve-from@4.0.0: {} - - resolve-from@5.0.0: {} - resolve-pkg-maps@1.0.0: {} - retext-latin@3.1.0: - dependencies: - '@types/nlcst': 1.0.4 - parse-latin: 5.0.1 - unherit: 3.0.1 - unified: 10.1.2 - retext-latin@4.0.0: dependencies: '@types/nlcst': 2.0.3 parse-latin: 7.0.0 unified: 11.0.5 - retext-smartypants@5.2.0: - dependencies: - '@types/nlcst': 1.0.4 - nlcst-to-string: 3.1.1 - unified: 10.1.2 - unist-util-visit: 4.1.2 - retext-smartypants@6.2.0: dependencies: '@types/nlcst': 2.0.3 nlcst-to-string: 4.0.0 - unist-util-visit: 5.1.0 - - retext-stringify@3.1.0: - dependencies: - '@types/nlcst': 1.0.4 - nlcst-to-string: 3.1.1 - unified: 10.1.2 + unist-util-visit: 5.2.0 retext-stringify@4.0.0: dependencies: @@ -12220,13 +10108,6 @@ snapshots: nlcst-to-string: 4.0.0 unified: 11.0.5 - retext@8.1.0: - dependencies: - '@types/nlcst': 1.0.4 - retext-latin: 3.1.0 - retext-stringify: 3.1.0 - unified: 10.1.2 - retext@9.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -12236,34 +10117,32 @@ snapshots: retry@0.12.0: {} - retry@0.13.1: {} - reusify@1.1.0: {} rfdc@1.4.1: {} robust-predicates@3.0.3: {} - rolldown@1.2.14: + rolldown@1.2.16: dependencies: - '@oxc-project/types': 0.154.0 + '@oxc-project/types': 0.156.0 '@rolldown/pluginutils': 1.0.1 optionalDependencies: - '@rolldown/binding-android-arm-eabi': 1.2.14 - '@rolldown/binding-android-arm64': 1.2.14 - '@rolldown/binding-darwin-arm64': 1.2.14 - '@rolldown/binding-darwin-x64': 1.2.14 - '@rolldown/binding-freebsd-x64': 1.2.14 - '@rolldown/binding-linux-arm-gnueabihf': 1.2.14 - '@rolldown/binding-linux-arm64-gnu': 1.2.14 - '@rolldown/binding-linux-arm64-musl': 1.2.14 - '@rolldown/binding-linux-ppc64-gnu': 1.2.14 - '@rolldown/binding-linux-s390x-gnu': 1.2.14 - '@rolldown/binding-linux-x64-gnu': 1.2.14 - '@rolldown/binding-linux-x64-musl': 1.2.14 - '@rolldown/binding-openharmony-arm64': 1.2.14 - '@rolldown/binding-win32-arm64-msvc': 1.2.14 - '@rolldown/binding-win32-x64-msvc': 1.2.14 + '@rolldown/binding-android-arm-eabi': 1.2.16 + '@rolldown/binding-android-arm64': 1.2.16 + '@rolldown/binding-darwin-arm64': 1.2.16 + '@rolldown/binding-darwin-x64': 1.2.16 + '@rolldown/binding-freebsd-x64': 1.2.16 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.16 + '@rolldown/binding-linux-arm64-gnu': 1.2.16 + '@rolldown/binding-linux-arm64-musl': 1.2.16 + '@rolldown/binding-linux-ppc64-gnu': 1.2.16 + '@rolldown/binding-linux-s390x-gnu': 1.2.16 + '@rolldown/binding-linux-x64-gnu': 1.2.16 + '@rolldown/binding-linux-x64-musl': 1.2.16 + '@rolldown/binding-openharmony-arm64': 1.2.16 + '@rolldown/binding-win32-arm64-msvc': 1.2.16 + '@rolldown/binding-win32-x64-msvc': 1.2.16 roughjs@4.6.6: dependencies: @@ -12272,9 +10151,9 @@ snapshots: points-on-curve: 0.2.0 points-on-path: 0.2.1 - router@2.2.0(supports-color@9.4.0): + router@2.2.0(supports-color@10.2.2): dependencies: - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -12292,15 +10171,11 @@ snapshots: s.color@0.0.15: {} - sade@1.8.1: - dependencies: - mri: 1.2.0 - safe-buffer@5.2.1: {} safer-buffer@2.1.2: {} - sass-formatter@0.7.9: + sass-formatter@0.8.0: dependencies: suf-log: 2.5.3 @@ -12313,40 +10188,24 @@ snapshots: '@parcel/watcher': 2.6.0 optional: true - satteri@0.10.5: - dependencies: - '@types/estree-jsx': 1.0.5 - '@types/hast': 3.0.5 - '@types/mdast': 4.0.4 - '@types/unist': 3.0.3 - optionalDependencies: - '@bruits/satteri-darwin-arm64': 0.10.5 - '@bruits/satteri-darwin-x64': 0.10.5 - '@bruits/satteri-linux-arm64-gnu': 0.10.5 - '@bruits/satteri-linux-arm64-musl': 0.10.5 - '@bruits/satteri-linux-x64-gnu': 0.10.5 - '@bruits/satteri-linux-x64-musl': 0.10.5 - '@bruits/satteri-wasm32-wasi': 0.10.5 - '@bruits/satteri-win32-arm64-msvc': 0.10.5 - '@bruits/satteri-win32-x64-msvc': 0.10.5 - - satteri@0.9.5: + satteri@0.11.7: dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 '@types/mdast': 4.0.4 '@types/unist': 3.0.3 optionalDependencies: - '@bruits/satteri-darwin-arm64': 0.9.5 - '@bruits/satteri-darwin-x64': 0.9.5 - '@bruits/satteri-linux-arm64-gnu': 0.9.5 - '@bruits/satteri-linux-arm64-musl': 0.9.5 - '@bruits/satteri-linux-x64-gnu': 0.9.5 - '@bruits/satteri-linux-x64-musl': 0.9.5 - '@bruits/satteri-wasm32-wasi': 0.9.5 - '@bruits/satteri-win32-arm64-msvc': 0.9.5 - '@bruits/satteri-win32-x64-msvc': 0.9.5 - optional: true + '@bruits/satteri-android-arm64': 0.11.7 + '@bruits/satteri-darwin-arm64': 0.11.7 + '@bruits/satteri-darwin-x64': 0.11.7 + '@bruits/satteri-freebsd-x64': 0.11.7 + '@bruits/satteri-linux-arm64-gnu': 0.11.7 + '@bruits/satteri-linux-arm64-musl': 0.11.7 + '@bruits/satteri-linux-x64-gnu': 0.11.7 + '@bruits/satteri-linux-x64-musl': 0.11.7 + '@bruits/satteri-wasm32-wasi': 0.11.7 + '@bruits/satteri-win32-arm64-msvc': 0.11.7 + '@bruits/satteri-win32-x64-msvc': 0.11.7 sax@1.6.1: {} @@ -12357,11 +10216,11 @@ snapshots: semver@6.3.1: {} - semver@7.8.5: {} + semver@7.8.6: {} - send@1.2.1(supports-color@9.4.0): + send@1.2.1(supports-color@10.2.2): dependencies: - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -12375,22 +10234,22 @@ snapshots: transitivePeerDependencies: - supports-color - serve-static@2.2.1(supports-color@9.4.0): + serve-static@2.2.1(supports-color@10.2.2): dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 1.2.1(supports-color@9.4.0) + send: 1.2.1(supports-color@10.2.2) transitivePeerDependencies: - supports-color setprototypeof@1.2.0: {} - sharp@0.35.5(@types/node@18.19.130): + sharp@0.35.5(@types/node@26.6.6): dependencies: '@img/colour': 1.1.0 detect-libc: 2.1.2 - semver: 7.8.5 + semver: 7.8.6 optionalDependencies: '@img/sharp-darwin-arm64': 0.35.5 '@img/sharp-darwin-x64': 0.35.5 @@ -12417,7 +10276,7 @@ snapshots: '@img/sharp-win32-arm64': 0.35.5 '@img/sharp-win32-ia32': 0.35.5 '@img/sharp-win32-x64': 0.35.5 - '@types/node': 18.19.130 + '@types/node': 26.6.6 shebang-command@2.0.0: dependencies: @@ -12425,26 +10284,15 @@ snapshots: shebang-regex@3.0.0: {} - shiki@4.4.3: + shiki@4.6.0: dependencies: - '@shikijs/core': 4.4.3 - '@shikijs/engine-javascript': 4.4.3 - '@shikijs/engine-oniguruma': 4.4.3 - '@shikijs/langs': 4.4.3 - '@shikijs/themes': 4.4.3 - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 - - shiki@4.5.0: - dependencies: - '@shikijs/core': 4.5.0 - '@shikijs/engine-javascript': 4.5.0 - '@shikijs/engine-oniguruma': 4.5.0 - '@shikijs/langs': 4.5.0 - '@shikijs/themes': 4.5.0 - '@shikijs/types': 4.5.0 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/core': 4.6.0 + '@shikijs/engine-javascript': 4.6.0 + '@shikijs/engine-oniguruma': 4.6.0 + '@shikijs/langs': 4.6.0 + '@shikijs/themes': 4.6.0 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 side-channel-list@1.0.1: @@ -12477,13 +10325,13 @@ snapshots: signal-exit@4.1.0: {} - simple-git@4.0.2(supports-color@9.4.0): + simple-git@4.0.2(supports-color@10.2.2): dependencies: - '@kwsites/file-exists': 1.1.1(supports-color@9.4.0) + '@kwsites/file-exists': 1.1.1(supports-color@10.2.2) '@kwsites/promise-deferred': 1.1.1 '@simple-git/args-pathspec': 1.0.4 '@simple-git/argv-parser': 2.0.1 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) transitivePeerDependencies: - supports-color @@ -12502,16 +10350,6 @@ snapshots: arg: 5.0.2 sax: 1.6.1 - slash@3.0.0: {} - - slice-ansi@4.0.0: - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - - smol-toml@1.8.0: {} - smol-toml@1.9.1: {} source-map-js@1.2.2: {} @@ -12534,16 +10372,16 @@ snapshots: spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.23 + spdx-license-ids: 3.0.24 spdx-exceptions@2.5.0: {} spdx-expression-parse@3.0.1: dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.23 + spdx-license-ids: 3.0.24 - spdx-license-ids@3.0.23: {} + spdx-license-ids@3.0.24: {} speakingurl@14.0.1: {} @@ -12553,11 +10391,11 @@ snapshots: std-env@4.3.0: {} - stream-chain@4.3.0: {} + stream-chain@4.4.1: {} - stream-json@3.7.0: + stream-json@3.8.0: dependencies: - stream-chain: 4.3.0 + stream-chain: 4.4.1 string-width@4.2.3: dependencies: @@ -12569,24 +10407,24 @@ snapshots: dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 string-width@6.1.0: dependencies: eastasianwidth: 0.2.0 emoji-regex: 10.6.0 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 string-width@7.2.0: dependencies: emoji-regex: 10.6.0 get-east-asian-width: 1.6.0 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 string-width@8.2.2: dependencies: get-east-asian-width: 1.6.0 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 string_decoder@1.3.0: dependencies: @@ -12601,9 +10439,9 @@ snapshots: dependencies: ansi-regex: 5.0.1 - strip-ansi@7.1.2: + strip-ansi@7.2.0: dependencies: - ansi-regex: 6.2.2 + ansi-regex: 6.6.0 strip-bom-string@1.0.0: {} @@ -12615,102 +10453,31 @@ snapshots: dependencies: inline-style-parser: 0.2.7 - stylehacks@6.1.1(postcss@8.5.31): + style-to-object@2.0.2: dependencies: - browserslist: 4.29.3 - postcss: 8.5.31 - postcss-selector-parser: 6.1.2 + inline-style-parser: 0.2.9 - stylelint@16.26.1(supports-color@7.2.0)(typescript@5.9.3): + stylelint@18.0.0: dependencies: - '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) - '@csstools/css-syntax-patches-for-csstree': 1.1.12(css-tree@3.1.0) - '@csstools/css-tokenizer': 3.0.4 - '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.5) - '@dual-bundle/import-meta-resolve': 4.2.1 - balanced-match: 2.0.0 - colord: 2.9.3 - cosmiconfig: 9.0.2(typescript@5.9.3) - css-functions-list: 3.3.3 - css-tree: 3.1.0 - debug: 4.4.3(supports-color@7.2.0) - fast-glob: 3.3.3 - fastest-levenshtein: 1.0.16 - file-entry-cache: 11.1.5 - global-modules: 2.0.0 - globby: 11.1.0 - globjoin: 0.1.4 - html-tags: 3.3.1 - ignore: 7.0.8 - imurmurhash: 0.1.4 - is-plain-object: 5.1.0 - known-css-properties: 0.37.0 - mathml-tag-names: 2.1.3 - meow: 13.2.0 - micromatch: 4.0.8 - normalize-path: 3.0.0 - picocolors: 1.1.1 - postcss: 8.5.28 - postcss-resolve-nested-selector: 0.1.6 - postcss-safe-parser: 7.0.1(postcss@8.5.28) - postcss-selector-parser: 7.1.5 - postcss-value-parser: 4.2.0 - resolve-from: 5.0.0 - string-width: 4.2.3 - supports-hyperlinks: 3.2.0 - svg-tags: 1.0.0 - table: 6.9.0 - write-file-atomic: 5.0.1 - transitivePeerDependencies: - - supports-color - - typescript - - stylelint@16.26.1(supports-color@9.4.0)(typescript@5.9.3): - dependencies: - '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) - '@csstools/css-syntax-patches-for-csstree': 1.1.12(css-tree@3.1.0) - '@csstools/css-tokenizer': 3.0.4 - '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.5) - '@dual-bundle/import-meta-resolve': 4.2.1 - balanced-match: 2.0.0 - colord: 2.9.3 - cosmiconfig: 9.0.2(typescript@5.9.3) - css-functions-list: 3.3.3 - css-tree: 3.1.0 - debug: 4.4.3(supports-color@9.4.0) - fast-glob: 3.3.3 - fastest-levenshtein: 1.0.16 - file-entry-cache: 11.1.5 - global-modules: 2.0.0 - globby: 11.1.0 - globjoin: 0.1.4 - html-tags: 3.3.1 - ignore: 7.0.8 - imurmurhash: 0.1.4 - is-plain-object: 5.1.0 - known-css-properties: 0.37.0 - mathml-tag-names: 2.1.3 - meow: 13.2.0 - micromatch: 4.0.8 - normalize-path: 3.0.0 - picocolors: 1.1.1 - postcss: 8.5.28 - postcss-resolve-nested-selector: 0.1.6 - postcss-safe-parser: 7.0.1(postcss@8.5.28) - postcss-selector-parser: 7.1.5 + '@csstools/css-calc': 3.4.3(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2) + '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) + '@csstools/css-syntax-patches-for-csstree': 1.1.16(css-tree@3.2.1) + '@csstools/css-tokenizer': 4.0.2 + '@csstools/media-query-list-parser': 5.0.2(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2) + '@csstools/selector-resolve-nested': 4.0.2(postcss-selector-parser@7.1.7) + '@csstools/selector-specificity': 6.0.1(postcss-selector-parser@7.1.7) + colord: 2.10.0 + cosmiconfig: 10.0.1 + css-tree: 3.2.1 + ignore: 7.0.14 + import-meta-resolve: 4.2.0 + picomatch: 4.0.7 + postcss: 8.5.32 + postcss-safe-parser: 7.1.0(postcss@8.5.32) + postcss-selector-parser: 7.1.7 postcss-value-parser: 4.2.0 - resolve-from: 5.0.0 - string-width: 4.2.3 - supports-hyperlinks: 3.2.0 - svg-tags: 1.0.0 - table: 6.9.0 - write-file-atomic: 5.0.1 - transitivePeerDependencies: - - supports-color - - typescript - optional: true + tinyglobby: 0.2.17 + write-file-atomic: 8.0.0 stylis@4.4.0: {} @@ -12722,34 +10489,16 @@ snapshots: dependencies: copy-anything: 4.0.5 - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 + supports-color@10.2.2: + optional: true supports-color@9.4.0: {} - supports-hyperlinks@3.2.0: - dependencies: - has-flag: 4.0.0 - supports-color: 7.2.0 - - svg-tags@1.0.0: {} - - svgo@3.3.5: - dependencies: - commander: 7.2.0 - css-select: 5.2.2 - css-tree: 2.3.1 - css-what: 6.2.2 - csso: 5.0.5 - picocolors: 1.1.1 - sax: 1.6.1 - svgo@4.1.0: dependencies: commander: 11.1.0 css-select: 6.0.0 - css-tree: 3.1.0 + css-tree: 3.2.1 css-what: 7.0.0 csso: 5.0.5 picocolors: 1.1.1 @@ -12764,22 +10513,9 @@ snapshots: '@dual-bundle/import-meta-resolve': 4.2.1 '@pkgr/core': 0.3.6 - synckit@0.8.8: - dependencies: - '@pkgr/core': 0.1.2 - tslib: 2.8.1 - - table@6.9.0: - dependencies: - ajv: 8.17.1 - lodash.truncate: 4.4.2 - slice-ansi: 4.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - tailwind-merge@3.6.0: {} - tailwindcss@4.3.3: {} + tailwindcss@4.3.5: {} tapable@2.3.3: {} @@ -12793,7 +10529,7 @@ snapshots: tiny-inflate@1.0.3: {} - tinybench@6.2.2: {} + tinybench@6.2.3: {} tinyclip@1.0.3: {} @@ -12804,7 +10540,7 @@ snapshots: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 - tinyps@0.5.1: {} + tinyps@0.5.2: {} to-regex-range@5.0.1: dependencies: @@ -12818,13 +10554,13 @@ snapshots: trough@2.2.0: {} - ts-api-utils@2.5.0(typescript@5.9.3): + ts-api-utils@2.5.0(typescript@6.0.3): dependencies: - typescript: 5.9.3 + typescript: 6.0.3 ts-dedent@2.3.0: {} - tslib@2.8.1: {} + tslib@2.9.1: {} tsm@2.3.0: dependencies: @@ -12858,21 +10594,19 @@ snapshots: typescript-auto-import-cache@0.3.6: dependencies: - semver: 7.8.5 + semver: 7.8.6 - typescript-eslint@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3): + typescript-eslint@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.72.1(@typescript-eslint/parser@8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) - '@typescript-eslint/parser': 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.72.1(supports-color@9.4.0)(typescript@5.9.3) - '@typescript-eslint/utils': 8.72.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0)(typescript@5.9.3) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - typescript: 5.9.3 + '@typescript-eslint/eslint-plugin': 8.72.1(@typescript-eslint/parser@8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) + '@typescript-eslint/parser': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.72.1(supports-color@10.2.2)(typescript@6.0.3) + '@typescript-eslint/utils': 8.72.1(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - typescript@5.9.3: {} - typescript@6.0.3: {} ufo@1.6.4: {} @@ -12881,27 +10615,25 @@ snapshots: uncrypto@0.1.3: {} - undici-types@5.26.5: {} - undici-types@6.21.0: {} undici-types@7.18.2: {} - undici@6.29.1: {} + undici-types@8.9.0: {} - undici@8.12.3: {} + undici@6.29.1: {} - unherit@3.0.1: {} + undici@8.12.4: {} - unified-engine@11.2.2(supports-color@9.4.0): + unified-engine@11.2.2(supports-color@10.2.2): dependencies: '@types/concat-stream': 2.0.3 - '@types/debug': 4.1.12 + '@types/debug': 4.1.13 '@types/is-empty': 1.2.3 - '@types/node': 22.20.2 + '@types/node': 22.20.5 '@types/unist': 3.0.3 concat-stream: 2.0.0 - debug: 4.4.3(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) extend: 3.0.2 glob: 10.5.0 ignore: 6.0.2 @@ -12912,10 +10644,10 @@ snapshots: trough: 2.2.0 unist-util-inspect: 8.1.0 vfile: 6.0.3 - vfile-message: 4.0.3 + vfile-message: 4.0.4 vfile-reporter: 8.1.1 vfile-statistics: 3.0.0 - yaml: 2.9.0 + yaml: 2.9.1 transitivePeerDependencies: - bluebird - supports-color @@ -12942,69 +10674,42 @@ snapshots: unifont@1.0.3: dependencies: - css-tree: 3.1.0 + css-tree: 3.2.1 fnv1a-64: 0.1.2 std-env: 4.3.0 - undici: 8.12.3 - - unist-util-find-after@5.0.0: - dependencies: - '@types/unist': 3.0.3 - unist-util-is: 6.0.1 + undici: 8.12.4 unist-util-inspect@8.1.0: dependencies: '@types/unist': 3.0.3 - unist-util-is@5.2.1: - dependencies: - '@types/unist': 2.0.11 - unist-util-is@6.0.1: dependencies: '@types/unist': 3.0.3 - unist-util-modify-children@3.1.1: - dependencies: - '@types/unist': 2.0.11 - array-iterate: 2.0.1 - unist-util-modify-children@4.0.0: dependencies: '@types/unist': 3.0.3 array-iterate: 2.0.1 - unist-util-position-from-estree@1.1.2: - dependencies: - '@types/unist': 2.0.11 - unist-util-position-from-estree@2.0.0: dependencies: '@types/unist': 3.0.3 - unist-util-position@4.0.4: - dependencies: - '@types/unist': 2.0.11 - unist-util-position@5.0.0: dependencies: '@types/unist': 3.0.3 - unist-util-remove-position@4.0.2: - dependencies: - '@types/unist': 2.0.11 - unist-util-visit: 4.1.2 - unist-util-remove-position@5.0.0: dependencies: '@types/unist': 3.0.3 - unist-util-visit: 5.1.0 + unist-util-visit: 5.2.0 unist-util-remove@4.0.0: dependencies: '@types/unist': 3.0.3 unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 + unist-util-visit-parents: 6.1.0 unist-util-stringify-position@3.0.3: dependencies: @@ -13014,35 +10719,20 @@ snapshots: dependencies: '@types/unist': 3.0.3 - unist-util-visit-children@2.0.2: - dependencies: - '@types/unist': 2.0.11 - unist-util-visit-children@3.0.0: dependencies: '@types/unist': 3.0.3 - unist-util-visit-parents@5.1.3: - dependencies: - '@types/unist': 2.0.11 - unist-util-is: 5.2.1 - - unist-util-visit-parents@6.0.2: + unist-util-visit-parents@6.1.0: dependencies: '@types/unist': 3.0.3 unist-util-is: 6.0.1 - unist-util-visit@4.1.2: - dependencies: - '@types/unist': 2.0.11 - unist-util-is: 5.2.1 - unist-util-visit-parents: 5.1.3 - - unist-util-visit@5.1.0: + unist-util-visit@5.2.0: dependencies: '@types/unist': 3.0.3 unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 + unist-util-visit-parents: 6.1.0 unist-util-walker@1.0.0: dependencies: @@ -13056,20 +10746,20 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.7 - unstorage@1.17.5: + unstorage@1.17.6: dependencies: anymatch: 3.1.3 chokidar: 5.0.0 destr: 2.0.5 h3: 1.15.11 - lru-cache: 11.5.2 + lru-cache: 11.5.3 node-fetch-native: 1.6.7 ofetch: 1.5.1 ufo: 1.6.4 - update-browserslist-db@1.3.3(browserslist@4.29.3): + update-browserslist-db@1.3.4(browserslist@4.29.5): dependencies: - browserslist: 4.29.3 + browserslist: 4.29.5 escalade: 3.2.0 picocolors: 1.1.1 @@ -13079,15 +10769,6 @@ snapshots: util-deprecate@1.0.2: {} - uuid@14.0.2: {} - - uvu@0.5.6: - dependencies: - dequal: 2.0.3 - diff: 5.2.0 - kleur: 4.1.5 - sade: 1.8.1 - validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 @@ -13097,20 +10778,15 @@ snapshots: vary@1.1.2: {} - vee-validate@4.15.1(vue@3.5.44(typescript@5.9.3)): + vee-validate@4.15.1(vue@3.5.45(typescript@6.0.3)): dependencies: '@vue/devtools-api': 7.7.10 type-fest: 4.41.0 - vue: 3.5.44(typescript@5.9.3) + vue: 3.5.45(typescript@6.0.3) verkit@0.5.0: {} - vfile-location@4.1.0: - dependencies: - '@types/unist': 2.0.11 - vfile: 5.3.7 - - vfile-location@5.0.3: + vfile-location@5.0.4: dependencies: '@types/unist': 3.0.3 vfile: 6.0.3 @@ -13120,7 +10796,7 @@ snapshots: '@types/unist': 2.0.11 unist-util-stringify-position: 3.0.3 - vfile-message@4.0.3: + vfile-message@4.0.4: dependencies: '@types/unist': 3.0.3 unist-util-stringify-position: 4.0.0 @@ -13132,19 +10808,19 @@ snapshots: supports-color: 9.4.0 unist-util-stringify-position: 4.0.0 vfile: 6.0.3 - vfile-message: 4.0.3 + vfile-message: 4.0.4 vfile-sort: 4.0.0 vfile-statistics: 3.0.0 vfile-sort@4.0.0: dependencies: vfile: 6.0.3 - vfile-message: 4.0.3 + vfile-message: 4.0.4 vfile-statistics@3.0.0: dependencies: vfile: 6.0.3 - vfile-message: 4.0.3 + vfile-message: 4.0.4 vfile@5.3.7: dependencies: @@ -13156,19 +10832,19 @@ snapshots: vfile@6.0.3: dependencies: '@types/unist': 3.0.3 - vfile-message: 4.0.3 + vfile-message: 4.0.4 - vite-dev-rpc@2.0.0(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): + vite-dev-rpc@2.0.0(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): dependencies: birpc: 4.1.0 - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vite-hot-client: 2.2.0(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite-hot-client: 2.2.0(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) - vite-hot-client@2.2.0(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): + vite-hot-client@2.2.0(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): dependencies: - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vite-plugin-inspect@11.4.1(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): + vite-plugin-inspect@11.4.1(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): dependencies: ansis: 4.3.1 error-stack-parser-es: 1.0.5 @@ -13178,47 +10854,47 @@ snapshots: perfect-debounce: 2.1.0 sirv: 3.0.2 unplugin-utils: 0.3.2 - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vite-dev-rpc: 2.0.0(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite-dev-rpc: 2.0.0(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) - vite-plugin-vue-devtools@8.2.1(supports-color@9.4.0)(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3)): + vite-plugin-vue-devtools@8.2.1(supports-color@10.2.2)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))(vue@3.5.45(typescript@6.0.3)): dependencies: - '@vue/devtools-core': 8.2.1(vue@3.5.44(typescript@5.9.3)) + '@vue/devtools-core': 8.2.1(vue@3.5.45(typescript@6.0.3)) '@vue/devtools-kit': 8.2.1 '@vue/devtools-shared': 8.2.1 sirv: 3.0.2 - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vite-plugin-inspect: 11.4.1(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) - vite-plugin-vue-inspector: 6.0.0(supports-color@9.4.0)(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) - vue: 3.5.44(typescript@5.9.3) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite-plugin-inspect: 11.4.1(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + vite-plugin-vue-inspector: 6.0.0(supports-color@10.2.2)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + vue: 3.5.45(typescript@6.0.3) transitivePeerDependencies: - '@nuxt/kit' - supports-color - vite-plugin-vue-inspector@6.0.0(supports-color@9.4.0)(vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): + vite-plugin-vue-inspector@6.0.0(supports-color@10.2.2)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): dependencies: - '@babel/core': 7.29.6(supports-color@9.4.0) - '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.29.6(supports-color@9.4.0)) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.29.6(supports-color@9.4.0)) - '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.29.6(supports-color@9.4.0))(supports-color@9.4.0) - '@vue/compiler-dom': 3.5.42 + '@babel/core': 7.29.6(supports-color@10.2.2) + '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.29.6(supports-color@10.2.2)) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.29.6(supports-color@10.2.2)) + '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.29.6(supports-color@10.2.2))(supports-color@10.2.2) + '@vue/compiler-dom': 3.5.45 kolorist: 1.8.0 magic-string: 0.30.21 - vite: 8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) transitivePeerDependencies: - supports-color - vite@8.3.4(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1): + vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1): dependencies: lightningcss: 1.33.0 picomatch: 4.0.7 - postcss: 8.5.31 - rolldown: 1.2.14 + postcss: 8.5.32 + rolldown: 1.2.16 tinyglobby: 0.2.17 optionalDependencies: - '@types/node': 18.19.130 + '@types/node': 26.6.6 esbuild: 0.28.2 fsevents: 2.3.3 jiti: 2.7.0 @@ -13227,31 +10903,14 @@ snapshots: tsx: 4.23.15 yaml: 2.9.1 - vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1): - dependencies: - lightningcss: 1.33.0 - picomatch: 4.0.7 - postcss: 8.5.31 - rolldown: 1.2.14 - tinyglobby: 0.2.17 + vitefu@1.1.3(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): optionalDependencies: - '@types/node': 18.19.130 - esbuild: 0.28.2 - fsevents: 2.3.3 - jiti: 2.7.0 - sass: 1.102.0 - terser: 5.51.2 - tsx: 4.23.15 - yaml: 2.9.1 - - vitefu@1.1.3(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): - optionalDependencies: - vite: 8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - vitest@5.0.5(@edge-runtime/vm@3.2.0)(@types/node@18.19.130)(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): + vitest@5.1.0(@edge-runtime/vm@3.2.0)(@types/node@26.6.6)(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): dependencies: '@types/chai': 5.2.3 - '@vitest/mocker': 5.0.5(vite@8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + '@vitest/mocker': 5.1.0(vite@8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) chai: 6.3.0 es-module-lexer: 2.3.2 expect-type: 1.4.0 @@ -13259,88 +10918,88 @@ snapshots: obug: 3.0.0 picomatch: 4.0.7 std-env: 4.3.0 - tinybench: 6.2.2 + tinybench: 6.2.3 tinyexec: 1.3.1 tinyglobby: 0.2.17 - vite: 8.3.5(@types/node@18.19.130)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) + vite: 8.3.6(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) why-is-node-running: 3.2.1 optionalDependencies: '@edge-runtime/vm': 3.2.0 - '@types/node': 18.19.130 + '@types/node': 26.6.6 transitivePeerDependencies: - msw - volar-service-css@0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)): + volar-service-css@0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)): dependencies: vscode-css-languageservice: 6.3.9 vscode-languageserver-textdocument: 1.0.12 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) + '@volar/language-service': 2.4.28(typescript@6.0.3) - volar-service-emmet@0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)): + volar-service-emmet@0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)): dependencies: '@emmetio/css-parser': 0.4.1 '@emmetio/html-matcher': 1.3.0 '@vscode/emmet-helper': 2.11.0 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) + '@volar/language-service': 2.4.28(typescript@6.0.3) - volar-service-html@0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)): + volar-service-html@0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)): dependencies: vscode-html-languageservice: 5.6.2 vscode-languageserver-textdocument: 1.0.12 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) + '@volar/language-service': 2.4.28(typescript@6.0.3) - volar-service-prettier@0.0.71(@volar/language-service@2.4.28(typescript@5.9.3))(prettier@2.8.8): + volar-service-prettier@0.0.71(@volar/language-service@2.4.28(typescript@6.0.3))(prettier@3.9.10): dependencies: - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) - prettier: 2.8.8 + '@volar/language-service': 2.4.28(typescript@6.0.3) + prettier: 3.9.10 - volar-service-typescript-twoslash-queries@0.0.71(@volar/language-service@2.4.28(typescript@5.9.3))(typescript@5.9.3): + volar-service-typescript-twoslash-queries@0.0.71(@volar/language-service@2.4.28(typescript@6.0.3))(typescript@6.0.3): dependencies: - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) - typescript: 5.9.3 + '@volar/language-service': 2.4.28(typescript@6.0.3) + typescript: 6.0.3 - volar-service-typescript@0.0.71(@volar/language-service@2.4.28(typescript@5.9.3))(typescript@5.9.3): + volar-service-typescript@0.0.71(@volar/language-service@2.4.28(typescript@6.0.3))(typescript@6.0.3): dependencies: path-browserify: 1.0.1 - semver: 7.8.5 + semver: 7.8.6 typescript-auto-import-cache: 0.3.6 vscode-languageserver-textdocument: 1.0.12 vscode-nls: 5.2.0 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 optionalDependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) - typescript: 5.9.3 + '@volar/language-service': 2.4.28(typescript@6.0.3) + typescript: 6.0.3 - volar-service-yaml@0.0.71(@volar/language-service@2.4.28(typescript@5.9.3)): + volar-service-yaml@0.0.71(@volar/language-service@2.4.28(typescript@6.0.3)): dependencies: - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 yaml-language-server: 1.23.0 optionalDependencies: - '@volar/language-service': 2.4.28(typescript@5.9.3) + '@volar/language-service': 2.4.28(typescript@6.0.3) vscode-css-languageservice@6.3.9: dependencies: '@vscode/l10n': 0.0.18 vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 vscode-html-languageservice@5.6.2: dependencies: '@vscode/l10n': 0.0.18 vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 vscode-json-languageservice@4.1.8: dependencies: @@ -13348,7 +11007,7 @@ snapshots: vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 vscode-nls: 5.2.0 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 vscode-jsonrpc@8.2.0: {} @@ -13367,47 +11026,33 @@ snapshots: vscode-nls@5.2.0: {} - vscode-uri@3.1.0: {} - vscode-uri@3.2.0: {} - vue-demi@0.14.10(vue@3.5.44(typescript@5.9.3)): + vue-demi@0.14.10(vue@3.5.45(typescript@6.0.3)): dependencies: - vue: 3.5.44(typescript@5.9.3) - - vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@7.2.0): - dependencies: - debug: 4.4.3(supports-color@7.2.0) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) - eslint-scope: 9.1.2 - eslint-visitor-keys: 5.0.1 - espree: 11.2.0 - esquery: 1.6.0 - semver: 7.8.5 - transitivePeerDependencies: - - supports-color + vue: 3.5.45(typescript@6.0.3) - vue-eslint-parser@10.4.1(eslint@10.13.0(jiti@2.7.0)(supports-color@9.4.0))(supports-color@9.4.0): + vue-eslint-parser@10.4.2(eslint@10.14.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): dependencies: - debug: 4.4.3(supports-color@9.4.0) - eslint: 10.13.0(jiti@2.7.0)(supports-color@9.4.0) + debug: 4.4.3(supports-color@10.2.2) + eslint: 10.14.0(jiti@2.7.0)(supports-color@10.2.2) eslint-scope: 9.1.2 eslint-visitor-keys: 5.0.1 espree: 11.2.0 - esquery: 1.6.0 - semver: 7.8.5 + esquery: 1.7.0 + semver: 7.8.6 transitivePeerDependencies: - supports-color - vue@3.5.44(typescript@5.9.3): + vue@3.5.45(typescript@6.0.3): dependencies: - '@vue/compiler-dom': 3.5.44 - '@vue/compiler-sfc': 3.5.44 - '@vue/runtime-dom': 3.5.44 - '@vue/server-renderer': 3.5.44 - '@vue/shared': 3.5.44 + '@vue/compiler-dom': 3.5.45 + '@vue/compiler-sfc': 3.5.45 + '@vue/runtime-dom': 3.5.45 + '@vue/server-renderer': 3.5.45 + '@vue/shared': 3.5.45 optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.3 walk-up-path@3.0.1: {} @@ -13415,10 +11060,6 @@ snapshots: web-streams-polyfill@3.3.3: {} - which@1.3.1: - dependencies: - isexe: 2.0.0 - which@2.0.2: dependencies: isexe: 2.0.0 @@ -13441,19 +11082,18 @@ snapshots: dependencies: ansi-styles: 6.2.3 string-width: 5.1.2 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 wrap-ansi@9.0.2: dependencies: ansi-styles: 6.2.3 string-width: 7.2.0 - strip-ansi: 7.1.2 + strip-ansi: 7.2.0 wrappy@1.0.2: {} - write-file-atomic@5.0.1: + write-file-atomic@8.0.0: dependencies: - imurmurhash: 0.1.4 signal-exit: 4.1.0 wsl-utils@1.0.0: @@ -13475,19 +11115,17 @@ snapshots: ajv: 8.17.1 ajv-draft-04: 1.0.0(ajv@8.17.1) ajv-i18n: 4.2.0(ajv@8.17.1) - prettier: 3.9.6 + prettier: 3.9.10 request-light: 0.5.8 vscode-json-languageservice: 4.1.8 vscode-languageserver: 9.0.1 vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 - vscode-uri: 3.1.0 + vscode-uri: 3.2.0 yaml: 2.8.3 yaml@2.8.3: {} - yaml@2.9.0: {} - yaml@2.9.1: {} yargs-parser@22.0.0: {} @@ -13511,8 +11149,6 @@ snapshots: zod@3.25.76: {} - zod@4.4.3: {} - zod@4.6.7: {} zwitch@2.0.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 928d02f90c..10a72c8b0e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -21,3 +21,6 @@ overrides: 'undici@>=8.0.0 <8.12.2': ^8.12.3 'lodash-es@<4.17.24': ^4.18.1 'brace-expansion@^5.0.0': ^5.0.12 + '@napi-rs/wasm-runtime>@emnapi/runtime': ^1.11.3 + '@napi-rs/wasm-runtime>@emnapi/core': ^1.11.3 + eslint-mdx: ~3.8.3 diff --git a/scripts/ci/terraform-validate.mjs b/scripts/ci/terraform-validate.mjs new file mode 100644 index 0000000000..e49e1fee86 --- /dev/null +++ b/scripts/ci/terraform-validate.mjs @@ -0,0 +1,238 @@ +#!/usr/bin/env node +// Validates every Terraform sample in the docs against the real Azion provider. +// +// Each ```hcl / ```terraform / ```tf fence in apps/docs/src/content/docs is written to its own +// directory and checked with `terraform fmt -check` and `terraform validate`. A sample that +// omits the boilerplate gets it stubbed in: the `terraform { required_providers }` block with +// the pinned provider version, an empty `provider "azion"` block, and a `variable` for every +// `var.x` it reads. Anything else a sample references (another resource, a module) must be +// declared in the sample itself, so what a reader copies is what was validated. +// +// A sample that pins `aziontech/azion` must pin PROVIDER_VERSION, so every page tells the +// reader to install the same release. +// +// Opt out a fence that is wrong on purpose (a v1 "before" block in a migration guide) with an +// MDX comment on the line right above it: +// +// {/* terraform-validate: skip */} +// +// A fence with no top-level blocks (a terraform.tfvars excerpt) only gets `terraform fmt`. +// +// node scripts/ci/terraform-validate.mjs check every page +// node scripts/ci/terraform-validate.mjs check only these pages +// +// TERRAFORM_BIN overrides the terraform binary (default: `terraform` on PATH). + +import { spawn } from 'node:child_process'; +import { + existsSync, + mkdirSync, + mkdtempSync, + readFileSync, + readdirSync, + rmSync, + symlinkSync, + copyFileSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir, availableParallelism } from 'node:os'; +import { join, relative } from 'node:path'; + +const PROVIDER_VERSION = '2.10.0'; +const CONTENT_ROOT = 'apps/docs/src/content/docs'; +const TERRAFORM = process.env.TERRAFORM_BIN || 'terraform'; +const FENCE_OPEN = /^(\s*)```(hcl|terraform|tf)\b.*$/; +const SKIP_MARKER = /terraform-validate:\s*skip/; +const TOP_LEVEL_BLOCK = + /^(terraform|provider|resource|data|variable|output|locals|module|import|moved|removed|check)\b/m; +const PROVIDER_PIN = + /source\s*=\s*"(?:registry\.terraform\.io\/)?aziontech\/azion"[^}]*?version\s*=\s*"([^"]+)"/s; + +function walk(dir) { + return readdirSync(dir, { withFileTypes: true }).flatMap((entry) => { + const path = join(dir, entry.name); + if (entry.isDirectory()) return walk(path); + return entry.name.endsWith('.mdx') || entry.name.endsWith('.md') ? [path] : []; + }); +} + +function extractSamples(file) { + const lines = readFileSync(file, 'utf8').split('\n'); + const samples = []; + // A fence of four or more backticks shows a document (a module README), not code to run: + // the ```hcl fences inside it are part of that document, so they are not samples. + let outer = null; + for (let i = 0; i < lines.length; i++) { + if (outer) { + if (lines[i].trim() === outer) outer = null; + continue; + } + const wide = lines[i].match(/^\s*(`{4,})/); + if (wide) { + outer = wide[1]; + continue; + } + const open = lines[i].match(FENCE_OPEN); + if (!open) continue; + const indent = open[1].length; + const start = i; + const body = []; + for (i++; i < lines.length && !/^\s*```\s*$/.test(lines[i]); i++) + body.push(lines[i].slice(indent)); + let prev = start - 1; + while (prev >= 0 && lines[prev].trim() === '') prev--; + samples.push({ + file, + line: start + 1, + code: body.join('\n') + '\n', + skip: prev >= 0 && SKIP_MARKER.test(lines[prev]), + }); + } + return samples; +} + +function run(args, cwd) { + return new Promise((resolve) => { + const child = spawn(TERRAFORM, args, { + cwd, + env: { ...process.env, TF_IN_AUTOMATION: '1', CHECKPOINT_DISABLE: '1' }, + }); + let stdout = ''; + let stderr = ''; + child.stdout.on('data', (chunk) => (stdout += chunk)); + child.stderr.on('data', (chunk) => (stderr += chunk)); + child.on('error', (error) => resolve({ code: 127, stdout, stderr: String(error) })); + child.on('close', (code) => resolve({ code, stdout, stderr })); + }); +} + +function stubs(code) { + let out = ''; + if (!/required_providers/.test(code)) { + out += `terraform {\n required_providers {\n azion = {\n source = "aziontech/azion"\n version = "${PROVIDER_VERSION}"\n }\n }\n}\n\n`; + } + if (!/provider\s+"azion"/.test(code)) out += 'provider "azion" {}\n\n'; + const declared = new Set([...code.matchAll(/^\s*variable\s+"([^"]+)"/gm)].map((m) => m[1])); + const used = new Set([...code.matchAll(/\bvar\.([A-Za-z_][A-Za-z0-9_-]*)/g)].map((m) => m[1])); + for (const name of used) if (!declared.has(name)) out += `variable "${name}" {}\n`; + return out; +} + +async function prepareSeed(root) { + const seed = join(root, '_seed'); + mkdirSync(seed); + writeFileSync(join(seed, 'main.tf'), stubs('')); + const init = await run(['init', '-backend=false', '-input=false', '-no-color'], seed); + if (init.code !== 0) { + throw new Error( + `terraform init failed for aziontech/azion ${PROVIDER_VERSION}:\n${init.stdout}${init.stderr}` + ); + } + return seed; +} + +async function check(sample, dir, seed) { + const where = `${relative(process.cwd(), sample.file)}:${sample.line}`; + const problems = []; + mkdirSync(dir); + writeFileSync(join(dir, 'sample.tf'), sample.code); + + const fmt = await run(['fmt', '-check', '-diff', '-no-color', 'sample.tf'], dir); + if (fmt.code !== 0) + problems.push(`not formatted (terraform fmt):\n${(fmt.stdout + fmt.stderr).trim()}`); + + if (!TOP_LEVEL_BLOCK.test(sample.code)) return { where, problems }; + + const pin = sample.code.match(PROVIDER_PIN); + if (pin && pin[1] !== PROVIDER_VERSION) { + problems.push(`pins aziontech/azion ${pin[1]}; every page pins ${PROVIDER_VERSION}`); + return { where, problems }; + } + + writeFileSync(join(dir, '_stubs.tf'), stubs(sample.code)); + copyFileSync(join(seed, '.terraform.lock.hcl'), join(dir, '.terraform.lock.hcl')); + symlinkSync(join(seed, '.terraform'), join(dir, '.terraform'), 'dir'); + + const validate = await run(['validate', '-json', '-no-color'], dir); + let report; + try { + report = JSON.parse(validate.stdout); + } catch { + problems.push(`terraform validate crashed:\n${validate.stdout}${validate.stderr}`); + return { where, problems }; + } + const warnings = []; + for (const d of report.diagnostics ?? []) { + const inSample = d.range?.filename === 'sample.tf'; + const at = inSample ? ` (page line ${sample.line + d.range.start.line})` : ''; + const detail = d.detail ? `\n ${d.detail.replace(/\n/g, '\n ')}` : ''; + (d.severity === 'error' ? problems : warnings).push( + `${d.severity}: ${d.summary}${at}${detail}` + ); + } + return { where, problems, warnings }; +} + +async function pool(items, size, worker) { + const results = new Array(items.length); + let next = 0; + await Promise.all( + Array.from({ length: size }, async () => { + while (next < items.length) { + const index = next++; + results[index] = await worker(items[index], index); + } + }) + ); + return results; +} + +const files = process.argv.length > 2 ? process.argv.slice(2) : walk(CONTENT_ROOT); +const samples = files.flatMap(extractSamples); +const toCheck = samples.filter((s) => !s.skip); + +const version = await run(['version'], process.cwd()); +if (version.code !== 0) { + console.error( + `Cannot run "${TERRAFORM}". Install Terraform or set TERRAFORM_BIN.\n${version.stderr}` + ); + process.exit(1); +} + +const root = mkdtempSync(join(tmpdir(), 'tf-samples-')); +let failed = 0; +let fatal = null; +try { + const seed = await prepareSeed(root); + const results = await pool( + toCheck, + Math.max(2, Math.min(8, availableParallelism())), + (sample, index) => check(sample, join(root, String(index)), seed) + ); + for (const { where, problems, warnings = [] } of results) { + for (const w of warnings) console.warn(`${where} ${w}`); + if (problems.length === 0) continue; + failed++; + console.error(`\n✗ ${where}`); + for (const p of problems) console.error(` ${p.replace(/\n/g, '\n ')}`); + } +} catch (error) { + fatal = error; +} finally { + if (existsSync(root)) rmSync(root, { recursive: true, force: true }); +} + +if (fatal) { + console.error(fatal.message); + process.exit(1); +} + +const skipped = samples.length - toCheck.length; +console.log( + `\nTerraform samples: ${toCheck.length - failed}/${ + toCheck.length + } valid against aziontech/azion ${PROVIDER_VERSION}` + + (skipped ? `, ${skipped} skipped by marker` : '') + + '.' +); +process.exit(failed ? 1 : 0);