Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test typescript ci change #1599

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
bun-version: 1.1.45

- name: Run bun
run: |
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"vite-plugin-vuetify": "^1.0.0-alpha.16",
"vitest": "^0.20.3",
"vue-cli-plugin-vuetify": "~2.4.8",
"vue-tsc": "2.0.10",
"vue-tsc": "2.2.0",
"vuetify-loader": "^2.0.0-alpha.0"
},
"prettier": {
Expand Down
11 changes: 6 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
:variant="simplifiedMainMenu ? 'uncontained' : 'round'"
:tooltip="simplifiedMainMenu ? 'Flight' : undefined"
:width="buttonSize"
:selected="$route.name === 'Flight'"
:selected="route.name === 'Flight'"
@click="
() => {
$router.push('/')
router.push('/')
closeMainMenu()
}
"
Expand All @@ -94,10 +94,10 @@
:variant="simplifiedMainMenu ? 'uncontained' : 'round'"
:tooltip="simplifiedMainMenu ? 'Mission Planning' : undefined"
:width="buttonSize"
:selected="$route.name === 'Mission planning'"
:selected="route.name === 'Mission planning'"
@click="
() => {
$router.push('/mission-planning')
router.push('/mission-planning')
closeMainMenu()
}
"
Expand Down Expand Up @@ -323,7 +323,7 @@
<script setup lang="ts">
import { onClickOutside, useDebounceFn, useFullscreen, useStorage, useWindowSize } from '@vueuse/core'
import { computed, markRaw, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'

import GlassModal from '@/components/GlassModal.vue'
import Tutorial from '@/components/Tutorial.vue'
Expand Down Expand Up @@ -658,6 +658,7 @@ const openAboutDialog = (): void => {
}

const route = useRoute()
const router = useRouter()
const routerSection = ref()

// Full screen toggling
Expand Down
4 changes: 2 additions & 2 deletions src/components/VideoPlayerStatsForNerds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const canvasRef = ref(null)
const framerateData = ref([])
const bitrateData = ref([])
const packetLostData = ref([])
let animationFrameId = null
let intervalId = null
let animationFrameId: ReturnType<typeof requestAnimationFrame> | null = null
let intervalId: ReturnType<typeof setInterval> | null = null
let bitrate = 0
// cumulative values
let packetsLost = 0
Expand Down
9 changes: 8 additions & 1 deletion src/libs/blueos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ import ky, { HTTPError } from 'ky'
import { useMainVehicleStore } from '@/stores/mainVehicle'
import { ExternalWidgetSetupInfo } from '@/types/widgets'

type BagOfHoldingError = {
/**
* The error message
*/
detail: string
}

/**
* Cockpits extra json format. Taken from extensions in BlueOS and (eventually) other places
*/
Expand Down Expand Up @@ -34,7 +41,7 @@ export const getBagOfHoldingFromVehicle = async (
const options = { timeout: defaultTimeout, retry: 0 }
return await ky.get(`http://${vehicleAddress}/bag/v1.0/get/${bagPath}`, options).json()
} catch (error) {
const errorBody = await (error as HTTPError).response.json()
const errorBody = (await (error as HTTPError).response.json()) as BagOfHoldingError
if (errorBody.detail === 'Invalid path') {
const noPathError = new Error(`No data available in BlueOS storage for path '${bagPath}'.`)
noPathError.name = NoPathInBlueOsErrorName
Expand Down
14 changes: 14 additions & 0 deletions src/libs/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ declare global {
* Extended Window interface with custom dedicated dedicated APIs.
*/
interface Window {
/**
* Extended Performance interface with memory attribute
*/
performance: {
/**
* The memory attribute of the Performance interface returns a MemoryInfo object that provides information about memory usage, including JS heap size limit, total and available JS heap size, and used JS heap size.
*/
memory: {
/**
* The used JS heap size in bytes.
*/
usedJSHeapSize: number
}
}
/**
* Exposed Cockpit APIs
* E.g. data-lake, cockpit actions, etc.
Expand Down
6 changes: 6 additions & 0 deletions src/types/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ declare module 'vue-draggable-resizable' {
const component: DefineComponent<Record<string, never>>
export default component
}

declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<unknown, unknown, any>
export default component
}
Loading