create-gasket-app 7.0.0-next.63 → 7.0.0-next.65

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.
package/lib/index.d.ts CHANGED
@@ -177,96 +177,98 @@ export interface Readme {
177
177
  markdownFile(path: string): Promise<Readme>;
178
178
  }
179
179
 
180
- export interface CreateContext {
181
- /** Short name of the app */
182
- appName: string;
180
+ declare module 'create-gasket-app' {
181
+ export interface CreateContext {
182
+ /** Short name of the app */
183
+ appName: string;
183
184
 
184
- /** Current work directory */
185
- cwd: string;
185
+ /** Current work directory */
186
+ cwd: string;
186
187
 
187
- /** Path to the target app (Default: cwd/appName) */
188
- dest: string;
188
+ /** Path to the target app (Default: cwd/appName) */
189
+ dest: string;
189
190
 
190
- /** Relative path to the target app */
191
- relDest: string;
191
+ /** Relative path to the target app */
192
+ relDest: string;
192
193
 
193
- /** Whether or not target directory already exists */
194
- extant: boolean;
194
+ /** Whether or not target directory already exists */
195
+ extant: boolean;
195
196
 
196
- /** paths to the local presets packages */
197
- localPresets: Array<string>;
197
+ /** paths to the local presets packages */
198
+ localPresets: Array<string>;
198
199
 
199
- /** Raw preset desc from args. Can include version constraint. Added by
200
- * load-preset if using localPresets. */
201
- rawPresets: Array<string>;
200
+ /** Raw preset desc from args. Can include version constraint. Added by
201
+ * load-preset if using localPresets. */
202
+ rawPresets: Array<string>;
202
203
 
203
- /** Local packages that should be linked */
204
- pkgLinks: Array<string>;
204
+ /** Local packages that should be linked */
205
+ pkgLinks: Array<string>;
205
206
 
206
- /** non-error/warning messages to report */
207
- messages: Array<string>;
207
+ /** non-error/warning messages to report */
208
+ messages: Array<string>;
208
209
 
209
- /** warnings messages to report */
210
- warnings: Array<string>;
210
+ /** warnings messages to report */
211
+ warnings: Array<string>;
211
212
 
212
- /** error messages to report but do not exit process */
213
- errors: Array<string>;
213
+ /** error messages to report but do not exit process */
214
+ errors: Array<string>;
214
215
 
215
- /** any next steps to report for user */
216
- nextSteps: Array<string>;
216
+ /** any next steps to report for user */
217
+ nextSteps: Array<string>;
217
218
 
218
- /** any generated files to show in report */
219
- generatedFiles: Set<string>;
219
+ /** any generated files to show in report */
220
+ generatedFiles: Set<string>;
220
221
 
221
- /** Default empty array, populated by load-preset with actual imports */
222
- presets: Array<Plugin>;
222
+ /** Default empty array, populated by load-preset with actual imports */
223
+ presets: Array<Plugin>;
223
224
 
224
- /** Default to object w/empty plugins array to be populated by `presetConfig` hook */
225
- presetConfig: GasketConfigDefinition;
225
+ /** Default to object w/empty plugins array to be populated by `presetConfig` hook */
226
+ presetConfig: GasketConfigDefinition;
226
227
 
227
- // Added by `global-prompts`
228
+ // Added by `global-prompts`
228
229
 
229
- /** Description of app */
230
- appDescription: string;
230
+ /** Description of app */
231
+ appDescription: string;
231
232
 
232
- /** Should a git repo be initialized and first commit */
233
- gitInit: boolean;
233
+ /** Should a git repo be initialized and first commit */
234
+ gitInit: boolean;
234
235
 
235
- /** Names of the plugins that add unit and integration tests */
236
- testPlugins: Array<string>;
236
+ /** Names of the plugins that add unit and integration tests */
237
+ testPlugins: Array<string>;
237
238
 
238
- /** Which package manager to use (Default: 'npm') */
239
- packageManager: string;
239
+ /** Which package manager to use (Default: 'npm') */
240
+ packageManager: string;
240
241
 
241
- /** Derived install command (Default: 'npm install') */
242
- installCmd: string;
242
+ /** Derived install command (Default: 'npm install') */
243
+ installCmd: string;
243
244
 
244
- /** Derived local run command (Default: 'npx gasket local') */
245
- localCmd: string;
245
+ /** Derived local run command (Default: 'npx gasket local') */
246
+ localCmd: string;
246
247
 
247
- /** Whether or not the user wants to override an extant directory */
248
- destOverride: boolean;
248
+ /** Whether or not the user wants to override an extant directory */
249
+ destOverride: boolean;
249
250
 
250
- // Added by `setup-pkg`
251
+ // Added by `setup-pkg`
251
252
 
252
- /** package.json builder */
253
- pkg: PackageJsonBuilder;
253
+ /** package.json builder */
254
+ pkg: PackageJsonBuilder;
254
255
 
255
- /** manager to execute npm or yarn commands */
256
- pkgManager: PackageManager;
256
+ /** manager to execute npm or yarn commands */
257
+ pkgManager: PackageManager;
257
258
 
258
- // Added by `setup-gasket-config`
259
+ // Added by `setup-gasket-config`
259
260
 
260
- /** gasket.config builder */
261
- gasketConfig: ConfigBuilder<GasketConfigDefinition>;
261
+ /** gasket.config builder */
262
+ gasketConfig: ConfigBuilder<GasketConfigDefinition>;
262
263
 
263
- // Added by `create-hooks`
264
+ // Added by `create-hooks`
264
265
 
265
- /** Use to add files and templates to generate */
266
- files: Files;
266
+ /** Use to add files and templates to generate */
267
+ files: Files;
267
268
 
268
- /** Use to add content to the README.md */
269
- readme: Readme;
269
+ /** Use to add content to the README.md */
270
+ readme: Readme;
271
+ }
270
272
  }
271
273
 
272
274
  export interface ActionWrapperParams {
@@ -276,6 +278,8 @@ export interface ActionWrapperParams {
276
278
  }
277
279
 
278
280
  declare module '@gasket/core' {
281
+ import { CreateContext } from 'create-gasket-app';
282
+
279
283
  export interface HookExecTypes {
280
284
  presetPrompt(context: CreateContext): Promise<void>;
281
285
  presetConfig(context: CreateContext): Promise<CreateContext['presetConfig']>;
@@ -39,19 +39,14 @@ async function choosePackageManager(context, prompt) {
39
39
  name: 'packageManager',
40
40
  message: 'Which packager would you like to use?',
41
41
  type: 'list',
42
- choices: [{ name: 'npm' }, { name: 'yarn' }]
42
+ choices: [{ name: 'npm' }, { name: 'pnpm' }, { name: 'yarn' }]
43
43
  }
44
44
  ])
45
45
  ).packageManager;
46
46
 
47
47
  const installCmd = context.installCmd || `${packageManager} install`;
48
48
 
49
- const runners = {
50
- npm: 'npx',
51
- yarn: 'yarn'
52
- };
53
-
54
- const localCmd = context.localCmd || `${runners[packageManager]} gasket local`;
49
+ const localCmd = context.localCmd || `${packageManager} run local`;
55
50
 
56
51
  Object.assign(context, {
57
52
  packageManager,
@@ -20,7 +20,7 @@ async function loadPresets({ context }) {
20
20
  packageManager: context.packageManager,
21
21
  dest: tmpDir
22
22
  });
23
- const pkgVerb = pkgManager.manager === 'yarn' ? 'add' : 'install';
23
+ const pkgVerb = pkgManager.manager === 'npm' ? 'install' : 'add';
24
24
 
25
25
  const remotePresets = context.rawPresets.map(async preset => {
26
26
  const parts = hasVersionOrTag.test(preset) && preset.split('@').filter(Boolean);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-gasket-app",
3
- "version": "7.0.0-next.63",
3
+ "version": "7.0.0-next.65",
4
4
  "description": "starter pack for creating a gasket app",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "homepage": "https://github.com/godaddy/gasket/tree/main/packages/create-gasket-app",
35
35
  "dependencies": {
36
- "@gasket/core": "7.0.0-next.63",
37
- "@gasket/plugin-command": "7.0.0-next.63",
38
- "@gasket/plugin-docs": "7.0.0-next.63",
39
- "@gasket/plugin-docusaurus": "7.0.0-next.63",
40
- "@gasket/plugin-git": "7.0.0-next.63",
41
- "@gasket/plugin-logger": "7.0.0-next.63",
42
- "@gasket/plugin-metadata": "7.0.0-next.63",
43
- "@gasket/utils": "7.0.0-next.63",
36
+ "@gasket/core": "7.0.0-next.65",
37
+ "@gasket/plugin-command": "7.0.0-next.65",
38
+ "@gasket/plugin-docs": "7.0.0-next.65",
39
+ "@gasket/plugin-docusaurus": "7.0.0-next.65",
40
+ "@gasket/plugin-git": "7.0.0-next.65",
41
+ "@gasket/plugin-logger": "7.0.0-next.65",
42
+ "@gasket/plugin-metadata": "7.0.0-next.65",
43
+ "@gasket/utils": "7.0.0-next.65",
44
44
  "commander": "^12.0.0",
45
45
  "deepmerge": "^4.3.1",
46
46
  "glob": "^8.1.0",
@@ -83,5 +83,5 @@
83
83
  "jest": {
84
84
  "transform": {}
85
85
  },
86
- "gitHead": "53d9d2f59b438d94d171eeac528c6aa2346c142e"
86
+ "gitHead": "93fb05fe933682704607eed6a2dfc870cf35c2d1"
87
87
  }