@shopify/cli-kit 3.8.0 → 3.9.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.
- package/CHANGELOG.md +14 -0
- package/README.md +61 -0
- package/dist/api/admin.js.map +1 -1
- package/dist/api/common.js.map +1 -1
- package/dist/api/graphql/update_draft.js.map +1 -1
- package/dist/array.d.ts +1 -1
- package/dist/git.js.map +1 -1
- package/dist/github.js.map +1 -1
- package/dist/metadata.d.ts +2 -2
- package/dist/node/checksum.js.map +1 -1
- package/dist/node/dot-env.d.ts +1 -1
- package/dist/node/dot-env.js.map +1 -1
- package/dist/node/hooks/prerun.js.map +1 -1
- package/dist/node/node-package-manager.d.ts +0 -1
- package/dist/node/ruby.js +36 -17
- package/dist/node/ruby.js.map +1 -1
- package/dist/output.js.map +1 -1
- package/dist/session/exchange.js.map +1 -1
- package/dist/session/post-auth.js +7 -1
- package/dist/session/post-auth.js.map +1 -1
- package/dist/session/validate.js.map +1 -1
- package/dist/session.js.map +1 -1
- package/dist/store.js.map +1 -1
- package/dist/system.d.ts +2 -2
- package/dist/testing/output.js +6 -6
- package/dist/testing/output.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/executor.d.ts +8 -1
- package/dist/ui/executor.js +29 -1
- package/dist/ui/executor.js.map +1 -1
- package/dist/ui/inquirer/autocomplete.js +12 -2
- package/dist/ui/inquirer/autocomplete.js.map +1 -1
- package/dist/ui.d.ts +8 -3
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/package.json +11 -11
package/dist/ui/executor.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { Question } from '../ui.js';
|
|
1
|
+
import { Question, QuestionChoiceType } from '../ui.js';
|
|
2
2
|
export declare function run<TName extends string & keyof TAnswers, TAnswers extends {
|
|
3
3
|
[key in TName]: string;
|
|
4
4
|
} = {
|
|
5
5
|
[key in TName]: string;
|
|
6
6
|
}>(question: unknown): Promise<TAnswers>;
|
|
7
7
|
export declare function mapper(question: Question): unknown;
|
|
8
|
+
export declare function groupAndMapChoices(choices: QuestionChoiceType[]): ({
|
|
9
|
+
type: string;
|
|
10
|
+
line: string;
|
|
11
|
+
} | {
|
|
12
|
+
name: string;
|
|
13
|
+
value: string;
|
|
14
|
+
})[];
|
package/dist/ui/executor.js
CHANGED
|
@@ -28,6 +28,7 @@ export function mapper(question) {
|
|
|
28
28
|
...question,
|
|
29
29
|
type: 'custom-select',
|
|
30
30
|
source: getAutompleteFilterType(),
|
|
31
|
+
choices: question.choices ? groupAndMapChoices(question.choices) : undefined,
|
|
31
32
|
};
|
|
32
33
|
case 'autocomplete':
|
|
33
34
|
inquirer.registerPrompt('autocomplete', CustomAutocomplete);
|
|
@@ -51,10 +52,37 @@ function fuzzyFilter(answers, input = '') {
|
|
|
51
52
|
}
|
|
52
53
|
function containsFilter(answers, input = '') {
|
|
53
54
|
return new Promise((resolve) => {
|
|
54
|
-
resolve(Object.values(answers).filter((answer) => answer.name.includes(input)));
|
|
55
|
+
resolve(Object.values(answers).filter((answer) => !answer.name || answer.name.includes(input)));
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
function getAutompleteFilterType() {
|
|
58
59
|
return process.env.SHOPIFY_USE_AUTOCOMPLETE_FILTER === 'fuzzy' ? fuzzyFilter : containsFilter;
|
|
59
60
|
}
|
|
61
|
+
export function groupAndMapChoices(choices) {
|
|
62
|
+
const initialGroups = [];
|
|
63
|
+
// Switched from choices with group information to groups with a list of choices
|
|
64
|
+
const groups = choices.reduce((finalChoices, choice) => {
|
|
65
|
+
const currentGroup = choice.group ?? { name: 'Other', order: Number.MAX_SAFE_INTEGER };
|
|
66
|
+
const existingGroup = finalChoices.find((group) => group.name === currentGroup.name);
|
|
67
|
+
if (existingGroup) {
|
|
68
|
+
existingGroup.choices.push(choice);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
finalChoices.push({ ...currentGroup, choices: [choice] });
|
|
72
|
+
}
|
|
73
|
+
return finalChoices;
|
|
74
|
+
}, initialGroups);
|
|
75
|
+
const sortedGroups = groups.sort((g1, g2) => g1.order - g2.order);
|
|
76
|
+
const grouped = sortedGroups.length > 1 || sortedGroups[0].order !== Number.MAX_SAFE_INTEGER;
|
|
77
|
+
// Mapped the group with a list of extensions to a list of inquirer choices including group separators
|
|
78
|
+
return sortedGroups.flatMap((group) => {
|
|
79
|
+
const finalChoices = [];
|
|
80
|
+
if (grouped && group.name) {
|
|
81
|
+
finalChoices.push({ type: 'separator', line: '' });
|
|
82
|
+
finalChoices.push({ type: 'separator', line: group.name });
|
|
83
|
+
}
|
|
84
|
+
finalChoices.push(...group.choices);
|
|
85
|
+
return finalChoices;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
60
88
|
//# sourceMappingURL=executor.js.map
|
package/dist/ui/executor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/ui/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAA;AAErD,OAAO,QAAuC,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,KAAK,UAAU,GAAG,CAGvB,QAAiB;IACjB,MAAM,YAAY,GAAI,QAAqB,CAAC,IAAI,CAAA;IAChD,OAAO,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,QAAuC,EAAE,EAAC,GAAI,QAAqB,CAAC,OAAO,EAAC,CAAC,CAAC,CAC1G,YAAY,CACb,CAAA;AACH,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,QAAkB;IACvC,QAAQ,QAAQ,CAA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ACjE,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,YAAY,CAAC,CAAC,CAAE,CAAC,KAAK,KAAK,MAAM,CAAC,gBAAgB,CAAA;IAE7F,sGAAsG;IACtG,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACpC,MAAM,YAAY,GAAqE,EAAE,CAAA;QACzF,IAAI,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;YACzB,YAAY,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAC,CAAC,CAAA;YAChD,YAAY,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAC,CAAC,CAAA;SACzD;QACD,YAAY,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;QACnC,OAAO,YAAY,CAAA;IACrB,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {CustomInput} from './inquirer/input.js'\nimport {CustomAutocomplete} from './inquirer/autocomplete.js'\nimport {CustomSelect} from './inquirer/select.js'\nimport {CustomPassword} from './inquirer/password.js'\nimport {Question, QuestionChoiceType} from '../ui.js'\nimport inquirer, {Answers, QuestionCollection} from 'inquirer'\nimport fuzzy from 'fuzzy'\n\nexport async function run<\n TName extends string & keyof TAnswers,\n TAnswers extends {[key in TName]: string} = {[key in TName]: string},\n>(question: unknown): Promise<TAnswers> {\n const questionName = (question as Question).name\n return (await inquirer.prompt(question as QuestionCollection<Answers>, {...(question as Question).choices}))[\n questionName\n ]\n}\n\nexport function mapper(question: Question): unknown {\n switch (question.type) {\n case 'input':\n inquirer.registerPrompt('custom-input', CustomInput)\n return {\n ...question,\n type: 'custom-input',\n }\n case 'password':\n inquirer.registerPrompt('custom-password', CustomPassword)\n return {\n ...question,\n type: 'custom-password',\n }\n case 'select':\n inquirer.registerPrompt('custom-select', CustomSelect)\n return {\n ...question,\n type: 'custom-select',\n source: getAutompleteFilterType(),\n choices: question.choices ? groupAndMapChoices(question.choices) : undefined,\n }\n case 'autocomplete':\n inquirer.registerPrompt('autocomplete', CustomAutocomplete)\n return {\n ...question,\n type: 'autocomplete',\n source: getAutompleteFilterType(),\n }\n }\n}\n\nfunction fuzzyFilter(answers: {name: string; value: string}[], input = '') {\n return new Promise((resolve) => {\n resolve(\n fuzzy\n .filter(input, Object.values(answers), {\n extract(el: {name: string; value: string}) {\n return el.name\n },\n })\n .map((el) => el.original),\n )\n })\n}\n\nfunction containsFilter(answers: {name: string; value: string}[], input = '') {\n return new Promise((resolve) => {\n resolve(Object.values(answers).filter((answer) => !answer.name || answer.name.includes(input)))\n })\n}\n\nfunction getAutompleteFilterType() {\n return process.env.SHOPIFY_USE_AUTOCOMPLETE_FILTER === 'fuzzy' ? fuzzyFilter : containsFilter\n}\n\nexport function groupAndMapChoices(choices: QuestionChoiceType[]) {\n const initialGroups: {name?: string; order: number; choices: {name: string; value: string; order?: number}[]}[] = []\n\n // Switched from choices with group information to groups with a list of choices\n const groups = choices.reduce((finalChoices, choice) => {\n const currentGroup = choice.group ?? {name: 'Other', order: Number.MAX_SAFE_INTEGER}\n const existingGroup = finalChoices.find((group) => group.name === currentGroup.name)\n if (existingGroup) {\n existingGroup.choices.push(choice)\n } else {\n finalChoices.push({...currentGroup, choices: [choice]})\n }\n return finalChoices\n }, initialGroups)\n\n const sortedGroups = groups.sort((g1, g2) => g1.order - g2.order)\n const grouped = sortedGroups.length > 1 || sortedGroups[0]!.order !== Number.MAX_SAFE_INTEGER\n\n // Mapped the group with a list of extensions to a list of inquirer choices including group separators\n return sortedGroups.flatMap((group) => {\n const finalChoices: ({type: string; line: string} | {name: string; value: string})[] = []\n if (grouped && group.name) {\n finalChoices.push({type: 'separator', line: ''})\n finalChoices.push({type: 'separator', line: group.name})\n }\n finalChoices.push(...group.choices)\n return finalChoices\n })\n}\n"]}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { colors } from '../../node/colors.js';
|
|
2
2
|
import AutocompletePrompt from 'inquirer-autocomplete-prompt';
|
|
3
|
+
// eslint-disable-next-line import/extensions
|
|
4
|
+
import Paginator from 'inquirer/lib/utils/paginator.js';
|
|
3
5
|
export class CustomAutocomplete extends AutocompletePrompt {
|
|
4
6
|
constructor(questions, rl, answers) {
|
|
5
7
|
super(questions, rl, answers);
|
|
6
8
|
this.isAutocomplete = true;
|
|
9
|
+
this.paginator = new Paginator(this.screen, {
|
|
10
|
+
isInfinite: false,
|
|
11
|
+
});
|
|
7
12
|
}
|
|
8
13
|
render(error) {
|
|
9
14
|
let content = this.getQuestion();
|
|
@@ -38,7 +43,7 @@ export class CustomAutocomplete extends AutocompletePrompt {
|
|
|
38
43
|
realIndexPosition += name ? name.split('\n').length : 0;
|
|
39
44
|
return true;
|
|
40
45
|
});
|
|
41
|
-
bottomContent += this.paginator.paginate(choicesStr, realIndexPosition, 10);
|
|
46
|
+
bottomContent += this.paginator.paginate(choicesStr, realIndexPosition, this.isAutocomplete ? 10 : 500);
|
|
42
47
|
}
|
|
43
48
|
else {
|
|
44
49
|
content += this.rl.line;
|
|
@@ -64,7 +69,12 @@ function listRender(choices, pointer, searchToken) {
|
|
|
64
69
|
choices.forEach((choice, i) => {
|
|
65
70
|
if (choice.type === 'separator') {
|
|
66
71
|
separatorOffset++;
|
|
67
|
-
|
|
72
|
+
if (choice.line.includes('──────────────')) {
|
|
73
|
+
output += `\n`;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
output += ` ${colors.dim.underline(choice)}\n`;
|
|
77
|
+
}
|
|
68
78
|
return;
|
|
69
79
|
}
|
|
70
80
|
if (choice.disabled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../src/ui/inquirer/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAA;AAC3C,OAAO,kBA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autocomplete-prompt'\nimport DistinctChoice from 'inquirer/lib/objects/choices'\nimport inquirer from 'inquirer'\n// eslint-disable-next-line import/extensions\nimport Paginator from 'inquirer/lib/utils/paginator.js'\nimport {Interface} from 'readline'\n\nexport class CustomAutocomplete extends AutocompletePrompt {\n protected isAutocomplete: boolean\n\n constructor(questions: inquirer.Question<inquirer.Answers>, rl: Interface, answers: inquirer.Answers) {\n super(questions, rl, answers)\n this.isAutocomplete = true\n this.paginator = new Paginator(this.screen, {\n isInfinite: false,\n })\n }\n\n protected render(error?: string) {\n let content = this.getQuestion()\n let bottomContent = ''\n\n if (this.status !== 'answered') {\n content += colors.gray('… ')\n if (!this.isAutocomplete) {\n process.stdout.write('\\u001b[?25l')\n }\n }\n\n if (this.status === 'answered') {\n content += `${colors.dim('·')} ${colors.magenta(this.shortAnswer || this.answerName || this.answer)}`\n process.stdout.write('\\u001b[?25h')\n } else if (this.searching) {\n content += this.rl.line\n bottomContent += ` ${colors.magenta.dim('Searching...')}`\n } else if (this.nbChoices) {\n const choicesStr = listRender(this.currentChoices, this.selected, this.isAutocomplete ? this.rl.line : undefined)\n content += this.isAutocomplete ? this.rl.line : ''\n const indexPosition = this.selected\n let realIndexPosition = 0\n this.currentChoices.choices.every((choice, index: number) => {\n if (index > indexPosition) {\n return false\n }\n if (choice.type === 'separator') {\n return true\n }\n const name = choice.name\n realIndexPosition += name ? name.split('\\n').length : 0\n return true\n })\n bottomContent += this.paginator.paginate(choicesStr, realIndexPosition, this.isAutocomplete ? 10 : 500)\n } else {\n content += this.rl.line\n bottomContent += ` ${colors.magenta('No matching choices')}`\n }\n\n if (error) {\n bottomContent += `\\n${colors.magenta('>> ')}${error}`\n }\n\n this.firstRender = false\n\n this.screen.render(content, bottomContent)\n }\n\n protected getQuestion(): string {\n return `${this.prefix()} ${colors.bold(this.opt.message)}${this.opt.suffix}${colors.reset(' ')}`\n }\n\n protected prefix(): string {\n const color = colors.magenta.bold\n return this.status === 'answered' ? color('✔') : color('?')\n }\n}\n\nfunction listRender(choices: DistinctChoice, pointer: number, searchToken?: string): string {\n let output = ''\n let separatorOffset = 0\n\n choices.forEach((choice, i: number) => {\n if (choice.type === 'separator') {\n separatorOffset++\n if (choice.line.includes('──────────────')) {\n output += `\\n`\n } else {\n output += ` ${colors.dim.underline(choice)}\\n`\n }\n return\n }\n\n if (choice.disabled) {\n separatorOffset++\n output += ` - ${choice.name}`\n output += ` (${typeof choice.disabled === 'string' ? choice.disabled : 'Disabled'})`\n output += '\\n'\n return\n }\n\n const isSelected = i - separatorOffset === pointer\n let line = (isSelected ? '> ' : ' ') + choice.name\n\n if (isSelected) {\n line = colors.magenta(line)\n }\n\n if (searchToken) {\n line = line\n .split(searchToken)\n .map((token) => (isSelected ? colors.magenta(token) : token))\n .join(colors.magenta.dim(searchToken))\n } else if (isSelected) {\n line = colors.magenta(line)\n }\n\n output += `${line} \\n`\n })\n\n return output.replace(/\\n$/, '')\n}\n"]}
|
package/dist/ui.d.ts
CHANGED
|
@@ -10,10 +10,15 @@ export interface Question<TName extends string = string> {
|
|
|
10
10
|
default?: string;
|
|
11
11
|
result?: (value: string) => string | boolean;
|
|
12
12
|
type: 'input' | 'select' | 'autocomplete' | 'password';
|
|
13
|
-
choices?:
|
|
13
|
+
choices?: QuestionChoiceType[];
|
|
14
|
+
}
|
|
15
|
+
export interface QuestionChoiceType {
|
|
16
|
+
name: string;
|
|
17
|
+
value: string;
|
|
18
|
+
group?: {
|
|
14
19
|
name: string;
|
|
15
|
-
|
|
16
|
-
}
|
|
20
|
+
order: number;
|
|
21
|
+
};
|
|
17
22
|
}
|
|
18
23
|
/**
|
|
19
24
|
* Performs a task with the title kept up to date and stdout available to the
|
package/dist/ui.js
CHANGED
|
@@ -101,7 +101,7 @@ export async function nonEmptyDirectoryPrompt(directory) {
|
|
|
101
101
|
export async function terminateBlockingPortProcessPrompt(port, stepDescription) {
|
|
102
102
|
const stepDescriptionContent = stepDescription ?? 'current step';
|
|
103
103
|
const processInfo = await findProcess('port', port);
|
|
104
|
-
const formattedProcessName = processInfo && processInfo.length > 0 && processInfo[0]
|
|
104
|
+
const formattedProcessName = processInfo && processInfo.length > 0 && processInfo[0]?.name
|
|
105
105
|
? ` ${content `${token.italic(`(${processInfo[0].name})`)}`.value}`
|
|
106
106
|
: '';
|
|
107
107
|
const options = [
|
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,KAAK,EAAC,MAAM,YAAY,CAAA;AACjD,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,WAAW,CAAA;AACxC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAmB,gBAAgB,EAAC,MAAM,aAAa,CAAA;AACpH,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,OAAO,EAAC,qBAAqB,EAAC,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAC,MAAM,IAAI,QAAQ,EAAE,GAAG,IAAI,UAAU,EAAC,MAAM,kBAAkB,CAAA;AACtE,OAAO,EAAC,KAAK,IAAI,aAAa,EAAyB,cAAc,EAAC,MAAM,QAAQ,CAAA;AACpF,OAAO,WAAW,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,QAAQ,CAAC,KAAkB,EAAE,OAAgB;IAC3D,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC/C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,MAAM,mBAAmB,GAAa,EAAE,CAAA;QACxC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAiB,EAAE,EAAE;YACnC,IAAI,KAAK,CAAC,IAAI,K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,MAAM,oBAAoB,GACxB,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;QAC1D,CAAC,CAAC,IAAI,OAAO,CAAA,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE;QAClE,CAAC,CAAC,EAAE,CAAA;IAER,MAAM,OAAO,GAAG;QACd,EAAC,IAAI,EAAE,+CAA+C,EAAE,KAAK,EAAE,QAAQ,EAAC;QACxE,EAAC,IAAI,EAAE,kCAAkC,EAAE,KAAK,EAAE,QAAQ,EAAC;KAC5D,CAAA;IAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;QAC1B;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,GAAG,sBAAsB,oBAAoB,IAAI,2DAA2D,oBAAoB,4BAA4B;YACrK,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAA;AAClC,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;IACjC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAC9B,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;IACtB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CACnC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;QAC9B,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;QAC/B,OAAO,EAAE,CAAA;IACX,CAAC,CAAC,CACH,CAAA;AACH,CAAC,CAAA","sourcesContent":["import {CancelExecution, Abort} from './error.js'\nimport {remove, exists} from './file.js'\nimport {info, completed, content, token, logUpdate, logToFile, Message, Logger, stringifyMessage} from './output.js'\nimport {colors} from './node/colors.js'\nimport {relative} from './path.js'\nimport {isTerminalInteractive} from './environment/local.js'\nimport {mapper as mapperUI, run as executorUI} from './ui/executor.js'\nimport {Listr as OriginalListr, ListrTask, ListrEvent, ListrTaskState} from 'listr2'\nimport findProcess from 'find-process'\n\nexport function newListr(tasks: ListrTask[], options?: object) {\n const listr = new OriginalListr(tasks, options)\n listr.tasks.forEach((task) => {\n const loggedSubtaskTitles: string[] = []\n task.subscribe((event: ListrEvent) => {\n if (event.type === 'TITLE' && typeof event.data === 'string') {\n logToFile(event.data, 'INFO')\n }\n })\n task.renderHook$.subscribe(() => {\n if (task.hasSubtasks()) {\n const activeSubtasks = task.subtasks.filter((subtask) => {\n return [ListrTaskState.PENDING, ListrTaskState.COMPLETED].includes(subtask.state as ListrTaskState)\n })\n activeSubtasks.forEach((subtask) => {\n if (subtask.title && !loggedSubtaskTitles.includes(subtask.title)) {\n loggedSubtaskTitles.push(subtask.title)\n logToFile(subtask.title, 'INFO')\n }\n })\n }\n })\n })\n return listr\n}\n\nexport type ListrTasks = ConstructorParameters<typeof OriginalListr>[0]\nexport type {ListrTaskWrapper, ListrDefaultRenderer, ListrTask} from 'listr2'\n\nexport interface Question<TName extends string = string> {\n name: TName\n message: string\n preface?: string\n validate?: (value: string) => string | true\n default?: string\n result?: (value: string) => string | boolean\n type: 'input' | 'select' | 'autocomplete' | 'password'\n choices?: {name: string; value: string}[]\n}\n\nconst started = (content: Message, logger: Logger) => {\n const message = `${colors.yellow('❯')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\nconst failed = (content: Message, logger: Logger) => {\n const message = `${colors.red('✖')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\n/**\n * Performs a task with the title kept up to date and stdout available to the\n * task while it runs (there is no re-writing stdout while the task runs).\n */\nexport interface TaskOptions {\n title: string\n task: () => Promise<void | {successMessage: string}>\n}\nexport const task = async ({title, task}: TaskOptions) => {\n let success\n started(title, logUpdate)\n try {\n const result = await task()\n success = result?.successMessage || title\n } catch (err) {\n failed(title, logUpdate)\n logUpdate.done()\n throw err\n }\n completed(success, logUpdate)\n logUpdate.done()\n}\nexport const prompt = async <\n TName extends string & keyof TAnswers,\n TAnswers extends {[key in TName]: string} = {[key in TName]: string},\n>(\n questions: ReadonlyArray<Question<TName>>,\n): Promise<TAnswers> => {\n if (!isTerminalInteractive() && questions.length !== 0) {\n throw new Abort(content`\nThe CLI prompted in a non-interactive terminal with the following questions:\n${token.json(questions)}\n `)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const mappedQuestions: any[] = questions.map(mapperUI)\n const value = {} as TAnswers\n for (const question of mappedQuestions) {\n if (question.preface) {\n info(question.preface)\n }\n\n // eslint-disable-next-line no-await-in-loop\n value[question.name as TName] = await executorUI(question)\n\n logPromptResults(question.message, value[question.name as TName])\n }\n return value\n}\n\nfunction logPromptResults(questionName: string, answer: string) {\n logToFile([questionName, answer].join(' '), 'INFO')\n}\n\nexport async function nonEmptyDirectoryPrompt(directory: string) {\n if (await exists(directory)) {\n const options = [\n {name: 'No, don’t delete the files', value: 'abort'},\n {name: 'Yes, delete the files', value: 'overwrite'},\n ]\n\n const relativeDirectory = relative(process.cwd(), directory)\n\n const questions: Question<'value'> = {\n type: 'select',\n name: 'value',\n message: `${relativeDirectory} is not an empty directory. Do you want to delete the existing files and continue?`,\n choices: options,\n }\n\n const choice = await prompt([questions])\n\n if (choice.value === 'abort') {\n throw new CancelExecution()\n }\n\n await remove(directory)\n }\n}\n\nexport async function terminateBlockingPortProcessPrompt(port: number, stepDescription?: string): Promise<boolean> {\n const stepDescriptionContent = stepDescription ?? 'current step'\n\n const processInfo = await findProcess('port', port)\n const formattedProcessName =\n processInfo && processInfo.length > 0 && processInfo[0].name\n ? ` ${content`${token.italic(`(${processInfo[0].name})`)}`.value}`\n : ''\n\n const options = [\n {name: 'Yes, terminate process in order to log in now', value: 'finish'},\n {name: `No, cancel command and try later`, value: 'cancel'},\n ]\n\n const choice = await prompt([\n {\n type: 'select',\n name: 'value',\n message: `${stepDescriptionContent} requires a port ${port} that's unavailable because it's running another process${formattedProcessName}. Terminate that process? `,\n choices: options,\n },\n ])\n return choice.value === 'finish'\n}\n\nexport const keypress = async () => {\n process.stdin.setRawMode(true)\n process.stdin.resume()\n return new Promise<void>((resolve) =>\n process.stdin.once('data', () => {\n process.stdin.setRawMode(false)\n resolve()\n }),\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,KAAK,EAAC,MAAM,YAAY,CAAA;AACjD,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,WAAW,CAAA;AACxC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAmB,gBAAgB,EAAC,MAAM,aAAa,CAAA;AACpH,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,OAAO,EAAC,qBAAqB,EAAC,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAC,MAAM,IAAI,QAAQ,EAAE,GAAG,IAAI,UAAU,EAAC,MAAM,kBAAkB,CAAA;AACtE,OAAO,EAAC,KAAK,IAAI,aAAa,EAAyB,cAAc,EAAC,MAAM,QAAQ,CAAA;AACpF,OAAO,WAAW,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,QAAQ,CAAC,KAAkB,EAAE,OAAgB;IAC3D,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC/C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,MAAM,mBAAmB,GAAa,EAAE,CAAA;QACxC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAiB,EAAE,EAAE;YACnC,IAAI,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I,CAAC,CAAA;IACnD,MAAM,oBAAoB,GACxB,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI;QAC3D,CAAC,CAAC,IAAI,OAAO,CAAA,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE;QAClE,CAAC,CAAC,EAAE,CAAA;IAER,MAAM,OAAO,GAAG;QACd,EAAC,IAAI,EAAE,+CAA+C,EAAE,KAAK,EAAE,QAAQ,EAAC;QACxE,EAAC,IAAI,EAAE,kCAAkC,EAAE,KAAK,EAAE,QAAQ,EAAC;KAC5D,CAAA;IAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;QAC1B;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,GAAG,sBAAsB,oBAAoB,IAAI,2DAA2D,oBAAoB,4BAA4B;YACrK,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAA;AAClC,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;IACjC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAC9B,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;IACtB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CACnC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;QAC9B,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;QAC/B,OAAO,EAAE,CAAA;IACX,CAAC,CAAC,CACH,CAAA;AACH,CAAC,CAAA","sourcesContent":["import {CancelExecution, Abort} from './error.js'\nimport {remove, exists} from './file.js'\nimport {info, completed, content, token, logUpdate, logToFile, Message, Logger, stringifyMessage} from './output.js'\nimport {colors} from './node/colors.js'\nimport {relative} from './path.js'\nimport {isTerminalInteractive} from './environment/local.js'\nimport {mapper as mapperUI, run as executorUI} from './ui/executor.js'\nimport {Listr as OriginalListr, ListrTask, ListrEvent, ListrTaskState} from 'listr2'\nimport findProcess from 'find-process'\n\nexport function newListr(tasks: ListrTask[], options?: object) {\n const listr = new OriginalListr(tasks, options)\n listr.tasks.forEach((task) => {\n const loggedSubtaskTitles: string[] = []\n task.subscribe((event: ListrEvent) => {\n if (event.type === 'TITLE' && typeof event.data === 'string') {\n logToFile(event.data, 'INFO')\n }\n })\n task.renderHook$.subscribe(() => {\n if (task.hasSubtasks()) {\n const activeSubtasks = task.subtasks.filter((subtask) => {\n return [ListrTaskState.PENDING, ListrTaskState.COMPLETED].includes(subtask.state as ListrTaskState)\n })\n activeSubtasks.forEach((subtask) => {\n if (subtask.title && !loggedSubtaskTitles.includes(subtask.title)) {\n loggedSubtaskTitles.push(subtask.title)\n logToFile(subtask.title, 'INFO')\n }\n })\n }\n })\n })\n return listr\n}\n\nexport type ListrTasks = ConstructorParameters<typeof OriginalListr>[0]\nexport type {ListrTaskWrapper, ListrDefaultRenderer, ListrTask} from 'listr2'\n\nexport interface Question<TName extends string = string> {\n name: TName\n message: string\n preface?: string\n validate?: (value: string) => string | true\n default?: string\n result?: (value: string) => string | boolean\n type: 'input' | 'select' | 'autocomplete' | 'password'\n choices?: QuestionChoiceType[]\n}\n\nexport interface QuestionChoiceType {\n name: string\n value: string\n group?: {name: string; order: number}\n}\n\nconst started = (content: Message, logger: Logger) => {\n const message = `${colors.yellow('❯')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\nconst failed = (content: Message, logger: Logger) => {\n const message = `${colors.red('✖')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\n/**\n * Performs a task with the title kept up to date and stdout available to the\n * task while it runs (there is no re-writing stdout while the task runs).\n */\nexport interface TaskOptions {\n title: string\n task: () => Promise<void | {successMessage: string}>\n}\nexport const task = async ({title, task}: TaskOptions) => {\n let success\n started(title, logUpdate)\n try {\n const result = await task()\n success = result?.successMessage || title\n } catch (err) {\n failed(title, logUpdate)\n logUpdate.done()\n throw err\n }\n completed(success, logUpdate)\n logUpdate.done()\n}\nexport const prompt = async <\n TName extends string & keyof TAnswers,\n TAnswers extends {[key in TName]: string} = {[key in TName]: string},\n>(\n questions: ReadonlyArray<Question<TName>>,\n): Promise<TAnswers> => {\n if (!isTerminalInteractive() && questions.length !== 0) {\n throw new Abort(content`\nThe CLI prompted in a non-interactive terminal with the following questions:\n${token.json(questions)}\n `)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const mappedQuestions: any[] = questions.map(mapperUI)\n const value = {} as TAnswers\n for (const question of mappedQuestions) {\n if (question.preface) {\n info(question.preface)\n }\n\n // eslint-disable-next-line no-await-in-loop\n value[question.name as TName] = await executorUI(question)\n\n logPromptResults(question.message, value[question.name as TName])\n }\n return value\n}\n\nfunction logPromptResults(questionName: string, answer: string) {\n logToFile([questionName, answer].join(' '), 'INFO')\n}\n\nexport async function nonEmptyDirectoryPrompt(directory: string) {\n if (await exists(directory)) {\n const options = [\n {name: 'No, don’t delete the files', value: 'abort'},\n {name: 'Yes, delete the files', value: 'overwrite'},\n ]\n\n const relativeDirectory = relative(process.cwd(), directory)\n\n const questions: Question<'value'> = {\n type: 'select',\n name: 'value',\n message: `${relativeDirectory} is not an empty directory. Do you want to delete the existing files and continue?`,\n choices: options,\n }\n\n const choice = await prompt([questions])\n\n if (choice.value === 'abort') {\n throw new CancelExecution()\n }\n\n await remove(directory)\n }\n}\n\nexport async function terminateBlockingPortProcessPrompt(port: number, stepDescription?: string): Promise<boolean> {\n const stepDescriptionContent = stepDescription ?? 'current step'\n\n const processInfo = await findProcess('port', port)\n const formattedProcessName =\n processInfo && processInfo.length > 0 && processInfo[0]?.name\n ? ` ${content`${token.italic(`(${processInfo[0].name})`)}`.value}`\n : ''\n\n const options = [\n {name: 'Yes, terminate process in order to log in now', value: 'finish'},\n {name: `No, cancel command and try later`, value: 'cancel'},\n ]\n\n const choice = await prompt([\n {\n type: 'select',\n name: 'value',\n message: `${stepDescriptionContent} requires a port ${port} that's unavailable because it's running another process${formattedProcessName}. Terminate that process? `,\n choices: options,\n },\n ])\n return choice.value === 'finish'\n}\n\nexport const keypress = async () => {\n process.stdin.setRawMode(true)\n process.stdin.resume()\n return new Promise<void>((resolve) =>\n process.stdin.once('data', () => {\n process.stdin.setRawMode(false)\n resolve()\n }),\n )\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli-kit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A set of utilities, interfaces, and models that are common across all the platform features",
|
|
6
6
|
"keywords": [
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"@shopify:registry": "https://registry.npmjs.org"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
|
-
"
|
|
51
|
-
"build": "
|
|
52
|
-
"
|
|
53
|
-
"lint": "
|
|
54
|
-
"lint:fix": "
|
|
55
|
-
"test": "
|
|
56
|
-
"test:watch": "
|
|
57
|
-
"
|
|
50
|
+
"prepack": "cross-env NODE_ENV=production yarn nx build && cp ../../README.md README.md",
|
|
51
|
+
"build": "nx build",
|
|
52
|
+
"clean": "nx clean",
|
|
53
|
+
"lint": "nx lint",
|
|
54
|
+
"lint:fix": "nx lint:fix",
|
|
55
|
+
"test": "nx run cli-kit:test",
|
|
56
|
+
"test:watch": "nx test:watch",
|
|
57
|
+
"type-check": "nx type-check"
|
|
58
58
|
},
|
|
59
59
|
"eslintConfig": {
|
|
60
60
|
"extends": [
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"node-fetch": "^3.2.4",
|
|
113
113
|
"open": "^8.4.0",
|
|
114
114
|
"pathe": "0.2.0",
|
|
115
|
-
"prettier": "^2.
|
|
115
|
+
"prettier": "^2.7.1",
|
|
116
116
|
"semver": "^7.3.6",
|
|
117
117
|
"simple-git": "^3.5.0",
|
|
118
118
|
"source-map-support": "^0.5.21",
|
|
@@ -133,6 +133,6 @@
|
|
|
133
133
|
"@types/js-yaml": "^4.0.5",
|
|
134
134
|
"@types/semver": "^7.3.9",
|
|
135
135
|
"node-stream-zip": "^1.15.0",
|
|
136
|
-
"vitest": "^0.
|
|
136
|
+
"vitest": "^0.22.1"
|
|
137
137
|
}
|
|
138
138
|
}
|