62 Commits
1.0.1 ... main

Author SHA1 Message Date
cbe5614794 fixes the push 2025-07-14 17:12:15 +01:00
f03c56fead Merge branch 'main' of gitea.pschneider.fr:paul/isn 2025-07-08 17:47:24 +01:00
26e253a3ab get prereleases from restoration by default
Fixes the .nupkgs pushes
2025-07-08 17:46:11 +01:00
6d0ec6d8a8 get prerelease from restoration by default 2025-07-07 15:52:03 +01:00
b97f3d3575 Bump to net9.0 2025-07-07 15:26:19 +01:00
9f357b4b0e logging 2025-07-07 13:07:02 +01:00
dc54df19a6 re testing 2025-07-07 11:51:02 +01:00
1224d27caa test upgrade 2025-07-07 09:36:41 +01:00
f91557ba05 WIP 2025-07-07 09:32:35 +01:00
a483804ac2 init a debian package 2025-06-08 01:33:29 +01:00
ee5a3cd775 get the package ignoring character case 2025-03-04 15:50:44 +00:00
5f7a346d8a implements the Web API deletion 2025-03-04 15:50:07 +00:00
94c850c293 Typo 2025-03-04 14:41:17 +00:00
301a276a7b Find package versions ignoring character case 2025-03-04 14:28:29 +00:00
bc1464db7f Web search result fixed 2025-02-01 19:44:31 +00:00
913f2ae5dd Layout 2024-11-03 16:20:43 +00:00
27ad3841a0 Fixes he layout 2024-11-03 16:10:03 +00:00
a6f9d974d3 Licence 2024-11-03 13:30:21 +00:00
a3d3e51259 uodated : usefull 2024-11-03 11:12:48 +00:00
753f54dad0 Home index 2024-11-02 15:49:26 +00:00
72ecf30458 repo cleanup 2024-10-20 19:54:36 +01:00
5f1dca3d61 dotnet package resolution 2024-10-20 19:47:49 +01:00
c615886a4c unit testing 2024-10-19 13:25:58 +01:00
2b45e421dd GetMetaData OK 2024-10-09 23:19:38 +01:00
7ca465d4a9 JQuery version bump 2024-07-28 14:07:06 +01:00
8532b81638 WIP package resolution 2024-07-19 10:21:25 +02:00
01405abdf2 Package deletion and types 2024-04-28 15:44:12 +01:00
62a8bf27cb Error Page 2024-04-28 15:43:10 +01:00
9c9ee6cc4c trying with isn.abst 2024-04-22 21:51:06 +01:00
3af05fc034 dependencies 2024-04-16 22:30:39 +01:00
04a467dd83 registration and detail url's 2024-03-31 15:59:43 +01:00
96f91c3ba0 net-8, localization, privacy, and js ref's 2024-03-30 09:45:17 +00:00
aeecc524a4 WIP /search 2024-03-24 16:53:12 +00:00
e229439174 Fixes the registration page index 2024-03-16 14:33:10 +00:00
c6c52a48c4 some details 2024-03-11 20:55:52 +00:00
8656bce151 fixes the catalog page 2024-03-11 01:02:11 +00:00
d6180aa154 REORG 2024-03-10 20:10:05 +00:00
89e1b5a235 Testing the push method (TODO coherence between return code a physical result) 2024-03-09 21:43:56 +00:00
e69462999e Cx strings contains user secrets ... 2024-03-09 16:13:30 +00:00
e1a012e15b orthograph 2024-02-12 02:45:47 +00:00
16258d1c33 version bumps 2024-02-12 02:22:10 +00:00
019d858ac2 fixes the chown 2024-02-12 02:21:50 +00:00
72839e8251 Release ! 2023-05-09 23:44:25 +01:00
7987fa04a0 update 2023-05-07 20:05:10 +01:00
9e79edc624 Trying and find a package from API 2023-05-01 22:05:39 +01:00
06b0115405 Commit Id and TimerStamps 2023-04-30 23:40:39 +01:00
cea05fe8ff Package Version constraints 2023-04-30 20:25:03 +01:00
fa6272ac28 cleaner code 2023-04-26 18:22:48 +01:00
77a16c5551 avoid a null ref 2023-04-26 18:22:39 +01:00
e2775dedaf Searching deleted package 2023-04-26 01:22:33 +01:00
e5932a11c2 cleanup 2023-04-26 01:22:00 +01:00
4de566ee41 Cleanup 2023-04-26 01:21:23 +01:00
d3b96088ab a better result 2023-04-25 22:40:58 +01:00
56e4b6c526 gives the store-api-key some options 2023-04-18 22:07:14 +01:00
b20e822427 ignore current source setting, at serialisation 2023-04-18 22:06:44 +01:00
9fc3f7ea4a MAssive attack 2023-04-18 08:43:22 +01:00
9363cd756b makes "store-api-ey" a command 2023-04-17 19:04:59 +01:00
9e2cebde2e This "push" is only for testing purposes 2023-04-17 19:04:10 +01:00
a2e22c357a Get a failed path 2023-04-17 19:03:11 +01:00
ee636a29ac db upgrade 2023-04-17 01:33:03 +01:00
d3f49a3c01 make packs 2023-04-17 01:32:47 +01:00
58d1f26701 No release yet 2023-04-17 01:20:42 +01:00
1791 changed files with 240992 additions and 10242 deletions

2
.build
View File

@ -18,7 +18,7 @@
<target name="build" description="build all">
<exec program="dotnet" commandline="build" />
</target>
<target name="test" description="build all">
<target name="test" description="test all">
<exec program="dotnet" commandline="test" />
</target>
</project>

12
.gitignore vendored
View File

@ -6,18 +6,16 @@
/src/isn/.vscode/
/test/isnd.tests/obj/
/test/isnd.tests/bin/
/packages/
bower_components/
/test/isn.tests/bin
/test/isn.tests/obj/
appsettings.Testing.json
appsettings.Development.json
/wwwroot/.sass-cache/
/src/isnd/wwwroot/.sass-cache/
/src/isn.abst/bin
/src/isn.abst/obj
/src/isnd/packages/
/test/data/test-isn/bin/
/test/data/test-isn/obj
.fake
artifacts/
/artifacts/
/.vs/
/.vscode/
appsettings.Development.json

View File

@ -1,29 +0,0 @@
<Properties StartupConfiguration="{9D758F00-17FF-433D-B088-F9C2D97C9BD1}|Default">
<MonoDevelop.Ide.Workbench ActiveDocument="src/isnd/isnd.csproj">
<Files>
<File FileName="src/isn/Program.cs" Line="55" Column="48" />
<File FileName="src/isnd/isnd.csproj" Line="15" Column="56" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="isn" expanded="True">
<Node name="src" expanded="True">
<Node name="isnd" selected="True" />
</Node>
<Node name="test" expanded="True" />
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.ItemProperties.src.isnd PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.ItemProperties.test.isnd.tests PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
<MonoDevelop.Ide.ItemProperties.src.isn PreferredExecutionTarget="MonoDevelop.Default" />
</Properties>

48
.vscode/launch.json vendored
View File

@ -1,48 +0,0 @@
{
// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
// Pointez pour afficher la description des attributs existants.
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
},
{
"name": "push",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/isn/bin/Debug/netcoreapp2.1/isn.dll",
"requireExactSource": false,
"args": [
"push", "/home/paul/Nupkgs/Yavsc.Abstract.1.0.8.nupkg"
],
"cwd": "${workspaceFolder}/src/isn",
"stopAtEntry": false,
"console": "internalConsole"
},
{
"name": "web",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/isnd/bin/Debug/netcoreapp2.1/isnd.dll",
"args": [],
"cwd": "${workspaceFolder}/src/isnd",
"stopAtEntry": false,
"requireExactSource": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
}
]
}

52
.vscode/settings.json vendored
View File

@ -1,52 +0,0 @@
{
"omnisharp.msbuild": true,
"dotnet-test-explorer.testProjectPath": "**/*tests.csproj",
"dotnet-test-explorer.runInParallel": false,
"dotnet-test-explorer.showCodeLens": true,
"dotnet-test-explorer.testArguments": "",
"nxunitExplorer.modules": [
"test/i*/bin/Debug/*/*.tests.dll"
],
"nxunitExplorer.skippattern": "",
"dotnetCoreExplorer.runEnvVars": {
"ASPNETCORE_ENVIRONMENT": "Testing"
},
"dotnetCoreExplorer.searchpatterns": "test/**/bin/**/*.tests.{dll,exe}",
"sqltools.connections": [
{
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"driver": "PostgreSQL",
"name": "isndev",
"group": "isn",
"database": "dotnetmvc",
"username": "dotnetmvc",
"password": "RvJa=y#b/tfg"
},
{
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"askForPassword": true,
"driver": "PostgreSQL",
"name": "isnd",
"group": "isn",
"database": "webid",
"username": "webid"
},
{
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"askForPassword": true,
"driver": "PostgreSQL",
"name": "isnddev",
"group": "isn",
"database": "isnd",
"username": "paul"
}
],
"omnisharp.disableMSBuildDiagnosticWarning": true,
"omnisharp.enableRoslynAnalyzers": false
}

View File

@ -1,8 +0,0 @@
using System;
namespace {{namespace}}
{
public class {{name}}
{
}
}

View File

@ -1,3 +0,0 @@
export class {{name}} {
}

View File

@ -1,9 +0,0 @@
Imports System
Namespace {{namespace}}
Public Class {{name}}
End Class
End Namespace

View File

@ -1,3 +0,0 @@
export default {{name}} {
}

View File

@ -1,8 +0,0 @@
using System;
namespace {{namespace}}
{
public enum {{name}}
{
}
}

View File

@ -1,8 +0,0 @@
using System;
namespace {{namespace}}
{
public interface {{name}}
{
}
}

View File

@ -1,3 +0,0 @@
export interface {{name}} {
}

View File

@ -1,46 +0,0 @@
{
"templates": [
{
"name": "Class",
"extension": "cs",
"file": "./class.cs-template",
"parameters": "./template-parameters.js"
},
{
"name": "Interface",
"extension": "cs",
"file": "./interface.cs-template",
"parameters": "./template-parameters.js"
},
{
"name": "Enum",
"extension": "cs",
"file": "./enum.cs-template",
"parameters": "./template-parameters.js"
},
{
"name": "Class",
"extension": "ts",
"file": "./class.ts-template",
"parameters": "./template-parameters.js"
},
{
"name": "Interface",
"extension": "ts",
"file": "./interface.ts-template",
"parameters": "./template-parameters.js"
},
{
"name": "Default",
"extension": "ts",
"file": "./default.ts-template",
"parameters": "./template-parameters.js"
},
{
"name": "Class",
"extension": "vb",
"file": "./class.vb-template",
"parameters": "./template-parameters.js"
}
]
}

