This PR tackles a few issues, mainly resolves #421, but it also addresses #357, #356, and partially #276. Also provides good scaffolding for #394. This PR migrates the old samples and adds a new, runnable, new programming model v3-compatible samples-js directory. This PR is only for the JS samples, but I will create another one for another, separate TS directory. I also will delete the existing samples directory in a separate PR. In addition, this PR:
Renames functions to be simpler and more node idiomatic
Updates/replaces outdated/maintenance/deprecated packages used in the samples, such as moment (replaced with luxon), request (replaced with axios), and the deprecated wunderground weather API (replaced with OpenWeatherMap API), and maybe others
Leverages the ability to have multiple functions in the sample file to group related samples together
I tested all the samples manually and verified that they all work, with some notable exceptions:
The sayHelloWithSubOrchestrator sample -- there is an issue with added double quotes -- issue here #436 to track
The shoppingEntity/shoppingOrchestration samples -- entities don't support non-JSON serializable states -- issue here #437 to track
The unit testing sample -- I didn't migrate this one because there currently isn't a good unit testing story for the new prog model -- issue already here #420 to track
The listAzureSubscriptions sample -- I couldn't test this locally
Ofc, any design/organization/naming choices made here are subject to discussion :)
This PR tackles a few issues, mainly resolves #421, but it also addresses #357, #356, and partially #276. Also provides good scaffolding for #394. This PR migrates the old samples and adds a new, runnable, new programming model v3-compatible
samples-js
directory. This PR is only for the JS samples, but I will create another one for another, separate TS directory. I also will delete the existing samples directory in a separate PR. In addition, this PR:moment
(replaced withluxon
),request
(replaced withaxios
), and the deprecated wunderground weather API (replaced with OpenWeatherMap API), and maybe othersI tested all the samples manually and verified that they all work, with some notable exceptions:
smsPhoneVerification
sample -- this revealed an issue on the framework level with activities having extra output bindings -- issue here: https://github.com/Azure/azure-functions-nodejs-library/issues/53 to tracksayHelloWithSubOrchestrator
sample -- there is an issue with added double quotes -- issue here #436 to trackshoppingEntity
/shoppingOrchestration
samples -- entities don't support non-JSON serializable states -- issue here #437 to tracklistAzureSubscriptions
sample -- I couldn't test this locallyOfc, any design/organization/naming choices made here are subject to discussion :)