create-gasket-app 7.0.0-next.65 → 7.0.0-next.67
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/README.md +2 -5
- package/lib/index.d.ts +15 -11
- package/lib/scaffold/actions/global-prompts.js +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# create-gasket-app
|
|
2
2
|
|
|
3
|
-
Starter Pack for creating Gasket apps.
|
|
3
|
+
Starter Pack for creating Gasket apps.
|
|
4
4
|
|
|
5
5
|
### Get Started Immediately
|
|
6
6
|
|
|
@@ -43,9 +43,6 @@ Options:
|
|
|
43
43
|
-p, --presets [presets] Initial Gasket preset(s) to use.
|
|
44
44
|
Can be set as short name with version (e.g. --presets nextjs@^1.0.0)
|
|
45
45
|
Or other (multiple) custom presets (e.g. --presets my-gasket-preset@1.0.0.beta-1,nextjs@^1.0.0)
|
|
46
|
-
--plugins [plugins] Additional plugin(s) to install. Can be set as
|
|
47
|
-
multiple flags (e.g. --plugins jest --plugins zkconfig@^1.0.0)
|
|
48
|
-
comma-separated values: --plugins=jest,zkconfig^1.0.0
|
|
49
46
|
--package-manager [package-manager] Selects which package manager you would like to use during
|
|
50
47
|
installation. (e.g. --package-manager yarn)
|
|
51
48
|
-r, --require [require] Require module(s) before Gasket is initialized
|
|
@@ -189,7 +186,7 @@ The hook is passed the following parameters:
|
|
|
189
186
|
| `context` | The CreateContext with data from flags, prompts, etc |
|
|
190
187
|
| `context.pkg` | Commonly used in create to add to package.json |
|
|
191
188
|
| `context.file` | Commonly used to add files and templates for the app |
|
|
192
|
-
| `context.gasketConfig` | Used to add config to the generated gasket.
|
|
189
|
+
| `context.gasketConfig` | Used to add config to the generated gasket.js |
|
|
193
190
|
| `context.messages` | non-error/warning messages to report |
|
|
194
191
|
| `context.warnings` | warnings messages to report |
|
|
195
192
|
| `context.errors` | error messages to report but do not exit process |
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GasketConfigDefinition, MaybeAsync, Plugin, GasketEngine } from '@gasket/core';
|
|
2
2
|
import type { PackageManager } from '@gasket/utils';
|
|
3
|
+
import type { PromptModule } from 'inquirer';
|
|
3
4
|
|
|
4
5
|
export interface Dependencies {
|
|
5
6
|
dependencies?: Record<string, string>;
|
|
@@ -15,9 +16,9 @@ export interface PackageJson extends Dependencies {
|
|
|
15
16
|
repository?:
|
|
16
17
|
| string
|
|
17
18
|
| {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
type: 'git';
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
21
22
|
scripts?: Record<string, string>;
|
|
22
23
|
optionalDependencies?: Record<string, string>;
|
|
23
24
|
homepage?: string;
|
|
@@ -31,9 +32,9 @@ export interface ModuleInfo {
|
|
|
31
32
|
version?: string;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
export interface PresetInfo extends ModuleInfo {}
|
|
35
|
+
export interface PresetInfo extends ModuleInfo { }
|
|
35
36
|
|
|
36
|
-
export interface PluginInfo extends ModuleInfo {}
|
|
37
|
+
export interface PluginInfo extends ModuleInfo { }
|
|
37
38
|
|
|
38
39
|
export interface ConfigBuilder<Config> {
|
|
39
40
|
/**
|
|
@@ -177,6 +178,8 @@ export interface Readme {
|
|
|
177
178
|
markdownFile(path: string): Promise<Readme>;
|
|
178
179
|
}
|
|
179
180
|
|
|
181
|
+
export type CreatePrompt = PromptModule;
|
|
182
|
+
|
|
180
183
|
declare module 'create-gasket-app' {
|
|
181
184
|
export interface CreateContext {
|
|
182
185
|
/** Short name of the app */
|
|
@@ -278,18 +281,19 @@ export interface ActionWrapperParams {
|
|
|
278
281
|
}
|
|
279
282
|
|
|
280
283
|
declare module '@gasket/core' {
|
|
281
|
-
import { CreateContext } from 'create-gasket-app';
|
|
282
284
|
|
|
283
285
|
export interface HookExecTypes {
|
|
284
|
-
presetPrompt(
|
|
286
|
+
presetPrompt(
|
|
287
|
+
context: CreateContext,
|
|
288
|
+
utils: {
|
|
289
|
+
prompt: CreatePrompt;
|
|
290
|
+
}
|
|
291
|
+
): Promise<void>;
|
|
285
292
|
presetConfig(context: CreateContext): Promise<CreateContext['presetConfig']>;
|
|
286
293
|
prompt(
|
|
287
294
|
context: CreateContext,
|
|
288
295
|
utils: {
|
|
289
|
-
prompt:
|
|
290
|
-
prompts: Array<Record<string, any>>
|
|
291
|
-
) => Promise<Record<string, any>>;
|
|
292
|
-
addPlugins: (plugins: Array<string>) => Promise<void>;
|
|
296
|
+
prompt: CreatePrompt;
|
|
293
297
|
}
|
|
294
298
|
): MaybeAsync<CreateContext>;
|
|
295
299
|
|
|
@@ -144,7 +144,7 @@ export const questions = [
|
|
|
144
144
|
* @returns {Promise} promise
|
|
145
145
|
*/
|
|
146
146
|
async function globalPrompts({ context }) {
|
|
147
|
-
const prompt = context.prompts ? inquirer.
|
|
147
|
+
const prompt = context.prompts ? inquirer.createPromptModule() : () => ({});
|
|
148
148
|
for (var fn of questions) {
|
|
149
149
|
await fn(context, prompt);
|
|
150
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-gasket-app",
|
|
3
|
-
"version": "7.0.0-next.
|
|
3
|
+
"version": "7.0.0-next.67",
|
|
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.
|
|
37
|
-
"@gasket/plugin-command": "7.0.0-next.
|
|
38
|
-
"@gasket/plugin-docs": "7.0.0-next.
|
|
39
|
-
"@gasket/plugin-docusaurus": "7.0.0-next.
|
|
40
|
-
"@gasket/plugin-git": "7.0.0-next.
|
|
41
|
-
"@gasket/plugin-logger": "7.0.0-next.
|
|
42
|
-
"@gasket/plugin-metadata": "7.0.0-next.
|
|
43
|
-
"@gasket/utils": "7.0.0-next.
|
|
36
|
+
"@gasket/core": "7.0.0-next.67",
|
|
37
|
+
"@gasket/plugin-command": "7.0.0-next.67",
|
|
38
|
+
"@gasket/plugin-docs": "7.0.0-next.67",
|
|
39
|
+
"@gasket/plugin-docusaurus": "7.0.0-next.67",
|
|
40
|
+
"@gasket/plugin-git": "7.0.0-next.67",
|
|
41
|
+
"@gasket/plugin-logger": "7.0.0-next.67",
|
|
42
|
+
"@gasket/plugin-metadata": "7.0.0-next.67",
|
|
43
|
+
"@gasket/utils": "7.0.0-next.67",
|
|
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": "
|
|
86
|
+
"gitHead": "a18369e46ce5322ac965ae0dff22c2fca99d5997"
|
|
87
87
|
}
|