View File

@ -1,17 +0,0 @@
var path = require("path");
module.exports = function(filename, projectPath, folderPath) {
var namespace = "Unknown";
if (projectPath) {
namespace = path.basename(projectPath, path.extname(projectPath));
if (folderPath) {
namespace += "." + folderPath.replace(path.dirname(projectPath), "").substring(1).replace(/[\\\/]/g, ".");
}
namespace = namespace.replace(/[\\\-]/g, "_");
}
return {
namespace: namespace,
name: path.basename(filename, path.extname(filename))
}
};

66
.vscode/tasks.json vendored
View File

@ -1,18 +1,6 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "restore",
"command": "dotnet",
"type": "process",
"args": [
"restore",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary",
"--ignore-failed-sources"
],
"problemMatcher": "$msCompile"
},
{
"label": "build",
"command": "dotnet",
@ -21,10 +9,10 @@
"build",
"/p:Configuration=Debug",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary",
"--ignore-failed-sources"
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "db-upgrade",
@ -41,23 +29,9 @@
"env": {
"ASPNETCORE_ENV": "Development"
}
}
},
{
"label": "buildcli",
"command": "msbuild",
"type": "process",
"args": [
"src/isn",
"/p:Configuration=Debug",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary",
"/restore"
],
"problemMatcher": "$msCompile"
},
"dependsOn":["build"],
"group": "test"
},
{
"label": "publish",
@ -74,24 +48,8 @@
"problemMatcher": "$msCompile",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "monopublish",
"command": "msbuild",
"type": "process",
"args": [
"/t:publish",
"/p:TargetFramework=netcoreapp2.1;PublishDir=${workspaceFolder}/artiffacts;RuntimeIdentifier=linux-x64",
],
"problemMatcher": "$msCompile"
},
{
"label": "copyTestConfig",
"command": "dotnet",
"type": "process",
"args": [ "build", "/t:CopyTestConfig" ]
},
"group": "none"
},
{
"label": "test",
@ -99,7 +57,7 @@
"type": "process",
"options": {
"env": {
"ASPNETCORE_ENVIRONMENT": "Testing"
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"args": [
@ -108,7 +66,8 @@
"--logger:xunit"
],
"problemMatcher": "$msCompile",
"dependsOn": [ "build", "copyTestConfig"]
"dependsOn": [ "build"],
"group": "test"
},
{
"label": "watch",
@ -124,7 +83,8 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"problemMatcher": "$msCompile"
"problemMatcher": "$msCompile",
"group": "none"
}
]
}

10
Directory.Build.props Normal file
View File

@ -0,0 +1,10 @@
<Project>
<PropertyGroup>
<Version>1.0.8</Version>
<Authors>paul</Authors>
<Copyright>WFPL</Copyright>
<ProjectUrl></ProjectUrl>
<RepositoryUrl></RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
</Project>

View File

@ -1,5 +0,0 @@
mode: Mainline
branches: {}
ignore:
sha: []
merge-message-formats: {}

49
Makefile Normal file
View File

