Result:
found 93 distributions and 265 files matching your query !
( run in 1.703 )
Mojolicious-Plugin-WebPush
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/WebPush.pm view on Meta::CPAN
my ($subs_session2user_p, $subs_create_p) = @_;
sub {
my ($c) = @_;
my ($decode_ok, $body) = _decode($c->req->body);
return _error($c, $body) if !$decode_ok;
eval { validate_subs_info($body) };
return _error($c, $@) if $@;
return $subs_session2user_p->($c, $c->session)->then(
sub { $subs_create_p->($c, $_[0], $body) },
)->then(
sub { $c->render(json => { data => { success => \1 } }) },
lib/Mojolicious/Plugin/WebPush.pm view on Meta::CPAN
sub register {
my ($self, $app, $conf) = @_;
my @config_errors = grep !exists $conf->{$_}, @MANDATORY_CONF;
die "Missing config keys @config_errors\n" if @config_errors;
$app->helper('webpush.create_p' => sub {
eval { validate_subs_info($_[2]) };
return Mojo::Promise->reject($@) if $@;
goto &{ $conf->{subs_create_p} };
});
$app->helper('webpush.read_p' => $conf->{subs_read_p});
$app->helper('webpush.delete_p' => $conf->{subs_delete_p});
lib/Mojolicious/Plugin/WebPush.pm view on Meta::CPAN
push => $conf->{push_handler} || $DEFAULT_PUSH_HANDLER
);
$self;
}
sub validate_subs_info {
my ($info) = @_;
die "Expected object\n" if ref $info ne 'HASH';
my @errors = map "no $_", grep !exists $info->{$_}, qw(keys endpoint);
push @errors, map "no $_", grep !exists $info->{keys}{$_}, qw(auth p256dh);
die "Errors found in subscription info: " . join(", ", @errors) . "\n"
view all matches for this distributionview release on metacpan - search on metacpan
Mojolicious-Plugin-Webpack
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/package-lock.json view on Meta::CPAN
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true,
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
"node": ">=4"
}
},
view all matches for this distributionview release on metacpan - search on metacpan
Mojolicious-Static-Role-Compressed
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/asset_memory.t
t/author-pod-syntax.t
t/basic.t
t/compression_types_lowercase.t
t/compression_types_setter.t
t/compression_types_validate.t
t/content_type.t
t/if_none_match.t
t/lib/TestHelpers.pm
t/public/compressed_one_larger.txt
t/public/compressed_one_larger.txt.br
t/serve.t
t/serve_asset.t
t/serve_file.t
t/should_serve_asset.t
t/should_serve_asset_setter.t
t/should_serve_asset_validate.t
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.703 second using v1.01-cache-2.11-cpan-39bf76dae61 )