@genesislcap/blank-app-seed 3.30.0-prerelease.26 → 3.30.0-prerelease.28

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.
@@ -7,6 +7,7 @@ const {
7
7
  getCombinedCsvData,
8
8
  registerPartials,
9
9
  validateRoute,
10
+ deleteGradleWrappers,
10
11
  } = require('./utils');
11
12
 
12
13
  /**
@@ -48,4 +49,8 @@ module.exports = async (data, utils) => {
48
49
  .forEach((entity) => {
49
50
  generateCsv(entity, utils);
50
51
  });
52
+
53
+ if (data.excludeGradleWrapper) {
54
+ deleteGradleWrappers();
55
+ }
51
56
  };
@@ -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.30.0-prerelease.26",
4
+ "version": "3.30.0-prerelease.28",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -11,6 +11,7 @@ module.exports = async (inquirer, prevAns = {}) => {
11
11
  applicationVersion = prevAns.applicationVersion,
12
12
  enableDeployPlugin = prevAns.enableDeployPlugin,
13
13
  csv = prevAns.csv,
14
+ excludeGradleWrapper = prevAns.excludeGradleWrapper,
14
15
  } = await inquirer.prompt([
15
16
  {
16
17
  name: 'description',
@@ -41,6 +42,13 @@ module.exports = async (inquirer, prevAns = {}) => {
41
42
  when: prevAns.enableDeployPlugin === undefined,
42
43
  default: prevAns.enableDeployPlugin || false,
43
44
  },
45
+ {
46
+ name: 'excludeGradleWrapper',
47
+ type: 'confirm',
48
+ message: TEXTS.MESSAGE_EXCLUDE_GRADLE_WRAPPER,
49
+ when: prevAns.excludeGradleWrapper === undefined,
50
+ default: prevAns.excludeGradleWrapper || false,
51
+ },
44
52
  {
45
53
  name: 'csv',
46
54
  type: 'input',
@@ -56,5 +64,6 @@ module.exports = async (inquirer, prevAns = {}) => {
56
64
  applicationVersion,
57
65
  enableDeployPlugin,
58
66
  csv: parsecsv(csv),
67
+ excludeGradleWrapper,
59
68
  };
60
69
  };
package/.genx/prompts.js CHANGED
@@ -17,8 +17,14 @@ module.exports = async (inquirer, prevAns = {}) => {
17
17
  License: ${license}`);
18
18
 
19
19
  const { apiHost, enableSSO } = await apiPrompts(inquirer, prevAns);
20
- const { description, groupId, applicationVersion, enableDeployPlugin, csv } =
21
- await genesisServerPrompts(inquirer, prevAns);
20
+ const {
21
+ description,
22
+ groupId,
23
+ applicationVersion,
24
+ enableDeployPlugin,
25
+ csv,
26
+ excludeGradleWrapper,
27
+ } = await genesisServerPrompts(inquirer, prevAns);
22
28
  const { routes, ui, framework } = await uiPrompts(inquirer, prevAns);
23
29
 
24
30
  return {
@@ -32,5 +38,6 @@ module.exports = async (inquirer, prevAns = {}) => {
32
38
  csv,
33
39
  ui,
34
40
  framework,
41
+ excludeGradleWrapper,
35
42
  };
36
43
  };
package/.genx/static.js CHANGED
@@ -73,6 +73,7 @@ const TEXTS = {
73
73
  MESSAGE_SERVER_GROUP_ID: 'Group Id',
74
74
  MESSAGE_SERVER_APPLICATION_VERSION: 'Application Version',
75
75
  MESSAGE_SERVER_DEPLOY_PLUGIN: 'Enable deploy plugin?',
76
+ MESSAGE_EXCLUDE_GRADLE_WRAPPER: 'Exclude Gradle wrapper?',
76
77
  MESSAGE_SERVER_CSV:
77
78
  'Generate empty CSV for entities? (config in JSON format)',
78
79
  MESSAGE_UI_ROTUES: 'Pages config in JSON format',
@@ -1,4 +1,5 @@
1
1
  import './{{pascalCase route.name}}.css';
2
+ import { persistLayout } from '../../utils';
2
3
  {{#each route.tiles}}
3
4
  import { {{pascalCase this.componentName}} } from './{{pascalCase this.title}}{{pascalCase this.componentType}}';
4
5
  {{/each}}
@@ -7,7 +8,7 @@ const {{pascalCase route.name}} = () => {
7
8
  return (
8
9
  <section className="{{kebabCase route.name}}-page">
9
10
  {{#if route.tiles}}
10
- <rapid-layout auto-save-key={process.env.NODE_ENV === 'production' ? "{{route.layoutKey}}" : null}>
11
+ <rapid-layout auto-save-key={persistLayout('{{route.layoutKey}}')}>
11
12
  {{> (lookup ./route 'layoutType') }}
12
13
  </rapid-layout>
13
14
  {{else}}
@@ -1,5 +1,5 @@
1
- import { isDev } from '@genesislcap/foundation-utils';
2
1
  import { html } from '@genesislcap/web-core';
2
+ import { persistLayout } from '../../utils';
3
3
  import type { {{pascalCase route.name}} } from './{{kebabCase route.name}}';
4
4
  {{#each route.tiles}}
5
5
  import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{this.componentType}}';
@@ -11,7 +11,7 @@ import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{
11
11
 
12
12
  export const {{pascalCase route.name}}Template = html<{{pascalCase route.name}}>`
13
13
  {{#if route.tiles}}
14
- <rapid-layout auto-save-key="${() => (isDev() ? null : '{{route.layoutKey}}')}">
14
+ <rapid-layout auto-save-key="${() => persistLayout('{{route.layoutKey}}')}">
15
15
  {{> (lookup ./route 'layoutType') }}
16
16
  </rapid-layout>
17
17
  {{else}}
@@ -0,0 +1,12 @@
1
+ const { rmdirSync } = require('node:fs');
2
+ const { resolve } = require('node:path');
3
+
4
+ const deleteGradleWrappers = (
5
+ paths = ['../../gradle', '../../server/gradle'],
6
+ ) => {
7
+ paths.forEach((p) => {
8
+ rmdirSync(resolve(__dirname, p), { recursive: true, force: true });
9
+ });
10
+ };
11
+
12
+ module.exports = deleteGradleWrappers;
@@ -1,4 +1,5 @@
1
1
  const excludeFrameworks = require('./excludeFrameworks');
2
+ const deleteGradleWrappers = require('./deleteGradleWrappers');
2
3
  const formatRouteData = require('./formatRouteData');
3
4
  const generateRoute = require('./generateRoute');
4
5
  const generateCsv = require('./generateCsv');
@@ -11,6 +12,7 @@ const validateRoute = require('./validateRoute');
11
12
  const validateFrameworkAlias = require('./validateFrameworkAlias');
12
13
 
13
14
  module.exports = {
15
+ deleteGradleWrappers,
14
16
  excludeFrameworks,
15
17
  formatRouteData,
16
18
  generateRoute,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.30.0-prerelease.28](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.30.0-prerelease.27...v3.30.0-prerelease.28) (2024-10-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * allow to simply control layout persistence in dev [FUI-2211](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2211) / GENC-871 (#363) c6fd6f5
9
+
10
+ ## [3.30.0-prerelease.27](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.30.0-prerelease.26...v3.30.0-prerelease.27) (2024-10-17)
11
+
12
+
13
+ ### Features
14
+
15
+ * allow excluding Gradle wrappers GENC-824 (#357) 5d90d1d
16
+
3
17
  ## [3.30.0-prerelease.26](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.30.0-prerelease.25...v3.30.0-prerelease.26) (2024-10-16)
4
18
 
5
19
 
@@ -2,6 +2,9 @@
2
2
  "name": "{{pkgName}}",
3
3
  "version": "{{applicationVersionWeb}}",
4
4
  "private": true,
5
+ "config": {
6
+ "PERSIST_LAYOUT_IN_DEV": false
7
+ },
5
8
  "scripts": {
6
9
  "baseline": "npm run clean && npm run bootstrap",
7
10
  "bootstrap": "npm i --legacy-peer-deps",
@@ -1,5 +1,6 @@
1
1
  export * from './history';
2
2
  export * from './fdc3';
3
+ export * from './layout';
3
4
  export * from './permissions';
4
5
  export * from './setApiHost';
5
6
  export * from './getLayoutNameByRoute';
@@ -0,0 +1,11 @@
1
+ import { isDev } from '@genesislcap/foundation-utils';
2
+ import pkg from '../../package.json';
3
+
4
+ // returning null disables caching
5
+ // returning an id (as long as it's not null) enables caching
6
+ export const persistLayout = (id: string) => {
7
+ if (isDev() && (pkg as any)?.config.PERSIST_LAYOUT_IN_DEV !== true) {
8
+ return null;
9
+ }
10
+ return id;
11
+ };
@@ -7,7 +7,8 @@
7
7
  "config": {
8
8
  "API_HOST": "{{apiHost}}",
9
9
  "PORT": 6060,
10
- "ENABLE_SSO": {{enableSSO}}
10
+ "ENABLE_SSO": {{enableSSO}},
11
+ "PERSIST_LAYOUT_IN_DEV": false
11
12
  },
12
13
  "genx": {
13
14
  "app": {
@@ -1,3 +1,4 @@
1
1
  export * from './fdc3';
2
+ export * from './layout';
2
3
  export * from './logger';
3
4
  export * from './permissions';
@@ -0,0 +1,11 @@
1
+ import { isDev } from '@genesislcap/foundation-utils';
2
+ import pkg from '../../package.json';
3
+
4
+ // returning null disables caching
5
+ // returning an id (as long as it's not null) enables caching
6
+ export const persistLayout = (id: string) => {
7
+ if (isDev() && (pkg as any)?.config.PERSIST_LAYOUT_IN_DEV !== true) {
8
+ return null;
9
+ }
10
+ return id;
11
+ };
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "declarationDir": "./dist/dts",
20
20
  "outDir": "./dist/esm",
21
- "rootDir": "./src",
21
+ "rootDir": ".",
22
22
  "allowJs": true,
23
23
  "allowSyntheticDefaultImports": true,
24
24
  "declaration": true,
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.30.0-prerelease.26",
4
+ "version": "3.30.0-prerelease.28",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -1,5 +1,8 @@
1
- // servers
2
- includeBuild("server")
1
+ val gradleFolder: File = rootProject.projectDir.resolve("gradle")
2
+ if (gradleFolder.exists()) {
3
+ // servers
4
+ includeBuild("server")
3
5
 
4
- // clients
5
- includeBuild("client")
6
+ // clients
7
+ includeBuild("client")
8
+ }