@ -0,0 +1,49 @@
CONFIGURATION=Debug
TARGETFV=net8.0
all: build-isn build-isnd
build-%: src/%
dotnet build -p:Configuration=$(CONFIGURATION) $^
pack-%: src/%
dotnet pack $^
watch:
dotnet watch --project=src/isnd
test-push:
isn push src/isn/bin/Debug/isn.*.nupkg
clean-src-%: src/%
rm -rf $^/bin $^/obj
clean-test-%: test/%
rm -rf $^/bin $^/obj
packs: pack-isn pack-isnd pack-isn.abst
clean: clean-src-isnd clean-src-isn clean-src-isn.abst clean-test-isnd.tests clean-test-isn.tests
TARGETFRAMEWORK=net9.0
server-update:
dotnet build -c Release src/isnd
dotnet publish -c Release -f $(TARGETFRAMEWORK) src/isnd
sudo systemctl stop isnd
sudo cp -a src/isnd/bin/Release/$(TARGETFRAMEWORK)/publish/* /srv/www/isnd
sudo systemctl start isnd
client-update:
dotnet build -c Release src/isn
# MAJ du client
sudo cp -a src/isn/bin/Release/$(TARGETFRAMEWORK)/* /usr/local/lib/isn
sudo chown -R root:root /usr/local/lib/isn
src/isn.abst/bin/Release/isn.abst.1.0.24.nupkg:
dotnet pack src/isn.abst -c Release
push-test: src/isn.abst/bin/Release/isn.abst.1.0.24.nupkg
isn push -s "http://localhost:3002/v3/index.json" src/isn.abst/bin/Release/isn.abst.1.0.24.nupkg

View File

@ -1,6 +1,6 @@
# ISN
[![pipeline status](http://gitlab.pschneider.fr/Paul/nuget-host/badges/main/pipeline.svg)](http://gitlab.pschneider.fr/Paul/nuget-host/-/commits/main)
Hébergement de paquets logiciels Nuget, fournissant une implémentation minimale de l'API Nuget V3
## Usage
@ -18,26 +18,41 @@ wget http://localhost:5000/package/index.json?q=your&prerelease=true&semVerLevel
## Installation
Depuis le dossier de la solution, compiler la solution :
### Compilation
Dans le dossier de la solution, compiler la solution :
````bash
dotnet build /restore -c Release
dotnet publish -c Release
dotnet publish -c Release src/isnd
````
### Déploiement
### Déploiement du serveur
La livraison initiale, aujourd'hui :
````bash
sudo mkdir -p /srv/www/isnd
sudo cp -a src/isnd/bin/Release/netcoreapp2.1/publish/* /srv/www/isnd
sudo cp contrib/isnd /etc/init.d/isnd
sudo chmod +x /etc/init.d/isnd
sudo chown -R www-data.www-data /srv/www/isnd
sudo cp -a src/isnd/bin/Release/net9.0/publish/* /srv/www/isnd
sudo cp contrib/isnd.service /etc/systemd/system
chown -R isn:isn /srv/www/isnd/
sudo systemctl daemon-reload
````
* Créer une base de donées Postgresql,
* ajuster un fichier de configuration `/srv/www/isnd/appsettings.Production.json`
Une base de donées Postgresql est requise, avec, pour faire simple,
son utilisateur, et le droit de créer des tables (ce dernier droit pourrait expirer, mais gare aux mises à jour).
Il faudra éditer la configuration pour indiquer :
* dans /etc/systemd/system/isnd.service , la connextion à une base de donnée Postresgql, sous la forme :
`"Server=<pgserver>;Port=<pgport>;Database=<dbname>;Username=<dbusername>;Password=<dbpass>;"`
* dans /srv/www/isnd/appsettings.Production.json, la connection au serveur de messagerie,
* l'URL externe du ou des sites à propulser, et à utiliser dans la description de service,
* et les autres détails.
Pour faire ceci, vous pourrez éditer une copie du fichier `appsettings.json` vers `appsettings.Production.json`,
pour renseigner toutes les valeurs spécifiées.
* Démarrer le serveur :
````bash
@ -50,76 +65,36 @@ sudo systemctl start isnd
sudo systemctl enable isnd
````
### Installation du client
````bash
sudo mkdir /usr/local/lib/isn
sudo cp -a src/isn/bin/Release/netcoreapp2.1/* /usr/local/lib/isn
sudo cp -a src/isn/bin/Release/net6.0/* /usr/local/lib/isn
sudo chown -R root.root /usr/local/lib/isn
sudo ln -s /usr/local/lib/isn/isn /usr/local/bin/isn
````
### Mises à jour
Dans le détail, la séquence serait du style :
````bash
# compiler tout
dotnet build -c Release
dotnet publish -c Release -f netcoreapp2.1 src/isnd
dotnet publish -c Release -f net9.0 src/isnd
# MAJ du serveur
sudo systemctl stop isnd
sudo cp -a src/isnd/bin/Release/netcoreapp2.1/publish/* /srv/www/isnd
sudo cp -a src/isnd/bin/Release/net9.0/publish/* /srv/www/isnd
sudo systemctl start isnd
# MAJ du client
sudo cp -a src/isn/bin/Release/netcoreapp2.1/* /usr/local/lib/isn
sudo chown -R root.root /usr/local/lib/isn
sudo cp -a src/isn/bin/Release/net9.0/* /usr/local/lib/isn
sudo chown -R root:root /usr/local/lib/isn
````
## TODO
On pourra cibler "client-update" ou "server-update", à la construction :
```json
{
"@id": "https://api.nuget.org/v3/registration5-semver1/",
"@type": "RegistrationsBaseUrl",
"comment": "Base URL of Azure storage where NuGet package registration info is stored"
},
{
"@id": "https://api.nuget.org/v3-flatcontainer/",
"@type": "PackageBaseAddress/3.0.0",
"comment": "Base URL of where NuGet packages are stored, in the format https://api.nuget.org/v3-flatcontainer/{id-lower}/{version-lower}/{id-lower}.{version-lower}.nupkg"
},
{
"@id": "https://api.nuget.org/v3/registration5-semver1/",
"@type": "RegistrationsBaseUrl/3.0.0-rc",
"comment": "Base URL of Azure storage where NuGet package registration info is stored used by RC clients. This base URL does not include SemVer 2.0.0 packages."
},
{
"@id": "https://api.nuget.org/v3/registration5-semver1/",
"@type": "RegistrationsBaseUrl/3.0.0-beta",
"comment": "Base URL of Azure storage where NuGet package registration info is stored used by Beta clients. This base URL does not include SemVer 2.0.0 packages."
},
{
"@id": "https://www.nuget.org/packages/{id}/{version}?_src=template",
"@type": "PackageDetailsUriTemplate/5.1.0",
"comment": "URI template used by NuGet Client to construct details URL for packages"
},
{
"@id": "https://api.nuget.org/v3/registration5-gz-semver2/",
"@type": "RegistrationsBaseUrl/3.6.0",
"comment": "Base URL of Azure storage where NuGet package registration info is stored in GZIP format. This base URL includes SemVer 2.0.0 packages."
},
````bash
make server-update
make client-update
````

View File

@ -1,3 +0,0 @@
#!/bin/bash
/usr/bin/mono /usr/local/lib/isn/isn.exe $*

View File

@ -1,110 +0,0 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: isnd
# Required-Start: $local_fs $network $named $time $syslog $postgresql
# Required-Stop: $local_fs $network $named $time $syslog $postgresql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Script to run asp.net 5 application in background
### END INIT INFO
# Author: Ivan Derevianko aka druss <drussilla7@gmail.com>
# Modified by: Paul Schneider <redienhcs.luap@gmail.com>
. /lib/init/vars.sh
. /lib/lsb/init-functions
NAME=isnd
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
TMP_SAVE_runlevel_VAR=$runlevel
unset runlevel
running() {
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)
if kill -0 $PID 2>/dev/null
then
return 0
fi
fi
return 1
}
export WWW_USER=www-data
export ROOT=/srv/www/${NAME}
export DESC="$NAME"
export PIDFILE=/var/run/kestrel-${NAME}.pid
export LOGDIR=/var/log
export DOTNET_CLI_HOME=$ROOT
export ASPDOTNETCORE_ENVIRONMENT=Production
export ASPDOTNETCORE_LOGLEVEL=Information
status() {
if running;
then
echo "Service running $DESC ($NAME; pid: $PID)"
else
echo "Service stopped $DESC ($NAME)"
fi
echo WWW_USER: $WWW_USER ROOT:$ROOT DESC: $DESC NAME: $NAME PIDFILE: $PIDFILE LOGDIR=$LOGDIR
}
start() {
if running; then
echo "Service already running $DESC" "$NAME"
log_end_msg 0
else
cd $ROOT
log_daemon_msg "Starting service $NAME for user $WWW_USER"
if ! start-stop-daemon -SbmCv -u $WWW_USER -p $PIDFILE -d $ROOT -g www-data -x /usr/bin/dotnet isnd.dll run > "${LOGDIR}/kestrel-${NAME}.log"
then
log_daemon_msg "Could not start $NAME : $?, see ${LOGDIR}/kestrel-${NAME}.log"
log_end_msg 2
else
log_daemon_msg "Service $DESC started ($NAME), logs: ${LOGDIR}/kestrel-${NAME}.log"
log_end_msg 0
fi
fi
}
stop() {
if running
then
log_daemon_msg "Stopping service $NAME"
start-stop-daemon -K -p "$PIDFILE"
log_daemon_msg "$DESC stopped"
log_end_msg 0
else
log_daemon_msg "$DESC Service not running"
log_end_msg 1
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
export runlevel=$TMP_SAVE_runlevel_VAR

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<apikeys>
</apikeys>
<packageSources>
<add key="myIsnDev" value="http://localhost:5000/index.json" protocolVersion="3" />
</packageSources>
</configuration>

View File

@ -1,2 +0,0 @@
nuget install -Verbosity detailed -Source http://localhost:5000/index.json -Prerelease Yavsc.Abstract
nuget locals all -clear

View File

@ -1,4 +0,0 @@
= URL's
<http://localhost:5000/v3.4.0/registration/yavsc.abstract/index.json>

View File

@ -1,13 +0,0 @@
#!/bin/bash
set -e
# compiler tout
dotnet build -c Release
dotnet publish -c Release -f netcoreapp2.1 src/isnd
# MAJ du serveur
sudo systemctl stop isnd
sudo cp -a src/isnd/bin/Release/netcoreapp2.1/publish/* /srv/www/isnd
sudo systemctl start isnd
# MAJ du client
sudo cp -a src/isn/bin/Release/netcoreapp2.1/* /usr/local/lib/isn
sudo chown -R root.root /usr/local/lib/isn

8
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,8 @@
yavsc for Debian
Please edit this to provide information specific to
this yavsc Debian package.
(Automatically generated by debmake Version 4.5.1)
-- Paul Schneider <paul@localhost> Sun, 08 Jun 2025 01:41:54 +0100

14
debian/README.source vendored Normal file
View File

@ -0,0 +1,14 @@
yavsc for Debian
See Debian policy manual section 4.14.
https://www.debian.org/doc/debian-policy/ch-source.html#source-package-handling-debian-readme-source
If running dpkg-source -x on a source package doesnt produce the source of the
package, ready for editing, and allow one to make changes and run
dpkg-buildpackage to produce a modified package without taking any additional
steps, creating this file explain how to do all of these is recommended.
Otherwise, remove this file.
(Automatically generated by debmake Version 4.5.1)
-- Paul Schneider <paul@localhost> Sun, 08 Jun 2025 01:41:54 +0100

6
debian/changelog vendored Normal file
View File

@ -0,0 +1,6 @@
yavsc (1.1.0-1) UNRELEASED; urgency=low
* Initial release. Closes: #nnnn
<nnnn is the bug number of your ITP>
-- Paul Schneider <paul@localhost> Sun, 08 Jun 2025 01:41:54 +0100

1
debian/clean vendored Normal file
View File

@ -0,0 +1 @@
# You must remove unused comment lines for the released package.

21
debian/control vendored Normal file
View File

@ -0,0 +1,21 @@
Source: yavsc
Section: unknown
Priority: optional
Maintainer: Paul Schneider <paul@localhost>
Build-Depends:
debhelper-compat (= 13),
Standards-Version: 4.7.0
Homepage: <insert the upstream URL, if relevant>
Rules-Requires-Root: no
#Vcs-Git: https://salsa.debian.org/debian/yavsc.git
#Vcs-Browser: https://salsa.debian.org/debian/yavsc
Package: yavsc
Architecture: any
Multi-Arch: foreign
Depends:
${misc:Depends},
${shlibs:Depends},
Description: auto-generated package by debmake
This Debian binary package was auto-generated by the
debmake(1) command provided by the debmake package.

2092
debian/copyright vendored Normal file

File diff suppressed because it is too large Load Diff

2
debian/dirs vendored Normal file
View File

@ -0,0 +1,2 @@
# You must remove unused comment lines for the released package.

2
debian/gbp.conf vendored Normal file
View File

@ -0,0 +1,2 @@
[DEFAULT]
upstream-tag=v%(version)s

2
debian/install vendored Normal file
View File

@ -0,0 +1,2 @@
# You must remove unused comment lines for the released package.

2
debian/links vendored Normal file
View File

@ -0,0 +1,2 @@
# You must remove unused comment lines for the released package.

7
debian/maintscript.ex vendored Normal file
View File

@ -0,0 +1,7 @@
# see: dh_installdeb(1), dpkg-maintscript-helper(1)
# For renaming a conffile, you are advised to uncomment and edit the following
#dpkg-maintscript-helper mv_conffile old-conffile new-conffile prior-version package
# For switching a symlink to directory, you are advised to uncomment and edit the following
#dpkg-maintscript-helper symlink_to_dir pathname old-target prior-version package
# For switching a directory to symlink, you are advised to uncomment and edit the following
#dpkg-maintscript-helper dir_to_symlink pathname new-target prior-version package

73
debian/manpage.1.ex vendored Normal file
View File

@ -0,0 +1,73 @@
.\" Hey, EMACS: -*- nroff -*-
.\" (C) Copyright 2025 Paul Schneider <paul@localhost>,
.\"
.\" See man(1), man(7) and man-pages(7), https://www.tldp.org/HOWTO/Man-Page/
.\" for the documentation about man-pages and man-page-formatting:
.\"
.\" 1. Use this as the template for the manpage for <commandname> after
.\" renaming this file to <commandname>.1 (if it is for section 1).
.\"
.\" 2. List the path to this file in debian/<packagename>.manpages to
.\" install this manpage to the target binary package.
.\"
.\" First parameter, YAVSC, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.\"
.\" Easier way to make an initial manpage for commands is the use of help2man
.\" command provided by help2man package while using this file as an tutorial
.\" to understand what was created or to make touch-up edits.
.\"
.\" Other template files (manpage.*) created by debmake command are secondary
.\" helper files to create an initial manpage.
.\"
.TH YAVSC SECTION "08 Jun 2025"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
yavsc \- program to do something
.SH SYNOPSIS
.B yavsc
.RI [ options ] " files" ...
.br
.B bar
.RI [ options ] " files" ...
.SH DESCRIPTION
This manual page documents briefly the
.B yavsc
and
.B bar
commands.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
\fByavsc\fP is a program that...
.SH OPTIONS
These programs follow the usual GNU command line syntax, with long
options starting with two dashes (`-').
A summary of options is included below.
For a complete description, see the Info files.
.TP
.B \-h, \-\-help
Show summary of options.
.TP
.B \-v, \-\-version
Show version of program.
.SH SEE ALSO
.BR bar (1),
.BR baz (1).
.br
The programs are documented fully by
.IR "The Rise and Fall of a Fooish Bar" ,
available via the Info system.

44
debian/manpage.asciidoc.ex vendored Normal file
View File

@ -0,0 +1,44 @@
= @UPACKAGE@(1)
:man source: YAVSC
:man version: 1.1.0-1
:man manual: YAVSC Manual
// Secondary template file to make manpage.1
//
// See "AsciiDoc Syntax Quick Reference"
// https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/
// https://docs.asciidoctor.org/asciidoctor/latest/manpage-backend/
// convert by:
// $ asciidoctor --doctype manpage -b manpage -a 'newline=\n' yavsc.asciidoc
== NAME
yavsc - program to do something
== SYNOPSIS
*yavsc* [*-h*] ...
== DESCRIPTION
*yavsc* do something.
=== optional arguments:
*-h*, *--help*::
show this help message and exit.
== AUTHOR
Copyright © 2025 Paul Schneider <paul@localhost>
== LICENSE
MIT License
== SEE ALSO
See also ...

129
debian/manpage.md.ex vendored Normal file
View File

@ -0,0 +1,129 @@
% YAVSC(SECTION) | User Commands
%
% "08 Jun 2025"
[comment]: # Secondary template file to make manpage.1
[comment]: #
[comment]: # The lines above form a Pandoc metadata block. They must be
[comment]: # the first ones in the file.
[comment]: # See https://pandoc.org/MANUAL.html#metadata-blocks for details.
[comment]: # pandoc -s -f markdown -t man package.md -o package.1
[comment]: #
[comment]: # A manual page package.1 will be generated. You may view the
[comment]: # manual page with: nroff -man package.1 | less. A typical entry
[comment]: # in a Makefile or Makefile.am is:
[comment]: #
[comment]: # package.1: package.md
[comment]: # pandoc --standalone --from=markdown --to=man $< --output=$@
[comment]: #
[comment]: # The pandoc binary is found in the pandoc package. Please remember
[comment]: # that if you create the nroff version in one of the debian/rules
[comment]: # file targets, such as build, you will need to include pandoc in
[comment]: # your Build-Depends control field.
[comment]: # lowdown is a low dependency, lightweight alternative to
[comment]: # pandoc as a markdown to manpage translator. Use with:
[comment]: #
[comment]: # package.1: package.md
[comment]: # lowdown -s -Tman -o $@ $<
[comment]: #
[comment]: # And add lowdown to the Build-Depends control field.
[comment]: # Remove the lines starting with '[comment]:' in this file in order
[comment]: # to avoid warning messages.
# NAME
yavsc - short summary
# SYNOPSIS
**yavsc** **-e** _this_ [**\-\-example=that**] [{**-e** | **\-\-example**} _this_]
[{**-e** | **\-\-example**} {_this_ | _that_}]
**yavsc** [{**-h** | *\-\-help**} | {**-v** | **\-\-version**}]
# DESCRIPTION
**yavsc** is a program that...
# OPTIONS
The program follows the usual GNU command line syntax, with long options
starting with two dashes ('-'). A summary of options is included below.
**-e** _this_, **\-\-example=**_that_
: Does this and that.
**-h**, **\-\-help**
: Show summary of options.
**-v**, **\-\-version**
: Show version of program.
# FILES
/etc/foo.conf
: The system-wide configuration file to control the behaviour of
yavsc. See **foo.conf**(5) for further details.
${HOME}/.foo.conf
: The per-user configuration file to control the behaviour of
yavsc. See **foo.conf**(5) for further details.
# ENVIRONMENT
**FOO_CONF**
: If used, the defined file is used as configuration file (see also
the section called FILES).
# DIAGNOSTICS
The following diagnostics may be issued on stderr:
Bad configuration file. Exiting.
: The configuration file seems to contain a broken configuration
line. Use the **\-\-verbose** option, to get more info.
**yavsc** provides some return codes, that can be used in scripts:
Code Diagnostic
0 Program exited successfully.
1 The configuration file seems to be broken.
# BUGS
The program is currently limited to only work with the foobar library.
The upstream BTS can be found at https://bugzilla.foo.tld.
# SEE ALSO
**bar**(1), **baz**(1), **foo.conf**(5)
The programs are documented fully by The Rise and Fall of a Fooish Bar
available via the **info**(1) system.
# AUTHOR
Paul Schneider <paul@localhost>
: Wrote this manpage for the Debian system.
# COPYRIGHT
Copyright © 2025 Paul Schneider
This manual page was written for the Debian system (and may be used by
others).
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU General Public License, Version 2 or (at your option)
any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL.
[comment]: # Local Variables:
[comment]: # mode: markdown
[comment]: # End:

144
debian/manpage.sgml.ex vendored Normal file
View File

@ -0,0 +1,144 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!--
Install docbook-to-man package and see docbook-to-man(1)
Secondary template file to make manpage.1
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
<!ENTITY dhsurname "<surname>SURNAME</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>08 Jun 2025</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
<!ENTITY dhemail "<email>paul@localhost</email>">
<!ENTITY dhusername "Paul Schneider">
<!ENTITY dhucpackage "<refentrytitle>YAVSC</refentrytitle>">
<!ENTITY dhpackage "yavsc">
<!ENTITY debian "<productname>Debian</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2003</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>program to do something</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage;</command>
<arg><option>-e <replaceable>this</replaceable></option></arg>
<arg><option>--example <replaceable>that</replaceable></option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>This manual page documents briefly the
<command>&dhpackage;</command> and <command>bar</command>
commands.</para>
<para>This manual page was written for the &debian; distribution
because the original program does not have a manual page.
Instead, it has documentation in the &gnu;
<application>Info</application> format; see below.</para>
<para><command>&dhpackage;</command> is a program that...</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<para>These programs follow the usual &gnu; command line syntax,
with long options starting with two dashes (`-'). A summary of
options is included below. For a complete description, see the
<application>Info</application> files.</para>
<variablelist>
<varlistentry>
<term><option>-h</option>
<option>--help</option>
</term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option>
<option>--version</option>
</term>
<listitem>
<para>Show version of program.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>bar (1), baz (1).</para>
<para>The programs are documented fully by <citetitle>The Rise and
Fall of a Fooish Bar</citetitle> available via the
<application>Info</application> system.</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; &dhemail; for
the &debian; system (and may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the &gnu; General Public License, Version 2 any
later version published by the Free Software Foundation.
</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

267
debian/manpage.xml.ex vendored Normal file
View File

@ -0,0 +1,267 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!--
Secondary template file to make manpage.1
Install docbook-xsl and docbook-xsl-doc-html and see
/usr/share/doc/docbook-xsl/examples/foo.1.example_manpage.xml
/usr/share/doc/docbook-xsl-doc-html/doc/manpages/index.html
The xsltproc binary is found in the xsltproc package. The XSL files are in
docbook-xsl. A description of the parameters you can use can be found in the
docbook-xsl-doc-* packages.
Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`
General documentation about man-pages and man-page-formatting:
man(1), man(7), man-pages(7), https://www.tldp.org/HOWTO/Man-Page/
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "FIRSTNAME">
<!ENTITY dhsurname "SURNAME">
<!-- dhusername could also be set to "&dhfirstname; &dhsurname;". -->
<!ENTITY dhusername "Paul Schneider">
<!ENTITY dhemail "paul@localhost">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1) and
https://www.tldp.org/HOWTO/Man-Page/q2.html. -->
<!ENTITY dhsection "SECTION">
<!-- TITLE should be something like "User commands" or similar (see
https://www.tldp.org/HOWTO/Man-Page/q2.html). -->
<!ENTITY dhtitle "yavsc User Manual">
<!ENTITY dhucpackage "YAVSC">
<!ENTITY dhpackage "yavsc">
]>
<refentry>
<refentryinfo>
<title>&dhtitle;</title>
<productname>&dhpackage;</productname>
<authorgroup>
<author>
<firstname>&dhfirstname;</firstname>
<surname>&dhsurname;</surname>
<contrib>Wrote this manpage for the Debian system.</contrib>
<address>
<email>&dhemail;</email>
</address>
</author>
</authorgroup>
<copyright>
<year>2007</year>
<holder>&dhusername;</holder>
</copyright>
<legalnotice>
<para>This manual page was written for the Debian system
(and may be used by others).</para>
<para>Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU General Public License,
Version 2 or (at your option) any later version published by
the Free Software Foundation.</para>
<para>On Debian systems, the complete text of the GNU General Public
License can be found in
<filename>/usr/share/common-licenses/GPL</filename>.</para>
</legalnotice>
</refentryinfo>
<refmeta>
<refentrytitle>&dhucpackage;</refentrytitle>
<manvolnum>&dhsection;</manvolnum>
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>program to do something</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage;</command>
<!-- These are several examples, how syntaxes could look -->
<arg choice="plain"><option>-e <replaceable>this</replaceable></option></arg>
<arg choice="opt"><option>--example=<parameter>that</parameter></option></arg>
<arg choice="opt">
<group choice="req">
<arg choice="plain"><option>-e</option></arg>
<arg choice="plain"><option>--example</option></arg>
</group>
<replaceable class="option">this</replaceable>
</arg>
<arg choice="opt">
<group choice="req">
<arg choice="plain"><option>-e</option></arg>
<arg choice="plain"><option>--example</option></arg>
</group>
<group choice="req">
<arg choice="plain"><replaceable>this</replaceable></arg>
<arg choice="plain"><replaceable>that</replaceable></arg>
</group>
</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&dhpackage;</command>
<!-- Normally the help and version options make the programs stop
right after outputting the requested information. -->
<group choice="opt">
<arg choice="plain">
<group choice="req">
<arg choice="plain"><option>-h</option></arg>
<arg choice="plain"><option>--help</option></arg>
</group>
</arg>
<arg choice="plain">
<group choice="req">
<arg choice="plain"><option>-v</option></arg>
<arg choice="plain"><option>--version</option></arg>
</group>
</arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="description">
<title>DESCRIPTION</title>
<para>This manual page documents briefly the
<command>&dhpackage;</command> and <command>bar</command>
commands.</para>
<para>This manual page was written for the Debian distribution
because the original program does not have a manual page.
Instead, it has documentation in the GNU <citerefentry>
<refentrytitle>info</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry> format; see below.</para>
<para><command>&dhpackage;</command> is a program that...</para>
</refsect1>
<refsect1 id="options">
<title>OPTIONS</title>
<para>The program follows the usual GNU command line syntax,
with long options starting with two dashes (`-'). A summary of
options is included below. For a complete description, see the
<citerefentry>
<refentrytitle>info</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry> files.</para>
<variablelist>
<!-- Use the variablelist.term.separator and the
variablelist.term.break.after parameters to
control the term elements. -->
<varlistentry>
<term><option>-e <replaceable>this</replaceable></option></term>
<term><option>--example=<replaceable>that</replaceable></option></term>
<listitem>
<para>Does this and that.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-h</option></term>
<term><option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<term><option>--version</option></term>
<listitem>
<para>Show version of program.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="files">
<title>FILES</title>
<variablelist>
<varlistentry>
<term><filename>/etc/foo.conf</filename></term>
<listitem>
<para>The system-wide configuration file to control the
behaviour of <application>&dhpackage;</application>. See
<citerefentry>
<refentrytitle>foo.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry> for further details.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>${HOME}/.foo.conf</filename></term>
<listitem>
<para>The per-user configuration file to control the
behaviour of <application>&dhpackage;</application>. See
<citerefentry>
<refentrytitle>foo.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry> for further details.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="environment">
<title>ENVIRONMENT</title>
<variablelist>
<varlistentry>
<term><envar>FOO_CONF</envar></term>
<listitem>
<para>If used, the defined file is used as configuration
file (see also <xref linkend="files"/>).</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="diagnostics">
<title>DIAGNOSTICS</title>
<para>The following diagnostics may be issued
on <filename class="devicefile">stderr</filename>:</para>
<variablelist>
<varlistentry>
<term><errortext>Bad configuration file. Exiting.</errortext></term>
<listitem>
<para>The configuration file seems to contain a broken configuration
line. Use the <option>--verbose</option> option, to get more info.
</para>
</listitem>
</varlistentry>
</variablelist>
<para><command>&dhpackage;</command> provides some return codes, that can
be used in scripts:</para>
<segmentedlist>
<segtitle>Code</segtitle>
<segtitle>Diagnostic</segtitle>
<seglistitem>
<seg><errorcode>0</errorcode></seg>
<seg>Program exited successfully.</seg>
</seglistitem>
<seglistitem>
<seg><errorcode>1</errorcode></seg>
<seg>The configuration file seems to be broken.</seg>
</seglistitem>
</segmentedlist>
</refsect1>
<refsect1 id="bugs">
<!-- Or use this section to tell about upstream BTS. -->
<title>BUGS</title>
<para>The program is currently limited to only work
with the <package>foobar</package> library.</para>
<para>The upstreams <acronym>BTS</acronym> can be found
at <ulink url="https://bugzilla.foo.tld"/>.</para>
</refsect1>
<refsect1 id="see_also">
<title>SEE ALSO</title>
<!-- In alphabetical order. -->
<para><citerefentry>
<refentrytitle>bar</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>baz</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>foo.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry></para>
<para>The programs are documented fully by <citetitle>The Rise and
Fall of a Fooish Bar</citetitle> available via the <citerefentry>
<refentrytitle>info</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry> system.</para>
</refsect1>
</refentry>

1
debian/patches/series vendored Normal file
View File

@ -0,0 +1 @@
# You must remove unused comment lines for the released package.

7
debian/postinst.ex vendored Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# If no user provided script is activated in this file, you should remove this file.
set -e
#DEBHELPER#
exit 0

7
debian/postrm.ex vendored Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# If no user provided script is activated in this file, you should remove this file.
set -e
#DEBHELPER#
exit 0

7
debian/preinst.ex vendored Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# If no user provided script is activated in this file, you should remove this file.
set -e
#DEBHELPER#
exit 0

7
debian/prerm.ex vendored Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# If no user provided script is activated in this file, you should remove this file.
set -e
#DEBHELPER#
exit 0

15
debian/rules vendored Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
%:
dh $@
#override_dh_auto_install:
# dh_auto_install -- prefix=/usr
#override_dh_install:
# dh_install --list-missing -X.pyc -X.pyo

25
debian/salsa-ci.yml vendored Normal file
View File

@ -0,0 +1,25 @@
# For more information on what jobs are run see:
# https://salsa.debian.org/salsa-ci-team/pipeline
#
# To enable the jobs, go to your repository (at salsa.debian.org)
# and click over Settings > CI/CD > Expand (in General pipelines).
# In "CI/CD configuration file" write debian/salsa-ci.yml and click
# in "Save Changes". The CI tests will run after the next commit.
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
# # This commented-out sample disables all default tests, only disable those
# # CI tests that is required to get the CI process to succeed.
#
# variables:
# SALSA_CI_DISABLE_APTLY: 1
# SALSA_CI_DISABLE_AUTOPKGTEST: 1
# SALSA_CI_DISABLE_BLHC: 1
# SALSA_CI_DISABLE_LINTIAN: 1
# SALSA_CI_DISABLE_PIUPARTS: 1
# SALSA_CI_DISABLE_REPROTEST: 1
# SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 1
# SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
# SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
# SALSA_CI_DISABLE_CROSSBUILD_ARM64: 1

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

2
debian/source/lintian-overrides.ex vendored Normal file
View File

@ -0,0 +1,2 @@
# See dh_lintian(1)
# cut and paste the lintian(1) outputs without leading "E: ", "W: ", ...

47
debian/source/local-options.ex vendored Normal file
View File

@ -0,0 +1,47 @@
# Uncomment to active options. See dpkg-source(1)
#
# This file contains a list of long options that should be automatically
# prepended to the set of command line options of a dpkg-source --build call.
# This is normally for the non-native Debian packaging.
# Whenever possible, use this instead of debian/local-options to make
# dpkg-source long options applied for the team builds based on the VCS
# repository while NMU builds based on the Debian source package are not
# affected.
# == Patch unapplied strategy (dquilt, gbp, ...) ==
#
# The source outside of debian/ directory is unmodified from the upstream one:
# * Workflow using diff -u
# https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#diff-u
# * Workflow using dquilt
# https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#dquilt
# * Workflow using dpkg-source commit (commit only patch to VCS after dpkg-source commit)
# https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#dpkg-source-commit
# * Workflow to use gbp-buildpackage(1) with pristine-tar
# * Workflow described in dgit-maint-gbp(7)
#
# Uncomment following if you use this strategy
#abort-on-upstream-changes
#unapply-patches
# == Patch applied strategy (merge) ==
#
# The source outside of debian/ directory is modified by maintainer and
# different from the upstream one:
# * Workflow using dpkg-source commit (commit all to VCS after dpkg-source commit)
# https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#dpkg-source-commit
# * Workflow described in dgit-maint-merge(7)
#
# uncomment following if you use this strategy
#single-debian-patch
#auto-commit
# == Patch applied strategy (debrebase) ==
#
# The source outside of debian/ directory is modified by maintainer and
# different from the upstream one:
# * Workflow described in dgit-maint-debrebase(7)
#
# Remove this file if you use this strategy

26
debian/source/local-patch-header.ex vendored Normal file
View File

@ -0,0 +1,26 @@
The automatically generated patch by dpkg-source(1) puts this free form text on
top of it.
This is normally for the non-native Debian packaging.
Whenever possible, use this instead of debian/patch-header to make dpkg-source
long options applied for the team builds based on the VCS repository while NMU
builds based on the Debian source package are not affected.
== Patch applied strategy (merge) ==
The source outside of debian/ directory is modified by maintainer and
different from the upstream one:
* Workflow using dpkg-source commit (commit all to VCS after dpkg-source commit)
https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#dpkg-source-commit
* Workflow described in dgit-maint-merge(7)
Keep this file after updating its content if you use this strategy
== Other strategies ==
Remove this file if you use this strategy
===
A single combined diff, containing all the changes, follows.

10
debian/source/options.ex vendored Normal file
View File

@ -0,0 +1,10 @@
# Uncomment to active options. See dpkg-source(1)
#
# This file contains a list of long options that should be automatically
# prepended to the set of command line options of a dpkg-source --build call.
# This is normally for the non-native Debian packaging.
# Whenever possible, use debian/local-options instead to make dpkg-source long
# options applied for the team builds based on the VCS repository while NMU
# builds based on the Debian source package are not affected.

12
debian/source/patch-header.ex vendored Normal file
View File

@ -0,0 +1,12 @@
The automatically generated patch by dpkg-source(1) puts this free form text on
top of it.
This is normally for the non-native Debian packaging.
Whenever possible, use debian/local-patch-header instead to make dpkg-source long
options applied for the team builds based on the VCS repository while NMU
builds based on the Debian source package are not affected.
A single combined diff, containing all the changes, follows.
===

9
debian/tests/control vendored Normal file
View File

@ -0,0 +1,9 @@
#
# DEP-8: autopkgtest - automatic as-installed package testing
# Please check * https://dep-team.pages.debian.net/deps/dep8/
# * /usr/share/doc/autopkgtest
#
# !!! Please make sure to edit this to a valid test, otherwise build will fails
#
#Tests: testcode.sh
#Restrictions: allow-stderr, breaks-testbed, needs-internet, needs-root

16
debian/upstream/metadata vendored Normal file
View File

@ -0,0 +1,16 @@
#
# DEP-12: Per-package machine-readable metadata about Upstream
# Please check * https://dep-team.pages.debian.net/deps/dep12/
# * https://wiki.debian.org/UpstreamMetadata
Reference:
Author: <please use full names and separate multiple author by the keyword "and">
Title:
Journal:
Year:
Volume:
Number:
Pages:
DOI:
PMID:
URL:
eprint:

3
debian/watch vendored Normal file
View File

@ -0,0 +1,3 @@
# You must remove unused comment lines for the released package.
# Compulsory line, this is a version 4 file
version=4

3
debian/yavsc.bug-control.ex vendored Normal file
View File

@ -0,0 +1,3 @@
# Installed as usr/share/bug/yavsc/control in yavsc
# See dh_bugfiles(1) and /usr/share/doc/reportbug/README.developers.gz
# It is the bug control file containing some directions for the bug reporting tool.

3
debian/yavsc.bug-presubj.ex vendored Normal file
View File

@ -0,0 +1,3 @@
# Installed as usr/share/bug/yavsc/presubj in yavsc
# See dh_bugfiles(1) and /usr/share/doc/reportbug/README.developers.gz
# The contents of this file are displayed to the user by the bug reporting tool.

3
debian/yavsc.bug-script.ex vendored Normal file
View File

@ -0,0 +1,3 @@
# Installed as usr/share/bug/yavsc or usr/share/bug/yavsc/script in yavsc
# See dh_bugfiles(1) and /usr/share/doc/reportbug/README.developers.gz
# This is the script to be run by the bug reporting program for generating a bug report template.

10
debian/yavsc.conffiles.ex vendored Normal file
View File

@ -0,0 +1,10 @@
# See dh_installdeb(1).
# This file will be installed into the DEBIAN directory. The provided file will
# be enriched by debhelper to include all the conffiles auto-detected by
# debhelper (the maintainer should not list there as debhelper assumes it
# should handle that part).
#
# This file is primarily useful for using "special" entries such as the
# remove-on-upgrade feature from dpkg.
#
# For most packages, this file doesnt need to exist.

5
debian/yavsc.cron.d.ex vendored Normal file
View File

@ -0,0 +1,5 @@
#
# Regular cron jobs for the yavsc package
# See dh_installcron(1) and crontab(5).
#
#0 4 * * * root [ -x /usr/bin/yavsc_maintenance ] && /usr/bin/yavsc_maintenance

3
debian/yavsc.cron.daily.ex vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
# Daily cron jobs shell script for the yavsc package
#true

3
debian/yavsc.cron.hourly.ex vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
# Hourly cron jobs shell script for the yavsc package
#true

3
debian/yavsc.cron.monthly.ex vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
# Monthly cron jobs shell script for the yavsc package
#true

3
debian/yavsc.cron.weekly.ex vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
# Weekly cron jobs shell script for the yavsc package
#true

7
debian/yavsc.default.ex vendored Normal file
View File

@ -0,0 +1,7 @@
# Defaults for yavsc initscript
#
# This is a POSIX shell fragment
#
#DAEMON_OPTS=""

47
debian/yavsc.emacsen-install.ex vendored Normal file
View File

@ -0,0 +1,47 @@
#! /bin/sh -e
# /usr/lib/emacsen-common/packages/install/yavsc
# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
# from the install scripts for gettext by Santiago Vila
# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
FLAVOR=$1
PACKAGE=yavsc
if [ ${FLAVOR} = emacs ]; then exit 0; fi
echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
#FLAVORTEST=`echo $FLAVOR | cut -c-6`
#if [ ${FLAVORTEST} = xemacs ] ; then
# SITEFLAG="-no-site-file"
#else
# SITEFLAG="--no-site-file"
#fi
FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
ELRELDIR=../../../emacs/site-lisp/${PACKAGE}
# Install-info-altdir does not actually exist.
# Maybe somebody will write it.
if test -x /usr/sbin/install-info-altdir; then
echo install/${PACKAGE}: install Info links for ${FLAVOR}
install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz
fi
install -m 755 -d ${ELCDIR}
cd ${ELDIR}
FILES=`echo *.el`
cd ${ELCDIR}
ln -sf ${ELRELDIR}/*.el .
cat << EOF > path.el
(debian-pkg-add-load-path-item ".")
(setq byte-compile-warnings nil)
EOF
${FLAVOR} ${FLAGS} ${FILES}
rm -f path.el
exit 0

15
debian/yavsc.emacsen-remove.ex vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh -e
# /usr/lib/emacsen-common/packages/remove/yavsc
FLAVOR=$1
PACKAGE=yavsc
if [ ${FLAVOR} != emacs ]; then
if test -x /usr/sbin/install-info-altdir; then
echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/yavsc.info.gz
fi
echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
fi

26
debian/yavsc.emacsen-startup.ex vendored Normal file
View File

@ -0,0 +1,26 @@
;; -*-emacs-lisp-*-
;;
;; Emacs startup file, e.g. /etc/emacs/site-start.d/50yavsc.el
;; for the Debian yavsc package
;;
;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
;; Modified by Dirk Eddelbuettel <edd@debian.org>
;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>
;; The yavsc package follows the Debian/GNU Linux 'emacsen' policy and
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
;; xemacs19, emacs20, xemacs20...). The compiled code is then
;; installed in a subdirectory of the respective site-lisp directory.
;; We have to add this to the load-path:
(let ((package-dir (concat "/usr/share/"
(symbol-name debian-emacs-flavor)
"/site-lisp/yavsc")))
;; If package-dir does not exist, the yavsc package must have
;; removed but not purged, and we should skip the setup.
(when (file-directory-p package-dir)
(if (fboundp 'debian-pkg-add-load-path-item)
(debian-pkg-add-load-path-item package-dir)
(setq load-path (cons package-dir load-path)))
(autoload 'yavsc-mode "yavsc-mode"
"Major mode for editing yavsc files." t)
(add-to-list 'auto-mode-alist '("\\.yavsc$" . yavsc-mode))))

2
debian/yavsc.lintian-overrides.ex vendored Normal file
View File

@ -0,0 +1,2 @@
# See dh_lintian(1) and Lintian User Manual (/usr/share/doc/lintian/lintian.html)
# cut and paste the lintian(1) outputs without leading "E: ", "W: ", ...

2
debian/yavsc.service.ex vendored Normal file
View File

@ -0,0 +1,2 @@
# If this exists, it is installed into lib/systemd/system/yavsc.service in yavsc
# See dh_systemd_enable(1).

2
debian/yavsc.tmpfile.ex vendored Normal file
View File

@ -0,0 +1,2 @@
# If this exists, it is installed into usr/lib/tmpfiles.d/yavsc.conf in yavsc
# See dh_installtmpfiles(1).

View File

@ -1,30 +1,27 @@
{
"version": 1,
"isRoot": true,
"tools": {
"codecov.tool": {
"version": "1.13.0",
"commands": [
"codecov"
]
},
"gitversion.tool": {
"version": "5.10.1",
"commands": [
"dotnet-gitversion"
]
},
"gitreleasemanager.tool": {
"version": "0.13.0",
"commands": [
"dotnet-gitreleasemanager"
]
},
"Wyam2.Tool": {
"version": "3.0.0-rc3",
"commands": [
"wyam2"
]
}
"version": 1,
"isRoot": true,
"tools": {
"codecov.tool": {
"version": "1.13.0",
"commands": [
"codecov"
],
"rollForward": false
},
"gitreleasemanager.tool": {
"version": "0.20.0",
"commands": [
"dotnet-gitreleasemanager"
],
"rollForward": false
},
"Wyam2.Tool": {
"version": "3.0.0-rc3",
"commands": [
"wyam2"
],
"rollForward": false
}
}
}
}

27
gitversion.json Normal file
View File

@ -0,0 +1,27 @@
{
"AssemblySemFileVer": "1.1.1.0",
"AssemblySemVer": "1.1.1.0",
"BranchName": "main",
"BuildMetaData": null,
"CommitDate": "2024-10-09",
"CommitsSinceVersionSource": 19,
"EscapedBranchName": "main",
"FullBuildMetaData": "Branch.main.Sha.2b45e421dda285b73bf7eb3387915030cd751b88",
"FullSemVer": "1.1.1-19",
"InformationalVersion": "1.1.1-19+Branch.main.Sha.2b45e421dda285b73bf7eb3387915030cd751b88",
"Major": 1,
"MajorMinorPatch": "1.1.1",
"Minor": 1,
"Patch": 1,
"PreReleaseLabel": "",
"PreReleaseLabelWithDash": "",
"PreReleaseNumber": 19,
"PreReleaseTag": "19",
"PreReleaseTagWithDash": "-19",
"SemVer": "1.1.1-19",
"Sha": "2b45e421dda285b73bf7eb3387915030cd751b88",
"ShortSha": "2b45e42",
"UncommittedChanges": 20,
"VersionSourceSha": "72839e8251297935a4ab138a99152733f07a23f2",
"WeightedPreReleaseNumber": 55019
}

View File

@ -1,22 +0,0 @@
{
"dotnet": {
"enabled": false
},
"msbuild": {
"enabled": true
},
"Dnx": {
"enabled": false
},
"Script": {
"enabled": false
},
"fileOptions": {
"systemExcludeSearchPatterns": [
"**/bin/**/*",
"**/obj/**/*",
"**/node_modules/**/*"
],
"userExcludeSearchPatterns": []
}
}

