Skip to content

Commit

Permalink
fix: add used deps to list (#95)
Browse files Browse the repository at this point in the history
* fix: add used deps to list

Signed-off-by: Mirko Mollik <[email protected]>

* update readme

Signed-off-by: Mirko Mollik <[email protected]>

* optimize cicd

Signed-off-by: Mirko Mollik <[email protected]>

* fix: add test credentials to newsletter

Signed-off-by: Mirko Mollik <[email protected]>

---------

Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
cre8 authored Oct 7, 2024
1 parent aac65bc commit eb17c80
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 66 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ jobs:
with:
node-version: 18

- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: viewer/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: cd viewer && npm ci

Expand All @@ -49,12 +57,24 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18

- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: viewer/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: cd viewer && npm ci

- name: Lint
run: cd viewer && npm run lint

- name: Build Angular app
run: cd viewer && npm run build -- --configuration production

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/newsletter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
EMAIL_RECIPIENT: ${{ github.event.inputs.email }}
EMAIL_RECIPIENT: ${{ github.event.inputs.email }}
NODE_ENV: ${{ vars.NODE_ENV }}
EMAIL_STORE: true

- name: Upload newsletter artifact
uses: actions/upload-artifact@v4
with:
name: newsletter
path: viewer/newsletter.html
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Wallets](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fopenwallet-foundation%2Fdigital-wallet-and-agent-overviews-sig%2Fbadge-info%2Fwallets.json)

# Digital Wallet and Agent Overviews Special Interest Group (SIG)

![Wallets](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fopenwallet-foundation%2Fdigital-wallet-and-agent-overviews-sig%2Fbadge-info%2Fwallets.json)

The objectives of this SIG is to further develop and maintain the Digital Wallet Overview and including the digital identity agents/SDKs in the overview. The overview can be found [here](https://openwallet-foundation.github.io/digital-wallet-and-agent-overviews-sig/). These overview should provide transparency of the characteristics of wallets and agents in order to allow for comparison and effective decision-making on which wallet is applicable for your use case. By creating awareness of these overviews, this work can lead to less fragmentation of the SSI playing field and increase adoption.

## Participating
Expand Down Expand Up @@ -47,4 +47,10 @@ We foresee that the safe wallet SIG provided us with new characteristics in the

Each wallet and agent is capable to link to relevant dependencies like frameworks or libraries that are relevant. The linking will support the overview of the technology stack of the wallet or agent. We encourage developers to only link to relevant dependencies that are specific for the wallet or agent to avoid a long list of dependencies.

The dependencies will be add as a new object in the `dependencies` folder and then linked by the unique `name` attribute in each wallet or agent object.
The dependencies will be add as a new object in the `dependencies` folder and then linked by the unique filename in each wallet or agent object. To generate the JSON object, you can use the form provided when clicking "Add Dependency" in the upper right corner of the overview.

## Case Studies

We are looking for case studies of the use of wallets and agents in the field. These case studies can be used to show the applicability of the wallets and agents in real life situations. The case studies will be added as a new object in the `case-studies` folder, referencing the wallets or agents by their filename. To generate the JSON object, you can use the form provided when clicking "Add Case Study" in the upper right corner of the overview.

There is also the chance to subscribe to our newsletter that will be sent out every month. The newsletter will contain the latest submitted case studies to this overview. You can subscribe to the newsletter by clicking [here](https://openwallet-foundation.github.io/digital-wallet-and-agent-overviews-sig/#/case-studies).
2 changes: 2 additions & 0 deletions viewer/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
EMAIL_ADDRESS=
EMAIL_PASSWORD=
LOCATION='http://localhost:4200/#'
EMAIL_STORE=true
NODE_ENV=development
1 change: 1 addition & 0 deletions viewer/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

.env
newsletter.html

# Compiled output
/dist
Expand Down
42 changes: 32 additions & 10 deletions viewer/scripts/newsletter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {config} from 'dotenv';
import fs from 'fs';
import handlebars from 'handlebars';
import { execSync } from 'child_process';
import {createTransport} from 'nodemailer'
import {createTransport, createTestAccount, getTestMessageUrl} from 'nodemailer'

config();

Expand Down Expand Up @@ -61,14 +61,33 @@ const preHeader = `We got ${caseStudies.length} new case ${caseStudies.length ==
const template = handlebars.compile(templateSource);
const html = template({ caseStudies, lastMonth: currentMonthName, subject, preHeader, walletCounter });

// Create a transporter
let transporter = createTransport({
service: 'gmail',
auth: {
user: process.env.EMAIL_ADDRESS,
pass: process.env.EMAIL_PASSWORD
if(process.env.EMAIL_STORE){
fs.writeFileSync(`./newsletter.html`, html);
}


function getMailConfig() {
if(process.env.NODE_ENV === 'production'){
return {
service: 'gmail',
auth: {
user: process.env.EMAIL_ADDRESS,
pass: process.env.EMAIL_PASSWORD
}
}
});
}
else {
return createTestAccount().then((account) => ({
host: account.smtp.host,
port: account.smtp.port,
secure: account.smtp.secure,
auth: {
user: account.user,
pass: account.pass,
}
}))
}
}

// Email options
let mailOptions = {
Expand All @@ -79,9 +98,12 @@ let mailOptions = {
};

// Send the email
transporter.sendMail(mailOptions, (error, info) => {
getMailConfig().then(config => createTransport(config).sendMail(mailOptions, (error, info) => {
if (error) {
return console.log(error);
}
console.log('Email sent: ' + info.response);
});
if(process.env.NODE_ENV !== 'production') {
console.log('Preview URL: %s', getTestMessageUrl(info));
}
}));
52 changes: 1 addition & 51 deletions viewer/src/app/case-studies/case-studies-data.ts
Original file line number Diff line number Diff line change
@@ -1,54 +1,4 @@

import { CaseStudy } from './types';

export const casestudyData: CaseStudy[] = [
{
"references": [
"BC Wallet",
"Altme"
],
"url": "https://example.com",
"headline": "Digital Citizenship in Canada",
"summary": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
"imageUrl": "https://www2.gov.bc.ca/images/discoverBC/PublicEngagements.png",
"hashTags": [
"Digital Identity",
"Digital Wallet",
"Digital Citizenship"
],
"createdAt": "2022-01-01",
"stakeholders": [
{
"name": "British Columbia",
"contact": "https://example.com"
},
{
"name": "Altme LLT",
"contact": "https://example.com"
}
],
"id": "citizenship"
},
{
"references": [
"BC Wallet",
"Altme"
],
"url": "https://example.com",
"headline": "Trees in Canada",
"summary": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
"imageUrl": "https://images.unsplash.com/photo-1491838592561-ab572ec2d2cb?q=80&w=2340&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"hashTags": [
"Digital Wallet",
"Nature"
],
"createdAt": "2022-01-01",
"stakeholders": [
{
"name": "Greenpeace",
"contact": "https://example.com"
}
],
"id": "trees"
}
];
export const casestudyData: CaseStudy[] = [];
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</th>
<td mat-cell *matCellDef="let element">
<div fxLayout="row" fxLayoutGap="8px">
@for(wallet of dependenciesService.getWallets(element.name); track
@for(wallet of dependenciesService.getWallets(element.id); track
wallet) {
<a [routerLink]="['/wallets', wallet.name]">{{ wallet.name }}</a>
}
Expand Down

0 comments on commit eb17c80

Please sign in to comment.