Compare commits

..

34 Commits

Author SHA1 Message Date
e5f9cceb91 Fixed issues with CI pipeline
All checks were successful
props/pipeline/head This commit looks good
2024-11-15 03:01:17 +00:00
b9007e2403 Updated devcontainer configuration and CI configuration
All checks were successful
props/pipeline/head This commit looks good
2024-11-15 02:04:41 +00:00
cd308cf4b4 Delete .devcontainer/devcontainer.json
Some checks failed
props/pipeline/head There was a failure building this commit
2024-11-15 00:59:40 +00:00
a92762b85b Merge branch 'develop'
All checks were successful
ydeng/props/pipeline/head This commit looks good
2024-07-20 14:26:54 +00:00
0abfc60fe9 Improved dev container experience.
All checks were successful
ydeng/props/pipeline/head This commit looks good
2024-07-20 05:07:59 +00:00
3e82b1d01e Added zip and tar to environment for pipeline. 2024-07-20 05:07:36 +00:00
cac2b8ace7 Added "icu" library requirement to environment.yml.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-20 01:52:33 +00:00
7a78dcb339 Reconfigured devcontainer.
Some checks reported errors
ydeng/props/pipeline/head Something is wrong with the build of this commit
2024-07-20 01:50:47 +00:00
046b85ec4a Updated packages.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-20 00:42:13 +00:00
79f7688980 Removed nested stages. 2024-07-20 00:42:06 +00:00
9f291dcfed Increased webpack performance limit.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
Changed entrypointSize performance hint limit.

Increased maxAssetSize webpack performance hint limit.
2024-07-20 00:04:26 +00:00
4bc74d0917 Updated Jenkins pipeline paths.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 22:50:01 +00:00
60e9b06a21 Updated referenced package versions.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 22:41:27 +00:00
ad1c5a3180 Made sure shop module path exists in Jenkinsfile.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 22:10:22 +00:00
a2ed5c2e58 Removed unecessary step.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 22:01:21 +00:00
a4adb7c582 Fixed Jenkinsfile syntax.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 21:54:26 +00:00
9631cb4b6b Added for loop to iterate over all shop modules.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 18:06:01 +00:00
73cc43af3c Added output folder to gitignore. 2024-07-19 18:05:28 +00:00
d0217c2166 Jenkins pipeline will now continue if tests fail.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 17:50:17 +00:00
e2ffd6f976 Minor fixes applied to Jenkinsfile.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
2024-07-19 17:20:02 +00:00
a7c0e0dea7 Updating Jenkinsfile to work on common runner.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
Began moving poject to a devcontainer.

Added webpack cache clearing script.

Updated to .NET 8.0.

testing Woodpecker CI.

Selecting conda container for all build steps.

Made conda installation quiet.

Updated NodeJS version.
2024-07-19 17:12:49 +00:00
eadd104808 Updated Microsoft Logging extension.
Some checks failed
ydeng/audioshowkit/pipeline/head There was a failure building this commit
RealYHD/props/pipeline/head There was a failure building this commit
ydeng/props/pipeline/head There was a failure building this commit
2022-12-04 08:58:15 +00:00
0c7b85351c Updated Jenkinsfile.
All "dotnet restore" commands are now part of the "install" stage.
2022-12-01 17:35:20 +00:00
4841d539fc Updated project files to .NET 7.0. 2022-12-01 17:24:04 +00:00
d4680b934e Updated npm packages. 2022-12-01 07:02:10 +00:00
dbb1a04c36 Added nodejs to environment.yml. 2022-12-01 06:29:00 +00:00
6ba4e41de9 Fixed environment.yml. 2022-12-01 06:23:33 +00:00
85f4d61ff0 Update Jenkinsfile and added Conda environment. 2022-12-01 04:48:54 +00:00
a03d3c5218 Updated Jenkinsfile. 2022-11-27 10:18:42 +00:00
7f66b73e7a Removed unused git submodule. 2022-04-26 03:56:48 -05:00
44acb94aa5 Fixed archiving paths. 2022-04-26 03:48:05 -05:00
4d49ce33c2 Changed pipeline to output to special folder. 2022-04-26 03:40:29 -05:00
e83d19b699 Removed explicit restore in "Props" stage in pipeline. 2022-04-25 12:37:17 -05:00
e9eec03a54 Initial commit. 2021-07-24 00:17:41 -05:00
35 changed files with 5144 additions and 4162 deletions

