@genesislcap/blank-app-seed 3.28.6 → 3.29.1-prerelease.1

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.28.6",
4
+ "version": "3.29.1-prerelease.1",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -3,6 +3,18 @@ const { writeFileSync } = require('node:fs');
3
3
  const { resolve } = require('node:path');
4
4
  const current = require('../versions.json');
5
5
 
6
+ const args = process.argv.slice(2);
7
+ const patchOnly = args.indexOf("--patch-only") >= 0;
8
+ const dryRun = args.indexOf("--dry-run") >= 0;
9
+
10
+ const VERSION_REGEX = /\d+$/;
11
+
12
+ const jfrogVersionMatcher = patchOnly ? current.GSF.replace(VERSION_REGEX, '*') : undefined;
13
+
14
+ const npmVersionMatcher = patchOnly ? current.UI.replace(VERSION_REGEX, 'x') : 'latest';
15
+
16
+ console.log('Running with: ', {patchOnly, dryRun, npmVersionMatcher, jfrogVersionMatcher})
17
+
6
18
  const run = (command) =>
7
19
  execSync(command, {
8
20
  stdio: ['pipe', 'pipe', 'ignore'],
@@ -20,12 +32,14 @@ const writeJSON = (json, path) => {
20
32
  }
21
33
  };
22
34
 
23
- const UI = run('npm info @genesislcap/foundation-ui@latest version');
35
+ const UI = run(`npm info @genesislcap/foundation-ui@${npmVersionMatcher} version`);
36
+
24
37
  const GSF = run(
25
- `jf rt s "libs-release-client/global/genesis/genesis-distribution/" --exclusions="*-RC*;*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*" | grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`,
38
+ `jf rt s "libs-release-client/global/genesis/genesis-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="*-RC*;*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*" | grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`,
26
39
  );
40
+
27
41
  const Auth = run(
28
- `jf rt s "libs-release-client/global/genesis/auth-distribution/" --exclusions="*-RC*;*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*" | grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`,
42
+ `jf rt s "libs-release-client/global/genesis/auth-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="*-RC*;*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*" | grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`,
29
43
  );
30
44
  const latest = { UI, GSF, Auth };
31
45
 
@@ -35,7 +49,11 @@ console.log('Latest:', latest);
35
49
  if (current.UI !== UI || current.GSF !== GSF || current.Auth !== Auth) {
36
50
  console.log('Newer versions available');
37
51
  const path = resolve(__dirname, '../versions.json');
38
- writeJSON(latest, path);
52
+ if (!dryRun) {
53
+ writeJSON(latest, path);
54
+ } else {
55
+ console.log('Dry run execution, versions will not be written.')
56
+ }
39
57
  } else {
40
58
  console.log('No newer versions available');
41
59
  }
@@ -0,0 +1,9 @@
1
+ import { ColDef } from '@ag-grid-community/core';
2
+ import { getNumberFormatter, getDateFormatter } from '@genesislcap/foundation-utils';
3
+ {{#if route.FDC3EventHandlersEnabled}}
4
+ import { sendEventOnChannel } from '../../../utils';
5
+ {{/if}}
6
+
7
+ {{#if tile.config.columns}}
8
+ export const columnDefs: ColDef[] = {{{ tile.config.columns }}}
9
+ {{/if}}
@@ -0,0 +1,8 @@
1
+ import { UiSchema } from '@genesislcap/foundation-forms';
2
+
3
+ {{#if tile.config.createFormUiSchema}}
4
+ export const createFormSchema: UiSchema = {{{ tile.config.createFormUiSchema }}}
5
+ {{/if}}
6
+ {{#if tile.config.uischema}}
7
+ export const createFormSchema: UiSchema = {{{ tile.config.uischema }}}
8
+ {{/if}}
@@ -0,0 +1,9 @@
1
+ import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
2
+ import { getNumberFormatter, getDateFormatter } from '@genesislcap/foundation-utils';
3
+ {{#if route.FDC3EventHandlersEnabled}}
4
+ import { sendEventOnChannel } from '../../../utils';
5
+ {{/if}}
6
+
7
+ {{#if tile.config.gridOptions}}
8
+ export const gridOptions: GridOptionsConfig = {{{ tile.config.gridOptions }}}
9
+ {{/if}}
@@ -0,0 +1,32 @@
1
+ import { Component, Input, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { getUser } from '@genesislcap/foundation-user';
4
+ import { ErrorMessageComponent } from '../../../components/error-message/error-message.component';
5
+ import { getViewUpdateRightComponent } from '../../../utils';
6
+ {{#if tile.config.gridOptions}}
7
+ import { GridOptionsConfig } from "@genesislcap/rapid-grid-pro";
8
+ {{/if}}
9
+ {{#if tile.config.createFormUiSchema}}
10
+ import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
11
+ {{/if}}
12
+ {{#if tile.config.uischema}}
13
+ import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
14
+ {{/if}}
15
+ {{#if tile.config.updateFormUiSchema}}
16
+ import { updateFormSchema } from './{{kebabCase tile.title}}.update.form.schema';
17
+ {{/if}}
18
+ {{#if tile.config.columns}}
19
+ import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
20
+ {{/if}}
21
+ {{#if tile.config.gridOptions}}
22
+ import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
23
+ {{/if}}
24
+ import './{{kebabCase tile.title}}.component.css';
25
+
26
+ const {{pascalCase tile.componentName}} = () => {
27
+ return (
28
+ {{> (lookup tile 'type') tile}}
29
+ );
30
+ };
31
+
32
+ export default {{pascalCase tile.componentName}};
@@ -0,0 +1 @@
1
+ export * from './{{kebabCase tile.title}}.component';
@@ -0,0 +1,3 @@
1
+ :host {
2
+ /* insert css styles here */
3
+ }
@@ -0,0 +1,5 @@
1
+ import { UiSchema } from '@genesislcap/foundation-forms';
2
+
3
+ {{#if tile.config.updateFormUiSchema}}
4
+ export const updateFormSchema: UiSchema = {{{ tile.config.updateFormUiSchema }}}
5
+ {{/if}}
@@ -73,13 +73,7 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
73
73
  );
74
74
  });
75
75
 
76
- // Remove condition after adding changes for react
77
- if (
78
- [FRAMEWORK_WEB_COMPONENTS_ALIAS, FRAMEWORK_ANGULAR_ALIAS].includes(
79
- framework,
80
- ) &&
81
- route?.tiles?.length
82
- ) {
76
+ if (route?.tiles?.length) {
83
77
  route.tiles.forEach((tile) => {
84
78
  generateTile(tile, route, { changeCase, writeFileWithData }, framework);
85
79
  });
@@ -3,6 +3,7 @@ const makeDirectory = require('./makeDirectory');
3
3
  const {
4
4
  FRAMEWORK_WEB_COMPONENTS_ALIAS,
5
5
  FRAMEWORK_ANGULAR_ALIAS,
6
+ FRAMEWORK_REACT_ALIAS,
6
7
  DIR_TEMPLATE_BY_FRAMEWORK,
7
8
  } = require('../static');
8
9
 
@@ -41,6 +42,16 @@ const getPathByFramework = {
41
42
  style: (componentPath, tile) =>
42
43
  `${componentPath}/${tile.name}.component.css`,
43
44
  },
45
+ [FRAMEWORK_REACT_ALIAS]: {
46
+ ...defaultPathGetters,
47
+ clientSrcPath: `../../client/src/pages`,
48
+ route: (clientSrcPath, tile, routeName) =>
49
+ `${clientSrcPath}/${routeName}/${tile.name}-${tile.componentType}`,
50
+ component: (componentPath, tile) =>
51
+ `${componentPath}/${tile.name}.component.jsx`,
52
+ style: (componentPath, tile) =>
53
+ `${componentPath}/${tile.name}.component.css`,
54
+ },
44
55
  };
45
56
 
46
57
  const getFilesToWrite = (tileData, routeName, path, sourceTemplateDir) => {
@@ -69,11 +80,6 @@ const getFilesToWrite = (tileData, routeName, path, sourceTemplateDir) => {
69
80
  target: getComponentTarget(routeDir, tileData),
70
81
  };
71
82
 
72
- const componentTemplateFile = {
73
- source: `${sourceTemplateDir}/component/component.template.hbs`,
74
- target: getTemplateTarget(routeDir, tileData),
75
- };
76
-
77
83
  const componentStylesFile = {
78
84
  source: `${sourceTemplateDir}/component/component.styles.hbs`,
79
85
  target: getStyleTarget(routeDir, tileData),
@@ -99,12 +105,14 @@ const getFilesToWrite = (tileData, routeName, path, sourceTemplateDir) => {
99
105
  target: getGridOptionsTarget(routeDir, tileData),
100
106
  };
101
107
 
102
- const filesToWrite = [
103
- componentIndexFile,
104
- componentFile,
105
- componentTemplateFile,
106
- componentStylesFile,
107
- ];
108
+ const filesToWrite = [componentIndexFile, componentFile, componentStylesFile];
109
+
110
+ if (getTemplateTarget) {
111
+ filesToWrite.push({
112
+ source: `${sourceTemplateDir}/component/component.template.hbs`,
113
+ target: getTemplateTarget(routeDir, tileData),
114
+ });
115
+ }
108
116
 
109
117
  switch (tileData.type) {
110
118
  case 'entity-manager':
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "UI": "14.200.0",
3
- "GSF": "8.2.3",
3
+ "GSF": "8.2.4",
4
4
  "Auth": "8.2.1"
5
5
  }
@@ -1,17 +1,35 @@
1
- name: Upgrade
1
+ name: Ω Workflow - Upgrade dependencies
2
2
 
3
3
  on:
4
- workflow_dispatch: # Manual
5
- schedule:
6
- - cron: '0 9 * * 1' # Mondays 9AM UTC
4
+ workflow_call:
5
+ inputs:
6
+ branch:
7
+ type: string
8
+ required: true
9
+ description: The branch that will be upgraded
10
+ patch-only:
11
+ type: boolean
12
+ required: false
13
+ description: Only update if there are newer patch versions
14
+ secrets:
15
+ GH_USER_TOKEN:
16
+ required: true
17
+ JFROG_LIBS_RELEASE_CLIENT_RO_USER:
18
+ required: true
19
+ JFROG_LIBS_RELEASE_CLIENT_RO_KEY:
20
+ required: true
7
21
 
8
22
  jobs:
9
23
  upgrade:
10
24
  runs-on: ubuntu-latest
11
25
  environment: deploy
26
+ env:
27
+ BRANCH: ${{ inputs.branch }}
28
+ PATCH_ARG: ${{ inputs.patch-only && '--patch-only' || '' }}
12
29
  steps:
13
30
  - uses: actions/checkout@v4
14
31
  with:
32
+ ref: ${{ inputs.branch }}
15
33
  token: ${{secrets.GH_USER_TOKEN}}
16
34
 
17
35
  - name: Set up Node
@@ -29,7 +47,7 @@ jobs:
29
47
  jfrog config add --artifactory-url="https://genesisglobal.jfrog.io/artifactory" --user="${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_USER }}" --password="${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_KEY }}" --interactive=false
30
48
 
31
49
  - name: Update to latest versions if available
32
- run: node .genx/scripts/update-versions
50
+ run: node .genx/scripts/update-versions ${PATCH_ARG}
33
51
 
34
52
  - name: Check for changes
35
53
  id: versions
@@ -39,10 +57,10 @@ jobs:
39
57
  if: steps.versions.outputs.CHANGED
40
58
  run: |
41
59
  git config --global user.email "ci@genesis.global" && git config --global user.name "CI"
42
- git checkout -b chore-dep-update
60
+ git checkout -b chore-dep-update-${BRANCH}
43
61
  git add --all
44
62
  git commit -m "fix: automated dependency version update [skip-ci] PSD-9"
45
- git push -f --set-upstream origin chore-dep-update
63
+ git push -f --set-upstream origin chore-dep-update-${BRANCH}
46
64
 
47
65
  - name: Raise PR
48
66
  if: steps.versions.outputs.CHANGED
@@ -64,8 +82,8 @@ jobs:
64
82
  repo = process.env.REPO,
65
83
  title = 'fix: automated dependency version update [skip-ci] PSD-9',
66
84
  body = 'Automated PR',
67
- head = 'chore-dep-update',
68
- base = 'main';
85
+ head = 'chore-dep-update-${{inputs.branch}}',
86
+ base = '${{inputs.branch}}';
69
87
 
70
88
  (async () => {
71
89
  const response = await octokit.request(
@@ -75,5 +93,3 @@ jobs:
75
93
  EOT
76
94
 
77
95
  node /tmp/create-pr/index
78
-
79
-
@@ -0,0 +1,19 @@
1
+ name: Upgrade main
2
+
3
+ on:
4
+ workflow_dispatch: # Manual
5
+ schedule:
6
+ - cron: '0 8 * * 1-5' # Weekdays 8AM UTC
7
+
8
+ concurrency: upgrade-main
9
+
10
+ jobs:
11
+ upgrade:
12
+ uses: ./.github/workflows/upgrade.yml
13
+ with:
14
+ branch: main
15
+ patch-only: true
16
+ secrets:
17
+ GH_USER_TOKEN: ${{ secrets.GH_USER_TOKEN }}
18
+ JFROG_LIBS_RELEASE_CLIENT_RO_USER: ${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_USER }}
19
+ JFROG_LIBS_RELEASE_CLIENT_RO_KEY: ${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_KEY }}
@@ -0,0 +1,18 @@
1
+ name: Upgrade prerelease
2
+
3
+ on:
4
+ workflow_dispatch: # Manual
5
+ schedule:
6
+ - cron: '0 8 * * 1-5' # Weekdays 8AM UTC
7
+
8
+ concurrency: upgrade-prerelease
9
+
10
+ jobs:
11
+ upgrade:
12
+ uses: ./.github/workflows/upgrade.yml
13
+ with:
14
+ branch: prerelease
15
+ secrets:
16
+ GH_USER_TOKEN: ${{ secrets.GH_USER_TOKEN }}
17
+ JFROG_LIBS_RELEASE_CLIENT_RO_USER: ${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_USER }}
18
+ JFROG_LIBS_RELEASE_CLIENT_RO_KEY: ${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_KEY }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.29.1-prerelease.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.0...v3.29.1-prerelease.1) (2024-08-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#314) 5070baa
9
+
10
+ ## [3.29.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.28.6...v3.29.0) (2024-08-13)
11
+
12
+
13
+ ### Features
14
+
15
+ * Implement the generated UI code structure proposal (react) - [FUI-2139](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2139) (#305) 6054353
16
+
3
17
  ## [3.28.6](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.28.5...v3.28.6) (2024-08-12)
4
18
 
5
19
 
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.28.6",
4
+ "version": "3.29.1-prerelease.1",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"