35
src/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,35 @@
{
"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 (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/isnd/bin/Debug/net9.0/isnd.dll",
"args": [],
"cwd": "${workspaceFolder}/isnd",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

41
src/.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}/isnd/isnd.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/isnd/isnd.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/isnd/isnd.csproj"
],
"problemMatcher": "$msCompile"
}
]
}

11
src/isn.abst/APIKO.cs Normal file
View File

@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace isn
{
public class APIKO
{
public string Context { get; set; }
public Dictionary<string, string[]> Errors { get; set; }
}
}

View File

@ -1,21 +1,24 @@
using System;
using isn.abst;
namespace isnd.Entities
{
public static class ApiConfig
{
public const string Publish = "put";
public const string Index = "index";
public const string IndexDotJson = Index + ".json";
public const string Catalog = "catalog";
public const string CatalogPage = "catalog-page";
public const string GetPackage = Constants.PaquetFileEstension;
public const string GetVersion = "version";
public const string Search = "search";
public const string AutoComplete = "autocomplete";
public const string CatalogLeaf = "catalog-leaf";
public const string Delete = "delete";
public const string Registration = "registration";
internal const string GetNuspec = Constants.SpecFileEstension;
public const string Index = "/index.json";
public const string Catalog = "/catalog";
public const string Package = "/package";
public const string Search = "/search";
public const string AutoComplete = "/autocomplete";
public const string Registration = "/registration";
public const string ContentBase = "/content";
public const string Nuget = "/nuget";
public const string PackageDetailUriTemplate = Package+"/{id}/{version}";
[Obsolete("use the V3 search")]
public const string V2Find = "/v2/FindPackagesById()"; // /FindPackagesById()??$filter=IsLatestVersion&$orderby=Version desc&$top=1&id='isn.abst'
}
}

