Skip to content

Commit

Permalink
Merge branch 'main' into add-makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyashton authored Jul 22, 2024
2 parents da3b80a + 58dff38 commit b89e469
Show file tree
Hide file tree
Showing 19 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CCF Samples",
"image": "mcr.microsoft.com/ccf/app/dev:4.0.12-virtual",
"image": "ghcr.io/microsoft/ccf/app/dev/virtual:ccf-5.0.0",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ deploy-ms-idp: ## 🔐 Create an Identity Provider
@echo -e "\e[34m$@\e[0m" || true
cd deploy && pwsh ./New-IdentityProvider.ps1

generate-access-token: ## 🔐 Generate and access token
generate-access-token: ## 🔐 Generate an access token
@echo -e "\e[34m$@\e[0m" || true
./scripts/generate_access_token.sh

Expand Down
4 changes: 2 additions & 2 deletions auditable-logging-app/docker/ccf_app_js.virtual
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Build
FROM mcr.microsoft.com/ccf/app/dev:4.0.12-virtual as builder
FROM ghcr.io/microsoft/ccf/app/dev/virtual:ccf-5.0.0 as builder

# Run
FROM mcr.microsoft.com/ccf/app/run-js:4.0.12-virtual
FROM ghcr.io/microsoft/ccf/app/run-js/virtual:ccf-5.0.0

