Skip to content

Commit a78a9e7

Browse files
committed
Updated for csw-6.0.0, esw-1.0.2
1 parent c92f89e commit a78a9e7

22 files changed

Lines changed: 8539 additions & 10765 deletions

.eslintrc.json

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/dev.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313

14-
- uses: actions/setup-node@v1
14+
- uses: actions/setup-node@v4.2.0
1515
with:
16-
node-version: "16.x"
16+
node-version: "22.15.0"
1717
registry-url: "https://registry.npmjs.org"
18+
- run: npm install -g npm@10.9.2
1819

1920
- name: Build
2021
run: |

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: coursier/setup-action@v1.2.0-M2
12+
- uses: actions/checkout@v4
13+
- uses: coursier/setup-action@v1.2.0
1414
with:
15-
jvm: temurin:1.17
16-
apps: sbt sbtn
15+
jvm: temurin:1.21
16+
apps: sbt
1717
- uses: coursier/cache-action@v6.3
1818

1919
- uses: actions/setup-node@v1
2020
with:
21-
node-version: "16.x"
21+
node-version: "22.15.0"
2222
registry-url: "https://registry.npmjs.org"
23+
- run: npm install -g npm@10.9.2
2324

2425
- name: Get tag
2526
id: tag

build.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.tmt.sbt.docs.DocKeys._
22
import org.tmt.sbt.docs.Settings
33

4-
ThisBuild / scalaVersion := "2.13.8"
4+
ThisBuild / scalaVersion := "3.6.4"
55
ThisBuild / organizationName := "TMT Org"
66
ThisBuild / docsRepo := "https://github.com/tmtsoftware/tmtsoftware.github.io.git"
77
ThisBuild / docsParentDir := "esw-gateway-ui-example"
@@ -10,11 +10,11 @@ ThisBuild / gitCurrentRepo := "https://github.com/tmtsoftware/esw-gateway-ui-exa
1010
ThisBuild / version := sys.env.getOrElse("JITPACK_VERSION", "0.1.0-SNAPSHOT")
1111

1212
lazy val CSW_VERSION: Option[String] = sys.props.get("prod.publish").collect {
13-
case "true" => "4.0.1"
13+
case "true" => "6.0.0"
1414
}
1515

1616
lazy val ESW_VERSION: Option[String] = sys.props.get("prod.publish").collect {
17-
case "true" => "0.4.0"
17+
case "true" => "1.0.2"
1818
}
1919

2020
lazy val openSite =
@@ -47,8 +47,8 @@ lazy val docs = project
4747
}
4848
},
4949
paradoxProperties ++= Map(
50-
"esw-version" -> ESW_VERSION.getOrElse("0.5.0"),
51-
"csw-version" -> CSW_VERSION.getOrElse("5.1.0")
50+
"esw-version" -> ESW_VERSION.getOrElse("1.0.2"),
51+
"csw-version" -> CSW_VERSION.getOrElse("6.0.0")
5252
)
5353
)
5454

docs/src/main/flows/base-flow.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build the frontend created by the template. This will also help ensure you have
1717
### Compile the Frontend
1818

1919
The `sample/src` sub-folder is where your frontend application is located. It uses Typescript, React and node.
20-
Make sure node version `v16.0.0` or higher is installed in your machine. Let's compile our generated application.
20+
Make sure node version `v22.15.1` and npm 10.9.2 or higher are installed on your machine. Let's compile our generated application.
2121

