Skip to content

Commit

Permalink
web, klicker: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
schneefux committed Dec 5, 2023
1 parent 4595f23 commit 0a75c12
Show file tree
Hide file tree
Showing 8 changed files with 3,909 additions and 6,274 deletions.
2 changes: 1 addition & 1 deletion klicker/fixtures/klicker.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import KlickerService from '../service'
import { KlickerService } from '../service'
import config from './klicker.cubes'
import en from './en.json'
import { provide, Ref, shallowRef } from 'vue'
Expand Down
12 changes: 6 additions & 6 deletions klicker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"license": "UNLICENSED",
"dependencies": {
"@cubejs-client/core": "^0.34.19",
"@feathersjs/authentication-client": "5.0.11",
"@feathersjs/feathers": "5.0.11",
"@feathersjs/rest-client": "5.0.11",
"@feathersjs/authentication-client": "5.0.12",
"@feathersjs/feathers": "5.0.12",
"@feathersjs/rest-client": "5.0.12",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@kangc/v-md-editor": "2.3.17",
Expand All @@ -47,7 +47,7 @@
"vega-embed": "^6.23.0",
"vega-lite": "^5.16.3",
"vue3-lazy-hydration": "^1.2.1",
"vue3-moveable": "^0.27.0",
"vue3-moveable": "^0.28.0",
"vuedraggable": "^4.1.0"
},
"devDependencies": {
Expand All @@ -57,15 +57,15 @@
"@storybook/addon-essentials": "^7.5.3",
"@storybook/addon-interactions": "^7.5.3",
"@storybook/jest": "^0.2.3",
"@storybook/test-runner": "^0.15.1",
"@storybook/test-runner": "^0.16.0",
"@storybook/testing-library": "^0.2.2",
"@storybook/vue3-vite": "^7.5.3",
"@types/d3-format": "^3.0.4",
"@types/node": "^20.9.1",
"@vitejs/plugin-vue": "^4.5.0",
"autoprefixer": "^10.4.16",
"babel-preset-typescript-vue3": "^2.0.17",
"chromatic": "^9.0.0",
"chromatic": "^10.0.0",
"jest": "^29.7.0",
"postcss": "^8.4.31",
"postcss-color-function": "^4.1.0",
Expand Down
22 changes: 7 additions & 15 deletions klicker/service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Config, VisualisationSpec, Cube, Dimension, Metric, MetaGridEntry, SliceValue, CubeQuery, ValueType, CubeResponse, CubeComparingQuery, CubeComparingResponse, MetaGridEntryDiff, ComparingMetaGridEntry, CubeQueryFilter, CubeComparingQueryFilter, SlicerSpec, StaticWidgetSpec, IKlickerService, CubeQueryConfiguration, MetricRendererSpec, DimensionRendererSpec, RouteQuery } from "./types"
import cubejs, { CubejsApi, Filter, ITransport, Query, ResultSet, TQueryOrderObject } from "@cubejs-client/core"
import { CubejsApi, Filter, ITransport, Query, ResultSet, TQueryOrderObject } from "@cubejs-client/core"
import * as d3format from "d3-format"
import { format as formatDate, parseISO } from "date-fns"
import defaultVisualisations from "./visualisations.js"
Expand Down Expand Up @@ -90,7 +90,7 @@ class HttpTransport implements ITransport<ResultSet> {
}
}

export default class KlickerService implements IKlickerService {
export class KlickerService implements IKlickerService {
private cubejsApi: CubejsApi
public visualisations: VisualisationSpec[] = defaultVisualisations
public staticWidgets: StaticWidgetSpec[] = defaultStaticWidgets
Expand All @@ -108,19 +108,11 @@ export default class KlickerService implements IKlickerService {
fetchImplementation: typeof fetch,
) {
const apiUrl = cubeUrl + '/cubejs-api/v1'
// FIXME ???
if (import.meta.env == undefined || import.meta.env.PROD) {
// @ts-ignore
this.cubejsApi = new CubejsApi('', {
apiUrl,
transport: new HttpTransport(apiUrl, fetchImplementation),
})
} else {
this.cubejsApi = cubejs('', {
apiUrl,
transport: new HttpTransport(apiUrl, fetchImplementation),
})
}
// @ts-ignore
this.cubejsApi = new CubejsApi('', {
apiUrl,
transport: new HttpTransport(apiUrl, fetchImplementation),
})
this.visualisations = defaultVisualisations.concat(visualisations)
this.staticWidgets = defaultStaticWidgets.concat(staticWidgets)
this.slicers = slicers
Expand Down
5,650 changes: 1,793 additions & 3,857 deletions klicker/yarn.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"typescript": "^5.2.2",
"undici": "^5.27.2",
"vike": "^0.4.146",
"vite": "^4.5.0",
"vite": "^5.0.5",
"vue": "^3.3.8",
"vue-gtag": "^2.0.1",
"vue-i18n": "^9.7.0",
Expand All @@ -75,10 +75,10 @@
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"ts-jest": "^29.1.1",
"unplugin-vue-components": "^0.25.2",
"unplugin-vue-components": "^0.26.0",
"vavite": "^3.0.0",
"vite-plugin-pages": "^0.31.0",
"vite-plugin-pwa": "^0.16.7",
"vite-plugin-pages": "^0.32.0",
"vite-plugin-pwa": "^0.17.3",
"vue-tsc": "^1.8.22"
}
}
6 changes: 2 additions & 4 deletions web/plugins/klicker.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ValueType } from "@schneefux/klicker/types"
import { formatMode, idToTag } from "../lib/util"
import KlickerService from '@schneefux/klicker/service.js'
import { KlickerService } from '@schneefux/klicker/service'
import config from '../lib/klicker.cubes'
import visualisations from '../lib/klicker.visualisations.conf'
import staticWidgets from '../lib/klicker.widgets.conf'
Expand All @@ -18,9 +18,7 @@ export interface EventMetadata {
metrics: Record<string, string|number>
}

export { BrawltimeKlickerService }

class BrawltimeKlickerService extends KlickerService {
export class BrawltimeKlickerService extends KlickerService {
constructor(cubeUrl: string, fetchImplementation: typeof fetch) {
super(
cubeUrl,
Expand Down
38 changes: 19 additions & 19 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ import { vavite } from 'vavite'

const config: UserConfig = {
buildSteps: [
{ name: "client" },
{
name: "server",
config: {
build: {
ssr: true,
rollupOptions: {
output: {
// We have to disable this for multiple entries
inlineDynamicImports: false,
},
},
},
},
},
],
{ name: "client" },
{
name: "server",
config: {
build: {
ssr: true,
rollupOptions: {
output: {
// We have to disable this for multiple entries
inlineDynamicImports: false,
},
},
},
},
},
],
plugins: [
vavite({
serverEntry: "/server/index.ts",
serveClientAssetsInDev: true,
}),
serverEntry: "/server/index.ts",
serveClientAssetsInDev: true,
}),
Components({
dirs: './components',
dts: true,
Expand Down
Loading

0 comments on commit 0a75c12

Please sign in to comment.