View File

@ -1,9 +1,14 @@
using isnd.Data.Catalog;
using Newtonsoft.Json;
namespace isn.Abstract
{
public class ApiIndexViewModel
public class ApiIndexViewModel : Permalink
{
public ApiIndexViewModel(string id) : base(id, "ApiIndex")
{
}
[JsonProperty("version")]
public string Version { get; set; }

View File

@ -2,8 +2,8 @@ namespace isn.abst
{
public static class Constants
{
public const string PaquetFileEstension = "nupkg";
public const string SpecFileEstension = "nuspec";
public const string JsonFileEstension = "json";
public const string PacketFileExtension = "nupkg";
public const string SpecFileExtension = "nuspec";
public const string ApiVersionPrefix = "/v3";
}
}

48
src/isn.abst/Permalink.cs Normal file
View File

@ -0,0 +1,48 @@
using Newtonsoft.Json;
namespace isnd.Data.Catalog
{
public abstract class Permalink
{
public Permalink(string id)
{
Type = GetType().Name;
this.id = id;
}
public Permalink(string id, string type)
{
Type = type;
this.id = id;
}
[JsonProperty("@type")]
public virtual string Type { get; set; }
[JsonProperty("@id")]
public string Id { get => id; }
protected string id;
public string GetId() { return id; }
public override bool Equals(object obj)
{
if (obj!=null)
{
if (GetType().IsAssignableFrom(obj.GetType()))
{
var rpobj = (Permalink) obj;
return this.id == rpobj.id;
}
}
return base.Equals(obj);
}
public override int GetHashCode()
{
return id.GetHashCode();
}
}
}

View File

@ -1,14 +1,15 @@
using isnd.Data.Catalog;
using Newtonsoft.Json;
namespace isn.Abstract
{
public class Resource
public class Resource : Permalink
{
[JsonProperty("@id")]
public string Id {get; set; }
public Resource(string id, string typename) : base(id)
{
Type = typename;
}
[JsonProperty("@type")]
public string Type {get; set; }
[JsonProperty("comment")]
public string Comment {get; set; }

View File

@ -1,14 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageVersion>1.0.1</PackageVersion>
<Version>1.0.5</Version>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<NoWarn>NETSDK1138</NoWarn>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
<FileVersion>1.0.5.0</FileVersion>
<InformationalVersion>1.0.5+Branch.main.Sha.14206ac477d0f07566d5e8125dc52cbd7f474ca2</InformationalVersion>
</PropertyGroup>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>

View File

@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace isn
{
public interface IDataProtector
{
string Protect(string data);
string UnProtect(string data);
}
public class DefaultDataProtector : IDataProtector
{
private byte delta = 145;
public DefaultDataProtector()
{
}
public string Protect(string data)
{
List<Byte> protd = new List<byte>();
StringBuilder sb = new StringBuilder();
foreach (byte c in Encoding.UTF8.GetBytes(data))
{
protd.Add((byte) (c ^ delta));
}
return System.Convert.ToBase64String(protd.ToArray());
}
public string UnProtect(string data)
{
StringBuilder sb = new StringBuilder();
List<byte> unps = new List<byte>();
foreach (byte c in System.Convert.FromBase64CharArray(data.ToCharArray(),0,data.Length))
{
unps.Add((byte) (c ^ delta));
}
return Encoding.UTF8.GetString(unps.ToArray());
}
}
}

View File

@ -1,9 +0,0 @@
namespace isn
{
public class IsnSourceSettings
{
internal string Source { get; set; }
internal string[] Keys { get; set; }
}
}

View File

@ -2,6 +2,8 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using Mono.Options;
using Newtonsoft.Json;
@ -16,14 +18,20 @@ namespace isn
if (cfgSettingIf.Exists)
{
var json = File.ReadAllText(cfgSettingIf.FullName);
settings = JsonConvert.DeserializeObject<Settings>(json);
currentSource = settings.DefaultSource;
Settings = JsonConvert.DeserializeObject<Settings>(json);
CurrentSource = Settings.DefaultSourceKey;
}
if (Settings==null)
{
Settings= Settings.Create();
}
}
static readonly OptionSet storeoptions = new OptionSet {
{ "s|source=", "use source", val => currentSource = currentSource ?? val },
{ "s|source=", "use source", val => Settings.CurrentSourceKey ??= val },
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
};
private static readonly string _configFileName =
Path.Combine(
Path.Combine(Environment.GetFolderPath(
@ -34,12 +42,12 @@ namespace isn
public const string push = "push";
static readonly OptionSet options = new OptionSet {
{ "h|help", "show this message and exit", h => shouldShowHelp = h != null },
{ "v|version", "show soft version info and exit", h => shouldShowVersion = h != null }
};
static readonly OptionSet pushoptions = new OptionSet {
{ "k|api-key=", "use api key", val => apiKey = apiKey ?? val },
{ "p|store-api-key", "store used api key (=<true|false>)", val => storApiKey = val != null },
{ "s|source=", "use source", val => currentSource = currentSource ?? val },
{ "k|api-key=", "use api key", val => Settings.CurrentSource.SetApiKey(val)},
{ "s|source=", "use source", val => Settings.CurrentSourceKey = val },
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
};
static readonly OptionSet sourceoptions = new OptionSet {
@ -51,35 +59,23 @@ namespace isn
};
private static bool shouldShowHelp;
private static bool shouldShowVersion;
private static bool shouldShowSourceHelp;
private static bool shouldShowPushHelp;
private static string apiKey = null;
private static string currentSource = null;
private static int pushKO = 0;
private static bool storApiKey = false;
public static IDataProtector Protector { get; set; } = new DefaultDataProtector();
static Settings settings = null;
public static Settings Settings
{
get
{
if (settings == null)
LoadConfig();
if (settings == null)
settings = new Settings
{
DataProtectionTitle = "isn",
Sources = new Dictionary<string, SourceSettings>()
};
return settings;
}
get; set;
}
public static string CurrentSource { get => Settings.CurrentSourceKey; set => Settings.CurrentSourceKey = value; }
static int Main(string[] args)
{
LoadConfig();
var commandSet = new CommandSet("isn");
var srclst = new Command("list")
{
@ -150,6 +146,7 @@ namespace isn
{
Run = sargs => Add(sargs)
};
commandSet.Add(add);
var pushCmd = new Command(push)
@ -157,6 +154,7 @@ namespace isn
Run = sargs =>
{
var pargs = pushoptions.Parse(sargs);
if (args.Count()==0) shouldShowPushHelp=true;
if (shouldShowPushHelp)
{
// output the options
@ -165,17 +163,19 @@ namespace isn
return;
}
List<PushReport> reports = PushPkg(pargs);
Console.WriteLine(JsonConvert.SerializeObject(reports));
pushKO = reports.Count(r => !r.OK && !r.AlreadyPresent);
}
};
var setapikey = new Command("set-api-key")
var setapikey = new Command("store-api-key", "Store this API key")
{
Run = sargs => StoreApiKey(sargs)
};
commandSet.Add(pushCmd);
setapikey.Options = pushoptions;
commandSet.Add(setapikey);
commandSet.Add(pushCmd);
commandSet.Add(srcCmd);
commandSet.Add(showCommand);
@ -202,9 +202,11 @@ namespace isn
return 1;
}
int runCode = commandSet.Run(args);
return (runCode == 0 && pushKO > 0) ? 500 : runCode;
if (shouldShowVersion)
{
Console.WriteLine("isn version " + GitVersionInformation.AssemblySemFileVer);
}
return commandSet.Run(args);
}
}
}

View File

@ -1,19 +1,90 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Security.Cryptography;
using System.Text;
using Newtonsoft.Json;
namespace isn
{
public class SourceSettings
{
public string ApiKey { get; set; }
public string Alias { get; set; }
/// <summary>
/// Protected API Key
/// </summary>
/// <value></value>
public string ApiKey { get; set; }
/// <summary>
/// Key alias
/// </summary>
/// <value></value>
public string Url { get; set; }
public SourceSettings()
{
}
public string GetClearApiKey()
{
return ApiKey;
}
public void SetApiKey(string key)
{
ApiKey = key;
}
}
public class Settings
{
public string DataProtectionTitle {get; set; }
private Settings()
{
}
public static Settings Create()
{
return new Settings {
Sources = new Dictionary<string, SourceSettings>()
};
}
public Dictionary<string, SourceSettings> Sources { get; set; }
public bool AutoUpdateApiKey { get; set; } = false;
public string DefaultSource { get; set; }
private string defSourceKey;
/// <summary>
/// Default source by its alias
/// </summary>
/// <value></value>
public string DefaultSourceKey
{
get => defSourceKey;
set
{
defSourceKey = value;
}
}
[JsonIgnore, NotMapped]
public string CurrentSourceKey {get; set;}
[JsonIgnore, NotMapped]
public SourceSettings CurrentSource
{
get
{
if (CurrentSourceKey==null) return null;
if (!Sources.ContainsKey(CurrentSourceKey))
{
Sources.Add(CurrentSourceKey, new SourceSettings());
}
return Sources[CurrentSourceKey];
}
}
}
}
}

View File

@ -17,8 +17,21 @@ namespace isn
// var json = await client.GetStringAsync(new System.Uri(url));
Task.Run(async ()=> {
try {
var response = await client.GetStringAsync(url);
result = JsonConvert.DeserializeObject<ApiIndexViewModel>(response);
} catch (HttpRequestException ex)
{
if (ex.StatusCode==HttpStatusCode.NotFound)
{
Console.Error.WriteLine("Not found ... server's down ?");
}
else
{
Console.Error.WriteLine($"{ex.StatusCode} : {ex.Message}");
}
}
}).Wait();
return result;

View File

@ -4,6 +4,7 @@ using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace isn
{
@ -24,35 +25,19 @@ namespace isn
using (var multipartFormDataContent = new MultipartFormDataContent())
{
/* var values = new[]
{
new KeyValuePair<string, string>("Id", Guid.NewGuid().ToString()),
new KeyValuePair<string, string>("Key", "awesome"),
new KeyValuePair<string, string>("From", "khalid@home.com")
//other values
};foreach (var keyValuePair in values)
{
multipartFormDataContent.Add(new StringContent(keyValuePair.Value),
String.Format("\"{0}\"", keyValuePair.Key));
} */
multipartFormDataContent.Add(new ByteArrayContent(File.ReadAllBytes(fi.FullName)),
'"' + "File" + '"',
'"' + fi.Name + '"');
var result = await client.PutAsync(uri, multipartFormDataContent);
if (result.IsSuccessStatusCode)
{
string report = await result.Content.ReadAsStringAsync();
Console.WriteLine(report);
}
if (result.IsSuccessStatusCode) return
new PushReport() {
KO = JsonConvert.DeserializeObject<APIKO>(await result.Content.ReadAsStringAsync())
};
else
{
string ereport = await result.Content.ReadAsStringAsync();
Console.WriteLine(ereport);
}
return new PushReport();
return new PushReport() {
OK = true
};
}
}
}

View File

@ -1,195 +0,0 @@
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace isn
{
public class UploadFilesToServerUsingWebRequest
{
public void UploadFilesToServer(PushReport report, Uri uri, FileInfo fi,
string apikey)
{
// string formdataTemplate = "Content-Disposition: form-data; name=\"{0}\"\r\n\r\n{1}";
const int TXLEN = 0x1000;
/// the form-data file upload, properly formatted
string fileheaderTemplate = "Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\";\r\nContent-Type: {2}\r\n\r\n";
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
// "X-NuGet-ApiKey
string boundary = "----------" + DateTime.Now.Ticks.ToString("x");
string fileheader = string.Format(fileheaderTemplate, "file", fi.Name, "application/octet-stream");
byte[] fileheaderbytes = Encoding.ASCII.GetBytes(fileheader);
var boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n");
var endBoundaryBytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "--");
HttpWebRequest httpWebRequest = (HttpWebRequest) WebRequest.Create(uri);
httpWebRequest.Method = "PUT";
httpWebRequest.ContentType = "multipart/form-data; boundary=" + boundary;
httpWebRequest.AllowAutoRedirect = false;
httpWebRequest.Headers.Add("X-NuGet-Client-Version", Constants.ClientVersion);
httpWebRequest.Headers.Add("X-NuGet-ApiKey", apikey);
httpWebRequest.ContentLength = boundarybytes.Length +
fileheaderbytes.Length + fi.Length + endBoundaryBytes.Length;
httpWebRequest.BeginGetRequestStream(async (result) =>
{
try
{
HttpWebRequest request = (HttpWebRequest)result.AsyncState;
using (Stream requestStream = request.EndGetRequestStream(result))
{
await WriteToStream(requestStream, boundarybytes, boundarybytes.Length);
await WriteToStream(requestStream, fileheaderbytes, fileheaderbytes.Length);
using (var fss = fi.OpenRead())
{
byte[] buffer = new byte[TXLEN];
var form_bytes_read = fss.Read(buffer, 0, TXLEN);
while (form_bytes_read > 0)
{
await WriteToStream(requestStream, buffer, form_bytes_read);
form_bytes_read = fss.Read(buffer, 0, TXLEN);
}
}
requestStream.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);
requestStream.Close();
}
}
catch (Exception rex)
{
report.Executed = false;
report.StackTrace = rex.StackTrace;
report.Message = rex.Message;
Console.Error.WriteLine("Stack trace:");
Console.Error.WriteLine(rex.StackTrace);
WebResponse eresp = httpWebRequest.GetResponse();
if (!CheckResponse(eresp, report))
throw new Exception("Invalid server response type");
}
}, httpWebRequest);
WebResponse resp = httpWebRequest.GetResponse();
if (!CheckResponse(resp, report)) throw new Exception("Invalid server response type");
if (Program.Settings.AutoUpdateApiKey)
Program.EnsureKeyStored();
}
static bool CheckResponse(WebResponse resp, PushReport report)
{
Stream stream = resp.GetResponseStream();
StreamReader re = new StreamReader(stream);
if (resp is HttpWebResponse)
{
if (resp.ContentType == "text/json")
{
String json = re.ReadToEnd();
report.Message = json;
var hrep = resp as HttpWebResponse;
report.StatusCode = hrep.StatusCode.ToString();
report.OK = hrep.StatusCode == HttpStatusCode.Accepted
|| hrep.StatusCode == HttpStatusCode.OK;
return true;
}
}
return false;
}
/// <summary>
/// Creates HTTP POST request &amp; uploads database to server. Author : Farhan Ghumra
/// </summary>
internal async Task UploadFilesToServerAsync(PushReport report, Uri uri, FileInfo fi,
string apikey)
{
// string formdataTemplate = "Content-Disposition: form-data; name=\"{0}\"\r\n\r\n{1}";
const int TXLEN = 0x1000;
/// the form-data file upload, properly formatted
string fileheaderTemplate = "Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\";\r\nContent-Type: {2}\r\n\r\n";
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
// "X-NuGet-ApiKey
string boundary = "----------" + DateTime.Now.Ticks.ToString("x");
string fileheader = string.Format(fileheaderTemplate, "file", fi.Name, "application/octet-stream");
byte[] fileheaderbytes = Encoding.ASCII.GetBytes(fileheader);
var boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n");
var endBoundaryBytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "--");
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(uri);
httpWebRequest.Method = "PUT";
httpWebRequest.ContentType = "multipart/form-data; boundary=" + boundary;
httpWebRequest.AllowAutoRedirect = false;
httpWebRequest.Headers.Add("X-NuGet-Client-Version", Constants.ClientVersion);
httpWebRequest.Headers.Add("X-NuGet-ApiKey", apikey);
httpWebRequest.ContentLength = boundarybytes.Length +
fileheaderbytes.Length + fi.Length + endBoundaryBytes.Length;
httpWebRequest.BeginGetRequestStream(async (result) =>
{
try
{
HttpWebRequest request = (HttpWebRequest)result.AsyncState;
using (Stream requestStream = request.EndGetRequestStream(result))
{
await WriteToStream(requestStream, boundarybytes, boundarybytes.Length);
await WriteToStream(requestStream, fileheaderbytes, fileheaderbytes.Length);
using (var fss = fi.OpenRead())
{
byte[] buffer = new byte[TXLEN];
var form_bytes_read = fss.Read(buffer, 0, TXLEN);
while (form_bytes_read > 0)
{
await WriteToStream(requestStream, buffer, form_bytes_read);
form_bytes_read = fss.Read(buffer, 0, TXLEN);
}
}
requestStream.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);
requestStream.Close();
}
}
catch (Exception rex)
{
report.Message = rex.Message;
Console.Error.WriteLine(rex.Message);
Console.Error.WriteLine("Stack trace:");
Console.Error.WriteLine(rex.StackTrace);
throw;
}
}, httpWebRequest);
WebResponse resp = await httpWebRequest.GetResponseAsync();
Stream stream = resp.GetResponseStream();
StreamReader re = new StreamReader(stream);
if (resp is HttpWebResponse)
{
String json = await re.ReadToEndAsync();
report.Message = json;
var hrep = resp as HttpWebResponse;
report.StatusCode = hrep.StatusCode.ToString();
report.OK = hrep.StatusCode == HttpStatusCode.Accepted
|| hrep.StatusCode == HttpStatusCode.OK;
}
else throw new Exception("Invalid server response type");
}
/// <summary>
/// Writes byte array to stream. Author : Farhan Ghumra
/// </summary>
private static async Task WriteToStream(Stream s, byte[] bytes, int len)
{
await s.WriteAsync(bytes, 0, len);
}
}
}

