Skip to content

Commit

Permalink
clean up patch logging
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jul 6, 2024
1 parent 28018d8 commit 4ac49d0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions patches/@greenwood+cli+0.30.0-alpha.2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ index 5d347bc..ea11358 100644
}
diff --git a/node_modules/@greenwood/cli/src/plugins/resource/plugin-content-as-data.js b/node_modules/@greenwood/cli/src/plugins/resource/plugin-content-as-data.js
new file mode 100644
index 0000000..8b191e5
index 0000000..a8cd5c5
--- /dev/null
+++ b/node_modules/@greenwood/cli/src/plugins/resource/plugin-content-as-data.js
@@ -0,0 +1,54 @@
@@ -0,0 +1,51 @@
+import { mergeImportMap } from '../../lib/walker-package-ranger.js';
+import { ResourceInterface } from '../../lib/resource-interface.js';
+
Expand All @@ -322,14 +322,11 @@ index 0000000..8b191e5
+ }
+
+ async shouldIntercept(url, request, response) {
+ console.log('ContentAsDataResource.shouldIntercept', { url })
+ return response.headers.get('Content-Type')?.indexOf(this.contentType[0]) >= 0;
+ }
+
+ async intercept(url, request, response) {
+ console.log('ContentAsDataResource.intercept', { url })
+ const body = await response.text();
+ console.log({ body });
+ const newBody = mergeImportMap(body, importMap);
+
+ return new Response(newBody);
Expand Down

0 comments on commit 4ac49d0

Please sign in to comment.