binnacle 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +138 -0
- data/LICENSE.txt +22 -0
- data/README.asc +264 -0
- data/Rakefile +48 -0
- data/bin/binnacle +5 -0
- data/binnacle.gemspec +49 -0
- data/lib/binnacle.rb +112 -0
- data/lib/binnacle/client.rb +115 -0
- data/lib/binnacle/commands/commands.rb +20 -0
- data/lib/binnacle/commands/help.rb +21 -0
- data/lib/binnacle/commands/tail.rb +187 -0
- data/lib/binnacle/configuration.rb +278 -0
- data/lib/binnacle/connection.rb +66 -0
- data/lib/binnacle/errors.rb +4 -0
- data/lib/binnacle/http_logging/adapters/ethon.rb +44 -0
- data/lib/binnacle/http_logging/adapters/excon.rb +62 -0
- data/lib/binnacle/http_logging/adapters/http.rb +63 -0
- data/lib/binnacle/http_logging/adapters/httpclient.rb +93 -0
- data/lib/binnacle/http_logging/adapters/net_http.rb +54 -0
- data/lib/binnacle/http_logging/adapters/patron.rb +24 -0
- data/lib/binnacle/http_logging/adapters/typhoeus.rb +20 -0
- data/lib/binnacle/http_logging/http_logger.rb +83 -0
- data/lib/binnacle/logging/formatter.rb +62 -0
- data/lib/binnacle/logging/logging.rb +36 -0
- data/lib/binnacle/logging/request_log_subscriber.rb +120 -0
- data/lib/binnacle/resource.rb +54 -0
- data/lib/binnacle/resources/event.rb +100 -0
- data/lib/binnacle/trap/backtrace.rb +130 -0
- data/lib/binnacle/trap/exception_event.rb +176 -0
- data/lib/binnacle/trap/middleware.rb +45 -0
- data/lib/binnacle/trap/railtie.rb +28 -0
- data/lib/binnacle/version.rb +3 -0
- data/lib/generators/binnacle/binnacle_generator.rb +78 -0
- data/lib/generators/binnacle/templates/firebase-messaging-sw.js.erb +35 -0
- data/spec/adapters/ethon_adapter.rb +19 -0
- data/spec/adapters/excon_adapter.rb +10 -0
- data/spec/adapters/faraday_adapter.rb +46 -0
- data/spec/adapters/http_adapter.rb +14 -0
- data/spec/adapters/http_base_adapter.rb +37 -0
- data/spec/adapters/httparty_adapter.rb +10 -0
- data/spec/adapters/httpclient_adapter.rb +21 -0
- data/spec/adapters/net_http_adapter.rb +14 -0
- data/spec/adapters/open_uri_adapter.rb +17 -0
- data/spec/adapters/patron_adapter.rb +29 -0
- data/spec/adapters/typhoeus_adapter.rb +25 -0
- data/spec/backtrace_spec.rb +197 -0
- data/spec/binnacle_spec.rb +33 -0
- data/spec/client_spec.rb +128 -0
- data/spec/commands_spec.rb +91 -0
- data/spec/configuration_spec.rb +139 -0
- data/spec/connection_spec.rb +34 -0
- data/spec/exception_event_spec.rb +72 -0
- data/spec/http_logger_spec.rb +77 -0
- data/spec/logger_spec.rb +60 -0
- data/spec/spec_helper.rb +117 -0
- data/spec/support/index.html +8 -0
- data/spec/support/index.html.gz +0 -0
- data/spec/support/test.bin +0 -0
- data/spec/support/test_server.rb +31 -0
- data/spec/support/utf8-invalid.html +0 -0
- data/spec/support/utf8.html +8 -0
- data/spec/vcr/binnacle/configure_can_be_configured_via_a_hash_of_options.yml +42 -0
- data/spec/vcr/binnacle/configure_creates_a_module_level_instance_of_a_binnacle_client.yml +42 -0
- data/spec/vcr/binnacle_client/events_invokes_the_events_api.yml +124 -0
- data/spec/vcr/binnacle_client/events_returns_a_collection_of_event_objects.yml +124 -0
- data/spec/vcr/binnacle_client/recents_invokes_the_events_api_recents.yml +83 -0
- data/spec/vcr/binnacle_client/recents_returns_a_collection_of_event_objects.yml +83 -0
- data/spec/vcr/binnacle_client/report_exception_invokes_the_events_api_signal.yml +121 -0
- data/spec/vcr/binnacle_client/signal_asynch_invokes_the_events_api_signal.yml +74 -0
- data/spec/vcr/binnacle_client/signal_invokes_the_events_api_signal.yml +74 -0
- data/spec/vcr/binnacle_client_ready_/returns_true_if_a_connection_has_been_successfully_established.yml +42 -0
- data/spec/vcr/binnacle_command/tail_command_with_n_flag_returns_recent_events.yml +81 -0
- data/spec/vcr/binnacle_connection/initialize_fails_with_incorrect_credentials.yml +40 -0
- data/spec/vcr/binnacle_connection/initialize_retrieves_available_endpoints_upon_successful_connection.yml +42 -0
- data/spec/vcr/binnacle_http_logger/_htt_party_adapter_should_log__ge_t_requests.yml +122 -0
- data/spec/vcr/binnacle_http_logger/_http_adapter_should_log__ge_t_requests.yml +165 -0
- data/spec/vcr/binnacle_http_logger/_http_client_adapter_should_log__ge_t_requests.yml +274 -0
- data/spec/vcr/binnacle_http_logger/ethon_adapter_should_log__ge_t_requests.yml +87 -0
- data/spec/vcr/binnacle_http_logger/excon_adapter_should_log__ge_t_requests.yml +204 -0
- data/spec/vcr/binnacle_http_logger/faraday_adapter_should_log__ge_t_requests.yml +200 -0
- data/spec/vcr/binnacle_http_logger/net_http_adapter_should_log__ge_t_requests.yml +827 -0
- data/spec/vcr/binnacle_http_logger/open_uri_adapter_should_log__ge_t_requests.yml +751 -0
- data/spec/vcr/binnacle_http_logger/patron_adapter_should_log__ge_t_requests.yml +124 -0
- data/spec/vcr/binnacle_http_logger/typhoeus_adapter_should_log__ge_t_requests.yml +124 -0
- data/spec/vcr/binnacle_logging/logging_allows_passing_other_parameters_using_a_hash.yml +119 -0
- data/spec/vcr/binnacle_logging/logging_invokes_the_events_api_signal.yml +75 -0
- data/spec/vcr/binnacle_logging/logging_respects_the_logger_severity.yml +81 -0
- data/vendor/assets/javascripts/atmosphere/atmosphere.js +3487 -0
- data/vendor/assets/javascripts/base64/base64.js +61 -0
- data/vendor/assets/javascripts/binnacle.js +5 -0
- data/vendor/assets/javascripts/binnacle/binnacle.js +9090 -0
- data/vendor/assets/javascripts/firebase/firebase-app-externs.js +261 -0
- data/vendor/assets/javascripts/firebase/firebase-app.js +35 -0
- data/vendor/assets/javascripts/firebase/firebase-auth-externs.js +1300 -0
- data/vendor/assets/javascripts/firebase/firebase-auth.js +241 -0
- data/vendor/assets/javascripts/firebase/firebase-database-externs.js +1700 -0
- data/vendor/assets/javascripts/firebase/firebase-database.js +260 -0
- data/vendor/assets/javascripts/firebase/firebase-messaging-externs.js +164 -0
- data/vendor/assets/javascripts/firebase/firebase-messaging.js +35 -0
- data/vendor/assets/javascripts/firebase/firebase-storage-externs.js +663 -0
- data/vendor/assets/javascripts/firebase/firebase-storage.js +52 -0
- data/vendor/assets/javascripts/firebase/firebase.js +611 -0
- data/vendor/assets/javascripts/moment/locale/af.js +73 -0
- data/vendor/assets/javascripts/moment/locale/ar-dz.js +59 -0
- data/vendor/assets/javascripts/moment/locale/ar-kw.js +59 -0
- data/vendor/assets/javascripts/moment/locale/ar-ly.js +126 -0
- data/vendor/assets/javascripts/moment/locale/ar-ma.js +60 -0
- data/vendor/assets/javascripts/moment/locale/ar-sa.js +105 -0
- data/vendor/assets/javascripts/moment/locale/ar-tn.js +59 -0
- data/vendor/assets/javascripts/moment/locale/ar.js +142 -0
- data/vendor/assets/javascripts/moment/locale/az.js +105 -0
- data/vendor/assets/javascripts/moment/locale/be.js +134 -0
- data/vendor/assets/javascripts/moment/locale/bg.js +90 -0
- data/vendor/assets/javascripts/moment/locale/bn.js +119 -0
- data/vendor/assets/javascripts/moment/locale/bo.js +119 -0
- data/vendor/assets/javascripts/moment/locale/br.js +108 -0
- data/vendor/assets/javascripts/moment/locale/bs.js +143 -0
- data/vendor/assets/javascripts/moment/locale/ca.js +88 -0
- data/vendor/assets/javascripts/moment/locale/cs.js +172 -0
- data/vendor/assets/javascripts/moment/locale/cv.js +63 -0
- data/vendor/assets/javascripts/moment/locale/cy.js +81 -0
- data/vendor/assets/javascripts/moment/locale/da.js +60 -0
- data/vendor/assets/javascripts/moment/locale/de-at.js +79 -0
- data/vendor/assets/javascripts/moment/locale/de-ch.js +78 -0
- data/vendor/assets/javascripts/moment/locale/de.js +78 -0
- data/vendor/assets/javascripts/moment/locale/dv.js +100 -0
- data/vendor/assets/javascripts/moment/locale/el.js +100 -0
- data/vendor/assets/javascripts/moment/locale/en-au.js +67 -0
- data/vendor/assets/javascripts/moment/locale/en-ca.js +63 -0
- data/vendor/assets/javascripts/moment/locale/en-gb.js +67 -0
- data/vendor/assets/javascripts/moment/locale/en-ie.js +67 -0
- data/vendor/assets/javascripts/moment/locale/en-nz.js +67 -0
- data/vendor/assets/javascripts/moment/locale/eo.js +73 -0
- data/vendor/assets/javascripts/moment/locale/es-do.js +82 -0
- data/vendor/assets/javascripts/moment/locale/es.js +83 -0
- data/vendor/assets/javascripts/moment/locale/et.js +80 -0
- data/vendor/assets/javascripts/moment/locale/eu.js +66 -0
- data/vendor/assets/javascripts/moment/locale/fa.js +107 -0
- data/vendor/assets/javascripts/moment/locale/fi.js +107 -0
- data/vendor/assets/javascripts/moment/locale/fo.js +60 -0
- data/vendor/assets/javascripts/moment/locale/fr-ca.js +74 -0
- data/vendor/assets/javascripts/moment/locale/fr-ch.js +78 -0
- data/vendor/assets/javascripts/moment/locale/fr.js +83 -0
- data/vendor/assets/javascripts/moment/locale/fy.js +75 -0
- data/vendor/assets/javascripts/moment/locale/gd.js +76 -0
- data/vendor/assets/javascripts/moment/locale/gl.js +77 -0
- data/vendor/assets/javascripts/moment/locale/gom-latn.js +122 -0
- data/vendor/assets/javascripts/moment/locale/he.js +99 -0
- data/vendor/assets/javascripts/moment/locale/hi.js +124 -0
- data/vendor/assets/javascripts/moment/locale/hr.js +145 -0
- data/vendor/assets/javascripts/moment/locale/hu.js +109 -0
- data/vendor/assets/javascripts/moment/locale/hy-am.js +95 -0
- data/vendor/assets/javascripts/moment/locale/id.js +83 -0
- data/vendor/assets/javascripts/moment/locale/is.js +127 -0
- data/vendor/assets/javascripts/moment/locale/it.js +70 -0
- data/vendor/assets/javascripts/moment/locale/ja.js +80 -0
- data/vendor/assets/javascripts/moment/locale/jv.js +83 -0
- data/vendor/assets/javascripts/moment/locale/ka.js +89 -0
- data/vendor/assets/javascripts/moment/locale/kk.js +87 -0
- data/vendor/assets/javascripts/moment/locale/km.js +58 -0
- data/vendor/assets/javascripts/moment/locale/kn.js +126 -0
- data/vendor/assets/javascripts/moment/locale/ko.js +69 -0
- data/vendor/assets/javascripts/moment/locale/ky.js +88 -0
- data/vendor/assets/javascripts/moment/locale/lb.js +137 -0
- data/vendor/assets/javascripts/moment/locale/lo.js +70 -0
- data/vendor/assets/javascripts/moment/locale/lt.js +117 -0
- data/vendor/assets/javascripts/moment/locale/lv.js +97 -0
- data/vendor/assets/javascripts/moment/locale/me.js +111 -0
- data/vendor/assets/javascripts/moment/locale/mi.js +64 -0
- data/vendor/assets/javascripts/moment/locale/mk.js +90 -0
- data/vendor/assets/javascripts/moment/locale/ml.js +81 -0
- data/vendor/assets/javascripts/moment/locale/mr.js +159 -0
- data/vendor/assets/javascripts/moment/locale/ms-my.js +83 -0
- data/vendor/assets/javascripts/moment/locale/ms.js +82 -0
- data/vendor/assets/javascripts/moment/locale/my.js +96 -0
- data/vendor/assets/javascripts/moment/locale/nb.js +63 -0
- data/vendor/assets/javascripts/moment/locale/ne.js +123 -0
- data/vendor/assets/javascripts/moment/locale/nl-be.js +88 -0
- data/vendor/assets/javascripts/moment/locale/nl.js +88 -0
- data/vendor/assets/javascripts/moment/locale/nn.js +60 -0
- data/vendor/assets/javascripts/moment/locale/pa-in.js +124 -0
- data/vendor/assets/javascripts/moment/locale/pl.js +107 -0
- data/vendor/assets/javascripts/moment/locale/pt-br.js +61 -0
- data/vendor/assets/javascripts/moment/locale/pt.js +65 -0
- data/vendor/assets/javascripts/moment/locale/ro.js +75 -0
- data/vendor/assets/javascripts/moment/locale/ru.js +183 -0
- data/vendor/assets/javascripts/moment/locale/sd.js +98 -0
- data/vendor/assets/javascripts/moment/locale/se.js +61 -0
- data/vendor/assets/javascripts/moment/locale/si.js +71 -0
- data/vendor/assets/javascripts/moment/locale/sk.js +150 -0
- data/vendor/assets/javascripts/moment/locale/sl.js +162 -0
- data/vendor/assets/javascripts/moment/locale/sq.js +70 -0
- data/vendor/assets/javascripts/moment/locale/sr-cyrl.js +110 -0
- data/vendor/assets/javascripts/moment/locale/sr.js +110 -0
- data/vendor/assets/javascripts/moment/locale/ss.js +89 -0
- data/vendor/assets/javascripts/moment/locale/sv.js +69 -0
- data/vendor/assets/javascripts/moment/locale/sw.js +59 -0
- data/vendor/assets/javascripts/moment/locale/ta.js +130 -0
- data/vendor/assets/javascripts/moment/locale/te.js +89 -0
- data/vendor/assets/javascripts/moment/locale/tet.js +68 -0
- data/vendor/assets/javascripts/moment/locale/th.js +67 -0
- data/vendor/assets/javascripts/moment/locale/tl-ph.js +62 -0
- data/vendor/assets/javascripts/moment/locale/tlh.js +120 -0
- data/vendor/assets/javascripts/moment/locale/tr.js +90 -0
- data/vendor/assets/javascripts/moment/locale/tzl.js +91 -0
- data/vendor/assets/javascripts/moment/locale/tzm-latn.js +58 -0
- data/vendor/assets/javascripts/moment/locale/tzm.js +58 -0
- data/vendor/assets/javascripts/moment/locale/uk.js +151 -0
- data/vendor/assets/javascripts/moment/locale/ur.js +99 -0
- data/vendor/assets/javascripts/moment/locale/uz-latn.js +58 -0
- data/vendor/assets/javascripts/moment/locale/uz.js +58 -0
- data/vendor/assets/javascripts/moment/locale/vi.js +79 -0
- data/vendor/assets/javascripts/moment/locale/x-pseudo.js +68 -0
- data/vendor/assets/javascripts/moment/locale/yo.js +60 -0
- data/vendor/assets/javascripts/moment/locale/zh-cn.js +111 -0
- data/vendor/assets/javascripts/moment/locale/zh-hk.js +105 -0
- data/vendor/assets/javascripts/moment/locale/zh-tw.js +104 -0
- data/vendor/assets/javascripts/moment/min/locales.js +9252 -0
- data/vendor/assets/javascripts/moment/min/moment-with-locales.js +13700 -0
- data/vendor/assets/javascripts/moment/min/moment.min.js +7 -0
- data/vendor/assets/javascripts/moment/min/tests.js +78265 -0
- data/vendor/assets/javascripts/moment/moment.js +4463 -0
- data/vendor/assets/javascripts/moment/src/lib/create/check-overflow.js +34 -0
- data/vendor/assets/javascripts/moment/src/lib/create/date-from-array.js +21 -0
- data/vendor/assets/javascripts/moment/src/lib/create/from-anything.js +110 -0
- data/vendor/assets/javascripts/moment/src/lib/create/from-array.js +140 -0
- data/vendor/assets/javascripts/moment/src/lib/create/from-object.js +16 -0
- data/vendor/assets/javascripts/moment/src/lib/create/from-string-and-array.js +50 -0
- data/vendor/assets/javascripts/moment/src/lib/create/from-string-and-format.js +113 -0
- data/vendor/assets/javascripts/moment/src/lib/create/from-string.js +202 -0
- data/vendor/assets/javascripts/moment/src/lib/create/local.js +5 -0
- data/vendor/assets/javascripts/moment/src/lib/create/parsing-flags.js +26 -0
- data/vendor/assets/javascripts/moment/src/lib/create/utc.js +5 -0
- data/vendor/assets/javascripts/moment/src/lib/create/valid.js +49 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/abs.js +18 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/add-subtract.js +21 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/as.js +61 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/bubble.js +61 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/constructor.js +44 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/create.js +122 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/duration.js +16 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/get.js +25 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/humanize.js +85 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/iso-string.js +56 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/prototype.js +50 -0
- data/vendor/assets/javascripts/moment/src/lib/duration/valid.js +35 -0
- data/vendor/assets/javascripts/moment/src/lib/format/format.js +92 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/base-config.js +44 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/calendar.js +15 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/constructor.js +5 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/en.js +15 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/formats.js +23 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/invalid.js +5 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/lists.js +93 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/locale.js +39 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/locales.js +186 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/ordinal.js +7 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/pre-post-format.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/prototype.js +69 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/relative.js +30 -0
- data/vendor/assets/javascripts/moment/src/lib/locale/set.js +49 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/add-subtract.js +55 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/calendar.js +26 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/clone.js +5 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/compare.js +59 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/constructor.js +77 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/creation-data.js +9 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/diff.js +62 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/format.js +57 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/from.js +17 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/get-set.js +55 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/locale.js +34 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/min-max.js +63 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/moment.js +28 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/now.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/prototype.js +150 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/start-end-of.js +59 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/to-type.js +34 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/to.js +17 -0
- data/vendor/assets/javascripts/moment/src/lib/moment/valid.js +15 -0
- data/vendor/assets/javascripts/moment/src/lib/parse/regex.js +54 -0
- data/vendor/assets/javascripts/moment/src/lib/parse/token.js +33 -0
- data/vendor/assets/javascripts/moment/src/lib/units/aliases.js +30 -0
- data/vendor/assets/javascripts/moment/src/lib/units/constants.js +9 -0
- data/vendor/assets/javascripts/moment/src/lib/units/day-of-month.js +39 -0
- data/vendor/assets/javascripts/moment/src/lib/units/day-of-week.js +364 -0
- data/vendor/assets/javascripts/moment/src/lib/units/day-of-year.js +36 -0
- data/vendor/assets/javascripts/moment/src/lib/units/hour.js +144 -0
- data/vendor/assets/javascripts/moment/src/lib/units/millisecond.js +69 -0
- data/vendor/assets/javascripts/moment/src/lib/units/minute.js +29 -0
- data/vendor/assets/javascripts/moment/src/lib/units/month.js +283 -0
- data/vendor/assets/javascripts/moment/src/lib/units/offset.js +235 -0
- data/vendor/assets/javascripts/moment/src/lib/units/priorities.js +16 -0
- data/vendor/assets/javascripts/moment/src/lib/units/quarter.js +32 -0
- data/vendor/assets/javascripts/moment/src/lib/units/second.js +29 -0
- data/vendor/assets/javascripts/moment/src/lib/units/timestamp.js +20 -0
- data/vendor/assets/javascripts/moment/src/lib/units/timezone.js +16 -0
- data/vendor/assets/javascripts/moment/src/lib/units/units.js +20 -0
- data/vendor/assets/javascripts/moment/src/lib/units/week-calendar-utils.js +65 -0
- data/vendor/assets/javascripts/moment/src/lib/units/week-year.js +107 -0
- data/vendor/assets/javascripts/moment/src/lib/units/week.js +67 -0
- data/vendor/assets/javascripts/moment/src/lib/units/year.js +75 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/abs-ceil.js +7 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/abs-floor.js +8 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/abs-round.js +7 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/compare-arrays.js +16 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/defaults.js +10 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/deprecate.js +55 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/extend.js +19 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/has-own-prop.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/hooks.js +13 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/index-of.js +18 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/is-array.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/is-date.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/is-function.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/is-number.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/is-object-empty.js +8 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/is-object.js +5 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/is-undefined.js +3 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/keys.js +19 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/map.js +7 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/some.js +19 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/to-int.js +12 -0
- data/vendor/assets/javascripts/moment/src/lib/utils/zero-fill.js +7 -0
- data/vendor/assets/javascripts/moment/src/locale/af.js +63 -0
- data/vendor/assets/javascripts/moment/src/locale/ar-dz.js +50 -0
- data/vendor/assets/javascripts/moment/src/locale/ar-kw.js +49 -0
- data/vendor/assets/javascripts/moment/src/locale/ar-ly.js +112 -0
- data/vendor/assets/javascripts/moment/src/locale/ar-ma.js +51 -0
- data/vendor/assets/javascripts/moment/src/locale/ar-sa.js +95 -0
- data/vendor/assets/javascripts/moment/src/locale/ar-tn.js +50 -0
- data/vendor/assets/javascripts/moment/src/locale/ar.js +128 -0
- data/vendor/assets/javascripts/moment/src/locale/az.js +96 -0
- data/vendor/assets/javascripts/moment/src/locale/be.js +125 -0
- data/vendor/assets/javascripts/moment/src/locale/bg.js +81 -0
- data/vendor/assets/javascripts/moment/src/locale/bn.js +109 -0
- data/vendor/assets/javascripts/moment/src/locale/bo.js +110 -0
- data/vendor/assets/javascripts/moment/src/locale/br.js +99 -0
- data/vendor/assets/javascripts/moment/src/locale/bs.js +133 -0
- data/vendor/assets/javascripts/moment/src/locale/ca.js +79 -0
- data/vendor/assets/javascripts/moment/src/locale/cs.js +163 -0
- data/vendor/assets/javascripts/moment/src/locale/cv.js +53 -0
- data/vendor/assets/javascripts/moment/src/locale/cy.js +72 -0
- data/vendor/assets/javascripts/moment/src/locale/da.js +50 -0
- data/vendor/assets/javascripts/moment/src/locale/de-at.js +69 -0
- data/vendor/assets/javascripts/moment/src/locale/de-ch.js +68 -0
- data/vendor/assets/javascripts/moment/src/locale/de.js +68 -0
- data/vendor/assets/javascripts/moment/src/locale/dv.js +89 -0
- data/vendor/assets/javascripts/moment/src/locale/el.js +88 -0
- data/vendor/assets/javascripts/moment/src/locale/en-au.js +58 -0
- data/vendor/assets/javascripts/moment/src/locale/en-ca.js +53 -0
- data/vendor/assets/javascripts/moment/src/locale/en-gb.js +58 -0
- data/vendor/assets/javascripts/moment/src/locale/en-ie.js +58 -0
- data/vendor/assets/javascripts/moment/src/locale/en-nz.js +57 -0
- data/vendor/assets/javascripts/moment/src/locale/eo.js +64 -0
- data/vendor/assets/javascripts/moment/src/locale/es-do.js +73 -0
- data/vendor/assets/javascripts/moment/src/locale/es.js +74 -0
- data/vendor/assets/javascripts/moment/src/locale/et.js +71 -0
- data/vendor/assets/javascripts/moment/src/locale/eu.js +57 -0
- data/vendor/assets/javascripts/moment/src/locale/fa.js +97 -0
- data/vendor/assets/javascripts/moment/src/locale/fi.js +98 -0
- data/vendor/assets/javascripts/moment/src/locale/fo.js +51 -0
- data/vendor/assets/javascripts/moment/src/locale/fr-ca.js +65 -0
- data/vendor/assets/javascripts/moment/src/locale/fr-ch.js +69 -0
- data/vendor/assets/javascripts/moment/src/locale/fr.js +74 -0
- data/vendor/assets/javascripts/moment/src/locale/fy.js +66 -0
- data/vendor/assets/javascripts/moment/src/locale/gd.js +67 -0
- data/vendor/assets/javascripts/moment/src/locale/gl.js +68 -0
- data/vendor/assets/javascripts/moment/src/locale/gom-latn.js +112 -0
- data/vendor/assets/javascripts/moment/src/locale/he.js +90 -0
- data/vendor/assets/javascripts/moment/src/locale/hi.js +115 -0
- data/vendor/assets/javascripts/moment/src/locale/hr.js +135 -0
- data/vendor/assets/javascripts/moment/src/locale/hu.js +100 -0
- data/vendor/assets/javascripts/moment/src/locale/hy-am.js +86 -0
- data/vendor/assets/javascripts/moment/src/locale/id.js +74 -0
- data/vendor/assets/javascripts/moment/src/locale/is.js +118 -0
- data/vendor/assets/javascripts/moment/src/locale/it.js +61 -0
- data/vendor/assets/javascripts/moment/src/locale/ja.js +71 -0
- data/vendor/assets/javascripts/moment/src/locale/jv.js +73 -0
- data/vendor/assets/javascripts/moment/src/locale/ka.js +80 -0
- data/vendor/assets/javascripts/moment/src/locale/kk.js +77 -0
- data/vendor/assets/javascripts/moment/src/locale/km.js +49 -0
- data/vendor/assets/javascripts/moment/src/locale/kn.js +116 -0
- data/vendor/assets/javascripts/moment/src/locale/ko.js +60 -0
- data/vendor/assets/javascripts/moment/src/locale/ky.js +78 -0
- data/vendor/assets/javascripts/moment/src/locale/lb.js +128 -0
- data/vendor/assets/javascripts/moment/src/locale/lo.js +61 -0
- data/vendor/assets/javascripts/moment/src/locale/lt.js +108 -0
- data/vendor/assets/javascripts/moment/src/locale/lv.js +88 -0
- data/vendor/assets/javascripts/moment/src/locale/me.js +101 -0
- data/vendor/assets/javascripts/moment/src/locale/mi.js +54 -0
- data/vendor/assets/javascripts/moment/src/locale/mk.js +81 -0
- data/vendor/assets/javascripts/moment/src/locale/ml.js +72 -0
- data/vendor/assets/javascripts/moment/src/locale/mr.js +150 -0
- data/vendor/assets/javascripts/moment/src/locale/ms-my.js +74 -0
- data/vendor/assets/javascripts/moment/src/locale/ms.js +73 -0
- data/vendor/assets/javascripts/moment/src/locale/my.js +86 -0
- data/vendor/assets/javascripts/moment/src/locale/nb.js +54 -0
- data/vendor/assets/javascripts/moment/src/locale/ne.js +114 -0
- data/vendor/assets/javascripts/moment/src/locale/nl-be.js +79 -0
- data/vendor/assets/javascripts/moment/src/locale/nl.js +79 -0
- data/vendor/assets/javascripts/moment/src/locale/nn.js +51 -0
- data/vendor/assets/javascripts/moment/src/locale/pa-in.js +115 -0
- data/vendor/assets/javascripts/moment/src/locale/pl.js +97 -0
- data/vendor/assets/javascripts/moment/src/locale/pt-br.js +52 -0
- data/vendor/assets/javascripts/moment/src/locale/pt.js +56 -0
- data/vendor/assets/javascripts/moment/src/locale/ro.js +66 -0
- data/vendor/assets/javascripts/moment/src/locale/ru.js +173 -0
- data/vendor/assets/javascripts/moment/src/locale/sd.js +88 -0
- data/vendor/assets/javascripts/moment/src/locale/se.js +51 -0
- data/vendor/assets/javascripts/moment/src/locale/si.js +61 -0
- data/vendor/assets/javascripts/moment/src/locale/sk.js +141 -0
- data/vendor/assets/javascripts/moment/src/locale/sl.js +152 -0
- data/vendor/assets/javascripts/moment/src/locale/sq.js +61 -0
- data/vendor/assets/javascripts/moment/src/locale/sr-cyrl.js +100 -0
- data/vendor/assets/javascripts/moment/src/locale/sr.js +100 -0
- data/vendor/assets/javascripts/moment/src/locale/ss.js +80 -0
- data/vendor/assets/javascripts/moment/src/locale/sv.js +60 -0
- data/vendor/assets/javascripts/moment/src/locale/sw.js +50 -0
- data/vendor/assets/javascripts/moment/src/locale/ta.js +120 -0
- data/vendor/assets/javascripts/moment/src/locale/te.js +79 -0
- data/vendor/assets/javascripts/moment/src/locale/tet.js +58 -0
- data/vendor/assets/javascripts/moment/src/locale/th.js +57 -0
- data/vendor/assets/javascripts/moment/src/locale/tl-ph.js +53 -0
- data/vendor/assets/javascripts/moment/src/locale/tlh.js +110 -0
- data/vendor/assets/javascripts/moment/src/locale/tr.js +81 -0
- data/vendor/assets/javascripts/moment/src/locale/tzl.js +82 -0
- data/vendor/assets/javascripts/moment/src/locale/tzm-latn.js +49 -0
- data/vendor/assets/javascripts/moment/src/locale/tzm.js +49 -0
- data/vendor/assets/javascripts/moment/src/locale/uk.js +142 -0
- data/vendor/assets/javascripts/moment/src/locale/ur.js +89 -0
- data/vendor/assets/javascripts/moment/src/locale/uz-latn.js +49 -0
- data/vendor/assets/javascripts/moment/src/locale/uz.js +49 -0
- data/vendor/assets/javascripts/moment/src/locale/vi.js +70 -0
- data/vendor/assets/javascripts/moment/src/locale/x-pseudo.js +58 -0
- data/vendor/assets/javascripts/moment/src/locale/yo.js +50 -0
- data/vendor/assets/javascripts/moment/src/locale/zh-cn.js +102 -0
- data/vendor/assets/javascripts/moment/src/locale/zh-hk.js +95 -0
- data/vendor/assets/javascripts/moment/src/locale/zh-tw.js +94 -0
- data/vendor/assets/javascripts/moment/src/moment.js +82 -0
- data/vendor/assets/javascripts/moment/templates/default.js +5 -0
- data/vendor/assets/javascripts/moment/templates/locale-header.js +6 -0
- data/vendor/assets/javascripts/moment/templates/test-header.js +6 -0
- metadata +943 -0
@@ -0,0 +1,663 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview Firebase Storage API.
|
3
|
+
* Version: 3.7.1
|
4
|
+
*
|
5
|
+
* Copyright 2017 Google Inc. All Rights Reserved.
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
*
|
19
|
+
* @externs
|
20
|
+
*/
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Gets the {@link firebase.storage.Storage `Storage`} service for the default
|
24
|
+
* app or a given app.
|
25
|
+
*
|
26
|
+
* `firebase.storage()` can be called with no arguments to access the default
|
27
|
+
* app's {@link firebase.storage.Storage `Storage`} service or as
|
28
|
+
* `firebase.storage(app)` to access the
|
29
|
+
* {@link firebase.storage.Storage `Storage`} service associated with a
|
30
|
+
* specific app.
|
31
|
+
*
|
32
|
+
* @example
|
33
|
+
* // Get the Storage service for the default app
|
34
|
+
* var defaultStorage = firebase.storage();
|
35
|
+
*
|
36
|
+
* @example
|
37
|
+
* // Get the Storage service for a given app
|
38
|
+
* var otherStorage = firebase.storage(otherApp);
|
39
|
+
*
|
40
|
+
* @namespace
|
41
|
+
* @param {!firebase.app.App=} app The app to create a storage service for.
|
42
|
+
* If not passed, uses the default app.
|
43
|
+
*
|
44
|
+
* @return {!firebase.storage.Storage}
|
45
|
+
*/
|
46
|
+
firebase.storage = function(app) {};
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Gets the {@link firebase.storage.Storage `Storage`} service for the current
|
50
|
+
* app, optionally initialized with a custom storage bucket.
|
51
|
+
*
|
52
|
+
* @example
|
53
|
+
* var storage = app.storage();
|
54
|
+
* // The above is shorthand for:
|
55
|
+
* // var storage = firebase.storage(app);
|
56
|
+
*
|
57
|
+
* @example
|
58
|
+
* var storage = app.storage("gs://your-app.appspot.com");
|
59
|
+
*
|
60
|
+
* @param {string=} url The gs:// url to your Firebase Storage Bucket.
|
61
|
+
* If not passed, uses the app's default Storage Bucket.
|
62
|
+
* @return {!firebase.storage.Storage}
|
63
|
+
*/
|
64
|
+
firebase.app.App.prototype.storage = function(url) {};
|
65
|
+
|
66
|
+
/**
|
67
|
+
* The Firebase Storage service interface.
|
68
|
+
*
|
69
|
+
* Do not call this constructor directly. Instead, use
|
70
|
+
* {@link firebase.storage `firebase.storage()`}.
|
71
|
+
*
|
72
|
+
* See
|
73
|
+
* {@link
|
74
|
+
* https://firebase.google.com/docs/storage/web/start/
|
75
|
+
* Get Started on Web}
|
76
|
+
* for a full guide on how to use the Firebase Storage service.
|
77
|
+
*
|
78
|
+
* @interface
|
79
|
+
*/
|
80
|
+
firebase.storage.Storage = function() {};
|
81
|
+
|
82
|
+
/**
|
83
|
+
* The {@link firebase.app.App app} associated with the `Storage` service
|
84
|
+
* instance.
|
85
|
+
*
|
86
|
+
* @example
|
87
|
+
* var app = storage.app;
|
88
|
+
*
|
89
|
+
* @type {!firebase.app.App}
|
90
|
+
*/
|
91
|
+
firebase.storage.Storage.prototype.app;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Returns a reference for the given path in the default bucket.
|
95
|
+
* @param {string=} path A relative path to initialize the reference with,
|
96
|
+
* for example `path/to/image.jpg`. If not passed, the returned reference
|
97
|
+
* points to the bucket root.
|
98
|
+
* @return {!firebase.storage.Reference} A reference for the given path.
|
99
|
+
*/
|
100
|
+
firebase.storage.Storage.prototype.ref = function(path) {};
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Returns a reference for the given absolute URL.
|
104
|
+
* @param {string} url A URL in the form: <br />
|
105
|
+
* 1) a gs:// URL, for example `gs://bucket/files/image.png` <br />
|
106
|
+
* 2) a download URL taken from object metadata. <br />
|
107
|
+
* @see {@link firebase.storage.FullMetadata.prototype.downloadURLs}
|
108
|
+
* @return {!firebase.storage.Reference} A reference for the given URL.
|
109
|
+
*/
|
110
|
+
firebase.storage.Storage.prototype.refFromURL = function(url) {};
|
111
|
+
|
112
|
+
/**
|
113
|
+
* The maximum time to retry operations other than uploads or downloads in
|
114
|
+
* milliseconds.
|
115
|
+
* @type {number}
|
116
|
+
*/
|
117
|
+
firebase.storage.Storage.prototype.maxOperationRetryTime;
|
118
|
+
|
119
|
+
/**
|
120
|
+
* @param {number} time The new maximum operation retry time in milliseconds.
|
121
|
+
* @see {@link firebase.storage.Storage.prototype.maxOperationRetryTime}
|
122
|
+
*/
|
123
|
+
firebase.storage.Storage.prototype.setMaxOperationRetryTime = function(time) {};
|
124
|
+
|
125
|
+
/**
|
126
|
+
* The maximum time to retry uploads in milliseconds.
|
127
|
+
* @type {number}
|
128
|
+
*/
|
129
|
+
firebase.storage.Storage.prototype.maxUploadRetryTime;
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @param {number} time The new maximum upload retry time in milliseconds.
|
133
|
+
* @see {@link firebase.storage.Storage.prototype.maxUploadRetryTime}
|
134
|
+
*/
|
135
|
+
firebase.storage.Storage.prototype.setMaxUploadRetryTime = function(time) {};
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Represents a reference to a Google Cloud Storage object. Developers can
|
139
|
+
* upload, download, and delete objects, as well as get/set object metadata.
|
140
|
+
* @interface
|
141
|
+
*/
|
142
|
+
firebase.storage.Reference = function() {};
|
143
|
+
|
144
|
+
/**
|
145
|
+
* Returns a gs:// URL for this object in the form
|
146
|
+
* `gs://<bucket>/<path>/<to>/<object>`
|
147
|
+
* @return {string} The gs:// URL.
|
148
|
+
*/
|
149
|
+
firebase.storage.Reference.prototype.toString = function() {};
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Returns a reference to a relative path from this reference.
|
153
|
+
* @param {string} path The relative path from this reference.
|
154
|
+
* Leading, trailing, and consecutive slashes are removed.
|
155
|
+
* @return {!firebase.storage.Reference} The reference a the given path.
|
156
|
+
*/
|
157
|
+
firebase.storage.Reference.prototype.child = function(path) {};
|
158
|
+
|
159
|
+
/**
|
160
|
+
* Uploads data to this reference's location.
|
161
|
+
* @param {!Blob|!Uint8Array|!ArrayBuffer} data The data to upload.
|
162
|
+
* @param {!firebase.storage.UploadMetadata=} metadata Metadata for the newly
|
163
|
+
* uploaded object.
|
164
|
+
* @return {!firebase.storage.UploadTask} An object that can be used to monitor
|
165
|
+
* and manage the upload.
|
166
|
+
*/
|
167
|
+
firebase.storage.Reference.prototype.put = function(data, metadata) {};
|
168
|
+
|
169
|
+
/**
|
170
|
+
* @enum {string}
|
171
|
+
* An enumeration of the possible string formats for upload.
|
172
|
+
*/
|
173
|
+
firebase.storage.StringFormat = {
|
174
|
+
/**
|
175
|
+
* Indicates the string should be interpreted "raw", that is, as normal text.
|
176
|
+
* The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte
|
177
|
+
* sequence.
|
178
|
+
* Example: The string 'Hello! \ud83d\ude0a' becomes the byte sequence
|
179
|
+
* 48 65 6c 6c 6f 21 20 f0 9f 98 8a
|
180
|
+
*/
|
181
|
+
RAW: 'raw',
|
182
|
+
/**
|
183
|
+
* Indicates the string should be interpreted as base64-encoded data.
|
184
|
+
* Padding characters (trailing '='s) are optional.
|
185
|
+
* Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence
|
186
|
+
* ad 69 8e fb e1 3a b7 bf eb 97
|
187
|
+
*/
|
188
|
+
BASE64: 'base64',
|
189
|
+
/**
|
190
|
+
* Indicates the string should be interpreted as base64url-encoded data.
|
191
|
+
* Padding characters (trailing '='s) are optional.
|
192
|
+
* Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence
|
193
|
+
* ad 69 8e fb e1 3a b7 bf eb 97
|
194
|
+
*/
|
195
|
+
BASE64URL: 'base64url',
|
196
|
+
/**
|
197
|
+
* Indicates the string is a data URL, such as one obtained from
|
198
|
+
* canvas.toDataURL().
|
199
|
+
* Example: the string 'data:application/octet-stream;base64,aaaa'
|
200
|
+
* becomes the byte sequence
|
201
|
+
* 69 a6 9a
|
202
|
+
* (the content-type "application/octet-stream" is also applied, but can
|
203
|
+
* be overridden in the metadata object).
|
204
|
+
*/
|
205
|
+
DATA_URL: 'data_url'
|
206
|
+
};
|
207
|
+
|
208
|
+
/**
|
209
|
+
* Uploads string data to this reference's location.
|
210
|
+
* @param {string} data The string to upload.
|
211
|
+
* @param {!firebase.storage.StringFormat=} format The format of the string to
|
212
|
+
* upload.
|
213
|
+
* @param {!firebase.storage.UploadMetadata=} metadata Metadata for the newly
|
214
|
+
* uploaded object.
|
215
|
+
* @return {!firebase.storage.UploadTask}
|
216
|
+
* @throws If the format is not an allowed format, or if the given string
|
217
|
+
* doesn't conform to the specified format.
|
218
|
+
*/
|
219
|
+
firebase.storage.Reference.prototype.putString = function(
|
220
|
+
data, format, metadata) {};
|
221
|
+
|
222
|
+
|
223
|
+
/**
|
224
|
+
* Deletes the object at this reference's location.
|
225
|
+
* @return {!firebase.Promise<void>} A Promise that resolves if the deletion
|
226
|
+
* succeeded and rejects if it failed, including if the object didn't exist.
|
227
|
+
*/
|
228
|
+
firebase.storage.Reference.prototype.delete = function() {};
|
229
|
+
|
230
|
+
/**
|
231
|
+
* Fetches metadata for the object at this location, if one exists.
|
232
|
+
* @return {!firebase.Promise<firebase.storage.FullMetadata>} A Promise that
|
233
|
+
* resolves with the metadata, or rejects if the fetch failed, including if
|
234
|
+
* the object did not exist.
|
235
|
+
*/
|
236
|
+
firebase.storage.Reference.prototype.getMetadata = function() {};
|
237
|
+
|
238
|
+
/**
|
239
|
+
* Updates the metadata for the object at this location, if one exists.
|
240
|
+
* @param {!firebase.storage.SettableMetadata} metadata The new metadata.
|
241
|
+
* Setting a property to 'null' removes it on the server, while leaving
|
242
|
+
* a property as 'undefined' has no effect.
|
243
|
+
* @return {!firebase.Promise<firebase.storage.FullMetadata>} A Promise that
|
244
|
+
* resolves with the full updated metadata or rejects if the updated failed,
|
245
|
+
* including if the object did not exist.
|
246
|
+
*/
|
247
|
+
firebase.storage.Reference.prototype.updateMetadata = function(metadata) {};
|
248
|
+
|
249
|
+
|
250
|
+
/**
|
251
|
+
* Fetches a long lived download URL for this object.
|
252
|
+
* @return {!firebase.Promise<string>} A Promise that resolves with the download
|
253
|
+
* URL or rejects if the fetch failed, including if the object did not
|
254
|
+
* exist.
|
255
|
+
*/
|
256
|
+
firebase.storage.Reference.prototype.getDownloadURL = function() {};
|
257
|
+
|
258
|
+
|
259
|
+
/**
|
260
|
+
* A reference pointing to the parent location of this reference, or null if
|
261
|
+
* this reference is the root.
|
262
|
+
* @type {?firebase.storage.Reference}
|
263
|
+
*/
|
264
|
+
firebase.storage.Reference.prototype.parent;
|
265
|
+
|
266
|
+
|
267
|
+
/**
|
268
|
+
* A reference to the root of this reference's bucket.
|
269
|
+
* @type {!firebase.storage.Reference}
|
270
|
+
*/
|
271
|
+
firebase.storage.Reference.prototype.root;
|
272
|
+
|
273
|
+
/**
|
274
|
+
* The name of the bucket containing this reference's object.
|
275
|
+
* @type {string}
|
276
|
+
*/
|
277
|
+
firebase.storage.Reference.prototype.bucket;
|
278
|
+
|
279
|
+
/**
|
280
|
+
* The full path of this object.
|
281
|
+
* @type {string}
|
282
|
+
*/
|
283
|
+
firebase.storage.Reference.prototype.fullPath;
|
284
|
+
|
285
|
+
/**
|
286
|
+
* The short name of this object, which is the last component of the full path.
|
287
|
+
* For example, if fullPath is 'full/path/image.png', name is 'image.png'.
|
288
|
+
* @type {string}
|
289
|
+
*/
|
290
|
+
firebase.storage.Reference.prototype.name;
|
291
|
+
|
292
|
+
/**
|
293
|
+
* The storage service associated with this reference.
|
294
|
+
* @type {!firebase.storage.Storage}
|
295
|
+
*/
|
296
|
+
firebase.storage.Reference.prototype.storage;
|
297
|
+
|
298
|
+
|
299
|
+
/**
|
300
|
+
* Object metadata that can be set at any time.
|
301
|
+
* @interface
|
302
|
+
*/
|
303
|
+
firebase.storage.SettableMetadata = function() {};
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Served as the 'Cache-Control' header on object download.
|
307
|
+
* @type {?string|undefined}
|
308
|
+
*/
|
309
|
+
firebase.storage.SettableMetadata.prototype.cacheControl;
|
310
|
+
|
311
|
+
/**
|
312
|
+
* Served as the 'Content-Disposition' header on object download.
|
313
|
+
* @type {?string|undefined}
|
314
|
+
*/
|
315
|
+
firebase.storage.SettableMetadata.prototype.contentDisposition;
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Served as the 'Content-Encoding' header on object download.
|
319
|
+
* @type {?string|undefined}
|
320
|
+
*/
|
321
|
+
firebase.storage.SettableMetadata.prototype.contentEncoding;
|
322
|
+
|
323
|
+
/**
|
324
|
+
* Served as the 'Content-Language' header on object download.
|
325
|
+
* @type {?string|undefined}
|
326
|
+
*/
|
327
|
+
firebase.storage.SettableMetadata.prototype.contentLanguage;
|
328
|
+
|
329
|
+
/**
|
330
|
+
* Served as the 'Content-Type' header on object download.
|
331
|
+
* @type {?string|undefined}
|
332
|
+
*/
|
333
|
+
firebase.storage.SettableMetadata.prototype.contentType;
|
334
|
+
|
335
|
+
/**
|
336
|
+
* Additional user-defined custom metadata.
|
337
|
+
* @type {?Object<string>|undefined}
|
338
|
+
*/
|
339
|
+
firebase.storage.SettableMetadata.prototype.customMetadata;
|
340
|
+
|
341
|
+
/**
|
342
|
+
* Object metadata that can be set at upload.
|
343
|
+
* @interface
|
344
|
+
* @extends {firebase.storage.SettableMetadata}
|
345
|
+
*/
|
346
|
+
firebase.storage.UploadMetadata = function() {};
|
347
|
+
|
348
|
+
/**
|
349
|
+
* A Base64-encoded MD5 hash of the object being uploaded.
|
350
|
+
* @type {?string|undefined}
|
351
|
+
*/
|
352
|
+
firebase.storage.UploadMetadata.prototype.md5Hash;
|
353
|
+
|
354
|
+
/**
|
355
|
+
* The full set of object metadata, including read-only properties.
|
356
|
+
* @interface
|
357
|
+
* @extends {firebase.storage.UploadMetadata}
|
358
|
+
*/
|
359
|
+
firebase.storage.FullMetadata = function() {};
|
360
|
+
|
361
|
+
/**
|
362
|
+
* The bucket this object is contained in.
|
363
|
+
* @type {string}
|
364
|
+
*/
|
365
|
+
firebase.storage.FullMetadata.prototype.bucket;
|
366
|
+
|
367
|
+
/**
|
368
|
+
* The object's generation.
|
369
|
+
* @type {string}
|
370
|
+
* @see {@link https://cloud.google.com/storage/docs/generations-preconditions}
|
371
|
+
*/
|
372
|
+
firebase.storage.FullMetadata.prototype.generation;
|
373
|
+
|
374
|
+
/**
|
375
|
+
* The object's metageneration.
|
376
|
+
* @type {string}
|
377
|
+
* @see {@link https://cloud.google.com/storage/docs/generations-preconditions}
|
378
|
+
*/
|
379
|
+
firebase.storage.FullMetadata.prototype.metageneration;
|
380
|
+
|
381
|
+
/**
|
382
|
+
* The full path of this object.
|
383
|
+
* @type {string}
|
384
|
+
*/
|
385
|
+
firebase.storage.FullMetadata.prototype.fullPath;
|
386
|
+
|
387
|
+
/**
|
388
|
+
* The short name of this object, which is the last component of the full path.
|
389
|
+
* For example, if fullPath is 'full/path/image.png', name is 'image.png'.
|
390
|
+
* @type {string}
|
391
|
+
*/
|
392
|
+
firebase.storage.FullMetadata.prototype.name;
|
393
|
+
|
394
|
+
/**
|
395
|
+
* The size of this object, in bytes.
|
396
|
+
* @type {number}
|
397
|
+
*/
|
398
|
+
firebase.storage.FullMetadata.prototype.size;
|
399
|
+
|
400
|
+
/**
|
401
|
+
* A date string representing when this object was created.
|
402
|
+
* @type {string}
|
403
|
+
*/
|
404
|
+
firebase.storage.FullMetadata.prototype.timeCreated;
|
405
|
+
|
406
|
+
/**
|
407
|
+
* A date string representing when this object was last updated.
|
408
|
+
* @type {string}
|
409
|
+
*/
|
410
|
+
firebase.storage.FullMetadata.prototype.updated;
|
411
|
+
|
412
|
+
/**
|
413
|
+
* An array of long-lived download URLs. Always contains at least one URL.
|
414
|
+
* @type {!Array<string>}
|
415
|
+
*/
|
416
|
+
firebase.storage.FullMetadata.prototype.downloadURLs;
|
417
|
+
|
418
|
+
/**
|
419
|
+
* An event that is triggered on a task.
|
420
|
+
* @enum {string}
|
421
|
+
* @see {@link firebase.storage.UploadTask.prototype.on}
|
422
|
+
*/
|
423
|
+
firebase.storage.TaskEvent = {
|
424
|
+
/**
|
425
|
+
* For this event,
|
426
|
+
* <ul>
|
427
|
+
* <li>The `next` function is triggered on progress updates and when the
|
428
|
+
* task is paused/resumed with a
|
429
|
+
* {@link firebase.storage.UploadTaskSnapshot} as the first
|
430
|
+
* argument.</li>
|
431
|
+
* <li>The `error` function is triggered if the upload is canceled or fails
|
432
|
+
* for another reason.</li>
|
433
|
+
* <li>The `complete` function is triggered if the upload completes
|
434
|
+
* successfully.</li>
|
435
|
+
* </ul>
|
436
|
+
*/
|
437
|
+
STATE_CHANGED: 'state_changed'
|
438
|
+
};
|
439
|
+
|
440
|
+
/**
|
441
|
+
* Represents the current state of a running upload.
|
442
|
+
* @enum {string}
|
443
|
+
*/
|
444
|
+
firebase.storage.TaskState = {
|
445
|
+
/** Indicates that the task is still running and making progress. */
|
446
|
+
RUNNING: 'running',
|
447
|
+
/** Indicates that the task is paused. */
|
448
|
+
PAUSED: 'paused',
|
449
|
+
/** Indicates that the task completed successfully. */
|
450
|
+
SUCCESS: 'success',
|
451
|
+
/** Indicates that the task was canceled. */
|
452
|
+
CANCELED: 'canceled',
|
453
|
+
/** Indicates that the task failed for a reason other than being canceled. */
|
454
|
+
ERROR: 'error'
|
455
|
+
};
|
456
|
+
|
457
|
+
/**
|
458
|
+
* Represents the process of uploading an object. Allows you to monitor and
|
459
|
+
* manage the upload.
|
460
|
+
* @interface
|
461
|
+
*/
|
462
|
+
firebase.storage.UploadTask = function() {};
|
463
|
+
|
464
|
+
/**
|
465
|
+
* This object behaves like a Promise, and resolves with its snapshot data when
|
466
|
+
* the upload completes.
|
467
|
+
* @param {(?function(!firebase.storage.UploadTaskSnapshot):*)=} onFulfilled
|
468
|
+
* The fulfillment callback. Promise chaining works as normal.
|
469
|
+
* @param {(?function(!Error):*)=} onRejected The rejection callback.
|
470
|
+
* @return {!firebase.Promise}
|
471
|
+
*/
|
472
|
+
firebase.storage.UploadTask.prototype.then = function(onFulfilled, onRejected) {
|
473
|
+
};
|
474
|
+
|
475
|
+
/**
|
476
|
+
* Equivalent to calling `then(null, onRejected)`.
|
477
|
+
* @param {!function(!Error):*} onRejected
|
478
|
+
* @return {!firebase.Promise}
|
479
|
+
*/
|
480
|
+
firebase.storage.UploadTask.prototype.catch = function(onRejected) {};
|
481
|
+
|
482
|
+
/**
|
483
|
+
* Listens for events on this task.
|
484
|
+
*
|
485
|
+
* Events have three callback functions (referred to as `next`, `error`, and
|
486
|
+
* `complete`).
|
487
|
+
*
|
488
|
+
* If only the event is passed, a function that can be used to register the
|
489
|
+
* callbacks is returned. Otherwise, the callbacks are passed after the event.
|
490
|
+
*
|
491
|
+
* Callbacks can be passed either as three separate arguments <em>or</em> as the
|
492
|
+
* `next`, `error`, and `complete` properties of an object. Any of the three
|
493
|
+
* callbacks is optional, as long as at least one is specified. In addition,
|
494
|
+
* when you add your callbacks, you get a function back. You can call this
|
495
|
+
* function to unregister the associated callbacks.
|
496
|
+
*
|
497
|
+
* @example <caption>Pass callbacks separately or in an object.</caption>
|
498
|
+
* var next = function(snapshot) {};
|
499
|
+
* var error = function(error) {};
|
500
|
+
* var complete = function() {};
|
501
|
+
*
|
502
|
+
* // The first example.
|
503
|
+
* uploadTask.on(
|
504
|
+
* firebase.storage.TaskEvent.STATE_CHANGED,
|
505
|
+
* next,
|
506
|
+
* error,
|
507
|
+
* complete);
|
508
|
+
*
|
509
|
+
* // This is equivalent to the first example.
|
510
|
+
* uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED, {
|
511
|
+
* 'next': next,
|
512
|
+
* 'error': error,
|
513
|
+
* 'complete': complete
|
514
|
+
* });
|
515
|
+
*
|
516
|
+
* // This is equivalent to the first example.
|
517
|
+
* var subscribe = uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED);
|
518
|
+
* subscribe(next, error, complete);
|
519
|
+
*
|
520
|
+
* // This is equivalent to the first example.
|
521
|
+
* var subscribe = uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED);
|
522
|
+
* subscribe({
|
523
|
+
* 'next': next,
|
524
|
+
* 'error': error,
|
525
|
+
* 'complete': complete
|
526
|
+
* });
|
527
|
+
*
|
528
|
+
* @example <caption>Any callback is optional.</caption>
|
529
|
+
* // Just listening for completion, this is legal.
|
530
|
+
* uploadTask.on(
|
531
|
+
* firebase.storage.TaskEvent.STATE_CHANGED,
|
532
|
+
* null,
|
533
|
+
* null,
|
534
|
+
* function() {
|
535
|
+
* console.log('upload complete!');
|
536
|
+
* });
|
537
|
+
*
|
538
|
+
* // Just listening for progress/state changes, this is legal.
|
539
|
+
* uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED, function(snapshot) {
|
540
|
+
* var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100;
|
541
|
+
* console.log(percent + "% done");
|
542
|
+
* });
|
543
|
+
*
|
544
|
+
* // This is also legal.
|
545
|
+
* uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED, {
|
546
|
+
* 'complete': function() {
|
547
|
+
* console.log('upload complete!');
|
548
|
+
* }
|
549
|
+
* });
|
550
|
+
*
|
551
|
+
* @example <caption>Use the returned function to remove callbacks.</caption>
|
552
|
+
* var unsubscribe = uploadTask.on(
|
553
|
+
* firebase.storage.TaskEvent.STATE_CHANGED,
|
554
|
+
* function(snapshot) {
|
555
|
+
* var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100;
|
556
|
+
* console.log(percent + "% done");
|
557
|
+
* // Stop after receiving one update.
|
558
|
+
* unsubscribe();
|
559
|
+
* });
|
560
|
+
*
|
561
|
+
* // This code is equivalent to the above.
|
562
|
+
* var handle = uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED);
|
563
|
+
* unsubscribe = handle(function(snapshot) {
|
564
|
+
* var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100;
|
565
|
+
* console.log(percent + "% done");
|
566
|
+
* // Stop after receiving one update.
|
567
|
+
* unsubscribe();
|
568
|
+
* });
|
569
|
+
*
|
570
|
+
* @param {!firebase.storage.TaskEvent} event The event to listen for.
|
571
|
+
* @param {(?function(!Object)|!Object)=} nextOrObserver The `next` function,
|
572
|
+
* which gets called for each item in the event stream, or an observer
|
573
|
+
* object with some or all of these three properties (`next`, `error`,
|
574
|
+
* `complete`).
|
575
|
+
* @param {?function(!Error)=} error A function that gets called with an Error
|
576
|
+
* if the event stream ends due to an error.
|
577
|
+
* @param {?function()=} complete A function that gets called if the
|
578
|
+
* event stream ends normally.
|
579
|
+
* @return {
|
580
|
+
* !function()|
|
581
|
+
* !function(?function(!Object),?function(!Error)=,?function()=)
|
582
|
+
* :!function()}
|
583
|
+
* If only the event argument is passed, returns a function you can use to
|
584
|
+
* add callbacks (see the examples above). If more than just the event
|
585
|
+
* argument is passed, returns a function you can call to unregister the
|
586
|
+
* callbacks.
|
587
|
+
*/
|
588
|
+
firebase.storage.UploadTask.prototype.on = function(
|
589
|
+
event, nextOrObserver, error, complete) {};
|
590
|
+
|
591
|
+
/**
|
592
|
+
* Resumes a paused task. Has no effect on a running or failed task.
|
593
|
+
* @return {boolean} True if the resume had an effect.
|
594
|
+
*/
|
595
|
+
firebase.storage.UploadTask.prototype.resume = function() {};
|
596
|
+
|
597
|
+
/**
|
598
|
+
* Pauses a running task. Has no effect on a paused or failed task.
|
599
|
+
* @return {boolean} True if the pause had an effect.
|
600
|
+
*/
|
601
|
+
firebase.storage.UploadTask.prototype.pause = function() {};
|
602
|
+
|
603
|
+
/**
|
604
|
+
* Cancels a running task. Has no effect on a complete or failed task.
|
605
|
+
* @return {boolean} True if the cancel had an effect.
|
606
|
+
*/
|
607
|
+
firebase.storage.UploadTask.prototype.cancel = function() {};
|
608
|
+
|
609
|
+
/**
|
610
|
+
* A snapshot of the current task state.
|
611
|
+
* @type {!firebase.storage.UploadTaskSnapshot}
|
612
|
+
*/
|
613
|
+
firebase.storage.UploadTask.prototype.snapshot;
|
614
|
+
|
615
|
+
/**
|
616
|
+
* Holds data about the current state of the upload task.
|
617
|
+
* @interface
|
618
|
+
*/
|
619
|
+
firebase.storage.UploadTaskSnapshot = function() {};
|
620
|
+
|
621
|
+
/**
|
622
|
+
* The number of bytes that have been successfully uploaded so far.
|
623
|
+
* @type {number}
|
624
|
+
*/
|
625
|
+
firebase.storage.UploadTaskSnapshot.prototype.bytesTransferred;
|
626
|
+
|
627
|
+
/**
|
628
|
+
* The total number of bytes to be uploaded.
|
629
|
+
* @type {number}
|
630
|
+
*/
|
631
|
+
firebase.storage.UploadTaskSnapshot.prototype.totalBytes;
|
632
|
+
|
633
|
+
/**
|
634
|
+
* The current state of the task.
|
635
|
+
* @type {firebase.storage.TaskState}
|
636
|
+
*/
|
637
|
+
firebase.storage.UploadTaskSnapshot.prototype.state;
|
638
|
+
|
639
|
+
/**
|
640
|
+
* Before the upload completes, contains the metadata sent to the server.
|
641
|
+
* After the upload completes, contains the metadata sent back from the server.
|
642
|
+
* @type {!firebase.storage.FullMetadata}
|
643
|
+
*/
|
644
|
+
firebase.storage.UploadTaskSnapshot.prototype.metadata;
|
645
|
+
|
646
|
+
/**
|
647
|
+
* After the upload completes, contains a long-lived download URL for the
|
648
|
+
* object. Also accessible in metadata.
|
649
|
+
* @type {?string}
|
650
|
+
*/
|
651
|
+
firebase.storage.UploadTaskSnapshot.prototype.downloadURL;
|
652
|
+
|
653
|
+
/**
|
654
|
+
* The task of which this is a snapshot.
|
655
|
+
* @type {!firebase.storage.UploadTask}
|
656
|
+
*/
|
657
|
+
firebase.storage.UploadTaskSnapshot.prototype.task;
|
658
|
+
|
659
|
+
/**
|
660
|
+
* The reference that spawned this snapshot's upload task.
|
661
|
+
* @type {!firebase.storage.Reference}
|
662
|
+
*/
|
663
|
+
firebase.storage.UploadTaskSnapshot.prototype.ref;
|