View File

@ -10,12 +10,18 @@ namespace isn
{
public class PushCommand
{
static public PushReport Run(string pkg, string source)
Settings settings;
public PushCommand(Settings settings)
{
if (source == null) source = Program.Settings.DefaultSource;
if (source == null) throw new InvalidOperationException("source is null");
string apikey = Program.Protector.UnProtect(Program.Settings.Sources[source].ApiKey);
this.settings = settings;
}
public PushReport Run(string pkg, string source, string apiKey)
{
var resources = SourceHelpers.GetServerResources(source);
if (resources == null) return null;
if (resources.Resources == null)
throw new InvalidOperationException("source gave no resource");
if (!resources.Resources.Any(res => res.Type == "PackagePublish/2.0.0"))
@ -27,26 +33,30 @@ namespace isn
var report = new PushReport
{
PkgName = fi.Name,
Message = "Le fichier n'existe pas"
Message = "The package does not exist : " + fi.FullName
};
return report;
}
using (var client = new HttpClient())
using (var client = new HttpClient(
new HttpClientHandler
{
AllowAutoRedirect = false
}
))
try
{
Console.WriteLine("Connecting to "+ pubRes.Id);
return client.UploadFilesToServer(new Uri(pubRes.Id), fi, apikey);
return client.UploadFilesToServer(new Uri(pubRes.Id), fi, settings.Sources[source].ApiKey);
}
catch (HttpRequestException hrex)
catch (HttpRequestException httpEx)
{
var report = new PushReport
{
PkgName = fi.Name,
Message = "HttpRequest: " + hrex.Message,
StackTrace = hrex.StackTrace,
StatusCode = hrex.HResult.ToString()
Message = "HttpRequest: " + httpEx.Message,
StackTrace = httpEx.StackTrace,
StatusCode = httpEx.HResult.ToString()
};
Console.Error.WriteLine(hrex.Message);
Console.Error.WriteLine(httpEx.Message);
return report;
}
catch (Exception ex)

View File

@ -12,17 +12,15 @@ namespace isn
public static List<PushReport> PushPkg(IEnumerable<string> pkgs)
{
List<PushReport> pushReports = new List<PushReport>();
var cmd = new PushCommand(Settings);
if (Settings.CurrentSource == null) throw new InvalidOperationException("source is null");
var source = Settings.CurrentSource;
foreach (string pkg in pkgs)
{
var report = PushCommand.Run(pkg, currentSource);
var report = cmd.Run(pkg, source.Url, source.ApiKey);
pushReports.Add(report);
}
if (storApiKey)
{
EnsureKeyStored();
}
return pushReports;
}

View File

@ -1,75 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
namespace isn
{
partial class Program
{
private static void StoreApiKey(IEnumerable<string> storeArgs)
{
var args = storeoptions.Parse(storeArgs);
if (shouldShowPushHelp)
{
// output the options
Console.Error.WriteLine("Push Options:");
storeoptions.WriteOptionDescriptions(Console.Out);
}
else
{
apiKey = args[0];
EnsureKeyStored();
}
}
public static void EnsureKeyStored()
{
if (currentSource == null)
{
if (Settings.DefaultSource == null)
return;
currentSource = Settings.DefaultSource;
}
if (Settings.Sources.ContainsKey(currentSource))
{
if (apiKey == null)
{
// Une suppression
Settings.Sources.Remove(currentSource);
if (Settings.DefaultSource == currentSource) Settings.DefaultSource = null;
}
else
{
// Une mise À jour
string ptd = Protector.Protect(apiKey);
Settings.Sources[currentSource].ApiKey = ptd;
if (Settings.DefaultSource == null) Settings.DefaultSource = currentSource;
}
}
else if (apiKey != null)
{
// une addition
string ptd = Protector.Protect(apiKey);
Settings.Sources.Add(currentSource, new SourceSettings { ApiKey = ptd });
}
SaveConfig();
}
public static void SaveConfig()
{
FileInfo cfgSettingIf = new FileInfo(_configFileName);
if (!cfgSettingIf.Directory.Exists) cfgSettingIf.Directory.Create();
File.WriteAllText(
cfgSettingIf.FullName,
JsonConvert.SerializeObject(
Settings,
Formatting.Indented
));
}
}
}

View File

@ -16,7 +16,7 @@ namespace isn
{
SourceSettings setting = Settings.Sources[arg];
throw new InvalidOperationException
(setting.Alias);
(setting.Url);
}
throw new NotImplementedException();
}

View File

@ -11,9 +11,9 @@ namespace isn
SourceSettings settings =
Settings.Sources.ContainsKey(arg) ?
Settings.Sources[arg] :
Settings.Sources.Values.FirstOrDefault((s)=> s.Alias == arg) ;
Settings.Sources.Values.FirstOrDefault((s)=> s.Url == arg) ;
if (settings==null) throw new InvalidOperationException(arg);
Settings.DefaultSource = arg;
Settings.DefaultSourceKey = arg;
SaveConfig();
}

