Docs v2.3.0
With a bit of delay, I spent the day documenting all the new features—hooks and new JS functions—that were released on Sunday in Juno v0.0.37.
https://juno.build
I also tackled tasks that had been on my to-do list for quite some time, such as documenting that the Docker container we use for local development actually exposes a small additional server, which can be used for admin tasks like obtaining free local ICP from the ledger.
#!/usr/bin/env bash
if [ -z "$1" ]; then
read -r -p "Enter the Wallet ID (owner account, principal): " PRINCIPAL
else
PRINCIPAL=$1
fi
curl "http://localhost:5999/ledger/transfer/?to=$PRINCIPAL"
Finally, I also reworked the entire configuration section, providing detailed explanations for each and every option available in the juno.config
file, whether in TypeScript, JavaScript, or JSON.
import { defineConfig } from "@junobuild/config";
export default defineConfig({
satellite: {
id: "qsgjb-riaaa-aaaaa-aaaga-cai",
source: "build",
ignore: ["**/*.txt", ".tmp/"],
gzip: false,
encoding: [["**/releases/*.gz", "identity"]],
predeploy: ["npm run build", "npm run lint"],
postdeploy: ["./scripts/notify-admins.sh", "echo 'Deployment complete'"],
storage: {
headers: [
{
source: "/",
headers: [["Cache-Control", "public,max-age=0,must-revalidate"]]
}
],
rewrites: [
{
source: "/hello/**",
destination: "/hello/world.html"
}
],
redirects: [
{
source: "/hello",
location: "/world/index.html",
code: 301
}
],
iframe: "same-origin",
maxMemorySize: {
stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory
}
},
datastore: {
maxMemorySize: {
stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory
}
},
authentication: {
internetIdentity: {
derivationOrigin: "hello.com"
}
},
assertions: {
heapMemory: 678000000
},
settings: {
freezingThreshold: 2_592_000n,
reservedCyclesLimit: 5_000_000_000_000n,
logVisibility: "controllers",
heapMemoryLimit: 2048n,
memoryAllocation: 1_073_741_824n,
computeAllocation: 50n
}
},
orbiter: {
id: "eeeee-fffff-ddddd-11111-cai"
}
});