v0.0.72
Summary
This release focuses on the Satellite and Sputnik.
Satellite
Two new admin endpoints handle asset certification for projects serving large numbers of assets (e.g. 25k+). Due to execution limits, certification can't happen in a single call at that scale — these endpoints make it possible to run it in chunks.
The storage now also accepts uploading assets of 0kb. This fixes an issue surfaced in the Console after upgrading to the latest JS dependencies, notably Vite v8.
The access key structs have also been renamed for consistency (existing "controller" endpoints remain unchanged for backward compatibility), and the SDK now exposes the built-in guards so developers building serverless functions in Rust can reuse them directly in their custom endpoints.
use junobuild_satellite::caller_is_admin;
fn my_function_guard() -> Result<(), String> {
caller_is_admin()
}
#[ic_cdk::query(guard = "my_function_guard")]
fn hello_world() -> String {
"Hello, admin!".to_string()
}
include_satellite!();
Sputnik
A few breaking changes land in the custom functions pipeline, but these should be largely transparent — they affect the auto-generated Rust code rather than the functions you write.
More importantly, this release ships two new features.
Guards are now supported in serverless functions:
import { defineQuery } from "@junobuild/functions";
import { callerIsAdmin } from "@junobuild/functions/sdk";
export const ping = defineQuery({
guard: () => {
throw new Error("No pong today");
},
handler: () => {
console.log("Hello");
}
});
export const hello = defineQuery({
guard: callerIsAdmin,
handler: () => {
console.log("Hello, admin!");
}
});
And HTTPS outcalls are now available from the functions SDK:
import { defineQuery, defineUpdate } from '@junobuild/functions';
import {
httpRequest,
HttpRequestResultSchema,
TransformArgsSchema,
type HttpRequestArgs
} from '@junobuild/functions/ic-cdk';
import { j } from '@junobuild/schema';
const DogSchema = j.strictObject({
message: j.url(),
status: j.string()
});
export const fetchRandomDog = defineUpdate({
result: DogSchema,
handler: async () => {
const args: HttpRequestArgs = {
url: 'https://dog.ceo/api/breeds/image/random',
method: 'GET',
headers: [],
isReplicated: false,
transform: 'trimHeaders'
};
const result = await httpRequest(args);
const decoder = new TextDecoder();
const body = decoder.decode(result.body);
return JSON.parse(body);
}
});
export const trimHeaders = defineQuery({
hidden: true,
args: TransformArgsSchema,
result: HttpRequestResultSchema,
handler: ({ response: { status, body } }) => ({
status,
body,
headers: []
})
});
Overview
| Module | Version | Breaking changes |
|---|---|---|
| Console | v0.4.2 | ️ ️ |
| Satellite | v0.2.1 | ️ |
| Sputnik | v0.4.0 | ⚠️️ ️ |
| Crates | Version | Breaking changes |
|---|---|---|
junobuild-auth | 0.4.0 | ⚠️ |
junobuild-cdn | 0.7.0 | ⚠️ |
junobuild-collections | 0.5.0 | ⚠️ |
junobuild-macros | 0.4.0 | ⚠️ |
junobuild-satellite | 0.6.0 | ⚠️ |
junobuild-shared | 0.8.0 | ⚠️ |
junobuild-storage | 0.7.0 | ⚠️️ |
junobuild-utils | 0.4.0 | ⚠️️️️ |
| Library | Version | Breaking changes |
|---|---|---|
@junobuild/admin | v4.3.2 | ️ |
@junobuild/analytics | v0.2.14 | |
@junobuild/auth | v4.1.1 | |
@junobuild/cdn | v2.4.2 | |
@junobuild/cli-tools | v0.13.3 | |
@junobuild/config | v2.15.1 | |
@junobuild/config-loader | v0.4.10 | |
@junobuild/core | v5.3.1 | |
@junobuild/core-standalone | v5.3.1 | |
@junobuild/errors | v0.2.6 | |
@junobuild/functions | v0.8.2 | |
@junobuild/functions-tools | v0.6.2 | |
@junobuild/ic-client | v8.1.2 | ️ |
@junobuild/schema | v1.2.1 | |
@junobuild/storage | v2.4.1 | |
@junobuild/utils | v1.0.2 |
| CLI | Version | Breaking changes |
|---|---|---|
@junobuild/cli | v0.14.4 |
| Plugins | Version | Breaking changes |
|---|---|---|
@junobuild/vite-plugin | v4.7.1 | |
@junobuild/nextjs-plugin | v4.7.1 |
| Docker | Version | Breaking changes |
|---|---|---|
@junobuild/skylab | v0.6.4 | |
@junobuild/satellite | v0.6.4 | |
@junobuild/console | v0.6.4 |
| GitHub Action | Version | Breaking changes |
|---|---|---|
junobuild/juno-action | v0.6.10 |
Serverless Functions
You can upgrade your Rust Serverless Functions using the following crates:
[dependencies]
candid = "0.10.20"
ic-cdk = "0.19.0"
ic-cdk-macros = "0.19.0"
serde = "1.0.225"
serde_cbor = "0.11.2"
junobuild-satellite = "0.6.0"
junobuild-macros = "0.4.0"
junobuild-utils = "0.4.0"
What's Changed
- build(crates): bump serde and serde_json to latest by @peterpeterparker in https://github.com/junobuild/juno/pull/2676
- feat(satellite): expose guards to SDK by @peterpeterparker in https://github.com/junobuild/juno/pull/2665
- chore(test): downgrade pic-js to v0.17.2 by @peterpeterparker in https://github.com/junobuild/juno/pull/2678
- feat(satellite): rename controllers functions and mod to access_keys by @peterpeterparker in https://github.com/junobuild/juno/pull/2666
- feat(shared): rename Controller types and utils to AccessKey by @peterpeterparker in https://github.com/junobuild/juno/pull/2679
- feat(shared): Controller DID description renamed to AccessKey by @peterpeterparker in https://github.com/junobuild/juno/pull/2681
- build(frontend): bump dependencies by @peterpeterparker in https://github.com/junobuild/juno/pull/2682
- chore(frontend): bump latest eslint rules by @peterpeterparker in https://github.com/junobuild/juno/pull/2683
- chore(test): bump pic-js v0.21 by @peterpeterparker in https://github.com/junobuild/juno/pull/2684
- feat(auth): bump jsonwebtoken-icp to v10.3.0 by @peterpeterparker in https://github.com/junobuild/juno/pull/2675
- feat(shared): rename SetController interfaces to AccessKey by @peterpeterparker in https://github.com/junobuild/juno/pull/2687
- feat(shared): rename shared assertion for access key related to caller by @peterpeterparker in https://github.com/junobuild/juno/pull/2688
- feat(sputnik): rename controller to access key in rquicks bridge by @peterpeterparker in https://github.com/junobuild/juno/pull/2690
- feat(shared): rework naming of access keys shared utils by @peterpeterparker in https://github.com/junobuild/juno/pull/2691
- feat(sputnik): review sdk access keys and integrate guards by @peterpeterparker in https://github.com/junobuild/juno/pull/2689
- feat(sputnik): support for custom functions guard by @peterpeterparker in https://github.com/junobuild/juno/pull/2692
- feat(satellite): re-export shared access keys functions by @peterpeterparker in https://github.com/junobuild/juno/pull/2693
- feat(frontend): fetch kongswap for a single token by @peterpeterparker in https://github.com/junobuild/juno/pull/2694
- feat(storage,cdn): allow 0kb chunk assets by @peterpeterparker in https://github.com/junobuild/juno/pull/2696
- feat(frontend): disallow deleting reserved .well-known assets by @peterpeterparker in https://github.com/junobuild/juno/pull/2697
- fix(frontend): remove delegation for stale information in multi tabs login by @peterpeterparker in https://github.com/junobuild/juno/pull/2698
- feat(frontend): rename init_certified_assets by @peterpeterparker in https://github.com/junobuild/juno/pull/2701
- feat(frontend): rename init_certified_assets strategy too by @peterpeterparker in https://github.com/junobuild/juno/pull/2702
- feat(satellite): certify assets chunk by @peterpeterparker in https://github.com/junobuild/juno/pull/2700
- test(frontend): adapt for remove delegation by @peterpeterparker in https://github.com/junobuild/juno/pull/2706
- feat(frontend): replace KongSwap with Juno API by @peterpeterparker in https://github.com/junobuild/juno/pull/2705
- feat(frontend): set JUNO_API_URL on prod as well by @peterpeterparker in https://github.com/junobuild/juno/pull/2707
- feat(frontend): use JUNO_API_URL constant by @peterpeterparker in https://github.com/junobuild/juno/pull/2708
- build(backend): Update Rust version by @github-actions[bot] in https://github.com/junobuild/juno/pull/2699
- refactor(frontend): replace Option with Nullish by @peterpeterparker in https://github.com/junobuild/juno/pull/2709
- feat(satellite): add skip_certification to set_storage_config by @peterpeterparker in https://github.com/junobuild/juno/pull/2704
- feat(macros,functions): rename camel case to snake case by @peterpeterparker in https://github.com/junobuild/juno/pull/2710
- feat(macros,functions): support for optional() by @peterpeterparker in https://github.com/junobuild/juno/pull/2711
- refactor(sputnik): invert javy text_encoding package by @peterpeterparker in https://github.com/junobuild/juno/pull/2713
- refactor(sputnik): flatten llrt package for utils by @peterpeterparker in https://github.com/junobuild/juno/pull/2714
- refactor(sputnik): extract separate blob module by @peterpeterparker in https://github.com/junobuild/juno/pull/2715
- feat(sputnik): url polyfill by @peterpeterparker in https://github.com/junobuild/juno/pull/2716
- feat(utils,macros): support for nat by @peterpeterparker in https://github.com/junobuild/juno/pull/2717
- feat(frontend): remove onstorage sync by @peterpeterparker in https://github.com/junobuild/juno/pull/2718
- feat(sputnik): support for http_request by @peterpeterparker in https://github.com/junobuild/juno/pull/2634
- feat(satellite): skip_certification as separate parameter by @peterpeterparker in https://github.com/junobuild/juno/pull/2719
- feat(frontend): Update Subnets by @github-actions[bot] in https://github.com/junobuild/juno/pull/2723
- feat(frontend): Update Passkey AAGUIDs by @github-actions[bot] in https://github.com/junobuild/juno/pull/2721
- feat(frontend): handle aaguid without logo by @peterpeterparker in https://github.com/junobuild/juno/pull/2726
- feat(frontend): Update Passkey AAGUIDs by @github-actions[bot] in https://github.com/junobuild/juno/pull/2727
- feat(frontend): Update Subnets by @github-actions[bot] in https://github.com/junobuild/juno/pull/2728
- feat(sputnik): Polyfills updated by @github-actions[bot] in https://github.com/junobuild/juno/pull/2720
- build(frontend): use released juno JS libs by @peterpeterparker in https://github.com/junobuild/juno/pull/2729
- build(declarations): bump @icp-sdk/bindgen by @peterpeterparker in https://github.com/junobuild/juno/pull/2731
- build(frontend): bump dev dependencies by @peterpeterparker in https://github.com/junobuild/juno/pull/2730
- build(frontend): bump icp-sdk/core 5.2.1 which hopefully resolve the undefined issue by @peterpeterparker in https://github.com/junobuild/juno/pull/2732
- build(frontend): bump remaining runtime dependencies by @peterpeterparker in https://github.com/junobuild/juno/pull/2733
- chore(crates): release crates including bumped Satellite by @peterpeterparker in https://github.com/junobuild/juno/pull/2734
- chore(console,sputnik): set version for release by @peterpeterparker in https://github.com/junobuild/juno/pull/2735
Full Changelog: https://github.com/junobuild/juno/compare/v0.0.71...v0.0.72