Skip to content

Commit 0f33545

Browse files
committed
backup
1 parent baac9ca commit 0f33545

File tree

11 files changed

+43
-42
lines changed

11 files changed

+43
-42
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
[![Built.io Contentstack](https://contentstackdocs.built.io/static/images/logo.png)](https://www.built.io/products/contentstack/overview)
1+
[![Contentstack](https://www.contentstack.com/docs/static/images/contentstack.png)](https://www.contentstack.com/)
22

3-
# Built.io Contentstack Command Line Interface(CLI).
3+
# Contentstack command line interface(cli).
44

55
## Installation
6-
**Note: This version of Built.io Contentstack CLI can be used only for V3 stacks. Use CLI version 1.x, for V2 stacks.**
6+
**Note: This version of Contentstack CLI can be used only for v3 stacks.
7+
Use cli v1.x, for v2 stacks.**
78

8-
Run the following command in a Terminal or Command Prompt to globally install the latest version of Built.io Contentstack CLI on your system:
9+
Run the following command in a Terminal or Command Prompt to globally install the latest version of Contentstack CLI on your system:
910

1011
```bash
1112
$ npm install -g contentstack-cli
@@ -14,29 +15,29 @@ $ npm install -g contentstack-cli
1415

1516
## Commands in CLI
1617

17-
Built.io Contentstack CLI comes with handy commands which helps to achieve the support work for the contentstack-express like publishing, unpublishing, synchronizing the data, connecting existing stacks etc.
18+
Contentstack CLI comes with handy commands which helps to achieve the support work for the contentstack-express like publishing, unpublishing, synchronizing the data, connecting existing stacks etc.
1819

1920
```
2021
2122
**
2223
***
2324
****
24-
***** ** .----------------------------------.
25-
**** *** | Built.io Contentstack! |
26-
*** **** '----------------------------------'
25+
***** ** .-----------------------.
26+
**** *** | Contentstack! |
27+
*** **** '-----------------------'
2728
** *****
2829
****
2930
***
3031
**
3132
32-
Note: This version of Built.io Contentstack CLI can be used only for V3 stacks. Use CLI version 1.x, for V2 stacks.
33+
Note: This version of Contentstack CLI can be used only for V3 stacks. Use CLI version 1.x, for V2 stacks.
3334
34-
Built.io Contentstack Command Line Interface 3.0.0
35+
Contentstack Command Line Interface 3.0.0
3536
3637
Usage: contentstack [command]
3738
3839
Commands:
39-
connect Connect to an existing stack in Built.io Contentstack
40+
connect Connect to an existing stack in Contentstack
4041
sync Synchronize all the published content locally
4142
publish Publish content-types/assets/both on specified environment
4243
unpublish Unpublish content-types/assets/both on specified environment

bin/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22
/*!
33
* contentstack-cli
4-
* copyright (c) Built.io Contentstack
4+
* copyright (c) Contentstack
55
* MIT Licensed
66
*/
77

@@ -22,9 +22,9 @@ var messages = [
2222
'\t \x1b[33m**'
2323
, ' \x1b[33m***'
2424
, ' \x1b[33m****'
25-
, '\x1b[33m***** \x1b[31m** \x1b[36m.----------------------------------.'
26-
, ' \x1b[33m**** \x1b[31m*** \x1b[36m| Built.io Contentstack! |'
27-
, ' \x1b[33m*** \x1b[31m**** \x1b[36m\'----------------------------------\''
25+
, '\x1b[33m***** \x1b[31m** \x1b[36m.-----------------------.'
26+
, ' \x1b[33m**** \x1b[31m*** \x1b[36m| Contentstack! |'
27+
, ' \x1b[33m*** \x1b[31m**** \x1b[36m\'-----------------------\''
2828
, ' \x1b[33m** \x1b[31m***** '
2929
, ' \x1b[31m****'
3030
, ' \x1b[31m***'
@@ -72,9 +72,9 @@ function optionConversion(options) {
7272
delete options._events.lang;
7373
return _options;
7474
}
75-
// printing the Built.io Contentstack Animation
75+
// printing the Contentstack Animation
7676
console.log('\n'+messages+'\x1b[0m\n');
77-
console.log('\x1b[31m Note: This version of Built.io Contentstack CLI can be used only for V3 stacks. Use CLI version 1.x, for V2 stacks.\x1b[0m\n');
77+
console.log('\x1b[31m Note: This version of Contentstack cli can be used only for v3 stacks.\nUse cli v1.x, for v2 stacks.\x1b[0m\n');
7878

7979
program
8080
.version(pkg.version || "0.1.x");
@@ -85,7 +85,7 @@ program
8585
.option('-a, --api_key <api_key>', 'Enter the stack "API KEY" to connect')
8686
.option('-c, --token <access_token>', 'Enter the "Access Token" relative to "API KEY"')
8787
.option('-t, --template [template]', 'Enter the template', 'basic')
88-
.description('Connect to an existing stack in Built.io Contentstack.')
88+
.description('Connect to an existing stack in Contentstack.')
8989
.action(function(directory, api_key, access_token, template, options) {
9090
setImmediate(function () {
9191
//creating the domain to execute in safe mode
@@ -161,7 +161,7 @@ program
161161
program
162162
.command('publish')
163163
.alias('bulk-publish')
164-
.option('-u, --username <username>', 'Email id registered on Built.io Contentstack', undefined)
164+
.option('-u, --username <username>', 'Email id registered on Contentstack', undefined)
165165
.option('-p, --password <password>', 'Password', undefined)
166166
.option('-e, --env <environment>', 'Environment/s where you want to publish (comma(",") seperated)', list, undefined)
167167
.option('-b, --backup [backup]', 'Enter backup option', /(yes|no|y|n)/i, undefined)
@@ -193,7 +193,7 @@ program
193193
program
194194
.command('unpublish')
195195
.alias('bulk-unpublish')
196-
.option('-u, --username <username>', 'Email id registered on Built.io Contentstack', undefined)
196+
.option('-u, --username <username>', 'Email id registered on Contentstack', undefined)
197197
.option('-p, --password <password>', 'Password', undefined)
198198
.option('-e, --env <environment>', 'Environment/s where you want to unpublish (comma(",") seperated)', list, undefined)
199199
.option('-b, --backup [backup]', 'Enter backup option', /(yes|no|y|n)/i, undefined)
@@ -225,10 +225,10 @@ program.parse(process.argv);
225225
// show help by default if no args
226226
if (program.args.length == 0) {
227227
var message = [
228-
'Built.io Contentstack Command Line Interface '+pkg.version
228+
'Contentstack Command Line Interface '+pkg.version
229229
, '\nUsage: contentstack [command]'
230230
, '\nCommands:'
231-
, ' connect Connect to an existing stack in Built.io Contentstack'
231+
, ' connect Connect to an existing stack in Contentstack'
232232
, ' sync Synchronize the previously published entries in the current application'
233233
, ' publish Publish content-types/assets/both on specified environment'
234234
, ' unpublish Unpublish content-types/assets/both on specified environment'

lib/config/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

@@ -23,7 +23,7 @@ exports.config = function() {
2323
return contentstack.config;
2424
} catch (error) {
2525
console.error("contentstack-express is not installed.", error.message);
26-
console.error("Please run the command from the Built.io Contentstack Application folder.");
26+
console.error("Please run the command from the Contentstack Application folder.");
2727
process.exit(0);
2828
}
2929
};

lib/connect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

@@ -114,13 +114,13 @@ var layoutHTML = [
114114
].join(eol);
115115

116116
var headerHTML = [
117-
'{# If you have a "Content Type" for header in Built.io Contentstack then use get() view helper to retrieve header entry. #}'
117+
'{# If you have a "Content Type" for header in Contentstack then use get() view helper to retrieve header entry. #}'
118118
, '{# e.g. set header = get("header_content_type_id") #}'
119119
, '{# And then render header values using the {{header.field_name}} #}'
120120
].join(eol);
121121

122122
var footerHTML = [
123-
'{# If you have a "Content Type" for footer in Built.io Contentstack then use get() view helper to retrieve footer entry. #}'
123+
'{# If you have a "Content Type" for footer in Contentstack then use get() view helper to retrieve footer entry. #}'
124124
, '{# e.g. set footer = get("footer_content_type_id") #}'
125125
, '{# And then render footer values using the {{footer.field_name}} #}'
126126
].join(eol);

lib/helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

@@ -34,7 +34,7 @@ var helper = exports;
3434

3535
exports.url = 'https://contentstack.built.io/';
3636

37-
exports.title = 'Built.io Contentstack';
37+
exports.title = 'Contentstack';
3838

3939
exports.confirm = function(config, lang, backup, callback) {
4040
try {

lib/plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

@@ -32,7 +32,7 @@ var Plugin = function (name) {
3232
name = name.trim().toLowerCase();
3333
if (fs.existsSync(dir)) {
3434
var _path = path.join(dir, name);
35-
console.log('Creating Built.io Contentstack plugin at : ' + _path);
35+
console.log('Creating Contentstack plugin at : ' + _path);
3636
prompt.message = "";
3737
prompt.delimiter = "";
3838
(function createPlugin(path, name) {

lib/publish.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

@@ -197,7 +197,7 @@ publish.prototype.init = function () {
197197
},
198198
function (user, cb) {
199199
headers.authtoken = user.authtoken;
200-
// get environment id from Built.io Contentstack
200+
// get environment id from Contentstack
201201
_request({
202202
url: api.host + '/' + api.version + api.urls.environments,
203203
headers: headers,
@@ -212,7 +212,7 @@ publish.prototype.init = function () {
212212
}
213213
}).then(function (body) {
214214
if (body && body.environments && body.environments.length) {
215-
inputs.environment_ids = _.pluck(body.environments, "uid")
215+
inputs.environment_ids = _.map(body.environments, "uid")
216216
cb();
217217
} else {
218218
cb(new Error("Provided environments not found in the configured stack."));
@@ -288,7 +288,7 @@ publish.prototype.content_types = function (callback) {
288288
.getContentTypes()
289289
.then(function (body) {
290290
if (body && body.content_types && body.content_types.length) {
291-
var _temp = _.pluck(body.content_types, "uid"),
291+
var _temp = _.map(body.content_types, "uid"),
292292
_content_types,
293293
__contentTypes = [];
294294

lib/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

lib/sync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

@@ -281,7 +281,7 @@ module.exports = Sync;
281281
.getContentTypes()
282282
.then(function (content_types) {
283283
if (content_types && content_types.content_types && content_types.content_types.length) {
284-
content_types = _.difference(_.pluck(content_types.content_types, "uid"), self.inputs.skip_content_types);
284+
content_types = _.difference(_.map(content_types.content_types, "uid"), self.inputs.skip_content_types);
285285
_loadEntries(content_types);
286286
} else {
287287
console.log("No ContentTypes found.");

lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* contentstack-cli
3-
* copyright (c) Built.io Contentstack
3+
* copyright (c) Contentstack
44
* MIT Licensed
55
*/
66

@@ -77,7 +77,7 @@
7777
}
7878
Q.all(_calls)
7979
.then(function (entries) {
80-
entries = _.pluck(entries, "entries").reduce(function (prev, crnt) {
80+
entries = _.map(entries, "entries").reduce(function (prev, crnt) {
8181
if (Array.isArray(crnt)) {
8282
prev = prev.concat(crnt);
8383
}

0 commit comments

Comments
 (0)