diff --git a/README.md b/README.md index 19f3e281..133337dd 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ## What is Affinidi? -The digital world is changing, and customers today want greater control and ownership of their data. As a developer, you can meet these demands and create apps that empower your customers to better manage their privacy, data storage, and portability. In other words, customers who use apps can decide how and where their data will be used. +The digital world is changing, and customers today want greater control and ownership of their data. As a developer, you can meet these demands and create apps that empower your customers to better manage their privacy, data storage, and portability. In other words, customers who use apps can decide how and where their data will be used. -Affinidi’s vision is to empower communities with control and ownership of their data, thereby creating new business models and greater trust. +Affinidi’s vision is to empower communities with control and ownership of their data, thereby creating new business models and greater trust. -In line with this vision, Affinidi has developed an extension that provides access to Affinidi Developer Tools directly within Visual Studio Code. This extension is a one-stop place for all the tools you need to build privacy-preserving applications, without having to leave your IDE. +In line with this vision, Affinidi has developed an extension that provides access to Affinidi Developer Tools directly within Visual Studio Code. This extension is a one-stop place for all the tools you need to build privacy-preserving applications, without having to leave your IDE. ## Who is this extension for? @@ -42,6 +42,7 @@ You can quickly change the active project any time by clicking on the respective ## Features You can do a lot of things with the Affinidi extension, including: + - Manage your VC Schemas or create a new one without leaving the VS Code app, - Manage your Issuances or perform a bulk issuance to send VCs to your customers to claim, - Generate ready-to-use scripts and snippets – for sending a VC offer, signing a credential with Cloud Wallet, etc., @@ -74,7 +75,7 @@ We'll send emails to provided targets with a link, which they can use to claim t ## Snippets & scripts Affinidi extension can help you with your app development by generating ready-to-use scripts and snippets with just a few clicks. -Script generators can be used to create files from scratch and they will automatically include your API Key Hash, DID and Project ID. +Script generators can be used to create files from scratch and they will automatically include your API Key Hash, DID and Project ID. ![Generate Script](./media/docs/generate_script.gif) @@ -88,75 +89,73 @@ Snippets, on the other hand, allow you to quickly insert small examples of Affin Available snippets: -| Name | Description | Supported Languages | -|---|---|---| -| affinidi-create-issuance | Create bulk issuance entity (using fetch) | Typescript and Javascript | -| affinidi-create-offer | Create & send bulk issuance offer (using fetch) | Typescript and Javascript | +| Name | Description | Supported Languages | +| ------------------------ | ----------------------------------------------- | ------------------------- | +| affinidi-create-issuance | Create bulk issuance entity (using fetch) | Typescript and Javascript | +| affinidi-create-offer | Create & send bulk issuance offer (using fetch) | Typescript and Javascript | > For instructions on how to use snippets please refer to [Visual Studio Code snippets documentation](https://code.visualstudio.com/docs/editor/userdefinedsnippets). ## Reference app -If you want an end-to-end example of an application, that uses Affinidi APIs, you can generate a reference app directly from the extension. -Reference app includes such features as: issuing a credential, claiming & storing it in your wallet, verifying it. +If you want an end-to-end example implementation that uses Affinidi APIs, you can generate two types of reference applications directly from the extension. -Just click "Certification & Verification" button in "App Generators" category: +The Certification and Verification app includes such features as: issuing a credential, claiming & storing it in your wallet, verifying it. -![App Generation](./media/docs/app_generation.png) +The Portable Reputation app allows the builder to connect to different data sources to construct a portable, user-owned and -managed reputation app that provides access to specific experiences, events or memberships. -> This feature requires Affinidi CLI to be installed: -> ``` -> $ npm i -g @affinidi/cli -> ``` +Just click "Certification & Verification" or "Portable Reputation" buttons in "App Generators" category: + +![App Generation](./media/docs/app_generation.png) ## Telemetry -Affinidi collects usage data to improve our products and services. For information on what data we collect and how we use your data, please refer to our [Privacy Policy](https://build.affinidi.com/dev-tools/privacy-policy.pdf). +Affinidi collects usage data to improve our products and services. For information on what data we collect and how we use your data, please refer to our [Privacy Policy](https://build.affinidi.com/dev-tools/privacy-policy.pdf). ## Feedback, Support, and Community -[Click here](https://github.com/affinidi/vscode-extension/issues) to create a ticket and we will get on it right away. If you are facing technical or other issues, you can reach out to us on [Discord](https://discord.com/invite/jx2hGBk5xE). +[Click here](https://github.com/affinidi/vscode-extension/issues) to create a ticket and we will get on it right away. If you are facing technical or other issues, you can reach out to us on [Discord](https://discord.com/invite/jx2hGBk5xE). ## FAQ -### A note from Affinidi +### A note from Affinidi -Affinidi Developer Tools are currently in the open beta phase and we are refining our product every day. The Affinidi Developer Tools may be incomplete and may contain errors – they may be unstable and may cause a loss of functionality and data. Use of the Affinidi Developer Tools will be at your own risk. As our engineers seek to improve our platform, we would not have the resources to provide any maintenance or tech support at this time. Please bear with us as we continue to improve the platform. +Affinidi Developer Tools are currently in the open beta phase and we are refining our product every day. The Affinidi Developer Tools may be incomplete and may contain errors – they may be unstable and may cause a loss of functionality and data. Use of the Affinidi Developer Tools will be at your own risk. As our engineers seek to improve our platform, we would not have the resources to provide any maintenance or tech support at this time. Please bear with us as we continue to improve the platform. -### What can I develop? +### What can I develop? -You are only limited by your imagination! Affinidi Developer Tools is a toolbox with which you can build software applications for personal or commercial use. +You are only limited by your imagination! Affinidi Developer Tools is a toolbox with which you can build software applications for personal or commercial use. -### Is there anything I should not develop? +### Is there anything I should not develop? -We only provide the tools - how you use them is largely up to you. We have no control over what you develop with our tools - but please use our tools responsibly! +We only provide the tools - how you use them is largely up to you. We have no control over what you develop with our tools - but please use our tools responsibly! -We hope that you would not develop anything that contravenes any applicable laws or regulations. Your projects should also not infringe on Affinidi’s or any third party’s intellectual property (for instance, misusing other parties’ data, code, logos, etc). +We hope that you would not develop anything that contravenes any applicable laws or regulations. Your projects should also not infringe on Affinidi’s or any third party’s intellectual property (for instance, misusing other parties’ data, code, logos, etc). -### What responsibilities do I have to my end-users? +### What responsibilities do I have to my end-users? -Please ensure that you have in place your own terms and conditions, privacy policies, and other safeguards to ensure that the projects you build are secure for your end users. +Please ensure that you have in place your own terms and conditions, privacy policies, and other safeguards to ensure that the projects you build are secure for your end users. -If you are processing personal data, please protect the privacy and other legal rights of your end-users and store their personal or sensitive information securely. +If you are processing personal data, please protect the privacy and other legal rights of your end-users and store their personal or sensitive information securely. -Some of our components would also require you to incorporate our end-user notices into your terms and conditions. +Some of our components would also require you to incorporate our end-user notices into your terms and conditions. -### Are Affinidi Developer Tools free for use? +### Are Affinidi Developer Tools free for use? -Affinidi Developer Tools are free during the open beta phase, so come onboard and experiment with our tools and see what you can build! We may bill for certain components in the future, but we will inform you beforehand. +Affinidi Developer Tools are free during the open beta phase, so come onboard and experiment with our tools and see what you can build! We may bill for certain components in the future, but we will inform you beforehand. -### Is there any limit or cap to my usage of the Affinidi Developer Tools? +### Is there any limit or cap to my usage of the Affinidi Developer Tools? -We may from time to time impose limits on your use of the Affinidi Developer Tools, such as limiting the number of API requests that you may make in a given duration. This is to ensure the smooth operation of the Affinidi Developer Tools so that you and all our other users can have a pleasant experience as we continue to scale and improve the Affinidi Developer Tools. +We may from time to time impose limits on your use of the Affinidi Developer Tools, such as limiting the number of API requests that you may make in a given duration. This is to ensure the smooth operation of the Affinidi Developer Tools so that you and all our other users can have a pleasant experience as we continue to scale and improve the Affinidi Developer Tools. -### Do I need to provide you with anything? +### Do I need to provide you with anything? -From time to time, we may request certain information from you to ensure that you are complying with the [Terms of Use](https://build.affinidi.com/dev-tools/terms-of-use.pdf). +From time to time, we may request certain information from you to ensure that you are complying with the [Terms of Use](https://build.affinidi.com/dev-tools/terms-of-use.pdf). -### Can I share my developer’s account with others? +### Can I share my developer’s account with others? -When you create a developer’s account with us, we will issue you your private login credentials. Please do not share this with anyone else, as you would be responsible for activities that happen under your account. If you have friends who are interested, ask them to sign up – let's build together! +When you create a developer’s account with us, we will issue you your private login credentials. Please do not share this with anyone else, as you would be responsible for activities that happen under your account. If you have friends who are interested, ask them to sign up – let's build together! -## *Disclaimer* +## _Disclaimer_ -*Please note that this FAQ is provided for informational purposes only and is not to be considered a legal document. For the legal terms and conditions governing your use of the Affinidi Developer Tools, please refer to our [Terms of Use](https://build.affinidi.com/dev-tools/terms-of-use.pdf).* +_Please note that this FAQ is provided for informational purposes only and is not to be considered a legal document. For the legal terms and conditions governing your use of the Affinidi Developer Tools, please refer to our [Terms of Use](https://build.affinidi.com/dev-tools/terms-of-use.pdf)._ diff --git a/media/docs/app_generation.png b/media/docs/app_generation.png index b8d8b272..2f53acf1 100644 Binary files a/media/docs/app_generation.png and b/media/docs/app_generation.png differ diff --git a/package-lock.json b/package-lock.json index ffd221f5..7ae60602 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@affinidi/affinidi-vc-schemas": "^1.27.0", - "@affinidi/cli": "^1.54.3", + "@affinidi/cli": "^1.59.1", "@affinidi/client-iam": "^0.5.2", "@affinidi/client-issuance": "^0.5.1", "@affinidi/client-schema-manager": "^0.4.1", @@ -86,9 +86,10 @@ "integrity": "sha1-rN9eefBNRvfHoYenwP1Z8+EWcGY=" }, "node_modules/@affinidi/cli": { - "version": "1.54.3", - "resolved": "https://registry.npmjs.org/@affinidi/cli/-/cli-1.54.3.tgz", - "integrity": "sha512-e3tFbK/HhP+ZPYb7xjvmMyO9dWtZJUuPuXeLR1Z+e4EwocPVSE7Fc0NYKJbVbdrAStm+eGd3WYlZsedLua9BIQ==", + "version": "1.59.1", + "resolved": "https://registry.npmjs.org/@affinidi/cli/-/cli-1.59.1.tgz", + "integrity": "sha512-gcbzDkFkCsq+QuyiEp3HuZPPqkQaGZwmSzEAZ/lHTGzJWzOSrzCb3BUhw3g1WI20EgqnKFMu9XrvL85GQ+dk8A==", + "hasInstallScript": true, "dependencies": { "@oclif/core": "^1.20.4", "@oclif/plugin-autocomplete": "^1.3.6", @@ -1014,9 +1015,9 @@ } }, "node_modules/@oclif/core": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-1.25.0.tgz", - "integrity": "sha512-vS8L5Uqc5Wuq3zmKVvX5LLcyxhfH2X2q+LG1P6czzkh6k09uLeDaZfwaYPXD7ItM4Vfy+KEctfKiWePeLDnOpg==", + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-1.23.2.tgz", + "integrity": "sha512-NdaOaUDTRc6g1yTkOAKiEVOiQhc5CNcWNXa0QF4IS4yTjNqp4DOzgtF9Dwe585nPEKzSbTBiz1wyLOa4qIHSRQ==", "dependencies": { "@oclif/linewrap": "^1.0.0", "@oclif/screen": "^3.0.4", @@ -1149,11 +1150,11 @@ "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" }, "node_modules/@oclif/plugin-autocomplete": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@oclif/plugin-autocomplete/-/plugin-autocomplete-1.4.1.tgz", - "integrity": "sha512-H60zg12tl+PGzarfXsaN/VTdoGOR4wL6wXnekF/zBDVc58FByrSJHGegFHIONFZPYBEbE/ixhk8ofUWNsEvWlA==", + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/@oclif/plugin-autocomplete/-/plugin-autocomplete-1.3.10.tgz", + "integrity": "sha512-oQl7ZqXhXJUOH26mDPcqcMGmcdIoK/uQPSpUBrfLa1iaQ30slTs0T7KOzg+vwKuPqIIF1nTCPuH67lE8GvUPTw==", "dependencies": { - "@oclif/core": "^2.0.2-beta.6", + "@oclif/core": "^1.23.1", "chalk": "^4.1.0", "debug": "^4.3.4", "fs-extra": "^9.0.1" @@ -1162,80 +1163,6 @@ "node": ">=12.0.0" } }, - "node_modules/@oclif/plugin-autocomplete/node_modules/@oclif/core": { - "version": "2.0.2-beta.10", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-2.0.2-beta.10.tgz", - "integrity": "sha512-FgJ5XHE6MjE7DOyQAcOZPD5Xs5cNOzP91zAQBkut8xhOkZA1NRQjv+7BczJqOTerXccohhTlu09pd7OAyDuitw==", - "dependencies": { - "@types/cli-progress": "^3.11.0", - "ansi-escapes": "^4.3.2", - "ansi-styles": "^4.3.0", - "cardinal": "^2.1.1", - "chalk": "^4.1.2", - "clean-stack": "^3.0.1", - "cli-progress": "^3.10.0", - "debug": "^4.3.4", - "ejs": "^3.1.6", - "fs-extra": "^9.1.0", - "get-package-type": "^0.1.0", - "globby": "^11.1.0", - "hyperlinker": "^1.0.0", - "indent-string": "^4.0.0", - "is-wsl": "^2.2.0", - "js-yaml": "^3.14.1", - "natural-orderby": "^2.0.3", - "object-treeify": "^1.1.33", - "password-prompt": "^1.1.2", - "semver": "^7.3.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "supports-color": "^8.1.1", - "supports-hyperlinks": "^2.2.0", - "tslib": "^2.4.1", - "widest-line": "^3.1.0", - "wordwrap": "^1.0.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@oclif/plugin-autocomplete/node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@oclif/plugin-autocomplete/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@oclif/plugin-autocomplete/node_modules/clean-stack": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", - "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", - "dependencies": { - "escape-string-regexp": "4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@oclif/plugin-autocomplete/node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -1250,195 +1177,23 @@ "node": ">=10" } }, - "node_modules/@oclif/plugin-autocomplete/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@oclif/plugin-autocomplete/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/@oclif/plugin-autocomplete/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, - "node_modules/@oclif/plugin-autocomplete/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@oclif/plugin-help": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-5.2.0.tgz", - "integrity": "sha512-Sp6Eywj3V2Moif/CJeJsyInPJhzifs2JjsaVbsrLS77WOL2/XAmca1sE5QxfakOGYH21g8xz/Ht9ZgiNy8u1zQ==", + "version": "5.1.22", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-5.1.22.tgz", + "integrity": "sha512-gflrCqV3c7nd1UgknuZZTX6Th9CTkvVyTjL76UNHrea3kCZEpPzsMGhwP989R+j3KSGJGeZVrq2i9g2QXI9tZA==", "dependencies": { - "@oclif/core": "^2.0.2-beta.6" + "@oclif/core": "^1.23.1" }, "engines": { "node": ">=12.0.0" } }, - "node_modules/@oclif/plugin-help/node_modules/@oclif/core": { - "version": "2.0.2-beta.10", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-2.0.2-beta.10.tgz", - "integrity": "sha512-FgJ5XHE6MjE7DOyQAcOZPD5Xs5cNOzP91zAQBkut8xhOkZA1NRQjv+7BczJqOTerXccohhTlu09pd7OAyDuitw==", - "dependencies": { - "@types/cli-progress": "^3.11.0", - "ansi-escapes": "^4.3.2", - "ansi-styles": "^4.3.0", - "cardinal": "^2.1.1", - "chalk": "^4.1.2", - "clean-stack": "^3.0.1", - "cli-progress": "^3.10.0", - "debug": "^4.3.4", - "ejs": "^3.1.6", - "fs-extra": "^9.1.0", - "get-package-type": "^0.1.0", - "globby": "^11.1.0", - "hyperlinker": "^1.0.0", - "indent-string": "^4.0.0", - "is-wsl": "^2.2.0", - "js-yaml": "^3.14.1", - "natural-orderby": "^2.0.3", - "object-treeify": "^1.1.33", - "password-prompt": "^1.1.2", - "semver": "^7.3.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "supports-color": "^8.1.1", - "supports-hyperlinks": "^2.2.0", - "tslib": "^2.4.1", - "widest-line": "^3.1.0", - "wordwrap": "^1.0.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@oclif/plugin-help/node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@oclif/plugin-help/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@oclif/plugin-help/node_modules/clean-stack": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", - "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", - "dependencies": { - "escape-string-regexp": "4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@oclif/plugin-help/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@oclif/plugin-help/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@oclif/plugin-help/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/@oclif/plugin-help/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, - "node_modules/@oclif/plugin-help/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@oclif/plugin-warn-if-update-available": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-2.0.20.tgz", - "integrity": "sha512-vbPeT6dIGy28yZZ1ey/+c47iBUTNwnrs9mOEEgek9ZWtx0OszVWlP5XYiaoypnStbkXzVA96Bty8aKdi2zhOaA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-2.0.18.tgz", + "integrity": "sha512-FmfMpsC/lhWgtUpN++LxKiWYhnTwDjeJPsENzZHi49opkzol2oT45Cw2tFYA8qW+CngRBrHWI72tTJ1KSsRbEA==", "dependencies": { - "@oclif/core": "^1.25.0", + "@oclif/core": "^1.23.1", "chalk": "^4.1.0", "debug": "^4.1.0", "fs-extra": "^9.0.1", @@ -1884,14 +1639,6 @@ "@types/chai": "*" } }, - "node_modules/@types/cli-progress": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@types/cli-progress/-/cli-progress-3.11.0.tgz", - "integrity": "sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/deep-equal-in-any-order": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/deep-equal-in-any-order/-/deep-equal-in-any-order-1.0.1.tgz", @@ -1956,7 +1703,8 @@ "node_modules/@types/node": { "version": "16.18.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.11.tgz", - "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==" + "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==", + "dev": true }, "node_modules/@types/node-fetch": { "version": "2.6.2", @@ -5359,9 +5107,9 @@ } }, "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -13149,7 +12897,8 @@ "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true }, "node_modules/workerpool": { "version": "6.2.1", @@ -13363,9 +13112,9 @@ "integrity": "sha1-rN9eefBNRvfHoYenwP1Z8+EWcGY=" }, "@affinidi/cli": { - "version": "1.54.3", - "resolved": "https://registry.npmjs.org/@affinidi/cli/-/cli-1.54.3.tgz", - "integrity": "sha512-e3tFbK/HhP+ZPYb7xjvmMyO9dWtZJUuPuXeLR1Z+e4EwocPVSE7Fc0NYKJbVbdrAStm+eGd3WYlZsedLua9BIQ==", + "version": "1.59.1", + "resolved": "https://registry.npmjs.org/@affinidi/cli/-/cli-1.59.1.tgz", + "integrity": "sha512-gcbzDkFkCsq+QuyiEp3HuZPPqkQaGZwmSzEAZ/lHTGzJWzOSrzCb3BUhw3g1WI20EgqnKFMu9XrvL85GQ+dk8A==", "requires": { "@oclif/core": "^1.20.4", "@oclif/plugin-autocomplete": "^1.3.6", @@ -14050,9 +13799,9 @@ } }, "@oclif/core": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-1.25.0.tgz", - "integrity": "sha512-vS8L5Uqc5Wuq3zmKVvX5LLcyxhfH2X2q+LG1P6czzkh6k09uLeDaZfwaYPXD7ItM4Vfy+KEctfKiWePeLDnOpg==", + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-1.23.2.tgz", + "integrity": "sha512-NdaOaUDTRc6g1yTkOAKiEVOiQhc5CNcWNXa0QF4IS4yTjNqp4DOzgtF9Dwe585nPEKzSbTBiz1wyLOa4qIHSRQ==", "requires": { "@oclif/linewrap": "^1.0.0", "@oclif/screen": "^3.0.4", @@ -14154,75 +13903,16 @@ "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" }, "@oclif/plugin-autocomplete": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@oclif/plugin-autocomplete/-/plugin-autocomplete-1.4.1.tgz", - "integrity": "sha512-H60zg12tl+PGzarfXsaN/VTdoGOR4wL6wXnekF/zBDVc58FByrSJHGegFHIONFZPYBEbE/ixhk8ofUWNsEvWlA==", + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/@oclif/plugin-autocomplete/-/plugin-autocomplete-1.3.10.tgz", + "integrity": "sha512-oQl7ZqXhXJUOH26mDPcqcMGmcdIoK/uQPSpUBrfLa1iaQ30slTs0T7KOzg+vwKuPqIIF1nTCPuH67lE8GvUPTw==", "requires": { - "@oclif/core": "^2.0.2-beta.6", + "@oclif/core": "^1.23.1", "chalk": "^4.1.0", "debug": "^4.3.4", "fs-extra": "^9.0.1" }, "dependencies": { - "@oclif/core": { - "version": "2.0.2-beta.10", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-2.0.2-beta.10.tgz", - "integrity": "sha512-FgJ5XHE6MjE7DOyQAcOZPD5Xs5cNOzP91zAQBkut8xhOkZA1NRQjv+7BczJqOTerXccohhTlu09pd7OAyDuitw==", - "requires": { - "@types/cli-progress": "^3.11.0", - "ansi-escapes": "^4.3.2", - "ansi-styles": "^4.3.0", - "cardinal": "^2.1.1", - "chalk": "^4.1.2", - "clean-stack": "^3.0.1", - "cli-progress": "^3.10.0", - "debug": "^4.3.4", - "ejs": "^3.1.6", - "fs-extra": "^9.1.0", - "get-package-type": "^0.1.0", - "globby": "^11.1.0", - "hyperlinker": "^1.0.0", - "indent-string": "^4.0.0", - "is-wsl": "^2.2.0", - "js-yaml": "^3.14.1", - "natural-orderby": "^2.0.3", - "object-treeify": "^1.1.33", - "password-prompt": "^1.1.2", - "semver": "^7.3.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "supports-color": "^8.1.1", - "supports-hyperlinks": "^2.2.0", - "tslib": "^2.4.1", - "widest-line": "^3.1.0", - "wordwrap": "^1.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "requires": { - "type-fest": "^0.21.3" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "clean-stack": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", - "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", - "requires": { - "escape-string-regexp": "4.0.0" - } - }, "fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -14233,149 +13923,23 @@ "jsonfile": "^6.0.1", "universalify": "^2.0.0" } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" } } }, "@oclif/plugin-help": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-5.2.0.tgz", - "integrity": "sha512-Sp6Eywj3V2Moif/CJeJsyInPJhzifs2JjsaVbsrLS77WOL2/XAmca1sE5QxfakOGYH21g8xz/Ht9ZgiNy8u1zQ==", + "version": "5.1.22", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-5.1.22.tgz", + "integrity": "sha512-gflrCqV3c7nd1UgknuZZTX6Th9CTkvVyTjL76UNHrea3kCZEpPzsMGhwP989R+j3KSGJGeZVrq2i9g2QXI9tZA==", "requires": { - "@oclif/core": "^2.0.2-beta.6" - }, - "dependencies": { - "@oclif/core": { - "version": "2.0.2-beta.10", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-2.0.2-beta.10.tgz", - "integrity": "sha512-FgJ5XHE6MjE7DOyQAcOZPD5Xs5cNOzP91zAQBkut8xhOkZA1NRQjv+7BczJqOTerXccohhTlu09pd7OAyDuitw==", - "requires": { - "@types/cli-progress": "^3.11.0", - "ansi-escapes": "^4.3.2", - "ansi-styles": "^4.3.0", - "cardinal": "^2.1.1", - "chalk": "^4.1.2", - "clean-stack": "^3.0.1", - "cli-progress": "^3.10.0", - "debug": "^4.3.4", - "ejs": "^3.1.6", - "fs-extra": "^9.1.0", - "get-package-type": "^0.1.0", - "globby": "^11.1.0", - "hyperlinker": "^1.0.0", - "indent-string": "^4.0.0", - "is-wsl": "^2.2.0", - "js-yaml": "^3.14.1", - "natural-orderby": "^2.0.3", - "object-treeify": "^1.1.33", - "password-prompt": "^1.1.2", - "semver": "^7.3.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "supports-color": "^8.1.1", - "supports-hyperlinks": "^2.2.0", - "tslib": "^2.4.1", - "widest-line": "^3.1.0", - "wordwrap": "^1.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "requires": { - "type-fest": "^0.21.3" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "clean-stack": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", - "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", - "requires": { - "escape-string-regexp": "4.0.0" - } - }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" - } + "@oclif/core": "^1.23.1" } }, "@oclif/plugin-warn-if-update-available": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-2.0.20.tgz", - "integrity": "sha512-vbPeT6dIGy28yZZ1ey/+c47iBUTNwnrs9mOEEgek9ZWtx0OszVWlP5XYiaoypnStbkXzVA96Bty8aKdi2zhOaA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-2.0.18.tgz", + "integrity": "sha512-FmfMpsC/lhWgtUpN++LxKiWYhnTwDjeJPsENzZHi49opkzol2oT45Cw2tFYA8qW+CngRBrHWI72tTJ1KSsRbEA==", "requires": { - "@oclif/core": "^1.25.0", + "@oclif/core": "^1.23.1", "chalk": "^4.1.0", "debug": "^4.1.0", "fs-extra": "^9.0.1", @@ -14732,14 +14296,6 @@ "@types/chai": "*" } }, - "@types/cli-progress": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@types/cli-progress/-/cli-progress-3.11.0.tgz", - "integrity": "sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg==", - "requires": { - "@types/node": "*" - } - }, "@types/deep-equal-in-any-order": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/deep-equal-in-any-order/-/deep-equal-in-any-order-1.0.1.tgz", @@ -14804,7 +14360,8 @@ "@types/node": { "version": "16.18.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.11.tgz", - "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==" + "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==", + "dev": true }, "@types/node-fetch": { "version": "2.6.2", @@ -17235,9 +16792,9 @@ } }, "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", "requires": { "brace-expansion": "^2.0.1" } @@ -22935,7 +22492,8 @@ "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true }, "workerpool": { "version": "6.2.1", diff --git a/package.json b/package.json index dfecea4c..3b415986 100644 --- a/package.json +++ b/package.json @@ -587,7 +587,7 @@ }, "dependencies": { "@affinidi/affinidi-vc-schemas": "^1.27.0", - "@affinidi/cli": "^1.54.3", + "@affinidi/cli": "^1.59.1", "@affinidi/client-iam": "^0.5.2", "@affinidi/client-issuance": "^0.5.1", "@affinidi/client-schema-manager": "^0.4.1", diff --git a/src/features/schema-manager/schema-builder/helpers/createBuilderSchemaFork.ts b/src/features/schema-manager/schema-builder/helpers/createBuilderSchemaFork.ts index 0925741f..65a2342a 100644 --- a/src/features/schema-manager/schema-builder/helpers/createBuilderSchemaFork.ts +++ b/src/features/schema-manager/schema-builder/helpers/createBuilderSchemaFork.ts @@ -1,10 +1,10 @@ -import { SchemaField, parseSchema } from '@affinidi/affinidi-vc-schemas'; -import { nanoid } from 'nanoid'; -import { window, ProgressLocation } from 'vscode'; -import { schemaMessage } from '../../messages'; -import { vcJsonSchemaFetcher } from '../../../issuance/json-schema/json-schema-fetcher'; -import { schemaManagerState } from '../../schemaManagerState'; -import { BuilderAttribute } from '../SchemaBuilderWebview'; +import { SchemaField, parseSchema } from '@affinidi/affinidi-vc-schemas' +import { nanoid } from 'nanoid' +import { window, ProgressLocation } from 'vscode' +import { schemaMessage } from '../../messages' +import { vcJsonSchemaFetcher } from '../../../issuance/json-schema/json-schema-fetcher' +import { schemaManagerState } from '../../schemaManagerState' +import { BuilderAttribute } from '../SchemaBuilderWebview' function fieldsToAttributes(fields: SchemaField[], parentId?: string): BuilderAttribute[] { return fields.flatMap((field) => { diff --git a/src/features/schema-manager/schemaManagerHelpers.ts b/src/features/schema-manager/schemaManagerHelpers.ts index abfae5f8..d876fe64 100644 --- a/src/features/schema-manager/schemaManagerHelpers.ts +++ b/src/features/schema-manager/schemaManagerHelpers.ts @@ -1,3 +1,4 @@ +import { SchemaDto } from '@affinidi/client-schema-manager' import nodeFetch from 'node-fetch' import path from 'path' import { window, ProgressLocation } from 'vscode' @@ -6,7 +7,6 @@ import { showQuickPick } from '../../utils/showQuickPick' import { schemaMessage } from './messages' import { schemaManagerState } from './schemaManagerState' import { readOnlyContentViewer } from '../../utils/openReadOnlyContent' -import { SchemaDto } from '@affinidi/client-schema-manager' export const EXAMPLE_SCHEMA: Schema = { type: 'MySchema', diff --git a/src/features/schema-manager/tree/schemaManagerExplorerProvider.ts b/src/features/schema-manager/tree/schemaManagerExplorerProvider.ts index 69eecc84..ed99046b 100644 --- a/src/features/schema-manager/tree/schemaManagerExplorerProvider.ts +++ b/src/features/schema-manager/tree/schemaManagerExplorerProvider.ts @@ -13,9 +13,7 @@ function simplifySchemaDescription(value: string) { } export class SchemaManagerExplorerProvider implements ExplorerProvider { - async getChildren( - element: BasicTreeItem | undefined, - ): Promise { + async getChildren(element: BasicTreeItem | undefined): Promise { if (element === undefined) return undefined if (element instanceof ProjectFeatureTreeItem && element.feature === Feature.SCHEMAS) { @@ -45,12 +43,10 @@ export class SchemaManagerExplorerProvider implements ExplorerProvider { } private async getSchemas(parent: ScopedSchemasTreeItem) { - const schemas = await schemaManagerState.listAuthoredSchemas( - { - projectId: parent.projectId, - scope: parent.scope, - }, - ) + const schemas = await schemaManagerState.listAuthoredSchemas({ + projectId: parent.projectId, + scope: parent.scope, + }) return schemas.map( (schema) => diff --git a/src/features/schema-manager/tree/treeItems.ts b/src/features/schema-manager/tree/treeItems.ts index ef5715c2..ab97a224 100644 --- a/src/features/schema-manager/tree/treeItems.ts +++ b/src/features/schema-manager/tree/treeItems.ts @@ -1,5 +1,8 @@ -import { ThemeIcon, TreeItemCollapsibleState } from 'vscode'; -import { BasicTreeItemWithProject, BasicTreeItemWithProjectInput } from '../../../tree/basicTreeItemWithProject'; +import { ThemeIcon, TreeItemCollapsibleState } from 'vscode' +import { + BasicTreeItemWithProject, + BasicTreeItemWithProjectInput, +} from '../../../tree/basicTreeItemWithProject' type SchemaScope = 'public' | 'unlisted' diff --git a/src/features/telemetry/messages.ts b/src/features/telemetry/messages.ts index 1cfab72c..2f69ecd5 100644 --- a/src/features/telemetry/messages.ts +++ b/src/features/telemetry/messages.ts @@ -1,11 +1,9 @@ export const telemetryMessage = { - accept: 'Accept', - deny: 'Deny', - sendUsageData: 'Help us make Affinidi better! Do you accept to send anonymous usage data?', - } + accept: 'Accept', + deny: 'Deny', + sendUsageData: 'Help us make Affinidi better! Do you accept to send anonymous usage data?', +} - - export const errorMessage = { - unknownConsentType: 'unknown consent type: ', - } - \ No newline at end of file +export const errorMessage = { + unknownConsentType: 'unknown consent type: ', +} diff --git a/src/generators/create-app/generator.ts b/src/generators/create-app/generator.ts index 7c18ea0d..8ff1517c 100644 --- a/src/generators/create-app/generator.ts +++ b/src/generators/create-app/generator.ts @@ -4,8 +4,9 @@ import { configVault } from '../../config/configVault' import { generatorMessage, labels } from '../messages' import { cliHelper } from '../../utils/cliHelper' import { notifyError } from '../../utils/notifyError' +import { UseCasesAppTypes } from '../../utils/types' -export async function generateAffinidiAppWithCLI(): Promise { +export async function generateAffinidiAppWithCLI(useCase: UseCasesAppTypes): Promise { try { const projectId = await configVault.requireActiveProjectId() @@ -38,7 +39,7 @@ export async function generateAffinidiAppWithCLI(): Promise { const fullPath = path.join(folderPath, appName) - await cliHelper.generateApp({ path: fullPath }) + await cliHelper.generateApp({ path: fullPath, useCase }) } catch (error: unknown) { notifyError(error, generatorMessage.failedToGenerateApp) } diff --git a/src/generators/initGenerators.ts b/src/generators/initGenerators.ts index 0e1e6f46..50b2c538 100644 --- a/src/generators/initGenerators.ts +++ b/src/generators/initGenerators.ts @@ -2,13 +2,19 @@ import { commands } from 'vscode' import { ext } from '../extensionVariables' import { telemetryHelpers } from '../features/telemetry/telemetryHelpers' import { generateAffinidiAppWithCLI } from './create-app/generator' +import { labels } from '../tree/messages' +import { DevToolsTreeItem } from '../tree/devToolsTreeItem' export const initGenerators = () => { ext.context.subscriptions.push( - commands.registerCommand('affinidi.codegen.app', async () => { + commands.registerCommand('affinidi.codegen.app', async (element: DevToolsTreeItem) => { telemetryHelpers.trackCommand('affinidi.codegen.app') - await generateAffinidiAppWithCLI() + await generateAffinidiAppWithCLI( + element?.label?.toString() === labels.portableReputation + ? 'portable-reputation' + : 'certification-and-verification', + ) }), ) } diff --git a/src/snippets/sign-vc-with-cloud-wallet/snippet.ts b/src/snippets/sign-vc-with-cloud-wallet/snippet.ts index b3845c81..739c1f4c 100644 --- a/src/snippets/sign-vc-with-cloud-wallet/snippet.ts +++ b/src/snippets/sign-vc-with-cloud-wallet/snippet.ts @@ -34,7 +34,6 @@ export const implementations: Implementations = { typescriptreact: typescript, } - export const insertSignVcWithCloudWalletSnippet = createSnippetCommand( 'signVcWithCloudWallet', implementations, diff --git a/src/test/suite/generator/generate-app/generator.test.ts b/src/test/suite/generator/generate-app/generator.test.ts index ef102412..f89da069 100644 --- a/src/test/suite/generator/generate-app/generator.test.ts +++ b/src/test/suite/generator/generate-app/generator.test.ts @@ -41,7 +41,7 @@ describe('generateAffinidiAppWithCLI()', () => { it("should show error message if user didn't specify directory", async () => { dialog.resolves() - await generateAffinidiAppWithCLI() + await generateAffinidiAppWithCLI('certification-and-verification') expect(dialog).called expect(showErrorMessage).calledWith(generatorMessage.noDirectorySelected) @@ -50,14 +50,14 @@ describe('generateAffinidiAppWithCLI()', () => { it("should show error message if user didn't specify app name", async () => { inputBox.resolves() - await generateAffinidiAppWithCLI() + await generateAffinidiAppWithCLI('certification-and-verification') expect(dialog).called expect(showErrorMessage).calledWith(generatorMessage.appNameNotSelected) }) it('should show error message if app with same name already exist in selected path', async () => { - await generateAffinidiAppWithCLI() + await generateAffinidiAppWithCLI('certification-and-verification') expect(dialog).called expect(showErrorMessage).calledWith(generatorMessage.directoryNameDuplication) @@ -68,7 +68,7 @@ describe('generateAffinidiAppWithCLI()', () => { existsSync.restore() existsSync.resolves(false) - await generateAffinidiAppWithCLI() + await generateAffinidiAppWithCLI('certification-and-verification') expect(dialog).called expect(showInformationMessage).calledWith(cliMessage.appGenerated) diff --git a/src/tree/basicTreeItem.ts b/src/tree/basicTreeItem.ts index d8d0512e..afdc0e14 100644 --- a/src/tree/basicTreeItem.ts +++ b/src/tree/basicTreeItem.ts @@ -22,6 +22,7 @@ export class BasicTreeItem extends TreeItem { ? { title: input.label, command: input.command, + arguments: [this], } : input.command } diff --git a/src/tree/devToolsTree.ts b/src/tree/devToolsTree.ts index c4fd7d74..1e9aad90 100644 --- a/src/tree/devToolsTree.ts +++ b/src/tree/devToolsTree.ts @@ -112,6 +112,11 @@ export class DevToolsTree implements TreeDataProvider { label: labels.certificationAndVerification, command: 'affinidi.codegen.app', }), + new DevToolsTreeItem({ + type: DevToolsType.app, + label: labels.portableReputation, + command: 'affinidi.codegen.app', + }), ] } } diff --git a/src/tree/messages.ts b/src/tree/messages.ts index 265e41af..936702f0 100644 --- a/src/tree/messages.ts +++ b/src/tree/messages.ts @@ -1,21 +1,22 @@ export const labels = { - schemaBuilder: 'Schema Builder', - initiateIssuanceCsvFlow: 'Initiate CSV Issuance', - select: 'Select', - empty: '(empty)', - viewAvailableSnippets: 'View Available Snippets', - appGenerators: 'App Generators', - scriptGenerators: 'Script Generators', - intelliSenseSnippets: 'IntelliSense Snippets', - helperTools: 'Helper Tools', - sendVCOfferToEmail: 'Send a VC Offer to an email', - getIssuanceOffers: 'Get Issuance Offers', - signCloudWalletVc: 'Sign a VC with Cloud Wallet', - certificationAndVerification: 'Certification & Verification', - reviewIssues: 'Review Issues', - reportIssue: 'Report Issue', - openWalkthrough: 'Extension Walkthrough', - openAPIDocs: 'API Documentation', - openDiscord: 'Discord Server', - verifyVC: 'Verify a VC', - } \ No newline at end of file + schemaBuilder: 'Schema Builder', + initiateIssuanceCsvFlow: 'Initiate CSV Issuance', + select: 'Select', + empty: '(empty)', + viewAvailableSnippets: 'View Available Snippets', + appGenerators: 'App Generators', + scriptGenerators: 'Script Generators', + intelliSenseSnippets: 'IntelliSense Snippets', + helperTools: 'Helper Tools', + sendVCOfferToEmail: 'Send a VC Offer to an email', + getIssuanceOffers: 'Get Issuance Offers', + signCloudWalletVc: 'Sign a VC with Cloud Wallet', + certificationAndVerification: 'Certification & Verification', + portableReputation: 'Portable Reputation', + reviewIssues: 'Review Issues', + reportIssue: 'Report Issue', + openWalkthrough: 'Extension Walkthrough', + openAPIDocs: 'API Documentation', + openDiscord: 'Discord Server', + verifyVC: 'Verify a VC', +} diff --git a/src/utils/cliHelper.ts b/src/utils/cliHelper.ts index 69f0ae1e..03507158 100644 --- a/src/utils/cliHelper.ts +++ b/src/utils/cliHelper.ts @@ -7,6 +7,7 @@ import { cliMessage, generatorMessage } from './messages' import { notifyError } from './notifyError' import { configVault } from '../config/configVault' import { iamState } from '../features/iam/iamState' +import { UseCasesAppTypes } from './types' interface ExecInterface { command: (command: string) => Promise<{ stdout: string }> @@ -31,7 +32,7 @@ export class CliHelper { return isInstalled } - async generateApp({ path }: { path: string }): Promise { + async generateApp({ path, useCase }: { path: string; useCase: UseCasesAppTypes }): Promise { if (fs.existsSync(path)) { window.showErrorMessage(generatorMessage.directoryNameDuplication) return @@ -54,7 +55,7 @@ export class CliHelper { }, () => generateApplication({ - use_case: 'certification-and-verification', + use_case: useCase, name: path, output: 'plaintext', apiKey: apiKeyHash, diff --git a/src/utils/types.ts b/src/utils/types.ts index 5ac517be..c369852c 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -5,3 +5,5 @@ export interface Schema { } export type Environment = 'prod' | 'staging' | 'dev' + +export type UseCasesAppTypes = 'portable-reputation' | 'certification-and-verification'