@faststore/cli
Advanced tools
Comparing version 2.0.3-alpha.0 to 2.0.12-alpha.0
@@ -6,2 +6,11 @@ # Change Log | ||
## [2.0.12-alpha.0](https://github.com/vtex/faststore/compare/v2.0.11-alpha.0...v2.0.12-alpha.0) (2022-12-13) | ||
### Features | ||
* Beautify CLI messages with chalk ([#1550](https://github.com/vtex/faststore/issues/1550)) ([6c4c32c](https://github.com/vtex/faststore/commit/6c4c32c3ac0a97b55364b7251f2d90dc70f08952)) | ||
## 2.0.3-alpha.0 (2022-11-30) | ||
@@ -8,0 +17,0 @@ |
@@ -5,5 +5,6 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const deepmerge_1 = tslib_1.__importDefault(require("deepmerge")); | ||
const fs_extra_1 = require("fs-extra"); | ||
const deepmerge_1 = tslib_1.__importDefault(require("deepmerge")); | ||
const directory_1 = require("./directory"); | ||
const chalk_1 = tslib_1.__importDefault(require("chalk")); | ||
const ignorePaths = ['node_modules']; | ||
@@ -16,9 +17,7 @@ function createTmpFolder() { | ||
(0, fs_extra_1.mkdirsSync)(directory_1.tmpDir); | ||
console.log(`${chalk_1.default.green('success')} - Temporary folder ${chalk_1.default.dim(directory_1.tmpFolderName)} created`); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.error(`${chalk_1.default.red('error')} - ${err}`); | ||
} | ||
finally { | ||
console.log(`Temporary folder ${directory_1.tmpFolderName} created`); | ||
} | ||
} | ||
@@ -36,2 +35,3 @@ function copyCoreFiles() { | ||
}); | ||
console.log(`${chalk_1.default.green('success')} - Core files copied`); | ||
} | ||
@@ -41,5 +41,2 @@ catch (e) { | ||
} | ||
finally { | ||
console.log(`Core files copied`); | ||
} | ||
} | ||
@@ -49,9 +46,7 @@ function copyUserSrcToCustomizations() { | ||
(0, fs_extra_1.copySync)(directory_1.userSrcDir, directory_1.tmpCustomizationsDir); | ||
console.log(`${chalk_1.default.green('success')} - Custom files copied`); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.error(`${chalk_1.default.red('error')} - ${err}`); | ||
} | ||
finally { | ||
console.log('Copied custom files'); | ||
} | ||
} | ||
@@ -62,9 +57,7 @@ async function copyTheme() { | ||
(0, fs_extra_1.copyFileSync)(`${directory_1.userThemesFileDir}/${storeConfig.theme}.scss`, directory_1.tmpThemesCustomizationsFileDir); | ||
console.log(`${chalk_1.default.green('success')} - Custom styles copied`); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.error(`${chalk_1.default.red('error')} - ${err}`); | ||
} | ||
finally { | ||
console.log('Copied custom styles'); | ||
} | ||
} | ||
@@ -79,9 +72,7 @@ function mergeCMSFile(fileName) { | ||
(0, fs_extra_1.writeFileSync)(`${directory_1.tmpCMSDir}/${fileName}`, JSON.stringify(mergeContentTypes)); | ||
console.log(`${chalk_1.default.green('success')} - CMS file ${chalk_1.default.dim(fileName)} created`); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.error(`${chalk_1.default.red('error')} - ${err}`); | ||
} | ||
finally { | ||
console.log(`CMS file ${fileName} created`); | ||
} | ||
} | ||
@@ -97,9 +88,7 @@ function generateStoreConfigFile(content) { | ||
(0, fs_extra_1.writeFileSync)(directory_1.tmpStoreConfigFileDir, generateStoreConfigFile(mergedStoreConfig)); | ||
console.log(`${chalk_1.default.green('success')} - File ${chalk_1.default.dim('store.config.js')} copied`); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.error(`${chalk_1.default.red('error')} - ${err}`); | ||
} | ||
finally { | ||
console.log(`File store.config.js copied`); | ||
} | ||
} | ||
@@ -109,9 +98,7 @@ function mergeCMSFiles() { | ||
(0, fs_extra_1.mkdirsSync)(`${directory_1.tmpDir}/cms`); | ||
console.log(`${chalk_1.default.green('success')} - CMS folder created`); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.error(`${chalk_1.default.red('error')} - ${err}`); | ||
} | ||
finally { | ||
console.log(`CMS file created`); | ||
} | ||
mergeCMSFile('content-types.json'); | ||
@@ -123,7 +110,7 @@ mergeCMSFile('sections.json'); | ||
(0, fs_extra_1.symlinkSync)(directory_1.userNodeModulesDir, directory_1.tmpNodeModulesDir); | ||
console.log(`${chalk_1.default.green('success')} - Symbolic ${chalk_1.default.dim('node_modules')} link created from ${chalk_1.default.dim(directory_1.userNodeModulesDir)} to ${chalk_1.default.dim(directory_1.tmpNodeModulesDir)}`); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.error(`${chalk_1.default.red('error')} - ${err}`); | ||
} | ||
console.log(`node_modules symbolic link created from ${directory_1.userNodeModulesDir} to ${directory_1.tmpNodeModulesDir}`); | ||
} | ||
@@ -130,0 +117,0 @@ async function generate(options) { |
{ | ||
"name": "@faststore/cli", | ||
"version": "2.0.3-alpha.0", | ||
"version": "2.0.12-alpha.0", | ||
"description": "FastStore CLI", | ||
@@ -23,2 +23,3 @@ "author": "Emerson Laurentino @emersonlaurentino", | ||
"@oclif/plugin-not-found": "^2.3.3", | ||
"chalk": "~4.1.2", | ||
"chokidar": "^3.5.3", | ||
@@ -41,2 +42,6 @@ "deepmerge": "^4.2.2", | ||
}, | ||
"volta": { | ||
"node": "16.18.0", | ||
"yarn": "1.19.1" | ||
}, | ||
"oclif": { | ||
@@ -68,3 +73,3 @@ "bin": "faststore", | ||
"types": "dist/index.d.ts", | ||
"gitHead": "6743690f41d38a7f6a1060f541775c8a6f82e2f5" | ||
"gitHead": "46332a271c557f6e7f80c79a589bc97393240908" | ||
} |
Sorry, the diff of this file is not supported yet
31095
8
344
+ Addedchalk@~4.1.2