View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
namespace isn
{
partial class Program
{
private static void StoreApiKey(IEnumerable<string> storeArgs)
{
var args = storeoptions.Parse(storeArgs);
if (args.Count != 1)
{
Console.Error.WriteLine("StoreApiKey command takes only one argument, the key.");
shouldShowPushHelp=true;
}
if (shouldShowPushHelp)
{
// output the options
Console.Error.WriteLine("StoreApiKey Options:");
storeoptions.WriteOptionDescriptions(Console.Out);
}
else
{
Settings.CurrentSource.SetApiKey(args[0]);
SaveConfig();
}
}
public static void SaveConfig()
{
FileInfo cfgSettingIf = new FileInfo(_configFileName);
if (!cfgSettingIf.Directory.Exists) cfgSettingIf.Directory.Create();
File.WriteAllText(
cfgSettingIf.FullName,
JsonConvert.SerializeObject(
Settings,
Formatting.Indented
));
Console.WriteLine("config saved .");
}
}
}

View File

@ -1,27 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net9.0</TargetFrameworks>
<RootNamespace>nuget_cli</RootNamespace>
<UserSecretsId>45b74c62-05bc-4603-95b4-3e80ae2fdf50</UserSecretsId>
<Version>1.0.5</Version>
<PackageVersion>1.0.1</PackageVersion>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
<IsTool>true</IsTool>
<NoWarn>NETSDK1138</NoWarn>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
<FileVersion>1.0.5.0</FileVersion>
<InformationalVersion>1.0.5+Branch.main.Sha.14206ac477d0f07566d5e8125dc52cbd7f474ca2</InformationalVersion>
<InformationalVersion>1.0.7+Branch.main.Sha.3695c1742965d93eba0ad851656cfaa3e44ba327</InformationalVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Mono.Options" Version="5.3.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="unleash.client" Version="1.6.1" />
<Reference Include="System.Net.Http" Version="4.0.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.6" />
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="unleash.client" Version="5.2.1" />
<PackageReference Include="GitVersion.MsBuild" Version="6.3.0" />
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
</ItemGroup>
</Project>

