yeoman-generator 6.0.0 → 6.0.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.
@@ -0,0 +1,2 @@
1
+ import type { InputOutputAdapter } from '@yeoman/types';
2
+ export declare const adapterProgress: <ReturnType_1>(adapter: ProgressAdapter | InputOutputAdapter, fn: ProgressCallback<ReturnType_1>, options?: any) => Promise<void | ReturnType_1>;
@@ -0,0 +1,9 @@
1
+ export const adapterProgress = async (adapter, fn, options) => {
2
+ if ('progress' in adapter) {
3
+ return adapter.progress(fn, options);
4
+ }
5
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
6
+ return Promise.resolve(fn({ step() { } })).finally(() => {
7
+ adapter.log.ok(options?.name);
8
+ });
9
+ };
package/dist/generator.js CHANGED
@@ -135,11 +135,12 @@ export class BaseGenerator extends EventEmitter {
135
135
  }
136
136
  // Add convenience debug object
137
137
  this._debug = createDebug(this._namespace);
138
+ // Ensure source/destination path, can be configured from subclasses
139
+ // Used by help()
140
+ this.sourceRoot(path.join(path.dirname(this.resolved), 'templates'));
138
141
  if (actualOptions.help) {
139
142
  return;
140
143
  }
141
- // Ensure source/destination path, can be configured from subclasses
142
- this.sourceRoot(path.join(path.dirname(this.resolved), 'templates'));
143
144
  if (this.features.unique && !this.features.uniqueBy) {
144
145
  let uniqueBy;
145
146
  if (this.features.unique === true || this.features.unique === 'namespace') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeoman-generator",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Rails-inspired generator system that provides scaffolding for your apps",
5
5
  "keywords": [
6
6
  "development",