Skip to content

Commit

Permalink
Fix functions request deno build
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Dec 19, 2023
1 parent fd7ed50 commit c660b21
Show file tree
Hide file tree
Showing 28 changed files with 2,960 additions and 5,923 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ Configure the following prerequisite global dependency versions:

> 🚩 **Using NVM**: Install [NVM](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) and run `nvm install --lts && nvm alias default lts/*` to set the default version to the latest LTS. You will need to rerun this command whenever the latest LTS changes.
5. [AWS CLI (v2.x)](https://aws.amazon.com/cli).
5. [Deno (v1.39.x)](https://docs.deno.com/runtime/manual/getting_started/installation).

6. [AWS CLI (v2.x)](https://aws.amazon.com/cli).

> 🚩 **Consensus Networks team only**: Create an [AWS profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) named `consensus-networks-dev`.
Expand Down
10 changes: 5 additions & 5 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.3.8"
"vue": "^3.3.13"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.2.3",
"@vitejs/plugin-vue": "^4.5.0",
"@vitejs/plugin-vue": "^4.5.2",
"rollup-plugin-polyfill-node": "^0.13.0",
"typescript": "^5.2.2",
"vite": "^5.0.0",
"vue-tsc": "^1.8.22"
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vue-tsc": "^1.8.25"
}
}
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/node": "^17.0.38",
"@types/node": "^20.10.5",
"dotenv": "^16.3.1",
"esno": "0.17.0",
"markdown-it-mathjax3": "^4.3.2",
Expand Down
27 changes: 13 additions & 14 deletions apps/mvp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,23 @@
"d3": "^7.8.1",
"ethers": "^5.7.2",
"feather-icons": "^4.29.0",
"sass": "^1.69.1",
"sass": "^1.69.5",
"supertokens-web-js": "^0.5.0",
"util": "^0.12.5",
"vue": "^3.2.25",
"vue": "^3.3.13",
"vue-feather": "^2.0.0",
"vue-router": "^4.0.15",
"web3": "^1.8.1",
"xlsx": "^0.18.5"
"vue-router": "^4.2.5",
"web3": "^1.8.1"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.1.0",
"@vitejs/plugin-vue": "^4.2.3",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.27",
"rollup-plugin-polyfill-node": "^0.12.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6",
"vite": "^4.4.7",
"vue-tsc": "^1.8.7"
"@rollup/plugin-node-resolve": "^15.2.3",
"@vitejs/plugin-vue": "^4.5.2",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.32",
"rollup-plugin-polyfill-node": "^0.13.0",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vue-tsc": "^1.8.25"
}
}
69 changes: 0 additions & 69 deletions apps/mvp/src/composables/files.ts

This file was deleted.

64 changes: 0 additions & 64 deletions apps/mvp/src/pages/overview/components/BreakdownTable.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts" setup>
import { ref, watch, onMounted } from "vue"
import * as XLSX from "xlsx"
import VueFeather from "vue-feather"
import useUser from "@/composables/user"
import useFormat from "@/composables/format"
Expand Down Expand Up @@ -235,69 +234,6 @@ watch([searchInput,
filterData()
})
const convertJsonToCsv = (jsonData: any[]) => {
const separator = ","
const csvRows = []
if (!Array.isArray(jsonData)) {
return ""
}
if (jsonData.length === 0) {
return ""
}
const keys = Object.keys(jsonData[0])
// Add headers
csvRows.push(keys.join(separator))
// Convert JSON data to CSV rows
jsonData.forEach(obj => {
const values = keys.map(key => obj[key])
csvRows.push(values.join(separator))
})
return csvRows.join("\n")
}
const convertJsonToExcelBuffer = (jsonData: unknown[]) => {
const worksheet = XLSX.utils.json_to_sheet(jsonData)
const workbook = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
const excelBuffer = XLSX.write(workbook, { type: "array", bookType: "xlsx" })
return excelBuffer
}
const downloadFile = (content: any, filename: string, mimeType: any) => {
const blob = new Blob([content], { type: mimeType })
const url = URL.createObjectURL(blob)
const link = document.createElement("a")
link.href = url
link.download = filename
link.click()
// Cleanup
URL.revokeObjectURL(url)
}
const exportFile = () => {
const jsonData = checkedItems.value.length > 0 ? checkedItems.value : filteredData.value
const isMac = navigator.userAgent.indexOf("Mac") !== -1
const fileExtension = isMac ? "csv" : "xlsx"
if (fileExtension === "csv") {
const csvContent = convertJsonToCsv(jsonData)
downloadFile(csvContent, `${tableView.value}.csv`, "text/csv")
} else {
const excelBuffer = convertJsonToExcelBuffer(jsonData)
downloadFile(excelBuffer, `${tableView.value}.xlsx`, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
}
}
const removeItemFromCheckedList = (item: any) => {
const index = checkedItems.value.indexOf(item)
if (index > -1) {
Expand Down
20 changes: 10 additions & 10 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
"dependencies": {
"@heroicons/vue": "^1.0.6",
"iconoir": "^5.3.2",
"sass": "^1.69.1",
"sass": "^1.69.5",
"snarkdown": "^2.0.0",
"vue": "^3.2.25",
"vue-router": "^4.0.15"
"vue": "^3.3.13",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.27",
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6",
"vite": "^4.4.7",
"vue-tsc": "^1.8.8"
"@vitejs/plugin-vue": "^4.5.2",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.32",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vue-tsc": "^1.8.25"
}
}
2 changes: 1 addition & 1 deletion common/aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"@aws-sdk/credential-providers": "^3.204.0"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"@aws-cdk/aws-glue-alpha": "^2.33.0-alpha.0"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"ethers": "^5.7.2"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/ssv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"ethers": "^5.7.2"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
2 changes: 1 addition & 1 deletion common/uniswap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"ethers": "^5.7.2"
},
"devDependencies": {
"@types/node": "^17.0.38"
"@types/node": "^20.10.5"
}
}
4 changes: 1 addition & 3 deletions contracts/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.3.1",
"@types/localtunnel": "^2.0.1",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.45",
"@types/node": "^20.10.5",
"chai": "^4.3.6",
"esno": "^0.17.0",
"hardhat": "^2.12.3",
"hardhat-abi-exporter": "^2.10.1",
"hardhat-contract-sizer": "^2.10.0",
"localtunnel": "^2.0.2",
"mocha": "^10.0.0",
"solidity-docgen": "^0.6.0-beta.36",
"typechain": "^8.1.0"
Expand Down
Loading

0 comments on commit c660b21

Please sign in to comment.