From cf631aa95552fecfbcccc8e1d57577d9239c861a Mon Sep 17 00:00:00 2001 From: David Ross Date: Fri, 3 May 2019 11:32:13 -0700 Subject: [PATCH 1/7] Update package.json --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a679825..5fd7297 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "html-webpack-inline-source-plugin", + "name": "@postmates/html-webpack-inline-source-plugin", "version": "0.0.10", "description": "Embed javascript and css source inline when using the webpack dev server or middleware", "main": "index.js", @@ -7,14 +7,13 @@ "index.js" ], "scripts": { - "prepublish": "npm run test", "pretest": "semistandard", "test": "jasmine", "debug": "node-debug jasmine" }, "repository": { "type": "git", - "url": "https://github.com/dustinjackson/html-webpack-inline-source-plugin.git" + "url": "git+https://github.com/postmates/html-webpack-inline-source-plugin.git" }, "keywords": [ "webpack", From 8dd346e9f8c5ccc29e631212b3a2accb66bf6ea1 Mon Sep 17 00:00:00 2001 From: David Ross Date: Fri, 3 May 2019 11:35:07 -0700 Subject: [PATCH 2/7] Update index.js --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e1d785d..319e23f 100644 --- a/index.js +++ b/index.js @@ -93,7 +93,8 @@ HtmlWebpackInlineSourcePlugin.prototype.processTag = function (compilation, rege tagName: 'script', closeTag: true, attributes: { - type: 'text/javascript' + type: 'text/javascript', + nonce: 'myNonce123' } }; From c2457507930f089051f353038819a0a5b0e5ca6e Mon Sep 17 00:00:00 2001 From: David Ross Date: Fri, 3 May 2019 12:01:38 -0700 Subject: [PATCH 3/7] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 319e23f..9e3569c 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,7 @@ HtmlWebpackInlineSourcePlugin.prototype.processTag = function (compilation, rege closeTag: true, attributes: { type: 'text/javascript', - nonce: 'myNonce123' + nonce: 'myNonce1234 {{789}} bbb' } }; From 5b491c31e28205265544757cf5a1487b436c3d80 Mon Sep 17 00:00:00 2001 From: David Ross Date: Fri, 3 May 2019 12:28:21 -0700 Subject: [PATCH 4/7] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9e3569c..41ae8e7 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,7 @@ HtmlWebpackInlineSourcePlugin.prototype.processTag = function (compilation, rege closeTag: true, attributes: { type: 'text/javascript', - nonce: 'myNonce1234 {{789}} bbb' + nonce: 'myNonce1234 {{ .CSPNonce }} bbb' } }; From 129a1ed5798a237188c5cc29f90d2897158e5010 Mon Sep 17 00:00:00 2001 From: David Ross Date: Fri, 3 May 2019 13:06:35 -0700 Subject: [PATCH 5/7] Update index.js --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 41ae8e7..2767616 100644 --- a/index.js +++ b/index.js @@ -98,6 +98,9 @@ HtmlWebpackInlineSourcePlugin.prototype.processTag = function (compilation, rege } }; + // Add CSP nonce template string if supplied + tag.outerHTML = tag.outerHTML.replace(/^