@airfleet/generator-init 0.39.0 → 0.39.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.
@@ -10,9 +10,15 @@ import title from "../../utils/log/title.js";
10
10
  import highlightText from "../../utils/log/text/highlightText.js";
11
11
  import lines from "../../utils/log/text/lines.js";
12
12
  import infoBox from "../../utils/log/boxes/infoBox.js";
13
+ import configureBunPackageManager from "../../utils/configureBunPackageManager.js";
13
14
  import objectPropertyFromValue from "../../utils/objectPropertyFromValue.js";
14
15
 
15
16
  export default class extends Generator {
17
+ constructor(args, opts) {
18
+ super(args, opts);
19
+ configureBunPackageManager(this);
20
+ }
21
+
16
22
  async prompting() {
17
23
  this.log(
18
24
  lines([
@@ -353,6 +359,7 @@ export default class extends Generator {
353
359
  async install() {
354
360
  await this.spawnCommand("composer", ["install"]);
355
361
  await this.spawnCommand("bun", ["install"]);
362
+ await this.spawnCommand("bun", ["pm", "trust", "--all"]);
356
363
  }
357
364
 
358
365
  _getViewsPrefix(answers, options, nameNoAirfleet) {
@@ -5,10 +5,12 @@ import copyTemplates from "../../utils/copyTemplates.js";
5
5
  import Info from "./info.js";
6
6
  import Prompts from "./prompts.js";
7
7
  import Templates from "./templates.js";
8
+ import configureBunPackageManager from "../../utils/configureBunPackageManager.js";
8
9
 
9
10
  export default class extends Generator {
10
11
  constructor(args, opts) {
11
12
  super(args, opts);
13
+ configureBunPackageManager(this);
12
14
  this.info = new Info(this);
13
15
  this.prompts = new Prompts(this);
14
16
  this.templates = new Templates(this);
@@ -48,6 +50,7 @@ export default class extends Generator {
48
50
  async _installTheme() {
49
51
  await this._spawnThemeCommand("composer", ["install"]);
50
52
  await this._spawnThemeCommand("bun", ["install"]);
53
+ await this._spawnThemeCommand("bun", ["pm", "trust", "--all"]);
51
54
  }
52
55
 
53
56
  _fixHusky() {
@@ -10,8 +10,14 @@ import title from "../../utils/log/title.js";
10
10
  import highlightText from "../../utils/log/text/highlightText.js";
11
11
  import lines from "../../utils/log/text/lines.js";
12
12
  import infoBox from "../../utils/log/boxes/infoBox.js";
13
+ import configureBunPackageManager from "../../utils/configureBunPackageManager.js";
13
14
 
14
15
  export default class extends Generator {
16
+ constructor(args, opts) {
17
+ super(args, opts);
18
+ configureBunPackageManager(this);
19
+ }
20
+
15
21
  async prompting() {
16
22
  this.log(
17
23
  lines([
@@ -283,6 +289,7 @@ export default class extends Generator {
283
289
  async install() {
284
290
  await this.spawnCommand("composer", ["install"]);
285
291
  await this.spawnCommand("bun", ["install"]);
292
+ await this.spawnCommand("bun", ["pm", "trust", "--all"]);
286
293
  }
287
294
 
288
295
  _getPhpVersion(pluginPhpVersion) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airfleet/generator-init",
3
3
  "description": "A Yeoman generator to scaffold common Airfleet features",
4
- "version": "0.39.0",
4
+ "version": "0.39.1",
5
5
  "scripts": {},
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -0,0 +1,13 @@
1
+ export default function configureBunPackageManager(generator) {
2
+ if (!generator) {
3
+ return;
4
+ }
5
+
6
+ // Hint for any code that looks at the Yeoman env options.
7
+ if (generator.env?.options) {
8
+ // Tell Yeoman to use Bun as the package manager.
9
+ // Since Yeoman does not support Bun, it will not run anything, so we still have to call bun install directly.
10
+ generator.env.options.nodePackageManager = "bun";
11
+ generator.env.options.packageManager = "bun";
12
+ }
13
+ }