UNPKG

5.67 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.supportedServices = void 0;
4exports.supportedServices = {
5 AppSync: {
6 inputs: [
7 {
8 key: 'resourceName',
9 type: 'input',
10 question: 'Provide a friendly name for your resource to be used as label for this category in the project:',
11 validation: {
12 operator: 'regex',
13 value: '^[a-zA-Z0-9]+$',
14 onErrorMsg: 'Resource name should be alphanumeric',
15 },
16 required: true,
17 },
18 {
19 key: 'apiName',
20 type: 'input',
21 question: 'Provide API name:',
22 validation: {
23 operator: 'regex',
24 value: '^[a-zA-Z0-9]+$',
25 onErrorMsg: 'You can use the following characters: a-z A-Z 0-9',
26 },
27 required: true,
28 },
29 {
30 key: 'apiCreationChoice',
31 type: 'confirm',
32 question: 'Do you have an annotated GraphQL schema?',
33 required: true,
34 },
35 {
36 key: 'schemaFilePath',
37 type: 'input',
38 question: 'Provide your schema file path:',
39 required: true,
40 },
41 {
42 key: 'templateSelection',
43 type: 'list',
44 question: 'Choose a schema template:',
45 options: [
46 {
47 name: 'Single object with fields (e.g., “Todo” with ID, name, description)',
48 value: 'single-object-schema.graphql',
49 },
50 {
51 name: 'One-to-many relationship (e.g., “Blogs” with “Posts” and “Comments”)',
52 value: 'many-relationship-schema.graphql',
53 },
54 {
55 name: 'Objects with fine-grained access control (e.g., a project management app with owner-based authorization)',
56 value: 'single-object-auth-schema.graphql',
57 },
58 ],
59 required: true,
60 },
61 {
62 key: 'editSchemaChoice',
63 type: 'confirm',
64 question: 'Do you want to edit the schema now?',
65 required: true,
66 },
67 {
68 key: 'editorSelection',
69 type: 'list',
70 question: 'Choose the editor you want to open the schema in:',
71 options: [
72 {
73 name: 'Sublime Text',
74 value: 'sublime',
75 },
76 {
77 name: 'Atom Editor',
78 value: 'atom',
79 },
80 {
81 name: 'Visual Studio Code',
82 value: 'code',
83 },
84 {
85 name: 'IDEA 14 CE',
86 value: 'idea14ce',
87 },
88 {
89 name: 'Vim (via Terminal, Mac OS only)',
90 value: 'vim',
91 },
92 {
93 name: 'Emacs (via Terminal, Mac OS only)',
94 value: 'emacs',
95 },
96 {
97 name: 'None - Use my env variables to open my default editor',
98 value: 'none',
99 },
100 ],
101 required: true,
102 },
103 {
104 key: 'dynamoDbType',
105 type: 'list',
106 question: 'Choose a DynamoDB data source option',
107 options: [
108 {
109 name: 'Use the DynamoDB table configured in the current Amplify project',
110 value: 'currentProject',
111 },
112 {
113 name: 'Create a new DynamoDB table',
114 value: 'newResource',
115 },
116 {
117 name: 'Use a DynamoDB table already deployed on AWS',
118 value: 'cloudResource',
119 },
120 ],
121 },
122 ],
123 alias: 'GraphQL',
124 defaultValuesFilename: 'appSync-defaults.js',
125 serviceWalkthroughFilename: 'appSync-walkthrough.js',
126 cfnFilename: 'appSync-cloudformation-template-default.yml.ejs',
127 provider: 'awscloudformation',
128 },
129 'API Gateway': {
130 inputs: [
131 {
132 key: 'apiName',
133 question: 'Provide a friendly name for your API:',
134 required: true,
135 },
136 {
137 key: 'pathName',
138 question: 'HTTP path name?',
139 type: 'input',
140 required: 'true',
141 },
142 {
143 key: 'lambdaFunction',
144 question: 'Select the Lambda function',
145 required: true,
146 type: 'input',
147 },
148 ],
149 alias: 'REST',
150 defaultValuesFilename: 'apigw-defaults.js',
151 serviceWalkthroughFilename: 'apigw-walkthrough.js',
152 cfnFilename: 'apigw-cloudformation-template-default.json.ejs',
153 provider: 'awscloudformation',
154 },
155};
156//# sourceMappingURL=supported-services.js.map
\No newline at end of file