8
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

View File

@ -0,0 +1,32 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet-postgres
{
"name": "C# (.NET) and PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Configure tool-specific properties.
// "customizations": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001, 5432],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "dotnet --info",
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View File

@ -0,0 +1,38 @@
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- ../..:/workspaces:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
# user: root
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
db:
image: postgres:14.3
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
volumes:
postgres-data:

3
.devcontainer/noop.txt Normal file
View File

@ -0,0 +1,3 @@
This file is copied into the container along with environment.yml* from the
parent folder. This is done to prevent the Dockerfile COPY instruction from
failing if no environment.yml is found.

5
.gitignore vendored
View File

@ -1,5 +1,3 @@
# Created by https://www.toptal.com/developers/gitignore/api/aspnetcore,visualstudiocode,dotnetcore,python,database,node # Created by https://www.toptal.com/developers/gitignore/api/aspnetcore,visualstudiocode,dotnetcore,python,database,node
# Edit at https://www.toptal.com/developers/gitignore?templates=aspnetcore,visualstudiocode,dotnetcore,python,database,node # Edit at https://www.toptal.com/developers/gitignore?templates=aspnetcore,visualstudiocode,dotnetcore,python,database,node
@ -576,4 +574,5 @@ cython_debug/
# Props # Props
shop-data shop-data
Props/shops Props/shops
output

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "SimpleLogger"]
path = Libraries/SimpleLogger
url = https://dev.reslate.xyz/git/ydeng/simplelogger.git

26
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Props.Shop/Adafruit.Tests/bin/Debug/net8.0/Props.Shop.Adafruit.Tests.dll",
"args": [],
"cwd": "${workspaceFolder}/Props.Shop/Adafruit.Tests",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

0
.vscode/settings.json vendored Normal file
View File

41
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/Props.Shop/Props.Shop.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/Props.Shop/Props.Shop.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/Props.Shop/Props.Shop.sln"
],
"problemMatcher": "$msCompile"
}
]
}

9
.woodpecker.yaml Normal file
View File

@ -0,0 +1,9 @@
steps:
- name: build
image: debian
commands:
- echo "This is the build step"
- name: a-test-step
image: debian
commands:
- echo "Testing.."

91
Jenkinsfile vendored
View File

@ -1,57 +1,54 @@
pipeline { pipeline {
agent any agent {
kubernetes {
cloud 'rsys-devel'
defaultContainer 'homebrew'
inheritFrom 'homebrew'
}
}
environment {
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = "1" // TODO Should probably remove this
}
stages { stages {
stage("cleanup") { stage("Install") {
steps { steps {
cleanWs(patterns: [[pattern: '**/bin/Release', type: 'INCLUDE'], [pattern: 'props-linux-x64*', type: 'INCLUDE'], [pattern: 'props-win-x64*', type: 'INCLUDE']]) sh 'brew install dotnet@8 node zip'
sh 'npm install --prefix ./Props'
} }
} }
stage("Props.Shop") { stage("Test Props.Shop") {
stages { steps {
stage("Restore") { sh returnStatus: true, script: 'dotnet test --logger xunit Props.Shop/**/*.Tests.csproj'
steps { xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
dotnetRestore project: "Props.Shop/Props.Shop.sln"
dotnetRestore project: "Props.Shop/Props.Shop.Tests.sln"
}
}
stage("Test") {
steps {
dotnetTest logger: 'xunit', noRestore: true, project: 'Props.Shop/Props.Shop.Tests.sln', unstableIfErrors: true, unstableIfWarnings: true
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
}
}
stage("Publish") {
steps {
dotnetPublish configuration: 'Release', noRestore: true, project: 'Props.Shop/Props.Shop.sln', selfContained: false, unstableIfWarnings: true
fingerprint 'Props.Shop/**/bin/Release/**/publish/Props.Shop.*'
sh "python3 scripts/load_shop_modules.py"
}
}
} }
} }
stage("Props") { stage("Publish Props.Shop") {
stages { steps {
stage("Restore") { sh '''#!/bin/bash
steps { for file in Props.Shop/**/*.csproj
dotnetRestore project: "Props" do
dotnetRestore project: "Props.Tests" dotnet publish --configuration Release --output output/shop-modules $file
} done
} '''
stage("Test") { fingerprint 'output/shop-modules/**/Props.Shop.*'
steps { sh 'mkdir -p ./Props/shops/'
dotnetTest logger: 'xunit', noRestore: true, project: 'Props.Tests', unstableIfErrors: true, unstableIfWarnings: true sh 'cp ./output/shop-modules/*.dll ./output/shop-modules/*.deps.json ./Props/shops/.'
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)]) }
} }
} stage("Test Props") {
stage("Publish") { steps {
steps { sh returnStatus: true, script: 'dotnet test --logger xunit Props.Tests/Props.Tests.csproj'
dotnetPublish configuration: 'Release', outputDirectory: 'props-linux-x64', project: 'Props', runtime: 'linux-x64', selfContained: true xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
dotnetPublish configuration: 'Release', outputDirectory: 'props-win-x64', project: 'Props', runtime: 'win-x64', selfContained: true }
fingerprint 'Props/bin/Release/**/publish/Props*' }
tar file: "props-linux-x64.tar.gz", archive: true, compress: true, dir: "props-linux-x64" stage("Publish Props") {
zip zipFile: "props-win-x64.zip", archive: true, dir: "props-win-x64" steps {
} sh 'dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props'
} sh 'dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props'
fingerprint 'output/props/**/Props*'
sh 'tar -czf output/props-linux-x64.tar.gz output/props/props-linux-x64'
sh 'zip -r output/props-win-x64.zip output/props/props-win-x64'
archiveArtifacts artifacts: 'output/*.tar.gz,output/*.zip', followSymlinks: false
} }
} }
} }

