@localnerve/csp-hashes 0.1.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/csp-hashes.code-workspace +8 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +11 -0
- package/package.json +10 -4
package/dist/index.js
CHANGED
|
@@ -9,5 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _index.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var _index = _interopRequireDefault(require("./lib/index"));
|
|
12
|
+
var _index = _interopRequireDefault(require("./lib/index.js"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSP Hashes.
|
|
3
|
+
*
|
|
4
|
+
* Return a Vinyl transform object stream to process html files for
|
|
5
|
+
* generating the required CSP hashes for inline and attribute scripts, styles.
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2022 Alex Grant (@localnerve), LocalNerve LLC
|
|
8
|
+
* Licensed under the MIT license.
|
|
9
|
+
*/
|
|
10
|
+
/* eslint-env node */
|
|
11
|
+
export { default } from './lib/index.js';
|
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@localnerve/csp-hashes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Flexible library to generate CSP hashes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
"import": "./index.mjs",
|
|
8
|
+
"require": "./index.js",
|
|
9
|
+
"default": "./index.js"
|
|
10
|
+
},
|
|
6
11
|
"scripts": {
|
|
7
12
|
"lint": "eslint .",
|
|
8
13
|
"transpile": "rimraf ./dist && babel --out-dir ./dist index.js && babel --out-dir ./dist/lib ./lib",
|
|
9
|
-
"
|
|
14
|
+
"prepublishBuild": "node -e 'try{require(\"fs\").copyFileSync(\"./index.js\", \"./dist/index.mjs\");}catch(e){}'",
|
|
15
|
+
"prepublishOnly": "npm run transpile && npm run prepublishBuild",
|
|
10
16
|
"pretest": "node -e 'try{require(\"fs\").symlinkSync(\"../lib\", \"./__tests__/lib\");}catch(e){}'",
|
|
11
17
|
"test": "jest",
|
|
12
18
|
"test:debug": "node --inspect-brk ./node_modules/.bin/jest"
|
|
@@ -15,8 +21,8 @@
|
|
|
15
21
|
"@babel/cli": "^7.19.3",
|
|
16
22
|
"@babel/preset-env": "^7.19.4",
|
|
17
23
|
"@babel/register": "^7.18.9",
|
|
18
|
-
"eslint": "^8.
|
|
19
|
-
"jest": "^29.
|
|
24
|
+
"eslint": "^8.26.0",
|
|
25
|
+
"jest": "^29.2.2",
|
|
20
26
|
"rimraf": "^3.0.2",
|
|
21
27
|
"vinyl": "^2.2.1"
|
|
22
28
|
},
|