@bigcommerce/stencil-cli 3.8.4 → 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 +17 -0
- package/lib/stencil-push.js +1 -1
- package/lib/stencil-push.utils.js +38 -5
- package/lib/utils/frontmatter.js +1 -1
- package/package-lock.json +17 -24
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
### 3.9.2 (2022-01-31)
|
|
2
|
+
|
|
3
|
+
- chore: bump paper to latest ([863](https://github.com/bigcommerce/stencil-cli/pull/863))
|
|
4
|
+
|
|
5
|
+
### 3.9.1 (2022-01-25)
|
|
6
|
+
|
|
7
|
+
- fix: strf-9612 Fix stencil pull when there is 1 channel ([859](https://github.com/bigcommerce/stencil-cli/pull/859))
|
|
8
|
+
|
|
9
|
+
### 3.9.0 (2022-01-21)
|
|
10
|
+
|
|
11
|
+
- fix: return channel id as an iterable when a store only has a single storefront ([849](https://github.com/bigcommerce/stencil-cli/pull/849))
|
|
12
|
+
- feat: warn npm users if npm is above 7 version ([846](https://github.com/bigcommerce/stencil-cli/pull/846))
|
|
13
|
+
|
|
14
|
+
### 3.8.5 (2022-01-18)
|
|
15
|
+
|
|
16
|
+
- fix(storefront): strf-9594 loosed frontmatter refex ([841](https://github.com/bigcommerce/stencil-cli/pull/841))
|
|
17
|
+
|
|
1
18
|
### 3.8.4 (2022-01-13)
|
|
2
19
|
|
|
3
20
|
- fix: `stencil init` command including `apiHost` option is now recognized ([830](https://github.com/bigcommerce/stencil-cli/pull/830))
|
package/lib/stencil-push.js
CHANGED
|
@@ -18,7 +18,7 @@ function stencilPush(options = {}, callback) {
|
|
|
18
18
|
utils.pollForJobCompletion((data) => ({ themeId: data.theme_id })),
|
|
19
19
|
utils.promptUserWhetherToApplyTheme,
|
|
20
20
|
utils.getChannels,
|
|
21
|
-
utils.
|
|
21
|
+
utils.promptUserForChannels,
|
|
22
22
|
utils.getVariations,
|
|
23
23
|
utils.promptUserForVariation,
|
|
24
24
|
utils.requestToApplyVariationWithRetrys(),
|
|
@@ -274,6 +274,7 @@ utils.promptUserWhetherToApplyTheme = async (options) => {
|
|
|
274
274
|
utils.getChannels = async (options) => {
|
|
275
275
|
const {
|
|
276
276
|
config: { accessToken },
|
|
277
|
+
channelId,
|
|
277
278
|
channelIds,
|
|
278
279
|
storeHash,
|
|
279
280
|
applyTheme,
|
|
@@ -281,7 +282,7 @@ utils.getChannels = async (options) => {
|
|
|
281
282
|
|
|
282
283
|
const apiHost = options.apiHost || options.config.apiHost;
|
|
283
284
|
|
|
284
|
-
if (!applyTheme || channelIds) {
|
|
285
|
+
if (!applyTheme || channelIds || channelId) {
|
|
285
286
|
return options;
|
|
286
287
|
}
|
|
287
288
|
|
|
@@ -338,7 +339,7 @@ utils.getVariations = async (options) => {
|
|
|
338
339
|
return { ...options, variations };
|
|
339
340
|
};
|
|
340
341
|
|
|
341
|
-
utils.
|
|
342
|
+
utils.promptUserForChannels = async (options) => {
|
|
342
343
|
const { applyTheme, channelIds, channels, allChannels } = options;
|
|
343
344
|
|
|
344
345
|
if (!applyTheme || channelIds) {
|
|
@@ -350,13 +351,13 @@ utils.promptUserForChannel = async (options) => {
|
|
|
350
351
|
return { ...options, channelIds: allIds };
|
|
351
352
|
}
|
|
352
353
|
|
|
353
|
-
const selectedChannelIds = await utils.
|
|
354
|
+
const selectedChannelIds = await utils.promptUserToSelectChannels(channels);
|
|
354
355
|
return { ...options, channelIds: selectedChannelIds };
|
|
355
356
|
};
|
|
356
357
|
|
|
357
|
-
utils.
|
|
358
|
+
utils.promptUserToSelectChannels = async (channels) => {
|
|
358
359
|
if (channels.length < 2) {
|
|
359
|
-
return channels[0].channel_id;
|
|
360
|
+
return [channels[0].channel_id];
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
const questions = [
|
|
@@ -375,6 +376,38 @@ utils.promptUserToSelectChannel = async (channels) => {
|
|
|
375
376
|
return answer.channelIds;
|
|
376
377
|
};
|
|
377
378
|
|
|
379
|
+
utils.promptUserForChannel = async (options) => {
|
|
380
|
+
const { applyTheme, channelId, channels } = options;
|
|
381
|
+
|
|
382
|
+
if (!applyTheme || channelId) {
|
|
383
|
+
return options;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const selectedChannelId = await utils.promptUserToSelectChannel(channels);
|
|
387
|
+
return { ...options, channelId: selectedChannelId };
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
utils.promptUserToSelectChannel = async (channels) => {
|
|
391
|
+
if (channels.length < 2) {
|
|
392
|
+
return channels[0].channel_id;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const questions = [
|
|
396
|
+
{
|
|
397
|
+
type: 'list',
|
|
398
|
+
name: 'channelId',
|
|
399
|
+
message: 'Which channel would you like to use?',
|
|
400
|
+
choices: channels.map((channel) => ({
|
|
401
|
+
name: channel.url,
|
|
402
|
+
value: channel.channel_id,
|
|
403
|
+
})),
|
|
404
|
+
},
|
|
405
|
+
];
|
|
406
|
+
|
|
407
|
+
const answer = await Inquirer.prompt(questions);
|
|
408
|
+
return answer.channelId;
|
|
409
|
+
};
|
|
410
|
+
|
|
378
411
|
utils.promptUserForVariation = async (options) => {
|
|
379
412
|
if (!options.applyTheme || options.variationId) {
|
|
380
413
|
return options;
|
package/lib/utils/frontmatter.js
CHANGED
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/stencil-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -537,9 +537,9 @@
|
|
|
537
537
|
}
|
|
538
538
|
},
|
|
539
539
|
"@bigcommerce/stencil-paper": {
|
|
540
|
-
"version": "3.0.0-rc.
|
|
541
|
-
"resolved": "https://registry.npmjs.org/@bigcommerce/stencil-paper/-/stencil-paper-3.0.0-rc.
|
|
542
|
-
"integrity": "sha512-
|
|
540
|
+
"version": "3.0.0-rc.54",
|
|
541
|
+
"resolved": "https://registry.npmjs.org/@bigcommerce/stencil-paper/-/stencil-paper-3.0.0-rc.54.tgz",
|
|
542
|
+
"integrity": "sha512-vCjVW7zBrsRu7CypgHs3WHoRGHvKXFTn3N8TJ3ZCaDbOuZJbPKE/+cr5M9Yl+OOglAQ5LCVwjPG7cn5HUg5OvA==",
|
|
543
543
|
"requires": {
|
|
544
544
|
"@bigcommerce/stencil-paper-handlebars": "4.5.1",
|
|
545
545
|
"accept-language-parser": "~1.4.1",
|
|
@@ -2873,6 +2873,16 @@
|
|
|
2873
2873
|
"is-string": "^1.0.5"
|
|
2874
2874
|
}
|
|
2875
2875
|
},
|
|
2876
|
+
"array-sort": {
|
|
2877
|
+
"version": "0.1.4",
|
|
2878
|
+
"resolved": "https://registry.npmjs.org/array-sort/-/array-sort-0.1.4.tgz",
|
|
2879
|
+
"integrity": "sha512-BNcM+RXxndPxiZ2rd76k6nyQLRZr2/B/sdi8pQ+Joafr5AH279L40dfokSUTp8O+AaqYjXWhblBWa2st2nc4fQ==",
|
|
2880
|
+
"requires": {
|
|
2881
|
+
"default-compare": "^1.0.0",
|
|
2882
|
+
"get-value": "^2.0.6",
|
|
2883
|
+
"kind-of": "^5.0.2"
|
|
2884
|
+
}
|
|
2885
|
+
},
|
|
2876
2886
|
"array-union": {
|
|
2877
2887
|
"version": "2.1.0",
|
|
2878
2888
|
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
|
|
@@ -7640,23 +7650,6 @@
|
|
|
7640
7650
|
"arr-flatten": "^1.0.1"
|
|
7641
7651
|
}
|
|
7642
7652
|
},
|
|
7643
|
-
"array-sort": {
|
|
7644
|
-
"version": "0.1.4",
|
|
7645
|
-
"resolved": "https://registry.npmjs.org/array-sort/-/array-sort-0.1.4.tgz",
|
|
7646
|
-
"integrity": "sha512-BNcM+RXxndPxiZ2rd76k6nyQLRZr2/B/sdi8pQ+Joafr5AH279L40dfokSUTp8O+AaqYjXWhblBWa2st2nc4fQ==",
|
|
7647
|
-
"requires": {
|
|
7648
|
-
"default-compare": "^1.0.0",
|
|
7649
|
-
"get-value": "^2.0.6",
|
|
7650
|
-
"kind-of": "^5.0.2"
|
|
7651
|
-
},
|
|
7652
|
-
"dependencies": {
|
|
7653
|
-
"kind-of": {
|
|
7654
|
-
"version": "5.1.0",
|
|
7655
|
-
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
|
|
7656
|
-
"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
|
|
7657
|
-
}
|
|
7658
|
-
}
|
|
7659
|
-
},
|
|
7660
7653
|
"array-unique": {
|
|
7661
7654
|
"version": "0.2.1",
|
|
7662
7655
|
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
|
|
@@ -15443,9 +15436,9 @@
|
|
|
15443
15436
|
"integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g=="
|
|
15444
15437
|
},
|
|
15445
15438
|
"uglify-js": {
|
|
15446
|
-
"version": "3.
|
|
15447
|
-
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.
|
|
15448
|
-
"integrity": "sha512-
|
|
15439
|
+
"version": "3.15.0",
|
|
15440
|
+
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.0.tgz",
|
|
15441
|
+
"integrity": "sha512-x+xdeDWq7FiORDvyIJ0q/waWd4PhjBNOm5dQUOq2AKC0IEjxOS66Ha9tctiVDGcRQuh69K7fgU5oRuTK4cysSg==",
|
|
15449
15442
|
"optional": true
|
|
15450
15443
|
},
|
|
15451
15444
|
"uglify-to-browserify": {
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/stencil-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"description": "CLI tool to run BigCommerce Stores locally for theme development.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": "^10.17 || ^12"
|
|
7
|
+
"node": "^10.17 || ^12",
|
|
8
|
+
"npm": ">=v6.11.3 <7.0.0"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
11
|
"lint": "eslint . && prettier --check . --ignore-unknown",
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"package-lock.json"
|
|
45
46
|
],
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@bigcommerce/stencil-paper": "
|
|
48
|
+
"@bigcommerce/stencil-paper": "3.0.0-rc.54",
|
|
48
49
|
"@bigcommerce/stencil-styles": "2.1.1",
|
|
49
50
|
"@hapi/boom": "^8.0.1",
|
|
50
51
|
"@hapi/glue": "^6.2.0",
|