diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 62a5aea36..000000000 --- a/Gopkg.lock +++ /dev/null @@ -1,134 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "master" - name = "github.com/WICG/webpackage" - packages = [ - "go/signedexchange", - "go/signedexchange/cbor", - "go/signedexchange/certurl", - "go/signedexchange/internal/bigendian", - "go/signedexchange/internal/signingalgorithm", - "go/signedexchange/mice", - "go/signedexchange/structuredheader", - "go/signedexchange/version" - ] - revision = "70386c3750f2ba5fbcb6e66835df0578b2a55c13" - -[[projects]] - branch = "master" - name = "github.com/ampproject/amphtml" - packages = ["validator"] - revision = "d3df64d07ae9e9e21a94d8339f3c2d0a9b7d4261" - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/gofrs/flock" - packages = ["."] - revision = "392e7fae8f1b0bdbd67dad7237d23f618feb6dbb" - version = "v0.7.1" - -[[projects]] - name = "github.com/golang/protobuf" - packages = ["proto"] - revision = "c823c79ea1570fb5ff454033735a8e68575d1d0f" - version = "v1.3.0" - -[[projects]] - name = "github.com/google/go-cmp" - packages = [ - "cmp", - "cmp/cmpopts", - "cmp/internal/diff", - "cmp/internal/function", - "cmp/internal/value" - ] - revision = "3af367b6b30c263d47e8895973edcca9a49cf029" - version = "v0.2.0" - -[[projects]] - name = "github.com/pelletier/go-toml" - packages = ["."] - revision = "acdc4509485b587f5e675510c4f2c63e90ff68a8" - version = "v1.1.0" - -[[projects]] - name = "github.com/pkg/errors" - packages = ["."] - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/pquerna/cachecontrol" - packages = [ - ".", - "cacheobject" - ] - revision = "525d0eb5f91d30e3b1548de401b7ef9ea6898520" - -[[projects]] - name = "github.com/stretchr/testify" - packages = [ - "assert", - "require", - "suite" - ] - revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" - version = "v1.2.1" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["ocsp"] - revision = "614d502a4dac94afa3a6ce146bd1736da82514c6" - -[[projects]] - branch = "master" - name = "golang.org/x/net" - packages = [ - "html", - "html/atom", - "idna" - ] - revision = "f9ce57c11b242f0f1599cf25c89d8cb02c45295a" - -[[projects]] - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable" - ] - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "10bd66ddd0a417265606dbeca1aa951d8bc4040b79b1bc00c4b9a107d8b2fdf7" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index c21e72dbb..000000000 --- a/Gopkg.toml +++ /dev/null @@ -1,33 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -ignored = ["google.golang.org/grpc"] - -[prune] - go-tests = true - unused-packages = true - non-go = true diff --git a/cmd/gateway_server/go.mod b/cmd/gateway_server/go.mod new file mode 100644 index 000000000..e69de29bb diff --git a/fuzz_httpreq/go.mod b/fuzz_httpreq/go.mod new file mode 100644 index 000000000..e69de29bb diff --git a/fuzz_httpresp/go.mod b/fuzz_httpresp/go.mod new file mode 100644 index 000000000..e69de29bb diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..ca35455a5 --- /dev/null +++ b/go.mod @@ -0,0 +1,32 @@ +module github.com/ampproject/amppackager + +go 1.13 + +require ( + github.com/BurntSushi/toml v0.3.1 // indirect + github.com/WICG/webpackage v0.0.0-20190215052515-70386c3750f2 + github.com/ampproject/amphtml v0.0.0-20180912232012-d3df64d07ae9 + github.com/gofrs/flock v0.7.1 + github.com/golang/protobuf v1.3.0 + github.com/google/go-cmp v0.2.0 + github.com/kr/pretty v0.1.0 // indirect + github.com/pelletier/go-toml v1.1.0 + github.com/pkg/errors v0.8.0 + github.com/pquerna/cachecontrol v0.0.0-20180306154005-525d0eb5f91d + github.com/stretchr/testify v1.2.2 + golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 + golang.org/x/net v0.0.0-20190311183353-d8887717615a + golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gopkg.in/yaml.v2 v2.2.2 // indirect +) + +replace github.com/davecgh/go-spew => github.com/davecgh/go-spew v1.1.0 + +replace github.com/stretchr/testify => github.com/stretchr/testify v1.2.1 + +replace golang.org/x/crypto => golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac + +replace golang.org/x/net => golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24 + +replace golang.org/x/text => golang.org/x/text v0.3.0 diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..37ddcba4f --- /dev/null +++ b/go.sum @@ -0,0 +1,54 @@ +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/WICG/webpackage v0.0.0-20190215052515-70386c3750f2 h1:IJIQQSysq7xk5oO0/6fbYZY0ZLz/KMM+k63ZrJphef8= +github.com/WICG/webpackage v0.0.0-20190215052515-70386c3750f2/go.mod h1:RmCSqjSsrBtTrYiO+OKMBfMgztnTnFXVSapi/mNB7IA= +github.com/ampproject/amphtml v0.0.0-20180912232012-d3df64d07ae9 h1:0Du3+SEeaZ0yE4G1clQf8npsZUpf2ySFekYfoq2uNZM= +github.com/ampproject/amphtml v0.0.0-20180912232012-d3df64d07ae9/go.mod h1:VdGPUI5OhDH1JDFyOSvCz3x2Ap3YmdLvJ0QboKqoc1c= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc= +github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/golang/protobuf v1.3.0 h1:kbxbvI4Un1LUWKxufD+BiE6AEExYYgkQLQmLFqA1LFk= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/influxdata/influxdb v1.6.3/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mrichman/hargo v0.1.2-0.20190117125451-162adce4527e/go.mod h1:ycD51zRGXcO6ak4DnFPjHv4xzbgRU5tYyWDzbMzFYKw= +github.com/pelletier/go-toml v1.1.0 h1:cmiOvKzEunMsAxyhXSzpL5Q1CRKpVv0KQsnAIcSEVYM= +github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20180306154005-525d0eb5f91d h1:7gXyC293Lsm2YWgQ+0uaAFFFDO82ruiQSwc3ua+Vtlc= +github.com/pquerna/cachecontrol v0.0.0-20180306154005-525d0eb5f91d/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 h1:EICbibRW4JNKMcY+LsWmuwob+CRS1BmdRdjphAm9mH4= +github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac h1:7d7lG9fHOLdL6jZPtnV4LpI41SbohIJ1Atq7U991dMg= +golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24 h1:mEsFm194MmS9vCwxFy+zwu0EU7ZkxxMD1iH++vmGdUY= +golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/WICG/webpackage/go/signedexchange/README.md b/vendor/github.com/WICG/webpackage/go/signedexchange/README.md new file mode 100644 index 000000000..e8e733ab2 --- /dev/null +++ b/vendor/github.com/WICG/webpackage/go/signedexchange/README.md @@ -0,0 +1,159 @@ +# go/signedexchange +This directory contains a reference implementation of [Signed HTTP Exchanges](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html) format generator. + +## Overview +We currently provide two command-line tools: `gen-signedexchange` and `gen-certurl`. + +`gen-signedexchange` generates a signed exchange file. The `gen-signedexchange` command constructs an HTTP request and response pair from given command line flags, attach the cryptographic signature of the pair, and serializes the result to an output file. + +`gen-certurl` converts an X.509 certificate chain, an OCSP response, and an SCT (if one isn't already included in the certificate or OCSP response) to `application/cert-chain+cbor` format, which is defined in the [Section 3.3 of the Signed HTTP Exchanges spec](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.3.3). + +You are also welcome to use the code as a Go lib (e.g. `import "github.com/WICG/webpackage/go/signedexchange"`), but please be aware that the API is not yet stable and is subject to change any time. + +## Getting Started + +### Prerequisite +The Go environment needs to be set up in prior to using the tool. We are testing the tool on the latest version of Go. Please refer to the [Go Getting Started documentation](https://golang.org/doc/install) for the details. + +### Installation +We recommend using `go get` to install the command-line tool. + +``` +go get -u github.com/WICG/webpackage/go/signedexchange/cmd/... +``` + +### Creating our first signed exchange +In this section, we guide you to create a signed exchange file that is signed using a self-signed certificate pair. + +Here, we assume that you have an access to an HTTPS server capable of serving static content. [1] Please substitute `https://yourcdn.example.net/` URLs to your web server URL, and `example.org` to the domain for which you want to sign the exchange. + +1. Prepare a file to be enclosed in the signed exchange. This serves as the payload of the HTTP response in the signed exchange. + ``` + echo "

hi

" > payload.html + ``` + +1. Prepare a certificate and private key pair to use for signing the exchange. As of July 2018, we need to use self-signed certificate for testing, since there are no CA that issues certificate with ["CanSignHttpExchanges" extension](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#cross-origin-cert-req). To generate a signed-exchange-compatible self-signed key pair with OpenSSL, invoke: + ``` + # Generate prime256v1 ecdsa private key. + openssl ecparam -out priv.key -name prime256v1 -genkey + # Create a certificate signing request for the private key. + openssl req -new -sha256 -key priv.key -out cert.csr \ + -subj '/CN=example.org/O=Test/C=US' + # Self-sign the certificate with "CanSignHttpExchanges" extension. + openssl x509 -req -days 360 -in cert.csr -signkey priv.key -out cert.pem \ + -extfile <(echo -e "1.3.6.1.4.1.11129.2.1.22 = ASN1:NULL\nsubjectAltName=DNS:example.org") + ``` + +1. Convert the PEM certificate to `application/cert-chain+cbor` format using `gen-certurl` tool. This command will show warnings about OCSP and SCT, but you can ignore them. + ``` + # Fill in dummy data for OCSP, since the certificate is self-signed. + gen-certurl -pem cert.pem -ocsp <(echo ocsp) > cert.cbor + ``` + +1. Host the `application/cert-chain+cbor` created in Step 3 on the HTTPS server. Configure the resource to be served with `Content-Type: application/cert-chain+cbor` HTTP header. The steps below assume the `cert.cbor` is hosted at `https://yourcdn.example.net/cert.cbor`, so substitute the URL to the actual URL in below steps. + - Note: If you are using [Firebase Hosting](https://firebase.google.com/docs/hosting/) as your HTTPS server, see an example config [here](https://github.com/WICG/webpackage/blob/master/examples/firebase.json). + +1. Generate the signed exchange using `gen-signedexchange` tool. + ``` + gen-signedexchange \ + -uri https://example.org/hello.html \ + -content ./payload.html \ + -certificate cert.pem \ + -privateKey priv.key \ + -certUrl https://yourcdn.example.net/cert.cbor \ + -validityUrl https://example.org/resource.validity.msg \ + -o example.org.hello.sxg + ``` + +1. Host the signed exchange file `example.org.hello.sxg` on the HTTPS server. Configure the resource to be served with `Content-Type: application/signed-exchange;v=b2` HTTP header. + - Note: If you are using [Firebase Hosting](https://firebase.google.com/docs/hosting/) as your HTTPS server, see an example config [here](https://github.com/WICG/webpackage/blob/master/examples/firebase.json). + +1. Navigate to the signed exchange URL using a web browser supporting signed exchanges. + - As of July 2018, you can use Chrome M69 [Dev](https://www.google.com/chrome/?extra=devchannel)/[Canary](https://www.google.com/chrome/browser/canary.html) versions with a command-line flag to enable signed exchange support. + ``` + # Launch chrome dev set to ignore certificate errors of the self-signed certificate, + # with an experimental feature of signed exchange support enabled. + google-chrome-unstable \ + --user-data-dir=/tmp/udd \ + --ignore-certificate-errors-spki-list=`openssl x509 -noout -pubkey -in cert.pem | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64` \ + --enable-features=SignedHTTPExchange \ + https://yourcdn.example.net/example.org.hello.sxg + ``` + +[1]: You can deploy your own HTTPS server or use a cloud hosting service. Note that the server must support configuring "Content-Type" HTTP headers, like [Firebase Hosting](https://firebase.google.com/docs/hosting/). + +### Creating a signed exchange using a trusted certificate + +In this section, you will create a signed exchange using a certificate issued by a publicly trusted CA. + +As of July 2018, there are no CA that issues certificate with ["CanSignHttpExchanges" extension](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#cross-origin-cert-req). So, created signed exchange can be used only for testing. + +1. Get a certificate from a CA. You have to use prime256v1 ecdsa keys, as you did in the previous section. Please follow the CA's instructions. + + Assume you got a server certificate `server.pem` and an intermediate certificate `intermediates.pem`. The tools need all certificates in a single file, so concatenate them. + ``` + cat server.pem intermediates.pem > cert-chain.pem + ``` + +1. Convert the PEM certificate to `application/cert-chain+cbor` format using `gen-certurl` tool. + ``` + gen-certurl -pem cert-chain.pem > cert.cbor + ``` + If you got the warning message `Warning: Neither cert nor OCSP have embedded SCT list. Use -sctDir flag to add SCT from files.`, you need to prepare SCT files. + + Otherwise, you can skip the next step. + +1. To get SCTs, submit your certificate chain to [Certificate Transparency](http://www.certificate-transparency.org/) log servers. + + 1. Install a tool to submit certificates to log servers. + ``` + go get github.com/grahamedgecombe/ct-submit + ``` + 2. Submit your cert chain to logs as appropriate, and write out SCTs: + ``` + mkdir scts + ct-submit ct.googleapis.com/logs/argon2018 < cert-chain.pem > scts/argon2018.sct + ct-submit ct.cloudflare.com/logs/nimbus2018 < cert-chain.pem > scts/nimbus2018.sct + ``` + 3. Create a cert-chain with the obtained SCTs. + ``` + gen-certurl -pem cert-chain.pem -sctDir scts > cert.cbor + ``` + +1. Host `cert.cbor` on a HTTPS server. Please see the previous section for details. + +1. Generate the signed exchange using `gen-signedexchange` tool. `priv.key` is the private key used to create your certificate. + ``` + gen-signedexchange \ + -uri https://example.org/hello.html \ + -content ./payload.html \ + -certificate cert-chain.pem \ + -privateKey priv.key \ + -certUrl https://yourcdn.example.net/cert.cbor \ + -validityUrl https://example.org/resource.validity.msg \ + -o example.org.hello.sxg + ``` + +1. Host `example.org.hello.sxg` on a HTTPS server. Please see the previous section for details. + +1. Navigate to the signed exchange URL using a web browser supporting signed exchanges. + - As of July 2018, you can use Chrome M69 [Dev](https://www.google.com/chrome/?extra=devchannel)/[Canary](https://www.google.com/chrome/browser/canary.html) versions with the following two flags enabled: + - chrome://flags/#enable-signed-http-exchange + - chrome://flags/#allow-sxg-certs-without-extension + +### Dump a signed exchange file + +You can dump the content of your sxg file by `dump-signedexchange`. If you want to see the content of the signed exchange file `example.org.hello.sxg` you created above, run this command. + +``` +dump-signedexchange -i example.org.hello.sxg +``` + +If `-verify` command-line flag is specified, `dump-signedexchange` checks if the signed exchange is valid. + +By default, `dump-signedexchange` fetches certificate chain from network (from the URL you specified as `-certUrl` parameter of `gen-signedexchange`). But if `-cert filename` flag is given, `dump-signedexchange` reads certificates from `filename`. + +For example, If you want to verify `example.org.hello.sxg` using certificates in `cert.cbor`, run this command. +``` +dump-signedexchange -i example.org.hello.sxg -verify -cert cert.cbor +``` diff --git a/vendor/github.com/WICG/webpackage/go/signedexchange/certurl/test-cert.pem b/vendor/github.com/WICG/webpackage/go/signedexchange/certurl/test-cert.pem new file mode 100644 index 000000000..4f14c3dc2 --- /dev/null +++ b/vendor/github.com/WICG/webpackage/go/signedexchange/certurl/test-cert.pem @@ -0,0 +1,62 @@ +-----BEGIN CERTIFICATE----- +MIIF8jCCBNqgAwIBAgIQDmTF+8I2reFLFyrrQceMsDANBgkqhkiG9w0BAQsFADBw +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMS8wLQYDVQQDEyZEaWdpQ2VydCBTSEEyIEhpZ2ggQXNz +dXJhbmNlIFNlcnZlciBDQTAeFw0xNTExMDMwMDAwMDBaFw0xODExMjgxMjAwMDBa +MIGlMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxML +TG9zIEFuZ2VsZXMxPDA6BgNVBAoTM0ludGVybmV0IENvcnBvcmF0aW9uIGZvciBB +c3NpZ25lZCBOYW1lcyBhbmQgTnVtYmVyczETMBEGA1UECxMKVGVjaG5vbG9neTEY +MBYGA1UEAxMPd3d3LmV4YW1wbGUub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAs0CWL2FjPiXBl61lRfvvE0KzLJmG9LWAC3bcBjgsH6NiVVo2dt6u +Xfzi5bTm7F3K7srfUBYkLO78mraM9qizrHoIeyofrV/n+pZZJauQsPjCPxMEJnRo +D8Z4KpWKX0LyDu1SputoI4nlQ/htEhtiQnuoBfNZxF7WxcxGwEsZuS1KcXIkHl5V +RJOreKFHTaXcB1qcZ/QRaBIv0yhxvK1yBTwWddT4cli6GfHcCe3xGMaSL328Fgs3 +jYrvG29PueB6VJi/tbbPu6qTfwp/H1brqdjh29U52Bhb0fJkM9DWxCP/Cattcc7a +z8EXnCO+LK8vkhw/kAiJWPKx4RBvgy73nwIDAQABo4ICUDCCAkwwHwYDVR0jBBgw +FoAUUWj/kK8CB3U8zNllZGKiErhZcjswHQYDVR0OBBYEFKZPYB4fLdHn8SOgKpUW +5Oia6m5IMIGBBgNVHREEejB4gg93d3cuZXhhbXBsZS5vcmeCC2V4YW1wbGUuY29t +ggtleGFtcGxlLmVkdYILZXhhbXBsZS5uZXSCC2V4YW1wbGUub3Jngg93d3cuZXhh +bXBsZS5jb22CD3d3dy5leGFtcGxlLmVkdYIPd3d3LmV4YW1wbGUubmV0MA4GA1Ud +DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwdQYDVR0f +BG4wbDA0oDKgMIYuaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL3NoYTItaGEtc2Vy +dmVyLWc0LmNybDA0oDKgMIYuaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL3NoYTIt +aGEtc2VydmVyLWc0LmNybDBMBgNVHSAERTBDMDcGCWCGSAGG/WwBATAqMCgGCCsG +AQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2VydC5jb20vQ1BTMAgGBmeBDAECAjCB +gwYIKwYBBQUHAQEEdzB1MCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2Vy +dC5jb20wTQYIKwYBBQUHMAKGQWh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9E +aWdpQ2VydFNIQTJIaWdoQXNzdXJhbmNlU2VydmVyQ0EuY3J0MAwGA1UdEwEB/wQC +MAAwDQYJKoZIhvcNAQELBQADggEBAISomhGn2L0LJn5SJHuyVZ3qMIlRCIdvqe0Q +6ls+C8ctRwRO3UU3x8q8OH+2ahxlQmpzdC5al4XQzJLiLjiJ2Q1p+hub8MFiMmVP +PZjb2tZm2ipWVuMRM+zgpRVM6nVJ9F3vFfUSHOb4/JsEIUvPY+d8/Krc+kPQwLvy +ieqRbcuFjmqfyPmUv1U9QoI4TQikpw7TZU0zYZANP4C/gj4Ry48/znmUaRvy2kvI +l7gRQ21qJTK5suoiYoYNo3J9T+pXPGU7Lydz/HwW+w0DpArtAaukI8aNX4ohFUKS +wDSiIIWIWJiJGbEeIO0TIFwEVWTOnbNl/faPXpk5IRXicapqiII= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIEsTCCA5mgAwIBAgIQBOHnpNxc8vNtwCtCuF0VnzANBgkqhkiG9w0BAQsFADBs +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j +ZSBFViBSb290IENBMB4XDTEzMTAyMjEyMDAwMFoXDTI4MTAyMjEyMDAwMFowcDEL +MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 +LmRpZ2ljZXJ0LmNvbTEvMC0GA1UEAxMmRGlnaUNlcnQgU0hBMiBIaWdoIEFzc3Vy +YW5jZSBTZXJ2ZXIgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2 +4C/CJAbIbQRf1+8KZAayfSImZRauQkCbztyfn3YHPsMwVYcZuU+UDlqUH1VWtMIC +Kq/QmO4LQNfE0DtyyBSe75CxEamu0si4QzrZCwvV1ZX1QK/IHe1NnF9Xt4ZQaJn1 +itrSxwUfqJfJ3KSxgoQtxq2lnMcZgqaFD15EWCo3j/018QsIJzJa9buLnqS9UdAn +4t07QjOjBSjEuyjMmqwrIw14xnvmXnG3Sj4I+4G3FhahnSMSTeXXkgisdaScus0X +sh5ENWV/UyU50RwKmmMbGZJ0aAo3wsJSSMs5WqK24V3B3aAguCGikyZvFEohQcft +bZvySC/zA/WiaJJTL17jAgMBAAGjggFJMIIBRTASBgNVHRMBAf8ECDAGAQH/AgEA +MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw +NAYIKwYBBQUHAQEEKDAmMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2Vy +dC5jb20wSwYDVR0fBEQwQjBAoD6gPIY6aHR0cDovL2NybDQuZGlnaWNlcnQuY29t +L0RpZ2lDZXJ0SGlnaEFzc3VyYW5jZUVWUm9vdENBLmNybDA9BgNVHSAENjA0MDIG +BFUdIAAwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQ +UzAdBgNVHQ4EFgQUUWj/kK8CB3U8zNllZGKiErhZcjswHwYDVR0jBBgwFoAUsT7D +aQP4v0cB1JgmGggC72NkK8MwDQYJKoZIhvcNAQELBQADggEBABiKlYkD5m3fXPwd +aOpKj4PWUS+Na0QWnqxj9dJubISZi6qBcYRb7TROsLd5kinMLYBq8I4g4Xmk/gNH +E+r1hspZcX30BJZr01lYPf7TMSVcGDiEo+afgv2MW5gxTs14nhr9hctJqvIni5ly +/D6q1UEL2tU2ob8cbkdJf17ZSHwD2f2LSaCYJkJA69aSEaRkCldUxPUd1gJea6zu +xICaEnL6VpPX/78whQYwvwt/Tv9XBZ0k7YXDK/umdaisLRbvfXknsuvCnQsH6qqF +0wGjIChBWUMo0oHjqvbsezt3tkBigAVBRQHvFwY+3sAzm2fTYS5yh+Rp/BIAV0Ae +cPUeybQ= +-----END CERTIFICATE----- diff --git a/vendor/github.com/WICG/webpackage/go/signedexchange/test-signedexchange-expected-payload-mi.bin b/vendor/github.com/WICG/webpackage/go/signedexchange/test-signedexchange-expected-payload-mi.bin new file mode 100644 index 000000000..87f890d7b Binary files /dev/null and b/vendor/github.com/WICG/webpackage/go/signedexchange/test-signedexchange-expected-payload-mi.bin differ diff --git a/vendor/github.com/ampproject/amphtml/examples/visual-tests/amp-by-example/LICENSE.txt b/vendor/github.com/ampproject/amphtml/examples/visual-tests/amp-by-example/LICENSE.txt deleted file mode 100644 index 07f209544..000000000 --- a/vendor/github.com/ampproject/amphtml/examples/visual-tests/amp-by-example/LICENSE.txt +++ /dev/null @@ -1,204 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://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 communiampion sent - to the Licensor or its representatives, including but not limited to - communiampion 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 communiampion 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 - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015, Google 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 - - 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. diff --git a/vendor/github.com/ampproject/amphtml/examples/visual-tests/amp-by-example/sw-toolbox/LICENSE b/vendor/github.com/ampproject/amphtml/examples/visual-tests/amp-by-example/sw-toolbox/LICENSE deleted file mode 100644 index 3338b3f04..000000000 --- a/vendor/github.com/ampproject/amphtml/examples/visual-tests/amp-by-example/sw-toolbox/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://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 - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright ${copyright_attribution} - - 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. diff --git a/vendor/github.com/ampproject/amphtml/extensions/amp-access/0.1/iframe-api/LICENSE b/vendor/github.com/ampproject/amphtml/extensions/amp-access/0.1/iframe-api/LICENSE deleted file mode 100644 index 94adc85fe..000000000 --- a/vendor/github.com/ampproject/amphtml/extensions/amp-access/0.1/iframe-api/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://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 - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015, Google 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 - - 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. diff --git a/vendor/github.com/ampproject/amphtml/extensions/amp-viewer-integration/0.1/messaging/LICENSE b/vendor/github.com/ampproject/amphtml/extensions/amp-viewer-integration/0.1/messaging/LICENSE deleted file mode 100644 index 94adc85fe..000000000 --- a/vendor/github.com/ampproject/amphtml/extensions/amp-viewer-integration/0.1/messaging/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://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 - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015, Google 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 - - 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. diff --git a/vendor/github.com/ampproject/amphtml/third_party/caja/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/caja/LICENSE deleted file mode 100644 index 6b0b1270f..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/caja/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://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 - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. - diff --git a/vendor/github.com/ampproject/amphtml/third_party/closure-compiler/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/closure-compiler/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/closure-compiler/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://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 - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/vendor/github.com/ampproject/amphtml/third_party/closure-library/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/closure-library/LICENSE deleted file mode 100644 index d9a10c0d8..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/closure-library/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://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 diff --git a/vendor/github.com/ampproject/amphtml/third_party/css-escape/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/css-escape/LICENSE deleted file mode 100644 index a41e0a7ef..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/css-escape/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/ampproject/amphtml/third_party/d3-geo-projection/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/d3-geo-projection/LICENSE deleted file mode 100644 index 3d0802c3b..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/d3-geo-projection/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2013-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ampproject/amphtml/third_party/d3/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/d3/LICENSE deleted file mode 100644 index ff3f2e541..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/d3/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2010-2016, Michael Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* The name Michael Bostock may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ampproject/amphtml/third_party/mustache/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/mustache/LICENSE deleted file mode 100644 index 4df7d1aae..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/mustache/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -The MIT License - -Copyright (c) 2009 Chris Wanstrath (Ruby) -Copyright (c) 2010-2014 Jan Lehnardt (JavaScript) -Copyright (c) 2010-2015 The mustache.js community - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/ampproject/amphtml/third_party/optimized-svg-icons/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/optimized-svg-icons/LICENSE deleted file mode 100644 index b0225bcdd..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/optimized-svg-icons/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -https://opensource.org/licenses/MIT diff --git a/vendor/github.com/ampproject/amphtml/third_party/react-externs/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/react-externs/LICENSE deleted file mode 100644 index 0c06e9fbb..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/react-externs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Daniel Steigerwald - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/ampproject/amphtml/third_party/subscriptions-project/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/subscriptions-project/LICENSE deleted file mode 100644 index 94adc85fe..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/subscriptions-project/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://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 - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015, Google 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 - - 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. diff --git a/vendor/github.com/ampproject/amphtml/third_party/timeagojs/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/timeagojs/LICENSE deleted file mode 100644 index d4e09a44b..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/timeagojs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Hust.cc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/ampproject/amphtml/third_party/vega/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/vega/LICENSE deleted file mode 100644 index b5b5d2301..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/vega/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2013, Trifacta Inc. -Copyright (c) 2015, University of Washington Interactive Data Lab -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ampproject/amphtml/third_party/webcomponentsjs/LICENSE b/vendor/github.com/ampproject/amphtml/third_party/webcomponentsjs/LICENSE deleted file mode 100644 index 9353f6f46..000000000 --- a/vendor/github.com/ampproject/amphtml/third_party/webcomponentsjs/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -# License - -Everything in this repo is BSD style license unless otherwise specified. - -Copyright (c) 2015 The Polymer Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. -* Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ampproject/amphtml/validator/.eslintrc b/vendor/github.com/ampproject/amphtml/validator/.eslintrc new file mode 100644 index 000000000..e06afceef --- /dev/null +++ b/vendor/github.com/ampproject/amphtml/validator/.eslintrc @@ -0,0 +1,54 @@ +{ + "env": { + "node": true, + "jasmine": true + }, + "plugins": [ + "jasmine" + ], + "extends": [ + "plugin:jasmine/recommended" + ], + "globals": { + "amp": false, + "chrome": false, + "goog": false, + "json_testutil": false, + "parse_css": false, + "parse_srcset": false, + "parse_url": false, + "fs": false + }, + "rules": { + "amphtml-internal/no-for-of-statement": 0, + "amphtml-internal/no-has-own-property-method": 0, + "chai-expect/missing-assertion": 1, + "google-camelcase/google-camelcase": 0, + "jsdoc/check-param-names": 0, + "jsdoc/check-tag-names": 0, + "jsdoc/check-types": 0, + "jsdoc/require-param": 0, + "jsdoc/require-param-name": 0, + "jsdoc/require-param-type": 0, + "jsdoc/require-returns-type": 0, + "max-len": [1, 80, 4, { + "ignoreTrailingComments": true, + "ignoreRegExpLiterals": true, + "ignorePattern": "^import.*';|}\\ from.*;|.*require\\(.*;$|@typedef|@param|@return|@private|@const|@type|@implements", + "ignoreUrls": true + }], + "no-cond-assign": 1, + "no-div-regex": 1, + "no-multi-spaces": 0, + "no-throw-literal": 1, + "no-undef": 1, + "no-unused-vars": [1, { + "argsIgnorePattern": "^var_|opt_|unused", + "varsIgnorePattern": "AmpElement|Def|Interface$" + }], + "no-useless-concat": 1, + "no-var": 1, + "prefer-const": 1, + "require-jsdoc": 0 + } +} diff --git a/vendor/github.com/ampproject/amphtml/validator/.gitignore b/vendor/github.com/ampproject/amphtml/validator/.gitignore new file mode 100644 index 000000000..1180a740a --- /dev/null +++ b/vendor/github.com/ampproject/amphtml/validator/.gitignore @@ -0,0 +1,6 @@ +# This directory gets generated by build.py. +dist/ +# This directory gets created by npm. +node_modules/ +# The Python interpreter generates these. +*.pyc diff --git a/vendor/github.com/ampproject/amphtml/validator/OWNERS.yaml b/vendor/github.com/ampproject/amphtml/validator/OWNERS.yaml new file mode 100644 index 000000000..1803c9bef --- /dev/null +++ b/vendor/github.com/ampproject/amphtml/validator/OWNERS.yaml @@ -0,0 +1,4 @@ +- gregable +- honeybadgerdontcare +- alin04 +- twifkak diff --git a/vendor/github.com/ampproject/amphtml/validator/README.md b/vendor/github.com/ampproject/amphtml/validator/README.md new file mode 100644 index 000000000..5bfd3ad72 --- /dev/null +++ b/vendor/github.com/ampproject/amphtml/validator/README.md @@ -0,0 +1,111 @@ + + +# AMP HTML ⚡ Validator + +A validator for the +[AMP HTML format](https://github.com/ampproject/amphtml/blob/master/README.md). + +If you just want to validate a page, please see +[our documentation over at ampproject.org](https://www.ampproject.org/docs/guides/validate.html). + +## Chrome Extension +Please see [chromeextension/README.md](https://github.com/ampproject/amphtml/blob/master/validator/chromeextension/README.md). + +## Command Line Tool and Node.js API + +Please see [nodejs/README.md](https://github.com/ampproject/amphtml/blob/master/validator/nodejs/README.md). + +## Web UI + +Please see [webui/README.md](https://github.com/ampproject/amphtml/blob/master/validator/webui/README.md). + +## Building a Custom Validator + +This is only useful for development - e.g. when making changes to +`engine/validator.js` or when authoring an AMP extension, and it's rough around +the edges. Below are instructions for Linux Ubuntu 14. + +## Installation + +### Linux + +Install these packages using apt-get: + +* npm +* openjdk-7-jre +* protobuf-compiler +* python-protobuf +* python2.7 + +In addition, install Node.js v4.4.2. E.g., + [by downloading](https://nodejs.org/en/download/) or + [by using a package manager](https://nodejs.org/en/download/package-manager/) or + [by using NVM](https://github.com/creationix/nvm). + +### OSX + +Dependencies: + +* npm +* python 2.7 (should already be installed on OSX) +* [homebrew](https://brew.sh/) + * protobuf + ```sh + brew install protobuf + mkdir -p /Users/USERNAME/Library/Python/2.7/lib/python/site-packages + echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/USERNAME/Library/Python/2.7/lib/python/site-packages/homebrew.pth + ``` + + * openjdk-7-jre + ```sh + brew tap caskroom/cask + brew install Caskroom/cask/java + ``` + +### Usage + +Then, run `build.py`. This creates `dist/validator_minified.js`, which is +equivalent to the validator deployed at cdn.ampproject.org. You may now +use the `--validator_js` command line flag to +[amphtml-validator](https://www.ampproject.org/docs/guides/validate.html#command-line-tool) to use this validator. + +``` +$ amphtml-validator --validator_js dist/validator_minified.js testdata/feature_tests/several_errors.html +testdata/feature_tests/several_errors.html:23:2 The attribute 'charset' may not appear in tag 'meta name= and content='. +testdata/feature_tests/several_errors.html:26:2 The tag 'script' is disallowed except in specific forms. +testdata/feature_tests/several_errors.html:32:2 The mandatory attribute 'height' is missing in tag 'amp-img'. (see https://www.ampproject.org/docs/reference/amp-img.html) +testdata/feature_tests/several_errors.html:34:2 The attribute 'width' in tag 'amp-ad' is set to the invalid value '100%'. (see https://www.ampproject.org/docs/reference/amp-ad.html) +... +``` + +### Building on MacOS +* Download protobuf with `brew install protobuf` via [homebrew](https://brew.sh/). +* Use pip to `pip install google` and `pip install protobuf`. If you don't have pip, you can get it either via `brew install python` or [get-pip.py](https://bootstrap.pypa.io/get-pip.py). +* If your [npm](https://www.npmjs.com/) is out of date, run `npm i -g npm` to update it. + +To verify that you have the necessary prerequisites, run and verify: +``` +$ protoc --version +libprotoc 3.5.1 +``` +and +``` +$ python +>>> import google.protobuf +>>> +``` +Now `cd amphtml/validator` and run `python build.py`. diff --git a/vendor/github.com/ampproject/amphtml/validator/build.py b/vendor/github.com/ampproject/amphtml/validator/build.py new file mode 100644 index 000000000..feb98a4db --- /dev/null +++ b/vendor/github.com/ampproject/amphtml/validator/build.py @@ -0,0 +1,610 @@ +#!/usr/bin/env python2.7 +# +# Copyright 2015 The AMP HTML Authors. All Rights Reserved. +# +# 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 build script which (thus far) works on Ubuntu 14.""" + +import argparse +import glob +import logging +import os +import platform +import re +import shutil +import subprocess +import sys +import tempfile + + +def Die(msg): + """Prints error and exits with status 1. + + Args: + msg: The error message to emit + """ + print >> sys.stderr, msg + sys.exit(1) + + +def EnsureNodeJsIsInstalled(): + """Ensure Node.js is installed and that 'node' is the command to run.""" + logging.info('entering ...') + + try: + output = subprocess.check_output(['node', '--eval', 'console.log("42")']) + if output.strip() == '42': + return + except (subprocess.CalledProcessError, OSError): + pass + Die('Node.js not found. Try "apt-get install nodejs" or install NVM.') + + +def CheckPrereqs(): + """Checks that various prerequisites for this script are satisfied.""" + logging.info('entering ...') + + if platform.system() != 'Linux' and platform.system() != 'Darwin': + Die('Sorry, this script assumes Linux or Mac OS X thus far. ' + 'Please feel free to edit the source and fix it to your needs.') + + # Ensure source files are available. + for f in [ + 'validator-main.protoascii', 'validator.proto', 'validator_gen_js.py', + 'package.json', 'engine/validator.js', 'engine/validator_test.js', + 'engine/validator-in-browser.js', 'engine/tokenize-css.js', + 'engine/definitions.js', 'engine/parse-css.js', 'engine/parse-srcset.js', + 'engine/parse-url.js' + ]: + if not os.path.exists(f): + Die('%s not found. Must run in amp_validator source directory.' % f) + + # Ensure protoc is available. + try: + libprotoc_version = subprocess.check_output(['protoc', '--version']) + except (subprocess.CalledProcessError, OSError): + Die('Protobuf compiler not found. Try "apt-get install protobuf-compiler".') + + # Ensure 'libprotoc 2.5.0' or newer. + m = re.search('^(\\w+) (\\d+)\\.(\\d+)\\.(\\d+)', libprotoc_version) + if (m.group(1) != 'libprotoc' or + (int(m.group(2)), int(m.group(3)), int(m.group(4))) < (2, 5, 0)): + Die('Expected libprotoc 2.5.0 or newer, saw: %s' % libprotoc_version) + + # Ensure that the Python protobuf package is installed. + for m in ['descriptor', 'text_format']: + module = 'google.protobuf.%s' % m + try: + __import__(module) + except ImportError: + Die('%s not found. Try "apt-get install python-protobuf"' % module) + + # Ensure that yarn is installed. + try: + subprocess.check_output(['yarn', '--version']) + except (subprocess.CalledProcessError, OSError): + Die('Yarn package manager not found. Run ' + '"curl -o- -L https://yarnpkg.com/install.sh | bash" ' + 'or see https://yarnpkg.com/docs/install.') + + # Ensure JVM installed. TODO: Check for version? + try: + subprocess.check_output(['java', '-version'], stderr=subprocess.STDOUT) + except (subprocess.CalledProcessError, OSError): + Die('Java missing. Try "apt-get install openjdk-7-jre"') + logging.info('... done') + + +def SetupOutDir(out_dir): + """Sets up a clean output directory. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + assert re.match(r'^[a-zA-Z_\-0-9]+$', out_dir), 'bad out_dir: %s' % out_dir + + if os.path.exists(out_dir): + subprocess.check_call(['rm', '-rf', out_dir]) + os.mkdir(out_dir) + logging.info('... done') + + +def InstallNodeDependencies(): + """Installs the dependencies using yarn.""" + logging.info('entering ...') + # Install the project dependencies specified in package.json into + # node_modules. + logging.info('installing AMP Validator engine dependencies ...') + subprocess.check_call( + ['yarn', 'install'], + stdout=(open(os.devnull, 'wb') if os.environ.get('TRAVIS') else sys.stdout)) + logging.info('installing AMP Validator nodejs dependencies ...') + subprocess.check_call( + ['yarn', 'install'], + cwd='nodejs', + stdout=(open(os.devnull, 'wb') if os.environ.get('TRAVIS') else sys.stdout)) + logging.info('... done') + + +def GenValidatorPb2Py(out_dir): + """Calls the proto compiler to generate validator_pb2.py. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + assert re.match(r'^[a-zA-Z_\-0-9]+$', out_dir), 'bad out_dir: %s' % out_dir + + subprocess.check_call( + ['protoc', 'validator.proto', '--python_out=%s' % out_dir]) + open('%s/__init__.py' % out_dir, 'w').close() + logging.info('... done') + + +def GenValidatorProtoascii(out_dir): + """Assembles the validator protoascii file from the main and extensions. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + assert re.match(r'^[a-zA-Z_\-0-9]+$', out_dir), 'bad out_dir: %s' % out_dir + + protoascii_segments = [open('validator-main.protoascii').read()] + extensions = glob.glob('extensions/*/validator-*.protoascii') + # In the Github project, the extensions are located in a sibling directory + # to the validator rather than a child directory. + if not extensions: + extensions = glob.glob('../extensions/*/validator-*.protoascii') + extensions.sort() + for extension in extensions: + protoascii_segments.append(open(extension).read()) + f = open('%s/validator.protoascii' % out_dir, 'w') + f.write(''.join(protoascii_segments)) + f.close() + logging.info('... done') + + +def GenValidatorProtoGeneratedJs(out_dir): + """Calls validator_gen_js to generate validator-proto-generated.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + assert re.match(r'^[a-zA-Z_\-0-9]+$', out_dir), 'bad out_dir: %s' % out_dir + + # These imports happen late, within this method because they don't necessarily + # exist when the module starts running, and the ones that probably do + # are checked by CheckPrereqs. + # pylint: disable=g-import-not-at-top + from google.protobuf import text_format + from google.protobuf import descriptor + from dist import validator_pb2 + import validator_gen_js + # pylint: enable=g-import-not-at-top + out = [] + validator_gen_js.GenerateValidatorGeneratedJs( + specfile=None, + validator_pb2=validator_pb2, + generate_proto_only=True, + generate_spec_only=False, + text_format=text_format, + html_format=None, + descriptor=descriptor, + out=out) + out.append('') + f = open('%s/validator-proto-generated.js' % out_dir, 'w') + f.write('\n'.join(out)) + f.close() + logging.info('... done') + + +def GenValidatorGeneratedJs(out_dir): + """Calls validator_gen_js to generate validator-generated.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + assert re.match(r'^[a-zA-Z_\-0-9]+$', out_dir), 'bad out_dir: %s' % out_dir + + # These imports happen late, within this method because they don't necessarily + # exist when the module starts running, and the ones that probably do + # are checked by CheckPrereqs. + # pylint: disable=g-import-not-at-top + from google.protobuf import text_format + from google.protobuf import descriptor + from dist import validator_pb2 + import validator_gen_js + # pylint: enable=g-import-not-at-top + out = [] + validator_gen_js.GenerateValidatorGeneratedJs( + specfile='%s/validator.protoascii' % out_dir, + validator_pb2=validator_pb2, + generate_proto_only=False, + generate_spec_only=True, + text_format=text_format, + html_format=None, + descriptor=descriptor, + out=out) + out.append('') + f = open('%s/validator-generated.js' % out_dir, 'w') + f.write('\n'.join(out)) + f.close() + logging.info('... done') + + +def CompileWithClosure(js_files, definitions, entry_points, output_file): + """Compiles the arguments with the Closure compiler for transpilation to ES5. + + Args: + js_files: list of files to compile + definitions: list of definitions flags to closure compiler + entry_points: entry points (these won't be minimized) + output_file: name of the Javascript output file + """ + + cmd = [ + 'java', '-jar', 'node_modules/google-closure-compiler/compiler.jar', + '--language_out=ES5_STRICT', '--dependency_mode=STRICT', + '--js_output_file=%s' % output_file + ] + cmd += ['--entry_point=%s' % e for e in entry_points] + cmd += ['--output_manifest=%s' % ('%s.manifest' % output_file)] + cmd += [ + 'node_modules/google-closure-library/closure/**.js', + '!node_modules/google-closure-library/closure/**_test.js', + 'node_modules/google-closure-library/third_party/closure/**.js', + '!node_modules/google-closure-library/third_party/closure/**_test.js' + ] + cmd += js_files + cmd += definitions + subprocess.check_call(cmd) + + +def CompileValidatorMinified(out_dir): + """Generates a minified validator script, which can be imported to validate. + + Args: + out_dir: output directory + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/definitions.js', 'engine/htmlparser.js', + 'engine/parse-css.js', 'engine/parse-srcset.js', + 'engine/parse-url.js', 'engine/tokenize-css.js', + '%s/validator-generated.js' % out_dir, + '%s/validator-proto-generated.js' % out_dir, + 'engine/validator-in-browser.js', 'engine/validator.js', + 'engine/amp4ads-parse-css.js', 'engine/keyframes-parse-css.js', + 'engine/htmlparser-interface.js' + ], + definitions=[], + entry_points=[ + 'amp.validator.validateString', + 'amp.validator.renderValidationResult', + 'amp.validator.renderErrorMessage' + ], + output_file='%s/validator_minified.js' % out_dir) + logging.info('... done') + + +def RunSmokeTest(out_dir): + """Runs a smoke test (minimum valid AMP and empty html file). + + Args: + out_dir: output directory + """ + logging.info('entering ...') + # Run index.js on the minimum valid amp and observe that it passes. + p = subprocess.Popen( + [ + 'node', 'nodejs/index.js', '--validator_js', + '%s/validator_minified.js' % out_dir, + 'testdata/feature_tests/minimum_valid_amp.html', '--format=text' + ], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + (stdout, stderr) = p.communicate() + if ('testdata/feature_tests/minimum_valid_amp.html: PASS\n', '', p.returncode + ) != (stdout, stderr, 0): + Die('Smoke test failed. returncode=%d stdout="%s" stderr="%s"' % + (p.returncode, stdout, stderr)) + + # Run index.js on an empty file and observe that it fails. + p = subprocess.Popen( + [ + 'node', 'nodejs/index.js', '--validator_js', + '%s/validator_minified.js' % out_dir, + 'testdata/feature_tests/empty.html', '--format=text' + ], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + (stdout, stderr) = p.communicate() + if p.returncode != 1: + Die('smoke test failed. Expected p.returncode==1, saw: %s' % p.returncode) + if not stderr.startswith('testdata/feature_tests/empty.html:1:0 ' + 'The mandatory tag \'html'): + Die('smoke test failed; stderr was: "%s"' % stderr) + logging.info('... done') + + +def RunIndexTest(): + """Runs the index_test.js, which tests the NodeJS API. + """ + logging.info('entering ...') + p = subprocess.Popen( + ['node', './index_test.js'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd='nodejs') + (stdout, stderr) = p.communicate() + if p.returncode != 0: + Die('index_test.js failed. returncode=%d stdout="%s" stderr="%s"' % + (p.returncode, stdout, stderr)) + logging.info('... done') + + +def CompileValidatorTestMinified(out_dir): + """Runs closure compiler for validator_test.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/definitions.js', 'engine/htmlparser.js', + 'engine/parse-css.js', 'engine/parse-srcset.js', + 'engine/parse-url.js', 'engine/tokenize-css.js', + '%s/validator-generated.js' % out_dir, + '%s/validator-proto-generated.js' % out_dir, + 'engine/validator-in-browser.js', 'engine/validator.js', + 'engine/amp4ads-parse-css.js', 'engine/keyframes-parse-css.js', + 'engine/htmlparser-interface.js', 'engine/validator_test.js' + ], + definitions=[], + entry_points=['amp.validator.ValidatorTest'], + output_file='%s/validator_test_minified.js' % out_dir) + logging.info('... success') + + +def CompileHtmlparserTestMinified(out_dir): + """Runs closure compiler for htmlparser_test.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/htmlparser.js', 'engine/htmlparser-interface.js', + 'engine/htmlparser_test.js' + ], + definitions=[], + entry_points=['amp.htmlparser.HtmlParserTest'], + output_file='%s/htmlparser_test_minified.js' % out_dir) + logging.info('... success') + + +def CompileParseCssTestMinified(out_dir): + """Runs closure compiler for parse-css_test.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/definitions.js', 'engine/parse-css.js', 'engine/parse-url.js', + 'engine/tokenize-css.js', 'engine/css-selectors.js', + 'engine/json-testutil.js', 'engine/parse-css_test.js', + '%s/validator-generated.js' % out_dir, + '%s/validator-proto-generated.js' % out_dir + ], + definitions=[], + entry_points=['parse_css.ParseCssTest'], + output_file='%s/parse-css_test_minified.js' % out_dir) + logging.info('... success') + + +def CompileParseUrlTestMinified(out_dir): + """Runs closure compiler for parse-url_test.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/definitions.js', 'engine/parse-url.js', 'engine/parse-css.js', + 'engine/tokenize-css.js', 'engine/css-selectors.js', + 'engine/json-testutil.js', 'engine/parse-url_test.js', + '%s/validator-generated.js' % out_dir, + '%s/validator-proto-generated.js' % out_dir + ], + definitions=[], + entry_points=['parse_url.ParseURLTest'], + output_file='%s/parse-url_test_minified.js' % out_dir) + logging.info('... success') + + +def CompileAmp4AdsParseCssTestMinified(out_dir): + """Runs closure compiler for amp4ads-parse-css_test.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/definitions.js', 'engine/amp4ads-parse-css_test.js', + 'engine/parse-css.js', 'engine/parse-url.js', + 'engine/amp4ads-parse-css.js', 'engine/tokenize-css.js', + 'engine/css-selectors.js', 'engine/json-testutil.js', + '%s/validator-generated.js' % out_dir, + '%s/validator-proto-generated.js' % out_dir + ], + definitions=[], + entry_points=['parse_css.Amp4AdsParseCssTest'], + output_file='%s/amp4ads-parse-css_test_minified.js' % out_dir) + logging.info('... success') + + +def CompileKeyframesParseCssTestMinified(out_dir): + """Runs closure compiler for keyframes-parse-css_test.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/definitions.js', 'engine/keyframes-parse-css_test.js', + 'engine/parse-css.js', 'engine/parse-url.js', + 'engine/keyframes-parse-css.js', 'engine/tokenize-css.js', + 'engine/css-selectors.js', 'engine/json-testutil.js', + '%s/validator-generated.js' % out_dir, + '%s/validator-proto-generated.js' % out_dir + ], + definitions=[], + entry_points=['parse_css.KeyframesParseCssTest'], + output_file='%s/keyframes-parse-css_test_minified.js' % out_dir) + logging.info('... success') + + +def CompileParseSrcsetTestMinified(out_dir): + """Runs closure compiler for parse-srcset_test.js. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + CompileWithClosure( + js_files=[ + 'engine/definitions.js', 'engine/parse-srcset.js', + 'engine/json-testutil.js', 'engine/parse-srcset_test.js', + '%s/validator-generated.js' % out_dir, + '%s/validator-proto-generated.js' % out_dir + ], + definitions=[], + entry_points=['parse_srcset.ParseSrcsetTest'], + output_file='%s/parse-srcset_test_minified.js' % out_dir) + logging.info('... success') + + +def GenerateTestRunner(out_dir): + """Generates a test runner: a nodejs script that runs our minified tests. + + Args: + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + f = open('%s/test_runner' % out_dir, 'w') + extensions_dir = 'extensions' + # In the Github project, the extensions are located in a sibling directory + # to the validator rather than a child directory. + if not os.path.isdir(extensions_dir): + extensions_dir = '../extensions' + f.write("""#!/usr/bin/env node + global.assert = require('assert'); + global.fs = require('fs'); + global.path = require('path'); + var JasmineRunner = require('jasmine'); + var jasmine = new JasmineRunner(); + process.env.TESTDATA_ROOTS = 'testdata:%s' + require('./validator_test_minified'); + require('./htmlparser_test_minified'); + require('./parse-css_test_minified'); + require('./parse-url_test_minified'); + require('./amp4ads-parse-css_test_minified'); + require('./keyframes-parse-css_test_minified'); + require('./parse-srcset_test_minified'); + jasmine.onComplete(function (passed) { + process.exit(passed ? 0 : 1); + }); + jasmine.execute(); + """ % extensions_dir) + os.chmod('%s/test_runner' % out_dir, 0750) + logging.info('... success') + + +def RunTests(update_tests, out_dir): + """Runs all the minified tests. + + Args: + update_tests: a boolean indicating whether or not to update the test + output files. + out_dir: directory name of the output directory. Must not have slashes, + dots, etc. + """ + logging.info('entering ...') + env = os.environ.copy() + if update_tests: + env['UPDATE_VALIDATOR_TEST'] = '1' + subprocess.check_call(['node', '%s/test_runner' % out_dir], env=env) + logging.info('... success') + + +def Main(parsed_args): + """The main method, which executes all build steps and runs the tests.""" + logging.basicConfig( + format='[[%(filename)s %(funcName)s]] - %(message)s', + level=(logging.ERROR if os.environ.get('TRAVIS') else logging.INFO)) + EnsureNodeJsIsInstalled() + CheckPrereqs() + InstallNodeDependencies() + SetupOutDir(out_dir='dist') + GenValidatorProtoascii(out_dir='dist') + GenValidatorPb2Py(out_dir='dist') + GenValidatorProtoGeneratedJs(out_dir='dist') + GenValidatorGeneratedJs(out_dir='dist') + CompileValidatorMinified(out_dir='dist') + RunSmokeTest(out_dir='dist') + RunIndexTest() + CompileValidatorTestMinified(out_dir='dist') + CompileHtmlparserTestMinified(out_dir='dist') + CompileParseCssTestMinified(out_dir='dist') + CompileParseUrlTestMinified(out_dir='dist') + CompileAmp4AdsParseCssTestMinified(out_dir='dist') + CompileKeyframesParseCssTestMinified(out_dir='dist') + CompileParseSrcsetTestMinified(out_dir='dist') + GenerateTestRunner(out_dir='dist') + RunTests(update_tests=parsed_args.update_tests, out_dir='dist') + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description='Build script for the AMP Validator.') + parser.add_argument( + '--update_tests', + action='store_true', + help=('If True, validator_test will overwrite the .out test files with ' + 'the encountered test output.')) + Main(parser.parse_args()) diff --git a/vendor/github.com/ampproject/amphtml/validator/package.json b/vendor/github.com/ampproject/amphtml/validator/package.json new file mode 100644 index 000000000..6fc427229 --- /dev/null +++ b/vendor/github.com/ampproject/amphtml/validator/package.json @@ -0,0 +1,22 @@ +{ + "name": "amp-validator", + "version": "0.1.0", + "description": "Validator for AMP HTML (www.ampproject.org)", + "engines": { + "node": "^8.0.0" + }, + "author": "The AMP HTML Authors", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/ampproject/amphtml.git" + }, + "scripts": { + "preinstall": "node ../build-system/check-package-manager.js" + }, + "devDependencies": { + "google-closure-compiler": "20180506.0.0", + "google-closure-library": "20180506.0.0", + "jasmine": "3.1.0" + } +} diff --git a/vendor/github.com/ampproject/amphtml/validator/validator-main.protoascii b/vendor/github.com/ampproject/amphtml/validator/validator-main.protoascii new file mode 100644 index 000000000..0a8023a78 --- /dev/null +++ b/vendor/github.com/ampproject/amphtml/validator/validator-main.protoascii @@ -0,0 +1,6109 @@ +# +# Copyright 2016 The AMP HTML Authors. All Rights Reserved. +# +# 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. +# + +# This revision id refers to the validator revision id, currently a Google +# internal mechanism. When backwards incompatible changes to the validator +# engine are made, this value must be incremented to prevent old binaries +# in production from crashing. This id is not relevant to validator.js +# because thus far, engine (validator.js) and spec file +# (validator-main.protoascii) are always released together. +min_validator_revision_required: 348 + +# The spec file revision allows the validator engine to distinguish +# newer versions of the spec file. This is currently a Google internal +# mechanism, validator.js does not use this facility. However, any +# change to this file (validator-main.js) requires updating this revision id. +spec_file_revision: 733 + +styles_spec_url: "https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages" +script_spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" + +css_length_spec: { + html_format: AMP + max_bytes: 50000 + max_bytes_per_inline_style: 1000 + spec_url: "https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages" +} + +# Validator extensions. +# ===================== +# In addition to the rules in this file, the Validator honors the rules +# in the extensions/*/validator-*.protoascii files. This makes it +# easy to organize the rules for extensions next to their Javascript +# implementation. + +# Rules for AMP HTML +# (https://www.ampproject.org/docs/reference/spec) + +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: AMP4EMAIL + html_format: EXPERIMENTAL + tag_name: "!DOCTYPE" + spec_name: "html doctype" + mandatory_parent: "$ROOT" + mandatory: true + unique: true + attrs: { + name: "html" + mandatory: true + value: "" + } + spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup" +} + +# Below, we list the allowed elements in the order in which they are appear +# in the spec in section 4 "The Elements of HTML" +# (http://www.w3.org/TR/html5/single-page#html-elements). + +# 4.1 The root element +# 4.1.1 The html element +tags: { # AMP + html_format: AMP + tag_name: "HTML" + spec_name: "html ⚡ for top-level html" + mandatory: true + mandatory_parent: "!DOCTYPE" + unique: true + attrs: { + name: "⚡" + alternative_names: "amp" + mandatory: true + value: "" + } + spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup" +} +tags: { # AMP4ADS + html_format: AMP4ADS + tag_name: "HTML" + spec_name: "html ⚡4ads for top-level html" + mandatory: true + mandatory_parent: "!DOCTYPE" + unique: true + attrs: { + name: "⚡4ads" + alternative_names: "amp4ads" + mandatory: true + value: "" + } + spec_url: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/amp-a4a-format.md#a4a-format-rules" +} +tags: { # AMP4EMAIL + html_format: AMP4EMAIL + tag_name: "HTML" + spec_name: "html ⚡4email for top-level html" + mandatory: true + mandatory_parent: "!DOCTYPE" + unique: true + attrs: { + name: "⚡4email" + alternative_names: "amp4email" + mandatory: true + value: "" + } + spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup" +} + +# 4.2 Document metadata +# 4.2.1 The head element +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: AMP4EMAIL + html_format: EXPERIMENTAL + tag_name: "HEAD" + mandatory: true + mandatory_parent: "HTML" + unique: true + spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup" +} +# 4.2.2 The title element +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: AMP4EMAIL + html_format: EXPERIMENTAL + tag_name: "TITLE" + spec_name: "title" + attrs: { name: "[text]" } +} +# 4.2.3 the base element +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "BASE" + unique: true + mandatory_parent: "HEAD" + # We only allow "/" right now because other value can cause havoc with PWA + # implementations. In the future, it may be possible to widen this to any + # absolute URL. + attrs: { + name: "href" + value: "/" + } + attrs: { + name: "target" + value_casei: "_blank" + value_casei: "_self" + value_casei: "_top" + } +} +# Disallowed. +# 4.2.4 the link element +attr_lists: { + name: "common-link-attrs" + attrs: { name: "charset" value_casei: "utf-8" } + attrs: { name: "color" } + attrs: { name: "crossorigin" } + attrs: { name: "hreflang" } + attrs: { name: "media" } + attrs: { name: "sizes" } + attrs: { name: "target" } + attrs: { name: "type" } +} +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "LINK" + spec_name: "link rel=" + disallowed_ancestor: "TEMPLATE" + attrs: { name: "href" } + attrs: { + name: "rel" + mandatory: true + # There are a wide variety of link rel attribute values used in the wild as + # this attribute is used as meta-data for any html client such as search + # engines. Unfortunately, there are also a number of attribute values which + # have behavioral impacts in modern browsers. A few places where these are + # loosely documented include: + # - http://microformats.org/wiki/existing-rel-values + # - http://www.iana.org/assignments/link-relations/link-relations.xhtml + # - https://html.spec.whatwg.org/#linkTypes + # We blacklist a few specific values which have browser behavior that could + # negatively impact performance. + # TODO(gregable): This could be improved such that the error message would + # report which value in a list is the one causing problems. + blacklisted_value_regex: "(^|\\s)(" # Values are space separated. + "canonical|" # Handled separately below, has specific requirements. + "components|" + "import|" + "manifest|" # Handled separately below, has specific requirements. + "preload|" # Handled separately below, has specific requirements. + "serviceworker|" + "stylesheet|" # Handled separately below, has specific requirements. + "subresource|" + ")(\\s|$)" + # It is worth noting that user-authored tags for dns-prefectch, preconnect, + # prefetch, and prerender will be disabled by the transformations applied + # in the AMP Cache. Therefore, these hints will only be used on publisher + # origins, not on the AMP Cache. + } + attr_lists: "common-link-attrs" + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +tags: { + html_format: AMP + html_format: EXPERIMENTAL + tag_name: "LINK" + spec_name: "link rel=canonical" + mandatory_parent: "HEAD" + mandatory: true + unique: true + attrs: { + name: "href" + mandatory: true + value_url: { + protocol: "http" + protocol: "https" + } + blacklisted_value_regex: "__amp_source_origin" + } + attrs: { + name: "rel" + value_casei: "canonical" + mandatory: true + dispatch_key: NAME_VALUE_DISPATCH + } + attr_lists: "common-link-attrs" + spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup" +} +# Allow but not +tags: { + html_format: AMP + html_format: AMP4ADS + tag_name: "LINK" + spec_name: "link rel=manifest" + mandatory_parent: "HEAD" + satisfies: "amp-app-banner data source" + attrs: { + name: "href" + mandatory: true + value_url: { + protocol: "https" + } + blacklisted_value_regex: "__amp_source_origin" + } + attrs: { + name: "rel" + value_casei: "manifest" + mandatory: true + dispatch_key: NAME_VALUE_DISPATCH + } + attr_lists: "common-link-attrs" + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "LINK" + spec_name: "link rel=preload" + disallowed_ancestor: "TEMPLATE" + attrs: { name: "as" } + attrs: { name: "href" } + attrs: { + name: "rel" + mandatory: true + value_casei: "preload" + dispatch_key: NAME_VALUE_DISPATCH + } + attr_lists: "common-link-attrs" + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# Whitelisted font providers +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "LINK" + spec_name: "link rel=stylesheet for fonts" + mandatory_parent: "HEAD" + attrs: { name: "async" } + attrs: { name: "crossorigin" } # SRI attribute (https://www.w3.org/TR/SRI/) + attrs: { + name: "href" + mandatory: true + value_regex: "https://cdn\\.materialdesignicons\\.com/" + "([0-9]+\\.?)+/css/materialdesignicons\\.min\\.css|" + "https://cloud\\.typography\\.com/" + "[0-9]*/[0-9]*/css/fonts\\.css|" + "https://fast\\.fonts\\.net/.*|" + "https://fonts\\.googleapis\\.com/css\\?.*|" + "https://fonts\\.googleapis\\.com/icon\\?.*|" + "https://fonts\\.googleapis\\.com/earlyaccess/.*\\.css|" + "https://maxcdn\\.bootstrapcdn\\.com/font-awesome/" + "([0-9]+\\.?)+/css/font-awesome\\.min\\.css(\\?.*)?|" + "https://(use|pro)\\.fontawesome\\.com/releases/v([0-9]+\\.?)+" + "/css/(all|brands|solid|regular|light|fontawesome)\\.css|" + "https://use\\.typekit\\.net/[\\w\\p{L}\\p{N}_]+\\.css" + } + attrs: { name: "integrity" } # SRI attribute (https://www.w3.org/TR/SRI/) + attrs: { name: "media" } + attrs: { + name: "rel" + mandatory: true + value_casei: "stylesheet" + dispatch_key: NAME_VALUE_DISPATCH + } + attrs: { + name: "type" + value_casei: "text/css" + } + spec_url: "https://www.ampproject.org/docs/reference/spec#custom-fonts" +} +# itemprop=sameAs is allowed per schema.org, needs not be in head +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "LINK" + spec_name: "link itemprop=sameAs" + attrs: { + name: "href" + mandatory: true + } + attrs: { + name: "itemprop" + mandatory: true + value_casei: "sameas" + dispatch_key: NAME_VALUE_DISPATCH + } + attr_lists: "common-link-attrs" + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# rel= isn't mandatory when itemprop= is present. +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "LINK" + spec_name: "link itemprop=" + attrs: { + name: "href" + mandatory: true + } + attrs: { + name: "itemprop" + mandatory: true + } + attr_lists: "common-link-attrs" + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# rel= isn't mandatory when property= is present. +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "LINK" + spec_name: "link property=" + attrs: { + name: "href" + mandatory: true + } + attrs: { + name: "property" + mandatory: true + } + attr_lists: "common-link-attrs" + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# 4.2.5 the meta element +# Charset must be utf8, and a specific viewport is required. +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: AMP4EMAIL + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta charset=utf-8" + mandatory: true + mandatory_parent: "HEAD" + unique: true + attrs: { + dispatch_key: NAME_DISPATCH + name: "charset" + mandatory: true + value_casei: "utf-8" + } + spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup" +} +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta name=viewport" + mandatory: true + mandatory_parent: "HEAD" + unique: true + attrs: { + name: "content" + mandatory: true + value_properties: { + properties: { name: "width" mandatory: true value: "device-width" } + properties: { name: "height" } + properties: { name: "initial-scale" } + properties: { name: "minimum-scale" mandatory: true value_double: 1.0 } + properties: { name: "maximum-scale" } + properties: { name: "shrink-to-fit" } + properties: { name: "user-scalable" } + properties: { name: "viewport-fit" } + } + } + attrs: { + name: "name" + mandatory: true + value: "viewport" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup" +} +# This tag is a hack to tell IE 10 to use its modern rendering engine as opposed +# to the IE8 engine. So it's explicitly allowed. +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=X-UA-Compatible" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + value_properties: { + properties: { name: "ie" value: "edge" } + properties: { name: "chrome" value: "1" } + } + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "x-ua-compatible" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# Tag specific to apple-itunes-app installs, see also . +tags: { + html_format: AMP + html_format: AMP4ADS + tag_name: "META" + spec_name: "meta name=apple-itunes-app" + mandatory_parent: "HEAD" + satisfies: "amp-app-banner data source" + attrs: { + name: "content" + mandatory: true + value_regex: ".*app-id=.*" + } + attrs: { + name: "name" + value_casei: "apple-itunes-app" + mandatory: true + dispatch_key: NAME_VALUE_DISPATCH + } + + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# AMP & AMP4ADS metadata, name=amp-experiments-opt-in +# https://github.com/lannka/amphtml/blob/master/tools/experiments/README.md +tags: { + html_format: AMP + html_format: AMP4ADS + tag_name: "META" + spec_name: "meta name=amp-experiments-opt-in" + mandatory_parent: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-experiments-opt-in" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP metadata, name=amp-3p-iframe-src +tags: { + html_format: AMP + tag_name: "META" + spec_name: "meta name=amp-3p-iframe-src" + mandatory_parent: "HEAD" + attrs: { + name: "content" + mandatory: true + value_url: { + protocol: "https" + } + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-3p-iframe-src" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/components/amp-ad" +} +# AMP metadata, name=amp-experiment-token +# Related to AMP Origin Experiments +tags: { + html_format: AMP + tag_name: "META" + spec_name: "meta name=amp-experiment-token" + mandatory_parent: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-experiment-token" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP metadata, name=amp-link-variable-allowed-origin +# https://github.com/ampproject/amphtml/issues/8132 +tags: { + html_format: AMP + tag_name: "META" + spec_name: "meta name=amp-link-variable-allowed-origin" + mandatory_parent: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-link-variable-allowed-origin" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP metadata, name=amp-google-client-id-api +tags: { + html_format: AMP + tag_name: "META" + spec_name: "meta name=amp-google-clientid-id-api" + mandatory_parent: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-google-client-id-api" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP metadata, name=amp-ad-doubleclick-sra +# Enables SRA for amp-ad doubleclick Fast Fetch +tags: { + html_format: AMP + tag_name: "META" + spec_name: "meta name=amp-ad-doubleclick-sra" + mandatory_parent: "HEAD" + attrs: { + name: "name" + mandatory: true + value_casei: "amp-ad-doubleclick-sra" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP4ADS metadata, name=amp4ads-id +# https://github.com/ampproject/amphtml/issues/7730 +tags: { + html_format: AMP4ADS + tag_name: "META" + spec_name: "meta name=amp4ads-id" + mandatory_parent: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp4ads-id" + dispatch_key: NAME_VALUE_DISPATCH + } +} +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta name= and content=" + attrs: { name: "content" } + attrs: { name: "itemprop" } # itemprop is non-standard, but commonly seen. + # The validator accepts any name="..." attribute values except + # for a few specific name values which have more specific rules above or + # are altogether disallowed. + attrs: { + name: "name" + blacklisted_value_regex: "(^|\\s)(" + "amp-.*|" + "amp4ads-.*|" + "apple-itunes-app|" + "content-disposition|" + "revisit-after|" + "viewport" + ")(\\s|$)" + } + attrs: { name: "property" } # property is non-standard, but commonly seen. + # scheme is used by Dublin Core, see issue #13993 + attrs: { name: "scheme" } +} +# This is redundant with meta charset, but also harmless as long as it's +# set to utf-8. +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=Content-Type" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + value_casei: "text/html; charset=utf-8" + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "content-type" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv content-language tag +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=content-language" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "content-language" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv pics-label tag +# https://www.w3.org/PICS/ +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=pics-label" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "pics-label" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv imagetoolbar tag +# https://msdn.microsoft.com/en-us/library/ms532986(v=vs.85).aspx +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=imagetoolbar" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "imagetoolbar" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv content-style-type +# https://www.w3.org/TR/REC-html40/present/styles#h-14.2.1 +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=Content-Style-Type" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + value_casei: "text/css" + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "content-style-type" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv content-script-type +# https://www.w3.org/TR/html4/interact/scripts#h-18.2.2.1 +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=Content-Script-Type" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + value_casei: "text/javascript" + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "content-script-type" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv origin-trial tag +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=origin-trial" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "origin-trial" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv resource-type +# http://www.metatags.info/meta_http_equiv_resource_type +tags: { + html_format: AMP + html_format: AMP4ADS + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta http-equiv=resource-type" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "resource-type" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# http-equiv x-dns-prefetch-control +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control +tags: { + html_format: AMP + tag_name: "META" + spec_name: "meta http-equiv=x-dns-prefetch-control" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + value_casei: "off" + value_casei: "on" + } + attrs: { + name: "http-equiv" + mandatory: true + value_casei: "x-dns-prefetch-control" + dispatch_key: NAME_VALUE_DISPATCH + } + spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" +} +# AMP metadata, name=amp-ad-enable-refresh +# Enables Refresh for amp-ad doubleclick Fast Fetch +tags: { + html_format: AMP + html_format: AMP4ADS + tag_name: "META" + spec_name: "meta name=amp-ad-enable-refresh" + mandatory_ancestor: "HEAD" + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-ad-enable-refresh" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP metadata, name=amp-to-amp-navigation +# Enables AMP-to-AMP navigation +tags: { + html_format: AMP + html_format: EXPERIMENTAL + tag_name: "META" + spec_name: "meta name=amp-to-amp-navigation" + mandatory_parent: "HEAD" + unique: true + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-to-amp-navigation" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP metadata, name=amp-cta-type +# Specifies the Single Page Story Ad call to action enum +tags: { + html_format: AMP4ADS + tag_name: "META" + spec_name: "meta name=amp-cta-type" + mandatory_parent: "HEAD" + unique: true + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-cta-type" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# AMP metadata, name=amp-cta-url +# Specifies the Single Page Story Ad call to action outlink +tags: { + html_format: AMP4ADS + tag_name: "META" + spec_name: "meta name=amp-cta-url" + mandatory_parent: "HEAD" + unique: true + attrs: { + name: "content" + mandatory: true + } + attrs: { + name: "name" + mandatory: true + value_casei: "amp-cta-url" + dispatch_key: NAME_VALUE_DISPATCH + } +} +# 4.2.6 The style +# Text contents of the style tag will be validated seperately. +tags: { # Special custom 'author' spreadsheet for AMP + html_format: AMP + html_format: EXPERIMENTAL + tag_name: "STYLE" + spec_name: "style amp-custom" + unique: true + mandatory_parent: "HEAD" + attrs: { + name: "amp-custom" + mandatory: true + value: "" + # This is a fine dispatch key, but we would prefer that this tagspec + # is used for errors related to