-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51cd9f6
commit ba4b4eb
Showing
79 changed files
with
4,442 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { QRCodeEntry, RewardNFT } from '@thxnetwork/api/models'; | ||
import PoolService from '@thxnetwork/api/services/PoolService'; | ||
import { PromiseParser } from '@thxnetwork/api/util'; | ||
|
||
export default async function main() { | ||
const chunkSize = 1000; | ||
|
||
let skip = 0; | ||
let entries = []; | ||
console.log('start while', entries.length); | ||
while (true) { | ||
entries = await QRCodeEntry.find().skip(skip).limit(chunkSize).exec(); | ||
if (!entries.length) break; | ||
|
||
const operations = await PromiseParser.parse( | ||
entries.map(async (entry) => { | ||
const reward = await RewardNFT.findById(entry.rewardId); | ||
const pool = await PoolService.getById(reward.poolId); | ||
const owner = await PoolService.findOwner(pool); | ||
return { | ||
updateOne: { | ||
filter: { _id: entry._id }, | ||
update: { | ||
$set: { | ||
accountId: owner._id, | ||
}, | ||
}, | ||
}, | ||
}; | ||
}), | ||
); | ||
|
||
console.log(operations.length); | ||
await QRCodeEntry.bulkWrite(operations); | ||
|
||
skip += chunkSize; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NODE_OPTIONS="--max-old-space-size=8192 --openssl-legacy-provider" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
VITE_API_URL="" | ||
VITE_AUTH_URL="" | ||
VITE_CLIENT_ID="" | ||
VITE_CLIENT_SECRET="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"extends": [ | ||
"../../.eslintrc.json", | ||
"plugin:vue/essential", | ||
"plugin:vue/vue3-recommended", | ||
"@vue/eslint-config-prettier", | ||
"@vue/eslint-config-typescript" | ||
], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.vue"], | ||
"rules": { | ||
// no-undef is not working with TS projects, ref: https://typescript-eslint.io/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors | ||
"no-undef": "off", | ||
"no-debugger": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@nx/enforce-module-boundaries": "off", | ||
"vue/require-explicit-emits": "off", | ||
"vue/require-default-prop": "off", | ||
"vue/require-v-for-key": "off", | ||
"vue/valid-v-for": "off", | ||
"vue/no-multiple-template-root": "off", | ||
"vue/return-in-computed-property": "off" | ||
} | ||
} | ||
] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* eslint-disable */ | ||
/* prettier-ignore */ | ||
// @ts-nocheck | ||
// Generated by unplugin-vue-components | ||
// Read more: https://github.com/vuejs/core/pull/3399 | ||
export {} | ||
|
||
declare module 'vue' { | ||
export interface GlobalComponents { | ||
Alert: typeof import('./src/components/ui/alert/Alert.vue')['default'] | ||
AlertDescription: typeof import('./src/components/ui/alert/AlertDescription.vue')['default'] | ||
AlertTitle: typeof import('./src/components/ui/alert/AlertTitle.vue')['default'] | ||
BAlert: typeof import('bootstrap-vue-next')['BAlert'] | ||
BaseCardCollectionMetadata: typeof import('./src/components/BaseCardCollectionMetadata.vue')['default'] | ||
BaseCardTableHeader: typeof import('./src/components/BaseCardTableHeader.vue')['default'] | ||
BaseFormCollectionMetadata: typeof import('./src/components/BaseFormCollectionMetadata.vue')['default'] | ||
BaseFormCollectionMetadataQRCodes: typeof import('./src/components/BaseFormCollectionMetadataQRCodes.vue')['default'] | ||
BaseFormGroup: typeof import('./src/components/BaseFormGroup.vue')['default'] | ||
BaseFormInputFile: typeof import('./src/components/BaseFormInputFile.vue')['default'] | ||
BaseHrOr: typeof import('./src/components/BaseHrOr.vue')['default'] | ||
BaseHrOrSeparator: typeof import('./src/components/BaseHrOrSeparator.vue')['default'] | ||
BaseIcon: typeof import('./src/components/BaseIcon.vue')['default'] | ||
BaseModal: typeof import('./src/components/BaseModal.vue')['default'] | ||
BaseModalNFTCreate: typeof import('./src/components/BaseModalNFTCreate.vue')['default'] | ||
BaseModalQRCode: typeof import('./src/components/BaseModalQRCode.vue')['default'] | ||
BaseOrSeparator: typeof import('./src/components/BaseOrSeparator.vue')['default'] | ||
BAvatar: typeof import('bootstrap-vue-next')['BAvatar'] | ||
BBrand: typeof import('bootstrap-vue-next')['BBrand'] | ||
BButton: typeof import('bootstrap-vue-next')['BButton'] | ||
BCard: typeof import('bootstrap-vue-next')['BCard'] | ||
BCol: typeof import('bootstrap-vue-next')['BCol'] | ||
BCollapse: typeof import('bootstrap-vue-next')['BCollapse'] | ||
BContainer: typeof import('bootstrap-vue-next')['BContainer'] | ||
BDropdown: typeof import('bootstrap-vue-next')['BDropdown'] | ||
BDropdownItem: typeof import('bootstrap-vue-next')['BDropdownItem'] | ||
BForm: typeof import('bootstrap-vue-next')['BForm'] | ||
BFormFile: typeof import('bootstrap-vue-next')['BFormFile'] | ||
BFormGroup: typeof import('bootstrap-vue-next')['BFormGroup'] | ||
BFormInput: typeof import('bootstrap-vue-next')['BFormInput'] | ||
BFormSelect: typeof import('bootstrap-vue-next')['BFormSelect'] | ||
BFormTextare: typeof import('bootstrap-vue-next')['BFormTextare'] | ||
BFormTextarea: typeof import('bootstrap-vue-next')['BFormTextarea'] | ||
BIcon: typeof import('bootstrap-vue-next')['BIcon'] | ||
BImg: typeof import('bootstrap-vue-next')['BImg'] | ||
BInputGroup: typeof import('bootstrap-vue-next')['BInputGroup'] | ||
BJumbotron: typeof import('bootstrap-vue-next')['BJumbotron'] | ||
BLink: typeof import('bootstrap-vue-next')['BLink'] | ||
BListGroup: typeof import('bootstrap-vue-next')['BListGroup'] | ||
BListGroupItem: typeof import('bootstrap-vue-next')['BListGroupItem'] | ||
BListGroupp: typeof import('bootstrap-vue-next')['BListGroupp'] | ||
BModal: typeof import('bootstrap-vue-next')['BModal'] | ||
BModel: typeof import('bootstrap-vue-next')['BModel'] | ||
BNavbar: typeof import('bootstrap-vue-next')['BNavbar'] | ||
BNavbarBrand: typeof import('bootstrap-vue-next')['BNavbarBrand'] | ||
BNavbarNav: typeof import('bootstrap-vue-next')['BNavbarNav'] | ||
BNavbarToggle: typeof import('bootstrap-vue-next')['BNavbarToggle'] | ||
BNavItem: typeof import('bootstrap-vue-next')['BNavItem'] | ||
BNavItemDropdown: typeof import('bootstrap-vue-next')['BNavItemDropdown'] | ||
BPagination: typeof import('bootstrap-vue-next')['BPagination'] | ||
BPlaceholder: typeof import('bootstrap-vue-next')['BPlaceholder'] | ||
BPlaceholderButton: typeof import('bootstrap-vue-next')['BPlaceholderButton'] | ||
BPlaceholderCard: typeof import('bootstrap-vue-next')['BPlaceholderCard'] | ||
BRow: typeof import('bootstrap-vue-next')['BRow'] | ||
BSpinner: typeof import('bootstrap-vue-next')['BSpinner'] | ||
BTable: typeof import('bootstrap-vue-next')['BTable'] | ||
Button: typeof import('./src/components/ui/button/Button.vue')['default'] | ||
copy: typeof import('./src/components/BaseFormGroup copy.vue')['default'] | ||
RouterLink: typeof import('vue-router')['RouterLink'] | ||
RouterView: typeof import('vue-router')['RouterView'] | ||
} | ||
export interface ComponentCustomProperties { | ||
vBModal: typeof import('bootstrap-vue-next')['vBModal'] | ||
vBTooltip: typeof import('bootstrap-vue-next')['vBTooltip'] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" /> | ||
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0"> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.ico" /> | ||
<title>TwinStory</title> | ||
</head> | ||
|
||
<body class="overflow-hidden"> | ||
<noscript> | ||
<strong>We're sorry but the app doesn't work properly without JavaScript enabled. Please enable it | ||
to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
<script src="https://kit.fontawesome.com/06b7267748.js" crossorigin="anonymous"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@thxnetwork/studio", | ||
"contributors": [ | ||
"Peter Polman <peter@thx.network>" | ||
], | ||
"license": "AGPL-3.0", | ||
"version": "1.0.0", | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "studio", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/studio/src", | ||
"projectType": "application", | ||
"tags": [], | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/vite:build", | ||
"options": { | ||
"outputPath": "dist/apps/studio" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"sourcemap": false, | ||
"minify": true | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nx/vite:dev-server", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "app:build", | ||
"port": 8085, | ||
"fs": { | ||
"allow": [".."] | ||
} | ||
}, | ||
"configurations": {} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"] | ||
}, | ||
"test": { | ||
"executor": "@nxext/vitest:vitest", | ||
"options": { | ||
"vitestConfig": "apps/app/vitest.config.ts" | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<div class="d-flex bg-primary h-100 overflow-auto flex-column"> | ||
<router-view v-slot="{ Component }"> | ||
<transition name="fade" mode="out-in"> | ||
<component :is="Component" /> | ||
</transition> | ||
</router-view> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
export default defineComponent({}); | ||
</script> |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
Oops, something went wrong.