@ -1 +0,0 @@
Subproject commit f9931eea4295353befffcf1880ea510cc259e9f2

View File

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<InvariantGlobalization>true</InvariantGlobalization>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.2.0" /> <PackageReference Include="MartinCostello.Logging.XUnit" Version="0.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="System.Linq.Async" Version="5.1.0" /> <PackageReference Include="System.Linq.Async" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,22 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit.Tests", "Adafruit.Tests\Props.Shop.Adafruit.Tests.csproj", "{DDE31868-2F4E-43D1-9955-E1B4C1BB13A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DDE31868-2F4E-43D1-9955-E1B4C1BB13A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDE31868-2F4E-43D1-9955-E1B4C1BB13A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDE31868-2F4E-43D1-9955-E1B4C1BB13A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDE31868-2F4E-43D1-9955-E1B4C1BB13A0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -1,28 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit", "Adafruit\Props.Shop.Adafruit.csproj", "{9C8E4646-C49E-422E-9884-A49D4A05998C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Framework", "Framework\Props.Shop.Framework.csproj", "{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Release|Any CPU.Build.0 = Release|Any CPU
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<InvariantGlobalization>true</InvariantGlobalization>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>

View File

@ -10,7 +10,7 @@
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path. // If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net6.0/Props.dll", "program": "${workspaceFolder}/bin/Debug/net7.0/Props.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"stopAtEntry": false, "stopAtEntry": false,

View File

@ -3,11 +3,12 @@
<!-- Publish arguments: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish --> <!-- Publish arguments: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish -->
<!-- Single file docs: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview --> <!-- Single file docs: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview -->
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile> <PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<PublishTrimmed>false</PublishTrimmed> <PublishTrimmed>false</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun> <PublishReadyToRun>true</PublishReadyToRun>
<!-- <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> --> <InvariantGlobalization>true</InvariantGlobalization>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract> <IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<UserSecretsId>aspnet-Props-20A2A991-EC61-4C06-91D2-953482026A7B</UserSecretsId> <UserSecretsId>aspnet-Props-20A2A991-EC61-4C06-91D2-953482026A7B</UserSecretsId>
</PropertyGroup> </PropertyGroup>
@ -17,21 +18,21 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.1" /> <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" /> <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.1" /> <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.1" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -7,6 +7,7 @@ using Microsoft.Extensions.Hosting;
using Props.Data; using Props.Data;
using Props.Models.User; using Props.Models.User;
using Props.Services.Modules; using Props.Services.Modules;
using System;
namespace Props namespace Props
{ {
@ -43,16 +44,7 @@ namespace Props
} }
services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true) services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
.AddEntityFrameworkStores<ApplicationDbContext>(); .AddEntityFrameworkStores<ApplicationDbContext>();
services.AddRazorPages();
services.AddLocalization(options =>
{
options.ResourcesPath = "locales";
});
services.AddRazorPages().AddViewLocalization(options =>
{
options.ResourcesPath = "locales";
}).AddDataAnnotationsLocalization();
services.AddSingleton<IShopManager, ModularShopManager>(); services.AddSingleton<IShopManager, ModularShopManager>();
services.AddScoped<IMetricsManager, LiveMetricsManager>(); services.AddScoped<IMetricsManager, LiveMetricsManager>();
@ -69,14 +61,8 @@ namespace Props
app.UseMigrationsEndPoint(); app.UseMigrationsEndPoint();
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseStaticFiles(); app.UseStaticFiles();
app.UseRequestLocalization(options =>
{
options.SetDefaultCulture("en-US");
});
app.UseRouting(); app.UseRouting();
app.UseAuthentication(); app.UseAuthentication();

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<data name="description" xml:space="preserve">
<value>Props is a community driven website meant to help with organizing your online component shopping experience. Create project component lists, search across multiple commonly used online retail stores and share your projects with rest of the community!</value>
</data>
<data name="help.title" xml:space="preserve">
<value>Getting Started</value>
</data>
<data name="help.searchIntroduction" xml:space="preserve">
<value>Props is a site designed to help with the online project component shopping experience. Create project component lists and search across multiple commonly used online retail stores to find the ideal purchase.</value>
</data>
<!-- single line comment -->
<!-- multi
line
comment -->
</root>

8763
Props/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,36 +4,36 @@
"build": "webpack --config webpack.prod.js", "build": "webpack --config webpack.prod.js",
"build:dev": "webpack --config webpack.dev.js", "build:dev": "webpack --config webpack.dev.js",
"build:prod": "webpack --config webpack.prod.js", "build:prod": "webpack --config webpack.prod.js",
"postinstall": "python3 ../scripts/clear_webpack_cache.py" "postinstall": "bash ../scripts/clear_webpack_cache.sh"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.14.8", "@babel/core": "^7.24.9",
"@babel/eslint-parser": "^7.14.7", "@babel/eslint-parser": "^7.24.8",
"@babel/plugin-transform-runtime": "^7.14.5", "@babel/plugin-transform-runtime": "^7.24.7",
"@babel/preset-env": "^7.14.8", "@babel/preset-env": "^7.24.8",
"babel-loader": "^8.2.2", "babel-loader": "^9.1.3",
"copy-webpack-plugin": "^9.0.1", "copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.2.0", "css-loader": "^7.1.2",
"eslint": "^7.31.0", "eslint": "^9.7.0",
"glob": "^7.1.7", "glob": "^11.0.0",
"sass": "^1.35.2", "sass": "^1.77.8",
"sass-loader": "^12.1.0", "sass-loader": "^14.2.1",
"style-loader": "^3.2.1", "style-loader": "^4.0.0",
"webpack": "^5.65.0", "webpack": "^5.93.0",
"webpack-cli": "^4.9.1", "webpack-cli": "^5.1.4",
"webpack-merge": "^5.8.0" "webpack-merge": "^6.0.1"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.14.8", "@babel/runtime": "^7.24.8",
"alpinejs": "^3.2.2", "alpinejs": "^3.14.1",
"axios": "^0.21.1", "axios": "^1.7.2",
"bootstrap": "^5.0.2", "bootstrap": "^5.3.3",
"bootstrap-icons": "^1.5.0", "bootstrap-icons": "^1.11.3",
"just-clone": "^3.2.1", "just-clone": "^6.2.0",
"on-change": "^3.0.2", "on-change": "^5.0.1",
"simplebar": "^5.3.5" "simplebar": "^6.2.7"
} }
} }

