Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ project/hydra.sbt
.lib/
.bsp
dist/*
explore/heroku/static/
target/
lib_managed/
src_managed/
Expand Down
2 changes: 1 addition & 1 deletion .scala-steward.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
updates.fileExtensions = [".sbt",".sbt.shared",".sc",".scala",".scalafmt.conf",".yml","build.properties","ui/demo/vite.config.js","explore/vite.config.mts","observe/web/client/vite.config.js"]
updates.fileExtensions = [".sbt",".sbt.shared",".sc",".scala",".scalafmt.conf",".yml","build.properties","ui/demo/vite.config.mts","explore/vite.config.mts","observe/web/client/vite.config.mts"]
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ lazy val observe_web_client = project
if ((Process("npx" :: "vite" :: "build" :: Nil, baseDirectory.value) !) != 0)
throw new Exception("Error building web client")
else
baseDirectory.value / "deploy" // Must match directory declared in vite.config.js
baseDirectory.value / "deploy" // Must match directory declared in vite.config.mts
},
buildJsModule := buildJsModule.dependsOn(Compile / fullLinkJS).value
)
Expand Down
8 changes: 5 additions & 3 deletions explore/common/src/main/webapp/sass/explore-primereact.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
@use 'sass:meta';

@use '/lucuma-css/lucuma-ui-common.scss';

/* stylelint-disable no-invalid-position-at-import-rule */
.light-theme {
@import '/lucuma-css/light-theme';
@include meta.load-css('/lucuma-css/light-theme');
}

.dark-theme {
@import '/lucuma-css/dark-theme';
@include meta.load-css('/lucuma-css/dark-theme');
}

@import '/lucuma-css/lucuma-ui-prime';
@import url('/lucuma-css/lucuma-ui-prime.scss');
/* stylelint-enable no-invalid-position-at-import-rule */

.dark-theme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class StreamSpec extends munit.CatsEffectSuite:
TestControl.executeEmbed(program).assertEquals(4)
}

