Skip to content

Commit 66bc675

Browse files
Automate chat template JS dependency updates (#5853)
* Started on automated JS dependency updates * Full automation of JS dependency updates * Add `package-lock.json` * PR feedback * Remove extra newline * Make `package.json` private, just in case * Update src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web/wwwroot/pdf_viewer/viewer.mjs --------- Co-authored-by: Steve Sanderson <[email protected]>
1 parent ca2fe80 commit 66bc675

File tree

93 files changed

+7515
-16782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+7515
-16782
lines changed

src/ProjectTemplates/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ package-lock.json
88

99
# launchSettings.json files are required for the templates.
1010
!launchSettings.json
11+
12+
# Templates include JS dependencies in dist folders.
13+
!**/dist/*
14+
15+
# Keep the package-lock.json file for updating template dependencies.
16+
!package-lock.json
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
*.db
22
*.db-*
3-
wwwroot/lib.out.js
4-
wwwroot/*.generated.css

src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web/Components/Pages/Chat/ChatCitation.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
if (File.EndsWith(".pdf"))
3030
{
3131
var search = Quote.Trim('.', ',', ' ', '\n', '\r', '\t', '"', '\'');
32-
viewerUrl = $"pdfjs/web/viewer.html?file=/citation/{HttpUtility.UrlEncode(File)}#page={PageNumber}&search={HttpUtility.UrlEncode(search)}&phrase=true";
32+
viewerUrl = $"pdf_viewer/viewer.html?file=/citation/{HttpUtility.UrlEncode(File)}#page={PageNumber}&search={HttpUtility.UrlEncode(search)}&phrase=true";
3333
}
3434
}
3535
}

src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web/wwwroot/app.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import url('tailwindcss/web/preflight.css');
1+
@import url('lib/tailwindcss/dist/preflight.css');
22

33
html {
44
min-height: 100vh;

src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web/wwwroot/dompurify/web/purify.es.mjs.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web/wwwroot/lib.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import DOMPurify from './dompurify/web/purify.es.mjs';
2-
import * as marked from './marked/web/marked.esm.js';
1+
import DOMPurify from './lib/dompurify/dist/purify.es.mjs';
2+
import * as marked from './lib/marked/dist/marked.esm.js';
33

44
const purify = DOMPurify(window);
55

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
DOMPurify version 3.2.4
1+
dompurify version 3.2.4
22
https://github.com/cure53/DOMPurify
33
License: Apache 2.0 and Mozilla Public License 2.0
44

5-
To update, replace the files with an updated build from https://github.com/cure53/DOMPurify/releases
5+
To update, replace the files with an updated build from https://www.npmjs.com/package/dompurify
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
marked version 15.0.6
2+
https://github.com/markedjs/marked
3+
License: MIT
4+
5+
To update, replace the files with with an updated build from https://www.npmjs.com/package/marked
File renamed without changes.

0 commit comments

Comments
 (0)