base.js 821 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. /*
  3. Copyright 2019 Google LLC
  4. Use of this source code is governed by an MIT-style
  5. license that can be found in the LICENSE file or at
  6. https://opensource.org/licenses/MIT.
  7. */
  8. const joi = require('@hapi/joi');
  9. const defaults = require('../defaults');
  10. const manifestEntryObject = require('../objects/manifest-entry');
  11. const regExpObject = require('../objects/reg-exp');
  12. module.exports = {
  13. additionalManifestEntries: joi.array().items(joi.string(), manifestEntryObject),
  14. dontCacheBustURLsMatching: regExpObject,
  15. manifestTransforms: joi.array().items(joi.func().minArity(1).maxArity(2)),
  16. maximumFileSizeToCacheInBytes: joi.number().min(1).default(defaults.maximumFileSizeToCacheInBytes),
  17. mode: joi.string().default(process.env.NODE_ENV || defaults.mode),
  18. modifyURLPrefix: joi.object()
  19. };