-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Richard Wilson
committed
Nov 25, 2021
1 parent
25ab0a8
commit dfb478f
Showing
7 changed files
with
120 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Richard A Wilson | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,26 @@ | ||
# NZ COVID Pass PCF Component | ||
This PCF component utilizes [nzcp-js](https://github.com/vaxxnz/nzcp-js) to provide NZ Covid Pass Validation within a Canvas Power App. | ||
|
||
## Installation | ||
|
||
Make sure you have enabled PCF components for Canvas apps in your environment. For instructions on that [Click Here](https://docs.microsoft.com/en-us/powerapps/developer/component-framework/component-framework-for-canvas-apps) | ||
|
||
Install the managed solution provided in the Release are of this repo. | ||
|
||
## Control Properties | ||
| Name | Mode | Type | Description | Default | | ||
|---|---|---|---| --- | | ||
|QR Codekd|Input| SingleLine.Text | The contents of the QR Code|| | ||
|Offline Mode|Input| Boolean | If offline mode is set to true the component will attempt to validate the COVID-19 Pass using a prefetched DID document, otherwise it will attempt to resolve the DID document from the MoH.|false| | ||
|Test Mode|Input|Boolean|Allows you to set the control into test mode which will ensure that the sample QR code from https://nzcp.covid19.health.nz/#valid-worked-example will validate.|false| | ||
|Success|Output|Boolean|Provides the outcome of the COVID Pass validation|false| | ||
|Family Name|Output|SingleLine.Text|Pass holders family name|| | ||
|Given Name|Output|SingleLine.Text|Pass holders given name|| | ||
|Date of Birth|Output|SingleLine.Text|Pass holders date of birth|| | ||
|Violation Message|Output|SingleLine.Text|Friendly Error Message|| | ||
|Violation Section|Output|SingleLine.Text|Section of official specs under violation|| | ||
|Violation Link|Output|SingleLine.Text|Link to specifications breached|| | ||
|Violation Description|Output|SingleLine.Text|Simplified error message|| | ||
|
||
## Sample App | ||
A sample app is included under the Sample folder of this project which you can import into your environment once you have deployed the PCF solution. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Build the NZ COVID Pass project utilizing npm and MSBuild | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript | ||
name: $(BuildVersionMajor).$(BuildVersionMinor).$(BuildVersionPatch).$(BuildVersionRevision) | ||
|
||
trigger: none | ||
# branches: | ||
# include: | ||
# - master | ||
# paths: | ||
# exclude: | ||
# - *.md | ||
# - *.yml | ||
|
||
pr: none | ||
|
||
variables: | ||
#BUILD VERSION INFORMATION | ||
BuildVersionMajor: 1 | ||
BuildVersionMinor: 1 | ||
BuildVersionPatch: 0 | ||
#sets a counter for the version number changing the Major or Minor version will reset this counter | ||
#back to it's seed value | ||
BuildVersionRevision: $[counter(format('{0}.{1}.{2}', variables['BuildVersionMajor'], variables['BuildVersionMinor'],variables['BuildVersionPatch']), 1)] | ||
|
||
pool: | ||
vmImage: 'windows-latest' | ||
|
||
#COLOR PICKER | ||
|
||
steps: | ||
#Run npm install to get all required resources for the projectl | ||
- task: Npm@1 | ||
inputs: | ||
command: 'install' | ||
workingDir: './' | ||
|
||
#PowerApps controls can be build using MSBuild and do not require the PCF CLI to be downloaded. | ||
#The build command will utilize NuGet to go out and get all the resource packages it needs. | ||
- task: MSBuild@1 | ||
inputs: | ||
solution: '**/*.cdsproj' | ||
msbuildArguments: '/t:build /p:Configuration=Release /restore' | ||
|
||
#Copy the solution files to the build artifacts directory. | ||
- task: CopyFiles@2 | ||
inputs: | ||
SourceFolder: './Solution/NZCOVIDPass/bin/Release/' | ||
Contents: '*.zip' | ||
TargetFolder: '$(Build.ArtifactStagingDirectory)' | ||
|
||
#Publish the build artifacts. | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
ArtifactName: 'drop' | ||
publishLocation: 'Container' | ||
|
||
#GitHub Release | ||
- task: GitHubRelease@1 | ||
condition: and(succeeded(), eq(variables['Release'], true)) | ||
inputs: | ||
gitHubConnection: 'github.com_rwilson504' | ||
repositoryName: 'rwilson504/nzcp-pcf' | ||
action: 'create' | ||
target: '$(Build.SourceVersion)' | ||
tagSource: 'userSpecifiedTag' | ||
tag: '$(Build.BuildNumber)' | ||
title: '$(Build.BuildNumber)' | ||
changeLogCompareToRelease: 'lastFullRelease' | ||
changeLogType: 'commitBased' |