@genesislcap/blank-app-seed 3.29.1-prerelease.12 → 3.29.1-prerelease.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed-config",
3
3
  "description": "Genesis Blank App Seed Configuration",
4
- "version": "3.29.1-prerelease.12",
4
+ "version": "3.29.1-prerelease.14",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -44,7 +44,7 @@ const getPathByFramework = {
44
44
  },
45
45
  [FRAMEWORK_REACT_ALIAS]: {
46
46
  ...defaultPathGetters,
47
- index: (componentPath) => `${componentPath}/index.js`,
47
+ index: (componentPath) => `${componentPath}/index.jsx`,
48
48
  clientSrcPath: `../../client/src/pages`,
49
49
  route: (clientSrcPath, tile, routeName) =>
50
50
  `${clientSrcPath}/${routeName}/${tile.name}-${tile.componentType}`,
@@ -1,5 +1,5 @@
1
1
  {
2
- "UI": "14.203.1",
3
- "GSF": "8.3.0-beta4",
2
+ "UI": "14.206.1",
3
+ "GSF": "8.3.0-beta5",
4
4
  "Auth": "8.3.0-beta4"
5
5
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.29.1-prerelease.14](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.13...v3.29.1-prerelease.14) (2024-09-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) a9473e4
9
+
10
+ ## [3.29.1-prerelease.13](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.12...v3.29.1-prerelease.13) (2024-09-05)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#328) 626c48b
16
+
3
17
  ## [3.29.1-prerelease.12](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.11...v3.29.1-prerelease.12) (2024-09-03)
4
18
 
5
19
 
@@ -0,0 +1,3 @@
1
+ {
2
+ "VITE_API_HOST": "{{apiHost}}"
3
+ }
@@ -1,11 +1,11 @@
1
- import { useEffect } from 'react';
2
1
  import {
3
2
  unstable_HistoryRouter as HistoryRouter,
4
3
  Routes,
5
4
  Route,
6
5
  useLocation,
7
6
  } from 'react-router-dom';
8
- import { history } from './utils/history';
7
+ import { useEffect } from 'react';
8
+ import { history, setApiHost{{#if FDC3.channels.length}}, listenToChannel{{/if}} } from './utils';
9
9
  import LayoutWrapper from './layouts/LayoutWrapper';
10
10
  import { AUTH_PATH, NOT_PERMITTED_PATH, routeLayouts } from './config';
11
11
  import AuthGuard from './guards/AuthGuard';
@@ -17,9 +17,7 @@ import NotPermittedPage from './pages/NotPermittedPage/NotPermittedPage';
17
17
  {{#each routes}}
18
18
  import {{pascalCase this.name}} from './pages/{{kebabCase this.name}}/{{pascalCase this.name}}';
19
19
  {{/each}}
20
- {{#if FDC3.channels.length}}
21
- import { listenToChannel, onFDC3Ready } from './utils';
22
- {{/if}}
20
+
23
21
  // Genesis Components
24
22
  import './share/genesis-components';
25
23
 
@@ -79,6 +77,8 @@ const LayoutWithLocation = () => {
79
77
  };
80
78
 
81
79
  const App: React.FC = () => {
80
+ setApiHost();
81
+
82
82
  return (
83
83
  <AuthProvider>
84
84
  <HistoryRouter history={history}>
@@ -12,7 +12,7 @@ export const AUTH_PATH = 'auth';
12
12
  export const NOT_PERMITTED_PATH = 'not-permitted';
13
13
 
14
14
  export const API_DATA = {
15
- URL: '',
15
+ URL: import.meta.env.VITE_API_HOST,
16
16
  AUTH: {
17
17
  username: '', // provide login to a user in given environment
18
18
  password: '', // provide password to a user in given environment
@@ -1,3 +1,4 @@
1
1
  export * from './history';
2
2
  export * from './fdc3';
3
- export * from './permissions';
3
+ export * from './permissions';
4
+ export * from './setApiHost';
@@ -0,0 +1,9 @@
1
+ import { API_DATA } from '../config';
2
+
3
+ export const setApiHost = () => {
4
+ const { URL: apiHost } = API_DATA;
5
+
6
+ if (apiHost) {
7
+ sessionStorage.setItem('hostUrl', apiHost);
8
+ }
9
+ };
@@ -1,17 +1,29 @@
1
1
  import { fileURLToPath } from 'node:url';
2
- import { resolve } from 'path';
3
- import path from 'node:path';
2
+ import { resolve, dirname } from 'path';
4
3
  import { defineConfig } from 'vite';
4
+ import fs from 'fs';
5
5
  import react from '@vitejs/plugin-react';
6
6
  import visualizer from 'rollup-plugin-visualizer';
7
7
 
8
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
9
 
10
10
  export default defineConfig(({ mode }) => {
11
11
  const https = process.env.HTTPS === 'true';
12
12
  const open = !(process.env.NO_OPEN === 'true');
13
+ const jsonFilePath = resolve(process.cwd(), `env.${mode}.json`);
14
+ const envConfig = {};
15
+
16
+ if (fs.existsSync(jsonFilePath)) {
17
+ const jsonContent = fs.readFileSync(jsonFilePath, 'utf-8');
18
+ const parsedConfig = JSON.parse(jsonContent);
19
+
20
+ for (const key in parsedConfig) {
21
+ envConfig[`import.meta.env.${key}`] = JSON.stringify(parsedConfig[key]);
22
+ }
23
+ }
13
24
 
14
25
  const config = {
26
+ define: envConfig,
15
27
  server: {
16
28
  https,
17
29
  open,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed",
3
3
  "description": "Genesis Blank App Seed",
4
- "version": "3.29.1-prerelease.12",
4
+ "version": "3.29.1-prerelease.14",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"