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",