View File

@ -1,15 +1,42 @@
using System.Threading.Tasks.Dataflow;
using System.Net;
using System.Text;
using Newtonsoft.Json;
namespace isn
{
public class PushReport
{
public PushReport()
{
}
public string PkgName { get; set; }
public bool Executed { get; internal set; }
public bool OK { get; internal set; }
public bool AlreadyPresent { get; internal set; }
public string Message { get; internal set; }
public string StatusCode { get; internal set; }
public string StackTrace { get; internal set; }
public bool Executed { get; set; }
public bool OK { get; set; }
public bool AlreadyPresent { get; set; }
public string Message { get; set; }
public string StatusCode { get; set; }
public string StackTrace { get; set; }
public APIKO KO { get; set; }
public string ToDoc()
{
StringBuilder sb = new StringBuilder($"= push {PkgName}\n\n");
if (Executed) sb.AppendLine("* Executed");
if (OK) sb.AppendLine("* OK");
if (!string.IsNullOrWhiteSpace(Message))
sb.AppendLine("* Message :" + Message);
if (!string.IsNullOrWhiteSpace(StatusCode))
sb.AppendLine($"* Status Code : ");
if (!string.IsNullOrWhiteSpace(StackTrace))
sb.AppendLine($"* StackTrace : " + StackTrace);
if (KO!=null)
sb.AppendLine($"* KO : " + KO.Context);
return sb.ToString();
}
}
}

Some files were not shown because too many files have changed in this diff Show More