# Note: libjs_generic.virtual is not included in run-js container
COPY --from=builder /opt/ccf_virtual/lib/libjs_generic.virtual.so /usr/lib/ccf
Expand Down
2 changes: 1 addition & 1 deletion auditable-logging-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"node": ">=16"
},
"dependencies": {
"@microsoft/ccf-app": "^4.0.0",
"@microsoft/ccf-app": "^5.0.0",
"js-base64": "^3.5.2",
"jsrsasign": "^11.0.0",
"jsrsasign-util": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions banking-app/docker/ccf_app_js.enclave
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Build
FROM mcr.microsoft.com/ccf/app/dev:4.0.12-sgx as builder
FROM ghcr.io/microsoft/ccf/app/dev/sgx:ccf-5.0.0 as builder

# Run
FROM mcr.microsoft.com/ccf/app/run-js:4.0.12-sgx
FROM ghcr.io/microsoft/ccf/app/run-js/sgx:ccf-5.0.0

# copy configuration into image
COPY ./governance/constitution/*.js /app/
Expand Down
4 changes: 2 additions & 2 deletions banking-app/docker/ccf_app_js.virtual
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Build
FROM mcr.microsoft.com/ccf/app/dev:4.0.12-virtual as builder
FROM ghcr.io/microsoft/ccf/app/dev/virtual:ccf-5.0.0 as builder

# Run
FROM mcr.microsoft.com/ccf/app/run-js:4.0.12-virtual
FROM ghcr.io/microsoft/ccf/app/run-js/virtual:ccf-5.0.0

# Note: libjs_generic.virtual is not included in run-js container
COPY --from=builder /opt/ccf_virtual/lib/libjs_generic.virtual.so /usr/lib/ccf
Expand Down
2 changes: 1 addition & 1 deletion banking-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"node": ">=16"
},
"dependencies": {
"@microsoft/ccf-app": "^4.0.12",
"@microsoft/ccf-app": "^5.0.0",
"js-base64": "^3.5.2",
"jsrsasign": "^11.0.0",
"jsrsasign-util": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion data-reconciliation-app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ deploy-mccf: ## 🚀 Deploy Managed CCF
deploy-ms-idp: ## 🔐 Create an Identity Provider
@cd .. && $(MAKE) deploy-ms-idp

generate-access-token: ## 🔐 Generate and access token
generate-access-token: ## 🔐 Generate an access token
@cd .. && $(MAKE) generate-access-token

# Keep this at the bottom.
Expand Down
4 changes: 2 additions & 2 deletions data-reconciliation-app/docker/ccf_app_js.enclave
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Build
FROM mcr.microsoft.com/ccf/app/dev:4.0.12-sgx as builder
FROM ghcr.io/microsoft/ccf/app/dev/sgx:ccf-5.0.0 as builder

# Run
FROM mcr.microsoft.com/ccf/app/run-js:4.0.12-sgx
FROM ghcr.io/microsoft/ccf/app/run-js/sgx:ccf-5.0.0

# copy configuration into image
COPY ./governance/constitution/*.js /app/
Expand Down
4 changes: 2 additions & 2 deletions data-reconciliation-app/docker/ccf_app_js.virtual
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Build
FROM mcr.microsoft.com/ccf/app/dev:4.0.12-virtual as builder
FROM ghcr.io/microsoft/ccf/app/dev/virtual:ccf-5.0.0 as builder

# Run
FROM mcr.microsoft.com/ccf/app/run-js:4.0.12-virtual
FROM ghcr.io/microsoft/ccf/app/run-js/virtual:ccf-5.0.0

# Note: libjs_generic.virtual is not included in run-js container
COPY --from=builder /opt/ccf_virtual/lib/libjs_generic.virtual.so /usr/lib/ccf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When a user requests a reconciliation report via the `/report` endpoint, it is g

This decouples data ingestion from reconciliation reporting.

Reconciliation is implemented by querying CFF KV Store for all the keys this user has submitted. Any keys unknown to this user are not used in the reconciliation report. This ensures the user only sees a report with their submitted data.
Reconciliation is implemented by querying CCF KV Store for all the keys this user has submitted. Any keys unknown to this user are not used in the reconciliation report. This ensures the user only sees a report with their submitted data.

## Scenarios

Expand Down
2 changes: 1 addition & 1 deletion data-reconciliation-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=16"
},
"dependencies": {
"@microsoft/ccf-app": "^4.0.12",
"@microsoft/ccf-app": "^5.0.0",
"axios": "^1.2.4",
"crypto-js": "^4.2.0",
"inquirer": "9.1.4",
Expand Down
18 changes: 9 additions & 9 deletions data-reconciliation-app/src/repositories/kv-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,54 @@ import { ReconciledRecord } from "../models/reconciled-record";
import { ServiceResult } from "../utils/service-result";

/**
* Generic Key-Value implementation wrapping CFF TypedKvMap storage engine
* Generic Key-Value implementation wrapping CCF TypedKvMap storage engine
*/
export interface IRepository<T> {
/**
* Store {T} in CFF TypedKvMap storage by key
* Store {T} in CCF TypedKvMap storage by key
* @param {string} key
* @param {T} value
*/
set(key: string, value: T): ServiceResult<T>;

/**
* Retrive {T} in CFF TypedKvMap storage by key
* Retrive {T} in CCF TypedKvMap storage by key
* @param {string} key
* @param {T} value
*/
get(key: string): ServiceResult<T>;

/**
* Check if {T} exists in CFF TypedKvMap storage by key
* Check if {T} exists in CCF TypedKvMap storage by key
* @param {string} key
* @param {T} value
*/
has(key: string): ServiceResult<boolean>;

/**
* Retrieve all keys in CFF TypedKvMap storage
* Retrieve all keys in CCF TypedKvMap storage
*/
keys(): ServiceResult<string[]>;

/**
* Retrieve all values in CFF TypedKvMap storage
* Retrieve all values in CCF TypedKvMap storage
*/
values(): ServiceResult<T[]>;

/**
* Get size of CFF TypedKvMap storage
* Get size of CCF TypedKvMap storage
* @returns {ServiceResult<number>}
*/
get size(): ServiceResult<number>;

/**
* Iterate through CFF TypedKvMap storage by key
* Iterate through CCF TypedKvMap storage by key
* @param callback
*/
forEach(callback: (key: string, value: T) => void): ServiceResult<string>;

/**
* Clears CFF TypedKvMap storage
* Clears CCF TypedKvMap storage
*/
clear(): ServiceResult<void>;
}
Expand Down
4 changes: 2 additions & 2 deletions data-reconciliation-app/src/utils/api-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export enum StatusCode {
}

/**
* Status code for CFF network conventions
* Status code for CCF network conventions
*/
export interface CCFResponse {
statusCode: number;
Expand All @@ -19,7 +19,7 @@ export interface CCFResponse {
}

/**
* Utility class for wrapping the response with CFF network conventions
* Utility class for wrapping the response with CCF network conventions
*/
export class ApiResult {
/**
Expand Down
2 changes: 1 addition & 1 deletion decentralize-rbac-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=16"
},
"dependencies": {
"@microsoft/ccf-app": "^4.0.12",
"@microsoft/ccf-app": "^5.0.0",
"axios": "^1.2.4",
"crypto-js": "^3.1.9-1",
"inquirer": "9.1.4",
Expand Down
16 changes: 8 additions & 8 deletions decentralize-rbac-app/src/repositories/kv-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,50 +7,50 @@ import { ServiceResult } from "../utils/service-result";
*/
export interface IRepository<T> {
/**
* Store {T} in CFF TypedKvMap storage by key
* Store {T} in CCF TypedKvMap storage by key
* @param {string} key
* @param {T} value
*/
set(key: string, value: T): ServiceResult<T>;

/**
* Retrive {T} in CFF TypedKvMap storage by key
* Retrive {T} in CCF TypedKvMap storage by key
* @param {string} key
* @param {T} value
*/
get(key: string): ServiceResult<T>;

/**
* Check if {T} exists in CFF TypedKvMap storage by key
* Check if {T} exists in CCF TypedKvMap storage by key
* @param {string} key
* @param {T} value
*/
has(key: string): ServiceResult<boolean>;

/**
* Retrieve all keys in CFF TypedKvMap storage
* Retrieve all keys in CCF TypedKvMap storage
*/
keys(): ServiceResult<string[]>;

/**
* Retrieve all values in CFF TypedKvMap storage
* Retrieve all values in CCF TypedKvMap storage
*/
values(): ServiceResult<T[]>;

/**
* Get size of CFF TypedKvMap storage
* Get size of CCF TypedKvMap storage
* @returns {ServiceResult<number>}
*/
get size(): ServiceResult<number>;

/**
* Iterate through CFF TypedKvMap storage by key
* Iterate through CCF TypedKvMap storage by key
* @param callback
*/
forEach(callback: (key: string, value: T) => void): ServiceResult<string>;

/**
* Clears CFF TypedKvMap storage
* Clears CCF TypedKvMap storage
*/
clear(): ServiceResult<void>;

Expand Down
4 changes: 2 additions & 2 deletions decentralize-rbac-app/src/utils/api-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export enum StatusCode {
}

/**
* Status code for CFF network conventions
* Status code for CCF network conventions
*/
export interface CCFResponse {
statusCode: number;
Expand All @@ -19,7 +19,7 @@ export interface CCFResponse {
}

/**
* Utility class for wrapping the response with CFF network conventions
* Utility class for wrapping the response with CCF network conventions
*/
export class ApiResult {
/**
Expand Down
3 changes: 2 additions & 1 deletion express-debug/bundle_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as path from "path";

import yargs from "yargs";

console.info(process.argv);
const argv = yargs(process.argv.slice(2)).option("bundle", {
describe: "JSON bundle describing application to host",
type: "string",
Expand All @@ -28,7 +29,7 @@ export async function resolve(specifier, context, nextResolve) {
}
canonicalSpecifier = path.resolve(
path.dirname(canonicalSpecifier),
specifier,
specifier
);
canonicalSpecifier = path.relative(targetRoot, canonicalSpecifier);
specifier = canonicalSpecifier;
Expand Down
2 changes: 1 addition & 1 deletion express-debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"type": "module",
"dependencies": {
"@microsoft/ccf-app": "^4.0.12",
"@microsoft/ccf-app": "^5.0.0",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.0",
"pem": "^1.14.8",
Expand Down

0 comments on commit b89e469

Please sign in to comment.