MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / promptForInput

Function promptForInput

packages/payments/scripts/create-products.ts:19–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17}
18
19async function promptForInput() {
20 const answers = await inquirer.prompt<Answers>([
21 {
22 type: 'list',
23 name: 'isProduction',
24 message: 'Is this for production?',
25 choices: [
26 { name: 'Yes', value: true },
27 { name: 'No', value: false },
28 ],
29 default: true,
30 },
31 {
32 type: 'string',
33 name: 'polarOrganizationId',
34 message: 'Enter your Polar organization ID:',
35 },
36 {
37 type: 'string',
38 name: 'polarApiKey',
39 message: 'Enter your Polar API key:',
40 validate: (input: string) => {
41 if (!input) return 'API key is required';
42 return true;
43 },
44 },
45 ]);
46
47 return answers;
48}
49
50async function main() {
51 const input = await promptForInput();

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected