Merge branch '@feature/firebase-hooks' into develop

This commit is contained in:
Fergal Moran
2023-03-02 06:28:12 +00:00
243 changed files with 3125 additions and 450 deletions

44
.gitignore vendored
View File

@@ -1,42 +1,2 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
.env*.development
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
.private/
radio-otherway-service-account.json
serviceAccount.json
/.env.production
.krud
working

1
mobile Submodule

Submodule mobile added at 618e32f753

25
scheduler/.dockerignore Normal file
View File

@@ -0,0 +1,25 @@
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.idea
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

13
scheduler/.idea/.idea.scheduler/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/projectSettingsUpdater.xml
/.idea.scheduler.iml
/modules.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Mvc;
namespace OtherWay.Radio.Scheduler.Controllers;
[ApiController]
[Route("[controller]")]
public class InterfaceController : ControllerBase {
private readonly ILogger<InterfaceController> _logger;
public InterfaceController(ILogger<InterfaceController> logger) {
_logger = logger;
}
}

View File

@@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Mvc;
using OtherWay.Radio.Scheduler.Services;
using OtherWay.Radio.Scheduler.Services.Extensions;
using Quartz;
namespace OtherWay.Radio.Scheduler.Controllers;
[ApiController]
[Route("[controller]")]
public class JobController : ControllerBase {
private readonly ISchedulerFactory _schedulerFactory;
private readonly ScheduleLoader _scheduleLoader;
public JobController(ISchedulerFactory schedulerFactory, ScheduleLoader scheduleLoader) {
_schedulerFactory = schedulerFactory;
_scheduleLoader = scheduleLoader;
}
[HttpGet]
public async Task<IActionResult> GetAllSchedules() {
var scheduler = await _schedulerFactory.GetScheduler();
var executingJobs = await scheduler.GetAllJobs();
return Ok(executingJobs);
}
[HttpPost("reload")]
public async Task<IActionResult> ReloadSchedules() {
await _scheduleLoader.LoadSchedules();
return Ok();
}
}

20
scheduler/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["scheduler.csproj", "./"]
RUN dotnet restore "scheduler.csproj"
COPY . .
WORKDIR "/src/"
RUN dotnet build "scheduler.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "scheduler.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "scheduler.dll"]

View File

@@ -0,0 +1,25 @@
using Quartz;
namespace OtherWay.Radio.Scheduler.Models;
public class JobInfoModel {
public string Group { get; set; }
public List<JobInfoModelJobs> Jobs { get; set; }
}
public class JobInfoModelJobs {
public string? Detail { get; set; }
public string JobName { get; set; }
public List<JobInfoModelTriggers> Triggers { get; set; }
}
public class JobInfoModelTriggers {
public string Name { get; set; }
public string Group { get; set; }
public string Type { get; set; }
public TriggerState State { get; set; }
public DateTimeOffset? NextFireTime { get; set; }
public string? NextFireTimeHuman { get; set; }
public DateTimeOffset? PreviousFireTime { get; set; }
public string? PreviousFireTimeHuman { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace OtherWay.Radio.Scheduler.Models;
public class NotificationSchedule {
public string ShowId { get; set; }
public List<DateTime> ScheduleTimes { get; set; }
}

49
scheduler/Program.cs Normal file
View File

@@ -0,0 +1,49 @@
using System.Net;
using System.Security.Cryptography.X509Certificates;
using OtherWay.Radio.Scheduler.Services;
using Quartz;
var builder = WebApplication.CreateBuilder(args);
builder.Logging.ClearProviders();
builder.Logging.AddConsole();
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddHttpClients(builder.Configuration["ServiceSettings:ApiUrl"]);
builder.Services.AddSingleton<ScheduleLoader>();
builder.Services.AddQuartz(q => {
q.SchedulerName = "OtherWay Job Scheduler";
q.UseMicrosoftDependencyInjectionJobFactory();
q.UseSimpleTypeLoader();
q.UseInMemoryStore();
q.UseDefaultThreadPool(tp => { tp.MaxConcurrency = 10; });
});
builder.Services.AddQuartzServer(options => { options.WaitForJobsToComplete = true; });
builder
.Services.BuildServiceProvider()
.GetService<ScheduleLoader>()?
.LoadSchedules()
.ContinueWith(r => { });
var app = builder.Build();
if (app.Environment.IsDevelopment()) {
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();

View File

@@ -0,0 +1,41 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:5001",
"sslPort": 44306
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,7 @@
namespace OtherWay.Radio.Scheduler.Services.Extensions;
public static class DateTimeExtensions {
public static string ToLongDateTimeString(this DateTime date) {
return $"{date.ToLongDateString()} {date.ToLongTimeString()}";
}
}

View File

@@ -0,0 +1,32 @@
using CrystalQuartz.Core.Utils;
using OtherWay.Radio.Scheduler.Models;
using Quartz;
using Quartz.Impl.Matchers;
namespace OtherWay.Radio.Scheduler.Services.Extensions;
public static class JobExtensions {
public static async Task<List<JobInfoModel>> GetAllJobs(this IScheduler scheduler) {
var jobGroups = await scheduler.GetJobGroupNames();
var result = jobGroups.Select(group => new JobInfoModel {
Group = group,
Jobs = scheduler.GetJobKeys(GroupMatcher<JobKey>.GroupContains(group)).Result.Select(jobKey =>
new JobInfoModelJobs {
Detail = scheduler.GetJobDetail(jobKey).Result?.Description,
JobName = jobKey.Name,
Triggers = scheduler.GetTriggersOfJob(jobKey).Result.Select(trigger => new JobInfoModelTriggers {
Name = trigger.Key.Name,
Group = trigger.Key.Group,
Type = trigger.GetType().Name,
State = scheduler.GetTriggerState(trigger.Key).Result,
NextFireTime = trigger.GetNextFireTimeUtc(),
NextFireTimeHuman = trigger.GetNextFireTimeUtc().ToDateTime()?.ToLongDateTimeString(),
PreviousFireTime = trigger.GetPreviousFireTimeUtc(),
PreviousFireTimeHuman = trigger.GetPreviousFireTimeUtc().ToDateTime()?.ToLongDateTimeString(),
}).ToList()
}).ToList()
});
return result.ToList();
}
}

View File

@@ -0,0 +1,15 @@
namespace OtherWay.Radio.Scheduler.Services;
public static class HttpClients {
public static IServiceCollection AddHttpClients(this IServiceCollection services, string? apiUrl) {
services.AddHttpClient("otherway", c => {
c.BaseAddress = new Uri(apiUrl);
// Github API versioning
c.DefaultRequestHeaders.Add("Accept", "application/json");
// Github requires a user-agent
c.DefaultRequestHeaders.Add("User-Agent", "otherway.fergl.ie/scheduler");
});
return services;
}
}

View File

@@ -0,0 +1,35 @@
using System.Text;
using System.Text.Json;
using Quartz;
namespace OtherWay.Radio.Scheduler.Services.Jobs;
/// <summary>
/// This job will call back to the main API
/// and notify it that a show alert has triggered
/// </summary>
public class JobTriggerCallback : IJob {
private readonly IHttpClientFactory _httpClientFactory;
private readonly ILogger<JobTriggerCallback> _logger;
public JobTriggerCallback(IHttpClientFactory httpClientFactory, ILogger<JobTriggerCallback> logger) {
_httpClientFactory = httpClientFactory;
_logger = logger;
}
public async Task Execute(IJobExecutionContext context) {
using var client = _httpClientFactory.CreateClient("otherway");
var key = context.JobDetail.Key;
var dataMap = context.JobDetail.JobDataMap;
var showId = dataMap.GetString("ShowId");
if (!string.IsNullOrEmpty(showId)) {
var response = await client.PostAsync("/api/cron/notify",
new StringContent(JsonSerializer.Serialize(new {
showId
}), Encoding.UTF8, "application/json"));
if (!response.IsSuccessStatusCode) {
_logger.LogError("Error sending show notification: {Reason}", response.ReasonPhrase);
}
}
}
}

View File

@@ -0,0 +1,67 @@
using System.Text.Json;
using OtherWay.Radio.Scheduler.Models;
using OtherWay.Radio.Scheduler.Services.Extensions;
using OtherWay.Radio.Scheduler.Services.Jobs;
using Quartz;
namespace OtherWay.Radio.Scheduler.Services;
public class ScheduleLoader {
private readonly IHttpClientFactory _httpClientFactory;
private readonly ISchedulerFactory _schedulerFactory;
private readonly ILogger<ScheduleLoader> _logger;
public ScheduleLoader(IHttpClientFactory httpClientFactory, ISchedulerFactory schedulerFactory,
ILogger<ScheduleLoader> logger) {
_httpClientFactory = httpClientFactory;
_schedulerFactory = schedulerFactory;
_logger = logger;
}
private async Task ScheduleJob(IScheduler scheduler, string jobKey, string showId, DateTime date) {
var jobData = new JobDataMap {
["ShowId"] = showId,
["date"] = date
};
var group = "show-alert-triggers";
var job = JobBuilder.Create<JobTriggerCallback>()
.WithIdentity(jobKey, group)
.UsingJobData(jobData)
.Build();
var trigger = TriggerBuilder.Create()
.WithIdentity($"{jobKey}-trigger", group)
.StartAt(date)
.Build();
_logger.LogDebug("Schedule loaded for {Show} as {JobKey} @ {ScheduleDate}",
showId,
jobKey,
date.ToLongDateTimeString());
await scheduler.ScheduleJob(job, trigger);
}
public async Task LoadSchedules() {
using var client = _httpClientFactory.CreateClient("otherway");
var response = await client.GetStreamAsync("/api/shows/notifications");
var schedules = await JsonSerializer.DeserializeAsync<List<NotificationSchedule>>(response,
new JsonSerializerOptions {
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
WriteIndented = true
});
if (schedules is null) {
return;
}
var scheduler = await _schedulerFactory.GetScheduler();
await scheduler.Clear();
foreach (var schedule in schedules) {
short i = 1;
foreach (var slot in schedule.ScheduleTimes.Where(r => r >= DateTime.Now).OrderBy(r => r.Date)) {
Console.WriteLine($"New schedule for {schedule.ShowId} scheduled at {slot.ToLongDateTimeString()}");
await ScheduleJob(scheduler, $"{schedule.ShowId}-callback-{i++}", schedule.ShowId, slot);
}
}
}
}

View File

@@ -0,0 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ServiceSettings": {
"ApiUrl": "https://otherway.dev.fergl.ie:3000/api"
}
}

View File

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ServiceSettings": {
"ApiUrl": "https://otherway.dev.fergl.ie:3000/api"
}
}

View File

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

Binary file not shown.

View File

@@ -0,0 +1,560 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"scheduler/1.0.0": {
"dependencies": {
"CrystalQuartz.AspNetCore": "6.8.1",
"Microsoft.AspNetCore.OpenApi": "7.0.2",
"Quartz.AspNetCore": "3.6.2",
"Quartz.Extensions.DependencyInjection": "3.6.2",
"Quartz.Extensions.Hosting": "3.6.2",
"QuartzNetWebConsole": "1.0.2",
"Swashbuckle.AspNetCore": "6.4.0"
},
"runtime": {
"scheduler.dll": {}
}
},
"CrystalQuartz.AspNetCore/6.8.1": {
"dependencies": {
"Microsoft.AspNetCore.Http.Abstractions": "2.0.3"
},
"runtime": {
"lib/netstandard2.0/CrystalQuartz.AspNetCore.dll": {
"assemblyVersion": "6.8.1.0",
"fileVersion": "6.8.1.0"
}
}
},
"Microsoft.AspNetCore.Http.Abstractions/2.0.3": {
"dependencies": {
"Microsoft.AspNetCore.Http.Features": "2.0.3",
"System.Text.Encodings.Web": "4.4.0"
}
},
"Microsoft.AspNetCore.Http.Features/2.0.3": {
"dependencies": {
"Microsoft.Extensions.Primitives": "6.0.0"
}
},
"Microsoft.AspNetCore.OpenApi/7.0.2": {
"dependencies": {
"Microsoft.OpenApi": "1.4.3"
},
"runtime": {
"lib/net7.0/Microsoft.AspNetCore.OpenApi.dll": {
"assemblyVersion": "7.0.2.0",
"fileVersion": "7.0.222.60606"
}
}
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {},
"Microsoft.Extensions.Configuration.Abstractions/6.0.0": {
"dependencies": {
"Microsoft.Extensions.Primitives": "6.0.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/6.0.0": {},
"Microsoft.Extensions.Diagnostics.HealthChecks/6.0.0": {
"dependencies": {
"Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "6.0.0",
"Microsoft.Extensions.Hosting.Abstractions": "6.0.0",
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"Microsoft.Extensions.Options": "6.0.0"
}
},
"Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions/6.0.0": {},
"Microsoft.Extensions.FileProviders.Abstractions/6.0.0": {
"dependencies": {
"Microsoft.Extensions.Primitives": "6.0.0"
}
},
"Microsoft.Extensions.Hosting.Abstractions/6.0.0": {
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"Microsoft.Extensions.FileProviders.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.Logging.Abstractions/6.0.0": {},
"Microsoft.Extensions.Options/6.0.0": {
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"Microsoft.Extensions.Primitives": "6.0.0"
}
},
"Microsoft.Extensions.Primitives/6.0.0": {
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"Microsoft.OpenApi/1.4.3": {
"runtime": {
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
"assemblyVersion": "1.4.3.0",
"fileVersion": "1.4.3.0"
}
}
},
"Microsoft.Win32.SystemEvents/6.0.0": {
"runtime": {
"lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"Quartz/3.6.2": {
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Configuration.ConfigurationManager": "6.0.1",
"System.Diagnostics.DiagnosticSource": "4.7.1"
},
"runtime": {
"lib/netstandard2.0/Quartz.dll": {
"assemblyVersion": "3.6.2.0",
"fileVersion": "3.6.2.0"
}
}
},
"Quartz.AspNetCore/3.6.2": {
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.0",
"Quartz.Extensions.Hosting": "3.6.2"
},
"runtime": {
"lib/net6.0/Quartz.AspNetCore.dll": {
"assemblyVersion": "3.6.2.0",
"fileVersion": "3.6.2.0"
}
}
},
"Quartz.Extensions.DependencyInjection/3.6.2": {
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"Microsoft.Extensions.Options": "6.0.0",
"Quartz": "3.6.2"
},
"runtime": {
"lib/net6.0/Quartz.Extensions.DependencyInjection.dll": {
"assemblyVersion": "3.6.2.0",
"fileVersion": "3.6.2.0"
}
}
},
"Quartz.Extensions.Hosting/3.6.2": {
"dependencies": {
"Microsoft.Extensions.Hosting.Abstractions": "6.0.0",
"Quartz.Extensions.DependencyInjection": "3.6.2"
},
"runtime": {
"lib/net6.0/Quartz.Extensions.Hosting.dll": {
"assemblyVersion": "3.6.2.0",
"fileVersion": "3.6.2.0"
}
}
},
"QuartzNetWebConsole/1.0.2": {
"dependencies": {
"Quartz": "3.6.2"
},
"runtime": {
"lib/netstandard2.0/QuartzNetWebConsole.Views.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
},
"lib/netstandard2.0/QuartzNetWebConsole.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
}
}
},
"Swashbuckle.AspNetCore/6.4.0": {
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "6.0.5",
"Swashbuckle.AspNetCore.Swagger": "6.4.0",
"Swashbuckle.AspNetCore.SwaggerGen": "6.4.0",
"Swashbuckle.AspNetCore.SwaggerUI": "6.4.0"
}
},
"Swashbuckle.AspNetCore.Swagger/6.4.0": {
"dependencies": {
"Microsoft.OpenApi": "1.4.3"
},
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": {
"assemblyVersion": "6.4.0.0",
"fileVersion": "6.4.0.0"
}
}
},
"Swashbuckle.AspNetCore.SwaggerGen/6.4.0": {
"dependencies": {
"Swashbuckle.AspNetCore.Swagger": "6.4.0"
},
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
"assemblyVersion": "6.4.0.0",
"fileVersion": "6.4.0.0"
}
}
},
"Swashbuckle.AspNetCore.SwaggerUI/6.4.0": {
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
"assemblyVersion": "6.4.0.0",
"fileVersion": "6.4.0.0"
}
}
},
"System.Configuration.ConfigurationManager/6.0.1": {
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
},
"runtime": {
"lib/net6.0/System.Configuration.ConfigurationManager.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.922.41905"
}
}
},
"System.Diagnostics.DiagnosticSource/4.7.1": {},
"System.Drawing.Common/6.0.0": {
"dependencies": {
"Microsoft.Win32.SystemEvents": "6.0.0"
},
"runtime": {
"lib/net6.0/System.Drawing.Common.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/unix/lib/net6.0/System.Drawing.Common.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
},
"runtimes/win/lib/net6.0/System.Drawing.Common.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {},
"System.Security.AccessControl/6.0.0": {},
"System.Security.Cryptography.ProtectedData/6.0.0": {
"runtime": {
"lib/net6.0/System.Security.Cryptography.ProtectedData.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/System.Security.Cryptography.ProtectedData.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"System.Security.Permissions/6.0.0": {
"dependencies": {
"System.Security.AccessControl": "6.0.0",
"System.Windows.Extensions": "6.0.0"
},
"runtime": {
"lib/net6.0/System.Security.Permissions.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"System.Text.Encodings.Web/4.4.0": {},
"System.Windows.Extensions/6.0.0": {
"dependencies": {
"System.Drawing.Common": "6.0.0"
},
"runtime": {
"lib/net6.0/System.Windows.Extensions.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/System.Windows.Extensions.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
}
}
},
"libraries": {
"scheduler/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"CrystalQuartz.AspNetCore/6.8.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-2BVX1RF3jBCyPDKnEdYiag6sMCMLa228LLYb+e1i/Ik86XTw+xp1X9V37Peswmxms1UQpejvgHOQcRAnSoiPgw==",
"path": "crystalquartz.aspnetcore/6.8.1",
"hashPath": "crystalquartz.aspnetcore.6.8.1.nupkg.sha512"
},
"Microsoft.AspNetCore.Http.Abstractions/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-6ceCCeYx08GMKZlt41trEe7oM58hBexHTSNyACLQ4rJHtWqA5+Utpngk70CPPOANOIqpEcvCpfmorwknNKuq8g==",
"path": "microsoft.aspnetcore.http.abstractions/2.0.3",
"hashPath": "microsoft.aspnetcore.http.abstractions.2.0.3.nupkg.sha512"
},
"Microsoft.AspNetCore.Http.Features/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-q+KDWRe0+4VvTqWuZWshAZHY1ejIAS5B2/oN//l5fZOO9VrWMys5CBhliEhxapVI+7RZ2TcAz0w7NUrwcBBg3w==",
"path": "microsoft.aspnetcore.http.features/2.0.3",
"hashPath": "microsoft.aspnetcore.http.features.2.0.3.nupkg.sha512"
},
"Microsoft.AspNetCore.OpenApi/7.0.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-oK0ZRloonE/WDAjHniF2gTbSsTUk5Z26RGN/o6MSlOnrnN12lDMBgpP1o9QbByBLCIRwT/KYvgYeBrYSe/NFnw==",
"path": "microsoft.aspnetcore.openapi/7.0.2",
"hashPath": "microsoft.aspnetcore.openapi.7.0.2.nupkg.sha512"
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw==",
"path": "microsoft.extensions.apidescription.server/6.0.5",
"hashPath": "microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512"
},
"Microsoft.Extensions.Configuration.Abstractions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-qWzV9o+ZRWq+pGm+1dF+R7qTgTYoXvbyowRoBxQJGfqTpqDun2eteerjRQhq5PQ/14S+lqto3Ft4gYaRyl4rdQ==",
"path": "microsoft.extensions.configuration.abstractions/6.0.0",
"hashPath": "microsoft.extensions.configuration.abstractions.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==",
"path": "microsoft.extensions.dependencyinjection.abstractions/6.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Diagnostics.HealthChecks/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ktOGFY2uJ6QqZbLgLZgYg6qWuOnwKEIYbpgGDR/1QY8E+8NhnL75dJZ+WDl88h7Q4JkIFeTkFBUGF5QmNcfUEg==",
"path": "microsoft.extensions.diagnostics.healthchecks/6.0.0",
"hashPath": "microsoft.extensions.diagnostics.healthchecks.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-6C9uhsA7GwT1qlXF+1JgOktilrWBSMLNVcwIjg63UvFaDVizg8fYTv826MC58dznvvT9yG31gGwsN1cFfg+yZQ==",
"path": "microsoft.extensions.diagnostics.healthchecks.abstractions/6.0.0",
"hashPath": "microsoft.extensions.diagnostics.healthchecks.abstractions.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.FileProviders.Abstractions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-0pd4/fho0gC12rQswaGQxbU34jOS1TPS8lZPpkFCH68ppQjHNHYle9iRuHeev1LhrJ94YPvzcRd8UmIuFk23Qw==",
"path": "microsoft.extensions.fileproviders.abstractions/6.0.0",
"hashPath": "microsoft.extensions.fileproviders.abstractions.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Hosting.Abstractions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-GcT5l2CYXL6Sa27KCSh0TixsRfADUgth+ojQSD5EkzisZxmGFh7CwzkcYuGwvmXLjr27uWRNrJ2vuuEjMhU05Q==",
"path": "microsoft.extensions.hosting.abstractions/6.0.0",
"hashPath": "microsoft.extensions.hosting.abstractions.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Logging.Abstractions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==",
"path": "microsoft.extensions.logging.abstractions/6.0.0",
"hashPath": "microsoft.extensions.logging.abstractions.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Options/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==",
"path": "microsoft.extensions.options/6.0.0",
"hashPath": "microsoft.extensions.options.6.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Primitives/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==",
"path": "microsoft.extensions.primitives/6.0.0",
"hashPath": "microsoft.extensions.primitives.6.0.0.nupkg.sha512"
},
"Microsoft.OpenApi/1.4.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rURwggB+QZYcSVbDr7HSdhw/FELvMlriW10OeOzjPT7pstefMo7IThhtNtDudxbXhW+lj0NfX72Ka5EDsG8x6w==",
"path": "microsoft.openapi/1.4.3",
"hashPath": "microsoft.openapi.1.4.3.nupkg.sha512"
},
"Microsoft.Win32.SystemEvents/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A==",
"path": "microsoft.win32.systemevents/6.0.0",
"hashPath": "microsoft.win32.systemevents.6.0.0.nupkg.sha512"
},
"Quartz/3.6.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wCNiVQKdwSz85fOFvEixOuxiIqsenixf34b8w21oGF0qw9oylFPDrV/ri02cX531WelFsN8K5w6E5/qop5mRYw==",
"path": "quartz/3.6.2",
"hashPath": "quartz.3.6.2.nupkg.sha512"
},
"Quartz.AspNetCore/3.6.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dcKmsicZjMs2TeSYGnboRFphtckT0/cQGoJK9DCVKIGgwa7b8e/bbCjcaCyHIUDwAAKCgDp3AdtPTExalnS7XA==",
"path": "quartz.aspnetcore/3.6.2",
"hashPath": "quartz.aspnetcore.3.6.2.nupkg.sha512"
},
"Quartz.Extensions.DependencyInjection/3.6.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-EkJCyTVhfaE2SX2hVSQbKSVQs+fw1gWnGaQv+RzfsWASvk7CzDddPE31WA00I0t9gfXpcnV9jDgSOP8K+tO1uA==",
"path": "quartz.extensions.dependencyinjection/3.6.2",
"hashPath": "quartz.extensions.dependencyinjection.3.6.2.nupkg.sha512"
},
"Quartz.Extensions.Hosting/3.6.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-P9PIWcFmK/x5GbxTZcgfOFkagb+OBviNvmsrdksLKe1Dv0LfdjuWvWyUxjbttjmAEm+5IibxGVF5hf42Ws2Qkw==",
"path": "quartz.extensions.hosting/3.6.2",
"hashPath": "quartz.extensions.hosting.3.6.2.nupkg.sha512"
},
"QuartzNetWebConsole/1.0.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-RaffwQOpQcGauFiIaodOqgD6227o8Bkr5gp7oGlaSA8QmwieFa0F4Xp4biqnGzWgMNSHNAOuuRSmwxsue4wmbA==",
"path": "quartznetwebconsole/1.0.2",
"hashPath": "quartznetwebconsole.1.0.2.nupkg.sha512"
},
"Swashbuckle.AspNetCore/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-eUBr4TW0up6oKDA5Xwkul289uqSMgY0xGN4pnbOIBqCcN9VKGGaPvHX3vWaG/hvocfGDP+MGzMA0bBBKz2fkmQ==",
"path": "swashbuckle.aspnetcore/6.4.0",
"hashPath": "swashbuckle.aspnetcore.6.4.0.nupkg.sha512"
},
"Swashbuckle.AspNetCore.Swagger/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-nl4SBgGM+cmthUcpwO/w1lUjevdDHAqRvfUoe4Xp/Uvuzt9mzGUwyFCqa3ODBAcZYBiFoKvrYwz0rabslJvSmQ==",
"path": "swashbuckle.aspnetcore.swagger/6.4.0",
"hashPath": "swashbuckle.aspnetcore.swagger.6.4.0.nupkg.sha512"
},
"Swashbuckle.AspNetCore.SwaggerGen/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-lXhcUBVqKrPFAQF7e/ZeDfb5PMgE8n5t6L5B6/BQSpiwxgHzmBcx8Msu42zLYFTvR5PIqE9Q9lZvSQAcwCxJjw==",
"path": "swashbuckle.aspnetcore.swaggergen/6.4.0",
"hashPath": "swashbuckle.aspnetcore.swaggergen.6.4.0.nupkg.sha512"
},
"Swashbuckle.AspNetCore.SwaggerUI/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1Hh3atb3pi8c+v7n4/3N80Jj8RvLOXgWxzix6w3OZhB7zBGRwsy7FWr4e3hwgPweSBpwfElqj4V4nkjYabH9nQ==",
"path": "swashbuckle.aspnetcore.swaggerui/6.4.0",
"hashPath": "swashbuckle.aspnetcore.swaggerui.6.4.0.nupkg.sha512"
},
"System.Configuration.ConfigurationManager/6.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"path": "system.configuration.configurationmanager/6.0.1",
"hashPath": "system.configuration.configurationmanager.6.0.1.nupkg.sha512"
},
"System.Diagnostics.DiagnosticSource/4.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
"path": "system.diagnostics.diagnosticsource/4.7.1",
"hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
},
"System.Drawing.Common/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
"path": "system.drawing.common/6.0.0",
"hashPath": "system.drawing.common.6.0.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
},
"System.Security.AccessControl/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-AUADIc0LIEQe7MzC+I0cl0rAT8RrTAKFHl53yHjEUzNVIaUlhFY11vc2ebiVJzVBuOzun6F7FBA+8KAbGTTedQ==",
"path": "system.security.accesscontrol/6.0.0",
"hashPath": "system.security.accesscontrol.6.0.0.nupkg.sha512"
},
"System.Security.Cryptography.ProtectedData/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rp1gMNEZpvx9vP0JW0oHLxlf8oSiQgtno77Y4PLUBjSiDYoD77Y8uXHr1Ea5XG4/pIKhqAdxZ8v8OTUtqo9PeQ==",
"path": "system.security.cryptography.protecteddata/6.0.0",
"hashPath": "system.security.cryptography.protecteddata.6.0.0.nupkg.sha512"
},
"System.Security.Permissions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-T/uuc7AklkDoxmcJ7LGkyX1CcSviZuLCa4jg3PekfJ7SU0niF0IVTXwUiNVP9DSpzou2PpxJ+eNY2IfDM90ZCg==",
"path": "system.security.permissions/6.0.0",
"hashPath": "system.security.permissions.6.0.0.nupkg.sha512"
},
"System.Text.Encodings.Web/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-l/tYeikqMHX2MD2jzrHDfR9ejrpTTF7wvAEbR51AMvzip1wSJgiURbDik4iv/w7ZgytmTD/hlwpplEhF9bmFNw==",
"path": "system.text.encodings.web/4.4.0",
"hashPath": "system.text.encodings.web.4.4.0.nupkg.sha512"
},
"System.Windows.Extensions/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IXoJOXIqc39AIe+CIR7koBtRGMiCt/LPM3lI+PELtDIy9XdyeSrwXFdWV9dzJ2Awl0paLWUaknLxFQ5HpHZUog==",
"path": "system.windows.extensions/6.0.0",
"hashPath": "system.windows.extensions.6.0.0.nupkg.sha512"
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,19 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "7.0.0"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("scheduler")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("scheduler")]
[assembly: System.Reflection.AssemblyTitleAttribute("scheduler")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
770fdde00609617651a9853f9b1ca52b93228c27

View File

@@ -0,0 +1,17 @@
is_global = true
build_property.TargetFramework = net7.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb = true
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = OtherWay.Radio.Scheduler
build_property.RootNamespace = OtherWay.Radio.Scheduler
build_property.ProjectDir = /srv/dev/radio-otherway/scheduler/
build_property.RazorLangVersion = 7.0
build_property.SupportLocalizedComponentNames =
build_property.GenerateRazorMetadataSourceChecksumAttributes =
build_property.MSBuildProjectDirectory = /srv/dev/radio-otherway/scheduler
build_property._RazorSourceGeneratorDebug =

View File

@@ -0,0 +1,17 @@
// <auto-generated/>
global using global::Microsoft.AspNetCore.Builder;
global using global::Microsoft.AspNetCore.Hosting;
global using global::Microsoft.AspNetCore.Http;
global using global::Microsoft.AspNetCore.Routing;
global using global::Microsoft.Extensions.Configuration;
global using global::Microsoft.Extensions.DependencyInjection;
global using global::Microsoft.Extensions.Hosting;
global using global::Microsoft.Extensions.Logging;
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Net.Http.Json;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.OpenApi")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")]
// Generated by the MSBuild WriteCodeFragment class.

Binary file not shown.

View File

@@ -0,0 +1 @@
d32fb8b9bfe83f01c7b49005d8450b5867a7ff77

View File

@@ -0,0 +1,51 @@
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/appsettings.Development.json
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/appsettings.json
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/scheduler
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/scheduler.deps.json
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/scheduler.runtimeconfig.json
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/scheduler.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/scheduler.pdb
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/CrystalQuartz.AspNetCore.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Microsoft.AspNetCore.OpenApi.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Microsoft.OpenApi.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Microsoft.Win32.SystemEvents.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Quartz.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Quartz.AspNetCore.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Quartz.Extensions.DependencyInjection.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Quartz.Extensions.Hosting.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/QuartzNetWebConsole.Views.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/QuartzNetWebConsole.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Swashbuckle.AspNetCore.Swagger.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Swashbuckle.AspNetCore.SwaggerGen.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/Swashbuckle.AspNetCore.SwaggerUI.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/System.Configuration.ConfigurationManager.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/System.Drawing.Common.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/System.Security.Cryptography.ProtectedData.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/System.Security.Permissions.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/System.Windows.Extensions.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/runtimes/unix/lib/net6.0/System.Drawing.Common.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/runtimes/win/lib/net6.0/System.Drawing.Common.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/runtimes/win/lib/net6.0/System.Security.Cryptography.ProtectedData.dll
/srv/dev/radio-otherway/scheduler/bin/Debug/net7.0/runtimes/win/lib/net6.0/System.Windows.Extensions.dll
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.csproj.AssemblyReference.cache
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.GeneratedMSBuildEditorConfig.editorconfig
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.AssemblyInfoInputs.cache
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.AssemblyInfo.cs
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.csproj.CoreCompileInputs.cache
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.MvcApplicationPartsAssemblyInfo.cs
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.MvcApplicationPartsAssemblyInfo.cache
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/staticwebassets/msbuild.scheduler.Microsoft.AspNetCore.StaticWebAssets.props
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/staticwebassets/msbuild.build.scheduler.props
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/staticwebassets/msbuild.buildMultiTargeting.scheduler.props
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/staticwebassets/msbuild.buildTransitive.scheduler.props
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/staticwebassets.pack.json
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/staticwebassets.build.json
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/staticwebassets.development.json
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scopedcss/bundle/scheduler.styles.css
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.csproj.CopyComplete
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.dll
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/refint/scheduler.dll
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.pdb
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/scheduler.genruntimeconfig.cache
/srv/dev/radio-otherway/scheduler/obj/Debug/net7.0/ref/scheduler.dll

Binary file not shown.

View File

@@ -0,0 +1 @@
81b0e1760710c334763f01f6d64ccce55ab442b0

Binary file not shown.

View File

@@ -0,0 +1,11 @@
{
"Version": 1,
"Hash": "02kK+8ITz/fLWlGn+2U5tz1apqx7x3PWfR1zJk94pSA=",
"Source": "scheduler",
"BasePath": "_content/scheduler",
"Mode": "Default",
"ManifestType": "Build",
"ReferencedProjectsConfiguration": [],
"DiscoveryPatterns": [],
"Assets": []
}

View File

@@ -0,0 +1,3 @@
<Project>
<Import Project="Microsoft.AspNetCore.StaticWebAssets.props" />
</Project>

View File

@@ -0,0 +1,3 @@
<Project>
<Import Project="../build/scheduler.props" />
</Project>

View File

@@ -0,0 +1,3 @@
<Project>
<Import Project="../buildMultiTargeting/scheduler.props" />
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
{
"version": 2,
"dgSpecHash": "yxCYMahCgwGoxRVTOTncsBezS7M/oTpPfQKDN5YrXjWtT113l0paTBLTQvizyK29TMh6seRYErpy+1Y1orOKpQ==",
"success": true,
"projectFilePath": "/srv/dev/radio-otherway/scheduler/scheduler.csproj",
"expectedPackageFiles": [
"/home/fergalm/.nuget/packages/crystalquartz.aspnetcore/6.8.1/crystalquartz.aspnetcore.6.8.1.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.aspnetcore.http.abstractions/2.0.3/microsoft.aspnetcore.http.abstractions.2.0.3.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.aspnetcore.http.features/2.0.3/microsoft.aspnetcore.http.features.2.0.3.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.aspnetcore.openapi/7.0.2/microsoft.aspnetcore.openapi.7.0.2.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.apidescription.server/6.0.5/microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.configuration.abstractions/6.0.0/microsoft.extensions.configuration.abstractions.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.dependencyinjection.abstractions/6.0.0/microsoft.extensions.dependencyinjection.abstractions.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.diagnostics.healthchecks/6.0.0/microsoft.extensions.diagnostics.healthchecks.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.diagnostics.healthchecks.abstractions/6.0.0/microsoft.extensions.diagnostics.healthchecks.abstractions.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.fileproviders.abstractions/6.0.0/microsoft.extensions.fileproviders.abstractions.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.hosting.abstractions/6.0.0/microsoft.extensions.hosting.abstractions.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.logging.abstractions/6.0.0/microsoft.extensions.logging.abstractions.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.options/6.0.0/microsoft.extensions.options.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.extensions.primitives/6.0.0/microsoft.extensions.primitives.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.openapi/1.4.3/microsoft.openapi.1.4.3.nupkg.sha512",
"/home/fergalm/.nuget/packages/microsoft.win32.systemevents/6.0.0/microsoft.win32.systemevents.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/quartz/3.6.2/quartz.3.6.2.nupkg.sha512",
"/home/fergalm/.nuget/packages/quartz.aspnetcore/3.6.2/quartz.aspnetcore.3.6.2.nupkg.sha512",
"/home/fergalm/.nuget/packages/quartz.extensions.dependencyinjection/3.6.2/quartz.extensions.dependencyinjection.3.6.2.nupkg.sha512",
"/home/fergalm/.nuget/packages/quartz.extensions.hosting/3.6.2/quartz.extensions.hosting.3.6.2.nupkg.sha512",
"/home/fergalm/.nuget/packages/quartznetwebconsole/1.0.2/quartznetwebconsole.1.0.2.nupkg.sha512",
"/home/fergalm/.nuget/packages/swashbuckle.aspnetcore/6.4.0/swashbuckle.aspnetcore.6.4.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/swashbuckle.aspnetcore.swagger/6.4.0/swashbuckle.aspnetcore.swagger.6.4.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/swashbuckle.aspnetcore.swaggergen/6.4.0/swashbuckle.aspnetcore.swaggergen.6.4.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/swashbuckle.aspnetcore.swaggerui/6.4.0/swashbuckle.aspnetcore.swaggerui.6.4.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.configuration.configurationmanager/6.0.1/system.configuration.configurationmanager.6.0.1.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.diagnostics.diagnosticsource/4.7.1/system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.drawing.common/6.0.0/system.drawing.common.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.security.accesscontrol/6.0.0/system.security.accesscontrol.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.security.cryptography.protecteddata/6.0.0/system.security.cryptography.protecteddata.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.security.permissions/6.0.0/system.security.permissions.6.0.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.text.encodings.web/4.4.0/system.text.encodings.web.4.4.0.nupkg.sha512",
"/home/fergalm/.nuget/packages/system.windows.extensions/6.0.0/system.windows.extensions.6.0.0.nupkg.sha512"
],
"logs": []
}

