diff --git a/.gitignore b/.gitignore index 2af3bcda..01cc9d6d 100644 --- a/.gitignore +++ b/.gitignore @@ -441,3 +441,232 @@ $RECYCLE.BIN/ # The build keeps auto-generating this file. We do not want this. /.nuget/NuGet.Config NuGet.Config + + +## Python specifics + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don’t work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# Azure Functions artifacts +bin +obj +appsettings.json +.python_packages + +## TypeScript specifics + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TypeScript output +dist +out + +# Azure Functions artifacts +bin +obj +appsettings.json \ No newline at end of file diff --git a/DurableTask.Netherite.sln b/DurableTask.Netherite.sln index d3ba2182..23557f41 100644 --- a/DurableTask.Netherite.sln +++ b/DurableTask.Netherite.sln @@ -26,7 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D33AB157-04B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4A7226CF-57BF-4CA3-A4AC-91A398A1D84B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hello", "samples\Hello\Hello.csproj", "{654DA6B4-2E2F-4386-BB9F-7CE5A13998DE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hello", "samples\Hello_Netherite_with_DotNetCore\Hello.csproj", "{654DA6B4-2E2F-4386-BB9F-7CE5A13998DE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{AB958467-9236-402E-833C-B8DE4841AB9F}" EndProject diff --git a/samples/Hello/deploy-on-premium.ps1 b/samples/Hello/deploy-on-premium.ps1 deleted file mode 100644 index 9ea0eddd..00000000 --- a/samples/Hello/deploy-on-premium.ps1 +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/pwsh - -# review these parameters before running the script -param ( - $Plan="EP2", - $MinNodes="1", - $MaxNodes="20", - $Configuration="Release" - ) - -# read the parameters -. ./settings.ps1 - -Write-Host Building $Configuration Configuration... -dotnet build -c $Configuration - -Write-Host Building $Configuration Configuration... -dotnet build -c $Configuration - -# enter the directory with the binaries -Push-Location -Path bin/$Configuration/netcoreapp3.1 - -# look up the eventhubs namespace connection string -$eventHubsConnectionString = (az eventhubs namespace authorization-rule keys list --resource-group $groupName --namespace-name $namespaceName --name RootManageSharedAccessKey | ConvertFrom-Json).primaryConnectionString - -if (-not ((az functionapp list -g $groupName --query "[].name"| ConvertFrom-Json) -contains $functionAppName)) -{ - Write-Host "Creating $Plan Function App..." - az functionapp plan create --resource-group $groupName --name $functionAppName --location $location --sku $Plan - az functionapp create --name $functionAppName --storage-account $storageName --plan $functionAppName --resource-group $groupName --functions-version 3 - az functionapp config set -n $functionAppName -g $groupName --use-32bit-worker-process false - az functionapp config appsettings set -n $functionAppName -g $groupName --settings EventHubsConnection=$eventHubsConnectionString -} -else -{ - Write-Host "Function app already exists." -} - -Write-Host "Configuring Scale=$MinNodes-$MaxNodes" -az functionapp plan update -g $groupName -n $functionAppName --max-burst $MaxNodes --number-of-workers $MinNodes --min-instances $MinNodes -az resource update -n $functionAppName/config/web -g $groupName --set properties.minimumElasticInstanceCount=$MinNodes --resource-type Microsoft.Web/sites -if ($MinNode -eq $MaxNodes) -{ - az resource update -n $functionAppName/config/web -g $groupName --set properties.functionsRuntimeScaleMonitoringEnabled=0 --resource-type Microsoft.Web/sites -} -else -{ - az resource update -n $functionAppName/config/web -g $groupName --set properties.functionsRuntimeScaleMonitoringEnabled=1 --resource-type Microsoft.Web/sites -} - -Write-Host "Publishing Code to Function App..." -func azure functionapp publish $functionAppName - -Pop-Location diff --git a/samples/Hello/local.settings.json b/samples/Hello/local.settings.json deleted file mode 100644 index e8bfa13a..00000000 --- a/samples/Hello/local.settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "IsEncrypted": false, - "Values": { - "AzureWebJobsStorage": "Should be ignored because we have the environment variable set", - "EventHubsConnection": "Should be ignored because we have the environment variable set", - "FUNCTIONS_WORKER_RUNTIME": "dotnet" - } -} \ No newline at end of file diff --git a/samples/Hello/settings.ps1 b/samples/Hello/settings.ps1 deleted file mode 100644 index fba79a8c..00000000 --- a/samples/Hello/settings.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/pwsh -Write-Host "Using parameters specified in settings.ps1." - -# always edit this parameter before running the scripts -$name="globally-unique-alphanumeric-name-with-no-dashes" - -# review these parameters before running the scripts -$location="eastus" -$storageSku="Standard_LRS" - -# optionally, customize the following parameters -# to use different names for resource group, namespace, function app, storage account, and plan -$groupName=$name -$nameSpaceName=$name -$functionAppName=$name -$storageName=$name -$planName=$name - -if (($name -eq "globally-unique-lowercase-alphanumeric-name-with-no-dashes")) -{ - Write-Error "You have to edit the 'name' parameter in settings.ps1 before using this script" - exit -} - diff --git a/samples/Hello/Hello.csproj b/samples/Hello_Netherite_with_DotNetCore/Hello.csproj similarity index 100% rename from samples/Hello/Hello.csproj rename to samples/Hello_Netherite_with_DotNetCore/Hello.csproj diff --git a/samples/Hello/HelloCities.cs b/samples/Hello_Netherite_with_DotNetCore/HelloCities.cs similarity index 94% rename from samples/Hello/HelloCities.cs rename to samples/Hello_Netherite_with_DotNetCore/HelloCities.cs index b6efe0dd..1cc7b7ca 100644 --- a/samples/Hello/HelloCities.cs +++ b/samples/Hello_Netherite_with_DotNetCore/HelloCities.cs @@ -25,7 +25,7 @@ public static class HelloCities { [FunctionName(nameof(HelloCities))] public async static Task Run( - [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "hellocities")] HttpRequest req, + [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "hellocities")] HttpRequest req, [DurableClient] IDurableClient client) { string orchestrationInstanceId = await client.StartNewAsync(nameof(HelloSequence)); diff --git a/samples/Hello_Netherite_with_DotNetCore/deploy-dotnet-function.ps1 b/samples/Hello_Netherite_with_DotNetCore/deploy-dotnet-function.ps1 new file mode 100644 index 00000000..57d25b4e --- /dev/null +++ b/samples/Hello_Netherite_with_DotNetCore/deploy-dotnet-function.ps1 @@ -0,0 +1,21 @@ +#!/usr/bin/pwsh + +# review these parameters before running the script +$Configuration = "Release" + +# read the parameters +. ../scripts/settings.ps1 + +Write-Host "Building Function App..." + +Write-Host Building $Configuration Configuration... +dotnet build -c $Configuration + +# enter the directory with the binaries +Push-Location -Path bin/$Configuration/netcoreapp3.1 + + +Write-Host "Publishing Code to Function App..." +func azure functionapp publish $functionAppName + +Pop-Location diff --git a/samples/Hello/host.json b/samples/Hello_Netherite_with_DotNetCore/host.json similarity index 100% rename from samples/Hello/host.json rename to samples/Hello_Netherite_with_DotNetCore/host.json diff --git a/samples/Hello_Netherite_with_DotNetCore/local.settings.json b/samples/Hello_Netherite_with_DotNetCore/local.settings.json new file mode 100644 index 00000000..932c2aab --- /dev/null +++ b/samples/Hello_Netherite_with_DotNetCore/local.settings.json @@ -0,0 +1,8 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "EventHubsConnection": "MemoryF", + "FUNCTIONS_WORKER_RUNTIME": "dotnet" + } +} \ No newline at end of file diff --git a/samples/Hello/run.ps1 b/samples/Hello_Netherite_with_DotNetCore/run-dotnet-function-hybrid.ps1 similarity index 93% rename from samples/Hello/run.ps1 rename to samples/Hello_Netherite_with_DotNetCore/run-dotnet-function-hybrid.ps1 index cfc631d4..01348943 100644 --- a/samples/Hello/run.ps1 +++ b/samples/Hello_Netherite_with_DotNetCore/run-dotnet-function-hybrid.ps1 @@ -1,7 +1,10 @@ #!/usr/bin/pwsh # read the parameters -. ./settings.ps1 +. ../scripts/settings.ps1 + +# Build app +dotnet build # enter the directory with the debug binaries if (-not (Test-Path -Path ./bin/Debug/netcoreapp3.1/bin)) { diff --git a/samples/Hello_Netherite_with_Python/.funcignore b/samples/Hello_Netherite_with_Python/.funcignore new file mode 100644 index 00000000..ae36684e --- /dev/null +++ b/samples/Hello_Netherite_with_Python/.funcignore @@ -0,0 +1,6 @@ +.git* +.vscode +local.settings.json +test +.venv +*.ps1 \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/.vscode/extensions.json b/samples/Hello_Netherite_with_Python/.vscode/extensions.json new file mode 100644 index 00000000..cbbad0f2 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "ms-azuretools.vscode-azurefunctions", + "ms-python.python" + ] +} diff --git a/samples/Hello_Netherite_with_Python/.vscode/launch.json b/samples/Hello_Netherite_with_Python/.vscode/launch.json new file mode 100644 index 00000000..0e43bd3c --- /dev/null +++ b/samples/Hello_Netherite_with_Python/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Python Functions", + "type": "python", + "request": "attach", + "port": 9091, + "preLaunchTask": "func: host start" + } + ] +} diff --git a/samples/Hello_Netherite_with_Python/.vscode/settings.json b/samples/Hello_Netherite_with_Python/.vscode/settings.json new file mode 100644 index 00000000..044614cd --- /dev/null +++ b/samples/Hello_Netherite_with_Python/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "azureFunctions.deploySubpath": ".", + "azureFunctions.scmDoBuildDuringDeployment": true, + "azureFunctions.pythonVenv": ".venv", + "azureFunctions.projectLanguage": "Python", + "azureFunctions.projectRuntime": "~3", + "debug.internalConsoleOptions": "neverOpen", + "files.exclude": { + "obj": true, + "bin": true + }, + "azureFunctions.preDeployTask": "func: extensions install" +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/.vscode/tasks.json b/samples/Hello_Netherite_with_Python/.vscode/tasks.json new file mode 100644 index 00000000..084c6b53 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/.vscode/tasks.json @@ -0,0 +1,32 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "pip install (functions)", + "type": "shell", + "osx": { + "command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt" + }, + "windows": { + "command": "${config:azureFunctions.pythonVenv}/Scripts/python -m pip install -r requirements.txt" + }, + "linux": { + "command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt" + }, + "problemMatcher": [] + }, + { + "type": "func", + "command": "host start", + "problemMatcher": "$func-python-watch", + "isBackground": true, + "dependsOn": "func: extensions install" + }, + { + "type": "func", + "command": "extensions install", + "dependsOn": "pip install (functions)", + "problemMatcher": [] + } + ] +} diff --git a/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteOrchestrator/__init__.py b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteOrchestrator/__init__.py new file mode 100644 index 00000000..05411d39 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteOrchestrator/__init__.py @@ -0,0 +1,14 @@ +import logging +import json + +import azure.functions as func +import azure.durable_functions as df + + +def orchestrator_function(context: df.DurableOrchestrationContext): + result1 = yield context.call_activity('HelloCityNetherite', "Tokyo") + result2 = yield context.call_activity('HelloCityNetherite', "Seattle") + result3 = yield context.call_activity('HelloCityNetherite', "London") + return [result1, result2, result3] + +main = df.Orchestrator.create(orchestrator_function) \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteOrchestrator/function.json b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteOrchestrator/function.json new file mode 100644 index 00000000..83baac61 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteOrchestrator/function.json @@ -0,0 +1,10 @@ +{ + "scriptFile": "__init__.py", + "bindings": [ + { + "name": "context", + "type": "orchestrationTrigger", + "direction": "in" + } + ] +} diff --git a/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteStarter/__init__.py b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteStarter/__init__.py new file mode 100644 index 00000000..970964e6 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteStarter/__init__.py @@ -0,0 +1,13 @@ +import logging + +import azure.functions as func +import azure.durable_functions as df + + +async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse: + client = df.DurableOrchestrationClient(starter) + instance_id = await client.start_new(req.route_params["functionName"], None, None) + + logging.info(f"Started orchestration with ID = '{instance_id}'.") + + return client.create_check_status_response(req, instance_id) \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteStarter/function.json b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteStarter/function.json new file mode 100644 index 00000000..12ae842d --- /dev/null +++ b/samples/Hello_Netherite_with_Python/DurableFunctionsNetheriteStarter/function.json @@ -0,0 +1,25 @@ +{ + "scriptFile": "__init__.py", + "bindings": [ + { + "authLevel": "anonymous", + "name": "req", + "type": "httpTrigger", + "direction": "in", + "route": "orchestrators/{functionName}", + "methods": [ + "post" + ] + }, + { + "name": "$return", + "type": "http", + "direction": "out" + }, + { + "name": "starter", + "type": "durableClient", + "direction": "in" + } + ] +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/HelloCityNetherite/__init__.py b/samples/Hello_Netherite_with_Python/HelloCityNetherite/__init__.py new file mode 100644 index 00000000..9ba4bb50 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/HelloCityNetherite/__init__.py @@ -0,0 +1,5 @@ +import logging + + +def main(name: str) -> str: + return f"Hello {name}!" diff --git a/samples/Hello_Netherite_with_Python/HelloCityNetherite/function.json b/samples/Hello_Netherite_with_Python/HelloCityNetherite/function.json new file mode 100644 index 00000000..1b03f110 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/HelloCityNetherite/function.json @@ -0,0 +1,10 @@ +{ + "scriptFile": "__init__.py", + "bindings": [ + { + "name": "name", + "type": "activityTrigger", + "direction": "in" + } + ] +} diff --git a/samples/Hello_Netherite_with_Python/deploy-python-function.ps1 b/samples/Hello_Netherite_with_Python/deploy-python-function.ps1 new file mode 100644 index 00000000..a88db7b7 --- /dev/null +++ b/samples/Hello_Netherite_with_Python/deploy-python-function.ps1 @@ -0,0 +1,20 @@ +#!/usr/bin/pwsh + +# read the parameters +. ../scripts/settings.ps1 + +# install pip dependencies +py -m venv .venv + +.venv\scripts\activate + +pip install -r requirements.txt + +# install extensions as dependency bundles are not used +func extensions install + +# publish to Azure +Write-Host "Publishing Code to Function App..." +func azure functionapp publish $functionAppName + +Pop-Location diff --git a/samples/Hello_Netherite_with_Python/extensions.csproj b/samples/Hello_Netherite_with_Python/extensions.csproj new file mode 100644 index 00000000..0ca5ad1e --- /dev/null +++ b/samples/Hello_Netherite_with_Python/extensions.csproj @@ -0,0 +1,12 @@ + + + netcoreapp3.1 + + ** + + + + + + + \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/host.json b/samples/Hello_Netherite_with_Python/host.json new file mode 100644 index 00000000..3efb7bca --- /dev/null +++ b/samples/Hello_Netherite_with_Python/host.json @@ -0,0 +1,23 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + } + } + }, + "extensions": { + "durableTask": { + "hubName": "HelloNetherite", + "useGracefulShutdown": true, + "storageProvider": { + "type": "Netherite", + "StorageConnectionName": "AzureWebJobsStorage", + "EventHubsConnectionName": "EventHubsConnection", + "CacheOrchestrationCursors": "false" + } + } + } +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/local.settings.json b/samples/Hello_Netherite_with_Python/local.settings.json new file mode 100644 index 00000000..5078a78a --- /dev/null +++ b/samples/Hello_Netherite_with_Python/local.settings.json @@ -0,0 +1,8 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "EventHubsConnection": "MemoryF", + "FUNCTIONS_WORKER_RUNTIME": "python" + } +} diff --git a/samples/Hello_Netherite_with_Python/proxies.json b/samples/Hello_Netherite_with_Python/proxies.json new file mode 100644 index 00000000..b385252f --- /dev/null +++ b/samples/Hello_Netherite_with_Python/proxies.json @@ -0,0 +1,4 @@ +{ + "$schema": "http://json.schemastore.org/proxies", + "proxies": {} +} diff --git a/samples/Hello_Netherite_with_Python/requirements.txt b/samples/Hello_Netherite_with_Python/requirements.txt new file mode 100644 index 00000000..7d68809f --- /dev/null +++ b/samples/Hello_Netherite_with_Python/requirements.txt @@ -0,0 +1,6 @@ +# DO NOT include azure-functions-worker in this file +# The Python Worker is managed by Azure Functions platform +# Manually managing azure-functions-worker may cause unexpected issues + +azure-functions +azure-functions-durable \ No newline at end of file diff --git a/samples/Hello_Netherite_with_Python/run-python-function-hybrid.ps1 b/samples/Hello_Netherite_with_Python/run-python-function-hybrid.ps1 new file mode 100644 index 00000000..f2bffcbc --- /dev/null +++ b/samples/Hello_Netherite_with_Python/run-python-function-hybrid.ps1 @@ -0,0 +1,21 @@ +#!/usr/bin/pwsh + +# read the parameters +. ../scripts/settings.ps1 + +# look up the two connection strings and assign them to the respective environment variables +$Env:AzureWebJobsStorage = (az storage account show-connection-string --name $storageName --resource-group $groupName | ConvertFrom-Json).connectionString +$Env:EventHubsConnection = (az eventhubs namespace authorization-rule keys list --resource-group $groupName --namespace-name $namespaceName --name RootManageSharedAccessKey | ConvertFrom-Json).primaryConnectionString + +# install pip dependencies +py -m venv .venv + +.venv\scripts\activate + +pip install -r requirements.txt + +# install extensions as dependency bundles are not used +func extensions install + +# start the function app locally +func start \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/.funcignore b/samples/Hello_Netherite_with_TypeScript/.funcignore new file mode 100644 index 00000000..faddcc1d --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/.funcignore @@ -0,0 +1,9 @@ +*.js.map +*.ts +.git* +.vscode +local.settings.json +test +tsconfig.json +*.http +*.ps1 \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/.vscode/extensions.json b/samples/Hello_Netherite_with_TypeScript/.vscode/extensions.json new file mode 100644 index 00000000..26786f93 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-azuretools.vscode-azurefunctions" + ] +} diff --git a/samples/Hello_Netherite_with_TypeScript/.vscode/launch.json b/samples/Hello_Netherite_with_TypeScript/.vscode/launch.json new file mode 100644 index 00000000..e7be0445 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Node Functions", + "type": "node", + "request": "attach", + "port": 9229, + "preLaunchTask": "func: host start" + } + ] +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/.vscode/settings.json b/samples/Hello_Netherite_with_TypeScript/.vscode/settings.json new file mode 100644 index 00000000..8cb1030d --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "azureFunctions.deploySubpath": ".", + "azureFunctions.postDeployTask": "npm install (functions)", + "azureFunctions.projectLanguage": "TypeScript", + "azureFunctions.projectRuntime": "~3", + "debug.internalConsoleOptions": "neverOpen", + "azureFunctions.preDeployTask": "npm prune (functions)" +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/.vscode/tasks.json b/samples/Hello_Netherite_with_TypeScript/.vscode/tasks.json new file mode 100644 index 00000000..db721a5a --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/.vscode/tasks.json @@ -0,0 +1,31 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "func", + "command": "host start", + "problemMatcher": "$func-node-watch", + "isBackground": true, + "dependsOn": "npm build (functions)" + }, + { + "type": "shell", + "label": "npm build (functions)", + "command": "npm run build", + "dependsOn": "npm install (functions)", + "problemMatcher": "$tsc" + }, + { + "type": "shell", + "label": "npm install (functions)", + "command": "npm install" + }, + { + "type": "shell", + "label": "npm prune (functions)", + "command": "npm prune --production", + "dependsOn": "npm build (functions)", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteOrchestrator/function.json b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteOrchestrator/function.json new file mode 100644 index 00000000..1eed0af0 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteOrchestrator/function.json @@ -0,0 +1,10 @@ +{ + "bindings": [ + { + "name": "context", + "type": "orchestrationTrigger", + "direction": "in" + } + ], + "scriptFile": "../dist/DurableFunctionsNetheriteOrchestrator/index.js" +} diff --git a/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteOrchestrator/index.ts b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteOrchestrator/index.ts new file mode 100644 index 00000000..c694a744 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteOrchestrator/index.ts @@ -0,0 +1,23 @@ +import * as df from "durable-functions" + +const orchestrator = df.orchestrator(function* (context) { + const outputs = [] + + if (context.df.isReplaying === false) { + context.log(`Calling first Activity`) + } + else { + context.log(`Replay first Activity`) + } + outputs.push(yield context.df.callActivity("HelloCityNetherite", "Tokyo")) + + context.log(`Calling second activity`) + outputs.push(yield context.df.callActivity("HelloCityNetherite", "Seattle")) + + context.log(`Calling third activity`) + outputs.push(yield context.df.callActivity("HelloCityNetherite", "London")) + + return outputs +}) + +export default orchestrator diff --git a/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteStarter/function.json b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteStarter/function.json new file mode 100644 index 00000000..ba775776 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteStarter/function.json @@ -0,0 +1,25 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "name": "req", + "type": "httpTrigger", + "direction": "in", + "route": "orchestrators/{functionName}", + "methods": [ + "post" + ] + }, + { + "name": "$return", + "type": "http", + "direction": "out" + }, + { + "name": "starter", + "type": "orchestrationClient", + "direction": "in" + } + ], + "scriptFile": "../dist/DurableFunctionsNetheriteStarter/index.js" +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteStarter/index.ts b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteStarter/index.ts new file mode 100644 index 00000000..afd08f83 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/DurableFunctionsNetheriteStarter/index.ts @@ -0,0 +1,13 @@ +import * as df from "durable-functions" +import { AzureFunction, Context, HttpRequest } from "@azure/functions" + +const httpStart: AzureFunction = async function (context: Context, req: HttpRequest): Promise { + const client = df.getClient(context) + const instanceId = await client.startNew(req.params.functionName, undefined, req.body) + + context.log(`Started orchestration with ID = '${instanceId}' using Netherite as storage provider.`) + + return client.createCheckStatusResponse(context.bindingData.req, instanceId) +} + +export default httpStart diff --git a/samples/Hello_Netherite_with_TypeScript/HelloCityNetherite/function.json b/samples/Hello_Netherite_with_TypeScript/HelloCityNetherite/function.json new file mode 100644 index 00000000..edc1b074 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/HelloCityNetherite/function.json @@ -0,0 +1,10 @@ +{ + "bindings": [ + { + "name": "name", + "type": "activityTrigger", + "direction": "in" + } + ], + "scriptFile": "../dist/HelloCityNetherite/index.js" +} diff --git a/samples/Hello_Netherite_with_TypeScript/HelloCityNetherite/index.ts b/samples/Hello_Netherite_with_TypeScript/HelloCityNetherite/index.ts new file mode 100644 index 00000000..f79539ed --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/HelloCityNetherite/index.ts @@ -0,0 +1,12 @@ +import { AzureFunction, Context } from "@azure/functions" + +const activityFunction: AzureFunction = async function (context: Context): Promise { + + context.log(`Hello ${context.bindings.name}!`) + + return `Hello ${context.bindings.name}!` + + +} + +export default activityFunction diff --git a/samples/Hello_Netherite_with_TypeScript/deploy-typescript-function.ps1 b/samples/Hello_Netherite_with_TypeScript/deploy-typescript-function.ps1 new file mode 100644 index 00000000..b8860fbe --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/deploy-typescript-function.ps1 @@ -0,0 +1,17 @@ +#!/usr/bin/pwsh + +# read the parameters +. ../scripts/settings.ps1 + +npm install + +npm run build + +npm prune --production + +func extensions install + +Write-Host "Publishing Code to Function App..." +func azure functionapp publish $functionAppName + +Pop-Location \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/extensions.csproj b/samples/Hello_Netherite_with_TypeScript/extensions.csproj new file mode 100644 index 00000000..ab187c09 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/extensions.csproj @@ -0,0 +1,12 @@ + + + netcoreapp3.1 + + ** + + + + + + + \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/host.json b/samples/Hello_Netherite_with_TypeScript/host.json new file mode 100644 index 00000000..3efb7bca --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/host.json @@ -0,0 +1,23 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + } + } + }, + "extensions": { + "durableTask": { + "hubName": "HelloNetherite", + "useGracefulShutdown": true, + "storageProvider": { + "type": "Netherite", + "StorageConnectionName": "AzureWebJobsStorage", + "EventHubsConnectionName": "EventHubsConnection", + "CacheOrchestrationCursors": "false" + } + } + } +} \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/local.settings.json b/samples/Hello_Netherite_with_TypeScript/local.settings.json new file mode 100644 index 00000000..56fca7d9 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/local.settings.json @@ -0,0 +1,8 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "EventHubsConnection": "MemoryF", + "FUNCTIONS_WORKER_RUNTIME": "node" + } +} diff --git a/samples/Hello_Netherite_with_TypeScript/package-lock.json b/samples/Hello_Netherite_with_TypeScript/package-lock.json new file mode 100644 index 00000000..da81351d --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/package-lock.json @@ -0,0 +1,832 @@ +{ + "name": "netherite-sample", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "netherite-sample", + "version": "1.0.0", + "dependencies": { + "durable-functions": "^1.5.2" + }, + "devDependencies": { + "@azure/functions": "^1.2.3", + "typescript": "^4.0.0" + } + }, + "node_modules/@azure/functions": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@azure/functions/-/functions-1.2.3.tgz", + "integrity": "sha512-dZITbYPNg6ay6ngcCOjRUh1wDhlFITS0zIkqplyH5KfKEAVPooaoaye5mUFnR+WP9WdGRjlNXyl/y2tgWKHcRg==" + }, + "node_modules/@types/lodash": { + "version": "4.14.172", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.172.tgz", + "integrity": "sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==" + }, + "node_modules/@types/node": { + "version": "10.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.2.tgz", + "integrity": "sha512-Y1kCfTShKcJH4CsG5+m5RMA+0tQKa8TrxyMczy0zE8QeDKbuOAJMF8JRM5ouCFyakaSoAhhgy2beCSKLVz+daw==" + }, + "node_modules/@types/uuid": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", + "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" + }, + "node_modules/@types/validator": { + "version": "9.4.4", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-9.4.4.tgz", + "integrity": "sha512-7bWNKQ3lDMhRS2lxe1aHGTBijZ/a6wQfZmCtKJDefpb81sYd+FrfNqj6Gda1Tcw8bYK0gG1CVuNLWV2JS7K8Dw==" + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dependencies": { + "graceful-readlink": ">= 1.0.0" + }, + "engines": { + "node": ">= 0.6.x" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/durable-functions": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/durable-functions/-/durable-functions-1.5.2.tgz", + "integrity": "sha512-KmBUAEcDx/Q9pBijUQPg87S571LJXQnums4DdcDTBYZitxaT8+oq+7Iza4mrEzcmrjA0lcthmu8ScJ+SrKQoDA==", + "dependencies": { + "@azure/functions": "^1.2.3", + "@types/lodash": "^4.14.119", + "@types/node": "10.14.2", + "@types/uuid": "~3.4.4", + "@types/validator": "^9.4.3", + "axios": "^0.21.1", + "commander": "~2.9.0", + "debug": "~2.6.9", + "lodash": "^4.17.15", + "rimraf": "~2.5.4", + "typedoc": "^0.17.1", + "uuid": "~3.3.2", + "validator": "~10.8.0" + }, + "engines": { + "node": ">=6.5.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz", + "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "node_modules/graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "engines": { + "node": "*" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + }, + "node_modules/marked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.0.0.tgz", + "integrity": "sha512-Wo+L1pWTVibfrSr+TTtMuiMfNzmZWiOPeO7rZsQUY5bgsxpHesBEcIWJloWVTFnrMXnf/TL30eTFSGJddmQAng==", + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 8.16.2" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "node_modules/rimraf": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", + "dependencies": { + "glob": "^7.0.5" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typedoc": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.17.8.tgz", + "integrity": "sha512-/OyrHCJ8jtzu+QZ+771YaxQ9s4g5Z3XsQE3Ma7q+BL392xxBn4UMvvCdVnqKC2T/dz03/VXSLVKOP3lHmDdc/w==", + "dependencies": { + "fs-extra": "^8.1.0", + "handlebars": "^4.7.6", + "highlight.js": "^10.0.0", + "lodash": "^4.17.15", + "lunr": "^2.3.8", + "marked": "1.0.0", + "minimatch": "^3.0.0", + "progress": "^2.0.3", + "shelljs": "^0.8.4", + "typedoc-default-themes": "^0.10.2" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/typedoc-default-themes": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.10.2.tgz", + "integrity": "sha512-zo09yRj+xwLFE3hyhJeVHWRSPuKEIAsFK5r2u47KL/HBKqpwdUSanoaz5L34IKiSATFrjG5ywmIu98hPVMfxZg==", + "dependencies": { + "lunr": "^2.3.8" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/typescript": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uglify-js": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", + "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/validator": { + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.8.0.tgz", + "integrity": "sha512-mXqMxfCh5NLsVgYVKl9WvnHNDPCcbNppHSPPowu0VjtSsGWVY+z8hJF44edLR1nbLNzi3jYoYsIl8KZpioIk6g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + }, + "dependencies": { + "@azure/functions": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@azure/functions/-/functions-1.2.3.tgz", + "integrity": "sha512-dZITbYPNg6ay6ngcCOjRUh1wDhlFITS0zIkqplyH5KfKEAVPooaoaye5mUFnR+WP9WdGRjlNXyl/y2tgWKHcRg==" + }, + "@types/lodash": { + "version": "4.14.172", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.172.tgz", + "integrity": "sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==" + }, + "@types/node": { + "version": "10.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.2.tgz", + "integrity": "sha512-Y1kCfTShKcJH4CsG5+m5RMA+0tQKa8TrxyMczy0zE8QeDKbuOAJMF8JRM5ouCFyakaSoAhhgy2beCSKLVz+daw==" + }, + "@types/uuid": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", + "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" + }, + "@types/validator": { + "version": "9.4.4", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-9.4.4.tgz", + "integrity": "sha512-7bWNKQ3lDMhRS2lxe1aHGTBijZ/a6wQfZmCtKJDefpb81sYd+FrfNqj6Gda1Tcw8bYK0gG1CVuNLWV2JS7K8Dw==" + }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { + "follow-redirects": "^1.14.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "durable-functions": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/durable-functions/-/durable-functions-1.5.2.tgz", + "integrity": "sha512-KmBUAEcDx/Q9pBijUQPg87S571LJXQnums4DdcDTBYZitxaT8+oq+7Iza4mrEzcmrjA0lcthmu8ScJ+SrKQoDA==", + "requires": { + "@azure/functions": "^1.2.3", + "@types/lodash": "^4.14.119", + "@types/node": "10.14.2", + "@types/uuid": "~3.4.4", + "@types/validator": "^9.4.3", + "axios": "^0.21.1", + "commander": "~2.9.0", + "debug": "~2.6.9", + "lodash": "^4.17.15", + "rimraf": "~2.5.4", + "typedoc": "^0.17.1", + "uuid": "~3.3.2", + "validator": "~10.8.0" + } + }, + "follow-redirects": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz", + "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==" + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "requires": { + "has": "^1.0.3" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + }, + "marked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.0.0.tgz", + "integrity": "sha512-Wo+L1pWTVibfrSr+TTtMuiMfNzmZWiOPeO7rZsQUY5bgsxpHesBEcIWJloWVTFnrMXnf/TL30eTFSGJddmQAng==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "rimraf": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", + "requires": { + "glob": "^7.0.5" + } + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "typedoc": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.17.8.tgz", + "integrity": "sha512-/OyrHCJ8jtzu+QZ+771YaxQ9s4g5Z3XsQE3Ma7q+BL392xxBn4UMvvCdVnqKC2T/dz03/VXSLVKOP3lHmDdc/w==", + "requires": { + "fs-extra": "^8.1.0", + "handlebars": "^4.7.6", + "highlight.js": "^10.0.0", + "lodash": "^4.17.15", + "lunr": "^2.3.8", + "marked": "1.0.0", + "minimatch": "^3.0.0", + "progress": "^2.0.3", + "shelljs": "^0.8.4", + "typedoc-default-themes": "^0.10.2" + } + }, + "typedoc-default-themes": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.10.2.tgz", + "integrity": "sha512-zo09yRj+xwLFE3hyhJeVHWRSPuKEIAsFK5r2u47KL/HBKqpwdUSanoaz5L34IKiSATFrjG5ywmIu98hPVMfxZg==", + "requires": { + "lunr": "^2.3.8" + } + }, + "typescript": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", + "dev": true + }, + "uglify-js": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", + "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==", + "optional": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + }, + "validator": { + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.8.0.tgz", + "integrity": "sha512-mXqMxfCh5NLsVgYVKl9WvnHNDPCcbNppHSPPowu0VjtSsGWVY+z8hJF44edLR1nbLNzi3jYoYsIl8KZpioIk6g==" + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/samples/Hello_Netherite_with_TypeScript/package.json b/samples/Hello_Netherite_with_TypeScript/package.json new file mode 100644 index 00000000..41e4c749 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/package.json @@ -0,0 +1,21 @@ +{ + "name": "netherite-sample", + "version": "1.0.0", + "description": "", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "prestart": "npm run build", + "start": "func start", + "start-verbose": "npm run build; func start --verbose", + "test": "echo \"No tests yet...\"", + "prune-prod": "npm prune --production" + }, + "dependencies": { + "durable-functions": "^1.5.2" + }, + "devDependencies": { + "@azure/functions": "^1.2.3", + "typescript": "^4.0.0" + } +} diff --git a/samples/Hello_Netherite_with_TypeScript/proxies.json b/samples/Hello_Netherite_with_TypeScript/proxies.json new file mode 100644 index 00000000..b385252f --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/proxies.json @@ -0,0 +1,4 @@ +{ + "$schema": "http://json.schemastore.org/proxies", + "proxies": {} +} diff --git a/samples/Hello_Netherite_with_TypeScript/run-typescript-function-hybrid.ps1 b/samples/Hello_Netherite_with_TypeScript/run-typescript-function-hybrid.ps1 new file mode 100644 index 00000000..4ecb79c9 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/run-typescript-function-hybrid.ps1 @@ -0,0 +1,17 @@ +#!/usr/bin/pwsh + +# read the parameters +. ../scripts/settings.ps1 + +# look up the two connection strings and assign them to the respective environment variables +$Env:AzureWebJobsStorage = (az storage account show-connection-string --name $storageName --resource-group $groupName | ConvertFrom-Json).connectionString +$Env:EventHubsConnection = (az eventhubs namespace authorization-rule keys list --resource-group $groupName --namespace-name $namespaceName --name RootManageSharedAccessKey | ConvertFrom-Json).primaryConnectionString + +# install node dependencies +npm install + +# install extensions as dependency bundles are not used +func extensions install + +# start the function app locally +npm run start \ No newline at end of file diff --git a/samples/Hello_Netherite_with_TypeScript/tsconfig.json b/samples/Hello_Netherite_with_TypeScript/tsconfig.json new file mode 100644 index 00000000..77d91aa8 --- /dev/null +++ b/samples/Hello_Netherite_with_TypeScript/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "outDir": "dist", + "rootDir": ".", + "sourceMap": true, + "strict": false + } +} diff --git a/samples/Hello/clear.ps1 b/samples/scripts/clear.ps1 similarity index 100% rename from samples/Hello/clear.ps1 rename to samples/scripts/clear.ps1 diff --git a/samples/scripts/create-function-app-dotnet.ps1 b/samples/scripts/create-function-app-dotnet.ps1 new file mode 100644 index 00000000..dd611d34 --- /dev/null +++ b/samples/scripts/create-function-app-dotnet.ps1 @@ -0,0 +1,13 @@ +#!/usr/bin/pwsh + +# REVIEW THESE PARAMETERS BEFORE RUNNING THE SCRIPT +param ( + $Plan = "EP1", + $MinNodes = "1", + $MaxNodes = "20", + $Runtime = "dotnet", + $OsType = "Windows" +) + +# call the generic script +. ./create-function-app.ps1 \ No newline at end of file diff --git a/samples/scripts/create-function-app-node.ps1 b/samples/scripts/create-function-app-node.ps1 new file mode 100644 index 00000000..ad8f033d --- /dev/null +++ b/samples/scripts/create-function-app-node.ps1 @@ -0,0 +1,15 @@ +#!/usr/bin/pwsh + +# REVIEW THESE PARAMETERS BEFORE RUNNING THE SCRIPT +param ( + $Plan = "EP1", + $MinNodes = "1", + $MaxNodes = "20", + $Runtime = "node", + $RuntimeVersion = "14", + $OsType = "Windows" +) + +# call the generic script +. ./create-function-app.ps1 + diff --git a/samples/scripts/create-function-app-python.ps1 b/samples/scripts/create-function-app-python.ps1 new file mode 100644 index 00000000..e2123d64 --- /dev/null +++ b/samples/scripts/create-function-app-python.ps1 @@ -0,0 +1,15 @@ +#!/usr/bin/pwsh + +# REVIEW THESE PARAMETERS BEFORE RUNNING THE SCRIPT +param ( + $Plan = "EP1", + $MinNodes = "1", + $MaxNodes = "20", + $Runtime = "python", + $RuntimeVersion = "3.8", + $OsType = "Linux" +) + +# call the generic script +. ./create-function-app.ps1 + diff --git a/samples/scripts/create-function-app.ps1 b/samples/scripts/create-function-app.ps1 new file mode 100644 index 00000000..0d32cc8e --- /dev/null +++ b/samples/scripts/create-function-app.ps1 @@ -0,0 +1,50 @@ +#!/usr/bin/pwsh + +# +# The language-specific parameters are set in the corresponding scripts following the naming convention create-function-app-language.ps1 +# + +# read the gneric parameters +. ./settings.ps1 + +# look up the eventhubs namespace connection string +$eventHubsConnectionString = (az eventhubs namespace authorization-rule keys list --resource-group $groupName --namespace-name $namespaceName --name RootManageSharedAccessKey | ConvertFrom-Json).primaryConnectionString + +if (-not ((az functionapp list -g $groupName --query "[].name" | ConvertFrom-Json) -contains $functionAppName)) { + Write-Host "Creating $Plan Function App..." + + if ($OsType -eq "Windows") { + Write-Host "in Windows variant..." + az functionapp plan create --resource-group $groupName --name $functionAppName --location $location --sku $Plan + } + else { + Write-Host "in Linux variant..." + az functionapp plan create --resource-group $groupName --name $functionAppName --location $location --sku $Plan --is-linux true + } + + + if ($Runtime -eq "dotnet") { + Write-Host "for .NET" + az functionapp create --name $functionAppName --storage-account $storageName --plan $functionAppName --resource-group $groupName --functions-version 3 --runtime $Runtime --os-type $OsType + } + else { + Write-Host "for $Runtime" + az functionapp create --name $functionAppName --storage-account $storageName --plan $functionAppName --resource-group $groupName --functions-version 3 --runtime $Runtime --runtime-version $RuntimeVersion --os-type $OsType + } + + az functionapp config set -n $functionAppName -g $groupName --use-32bit-worker-process false + az functionapp config appsettings set -n $functionAppName -g $groupName --settings EventHubsConnection=$eventHubsConnectionString +} +else { + Write-Host "Function app already exists." +} + +Write-Host "Configuring Scale=$MinNodes-$MaxNodes" +az functionapp plan update -g $groupName -n $functionAppName --max-burst $MaxNodes --number-of-workers $MinNodes --min-instances $MinNodes +az resource update -n $functionAppName/config/web -g $groupName --set properties.minimumElasticInstanceCount=$MinNodes --resource-type Microsoft.Web/sites +if ($MinNode -eq $MaxNodes) { + az resource update -n $functionAppName/config/web -g $groupName --set properties.functionsRuntimeScaleMonitoringEnabled=0 --resource-type Microsoft.Web/sites +} +else { + az resource update -n $functionAppName/config/web -g $groupName --set properties.functionsRuntimeScaleMonitoringEnabled=1 --resource-type Microsoft.Web/sites +} diff --git a/samples/Hello/delete.ps1 b/samples/scripts/delete.ps1 similarity index 100% rename from samples/Hello/delete.ps1 rename to samples/scripts/delete.ps1 diff --git a/samples/Hello/init.ps1 b/samples/scripts/init.ps1 similarity index 65% rename from samples/Hello/init.ps1 rename to samples/scripts/init.ps1 index 5d290d64..8b957d29 100644 --- a/samples/Hello/init.ps1 +++ b/samples/scripts/init.ps1 @@ -3,33 +3,27 @@ # import the parameter settings from the file in the same directory . ./settings.ps1 -if ((az group exists --name $groupName) -ne "true") -{ +if ((az group exists --name $groupName) -ne "true") { Write-Host "Creating Resource Group..." az group create --name $groupName --location $location } -else -{ +else { Write-Host "Resource Group already exists." } -if ((az storage account check-name --name $storageName | ConvertFrom-Json).reason -ne "AlreadyExists") -{ +if ((az storage account check-name --name $storageName | ConvertFrom-Json).reason -ne "AlreadyExists") { Write-Host "Creating Storage Account..." - az storage account create --name $storageName --location $location --resource-group $groupName --sku $storageSku + az storage account create --name $storageName --location $location --resource-group $groupName --sku $storageSku --allow-blob-public-access false --https-only true --min-tls-version TLS1_2 } -else -{ +else { Write-Host "Storage account already exists." } -if ((az eventhubs namespace exists --name $namespaceName | ConvertFrom-Json).reason -ne "NameInUse") -{ +if ((az eventhubs namespace exists --name $namespaceName | ConvertFrom-Json).reason -ne "NameInUse") { Write-Host "Creating EventHubs Namespace..." az eventhubs namespace create --name $namespaceName --resource-group $groupName } -else -{ +else { Write-Host "EventHubs Namespace already exists." } diff --git a/samples/scripts/request.http b/samples/scripts/request.http new file mode 100644 index 00000000..e2c0021d --- /dev/null +++ b/samples/scripts/request.http @@ -0,0 +1,6 @@ + +### Start Orchestrator Function via HTTP for Python and NodeJS +POST http://localhost:7071/api/orchestrators/DurableFunctionsNetheriteOrchestrator + +### Start Orchestrator Function via HTTP for .NET Core +POST http://localhost:7071/api/hellocities diff --git a/samples/scripts/settings.ps1 b/samples/scripts/settings.ps1 new file mode 100644 index 00000000..79e14076 --- /dev/null +++ b/samples/scripts/settings.ps1 @@ -0,0 +1,25 @@ +#!/usr/bin/pwsh + +# In case you are running into issues with Windows execution policies, you can unblock the *.ps1 files via: +# Unblock-File -Path ./*.ps1 + +Write-Host "Using parameters specified in settings.ps1." + +# always edit this parameter before running the scripts +$name = "globally-unique-lowercase-alphanumeric-name-with-no-dashes" + +# REVIEW THESE PARAMETERS BEFORE RUNNING THE SCRIPT +$location = "westeurope" +$storageSku = "Standard_LRS" + +# optionally, customize the following parameters +# to use different names for resource group, namespace, function app, storage account, and plan +$groupName = $name +$nameSpaceName = $name +$functionAppName = $name +$storageName = $name +$planName = $name + +if (($name -eq "globally-unique-lowercase-alphanumeric-name-with-no-dashes")) { + throw "You must edit the 'name' parameter in settings.ps1 before using this script" +}