diff --git a/examples/apollo_server/dfx.json b/examples/apollo_server/dfx.json index 4b134be7b1..44ae8d3f23 100644 --- a/examples/apollo_server/dfx.json +++ b/examples/apollo_server/dfx.json @@ -7,7 +7,17 @@ "candid_gen": "http", "build": "npx azle apollo_server", "wasm": ".azle/apollo_server/apollo_server.wasm", - "gzip": true + "gzip": true, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/async_await/dfx.json b/examples/async_await/dfx.json index 3c5052b091..fde5007fb1 100644 --- a/examples/async_await/dfx.json +++ b/examples/async_await/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/async_await", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/async_await.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/audio_recorder/dfx.json b/examples/audio_recorder/dfx.json index f09d1d5548..f786ee477b 100644 --- a/examples/audio_recorder/dfx.json +++ b/examples/audio_recorder/dfx.json @@ -11,7 +11,17 @@ "declarations": { "output": "test/dfx_generated/audio_recorder", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/basic_bitcoin/dfx.json b/examples/basic_bitcoin/dfx.json index 3acdb38c55..c622c383d8 100644 --- a/examples/basic_bitcoin/dfx.json +++ b/examples/basic_bitcoin/dfx.json @@ -9,7 +9,17 @@ "declarations": { "output": "test/dfx_generated/basic_bitcoin", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/bitcoin/dfx.json b/examples/bitcoin/dfx.json index 0c1e281301..d3ba3b104d 100644 --- a/examples/bitcoin/dfx.json +++ b/examples/bitcoin/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/bitcoin", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } }, "networks": { diff --git a/examples/blob_array/dfx.json b/examples/blob_array/dfx.json index 7ec70eed6c..8d08569784 100644 --- a/examples/blob_array/dfx.json +++ b/examples/blob_array/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/blob_array", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/bytes/dfx.json b/examples/bytes/dfx.json index 0b51231fc9..0e6d495df9 100644 --- a/examples/bytes/dfx.json +++ b/examples/bytes/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/bytes_canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/call_raw/dfx.json b/examples/call_raw/dfx.json index c9267ffd6f..e6d4074c65 100644 --- a/examples/call_raw/dfx.json +++ b/examples/call_raw/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/call_raw", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/candid_encoding/dfx.json b/examples/candid_encoding/dfx.json index f73a43ddb2..04c8e3e2ab 100644 --- a/examples/candid_encoding/dfx.json +++ b/examples/candid_encoding/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/candid_encoding", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/candid_keywords/dfx.json b/examples/candid_keywords/dfx.json index bcfd32c17b..006a78687a 100644 --- a/examples/candid_keywords/dfx.json +++ b/examples/candid_keywords/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/candid_keywords", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/canister/dfx.json b/examples/canister/dfx.json index df55bea8e0..105b42fcb3 100644 --- a/examples/canister/dfx.json +++ b/examples/canister/dfx.json @@ -12,7 +12,17 @@ "node_compatibility": true }, "env": ["SOME_CANISTER_PRINCIPAL", "AZLE_TEST_FETCH"], - "assets": [["src/some_canister.did", "src/some_canister.did"]] + "assets": [["src/some_canister.did", "src/some_canister.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "some_canister": { "type": "custom", @@ -24,7 +34,17 @@ "declarations": { "output": "test/dfx_generated/some_canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/some_canister.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/ckbtc/dfx.json b/examples/ckbtc/dfx.json index 613a166184..b2f59e096c 100644 --- a/examples/ckbtc/dfx.json +++ b/examples/ckbtc/dfx.json @@ -32,7 +32,17 @@ "output": "wallet/frontend/dfx_generated/wallet_backend" }, "env": ["CK_BTC_PRINCIPAL", "MINTER_PRINCIPAL", "AZLE_TEST_FETCH"], - "assets": [["minter/minter.did", "minter/minter.did"]] + "assets": [["minter/minter.did", "minter/minter.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "wallet/backend/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "wallet_frontend": { "type": "assets", diff --git a/examples/complex_init/dfx.json b/examples/complex_init/dfx.json index 46b5f975ee..7cacb9d3be 100644 --- a/examples/complex_init/dfx.json +++ b/examples/complex_init/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/complex_init", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/complex_init/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "rec_init": { "type": "custom", @@ -22,7 +32,17 @@ "declarations": { "output": "test/dfx_generated/rec_init", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/rec_init/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/complex_types/dfx.json b/examples/complex_types/dfx.json index 4bead9c4e9..1c9cf8bec7 100644 --- a/examples/complex_types/dfx.json +++ b/examples/complex_types/dfx.json @@ -11,7 +11,17 @@ "declarations": { "output": "test/dfx_generated/complex_types", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/composite_queries/dfx.json b/examples/composite_queries/dfx.json index 86172e332d..420b69ff86 100644 --- a/examples/composite_queries/dfx.json +++ b/examples/composite_queries/dfx.json @@ -21,6 +21,16 @@ ["src/canister1/index.did", "src/canister1.did"], ["src/canister2/index.did", "src/canister2.did"], ["src/canister3/index.did", "src/canister3.did"] + ], + "metadata": [ + { + "name": "candid:service", + "path": "src/canister1/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } ] }, "canister2": { @@ -35,7 +45,17 @@ "node_compatibility": true }, "env": ["CANISTER3_PRINCIPAL", "AZLE_TEST_FETCH"], - "assets": [["src/canister3/index.did", "src/canister3.did"]] + "assets": [["src/canister3/index.did", "src/canister3.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "src/canister2/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "canister3": { "type": "custom", @@ -47,7 +67,17 @@ "declarations": { "output": "test/dfx_generated/canister3", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/canister3/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/counter/dfx.json b/examples/counter/dfx.json index b7e1f6b41b..22ef02aecc 100644 --- a/examples/counter/dfx.json +++ b/examples/counter/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/counter", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/cross_canister_calls/dfx.json b/examples/cross_canister_calls/dfx.json index 050f9f7cd4..aa0390ba32 100644 --- a/examples/cross_canister_calls/dfx.json +++ b/examples/cross_canister_calls/dfx.json @@ -12,7 +12,17 @@ "node_compatibility": true }, "env": ["CANISTER2_PRINCIPAL", "AZLE_TEST_FETCH"], - "assets": [["src/canister2/index.did", "src/canister2/index.did"]] + "assets": [["src/canister2/index.did", "src/canister2/index.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "src/canister1/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "canister2": { "type": "custom", @@ -24,7 +34,17 @@ "declarations": { "output": "test/dfx_generated/canister2", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/canister2/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/cycles/dfx.json b/examples/cycles/dfx.json index ca2d755161..c34dc3922f 100644 --- a/examples/cycles/dfx.json +++ b/examples/cycles/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/cycles", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/cycles/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "intermediary": { "type": "custom", @@ -24,7 +34,17 @@ "node_compatibility": true }, "env": ["CYCLES_PRINCIPAL", "AZLE_TEST_FETCH"], - "assets": [["src/cycles/index.did", "src/cycles/index.did"]] + "assets": [["src/cycles/index.did", "src/cycles/index.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "src/intermediary/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/date/dfx.json b/examples/date/dfx.json index 96067fbe8a..ffd080ae0d 100644 --- a/examples/date/dfx.json +++ b/examples/date/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/date", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/ethereum_json_rpc/dfx.json b/examples/ethereum_json_rpc/dfx.json index 7278e06159..ced5536cad 100644 --- a/examples/ethereum_json_rpc/dfx.json +++ b/examples/ethereum_json_rpc/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/ethereum_json_rpc", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/ethers/dfx.json b/examples/ethers/dfx.json index 1b57d97a49..4cd08e1c03 100644 --- a/examples/ethers/dfx.json +++ b/examples/ethers/dfx.json @@ -7,7 +7,17 @@ "candid_gen": "http", "build": "npx azle ethers", "wasm": ".azle/ethers/ethers.wasm", - "gzip": true + "gzip": true, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/express/dfx.json b/examples/express/dfx.json index 0992547e5c..4a94554213 100644 --- a/examples/express/dfx.json +++ b/examples/express/dfx.json @@ -9,7 +9,17 @@ "wasm": ".azle/express/express.wasm", "gzip": true, "assets": [["src/frontend/dist", "dist"]], - "build_assets": "npm run build" + "build_assets": "npm run build", + "metadata": [ + { + "name": "candid:service", + "path": "src/backend/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/fs/dfx.json b/examples/fs/dfx.json index e97f33592b..3899929d63 100644 --- a/examples/fs/dfx.json +++ b/examples/fs/dfx.json @@ -7,7 +7,17 @@ "candid_gen": "http", "build": "npx azle fs", "wasm": ".azle/fs/fs.wasm", - "gzip": true + "gzip": true, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/func_types/dfx.json b/examples/func_types/dfx.json index 9e65249924..dd1cd04dbf 100644 --- a/examples/func_types/dfx.json +++ b/examples/func_types/dfx.json @@ -12,7 +12,17 @@ "node_compatibility": true }, "env": ["NOTIFIERS_PRINCIPAL", "AZLE_TEST_FETCH"], - "assets": [["canisters/notifiers/index.did", "src/notifiers.did"]] + "assets": [["canisters/notifiers/index.did", "src/notifiers.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "canisters/func_types/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "notifiers": { "type": "custom", @@ -25,7 +35,17 @@ "output": "test/dfx_generated/notifiers", "node_compatibility": true }, - "env": ["NOTIFIERS_PRINCIPAL"] + "env": ["NOTIFIERS_PRINCIPAL"], + "metadata": [ + { + "name": "candid:service", + "path": "canisters/notifiers/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/generics/dfx.json b/examples/generics/dfx.json index 2218848311..e424fede2e 100644 --- a/examples/generics/dfx.json +++ b/examples/generics/dfx.json @@ -9,7 +9,17 @@ "declarations": { "output": "test/dfx_generated/generics", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/guard_functions/dfx.json b/examples/guard_functions/dfx.json index c2113ddf71..c50ed06f14 100644 --- a/examples/guard_functions/dfx.json +++ b/examples/guard_functions/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/guard_functions", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/heartbeat/dfx.json b/examples/heartbeat/dfx.json index f5ec17f385..b4753d568f 100644 --- a/examples/heartbeat/dfx.json +++ b/examples/heartbeat/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/heartbeat_async", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/heartbeat_async/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "heartbeat_sync": { "type": "custom", @@ -23,7 +33,17 @@ "declarations": { "output": "test/dfx_generated/heartbeat_sync", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/heartbeat_sync/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/hello_world/dfx.json b/examples/hello_world/dfx.json index 8080e60bbd..3f394bb562 100644 --- a/examples/hello_world/dfx.json +++ b/examples/hello_world/dfx.json @@ -9,7 +9,17 @@ "wasm": ".azle/backend/backend.wasm", "gzip": true, "assets": [["src/frontend/dist", "dist"]], - "build_assets": "npm run build" + "build_assets": "npm run build", + "metadata": [ + { + "name": "candid:service", + "path": "src/backend/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/ic_api/dfx.json b/examples/ic_api/dfx.json index 3c0b4998de..d196a8c1df 100644 --- a/examples/ic_api/dfx.json +++ b/examples/ic_api/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/ic_api", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/ic_evm_rpc/dfx.json b/examples/ic_evm_rpc/dfx.json index 7460cf656b..6751b013b9 100644 --- a/examples/ic_evm_rpc/dfx.json +++ b/examples/ic_evm_rpc/dfx.json @@ -8,7 +8,17 @@ "build": "npx azle server", "wasm": ".azle/server/server.wasm", "gzip": true, - "assets": [["src/evm_rpc.did", "src/evm_rpc.did"]] + "assets": [["src/evm_rpc.did", "src/evm_rpc.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "src/server.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "evm_rpc": { "type": "custom", diff --git a/examples/icrc/dfx.json b/examples/icrc/dfx.json index 056b55257f..b29ff4a9ba 100644 --- a/examples/icrc/dfx.json +++ b/examples/icrc/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/proxy", "node_compatibility": true }, - "env": ["ICRC_PRINCIPAL", "AZLE_TEST_FETCH"] + "env": ["ICRC_PRINCIPAL", "AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "canisters/proxy/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "icrc": { "type": "motoko", diff --git a/examples/imports/dfx.json b/examples/imports/dfx.json index f37331f2ba..b5645aedf9 100644 --- a/examples/imports/dfx.json +++ b/examples/imports/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/imports", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/init/dfx.json b/examples/init/dfx.json index a26a858c63..d6c678292e 100644 --- a/examples/init/dfx.json +++ b/examples/init/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/init", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/inspect_message/dfx.json b/examples/inspect_message/dfx.json index 17f259ae14..2ca06be47d 100644 --- a/examples/inspect_message/dfx.json +++ b/examples/inspect_message/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/inspect_message", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/key_value_store/dfx.json b/examples/key_value_store/dfx.json index 48733b637c..341c24d4f4 100644 --- a/examples/key_value_store/dfx.json +++ b/examples/key_value_store/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/key_value_store", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/ledger_canister/dfx.json b/examples/ledger_canister/dfx.json index 227d9c4c6d..b3563b831c 100644 --- a/examples/ledger_canister/dfx.json +++ b/examples/ledger_canister/dfx.json @@ -12,7 +12,17 @@ "node_compatibility": true }, "env": ["ICP_CANISTER_PRINCIPAL", "AZLE_TEST_FETCH"], - "assets": [["src/icp_ledger/ledger.public.did", "src/ledger.did"]] + "assets": [["src/icp_ledger/ledger.public.did", "src/ledger.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "src/ledger_canister/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "icp_ledger": { "type": "custom", diff --git a/examples/list_of_lists/dfx.json b/examples/list_of_lists/dfx.json index 967c310da6..118b298c16 100644 --- a/examples/list_of_lists/dfx.json +++ b/examples/list_of_lists/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "dfx_generated/list_of_lists", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/management_canister/dfx.json b/examples/management_canister/dfx.json index cb0539fa02..2626abbfd6 100644 --- a/examples/management_canister/dfx.json +++ b/examples/management_canister/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/management_canister", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/manual_reply/dfx.json b/examples/manual_reply/dfx.json index 504225cf1c..664d91e191 100644 --- a/examples/manual_reply/dfx.json +++ b/examples/manual_reply/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/manual_reply", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/calc/dfx.json b/examples/motoko_examples/calc/dfx.json index 3952f300bc..1c2210a8ec 100644 --- a/examples/motoko_examples/calc/dfx.json +++ b/examples/motoko_examples/calc/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/calc", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/counter/dfx.json b/examples/motoko_examples/counter/dfx.json index b7e1f6b41b..22ef02aecc 100644 --- a/examples/motoko_examples/counter/dfx.json +++ b/examples/motoko_examples/counter/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/counter", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/echo/dfx.json b/examples/motoko_examples/echo/dfx.json index 694a4417d6..2cc3915669 100644 --- a/examples/motoko_examples/echo/dfx.json +++ b/examples/motoko_examples/echo/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/echo", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/factorial/dfx.json b/examples/motoko_examples/factorial/dfx.json index 52d7281330..07595b0098 100644 --- a/examples/motoko_examples/factorial/dfx.json +++ b/examples/motoko_examples/factorial/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/factorial", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/hello-world/dfx.json b/examples/motoko_examples/hello-world/dfx.json index e4ae1260d7..dfe8b6cab7 100644 --- a/examples/motoko_examples/hello-world/dfx.json +++ b/examples/motoko_examples/hello-world/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/hello_world", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/hello/dfx.json b/examples/motoko_examples/hello/dfx.json index 897058bd68..92822afe87 100644 --- a/examples/motoko_examples/hello/dfx.json +++ b/examples/motoko_examples/hello/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "dfx_generated/hello", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/hello/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "hello_assets": { "type": "assets", diff --git a/examples/motoko_examples/http_counter/dfx.json b/examples/motoko_examples/http_counter/dfx.json index 37660059eb..3cb0c71e2e 100644 --- a/examples/motoko_examples/http_counter/dfx.json +++ b/examples/motoko_examples/http_counter/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/http_counter", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/minimal-counter-dapp/dfx.json b/examples/motoko_examples/minimal-counter-dapp/dfx.json index b52fcae980..add9a707a8 100644 --- a/examples/motoko_examples/minimal-counter-dapp/dfx.json +++ b/examples/motoko_examples/minimal-counter-dapp/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "src/declarations/minimal_dapp", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/minimal_dapp/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "minimal_dapp_assets": { "type": "assets", diff --git a/examples/motoko_examples/persistent-storage/dfx.json b/examples/motoko_examples/persistent-storage/dfx.json index b67b99e64a..2148bf7a8d 100644 --- a/examples/motoko_examples/persistent-storage/dfx.json +++ b/examples/motoko_examples/persistent-storage/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/persistent_storage", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/phone-book/dfx.json b/examples/motoko_examples/phone-book/dfx.json index 0a9fae76ae..721bf6fc8c 100644 --- a/examples/motoko_examples/phone-book/dfx.json +++ b/examples/motoko_examples/phone-book/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "src/declarations/phone_book", "node_compatibility": false - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/phone_book/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "www": { "type": "assets", diff --git a/examples/motoko_examples/quicksort/dfx.json b/examples/motoko_examples/quicksort/dfx.json index 82e0b8c31a..18672c6e57 100644 --- a/examples/motoko_examples/quicksort/dfx.json +++ b/examples/motoko_examples/quicksort/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/quicksort", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/simple-to-do/dfx.json b/examples/motoko_examples/simple-to-do/dfx.json index 46bbb8fe49..e3f2c6b8aa 100644 --- a/examples/motoko_examples/simple-to-do/dfx.json +++ b/examples/motoko_examples/simple-to-do/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/simple_to_do", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/superheroes/dfx.json b/examples/motoko_examples/superheroes/dfx.json index facee5c0a7..b566665a0c 100644 --- a/examples/motoko_examples/superheroes/dfx.json +++ b/examples/motoko_examples/superheroes/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "src/declarations", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/superheroes/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "www": { "type": "assets", diff --git a/examples/motoko_examples/threshold_ecdsa/dfx.json b/examples/motoko_examples/threshold_ecdsa/dfx.json index 09e695378b..77e932251b 100644 --- a/examples/motoko_examples/threshold_ecdsa/dfx.json +++ b/examples/motoko_examples/threshold_ecdsa/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/threshold_ecdsa", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/motoko_examples/whoami/dfx.json b/examples/motoko_examples/whoami/dfx.json index f3af24cbff..a59d91e5f0 100644 --- a/examples/motoko_examples/whoami/dfx.json +++ b/examples/motoko_examples/whoami/dfx.json @@ -12,7 +12,17 @@ "node_compatibility": true }, "env": ["AZLE_TEST_FETCH"], - "assets": [["src/index.did", "src/whoami.did"]] + "assets": [["src/index.did", "src/whoami.did"]], + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/notify_raw/dfx.json b/examples/notify_raw/dfx.json index b82cf1614f..57835877ec 100644 --- a/examples/notify_raw/dfx.json +++ b/examples/notify_raw/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/canister1", "node_compatibility": true }, - "env": ["CANISTER2_PRINCIPAL"] + "env": ["CANISTER2_PRINCIPAL"], + "metadata": [ + { + "name": "candid:service", + "path": "src/canister1/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "canister2": { "type": "custom", @@ -23,7 +33,17 @@ "declarations": { "output": "test/dfx_generated/canister2", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/canister2/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/null_example/dfx.json b/examples/null_example/dfx.json index 8fd483915a..1c125a37ad 100644 --- a/examples/null_example/dfx.json +++ b/examples/null_example/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/null_example", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/optional_types/dfx.json b/examples/optional_types/dfx.json index e217bebe08..f055eb457a 100644 --- a/examples/optional_types/dfx.json +++ b/examples/optional_types/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/optional_types", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/outgoing_http_requests/dfx.json b/examples/outgoing_http_requests/dfx.json index 43400d1685..98cd0ac2cd 100644 --- a/examples/outgoing_http_requests/dfx.json +++ b/examples/outgoing_http_requests/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/outgoing_http_requests", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/plugins/dfx.json b/examples/plugins/dfx.json index 1c4aa3207f..b47cd98030 100644 --- a/examples/plugins/dfx.json +++ b/examples/plugins/dfx.json @@ -9,7 +9,17 @@ "declarations": { "output": "test/dfx_generated/plugins", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/pre_and_post_upgrade/dfx.json b/examples/pre_and_post_upgrade/dfx.json index 858800c4c0..07107f634e 100644 --- a/examples/pre_and_post_upgrade/dfx.json +++ b/examples/pre_and_post_upgrade/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/pre_and_post_upgrade", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/primitive_ops/dfx.json b/examples/primitive_ops/dfx.json index eeb82cb97a..286f4039ef 100644 --- a/examples/primitive_ops/dfx.json +++ b/examples/primitive_ops/dfx.json @@ -9,7 +9,17 @@ "gzip": true, "declarations": { "output": "dfx_generated/azle" - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "canisters/azle/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "motoko": { "type": "motoko", diff --git a/examples/primitive_types/dfx.json b/examples/primitive_types/dfx.json index a5e89487ad..9628e1964d 100644 --- a/examples/primitive_types/dfx.json +++ b/examples/primitive_types/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/primitive_types", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/principal/dfx.json b/examples/principal/dfx.json index 65bab57214..61f15a49f4 100644 --- a/examples/principal/dfx.json +++ b/examples/principal/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/principal", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/query/dfx.json b/examples/query/dfx.json index 1ad6554535..5b3ede95e4 100644 --- a/examples/query/dfx.json +++ b/examples/query/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/query", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/randomness/dfx.json b/examples/randomness/dfx.json index 02b1b6da23..00b9464195 100644 --- a/examples/randomness/dfx.json +++ b/examples/randomness/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/randomness", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/recursion/dfx.json b/examples/recursion/dfx.json index f6558942bd..86b7c2b234 100644 --- a/examples/recursion/dfx.json +++ b/examples/recursion/dfx.json @@ -17,6 +17,16 @@ "src/recursive_canister/index.did", "src/recursive_canister.did" ] + ], + "metadata": [ + { + "name": "candid:service", + "path": "src/recursion/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } ] }, "recursive_canister": { @@ -29,7 +39,17 @@ "declarations": { "output": "test/dfx_generated/recursive_canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/recursive_canister/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/rejections/dfx.json b/examples/rejections/dfx.json index b6bd16c48d..49c5633447 100644 --- a/examples/rejections/dfx.json +++ b/examples/rejections/dfx.json @@ -15,6 +15,16 @@ "assets": [ ["src/some_canister/index.did", "src/some_canister.did"], ["src/nonexistent.did", "src/nonexistent.did"] + ], + "metadata": [ + { + "name": "candid:service", + "path": "src/rejections/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } ] }, "some_canister": { @@ -27,7 +37,17 @@ "declarations": { "output": "test/dfx_generated/some_canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/some_canister/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/robust_imports/dfx.json b/examples/robust_imports/dfx.json index 50438a99c6..d3140456cc 100644 --- a/examples/robust_imports/dfx.json +++ b/examples/robust_imports/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "dfx_generated/robust_imports", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/run_time_errors/dfx.json b/examples/run_time_errors/dfx.json index d40f8d4ec5..6c0ba7c684 100644 --- a/examples/run_time_errors/dfx.json +++ b/examples/run_time_errors/dfx.json @@ -9,7 +9,17 @@ "declarations": { "output": "test/dfx_generated/run_time_errors", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/simple_erc20/dfx.json b/examples/simple_erc20/dfx.json index 29a586a9e3..417e323d73 100644 --- a/examples/simple_erc20/dfx.json +++ b/examples/simple_erc20/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/simple_erc20", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/simple_user_accounts/dfx.json b/examples/simple_user_accounts/dfx.json index 7843a39151..e3f6936b2a 100644 --- a/examples/simple_user_accounts/dfx.json +++ b/examples/simple_user_accounts/dfx.json @@ -11,7 +11,17 @@ "declarations": { "output": "test/dfx_generated/simple_user_accounts", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/sqlite/dfx.json b/examples/sqlite/dfx.json index 17a154818c..d7325374ea 100644 --- a/examples/sqlite/dfx.json +++ b/examples/sqlite/dfx.json @@ -7,7 +7,17 @@ "candid_gen": "http", "build": "npx azle sqlite", "wasm": ".azle/sqlite/sqlite.wasm", - "gzip": true + "gzip": true, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/stable_b_tree_map_instruction_threshold/dfx.json b/examples/stable_b_tree_map_instruction_threshold/dfx.json index 2830522f25..cdccde9143 100644 --- a/examples/stable_b_tree_map_instruction_threshold/dfx.json +++ b/examples/stable_b_tree_map_instruction_threshold/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/stable_b_tree_map_instruction_threshold", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/stable_memory/dfx.json b/examples/stable_memory/dfx.json index 1da9016a34..2e4b1fb77b 100644 --- a/examples/stable_memory/dfx.json +++ b/examples/stable_memory/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/stable_memory", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/stable_structures/dfx.json b/examples/stable_structures/dfx.json index ef40234d87..a99fee0f84 100644 --- a/examples/stable_structures/dfx.json +++ b/examples/stable_structures/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister1", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/canister1/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "canister2": { "type": "custom", @@ -22,7 +32,17 @@ "declarations": { "output": "test/dfx_generated/canister2", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/canister2/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] }, "canister3": { "type": "custom", @@ -34,7 +54,17 @@ "declarations": { "output": "test/dfx_generated/canister3", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/canister3/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/timers/dfx.json b/examples/timers/dfx.json index 24660b3835..a6cf949c2c 100644 --- a/examples/timers/dfx.json +++ b/examples/timers/dfx.json @@ -11,7 +11,17 @@ "output": "test/dfx_generated/timers", "node_compatibility": true }, - "env": ["AZLE_TEST_FETCH"] + "env": ["AZLE_TEST_FETCH"], + "metadata": [ + { + "name": "candid:service", + "path": "src/timers.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/tuple_types/dfx.json b/examples/tuple_types/dfx.json index 7b7826d04c..5d919ed97f 100644 --- a/examples/tuple_types/dfx.json +++ b/examples/tuple_types/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/tuple_types", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/update/dfx.json b/examples/update/dfx.json index 5f726fc32d..146710d758 100644 --- a/examples/update/dfx.json +++ b/examples/update/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/update", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/vanilla_js/dfx.json b/examples/vanilla_js/dfx.json index 79d1ace234..8bdfb7300c 100644 --- a/examples/vanilla_js/dfx.json +++ b/examples/vanilla_js/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/vanilla_js", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/examples/web_assembly/dfx.json b/examples/web_assembly/dfx.json index a0d874cc62..5c0cd02c2e 100644 --- a/examples/web_assembly/dfx.json +++ b/examples/web_assembly/dfx.json @@ -7,7 +7,17 @@ "candid_gen": "http", "build": "npx azle web_assembly", "wasm": ".azle/web_assembly/web_assembly.wasm", - "gzip": true + "gzip": true, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/blob/dfx.json b/property_tests/tests/blob/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/blob/dfx.json +++ b/property_tests/tests/blob/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/bool/dfx.json b/property_tests/tests/bool/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/bool/dfx.json +++ b/property_tests/tests/bool/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/float32/dfx.json b/property_tests/tests/float32/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/float32/dfx.json +++ b/property_tests/tests/float32/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/float64/dfx.json b/property_tests/tests/float64/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/float64/dfx.json +++ b/property_tests/tests/float64/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/func/dfx.json b/property_tests/tests/func/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/func/dfx.json +++ b/property_tests/tests/func/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/int/dfx.json b/property_tests/tests/int/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/int/dfx.json +++ b/property_tests/tests/int/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/int16/dfx.json b/property_tests/tests/int16/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/int16/dfx.json +++ b/property_tests/tests/int16/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/int32/dfx.json b/property_tests/tests/int32/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/int32/dfx.json +++ b/property_tests/tests/int32/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/int64/dfx.json b/property_tests/tests/int64/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/int64/dfx.json +++ b/property_tests/tests/int64/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/int8/dfx.json b/property_tests/tests/int8/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/int8/dfx.json +++ b/property_tests/tests/int8/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/nat/dfx.json b/property_tests/tests/nat/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/nat/dfx.json +++ b/property_tests/tests/nat/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/nat16/dfx.json b/property_tests/tests/nat16/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/nat16/dfx.json +++ b/property_tests/tests/nat16/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/nat32/dfx.json b/property_tests/tests/nat32/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/nat32/dfx.json +++ b/property_tests/tests/nat32/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/nat64/dfx.json b/property_tests/tests/nat64/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/nat64/dfx.json +++ b/property_tests/tests/nat64/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/nat8/dfx.json b/property_tests/tests/nat8/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/nat8/dfx.json +++ b/property_tests/tests/nat8/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/null/dfx.json b/property_tests/tests/null/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/null/dfx.json +++ b/property_tests/tests/null/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/opt/dfx.json b/property_tests/tests/opt/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/opt/dfx.json +++ b/property_tests/tests/opt/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/principal/dfx.json b/property_tests/tests/principal/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/principal/dfx.json +++ b/property_tests/tests/principal/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/record/dfx.json b/property_tests/tests/record/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/record/dfx.json +++ b/property_tests/tests/record/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/recursive/dfx.json b/property_tests/tests/recursive/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/recursive/dfx.json +++ b/property_tests/tests/recursive/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/service/dfx.json b/property_tests/tests/service/dfx.json index a09a46dbc8..730ef2d902 100644 --- a/property_tests/tests/service/dfx.json +++ b/property_tests/tests/service/dfx.json @@ -11,7 +11,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/stable_b_tree_map/dfx.json b/property_tests/tests/stable_b_tree_map/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/stable_b_tree_map/dfx.json +++ b/property_tests/tests/stable_b_tree_map/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/text/dfx.json b/property_tests/tests/text/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/text/dfx.json +++ b/property_tests/tests/text/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/tuple/dfx.json b/property_tests/tests/tuple/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/tuple/dfx.json +++ b/property_tests/tests/tuple/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/variant/dfx.json b/property_tests/tests/variant/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/variant/dfx.json +++ b/property_tests/tests/variant/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/property_tests/tests/vec/dfx.json b/property_tests/tests/vec/dfx.json index 6ab9fbd7e4..1489081c0b 100644 --- a/property_tests/tests/vec/dfx.json +++ b/property_tests/tests/vec/dfx.json @@ -10,7 +10,17 @@ "declarations": { "output": "test/dfx_generated/canister", "node_compatibility": true - } + }, + "metadata": [ + { + "name": "candid:service", + "path": "src/index.did" + }, + { + "name": "cdk:name", + "content": "azle" + } + ] } } } diff --git a/scripts/add_metadata_to_dfx_json.js b/scripts/add_metadata_to_dfx_json.js new file mode 100644 index 0000000000..fd8c6038a6 --- /dev/null +++ b/scripts/add_metadata_to_dfx_json.js @@ -0,0 +1,53 @@ +const fs = require('fs'); +const path = require('path'); + +const targetDirectory = process.argv[2] || '.'; // Use the provided directory or default to the current directory + +const metadataToAdd = [ + { + name: 'candid:service', + path: 'src/backend/index.did' // Adjust this path as needed for each canister + }, + { + name: 'cdk:name', + content: 'azle' + } +]; + +function updateDfxJson(filePath) { + try { + const data = fs.readFileSync(filePath, 'utf8'); + const json = JSON.parse(data); + + // Check each canister in the 'canisters' object + for (let canisterName in json.canisters) { + let canister = json.canisters[canisterName]; + + // Check if the canister has a 'build' property that starts with 'npx azle' + if (canister.build && canister.build.startsWith('npx azle')) { + // Update the 'metadata' property for this canister + canister.metadata = metadataToAdd; + + // Optionally, adjust the 'path' in 'metadata' based on the canister + canister.metadata[0].path = + canister.candid || 'specify/candid/path'; + } + } + + fs.writeFileSync(filePath, JSON.stringify(json, null, 4), 'utf8'); + console.log(`Updated ${filePath}`); + } catch (err) { + console.error(`Error processing file ${filePath}: ${err}`); + } +} + +const entries = fs.readdirSync(targetDirectory, { withFileTypes: true }); + +entries.forEach((entry) => { + if (entry.isDirectory()) { + const dfxJsonPath = path.join(targetDirectory, entry.name, 'dfx.json'); + if (fs.existsSync(dfxJsonPath)) { + updateDfxJson(dfxJsonPath); + } + } +}); diff --git a/src/compiler/Dockerfile b/src/compiler/Dockerfile index 7a4e7028af..b64af167c4 100644 --- a/src/compiler/Dockerfile +++ b/src/compiler/Dockerfile @@ -34,4 +34,7 @@ RUN echo "[workspace]\nmembers = [\"canister\"]\n\n[profile.release]\nopt-level WORKDIR /azle_rust_dependencies +# This version number should be incremented when the Rust portion of the compiler changes +# This is to ensure that the Dockerfile hash changes +# Version: 0 RUN AZLE_SKIP_COMPILER_INFO=true CARGO_TARGET_DIR=/global_target_dir cargo build --target wasm32-wasi --manifest-path canister/Cargo.toml --release diff --git a/src/compiler/index.ts b/src/compiler/index.ts index d1069b03cb..4e499e386f 100644 --- a/src/compiler/index.ts +++ b/src/compiler/index.ts @@ -5,7 +5,7 @@ import { getCandidAndCanisterMethods } from './get_candid_and_canister_methods'; import { getCanisterJavaScript } from './get_canister_javascript'; import { getNamesBeforeCli, getNamesAfterCli } from './get_names'; import { handleCli } from './handle_cli'; -import { prepareDockerImage } from './prepare_docker_images'; +import { prepareDockerImage } from './prepare_docker_image'; import { prepareRustStagingArea } from './prepare_rust_staging_area'; import { logSuccess, time } from './utils'; import { green } from './utils/colors'; diff --git a/src/compiler/prepare_docker_images.ts b/src/compiler/prepare_docker_image.ts similarity index 90% rename from src/compiler/prepare_docker_images.ts rename to src/compiler/prepare_docker_image.ts index 4d9565a5e8..d64fa59a29 100644 --- a/src/compiler/prepare_docker_images.ts +++ b/src/compiler/prepare_docker_image.ts @@ -12,6 +12,17 @@ export function prepareDockerImage( dockerContainerName: string, wasmedgeQuickJsPath: string ) { + // TODO I believe this is necessary for Mac + // TODO If they do not need this command always run + // TODO for example after restarts, then perhaps + // TODO we can remove this and just instruct the dev + // TODO to run this command once before azle deploy + // TODO like the have to do brew install podman + + execSync(`podman machine init --now || true`, { + stdio: stdioType + }); + buildAndLoadImage( stdioType, dockerImageName, diff --git a/src/compiler/rust/canister/Cargo.toml b/src/compiler/rust/canister/Cargo.toml index b22a524590..dcb9777b2f 100644 --- a/src/compiler/rust/canister/Cargo.toml +++ b/src/compiler/rust/canister/Cargo.toml @@ -1,3 +1,5 @@ +# IF YOU CHANGE THIS FILE YOU MUST CHANGE THE DOCKERFILE VERSION AT azle/src/compiler/Dockerfile + [package] name = "canister" version = "0.0.0" diff --git a/src/compiler/rust/canister_methods/Cargo.toml b/src/compiler/rust/canister_methods/Cargo.toml index fd62233b27..616da71e05 100644 --- a/src/compiler/rust/canister_methods/Cargo.toml +++ b/src/compiler/rust/canister_methods/Cargo.toml @@ -1,3 +1,5 @@ +# IF YOU CHANGE THIS FILE YOU MUST CHANGE THE DOCKERFILE VERSION AT azle/src/compiler/Dockerfile + [package] name = "canister_methods" version = "0.0.0"