generator-jhipster-yellowbricks 1.2.1 → 1.2.2

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,6 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { createRequire } from 'node:module';
3
- import { join } from 'node:path';
3
+ import { dirname, join } from 'node:path';
4
4
 
5
5
  import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
6
6
  import stripJsonComments from 'strip-json-comments';
@@ -84,7 +84,10 @@ export default class extends BaseApplicationGenerator {
84
84
  }
85
85
  try {
86
86
  const resolved = require.resolve(`${pkgName}/generators/${gen}`);
87
- await this.composeWith(resolved);
87
+ const packagePath = dirname(require.resolve(`${pkgName}/package.json`));
88
+ const namespace = `${pkgName}:${gen}`;
89
+ this.env.register(resolved, { namespace, packagePath });
90
+ await this.composeWith(namespace);
88
91
  console.log(`[yellowbricks] activated brick: ${pkgName}`);
89
92
  } catch {
90
93
  console.error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-jhipster-yellowbricks",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Yellowbricks main blueprint — orchestrates all yellowbricks in a single JHipster blueprint",
5
5
  "keywords": [
6
6
  "yeoman-generator",