;/>
> >
> > Thx!
> > Sergey
> > -Original Message-
> > From: mmo...@google.com [mailto:mmo...@google.com] On Behalf Of Michal
> > Mocny
> > Sent: Monday, July 21, 2014 6:28 PM
> > To: dev
> > Subject: Re: Proposal: hooks support for
be executed
>
> target-dir="../../../../../hooks/pre_package"/>
>
> Thx!
> Sergey
> -Original Message-
> From: mmo...@google.com [mailto:mmo...@google.com] On Behalf Of Michal
> Mocny
> Sent: Monday, July 21, 2014 6:28 PM
> To: dev
> Subject: Re: Proposa
Just a note, currently any plugin can add some custom file to hooks directory
and it will be executed
Thx!
Sergey
-Original Message-
From: mmo...@google.com [mailto:mmo...@google.com] On Behalf Of Michal Mocny
Sent: Monday, July 21, 2014 6:28 PM
To: dev
Subject: Re: Proposal: hooks
Whatever the decision for default prompt/no-prompt, I suggest we add a flag
to do the reverse for anyone concerned.
Aka, --prompt-for-plugin-hooks or --no-prompt-for-plugin-hooks
On Fri, Jul 18, 2014 at 5:55 PM, Shazron wrote:
> Echoing what Jesse said - having a prompt will defeat tools,
> es
Echoing what Jesse said - having a prompt will defeat tools,
especially since early on we kinda had consensus not to add in a
security layer.
The middle way is to add a CLI option to "auto-accept" all prompts
with Y, kinda like a lot of command line tools. I think there is this
pattern in Windows c
Prompting would make it nearly impossible for third party tools to use,
there is no one to accept.
PGBuild will allow scripts, but they will only be for pre-verified plugins,
just like they deal with compiling arbitrary native code ... the
script-exec is NOT a new backdoor in this case, just anothe
What about prompting during plugin install instead of prepare? "This
plugin has hooks, would you like continue? Y/N"
I'm concerned about being prompted on each prepare, especially in the face
of --watch type scripts. I'm also not sure that plugin authors should
worry about supporting the "no" us
Finally got to having a look. Lots of neat stuff in there! Some specific
feedback:
- Not a fan of "
]
https://github.com/MSOpenTech/cordova-lib/blob/CB-6481-hooks/cordova-lib/templates/hooks-README.md#script-interface
Thx!
Sergey
-Original Message-
From: Shazron [mailto:shaz...@gmail.com]
Sent: Wednesday, July 9, 2014 9:26 PM
To: dev@cordova.apache.org
Subject: Re: Proposal: hooks support
Ah ok. However I think since it is effectively deprecated we should
not advertise the old way as a supported way to do things but add
another section saying that support for "./cordova/hooks" may be
removed in the future, and perhaps give a timeline for removal.
On Wed, Jul 9, 2014 at 10:15 AM, Jo
Shazron wrote:
> from the Cordova Hooks doc:
> "This directory used to exist at .cordova/hooks, but has now been
> moved to the project root."
> -> doesn't this imply that .cordova/hooks
> does not work anymore, you should use hooks/ ?
I believe it's supported for backwards compatibility (just a
_plugin_install, after_plugin_install and
> before_plugin_uninstall hooks.
>
> Thx!
> Sergey
> -Original Message-
> From: Sergey Grebnov (Akvelon) [mailto:v-seg...@microsoft.com]
> Sent: Friday, May 16, 2014 4:08 AM
> To: dev@cordova.apache.org
> Subject: RE:
Thx!
Sergey
-Original Message-
From: Sergey Grebnov (Akvelon) [mailto:v-seg...@microsoft.com]
Sent: Friday, May 16, 2014 4:08 AM
To: dev@cordova.apache.org
Subject: RE: Proposal: hooks support for plugins
Addressed code review notes, added spec tests, moved to cordova-lib repo.
https://githu
: RE: Proposal: hooks support for plugins
Updated code as per latest notes. Do we ready to merge this?
https://github.com/apache/cordova-plugman/pull/74
Thx!
Sergey
-Original Message-
From: mmo...@google.com [mailto:mmo...@google.com] On Behalf Of Michal Mocny
Sent: Tuesday, April 22
:
> > >>>> foo.js")
> > >>>> - Maybe this is doable, by storing a global
> > >>>> exception-was-thrown callback?
> > >>>> - Gives hooks the ability to mess up cordova's environment
> > >>>> (a
;>> exception, we would like to be able to say "This hook script failed:
> > >>>> foo.js")
> > >>>> - Maybe this is doable, by storing a global exception-was-thrown
> > >>>> callback?
> > >>>> - Gives hoo
>> the vm thing addresses this?)
> >>>>
> >>>> Would like to see tests for these things added before we launch this
> >>>> feature.
> >>>>
> >>>>
> >>>>
> >>>> On Tue, Apr 22, 2014 at 1
> the vm thing addresses this?)
>>>>
>>>> Would like to see tests for these things added before we launch this
>>>> feature.
>>>>
>>>>
>>>>
>>>> On Tue, Apr 22, 2014 at 10:40 AM, Sergey Grebnov (Akvelon) <
thing addresses this?)
> > >
> > > Would like to see tests for these things added before we launch this
> > > feature.
> > >
> > >
> > >
> > > On Tue, Apr 22, 2014 at 10:40 AM, Sergey Grebnov (Akvelon) <
> > > v-seg...@microsoft
> > > +1, I will name it as 'context'
> > >
> > > Thx!
> > > Sergey
> > > -Original Message-
> > > From: Jonathan Bond-Caron [mailto:jbo...@gdesolutions.com]
> > > Sent: Tuesday, April 22, 2014 7:34 AM
> &g
ese things added before we launch this
> > feature.
> >
> >
> >
> > On Tue, Apr 22, 2014 at 10:40 AM, Sergey Grebnov (Akvelon) <
> > v-seg...@microsoft.com> wrote:
> >
> > > +1, I will name it as 'context'
> > >
> > > Thx!
t'
> >
> > Thx!
> > Sergey
> > -Original Message-
> > From: Jonathan Bond-Caron [mailto:jbo...@gdesolutions.com]
> > Sent: Tuesday, April 22, 2014 7:34 AM
> > To: dev@cordova.apache.org
> > Subject: RE: Proposal: hooks supp
April 22, 2014 7:34 AM
> To: dev@cordova.apache.org
> Subject: RE: Proposal: hooks support for plugins
>
> On Mon Apr 21 03:39 PM, Sergey Grebnov (Akvelon) wrote:
> > module.exports = function(platform, projectDir, pluginDir, cmdLine) {
> > console.log('hook.js:
+1, I will name it as 'context'
Thx!
Sergey
-Original Message-
From: Jonathan Bond-Caron [mailto:jbo...@gdesolutions.com]
Sent: Tuesday, April 22, 2014 7:34 AM
To: dev@cordova.apache.org
Subject: RE: Proposal: hooks support for plugins
On Mon Apr 21 03:39 PM, Sergey Grebno
On Mon Apr 21 03:39 PM, Sergey Grebnov (Akvelon) wrote:
> module.exports = function(platform, projectDir, pluginDir, cmdLine) {
> console.log('hook.js: ' + platform);
> console.log('hook.js: ' + projectDir);
> console.log('hook.js: ' + pluginDir);
> console.log('hook.js: ' + cmdLine
On Fri Apr 18 11:35 AM, Sergey Grebnov (Akvelon) wrote:
> Sound like most of us prefer module.export. Cool, will update the code today
> and let you know once this is done.
>
> Since we will be moving to cordova-lib the next action item here could be
> creating uniform hooks with shared code for
new Q.defer();
>
> setTimeout(function(){
> deferral.resolve();
> }, 1000);
>
> return deferral.promise;
> }
>
> Thx!!
> Sergey
>
> -Original Message-
> From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panar...@microsoft.com]
> Sent:
deferral.resolve();
}, 1000);
return deferral.promise;
}
Thx!!
Sergey
-Original Message-
From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panar...@microsoft.com]
Sent: Friday, April 18, 2014 12:30 PM
To: dev@cordova.apache.org
Subject: RE: Proposal: hooks support for plugins
As you rig
t; as well? CordovaCLI can be yet another
consumer of this sandbox.
-Original Message-
From: Shazron [mailto:shaz...@gmail.com]
Sent: Friday, April 18, 2014 11:16 AM
To: dev@cordova.apache.org
Subject: Re: Proposal: hooks support for plugins
Sorry for the flurry of emails, found a proof of c
>> > > > cordova project. An alternative would be to construct the javascript
>> > > > files to
>> > > have
>> > > > module.exports, and we could pass in the parameters to the function
>> > > > that
>> > >
re could
>> be
>> > creating uniform hooks with shared code for both application level and
>> > plugin level hooks. Thoughts?
>> >
>> > Thx!
>> > Sergey
>> > -----Original Message-
>> > From: brian.ler...@gmail.com [mailto:brian.le
e parameters to the function
> > > > that
> > > is
> > > > exported. This way, the module will not spawn a new node process.
> > > > Comments, Thoughts?
> > > >
> > > > -Original Message-
> > > > From: Sergey Gr
to:brian.ler...@gmail.com] On Behalf Of
> Brian LeRoux
> Sent: Friday, April 18, 2014 8:25 AM
> To: dev@cordova.apache.org
> Subject: Re: Proposal: hooks support for plugins
>
> like this too / would be much cleaner
>
>
>
> On Thu, Apr 17, 2014 at 5:38 PM, Shazron wrote:
>
!
Sergey
-Original Message-
From: brian.ler...@gmail.com [mailto:brian.ler...@gmail.com] On Behalf Of Brian
LeRoux
Sent: Friday, April 18, 2014 8:25 AM
To: dev@cordova.apache.org
Subject: Re: Proposal: hooks support for plugins
like this too / would be much cleaner
On Thu, Apr 17, 2014
ported. This way, the module will not spawn a new node process.
> > Comments, Thoughts?
> >
> > -Original Message-
> > From: Sergey Grebnov (Akvelon) [mailto:v-seg...@microsoft.com]
> > Sent: Thursday, April 17, 2014 5:19 PM
> > To: dev@cordova.apache.org
lon) [mailto:v-seg...@microsoft.com]
> Sent: Thursday, April 17, 2014 5:19 PM
> To: dev@cordova.apache.org
> Subject: RE: Proposal: hooks support for plugins
>
> I've sent a pull request with initial implementation for review.
> https://github.com/apache/cordova-plugman/pul
.
Comments, Thoughts?
-Original Message-
From: Sergey Grebnov (Akvelon) [mailto:v-seg...@microsoft.com]
Sent: Thursday, April 17, 2014 5:19 PM
To: dev@cordova.apache.org
Subject: RE: Proposal: hooks support for plugins
I've sent a pull request with initial implementation for review.
t: RE: Proposal: hooks support for plugins
On Thu Mar 6 01:57 PM, Sergey Grebnov (Akvelon) wrote:
> Can we think about scripts as just a new plugin module? - Similar to
> js-module or config-file and which must be processed special way (by
> execution).
>
> src="src/windows8/
On Thu Mar 6 01:57 PM, Sergey Grebnov (Akvelon) wrote:
> Can we think about scripts as just a new plugin module? - Similar to
> js-module or
> config-file and which must be processed special way (by
> execution).
>
> src="src/windows8/SQLitePCL.Ext.dll" custom="true"/> src="src/add_win8_toastC
; flag (or each script
file can emit install and uninstall functions)
Thx!
Sergey
-Original Message-
From: Jonathan Bond-Caron [mailto:jbo...@gdesolutions.com]
Sent: Thursday, March 6, 2014 9:31 PM
To: dev@cordova.apache.org
Subject: RE: Proposal: hooks support for plugins
On Thu Mar
On Thu Mar 6 11:41 AM, Michal Mocny wrote:
> On Thu, Mar 6, 2014 at 11:16 AM, Jonathan Bond-Caron <
> jbo...@gdesolutions.com> wrote:
>
> > On Wed Mar 5 04:13 PM, Michal Mocny wrote:
> > > For cli workflow: hooks (including plugin hooks) can access
> > > config.xml 's for things like the sqllite c
On Thu, Mar 6, 2014 at 11:16 AM, Jonathan Bond-Caron <
jbo...@gdesolutions.com> wrote:
> On Wed Mar 5 04:13 PM, Michal Mocny wrote:
> > For cli workflow: hooks (including plugin hooks) can access config.xml
> > 's for things like the sqllite compile example (recompile
> only if
> > settings change
On Wed Mar 5 04:13 PM, Michal Mocny wrote:
> For cli workflow: hooks (including plugin hooks) can access config.xml
> 's for things like the sqllite compile example (recompile only if
> settings changed would be nice), and access at runtime for the
> console example.
>
> For old workflow, perhaps
For cli workflow: hooks (including plugin hooks) can access config.xml
's for things like the sqllite compile example (recompile only
if settings changed would be nice), and access at runtime for
the console example.
For old workflow, perhaps sqllite is documented to manually run the hook to
reco
Okay, you convinced me. args make sense for hooks for preinstall/install
hooks, everything else, the plugin scripts should be able to manage on
their own by writing some config/settings data to it's own plugin folder.
I think the bigger discussion for now needs to be around the permissions,
secur
On Wed Mar 5 02:54 PM, Jesse wrote:
> I am a no to passing arguments, the use-case is really about doing some
> extra
> tasks for the current environment.
>
Not necessarily:
https://github.com/apache/cordova-plugin-console/blob/master/www/logger.js#L48
cordova plugin add cordova-plugin-console -
We also have to keep the whole dependency tree in mind as well.
ie. com.plugins.benign depends on com.plugins.nefarious
Not sure how a warning banner would address this.
@purplecabbage
risingj.com
On Wed, Mar 5, 2014 at 12:30 PM, Michal Mocny wrote:
> On Wed, Mar 5, 2014 at 3:30 PM, Michal Mo
On Wed, Mar 5, 2014 at 3:30 PM, Michal Mocny wrote:
>
>
>
> On Wed, Mar 5, 2014 at 3:02 PM, Brian LeRoux wrote:
>
>> Agree w/ your points Jesse. I'm going to reach out to Maven folks to find
>> out what they've done wrt to publishing policy.
>>
>>
>> On Wed, Mar 5, 2014 at 11:54 AM, Jesse wrote
On Wed, Mar 5, 2014 at 3:02 PM, Brian LeRoux wrote:
> Agree w/ your points Jesse. I'm going to reach out to Maven folks to find
> out what they've done wrt to publishing policy.
>
>
> On Wed, Mar 5, 2014 at 11:54 AM, Jesse wrote:
>
> > I am a no to passing arguments, the use-case is really about
Agree w/ your points Jesse. I'm going to reach out to Maven folks to find
out what they've done wrt to publishing policy.
On Wed, Mar 5, 2014 at 11:54 AM, Jesse wrote:
> I am a no to passing arguments, the use-case is really about doing some
> extra tasks for the current environment.
>
> I am a
I am a no to passing arguments, the use-case is really about doing some
extra tasks for the current environment.
I am also a 'no' to prompting the user for permission, this shortly becomes
a permission list of which plugins can and can't run scripts, or do we ask
this every time?
We definitely ne
Not sure passing through command-line arguments is feasible for dependent
plugins. Maybe have the scripts get their args from environment variables?
On Wed, Mar 5, 2014 at 12:59 PM, Jonathan Bond-Caron <
jbo...@gdesolutions.com> wrote:
> On Wed Mar 5 12:00 PM, Marcel Kinard wrote:
> > In that ca
On Wed Mar 5 12:00 PM, Marcel Kinard wrote:
> In that case (i.e., "npm test") the user is explicitly invoking the
> script. If we are
> talking about hooks that run automatically on
> "cordova plugin add", then it is
> implicit. How about if the cli
> prompted the user when a hook request is presen
In that case (i.e., "npm test") the user is explicitly invoking the script. If
we are talking about hooks that run automatically on "cordova plugin add", then
it is implicit. How about if the cli prompted the user when a hook request is
present such as "plugin foobar wants to run the script xyz.
On Sat Mar 1 01:39 PM, Sergey Grebnov (Akvelon) wrote:
>
>
>
> preinstall.js is called before plugman.raw.install(platform, platformRoot,
> path.basename(dir), pluginsDir, options) and could be used to check system
> requirements, download/compile required libraries, etc
>
> afterinstall.js is
Note that this is very similar to npm. My guess is that security story would be
the same.
-Original Message-
From: agri...@google.com [mailto:agri...@google.com] On Behalf Of Andrew Grieve
Sent: Monday, March 3, 2014 10:45 AM
To: dev
Subject: Re: Proposal: hooks support for plugins
this capability is supported in npm (for which we base much of our plugin
thinking and src) so technically I don't see much issue and the use cases
are def there
On Mon, Mar 3, 2014 at 10:44 AM, Andrew Grieve wrote:
> There's definitely a security angle to this. E.g. You install a plugin and
There's definitely a security angle to this. E.g. You install a plugin and
now it's running code on your machine in a non-sandboxed way. Maybe could
warn before running the script for the first time, or show a badge on its
plugins.cordova.io page to highlight this.
install hooks might make it hard
I originally replied to the personal cc: version of this message I got.
Here is what I said :
It's a very interesting idea and would be powerful.
My only concern is that Cordova apps can be built just by calling platform
create scripts, with plugins added by calling plugman directly. The hooks
a
59 matches
Mail list logo