View File

@ -72,7 +72,11 @@ let config = {
} }
], ],
}) })
] ],
performance: {
maxEntrypointSize: 1048576,
maxAssetSize: 1048576
},
}; };
module.exports = config; module.exports = config;

View File

@ -1,3 +1,3 @@
# Props # Props
Props is a community driven website meant to help with organizing your online component shopping experience. Create project component lists, search across multiple commonly used online retail stores and share your projects with rest of the community! Props is a community driven website meant to help with organizing your online component shopping experience. Create project component lists, search across multiple commonly used online retail stores and share your projects with rest of the community!

9
environment.yml Normal file
View File

@ -0,0 +1,9 @@
name: props
channels:
- conda-forge
dependencies:
- dotnet-sdk=8
- nodejs=20
- icu
- tar
- zip

53
props.sln Normal file
View File

@ -0,0 +1,53 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Tests", "Props.Tests\Props.Tests.csproj", "{FB728827-A47B-42C1-8DB4-8AD95566E827}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props", "Props\Props.csproj", "{97CDC447-2FB7-448C-86E9-301BE1F04BE7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Props.Shop", "Props.Shop", "{0A2915DE-91DD-44AC-855D-059D45CEA9FE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit.Tests", "Props.Shop\Adafruit.Tests\Props.Shop.Adafruit.Tests.csproj", "{334B69F3-3707-4D45-97D8-13D37B19ABEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit", "Props.Shop\Adafruit\Props.Shop.Adafruit.csproj", "{528D0B67-B4D0-4B56-8375-D004E192E712}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Framework", "Props.Shop\Framework\Props.Shop.Framework.csproj", "{6D976097-07DB-476C-80D4-EA24A407D3E3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Release|Any CPU.Build.0 = Release|Any CPU
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Release|Any CPU.Build.0 = Release|Any CPU
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Release|Any CPU.Build.0 = Release|Any CPU
{528D0B67-B4D0-4B56-8375-D004E192E712}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{528D0B67-B4D0-4B56-8375-D004E192E712}.Debug|Any CPU.Build.0 = Debug|Any CPU
{528D0B67-B4D0-4B56-8375-D004E192E712}.Release|Any CPU.ActiveCfg = Release|Any CPU
{528D0B67-B4D0-4B56-8375-D004E192E712}.Release|Any CPU.Build.0 = Release|Any CPU
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{334B69F3-3707-4D45-97D8-13D37B19ABEC} = {0A2915DE-91DD-44AC-855D-059D45CEA9FE}
{528D0B67-B4D0-4B56-8375-D004E192E712} = {0A2915DE-91DD-44AC-855D-059D45CEA9FE}
{6D976097-07DB-476C-80D4-EA24A407D3E3} = {0A2915DE-91DD-44AC-855D-059D45CEA9FE}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,3 @@
#!/bin/bash
rm -rf ./Props/node_modules/.cache/webpack

21
scripts/install.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Installing .NET environment
# According to https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#examples
# and https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
curl -L -o- https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 8.0
echo export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 >> ~/.bashrc
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.bashrc
# Installing Node Version Manager
# According to https://github.com/Schniz/fnm
curl -fsSL https://fnm.vercel.app/install | bash
'''
sh '''#!/bin/bash
fnm install 20.15.1
fnm use default
# Restore all projects
dotnet restore Props/Props.csproj
dotnet restore Props.Tests/Props.Tests.csproj
dotnet restore Props.Shop/Props.Shop.sln
npm install --prefix ./Props

View File

@ -6,9 +6,9 @@ import shutil
PROP_SHOP_MODULES_DIR = "./Props.Shop/" PROP_SHOP_MODULES_DIR = "./Props.Shop/"
PROPS_SHOP_MODULES_DST = "./Props/shops/." PROPS_SHOP_MODULES_DST = "./Props/shops/."
NET_VER = "net6.0" NET_VER = "net7.0"
SHOP_MODULE_GLOB = "**/bin/Release/{net_ver}/publish/*.{ext}" SHOP_MODULE_GLOB = "output/shop-modules/**/*.{ext}"
EXTS = ["deps.json", "dll"] EXTS = ["deps.json", "dll"]

3
scripts/publish_props.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props
dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props

View File

@ -0,0 +1,3 @@
#!/bin/bash
dotnet publish --configuration Release --output output/shop-modules Props.Shop/Props.Shop.sln

3
scripts/test_props.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
dotnet test --logger xunit --no-restore Props.Tests

View File

@ -0,0 +1,3 @@
#!/bin/bash
dotnet test --logger xunit --no-restore Props.Shop/Props.Shop.sln