Skip to content

Commit

Permalink
chore: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Mar 16, 2023
1 parent 9d23e80 commit 5945d48
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions ucan-invocation/constants.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import {
add as storeAdd,
remove as storeRemove
} from '@web3-storage/capabilities/store'
import {
add as uploadAdd,
remove as uploadRemove
} from '@web3-storage/capabilities/upload'

console.log('aaa', uploadAdd.can)
console.log('aaa', uploadRemove.can)

// UCAN protocol
export const STORE_ADD = 'store/add'
export const STORE_REMOVE = 'store/remove'
export const UPLOAD_ADD = 'upload/add'
export const UPLOAD_REMOVE = 'upload/remove'
export const STORE_ADD = storeAdd.can
export const STORE_REMOVE = storeRemove.can
export const UPLOAD_ADD = uploadAdd
export const UPLOAD_REMOVE = uploadRemove

// Admin Metrics
export const METRICS_NAMES = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import * as Sentry from '@sentry/serverless'

import { createSpaceMetricsTable } from '../tables/space-metrics.js'
import { parseKinesisEvent } from '../utils/parse-kinesis-event.js'
import { STORE_REMOVE } from '../constants.js'

Sentry.AWSLambda.init({
environment: process.env.SST_STAGE,
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1.0,
})

const STORE_REMOVE = 'store/remove'
const AWS_REGION = process.env.AWS_REGION || 'us-west-2'

/**
Expand Down
1 change: 1 addition & 0 deletions ucan-invocation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@aws-sdk/client-dynamodb": "^3.226.0",
"@aws-sdk/client-eventbridge": "^3.218.0",
"@sentry/serverless": "^7.22.0",
"@web3-storage/capabilities": "^3.2.0",
"uint8arrays": "^4.0.2"
},
"devDependencies": {
Expand Down

0 comments on commit 5945d48

Please sign in to comment.