You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/07/16 02:16:15 UTC
[1/3] cordova-lib git commit: CB-9330 Removes 'plugman publish'
related functionality
Repository: cordova-lib
Updated Branches:
refs/heads/master 989d4d18a -> 1a695603b
CB-9330 Removes 'plugman publish' related functionality
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/64c2c001
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/64c2c001
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/64c2c001
Branch: refs/heads/master
Commit: 64c2c0013c1ba8996458164ce4eb7a133a0ae344
Parents: 989d4d1
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Wed Jul 8 11:36:36 2015 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Jul 15 17:05:00 2015 -0700
----------------------------------------------------------------------
cordova-lib/spec-plugman/adduser.spec.js | 29 -------
cordova-lib/spec-plugman/publish.spec.js | 29 -------
.../spec-plugman/registry/registry.spec.js | 26 -------
cordova-lib/spec-plugman/unpublish.spec.js | 29 -------
cordova-lib/src/plugman/adduser.js | 24 ------
cordova-lib/src/plugman/help.txt | 34 ++------
cordova-lib/src/plugman/plugman.js | 38 ---------
cordova-lib/src/plugman/publish.js | 25 ------
cordova-lib/src/plugman/registry/registry.js | 81 ++------------------
cordova-lib/src/plugman/unpublish.js | 24 ------
10 files changed, 10 insertions(+), 329 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/spec-plugman/adduser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/adduser.spec.js b/cordova-lib/spec-plugman/adduser.spec.js
deleted file mode 100644
index e98dae5..0000000
--- a/cordova-lib/spec-plugman/adduser.spec.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-var adduser = require('../src/plugman/adduser'),
- Q = require('q'),
- registry = require('../src/plugman/registry/registry');
-
-describe('adduser', function() {
- it('should add a user', function() {
- var sAddUser = spyOn(registry, 'adduser').andReturn(Q());
- adduser();
- expect(sAddUser).toHaveBeenCalled();
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/spec-plugman/publish.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/publish.spec.js b/cordova-lib/spec-plugman/publish.spec.js
deleted file mode 100644
index f5ebf41..0000000
--- a/cordova-lib/spec-plugman/publish.spec.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-var publish = require('../src/plugman/publish'),
- Q = require('q'),
- registry = require('../src/plugman/registry/registry');
-
-describe('publish', function() {
- it('should publish a plugin', function() {
- var sPublish = spyOn(registry, 'publish').andReturn(Q(['/path/to/my/plugin']));
- publish(new Array('/path/to/myplugin'));
- expect(sPublish).toHaveBeenCalledWith(['/path/to/myplugin']);
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/spec-plugman/registry/registry.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/registry/registry.spec.js b/cordova-lib/spec-plugman/registry/registry.spec.js
index b10e923..aa2d419 100644
--- a/cordova-lib/spec-plugman/registry/registry.spec.js
+++ b/cordova-lib/spec-plugman/registry/registry.spec.js
@@ -20,7 +20,6 @@ var registry = require('../../src/plugman/registry/registry'),
manifest = require('../../src/plugman/registry/manifest'),
fs = require('fs'),
path = require('path'),
- Q = require('q'),
shell = require('shelljs'),
os = require('os'),
npm = require('npm');
@@ -119,31 +118,6 @@ describe('registry', function() {
expect(fakeNPMCommands.config).toHaveBeenCalledWith(params, jasmine.any(Function));
}));
});
- it('should run adduser', function() {
- registryPromise(true, registry.adduser(null).then(function() {
- expect(fakeLoad).toHaveBeenCalledWith(jasmine.any(Object),jasmine.any(Function));
- expect(fakeNPMCommands.adduser).toHaveBeenCalledWith(null, jasmine.any(Function));
- }));
- });
- it('should run publish', function() {
- var params = [__dirname + '/../plugins/org.test.plugins.dummyplugin'];
- var spyGenerate = spyOn(manifest, 'generatePackageJsonFromPluginXml').andReturn(Q());
- var spyUnlink = spyOn(fs, 'unlink');
- registryPromise(true, registry.publish(params).then(function() {
- expect(fakeLoad).toHaveBeenCalledWith(jasmine.any(Object),jasmine.any(Function));
- expect(spyGenerate).toHaveBeenCalledWith(params[0]);
- expect(fakeNPMCommands.publish).toHaveBeenCalledWith(params, jasmine.any(Function));
- expect(spyUnlink).toHaveBeenCalledWith(path.resolve(params[0], 'package.json'));
- }));
- });
- it('should run unpublish', function() {
- var params = ['dummyplugin@0.6.0'];
- registryPromise(true, registry.unpublish(params).then(function() {
- expect(fakeLoad).toHaveBeenCalledWith(jasmine.any(Object),jasmine.any(Function));
- expect(fakeNPMCommands.unpublish).toHaveBeenCalledWith(params, jasmine.any(Function));
- expect(fakeNPMCommands.cache).toHaveBeenCalledWith(['clean'], jasmine.any(Function));
- }));
- });
it('should run search', function() {
var params = ['dummyplugin', 'plugin'];
registryPromise(true, registry.search(params).then(function() {
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/spec-plugman/unpublish.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/unpublish.spec.js b/cordova-lib/spec-plugman/unpublish.spec.js
deleted file mode 100644
index f678ea2..0000000
--- a/cordova-lib/spec-plugman/unpublish.spec.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-var unpublish = require('../src/plugman/unpublish'),
- Q = require('q'),
- registry = require('../src/plugman/registry/registry');
-
-describe('unpublish', function() {
- it('should unpublish a plugin', function() {
- var sUnpublish = spyOn(registry, 'unpublish').andReturn(Q());
- unpublish(new Array('myplugin@0.0.1'));
- expect(sUnpublish).toHaveBeenCalledWith(['myplugin@0.0.1']);
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/src/plugman/adduser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/adduser.js b/cordova-lib/src/plugman/adduser.js
deleted file mode 100644
index 8506df4..0000000
--- a/cordova-lib/src/plugman/adduser.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-var registry = require('./registry/registry');
-
-module.exports = function() {
- return registry.adduser(null);
-};
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/src/plugman/help.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/help.txt b/cordova-lib/src/plugman/help.txt
index 021e54a..23b41f9 100644
--- a/cordova-lib/src/plugman/help.txt
+++ b/cordova-lib/src/plugman/help.txt
@@ -52,22 +52,14 @@ Parameters:
Interacting with the registry
=============================
-Add a user account
-------------------
+NOTICE: The Cordova Plugin registry became read-only, so the following commands are not actual anymore and were removed:
$ plugman adduser
+ $ plugman publish
+ $ plugman unpublish
+ $ plugman owner add/rm
-Publish a plugin
-----------------
-
- $ plugman publish [<directory>]
-
- - defaults to the current directory
-
-Unpublish a plugin
-------------------
-
- $ plugman unpublish <name>@<version>
+For managing plugins from NPM registry use corresponding NPM commands. For more info on NPM commands see `npm help <command>`
Search for a plugin
-------------------
@@ -107,22 +99,6 @@ Example:
$ plugman owner ls org.apache.cordova.core.file
-To add an owner to a plugin's in the repository, use:
-
- $ plugman owner add <username> <pluginID>
-
-Example:
-
- $ plugman owner add joeuser org.apache.cordova.core.file
-
-To remove an owner from the plugin in the registry, use:
-
- $ plugman owner rm <username> <pluginID>
-
-Example:
-
- $ plugman owner rm joeuser org.apache.cordova.core.file
-
Create A Plugin
---------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index d964f90..3d805df 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -70,9 +70,6 @@ addProperty(plugman, 'prepareBrowserify', './prepare-browserify');
addProperty(plugman, 'help', './help');
addProperty(plugman, 'config', './config', true);
addProperty(plugman, 'owner', './owner', true);
-addProperty(plugman, 'adduser', './adduser', true);
-addProperty(plugman, 'publish', './publish', true);
-addProperty(plugman, 'unpublish', './unpublish', true);
addProperty(plugman, 'search', './search', true);
addProperty(plugman, 'info', './info', true);
addProperty(plugman, 'create', './create', true);
@@ -139,12 +136,6 @@ plugman.commands = {
return p;
},
- 'adduser' : function(cli_opts) {
- plugman.adduser(function(err) {
- if (err) throw err;
- else console.log('user added');
- });
- },
'search' : function(cli_opts) {
plugman.search(cli_opts.argv.remain, function(err, plugins) {
if (err) throw err;
@@ -169,35 +160,6 @@ plugman.commands = {
}
});
},
-
- 'publish' : function(cli_opts) {
- var plugin_path = cli_opts.argv.remain;
- if(!plugin_path) {
- return console.log(plugman.help());
- }
- plugman.publish(plugin_path, function(arg1, err) {
- if (err) {
- console.log('Error Code: '+err.code);
- throw err;
- } else {
- console.log('Plugin published');
- }
- });
- },
-
- 'unpublish': function(cli_opts) {
- var plugin = cli_opts.argv.remain;
- if(!plugin) {
- return console.log(plugman.help());
- }
- plugman.unpublish(plugin, function(arg1, err) {
- if (err) {
- console.log('Error Code: ' + err.code);
- throw err;
- }
- else console.log('Plugin unpublished');
- });
- },
'create': function(cli_opts) {
if( !cli_opts.name || !cli_opts.plugin_id || !cli_opts.plugin_version) {
return console.log( plugman.help() );
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/src/plugman/publish.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/publish.js b/cordova-lib/src/plugman/publish.js
deleted file mode 100644
index 5cadb70..0000000
--- a/cordova-lib/src/plugman/publish.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-var registry = require('./registry/registry');
-
-module.exports = function(plugin_path) {
- // plugin_path is an array of paths
- return registry.publish(plugin_path);
-};
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/src/plugman/registry/registry.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/registry.js b/cordova-lib/src/plugman/registry/registry.js
index 9cda5a0..f43edae 100644
--- a/cordova-lib/src/plugman/registry/registry.js
+++ b/cordova-lib/src/plugman/registry/registry.js
@@ -24,7 +24,6 @@ var semver = require('semver'),
path = require('path'),
url = require('url'),
fs = require('fs'),
- manifest = require('./manifest'),
rc = require('rc'),
Q = require('q'),
request = require('request'),
@@ -65,62 +64,15 @@ module.exports = {
* @return {Promise.<void>} Promise for completion.
*/
owner: function(args) {
+ var command = args && args[0];
+ if (command && (command === 'add' || command === 'rm'))
+ return Q.reject('Support for \'owner add/rm\' commands has been removed ' +
+ 'due to transition of Cordova plugins registry to read-only state');
+
return initThenLoadSettingsWithRestore(function () {
return Q.ninvoke(npm.commands, 'owner', args);
});
},
- /**
- * @method adduser
- * @param {Array} args Command argument
- * @return {Promise.<void>} Promise for completion.
- */
- adduser: function(args) {
- return initThenLoadSettingsWithRestore(function () {
- return Q.ninvoke(npm.commands, 'adduser', args);
- });
- },
-
- /**
- * @method publish
- * @param {Array} args Command argument
- * @return {Promise.<Object>} Promised published data.
- */
- publish: function(args) {
- var dir = args[0] || '.';
- return initSettings()
- .then(function(settings) {
- if(fs.existsSync(path.join(dir,'package.json'))) {
- events.emit('verbose', 'temporarily moving existing package.json so we can create one to publish to the cordova plugins registry');
- if(fs.existsSync(path.join(dir,'package.json1'))) {
- //package.json1 already exists, maybe due to a failed past attempt to publish
- //we will assume that the rename has already happened.
- events.emit('verbose', 'package.json1 already exists. Will use');
- } else {
- //rename package.json to pacakge.json1 temporarily
- fs.renameSync(path.join(dir,'package.json'),path.join(dir,'package.json1'));
- }
- }
- return manifest.generatePackageJsonFromPluginXml(dir)
- .then(function () {
- return npmhelper.loadWithSettingsThenRestore(settings, function () {
- // With no --force we'll get a 409 (conflict) when trying to
- // overwrite an existing package@version.
- //npm.config.set('force', true);
- events.emit('log', 'attempting to publish plugin to registry');
- return Q.ninvoke(npm.commands, 'publish', args);
- });
- }).then(function() {
- fs.unlink(path.resolve(dir, 'package.json'));
- //rename package.json1 to package.json if it exists
- if(fs.existsSync(path.join(dir,'package.json1'))) {
- events.emit('verbose', 'restoring original package.json');
- fs.renameSync(path.join(dir,'package.json1'),path.join(dir,'package.json'));
- }
- }).catch(function(err){
- return err;
- });
- });
- },
/**
* @method search
@@ -134,29 +86,6 @@ module.exports = {
},
/**
- * @method unpublish
- * @param {Array} args Command argument
- * @return {Promise.<Object>} Promised results.
- */
- unpublish: function (args) {
- return initThenLoadSettingsWithRestore(function () {
- // --force is required to delete an entire plugin with all versions.
- // Without --force npm can only unpublish a specific version.
- //npm.config.set('force', true);
- // Note, npm.unpublish does not report back errors (at least some)
- // e.g.: `unpublish non.existent.plugin`
- // will complete with no errors.
- events.emit('log', 'attempting to unpublish plugin from registry');
- return Q.ninvoke(npm.commands, 'unpublish', args)
- .then(function () {
- // npm.unpublish removes the cache for the unpublished package
- // cleaning the entire cache might not be necessary.
- return Q.ninvoke(npm.commands, 'cache', ['clean']);
- });
- });
- },
-
- /**
* @method fetch
* @param {Array} with one element - the plugin id or "id@version"
* @return {Promise.<string>} Promised path to fetched package.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/64c2c001/cordova-lib/src/plugman/unpublish.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/unpublish.js b/cordova-lib/src/plugman/unpublish.js
deleted file mode 100644
index 509ba22..0000000
--- a/cordova-lib/src/plugman/unpublish.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-var registry = require('./registry/registry');
-
-module.exports = function(plugin) {
- return registry.unpublish(plugin);
-};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[3/3] cordova-lib git commit: CB-9330 updated wording for warning
messages for removal of publish/unpublish commands
Posted by st...@apache.org.
CB-9330 updated wording for warning messages for removal of publish/unpublish commands
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/1a695603
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/1a695603
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/1a695603
Branch: refs/heads/master
Commit: 1a695603b53774d7a28d8b4e204c102c5b95e129
Parents: bff2f6e
Author: Steve Gill <st...@gmail.com>
Authored: Wed Jul 15 17:15:50 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Jul 15 17:15:50 2015 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/help.txt | 4 ++--
cordova-lib/src/plugman/plugman.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/1a695603/cordova-lib/src/plugman/help.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/help.txt b/cordova-lib/src/plugman/help.txt
index 23b41f9..ccfa91d 100644
--- a/cordova-lib/src/plugman/help.txt
+++ b/cordova-lib/src/plugman/help.txt
@@ -52,14 +52,14 @@ Parameters:
Interacting with the registry
=============================
-NOTICE: The Cordova Plugin registry became read-only, so the following commands are not actual anymore and were removed:
+NOTICE: The Cordova Plugin registry is moving to read-only. Please move your plugins over to npm. The following commands have been removed:
$ plugman adduser
$ plugman publish
$ plugman unpublish
$ plugman owner add/rm
-For managing plugins from NPM registry use corresponding NPM commands. For more info on NPM commands see `npm help <command>`
+For managing plugins on the npm registry, use the corresponding npm commands. For more info on npm commands see `npm help <command>`
Search for a plugin
-------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/1a695603/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index 72dc6b9..0a8cd8d 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -162,12 +162,12 @@ plugman.commands = {
},
'publish' : function() {
events.emit('error', 'The publish functionality is not supported anymore since the Cordova Plugin registry\n' +
- 'has moved to read-only state. For publishing use corresponding \'npm\' commands.\n\n' +
+ 'is moving to read-only state. For publishing use corresponding \'npm\' commands.\n\n' +
'If for any reason you still need for \'plugman publish\' - consider downgrade to plugman@0.23.3');
},
'unpublish': function(cli_opts) {
events.emit('error', 'The publish functionality is not supported anymore since the Cordova Plugin registry\n' +
- 'has moved to read-only state. For publishing/unpublishing use corresponding \'npm\' commands.\n\n' +
+ 'is moving to read-only state. For publishing/unpublishing use corresponding \'npm\' commands.\n\n' +
'If for any reason you still need for \'plugman unpublish\' - consider downgrade to plugman@0.23.3');
},
'create': function(cli_opts) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[2/3] cordova-lib git commit: Adds stubs for `publish`/`unpublish`
commands. This closes #254
Posted by st...@apache.org.
Adds stubs for `publish`/`unpublish` commands. This closes #254
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/bff2f6e9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/bff2f6e9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/bff2f6e9
Branch: refs/heads/master
Commit: bff2f6e9a2674dc888a0596b23c82dfee7f93ebb
Parents: 64c2c00
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Thu Jul 9 10:49:24 2015 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Jul 15 17:05:01 2015 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/plugman.js | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/bff2f6e9/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index 3d805df..72dc6b9 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -160,6 +160,16 @@ plugman.commands = {
}
});
},
+ 'publish' : function() {
+ events.emit('error', 'The publish functionality is not supported anymore since the Cordova Plugin registry\n' +
+ 'has moved to read-only state. For publishing use corresponding \'npm\' commands.\n\n' +
+ 'If for any reason you still need for \'plugman publish\' - consider downgrade to plugman@0.23.3');
+ },
+ 'unpublish': function(cli_opts) {
+ events.emit('error', 'The publish functionality is not supported anymore since the Cordova Plugin registry\n' +
+ 'has moved to read-only state. For publishing/unpublishing use corresponding \'npm\' commands.\n\n' +
+ 'If for any reason you still need for \'plugman unpublish\' - consider downgrade to plugman@0.23.3');
+ },
'create': function(cli_opts) {
if( !cli_opts.name || !cli_opts.plugin_id || !cli_opts.plugin_version) {
return console.log( plugman.help() );
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org