From 7948b54d04bd1e04296ac3df3adc12cd7af4725d Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Thu, 24 Oct 2019 16:56:30 +0300 Subject: [PATCH 01/93] init --- .eslintignore | 3 + .eslintrc.js | 72 +++++++++++++++++ .gitignore | 19 +++++ .npmrc | 1 + .prettierignore | 3 + CODE_OF_CONDUCT.md | 75 ++++++++++++++++++ CONTRIBUTING.md | 7 ++ COPYRIGHT | 4 + LICENSE | 191 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 126 ++++++++++++++++++++++++++++++ README_CN.md | 136 ++++++++++++++++++++++++++++++++ package.json | 27 +++++++ prettier.config.js | 9 +++ serverless.js | 9 +++ 14 files changed, 682 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 .npmrc create mode 100644 .prettierignore create mode 100755 CODE_OF_CONDUCT.md create mode 100755 CONTRIBUTING.md create mode 100755 COPYRIGHT create mode 100755 LICENSE create mode 100755 README.md create mode 100644 README_CN.md create mode 100755 package.json create mode 100755 prettier.config.js create mode 100755 serverless.js diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..5de02b1 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +coverage +dist +node_modules \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..60a9b4f --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,72 @@ +module.exports = { + root: true, + extends: ['prettier'], + plugins: ['import', 'prettier'], + env: { + es6: true, + jest: true, + node: true + }, + parser: 'babel-eslint', + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + ecmaFeatures: { + jsx: true + } + }, + globals: { + on: true // for the Socket file + }, + rules: { + 'array-bracket-spacing': [ + 'error', + 'never', + { + objectsInArrays: false, + arraysInArrays: false + } + ], + 'arrow-parens': ['error', 'always'], + 'arrow-spacing': ['error', { before: true, after: true }], + 'comma-dangle': ['error', 'never'], + curly: 'error', + 'eol-last': 'error', + 'func-names': 'off', + 'id-length': [ + 'error', + { + min: 2, + max: 50, + properties: 'never', + exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$'] + } + ], + 'no-alert': 'error', + 'no-console': 'error', + 'no-const-assign': 'error', + 'no-else-return': 'error', + 'no-empty': 'off', + 'no-shadow': 'error', + 'no-undef': 'error', + 'no-unused-vars': 'error', + 'no-use-before-define': 'error', + 'no-useless-constructor': 'error', + 'object-curly-newline': 'off', + 'object-shorthand': 'off', + 'prefer-const': 'error', + 'prefer-destructuring': ['error', { object: true, array: false }], + quotes: [ + 'error', + 'single', + { + allowTemplateLiterals: true, + avoidEscape: true + } + ], + semi: ['error', 'never'], + 'spaced-comment': 'error', + strict: ['error', 'never'], + 'prettier/prettier': 'error' + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef6944e --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +.DS_Store +*.sublime-project +*.sublime-workspace +*.log +.serverless +v8-compile-cache-* +jest/* +coverage +.serverlessUnzipped +node_modules +.vscode/ +.eslintcache +dist +.idea +build/ +.env* +env.js +package-lock.json +test diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5de02b1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +coverage +dist +node_modules \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100755 index 0000000..525bca9 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,75 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting our team at **hello@serverless.com**. As an alternative +feel free to reach out to any of us personally. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..67440e3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,7 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a [code of conduct](./CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. + diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100755 index 0000000..b91dc08 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,4 @@ +Copyright (c) 2019 Serverless, Inc. https://serverless.com + +Serverless Components may be freely distributed under the Apache 2.0 license. + diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..e884b64 --- /dev/null +++ b/LICENSE @@ -0,0 +1,191 @@ +Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2018 Serverless, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/README.md b/README.md new file mode 100755 index 0000000..dd67050 --- /dev/null +++ b/README.md @@ -0,0 +1,126 @@ +# Tencent Express + +Instantly deploy Express applications to Tencent Cloud using Serverless Components + +  + +1. [Install](#1-install) +2. [Create](#2-create) +3. [Configure](#3-configure) +4. [Deploy](#4-deploy) +5. [Remove](#5-remove) + +  + +### 1. Install + +```console +$ npm install -g serverless +``` + +### 2. Create + +Just create `serverless.yml` and `.env` files + +```console +$ touch serverless.yml +$ touch .env # your Tencent API Keys +``` + +Set Tencent credentials in the `.env` file. + +``` +# .env +TENCENT_SECRET_ID=123 +TENCENT_SECRET_KEY=123 +TENCENT_APP_ID=123 +``` + +### 3. Configure + +```yml +# serverless.yml + +myBucket: + component: '@serverless/tencent-cos' + inputs: + # Required + bucket: myBucket-1300418942 # if you don't add the AppId suffix, it will be added automatically for you + region: ap-guangzhou + + # acl (Optional) + acl: + permissions: private + grantRead: STRING_VALUE + grantWrite: STRING_VALUE + grantFullControl: STRING_VALUE + + # cors (Optional) + cors: + - id: abc + maxAgeSeconds: '10' + allowedMethods: + - GET + allowedOrigins: + - https://tencent.com + allowedHeaders: + - FIRST_ALLOWED_HEADER + exposeHeaders: + - FIRST_EXPOSED_HEADER + + # tags (Optional) + tags: + - key: abc + value: xyz +``` + +### 4. Deploy + +``` +myApp (master)$ serverless --debug + + DEBUG ─ "myBucket-1300418942" bucket was successfully deployed to the "eu-frankfurt" region. + DEBUG ─ Setting ACL for "myBucket-1300418942" bucket in the "eu-frankfurt" region. + DEBUG ─ Setting CORS rules for "myBucket-1300418942" bucket in the "eu-frankfurt" region. + DEBUG ─ Setting Tags for "myBucket-1300418942" bucket in the "undefined" region. + + bucket: + bucket: myBucket-1300418942 + region: eu-frankfurt + acl: + permissions: private + cors: + - + id: abc + maxAgeSeconds: 10 + allowedMethods: (max depth reached) + allowedOrigins: (max depth reached) + allowedHeaders: (max depth reached) + exposeHeaders: (max depth reached) + tags: + - + key: abc + value: xyz + + 3s › bucket › done + +myApp (master)$ +``` + +### 5. Remove + +``` +myApp (master)$ serverless remove --debug + + DEBUG ─ Flushing template state and removing all components. + DEBUG ─ Removing "myBucket-1300418942" bucket from the "eu-frankfurt" region. + DEBUG ─ "myBucket-1300418942" bucket was successfully removed from the "eu-frankfurt" region. + + 7s › bucket › done + +myApp (master)$ +``` + +### New to Components? + +Checkout the [Serverless Components](https://github.com/serverless/components) repo for more information. diff --git a/README_CN.md b/README_CN.md new file mode 100644 index 0000000..580fdae --- /dev/null +++ b/README_CN.md @@ -0,0 +1,136 @@ +# 腾讯云对象存储 COS 组件 + +## 简介 + +该组件是 serverless-tencent 组件库中的基础组件之一。通过对象存储 COS 组件,可以快速,方便的创建,配置和管理腾讯云的 COS 存储桶 + +## 快速开始 + +通过 COS 组件,对一个 COS 存储桶进行完整的创建,配置,部署和删除等操作。支持命令如下: + +1. [安装](#1-安装) +2. [创建](#2-创建) +3. [配置](#3-配置) +4. [部署](#4-部署) +5. [移除](#5-移除) + +### 1. 安装 + +通过 npm 安装 serverless + +```console +$ npm install -g serverless +``` + +### 2. 创建 + +本地创建 `serverless.yml` 和 `.env` 两个文件 + +```console +$ touch serverless.yml +$ touch .env # 腾讯云的配置信息 +``` + +在 `.env` 文件中配置腾讯云的 APPID,SecretId 和 SecretKey 信息并保存 + +``` +# .env +TENCENT_SECRET_ID=123 +TENCENT_SECRET_KEY=123 +TENCENT_APP_ID=123 +``` + +### 3. 配置 + +在 serverless.yml 中进行如下配置 + +```yml +# serverless.yml + +myBucket: + component: '@serverless/tencent-cos' # 添加依赖的cos组件 + inputs: + # 必填 + bucket: myBucket-1300418942 # 存储桶后缀需要填写APPID信息,如果不填会默认帮忙添加后缀 + region: ap-guangzhou # 需要部署存储桶的地域信息 + + # acl配置 (可选) + acl: + permissions: private + grantRead: STRING_VALUE + grantWrite: STRING_VALUE + grantFullControl: STRING_VALUE + + # cors配置 (可选) + cors: + - id: abc + maxAgeSeconds: '10' + allowedMethods: + - GET + allowedOrigins: + - https://tencent.com + allowedHeaders: + - FIRST_ALLOWED_HEADER + exposeHeaders: + - FIRST_EXPOSED_HEADER + + # tags标签配置 (可选) + tags: + - key: abc + value: xyz +``` + +### 4. 部署 + +通过如下命令进行部署,并查看部署过程中的信息 + +``` +myApp (master)$ serverless --debug + + DEBUG ─ "myBucket-1300418942" bucket was successfully deployed to the "eu-frankfurt" region. + DEBUG ─ Setting ACL for "myBucket-1300418942" bucket in the "eu-frankfurt" region. + DEBUG ─ Setting CORS rules for "myBucket-1300418942" bucket in the "eu-frankfurt" region. + DEBUG ─ Setting Tags for "myBucket-1300418942" bucket in the "undefined" region. + + bucket: + bucket: myBucket-1300418942 + region: eu-frankfurt + acl: + permissions: private + cors: + - + id: abc + maxAgeSeconds: 10 + allowedMethods: (max depth reached) + allowedOrigins: (max depth reached) + allowedHeaders: (max depth reached) + exposeHeaders: (max depth reached) + tags: + - + key: abc + value: xyz + + 3s › bucket › done + +myApp (master)$ +``` + +### 5. 移除 + +通过以下命令移除部署的存储桶 + +``` +myApp (master)$ serverless remove --debug + + DEBUG ─ Flushing template state and removing all components. + DEBUG ─ Removing "myBucket-1300418942" bucket from the "eu-frankfurt" region. + DEBUG ─ "myBucket-1300418942" bucket was successfully removed from the "eu-frankfurt" region. + + 7s › bucket › done + +myApp (master)$ +``` + +### 还支持哪些组件? + +可以在 [Serverless Components](https://github.com/serverless/components) repo 中查询更多组件的信息。 diff --git a/package.json b/package.json new file mode 100755 index 0000000..bfcdf41 --- /dev/null +++ b/package.json @@ -0,0 +1,27 @@ +{ + "name": "@serverless/tencent-express", + "description": "Tencent Express Component", + "version": "1.0.0", + "main": "./serverless.js", + "publishConfig": { + "access": "public" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "lint": "eslint . --fix --cache" + }, + "author": "Serverless, Inc.", + "license": "Apache", + "dependencies": { + "@serverless/core": "^1.0.0", + "ramda": "^0.26.1" + }, + "devDependencies": { + "babel-eslint": "9.0.0", + "eslint": "5.6.0", + "eslint-config-prettier": "^3.6.0", + "eslint-plugin-import": "^2.18.0", + "eslint-plugin-prettier": "^3.0.1", + "prettier": "^1.18.2" + } +} diff --git a/prettier.config.js b/prettier.config.js new file mode 100755 index 0000000..e75727a --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,9 @@ +module.exports = { + arrowParens: 'always', + printWidth: 100, + semi: false, + singleQuote: true, + tabWidth: 2, + trailingComma: 'none' +} + diff --git a/serverless.js b/serverless.js new file mode 100755 index 0000000..fa3ba5d --- /dev/null +++ b/serverless.js @@ -0,0 +1,9 @@ +const { Component } = require('@serverless/core') + +class TencentExpress extends Component { + async default(inputs = {}) {} + + async remove(inputs = {}) {} +} + +module.exports = TencentExpress From 8e400bfa318968a679a8daa824dc57aaa64c615f Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Fri, 25 Oct 2019 20:16:59 +0300 Subject: [PATCH 02/93] basic version working --- README.md | 99 +- package.json | 2 + serverless.js | 54 +- shim/src/binary-case.js | 122 + shim/src/index.js | 223 ++ shim/src/media-typer.js | 141 + shim/src/middleware.js | 24 + shim/src/mime-db.json | 7990 +++++++++++++++++++++++++++++++++++++++ shim/src/mime-types.js | 188 + shim/src/type-is.js | 261 ++ 10 files changed, 9043 insertions(+), 61 deletions(-) create mode 100644 shim/src/binary-case.js create mode 100644 shim/src/index.js create mode 100644 shim/src/media-typer.js create mode 100644 shim/src/middleware.js create mode 100644 shim/src/mime-db.json create mode 100644 shim/src/mime-types.js create mode 100644 shim/src/type-is.js diff --git a/README.md b/README.md index dd67050..afbc588 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Tencent Express -Instantly deploy Express applications to Tencent Cloud using Serverless Components +Deploy Express applications to Tencent Cloud using Serverless Components   @@ -23,8 +23,9 @@ $ npm install -g serverless Just create `serverless.yml` and `.env` files ```console -$ touch serverless.yml $ touch .env # your Tencent API Keys +$ touch app.js +$ touch serverless.yml ``` Set Tencent credentials in the `.env` file. @@ -36,42 +37,39 @@ TENCENT_SECRET_KEY=123 TENCENT_APP_ID=123 ``` +Initialize a new NPM package and install express: + +``` +npm init # then keep hitting enter +npm i --save express # install express +``` + +create your express app in `app.js`: + +```js +const express = require('express') +const app = express() + +app.get('/', function(req, res) { + res.send('Hello from Express') +}) + +// don't forget to export! +module.exports = app +``` + ### 3. Configure ```yml # serverless.yml myBucket: - component: '@serverless/tencent-cos' + component: '@serverless/tencent-express' inputs: - # Required - bucket: myBucket-1300418942 # if you don't add the AppId suffix, it will be added automatically for you - region: ap-guangzhou - - # acl (Optional) - acl: - permissions: private - grantRead: STRING_VALUE - grantWrite: STRING_VALUE - grantFullControl: STRING_VALUE - - # cors (Optional) - cors: - - id: abc - maxAgeSeconds: '10' - allowedMethods: - - GET - allowedOrigins: - - https://tencent.com - allowedHeaders: - - FIRST_ALLOWED_HEADER - exposeHeaders: - - FIRST_EXPOSED_HEADER - - # tags (Optional) - tags: - - key: abc - value: xyz + functionName: eslam-function # SCF name + serviceName: mytest # APIGW service name + serviceId: service-np1uloxw # APIGW service id + code: ./code ``` ### 4. Deploy @@ -79,30 +77,16 @@ myBucket: ``` myApp (master)$ serverless --debug - DEBUG ─ "myBucket-1300418942" bucket was successfully deployed to the "eu-frankfurt" region. - DEBUG ─ Setting ACL for "myBucket-1300418942" bucket in the "eu-frankfurt" region. - DEBUG ─ Setting CORS rules for "myBucket-1300418942" bucket in the "eu-frankfurt" region. - DEBUG ─ Setting Tags for "myBucket-1300418942" bucket in the "undefined" region. - - bucket: - bucket: myBucket-1300418942 - region: eu-frankfurt - acl: - permissions: private - cors: - - - id: abc - maxAgeSeconds: 10 - allowedMethods: (max depth reached) - allowedOrigins: (max depth reached) - allowedHeaders: (max depth reached) - exposeHeaders: (max depth reached) - tags: - - - key: abc - value: xyz - - 3s › bucket › done + DEBUG ─ Endpoint ANY / already exists with id api-3n1p7a86. + DEBUG ─ Updating api with api id api-3n1p7a86. + DEBUG ─ Service with id api-3n1p7a86 updated. + DEBUG ─ Deploying service with id service-np1uloxw. + DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-guangzhou region. + + express: + url: http://service-np1uloxw-1300415943.gz.apigw.tencentcs.com/release + + 84s › express › done myApp (master)$ ``` @@ -113,10 +97,9 @@ myApp (master)$ myApp (master)$ serverless remove --debug DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removing "myBucket-1300418942" bucket from the "eu-frankfurt" region. - DEBUG ─ "myBucket-1300418942" bucket was successfully removed from the "eu-frankfurt" region. + DEBUG ─ Removed function eslam-function successful - 7s › bucket › done + 17s › express › done myApp (master)$ ``` diff --git a/package.json b/package.json index bfcdf41..47d1190 100755 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "license": "Apache", "dependencies": { "@serverless/core": "^1.0.0", + "@serverless/tencent-apigateway": "^1.2.0", + "@serverless/tencent-cloudfunction": "^1.1.0", "ramda": "^0.26.1" }, "devDependencies": { diff --git a/serverless.js b/serverless.js index fa3ba5d..63c9c3d 100755 --- a/serverless.js +++ b/serverless.js @@ -1,9 +1,57 @@ -const { Component } = require('@serverless/core') +const path = require('path') +const { Component, utils } = require('@serverless/core') class TencentExpress extends Component { - async default(inputs = {}) {} + async default(inputs = {}) { + inputs.include = [path.join(__dirname, 'shim', 'dist')] + inputs.handler = 'index.handler' + inputs.runtime = 'Nodejs8.9' + inputs.name = inputs.functionName + inputs.codeUri = inputs.code || process.cwd() - async remove(inputs = {}) {} + const appFile = path.join(path.resolve(inputs.codeUri), 'app.js') + + if (!(await utils.fileExists(appFile))) { + throw new Error(`app.js not found in ${inputs.codeUri}`) + } + + const tencentCloudFunction = await this.load('@serverless/tencent-cloudfunction') + const tencentApiGateway = await this.load('@serverless/tencent-apigateway') + + const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) + const tencentApiGatewayOutputs = await tencentApiGateway({ + serviceName: inputs.serviceName, + serviceId: inputs.serviceId, + region: inputs.region, + protocol: inputs.protocol, + environment: inputs.apiEnvironment, + endpoints: [ + { + path: '/', + method: 'ANY', + function: { + functionName: tencentCloudFunctionOutputs.Name + } + } + ] + }) + + const outputs = { + url: `${tencentApiGatewayOutputs.protocol}://${tencentApiGatewayOutputs.subDomain}/${tencentApiGatewayOutputs.environment}/` + } + + return outputs + } + + async remove() { + const tencentCloudFunction = await this.load('@serverless/tencent-cloudfunction') + const tencentApiGateway = await this.load('@serverless/tencent-apigateway') + + await tencentCloudFunction.remove() + await tencentApiGateway.remove() + + return {} + } } module.exports = TencentExpress diff --git a/shim/src/binary-case.js b/shim/src/binary-case.js new file mode 100644 index 0000000..726aee1 --- /dev/null +++ b/shim/src/binary-case.js @@ -0,0 +1,122 @@ +/** + * @license + * Copyright 2018 Brigham Young University + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + **/ + +/** + * A performance improved method for acquiring the binary case, provided by Blake Embrey with very minor modification by James Speirs. + * @author Blake Embrey | https://github.com/blakeembrey + * @author James Speirs | https://github.com/gi60s + * @param {string} str + * @param {number} val + * @returns {string} + */ +function getBinaryCase(str, val) { + let res = '' + + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i) + + if (code >= 65 && code <= 90) { + res += val & 1 ? String.fromCharCode(code + 32) : String.fromCharCode(code) + val >>>= 1 + } else if (code >= 97 && code <= 122) { + res += val & 1 ? String.fromCharCode(code - 32) : String.fromCharCode(code) + val >>>= 1 + } else { + res += String.fromCharCode(code) + } + + if (val === 0) { + return res + str.substr(i + 1) + } + } + + return res +} + +/** + * Toggle the case of a string based on the number value passed in. + * @param {string} string + * @param {number} number + * @param {object} [options={allowOverflow: true}] + * @returns {string|boolean} + */ + +function binaryCase(string, number, options) { + if (!options || typeof options !== 'object') { + options = {} + } + if (!options.hasOwnProperty('allowOverflow')) { + options.allowOverflow = true + } + + if (number > binaryCase.maxNumber(string) && !options.allowOverflow) { + return false + } + + return getBinaryCase(string, number) +} + +binaryCase.iterator = function(string, options) { + const max = binaryCase.maxNumber(string) + + if (!options || typeof options !== 'object') { + options = {} + } + if (!options.hasOwnProperty('startIndex')) { + options.startIndex = 0 + } + if ( + typeof options.startIndex !== 'number' || + !Number.isInteger(options.startIndex) || + options.startIndex < 0 + ) { + throw Error('Option startIndex must be a non-negative integer.') + } + + let index = options.startIndex + return { + next: function() { + return index > max ? { done: true } : { done: false, value: getBinaryCase(string, index++) } + } + } +} + +/** + * Get the maximum number that can be used before causing overflow. + * @param {string} string + * @returns {number} + */ +binaryCase.maxNumber = function(string) { + const pow = string.match(/[a-z]/gi).length + return Math.pow(2, pow) - 1 +} + +/** + * Get an array of all possible variations. + * @param {string} string + * @returns {string[]} + */ +binaryCase.variations = function(string) { + const results = [] + const max = binaryCase.maxNumber(string) + for (let i = 0; i <= max; i++) { + results.push(binaryCase(string, i)) + } + return results +} + +module.exports = binaryCase diff --git a/shim/src/index.js b/shim/src/index.js new file mode 100644 index 0000000..376603d --- /dev/null +++ b/shim/src/index.js @@ -0,0 +1,223 @@ +const http = require('http') +const url = require('url') +const binarycase = require('./binary-case') +const isType = require('./type-is') + +function getPathWithQueryStringParams(event) { + return url.format({ pathname: event.path, query: event.queryStringParameters }) +} +function getEventBody(event) { + return Buffer.from(event.body, event.isBase64Encoded ? 'base64' : 'utf8') +} + +function clone(json) { + return JSON.parse(JSON.stringify(json)) +} + +function getContentType(params) { + // only compare mime type; ignore encoding part + return params.contentTypeHeader ? params.contentTypeHeader.split(';')[0] : '' +} + +function isContentTypeBinaryMimeType(params) { + return ( + params.binaryMimeTypes.length > 0 && !!isType.is(params.contentType, params.binaryMimeTypes) + ) +} + +function mapApiGatewayEventToHttpRequest(event, context, socketPath) { + const headers = Object.assign({}, event.headers) + + // NOTE: API Gateway is not setting Content-Length header on requests even when they have a body + if (event.body && !headers['Content-Length']) { + const body = getEventBody(event) + headers['Content-Length'] = Buffer.byteLength(body) + } + + const clonedEventWithoutBody = clone(event) + delete clonedEventWithoutBody.body + + headers['x-apigateway-event'] = encodeURIComponent(JSON.stringify(clonedEventWithoutBody)) + headers['x-apigateway-context'] = encodeURIComponent(JSON.stringify(context)) + + return { + method: event.httpMethod, + path: getPathWithQueryStringParams(event), + headers, + socketPath + // protocol: `${headers['X-Forwarded-Proto']}:`, + // host: headers.Host, + // hostname: headers.Host, // Alias for host + // port: headers['X-Forwarded-Port'] + } +} + +function forwardResponseToApiGateway(server, response, resolve) { + const buf = [] + + response + .on('data', (chunk) => buf.push(chunk)) + .on('end', () => { + const bodyBuffer = Buffer.concat(buf) + const { statusCode, headers } = response + + // chunked transfer not currently supported by API Gateway + /* istanbul ignore else */ + if (headers['transfer-encoding'] === 'chunked') { + delete headers['transfer-encoding'] + } + + // eslint-disable-next-line + Object.keys(headers).forEach((h) => { + if (Array.isArray(headers[h])) { + if (h.toLowerCase() === 'set-cookie') { + headers[h].forEach((value, i) => { + headers[binarycase(h, i + 1)] = value + }) + delete headers[h] + } else { + headers[h] = headers[h].join(',') + } + } + }) + + const contentType = getContentType({ contentTypeHeader: headers['content-type'] }) + const isBase64Encoded = isContentTypeBinaryMimeType({ + contentType, + binaryMimeTypes: server._binaryTypes + }) + const body = bodyBuffer.toString(isBase64Encoded ? 'base64' : 'utf8') + const successResponse = { statusCode, body, headers, isBase64Encoded } + + resolve(successResponse) + }) +} + +function forwardConnectionErrorResponseToApiGateway(error, resolve) { + console.log('ERROR: tencent-serverless-express connection error') // eslint-disable-line + console.error(error) // eslint-disable-line + const errorResponse = { + statusCode: 502, // "DNS resolution, TCP level errors, or actual HTTP parse errors" - https://nodejs.org/api/http.html#http_http_request_options_callback + body: '', + headers: {} + } + + resolve(errorResponse) +} + +function forwardLibraryErrorResponseToApiGateway(error, resolve) { + console.log('ERROR: tencent-serverless-express error') // eslint-disable-line + console.error(error) // eslint-disable-line + const errorResponse = { + statusCode: 500, + body: '', + headers: {} + } + + resolve(errorResponse) +} + +function getSocketPath(socketPathSuffix) { + /* istanbul ignore if */ /* only running tests on Linux; Window support is for local dev only */ + if (/^win/.test(process.platform)) { + const path = require('path') + return path.join('\\\\?\\pipe', process.cwd(), `server-${socketPathSuffix}`) + } + return `/tmp/server-${socketPathSuffix}.sock` +} + +function forwardRequestToNodeServer(server, event, context, resolve) { + try { + const requestOptions = mapApiGatewayEventToHttpRequest( + event, + context, + getSocketPath(server._socketPathSuffix) + ) + const req = http.request(requestOptions, (response) => + forwardResponseToApiGateway(server, response, resolve) + ) + if (event.body) { + const body = getEventBody(event) + + req.write(body) + } + + req.on('error', (error) => forwardConnectionErrorResponseToApiGateway(error, resolve)).end() + } catch (error) { + forwardLibraryErrorResponseToApiGateway(error, resolve) + return server + } +} + +function startServer(server) { + return server.listen(getSocketPath(server._socketPathSuffix)) +} + +function getRandomString() { + return Math.random() + .toString(36) + .substring(2, 15) +} + +function createServer(requestListener, serverListenCallback, binaryTypes) { + const server = http.createServer(requestListener) + + server._socketPathSuffix = getRandomString() + server._binaryTypes = binaryTypes ? binaryTypes.slice() : [] + server.on('listening', () => { + server._isListening = true + + if (serverListenCallback) { + serverListenCallback() + } + }) + server + .on('close', () => { + server._isListening = false + }) + .on('error', (error) => { + /* istanbul ignore else */ + if (error.code === 'EADDRINUSE') { + // eslint-disable-next-line + console.warn( + `WARNING: Attempting to listen on socket ${getSocketPath( + server._socketPathSuffix + )}, but it is already in use.` + ) + server._socketPathSuffix = getRandomString() + return server.close(() => startServer(server)) + } + // eslint-disable-next-line + console.log('ERROR: server error') + // eslint-disable-next-line + console.error(error) + }) + + return server +} + +function proxy(server, event, context) { + return new Promise((resolve) => { + if (server._isListening) { + forwardRequestToNodeServer(server, event, context, resolve) + } else { + startServer(server).on('listening', () => + forwardRequestToNodeServer(server, event, context, resolve) + ) + } + }) +} + +function handler(event, context) { + const app = require('./app') + // return { + // isBase64: false, + // statusCode: 200, + // headers: { 'Content-Type': 'text', 'Access-Control-Allow-Origin': '*' }, + // body: 'body' + // } + const server = createServer(app) + return proxy(server, event, context) +} + +exports.handler = handler diff --git a/shim/src/media-typer.js b/shim/src/media-typer.js new file mode 100644 index 0000000..8a0390c --- /dev/null +++ b/shim/src/media-typer.js @@ -0,0 +1,141 @@ +/* ! + * media-typer + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * RegExp to match type in RFC 6838 + * + * type-name = restricted-name + * subtype-name = restricted-name + * restricted-name = restricted-name-first *126restricted-name-chars + * restricted-name-first = ALPHA / DIGIT + * restricted-name-chars = ALPHA / DIGIT / "!" / "#" / + * "$" / "&" / "-" / "^" / "_" + * restricted-name-chars =/ "." ; Characters before first dot always + * ; specify a facet name + * restricted-name-chars =/ "+" ; Characters after last plus always + * ; specify a structured syntax suffix + * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z + * DIGIT = %x30-39 ; 0-9 + */ +var SUBTYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/ +var TYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/ +var TYPE_REGEXP = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/ + +/** + * Format object to media type. + * + * @param {object} obj + * @return {string} + * @public + */ + +function format(obj) { + if (!obj || typeof obj !== 'object') { + throw new TypeError('argument obj is required') + } + + var subtype = obj.subtype + var suffix = obj.suffix + var type = obj.type + + if (!type || !TYPE_NAME_REGEXP.test(type)) { + throw new TypeError('invalid type') + } + + if (!subtype || !SUBTYPE_NAME_REGEXP.test(subtype)) { + throw new TypeError('invalid subtype') + } + + // format as type/subtype + var string = type + '/' + subtype + + // append +suffix + if (suffix) { + if (!TYPE_NAME_REGEXP.test(suffix)) { + throw new TypeError('invalid suffix') + } + + string += '+' + suffix + } + + return string +} + +/** + * Test media type. + * + * @param {string} string + * @return {object} + * @public + */ + +function test(string) { + if (!string) { + throw new TypeError('argument string is required') + } + + if (typeof string !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + return TYPE_REGEXP.test(string.toLowerCase()) +} + +/** + * Parse media type to object. + * + * @param {string} string + * @return {object} + * @public + */ + +function parse(string) { + if (!string) { + throw new TypeError('argument string is required') + } + + if (typeof string !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + var match = TYPE_REGEXP.exec(string.toLowerCase()) + + if (!match) { + throw new TypeError('invalid media type') + } + + var type = match[1] + var subtype = match[2] + var suffix + + // suffix after last + + var index = subtype.lastIndexOf('+') + if (index !== -1) { + suffix = subtype.substr(index + 1) + subtype = subtype.substr(0, index) + } + + return new MediaType(type, subtype, suffix) +} + +/** + * Class for MediaType object. + * @public + */ + +function MediaType(type, subtype, suffix) { + this.type = type + this.subtype = subtype + this.suffix = suffix +} + +/** + * Module exports. + */ + +exports.format = format +exports.parse = parse +exports.test = test diff --git a/shim/src/middleware.js b/shim/src/middleware.js new file mode 100644 index 0000000..2a6ce31 --- /dev/null +++ b/shim/src/middleware.js @@ -0,0 +1,24 @@ +module.exports.eventContext = (options) => + function apiGatewayEventParser(req, res, next) { + options = options || {} // defaults: {reqPropKey: 'apiGateway', deleteHeaders: true} + const reqPropKey = options.reqPropKey || 'apiGateway' + const deleteHeaders = options.deleteHeaders === undefined ? true : options.deleteHeaders + + if (!req.headers['x-apigateway-event'] || !req.headers['x-apigateway-context']) { + console.error('Missing x-apigateway-event or x-apigateway-context header(s)') + next() + return + } + + req[reqPropKey] = { + event: JSON.parse(decodeURIComponent(req.headers['x-apigateway-event'])), + context: JSON.parse(decodeURIComponent(req.headers['x-apigateway-context'])) + } + + if (deleteHeaders) { + delete req.headers['x-apigateway-event'] + delete req.headers['x-apigateway-context'] + } + + next() + } diff --git a/shim/src/mime-db.json b/shim/src/mime-db.json new file mode 100644 index 0000000..edfeed2 --- /dev/null +++ b/shim/src/mime-db.json @@ -0,0 +1,7990 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/cbor": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["ecma", "es"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true + }, + "application/fhir+json": { + "source": "iana", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink", "inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar", "war", "ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js", "mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json", "map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma", "nb", "mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21", "mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s", "m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc", "dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana" + }, + "application/news-groupinfo": { + "source": "iana" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana" + }, + "application/nss": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": [ + "bin", + "dms", + "lrf", + "mar", + "so", + "dist", + "distz", + "pkg", + "bpk", + "dump", + "elc", + "deploy", + "exe", + "dll", + "deb", + "dmg", + "iso", + "img", + "msi", + "msp", + "msm", + "buffer" + ] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc", "onetoc2", "onetmp", "onepkg"] + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana" + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc", "sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m", "p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai", "eps", "ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf", "owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv", "sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi", "smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei", "teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana" + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc", "acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp", "fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["keynote"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g", "c4d", "c4f", "c4p", "c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf", "uvvf", "uvd", "uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt", "uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx", "uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz", "uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3", "et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed", "dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm", "frame", "maker", "book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex", "gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf", "gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp", "listafp", "list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc", "icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw", "xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz", "ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr", "kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd", "kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne", "knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp", "skd", "skt", "skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana" + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt", "pps", "pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp", "mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps", "wks", "wcm", "wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf", "nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb", "pqa", "oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana" + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd", "twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm", "sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw", "vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus", "susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis", "sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap", "cap", "dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd", "ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd", "vst", "vss", "vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir", "zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab", "x32", "u32", "vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb", "blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2", "boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr", "cba", "cbt", "cbz", "cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb", "udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa", "pfb", "pfm", "afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh", "lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc", "mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe", "dll", "com", "bat", "msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb", "m13", "m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf", "wmz", "emf", "emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc", "cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl", "pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc", "pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12", "pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b", "spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl", "tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo", "texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "apache", + "extensions": ["der", "crt", "pem"] + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml", "xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml", "xsl", "xsd", "rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml", "xhvml", "xvml", "xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana" + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au", "snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid", "midi", "kar", "rmi"] + }, + "audio/mobile-xmf": { + "source": "iana" + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a", "mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga", "ogg", "spx"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva", "uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif", "aiff", "aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram", "ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana" + }, + "image/avcs": { + "source": "iana" + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2", "jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg", "jpg", "jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx", "jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg", "svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif", "tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi", "uvvi", "uvg", "uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu", "djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh", "fhc", "fh4", "fh5", "fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic", "pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": ["disposition-notification"] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml", "mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs", "iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh", "mesh", "silo"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl", "vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db", "x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv", "x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d", "x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache", "manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics", "ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee", "litcoffee"] + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html", "htm", "shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown", "md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt", "text", "conf", "def", "list", "log", "in", "ini"] + }, + "text/provenance-notation": { + "source": "iana" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml", "sgm"] + }, + "text/shex": { + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim", "slm"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus", "styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t", "tr", "roff", "man", "me", "ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri", "uris", "urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana" + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s", "asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f", "for", "f77", "f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p", "pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "extensions": ["yaml", "yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp", "3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana" + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm", "jpgm"] + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2", "mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4", "mp4v", "mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg", "mpg", "mpe", "m1v", "m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt", "mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh", "uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm", "uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp", "uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs", "uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv", "uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu", "m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu", "uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv", "mk3d", "mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf", "asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/shim/src/mime-types.js b/shim/src/mime-types.js new file mode 100644 index 0000000..b33df7f --- /dev/null +++ b/shim/src/mime-types.js @@ -0,0 +1,188 @@ +/* ! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module dependencies. + * @private + */ + +var db = require('./mime-db.json') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset(type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType(str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) { + mime += '; charset=' + charset.toLowerCase() + } + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension(type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup(path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps(extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType(type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if ( + types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/')) + ) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/shim/src/type-is.js b/shim/src/type-is.js new file mode 100644 index 0000000..ad0f802 --- /dev/null +++ b/shim/src/type-is.js @@ -0,0 +1,261 @@ +/* ! + * type-is + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module dependencies. + * @private + */ + +var typer = require('./media-typer') +var mime = require('./mime-types') + +/** + * Compare a `value` content-type with `types`. + * Each `type` can be an extension like `html`, + * a special shortcut like `multipart` or `urlencoded`, + * or a mime type. + * + * If no types match, `false` is returned. + * Otherwise, the first `type` that matches is returned. + * + * @param {String} value + * @param {Array} types + * @public + */ + +function typeis(value, types_) { + var i + var types = types_ + + // remove parameters and normalize + var val = tryNormalizeType(value) + + // no type or invalid + if (!val) { + return false + } + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length - 1) + for (i = 0; i < types.length; i++) { + types[i] = arguments[i + 1] + } + } + + // no types, return the content type + if (!types || !types.length) { + return val + } + + var type + for (i = 0; i < types.length; i++) { + if (mimeMatch(normalize((type = types[i])), val)) { + return type[0] === '+' || type.indexOf('*') !== -1 ? val : type + } + } + + // no matches + return false +} + +/** + * Check if a request has a request body. + * A request with a body __must__ either have `transfer-encoding` + * or `content-length` headers set. + * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 + * + * @param {Object} request + * @return {Boolean} + * @public + */ + +function hasbody(req) { + return req.headers['transfer-encoding'] !== undefined || !isNaN(req.headers['content-length']) +} + +/** + * Check if the incoming request contains the "Content-Type" + * header field, and it contains any of the give mime `type`s. + * If there is no request body, `null` is returned. + * If there is no content type, `false` is returned. + * Otherwise, it returns the first `type` that matches. + * + * Examples: + * + * // With Content-Type: text/html; charset=utf-8 + * this.is('html'); // => 'html' + * this.is('text/html'); // => 'text/html' + * this.is('text/*', 'application/json'); // => 'text/html' + * + * // When Content-Type is application/json + * this.is('json', 'urlencoded'); // => 'json' + * this.is('application/json'); // => 'application/json' + * this.is('html', 'application/*'); // => 'application/json' + * + * this.is('html'); // => false + * + * @param {String|Array} types... + * @return {String|false|null} + * @public + */ + +function typeofrequest(req, types_) { + var types = types_ + + // no body + if (!hasbody(req)) { + return null + } + + // support flattened arguments + if (arguments.length > 2) { + types = new Array(arguments.length - 1) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i + 1] + } + } + + // request content type + var value = req.headers['content-type'] + + return typeis(value, types) +} + +/** + * Normalize a mime type. + * If it's a shorthand, expand it to a valid mime type. + * + * In general, you probably want: + * + * var type = is(req, ['urlencoded', 'json', 'multipart']); + * + * Then use the appropriate body parsers. + * These three are the most common request body types + * and are thus ensured to work. + * + * @param {String} type + * @private + */ + +function normalize(type) { + if (typeof type !== 'string') { + // invalid type + return false + } + + switch (type) { + case 'urlencoded': + return 'application/x-www-form-urlencoded' + case 'multipart': + return 'multipart/*' + } + + if (type[0] === '+') { + // "+json" -> "*/*+json" expando + return '*/*' + type + } + + return type.indexOf('/') === -1 ? mime.lookup(type) : type +} + +/** + * Check if `expected` mime type + * matches `actual` mime type with + * wildcard and +suffix support. + * + * @param {String} expected + * @param {String} actual + * @return {Boolean} + * @private + */ + +function mimeMatch(expected, actual) { + // invalid type + if (expected === false) { + return false + } + + // split types + var actualParts = actual.split('/') + var expectedParts = expected.split('/') + + // invalid format + if (actualParts.length !== 2 || expectedParts.length !== 2) { + return false + } + + // validate type + if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) { + return false + } + + // validate suffix wildcard + if (expectedParts[1].substr(0, 2) === '*+') { + return ( + expectedParts[1].length <= actualParts[1].length + 1 && + expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length) + ) + } + + // validate subtype + if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) { + return false + } + + return true +} + +/** + * Normalize a type and remove parameters. + * + * @param {string} value + * @return {string} + * @private + */ + +function normalizeType(value) { + // parse the type + var type = typer.parse(value) + + // remove the parameters + type.parameters = undefined + + // reformat it + return typer.format(type) +} + +/** + * Try to normalize a type and remove parameters. + * + * @param {string} value + * @return {string} + * @private + */ + +function tryNormalizeType(value) { + if (!value) { + return null + } + + try { + return normalizeType(value) + } catch (err) { + return null + } +} + +/** + * Module exports. + * @public + */ + +module.exports = typeofrequest +module.exports.is = typeis +module.exports.hasBody = hasbody +module.exports.normalize = normalize +module.exports.match = mimeMatch From b452f7b97b5bd2470949126b6ed9b8b435b67469 Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Fri, 25 Oct 2019 20:22:25 +0300 Subject: [PATCH 03/93] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index afbc588..a616a8b 100755 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ module.exports = app ```yml # serverless.yml -myBucket: +express: component: '@serverless/tencent-express' inputs: functionName: eslam-function # SCF name From 7a342b646d6b8c173958e205076891ae8a4acfcf Mon Sep 17 00:00:00 2001 From: Austen Date: Sun, 27 Oct 2019 18:46:31 -0700 Subject: [PATCH 04/93] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a616a8b..caae9fe 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Tencent Express +[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.github.serverless/github_readme_serverless_express_tencent.png)](http://serverless.com) Deploy Express applications to Tencent Cloud using Serverless Components From d06126d56723c1e4cfed6ae9672049104a0654e2 Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Mon, 28 Oct 2019 14:22:05 +0300 Subject: [PATCH 05/93] shim works --- README.md | 6 ++++-- package.json | 5 ++--- serverless.js | 21 ++++++++++++++++++--- {shim/src => shims}/binary-case.js | 0 {shim/src => shims}/index.js | 0 {shim/src => shims}/media-typer.js | 0 {shim/src => shims}/middleware.js | 0 {shim/src => shims}/mime-db.json | 0 {shim/src => shims}/mime-types.js | 0 {shim/src => shims}/type-is.js | 0 10 files changed, 24 insertions(+), 8 deletions(-) rename {shim/src => shims}/binary-case.js (100%) rename {shim/src => shims}/index.js (100%) rename {shim/src => shims}/media-typer.js (100%) rename {shim/src => shims}/middleware.js (100%) rename {shim/src => shims}/mime-db.json (100%) rename {shim/src => shims}/mime-types.js (100%) rename {shim/src => shims}/type-is.js (100%) diff --git a/README.md b/README.md index caae9fe..2ab2be9 100755 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ const express = require('express') const app = express() app.get('/', function(req, res) { - res.send('Hello from Express') + res.send('Hello Express') }) // don't forget to export! @@ -69,7 +69,7 @@ express: functionName: eslam-function # SCF name serviceName: mytest # APIGW service name serviceId: service-np1uloxw # APIGW service id - code: ./code + # code: ./code Optional - default is current working directory ``` ### 4. Deploy @@ -91,6 +91,8 @@ myApp (master)$ serverless --debug myApp (master)$ ``` +You can now visit the output URL in the browser, and you should see the express response. + ### 5. Remove ``` diff --git a/package.json b/package.json index 47d1190..61f00d9 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.0.0", + "version": "1.1.3", "main": "./serverless.js", "publishConfig": { "access": "public" @@ -15,8 +15,7 @@ "dependencies": { "@serverless/core": "^1.0.0", "@serverless/tencent-apigateway": "^1.2.0", - "@serverless/tencent-cloudfunction": "^1.1.0", - "ramda": "^0.26.1" + "@serverless/tencent-scf": "^1.1.0" }, "devDependencies": { "babel-eslint": "9.0.0", diff --git a/serverless.js b/serverless.js index 63c9c3d..e91f602 100755 --- a/serverless.js +++ b/serverless.js @@ -3,7 +3,22 @@ const { Component, utils } = require('@serverless/core') class TencentExpress extends Component { async default(inputs = {}) { - inputs.include = [path.join(__dirname, 'shim', 'dist')] + // there are some dependencies that require the express him to work + // I've included them all here. A better approach would be to use + // browserify to build all of these files into one. + // but browserify throws an error because the required app.js is not found + // which the user will be adding later on after the build + const shimsDir = path.join(__dirname, 'shims') + inputs.include = [ + path.join(shimsDir, 'binary-case.js'), + path.join(shimsDir, 'index.js'), + path.join(shimsDir, 'media-typer.js'), + path.join(shimsDir, 'middleware.js'), + path.join(shimsDir, 'mime-db.json'), + path.join(shimsDir, 'mime-types.js'), + path.join(shimsDir, 'type-is.js') + ] + inputs.exclude = ['.git/**', '.gitignore', '.serverless', '.DS_Store'] inputs.handler = 'index.handler' inputs.runtime = 'Nodejs8.9' inputs.name = inputs.functionName @@ -15,7 +30,7 @@ class TencentExpress extends Component { throw new Error(`app.js not found in ${inputs.codeUri}`) } - const tencentCloudFunction = await this.load('@serverless/tencent-cloudfunction') + const tencentCloudFunction = await this.load('@serverless/tencent-scf') const tencentApiGateway = await this.load('@serverless/tencent-apigateway') const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) @@ -44,7 +59,7 @@ class TencentExpress extends Component { } async remove() { - const tencentCloudFunction = await this.load('@serverless/tencent-cloudfunction') + const tencentCloudFunction = await this.load('@serverless/tencent-scf') const tencentApiGateway = await this.load('@serverless/tencent-apigateway') await tencentCloudFunction.remove() diff --git a/shim/src/binary-case.js b/shims/binary-case.js similarity index 100% rename from shim/src/binary-case.js rename to shims/binary-case.js diff --git a/shim/src/index.js b/shims/index.js similarity index 100% rename from shim/src/index.js rename to shims/index.js diff --git a/shim/src/media-typer.js b/shims/media-typer.js similarity index 100% rename from shim/src/media-typer.js rename to shims/media-typer.js diff --git a/shim/src/middleware.js b/shims/middleware.js similarity index 100% rename from shim/src/middleware.js rename to shims/middleware.js diff --git a/shim/src/mime-db.json b/shims/mime-db.json similarity index 100% rename from shim/src/mime-db.json rename to shims/mime-db.json diff --git a/shim/src/mime-types.js b/shims/mime-types.js similarity index 100% rename from shim/src/mime-types.js rename to shims/mime-types.js diff --git a/shim/src/type-is.js b/shims/type-is.js similarity index 100% rename from shim/src/type-is.js rename to shims/type-is.js From d1f89bc87dc5dbd5446cf659f2d12c71c809a052 Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Mon, 28 Oct 2019 14:29:06 +0300 Subject: [PATCH 06/93] remove comment --- package.json | 2 +- shims/index.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/package.json b/package.json index 61f00d9..82e5746 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.1.3", + "version": "1.1.4", "main": "./serverless.js", "publishConfig": { "access": "public" diff --git a/shims/index.js b/shims/index.js index 376603d..f9849f6 100644 --- a/shims/index.js +++ b/shims/index.js @@ -210,12 +210,6 @@ function proxy(server, event, context) { function handler(event, context) { const app = require('./app') - // return { - // isBase64: false, - // statusCode: 200, - // headers: { 'Content-Type': 'text', 'Access-Control-Allow-Origin': '*' }, - // body: 'body' - // } const server = createServer(app) return proxy(server, event, context) } From 36d46d812da1c1a1088875f2fa3ca7e46321c2cf Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Mon, 28 Oct 2019 14:38:09 +0300 Subject: [PATCH 07/93] published 1.1.5 --- package.json | 2 +- shims/index.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/package.json b/package.json index 82e5746..db6c5c9 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.1.4", + "version": "1.1.5", "main": "./serverless.js", "publishConfig": { "access": "public" diff --git a/shims/index.js b/shims/index.js index f9849f6..5dd649d 100644 --- a/shims/index.js +++ b/shims/index.js @@ -45,10 +45,6 @@ function mapApiGatewayEventToHttpRequest(event, context, socketPath) { path: getPathWithQueryStringParams(event), headers, socketPath - // protocol: `${headers['X-Forwarded-Proto']}:`, - // host: headers.Host, - // hostname: headers.Host, // Alias for host - // port: headers['X-Forwarded-Port'] } } @@ -118,7 +114,6 @@ function forwardLibraryErrorResponseToApiGateway(error, resolve) { } function getSocketPath(socketPathSuffix) { - /* istanbul ignore if */ /* only running tests on Linux; Window support is for local dev only */ if (/^win/.test(process.platform)) { const path = require('path') return path.join('\\\\?\\pipe', process.cwd(), `server-${socketPathSuffix}`) @@ -176,7 +171,6 @@ function createServer(requestListener, serverListenCallback, binaryTypes) { server._isListening = false }) .on('error', (error) => { - /* istanbul ignore else */ if (error.code === 'EADDRINUSE') { // eslint-disable-next-line console.warn( From 315df3842cf7372330ea1b09c5ee5a2c7ebbeb34 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Tue, 29 Oct 2019 09:40:31 +0800 Subject: [PATCH 08/93] fix apigateway-isIntegratedResponse --- serverless.js | 1 + 1 file changed, 1 insertion(+) diff --git a/serverless.js b/serverless.js index e91f602..2fe916a 100755 --- a/serverless.js +++ b/serverless.js @@ -45,6 +45,7 @@ class TencentExpress extends Component { path: '/', method: 'ANY', function: { + isIntegratedResponse: true, functionName: tencentCloudFunctionOutputs.Name } } From 53af2365feb3063d482602239705d3ca7402392e Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Tue, 29 Oct 2019 10:56:05 +0800 Subject: [PATCH 09/93] update sign up and register link --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ab2be9..18be2c4 100755 --- a/README.md +++ b/README.md @@ -30,6 +30,10 @@ $ touch serverless.yml Set Tencent credentials in the `.env` file. +If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. + +If you already [login in](https://intl.cloud.tencent.com/login), find `TENCENT_SECRET_ID` and `TENCENT_SECRET_KEY` in [Tencent Console](https://console.cloud.tencent.com/cam/capi). + ``` # .env TENCENT_SECRET_ID=123 @@ -67,9 +71,9 @@ express: component: '@serverless/tencent-express' inputs: functionName: eslam-function # SCF name - serviceName: mytest # APIGW service name - serviceId: service-np1uloxw # APIGW service id - # code: ./code Optional - default is current working directory + # serviceName: mytest Optional - APIGW service name, default to create a new serivce + # serviceId: service-np1uloxw Optional - APIGW service id, default to create a new serivce + # code: ./code Optional - default is current working directory ``` ### 4. Deploy From 99196c16e2ef45ac4d4d5f489a9e22be7b4041f6 Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Tue, 29 Oct 2019 11:03:09 +0800 Subject: [PATCH 10/93] Update README_CN.md --- README_CN.md | 112 ++++++++++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 60 deletions(-) diff --git a/README_CN.md b/README_CN.md index 580fdae..4f9b218 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,12 +1,18 @@ -# 腾讯云对象存储 COS 组件 +[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.github.serverless/github_readme_serverless_express_tencent.png)](http://serverless.com) + +Deploy Express applications to Tencent Cloud using Serverless Components + +  + +# 腾讯云Express组件 ## 简介 -该组件是 serverless-tencent 组件库中的基础组件之一。通过对象存储 COS 组件,可以快速,方便的创建,配置和管理腾讯云的 COS 存储桶 +Express 组件通过使用 serverless-tencent 的基础组件如API网关组件,SCF组件等,快速,方便的创建,配置和管理一个Express框架。 ## 快速开始 -通过 COS 组件,对一个 COS 存储桶进行完整的创建,配置,部署和删除等操作。支持命令如下: +通过 Express 组件,对一个 Express应用进行完整的创建,配置,部署和删除等操作。支持命令如下: 1. [安装](#1-安装) 2. [创建](#2-创建) @@ -33,6 +39,11 @@ $ touch .env # 腾讯云的配置信息 在 `.env` 文件中配置腾讯云的 APPID,SecretId 和 SecretKey 信息并保存 +如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 + +如果已有腾讯云账号,可以在[API密钥管理 +](https://console.cloud.tencent.com/cam/capi)中获取`APPID`, `SecretId` 和`SecretKey`. + ``` # .env TENCENT_SECRET_ID=123 @@ -40,6 +51,25 @@ TENCENT_SECRET_KEY=123 TENCENT_APP_ID=123 ``` +初始化一个新的NPM包,并且安装express: +``` +npm init # 创建后持续回车 +npm i --save express # 安装express +``` + +创建一个 `app.js`文件,并在其中创建你的express app: +```js +const express = require('express') +const app = express() + +app.get('/', function(req, res) { + res.send('Hello Express') +}) + +// don't forget to export! +module.exports = app +``` + ### 3. 配置 在 serverless.yml 中进行如下配置 @@ -47,37 +77,13 @@ TENCENT_APP_ID=123 ```yml # serverless.yml -myBucket: - component: '@serverless/tencent-cos' # 添加依赖的cos组件 +express: + component: '@serverless/tencent-express' inputs: - # 必填 - bucket: myBucket-1300418942 # 存储桶后缀需要填写APPID信息,如果不填会默认帮忙添加后缀 - region: ap-guangzhou # 需要部署存储桶的地域信息 - - # acl配置 (可选) - acl: - permissions: private - grantRead: STRING_VALUE - grantWrite: STRING_VALUE - grantFullControl: STRING_VALUE - - # cors配置 (可选) - cors: - - id: abc - maxAgeSeconds: '10' - allowedMethods: - - GET - allowedOrigins: - - https://tencent.com - allowedHeaders: - - FIRST_ALLOWED_HEADER - exposeHeaders: - - FIRST_EXPOSED_HEADER - - # tags标签配置 (可选) - tags: - - key: abc - value: xyz + functionName: eslam-function # SCF函数名 + # serviceName: mytest 可选,API网关的服务名,默认会创建一个新的服务 + # serviceId: service-np1uloxw 可选,API网关的服务Id,默认会创建一个新的服务 + # code: ./code 可选,默认是当前的工作目录 ``` ### 4. 部署 @@ -87,33 +93,20 @@ myBucket: ``` myApp (master)$ serverless --debug - DEBUG ─ "myBucket-1300418942" bucket was successfully deployed to the "eu-frankfurt" region. - DEBUG ─ Setting ACL for "myBucket-1300418942" bucket in the "eu-frankfurt" region. - DEBUG ─ Setting CORS rules for "myBucket-1300418942" bucket in the "eu-frankfurt" region. - DEBUG ─ Setting Tags for "myBucket-1300418942" bucket in the "undefined" region. - - bucket: - bucket: myBucket-1300418942 - region: eu-frankfurt - acl: - permissions: private - cors: - - - id: abc - maxAgeSeconds: 10 - allowedMethods: (max depth reached) - allowedOrigins: (max depth reached) - allowedHeaders: (max depth reached) - exposeHeaders: (max depth reached) - tags: - - - key: abc - value: xyz - - 3s › bucket › done + DEBUG ─ Endpoint ANY / already exists with id api-3n1p7a86. + DEBUG ─ Updating api with api id api-3n1p7a86. + DEBUG ─ Service with id api-3n1p7a86 updated. + DEBUG ─ Deploying service with id service-np1uloxw. + DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-guangzhou region. + + express: + url: http://service-np1uloxw-1300415943.gz.apigw.tencentcs.com/release + + 84s › express › done myApp (master)$ ``` +部署完毕后,可以在浏览器中访问返回的链接,看到对应的express返回值。 ### 5. 移除 @@ -123,10 +116,9 @@ myApp (master)$ myApp (master)$ serverless remove --debug DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removing "myBucket-1300418942" bucket from the "eu-frankfurt" region. - DEBUG ─ "myBucket-1300418942" bucket was successfully removed from the "eu-frankfurt" region. + DEBUG ─ Removed function eslam-function successful - 7s › bucket › done + 17s › express › done myApp (master)$ ``` From 9a443e60322986d9544e1587f0cdf29f720a09c1 Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Tue, 29 Oct 2019 11:05:47 +0800 Subject: [PATCH 11/93] Update README_CN.md --- README_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index 4f9b218..372f509 100644 --- a/README_CN.md +++ b/README_CN.md @@ -8,7 +8,7 @@ Deploy Express applications to Tencent Cloud using Serverless Components ## 简介 -Express 组件通过使用 serverless-tencent 的基础组件如API网关组件,SCF组件等,快速,方便的创建,配置和管理一个Express框架。 +Express 组件通过使用 serverless-tencent 的基础组件如API网关组件,SCF组件等,快速,方便的在腾讯云创建,配置和管理一个Express框架。 ## 快速开始 From 57b68bc20edb44b46e1084eb321036dc4c45a435 Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Tue, 29 Oct 2019 11:06:19 +0800 Subject: [PATCH 12/93] Update README_CN.md --- README_CN.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README_CN.md b/README_CN.md index 372f509..d7b20ac 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,7 +1,5 @@ [![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.github.serverless/github_readme_serverless_express_tencent.png)](http://serverless.com) -Deploy Express applications to Tencent Cloud using Serverless Components -   # 腾讯云Express组件 From 99cdfc8be2b4f194a444a586c712b917a6396504 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Tue, 29 Oct 2019 15:50:07 +0800 Subject: [PATCH 13/93] add conf --- README.md | 19 ++++++++++++++----- package.json | 2 +- serverless.js | 17 ++++++++++++++--- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2ab2be9..8aab249 100755 --- a/README.md +++ b/README.md @@ -64,12 +64,21 @@ module.exports = app # serverless.yml express: - component: '@serverless/tencent-express' + region: ap-shanghai + component: '/Users/dfounderliu/Desktop/temp/tencent-express' inputs: - functionName: eslam-function # SCF name - serviceName: mytest # APIGW service name - serviceId: service-np1uloxw # APIGW service id - # code: ./code Optional - default is current working directory + region: ap-shanghai +# functionName: eslam-function # SCF name +# serviceName: mytest # APIGW service name +# serviceId: service-np1uloxw # APIGW service id +# code: ./code Optional - default is current working directory + functionConf: + timeout: 10 + memorySize: 128 + apigatewayConf: + protocol: https + environment: test + ``` ### 4. Deploy diff --git a/package.json b/package.json index db6c5c9..2f96276 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.1.5", + "version": "1.1.7", "main": "./serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.js b/serverless.js index 2fe916a..c2666d8 100755 --- a/serverless.js +++ b/serverless.js @@ -8,6 +8,15 @@ class TencentExpress extends Component { // browserify to build all of these files into one. // but browserify throws an error because the required app.js is not found // which the user will be adding later on after the build + + const len = 6 + const chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678' + const maxPos = chars.length + let result = '' + for (let i = 0; i < len; i++) { + result += chars.charAt(Math.floor(Math.random() * maxPos)) + } + const shimsDir = path.join(__dirname, 'shims') inputs.include = [ path.join(shimsDir, 'binary-case.js'), @@ -21,7 +30,7 @@ class TencentExpress extends Component { inputs.exclude = ['.git/**', '.gitignore', '.serverless', '.DS_Store'] inputs.handler = 'index.handler' inputs.runtime = 'Nodejs8.9' - inputs.name = inputs.functionName + inputs.name = inputs.functionName || 'ExpressComponent_' + result inputs.codeUri = inputs.code || process.cwd() const appFile = path.join(path.resolve(inputs.codeUri), 'app.js') @@ -33,13 +42,15 @@ class TencentExpress extends Component { const tencentCloudFunction = await this.load('@serverless/tencent-scf') const tencentApiGateway = await this.load('@serverless/tencent-apigateway') + inputs.timeout = inputs.functionConf.timeout || 3 + inputs.memorySize = inputs.functionConf.memorySize || 128 const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) const tencentApiGatewayOutputs = await tencentApiGateway({ serviceName: inputs.serviceName, serviceId: inputs.serviceId, region: inputs.region, - protocol: inputs.protocol, - environment: inputs.apiEnvironment, + protocol: inputs.apigatewayConf.protocol, + environment: inputs.apigatewayConf.environment, endpoints: [ { path: '/', From ddfb44c624e2bd734d7e4909608fbac38f22540f Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Tue, 29 Oct 2019 15:54:41 +0800 Subject: [PATCH 14/93] add configuration to yaml --- README_CN.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index d7b20ac..8d35199 100644 --- a/README_CN.md +++ b/README_CN.md @@ -76,12 +76,20 @@ module.exports = app # serverless.yml express: - component: '@serverless/tencent-express' + region: ap-shanghai + component: '/Users/dfounderliu/Desktop/temp/tencent-express' inputs: + region: ap-shanghai functionName: eslam-function # SCF函数名 # serviceName: mytest 可选,API网关的服务名,默认会创建一个新的服务 # serviceId: service-np1uloxw 可选,API网关的服务Id,默认会创建一个新的服务 # code: ./code 可选,默认是当前的工作目录 + functionConf: + timeout: 10 + memorySize: 128 + apigatewayConf: + protocol: https + environment: test ``` ### 4. 部署 From 2d3ca9d9f8a07ccd1db459a0e6f4e50d2544df52 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Tue, 29 Oct 2019 15:56:18 +0800 Subject: [PATCH 15/93] add conf --- package.json | 2 +- serverless.js | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2f96276..66c4be0 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.1.7", + "version": "1.1.8", "main": "./serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.js b/serverless.js index c2666d8..66aee30 100755 --- a/serverless.js +++ b/serverless.js @@ -42,15 +42,23 @@ class TencentExpress extends Component { const tencentCloudFunction = await this.load('@serverless/tencent-scf') const tencentApiGateway = await this.load('@serverless/tencent-apigateway') - inputs.timeout = inputs.functionConf.timeout || 3 - inputs.memorySize = inputs.functionConf.memorySize || 128 + inputs.timeout = + inputs.functionConf && inputs.functionConf.timeout ? inputs.functionConf.timeout : 3 + inputs.memorySize = + inputs.functionConf && inputs.functionConf.memorySize ? inputs.functionConf.memorySize : 128 const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) const tencentApiGatewayOutputs = await tencentApiGateway({ serviceName: inputs.serviceName, serviceId: inputs.serviceId, region: inputs.region, - protocol: inputs.apigatewayConf.protocol, - environment: inputs.apigatewayConf.environment, + protocol: + inputs.apigatewayConf && inputs.apigatewayConf.protocol + ? inputs.apigatewayConf.protocol + : 'http', + environment: + inputs.apigatewayConf && inputs.apigatewayConf.environment + ? inputs.apigatewayConf.environment + : 'release', endpoints: [ { path: '/', From a0951466301ade403dfefd591968b2423c8ba442 Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Wed, 30 Oct 2019 18:50:46 +0800 Subject: [PATCH 16/93] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ef5e709..6e6ca16 100755 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ $ touch app.js $ touch serverless.yml ``` -Set Tencent credentials in the `.env` file. +Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/cam/capi) with `AdministratorAccess` in the `.env` file, using this format: ``` # .env @@ -37,6 +37,8 @@ TENCENT_SECRET_KEY=123 TENCENT_APP_ID=123 ``` +* If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. + Initialize a new NPM package and install express: ``` From 21b157b2da4aa47ab33a7d1fd51d13dbc7fd418c Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Wed, 30 Oct 2019 20:32:41 +0800 Subject: [PATCH 17/93] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e6ca16..6b6a5e2 100755 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ module.exports = app express: region: ap-shanghai - component: '/Users/dfounderliu/Desktop/temp/tencent-express' + component: '@serverless/tencent-express' inputs: region: ap-shanghai # functionName: eslam-function # SCF name From dd96ef85dd0fcd2c41d4b2d1f8c525573e2dbd16 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 15:55:33 +0800 Subject: [PATCH 18/93] add detail conf --- README.md | 38 +++++++++++++++++++++++++++----------- README_CN.md | 40 +++++++++++++++++++++++++++++----------- serverless.js | 30 ++++++++++++++++++++++++------ 3 files changed, 80 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 6b6a5e2..dc4f2ae 100755 --- a/README.md +++ b/README.md @@ -70,17 +70,33 @@ express: component: '@serverless/tencent-express' inputs: region: ap-shanghai -# functionName: eslam-function # SCF name -# serviceName: mytest Optional - APIGW service name, default to create a new serivce -# serviceId: service-np1uloxw Optional - APIGW service id, default to create a new serivce -# code: ./code Optional - default is current working directory - functionConf: - timeout: 10 - memorySize: 128 - apigatewayConf: - protocol: https - environment: test - +# functionName: eslam-function # SCF name +# serviceName: mytest Optional - APIGW service name, default to create a new serivce +# serviceId: service-np1uloxw Optional - APIGW service id, default to create a new serivce +# code: ./code Optional - default is current working directory +# functionConf: +# timeout: 10 +# memorySize: 128 +# environment: +# variables: +# TEST: vale +# vpcConfig: +# subnetId: '' +# vpcId: '' +# apigatewayConf: +# protocol: https +# environment: test +# usagePlan: +# # if dont't exists create a new +# usagePlanId: 1111 +# usagePlanName: slscmp # required +# usagePlanDesc: sls create +# maxRequestNum: 1000 +# auth: +# serviceTimeout: 15 +# secretName: secret # required +# secretIds: +# - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ ``` ### 4. Deploy diff --git a/README_CN.md b/README_CN.md index 8d35199..fb16be0 100644 --- a/README_CN.md +++ b/README_CN.md @@ -77,19 +77,37 @@ module.exports = app express: region: ap-shanghai - component: '/Users/dfounderliu/Desktop/temp/tencent-express' + component: '@serverless/tencent-express' inputs: region: ap-shanghai - functionName: eslam-function # SCF函数名 - # serviceName: mytest 可选,API网关的服务名,默认会创建一个新的服务 - # serviceId: service-np1uloxw 可选,API网关的服务Id,默认会创建一个新的服务 - # code: ./code 可选,默认是当前的工作目录 - functionConf: - timeout: 10 - memorySize: 128 - apigatewayConf: - protocol: https - environment: test +# functionName: eslam-function # SCF name +# serviceName: mytest Optional - APIGW service name, default to create a new serivce +# serviceId: service-np1uloxw Optional - APIGW service id, default to create a new serivce +# code: ./code Optional - default is current working directory +# functionConf: +# timeout: 10 +# memorySize: 128 +# environment: +# variables: +# TEST: vale +# vpcConfig: +# subnetId: '' +# vpcId: '' +# apigatewayConf: +# protocol: https +# environment: test +# usagePlan: +# # if dont't exists create a new +# usagePlanId: 1111 +# usagePlanName: slscmp # required +# usagePlanDesc: sls create +# maxRequestNum: 1000 +# auth: +# serviceTimeout: 15 +# secretName: secret # required +# secretIds: +# - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ + ``` ### 4. 部署 diff --git a/serverless.js b/serverless.js index 66aee30..513b4b6 100755 --- a/serverless.js +++ b/serverless.js @@ -42,13 +42,21 @@ class TencentExpress extends Component { const tencentCloudFunction = await this.load('@serverless/tencent-scf') const tencentApiGateway = await this.load('@serverless/tencent-apigateway') - inputs.timeout = - inputs.functionConf && inputs.functionConf.timeout ? inputs.functionConf.timeout : 3 - inputs.memorySize = - inputs.functionConf && inputs.functionConf.memorySize ? inputs.functionConf.memorySize : 128 + if (inputs.functionConf) { + inputs.timeout = inputs.functionConf.timeout ? inputs.functionConf.timeout : 3 + inputs.memorySize = inputs.functionConf.memorySize ? inputs.functionConf.memorySize : 128 + if (inputs.functionConf.environment) { + inputs.environment = inputs.functionConf.environment + } + if (inputs.functionConf.vpcConfig) { + inputs.vpcConfig = inputs.functionConf.vpcConfig + } + } + const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) - const tencentApiGatewayOutputs = await tencentApiGateway({ + const apigwParam = { serviceName: inputs.serviceName, + description: 'Serverless Framework tencent-express Component', serviceId: inputs.serviceId, region: inputs.region, protocol: @@ -69,9 +77,19 @@ class TencentExpress extends Component { } } ] - }) + } + if (inputs.apigatewayConf && inputs.apigatewayConf.auth) { + apigwParam.endpoints[0].usagePlan = inputs.apigatewayConf.usagePlan + } + if (inputs.apigatewayConf && inputs.apigatewayConf.auth) { + apigwParam.endpoints[0].auth = inputs.apigatewayConf.auth + } + const tencentApiGatewayOutputs = await tencentApiGateway(apigwParam) const outputs = { + region: inputs.region, + functionName: inputs.name, + apiGatewayServiceId: tencentApiGatewayOutputs.serviceId, url: `${tencentApiGatewayOutputs.protocol}://${tencentApiGatewayOutputs.subDomain}/${tencentApiGatewayOutputs.environment}/` } From 526d1e3b8e76cc27fea0c506d928b153117ebb19 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 16:28:17 +0800 Subject: [PATCH 19/93] update readme --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ README_CN.md | 44 ++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 3 files changed, 84 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dc4f2ae..3edd2bc 100755 --- a/README.md +++ b/README.md @@ -99,6 +99,47 @@ express: # - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ ``` +* Main param description + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :----: | +| region | Optional |ap-guangzhou | | +| functionName | Optional | | ServerlessCloudFunction Name | +| serviceName | Optional | | API-Gateway service name, default to create a new serivce | +| serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | +| code | Optional | | Default is current working directory | +| functionConf | Optional | | Function configure | +| apigatewayConf| Optional | | API-Gateway configure | + + +* funtionConf param description + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :----: | +| timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | +| memorySize | Optional |128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | +| environment | Optional | | Environment variable of the function | +| -- variables | | | Environment variable array | +| vpcConfig | Optional | | VPC configuration of the function | +| -- subnetId | | | ID of the VPC | +| -- vpcId | | | ID of the subnet | + +* apigatewayConf param description + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :----: | +| protocol | Optional | | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | +| environment | Optional | | The name of the environment to be published. Three environments are supported: test, prepub and release. | +| usagePlan | Optional | | | +| -- usagePlanId | | | User-defined usage plan id | +| -- usagePlanName | | | User-defined usage plan name | +| -- usagePlanDesc | | | User-defined usage plan description | +| -- maxRequestNum | | | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | +| auth | Optional | | | +| -- serviceTimeout | | | | +| -- secretName | | | | +| -- secretIds | | | | + ### 4. Deploy ``` diff --git a/README_CN.md b/README_CN.md index fb16be0..fdd5174 100644 --- a/README_CN.md +++ b/README_CN.md @@ -76,10 +76,9 @@ module.exports = app # serverless.yml express: - region: ap-shanghai component: '@serverless/tencent-express' inputs: - region: ap-shanghai + region: ap-shanghai # # functionName: eslam-function # SCF name # serviceName: mytest Optional - APIGW service name, default to create a new serivce # serviceId: service-np1uloxw Optional - APIGW service id, default to create a new serivce @@ -110,6 +109,47 @@ express: ``` +* 主要参数说明 + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :----: | +| region | 可选 |ap-guangzhou | | +| functionName | 可选 | | SCF函数名 | +| serviceName | 可选 | | API网关服务名 | +| serviceId | 可选 | | API网关ID名 | +| code | 可选 | | 代码目录 | +| functionConf | 可选 | | 函数配置 | +| apigatewayConf| 可选 | | API网关配置 | + + +* funtionConf 参数说明 + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :----: | +| timeout | 可选 | 3s | 函数最长执行时间,单位为秒,可选值范围 1-300 秒,默认为 3 秒 | +| memorySize | 可选 |128M | 函数运行时内存大小,默认为 128M,可选范围 128MB-1536MB,并且以 128MB 为阶梯 | +| environment | 可选 | | 函数的环境变量 | +| -- variables | | | 环境变量数组 | +| vpcConfig | 可选 | | 函数的私有网络配置 | +| -- subnetId | | | 私有网络 的 id | +| -- vpcId | | | 子网的 id | + +* apigatewayConf 参数说明 + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :----: | +| protocol | 可选 | | 服务的前端请求类型。如 HTTP、HTTPS、HTTP 和 HTTPS。 | +| environment | 可选 | | 待发布的环境名称,当前支持三个环境,测试:test,预发:prepub,线上:release | +| usagePlan | 可选 | | | +| -- usagePlanId | | | 用户自定义的使用计划ID | +| -- usagePlanName | | | 用户自定义的使用计划名称 | +| -- usagePlanDesc | | | 用户自定义的使用计划描述 | +| -- maxRequestNum | | | 请求配额总数,不传为-1表示不开启 | +| auth | 可选 | | | +| -- serviceTimeout | | | | +| -- secretName | | | | +| -- secretIds | | | | + ### 4. 部署 通过如下命令进行部署,并查看部署过程中的信息 diff --git a/package.json b/package.json index 66c4be0..e0d4e39 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.1.8", + "version": "1.1.9", "main": "./serverless.js", "publishConfig": { "access": "public" From 8aab1f25831d854af30e29d76d946f8c0613ee09 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 16:29:38 +0800 Subject: [PATCH 20/93] update readme --- README.md | 6 +++--- README_CN.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3edd2bc..59710c2 100755 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ express: * Main param description | Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :----: | +| -------- | :-----: | :----: | :---- | | region | Optional |ap-guangzhou | | | functionName | Optional | | ServerlessCloudFunction Name | | serviceName | Optional | | API-Gateway service name, default to create a new serivce | @@ -115,7 +115,7 @@ express: * funtionConf param description | Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :----: | +| -------- | :-----: | :----: | :---- | | timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | | memorySize | Optional |128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | | environment | Optional | | Environment variable of the function | @@ -127,7 +127,7 @@ express: * apigatewayConf param description | Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :----: | +| -------- | :-----: | :----: | :---- | | protocol | Optional | | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | | environment | Optional | | The name of the environment to be published. Three environments are supported: test, prepub and release. | | usagePlan | Optional | | | diff --git a/README_CN.md b/README_CN.md index fdd5174..96d1814 100644 --- a/README_CN.md +++ b/README_CN.md @@ -112,7 +112,7 @@ express: * 主要参数说明 | Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :----: | +| -------- | :-----: | :----: | :---- | | region | 可选 |ap-guangzhou | | | functionName | 可选 | | SCF函数名 | | serviceName | 可选 | | API网关服务名 | @@ -125,7 +125,7 @@ express: * funtionConf 参数说明 | Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :----: | +| -------- | :-----: | :----: | :---- | | timeout | 可选 | 3s | 函数最长执行时间,单位为秒,可选值范围 1-300 秒,默认为 3 秒 | | memorySize | 可选 |128M | 函数运行时内存大小,默认为 128M,可选范围 128MB-1536MB,并且以 128MB 为阶梯 | | environment | 可选 | | 函数的环境变量 | @@ -137,7 +137,7 @@ express: * apigatewayConf 参数说明 | Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :----: | +| -------- | :-----: | :----: | :---- | | protocol | 可选 | | 服务的前端请求类型。如 HTTP、HTTPS、HTTP 和 HTTPS。 | | environment | 可选 | | 待发布的环境名称,当前支持三个环境,测试:test,预发:prepub,线上:release | | usagePlan | 可选 | | | From ff4962ece95628c25445f9ab074b013fc8096bae Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 16:34:23 +0800 Subject: [PATCH 21/93] update readme --- README.md | 32 ++++++++++++++++---------------- README_CN.md | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 59710c2..a26e55c 100755 --- a/README.md +++ b/README.md @@ -119,26 +119,26 @@ express: | timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | | memorySize | Optional |128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | | environment | Optional | | Environment variable of the function | -| -- variables | | | Environment variable array | +| -variables | | | Environment variable array | | vpcConfig | Optional | | VPC configuration of the function | -| -- subnetId | | | ID of the VPC | -| -- vpcId | | | ID of the subnet | +| -subnetId | | | ID of the VPC | +| -vpcId | | | ID of the subnet | * apigatewayConf param description -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| protocol | Optional | | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | -| environment | Optional | | The name of the environment to be published. Three environments are supported: test, prepub and release. | -| usagePlan | Optional | | | -| -- usagePlanId | | | User-defined usage plan id | -| -- usagePlanName | | | User-defined usage plan name | -| -- usagePlanDesc | | | User-defined usage plan description | -| -- maxRequestNum | | | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | -| auth | Optional | | | -| -- serviceTimeout | | | | -| -- secretName | | | | -| -- secretIds | | | | +| Param | Required/Optional | Description | +| -------- | :-----: | :---- | +| protocol | Optional | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | +| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | +| usagePlan | Optional | | +| -usagePlanId | | User-defined usage plan id | +| -usagePlanName | | User-defined usage plan name | +| -usagePlanDesc | | User-defined usage plan description | +| -maxRequestNum | | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | +| auth | Optional | | +| -serviceTimeout | | | +| -secretName | | | +| -secretIds | | | ### 4. Deploy diff --git a/README_CN.md b/README_CN.md index 96d1814..7054fa4 100644 --- a/README_CN.md +++ b/README_CN.md @@ -129,26 +129,26 @@ express: | timeout | 可选 | 3s | 函数最长执行时间,单位为秒,可选值范围 1-300 秒,默认为 3 秒 | | memorySize | 可选 |128M | 函数运行时内存大小,默认为 128M,可选范围 128MB-1536MB,并且以 128MB 为阶梯 | | environment | 可选 | | 函数的环境变量 | -| -- variables | | | 环境变量数组 | +| -variables | | | 环境变量数组 | | vpcConfig | 可选 | | 函数的私有网络配置 | -| -- subnetId | | | 私有网络 的 id | -| -- vpcId | | | 子网的 id | +| -subnetId | | | 私有网络 的 id | +| -vpcId | | | 子网的 id | * apigatewayConf 参数说明 -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| protocol | 可选 | | 服务的前端请求类型。如 HTTP、HTTPS、HTTP 和 HTTPS。 | -| environment | 可选 | | 待发布的环境名称,当前支持三个环境,测试:test,预发:prepub,线上:release | -| usagePlan | 可选 | | | -| -- usagePlanId | | | 用户自定义的使用计划ID | -| -- usagePlanName | | | 用户自定义的使用计划名称 | -| -- usagePlanDesc | | | 用户自定义的使用计划描述 | -| -- maxRequestNum | | | 请求配额总数,不传为-1表示不开启 | -| auth | 可选 | | | -| -- serviceTimeout | | | | -| -- secretName | | | | -| -- secretIds | | | | +| Param | Required/Optional | Description | +| -------- | :-----: | :---- | +| protocol | 可选 | 服务的前端请求类型。如 HTTP、HTTPS、HTTP 和 HTTPS。 | +| environment | 可选 | 待发布的环境名称,当前支持三个环境,测试:test,预发:prepub,线上:release | +| usagePlan | 可选 | | +| -usagePlanId | | 用户自定义的使用计划ID | +| -usagePlanName | | 用户自定义的使用计划名称 | +| -usagePlanDesc | | 用户自定义的使用计划描述 | +| -maxRequestNum | | 请求配额总数,不传为-1表示不开启 | +| auth | 可选 | | +| -serviceTimeout | | | +| -secretName | | | +| -secretIds | | | ### 4. 部署 From 031078461b88f146f9462e7f85c9ae1f60caf300 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 16:39:19 +0800 Subject: [PATCH 22/93] update readme --- README.md | 2 +- README_CN.md | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a26e55c..020adbd 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.github.serverless/github_readme_serverless_express_tencent.png)](http://serverless.com) +[![Serverless Express Tencent Cloud](https://serverless-framework-1256773370.cos-website.ap-chengdu.myqcloud.com/component_pic/express.png)](http://serverless.com) Deploy Express applications to Tencent Cloud using Serverless Components diff --git a/README_CN.md b/README_CN.md index 7054fa4..f421785 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,4 +1,4 @@ -[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.github.serverless/github_readme_serverless_express_tencent.png)](http://serverless.com) +[![Serverless Express Tencent Cloud](https://serverless-framework-1256773370.cos-website.ap-chengdu.myqcloud.com/component_pic/express.png)](http://serverless.com)   diff --git a/package.json b/package.json index e0d4e39..dfeb72c 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.1.9", + "version": "1.2.0", "main": "./serverless.js", "publishConfig": { "access": "public" From 7a5d27bbd8e96ba8e96269808751c1ca56892e3b Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 16:54:32 +0800 Subject: [PATCH 23/93] update readme --- README.md | 43 +++++++++++++++++++++++++++++++++---------- README_CN.md | 43 +++++++++++++++++++++++++++++++++---------- 2 files changed, 66 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 020adbd..e576816 100755 --- a/README.md +++ b/README.md @@ -119,10 +119,22 @@ express: | timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | | memorySize | Optional |128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | | environment | Optional | | Environment variable of the function | -| -variables | | | Environment variable array | | vpcConfig | Optional | | VPC configuration of the function | -| -subnetId | | | ID of the VPC | -| -vpcId | | | ID of the subnet | + + +environment param description + +| Param | Description | +| -------- | :---- | +| variables | Environment variable array | + + +vpcConfig param description + +| Param | Description | +| -------- | :---- | +| subnetId | ID of the VPC | +| vpcId | ID of the subnet | * apigatewayConf param description @@ -131,14 +143,25 @@ express: | protocol | Optional | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | | environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | | usagePlan | Optional | | -| -usagePlanId | | User-defined usage plan id | -| -usagePlanName | | User-defined usage plan name | -| -usagePlanDesc | | User-defined usage plan description | -| -maxRequestNum | | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | | auth | Optional | | -| -serviceTimeout | | | -| -secretName | | | -| -secretIds | | | + +usagePlan param description + +| Param | Description | +| -------- | :---- | +| -usagePlanId | User-defined usage plan id | +| -usagePlanName | User-defined usage plan name | +| -usagePlanDesc | User-defined usage plan description | +| -maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | + + +auth param description + +| Param | Description | +| -------- | :---- | +| -serviceTimeout | Service timeout | +| -secretName | Secret name | +| -secretIds | Secret Id (Array) | ### 4. Deploy diff --git a/README_CN.md b/README_CN.md index f421785..6920804 100644 --- a/README_CN.md +++ b/README_CN.md @@ -129,10 +129,20 @@ express: | timeout | 可选 | 3s | 函数最长执行时间,单位为秒,可选值范围 1-300 秒,默认为 3 秒 | | memorySize | 可选 |128M | 函数运行时内存大小,默认为 128M,可选范围 128MB-1536MB,并且以 128MB 为阶梯 | | environment | 可选 | | 函数的环境变量 | -| -variables | | | 环境变量数组 | | vpcConfig | 可选 | | 函数的私有网络配置 | -| -subnetId | | | 私有网络 的 id | -| -vpcId | | | 子网的 id | + +environment 参数说明 + +| Param | Description | +| -------- |:---- | +| variables | 环境变量数组 | + +vpcConfig 参数说明 + +| Param | Description | +| -------- |:---- | +| subnetId | 私有网络 的 id | +| vpcId | 子网的 id | * apigatewayConf 参数说明 @@ -141,14 +151,27 @@ express: | protocol | 可选 | 服务的前端请求类型。如 HTTP、HTTPS、HTTP 和 HTTPS。 | | environment | 可选 | 待发布的环境名称,当前支持三个环境,测试:test,预发:prepub,线上:release | | usagePlan | 可选 | | -| -usagePlanId | | 用户自定义的使用计划ID | -| -usagePlanName | | 用户自定义的使用计划名称 | -| -usagePlanDesc | | 用户自定义的使用计划描述 | -| -maxRequestNum | | 请求配额总数,不传为-1表示不开启 | | auth | 可选 | | -| -serviceTimeout | | | -| -secretName | | | -| -secretIds | | | + + +usagePlan 参数说明 + +| Param | Description | +| -------- |:---- | +| usagePlanId | 用户自定义的使用计划ID | +| usagePlanName | 用户自定义的使用计划名称 | +| usagePlanDesc | 用户自定义的使用计划描述 | +| maxRequestNum | 请求配额总数,不传为-1表示不开启 | + + +auth 参数说明 + +| Param | Description | +| -------- |:---- | +| serviceTimeout | 服务超时时间 | +| secretName | 密钥名字 | +| secretIds | 密钥ID数组 | + ### 4. 部署 From 5c80b05e6921f8b87e12530e7c58d87626c537ad Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 16:55:26 +0800 Subject: [PATCH 24/93] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e576816..03d85b0 100755 --- a/README.md +++ b/README.md @@ -149,19 +149,19 @@ usagePlan param description | Param | Description | | -------- | :---- | -| -usagePlanId | User-defined usage plan id | -| -usagePlanName | User-defined usage plan name | -| -usagePlanDesc | User-defined usage plan description | -| -maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | +| usagePlanId | User-defined usage plan id | +| usagePlanName | User-defined usage plan name | +| usagePlanDesc | User-defined usage plan description | +| maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | auth param description | Param | Description | | -------- | :---- | -| -serviceTimeout | Service timeout | -| -secretName | Secret name | -| -secretIds | Secret Id (Array) | +| serviceTimeout | Service timeout | +| secretName | Secret name | +| secretIds | Secret Id (Array) | ### 4. Deploy From 325cb26730b3a013991da9e4ed5a39da40d14c9f Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 17:10:26 +0800 Subject: [PATCH 25/93] update readme --- README.md | 119 ++++++++++++------------------------ README_CN.md | 150 ++++++++++++---------------------------------- docs/configure.md | 106 ++++++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 183 insertions(+), 194 deletions(-) create mode 100644 docs/configure.md diff --git a/README.md b/README.md index 03d85b0..3c74b6d 100755 --- a/README.md +++ b/README.md @@ -99,87 +99,42 @@ express: # - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ ``` -* Main param description - -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| region | Optional |ap-guangzhou | | -| functionName | Optional | | ServerlessCloudFunction Name | -| serviceName | Optional | | API-Gateway service name, default to create a new serivce | -| serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | -| code | Optional | | Default is current working directory | -| functionConf | Optional | | Function configure | -| apigatewayConf| Optional | | API-Gateway configure | - - -* funtionConf param description - -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | -| memorySize | Optional |128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | -| environment | Optional | | Environment variable of the function | -| vpcConfig | Optional | | VPC configuration of the function | - - -environment param description - -| Param | Description | -| -------- | :---- | -| variables | Environment variable array | - - -vpcConfig param description - -| Param | Description | -| -------- | :---- | -| subnetId | ID of the VPC | -| vpcId | ID of the subnet | - -* apigatewayConf param description - -| Param | Required/Optional | Description | -| -------- | :-----: | :---- | -| protocol | Optional | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | -| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | -| usagePlan | Optional | | -| auth | Optional | | - -usagePlan param description - -| Param | Description | -| -------- | :---- | -| usagePlanId | User-defined usage plan id | -| usagePlanName | User-defined usage plan name | -| usagePlanDesc | User-defined usage plan description | -| maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | - - -auth param description - -| Param | Description | -| -------- | :---- | -| serviceTimeout | Service timeout | -| secretName | Secret name | -| secretIds | Secret Id (Array) | +* [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/docs/configure.md) ### 4. Deploy ``` -myApp (master)$ serverless --debug - - DEBUG ─ Endpoint ANY / already exists with id api-3n1p7a86. - DEBUG ─ Updating api with api id api-3n1p7a86. - DEBUG ─ Service with id api-3n1p7a86 updated. - DEBUG ─ Deploying service with id service-np1uloxw. - DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-guangzhou region. - - express: - url: http://service-np1uloxw-1300415943.gz.apigw.tencentcs.com/release - - 84s › express › done - -myApp (master)$ +$ sls --debug + + DEBUG ─ Resolving the template's static variables. + DEBUG ─ Collecting components from the template. + DEBUG ─ Downloading any NPM components found in the template. + DEBUG ─ Analyzing the template's components dependencies. + DEBUG ─ Creating the template's components graph. + DEBUG ─ Syncing template state. + DEBUG ─ Executing the template's components graph. + DEBUG ─ Compressing function ExpressComponent_7xRrrd file to /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip. + DEBUG ─ Compressed function ExpressComponent_7xRrrd file successful + DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-shanghai-code]. sls-cloudfunction-default-ExpressComponent_7xRrrd-1572512568.zip + DEBUG ─ Uploaded package successful /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip + DEBUG ─ Creating function ExpressComponent_7xRrrd + DEBUG ─ Created function ExpressComponent_7xRrrd successful + DEBUG ─ Starting API-Gateway deployment with name express.TencentApiGateway in the ap-shanghai region + DEBUG ─ Using last time deploy service id service-n0vs2ohb + DEBUG ─ Updating service with serviceId service-n0vs2ohb. + DEBUG ─ Endpoint ANY / already exists with id api-9z60urs4. + DEBUG ─ Updating api with api id api-9z60urs4. + DEBUG ─ Service with id api-9z60urs4 updated. + DEBUG ─ Deploying service with id service-n0vs2ohb. + DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-shanghai region. + + express: + region: ap-shanghai + functionName: ExpressComponent_7xRrrd + apiGatewayServiceId: service-n0vs2ohb + url: http://service-n0vs2ohb-1300415943.ap-shanghai.apigateway.myqcloud.com/release/ + + 36s › express › done ``` You can now visit the output URL in the browser, and you should see the express response. @@ -187,14 +142,14 @@ You can now visit the output URL in the browser, and you should see the express ### 5. Remove ``` -myApp (master)$ serverless remove --debug +$ sls remove --debug DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removed function eslam-function successful - - 17s › express › done + DEBUG ─ Removed function ExpressComponent_MHrAzr successful + DEBUG ─ Removing any previously deployed API. api-kf2hxrhc + DEBUG ─ Removing any previously deployed service. service-4ndfl6pz -myApp (master)$ + 13s › express › done ``` ### New to Components? diff --git a/README_CN.md b/README_CN.md index 6920804..75bf0c7 100644 --- a/README_CN.md +++ b/README_CN.md @@ -39,8 +39,7 @@ $ touch .env # 腾讯云的配置信息 如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 -如果已有腾讯云账号,可以在[API密钥管理 -](https://console.cloud.tencent.com/cam/capi)中获取`APPID`, `SecretId` 和`SecretKey`. +如果已有腾讯云账号,可以在[API密钥管理](https://console.cloud.tencent.com/cam/capi)中获取`APPID`, `SecretId` 和`SecretKey`. ``` # .env @@ -78,99 +77,10 @@ module.exports = app express: component: '@serverless/tencent-express' inputs: - region: ap-shanghai # -# functionName: eslam-function # SCF name -# serviceName: mytest Optional - APIGW service name, default to create a new serivce -# serviceId: service-np1uloxw Optional - APIGW service id, default to create a new serivce -# code: ./code Optional - default is current working directory -# functionConf: -# timeout: 10 -# memorySize: 128 -# environment: -# variables: -# TEST: vale -# vpcConfig: -# subnetId: '' -# vpcId: '' -# apigatewayConf: -# protocol: https -# environment: test -# usagePlan: -# # if dont't exists create a new -# usagePlanId: 1111 -# usagePlanName: slscmp # required -# usagePlanDesc: sls create -# maxRequestNum: 1000 -# auth: -# serviceTimeout: 15 -# secretName: secret # required -# secretIds: -# - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ + region: ap-shanghai ``` - -* 主要参数说明 - -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| region | 可选 |ap-guangzhou | | -| functionName | 可选 | | SCF函数名 | -| serviceName | 可选 | | API网关服务名 | -| serviceId | 可选 | | API网关ID名 | -| code | 可选 | | 代码目录 | -| functionConf | 可选 | | 函数配置 | -| apigatewayConf| 可选 | | API网关配置 | - - -* funtionConf 参数说明 - -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| timeout | 可选 | 3s | 函数最长执行时间,单位为秒,可选值范围 1-300 秒,默认为 3 秒 | -| memorySize | 可选 |128M | 函数运行时内存大小,默认为 128M,可选范围 128MB-1536MB,并且以 128MB 为阶梯 | -| environment | 可选 | | 函数的环境变量 | -| vpcConfig | 可选 | | 函数的私有网络配置 | - -environment 参数说明 - -| Param | Description | -| -------- |:---- | -| variables | 环境变量数组 | - -vpcConfig 参数说明 - -| Param | Description | -| -------- |:---- | -| subnetId | 私有网络 的 id | -| vpcId | 子网的 id | - -* apigatewayConf 参数说明 - -| Param | Required/Optional | Description | -| -------- | :-----: | :---- | -| protocol | 可选 | 服务的前端请求类型。如 HTTP、HTTPS、HTTP 和 HTTPS。 | -| environment | 可选 | 待发布的环境名称,当前支持三个环境,测试:test,预发:prepub,线上:release | -| usagePlan | 可选 | | -| auth | 可选 | | - - -usagePlan 参数说明 - -| Param | Description | -| -------- |:---- | -| usagePlanId | 用户自定义的使用计划ID | -| usagePlanName | 用户自定义的使用计划名称 | -| usagePlanDesc | 用户自定义的使用计划描述 | -| maxRequestNum | 请求配额总数,不传为-1表示不开启 | - - -auth 参数说明 - -| Param | Description | -| -------- |:---- | -| serviceTimeout | 服务超时时间 | -| secretName | 密钥名字 | -| secretIds | 密钥ID数组 | +* [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/docs/configure.md) ### 4. 部署 @@ -178,20 +88,38 @@ auth 参数说明 通过如下命令进行部署,并查看部署过程中的信息 ``` -myApp (master)$ serverless --debug - - DEBUG ─ Endpoint ANY / already exists with id api-3n1p7a86. - DEBUG ─ Updating api with api id api-3n1p7a86. - DEBUG ─ Service with id api-3n1p7a86 updated. - DEBUG ─ Deploying service with id service-np1uloxw. - DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-guangzhou region. - - express: - url: http://service-np1uloxw-1300415943.gz.apigw.tencentcs.com/release +$ sls --debug + + DEBUG ─ Resolving the template's static variables. + DEBUG ─ Collecting components from the template. + DEBUG ─ Downloading any NPM components found in the template. + DEBUG ─ Analyzing the template's components dependencies. + DEBUG ─ Creating the template's components graph. + DEBUG ─ Syncing template state. + DEBUG ─ Executing the template's components graph. + DEBUG ─ Compressing function ExpressComponent_7xRrrd file to /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip. + DEBUG ─ Compressed function ExpressComponent_7xRrrd file successful + DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-shanghai-code]. sls-cloudfunction-default-ExpressComponent_7xRrrd-1572512568.zip + DEBUG ─ Uploaded package successful /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip + DEBUG ─ Creating function ExpressComponent_7xRrrd + DEBUG ─ Created function ExpressComponent_7xRrrd successful + DEBUG ─ Starting API-Gateway deployment with name express.TencentApiGateway in the ap-shanghai region + DEBUG ─ Using last time deploy service id service-n0vs2ohb + DEBUG ─ Updating service with serviceId service-n0vs2ohb. + DEBUG ─ Endpoint ANY / already exists with id api-9z60urs4. + DEBUG ─ Updating api with api id api-9z60urs4. + DEBUG ─ Service with id api-9z60urs4 updated. + DEBUG ─ Deploying service with id service-n0vs2ohb. + DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-shanghai region. + + express: + region: ap-shanghai + functionName: ExpressComponent_7xRrrd + apiGatewayServiceId: service-n0vs2ohb + url: http://service-n0vs2ohb-1300415943.ap-shanghai.apigateway.myqcloud.com/release/ + + 36s › express › done - 84s › express › done - -myApp (master)$ ``` 部署完毕后,可以在浏览器中访问返回的链接,看到对应的express返回值。 @@ -200,14 +128,14 @@ myApp (master)$ 通过以下命令移除部署的存储桶 ``` -myApp (master)$ serverless remove --debug +$ sls remove --debug DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removed function eslam-function successful - - 17s › express › done + DEBUG ─ Removed function ExpressComponent_MHrAzr successful + DEBUG ─ Removing any previously deployed API. api-kf2hxrhc + DEBUG ─ Removing any previously deployed service. service-4ndfl6pz -myApp (master)$ + 13s › express › done ``` ### 还支持哪些组件? diff --git a/docs/configure.md b/docs/configure.md new file mode 100644 index 0000000..ba15400 --- /dev/null +++ b/docs/configure.md @@ -0,0 +1,106 @@ +# Configure document + +## Complete configuration + +```yml +# serverless.yml + +express: + region: ap-shanghai + component: '@serverless/tencent-express' + inputs: + region: ap-shanghai + functionName: eslam-function + serviceName: mytest + serviceId: service-np1uloxw + code: ./code + functionConf: + timeout: 10 + memorySize: 128 + environment: + variables: + TEST: vale + vpcConfig: + subnetId: '' + vpcId: '' + apigatewayConf: + protocol: https + environment: test + usagePlan: + usagePlanId: 1111 + usagePlanName: slscmp + usagePlanDesc: sls create + maxRequestNum: 1000 + auth: + serviceTimeout: 15 + secretName: secret + secretIds: + - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ + +``` + +## Configuration description + +* Main param description + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :---- | +| region | Optional |ap-guangzhou | | +| functionName | Optional | | ServerlessCloudFunction Name | +| serviceName | Optional | | API-Gateway service name, default to create a new serivce | +| serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | +| code | Optional | | Default is current working directory | +| functionConf | Optional | | Function configure | +| apigatewayConf| Optional | | API-Gateway configure | + + +* funtionConf param description + +| Param | Required/Optional | Default | Description | +| -------- | :-----: | :----: | :---- | +| timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | +| memorySize | Optional |128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | +| environment | Optional | | Environment variable of the function | +| vpcConfig | Optional | | VPC configuration of the function | + + +environment param description + +| Param | Description | +| -------- | :---- | +| variables | Environment variable array | + + +vpcConfig param description + +| Param | Description | +| -------- | :---- | +| subnetId | ID of the VPC | +| vpcId | ID of the subnet | + +* apigatewayConf param description + +| Param | Required/Optional | Description | +| -------- | :-----: | :---- | +| protocol | Optional | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | +| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | +| usagePlan | Optional | | +| auth | Optional | | + +usagePlan param description + +| Param | Description | +| -------- | :---- | +| usagePlanId | User-defined usage plan id | +| usagePlanName | User-defined usage plan name | +| usagePlanDesc | User-defined usage plan description | +| maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | + + +auth param description + +| Param | Description | +| -------- | :---- | +| serviceTimeout | Service timeout | +| secretName | Secret name | +| secretIds | Secret Id (Array) | diff --git a/package.json b/package.json index dfeb72c..354ae17 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.2.0", + "version": "1.2.2", "main": "./serverless.js", "publishConfig": { "access": "public" From b4e2333323060a6c0e4c1e942a746f7b03662157 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 17:11:16 +0800 Subject: [PATCH 26/93] update readme --- README.md | 2 +- README_CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3c74b6d..f5f17a5 100755 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ express: # - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ ``` -* [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/docs/configure.md) +* [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) ### 4. Deploy diff --git a/README_CN.md b/README_CN.md index 75bf0c7..d9d3b6a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -80,7 +80,7 @@ express: region: ap-shanghai ``` -* [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/docs/configure.md) +* [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) ### 4. 部署 From 757e9202b3745b9edf49e2d09e1ad001843fc14c Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 17:12:52 +0800 Subject: [PATCH 27/93] update readme --- docs/configure.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index ba15400..a57fca5 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -41,7 +41,7 @@ express: ## Configuration description -* Main param description +Main param description | Param | Required/Optional | Default | Description | | -------- | :-----: | :----: | :---- | @@ -50,11 +50,11 @@ express: | serviceName | Optional | | API-Gateway service name, default to create a new serivce | | serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | | code | Optional | | Default is current working directory | -| functionConf | Optional | | Function configure | -| apigatewayConf| Optional | | API-Gateway configure | +| [functionConf](#funtionConf-param-description) | Optional | | Function configure | +| [apigatewayConf](apigatewayConf-param-description)| Optional | | API-Gateway configure | -* funtionConf param description +### funtionConf param description | Param | Required/Optional | Default | Description | | -------- | :-----: | :----: | :---- | @@ -64,21 +64,21 @@ express: | vpcConfig | Optional | | VPC configuration of the function | -environment param description +* environment param description | Param | Description | | -------- | :---- | | variables | Environment variable array | -vpcConfig param description +* vpcConfig param description | Param | Description | | -------- | :---- | | subnetId | ID of the VPC | | vpcId | ID of the subnet | -* apigatewayConf param description +### apigatewayConf param description | Param | Required/Optional | Description | | -------- | :-----: | :---- | @@ -87,7 +87,7 @@ vpcConfig param description | usagePlan | Optional | | | auth | Optional | | -usagePlan param description +* usagePlan param description | Param | Description | | -------- | :---- | @@ -97,7 +97,7 @@ usagePlan param description | maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | -auth param description +* auth param description | Param | Description | | -------- | :---- | From 8b0c65bd7a38bafa06d5320c0c814a76549dbee7 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 31 Oct 2019 17:13:57 +0800 Subject: [PATCH 28/93] update readme --- README.md | 28 ---------------------------- docs/configure.md | 2 +- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/README.md b/README.md index f5f17a5..c49ab6e 100755 --- a/README.md +++ b/README.md @@ -66,37 +66,9 @@ module.exports = app # serverless.yml express: - region: ap-shanghai component: '@serverless/tencent-express' inputs: region: ap-shanghai -# functionName: eslam-function # SCF name -# serviceName: mytest Optional - APIGW service name, default to create a new serivce -# serviceId: service-np1uloxw Optional - APIGW service id, default to create a new serivce -# code: ./code Optional - default is current working directory -# functionConf: -# timeout: 10 -# memorySize: 128 -# environment: -# variables: -# TEST: vale -# vpcConfig: -# subnetId: '' -# vpcId: '' -# apigatewayConf: -# protocol: https -# environment: test -# usagePlan: -# # if dont't exists create a new -# usagePlanId: 1111 -# usagePlanName: slscmp # required -# usagePlanDesc: sls create -# maxRequestNum: 1000 -# auth: -# serviceTimeout: 15 -# secretName: secret # required -# secretIds: -# - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ ``` * [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) diff --git a/docs/configure.md b/docs/configure.md index a57fca5..e33bf26 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -51,7 +51,7 @@ Main param description | serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | | code | Optional | | Default is current working directory | | [functionConf](#funtionConf-param-description) | Optional | | Function configure | -| [apigatewayConf](apigatewayConf-param-description)| Optional | | API-Gateway configure | +| [apigatewayConf](#apigatewayConf-param-description)| Optional | | API-Gateway configure | ### funtionConf param description From f8ff24dffdcb409cd45eb36aaf758c57fd93818a Mon Sep 17 00:00:00 2001 From: Austen Date: Tue, 5 Nov 2019 09:09:55 +0800 Subject: [PATCH 29/93] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c49ab6e..143fc5a 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Serverless Express Tencent Cloud](https://serverless-framework-1256773370.cos-website.ap-chengdu.myqcloud.com/component_pic/express.png)](http://serverless.com) +[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.general.serverless.com/component_express_tencent/readme-express-tencent-serverless.png)](http://serverless.com) Deploy Express applications to Tencent Cloud using Serverless Components From 0698fb51184faca03a43468ba6805e9d47533458 Mon Sep 17 00:00:00 2001 From: Austen Date: Tue, 5 Nov 2019 09:11:13 +0800 Subject: [PATCH 30/93] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 143fc5a..81a6812 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.general.serverless.com/component_express_tencent/readme-express-tencent-serverless.png)](http://serverless.com) -Deploy Express applications to Tencent Cloud using Serverless Components +Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration.   From 35292c147ae99305b7ed79c29d86964262e9d8f9 Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Tue, 5 Nov 2019 11:42:51 +0800 Subject: [PATCH 31/93] Update README_CN.md --- README_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index d9d3b6a..edff18c 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,4 +1,4 @@ -[![Serverless Express Tencent Cloud](https://serverless-framework-1256773370.cos-website.ap-chengdu.myqcloud.com/component_pic/express.png)](http://serverless.com) +[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.general.serverless.com/component_express_tencent/readme-express-tencent-serverless.png)](http://serverless.com)   From 256657d44f82fa2c9a5a3bcb38a241cf0a8dda30 Mon Sep 17 00:00:00 2001 From: tinafangkunding Date: Tue, 5 Nov 2019 23:14:53 +0800 Subject: [PATCH 32/93] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 81a6812..140e46f 100755 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Easily deploy Express.js applications to Tencent Cloud's serverless infrastructu   +* [请点击这里查看中文版部署文档](./README_CN.md) + +  + 1. [Install](#1-install) 2. [Create](#2-create) 3. [Configure](#3-configure) From 8a65f2952d7eca023b08e39e6dd0c13468146fee Mon Sep 17 00:00:00 2001 From: yugasun Date: Wed, 6 Nov 2019 17:51:06 +0800 Subject: [PATCH 33/93] fix: usagePlan not work bug for apigatewayConf --- serverless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless.js b/serverless.js index 513b4b6..de7ea72 100755 --- a/serverless.js +++ b/serverless.js @@ -78,7 +78,7 @@ class TencentExpress extends Component { } ] } - if (inputs.apigatewayConf && inputs.apigatewayConf.auth) { + if (inputs.apigatewayConf && inputs.apigatewayConf.usagePlan) { apigwParam.endpoints[0].usagePlan = inputs.apigatewayConf.usagePlan } if (inputs.apigatewayConf && inputs.apigatewayConf.auth) { From 4840bb05cd0a55b0ca56f3b303a530276ab694e2 Mon Sep 17 00:00:00 2001 From: Tinafang Date: Sun, 10 Nov 2019 23:58:57 +0800 Subject: [PATCH 34/93] Update gif --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 140e46f..591723e 100755 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Easily deploy Express.js applications to Tencent Cloud's serverless infrastructu   + + * [请点击这里查看中文版部署文档](./README_CN.md)   From 341dd59e9173bf0a89799ffb99633849fbb2c07e Mon Sep 17 00:00:00 2001 From: Tinafang Date: Mon, 11 Nov 2019 00:22:49 +0800 Subject: [PATCH 35/93] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 591723e..a747850 100755 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration.   - - + * [请点击这里查看中文版部署文档](./README_CN.md) From 1da7091592e322c99dc6e1ef9a2e59bc61ba35cb Mon Sep 17 00:00:00 2001 From: Tinafang Date: Mon, 11 Nov 2019 11:03:05 +0800 Subject: [PATCH 36/93] Add a gif in README_CN.md --- README_CN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README_CN.md b/README_CN.md index edff18c..79faf5f 100644 --- a/README_CN.md +++ b/README_CN.md @@ -7,6 +7,7 @@ ## 简介 Express 组件通过使用 serverless-tencent 的基础组件如API网关组件,SCF组件等,快速,方便的在腾讯云创建,配置和管理一个Express框架。 + ## 快速开始 From 4eb6cd4c5e8bf0801a032ee67cb789cee93e7cf5 Mon Sep 17 00:00:00 2001 From: Anycodes Date: Mon, 11 Nov 2019 18:21:43 +0800 Subject: [PATCH 37/93] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a747850..06886b1 100755 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/ca # .env TENCENT_SECRET_ID=123 TENCENT_SECRET_KEY=123 -TENCENT_APP_ID=123 ``` * If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. From f9b56eda068cafa4d70d69825bfacc8848ccefaa Mon Sep 17 00:00:00 2001 From: Anycodes Date: Mon, 11 Nov 2019 18:22:03 +0800 Subject: [PATCH 38/93] Update README_CN.md --- README_CN.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index 79faf5f..eb95c12 100644 --- a/README_CN.md +++ b/README_CN.md @@ -46,7 +46,6 @@ $ touch .env # 腾讯云的配置信息 # .env TENCENT_SECRET_ID=123 TENCENT_SECRET_KEY=123 -TENCENT_APP_ID=123 ``` 初始化一个新的NPM包,并且安装express: From 85cb281ef66834cca8c400d1ed6c27f9a95e3594 Mon Sep 17 00:00:00 2001 From: Austen Date: Thu, 14 Nov 2019 06:16:33 -0800 Subject: [PATCH 39/93] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06886b1..57c451c 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration.   - + * [请点击这里查看中文版部署文档](./README_CN.md) From d8cdddc19d93d4e1e814c209dac9ddf339d483a7 Mon Sep 17 00:00:00 2001 From: Austen Date: Thu, 14 Nov 2019 06:17:31 -0800 Subject: [PATCH 40/93] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 57c451c..7ee7c25 100755 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ Easily deploy Express.js applications to Tencent Cloud's serverless infrastructu   +  + ### 1. Install ```console From c8aa5120be7641290649e1501315c691cb407326 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Thu, 21 Nov 2019 23:40:33 +0800 Subject: [PATCH 41/93] add login & fix role --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 354ae17..2bc7b93 100755 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "dependencies": { "@serverless/core": "^1.0.0", "@serverless/tencent-apigateway": "^1.2.0", - "@serverless/tencent-scf": "^1.1.0" + "@serverless/tencent-scf": "^1.1.11c" }, "devDependencies": { "babel-eslint": "9.0.0", From 4a260e209136c362a1f250bba0a13ffae8162ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tinafang=28=E6=96=B9=E5=9D=A4=E4=B8=81=29?= Date: Sun, 24 Nov 2019 23:12:32 +0800 Subject: [PATCH 42/93] Update README_CN.md update QR code sign-in --- README_CN.md | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/README_CN.md b/README_CN.md index eb95c12..3dfaa4a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -29,32 +29,19 @@ $ npm install -g serverless ### 2. 创建 -本地创建 `serverless.yml` 和 `.env` 两个文件 +本地创建 `serverless.yml` 文件: ```console $ touch serverless.yml -$ touch .env # 腾讯云的配置信息 -``` - -在 `.env` 文件中配置腾讯云的 APPID,SecretId 和 SecretKey 信息并保存 - -如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 - -如果已有腾讯云账号,可以在[API密钥管理](https://console.cloud.tencent.com/cam/capi)中获取`APPID`, `SecretId` 和`SecretKey`. - -``` -# .env -TENCENT_SECRET_ID=123 -TENCENT_SECRET_KEY=123 ``` -初始化一个新的NPM包,并且安装express: +初始化一个新的 npm 包,并安装 Express: ``` npm init # 创建后持续回车 npm i --save express # 安装express ``` -创建一个 `app.js`文件,并在其中创建你的express app: +创建一个 `app.js`文件,并在其中创建您的 Express App: ```js const express = require('express') const app = express() @@ -85,7 +72,9 @@ express: ### 4. 部署 -通过如下命令进行部署,并查看部署过程中的信息 +如您的账号未[登陆](https://cloud.tencent.com/login)或[注册](https://cloud.tencent.com/register)腾讯云,您可以直接通过`微信`扫描命令行中的二维码进行授权登陆和注册。 + +通过`sls`命令进行部署,并可以添加`--debug`参数查看部署过程中的信息 ``` $ sls --debug @@ -138,6 +127,26 @@ $ sls remove --debug 13s › express › done ``` +### 账号配置(可选) + +当前默认支持CLI扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 `.env` 文件 + +```console +$ touch .env # 腾讯云的配置信息 +``` + +在 `.env` 文件中配置腾讯云的SecretId和SecretKey信息并保存 + +如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 + +如果已有腾讯云账号,可以在[API密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`. + +``` +# .env +TENCENT_SECRET_ID=123 +TENCENT_SECRET_KEY=123 +``` + ### 还支持哪些组件? 可以在 [Serverless Components](https://github.com/serverless/components) repo 中查询更多组件的信息。 From e6315771a5dcab17116f4550e4ae2e78801cee41 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Tue, 26 Nov 2019 19:06:14 +0800 Subject: [PATCH 43/93] fix region & function status --- package.json | 2 +- serverless.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2bc7b93..82763ea 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.2.2", + "version": "1.2.3", "main": "./serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.js b/serverless.js index de7ea72..c135636 100755 --- a/serverless.js +++ b/serverless.js @@ -87,7 +87,7 @@ class TencentExpress extends Component { const tencentApiGatewayOutputs = await tencentApiGateway(apigwParam) const outputs = { - region: inputs.region, + region: inputs.region || 'ap-guangzhou', functionName: inputs.name, apiGatewayServiceId: tencentApiGatewayOutputs.serviceId, url: `${tencentApiGatewayOutputs.protocol}://${tencentApiGatewayOutputs.subDomain}/${tencentApiGatewayOutputs.environment}/` From b013409b8fbcd317440fa0a952d79abff2484272 Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Wed, 11 Dec 2019 15:24:09 +0100 Subject: [PATCH 44/93] Setup tape for testing --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 82763ea..7812e53 100755 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "access": "public" }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "tape *.test.js", "lint": "eslint . --fix --cache" }, "author": "Serverless, Inc.", @@ -23,6 +23,7 @@ "eslint-config-prettier": "^3.6.0", "eslint-plugin-import": "^2.18.0", "eslint-plugin-prettier": "^3.0.1", - "prettier": "^1.18.2" + "prettier": "^1.18.2", + "tape": "^4.11.0" } } From 3e773ade708f9e8ab25cf7da70e837741601c640 Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Wed, 11 Dec 2019 15:25:11 +0100 Subject: [PATCH 45/93] Add logic to determine the appropriate protocol --- serverless.js | 19 ++++++++++++++----- serverless.test.js | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 serverless.test.js diff --git a/serverless.js b/serverless.js index c135636..8b8cc94 100755 --- a/serverless.js +++ b/serverless.js @@ -2,6 +2,13 @@ const path = require('path') const { Component, utils } = require('@serverless/core') class TencentExpress extends Component { + getDefaultProtocol(protocols) { + if (protocols.map((i) => i.toLowerCase()).includes('https')) { + return 'https' + } + return 'http' + } + async default(inputs = {}) { // there are some dependencies that require the express him to work // I've included them all here. A better approach would be to use @@ -59,10 +66,10 @@ class TencentExpress extends Component { description: 'Serverless Framework tencent-express Component', serviceId: inputs.serviceId, region: inputs.region, - protocol: - inputs.apigatewayConf && inputs.apigatewayConf.protocol - ? inputs.apigatewayConf.protocol - : 'http', + protocols: + inputs.apigatewayConf && inputs.apigatewayConf.protocols + ? inputs.apigatewayConf.protocols + : ['http'], environment: inputs.apigatewayConf && inputs.apigatewayConf.environment ? inputs.apigatewayConf.environment @@ -90,7 +97,9 @@ class TencentExpress extends Component { region: inputs.region || 'ap-guangzhou', functionName: inputs.name, apiGatewayServiceId: tencentApiGatewayOutputs.serviceId, - url: `${tencentApiGatewayOutputs.protocol}://${tencentApiGatewayOutputs.subDomain}/${tencentApiGatewayOutputs.environment}/` + url: `${this.getDefaultProtocol(tencentApiGatewayOutputs.protocols)}://${ + tencentApiGatewayOutputs.subDomain + }/${tencentApiGatewayOutputs.environment}/` } return outputs diff --git a/serverless.test.js b/serverless.test.js new file mode 100644 index 0000000..0069f7b --- /dev/null +++ b/serverless.test.js @@ -0,0 +1,14 @@ +const test = require('tape') + +const Component = require('./serverless') + +test('getDefaultProtocol()', (t) => { + t.plan(5) + + const comp = new Component() + t.equal(comp.getDefaultProtocol(['http']), 'http') + t.equal(comp.getDefaultProtocol(['https']), 'https') + t.equal(comp.getDefaultProtocol(['http', 'https']), 'https') + t.equal(comp.getDefaultProtocol(['HTTP', 'hTTpS']), 'https') + t.equal(comp.getDefaultProtocol(['http', 'ftp']), 'http') +}) From c1be6a7ec51a8e5d5eba86be313110a64bfe24e6 Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Wed, 11 Dec 2019 15:26:15 +0100 Subject: [PATCH 46/93] Update version numbers --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7812e53..9a0e211 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.2.3", + "version": "1.3.0", "main": "./serverless.js", "publishConfig": { "access": "public" @@ -14,7 +14,7 @@ "license": "Apache", "dependencies": { "@serverless/core": "^1.0.0", - "@serverless/tencent-apigateway": "^1.2.0", + "@serverless/tencent-apigateway": "^2.0.0", "@serverless/tencent-scf": "^1.1.11c" }, "devDependencies": { From 3155f9f04d4f98f52a3d77c465fa4aa18b4d629f Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Wed, 11 Dec 2019 15:35:08 +0100 Subject: [PATCH 47/93] Gitignore tmp directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ef6944e..9f4ce54 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ build/ env.js package-lock.json test +tmp/ From 813b54689d1935ae47fca375a61f14493fcbe510 Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Wed, 11 Dec 2019 15:43:53 +0100 Subject: [PATCH 48/93] Update package version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a0e211..3f3c666 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "1.3.0", + "version": "2.0.0", "main": "./serverless.js", "publishConfig": { "access": "public" From 801919bae7a9ea1bebfc9be20d5bd46a86509e3d Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Thu, 12 Dec 2019 13:49:38 +0100 Subject: [PATCH 49/93] Update documentation --- docs/configure.md | 97 +++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index e33bf26..2f9aca5 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -11,7 +11,7 @@ express: inputs: region: ap-shanghai functionName: eslam-function - serviceName: mytest + serviceName: mytest serviceId: service-np1uloxw code: ./code functionConf: @@ -24,11 +24,13 @@ express: subnetId: '' vpcId: '' apigatewayConf: - protocol: https + protocols: + - http + - https environment: test usagePlan: usagePlanId: 1111 - usagePlanName: slscmp + usagePlanName: slscmp usagePlanDesc: sls create maxRequestNum: 1000 auth: @@ -36,71 +38,66 @@ express: secretName: secret secretIds: - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ - ``` ## Configuration description Main param description -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| region | Optional |ap-guangzhou | | -| functionName | Optional | | ServerlessCloudFunction Name | -| serviceName | Optional | | API-Gateway service name, default to create a new serivce | -| serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | -| code | Optional | | Default is current working directory | -| [functionConf](#funtionConf-param-description) | Optional | | Function configure | -| [apigatewayConf](#apigatewayConf-param-description)| Optional | | API-Gateway configure | - +| Param | Required/Optional | Default | Description | +| --------------------------------------------------- | :---------------: | :----------: | :------------------------------------------------------------------- | +| region | Optional | ap-guangzhou | | +| functionName | Optional | | ServerlessCloudFunction Name | +| serviceName | Optional | | API-Gateway service name, default to create a new serivce | +| serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | +| code | Optional | | Default is current working directory | +| [functionConf](#funtionConf-param-description) | Optional | | Function configure | +| [apigatewayConf](#apigatewayConf-param-description) | Optional | | API-Gateway configure | ### funtionConf param description -| Param | Required/Optional | Default | Description | -| -------- | :-----: | :----: | :---- | -| timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | -| memorySize | Optional |128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | -| environment | Optional | | Environment variable of the function | -| vpcConfig | Optional | | VPC configuration of the function | - +| Param | Required/Optional | Default | Description | +| ----------- | :---------------: | :-----: | :---------------------------------------------------------------------------------------------------------------------------------------------- | +| timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | +| memorySize | Optional | 128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | +| environment | Optional | | Environment variable of the function | +| vpcConfig | Optional | | VPC configuration of the function | -* environment param description +- environment param description -| Param | Description | -| -------- | :---- | -| variables | Environment variable array | +| Param | Description | +| --------- | :------------------------- | +| variables | Environment variable array | +- vpcConfig param description -* vpcConfig param description - -| Param | Description | -| -------- | :---- | -| subnetId | ID of the VPC | -| vpcId | ID of the subnet | +| Param | Description | +| -------- | :--------------- | +| subnetId | ID of the VPC | +| vpcId | ID of the subnet | ### apigatewayConf param description -| Param | Required/Optional | Description | -| -------- | :-----: | :---- | -| protocol | Optional | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | -| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | -| usagePlan | Optional | | -| auth | Optional | | +| Param | Required/Optional | Description | +| ----------- | :---------------: | :------------------------------------------------------------------------------------------------------- | +| protocols | Optional | Frontend request type of the service, such as `http` or `https`. | +| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | +| usagePlan | Optional | | +| auth | Optional | | -* usagePlan param description +- usagePlan param description -| Param | Description | -| -------- | :---- | -| usagePlanId | User-defined usage plan id | -| usagePlanName | User-defined usage plan name | -| usagePlanDesc | User-defined usage plan description | +| Param | Description | +| ------------- | :------------------------------------------------------------------------------------------------------------ | +| usagePlanId | User-defined usage plan id | +| usagePlanName | User-defined usage plan name | +| usagePlanDesc | User-defined usage plan description | | maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | +- auth param description -* auth param description - -| Param | Description | -| -------- | :---- | -| serviceTimeout | Service timeout | -| secretName | Secret name | -| secretIds | Secret Id (Array) | +| Param | Description | +| -------------- | :---------------- | +| serviceTimeout | Service timeout | +| secretName | Secret name | +| secretIds | Secret Id (Array) | From e593546ed36be4cb0a0d54239c6d73376df1b913 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Mon, 30 Dec 2019 14:00:21 +0800 Subject: [PATCH 50/93] fix scf version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3f3c666..3af9066 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.0.0", + "version": "2.0.1", "main": "./serverless.js", "publishConfig": { "access": "public" @@ -15,7 +15,7 @@ "dependencies": { "@serverless/core": "^1.0.0", "@serverless/tencent-apigateway": "^2.0.0", - "@serverless/tencent-scf": "^1.1.11c" + "@serverless/tencent-scf": "^2.0.2" }, "devDependencies": { "babel-eslint": "9.0.0", From 5b8bbc05ef3350362a156123880862eb58973ca0 Mon Sep 17 00:00:00 2001 From: Jiachen0417 <44248273+Jiachen0417@users.noreply.github.com> Date: Wed, 15 Jan 2020 22:12:45 -0500 Subject: [PATCH 51/93] Update README.md --- README.md | 97 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 7ee7c25..b9d720b 100755 --- a/README.md +++ b/README.md @@ -1,59 +1,49 @@ [![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.general.serverless.com/component_express_tencent/readme-express-tencent-serverless.png)](http://serverless.com) -Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration. +* [请点击这里查看英文版部署文档](./README_EN.md)   - -* [请点击这里查看中文版部署文档](./README_CN.md) +# 腾讯云Express组件 -  +## 简介 -1. [Install](#1-install) -2. [Create](#2-create) -3. [Configure](#3-configure) -4. [Deploy](#4-deploy) -5. [Remove](#5-remove) +Express 组件通过使用 serverless-tencent 的基础组件如API网关组件,SCF组件等,快速,方便的在腾讯云创建,配置和管理一个Express框架。 + -  +## 快速开始 -  +通过 Express 组件,对一个 Express应用进行完整的创建,配置,部署和删除等操作。支持命令如下: + +1. [安装](#1-安装) +2. [创建](#2-创建) +3. [配置](#3-配置) +4. [部署](#4-部署) +5. [移除](#5-移除) + +### 1. 安装 -### 1. Install +通过 npm 安装 serverless ```console $ npm install -g serverless ``` -### 2. Create +### 2. 创建 -Just create `serverless.yml` and `.env` files +本地创建 `serverless.yml` 文件: ```console -$ touch .env # your Tencent API Keys -$ touch app.js $ touch serverless.yml ``` -Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/cam/capi) with `AdministratorAccess` in the `.env` file, using this format: - +初始化一个新的 npm 包,并安装 Express: ``` -# .env -TENCENT_SECRET_ID=123 -TENCENT_SECRET_KEY=123 +npm init # 创建后持续回车 +npm i --save express # 安装express ``` -* If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. - -Initialize a new NPM package and install express: - -``` -npm init # then keep hitting enter -npm i --save express # install express -``` - -create your express app in `app.js`: - +创建一个 `app.js`文件,并在其中创建您的 Express App: ```js const express = require('express') const app = express() @@ -66,7 +56,9 @@ app.get('/', function(req, res) { module.exports = app ``` -### 3. Configure +### 3. 配置 + +在 serverless.yml 中进行如下配置 ```yml # serverless.yml @@ -75,11 +67,16 @@ express: component: '@serverless/tencent-express' inputs: region: ap-shanghai + ``` +* [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) -* [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) -### 4. Deploy +### 4. 部署 + +如您的账号未[登陆](https://cloud.tencent.com/login)或[注册](https://cloud.tencent.com/register)腾讯云,您可以直接通过`微信`扫描命令行中的二维码进行授权登陆和注册。 + +通过`sls`命令进行部署,并可以添加`--debug`参数查看部署过程中的信息 ``` $ sls --debug @@ -113,11 +110,13 @@ $ sls --debug url: http://service-n0vs2ohb-1300415943.ap-shanghai.apigateway.myqcloud.com/release/ 36s › express › done + ``` +部署完毕后,可以在浏览器中访问返回的链接,看到对应的express返回值。 -You can now visit the output URL in the browser, and you should see the express response. +### 5. 移除 -### 5. Remove +通过以下命令移除部署的存储桶 ``` $ sls remove --debug @@ -130,6 +129,26 @@ $ sls remove --debug 13s › express › done ``` -### New to Components? +### 账号配置(可选) + +当前默认支持CLI扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 `.env` 文件 + +```console +$ touch .env # 腾讯云的配置信息 +``` + +在 `.env` 文件中配置腾讯云的SecretId和SecretKey信息并保存 + +如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 + +如果已有腾讯云账号,可以在[API密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`. + +``` +# .env +TENCENT_SECRET_ID=123 +TENCENT_SECRET_KEY=123 +``` + +### 还支持哪些组件? -Checkout the [Serverless Components](https://github.com/serverless/components) repo for more information. +可以在 [Serverless Components](https://github.com/serverless/components) repo 中查询更多组件的信息。 From 41d8928af5dd6da3d48d8e610cdd8677b0b7faaf Mon Sep 17 00:00:00 2001 From: Jiachen0417 <44248273+Jiachen0417@users.noreply.github.com> Date: Wed, 15 Jan 2020 22:13:14 -0500 Subject: [PATCH 52/93] Update and rename README_CN.md to README_EN.md --- README_CN.md => README_EN.md | 97 +++++++++++++++--------------------- 1 file changed, 39 insertions(+), 58 deletions(-) rename README_CN.md => README_EN.md (55%) diff --git a/README_CN.md b/README_EN.md similarity index 55% rename from README_CN.md rename to README_EN.md index 3dfaa4a..5a1ec9e 100644 --- a/README_CN.md +++ b/README_EN.md @@ -1,47 +1,57 @@ [![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.general.serverless.com/component_express_tencent/readme-express-tencent-serverless.png)](http://serverless.com) -  - -# 腾讯云Express组件 - -## 简介 +Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration. -Express 组件通过使用 serverless-tencent 的基础组件如API网关组件,SCF组件等,快速,方便的在腾讯云创建,配置和管理一个Express框架。 - +  + -## 快速开始 +  -通过 Express 组件,对一个 Express应用进行完整的创建,配置,部署和删除等操作。支持命令如下: +1. [Install](#1-install) +2. [Create](#2-create) +3. [Configure](#3-configure) +4. [Deploy](#4-deploy) +5. [Remove](#5-remove) -1. [安装](#1-安装) -2. [创建](#2-创建) -3. [配置](#3-配置) -4. [部署](#4-部署) -5. [移除](#5-移除) +  -### 1. 安装 +  -通过 npm 安装 serverless +### 1. Install ```console $ npm install -g serverless ``` -### 2. 创建 +### 2. Create -本地创建 `serverless.yml` 文件: +Just create `serverless.yml` and `.env` files ```console +$ touch .env # your Tencent API Keys +$ touch app.js $ touch serverless.yml ``` -初始化一个新的 npm 包,并安装 Express: +Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/cam/capi) with `AdministratorAccess` in the `.env` file, using this format: + +``` +# .env +TENCENT_SECRET_ID=123 +TENCENT_SECRET_KEY=123 +``` + +* If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. + +Initialize a new NPM package and install express: + ``` -npm init # 创建后持续回车 -npm i --save express # 安装express +npm init # then keep hitting enter +npm i --save express # install express ``` -创建一个 `app.js`文件,并在其中创建您的 Express App: +create your express app in `app.js`: + ```js const express = require('express') const app = express() @@ -54,9 +64,7 @@ app.get('/', function(req, res) { module.exports = app ``` -### 3. 配置 - -在 serverless.yml 中进行如下配置 +### 3. Configure ```yml # serverless.yml @@ -65,16 +73,11 @@ express: component: '@serverless/tencent-express' inputs: region: ap-shanghai - ``` -* [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) - - -### 4. 部署 -如您的账号未[登陆](https://cloud.tencent.com/login)或[注册](https://cloud.tencent.com/register)腾讯云,您可以直接通过`微信`扫描命令行中的二维码进行授权登陆和注册。 +* [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) -通过`sls`命令进行部署,并可以添加`--debug`参数查看部署过程中的信息 +### 4. Deploy ``` $ sls --debug @@ -108,13 +111,11 @@ $ sls --debug url: http://service-n0vs2ohb-1300415943.ap-shanghai.apigateway.myqcloud.com/release/ 36s › express › done - ``` -部署完毕后,可以在浏览器中访问返回的链接,看到对应的express返回值。 -### 5. 移除 +You can now visit the output URL in the browser, and you should see the express response. -通过以下命令移除部署的存储桶 +### 5. Remove ``` $ sls remove --debug @@ -127,26 +128,6 @@ $ sls remove --debug 13s › express › done ``` -### 账号配置(可选) - -当前默认支持CLI扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 `.env` 文件 - -```console -$ touch .env # 腾讯云的配置信息 -``` - -在 `.env` 文件中配置腾讯云的SecretId和SecretKey信息并保存 - -如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 - -如果已有腾讯云账号,可以在[API密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`. - -``` -# .env -TENCENT_SECRET_ID=123 -TENCENT_SECRET_KEY=123 -``` - -### 还支持哪些组件? +### New to Components? -可以在 [Serverless Components](https://github.com/serverless/components) repo 中查询更多组件的信息。 +Checkout the [Serverless Components](https://github.com/serverless/components) repo for more information. From 6680079ffb4b03df441a87a7ce48c169c98d87c1 Mon Sep 17 00:00:00 2001 From: Jiachen0417 <44248273+Jiachen0417@users.noreply.github.com> Date: Wed, 15 Jan 2020 22:52:46 -0500 Subject: [PATCH 53/93] Update README_EN.md --- README_EN.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README_EN.md b/README_EN.md index 5a1ec9e..ac0b238 100644 --- a/README_EN.md +++ b/README_EN.md @@ -5,6 +5,11 @@ Easily deploy Express.js applications to Tencent Cloud's serverless infrastructu   +  + +- [请点击这里查看中文版部署文档](./README.md) + +   1. [Install](#1-install) From cbf83abcf017b4b485bfe5a79b8cb86a67ed579e Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 14 Jan 2020 19:35:01 +0800 Subject: [PATCH 54/93] fix: set-cookie header bug for tencent apigateway Close #6 --- shims/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/shims/index.js b/shims/index.js index 5dd649d..42c263a 100644 --- a/shims/index.js +++ b/shims/index.js @@ -66,12 +66,8 @@ function forwardResponseToApiGateway(server, response, resolve) { // eslint-disable-next-line Object.keys(headers).forEach((h) => { if (Array.isArray(headers[h])) { - if (h.toLowerCase() === 'set-cookie') { - headers[h].forEach((value, i) => { - headers[binarycase(h, i + 1)] = value - }) - delete headers[h] - } else { + // remove for for tecnent api gateway + if (h.toLowerCase() !== 'set-cookie') { headers[h] = headers[h].join(',') } } From b8aaede2e257dbec451e99f4127f9c60d46cbe71 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 14 Jan 2020 20:38:10 +0800 Subject: [PATCH 55/93] fix: wrong words --- shims/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shims/index.js b/shims/index.js index 42c263a..c911a09 100644 --- a/shims/index.js +++ b/shims/index.js @@ -66,7 +66,7 @@ function forwardResponseToApiGateway(server, response, resolve) { // eslint-disable-next-line Object.keys(headers).forEach((h) => { if (Array.isArray(headers[h])) { - // remove for for tecnent api gateway + // remove for for tencent api gateway if (h.toLowerCase() !== 'set-cookie') { headers[h] = headers[h].join(',') } From e26dbe6884a7514759f2733cf94c8a3981870a5f Mon Sep 17 00:00:00 2001 From: yugasun Date: Wed, 15 Jan 2020 14:26:30 +0800 Subject: [PATCH 56/93] feat: use tencent-serverless-nodejs for http proxy --- lambda-handler.js | 7 + lib/resolve-cached-handler-path/generate.js | 25 + lib/resolve-cached-handler-path/index.js | 11 + .../resolve-path.js | 11 + package.json | 8 +- serverless.js | 64 +- shims/binary-case.js | 122 - shims/index.js | 207 - shims/media-typer.js | 141 - shims/middleware.js | 24 - shims/mime-db.json | 7990 ----------------- shims/mime-types.js | 188 - shims/type-is.js | 261 - 13 files changed, 86 insertions(+), 8973 deletions(-) create mode 100644 lambda-handler.js create mode 100644 lib/resolve-cached-handler-path/generate.js create mode 100644 lib/resolve-cached-handler-path/index.js create mode 100644 lib/resolve-cached-handler-path/resolve-path.js delete mode 100644 shims/binary-case.js delete mode 100644 shims/index.js delete mode 100644 shims/media-typer.js delete mode 100644 shims/middleware.js delete mode 100644 shims/mime-db.json delete mode 100644 shims/mime-types.js delete mode 100644 shims/type-is.js diff --git a/lambda-handler.js b/lambda-handler.js new file mode 100644 index 0000000..e30d094 --- /dev/null +++ b/lambda-handler.js @@ -0,0 +1,7 @@ +const { createServer, proxy } = require('tencent-serverless-nodejs') + +module.exports.handler = (event, context) => { + const app = require.fromParentEnvironment('./app') + const server = createServer(app) + return proxy(server, event, context, 'PROMISE').promise +} diff --git a/lib/resolve-cached-handler-path/generate.js b/lib/resolve-cached-handler-path/generate.js new file mode 100644 index 0000000..9ab1973 --- /dev/null +++ b/lib/resolve-cached-handler-path/generate.js @@ -0,0 +1,25 @@ +const path = require('path') +const fse = require('fs-extra') +const webmake = require('webmake') +const Terser = require('terser') +const resolvePath = require('./resolve-path') + +const handlerModulePath = path.join(__dirname, '../../lambda-handler.js') + +module.exports = async ({ lambdaHandlerMode }) => { + const cachedHandlerPath = resolvePath({ lambdaHandlerMode }) + let bundleCode = await new Promise((resolve, reject) => + webmake(handlerModulePath, { ignoreErrors: true, cjs: true }, (error, code) => { + error ? reject(error) : resolve(code) + }) + ) + if (lambdaHandlerMode !== 'dev') { + const minifyResult = Terser.minify(bundleCode) + if (minifyResult.error) { + throw minifyResult.error + } + bundleCode = minifyResult.code + } + await fse.ensureDir(path.dirname(cachedHandlerPath)) + return fse.writeFile(cachedHandlerPath, bundleCode) +} diff --git a/lib/resolve-cached-handler-path/index.js b/lib/resolve-cached-handler-path/index.js new file mode 100644 index 0000000..2ae840e --- /dev/null +++ b/lib/resolve-cached-handler-path/index.js @@ -0,0 +1,11 @@ +const fse = require('fs-extra') +const generateHandler = require('./generate') +const resolvePath = require('./resolve-path') + +module.exports = async (inputs) => { + const cachedHandlerPath = resolvePath(inputs) + if (!(await fse.pathExists(cachedHandlerPath))) { + await generateHandler(inputs) + } + return cachedHandlerPath +} diff --git a/lib/resolve-cached-handler-path/resolve-path.js b/lib/resolve-cached-handler-path/resolve-path.js new file mode 100644 index 0000000..2df47c4 --- /dev/null +++ b/lib/resolve-cached-handler-path/resolve-path.js @@ -0,0 +1,11 @@ +const os = require('os') +const path = require('path') +const { version } = require('../../package') + +module.exports = ({ lambdaHandlerMode }) => + path.join( + os.homedir(), + '.serverless/cache/tencent-express', + version, + `serverless-handler${lambdaHandlerMode === 'dev' ? '-dev' : ''}.js` + ) diff --git a/package.json b/package.json index 3af9066..3f8e0ae 100755 --- a/package.json +++ b/package.json @@ -15,7 +15,13 @@ "dependencies": { "@serverless/core": "^1.0.0", "@serverless/tencent-apigateway": "^2.0.0", - "@serverless/tencent-scf": "^2.0.2" + "@serverless/tencent-scf": "^2.0.2", + "ext": "^1.4.0", + "fs-extra": "^8.1.0", + "tencent-serverless-nodejs": "^1.0.1", + "terser": "^4.6.3", + "type": "^2.0.0", + "webmake": "^1.1.0" }, "devDependencies": { "babel-eslint": "9.0.0", diff --git a/serverless.js b/serverless.js index 8b8cc94..73b5312 100755 --- a/serverless.js +++ b/serverless.js @@ -1,5 +1,10 @@ const path = require('path') const { Component, utils } = require('@serverless/core') +const random = require('ext/string/random') +const ensureString = require('type/string/ensure') +const ensureIterable = require('type/iterable/ensure') +const ensurePlainObject = require('type/plain-object/ensure') +const resolveCachedHandlerPath = require('./lib/resolve-cached-handler-path') class TencentExpress extends Component { getDefaultProtocol(protocols) { @@ -10,42 +15,29 @@ class TencentExpress extends Component { } async default(inputs = {}) { - // there are some dependencies that require the express him to work - // I've included them all here. A better approach would be to use - // browserify to build all of these files into one. - // but browserify throws an error because the required app.js is not found - // which the user will be adding later on after the build + inputs.name = + ensureString(inputs.functionName, { isOptional: true }) || + this.state.functionName || + `ExpressComponent_${random({ length: 6 })}` - const len = 6 - const chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678' - const maxPos = chars.length - let result = '' - for (let i = 0; i < len; i++) { - result += chars.charAt(Math.floor(Math.random() * maxPos)) - } - - const shimsDir = path.join(__dirname, 'shims') - inputs.include = [ - path.join(shimsDir, 'binary-case.js'), - path.join(shimsDir, 'index.js'), - path.join(shimsDir, 'media-typer.js'), - path.join(shimsDir, 'middleware.js'), - path.join(shimsDir, 'mime-db.json'), - path.join(shimsDir, 'mime-types.js'), - path.join(shimsDir, 'type-is.js') - ] - inputs.exclude = ['.git/**', '.gitignore', '.serverless', '.DS_Store'] - inputs.handler = 'index.handler' - inputs.runtime = 'Nodejs8.9' - inputs.name = inputs.functionName || 'ExpressComponent_' + result - inputs.codeUri = inputs.code || process.cwd() - - const appFile = path.join(path.resolve(inputs.codeUri), 'app.js') + inputs.codeUri = ensureString(inputs.code, { isOptional: true }) || process.cwd() + inputs.region = ensureString(inputs.region, { default: 'ap-guangzhou' }) + inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) + inputs.exclude = ensureIterable(inputs.exclude, { default: [], ensureItem: ensureString }) + const apigatewayConf = ensurePlainObject(inputs.apigatewayConf, { default: {} }) + const appFile = path.resolve(inputs.codeUri, 'app.js') if (!(await utils.fileExists(appFile))) { throw new Error(`app.js not found in ${inputs.codeUri}`) } + const cachedHandlerPath = await resolveCachedHandlerPath(inputs) + inputs.include.push(cachedHandlerPath) + inputs.exclude = ['.git/**', '.gitignore', '.serverless', '.DS_Store'] + + inputs.handler = `${path.basename(cachedHandlerPath, '.js')}.handler` + inputs.runtime = 'Nodejs8.9' + const tencentCloudFunction = await this.load('@serverless/tencent-scf') const tencentApiGateway = await this.load('@serverless/tencent-apigateway') @@ -66,14 +58,8 @@ class TencentExpress extends Component { description: 'Serverless Framework tencent-express Component', serviceId: inputs.serviceId, region: inputs.region, - protocols: - inputs.apigatewayConf && inputs.apigatewayConf.protocols - ? inputs.apigatewayConf.protocols - : ['http'], - environment: - inputs.apigatewayConf && inputs.apigatewayConf.environment - ? inputs.apigatewayConf.environment - : 'release', + protocols: apigatewayConf.protocols || ['http'], + environment: apigatewayConf.environment || 'release', endpoints: [ { path: '/', @@ -94,7 +80,7 @@ class TencentExpress extends Component { const tencentApiGatewayOutputs = await tencentApiGateway(apigwParam) const outputs = { - region: inputs.region || 'ap-guangzhou', + region: inputs.region, functionName: inputs.name, apiGatewayServiceId: tencentApiGatewayOutputs.serviceId, url: `${this.getDefaultProtocol(tencentApiGatewayOutputs.protocols)}://${ diff --git a/shims/binary-case.js b/shims/binary-case.js deleted file mode 100644 index 726aee1..0000000 --- a/shims/binary-case.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @license - * Copyright 2018 Brigham Young University - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -/** - * A performance improved method for acquiring the binary case, provided by Blake Embrey with very minor modification by James Speirs. - * @author Blake Embrey | https://github.com/blakeembrey - * @author James Speirs | https://github.com/gi60s - * @param {string} str - * @param {number} val - * @returns {string} - */ -function getBinaryCase(str, val) { - let res = '' - - for (let i = 0; i < str.length; i++) { - const code = str.charCodeAt(i) - - if (code >= 65 && code <= 90) { - res += val & 1 ? String.fromCharCode(code + 32) : String.fromCharCode(code) - val >>>= 1 - } else if (code >= 97 && code <= 122) { - res += val & 1 ? String.fromCharCode(code - 32) : String.fromCharCode(code) - val >>>= 1 - } else { - res += String.fromCharCode(code) - } - - if (val === 0) { - return res + str.substr(i + 1) - } - } - - return res -} - -/** - * Toggle the case of a string based on the number value passed in. - * @param {string} string - * @param {number} number - * @param {object} [options={allowOverflow: true}] - * @returns {string|boolean} - */ - -function binaryCase(string, number, options) { - if (!options || typeof options !== 'object') { - options = {} - } - if (!options.hasOwnProperty('allowOverflow')) { - options.allowOverflow = true - } - - if (number > binaryCase.maxNumber(string) && !options.allowOverflow) { - return false - } - - return getBinaryCase(string, number) -} - -binaryCase.iterator = function(string, options) { - const max = binaryCase.maxNumber(string) - - if (!options || typeof options !== 'object') { - options = {} - } - if (!options.hasOwnProperty('startIndex')) { - options.startIndex = 0 - } - if ( - typeof options.startIndex !== 'number' || - !Number.isInteger(options.startIndex) || - options.startIndex < 0 - ) { - throw Error('Option startIndex must be a non-negative integer.') - } - - let index = options.startIndex - return { - next: function() { - return index > max ? { done: true } : { done: false, value: getBinaryCase(string, index++) } - } - } -} - -/** - * Get the maximum number that can be used before causing overflow. - * @param {string} string - * @returns {number} - */ -binaryCase.maxNumber = function(string) { - const pow = string.match(/[a-z]/gi).length - return Math.pow(2, pow) - 1 -} - -/** - * Get an array of all possible variations. - * @param {string} string - * @returns {string[]} - */ -binaryCase.variations = function(string) { - const results = [] - const max = binaryCase.maxNumber(string) - for (let i = 0; i <= max; i++) { - results.push(binaryCase(string, i)) - } - return results -} - -module.exports = binaryCase diff --git a/shims/index.js b/shims/index.js deleted file mode 100644 index c911a09..0000000 --- a/shims/index.js +++ /dev/null @@ -1,207 +0,0 @@ -const http = require('http') -const url = require('url') -const binarycase = require('./binary-case') -const isType = require('./type-is') - -function getPathWithQueryStringParams(event) { - return url.format({ pathname: event.path, query: event.queryStringParameters }) -} -function getEventBody(event) { - return Buffer.from(event.body, event.isBase64Encoded ? 'base64' : 'utf8') -} - -function clone(json) { - return JSON.parse(JSON.stringify(json)) -} - -function getContentType(params) { - // only compare mime type; ignore encoding part - return params.contentTypeHeader ? params.contentTypeHeader.split(';')[0] : '' -} - -function isContentTypeBinaryMimeType(params) { - return ( - params.binaryMimeTypes.length > 0 && !!isType.is(params.contentType, params.binaryMimeTypes) - ) -} - -function mapApiGatewayEventToHttpRequest(event, context, socketPath) { - const headers = Object.assign({}, event.headers) - - // NOTE: API Gateway is not setting Content-Length header on requests even when they have a body - if (event.body && !headers['Content-Length']) { - const body = getEventBody(event) - headers['Content-Length'] = Buffer.byteLength(body) - } - - const clonedEventWithoutBody = clone(event) - delete clonedEventWithoutBody.body - - headers['x-apigateway-event'] = encodeURIComponent(JSON.stringify(clonedEventWithoutBody)) - headers['x-apigateway-context'] = encodeURIComponent(JSON.stringify(context)) - - return { - method: event.httpMethod, - path: getPathWithQueryStringParams(event), - headers, - socketPath - } -} - -function forwardResponseToApiGateway(server, response, resolve) { - const buf = [] - - response - .on('data', (chunk) => buf.push(chunk)) - .on('end', () => { - const bodyBuffer = Buffer.concat(buf) - const { statusCode, headers } = response - - // chunked transfer not currently supported by API Gateway - /* istanbul ignore else */ - if (headers['transfer-encoding'] === 'chunked') { - delete headers['transfer-encoding'] - } - - // eslint-disable-next-line - Object.keys(headers).forEach((h) => { - if (Array.isArray(headers[h])) { - // remove for for tencent api gateway - if (h.toLowerCase() !== 'set-cookie') { - headers[h] = headers[h].join(',') - } - } - }) - - const contentType = getContentType({ contentTypeHeader: headers['content-type'] }) - const isBase64Encoded = isContentTypeBinaryMimeType({ - contentType, - binaryMimeTypes: server._binaryTypes - }) - const body = bodyBuffer.toString(isBase64Encoded ? 'base64' : 'utf8') - const successResponse = { statusCode, body, headers, isBase64Encoded } - - resolve(successResponse) - }) -} - -function forwardConnectionErrorResponseToApiGateway(error, resolve) { - console.log('ERROR: tencent-serverless-express connection error') // eslint-disable-line - console.error(error) // eslint-disable-line - const errorResponse = { - statusCode: 502, // "DNS resolution, TCP level errors, or actual HTTP parse errors" - https://nodejs.org/api/http.html#http_http_request_options_callback - body: '', - headers: {} - } - - resolve(errorResponse) -} - -function forwardLibraryErrorResponseToApiGateway(error, resolve) { - console.log('ERROR: tencent-serverless-express error') // eslint-disable-line - console.error(error) // eslint-disable-line - const errorResponse = { - statusCode: 500, - body: '', - headers: {} - } - - resolve(errorResponse) -} - -function getSocketPath(socketPathSuffix) { - if (/^win/.test(process.platform)) { - const path = require('path') - return path.join('\\\\?\\pipe', process.cwd(), `server-${socketPathSuffix}`) - } - return `/tmp/server-${socketPathSuffix}.sock` -} - -function forwardRequestToNodeServer(server, event, context, resolve) { - try { - const requestOptions = mapApiGatewayEventToHttpRequest( - event, - context, - getSocketPath(server._socketPathSuffix) - ) - const req = http.request(requestOptions, (response) => - forwardResponseToApiGateway(server, response, resolve) - ) - if (event.body) { - const body = getEventBody(event) - - req.write(body) - } - - req.on('error', (error) => forwardConnectionErrorResponseToApiGateway(error, resolve)).end() - } catch (error) { - forwardLibraryErrorResponseToApiGateway(error, resolve) - return server - } -} - -function startServer(server) { - return server.listen(getSocketPath(server._socketPathSuffix)) -} - -function getRandomString() { - return Math.random() - .toString(36) - .substring(2, 15) -} - -function createServer(requestListener, serverListenCallback, binaryTypes) { - const server = http.createServer(requestListener) - - server._socketPathSuffix = getRandomString() - server._binaryTypes = binaryTypes ? binaryTypes.slice() : [] - server.on('listening', () => { - server._isListening = true - - if (serverListenCallback) { - serverListenCallback() - } - }) - server - .on('close', () => { - server._isListening = false - }) - .on('error', (error) => { - if (error.code === 'EADDRINUSE') { - // eslint-disable-next-line - console.warn( - `WARNING: Attempting to listen on socket ${getSocketPath( - server._socketPathSuffix - )}, but it is already in use.` - ) - server._socketPathSuffix = getRandomString() - return server.close(() => startServer(server)) - } - // eslint-disable-next-line - console.log('ERROR: server error') - // eslint-disable-next-line - console.error(error) - }) - - return server -} - -function proxy(server, event, context) { - return new Promise((resolve) => { - if (server._isListening) { - forwardRequestToNodeServer(server, event, context, resolve) - } else { - startServer(server).on('listening', () => - forwardRequestToNodeServer(server, event, context, resolve) - ) - } - }) -} - -function handler(event, context) { - const app = require('./app') - const server = createServer(app) - return proxy(server, event, context) -} - -exports.handler = handler diff --git a/shims/media-typer.js b/shims/media-typer.js deleted file mode 100644 index 8a0390c..0000000 --- a/shims/media-typer.js +++ /dev/null @@ -1,141 +0,0 @@ -/* ! - * media-typer - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * RegExp to match type in RFC 6838 - * - * type-name = restricted-name - * subtype-name = restricted-name - * restricted-name = restricted-name-first *126restricted-name-chars - * restricted-name-first = ALPHA / DIGIT - * restricted-name-chars = ALPHA / DIGIT / "!" / "#" / - * "$" / "&" / "-" / "^" / "_" - * restricted-name-chars =/ "." ; Characters before first dot always - * ; specify a facet name - * restricted-name-chars =/ "+" ; Characters after last plus always - * ; specify a structured syntax suffix - * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z - * DIGIT = %x30-39 ; 0-9 - */ -var SUBTYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/ -var TYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/ -var TYPE_REGEXP = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/ - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @public - */ - -function format(obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var subtype = obj.subtype - var suffix = obj.suffix - var type = obj.type - - if (!type || !TYPE_NAME_REGEXP.test(type)) { - throw new TypeError('invalid type') - } - - if (!subtype || !SUBTYPE_NAME_REGEXP.test(subtype)) { - throw new TypeError('invalid subtype') - } - - // format as type/subtype - var string = type + '/' + subtype - - // append +suffix - if (suffix) { - if (!TYPE_NAME_REGEXP.test(suffix)) { - throw new TypeError('invalid suffix') - } - - string += '+' + suffix - } - - return string -} - -/** - * Test media type. - * - * @param {string} string - * @return {object} - * @public - */ - -function test(string) { - if (!string) { - throw new TypeError('argument string is required') - } - - if (typeof string !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - return TYPE_REGEXP.test(string.toLowerCase()) -} - -/** - * Parse media type to object. - * - * @param {string} string - * @return {object} - * @public - */ - -function parse(string) { - if (!string) { - throw new TypeError('argument string is required') - } - - if (typeof string !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var match = TYPE_REGEXP.exec(string.toLowerCase()) - - if (!match) { - throw new TypeError('invalid media type') - } - - var type = match[1] - var subtype = match[2] - var suffix - - // suffix after last + - var index = subtype.lastIndexOf('+') - if (index !== -1) { - suffix = subtype.substr(index + 1) - subtype = subtype.substr(0, index) - } - - return new MediaType(type, subtype, suffix) -} - -/** - * Class for MediaType object. - * @public - */ - -function MediaType(type, subtype, suffix) { - this.type = type - this.subtype = subtype - this.suffix = suffix -} - -/** - * Module exports. - */ - -exports.format = format -exports.parse = parse -exports.test = test diff --git a/shims/middleware.js b/shims/middleware.js deleted file mode 100644 index 2a6ce31..0000000 --- a/shims/middleware.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.eventContext = (options) => - function apiGatewayEventParser(req, res, next) { - options = options || {} // defaults: {reqPropKey: 'apiGateway', deleteHeaders: true} - const reqPropKey = options.reqPropKey || 'apiGateway' - const deleteHeaders = options.deleteHeaders === undefined ? true : options.deleteHeaders - - if (!req.headers['x-apigateway-event'] || !req.headers['x-apigateway-context']) { - console.error('Missing x-apigateway-event or x-apigateway-context header(s)') - next() - return - } - - req[reqPropKey] = { - event: JSON.parse(decodeURIComponent(req.headers['x-apigateway-event'])), - context: JSON.parse(decodeURIComponent(req.headers['x-apigateway-context'])) - } - - if (deleteHeaders) { - delete req.headers['x-apigateway-event'] - delete req.headers['x-apigateway-context'] - } - - next() - } diff --git a/shims/mime-db.json b/shims/mime-db.json deleted file mode 100644 index edfeed2..0000000 --- a/shims/mime-db.json +++ /dev/null @@ -1,7990 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana", - "compressible": true - }, - "application/3gpp-ims+xml": { - "source": "iana", - "compressible": true - }, - "application/a2l": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/activity+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana", - "compressible": true - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomsvc"] - }, - "application/atsc-dwd+xml": { - "source": "iana", - "compressible": true - }, - "application/atsc-held+xml": { - "source": "iana", - "compressible": true - }, - "application/atsc-rsat+xml": { - "source": "iana", - "compressible": true - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana", - "compressible": true - }, - "application/bacnet-xdd+zip": { - "source": "iana", - "compressible": false - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/beep+xml": { - "source": "iana", - "compressible": true - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana", - "compressible": true - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/cbor": { - "source": "iana" - }, - "application/cccex": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana", - "compressible": true - }, - "application/ccxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ccxml"] - }, - "application/cdfx+xml": { - "source": "iana", - "compressible": true - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cdni": { - "source": "iana" - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana", - "compressible": true - }, - "application/cellml+xml": { - "source": "iana", - "compressible": true - }, - "application/cfw": { - "source": "iana" - }, - "application/clue_info+xml": { - "source": "iana", - "compressible": true - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana", - "compressible": true - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/coap-payload": { - "source": "iana" - }, - "application/commonground": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/cose": { - "source": "iana" - }, - "application/cose-key": { - "source": "iana" - }, - "application/cose-key-set": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana", - "compressible": true - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana", - "compressible": true - }, - "application/cstadata+xml": { - "source": "iana", - "compressible": true - }, - "application/csvm+json": { - "source": "iana", - "compressible": true - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cwt": { - "source": "iana" - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpd"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "compressible": true, - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana", - "compressible": true - }, - "application/dicom": { - "source": "iana" - }, - "application/dicom+json": { - "source": "iana", - "compressible": true - }, - "application/dicom+xml": { - "source": "iana", - "compressible": true - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/dns+json": { - "source": "iana", - "compressible": true - }, - "application/dns-message": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dbk"] - }, - "application/dskpp+xml": { - "source": "iana", - "compressible": true - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/ecmascript": { - "source": "iana", - "compressible": true, - "extensions": ["ecma", "es"] - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/efi": { - "source": "iana" - }, - "application/emergencycalldata.comment+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.control+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.deviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.ecall.msd": { - "source": "iana" - }, - "application/emergencycalldata.providerinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.serviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.subscriberinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.veds+xml": { - "source": "iana", - "compressible": true - }, - "application/emma+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana", - "compressible": true - }, - "application/encaprtp": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana", - "compressible": true - }, - "application/epub+zip": { - "source": "iana", - "compressible": false, - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/expect-ct-report+json": { - "source": "iana", - "compressible": true - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdt+xml": { - "source": "iana", - "compressible": true - }, - "application/fhir+json": { - "source": "iana", - "compressible": true - }, - "application/fhir+xml": { - "source": "iana", - "compressible": true - }, - "application/fido.trusted-apps+json": { - "compressible": true - }, - "application/fits": { - "source": "iana" - }, - "application/flexfec": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false - }, - "application/framework-attributes+xml": { - "source": "iana", - "compressible": true - }, - "application/geo+json": { - "source": "iana", - "compressible": true, - "extensions": ["geojson"] - }, - "application/geo+json-seq": { - "source": "iana" - }, - "application/geopackage+sqlite3": { - "source": "iana" - }, - "application/geoxacml+xml": { - "source": "iana", - "compressible": true - }, - "application/gltf-buffer": { - "source": "iana" - }, - "application/gml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["gml"] - }, - "application/gpx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["gpx"] - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false, - "extensions": ["gz"] - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana", - "compressible": true - }, - "application/hjson": { - "extensions": ["hjson"] - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pkg-reply+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana", - "compressible": true - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ink", "inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana", - "compressible": true - }, - "application/java-archive": { - "source": "apache", - "compressible": false, - "extensions": ["jar", "war", "ear"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js", "mjs"] - }, - "application/jf2feed+json": { - "source": "iana", - "compressible": true - }, - "application/jose": { - "source": "iana" - }, - "application/jose+json": { - "source": "iana", - "compressible": true - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json", "map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json-seq": { - "source": "iana" - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/jwk+json": { - "source": "iana", - "compressible": true - }, - "application/jwk-set+json": { - "source": "iana", - "compressible": true - }, - "application/jwt": { - "source": "iana" - }, - "application/kpml-request+xml": { - "source": "iana", - "compressible": true - }, - "application/kpml-response+xml": { - "source": "iana", - "compressible": true - }, - "application/ld+json": { - "source": "iana", - "compressible": true, - "extensions": ["jsonld"] - }, - "application/lgr+xml": { - "source": "iana", - "compressible": true - }, - "application/link-format": { - "source": "iana" - }, - "application/load-control+xml": { - "source": "iana", - "compressible": true - }, - "application/lost+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana", - "compressible": true - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mads"] - }, - "application/manifest+json": { - "charset": "UTF-8", - "compressible": true, - "extensions": ["webmanifest"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma", "nb", "mb"] - }, - "application/mathml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana", - "compressible": true - }, - "application/mathml-presentation+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-deregister+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-envelope+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-protection-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-reception-report+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-schedule+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-user-service-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana", - "compressible": true - }, - "application/media_control+xml": { - "source": "iana", - "compressible": true - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "compressible": true, - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "compressible": true, - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mipc": { - "source": "iana" - }, - "application/mmt-aei+xml": { - "source": "iana", - "compressible": true - }, - "application/mmt-usd+xml": { - "source": "iana", - "compressible": true - }, - "application/mods+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21", "mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4s", "m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana", - "compressible": true - }, - "application/mrb-publish+xml": { - "source": "iana", - "compressible": true - }, - "application/msc-ivr+xml": { - "source": "iana", - "compressible": true - }, - "application/msc-mixer+xml": { - "source": "iana", - "compressible": true - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc", "dot"] - }, - "application/mud+json": { - "source": "iana", - "compressible": true - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/n-quads": { - "source": "iana", - "extensions": ["nq"] - }, - "application/n-triples": { - "source": "iana", - "extensions": ["nt"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana" - }, - "application/news-groupinfo": { - "source": "iana" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana", - "compressible": true - }, - "application/node": { - "source": "iana" - }, - "application/nss": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": false, - "extensions": [ - "bin", - "dms", - "lrf", - "mar", - "so", - "dist", - "distz", - "pkg", - "bpk", - "dump", - "elc", - "deploy", - "exe", - "dll", - "deb", - "dmg", - "iso", - "img", - "msi", - "msp", - "msm", - "buffer" - ] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odm+xml": { - "source": "iana", - "compressible": true - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/omdoc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc", "onetoc2", "onetmp", "onepkg"] - }, - "application/oscore": { - "source": "iana" - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p2p-overlay+xml": { - "source": "iana", - "compressible": true - }, - "application/parityfec": { - "source": "iana" - }, - "application/passport": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pem-certificate-chain": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana" - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["asc", "sig"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana", - "compressible": true - }, - "application/pidf-diff+xml": { - "source": "iana", - "compressible": true - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs12": { - "source": "iana" - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m", "p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkcs8-encrypted": { - "source": "iana" - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana", - "compressible": true - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai", "eps", "ps"] - }, - "application/ppsp-tracker+json": { - "source": "iana", - "compressible": true - }, - "application/problem+json": { - "source": "iana", - "compressible": true - }, - "application/problem+xml": { - "source": "iana", - "compressible": true - }, - "application/provenance+xml": { - "source": "iana", - "compressible": true - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.hpub+zip": { - "source": "iana", - "compressible": false - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana", - "compressible": true - }, - "application/pskc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pskcxml"] - }, - "application/qsig": { - "source": "iana" - }, - "application/raml+yaml": { - "compressible": true, - "extensions": ["raml"] - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdap+json": { - "source": "iana", - "compressible": true - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf", "owl"] - }, - "application/reginfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "iana" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resource-lists+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rld"] - }, - "application/rfc+xml": { - "source": "iana", - "compressible": true - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana", - "compressible": true - }, - "application/rls-services+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rs"] - }, - "application/route-apd+xml": { - "source": "iana", - "compressible": true - }, - "application/route-s-tsid+xml": { - "source": "iana", - "compressible": true - }, - "application/route-usd+xml": { - "source": "iana", - "compressible": true - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-publication": { - "source": "iana" - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana", - "compressible": true - }, - "application/samlmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/sbml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana", - "compressible": true - }, - "application/scim+json": { - "source": "iana", - "compressible": true - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/secevent+jwt": { - "source": "iana" - }, - "application/senml+cbor": { - "source": "iana" - }, - "application/senml+json": { - "source": "iana", - "compressible": true - }, - "application/senml+xml": { - "source": "iana", - "compressible": true - }, - "application/senml-exi": { - "source": "iana" - }, - "application/sensml+cbor": { - "source": "iana" - }, - "application/sensml+json": { - "source": "iana", - "compressible": true - }, - "application/sensml+xml": { - "source": "iana", - "compressible": true - }, - "application/sensml-exi": { - "source": "iana" - }, - "application/sep+xml": { - "source": "iana", - "compressible": true - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana", - "extensions": ["siv", "sieve"] - }, - "application/simple-filter+xml": { - "source": "iana", - "compressible": true - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/sipc": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "iana" - }, - "application/smil+xml": { - "source": "iana", - "compressible": true, - "extensions": ["smi", "smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "compressible": true, - "extensions": ["srx"] - }, - "application/spirits-event+xml": { - "source": "iana", - "compressible": true - }, - "application/sql": { - "source": "iana" - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ssdl"] - }, - "application/ssml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ssml"] - }, - "application/stix+json": { - "source": "iana", - "compressible": true - }, - "application/swid+xml": { - "source": "iana", - "compressible": true - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/taxii+json": { - "source": "iana", - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tei", "teicorpus"] - }, - "application/tetra_isi": { - "source": "iana" - }, - "application/thraud+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/tlsrpt+gzip": { - "source": "iana" - }, - "application/tlsrpt+json": { - "source": "iana", - "compressible": true - }, - "application/tnauthlist": { - "source": "iana" - }, - "application/toml": { - "compressible": true, - "extensions": ["toml"] - }, - "application/trickle-ice-sdpfrag": { - "source": "iana" - }, - "application/trig": { - "source": "iana" - }, - "application/ttml+xml": { - "source": "iana", - "compressible": true - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/tzif": { - "source": "iana" - }, - "application/tzif-leap": { - "source": "iana" - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/urc-ressheet+xml": { - "source": "iana", - "compressible": true - }, - "application/urc-targetdesc+xml": { - "source": "iana", - "compressible": true - }, - "application/urc-uisocketdesc+xml": { - "source": "iana", - "compressible": true - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana", - "compressible": true - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.1000minds.decision-model+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc3ch+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-v2x-local-service-information": { - "source": "iana" - }, - "application/vnd.3gpp.access-transfer-events+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gmop+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mc-signalling-ear": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-payload": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-signalling": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-floor-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-signed+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-init-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-transmission-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mid-call+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp.sms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-ext+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.state-and-event-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ussd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3lightssoftware.imagescal": { - "source": "iana" - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc", "acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "compressible": false, - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp", "fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata": { - "source": "iana" - }, - "application/vnd.afpc.modca": { - "source": "iana" - }, - "application/vnd.ah-barcode": { - "source": "iana" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amadeus+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.amazon.mobi8-ebook": { - "source": "iana" - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.android.ota": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anki": { - "source": "iana" - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apothekende.reservation+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpkg"] - }, - "application/vnd.apple.keynote": { - "source": "iana", - "extensions": ["keynote"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.apple.numbers": { - "source": "iana", - "extensions": ["numbers"] - }, - "application/vnd.apple.pages": { - "source": "iana", - "extensions": ["pages"] - }, - "application/vnd.apple.pkpass": { - "compressible": false, - "extensions": ["pkpass"] - }, - "application/vnd.arastra.swi": { - "source": "iana" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artisan+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avalon+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.avistar+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.balsamiq.bmpr": { - "source": "iana" - }, - "application/vnd.banana-accounting": { - "source": "iana" - }, - "application/vnd.bbf.usp.error": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bint.med-content": { - "source": "iana" - }, - "application/vnd.biopax.rdf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.blink-idb-value-wrapper": { - "source": "iana" - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.bpf": { - "source": "iana" - }, - "application/vnd.bpf3": { - "source": "iana" - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.byu.uapi+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.capasystems-pg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdxml"] - }, - "application/vnd.chess-pgn": { - "source": "iana" - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.ciedi": { - "source": "iana" - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.citationstyles.style+xml": { - "source": "iana", - "compressible": true, - "extensions": ["csl"] - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g", "c4d", "c4f", "c4p", "c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet-template": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.comicbook+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.comicbook-rar": { - "source": "iana" - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.coreos.ignition+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wbs"] - }, - "application/vnd.cryptii.pipe+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.crypto-shade-file": { - "source": "iana" - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.d2l.coursepackage1p0+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.datapackage+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dataresource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf", "uvvf", "uvd", "uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uvt", "uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx", "uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz", "uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume.movie": { - "source": "iana" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.drive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecip.rlp": { - "source": "iana" - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.efi.img": { - "source": "iana" - }, - "application/vnd.efi.iso": { - "source": "iana" - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.espass-espass+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "compressible": true, - "extensions": ["es3", "et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.cug+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.sci+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.evolv.ecig.profile": { - "source": "iana" - }, - "application/vnd.evolv.ecig.settings": { - "source": "iana" - }, - "application/vnd.evolv.ecig.theme": { - "source": "iana" - }, - "application/vnd.exstream-empower+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.exstream-package": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.fastcopy-disk-image": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed", "dataless"] - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.ficlab.flb+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.filmit.zfc": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.firemonkeys.cloudcell": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm", "frame", "maker", "book"] - }, - "application/vnd.frogans.fnc": { - "source": "iana", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "iana", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.futoin+cbor": { - "source": "iana" - }, - "application/vnd.futoin+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.geo+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex", "gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.gerber": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.google-apps.document": { - "compressible": false, - "extensions": ["gdoc"] - }, - "application/vnd.google-apps.presentation": { - "compressible": false, - "extensions": ["gslides"] - }, - "application/vnd.google-apps.spreadsheet": { - "compressible": false, - "extensions": ["gsheet"] - }, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.gov.sk.xmldatacontainer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf", "gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "compressible": true, - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.hdt": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana", - "extensions": ["sfd-hdstx"] - }, - "application/vnd.hyper+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyper-item+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyperdrive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "iana" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "iana", - "extensions": ["afp", "listafp", "list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc", "icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.imagemeter.folder+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.imagemeter.image+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p3": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.informix-visionary": { - "source": "iana" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw", "xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.iso11783-10+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz", "ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr", "kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd", "kwt"] - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne", "knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp", "skd", "skt", "skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las": { - "source": "iana" - }, - "application/vnd.las.las+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.las.las+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lasxml"] - }, - "application/vnd.laszip": { - "source": "iana" - }, - "application/vnd.leap+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.liberty-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lbe"] - }, - "application/vnd.logipipe.circuit+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.loom": { - "source": "iana" - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.mapbox-vector-tile": { - "source": "iana" - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micro+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.microsoft.portable-executable": { - "source": "iana" - }, - "application/vnd.microsoft.windows.thumbnail-cache": { - "source": "iana" - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-outlook": { - "compressible": false, - "extensions": ["msg"] - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt", "pps", "pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printdevicecapabilities+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-printschematicket+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp", "mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-windows.devicepairing": { - "source": "iana" - }, - "application/vnd.ms-windows.nwprinting.oob": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-windows.wsd.oob": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps", "wks", "wcm", "wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.msa-disk-image": { - "source": "iana" - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nearst.inv+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nimn": { - "source": "iana" - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf", "nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "iana", - "extensions": ["n-gage"] - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "iana", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.ocf+cbor": { - "source": "iana" - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+tlv": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omads-email+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omads-file+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omads-folder+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.onepager": { - "source": "iana" - }, - "application/vnd.onepagertamp": { - "source": "iana" - }, - "application/vnd.onepagertamx": { - "source": "iana" - }, - "application/vnd.onepagertat": { - "source": "iana" - }, - "application/vnd.onepagertatp": { - "source": "iana" - }, - "application/vnd.onepagertatx": { - "source": "iana" - }, - "application/vnd.openblox.game+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openblox.game-binary": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openstreetmap.data+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "iana", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "iana", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "iana", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oxli.countgraph": { - "source": "iana" - }, - "application/vnd.pagerduty+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb", "pqa", "oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "iana" - }, - "application/vnd.patentdive": { - "source": "iana" - }, - "application/vnd.patientecommsdoc": { - "source": "iana" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.psfs": { - "source": "iana" - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quarantainenet": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.rar": { - "source": "iana" - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musicxml"] - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.restful+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "compressible": true, - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shade-save-file": { - "source": "iana" - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.shootproof+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shopkick+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.sigrok.session": { - "source": "iana" - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd", "twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sdkm", "sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sqlite3": { - "source": "iana" - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw", "vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wadl"] - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus", "susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis", "sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tableschema+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap", "cap", "dmp"] - }, - "application/vnd.think-cell.ppttc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.tml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.tri.onesource": { - "source": "iana" - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd", "ufdl"] - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uoml"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.uri-map": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.vel+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.veryant.thin": { - "source": "iana" - }, - "application/vnd.ves.encrypted": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd", "vst", "vss", "vsw"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.wv.ssp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.youtube.yt": { - "source": "iana" - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir", "zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["vxml"] - }, - "application/voucher-cms+json": { - "source": "iana", - "compressible": true - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/wasm": { - "compressible": true, - "extensions": ["wasm"] - }, - "application/watcherinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/webpush-options+json": { - "source": "iana", - "compressible": true - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-arj": { - "compressible": false, - "extensions": ["arj"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab", "x32", "u32", "vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb", "blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2", "boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr", "cba", "cbt", "cbz", "cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-cocoa": { - "source": "nginx", - "extensions": ["cco"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb", "udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "compressible": true, - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa", "pfb", "pfm", "afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-httpd-php": { - "compressible": true, - "extensions": ["php"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-java-archive-diff": { - "source": "nginx", - "extensions": ["jardiff"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh", "lha"] - }, - "application/x-makeself": { - "source": "nginx", - "extensions": ["run"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc", "mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdos-program": { - "extensions": ["exe"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe", "dll", "com", "bat", "msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb", "m13", "m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf", "wmz", "emf", "emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc", "cdf"] - }, - "application/x-ns-proxy-autoconfig": { - "compressible": true, - "extensions": ["pac"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-perl": { - "source": "nginx", - "extensions": ["pl", "pm"] - }, - "application/x-pilot": { - "source": "nginx", - "extensions": ["prc", "pdb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12", "pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b", "spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-redhat-package-manager": { - "source": "nginx", - "extensions": ["rpm"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sea": { - "source": "nginx", - "extensions": ["sea"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl", "tk"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo", "texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-virtualbox-hdd": { - "compressible": true, - "extensions": ["hdd"] - }, - "application/x-virtualbox-ova": { - "compressible": true, - "extensions": ["ova"] - }, - "application/x-virtualbox-ovf": { - "compressible": true, - "extensions": ["ovf"] - }, - "application/x-virtualbox-vbox": { - "compressible": true, - "extensions": ["vbox"] - }, - "application/x-virtualbox-vbox-extpack": { - "compressible": false, - "extensions": ["vbox-extpack"] - }, - "application/x-virtualbox-vdi": { - "compressible": true, - "extensions": ["vdi"] - }, - "application/x-virtualbox-vhd": { - "compressible": true, - "extensions": ["vhd"] - }, - "application/x-virtualbox-vmdk": { - "compressible": true, - "extensions": ["vmdk"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "apache", - "extensions": ["der", "crt", "pem"] - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana", - "compressible": true - }, - "application/xaml+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-caps+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-error+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-ns+xml": { - "source": "iana", - "compressible": true - }, - "application/xcon-conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana", - "compressible": true - }, - "application/xenc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xenc"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml", "xht"] - }, - "application/xhtml-voice+xml": { - "source": "apache", - "compressible": true - }, - "application/xliff+xml": { - "source": "iana", - "compressible": true - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml", "xsl", "xsd", "rng"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/xmpp+xml": { - "source": "iana", - "compressible": true - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mxml", "xhvml", "xvml", "xvm"] - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yang-data+json": { - "source": "iana", - "compressible": true - }, - "application/yang-data+xml": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+json": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/yin+xml": { - "source": "iana", - "compressible": true, - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zlib": { - "source": "iana" - }, - "application/zstd": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana", - "compressible": false, - "extensions": ["3gpp"] - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/aac": { - "source": "iana" - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana" - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au", "snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/evs": { - "source": "iana" - }, - "audio/flexfec": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g711-0": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/melp": { - "source": "iana" - }, - "audio/melp1200": { - "source": "iana" - }, - "audio/melp2400": { - "source": "iana" - }, - "audio/melp600": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid", "midi", "kar", "rmi"] - }, - "audio/mobile-xmf": { - "source": "iana" - }, - "audio/mp3": { - "compressible": false, - "extensions": ["mp3"] - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["m4a", "mp4a"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga", "ogg", "spx"] - }, - "audio/opus": { - "source": "iana" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tetra_acelp": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/usac": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva", "uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dts.uhd": { - "source": "iana" - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.presonus.multitrack": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "iana" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/wav": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/wave": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif", "aiff", "aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-m4a": { - "source": "nginx", - "extensions": ["m4a"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram", "ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-realaudio": { - "source": "nginx", - "extensions": ["ra"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/collection": { - "source": "iana", - "extensions": ["ttc"] - }, - "font/otf": { - "source": "iana", - "compressible": true, - "extensions": ["otf"] - }, - "font/sfnt": { - "source": "iana" - }, - "font/ttf": { - "source": "iana", - "compressible": true, - "extensions": ["ttf"] - }, - "font/woff": { - "source": "iana", - "extensions": ["woff"] - }, - "font/woff2": { - "source": "iana", - "extensions": ["woff2"] - }, - "image/aces": { - "source": "iana", - "extensions": ["exr"] - }, - "image/apng": { - "compressible": false, - "extensions": ["apng"] - }, - "image/avci": { - "source": "iana" - }, - "image/avcs": { - "source": "iana" - }, - "image/bmp": { - "source": "iana", - "compressible": true, - "extensions": ["bmp"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/dicom-rle": { - "source": "iana", - "extensions": ["drle"] - }, - "image/emf": { - "source": "iana", - "extensions": ["emf"] - }, - "image/fits": { - "source": "iana", - "extensions": ["fits"] - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/heic": { - "source": "iana", - "extensions": ["heic"] - }, - "image/heic-sequence": { - "source": "iana", - "extensions": ["heics"] - }, - "image/heif": { - "source": "iana", - "extensions": ["heif"] - }, - "image/heif-sequence": { - "source": "iana", - "extensions": ["heifs"] - }, - "image/hej2k": { - "source": "iana", - "extensions": ["hej2"] - }, - "image/hsj2": { - "source": "iana", - "extensions": ["hsj2"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/jls": { - "source": "iana", - "extensions": ["jls"] - }, - "image/jp2": { - "source": "iana", - "compressible": false, - "extensions": ["jp2", "jpg2"] - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpeg", "jpg", "jpe"] - }, - "image/jph": { - "source": "iana", - "extensions": ["jph"] - }, - "image/jphc": { - "source": "iana", - "extensions": ["jhc"] - }, - "image/jpm": { - "source": "iana", - "compressible": false, - "extensions": ["jpm"] - }, - "image/jpx": { - "source": "iana", - "compressible": false, - "extensions": ["jpx", "jpf"] - }, - "image/jxr": { - "source": "iana", - "extensions": ["jxr"] - }, - "image/jxra": { - "source": "iana", - "extensions": ["jxra"] - }, - "image/jxrs": { - "source": "iana", - "extensions": ["jxrs"] - }, - "image/jxs": { - "source": "iana", - "extensions": ["jxs"] - }, - "image/jxsc": { - "source": "iana", - "extensions": ["jxsc"] - }, - "image/jxsi": { - "source": "iana", - "extensions": ["jxsi"] - }, - "image/jxss": { - "source": "iana", - "extensions": ["jxss"] - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif"] - }, - "image/prs.pti": { - "source": "iana", - "extensions": ["pti"] - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg", "svgz"] - }, - "image/t38": { - "source": "iana", - "extensions": ["t38"] - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tif", "tiff"] - }, - "image/tiff-fx": { - "source": "iana", - "extensions": ["tfx"] - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana", - "extensions": ["azv"] - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi", "uvvi", "uvg", "uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu", "djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana", - "extensions": ["ico"] - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.mozilla.apng": { - "source": "iana" - }, - "image/vnd.ms-dds": { - "extensions": ["dds"] - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana", - "extensions": ["tap"] - }, - "image/vnd.valve.source.texture": { - "source": "iana", - "extensions": ["vtf"] - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/vnd.zbrush.pcx": { - "source": "iana", - "extensions": ["pcx"] - }, - "image/webp": { - "source": "apache", - "extensions": ["webp"] - }, - "image/wmf": { - "source": "iana", - "extensions": ["wmf"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh", "fhc", "fh4", "fh5", "fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-jng": { - "source": "nginx", - "extensions": ["jng"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-ms-bmp": { - "source": "nginx", - "compressible": true, - "extensions": ["bmp"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic", "pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana", - "extensions": ["disposition-notification"] - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana", - "extensions": ["u8msg"] - }, - "message/global-delivery-status": { - "source": "iana", - "extensions": ["u8dsn"] - }, - "message/global-disposition-notification": { - "source": "iana", - "extensions": ["u8mdn"] - }, - "message/global-headers": { - "source": "iana", - "extensions": ["u8hdr"] - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/news": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml", "mime"] - }, - "message/s-http": { - "source": "iana" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "iana" - }, - "message/vnd.wfa.wsc": { - "source": "iana", - "extensions": ["wsc"] - }, - "model/3mf": { - "source": "iana", - "extensions": ["3mf"] - }, - "model/gltf+json": { - "source": "iana", - "compressible": true, - "extensions": ["gltf"] - }, - "model/gltf-binary": { - "source": "iana", - "compressible": true, - "extensions": ["glb"] - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs", "iges"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh", "mesh", "silo"] - }, - "model/stl": { - "source": "iana", - "extensions": ["stl"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana", - "compressible": true - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana", - "extensions": ["ogex"] - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana", - "extensions": ["x_b"] - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana", - "extensions": ["x_t"] - }, - "model/vnd.rosette.annotated-data-model": { - "source": "iana" - }, - "model/vnd.usdz+zip": { - "source": "iana", - "compressible": false, - "extensions": ["usdz"] - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana", - "extensions": ["bsp"] - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl", "vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db", "x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana", - "extensions": ["x3db"] - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv", "x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d", "x3dz"] - }, - "model/x3d-vrml": { - "source": "iana", - "extensions": ["x3dv"] - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana" - }, - "multipart/multilingual": { - "source": "iana" - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/vnd.bint.med-plus": { - "source": "iana" - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache", "manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics", "ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee", "litcoffee"] - }, - "text/css": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "iana" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/flexfec": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html", "htm", "shtml"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "compressible": true - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "compressible": true, - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana", - "compressible": true, - "extensions": ["markdown", "md"] - }, - "text/mathml": { - "source": "nginx", - "extensions": ["mml"] - }, - "text/mdx": { - "compressible": true, - "extensions": ["mdx"] - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt", "text", "conf", "def", "list", "log", "in", "ini"] - }, - "text/provenance-notation": { - "source": "iana" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/prs.prop.logic": { - "source": "iana" - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml", "sgm"] - }, - "text/shex": { - "extensions": ["shex"] - }, - "text/slim": { - "extensions": ["slim", "slm"] - }, - "text/strings": { - "source": "iana" - }, - "text/stylus": { - "extensions": ["stylus", "styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t", "tr", "roff", "man", "me", "ms"] - }, - "text/turtle": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri", "uris", "urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.ascii-art": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana" - }, - "text/vnd.ficlab.flt": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.gml": { - "source": "iana" - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.hgl": { - "source": "iana" - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.senx.warpscript": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "iana" - }, - "text/vnd.sosi": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vtt": { - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s", "asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] - }, - "text/x-component": { - "source": "nginx", - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f", "for", "f77", "f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-org": { - "compressible": true, - "extensions": ["org"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p", "pas"] - }, - "text/x-processing": { - "compressible": true, - "extensions": ["pde"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-suse-ymp": { - "compressible": true, - "extensions": ["ymp"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml"] - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "extensions": ["yaml", "yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "iana" - }, - "video/3gpp": { - "source": "iana", - "extensions": ["3gp", "3gpp"] - }, - "video/3gpp-tt": { - "source": "iana" - }, - "video/3gpp2": { - "source": "iana", - "extensions": ["3g2"] - }, - "video/bmpeg": { - "source": "iana" - }, - "video/bt656": { - "source": "iana" - }, - "video/celb": { - "source": "iana" - }, - "video/dv": { - "source": "iana" - }, - "video/encaprtp": { - "source": "iana" - }, - "video/flexfec": { - "source": "iana" - }, - "video/h261": { - "source": "iana", - "extensions": ["h261"] - }, - "video/h263": { - "source": "iana", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "iana" - }, - "video/h263-2000": { - "source": "iana" - }, - "video/h264": { - "source": "iana", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "iana" - }, - "video/h264-svc": { - "source": "iana" - }, - "video/h265": { - "source": "iana" - }, - "video/iso.segment": { - "source": "iana" - }, - "video/jpeg": { - "source": "iana", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "iana" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm", "jpgm"] - }, - "video/mj2": { - "source": "iana", - "extensions": ["mj2", "mjp2"] - }, - "video/mp1s": { - "source": "iana" - }, - "video/mp2p": { - "source": "iana" - }, - "video/mp2t": { - "source": "iana", - "extensions": ["ts"] - }, - "video/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["mp4", "mp4v", "mpg4"] - }, - "video/mp4v-es": { - "source": "iana" - }, - "video/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpeg", "mpg", "mpe", "m1v", "m2v"] - }, - "video/mpeg4-generic": { - "source": "iana" - }, - "video/mpv": { - "source": "iana" - }, - "video/nv": { - "source": "iana" - }, - "video/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "iana" - }, - "video/pointer": { - "source": "iana" - }, - "video/quicktime": { - "source": "iana", - "compressible": false, - "extensions": ["qt", "mov"] - }, - "video/raptorfec": { - "source": "iana" - }, - "video/raw": { - "source": "iana" - }, - "video/rtp-enc-aescm128": { - "source": "iana" - }, - "video/rtploopback": { - "source": "iana" - }, - "video/rtx": { - "source": "iana" - }, - "video/smpte291": { - "source": "iana" - }, - "video/smpte292m": { - "source": "iana" - }, - "video/ulpfec": { - "source": "iana" - }, - "video/vc1": { - "source": "iana" - }, - "video/vc2": { - "source": "iana" - }, - "video/vnd.cctv": { - "source": "iana" - }, - "video/vnd.dece.hd": { - "source": "iana", - "extensions": ["uvh", "uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "iana", - "extensions": ["uvm", "uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "iana" - }, - "video/vnd.dece.pd": { - "source": "iana", - "extensions": ["uvp", "uvvp"] - }, - "video/vnd.dece.sd": { - "source": "iana", - "extensions": ["uvs", "uvvs"] - }, - "video/vnd.dece.video": { - "source": "iana", - "extensions": ["uvv", "uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "iana" - }, - "video/vnd.directv.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dvb.file": { - "source": "iana", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "iana", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "iana" - }, - "video/vnd.motorola.video": { - "source": "iana" - }, - "video/vnd.motorola.videop": { - "source": "iana" - }, - "video/vnd.mpegurl": { - "source": "iana", - "extensions": ["mxu", "m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "iana", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "iana" - }, - "video/vnd.nokia.mp4vr": { - "source": "iana" - }, - "video/vnd.nokia.videovoip": { - "source": "iana" - }, - "video/vnd.objectvideo": { - "source": "iana" - }, - "video/vnd.radgamettools.bink": { - "source": "iana" - }, - "video/vnd.radgamettools.smacker": { - "source": "iana" - }, - "video/vnd.sealed.mpeg1": { - "source": "iana" - }, - "video/vnd.sealed.mpeg4": { - "source": "iana" - }, - "video/vnd.sealed.swf": { - "source": "iana" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "iana" - }, - "video/vnd.uvvu.mp4": { - "source": "iana", - "extensions": ["uvu", "uvvu"] - }, - "video/vnd.vivo": { - "source": "iana", - "extensions": ["viv"] - }, - "video/vnd.youtube.yt": { - "source": "iana" - }, - "video/vp8": { - "source": "iana" - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv", "mk3d", "mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf", "asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/shims/mime-types.js b/shims/mime-types.js deleted file mode 100644 index b33df7f..0000000 --- a/shims/mime-types.js +++ /dev/null @@ -1,188 +0,0 @@ -/* ! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module dependencies. - * @private - */ - -var db = require('./mime-db.json') -var extname = require('path').extname - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset(type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType(str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) { - mime += '; charset=' + charset.toLowerCase() - } - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension(type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup(path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps(extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType(type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if ( - types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/')) - ) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} diff --git a/shims/type-is.js b/shims/type-is.js deleted file mode 100644 index ad0f802..0000000 --- a/shims/type-is.js +++ /dev/null @@ -1,261 +0,0 @@ -/* ! - * type-is - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module dependencies. - * @private - */ - -var typer = require('./media-typer') -var mime = require('./mime-types') - -/** - * Compare a `value` content-type with `types`. - * Each `type` can be an extension like `html`, - * a special shortcut like `multipart` or `urlencoded`, - * or a mime type. - * - * If no types match, `false` is returned. - * Otherwise, the first `type` that matches is returned. - * - * @param {String} value - * @param {Array} types - * @public - */ - -function typeis(value, types_) { - var i - var types = types_ - - // remove parameters and normalize - var val = tryNormalizeType(value) - - // no type or invalid - if (!val) { - return false - } - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length - 1) - for (i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // no types, return the content type - if (!types || !types.length) { - return val - } - - var type - for (i = 0; i < types.length; i++) { - if (mimeMatch(normalize((type = types[i])), val)) { - return type[0] === '+' || type.indexOf('*') !== -1 ? val : type - } - } - - // no matches - return false -} - -/** - * Check if a request has a request body. - * A request with a body __must__ either have `transfer-encoding` - * or `content-length` headers set. - * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 - * - * @param {Object} request - * @return {Boolean} - * @public - */ - -function hasbody(req) { - return req.headers['transfer-encoding'] !== undefined || !isNaN(req.headers['content-length']) -} - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains any of the give mime `type`s. - * If there is no request body, `null` is returned. - * If there is no content type, `false` is returned. - * Otherwise, it returns the first `type` that matches. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * this.is('html'); // => 'html' - * this.is('text/html'); // => 'text/html' - * this.is('text/*', 'application/json'); // => 'text/html' - * - * // When Content-Type is application/json - * this.is('json', 'urlencoded'); // => 'json' - * this.is('application/json'); // => 'application/json' - * this.is('html', 'application/*'); // => 'application/json' - * - * this.is('html'); // => false - * - * @param {String|Array} types... - * @return {String|false|null} - * @public - */ - -function typeofrequest(req, types_) { - var types = types_ - - // no body - if (!hasbody(req)) { - return null - } - - // support flattened arguments - if (arguments.length > 2) { - types = new Array(arguments.length - 1) - for (var i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // request content type - var value = req.headers['content-type'] - - return typeis(value, types) -} - -/** - * Normalize a mime type. - * If it's a shorthand, expand it to a valid mime type. - * - * In general, you probably want: - * - * var type = is(req, ['urlencoded', 'json', 'multipart']); - * - * Then use the appropriate body parsers. - * These three are the most common request body types - * and are thus ensured to work. - * - * @param {String} type - * @private - */ - -function normalize(type) { - if (typeof type !== 'string') { - // invalid type - return false - } - - switch (type) { - case 'urlencoded': - return 'application/x-www-form-urlencoded' - case 'multipart': - return 'multipart/*' - } - - if (type[0] === '+') { - // "+json" -> "*/*+json" expando - return '*/*' + type - } - - return type.indexOf('/') === -1 ? mime.lookup(type) : type -} - -/** - * Check if `expected` mime type - * matches `actual` mime type with - * wildcard and +suffix support. - * - * @param {String} expected - * @param {String} actual - * @return {Boolean} - * @private - */ - -function mimeMatch(expected, actual) { - // invalid type - if (expected === false) { - return false - } - - // split types - var actualParts = actual.split('/') - var expectedParts = expected.split('/') - - // invalid format - if (actualParts.length !== 2 || expectedParts.length !== 2) { - return false - } - - // validate type - if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) { - return false - } - - // validate suffix wildcard - if (expectedParts[1].substr(0, 2) === '*+') { - return ( - expectedParts[1].length <= actualParts[1].length + 1 && - expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length) - ) - } - - // validate subtype - if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) { - return false - } - - return true -} - -/** - * Normalize a type and remove parameters. - * - * @param {string} value - * @return {string} - * @private - */ - -function normalizeType(value) { - // parse the type - var type = typer.parse(value) - - // remove the parameters - type.parameters = undefined - - // reformat it - return typer.format(type) -} - -/** - * Try to normalize a type and remove parameters. - * - * @param {string} value - * @return {string} - * @private - */ - -function tryNormalizeType(value) { - if (!value) { - return null - } - - try { - return normalizeType(value) - } catch (err) { - return null - } -} - -/** - * Module exports. - * @public - */ - -module.exports = typeofrequest -module.exports.is = typeis -module.exports.hasBody = hasbody -module.exports.normalize = normalize -module.exports.match = mimeMatch From ebb0b2fb4c470ee0e8b74492d1fa45272677ac28 Mon Sep 17 00:00:00 2001 From: yugasun Date: Wed, 15 Jan 2020 20:35:00 +0800 Subject: [PATCH 57/93] fix: change tencent-serverless-nodejs to tencent-serverless-http --- lambda-handler.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lambda-handler.js b/lambda-handler.js index e30d094..27f4c83 100644 --- a/lambda-handler.js +++ b/lambda-handler.js @@ -1,4 +1,4 @@ -const { createServer, proxy } = require('tencent-serverless-nodejs') +const { createServer, proxy } = require('tencent-serverless-http') module.exports.handler = (event, context) => { const app = require.fromParentEnvironment('./app') diff --git a/package.json b/package.json index 3f8e0ae..3be02e5 100755 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@serverless/tencent-scf": "^2.0.2", "ext": "^1.4.0", "fs-extra": "^8.1.0", - "tencent-serverless-nodejs": "^1.0.1", + "tencent-serverless-http": "^1.0.2", "terser": "^4.6.3", "type": "^2.0.0", "webmake": "^1.1.0" From 0c9ced72c34a879bdbf828e79ffd1a4d28bea1e9 Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Thu, 16 Jan 2020 12:34:04 +0100 Subject: [PATCH 58/93] Release v2.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3be02e5..a311a19 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.0.1", + "version": "2.1.0", "main": "./serverless.js", "publishConfig": { "access": "public" From 361800ab46a015c361dcfb4db82c0ebff36992af Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 16 Jan 2020 16:23:30 +0800 Subject: [PATCH 59/93] feat: add disable apigateway auto create, close #9 --- docs/configure.md | 1 + serverless.js | 70 +++++++++++++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 2f9aca5..1f2b33d 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -80,6 +80,7 @@ Main param description | Param | Required/Optional | Description | | ----------- | :---------------: | :------------------------------------------------------------------------------------------------------- | +| disable | Optional | Whether disable auto creating api gateway, if you don't want to create it, set to `true` | | protocols | Optional | Frontend request type of the service, such as `http` or `https`. | | environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | | usagePlan | Optional | | diff --git a/serverless.js b/serverless.js index 73b5312..579825a 100755 --- a/serverless.js +++ b/serverless.js @@ -24,7 +24,6 @@ class TencentExpress extends Component { inputs.region = ensureString(inputs.region, { default: 'ap-guangzhou' }) inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) inputs.exclude = ensureIterable(inputs.exclude, { default: [], ensureItem: ensureString }) - const apigatewayConf = ensurePlainObject(inputs.apigatewayConf, { default: {} }) const appFile = path.resolve(inputs.codeUri, 'app.js') if (!(await utils.fileExists(appFile))) { @@ -39,7 +38,6 @@ class TencentExpress extends Component { inputs.runtime = 'Nodejs8.9' const tencentCloudFunction = await this.load('@serverless/tencent-scf') - const tencentApiGateway = await this.load('@serverless/tencent-apigateway') if (inputs.functionConf) { inputs.timeout = inputs.functionConf.timeout ? inputs.functionConf.timeout : 3 @@ -53,37 +51,49 @@ class TencentExpress extends Component { } const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) - const apigwParam = { - serviceName: inputs.serviceName, - description: 'Serverless Framework tencent-express Component', - serviceId: inputs.serviceId, - region: inputs.region, - protocols: apigatewayConf.protocols || ['http'], - environment: apigatewayConf.environment || 'release', - endpoints: [ - { - path: '/', - method: 'ANY', - function: { - isIntegratedResponse: true, - functionName: tencentCloudFunctionOutputs.Name - } - } - ] - } - if (inputs.apigatewayConf && inputs.apigatewayConf.usagePlan) { - apigwParam.endpoints[0].usagePlan = inputs.apigatewayConf.usagePlan - } - if (inputs.apigatewayConf && inputs.apigatewayConf.auth) { - apigwParam.endpoints[0].auth = inputs.apigatewayConf.auth - } - const tencentApiGatewayOutputs = await tencentApiGateway(apigwParam) const outputs = { region: inputs.region, - functionName: inputs.name, - apiGatewayServiceId: tencentApiGatewayOutputs.serviceId, - url: `${this.getDefaultProtocol(tencentApiGatewayOutputs.protocols)}://${ + functionName: inputs.name + } + + if (inputs.apigatewayConf.disable !== true) { + const tencentApiGateway = await this.load('@serverless/tencent-apigateway') + const apigwParam = { + serviceName: inputs.serviceName, + description: 'Serverless Framework tencent-express Component', + serviceId: inputs.serviceId, + region: inputs.region, + protocols: + inputs.apigatewayConf && inputs.apigatewayConf.protocols + ? inputs.apigatewayConf.protocols + : ['http'], + environment: + inputs.apigatewayConf && inputs.apigatewayConf.environment + ? inputs.apigatewayConf.environment + : 'release', + endpoints: [ + { + path: '/', + method: 'ANY', + function: { + isIntegratedResponse: true, + functionName: tencentCloudFunctionOutputs.Name + } + } + ] + } + if (inputs.apigatewayConf && inputs.apigatewayConf.usagePlan) { + apigwParam.endpoints[0].usagePlan = inputs.apigatewayConf.usagePlan + } + if (inputs.apigatewayConf && inputs.apigatewayConf.auth) { + apigwParam.endpoints[0].auth = inputs.apigatewayConf.auth + } + + const tencentApiGatewayOutputs = await tencentApiGateway(apigwParam) + + outputs.apiGatewayServiceId = tencentApiGatewayOutputs.serviceId + outputs.url = `${this.getDefaultProtocol(tencentApiGatewayOutputs.protocols)}://${ tencentApiGatewayOutputs.subDomain }/${tencentApiGatewayOutputs.environment}/` } From 2773f1832a0bac72b55830bf955de76e6d2f51e5 Mon Sep 17 00:00:00 2001 From: yugasun Date: Mon, 20 Jan 2020 19:52:46 +0800 Subject: [PATCH 60/93] fix: update disable to isDisabled --- docs/configure.md | 4 ++-- serverless.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 1f2b33d..8d03650 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -10,7 +10,7 @@ express: component: '@serverless/tencent-express' inputs: region: ap-shanghai - functionName: eslam-function + functionName: my-function serviceName: mytest serviceId: service-np1uloxw code: ./code @@ -80,7 +80,7 @@ Main param description | Param | Required/Optional | Description | | ----------- | :---------------: | :------------------------------------------------------------------------------------------------------- | -| disable | Optional | Whether disable auto creating api gateway, if you don't want to create it, set to `true` | +| isDisabled | Optional | Whether disable auto creating api gateway, if you don't want to create it, set to `true` | | protocols | Optional | Frontend request type of the service, such as `http` or `https`. | | environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | | usagePlan | Optional | | diff --git a/serverless.js b/serverless.js index 579825a..b622e38 100755 --- a/serverless.js +++ b/serverless.js @@ -57,7 +57,7 @@ class TencentExpress extends Component { functionName: inputs.name } - if (inputs.apigatewayConf.disable !== true) { + if (!inputs.apigatewayConf.isDisabled) { const tencentApiGateway = await this.load('@serverless/tencent-apigateway') const apigwParam = { serviceName: inputs.serviceName, From fa659652c0dce4872a573d8f168e1654f026365c Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Mon, 20 Jan 2020 14:34:32 +0100 Subject: [PATCH 61/93] Release v2.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a311a19..6004c7a 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.1.0", + "version": "2.2.0", "main": "./serverless.js", "publishConfig": { "access": "public" From ef514ae153b53c1511a615604657e7a1a2a5eddb Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Tue, 4 Feb 2020 12:54:21 +0800 Subject: [PATCH 62/93] fix auth --- package.json | 2 +- serverless.js | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6004c7a..0b6291f 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.2.0", + "version": "2.2.1", "main": "./serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.js b/serverless.js index b622e38..5aeaa59 100755 --- a/serverless.js +++ b/serverless.js @@ -50,6 +50,7 @@ class TencentExpress extends Component { } } + inputs.fromClientRemark = inputs.fromClientRemark || 'tencent-express' const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) const outputs = { @@ -90,6 +91,7 @@ class TencentExpress extends Component { apigwParam.endpoints[0].auth = inputs.apigatewayConf.auth } + apigwParam.fromClientRemark = inputs.fromClientRemark || 'tencent-express' const tencentApiGatewayOutputs = await tencentApiGateway(apigwParam) outputs.apiGatewayServiceId = tencentApiGatewayOutputs.serviceId @@ -101,12 +103,15 @@ class TencentExpress extends Component { return outputs } - async remove() { + async remove(inputs = {}) { + const removeInput = { + fromClientRemark: inputs.fromClientRemark || 'tencent-express' + } const tencentCloudFunction = await this.load('@serverless/tencent-scf') const tencentApiGateway = await this.load('@serverless/tencent-apigateway') - await tencentCloudFunction.remove() - await tencentApiGateway.remove() + await tencentCloudFunction.remove(removeInput) + await tencentApiGateway.remove(removeInput) return {} } From 4185a33202ccb1fbcac68d264f0cd293a59092e6 Mon Sep 17 00:00:00 2001 From: yugasun Date: Sat, 8 Feb 2020 10:29:28 +0800 Subject: [PATCH 63/93] fix: apigatewyConf not set, Close #13,#14 --- serverless.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/serverless.js b/serverless.js index 5aeaa59..a7bfd3c 100755 --- a/serverless.js +++ b/serverless.js @@ -24,6 +24,10 @@ class TencentExpress extends Component { inputs.region = ensureString(inputs.region, { default: 'ap-guangzhou' }) inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) inputs.exclude = ensureIterable(inputs.exclude, { default: [], ensureItem: ensureString }) + inputs.apigatewayConf = ensureIterable(inputs.apigatewayConf, { + default: {}, + ensureItem: ensurePlainObject + }) const appFile = path.resolve(inputs.codeUri, 'app.js') if (!(await utils.fileExists(appFile))) { @@ -58,6 +62,7 @@ class TencentExpress extends Component { functionName: inputs.name } + // only user set apigatewayConf.isDisabled to `true`, do not create api if (!inputs.apigatewayConf.isDisabled) { const tencentApiGateway = await this.load('@serverless/tencent-apigateway') const apigwParam = { From da9ea1456abd98d09c3180086b308c346967a781 Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Sat, 8 Feb 2020 10:35:40 +0800 Subject: [PATCH 64/93] update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b6291f..a91a1f3 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.2.1", + "version": "2.2.2", "main": "./serverless.js", "publishConfig": { "access": "public" From edcf0d918ff2dc2d96bf108813eea15a62aff0bb Mon Sep 17 00:00:00 2001 From: yugasun Date: Sat, 8 Feb 2020 10:40:25 +0800 Subject: [PATCH 65/93] fix: apigatewayConf ensurePlainObject, Close #14 --- serverless.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/serverless.js b/serverless.js index a7bfd3c..18dd44f 100755 --- a/serverless.js +++ b/serverless.js @@ -24,9 +24,8 @@ class TencentExpress extends Component { inputs.region = ensureString(inputs.region, { default: 'ap-guangzhou' }) inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) inputs.exclude = ensureIterable(inputs.exclude, { default: [], ensureItem: ensureString }) - inputs.apigatewayConf = ensureIterable(inputs.apigatewayConf, { - default: {}, - ensureItem: ensurePlainObject + inputs.apigatewayConf = ensurePlainObject(inputs.apigatewayConf, { + default: {} }) const appFile = path.resolve(inputs.codeUri, 'app.js') From af8fba7f1f6468e07ea229c472acc65d0927fc1b Mon Sep 17 00:00:00 2001 From: dfounderliu Date: Sat, 8 Feb 2020 10:45:20 +0800 Subject: [PATCH 66/93] update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a91a1f3..6d8ed00 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.2.2", + "version": "2.2.3", "main": "./serverless.js", "publishConfig": { "access": "public" From cf8c87ff717d55c10d166503a6a7dd41fcf0dcf4 Mon Sep 17 00:00:00 2001 From: yugasun Date: Sun, 9 Feb 2020 18:47:56 +0800 Subject: [PATCH 67/93] fix: tencent-serverless-http version to 1.0.5 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6d8ed00..306bfc0 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.2.3", + "version": "2.2.4", "main": "./serverless.js", "publishConfig": { "access": "public" @@ -18,7 +18,7 @@ "@serverless/tencent-scf": "^2.0.2", "ext": "^1.4.0", "fs-extra": "^8.1.0", - "tencent-serverless-http": "^1.0.2", + "tencent-serverless-http": "^1.0.5", "terser": "^4.6.3", "type": "^2.0.0", "webmake": "^1.1.0" From 326bce2fb78045d3cdc34fe04d26e214a0dbe4bb Mon Sep 17 00:00:00 2001 From: Tinafang Date: Tue, 11 Feb 2020 00:29:30 +0800 Subject: [PATCH 68/93] Update README.md replace artwork link with cos address --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9d720b..85ca644 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.general.serverless.com/component_express_tencent/readme-express-tencent-serverless.png)](http://serverless.com) +[![Serverless Express Tencent Cloud](https://img.serverlesscloud.cn/2020210/1581352135771-express.png)](http://serverless.com) * [请点击这里查看英文版部署文档](./README_EN.md) From 35e6958d666905e23951e0c51efcf1c6b2863dc3 Mon Sep 17 00:00:00 2001 From: Tinafang Date: Tue, 11 Feb 2020 00:30:05 +0800 Subject: [PATCH 69/93] Update README_EN.md replate artwork link with cos address --- README_EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_EN.md b/README_EN.md index ac0b238..ae28e39 100644 --- a/README_EN.md +++ b/README_EN.md @@ -1,4 +1,4 @@ -[![Serverless Express Tencent Cloud](https://s3.amazonaws.com/assets.general.serverless.com/component_express_tencent/readme-express-tencent-serverless.png)](http://serverless.com) +[![Serverless Express Tencent Cloud](https://img.serverlesscloud.cn/2020210/1581352135771-express.png)](http://serverless.com) Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration. From da01668b2ad6b603f87458cbb5c57b783e225b8c Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 18 Feb 2020 13:02:07 +0800 Subject: [PATCH 70/93] feat: update dependency apigw for supporting custom domain --- docs/configure.md | 42 +++++++++++++++++++++++++++++++++++------- package.json | 6 +++--- serverless.js | 7 ++++++- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 8d03650..bd1c30e 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -24,6 +24,16 @@ express: subnetId: '' vpcId: '' apigatewayConf: + customDomain: + - domain: abc.com + certificateId: abcdefg + isDefaultMapping: 'FALSE' + pathMappingSet: + - path: / + environment: release + protocols: + - http + - https protocols: - http - https @@ -78,13 +88,14 @@ Main param description ### apigatewayConf param description -| Param | Required/Optional | Description | -| ----------- | :---------------: | :------------------------------------------------------------------------------------------------------- | -| isDisabled | Optional | Whether disable auto creating api gateway, if you don't want to create it, set to `true` | -| protocols | Optional | Frontend request type of the service, such as `http` or `https`. | -| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | -| usagePlan | Optional | | -| auth | Optional | | +| Param | Required/Optional | Description | +| ------------ | :---------------: | :------------------------------------------------------------------------------------------------------- | +| isDisabled | Optional | Whether disable auto creating api gateway, if you don't want to create it, set to `true` | +| protocols | Optional | Frontend request type of the service, such as `http` or `https`. | +| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | +| usagePlan | Optional | | +| auth | Optional | | +| customDomain | Optional | Custom API Domain | - usagePlan param description @@ -102,3 +113,20 @@ Main param description | serviceTimeout | Service timeout | | secretName | Secret name | | secretIds | Secret Id (Array) | + +### apigatewayConf.customDomain param description + +| Param | Required/Optional | Default | Description | +| ---------------- | :---------------: | :------: | :-------------------------------------------------------------------------------------------------------- | +| domain | Required | | custom domain to bind. | +| certificateId | Optional | | Certificate for custom domain, if set https, it is required. | +| isDefaultMapping | Optional | `'TRUE'` | Whether using default path mapping. If want to customize path mapping, set to `FALSE` | +| pathMappingSet | Optional | `[]` | Custom path mapping, when `isDefaultMapping` is `FALSE`, it is required. | +| protocol | Optional | | Bind custom domain protocol type, such as HTTP, HTTPS, HTTP and HTTPS, default same as frontend protocols | + +- pathMappingSet + +| Param | Description | +| ----------- | :---------------------------- | +| path | Customize mapping path | +| environment | Customize mapping environment | diff --git a/package.json b/package.json index 306bfc0..8c323bd 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.2.4", + "version": "2.3.0", "main": "./serverless.js", "publishConfig": { "access": "public" @@ -14,8 +14,8 @@ "license": "Apache", "dependencies": { "@serverless/core": "^1.0.0", - "@serverless/tencent-apigateway": "^2.0.0", - "@serverless/tencent-scf": "^2.0.2", + "@serverless/tencent-apigateway": "^2.1.2", + "@serverless/tencent-scf": "^2.0.12", "ext": "^1.4.0", "fs-extra": "^8.1.0", "tencent-serverless-http": "^1.0.5", diff --git a/serverless.js b/serverless.js index 18dd44f..c8eb33b 100755 --- a/serverless.js +++ b/serverless.js @@ -86,7 +86,8 @@ class TencentExpress extends Component { functionName: tencentCloudFunctionOutputs.Name } } - ] + ], + customDomain: inputs.apigatewayConf.customDomain } if (inputs.apigatewayConf && inputs.apigatewayConf.usagePlan) { apigwParam.endpoints[0].usagePlan = inputs.apigatewayConf.usagePlan @@ -102,6 +103,10 @@ class TencentExpress extends Component { outputs.url = `${this.getDefaultProtocol(tencentApiGatewayOutputs.protocols)}://${ tencentApiGatewayOutputs.subDomain }/${tencentApiGatewayOutputs.environment}/` + + if (tencentApiGatewayOutputs.customDomains) { + outputs.customDomains = tencentApiGatewayOutputs.customDomains + } } return outputs From 82009f6659e8b0fcbc600a4f643c84534fdf60b5 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 27 Feb 2020 14:59:24 +0800 Subject: [PATCH 71/93] feat: upgrade tencent-scf, add release script --- package.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8c323bd..711b927 100755 --- a/package.json +++ b/package.json @@ -8,14 +8,20 @@ }, "scripts": { "test": "tape *.test.js", - "lint": "eslint . --fix --cache" + "lint": "eslint . --fix --cache", + "release": "standard-version" + }, + "standard-version": { + "skip": { + "tag": false + } }, "author": "Serverless, Inc.", "license": "Apache", "dependencies": { "@serverless/core": "^1.0.0", "@serverless/tencent-apigateway": "^2.1.2", - "@serverless/tencent-scf": "^2.0.12", + "@serverless/tencent-scf": "^2.1.0", "ext": "^1.4.0", "fs-extra": "^8.1.0", "tencent-serverless-http": "^1.0.5", @@ -30,6 +36,7 @@ "eslint-plugin-import": "^2.18.0", "eslint-plugin-prettier": "^3.0.1", "prettier": "^1.18.2", + "standard-version": "^7.1.0", "tape": "^4.11.0" } } From e6681483e0e7e8cbae8d1c14658edcb1b6746f4d Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 27 Feb 2020 14:59:40 +0800 Subject: [PATCH 72/93] chore(release): 2.3.1 --- CHANGELOG.md | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..81137c6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [2.3.1](https://github.com/serverless-components/tencent-express/compare/v2.3.0...v2.3.1) (2020-02-27) + + +### Features + +* upgrade tencent-scf, add release script ([82009f6](https://github.com/serverless-components/tencent-express/commit/82009f6659e8b0fcbc600a4f643c84534fdf60b5)) diff --git a/package.json b/package.json index 711b927..8f9183d 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.3.0", + "version": "2.3.1", "main": "./serverless.js", "publishConfig": { "access": "public" From 00f4790853e0c4fc37d909d6dc94e1662467e27b Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 28 Feb 2020 17:35:42 +0800 Subject: [PATCH 73/93] fix: exclude bug --- serverless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless.js b/serverless.js index c8eb33b..8c2d42c 100755 --- a/serverless.js +++ b/serverless.js @@ -35,7 +35,7 @@ class TencentExpress extends Component { const cachedHandlerPath = await resolveCachedHandlerPath(inputs) inputs.include.push(cachedHandlerPath) - inputs.exclude = ['.git/**', '.gitignore', '.serverless', '.DS_Store'] + inputs.exclude.push('.git/**', '.gitignore', '.serverless', '.DS_Store') inputs.handler = `${path.basename(cachedHandlerPath, '.js')}.handler` inputs.runtime = 'Nodejs8.9' From 7869e7c2d14399cfb5e586a6077a8154bc53bb5c Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 28 Feb 2020 17:35:55 +0800 Subject: [PATCH 74/93] chore(release): 2.3.2 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81137c6..fed8a71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [2.3.2](https://github.com/serverless-components/tencent-express/compare/v2.3.1...v2.3.2) (2020-02-28) + + +### Bug Fixes + +* exclude bug ([00f4790](https://github.com/serverless-components/tencent-express/commit/00f4790853e0c4fc37d909d6dc94e1662467e27b)) + ### [2.3.1](https://github.com/serverless-components/tencent-express/compare/v2.3.0...v2.3.1) (2020-02-27) diff --git a/package.json b/package.json index 8f9183d..dd511d4 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.3.1", + "version": "2.3.2", "main": "./serverless.js", "publishConfig": { "access": "public" From ba5178c1de0bfbefdc9414cc2706fe63585e8b07 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 12 Mar 2020 12:00:55 +0800 Subject: [PATCH 75/93] fix: apigw namespace --- .gitignore | 1 + package.json | 4 ++-- serverless.js | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9f4ce54..a21cb35 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ env.js package-lock.json test tmp/ +yarn.lock \ No newline at end of file diff --git a/package.json b/package.json index dd511d4..4c9ca4c 100755 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "license": "Apache", "dependencies": { "@serverless/core": "^1.0.0", - "@serverless/tencent-apigateway": "^2.1.2", - "@serverless/tencent-scf": "^2.1.0", + "@serverless/tencent-apigateway": "^2.1.4", + "@serverless/tencent-scf": "^3.0.0", "ext": "^1.4.0", "fs-extra": "^8.1.0", "tencent-serverless-http": "^1.0.5", diff --git a/serverless.js b/serverless.js index 8c2d42c..ba2783c 100755 --- a/serverless.js +++ b/serverless.js @@ -22,6 +22,7 @@ class TencentExpress extends Component { inputs.codeUri = ensureString(inputs.code, { isOptional: true }) || process.cwd() inputs.region = ensureString(inputs.region, { default: 'ap-guangzhou' }) + inputs.namespace = ensureString(inputs.namespace, { default: 'default' }) inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) inputs.exclude = ensureIterable(inputs.exclude, { default: [], ensureItem: ensureString }) inputs.apigatewayConf = ensurePlainObject(inputs.apigatewayConf, { @@ -83,7 +84,8 @@ class TencentExpress extends Component { method: 'ANY', function: { isIntegratedResponse: true, - functionName: tencentCloudFunctionOutputs.Name + functionName: tencentCloudFunctionOutputs.Name, + functionNamespace: inputs.namespace } } ], From d9e0a8ba0e1c130a5332ec7c0a730290a00b7837 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 12 Mar 2020 12:01:00 +0800 Subject: [PATCH 76/93] chore(release): 2.3.3 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fed8a71..07d1f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [2.3.3](https://github.com/serverless-components/tencent-express/compare/v2.3.2...v2.3.3) (2020-03-12) + + +### Bug Fixes + +* apigw namespace ([ba5178c](https://github.com/serverless-components/tencent-express/commit/ba5178c1de0bfbefdc9414cc2706fe63585e8b07)) + ### [2.3.2](https://github.com/serverless-components/tencent-express/compare/v2.3.1...v2.3.2) (2020-02-28) diff --git a/package.json b/package.json index 4c9ca4c..733c367 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.3.2", + "version": "2.3.3", "main": "./serverless.js", "publishConfig": { "access": "public" From c8fedc0fbc30f6eb3170b998c41a841b9f478855 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 17 Mar 2020 11:33:44 +0800 Subject: [PATCH 77/93] feat: refactor using framework --- .eslintignore | 3 +- .gitignore | 2 +- .npmignore | 11 ++ .prettierignore | 3 +- README_EN.md => README.en.md | 74 ++++++---- README.md | 94 +++++++------ commitlint.config.js | 9 ++ example/app.js | 26 ++++ example/package.json | 14 ++ example/serverless.yml | 14 ++ lib/resolve-cached-handler-path/generate.js | 25 ---- lib/resolve-cached-handler-path/index.js | 11 -- .../resolve-path.js | 11 -- package.json | 49 +++++-- prettier.config.js | 1 - serverless.js | 132 +----------------- serverless.test.js | 14 -- src/index.js | 63 +++++++++ lambda-handler.js => src/shims/handler.js | 0 19 files changed, 275 insertions(+), 281 deletions(-) create mode 100644 .npmignore rename README_EN.md => README.en.md (50%) create mode 100644 commitlint.config.js create mode 100644 example/app.js create mode 100644 example/package.json create mode 100644 example/serverless.yml delete mode 100644 lib/resolve-cached-handler-path/generate.js delete mode 100644 lib/resolve-cached-handler-path/index.js delete mode 100644 lib/resolve-cached-handler-path/resolve-path.js delete mode 100644 serverless.test.js create mode 100644 src/index.js rename lambda-handler.js => src/shims/handler.js (100%) diff --git a/.eslintignore b/.eslintignore index 5de02b1..c410d77 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ coverage dist -node_modules \ No newline at end of file +node_modules +example \ No newline at end of file diff --git a/.gitignore b/.gitignore index a21cb35..ba1a2e9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ jest/* coverage .serverlessUnzipped node_modules -.vscode/ +.vscode .eslintcache dist .idea diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..035a2b4 --- /dev/null +++ b/.npmignore @@ -0,0 +1,11 @@ +components +examples +example +.idea +.serverless +coverage +.env* +env.js +tmp +test +.vscode \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 5de02b1..c410d77 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ coverage dist -node_modules \ No newline at end of file +node_modules +example \ No newline at end of file diff --git a/README_EN.md b/README.en.md similarity index 50% rename from README_EN.md rename to README.en.md index ae28e39..94e67fd 100644 --- a/README_EN.md +++ b/README.en.md @@ -1,6 +1,6 @@ [![Serverless Express Tencent Cloud](https://img.serverlesscloud.cn/2020210/1581352135771-express.png)](http://serverless.com) -Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration. +Easily deploy Express.js applications to Tencent Cloud's serverless infrastructure using this Serverless Framework Component. Your application will auto-scale, never charge you for idle time, and require little-to-zero administration.   @@ -9,7 +9,6 @@ Easily deploy Express.js applications to Tencent Cloud's serverless infrastructu - [请点击这里查看中文版部署文档](./README.md) -   1. [Install](#1-install) @@ -38,7 +37,7 @@ $ touch app.js $ touch serverless.yml ``` -Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/cam/capi) with `AdministratorAccess` in the `.env` file, using this format: +Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/cam/capi) with `AdministratorAccess` in the `.env` file, using this format: ``` # .env @@ -46,7 +45,7 @@ TENCENT_SECRET_ID=123 TENCENT_SECRET_KEY=123 ``` -* If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. +- If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. Initialize a new NPM package and install express: @@ -80,7 +79,7 @@ express: region: ap-shanghai ``` -* [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) +- [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) ### 4. Deploy @@ -94,28 +93,41 @@ $ sls --debug DEBUG ─ Creating the template's components graph. DEBUG ─ Syncing template state. DEBUG ─ Executing the template's components graph. - DEBUG ─ Compressing function ExpressComponent_7xRrrd file to /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip. - DEBUG ─ Compressed function ExpressComponent_7xRrrd file successful - DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-shanghai-code]. sls-cloudfunction-default-ExpressComponent_7xRrrd-1572512568.zip - DEBUG ─ Uploaded package successful /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip - DEBUG ─ Creating function ExpressComponent_7xRrrd - DEBUG ─ Created function ExpressComponent_7xRrrd successful - DEBUG ─ Starting API-Gateway deployment with name express.TencentApiGateway in the ap-shanghai region - DEBUG ─ Using last time deploy service id service-n0vs2ohb - DEBUG ─ Updating service with serviceId service-n0vs2ohb. - DEBUG ─ Endpoint ANY / already exists with id api-9z60urs4. - DEBUG ─ Updating api with api id api-9z60urs4. - DEBUG ─ Service with id api-9z60urs4 updated. - DEBUG ─ Deploying service with id service-n0vs2ohb. - DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-shanghai region. - - express: - region: ap-shanghai - functionName: ExpressComponent_7xRrrd - apiGatewayServiceId: service-n0vs2ohb - url: http://service-n0vs2ohb-1300415943.ap-shanghai.apigateway.myqcloud.com/release/ - - 36s › express › done + DEBUG ─ Generating serverless handler... + DEBUG ─ Generated serverless handler successfully. + DEBUG ─ Compressing function express-test file to /Users/yugasun/Desktop/Develop/serverless/tencent-express/example/.serverless/express-test.zip. + DEBUG ─ Compressed function express-test file successful + DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-guangzhou-code]. sls-cloudfunction-default-express-test-1584355868.zip + DEBUG ─ Uploaded package successful /Users/yugasun/Desktop/Develop/serverless/tencent-express/example/.serverless/express-test.zip + DEBUG ─ Creating function express-test + DEBUG ─ Created function express-test successful + DEBUG ─ Setting tags for function express-test + DEBUG ─ Creating trigger for function express-test + DEBUG ─ Deployed function express-test successful + DEBUG ─ Starting API-Gateway deployment with name ap-guangzhou-apigateway in the ap-guangzhou region + DEBUG ─ Service with ID service-97m9tn6o created. + DEBUG ─ API with id api-pvsf67t8 created. + DEBUG ─ Deploying service with id service-97m9tn6o. + DEBUG ─ Deployment successful for the api named ap-guangzhou-apigateway in the ap-guangzhou region. + + ExpressFunc: + functionName: express-test + functionOutputs: + ap-guangzhou: + Name: express-test + Runtime: Nodejs8.9 + Handler: serverless-handler.handler + MemorySize: 128 + Timeout: 3 + Region: ap-guangzhou + Namespace: default + Description: This is a template function + region: ap-guangzhou + apiGatewayServiceId: service-97m9tn6o + url: https://service-97m9tn6o-1251556596.gz.apigw.tencentcs.com/test/ + cns: (empty array) + + 14s › ExpressFunc › done ``` You can now visit the output URL in the browser, and you should see the express response. @@ -126,11 +138,11 @@ You can now visit the output URL in the browser, and you should see the express $ sls remove --debug DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removed function ExpressComponent_MHrAzr successful - DEBUG ─ Removing any previously deployed API. api-kf2hxrhc - DEBUG ─ Removing any previously deployed service. service-4ndfl6pz + DEBUG ─ Removed function express-test successful + DEBUG ─ Removing any previously deployed API. api-pvsf67t8 + DEBUG ─ Removing any previously deployed service. service-97m9tn6o - 13s › express › done + 6s › ExpressFunc › done ``` ### New to Components? diff --git a/README.md b/README.md index 85ca644..1f0474f 100755 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ [![Serverless Express Tencent Cloud](https://img.serverlesscloud.cn/2020210/1581352135771-express.png)](http://serverless.com) -* [请点击这里查看英文版部署文档](./README_EN.md) +- [请点击这里查看英文版部署文档](./README.en.md)   -# 腾讯云Express组件 +# 腾讯云 Express 组件 ## 简介 -Express 组件通过使用 serverless-tencent 的基础组件如API网关组件,SCF组件等,快速,方便的在腾讯云创建,配置和管理一个Express框架。 +Express 组件通过使用 serverless-tencent 的基础组件如 API 网关组件,SCF 组件等,快速,方便的在腾讯云创建,配置和管理一个 Express 框架。 ## 快速开始 -通过 Express 组件,对一个 Express应用进行完整的创建,配置,部署和删除等操作。支持命令如下: +通过 Express 组件,对一个 Express 应用进行完整的创建,配置,部署和删除等操作。支持命令如下: 1. [安装](#1-安装) 2. [创建](#2-创建) @@ -23,7 +23,7 @@ Express 组件通过使用 serverless-tencent 的基础组件如API网关组件 ### 1. 安装 -通过 npm 安装 serverless +通过 npm 安装 serverless ```console $ npm install -g serverless @@ -38,12 +38,14 @@ $ touch serverless.yml ``` 初始化一个新的 npm 包,并安装 Express: + ``` npm init # 创建后持续回车 npm i --save express # 安装express ``` 创建一个 `app.js`文件,并在其中创建您的 Express App: + ```js const express = require('express') const app = express() @@ -66,11 +68,10 @@ module.exports = app express: component: '@serverless/tencent-express' inputs: - region: ap-shanghai - + region: ap-guangzhou ``` -* [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) +- [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) ### 4. 部署 @@ -88,60 +89,73 @@ $ sls --debug DEBUG ─ Creating the template's components graph. DEBUG ─ Syncing template state. DEBUG ─ Executing the template's components graph. - DEBUG ─ Compressing function ExpressComponent_7xRrrd file to /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip. - DEBUG ─ Compressed function ExpressComponent_7xRrrd file successful - DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-shanghai-code]. sls-cloudfunction-default-ExpressComponent_7xRrrd-1572512568.zip - DEBUG ─ Uploaded package successful /Users/dfounderliu/Desktop/temp/code/.serverless/ExpressComponent_7xRrrd.zip - DEBUG ─ Creating function ExpressComponent_7xRrrd - DEBUG ─ Created function ExpressComponent_7xRrrd successful - DEBUG ─ Starting API-Gateway deployment with name express.TencentApiGateway in the ap-shanghai region - DEBUG ─ Using last time deploy service id service-n0vs2ohb - DEBUG ─ Updating service with serviceId service-n0vs2ohb. - DEBUG ─ Endpoint ANY / already exists with id api-9z60urs4. - DEBUG ─ Updating api with api id api-9z60urs4. - DEBUG ─ Service with id api-9z60urs4 updated. - DEBUG ─ Deploying service with id service-n0vs2ohb. - DEBUG ─ Deployment successful for the api named express.TencentApiGateway in the ap-shanghai region. - - express: - region: ap-shanghai - functionName: ExpressComponent_7xRrrd - apiGatewayServiceId: service-n0vs2ohb - url: http://service-n0vs2ohb-1300415943.ap-shanghai.apigateway.myqcloud.com/release/ - - 36s › express › done - + DEBUG ─ Generating serverless handler... + DEBUG ─ Generated serverless handler successfully. + DEBUG ─ Compressing function express-test file to /Users/yugasun/Desktop/Develop/serverless/tencent-express/example/.serverless/express-test.zip. + DEBUG ─ Compressed function express-test file successful + DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-guangzhou-code]. sls-cloudfunction-default-express-test-1584355868.zip + DEBUG ─ Uploaded package successful /Users/yugasun/Desktop/Develop/serverless/tencent-express/example/.serverless/express-test.zip + DEBUG ─ Creating function express-test + DEBUG ─ Created function express-test successful + DEBUG ─ Setting tags for function express-test + DEBUG ─ Creating trigger for function express-test + DEBUG ─ Deployed function express-test successful + DEBUG ─ Starting API-Gateway deployment with name ap-guangzhou-apigateway in the ap-guangzhou region + DEBUG ─ Service with ID service-97m9tn6o created. + DEBUG ─ API with id api-pvsf67t8 created. + DEBUG ─ Deploying service with id service-97m9tn6o. + DEBUG ─ Deployment successful for the api named ap-guangzhou-apigateway in the ap-guangzhou region. + + ExpressFunc: + functionName: express-test + functionOutputs: + ap-guangzhou: + Name: express-test + Runtime: Nodejs8.9 + Handler: serverless-handler.handler + MemorySize: 128 + Timeout: 3 + Region: ap-guangzhou + Namespace: default + Description: This is a template function + region: ap-guangzhou + apiGatewayServiceId: service-97m9tn6o + url: https://service-97m9tn6o-1251556596.gz.apigw.tencentcs.com/test/ + cns: (empty array) + + 14s › ExpressFunc › done ``` -部署完毕后,可以在浏览器中访问返回的链接,看到对应的express返回值。 + +部署完毕后,可以在浏览器中访问返回的链接,看到对应的 express 返回值。 ### 5. 移除 -通过以下命令移除部署的存储桶 +通过以下命令移除部署的 Express 服务: ``` $ sls remove --debug DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removed function ExpressComponent_MHrAzr successful - DEBUG ─ Removing any previously deployed API. api-kf2hxrhc - DEBUG ─ Removing any previously deployed service. service-4ndfl6pz + DEBUG ─ Removed function express-test successful + DEBUG ─ Removing any previously deployed API. api-pvsf67t8 + DEBUG ─ Removing any previously deployed service. service-97m9tn6o - 13s › express › done + 6s › ExpressFunc › done ``` ### 账号配置(可选) -当前默认支持CLI扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 `.env` 文件 +当前默认支持 CLI 扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 `.env` 文件 ```console $ touch .env # 腾讯云的配置信息 ``` -在 `.env` 文件中配置腾讯云的SecretId和SecretKey信息并保存 +在 `.env` 文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存 如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 -如果已有腾讯云账号,可以在[API密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`. +如果已有腾讯云账号,可以在[API 密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`. ``` # .env diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..fadb51a --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,9 @@ +const Configuration = { + /* + * Resolve and load @commitlint/config-conventional from node_modules. + * Referenced packages must be installed + */ + extends: ['@commitlint/config-conventional'] +} + +module.exports = Configuration diff --git a/example/app.js b/example/app.js new file mode 100644 index 0000000..ef92f0a --- /dev/null +++ b/example/app.js @@ -0,0 +1,26 @@ +const express = require('express') +const app = express() + +app.get('/', function(req, res) { + console.log('Current environment: ', process.env.RUN_ENV) + res.cookie('c1', '1', { + maxAge: 315000000, + path: '/', + httpOnly: false, + overwrite: true + }) + res.cookie('c2', 2, { + maxAge: 315000000, + path: '/', + httpOnly: false, + overwrite: true + }) + res.send({ + message: 'Hello Express', + query: req.query, + runEnv: process.env.RUN_ENV + }) +}) + +// don't forget to export! +module.exports = app diff --git a/example/package.json b/example/package.json new file mode 100644 index 0000000..daf4e7c --- /dev/null +++ b/example/package.json @@ -0,0 +1,14 @@ +{ + "name": "express-test", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "yugasun", + "license": "MIT", + "dependencies": { + "express": "^4.17.1" + } +} diff --git a/example/serverless.yml b/example/serverless.yml new file mode 100644 index 0000000..af62272 --- /dev/null +++ b/example/serverless.yml @@ -0,0 +1,14 @@ +ExpressFunc: + # component: '@serverless/tencent-express' + component: ../ + inputs: + functionName: express-function + region: ap-guangzhou + code: ./ + exclude: + - .env + apigatewayConf: + protocols: + - http + - https + environment: test diff --git a/lib/resolve-cached-handler-path/generate.js b/lib/resolve-cached-handler-path/generate.js deleted file mode 100644 index 9ab1973..0000000 --- a/lib/resolve-cached-handler-path/generate.js +++ /dev/null @@ -1,25 +0,0 @@ -const path = require('path') -const fse = require('fs-extra') -const webmake = require('webmake') -const Terser = require('terser') -const resolvePath = require('./resolve-path') - -const handlerModulePath = path.join(__dirname, '../../lambda-handler.js') - -module.exports = async ({ lambdaHandlerMode }) => { - const cachedHandlerPath = resolvePath({ lambdaHandlerMode }) - let bundleCode = await new Promise((resolve, reject) => - webmake(handlerModulePath, { ignoreErrors: true, cjs: true }, (error, code) => { - error ? reject(error) : resolve(code) - }) - ) - if (lambdaHandlerMode !== 'dev') { - const minifyResult = Terser.minify(bundleCode) - if (minifyResult.error) { - throw minifyResult.error - } - bundleCode = minifyResult.code - } - await fse.ensureDir(path.dirname(cachedHandlerPath)) - return fse.writeFile(cachedHandlerPath, bundleCode) -} diff --git a/lib/resolve-cached-handler-path/index.js b/lib/resolve-cached-handler-path/index.js deleted file mode 100644 index 2ae840e..0000000 --- a/lib/resolve-cached-handler-path/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const fse = require('fs-extra') -const generateHandler = require('./generate') -const resolvePath = require('./resolve-path') - -module.exports = async (inputs) => { - const cachedHandlerPath = resolvePath(inputs) - if (!(await fse.pathExists(cachedHandlerPath))) { - await generateHandler(inputs) - } - return cachedHandlerPath -} diff --git a/lib/resolve-cached-handler-path/resolve-path.js b/lib/resolve-cached-handler-path/resolve-path.js deleted file mode 100644 index 2df47c4..0000000 --- a/lib/resolve-cached-handler-path/resolve-path.js +++ /dev/null @@ -1,11 +0,0 @@ -const os = require('os') -const path = require('path') -const { version } = require('../../package') - -module.exports = ({ lambdaHandlerMode }) => - path.join( - os.homedir(), - '.serverless/cache/tencent-express', - version, - `serverless-handler${lambdaHandlerMode === 'dev' ? '-dev' : ''}.js` - ) diff --git a/package.json b/package.json index 733c367..fbdadbb 100755 --- a/package.json +++ b/package.json @@ -7,36 +7,55 @@ "access": "public" }, "scripts": { + "commitlint": "commitlint -f HEAD@{15}", "test": "tape *.test.js", - "lint": "eslint . --fix --cache", + "lint": "eslint --ext .js,.ts,.tsx .", + "lint:fix": "eslint --fix --ext .js,.ts,.tsx .", + "prettier": "prettier --check **/*.{css,html,js,json,md,yaml,yml}", + "prettier:fix": "prettier --write **/*.{css,html,js,json,md,yaml,yml}", "release": "standard-version" }, + "author": "Tencent Cloud, Inc.", + "license": "Apache-2.0", + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, + "lint-staged": { + "**/*.{js,ts,tsx}": [ + "eslint --fix --ext .js,.ts,.tsx .", + "git add ." + ], + "**/*.{css,html,js,json,md,yaml,yml}": [ + "npm run prettier:fix", + "git add ." + ] + }, "standard-version": { "skip": { "tag": false } }, - "author": "Serverless, Inc.", - "license": "Apache", "dependencies": { - "@serverless/core": "^1.0.0", - "@serverless/tencent-apigateway": "^2.1.4", - "@serverless/tencent-scf": "^3.0.0", - "ext": "^1.4.0", - "fs-extra": "^8.1.0", + "@serverless/core": "^1.1.2", + "@serverless/tencent-framework": "^0.0.4", + "@ygkit/bundler": "^0.0.4", "tencent-serverless-http": "^1.0.5", - "terser": "^4.6.3", - "type": "^2.0.0", - "webmake": "^1.1.0" + "type": "^2.0.0" }, "devDependencies": { + "@commitlint/cli": "^8.2.0", + "@commitlint/config-conventional": "^8.2.0", "babel-eslint": "9.0.0", "eslint": "5.6.0", "eslint-config-prettier": "^3.6.0", - "eslint-plugin-import": "^2.18.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-prettier": "^3.0.1", - "prettier": "^1.18.2", - "standard-version": "^7.1.0", - "tape": "^4.11.0" + "husky": "^3.1.0", + "lint-staged": "^9.5.0", + "prettier": "^1.15.3", + "standard-version": "^7.0.1" } } diff --git a/prettier.config.js b/prettier.config.js index e75727a..f3045f0 100755 --- a/prettier.config.js +++ b/prettier.config.js @@ -6,4 +6,3 @@ module.exports = { tabWidth: 2, trailingComma: 'none' } - diff --git a/serverless.js b/serverless.js index ba2783c..2faa53a 100755 --- a/serverless.js +++ b/serverless.js @@ -1,131 +1,3 @@ -const path = require('path') -const { Component, utils } = require('@serverless/core') -const random = require('ext/string/random') -const ensureString = require('type/string/ensure') -const ensureIterable = require('type/iterable/ensure') -const ensurePlainObject = require('type/plain-object/ensure') -const resolveCachedHandlerPath = require('./lib/resolve-cached-handler-path') +const Component = require('./src') -class TencentExpress extends Component { - getDefaultProtocol(protocols) { - if (protocols.map((i) => i.toLowerCase()).includes('https')) { - return 'https' - } - return 'http' - } - - async default(inputs = {}) { - inputs.name = - ensureString(inputs.functionName, { isOptional: true }) || - this.state.functionName || - `ExpressComponent_${random({ length: 6 })}` - - inputs.codeUri = ensureString(inputs.code, { isOptional: true }) || process.cwd() - inputs.region = ensureString(inputs.region, { default: 'ap-guangzhou' }) - inputs.namespace = ensureString(inputs.namespace, { default: 'default' }) - inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) - inputs.exclude = ensureIterable(inputs.exclude, { default: [], ensureItem: ensureString }) - inputs.apigatewayConf = ensurePlainObject(inputs.apigatewayConf, { - default: {} - }) - - const appFile = path.resolve(inputs.codeUri, 'app.js') - if (!(await utils.fileExists(appFile))) { - throw new Error(`app.js not found in ${inputs.codeUri}`) - } - - const cachedHandlerPath = await resolveCachedHandlerPath(inputs) - inputs.include.push(cachedHandlerPath) - inputs.exclude.push('.git/**', '.gitignore', '.serverless', '.DS_Store') - - inputs.handler = `${path.basename(cachedHandlerPath, '.js')}.handler` - inputs.runtime = 'Nodejs8.9' - - const tencentCloudFunction = await this.load('@serverless/tencent-scf') - - if (inputs.functionConf) { - inputs.timeout = inputs.functionConf.timeout ? inputs.functionConf.timeout : 3 - inputs.memorySize = inputs.functionConf.memorySize ? inputs.functionConf.memorySize : 128 - if (inputs.functionConf.environment) { - inputs.environment = inputs.functionConf.environment - } - if (inputs.functionConf.vpcConfig) { - inputs.vpcConfig = inputs.functionConf.vpcConfig - } - } - - inputs.fromClientRemark = inputs.fromClientRemark || 'tencent-express' - const tencentCloudFunctionOutputs = await tencentCloudFunction(inputs) - - const outputs = { - region: inputs.region, - functionName: inputs.name - } - - // only user set apigatewayConf.isDisabled to `true`, do not create api - if (!inputs.apigatewayConf.isDisabled) { - const tencentApiGateway = await this.load('@serverless/tencent-apigateway') - const apigwParam = { - serviceName: inputs.serviceName, - description: 'Serverless Framework tencent-express Component', - serviceId: inputs.serviceId, - region: inputs.region, - protocols: - inputs.apigatewayConf && inputs.apigatewayConf.protocols - ? inputs.apigatewayConf.protocols - : ['http'], - environment: - inputs.apigatewayConf && inputs.apigatewayConf.environment - ? inputs.apigatewayConf.environment - : 'release', - endpoints: [ - { - path: '/', - method: 'ANY', - function: { - isIntegratedResponse: true, - functionName: tencentCloudFunctionOutputs.Name, - functionNamespace: inputs.namespace - } - } - ], - customDomain: inputs.apigatewayConf.customDomain - } - if (inputs.apigatewayConf && inputs.apigatewayConf.usagePlan) { - apigwParam.endpoints[0].usagePlan = inputs.apigatewayConf.usagePlan - } - if (inputs.apigatewayConf && inputs.apigatewayConf.auth) { - apigwParam.endpoints[0].auth = inputs.apigatewayConf.auth - } - - apigwParam.fromClientRemark = inputs.fromClientRemark || 'tencent-express' - const tencentApiGatewayOutputs = await tencentApiGateway(apigwParam) - - outputs.apiGatewayServiceId = tencentApiGatewayOutputs.serviceId - outputs.url = `${this.getDefaultProtocol(tencentApiGatewayOutputs.protocols)}://${ - tencentApiGatewayOutputs.subDomain - }/${tencentApiGatewayOutputs.environment}/` - - if (tencentApiGatewayOutputs.customDomains) { - outputs.customDomains = tencentApiGatewayOutputs.customDomains - } - } - - return outputs - } - - async remove(inputs = {}) { - const removeInput = { - fromClientRemark: inputs.fromClientRemark || 'tencent-express' - } - const tencentCloudFunction = await this.load('@serverless/tencent-scf') - const tencentApiGateway = await this.load('@serverless/tencent-apigateway') - - await tencentCloudFunction.remove(removeInput) - await tencentApiGateway.remove(removeInput) - - return {} - } -} - -module.exports = TencentExpress +module.exports = Component diff --git a/serverless.test.js b/serverless.test.js deleted file mode 100644 index 0069f7b..0000000 --- a/serverless.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape') - -const Component = require('./serverless') - -test('getDefaultProtocol()', (t) => { - t.plan(5) - - const comp = new Component() - t.equal(comp.getDefaultProtocol(['http']), 'http') - t.equal(comp.getDefaultProtocol(['https']), 'https') - t.equal(comp.getDefaultProtocol(['http', 'https']), 'https') - t.equal(comp.getDefaultProtocol(['HTTP', 'hTTpS']), 'https') - t.equal(comp.getDefaultProtocol(['http', 'ftp']), 'http') -}) diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..56b7df8 --- /dev/null +++ b/src/index.js @@ -0,0 +1,63 @@ +const os = require('os') +const ensureIterable = require('type/iterable/ensure') +const ensureString = require('type/string/ensure') +const path = require('path') +const fs = require('fs') +const { Component } = require('@serverless/core') +const { bundler } = require('@ygkit/bundler') +const pkg = require('../package.json') + +const DEFAULTS = { + runtime: 'Nodejs8.9' +} + +const framework = 'express' + +class TencentComponent extends Component { + async default(inputs = {}) { + inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) + inputs.runtime = DEFAULTS.runtime + + const cachePath = path.join( + os.homedir(), + `.serverless/cache/tencent-${framework}`, + pkg.version, + 'serverless-handler.js' + ) + + if (!fs.existsSync(cachePath)) { + this.context.debug('Generating serverless handler...') + await bundler({ + input: path.join(__dirname, 'shims/handler.js'), + output: cachePath + }) + this.context.debug('Generated serverless handler successfully.') + } + + inputs.handler = `${path.basename(cachePath, '.js')}.handler` + inputs.include.push(cachePath) + + const Framework = await this.load('@serverless/tencent-framework') + + const framworkOutpus = await Framework({ + ...inputs, + ...{ + framework + } + }) + + this.state = framworkOutpus + await this.save() + return framworkOutpus + } + + async remove(inputs = {}) { + const Framework = await this.load('@serverless/tencent-framework') + await Framework.remove(inputs) + this.state = {} + await this.save() + return {} + } +} + +module.exports = TencentComponent diff --git a/lambda-handler.js b/src/shims/handler.js similarity index 100% rename from lambda-handler.js rename to src/shims/handler.js From 04def77be05f8bc2ff60c6d69d3ec9b0bb77564d Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 17 Mar 2020 11:33:54 +0800 Subject: [PATCH 78/93] chore(release): 3.0.0 --- CHANGELOG.md | 15 +++++++++------ package.json | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07d1f16..c9ae5ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,23 +2,26 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### [2.3.3](https://github.com/serverless-components/tencent-express/compare/v2.3.2...v2.3.3) (2020-03-12) +## [3.0.0](https://github.com/serverless-components/tencent-express/compare/v2.3.3...v3.0.0) (2020-03-17) + +### Features +- refactor using framework ([c8fedc0](https://github.com/serverless-components/tencent-express/commit/c8fedc0fbc30f6eb3170b998c41a841b9f478855)) + +### [2.3.3](https://github.com/serverless-components/tencent-express/compare/v2.3.2...v2.3.3) (2020-03-12) ### Bug Fixes -* apigw namespace ([ba5178c](https://github.com/serverless-components/tencent-express/commit/ba5178c1de0bfbefdc9414cc2706fe63585e8b07)) +- apigw namespace ([ba5178c](https://github.com/serverless-components/tencent-express/commit/ba5178c1de0bfbefdc9414cc2706fe63585e8b07)) ### [2.3.2](https://github.com/serverless-components/tencent-express/compare/v2.3.1...v2.3.2) (2020-02-28) - ### Bug Fixes -* exclude bug ([00f4790](https://github.com/serverless-components/tencent-express/commit/00f4790853e0c4fc37d909d6dc94e1662467e27b)) +- exclude bug ([00f4790](https://github.com/serverless-components/tencent-express/commit/00f4790853e0c4fc37d909d6dc94e1662467e27b)) ### [2.3.1](https://github.com/serverless-components/tencent-express/compare/v2.3.0...v2.3.1) (2020-02-27) - ### Features -* upgrade tencent-scf, add release script ([82009f6](https://github.com/serverless-components/tencent-express/commit/82009f6659e8b0fcbc600a4f643c84534fdf60b5)) +- upgrade tencent-scf, add release script ([82009f6](https://github.com/serverless-components/tencent-express/commit/82009f6659e8b0fcbc600a4f643c84534fdf60b5)) diff --git a/package.json b/package.json index fbdadbb..c6401ef 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "2.3.3", + "version": "3.0.0", "main": "./serverless.js", "publishConfig": { "access": "public" From 2a359bbbf69cce09e5d6e1d33ae5c63249b1b9f7 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 17 Mar 2020 18:06:47 +0800 Subject: [PATCH 79/93] docs: update serverless.yml --- example/serverless.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/serverless.yml b/example/serverless.yml index af62272..3783d56 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -1,6 +1,5 @@ ExpressFunc: - # component: '@serverless/tencent-express' - component: ../ + component: '@serverless/tencent-express' inputs: functionName: express-function region: ap-guangzhou From aa1dce76abddbed2179ed0cf0b87e70b4e713bfb Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 19 Mar 2020 10:17:56 +0800 Subject: [PATCH 80/93] fix: support customize runtime --- docs/configure.md | 8 +++++--- src/index.js | 11 +++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index bd1c30e..96c91db 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -6,12 +6,13 @@ # serverless.yml express: - region: ap-shanghai + region: ap-guangzhou component: '@serverless/tencent-express' inputs: - region: ap-shanghai + region: ap-guangzhou functionName: my-function serviceName: mytest + runtime: Nodejs8.9 serviceId: service-np1uloxw code: ./code functionConf: @@ -47,7 +48,7 @@ express: serviceTimeout: 15 secretName: secret secretIds: - - AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ + - xxx ``` ## Configuration description @@ -57,6 +58,7 @@ Main param description | Param | Required/Optional | Default | Description | | --------------------------------------------------- | :---------------: | :----------: | :------------------------------------------------------------------- | | region | Optional | ap-guangzhou | | +| runtime | Optional | Nodejs8.9 | Nodejs Runtime, support: Nodejs6.10, Nodejs8.9, Nodejs10.15 | | functionName | Optional | | ServerlessCloudFunction Name | | serviceName | Optional | | API-Gateway service name, default to create a new serivce | | serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | diff --git a/src/index.js b/src/index.js index 56b7df8..51c4f90 100644 --- a/src/index.js +++ b/src/index.js @@ -8,19 +8,18 @@ const { bundler } = require('@ygkit/bundler') const pkg = require('../package.json') const DEFAULTS = { - runtime: 'Nodejs8.9' + runtime: 'Nodejs8.9', + framework: 'express' } -const framework = 'express' - class TencentComponent extends Component { async default(inputs = {}) { inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString }) - inputs.runtime = DEFAULTS.runtime + inputs.runtime = ensureString(inputs.runtime, { default: DEFAULTS.runtime }) const cachePath = path.join( os.homedir(), - `.serverless/cache/tencent-${framework}`, + `.serverless/cache/tencent-${DEFAULTS.framework}`, pkg.version, 'serverless-handler.js' ) @@ -42,7 +41,7 @@ class TencentComponent extends Component { const framworkOutpus = await Framework({ ...inputs, ...{ - framework + framework: DEFAULTS.framework } }) From e2334e17c06dcfd7792bf8f7fd6cd035d31e4573 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 19 Mar 2020 10:18:02 +0800 Subject: [PATCH 81/93] chore(release): 3.0.1 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ae5ff..7f109ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.1](https://github.com/serverless-components/tencent-express/compare/v3.0.0...v3.0.1) (2020-03-19) + +### Bug Fixes + +- support customize runtime ([aa1dce7](https://github.com/serverless-components/tencent-express/commit/aa1dce76abddbed2179ed0cf0b87e70b4e713bfb)) + ## [3.0.0](https://github.com/serverless-components/tencent-express/compare/v2.3.3...v3.0.0) (2020-03-17) ### Features diff --git a/package.json b/package.json index c6401ef..6382122 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.0", + "version": "3.0.1", "main": "./serverless.js", "publishConfig": { "access": "public" From aad3b2482d0fd14454f359bc316e1261fd4facd5 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 26 Mar 2020 11:52:14 +0800 Subject: [PATCH 82/93] fix: make runtime default Nodejs10.15 --- package.json | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6382122..ffade29 100755 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@serverless/core": "^1.1.2", - "@serverless/tencent-framework": "^0.0.4", + "@serverless/tencent-framework": "^0.0.6", "@ygkit/bundler": "^0.0.4", "tencent-serverless-http": "^1.0.5", "type": "^2.0.0" diff --git a/src/index.js b/src/index.js index 51c4f90..05059b1 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ const { bundler } = require('@ygkit/bundler') const pkg = require('../package.json') const DEFAULTS = { - runtime: 'Nodejs8.9', + runtime: 'Nodejs10.15', framework: 'express' } From c32e9de4c05cb909b0621b3f99c53fd5cc8a07b2 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 26 Mar 2020 11:52:20 +0800 Subject: [PATCH 83/93] chore(release): 3.0.2 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f109ca..ed67bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.2](https://github.com/serverless-components/tencent-express/compare/v3.0.1...v3.0.2) (2020-03-26) + +### Bug Fixes + +- make runtime default Nodejs10.15 ([aad3b24](https://github.com/serverless-components/tencent-express/commit/aad3b2482d0fd14454f359bc316e1261fd4facd5)) + ### [3.0.1](https://github.com/serverless-components/tencent-express/compare/v3.0.0...v3.0.1) (2020-03-19) ### Bug Fixes diff --git a/package.json b/package.json index ffade29..737662c 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.1", + "version": "3.0.2", "main": "./serverless.js", "publishConfig": { "access": "public" From 0ea9485c563b2b5f07803879f8ecf5ed98df40da Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 26 Mar 2020 14:45:10 +0800 Subject: [PATCH 84/93] feat: support binary types config --- README.en.md | 3 +++ README.md | 3 +++ src/shims/handler.js | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.en.md b/README.en.md index 94e67fd..dbfb207 100644 --- a/README.en.md +++ b/README.en.md @@ -64,6 +64,9 @@ app.get('/', function(req, res) { res.send('Hello Express') }) +// set binary types +// app.binaryTypes = [*/*]; + // don't forget to export! module.exports = app ``` diff --git a/README.md b/README.md index 1f0474f..a7e0bc9 100755 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ app.get('/', function(req, res) { res.send('Hello Express') }) +// set binary types +// app.binaryTypes = [*/*]; + // don't forget to export! module.exports = app ``` diff --git a/src/shims/handler.js b/src/shims/handler.js index 27f4c83..2152f72 100644 --- a/src/shims/handler.js +++ b/src/shims/handler.js @@ -2,6 +2,6 @@ const { createServer, proxy } = require('tencent-serverless-http') module.exports.handler = (event, context) => { const app = require.fromParentEnvironment('./app') - const server = createServer(app) + const server = createServer(app, null, app.binaryTypes || []) return proxy(server, event, context, 'PROMISE').promise } From 96e05e1cfaff1119cf8cb800a46086e560fc2169 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 26 Mar 2020 14:45:50 +0800 Subject: [PATCH 85/93] chore(release): 3.0.3 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed67bfa..91be7b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.3](https://github.com/serverless-components/tencent-express/compare/v3.0.2...v3.0.3) (2020-03-26) + +### Features + +- support binary types config ([0ea9485](https://github.com/serverless-components/tencent-express/commit/0ea9485c563b2b5f07803879f8ecf5ed98df40da)) + ### [3.0.2](https://github.com/serverless-components/tencent-express/compare/v3.0.1...v3.0.2) (2020-03-26) ### Bug Fixes diff --git a/package.json b/package.json index 737662c..e293012 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.2", + "version": "3.0.3", "main": "./serverless.js", "publishConfig": { "access": "public" From 71ddc280e091181aafc10aa8a1e70a53c78f04d3 Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 27 Mar 2020 23:29:56 +0800 Subject: [PATCH 86/93] fix: make default runtime to Nodejs8.9 --- README.en.md | 3 ++- README.md | 1 + example/serverless.yml | 1 + src/index.js | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index dbfb207..e90766d 100644 --- a/README.en.md +++ b/README.en.md @@ -79,7 +79,8 @@ module.exports = app express: component: '@serverless/tencent-express' inputs: - region: ap-shanghai + region: ap-guangzhou + runtime: Nodejs8.9 ``` - [Click here to view the configuration document](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) diff --git a/README.md b/README.md index a7e0bc9..111f6e2 100755 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ express: component: '@serverless/tencent-express' inputs: region: ap-guangzhou + runtime: Nodejs8.9 ``` - [点击此处查看配置文档](https://github.com/serverless-tencent/tencent-express/blob/master/docs/configure.md) diff --git a/example/serverless.yml b/example/serverless.yml index 3783d56..8752995 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -3,6 +3,7 @@ ExpressFunc: inputs: functionName: express-function region: ap-guangzhou + runtime: Nodejs8.9 code: ./ exclude: - .env diff --git a/src/index.js b/src/index.js index 05059b1..51c4f90 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ const { bundler } = require('@ygkit/bundler') const pkg = require('../package.json') const DEFAULTS = { - runtime: 'Nodejs10.15', + runtime: 'Nodejs8.9', framework: 'express' } From 32d8196631b402909a419ede003e90149924ca9e Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 27 Mar 2020 23:30:18 +0800 Subject: [PATCH 87/93] chore(release): 3.0.4 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91be7b4..feb8557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.4](https://github.com/serverless-components/tencent-express/compare/v3.0.3...v3.0.4) (2020-03-27) + +### Bug Fixes + +- make default runtime to Nodejs8.9 ([71ddc28](https://github.com/serverless-components/tencent-express/commit/71ddc280e091181aafc10aa8a1e70a53c78f04d3)) + ### [3.0.3](https://github.com/serverless-components/tencent-express/compare/v3.0.2...v3.0.3) (2020-03-26) ### Features diff --git a/package.json b/package.json index e293012..895f497 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.3", + "version": "3.0.4", "main": "./serverless.js", "publishConfig": { "access": "public" From 17df5c99852d151cea762e2ecfe9e537f735b0cf Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 3 Apr 2020 14:25:52 +0800 Subject: [PATCH 88/93] fix: update dependencies --- .npmignore | 14 +++++++++++++- package.json | 8 ++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.npmignore b/.npmignore index 035a2b4..c683303 100644 --- a/.npmignore +++ b/.npmignore @@ -8,4 +8,16 @@ coverage env.js tmp test -.vscode \ No newline at end of file +*.test.js +.vscode +yarn.lock +package-lock.json +docs +.editorconfig +.eslintignore +.eslintrc.js +.prettierignore +commitlint.config.js +prettier.config.js +node_modules +**/*/node_modules \ No newline at end of file diff --git a/package.json b/package.json index 895f497..89d8dfb 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.4", + "version": "3.0.5", "main": "./serverless.js", "publishConfig": { "access": "public" @@ -40,9 +40,9 @@ }, "dependencies": { "@serverless/core": "^1.1.2", - "@serverless/tencent-framework": "^0.0.6", - "@ygkit/bundler": "^0.0.4", - "tencent-serverless-http": "^1.0.5", + "@serverless/tencent-framework": "^0.1.1", + "@ygkit/bundler": "^0.0.5", + "tencent-serverless-http": "^1.0.7", "type": "^2.0.0" }, "devDependencies": { From 9923c82d443710a4e38e473f4a4073d8f9e601dc Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 3 Apr 2020 14:26:02 +0800 Subject: [PATCH 89/93] chore(release): 3.0.6 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index feb8557..9941d54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.6](https://github.com/serverless-components/tencent-express/compare/v3.0.4...v3.0.6) (2020-04-03) + +### Bug Fixes + +- update dependencies ([17df5c9](https://github.com/serverless-components/tencent-express/commit/17df5c99852d151cea762e2ecfe9e537f735b0cf)) + ### [3.0.4](https://github.com/serverless-components/tencent-express/compare/v3.0.3...v3.0.4) (2020-03-27) ### Bug Fixes diff --git a/package.json b/package.json index 89d8dfb..76b836b 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.5", + "version": "3.0.6", "main": "./serverless.js", "publishConfig": { "access": "public" From fa2ee0c2b30575779cb69ef49af345ffd24bf631 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Apr 2020 12:11:50 +0800 Subject: [PATCH 90/93] fix: add compatibility for node10 --- src/shims/handler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shims/handler.js b/src/shims/handler.js index 2152f72..18f0baa 100644 --- a/src/shims/handler.js +++ b/src/shims/handler.js @@ -2,6 +2,9 @@ const { createServer, proxy } = require('tencent-serverless-http') module.exports.handler = (event, context) => { const app = require.fromParentEnvironment('./app') + // compatibility for node10 + context.callbackWaitsForEmptyEventLoop = + app.callbackWaitsForEmptyEventLoop === false ? false : true const server = createServer(app, null, app.binaryTypes || []) return proxy(server, event, context, 'PROMISE').promise } From 4ba4ff32252e082e53b4dfcb025830953c6b697e Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Apr 2020 12:14:53 +0800 Subject: [PATCH 91/93] chore(release): 3.0.7 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9941d54..531e176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.7](https://github.com/serverless-components/tencent-express/compare/v3.0.6...v3.0.7) (2020-04-21) + +### Bug Fixes + +- add compatibility for node10 ([fa2ee0c](https://github.com/serverless-components/tencent-express/commit/fa2ee0c2b30575779cb69ef49af345ffd24bf631)) + ### [3.0.6](https://github.com/serverless-components/tencent-express/compare/v3.0.4...v3.0.6) (2020-04-03) ### Bug Fixes diff --git a/package.json b/package.json index 76b836b..59577a7 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.6", + "version": "3.0.7", "main": "./serverless.js", "publishConfig": { "access": "public" From b407e1a192ca4b6fbc6fc05ee71a0adf0384771c Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Apr 2020 17:15:52 +0800 Subject: [PATCH 92/93] fix: make callbackWaitsForEmptyEventLoop default false --- src/shims/handler.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shims/handler.js b/src/shims/handler.js index 18f0baa..b5044b0 100644 --- a/src/shims/handler.js +++ b/src/shims/handler.js @@ -2,9 +2,10 @@ const { createServer, proxy } = require('tencent-serverless-http') module.exports.handler = (event, context) => { const app = require.fromParentEnvironment('./app') - // compatibility for node10 + context.callbackWaitsForEmptyEventLoop = - app.callbackWaitsForEmptyEventLoop === false ? false : true + app.callbackWaitsForEmptyEventLoop === true ? true : false + const server = createServer(app, null, app.binaryTypes || []) return proxy(server, event, context, 'PROMISE').promise } From da0ffe9363eed9f521b3aa40472d66d0bf09d712 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Apr 2020 17:15:59 +0800 Subject: [PATCH 93/93] chore(release): 3.0.8 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 531e176..8c3ef6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.8](https://github.com/serverless-components/tencent-express/compare/v3.0.7...v3.0.8) (2020-04-21) + +### Bug Fixes + +- make callbackWaitsForEmptyEventLoop default false ([b407e1a](https://github.com/serverless-components/tencent-express/commit/b407e1a192ca4b6fbc6fc05ee71a0adf0384771c)) + ### [3.0.7](https://github.com/serverless-components/tencent-express/compare/v3.0.6...v3.0.7) (2020-04-21) ### Bug Fixes diff --git a/package.json b/package.json index 59577a7..4cd079f 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/tencent-express", "description": "Tencent Express Component", - "version": "3.0.7", + "version": "3.0.8", "main": "./serverless.js", "publishConfig": { "access": "public"