@swell/cli 2.1.0 → 2.2.0
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/dist/commands/api/delete.d.ts +15 -0
- package/dist/commands/api/delete.js +26 -0
- package/dist/commands/api/get.d.ts +15 -0
- package/dist/commands/api/get.js +31 -0
- package/dist/commands/api/index.d.ts +7 -0
- package/dist/commands/api/index.js +16 -0
- package/dist/commands/api/post.d.ts +16 -0
- package/dist/commands/api/post.js +33 -0
- package/dist/commands/api/put.d.ts +16 -0
- package/dist/commands/api/put.js +33 -0
- package/dist/commands/app/dev.d.ts +9 -9
- package/dist/commands/app/dev.js +158 -136
- package/dist/commands/app/frontend/dev.d.ts +1 -1
- package/dist/commands/app/frontend/dev.js +84 -78
- package/dist/commands/app/install.js +3 -3
- package/dist/commands/app/pull.d.ts +1 -1
- package/dist/commands/app/pull.js +6 -6
- package/dist/commands/app/push.d.ts +3 -3
- package/dist/commands/app/push.js +8 -6
- package/dist/commands/app/release.d.ts +1 -1
- package/dist/commands/app/release.js +1 -1
- package/dist/commands/app/version.d.ts +1 -1
- package/dist/commands/app/version.js +5 -3
- package/dist/commands/create/app.d.ts +10 -2
- package/dist/commands/create/app.js +226 -57
- package/dist/commands/create/content.d.ts +4 -0
- package/dist/commands/create/content.js +83 -15
- package/dist/commands/create/function.js +27 -5
- package/dist/commands/create/model.d.ts +4 -0
- package/dist/commands/create/model.js +120 -25
- package/dist/commands/inspect/content.d.ts +25 -0
- package/dist/commands/inspect/content.js +159 -0
- package/dist/commands/inspect/index.d.ts +7 -0
- package/dist/commands/inspect/index.js +16 -0
- package/dist/commands/inspect/models.d.ts +27 -0
- package/dist/commands/inspect/models.js +197 -0
- package/dist/commands/schema.d.ts +27 -0
- package/dist/commands/schema.js +231 -0
- package/dist/commands/theme/dev.d.ts +1 -1
- package/dist/commands/theme/dev.js +2 -2
- package/dist/commands/theme/init.d.ts +1 -1
- package/dist/commands/theme/init.js +1 -1
- package/dist/commands/theme/pull.d.ts +2 -2
- package/dist/commands/theme/pull.js +2 -2
- package/dist/commands/theme/push.d.ts +1 -1
- package/dist/commands/theme/push.js +1 -1
- package/dist/create-app-command.d.ts +12 -2
- package/dist/create-app-command.js +103 -80
- package/dist/create-collection-command.js +4 -1
- package/dist/create-config-command.js +4 -0
- package/dist/env/local.d.ts +1 -0
- package/dist/env/local.js +1 -0
- package/dist/env/production.d.ts +1 -0
- package/dist/env/production.js +1 -0
- package/dist/env/review.d.ts +1 -0
- package/dist/env/review.js +1 -0
- package/dist/env/staging.d.ts +1 -0
- package/dist/env/staging.js +1 -0
- package/dist/lib/api.d.ts +16 -5
- package/dist/lib/api.js +67 -25
- package/dist/lib/app-config.js +1 -0
- package/dist/lib/apps/index.d.ts +2 -0
- package/dist/lib/apps/index.js +20 -15
- package/dist/lib/config.d.ts +1 -1
- package/dist/lib/constants.d.ts +1 -0
- package/dist/lib/constants.js +1 -0
- package/dist/lib/create/content.d.ts +5 -1
- package/dist/lib/create/content.js +8 -1
- package/dist/lib/create/function.d.ts +2 -1
- package/dist/lib/create/function.js +7 -3
- package/dist/lib/create/model.d.ts +1 -0
- package/dist/lib/create/schemas.d.ts +6 -0
- package/dist/lib/create/schemas.js +6 -0
- package/dist/lib/sessions.js +4 -3
- package/dist/lib/style.js +0 -1
- package/dist/lib/theme-sync.d.ts +6 -6
- package/dist/lib/theme-sync.js +49 -39
- package/dist/push-app-command.d.ts +7 -7
- package/dist/push-app-command.js +38 -36
- package/dist/remote-app-command.d.ts +1 -1
- package/dist/remote-app-command.js +4 -2
- package/dist/swell-api-command.d.ts +13 -0
- package/dist/swell-api-command.js +75 -0
- package/dist/swell-command.d.ts +1 -1
- package/dist/swell-command.js +9 -9
- package/package.json +8 -1
- package/oclif.manifest.json +0 -1936
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
3
|
+
import Ajv2020 from 'ajv/dist/2020.js';
|
|
4
|
+
import ajvErrors from 'ajv-errors';
|
|
5
|
+
import addFormats from 'ajv-formats';
|
|
6
|
+
import * as fs from 'node:fs';
|
|
7
|
+
import parseJson from 'parse-json';
|
|
8
|
+
import { SCHEMAS_BASE_URL } from '../lib/constants.js';
|
|
9
|
+
import { SwellCommand } from '../swell-command.js';
|
|
10
|
+
const SCHEMA_DEFINITIONS = Object.freeze({
|
|
11
|
+
model: {
|
|
12
|
+
description: 'Data model definitions (/models/*.json)',
|
|
13
|
+
},
|
|
14
|
+
notification: {
|
|
15
|
+
description: 'Notification definitions (/notifications/*.json)',
|
|
16
|
+
},
|
|
17
|
+
content: {
|
|
18
|
+
description: 'Content views definitions (/content/*.json)',
|
|
19
|
+
},
|
|
20
|
+
setting: {
|
|
21
|
+
description: 'App settings definitions (/settings/*.json)',
|
|
22
|
+
},
|
|
23
|
+
webhook: {
|
|
24
|
+
description: 'Webhook definitions (/webhooks/*.json)',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export default class Schema extends SwellCommand {
|
|
28
|
+
static summary = 'View or validate Swell config JSON Schemas.';
|
|
29
|
+
static examples = [
|
|
30
|
+
{
|
|
31
|
+
description: 'List available schema types',
|
|
32
|
+
command: '<%= config.bin %> <%= command.id %>',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
description: 'Output JSON Schema',
|
|
36
|
+
command: '<%= config.bin %> <%= command.id %> content --format=json-schema',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
description: 'Output bundled JSON Schema (all $refs resolved)',
|
|
40
|
+
command: '<%= config.bin %> <%= command.id %> content --format=json-schema-bundle',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
description: 'Output TypeScript declarations',
|
|
44
|
+
command: '<%= config.bin %> <%= command.id %> content --format=dts',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
description: 'Validate a file',
|
|
48
|
+
command: '<%= config.bin %> <%= command.id %> content myfile.json',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
description: 'Validate from stdin',
|
|
52
|
+
command: 'cat myfile.json | <%= config.bin %> <%= command.id %> content -',
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
static args = {
|
|
56
|
+
type: Args.string({
|
|
57
|
+
required: false,
|
|
58
|
+
description: 'Schema type (e.g. model, content, setting, notification, webhook)',
|
|
59
|
+
}),
|
|
60
|
+
file: Args.string({
|
|
61
|
+
required: false,
|
|
62
|
+
description: 'Path to JSON file to validate (or use "-" for stdin)',
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
static flags = {
|
|
66
|
+
format: Flags.string({
|
|
67
|
+
description: 'Output format: json-schema (with $ref pointers), json-schema-bundle (all $refs resolved), or dts (TypeScript declarations)',
|
|
68
|
+
options: ['json-schema', 'json-schema-bundle', 'dts'],
|
|
69
|
+
}),
|
|
70
|
+
yes: Flags.boolean({
|
|
71
|
+
char: 'y',
|
|
72
|
+
description: 'Skip informational output and print schema directly (equivalent to --format=json-schema).',
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
async run() {
|
|
76
|
+
const { args, flags } = await this.parse(Schema);
|
|
77
|
+
const { type, file } = args;
|
|
78
|
+
const { format, yes } = flags;
|
|
79
|
+
// List available schema types
|
|
80
|
+
if (!type) {
|
|
81
|
+
this.listTypes();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// Validate type
|
|
85
|
+
if (!(type in SCHEMA_DEFINITIONS)) {
|
|
86
|
+
throw new Error(`Unknown schema type '${type}'. Use 'swell schema' to list available types`);
|
|
87
|
+
}
|
|
88
|
+
// Validate file
|
|
89
|
+
if (file) {
|
|
90
|
+
if (format) {
|
|
91
|
+
throw new Error('--format cannot be used with file validation');
|
|
92
|
+
}
|
|
93
|
+
await this.validate(type, file);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
// Show schema info or output schema
|
|
97
|
+
if (!format && !yes) {
|
|
98
|
+
await this.showSchemaInfo(type);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
// Output schema in requested format
|
|
102
|
+
const outputFormat = format || 'json-schema';
|
|
103
|
+
await this.outputSchema(type, outputFormat);
|
|
104
|
+
}
|
|
105
|
+
catch(error) {
|
|
106
|
+
return this.error(error.message, { exit: 1 });
|
|
107
|
+
}
|
|
108
|
+
listTypes() {
|
|
109
|
+
this.log('Available config schemas:\n');
|
|
110
|
+
const entries = Object.entries(SCHEMA_DEFINITIONS);
|
|
111
|
+
const maxKeyLength = Math.max(...entries.map(([key]) => key.length));
|
|
112
|
+
for (const [schemaType, config] of entries) {
|
|
113
|
+
const padded = schemaType.padEnd(maxKeyLength + 4);
|
|
114
|
+
this.log(` ${padded}${config.description}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
async showSchemaInfo(_type) {
|
|
118
|
+
this.log(`Use --format to output the schema, or provide a file to validate.`);
|
|
119
|
+
this.log(`Run "swell schema --help" for more information.`);
|
|
120
|
+
}
|
|
121
|
+
async outputSchema(type, format) {
|
|
122
|
+
let output;
|
|
123
|
+
switch (format) {
|
|
124
|
+
case 'json-schema': {
|
|
125
|
+
const schemaUrl = this.getSchemaUrl(type);
|
|
126
|
+
const response = await fetch(schemaUrl);
|
|
127
|
+
if (!response.ok) {
|
|
128
|
+
throw new Error(`Failed to fetch schema: ${response.statusText}`);
|
|
129
|
+
}
|
|
130
|
+
const schema = await response.json();
|
|
131
|
+
output = JSON.stringify(schema, null, 2);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case 'json-schema-bundle': {
|
|
135
|
+
const bundledUrl = this.getBundledSchemaUrl(type);
|
|
136
|
+
const response = await fetch(bundledUrl);
|
|
137
|
+
if (!response.ok) {
|
|
138
|
+
throw new Error(`Failed to fetch bundled schema: ${response.statusText}`);
|
|
139
|
+
}
|
|
140
|
+
const schema = await response.json();
|
|
141
|
+
output = JSON.stringify(schema, null, 2);
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
case 'dts': {
|
|
145
|
+
const dtsUrl = this.getTypeScriptDeclarationsUrl(type);
|
|
146
|
+
const response = await fetch(dtsUrl);
|
|
147
|
+
if (!response.ok) {
|
|
148
|
+
throw new Error(`Failed to fetch TypeScript declarations: ${response.statusText}`);
|
|
149
|
+
}
|
|
150
|
+
output = await response.text();
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
default: {
|
|
154
|
+
throw new Error(`Unknown format: ${format}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
this.log(output);
|
|
158
|
+
}
|
|
159
|
+
async validate(type, file) {
|
|
160
|
+
const isStdin = file === '-';
|
|
161
|
+
const input = isStdin
|
|
162
|
+
? await this.readFromStdin()
|
|
163
|
+
: await this.getFileInput(file);
|
|
164
|
+
let json;
|
|
165
|
+
try {
|
|
166
|
+
json = parseJson(input);
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
let errorTitle = 'Invalid JSON';
|
|
170
|
+
if (!isStdin) {
|
|
171
|
+
errorTitle += ` in '${file}'`;
|
|
172
|
+
}
|
|
173
|
+
throw new Error(`${errorTitle}: ${error.message}`);
|
|
174
|
+
}
|
|
175
|
+
const bundledUrl = this.getBundledSchemaUrl(type);
|
|
176
|
+
const response = await fetch(bundledUrl);
|
|
177
|
+
if (!response.ok) {
|
|
178
|
+
throw new Error(`Failed to fetch bundled schema: ${response.statusText}`);
|
|
179
|
+
}
|
|
180
|
+
const schema = await response.json();
|
|
181
|
+
const ajv = new Ajv2020({
|
|
182
|
+
allErrors: true,
|
|
183
|
+
strict: false,
|
|
184
|
+
});
|
|
185
|
+
addFormats(ajv);
|
|
186
|
+
ajvErrors(ajv);
|
|
187
|
+
const validate = ajv.compile(schema);
|
|
188
|
+
const valid = validate(json);
|
|
189
|
+
if (!valid) {
|
|
190
|
+
const { errors } = validate;
|
|
191
|
+
const errorLength = errors?.length;
|
|
192
|
+
let errorTitle = 'Invalid model definition';
|
|
193
|
+
if (typeof errorLength === 'number' && errorLength > 1) {
|
|
194
|
+
errorTitle += ` (${errorLength} errors)`;
|
|
195
|
+
}
|
|
196
|
+
let errorMessage = '';
|
|
197
|
+
for (const error of errors || []) {
|
|
198
|
+
const path = error.instancePath || '/';
|
|
199
|
+
errorMessage += `\n• ${path}: ${error.message} (schema: ${error.schemaPath})`;
|
|
200
|
+
}
|
|
201
|
+
throw new Error(`${errorTitle}\n${errorMessage}`);
|
|
202
|
+
}
|
|
203
|
+
this.log('Valid model definition');
|
|
204
|
+
}
|
|
205
|
+
getFileInput(file) {
|
|
206
|
+
if (!fs.existsSync(file)) {
|
|
207
|
+
throw new Error(`File not found: ${file}`);
|
|
208
|
+
}
|
|
209
|
+
return fs.promises.readFile(file, 'utf8');
|
|
210
|
+
}
|
|
211
|
+
readFromStdin() {
|
|
212
|
+
return new Promise((resolve, reject) => {
|
|
213
|
+
let data = '';
|
|
214
|
+
process.stdin.setEncoding('utf8');
|
|
215
|
+
process.stdin.on('data', (chunk) => {
|
|
216
|
+
data += chunk;
|
|
217
|
+
});
|
|
218
|
+
process.stdin.on('end', () => resolve(data));
|
|
219
|
+
process.stdin.on('error', reject);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
getSchemaUrl(type) {
|
|
223
|
+
return `${SCHEMAS_BASE_URL}/${type}.json`;
|
|
224
|
+
}
|
|
225
|
+
getBundledSchemaUrl(type) {
|
|
226
|
+
return `${SCHEMAS_BASE_URL}/schema-bundle/${type}.bundled.json`;
|
|
227
|
+
}
|
|
228
|
+
getTypeScriptDeclarationsUrl(type) {
|
|
229
|
+
return `${SCHEMAS_BASE_URL}/types/${type}.d.ts`;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PushAppCommand } from '../../push-app-command.js';
|
|
2
2
|
export default class AppThemeDev extends PushAppCommand {
|
|
3
|
-
appType: string;
|
|
4
3
|
static examples: string[];
|
|
5
4
|
static flags: {
|
|
6
5
|
bundle: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
@@ -12,6 +11,7 @@ export default class AppThemeDev extends PushAppCommand {
|
|
|
12
11
|
env: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
13
12
|
};
|
|
14
13
|
static summary: string;
|
|
14
|
+
appType: string;
|
|
15
15
|
logAppLocalUrl(storeId: string, sessionId: string): void;
|
|
16
16
|
run(): Promise<void>;
|
|
17
17
|
private findAndInstallDependencies;
|
|
@@ -5,10 +5,9 @@ import fs from 'node:fs';
|
|
|
5
5
|
import ora from 'ora';
|
|
6
6
|
import { default as localConfig } from '../../lib/config.js';
|
|
7
7
|
import style from '../../lib/style.js';
|
|
8
|
-
import { PushAppCommand } from '../../push-app-command.js';
|
|
9
8
|
import { ThemeSync } from '../../lib/theme-sync.js';
|
|
9
|
+
import { PushAppCommand } from '../../push-app-command.js';
|
|
10
10
|
export default class AppThemeDev extends PushAppCommand {
|
|
11
|
-
appType = 'theme';
|
|
12
11
|
static examples = [
|
|
13
12
|
'swell theme dev',
|
|
14
13
|
'swell theme dev --local',
|
|
@@ -43,6 +42,7 @@ export default class AppThemeDev extends PushAppCommand {
|
|
|
43
42
|
}),
|
|
44
43
|
};
|
|
45
44
|
static summary = `Run a theme in dev mode from your local machine.`;
|
|
45
|
+
appType = 'theme';
|
|
46
46
|
logAppLocalUrl(storeId, sessionId) {
|
|
47
47
|
this.log(`View it at ${style.link(this.localFrontendUrl(storeId, sessionId))}\n`);
|
|
48
48
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import InitApp from '../app/init.js';
|
|
2
2
|
export default class InitTheme extends InitApp {
|
|
3
|
-
appType = 'theme';
|
|
4
3
|
static description = 'Initialize theme swell.json in the current directory.';
|
|
5
4
|
static examples = [
|
|
6
5
|
{
|
|
@@ -12,4 +11,5 @@ export default class InitTheme extends InitApp {
|
|
|
12
11
|
description: 'Initialize theme and accept all default values.',
|
|
13
12
|
},
|
|
14
13
|
];
|
|
14
|
+
appType = 'theme';
|
|
15
15
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import AppPull from '../app/pull.js';
|
|
2
2
|
export default class AppThemePull extends AppPull {
|
|
3
|
-
appType: string;
|
|
4
3
|
static args: {
|
|
5
4
|
appId: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
6
5
|
targetPath: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
7
6
|
};
|
|
7
|
+
static delayOrientation: boolean;
|
|
8
8
|
static description: string;
|
|
9
9
|
static examples: string[];
|
|
10
10
|
static flags: {
|
|
@@ -15,6 +15,6 @@ export default class AppThemePull extends AppPull {
|
|
|
15
15
|
'sync-app': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
16
16
|
};
|
|
17
17
|
static summary: string;
|
|
18
|
-
|
|
18
|
+
appType: string;
|
|
19
19
|
run(): Promise<void>;
|
|
20
20
|
}
|
|
@@ -3,7 +3,6 @@ import { ThemeConfigPaths } from '../../lib/apps/index.js';
|
|
|
3
3
|
import style from '../../lib/style.js';
|
|
4
4
|
import AppPull from '../app/pull.js';
|
|
5
5
|
export default class AppThemePull extends AppPull {
|
|
6
|
-
appType = 'theme';
|
|
7
6
|
static args = {
|
|
8
7
|
appId: Args.string({
|
|
9
8
|
default: '',
|
|
@@ -14,6 +13,7 @@ export default class AppThemePull extends AppPull {
|
|
|
14
13
|
description: 'path to download theme files into',
|
|
15
14
|
}),
|
|
16
15
|
};
|
|
16
|
+
static delayOrientation = true;
|
|
17
17
|
static description = `Pull all theme files, a specific file, or a specific configuration
|
|
18
18
|
type from a theme in your store's test environment to your local machine.
|
|
19
19
|
|
|
@@ -53,7 +53,7 @@ ${Object.values(ThemeConfigPaths)
|
|
|
53
53
|
}),
|
|
54
54
|
};
|
|
55
55
|
static summary = 'Pull theme files from Swell to your local machine.';
|
|
56
|
-
|
|
56
|
+
appType = 'theme';
|
|
57
57
|
async run() {
|
|
58
58
|
const { args, flags } = await this.parse(AppThemePull);
|
|
59
59
|
const { force } = flags;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import AppPush from '../app/push.js';
|
|
2
2
|
export default class AppThemePush extends AppPush {
|
|
3
|
-
appType: string;
|
|
4
3
|
static args: {
|
|
5
4
|
file: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
|
6
5
|
};
|
|
@@ -14,5 +13,6 @@ export default class AppThemePush extends AppPush {
|
|
|
14
13
|
'sync-app': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
15
14
|
};
|
|
16
15
|
static summary: string;
|
|
16
|
+
appType: string;
|
|
17
17
|
run(): Promise<void>;
|
|
18
18
|
}
|
|
@@ -4,7 +4,6 @@ import { default as localConfig } from '../../lib/config.js';
|
|
|
4
4
|
import style from '../../lib/style.js';
|
|
5
5
|
import AppPush from '../app/push.js';
|
|
6
6
|
export default class AppThemePush extends AppPush {
|
|
7
|
-
appType = 'theme';
|
|
8
7
|
static args = {
|
|
9
8
|
file: Args.string({
|
|
10
9
|
char: 'f',
|
|
@@ -56,6 +55,7 @@ ${Object.values(ThemeConfigPaths)
|
|
|
56
55
|
}),
|
|
57
56
|
};
|
|
58
57
|
static summary = 'Push local files to your Swell theme.';
|
|
58
|
+
appType = 'theme';
|
|
59
59
|
async run() {
|
|
60
60
|
const { args, flags } = await this.parse(AppThemePush);
|
|
61
61
|
const { file } = args;
|
|
@@ -3,14 +3,15 @@ export declare abstract class CreateAppCommand extends SwellCommand {
|
|
|
3
3
|
static baseFlags: {
|
|
4
4
|
frontend: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
5
5
|
'storefront-app': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
6
|
+
'integration-type': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
7
|
+
'integration-id': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
6
8
|
yes: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
7
9
|
};
|
|
8
10
|
private devApi;
|
|
9
11
|
constructor(argv: string[], config: any);
|
|
10
|
-
addAllowedHostsToAstro(configPath: string): Promise<void>;
|
|
11
12
|
addAllowedHostsToAngular(configPath: string): Promise<void>;
|
|
13
|
+
addAllowedHostsToAstro(configPath: string): Promise<void>;
|
|
12
14
|
addAllowedHostsToNuxt(configPath: string): Promise<void>;
|
|
13
|
-
private addFrontendAllowedHosts;
|
|
14
15
|
createAppConfigFolders(swellConfig: any): Promise<void>;
|
|
15
16
|
createFrontendApp(swellConfig: any, flags: any, directCreate?: boolean, kind?: string): Promise<boolean>;
|
|
16
17
|
createStorefrontApp(swellConfig: any, flags: any, directCreate?: boolean): Promise<boolean>;
|
|
@@ -19,6 +20,15 @@ export declare abstract class CreateAppCommand extends SwellCommand {
|
|
|
19
20
|
execWithStdio(cwd: string, command: string, onOutput?: (string: string) => any | false): Promise<void>;
|
|
20
21
|
findPackageManager(pkg?: string): Promise<string | undefined>;
|
|
21
22
|
getInstalledStorefrontApps(): Promise<any[] | boolean>;
|
|
23
|
+
getProjectType(frameworkType: string): {
|
|
24
|
+
installCommand: string;
|
|
25
|
+
buildCommand?: string | undefined;
|
|
26
|
+
devCommand: string;
|
|
27
|
+
mainPackage: string;
|
|
28
|
+
name: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
};
|
|
22
31
|
setupPackage(name: string, config: any, pkg: string): Promise<void>;
|
|
23
32
|
tryPackageSetup(name: string, config: any, pkg: string): Promise<void>;
|
|
33
|
+
private addFrontendAllowedHosts;
|
|
24
34
|
}
|