Skip to content

Commit

Permalink
Release 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benm071 committed Aug 17, 2018
1 parent 6f690a4 commit f5f524b
Show file tree
Hide file tree
Showing 15 changed files with 142 additions and 55 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @oracle/ojet-cli 5.1.0
# @oracle/ojet-cli 5.2.0

## About the module
This module contains a command line interface for Oracle JET web and hybrid mobile application development.
Expand Down Expand Up @@ -64,7 +64,7 @@ Or view help on adding a plugin:
ojet help add plugin
```

For more information on the Oracle JET CLI, refer to the [Oracle JET Developers Guide](http://www.oracle.com/pls/topic/lookup?ctx=jet510&id=homepage).
For more information on the Oracle JET CLI, refer to the [Oracle JET Developers Guide](http://www.oracle.com/pls/topic/lookup?ctx=jet520&id=homepage).

## [Contributing](https://github.com/oracle/ojet-cli/tree/master/CONTRIBUTING.md)
Oracle JET is an open source project. Pull Requests are currently not being accepted. See [CONTRIBUTING](https://github.com/oracle/ojet-cli/tree/master/CONTRIBUTING.md) for details.
Expand Down
3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Release Notes for ojet-cli ##

### 5.2.0
* Cordova 8 may cause very slow performance during build and serve. You may wish to consider downgrading to Cordova 7 if this is an issue.

### 5.1.0
When using Cordova-Android 7.0.0+, users may encounter an error like:

Expand Down
35 changes: 35 additions & 0 deletions THIRDPARTYLICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
DO NOT TRANSLATE OR LOCALIZE.

********************************************************************************
Oracle elects to use only the GNU Lesser General Public License version 2.1
(LGPL) for any software where a choice of LGPL/GPL license versions are made
available with the language indicating that LGPLv2.1/GPLv2 or any later version
may be used, or where a choice of which version of the LGPL/GPL is applied is
unspecified.
********************************************************************************

THIRD-PARTY COMPONENT LICENSE
(path in the installation) (see license text reproduced below)
--------------------------------------------------------------------------------
node_modules/minimist/ MIT
node_modules/yeoman-environment/ BSD-2-Clause

This software is released under the MIT license:

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

71 changes: 59 additions & 12 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,27 @@ const config = {
component: {
hideFromHelp: true,
aliases: ['components'],
description: 'Adds the specified component(s) to the hybrid app',
description: 'Adds the specified component(s) to the app',
parameters: '<component1> [<component2>]',
options: {
'pack-version': {
description: 'Specify the pack version',
parameters: '<pack_version>'
}
},
examples: ['ojet add component flipcard']
},
hybrid: {
description: 'Adds a hybrid app target to the web app',
examples: ['ojet add hybrid']
},
pack: {
hideFromHelp: true,
aliases: ['packs'],
description: 'Adds the specified pack(s) to the app',
parameters: '<pack1> [<pack2>]',
examples: ['ojet add pack oj-dvt']
},
platform: {
aliases: ['platforms'],
description: 'Adds the specified platform(s) to the hybrid app',
Expand Down Expand Up @@ -142,12 +155,12 @@ const config = {
app: {
description: 'Configures the specified parameter for a JET app',
options: {
'catalog-url': {
description: 'Specify the URL for the catalog used by the app',
parameters: '<catalog_url>'
'exchange-url': {
description: 'Specify the URL for the Exchange used by the app',
parameters: '<exchange_url>'
}
},
examples: ['ojet configure --catalog-url=myCatalog.org', 'ojet configure app --catalog-url=10.1.1.32:8010/v1/basepath/']
examples: ['ojet configure --exchange-url=myExchange.org', 'ojet configure app --exchange-url=10.1.1.32:8010/v1/basepath/']
},
},
},
Expand Down Expand Up @@ -224,6 +237,12 @@ const config = {
description: 'Lists all installed components',
examples: ['ojet list component']
},
pack: {
hideFromHelp: true,
aliases: ['packs'],
description: 'Lists all installed packs',
examples: ['ojet list packs']
},
platform: {
aliases: ['platforms'],
description: 'Lists all installed platforms',
Expand All @@ -238,10 +257,10 @@ const config = {
},
publish: {
hideFromHelp: true,
description: 'Publishes components to the catalog',
description: 'Publishes components to the Exchange',
scopes: {
component: {
description: 'Publishes the specified component to the catalog',
description: 'Publishes the specified component to the Exchange',
aliases: ['components'],
parameters: '<component>',
options: {
Expand All @@ -251,10 +270,30 @@ const config = {
password: {
description: 'The user\'s registered password'
},
pack: {
description: 'Specify the pack name',
parameters: '<pack_name>'
},
},
examples: [
'ojet publish component flipcard'
]
},
pack: {
description: 'Publishes the specified pack to the Exchange',
aliases: ['packs'],
parameters: '<pack>',
options: {
username: {
description: 'The user\'s registered username'
},
password: {
description: 'The user\'s registered password'
},
},
examples: [
'ojet publish pack oj-dvt'
]
}
},
},
Expand All @@ -268,6 +307,13 @@ const config = {
parameters: '<component1> [<component2>]',
examples: ['ojet remove components flipcard dv-gantt']
},
pack: {
hideFromHelp: true,
aliases: ['packs'],
description: 'Removes the specified pack(s) from the app',
parameters: '<pack1> [<pack2>]',
examples: ['ojet remove pack oj-core']
},
platform: {
description: 'Removes the specified platform(s) from the app',
aliases: ['platforms'],
Expand Down Expand Up @@ -296,14 +342,14 @@ const config = {
},
search: {
hideFromHelp: true,
description: 'Searches for a component in the catalog based on the specified keyword',
description: 'Searches for a component in the exchange based on the specified keyword',
scopes: {
catalog: {
description: 'Searches for a component in the catalog based on the specified keyword',
exchange: {
description: 'Searches for a component in the exchange based on the specified keyword',
parameters: '<keyword>',
examples: [
'ojet search catalog flip-card',
'ojet search catalog flip-card dv-gantt'
'ojet search exchange flip-card',
'ojet search exchange flip-card dv-gantt'
]
}
},
Expand Down Expand Up @@ -439,6 +485,7 @@ const config = {
env: {
test: 'test'
},
exchangeUrlParam: 'exchange-url',
components: {
dir: './src/js/jet-composites/'
},
Expand Down
4 changes: 2 additions & 2 deletions lib/scopes/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ env.on('error', (error) => {
if (utils.isTestEnv()) {
utils.log(error);
}
throw utils.toError(error);
utils.log.error(error);
});

/**
Expand Down Expand Up @@ -292,7 +292,7 @@ function _envRun(generator, parameter, options) {

env.run(cmdToRun, options, (error) => {
if (error) {
throw utils.toError(error);
utils.log.error(error);
}
});
}
8 changes: 5 additions & 3 deletions lib/tasks/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ const utils = require('../utils');
*
* @public
* @param {string} scope
* @param {Array} [parameters]
* @param {Object} [options]
* @param {Array} parameters
* @param {Object} options
*/
module.exports = function (scope, parameters, options) {
const task = config.tasks.add.name;
const scopes = config.tasks.add.scopes;
const parameter = parameters[0];
switch (scope) {
case scopes.component.name:
case scopes.pack.name: {
utils.ensureParameters(parameters);
utils.ensureJetApp();

Expand All @@ -38,9 +39,10 @@ module.exports = function (scope, parameters, options) {
component.add(parameters);
} else {
const tooling = utils.loadTooling();
tooling.add(scope, parameters);
tooling.add(scope, parameters, options);
}
break;
}
case scopes.hybrid.name:
utils.validateParametersCount(parameters, 0);
utils.ensureJetApp();
Expand Down
8 changes: 4 additions & 4 deletions lib/tasks/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ module.exports = function (task, scope, parameters, options) {
case config.tasks[task].scopes.app.name:
case undefined:
utils.ensureJetApp();
if (options && utils.hasProperty(options, 'catalog-url')) {
if (options && utils.hasProperty(options, config.exchangeUrlParam)) {
// Keep this if only for the course of 5.X
// https://jira.oraclecorp.com/jira/browse/JET-21713
if (utils.isTooling50x()) {
catalog.configureCatalogUrl(options['catalog-url']);
catalog.configureCatalogUrl(options[config.exchangeUrlParam]);
} else {
const tooling = utils.loadTooling();
tooling.configure('catalog', options);
tooling.configure('exchange', options);
}
} else {
utils.log.error(utils.toError(`Please check 'ojet help ${task}' and provide valid configuration options.`));
utils.log.error(`Please check 'ojet help ${task}' and provide valid configuration options.`);
}
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = function (scope, parameters, options) {
app.delegateToGenerator('add-theme', parameter);
break;
case scopes.component.name:
app.delegateToGenerator('add-component', parameter);
app.delegateToGenerator('add-component', parameter, options);
break;
case undefined:
default:
Expand Down
3 changes: 2 additions & 1 deletion lib/tasks/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module.exports = function (scope, parameters) {
utils.validateParametersCount(parameters, 0);

switch (scope) {
case scopes.component.name: {
case scopes.component.name:
case scopes.pack.name: {
utils.ensureJetApp();

// Keep this if only for the course of 5.X
Expand Down
4 changes: 3 additions & 1 deletion lib/tasks/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ module.exports = function (task, scope, parameters, options) {

switch (scope) {
case config.tasks[task].scopes.component.name:
case config.tasks[task].scopes.pack.name: {
utils.ensureParameters(parameter);
utils.ensureJetApp();
utils.ensureCatalogUrl();
utils.ensureExchangeUrl();

// Keep this if only for the course of 5.X
// https://jira.oraclecorp.com/jira/browse/JET-21713
Expand All @@ -41,6 +42,7 @@ module.exports = function (task, scope, parameters, options) {
tooling.publish(scope, parameter, options);
}
break;
}
case undefined:
utils.log.error(utils.toMissingInputMessage(`${task}`));
break;
Expand Down
3 changes: 2 additions & 1 deletion lib/tasks/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports = function (scope, parameters) {
const scopes = config.tasks.remove.scopes;

switch (scope) {
case scopes.component.name: {
case scopes.component.name:
case scopes.pack.name: {
utils.ensureJetApp();
utils.ensureParameters(parameters);

Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ module.exports = function (task, scope, parameters) {
utils.validateParametersCount(parameters, 1);
const parameter = parameters[0];
switch (scope) {
case config.tasks[task].scopes.catalog.name:
case config.tasks[task].scopes.exchange.name:
utils.ensureParameters(parameter);
utils.ensureJetApp();
utils.ensureCatalogUrl();
utils.ensureExchangeUrl();

// Keep this if only for the course of 5.X
// https://jira.oraclecorp.com/jira/browse/JET-21713
Expand Down
4 changes: 2 additions & 2 deletions lib/tooling/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function _getDestinationShortcut(options) {
});

if (size > 1) {
throw utils.toError('Only one of \'device/emulator/browser/server-only\' options should be specified');
utils.log.error('Only one of \'device/emulator/browser/server-only\' options should be specified');
}

return shortcut;
Expand All @@ -96,7 +96,7 @@ function _validateDestination(options) {
const destinationShortcut = _getDestinationShortcut(options);
const newOptions = options;
if (destination && destinationShortcut) {
throw utils.toError('Only one of \'destination/device/emulator/browser/server-only\' options should be specified');
utils.log.error('Only one of \'destination/device/emulator/browser/server-only\' options should be specified');
}

if (destination || destinationShortcut) {
Expand Down
Loading

0 comments on commit f5f524b

Please sign in to comment.