View File

@@ -0,0 +1 @@
"restore":{"projectUniqueName":"/srv/dev/radio-otherway/scheduler/scheduler.csproj","projectName":"scheduler","projectPath":"/srv/dev/radio-otherway/scheduler/scheduler.csproj","outputPath":"/srv/dev/radio-otherway/scheduler/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net7.0"],"sources":{"/home/fergalm/.dotnet/library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net7.0":{"targetAlias":"net7.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net7.0":{"targetAlias":"net7.0","dependencies":{"CrystalQuartz.AspNetCore":{"target":"Package","version":"[6.8.1, )"},"Microsoft.AspNetCore.OpenApi":{"target":"Package","version":"[7.0.2, )"},"Quartz.AspNetCore":{"target":"Package","version":"[3.6.2, )"},"Quartz.Extensions.DependencyInjection":{"target":"Package","version":"[3.6.2, )"},"Quartz.Extensions.Hosting":{"target":"Package","version":"[3.6.2, )"},"QuartzNetWebConsole":{"target":"Package","version":"[1.0.2, )"},"Swashbuckle.AspNetCore":{"target":"Package","version":"[6.4.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/home/fergalm/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"}}

View File

@@ -0,0 +1,95 @@
{
"format": 1,
"restore": {
"/srv/dev/radio-otherway/scheduler/scheduler.csproj": {}
},
"projects": {
"/srv/dev/radio-otherway/scheduler/scheduler.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/srv/dev/radio-otherway/scheduler/scheduler.csproj",
"projectName": "scheduler",
"projectPath": "/srv/dev/radio-otherway/scheduler/scheduler.csproj",
"packagesPath": "/home/fergalm/.nuget/packages/",
"outputPath": "/srv/dev/radio-otherway/scheduler/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/fergalm/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"/home/fergalm/.dotnet/library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"dependencies": {
"CrystalQuartz.AspNetCore": {
"target": "Package",
"version": "[6.8.1, )"
},
"Microsoft.AspNetCore.OpenApi": {
"target": "Package",
"version": "[7.0.2, )"
},
"Quartz.AspNetCore": {
"target": "Package",
"version": "[3.6.2, )"
},
"Quartz.Extensions.DependencyInjection": {
"target": "Package",
"version": "[3.6.2, )"
},
"Quartz.Extensions.Hosting": {
"target": "Package",
"version": "[3.6.2, )"
},
"QuartzNetWebConsole": {
"target": "Package",
"version": "[1.0.2, )"
},
"Swashbuckle.AspNetCore": {
"target": "Package",
"version": "[6.4.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.AspNetCore.App": {
"privateAssets": "none"
},
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/home/fergalm/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/fergalm/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/fergalm/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.4.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/fergalm/.nuget/packages/" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.props')" />
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore/6.4.0/build/Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore/6.4.0/build/Swashbuckle.AspNetCore.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">/home/fergalm/.nuget/packages/microsoft.extensions.apidescription.server/6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.targets')" />
</ImportGroup>
</Project>

View File

@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<RootNamespace>OtherWay.Radio.Scheduler</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CrystalQuartz.AspNetCore" Version="6.8.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.2" />
<PackageReference Include="Quartz.AspNetCore" Version="3.6.2" />
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.6.2" />
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.6.2" />
<PackageReference Include="QuartzNetWebConsole" Version="1.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup>
</Project>

16
scheduler/scheduler.sln Normal file
View File

@@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "scheduler", "scheduler.csproj", "{BA7F9CFC-E0EF-4785-A70D-05F9C2061578}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BA7F9CFC-E0EF-4785-A70D-05F9C2061578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA7F9CFC-E0EF-4785-A70D-05F9C2061578}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA7F9CFC-E0EF-4785-A70D-05F9C2061578}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA7F9CFC-E0EF-4785-A70D-05F9C2061578}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -1,26 +0,0 @@
import React, { createContext, useContext, Context } from "react";
import { Profile } from "@/models";
import useFirebaseAuth from "./useFirebaseAuth";
interface IAuthUserContext {
loading: boolean;
profile: Profile | undefined;
logOut: () => void;
}
const authUserContext = createContext<IAuthUserContext>({
loading: true,
profile: undefined,
logOut: () => {},
});
export function AuthUserProvider({ children }: { children: React.ReactNode }) {
const { loading, profile, logOut } = useFirebaseAuth();
return (
<authUserContext.Provider value={{ loading, profile, logOut }}>
{children}
</authUserContext.Provider>
);
}
export const useAuthUserContext = () => useContext(authUserContext);

View File

@@ -1,8 +0,0 @@
import admin from "firebase-admin";
const serviceAccount = JSON.parse(
process.env.FIREBASE_SERVICE_ACCOUNT_KEY as string
);
export const firebaseAdmin = admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});

View File

@@ -1,3 +0,0 @@
import useFirebaseAuth from "./useFirebaseAuth";
export { useFirebaseAuth };

View File

@@ -1,201 +0,0 @@
import { useEffect, useState, useCallback } from "react";
import {
createUserWithEmailAndPassword,
EmailAuthCredential,
EmailAuthProvider,
FacebookAuthProvider,
getAuth,
GoogleAuthProvider,
linkWithPopup,
OAuthCredential,
OAuthProvider,
onAuthStateChanged,
signInWithEmailAndPassword,
signInWithPopup,
signOut,
TwitterAuthProvider,
UserCredential,
} from "firebase/auth";
import { app } from "./firebase";
import { useRouter } from "next/navigation";
import { Profile } from "@/models";
import { users } from "../db";
import { doc, getDoc, setDoc } from "firebase/firestore";
import { servicesVersion } from "@ts-morph/common/lib/typescript";
import logger from "../util/logging";
import { debug } from "console";
import React from "react";
export default function useFirebaseAuth() {
const [errorCredential, setErrorCredential] =
useState<OAuthCredential | null>();
const [profile, setProfile] = useState<Profile | undefined>();
const auth = getAuth(app);
const router = useRouter();
const [loading, setLoading] = useState(true);
const getUserProfile = useCallback(async () => {
if (auth.currentUser !== null) {
// The user object has basic properties such as display name, email, etc.
// Going forward we may look this up from the user table in firestore
const savedProfileRef = await getDoc(doc(users, auth.currentUser.uid));
const savedProfile = savedProfileRef.data();
const profile: Profile = new Profile(
auth.currentUser.uid,
(savedProfile?.email || auth.currentUser.email) as string,
(savedProfile?.displayName || auth.currentUser.displayName) as string,
(savedProfile?.photoURL || auth.currentUser.photoURL) as string,
savedProfile?.about as string,
savedProfile?.mobileNumber as string,
new Date(),
savedProfile?.deviceRegistrations
);
setProfile(profile);
await setDoc(
doc(users, auth.currentUser.uid),
Object.assign({}, profile),
{
merge: true,
}
);
return profile;
}
}, [auth.currentUser]);
const authStateChanged = useCallback(
async (user: any) => {
if (user) {
setLoading(true);
const profile = await getUserProfile();
setProfile(profile);
}
setLoading(false);
},
[getUserProfile]
);
const clear = () => {
setProfile(undefined);
setLoading(true);
};
const signIn = (email: string, password: string) =>
signInWithEmailAndPassword(auth, email, password);
const signUp = async (email: string, password: string): Promise<string> => {
try {
const response = await createUserWithEmailAndPassword(
auth,
email,
password
);
logger.debug("useFireBaseAuth", "signUp_success", response);
return "";
} catch (err: { code: string } | any) {
const credential = GoogleAuthProvider.credentialFromError(err);
if (credential) {
setErrorCredential(credential as OAuthCredential);
}
logger.error("useFireBaseAuth", "signUp", err);
return err.code;
}
};
const logOut = () => signOut(auth).then(clear);
const _processSignIn = async (
provider: any
): Promise<UserCredential | undefined> => {
try {
const result = await signInWithPopup(auth, provider);
return result;
} catch (err: any) {
console.log("useFirebaseAuth", "_processSignIn", err);
if (err.code === "auth/account-exists-with-different-credential") {
const credential = OAuthProvider.credentialFromError(err);
console.log("useFirebaseAuth", "_processSignIn_duplicateAccount", err);
const auth = getAuth();
if (auth?.currentUser) {
linkWithPopup(auth.currentUser, provider)
.then((result) => {
const credential =
GoogleAuthProvider.credentialFromResult(result);
return credential;
})
.catch((error) => {
console.log(
"useFirebaseAuth",
"_processSignIn",
"Failure in _processSignIn",
err
);
});
}
}
}
};
const signInWithGoogle = async () => {
const provider = new GoogleAuthProvider();
provider.setCustomParameters({ prompt: "select_account" });
provider.addScope("https://www.googleapis.com/auth/userinfo.profile");
const result = await _processSignIn(provider);
if (result) {
const credential = GoogleAuthProvider.credentialFromResult(result);
const profile = await getUserProfile();
setProfile(profile);
router.push("/");
}
};
const signInWithTwitter = async () => {
const provider = new TwitterAuthProvider();
const result = await _processSignIn(provider);
if (result) {
const credential = TwitterAuthProvider.credentialFromResult(result);
const profile = await getUserProfile();
setProfile(profile);
router.push("/");
}
};
const signInWithFacebook = async () => {
const provider = new FacebookAuthProvider();
await _processSignIn(provider);
};
const linkAccounts = async (user: string, password: string) => {
debugger;
const credential = EmailAuthProvider.credential(user, password);
const provider = new GoogleAuthProvider();
const auth = getAuth();
if (!auth.currentUser) {
return;
}
linkWithPopup(auth.currentUser, provider)
.then((result) => {
// Accounts successfully linked.
debugger;
const credential = GoogleAuthProvider.credentialFromResult(result);
const user = result.user;
})
.catch((error) => {
logger.error("useFirebaseAuth", "linkWithPopup", error);
});
};
useEffect(() => {
const unsubscribe = onAuthStateChanged(auth, authStateChanged);
return unsubscribe;
}, [auth, authStateChanged]);
return {
profile,
loading,
signIn,
signUp,
logOut,
signInWithGoogle,
signInWithTwitter,
signInWithFacebook,
linkAccounts,
getUserProfile,
};
}

View File

@@ -1,7 +0,0 @@
import {
CollectionReference,
collection,
DocumentData,
} from "firebase/firestore";
import { firestore } from "../auth/firebase";

View File

@@ -1,35 +0,0 @@
import { NotificationSchedule, Show } from "@/models";
import { DocumentData, QueryDocumentSnapshot, SnapshotOptions, Timestamp, WithFieldValue } from "firebase/firestore";
const showConverter = {
toFirestore(show: WithFieldValue<Show>): DocumentData {
return {
...show,
date: show.date
? Timestamp.fromDate(new Date(show.date as string))
: new Date(),
};
},
fromFirestore(
snapshot: QueryDocumentSnapshot,
options: SnapshotOptions
): Show {
const data = snapshot.data(options)!;
return new Show(snapshot.id, data.title, data.date.toDate(), data.creator);
},
};
const noticeConverter = {
toFirestore(notice: WithFieldValue<NotificationSchedule>): DocumentData {
return notice;
},
fromFirestore(
snapshot: QueryDocumentSnapshot,
options: SnapshotOptions
): NotificationSchedule {
const data = snapshot.data(options)!;
return new NotificationSchedule(
data.scheduleTimes.map((r: any) => r.toDate())
);
},
};
export { showConverter, noticeConverter };

View File

@@ -1,18 +0,0 @@
import { useFirestore, useFirestoreDocData } from "reactfire";
import { doc, DocumentReference } from "firebase/firestore";
import { Organization } from "~/lib/organizations/types/organization";
type Response = Organization & { id: string };
export function useFetchOrganization(organizationId: string) {
const firestore = useFirestore();
const organizationsPath = `/organizations`;
const ref = doc(
firestore,
organizationsPath,
organizationId
) as DocumentReference<Response>;
return useFirestoreDocData(ref, { idField: "id" });
}

View File

@@ -1,54 +0,0 @@
import { initializeApp } from "firebase/app";
import {
getFirestore,
CollectionReference,
collection,
DocumentData,
WithFieldValue,
QueryDocumentSnapshot,
SnapshotOptions,
Timestamp,
initializeFirestore,
} from "firebase/firestore";
const firebaseConfig = {
apiKey: "AIzaSyDtk_Ym-AZroXsHvQVcdHXYyc_TvgycAWw",
authDomain: "radio-otherway.firebaseapp.com",
projectId: "radio-otherway",
storageBucket: "radio-otherway.appspot.com",
messagingSenderId: "47147490249",
appId: "1:47147490249:web:a84515b3ce1c481826e618",
measurementId: "G-12YB78EZM4",
};
export const firebaseApp = initializeApp(firebaseConfig);
const createCollection = <T = DocumentData>(collectionName: string) => {
return collection(firestore, collectionName) as CollectionReference<T>;
};
// Import all your model types
import {
Show,
Reminder,
RemindersProcessed,
Profile,
NotificationSchedule,
} from "@/models";
import { storage } from "../firebase";
import { noticeConverter, showConverter } from "./converters";
import { firestore } from "../auth/firebase";
// export all your collections
export const users = createCollection<Profile>("users");
export const shows =
createCollection<Show>("shows").withConverter(showConverter);
export const notificationSchedules =
createCollection<NotificationSchedule>("noticeSchedules").withConverter(
noticeConverter
);
export const reminders = createCollection<Reminder>("reminders");
export const remindersProcessed =
createCollection<RemindersProcessed>("reminders");
export default firestore;
export { createCollection, firebaseConfig, storage };

View File

@@ -1,26 +0,0 @@
import { Show } from "@/models";
import { createCollection } from "@/lib/db/index";
import { doc, query, setDoc, where } from "@firebase/firestore";
import { getDoc } from "firebase/firestore";
interface Setting {
value: string;
updated: Date;
}
const settingsCollection = createCollection<Setting>("settings");
const Settings = {
read: async (key: string): Promise<string | undefined> => {
const value = (await getDoc(doc(settingsCollection, key))).data();
return value?.value || undefined;
},
write: async (key: string, value: string) => {
await setDoc(doc(settingsCollection, key), {
value,
updated: new Date()
});
}
};
export default Settings;

View File

@@ -1,19 +0,0 @@
import firebase, { getApp, getApps, initializeApp } from "firebase/app";
import { getStorage } from "firebase/storage";
import "firebase/auth";
import { getFirestore } from "firebase/firestore";
const firebaseConfig = {
apiKey: "AIzaSyDtk_Ym-AZroXsHvQVcdHXYyc_TvgycAWw",
authDomain: "radio-otherway.firebaseapp.com",
projectId: "radio-otherway",
storageBucket: "radio-otherway.appspot.com",
messagingSenderId: "47147490249",
appId: "1:47147490249:web:a84515b3ce1c481826e618",
measurementId: "G-12YB78EZM4",
};
// export default admin.firestore();
export const app = initializeApp(firebaseConfig);
export const storage = getStorage(app);
export const db = getFirestore();

View File

42
web/.gitignore vendored Normal file
View File

@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
.env*.development
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
.private/
radio-otherway-service-account.json
serviceAccount.json
/.env.production

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