You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/en/pages/devtools/azion-edge-runtime/compatibility/node-polyfills/cells-node.mdx
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,25 @@ The Azion Runtime provides native support for the File System (FS) module, allow
60
60
61
61
A polyfill is a code snippet, often used in JavaScript, that brings new features to environments lacking these capabilities. Polyfills are used during build time at Azion and can be configured through the [azion.config.js](/en/documentation/devtools/cli/configs/azion-config-js/) file.
62
62
63
-
The following Node APIs are supported through polyfills, along with their respective supported methods.
63
+
The following Node APIs are supported through polyfills, along with their respective supported methods.
64
+
65
+
**Status legend:**
66
+
67
+
- 🟢 **Supported**: the API works normally at runtime.
68
+
- 🟡 **Partially supported**: only some methods or features are available.
69
+
- 🔴 **Build-only**: the module is included so the build process completes without errors, but API calls do not work at runtime.
70
+
71
+
:::note[About the Azion Cells runtime environment]
72
+
Functions on Azion run inside **Cells**, an isolation environment based on **V8 Isolates**. Each Cell is a lightweight, secure execution context with no direct access to the underlying operating system.
73
+
74
+
For multi-tenant security and infrastructure integrity reasons, Cells do not allow:
75
+
76
+
- Access to operating system properties (such as hostname, platform, or CPU/memory information via `node:os`).
77
+
- DNS resolution via native system calls (`node:dns`, `node:dns/promises`).
78
+
- Creation of low-level TCP/UDP sockets that require direct syscalls.
79
+
80
+
Modules marked as 🔴 **Build-only** are included as stubs to ensure that NPM packages with static dependencies on these modules can be compiled. Calls to these modules at runtime produce no results and may return default values or throw silent errors.
81
+
:::
64
82
65
83
| Module | Status |
66
84
|-----------------------|--------|
@@ -89,8 +107,8 @@ The following Node APIs are supported through polyfills, along with their respec
Copy file name to clipboardExpand all lines: src/content/docs/en/pages/devtools/azion-edge-runtime/compatibility/use-polyfills.mdx
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,34 @@ Now you can check the logs in the terminal and see the Buffer API working throug
185
185
You can access a list of APIs resolved through polyfills by Azion Bundler build on [its repository](https://github.com/aziontech/bundler) and on [Azion's compatibility documentation](/en/documentation/products/azion-edge-runtime/compatibility/node/). Azion Bundler's an **open-source** project and you can propose new presets and implementations.
186
186
:::
187
187
188
+
---
188
189
190
+
## Deploy the function to Azion
189
191
190
-
---
192
+
After testing locally with `azion dev`, deploy your function to the Azion Platform:
193
+
194
+
13. Run the deploy command:
195
+
196
+
```bash
197
+
azion deploy
198
+
```
199
+
200
+
The CLI builds the project, applies the configured polyfills, and publishes the function to the platform. At the end of the process, you'll receive the URL to access your application.
201
+
202
+
### Useful deploy flags
203
+
204
+
| Flag | Description |
205
+
|------|-------------|
206
+
|`--auto`| Runs the complete build, provisioning, and distribution flow without interruptions or interactive prompts. |
207
+
|`--workers <number>`| Sets the number of parallel workers for uploading static files to Object Storage. By default, it's automatically calculated based on available CPU cores (maximum: 20). |
208
+
|`--dry-run`| Simulates the deploy process locally, validating the generated routing rules without affecting production resources. |
209
+
210
+
**Example with flags:**
211
+
212
+
```bash
213
+
azion deploy --auto --workers 10
214
+
```
215
+
216
+
:::note
217
+
The build process applies polyfills automatically based on the `azion.config.js` file configuration. Make sure the required modules are listed in the `polyfills` property before deploying.
Copy file name to clipboardExpand all lines: src/content/docs/pt-br/pages/devtools/azion-edge-runtime/compatibilidade/node-polyfills/node.mdx
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,24 @@ Um polyfill é um trecho de código, frequentemente usado em JavaScript, que tra
63
63
64
64
A tabela abaixo contém a compatibilidade dos módulos Node.Js resolvidos com polyfills.
65
65
66
+
**Legenda de status:**
67
+
68
+
- 🟢 **Suportada**: a API funciona normalmente em tempo de execução.
69
+
- 🟡 **Parcialmente suportada**: apenas alguns métodos ou funcionalidades estão disponíveis.
70
+
- 🔴 **Somente para build**: o módulo é incluído para que o processo de build seja concluído sem erros, mas as chamadas à API não funcionam em tempo de execução.
71
+
72
+
:::note[Sobre o ambiente de execução Azion Cells]
73
+
As functions na Azion são executadas dentro de **Cells**, um ambiente de isolamento baseado em **V8 Isolates**. Cada Cell é um contexto de execução leve e seguro, sem acesso direto ao sistema operacional subjacente.
74
+
75
+
Por razões de segurança multilocatário e integridade da infraestrutura, as Cells não permitem:
76
+
77
+
- Acesso a propriedades do sistema operacional (como hostname, plataforma ou informações de CPU/memória via `node:os`).
78
+
- Resolução de DNS via chamadas de sistema nativas (`node:dns`, `node:dns/promises`).
79
+
- Criação de sockets TCP/UDP de baixo nível que exijam syscalls diretas.
80
+
81
+
Módulos marcados como 🔴 **Somente para build** são incluídos como stubs para garantir que pacotes NPM com dependências estáticas nesses módulos possam ser compilados. As chamadas a esses módulos em runtime não produzem resultados e podem retornar valores padrão ou lançar erros silenciosos.
82
+
:::
83
+
66
84
| Module | Status |
67
85
|-----------------------|--------|
68
86
|_http_agent | 🟡 Parcialmente suportada |
@@ -90,8 +108,8 @@ A tabela abaixo contém a compatibilidade dos módulos Node.Js resolvidos com po
Copy file name to clipboardExpand all lines: src/content/docs/pt-br/pages/devtools/azion-edge-runtime/compatibilidade/use-polyfills.mdx
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,3 +184,35 @@ Agora você pode verificar os logs no terminal e ver a API Buffer funcionando at
184
184
:::tip
185
185
Você pode acessar uma lista de APIs que são resolvidas através de polyfills no [repósitório do Azion Bundler](https://github.com/aziontech/bundler) e na [documentacão de compatibilidade da Azion](/pt-br/documentacao/produtos/devtools/azion-edge-runtime/compatibilidade/node/). Azion Bundler é um projeto **open-source** e você pode propor novos presets e implementações.
186
186
:::
187
+
188
+
---
189
+
190
+
## Fazer o deploy da function na Azion
191
+
192
+
Após testar localmente com `azion dev`, faça o deploy da sua function para a Azion Platform:
193
+
194
+
13. Execute o comando de deploy:
195
+
196
+
```bash
197
+
azion deploy
198
+
```
199
+
200
+
O CLI realiza o build do projeto, aplica os polyfills configurados e publica a function na plataforma. Ao final do processo, você receberá a URL de acesso à sua aplicação.
201
+
202
+
### Opções úteis do comando deploy
203
+
204
+
| Flag | Descrição |
205
+
|------|-----------|
206
+
| `--auto` | Executa o fluxo completo de build, provisionamento e distribuição sem interrupções ou prompts interativos. |
207
+
| `--workers <número>` | Define o número de workers paralelos para upload de arquivos estáticos para o Object Storage. Por padrão, é calculado automaticamente com base nos núcleos de CPU disponíveis (máximo: 20). |
208
+
| `--dry-run` | Simula o processo de deploy localmente, validando as regras de roteamento geradas sem afetar recursos em produção. |
209
+
210
+
**Exemplo com flags:**
211
+
212
+
```bash
213
+
azion deploy --auto --workers 10
214
+
```
215
+
216
+
:::note
217
+
O processo de build aplica os polyfills automaticamente com base na configuração do arquivo `azion.config.js`. Certifique-se de que os módulos necessários estão listados na propriedade `polyfills` antes de fazer o deploy.
0 commit comments