From 2ed552fb51121e40ceb8c1828d0b326175645943 Mon Sep 17 00:00:00 2001 From: Dan Steren Date: Fri, 8 Sep 2023 17:30:05 -0600 Subject: [PATCH] Rename entry points --- .../rejections/{rejections.did => index.did} | 0 .../rejections/{rejections.ts => index.ts} | 0 .../some_service/{some_service.did => index.did} | 0 .../canisters/some_service/some_service.ts | 16 ---------------- examples/rejections/dfx.json | 8 ++++---- 5 files changed, 4 insertions(+), 20 deletions(-) rename examples/rejections/canisters/rejections/{rejections.did => index.did} (100%) rename examples/rejections/canisters/rejections/{rejections.ts => index.ts} (100%) rename examples/rejections/canisters/some_service/{some_service.did => index.did} (100%) delete mode 100644 examples/rejections/canisters/some_service/some_service.ts diff --git a/examples/rejections/canisters/rejections/rejections.did b/examples/rejections/canisters/rejections/index.did similarity index 100% rename from examples/rejections/canisters/rejections/rejections.did rename to examples/rejections/canisters/rejections/index.did diff --git a/examples/rejections/canisters/rejections/rejections.ts b/examples/rejections/canisters/rejections/index.ts similarity index 100% rename from examples/rejections/canisters/rejections/rejections.ts rename to examples/rejections/canisters/rejections/index.ts diff --git a/examples/rejections/canisters/some_service/some_service.did b/examples/rejections/canisters/some_service/index.did similarity index 100% rename from examples/rejections/canisters/some_service/some_service.did rename to examples/rejections/canisters/some_service/index.did diff --git a/examples/rejections/canisters/some_service/some_service.ts b/examples/rejections/canisters/some_service/some_service.ts deleted file mode 100644 index 0ad6a9c9e9..0000000000 --- a/examples/rejections/canisters/some_service/some_service.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { empty, ic, Manual, $query } from 'azle'; - -$query; -export function accept(): boolean { - return true; -} - -$query; -export function error(): Manual { - // This errors because neither ic.reject nor ic.reply were called -} - -$query; -export function reject(message: string): Manual { - ic.reject(message); -} diff --git a/examples/rejections/dfx.json b/examples/rejections/dfx.json index 84c5ae6573..0326e4c996 100644 --- a/examples/rejections/dfx.json +++ b/examples/rejections/dfx.json @@ -4,8 +4,8 @@ "type": "custom", "build": "npx azle rejections", "root": "canisters/rejections", - "ts": "canisters/rejections/rejections.ts", - "candid": "canisters/rejections/rejections.did", + "ts": "canisters/rejections/index.ts", + "candid": "canisters/rejections/index.did", "wasm": ".azle/rejections/rejections.wasm.gz", "declarations": { "output": "test/dfx_generated/rejections", @@ -17,8 +17,8 @@ "type": "custom", "build": "npx azle some_service", "root": "canisters/some_service", - "ts": "canisters/some_service/some_service.ts", - "candid": "canisters/some_service/some_service.did", + "ts": "canisters/some_service/index.ts", + "candid": "canisters/some_service/index.did", "wasm": ".azle/some_service/some_service.wasm.gz", "declarations": { "output": "test/dfx_generated/some_service",