Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated robust imports example to functional runtime syntax #1291

Merged
merged 4 commits into from
Sep 27, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# "examples/func_types",
# "examples/generics",
# "examples/motoko_examples/superheroes", # blocked by recursive
# "examples/robust_imports",
# "examples/run_time_errors",
# "examples/tuple_types",

Expand Down Expand Up @@ -83,8 +82,8 @@ jobs:
"examples/guard_functions",
"examples/heartbeat",
"examples/ic_api",
"examples/init",
"examples/imports",
"examples/init",
"examples/inspect_message",
"examples/key_value_store",
"examples/ledger_canister",
Expand Down Expand Up @@ -115,6 +114,7 @@ jobs:
"examples/query",
"examples/randomness",
"examples/rejections",
"examples/robust_imports",
"examples/service",
"examples/simple_erc20",
"examples/simple_user_accounts",
Expand Down
6 changes: 3 additions & 3 deletions examples/robust_imports/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"root": "src",
"ts": "src/index.ts",
"candid": "src/index.did",
"wasm": ".azle/robust_imports/robust_imports.wasm.gz",
"wasm": ".azle/robust_imports/robust_imports.wasm",
"gzip": true,
"declarations": {
"output": "dfx_generated/robust_imports",
"node_compatibility": true
},
"opt_level": "1"
}
}
}
}
35 changes: 14 additions & 21 deletions examples/robust_imports/src/azle_coverage/fruit.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { $query as $kiwi, Alias } from 'azle';
export default $kiwi;
import { query as kiwi } from 'azle';
export default kiwi;

export {
Alias as Apple,
bool as blackberry,
blob as banana,
CallResult as Cherry,
empty as elderberry,
float32 as fig32,
float64 as fig64,
Func as Farkleberry,
GuardResult as Grapes,
$heartbeat as $honeydew,
$init as $icaco,
$inspectMessage as $ilama,
heartbeat as honeydew,
init as icaco,
inspectMessage as ilama,
int as iceApple,
int8 as iceApple8,
int16 as iceApple16,
Expand All @@ -24,26 +22,21 @@ export {
nat16 as nectarine16,
nat32 as nectarine32,
nat64 as nectarine64,
Oneway as Orange,
Null as Nutmeg,
Opt as Olive,
$postUpgrade as $pomegranate,
$preUpgrade as $pineapple,
postUpgrade as pomegranate,
preUpgrade as pineapple,
principal as peach,
Principal as Peach,
$query as $quince,
Query as Quince,
query as quince,
Record as Raspberry,
reserved as rambutan,
Service as Strawberry,
serviceQuery as santol,
serviceUpdate as sapodilla,
StableBTreeMap as Soncoya,
text as tangerine,
Tuple as Tamarind,
$update as $ugni,
Update as Ugni,
update as ugni,
Variant as Voavanga,
Vec as Lime
Vec as Lime,
Void as Vanilla
} from 'azle';
export type blackberry = boolean;
export type nutmeg = null;
export type vanilla = void;
Loading