rollup-plugin-sri
Advanced tools
Comparing version 1.2.5 to 1.2.6
/* rollup-plugin-sri | ||
v1.2.4 | ||
v1.2.5 | ||
By Jonas Kruckenberg <iterpre@protonmail.com> (https://jonaskruckenberg.de) | ||
2020-07-17T15:26:30.527Z | ||
2020-07-27T14:31:32.807Z | ||
*/ | ||
import cheerio from 'cheerio'; | ||
import { createHash } from 'crypto'; | ||
import fetch from 'node-fetch'; | ||
import { join, basename } from 'path'; | ||
import fs from 'fs-extra'; | ||
/*! ***************************************************************************** | ||
import cheerio from'cheerio';import {createHash}from'crypto';import fetch from'node-fetch';import {join,basename}from'path';import fs from'fs-extra';/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
@@ -63,5 +57,3 @@ | ||
} | ||
} | ||
var index = (function (options) { | ||
}var index = (function (options) { | ||
var _a; | ||
@@ -73,3 +65,3 @@ var selectors = (options === null || options === void 0 ? void 0 : options.selectors) || ['script', 'link[rel=stylesheet]']; | ||
return { | ||
name: 'plugin-sri', | ||
name: 'subresource-integrity', | ||
writeBundle: function (options, bundle) { | ||
@@ -156,4 +148,2 @@ return __awaiter(this, void 0, void 0, function () { | ||
return alg + "-" + hash; | ||
} | ||
export default index; | ||
}export default index;//# sourceMappingURL=index.es.js.map |
/* rollup-plugin-sri | ||
v1.2.4 | ||
v1.2.5 | ||
By Jonas Kruckenberg <iterpre@protonmail.com> (https://jonaskruckenberg.de) | ||
2020-07-17T15:26:30.527Z | ||
2020-07-27T14:31:32.807Z | ||
*/ | ||
'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var cheerio = _interopDefault(require('cheerio')); | ||
var crypto = require('crypto'); | ||
var fetch = _interopDefault(require('node-fetch')); | ||
var path = require('path'); | ||
var fs = _interopDefault(require('fs-extra')); | ||
/*! ***************************************************************************** | ||
'use strict';function _interopDefault(e){return(e&&(typeof e==='object')&&'default'in e)?e['default']:e}var cheerio=_interopDefault(require('cheerio')),crypto=require('crypto'),fetch=_interopDefault(require('node-fetch')),path=require('path'),fs=_interopDefault(require('fs-extra'));/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
@@ -67,5 +57,3 @@ | ||
} | ||
} | ||
var index = (function (options) { | ||
}var index = (function (options) { | ||
var _a; | ||
@@ -77,3 +65,3 @@ var selectors = (options === null || options === void 0 ? void 0 : options.selectors) || ['script', 'link[rel=stylesheet]']; | ||
return { | ||
name: 'plugin-sri', | ||
name: 'subresource-integrity', | ||
writeBundle: function (options, bundle) { | ||
@@ -160,4 +148,2 @@ return __awaiter(this, void 0, void 0, function () { | ||
return alg + "-" + hash; | ||
} | ||
module.exports = index; | ||
}module.exports=index;//# sourceMappingURL=index.js.map |
142
package.json
{ | ||
"name": "rollup-plugin-sri", | ||
"version": "1.2.5", | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"types": "dist/index.d.ts", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Jonas Kruckenberg", | ||
"email": "iterpre@protonmail.com", | ||
"url": "https://jonaskruckenberg.de" | ||
}, | ||
"description": "Add subresource integrity tags to all your html files 🔒", | ||
"keywords": [ | ||
"rollup-plugin", | ||
"subresource", | ||
"subresource-integrity", | ||
"security" | ||
], | ||
"repository": "https://github.com/JonasKruckenberg/rollup-plugin-sri.git", | ||
"bugs": "https://github.com/JonasKruckenberg/rollup-plugin-sri/issues", | ||
"homepage": "https://github.com/JonasKruckenberg/rollup-plugin-sri", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"dev": "cross-env NODE_ENV=development rollup -cw", | ||
"build": "cross-env NODE_ENV=development rollup -c", | ||
"test": "cross-env NODE_ENV=development jest --config jest.json", | ||
"coverage": "cross-env NODE_ENV=development jest --config jest.json --coverage", | ||
"docs": "typedoc --options ./typedoc.json", | ||
"commit": "git cz" | ||
}, | ||
"dependencies": { | ||
"cheerio": "^1.0.0-rc.3", | ||
"fs-extra": "^9.0.1", | ||
"node-fetch": "^2.6.0" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@rollup/plugin-html": "^0.2.0", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/github": "^7.0.7", | ||
"@semantic-release/npm": "^7.0.5", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"@types/chai": "^4.2.11", | ||
"@types/cheerio": "^0.22.18", | ||
"@types/fs-extra": "^9.0.1", | ||
"@types/jest": "^26.0.4", | ||
"@types/node": "^14.0.3", | ||
"@types/node-fetch": "^2.5.7", | ||
"chai": "^4.2.0", | ||
"commitizen": "^4.1.2", | ||
"cross-env": "^7.0.2", | ||
"cz-conventional-changelog": "^3.2.0", | ||
"jest": "^26.1.0", | ||
"nyc": "^15.0.1", | ||
"rollup": "^2.10.4", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
"semantic-release": "^17.0.7", | ||
"ts-jest": "^26.1.3", | ||
"ts-node": "^8.10.1", | ||
"typedoc": "^0.17.7", | ||
"typedoc-plugin-markdown": "^2.2.17", | ||
"typescript": "^3.9.2" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
"name": "rollup-plugin-sri", | ||
"version": "1.2.6", | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"types": "dist/index.d.ts", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Jonas Kruckenberg", | ||
"email": "iterpre@protonmail.com", | ||
"url": "https://jonaskruckenberg.de" | ||
}, | ||
"description": "Add subresource integrity tags to all your html files 🔒", | ||
"keywords": [ | ||
"rollup-plugin", | ||
"subresource", | ||
"subresource-integrity", | ||
"security" | ||
], | ||
"repository": "https://github.com/JonasKruckenberg/rollup-plugin-sri.git", | ||
"bugs": "https://github.com/JonasKruckenberg/rollup-plugin-sri/issues", | ||
"homepage": "https://github.com/JonasKruckenberg/rollup-plugin-sri", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"dev": "cross-env NODE_ENV=development rollup -cw", | ||
"build": "cross-env NODE_ENV=production rollup -c", | ||
"test": "cross-env NODE_ENV=development jest --config jest.json", | ||
"coverage": "cross-env NODE_ENV=development jest --config jest.json --coverage", | ||
"docs": "typedoc --options ./typedoc.json", | ||
"commit": "git cz" | ||
}, | ||
"dependencies": { | ||
"cheerio": "^1.0.0-rc.3", | ||
"fs-extra": "^9.0.1", | ||
"node-fetch": "^2.6.0" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/github": "^7.0.7", | ||
"@semantic-release/npm": "^7.0.5", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"@types/chai": "^4.2.11", | ||
"@types/cheerio": "^0.22.18", | ||
"@types/fs-extra": "^9.0.1", | ||
"@types/jest": "^26.0.4", | ||
"@types/node": "^14.0.3", | ||
"@types/node-fetch": "^2.5.7", | ||
"chai": "^4.2.0", | ||
"codecov": "^3.7.2", | ||
"commitizen": "^4.1.2", | ||
"cross-env": "^7.0.2", | ||
"cz-conventional-changelog": "^3.2.0", | ||
"jest": "^26.1.0", | ||
"rollup": "^2.10.4", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
"semantic-release": "^17.0.7", | ||
"ts-jest": "^26.1.3", | ||
"typedoc": "^0.17.7", | ||
"typedoc-plugin-markdown": "^2.2.17", | ||
"typescript": "^3.9.2" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} |
# rollup-plugin-sri | ||
> Because web security should not be difficult. | ||
> [](https://codecov.io/gh/JonasKruckenberg/rollup-plugin-sri/) | ||
@@ -5,0 +6,0 @@ This plugin adds [subresource integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) attributes to all resources imported by your html files. |
40102
26
8
174
325