Browse Source

A whole lot of cleaning going on

kb/add-usage-guide
Matthew Raymer 1 year ago
parent
commit
fd43da93a5
  1. 121
      sample.txt
  2. 2
      src/router/index.ts
  3. 4
      src/views/AccountViewView.vue
  4. 4
      src/views/ContactAmountsView.vue
  5. 14
      src/views/ContactGiftingView.vue
  6. 4
      src/views/ContactQRScanShowView.vue
  7. 6
      src/views/ContactsView.vue
  8. 8
      src/views/DiscoverView.vue
  9. 2
      src/views/HelpView.vue
  10. 6
      src/views/HomeView.vue
  11. 4
      src/views/IdentitySwitcherView.vue
  12. 2
      src/views/ImportAccountView.vue
  13. 2
      src/views/ImportDerivedAccountView.vue
  14. 2
      src/views/NewEditAccountView.vue
  15. 2
      src/views/NewEditProjectView.vue
  16. 4
      src/views/NewIdentifierView.vue
  17. 6
      src/views/ProjectViewView.vue
  18. 8
      src/views/ProjectsView.vue
  19. 2
      src/views/SeedBackupView.vue
  20. 2
      src/views/StartView.vue
  21. 11
      tsconfig.json

121
sample.txt

@ -0,0 +1,121 @@
> kickstart-for-time-pwa@0.1.0 build
> vue-cli-service build
All browser targets in the browserslist configuration have supported ES module.
Therefore we don't build two separate bundles for differential loading.
ERROR Failed to compile with 10 errors8:42:51 PM
error in src/views/ContactGiftingView.vue:164:13
TS18046: 'err' is of type 'unknown'.
162 | title: "Error",
163 | text:
> 164 | err.message ||
| ^^^
165 | "There was an error retrieving the latest sweet, sweet action.",
166 | },
167 | -1,
error in src/views/ContactGiftingView.vue:173:5
TS2571: Object is of type 'unknown'.
171 |
172 | openDialog(giver: GiverInputInfo) {
> 173 | this.$refs.customDialog.open(giver);
| ^^^^^^^^^^^^^^^^^^^^^^^
174 | }
175 |
176 | handleDialogResult(result: GiverOutputInfo) {
error in src/views/ContactGiftingView.vue:287:19
TS2339: Property 'error' does not exist on type 'CreateAndSubmitGiveResult'.
Property 'error' does not exist on type 'SuccessResult'.
285 |
286 | getGiveCreationErrorMessage(result: CreateAndSubmitGiveResult) {
> 287 | return result.error?.userMessage;
| ^^^^^
288 | }
289 |
290 | getGiveErrorMessage(error: any) {
error in src/views/DiscoverView.vue:347:17
TS18046: 'e' is of type 'unknown'.
345 | type: "danger",
346 | title: "Error",
> 347 | text: e.userMessage || "There was a problem retrieving projects.",
| ^
348 | },
349 | -1,
350 | );
error in src/views/DiscoverView.vue:425:17
TS18046: 'e' is of type 'unknown'.
423 | type: "danger",
424 | title: "Error",
> 425 | text: e.userMessage || "There was a problem retrieving projects.",
| ^
426 | },
427 | -1,
428 | );
error in src/views/DiscoverView.vue:461:15
TS7006: Parameter 'event' implicitly has an 'any' type.
459 | }
460 |
> 461 | setMapPoint(event) {
| ^^^^^
462 | if (this.isNewMarkerSet) {
463 | this.localLatDiff = Math.abs(event.latlng.lat - this.localCenterLat);
464 | this.localLongDiff = Math.abs(event.latlng.lng - this.localCenterLong);
error in src/views/HelpView.vue:182:26
TS2732: Cannot find module '../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
180 |
181 | <script lang="ts">
> 182 | import * as Package from "../../package.json";
| ^^^^^^^^^^^^^^^^^^^^
183 | import { Component, Vue } from "vue-facing-decorator";
184 | import QuickNav from "@/components/QuickNav.vue";
185 |
error in src/views/HomeView.vue:295:13
TS18046: 'err' is of type 'unknown'.
293 | title: "Error",
294 | text:
> 295 | err.userMessage ||
| ^^^
296 | "There was an error retrieving the latest sweet, sweet action.",
297 | },
298 | -1,
error in src/views/HomeView.vue:428:5
TS2571: Object is of type 'unknown'.
426 |
427 | openDialog(giver: GiverInputInfo) {
> 428 | this.$refs.customDialog.open(giver);
| ^^^^^^^^^^^^^^^^^^^^^^^
429 | }
430 |
431 | handleDialogResult(result: GiverOutputInfo) {
error in src/views/NewEditProjectView.vue:286:20
TS2339: Property '$router' does not exist on type 'Vue'.
284 | name: "project",
285 | };
> 286 | that.$router.push(route);
| ^^^^^^^
287 | },
288 | 2000,
289 | this,

