create-hhmi-example 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/README.md +78 -0
- package/copy-template.js +76 -0
- package/index.js +254 -0
- package/package.json +17 -0
- package/template/hhmiExample.Server/Program.cs +167 -0
- package/template/hhmiExample.Server/Properties/launchSettings.json +44 -0
- package/template/hhmiExample.Server/appsettings.Development.json +8 -0
- package/template/hhmiExample.Server/appsettings.json +9 -0
- package/template/hhmiExample.Server/hhmiExample.Server.csproj +50 -0
- package/template/hhmiExample.Server/hhmiExample.Server.http +6 -0
- package/template/hhmiExample.sln +33 -0
- package/template/hhmiexample.client/eslint.config.js +23 -0
- package/template/hhmiexample.client/hhmiexample.client.esproj +12 -0
- package/template/hhmiexample.client/index.html +13 -0
- package/template/hhmiexample.client/package-lock.json +6490 -0
- package/template/hhmiexample.client/package.json +42 -0
- package/template/hhmiexample.client/prompts/README.md +12 -0
- package/template/hhmiexample.client/prompts/REQUIREMENTS.md +113 -0
- package/template/hhmiexample.client/public/favicon.ico +0 -0
- package/template/hhmiexample.client/public/vite.svg +1 -0
- package/template/hhmiexample.client/src/App.css +11 -0
- package/template/hhmiexample.client/src/App.tsx +147 -0
- package/template/hhmiexample.client/src/assets/logo-black.png +0 -0
- package/template/hhmiexample.client/src/assets/logo-white.png +0 -0
- package/template/hhmiexample.client/src/assets/react.svg +1 -0
- package/template/hhmiexample.client/src/components/AppFrame/AppFrame.tsx +796 -0
- package/template/hhmiexample.client/src/components/AppFrame/Theme.tsx +98 -0
- package/template/hhmiexample.client/src/components/AppFrame/UserSettingPage.tsx +91 -0
- package/template/hhmiexample.client/src/components/AppFrame/UserSettings.tsx +146 -0
- package/template/hhmiexample.client/src/components/AppFrame/modules/ExampleConfig.tsx +86 -0
- package/template/hhmiexample.client/src/components/AppFrame/modules/index.ts +8 -0
- package/template/hhmiexample.client/src/components/AppFrame/types.ts +48 -0
- package/template/hhmiexample.client/src/components/Global/HHMIControls.tsx +567 -0
- package/template/hhmiexample.client/src/components/Global/Quill.tsx +60 -0
- package/template/hhmiexample.client/src/index.css +11 -0
- package/template/hhmiexample.client/src/main.tsx +17 -0
- package/template/hhmiexample.client/src/pages/Example/ExampleConfigurationPage.tsx +24 -0
- package/template/hhmiexample.client/src/pages/Example/ExampleHomePage.tsx +23 -0
- package/template/hhmiexample.client/src/pages/LandingPage.tsx +36 -0
- package/template/hhmiexample.client/src/pages/NotAuthorizedPage.tsx +18 -0
- package/template/hhmiexample.client/src/services/AppService.ts +297 -0
- package/template/hhmiexample.client/src/types/IExampleUser.ts +19 -0
- package/template/hhmiexample.client/src/types/IMessageLocation.ts +8 -0
- package/template/hhmiexample.client/src/vite-env.d.ts +4 -0
- package/template/hhmiexample.client/tsconfig.app.json +27 -0
- package/template/hhmiexample.client/tsconfig.json +11 -0
- package/template/hhmiexample.client/tsconfig.node.json +25 -0
- package/template/hhmiexample.client/vite.config.ts +61 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
2
|
+
|
|
3
|
+
<PropertyGroup>
|
|
4
|
+
<TargetFramework>net8.0</TargetFramework>
|
|
5
|
+
<Nullable>enable</Nullable>
|
|
6
|
+
<ImplicitUsings>enable</ImplicitUsings>
|
|
7
|
+
<SpaRoot>..\hhmiexample.client</SpaRoot>
|
|
8
|
+
<SpaProxyLaunchCommand>npm run dev</SpaProxyLaunchCommand>
|
|
9
|
+
<SpaProxyServerUrl>https://localhost:5173</SpaProxyServerUrl>
|
|
10
|
+
</PropertyGroup>
|
|
11
|
+
|
|
12
|
+
<ItemGroup>
|
|
13
|
+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.5" />
|
|
14
|
+
<PackageReference Include="Microsoft.AspNetCore.SpaProxy">
|
|
15
|
+
<Version>8.*-*</Version>
|
|
16
|
+
</PackageReference>
|
|
17
|
+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
|
18
|
+
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
|
|
19
|
+
</ItemGroup>
|
|
20
|
+
|
|
21
|
+
<ItemGroup>
|
|
22
|
+
<ProjectReference Include="..\hhmiexample.client\hhmiexample.client.esproj">
|
|
23
|
+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
|
24
|
+
</ProjectReference>
|
|
25
|
+
</ItemGroup>
|
|
26
|
+
|
|
27
|
+
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build">
|
|
28
|
+
<Exec Command="node --version" ContinueOnError="true">
|
|
29
|
+
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
|
|
30
|
+
</Exec>
|
|
31
|
+
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build this project." />
|
|
32
|
+
</Target>
|
|
33
|
+
|
|
34
|
+
<Target Name="PublishReact" AfterTargets="ComputeFilesToPublish">
|
|
35
|
+
|
|
36
|
+
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
|
|
37
|
+
|
|
38
|
+
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build " />
|
|
39
|
+
|
|
40
|
+
<ItemGroup>
|
|
41
|
+
<DistFiles Include="$(SpaRoot)\dist\**" />
|
|
42
|
+
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
|
|
43
|
+
<RelativePath>wwwroot\%(RecursiveDir)%(FileName)%(Extension)</RelativePath>
|
|
44
|
+
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
45
|
+
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
|
46
|
+
</ResolvedFileToPublish>
|
|
47
|
+
</ItemGroup>
|
|
48
|
+
</Target>
|
|
49
|
+
|
|
50
|
+
</Project>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
3
|
+
# Visual Studio Version 17
|
|
4
|
+
VisualStudioVersion = 17.10.34928.147
|
|
5
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
|
6
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hhmiExample.Server", "hhmiExample.Server\hhmiExample.Server.csproj", "{52734134-4104-46E8-9D51-1A91B94B2BEF}"
|
|
7
|
+
EndProject
|
|
8
|
+
Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "hhmiexample.client", "hhmiexample.client\hhmiexample.client.esproj", "{12492D9C-03AD-4EBC-BB89-6A6A164942D7}"
|
|
9
|
+
EndProject
|
|
10
|
+
Global
|
|
11
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
12
|
+
Debug|Any CPU = Debug|Any CPU
|
|
13
|
+
Release|Any CPU = Release|Any CPU
|
|
14
|
+
EndGlobalSection
|
|
15
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
16
|
+
{52734134-4104-46E8-9D51-1A91B94B2BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
17
|
+
{52734134-4104-46E8-9D51-1A91B94B2BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
18
|
+
{52734134-4104-46E8-9D51-1A91B94B2BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
19
|
+
{52734134-4104-46E8-9D51-1A91B94B2BEF}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
20
|
+
{12492D9C-03AD-4EBC-BB89-6A6A164942D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
21
|
+
{12492D9C-03AD-4EBC-BB89-6A6A164942D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
22
|
+
{12492D9C-03AD-4EBC-BB89-6A6A164942D7}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
|
23
|
+
{12492D9C-03AD-4EBC-BB89-6A6A164942D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
24
|
+
{12492D9C-03AD-4EBC-BB89-6A6A164942D7}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
25
|
+
{12492D9C-03AD-4EBC-BB89-6A6A164942D7}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
|
26
|
+
EndGlobalSection
|
|
27
|
+
GlobalSection(SolutionProperties) = preSolution
|
|
28
|
+
HideSolutionNode = FALSE
|
|
29
|
+
EndGlobalSection
|
|
30
|
+
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
31
|
+
SolutionGuid = {B5BB6F64-10A0-4119-9314-5149B42231D9}
|
|
32
|
+
EndGlobalSection
|
|
33
|
+
EndGlobal
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
globalIgnores(['dist']),
|
|
10
|
+
{
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
extends: [
|
|
13
|
+
js.configs.recommended,
|
|
14
|
+
tseslint.configs.recommended,
|
|
15
|
+
reactHooks.configs['recommended-latest'],
|
|
16
|
+
reactRefresh.configs.vite,
|
|
17
|
+
],
|
|
18
|
+
languageOptions: {
|
|
19
|
+
ecmaVersion: 2020,
|
|
20
|
+
globals: globals.browser,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
])
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.784122">
|
|
2
|
+
<PropertyGroup>
|
|
3
|
+
<StartupCommand>npm run dev</StartupCommand>
|
|
4
|
+
<JavaScriptTestRoot>src\</JavaScriptTestRoot>
|
|
5
|
+
<JavaScriptTestFramework>Jest</JavaScriptTestFramework>
|
|
6
|
+
<ShouldRunBuildScript>false</ShouldRunBuildScript>
|
|
7
|
+
<BuildOutputFolder>$(MSBuildProjectDirectory)\dist</BuildOutputFolder>
|
|
8
|
+
</PropertyGroup>
|
|
9
|
+
<ItemGroup>
|
|
10
|
+
<Folder Include="src\pages\Example\" />
|
|
11
|
+
</ItemGroup>
|
|
12
|
+
</Project>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Example App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|