-
Notifications
You must be signed in to change notification settings - Fork 93
chore: update Azle templates to 0.29.0
#4040
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
base: master
Are you sure you want to change the base?
Changes from 6 commits
89d0298
8c55066
b62403f
1a224d3
25e77b3
25d06c6
37a5715
3ff8b4b
75d7678
a948c79
5ec4eea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ | |
"private": true, | ||
"type": "module", | ||
"dependencies": { | ||
"azle": "^0.19.0" | ||
"azle": "^0.25.0" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import { Canister, query, text } from 'azle'; | ||
import { IDL, query, update } from 'azle'; | ||
|
||
export default Canister({ | ||
greet: query([text], text, (name) => { | ||
return `Hello, ${name}!`; | ||
}) | ||
}) | ||
export default class { | ||
message: string = 'Hello world!'; | ||
|
||
@query([], IDL.Text) | ||
getMessage(): string { | ||
return this.message; | ||
} | ||
|
||
@update([IDL.Text]) | ||
setMessage(message: string): void { | ||
this.message = message; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> { | |
get_archive_fn: assets::new_project_svelte_files, | ||
}, | ||
category: ProjectTemplateCategory::Frontend, | ||
post_create: vec![NPM_INSTALL.to_string()], | ||
post_create: vec![], | ||
post_create_failure_warning: Some(NPM_INSTALL_FAILURE_WARNING.to_string()), | ||
post_create_spinner_message: Some(NPM_INSTALL_SPINNER_MESSAGE.to_string()), | ||
requirements: vec![ProjectTemplateName("dfx_js_base".to_string())], | ||
|
@@ -86,7 +86,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> { | |
get_archive_fn: assets::new_project_react_files, | ||
}, | ||
category: ProjectTemplateCategory::Frontend, | ||
post_create: vec![NPM_INSTALL.to_string()], | ||
post_create: vec![], | ||
post_create_failure_warning: Some(NPM_INSTALL_FAILURE_WARNING.to_string()), | ||
post_create_spinner_message: Some(NPM_INSTALL_SPINNER_MESSAGE.to_string()), | ||
requirements: vec![ProjectTemplateName("dfx_js_base".to_string())], | ||
|
@@ -100,7 +100,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> { | |
get_archive_fn: assets::new_project_vue_files, | ||
}, | ||
category: ProjectTemplateCategory::Frontend, | ||
post_create: vec![NPM_INSTALL.to_string()], | ||
post_create: vec![], | ||
post_create_failure_warning: Some(NPM_INSTALL_FAILURE_WARNING.to_string()), | ||
post_create_spinner_message: Some(NPM_INSTALL_SPINNER_MESSAGE.to_string()), | ||
requirements: vec![ProjectTemplateName("dfx_js_base".to_string())], | ||
|
@@ -114,7 +114,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> { | |
get_archive_fn: assets::new_project_vanillajs_files, | ||
}, | ||
category: ProjectTemplateCategory::Frontend, | ||
post_create: vec![NPM_INSTALL.to_string()], | ||
post_create: vec![], | ||
post_create_failure_warning: Some(NPM_INSTALL_FAILURE_WARNING.to_string()), | ||
post_create_spinner_message: Some(NPM_INSTALL_SPINNER_MESSAGE.to_string()), | ||
requirements: vec![ProjectTemplateName("dfx_js_base".to_string())], | ||
|
@@ -226,7 +226,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> { | |
get_archive_fn: assets::new_project_js_files, | ||
}, | ||
category: ProjectTemplateCategory::Support, | ||
post_create: vec![], | ||
post_create: vec![NPM_INSTALL.to_string()], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should remove the post create fields from the templates that require dfx_js_base, and add them here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe I have done this correctly now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
post_create_failure_warning: None, | ||
post_create_spinner_message: None, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These post_create failure and spinner messages should also be moved from the referencing templates There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
requirements: vec![], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the
tsconfig.json
that we recommend for Azle projects, will this clash with your frontend code? I'm not sure what else this is used for.