Skip to content

Commit 938efe8

Browse files
authored
Merge pull request #31 from diberry/diberry/0226-vite
Feb FE update (#364974)
2 parents f726abb + 2f881a1 commit 938efe8

Some content is hidden

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

51 files changed

+3662
-16643
lines changed

api/sample.local.settings.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{
2-
"IsEncrypted": false,
3-
"Values": {
4-
"AzureWebJobsStorage": "",
5-
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
6-
"SearchApiKey": "",
7-
"SearchServiceName": "",
8-
"SearchIndexName": "good-books"
9-
},
10-
"Host": {
11-
"CORS": "*"
12-
}
1+
{
2+
"IsEncrypted": false,
3+
"Values": {
4+
"AzureWebJobsStorage": "",
5+
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
6+
"SearchApiKey": "",
7+
"SearchServiceName": "",
8+
"SearchIndexName": "good-books"
9+
},
10+
"Host": {
11+
"CORS": "*"
12+
}
1313
}

azure-search-static-web-app.sln

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.5.2.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "azure-search-function", "api\azure-search-function.csproj", "{F04A3EAA-1925-5D27-BD32-CB5A41208BC0}"
6+
EndProject
7+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BulkInsert", "bulk-insert\BulkInsert.csproj", "{1829AA28-8389-0E06-4AFD-5A102CFC3015}"
8+
EndProject
9+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{D82C56D6-B2CD-F611-9E31-04638F7EC30E}"
10+
EndProject
11+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "obj", "obj", "{DE7855AF-7336-D889-443A-2C13860797ED}"
12+
EndProject
13+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debug", "Debug", "{7C12A11C-F55F-40E4-6B93-C32A2430011A}"
14+
EndProject
15+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net9.0", "net9.0", "{9EC8902D-1ADD-B59B-02AE-2BD197669E97}"
16+
EndProject
17+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkerExtensions", "api\obj\Debug\net9.0\WorkerExtensions\WorkerExtensions.csproj", "{0FCB2503-1709-FBC4-6C3B-077E40CF6D20}"
18+
EndProject
19+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Release", "Release", "{C0A7B827-D65A-B0F4-A869-B55CF67F76AA}"
20+
EndProject
21+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net9.0", "net9.0", "{4E944138-7AD9-BC3C-E03C-205582DDE098}"
22+
EndProject
23+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkerExtensions", "api\obj\Release\net9.0\WorkerExtensions\WorkerExtensions.csproj", "{F5E8CA9E-64FE-871C-572A-88CCD17A8921}"
24+
EndProject
25+
Global
26+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
27+
Debug|Any CPU = Debug|Any CPU
28+
Release|Any CPU = Release|Any CPU
29+
EndGlobalSection
30+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
31+
{F04A3EAA-1925-5D27-BD32-CB5A41208BC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{F04A3EAA-1925-5D27-BD32-CB5A41208BC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{F04A3EAA-1925-5D27-BD32-CB5A41208BC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{F04A3EAA-1925-5D27-BD32-CB5A41208BC0}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{1829AA28-8389-0E06-4AFD-5A102CFC3015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{1829AA28-8389-0E06-4AFD-5A102CFC3015}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{1829AA28-8389-0E06-4AFD-5A102CFC3015}.Release|Any CPU.ActiveCfg = Release|Any CPU
38+
{1829AA28-8389-0E06-4AFD-5A102CFC3015}.Release|Any CPU.Build.0 = Release|Any CPU
39+
{0FCB2503-1709-FBC4-6C3B-077E40CF6D20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40+
{0FCB2503-1709-FBC4-6C3B-077E40CF6D20}.Debug|Any CPU.Build.0 = Debug|Any CPU
41+
{0FCB2503-1709-FBC4-6C3B-077E40CF6D20}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{0FCB2503-1709-FBC4-6C3B-077E40CF6D20}.Release|Any CPU.Build.0 = Release|Any CPU
43+
{F5E8CA9E-64FE-871C-572A-88CCD17A8921}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44+
{F5E8CA9E-64FE-871C-572A-88CCD17A8921}.Debug|Any CPU.Build.0 = Debug|Any CPU
45+
{F5E8CA9E-64FE-871C-572A-88CCD17A8921}.Release|Any CPU.ActiveCfg = Release|Any CPU
46+
{F5E8CA9E-64FE-871C-572A-88CCD17A8921}.Release|Any CPU.Build.0 = Release|Any CPU
47+
EndGlobalSection
48+
GlobalSection(SolutionProperties) = preSolution
49+
HideSolutionNode = FALSE
50+
EndGlobalSection
51+
GlobalSection(NestedProjects) = preSolution
52+
{DE7855AF-7336-D889-443A-2C13860797ED} = {D82C56D6-B2CD-F611-9E31-04638F7EC30E}
53+
{7C12A11C-F55F-40E4-6B93-C32A2430011A} = {DE7855AF-7336-D889-443A-2C13860797ED}
54+
{9EC8902D-1ADD-B59B-02AE-2BD197669E97} = {7C12A11C-F55F-40E4-6B93-C32A2430011A}
55+
{0FCB2503-1709-FBC4-6C3B-077E40CF6D20} = {9EC8902D-1ADD-B59B-02AE-2BD197669E97}
56+
{C0A7B827-D65A-B0F4-A869-B55CF67F76AA} = {DE7855AF-7336-D889-443A-2C13860797ED}
57+
{4E944138-7AD9-BC3C-E03C-205582DDE098} = {C0A7B827-D65A-B0F4-A869-B55CF67F76AA}
58+
{F5E8CA9E-64FE-871C-572A-88CCD17A8921} = {4E944138-7AD9-BC3C-E03C-205582DDE098}
59+
EndGlobalSection
60+
GlobalSection(ExtensibilityGlobals) = postSolution
61+
SolutionGuid = {3BC169F6-4326-4BDE-956D-96F3DA0BF3AE}
62+
EndGlobalSection
63+
EndGlobal

client/.gitignore

Lines changed: 18 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,24 @@
1-
## Ignore environment files
2-
.env
3-
.venv
4-
env/
5-
venv/
6-
ENV/
7-
env.bak/
8-
venv.bak/
9-
.env.local
10-
.env.development.local
11-
.env.test.local
12-
.env.production.local
13-
14-
## Ignore Node.Js dependencies
15-
node_modules/
16-
build/
17-
dist/
18-
/.pnp
19-
.pnp.js
20-
21-
# Ignore PyInstaller
22-
# Usually these files are written by a python script from a template
23-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
24-
*.manifest
25-
*.spec
26-
27-
# Ignore optional npm cache directory
28-
.npm
29-
npm-debug.log*
30-
31-
# Ignore logs
1+
# Logs
322
logs
333
*.log
344
npm-debug.log*
355
yarn-debug.log*
366
yarn-error.log*
37-
38-
# Ignore runtime data
39-
pids
40-
*.pid
41-
*.seed
42-
*.pid.lock
43-
44-
## Ignore Visual Studio temporary files, build results, and
45-
## files generated by popular Visual Studio add-ons.
46-
47-
# User-specific files
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
4820
*.suo
49-
*.user
50-
*.userprefs
51-
*.sln.docstates
52-
*.svclog
53-
.vs/
54-
.vscode/settings.json
55-
56-
# Others
57-
sql/
58-
*.Cache
59-
ClientBin/
60-
[Ss]tyle[Cc]op.*
61-
~$*
62-
*~
63-
*.dbmdl
64-
*.[Pp]ublish.xml
65-
*.pfx
66-
*.publishsettings
67-
68-
# SQL Server files
69-
App_Data/*.mdf
70-
App_Data/*.ldf
71-
72-
# Windows image file caches
73-
Thumbs.db
74-
ehthumbs.db
75-
76-
# Folder config file
77-
Desktop.ini
78-
79-
# Recycle Bin used on file shares
80-
$RECYCLE.BIN/
81-
82-
# Mac desktop service store files
83-
.DS_Store
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

client/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# React + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend using TypeScript and enable type-aware lint rules. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.

client/eslint.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
6+
export default [
7+
{ ignores: ['dist'] },
8+
{
9+
files: ['**/*.{js,jsx}'],
10+
languageOptions: {
11+
ecmaVersion: 2020,
12+
globals: globals.browser,
13+
parserOptions: {
14+
ecmaVersion: 'latest',
15+
ecmaFeatures: { jsx: true },
16+
sourceType: 'module',
17+
},
18+
},
19+
plugins: {
20+
'react-hooks': reactHooks,
21+
'react-refresh': reactRefresh,
22+
},
23+
rules: {
24+
...js.configs.recommended.rules,
25+
...reactHooks.configs.recommended.rules,
26+
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
27+
'react-refresh/only-export-components': [
28+
'warn',
29+
{ allowConstantExport: true },
30+
],
31+
},
32+
},
33+
]

client/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>AI Search</title>
7+
<link rel="icon" href="/search.ico" type="image/x-icon">
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.jsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)