2222
```bash
2323
cd sample
@@ -55,8 +55,8 @@ building your UI. ESW-TS documentation can be found [here](http://tmtsoftware.g
5555

5656
### Create login component
5757

58-
Use of the TMT Command Service via the UI Gateway requires authentication. The user must login via the TMT AAS login
59-
page, so we will add a login component from the ESW-TS library. Create a `Login.tsx` file in the `src/components` folder
58+
Use of the TMT Command Service via the UI Gateway requires authentication. The user must login via the TMT AAS login
59+
page, so we will add a login component from the ESW-TS library. Create a `Login.tsx` file in the `src/components` folder
6060
which will redirect the user to the TMT login page. Later we will use this `Login` Component in `Main.tsx`.
6161

6262
Copy the full snippet shown below & paste it in Login.tsx
@@ -73,13 +73,13 @@ Copy the full snippet shown below and replace the contents in `Main.tsx`.
7373
Typescript
7474
: @@snip [Main.tsx](../../../../src/components/Main.tsx) { #auth }
7575

76-
Here, you will see that there is a check to see if the user is authenticated, and if not, the login component will be
76+
Here, you will see that there is a check to see if the user is authenticated, and if not, the login component will be
7777
shown. If the user is authenticated, the normal functionality of the app is presented, which right now, is just the
7878
Hello World page.
7979

80-
In order for our main component to have access to authentication logic from ESW-TS, we need to add a
80+
In order for our main component to have access to authentication logic from ESW-TS, we need to add a
8181
[context provider](https://reactjs.org/docs/context.html) to the component. We do this when the component is constructed
82-
at the top level. We will wrap our Main application with `AuthContextProvider` from `esw-ts` in `App.tsx`
82+
at the top level. We will wrap our Main application with `AuthContextProvider` from `esw-ts` in `App.tsx`
8383
as shown below
8484

8585
Copy the snippet within the `return` statement from the following & update `App.tsx`.
@@ -93,7 +93,7 @@ After adding this section, run the following command to see the progress that we
9393
npm start
9494
```
9595

96-
You should now see `Loading...` on the browser screen.
96+
You should now see `Loading...` on the browser screen.
9797

9898
![login](../images/login.png)
9999

@@ -113,11 +113,11 @@ Start the UI Gateway Service using esw-services.
113113

114114
```bash
115115
cs install esw-services
116-
esw-services start -g
116+
esw-services start start-eng-ui-services
117117

118118
```
119119

120-
Now try reloading the front end in browser. If the page is still up, refresh the page. If you closed it, restart the
120+
Now try reloading the front end in browser. If the page is still up, refresh the page. If you closed it, restart the
121121
server using:
122122

123123
```bash

eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js'
4+
import tseslint from 'typescript-eslint'
5+
import globals from 'globals'
6+
import pluginReact from 'eslint-plugin-react'
7+
import { fixupPluginRules } from '@eslint/compat';
8+
import reactHookPlugin from "eslint-plugin-react-hooks";
9+
10+
export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, {
11+
...pluginReact.configs.flat.recommended,
12+
plugins: {
13+
'react-hooks': fixupPluginRules(reactHookPlugin),
14+
},
15+
rules: {
16+
'@typescript-eslint/no-unused-expressions': 'off',
17+
'@typescript-eslint/no-unused-vars': 'off'
18+
// '@typescript-eslint/no-unused-expressions': [
19+
// 'warn',
20+
// {
21+
// allowShortCircuit: true,
22+
// allowTernary: true,
23+
// allowTaggedTemplates: true
24+
// }
25+
// ],
26+
},
27+
settings: {
28+
react: {
29+
version: 'detect'
30+
}
31+
},
32+
languageOptions: {
33+
globals: globals.node
34+
}
35+
})

jitpack.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
jdk:
2-
- adoptopenjdk11
31
before_install:
2+
- curl -fLo coursier https://github.com/coursier/launchers/raw/8967c37b89afa12d037476b572176c2aa98f3bbc/coursier
3+
- chmod +x coursier
4+
- ./coursier java --jvm temurin:1.21
45
- export JITPACK_VERSION=$VERSION
5-
- wget https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.6.1/sbt-launch-1.6.1.jar
6+
- wget https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.10.6/sbt-launch-1.10.6.jar
67
install:
7-
java -Xms2048m -Xmx2048m -XX:ReservedCodeCacheSize=512m -jar sbt-launch-1.6.1.jar -Dsbt.log.noformat=true clean publishM2
8+
- eval $(./coursier java --jvm temurin:1.21 --env)
9+
- java -Xms2048m -Xmx2048m -XX:ReservedCodeCacheSize=512m -jar sbt-launch-1.10.6.jar -Dsbt.log.noformat=true clean publishM2

0 commit comments

Comments
 (0)