Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs-site/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
canisters:
- name: docs
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
version: asset-canister-404-support
dir: .
2 changes: 1 addition & 1 deletion docs/concepts/sync-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Sync plugins fill that gap. A plugin is:
- **Sandboxed** — it cannot open network sockets, spawn subprocesses, or touch the filesystem outside the directories you explicitly grant it.
- **Scoped to one canister** — it can call update and query methods, but only on the canister being synced. The target is fixed by the host; the plugin cannot choose a different one.

The most common way to get a sync plugin is through a [recipe](recipes.md). For example, the `@dfinity/asset-canister` recipe emits a `plugin` sync step (starting with `v2.2.0`) that uploads your built static files to the asset canister — so for everyday frontend deployment you never write a plugin yourself.
The most common way to get a sync plugin is through a [recipe](recipes.md). For example, the `@dfinity/asset-canister` recipe emits a `plugin` sync step (starting with `v2.2.1`) that uploads your built static files to the asset canister — so for everyday frontend deployment you never write a plugin yourself.

## How a Plugin Runs

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/creating-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ canisters:
{% if include_frontend %}
- name: {{project-name}}-frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The `@dfinity/asset-canister` recipe deploys this pre-built canister and syncs y
canisters:
- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist # Your built frontend files
```
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/using-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ For deploying an asset canister with frontend assets:
canisters:
- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
```
Expand Down
6 changes: 3 additions & 3 deletions docs/migration/from-dfx.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ canisters:
canisters:
- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
```
Expand All @@ -190,7 +190,7 @@ canisters:
canisters:
- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down Expand Up @@ -222,7 +222,7 @@ canisters:
canisters:
- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
18 changes: 9 additions & 9 deletions docs/migration/upgrading-from-v0-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CLI, in a recipe-provided [sync plugin](../concepts/sync-plugins.md). The
You're affected if your `icp.yaml` (or a per-canister `canister.yaml`) either:

- contains a `type: assets` sync step, or
- uses the `@dfinity/asset-canister` recipe at a version below `v2.2.0` (those
- uses the `@dfinity/asset-canister` recipe at a version below `v2.2.1` (those
versions emit a `type: assets` step internally).

After upgrading, any command that loads such a manifest (`icp deploy`,
Expand All @@ -40,7 +40,7 @@ Pick the path that matches how your project uploads assets:

## Recipe users

If you reference the `@dfinity/asset-canister` recipe, upgrade it to `v2.2.0`.
If you reference the `@dfinity/asset-canister` recipe, upgrade it to `v2.2.1`.
That version emits a `plugin` sync step instead of the retired `assets` step;
nothing else in your configuration changes.

Expand All @@ -61,13 +61,13 @@ canisters:
canisters:
- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: www
```

The recipe's `configuration` (including `dir`) is unchanged. See the
[asset-canister v2.2.0 release](https://github.com/dfinity/icp-cli-recipes/releases/tag/asset-canister-v2.2.0)
[asset-canister v2.2.1 release](https://github.com/dfinity/icp-cli-recipes/releases/tag/asset-canister-v2.2.1)
for details.

## Manual sync steps
Expand All @@ -91,14 +91,14 @@ sync:
sync:
steps:
- type: plugin
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.0-209d688/sync_plugin.wasm
sha256: 297c2ef05680d47ac70688d6cebed9bc3a41b2302f400739f894f4f413e6a5ee
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.1-6b48585/sync_plugin.wasm
sha256: ca7cb5666c30d2875f8d5e10535f8a53f97a86c79c263f7d5bdac2fdd1bbf83c
dirs:
- www
```

The plugin is published in the
[certified-assets migration-v2.2.0 release](https://github.com/dfinity/certified-assets/releases/tag/migration-v2.2.0-209d688).
[certified-assets migration-v2.2.1 release](https://github.com/dfinity/certified-assets/releases/tag/migration-v2.2.1-6b48585).
It uploads the contents of a single directory to the asset canister being synced —
the same job the old `assets` step did. `dirs` is the general
[sync-plugin](../concepts/sync-plugins.md) field (a list, since a plugin may
Expand Down Expand Up @@ -126,8 +126,8 @@ it. If you used the singular `dir:`, wrap it in a single-element `dirs:` list:

```yaml
- type: plugin
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.0-209d688/sync_plugin.wasm
sha256: 297c2ef05680d47ac70688d6cebed9bc3a41b2302f400739f894f4f413e6a5ee
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.1-6b48585/sync_plugin.wasm
sha256: ca7cb5666c30d2875f8d5e10535f8a53f97a86c79c263f7d5bdac2fdd1bbf83c
dirs:
- dist
```
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Sync steps run after canister deployment to configure the running canister.
> Uploading static files to an asset canister is no longer a built-in sync step.
> Use a `plugin` sync step (a WebAssembly sync plugin) — for example, one provided
> by a recipe. The `@dfinity/asset-canister` recipe emits a `plugin` sync step
> starting with `v2.2.0`; earlier versions emit the retired `assets` step and will
> starting with `v2.2.1`; earlier versions emit the retired `assets` step and will
> no longer load. Upgrading an existing project? See
> [Upgrading from icp-cli 0.2](../migration/upgrading-from-v0-2.md).

Expand Down Expand Up @@ -440,7 +440,7 @@ Supported formats:
canisters:
- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build:
sync:
steps:
- type: plugin
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.0-209d688/sync_plugin.wasm
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.1-6b48585/sync_plugin.wasm
sha256: 297c2ef05680d47ac70688d6cebed9bc3a41b2302f400739f894f4f413e6a5ee
dirs:
- app/dist
4 changes: 2 additions & 2 deletions examples/icp-static-assets-recipe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ The [`icp.yaml`](./icp.yaml) file configures a canister using the `@dfinity/asse
canisters:
- name: my-canister
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
version: 0.29.2
dir: www
```

### Key Components

- **`type: "@dfinity/asset-canister@v2.2.0"`**: Uses the official DFINITY asset canister recipe
- **`type: "@dfinity/asset-canister@v2.2.1"`**: Uses the official DFINITY asset canister recipe
- **`version`**: Specifies the assets canister WASM version to use
- **`dir`**: Directory containing static assets to deploy (required)

Expand Down
2 changes: 1 addition & 1 deletion examples/icp-static-assets-recipe/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
canisters:
- name: my-canister
recipe:
type: "@dfinity/asset-canister@v2.2.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
version: 0.29.2
dir: www
4 changes: 2 additions & 2 deletions examples/icp-static-assets/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ canisters:
sync:
steps:
- type: plugin
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.0-209d688/sync_plugin.wasm
sha256: 297c2ef05680d47ac70688d6cebed9bc3a41b2302f400739f894f4f413e6a5ee
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.1-6b48585/sync_plugin.wasm
sha256: ca7cb5666c30d2875f8d5e10535f8a53f97a86c79c263f7d5bdac2fdd1bbf83c
dirs:
- www
4 changes: 2 additions & 2 deletions examples/icp-static-react-site/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ canisters:
command: npm run build

- type: plugin
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.0-209d688/sync_plugin.wasm
sha256: 297c2ef05680d47ac70688d6cebed9bc3a41b2302f400739f894f4f413e6a5ee
url: https://github.com/dfinity/certified-assets/releases/download/migration-v2.2.1-6b48585/sync_plugin.wasm
sha256: ca7cb5666c30d2875f8d5e10535f8a53f97a86c79c263f7d5bdac2fdd1bbf83c
dirs:
- dist
Loading