2
src/router/index.ts

@ -5,7 +5,7 @@ import {
RouteLocationNormalized,
RouteRecordRaw,
} from "vue-router";
import { accountsDB } from "@/db";
import { accountsDB } from "@/db/index";
/**
*

4
src/views/AccountViewView.vue

@ -296,10 +296,10 @@ import { Component, Vue } from "vue-facing-decorator";
import { useClipboard } from "@vueuse/core";
import { AppString } from "@/constants/app";
import { db, accountsDB } from "@/db";
import { db, accountsDB } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
import QuickNav from "@/components/QuickNav";
import QuickNav from "@/components/QuickNav.vue";
import { IIdentifier } from "@veramo/core";
import { ErrorResponse, RateLimits } from "@/libs/endorserServer";

4
src/views/ContactAmountsView.vue

@ -97,7 +97,7 @@
import * as R from "ramda";
import { Component, Vue } from "vue-facing-decorator";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { Contact } from "@/db/tables/contacts";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken, SimpleSigner } from "@/libs/crypto";
@ -109,7 +109,7 @@ import {
} from "@/libs/endorserServer";
import * as didJwt from "did-jwt";
import { AxiosError } from "axios";
import QuickNav from "@/components/QuickNav";
import QuickNav from "@/components/QuickNav.vue";
import { IIdentifier } from "@veramo/core";
interface Notification {

14
src/views/ContactGiftingView.vue

@ -82,7 +82,7 @@
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import GiftedDialog from "@/components/GiftedDialog.vue";
import { db, accountsDB } from "@/db";
import { db, accountsDB } from "@/db/index";
import { AccountsSchema } from "@/db/tables/accounts";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
@ -93,8 +93,8 @@ import {
GiverOutputInfo,
} from "@/libs/endorserServer";
import { Contact } from "@/db/tables/contacts";
import QuickNav from "@/components/QuickNav";
import EntityIcon from "@/components/EntityIcon";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import { IIdentifier } from "@veramo/core";
import { RawAxiosRequestHeaders } from "axios";
@ -154,14 +154,14 @@ export default class HomeView extends Vue {
this.apiServer = settings?.apiServer || "";
this.activeDid = settings?.activeDid || "";
this.allContacts = await db.contacts.toArray();
} catch (err) {
} catch (err: unknown) {
this.$notify(
{
group: "alert",
type: "danger",
title: "Error",
text:
err.userMessage ||
err.message ||
"There was an error retrieving the latest sweet, sweet action.",
},
-1,
@ -280,11 +280,11 @@ export default class HomeView extends Vue {
// Helper functions for readability
isGiveCreationError(result: CreateAndSubmitGiveResult) {
return result.response?.status !== 201 || result.response?.data?.error;
return result.type == "error";
}
getGiveCreationErrorMessage(result: CreateAndSubmitGiveResult) {
return result.response?.data?.error?.message;
return result.error?.userMessage;
}
getGiveErrorMessage(error: any) {

4
src/views/ContactQRScanShowView.vue

@ -23,12 +23,12 @@
<script lang="ts">
import QRCodeVue3 from "qr-code-generator-vue3";
import { Component, Vue } from "vue-facing-decorator";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import * as R from "ramda";
import { SimpleSigner } from "@/libs/crypto";
import * as didJwt from "did-jwt";
import QuickNav from "@/components/QuickNav";
import QuickNav from "@/components/QuickNav.vue";
import { Account } from "@/db/tables/accounts";
// eslint-disable-next-line @typescript-eslint/no-var-requires

6
src/views/ContactsView.vue

@ -210,7 +210,7 @@ import { AxiosError } from "axios";
import * as didJwt from "did-jwt";
import * as R from "ramda";
import { IIdentifier } from "@veramo/core";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { Contact } from "@/db/tables/contacts";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken, SimpleSigner } from "@/libs/crypto";
@ -221,8 +221,8 @@ import {
SERVICE_ID,
} from "@/libs/endorserServer";
import { Component, Vue } from "vue-facing-decorator";
import QuickNav from "@/components/QuickNav";
import EntityIcon from "@/components/EntityIcon";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer;

8
src/views/DiscoverView.vue

@ -194,14 +194,14 @@ import {
LTileLayer,
} from "@vue-leaflet/vue-leaflet";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { Contact } from "@/db/tables/contacts";
import { BoundingBox, MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
import { didInfo, ProjectData } from "@/libs/endorserServer";
import QuickNav from "@/components/QuickNav";
import InfiniteScroll from "@/components/InfiniteScroll";
import EntityIcon from "@/components/EntityIcon";
import QuickNav from "@/components/QuickNav.vue";
import InfiniteScroll from "@/components/InfiniteScroll.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import { RawAxiosRequestHeaders } from "axios";
const DEFAULT_LAT_LONG_DIFF = 0.01;

2
src/views/HelpView.vue

@ -181,7 +181,7 @@
<script lang="ts">
import * as Package from "../../package.json";
import { Component, Vue } from "vue-facing-decorator";
import QuickNav from "@/components/QuickNav";
import QuickNav from "@/components/QuickNav.vue";
@Component({ components: { QuickNav } })
export default class Help extends Vue {

6
src/views/HomeView.vue

@ -202,7 +202,7 @@
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import GiftedDialog from "@/components/GiftedDialog.vue";
import { db, accountsDB } from "@/db";
import { db, accountsDB } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
import {
@ -213,8 +213,8 @@ import {
GiveServerRecord,
} from "@/libs/endorserServer";
import { Contact } from "@/db/tables/contacts";
import QuickNav from "@/components/QuickNav";
import EntityIcon from "@/components/EntityIcon";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import { IIdentifier } from "@veramo/core";
import { RawAxiosRequestHeaders } from "axios";

4
src/views/IdentitySwitcherView.vue

@ -67,10 +67,10 @@
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { AppString } from "@/constants/app";
import { db, accountsDB } from "@/db";
import { db, accountsDB } from "@/db/index";
import { AccountsSchema } from "@/db/tables/accounts";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import QuickNav from "@/components/QuickNav";
import QuickNav from "@/components/QuickNav.vue";
interface Notification {
group: string;

2
src/views/ImportAccountView.vue

@ -67,7 +67,7 @@ import {
deriveAddress,
newIdentifier,
} from "../libs/crypto";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
@Component({

2
src/views/ImportDerivedAccountView.vue

@ -73,7 +73,7 @@ import {
deriveAddress,
newIdentifier,
} from "../libs/crypto";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
@Component({

2
src/views/NewEditAccountView.vue

@ -49,7 +49,7 @@
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { db } from "@/db";
import { db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
@Component({

2
src/views/NewEditProjectView.vue

@ -107,7 +107,7 @@ import * as didJwt from "did-jwt";
import { Component, Vue } from "vue-facing-decorator";
import { LMap, LMarker, LTileLayer } from "@vue-leaflet/vue-leaflet";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken, SimpleSigner } from "@/libs/crypto";
import { useAppStore } from "@/store/app";

4
src/views/NewIdentifierView.vue

@ -40,10 +40,10 @@
<script lang="ts">
import "dexie-export-import";
import { Component, Vue } from "vue-facing-decorator";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import QuickNav from "@/components/QuickNav";
import QuickNav from "@/components/QuickNav.vue";
@Component({ components: { QuickNav } })
export default class AccountViewView extends Vue {

6
src/views/ProjectViewView.vue

@ -210,7 +210,7 @@ import { IIdentifier } from "@veramo/core";
import { Component, Vue } from "vue-facing-decorator";
import GiftedDialog from "@/components/GiftedDialog.vue";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { Contact } from "@/db/tables/contacts";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
@ -221,8 +221,8 @@ import {
GiverOutputInfo,
GiveServerRecord,
} from "@/libs/endorserServer";
import QuickNav from "@/components/QuickNav";
import EntityIcon from "@/components/EntityIcon";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
interface Notification {
group: string;

8
src/views/ProjectsView.vue

@ -72,13 +72,13 @@
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
import { IIdentifier } from "@veramo/core";
import InfiniteScroll from "@/components/InfiniteScroll";
import QuickNav from "@/components/QuickNav";
import EntityIcon from "@/components/EntityIcon";
import InfiniteScroll from "@/components/InfiniteScroll.vue";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import { ProjectData } from "@/libs/endorserServer";
interface Notification {

2
src/views/SeedBackupView.vue

@ -55,7 +55,7 @@
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { accountsDB, db } from "@/db";
import { accountsDB, db } from "@/db/index";
import * as R from "ramda";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import QuickNav from "@/components/QuickNav.vue";

2
src/views/StartView.vue

@ -37,7 +37,7 @@
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { accountsDB } from "@/db";
import { accountsDB } from "@/db/index";
@Component({
components: {},

11
tsconfig.json

@ -14,14 +14,17 @@
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"sourceMap": true,
"baseUrl": ".",
"baseUrl": "./src",
"types": [
"webpack-env"
],
"paths": {
"@/*": [
"src/*"
]
"@/components/*": ["components/*"],
"@/views/*": ["views/*"],
"@/db/*": ["db/*"],
"@/libs/*": ["libs/*"],
"@/constants/*": ["constants/*"],
"@/store/*": ["store/*"],
},
"lib": [
"esnext",

Loading…
Cancel
Save