> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/es/aplicaciones/static-apps.md).

# Aplicaciones estáticas

Las aplicaciones estáticas de PowerShell Universal no requieren el servidor de PowerShell Universal para ejecutarse. Pueden alojarse en servidores web sencillos como Azure Blobs o en IIS directamente desde el sistema de ficheros. Constan del marco de trabajo JavaScript de aplicaciones de PowerShell Universal y una serie de ficheros JSON creados durante el proceso de publicación. Las aplicaciones estáticas no admiten las funciones interactivas de PowerShell Universal. Sí admiten la ejecución de JavaScript.

## Compilar una aplicación estática

El cmdlet `Publish-PSUStaticApp` es el responsable de compilar una aplicación. Puede usar los cmdlets estándar de aplicaciones en la definición. Por ejemplo, lo siguiente crearía una aplicación en la carpeta de salida con un único componente UDRating.

```powershell
Publish-PSUStaticApp -Definition { 
    New-UDApp -Content { 
       New-UDRating -Max 10 
    } 
} -DestinationPath .\output -Force 
```

También puede introducir llamadas de JavaScript en su aplicación en cualquier lugar donde pueda usarse un endpoint. Por ejemplo, en el parámetro `-OnChange` de `New-UDRating`. La variable data contendrá los datos del evento.

```powershell
Publish-PSUStaticApp -Definition {
   New-UDApp -Content {
      New-UDRating -Max 10 -OnChange (New-UDEndpoint -JavaScript 'alert(data)') 
   } 
} -DestinationPath .\output -Force 
```

## Publicar una aplicación estática

Las aplicaciones estáticas pueden publicarse en cualquier servidor web capaz de servir ficheros HTML, JavaScript y CSS. Deberá publicar todo el contenido de la carpeta de salida para que la aplicación funcione.

## Limitaciones

### Sin interacción con la aplicación

No puede usar las funciones interactivas de las aplicaciones de PowerShell Universal, aparte de JavaScript. Esto incluye, entre otros:

* Modales y notificaciones toast
* Cmdlets -UDElement
* Proveedores de datos como $Cache y $Session

### Sin interacción con el host de PowerShell

Durante la compilación de la aplicación, todos los bloques de script de la aplicación se ejecutarán, en lugar de ejecutarse a demanda, como cuando se alojan en PowerShell Universal. Esto significa que comandos como `Write-Host` y `Write-Error` se producirán durante la compilación y no cuando la aplicación se esté ejecutando en el navegador. Lo siguiente también se ejecutará de inmediato:

* `Read-Host`
* `PromptForChoice`
* `Get-Credential`

### Compatibilidad limitada con controles

Aunque es posible usar cualquier control y especificar el JavaScript para su interacción, no se recomienda debido a la complejidad. Los controles que deben evitarse incluyen:

* Data Grid
* Dynamic Region
* Protect Section


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/es/aplicaciones/static-apps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
