@genesislcap/blank-app-seed 2.5.0 → 2.5.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.
@@ -26,7 +26,7 @@ module.exports = async (data, utils) => {
26
26
  // to be exposed via user prompt in the future
27
27
  data.useDocker = !!process.env.USE_DOCKER;
28
28
  data.routes.forEach(route => {
29
- const routeName = route.name;
29
+ const routeName = utils.changeCase.paramCase(route.name);
30
30
  makeDirectory(path.resolve(data.directory,`client/src/routes/${routeName}`));
31
31
  utils.writeFileWithData(path.resolve(data.directory, `client/src/routes/${routeName}/${routeName}.ts`), {route}, path.resolve(data.directory, '.genx/templates/route.hbs'));
32
32
  utils.writeFileWithData(path.resolve(data.directory, `client/src/routes/${routeName}/${routeName}.template.ts`), {route}, path.resolve(data.directory, '.genx/templates/route.template.hbs'));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed-config",
3
3
  "description": "Genesis Blank App Seed Configuration",
4
- "version": "2.5.0",
4
+ "version": "2.5.1",
5
5
  "license": "Apache-2.0",
6
6
  "genxSeedConfig": {
7
7
  "exclude": [
@@ -19,11 +19,15 @@ module.exports = async (inquirer, prevAns = {}) => {
19
19
  ])
20
20
 
21
21
  let routesParsed;
22
- try {
23
- routesParsed = JSON.parse(routes);
24
- } catch (error) {
25
- console.error("Error parsing `routes` parameter as JSON:", error.message);
26
- console.log("Falling back to the default routes value");
22
+ if (routes) {
23
+ try {
24
+ routesParsed = JSON.parse(routes);
25
+ } catch (error) {
26
+ console.error("Error parsing `routes` parameter as JSON:", error.message);
27
+ console.log("Falling back to the default routes value");
28
+ routesParsed = JSON.parse(defaultRoutes);
29
+ }
30
+ } else {
27
31
  routesParsed = JSON.parse(defaultRoutes);
28
32
  }
29
33
 
@@ -1,9 +1,9 @@
1
1
  import { customElement, FASTElement } from '@microsoft/fast-element';
2
- import { {{pascalCase route.name}}Styles as styles } from './{{route.name}}.styles';
3
- import { {{pascalCase route.name}}Template as template } from './{{route.name}}.template';
2
+ import { {{pascalCase route.name}}Styles as styles } from './{{kebabCase route.name}}.styles';
3
+ import { {{pascalCase route.name}}Template as template } from './{{kebabCase route.name}}.template';
4
4
 
5
5
  @customElement({
6
- name: '{{route.name}}-route',
6
+ name: '{{kebabCase route.name}}-route',
7
7
  template,
8
8
  styles,
9
9
  })
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.5.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v2.5.0...v2.5.1) (2024-03-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * consistent route file and web component naming GENC-176 (#151) 14a3b2a
9
+
3
10
  ## [2.5.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v2.4.0...v2.5.0) (2024-03-15)
4
11
 
5
12
 
@@ -10,7 +10,7 @@ import { Route } from '@microsoft/fast-router';
10
10
  import { defaultLayout, loginLayout } from '../layouts';
11
11
  import { NotFound } from './not-found/not-found';
12
12
  {{#each routes}}
13
- import { {{pascalCase this.name}} } from './{{this.name}}/{{this.name}}';
13
+ import { {{pascalCase this.name}} } from './{{kebabCase this.name}}/{{kebabCase this.name}}';
14
14
  {{/each}}
15
15
 
16
16
  // eslint-disable-next-line
@@ -57,7 +57,7 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
57
57
  );
58
58
  configure(this.container, {
59
59
  autoConnect: true,
60
- defaultRedirectUrl: '{{routes.[0].name}}',
60
+ defaultRedirectUrl: '{{kebabCase routes.[0].name}}',
61
61
  ...ssoSettings,
62
62
  });
63
63
  return define({
@@ -74,10 +74,10 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
74
74
  { path: 'not-found', element: NotFound, title: 'Not Found', name: 'not-found' },
75
75
  {{#each routes}}
76
76
  {
77
- path: '{{this.name}}',
77
+ path: '{{kebabCase this.name}}',
78
78
  element: {{pascalCase this.name}},
79
79
  title: '{{sentenceCase this.name}}',
80
- name: '{{this.name}}',
80
+ name: '{{kebabCase this.name}}',
81
81
  navItems: [
82
82
  {
83
83
  title: '{{sentenceCase this.name}}',
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": "2.5.0",
4
+ "version": "2.5.1",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -1,8 +1,8 @@
1
1
  systemDefinition {
2
2
  global {
3
3
  item(name = "DbLayer", value = "SQL")
4
- item(name = "DictionarySource", value = "FILE")
5
- item(name = "DbHost", value = "jdbc:h2:file:./server/h2/test;DB_CLOSE_DELAY=-1;NON_KEYWORDS=VALUE,KEY;AUTO_SERVER=TRUE")
4
+ item(name = "DictionarySource", value = "DB")
5
+ item(name = "DbHost", value = "jdbc:h2:file:~/{{appName}}/server/h2/test;DB_CLOSE_DELAY=-1;NON_KEYWORDS=VALUE,KEY;AUTO_SERVER=TRUE")
6
6
  item(name = "DbQuotedIdentifiers", value = true)
7
7
  item(name = "DEPLOYED_PRODUCT", value = "{{appName}}")
8
8
  item(name = "MqLayer", value = env["MQ_LAYER", "ZeroMQ"])