test("different behaviour to groupWithin") {
test("different behaviour to groupWithin".flaky) {
val a = stream.reduceSemigroupWithin(3.seconds)
val b = stream.groupWithin(Int.MaxValue, 3.seconds).map(_.combineAll)

Expand Down
3 changes: 2 additions & 1 deletion explore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
},
"devDependencies": {
"@ronilaukkarinen/stylelint-value-no-unknown-custom-properties": "4.0.1",
"@vitejs/plugin-react": "5.0.4",
"prettier": "3.6.2",
"sass": "1.93.2",
"sass-migrator": "2.4.2",
"stylelint": "15.11.0",
"stylelint-color-format": "1.1.0",
"stylelint-config-standard-scss": "11.1.0",
"unplugin-fonts": "1.4.0",
"vite": "4.5.14",
"vite": "7.1.10",
"vite-plugin-env-compatible": "2.0.1",
"vite-plugin-mkcert": "1.17.9",
"vite-plugin-pwa": "1.1.0"
Expand Down
5 changes: 3 additions & 2 deletions explore/vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import react from '@vitejs/plugin-react';
import type { PathLike } from 'fs';
import fs from 'fs/promises';
import { dirname } from 'node:path';
Expand All @@ -6,10 +7,10 @@ import path from 'path';
import type { PluginCreator } from 'postcss';
import Unfonts from 'unplugin-fonts/vite';
import { defineConfig, UserConfig } from 'vite';
import env from 'vite-plugin-env-compatible';
import mkcert from 'vite-plugin-mkcert';
import { VitePWA } from 'vite-plugin-pwa';
import type { RuntimeCaching } from 'workbox-build';
import env from 'vite-plugin-env-compatible';

const scalaVersion = '3.7.3';

Expand Down Expand Up @@ -180,7 +181,6 @@ export default defineConfig(async ({ mode }) => {
],
},
// https://vitejs.dev/guide/performance.html#warm-up-frequently-used-files
// @ts-expect-error doesn't exist in type definition, but it's in the docs
warmup: {
clientFiles: [
path.resolve(sjs, '*.js'),
Expand Down Expand Up @@ -262,6 +262,7 @@ export default defineConfig(async ({ mode }) => {
],
},
}),
react()
],
} satisfies UserConfig;
});
15 changes: 6 additions & 9 deletions navigate/epics/src/main/scala/navigate/epics/EpicsService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ object EpicsService {
def getChannel[T](
name: String
)(using tjt: ToJavaType[T]): Resource[F, Channel[F, T]] = Resource
.make(
Async[F]
.delay(ctx.createChannel[tjt.javaType](name, tjt.clazz))
)(c => Async[F].delay(c.close()))
.fromAutoCloseable(Async[F].delay(ctx.createChannel[tjt.javaType](name, tjt.clazz)))
.map(x => Channel.build(x)(using Async[F], tjt.convert))

def getChannel[T](top: NonEmptyString, name: String)(using
Expand All @@ -55,15 +52,15 @@ object EpicsService {
serverPort: Option[Int],
maxArrayBytes: Option[Int]
) {
def withAddressList(l: List[InetAddress]): Builder = this.copy(addrList = l.some)
def withAutoAddrList(enabled: Boolean): Builder = this.copy(autoAddrList = enabled.some)
def withAddressList(l: List[InetAddress]): Builder = this.copy(addrList = l.some)
def withAutoAddrList(enabled: Boolean): Builder = this.copy(autoAddrList = enabled.some)
def withConnectionTimeout(timeout: FiniteDuration): Builder =
this.copy(connectionTimeout = timeout.some)
def withEnabledRepeater(enabled: Boolean): Builder =
this.copy(enableRepeater = enabled.some)
def withRepeaterPort(port: Int): Builder = this.copy(repeaterPort = port.some)
def withServerPort(port: Int): Builder = this.copy(serverPort = port.some)
def withMaxArrayBytes(limit: Int): Builder = this.copy(maxArrayBytes = limit.some)
def withRepeaterPort(port: Int): Builder = this.copy(repeaterPort = port.some)
def withServerPort(port: Int): Builder = this.copy(serverPort = port.some)
def withMaxArrayBytes(limit: Int): Builder = this.copy(maxArrayBytes = limit.some)

def build[F[_]: Async]: Resource[F, EpicsService[F]] = Resource
.eval {
Expand Down
3 changes: 2 additions & 1 deletion observe/web/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
"ua-parser-js": "2.0.6"
},
"devDependencies": {
"@vitejs/plugin-react": "5.0.4",
"prettier": "3.6.2",
"process": "0.11.10",
"sass": "1.93.2",
"unplugin-fonts": "1.4.0",
"vite": "6.3.7",
"vite": "7.1.10",
"vite-plugin-mkcert": "1.17.9"
},
"scripts": {
Expand Down
10 changes: 6 additions & 4 deletions observe/web/client/src/main/webapp/styles/prime.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
@use 'sass:meta';

// @use '/lucuma-css/lucuma-ui-common.scss';

// Customizations and additions to prime-react
// .pl- prefix = "Prime Lucuma": Our additions to prime-react

.light-theme {
@import "/lucuma-css/light-theme";
@include meta.load-css("/lucuma-css/light-theme");
}

.dark-theme {
@import "/lucuma-css/dark-theme";
@include meta.load-css("/lucuma-css/dark-theme");
}

@import "/lucuma-css/lucuma-ui-prime.scss";
@import "/lucuma-css/lucuma-ui-table.scss";
@import url("/lucuma-css/lucuma-ui-prime.scss");
@import url("/lucuma-css/lucuma-ui-table.scss");

body,
body .p-component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import fs from 'fs/promises';
import type { PluginCreator } from 'postcss';
import Unfonts from 'unplugin-fonts/vite';
import { defineConfig, UserConfig } from 'vite';
import mkcert from 'vite-plugin-mkcert';
import Unfonts from 'unplugin-fonts/vite'

const fixCssRoot = (opts = {}) => {
const fixCssRoot: PluginCreator<void> = () => {
return {
postcssPlugin: 'postcss-fix-nested-root',
Once(root, { result }) {
Once(root) {
root.walkRules((rule) => {
if (rule.selector.includes(' :root')) {
rule.selector = rule.selector.replace(' :root', '');
Expand All @@ -24,25 +25,10 @@ fixCssRoot.postcss = true;

const fontImport = Unfonts({
fontsource: {
families: [
'Lato'
],
families: ['Lato'],
},
});

/**
* Check if a file or directory exists
* @param {import('fs').PathLike} path
* @returns
*/
const pathExists = async (path) => {
try {
await fs.access(path, fs.constants.F_OK);
return true;
} catch (err) {
return false;
}
};

// https://vitejs.dev/config/
export default defineConfig(async ({ mode }) => {
Expand Down Expand Up @@ -82,7 +68,7 @@ export default defineConfig(async ({ mode }) => {
},
{
find: '@resources',
replacement: resourceDir
replacement: resourceDir,
},
{
find: '/lucuma-css',
Expand All @@ -98,23 +84,22 @@ export default defineConfig(async ({ mode }) => {
},
postcss: {
plugins: [fixCssRoot],
}
},
},
server: {
strictPort: true,
fsServe: {
fs: {
strict: true,
},
host: '0.0.0.0',
port: 8081,
https: true,
proxy: {
'/api': {
target: 'https://127.0.0.1:7070',
changeOrigin: true,
secure: false,
ws: true
}
ws: true,
},
},
watch: {
ignored: [
Expand All @@ -125,18 +110,15 @@ export default defineConfig(async ({ mode }) => {
_path.includes('/classes') ||
_path.endsWith('.tmp');
return sjsIgnored;
}
]
}
},
],
},
},
build: {
emptyOutDir: true,
chunkSizeWarningLimit: 20000,
outDir: path.resolve(__dirname, 'deploy'),
},
plugins: [
mkcert({ hosts: ['localhost', 'local.lucuma.xyz'] }),
fontImport
],
};
plugins: [mkcert({ hosts: ['localhost', 'local.lucuma.xyz'] }), fontImport, react()],
} satisfies UserConfig;
});
Loading
Loading