csp.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. define('vs/basic-languages/csp/csp',["require", "exports"], function (require, exports) {
  6. "use strict";
  7. Object.defineProperty(exports, "__esModule", { value: true });
  8. exports.language = exports.conf = void 0;
  9. exports.conf = {
  10. brackets: [],
  11. autoClosingPairs: [],
  12. surroundingPairs: []
  13. };
  14. exports.language = {
  15. // Set defaultToken to invalid to see what you do not tokenize yet
  16. // defaultToken: 'invalid',
  17. keywords: [],
  18. typeKeywords: [],
  19. tokenPostfix: '.csp',
  20. operators: [],
  21. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  22. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  23. tokenizer: {
  24. root: [
  25. [/child-src/, 'string.quote'],
  26. [/connect-src/, 'string.quote'],
  27. [/default-src/, 'string.quote'],
  28. [/font-src/, 'string.quote'],
  29. [/frame-src/, 'string.quote'],
  30. [/img-src/, 'string.quote'],
  31. [/manifest-src/, 'string.quote'],
  32. [/media-src/, 'string.quote'],
  33. [/object-src/, 'string.quote'],
  34. [/script-src/, 'string.quote'],
  35. [/style-src/, 'string.quote'],
  36. [/worker-src/, 'string.quote'],
  37. [/base-uri/, 'string.quote'],
  38. [/plugin-types/, 'string.quote'],
  39. [/sandbox/, 'string.quote'],
  40. [/disown-opener/, 'string.quote'],
  41. [/form-action/, 'string.quote'],
  42. [/frame-ancestors/, 'string.quote'],
  43. [/report-uri/, 'string.quote'],
  44. [/report-to/, 'string.quote'],
  45. [/upgrade-insecure-requests/, 'string.quote'],
  46. [/block-all-mixed-content/, 'string.quote'],
  47. [/require-sri-for/, 'string.quote'],
  48. [/reflected-xss/, 'string.quote'],
  49. [/referrer/, 'string.quote'],
  50. [/policy-uri/, 'string.quote'],
  51. [/'self'/, 'string.quote'],
  52. [/'unsafe-inline'/, 'string.quote'],
  53. [/'unsafe-eval'/, 'string.quote'],
  54. [/'strict-dynamic'/, 'string.quote'],
  55. [/'unsafe-hashed-attributes'/, 'string.quote']
  56. ]
  57. }
  58. };
  59. });