Skip to content
Closed

V1 #63

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
23b7a08
wip: update
raksiv Feb 14, 2024
625b191
wip resources namespace.
tjholm Feb 14, 2024
7357406
wip topics
jyecusch Feb 14, 2024
a270b37
wip: secrets
raksiv Feb 14, 2024
b8f71f2
wip: workers and schedule workers
HomelessDinosaur Feb 15, 2024
2b0b6c7
working schedule implementation
HomelessDinosaur Feb 16, 2024
d0b3ac0
wip: update proto and implement other workers
HomelessDinosaur Feb 16, 2024
c98749c
add kv stores, update topics, secrets, storage, and queues. Update tests
HomelessDinosaur Feb 19, 2024
b4999c2
add kv store tests
HomelessDinosaur Feb 19, 2024
4b46828
add worker graceful exiting
HomelessDinosaur Feb 27, 2024
5cc3e83
stop attempting response to registration request
HomelessDinosaur Feb 28, 2024
df0bb8e
add license files
HomelessDinosaur Feb 28, 2024
d44609d
update websocket tests
HomelessDinosaur Feb 28, 2024
bb24115
wip improve testing
HomelessDinosaur Mar 19, 2024
7f3c732
update proto, tests, and API interface
HomelessDinosaur Apr 24, 2024
4f3f6b4
wip: issues with api.route("/test");
raksiv Mar 12, 2024
33e1331
add middlewares when creating api route
HomelessDinosaur Mar 13, 2024
a114a1a
minor fix to route.all
raksiv Mar 13, 2024
8c4b8d7
Fix/routes (#64)
raksiv Jul 11, 2024
a2a03ed
add sql support
HomelessDinosaur Feb 27, 2025
9dc3246
add batch resources
HomelessDinosaur Mar 5, 2025
c7cce17
add generic to batch jobs
HomelessDinosaur Mar 6, 2025
f6901c5
remove API overloads with params to reduce typing issues
HomelessDinosaur Mar 7, 2025
b1c5b47
fix the order that middleware is executed.
raksiv Mar 10, 2025
c055263
fix route.all by assigning correct HttpMethods
raksiv Mar 10, 2025
5258030
remove wrapper clients
HomelessDinosaur Mar 31, 2025
a0a81ad
format fix and update workflow files
HomelessDinosaur Apr 2, 2025
8208b5c
update tests
HomelessDinosaur Apr 2, 2025
69fd9f0
add to string and test cases, as well as job worker tests
HomelessDinosaur Apr 2, 2025
c916c7f
add missing license headers
HomelessDinosaur Apr 2, 2025
da5d71c
format
HomelessDinosaur Apr 2, 2025
f56f12c
remove synchronous code for API routes and resource calls
HomelessDinosaur Apr 7, 2025
c3d75c3
remove onmessage, onconnect, and ondisconnect from websocket
HomelessDinosaur Apr 8, 2025
bcfc507
remove all synchronous tests
HomelessDinosaur Apr 9, 2025
885b9f7
stop versioning proto files
HomelessDinosaur Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Find and Replace Version templates
run: |
sed -i.bak 's/${VERSION}/0.0.1/g' src/Nitric.Sdk/Nitric.Sdk.csproj
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ on:
pull_request:
types: [closed]
branches:
- 'main'
- "main"

jobs:
version:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: See CHANGELOG.md for changes
draft: true
prerelease: false
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: See CHANGELOG.md for changes
draft: true
prerelease: false
2 changes: 1 addition & 1 deletion .github/workflows/publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
source-url: https://api.nuget.org/v3/index.json
dotnet-version: 5.0.x
dotnet-version: 7.0.x
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
- name: Normalize version string
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,7 @@ ASALocalRun/
**/obj/
**/bin/
.idea
.vs
.vs
dotCover.*
__out/**
nitric/**/*.proto
36 changes: 24 additions & 12 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
.PHONY: test

# the version of of https://github.com/nitrictech/nitric to use in base client generation.
NITRIC_VERSION := 0.33.0
NITRIC_VERSION := 1.17.0

generate: clean download build

test:
dotnet test tests/Nitric.Sdk.Test
@dotnet test test/Nitric.Sdk.Test

build:
dotnet build src/Nitric.Sdk/Nitric.Sdk.csproj
@dotnet build src/Nitric.Sdk/Nitric.Sdk.csproj
@mv src/Nitric.Sdk/Proto/nitric/proto/* src/Nitric.Sdk/Proto/
@rm -rf nitric
@rm -rf src/Nitric.Sdk/Proto/nitric

clean:
rm -rf src/Nitric.Sdk/bin
rm -rf src/Nitric.Sdk/obj
rm -rf src/Nitric.Sdk/Proto
@rm -rf src/Nitric.Sdk/bin
@rm -rf src/Nitric.Sdk/obj
@rm -rf src/Nitric.Sdk/Proto
@dotnet clean

download:
curl -L https://github.com/nitrictech/nitric/releases/download/v${NITRIC_VERSION}/contracts.tgz -o contracts.tgz
tar xvzf contracts.tgz
rm contracts.tgz
@curl -L https://github.com/nitrictech/nitric/releases/download/v${NITRIC_VERSION}/proto.tgz -o nitric.tgz
@tar xvzf nitric.tgz
@rm nitric.tgz

pack: clean download
dotnet build src/Nitric.Sdk/Nitric.Sdk.csproj -c Release
mkdir -p __out
dotnet pack -c Release -o __out
@dotnet build src/Nitric.Sdk/Nitric.Sdk.csproj -c Release
@mkdir -p __out
@dotnet pack -c Release -o __out

coverage:
@echo "Using dotcover tool... Install using: 'dotnet tool install --global JetBrains.dotCover.GlobalTool'"
@rm -f coverage.xml dotCover.Output.html
@dotnet dotcover test --dcReportType=HTML --dcFilters="+:Nitric.Sdk;-:type=Nitric.Proto.*"
@open dotCover.Output.html
20 changes: 0 additions & 20 deletions src/Nitric.Sdk/Common/Constants.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Nitric.Sdk/Common/Exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public NitricException(string message) : base(message)
{
}

internal static NitricException FromRpcException(RpcException exception)
public static NitricException FromRpcException(RpcException exception)
{
return Exceptions.ContainsKey(exception.StatusCode)
? Exceptions[exception.StatusCode](exception.Message)
Expand Down
48 changes: 48 additions & 0 deletions src/Nitric.Sdk/Common/Struct.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright 2021, Nitric Technologies Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Google.Protobuf;
using Newtonsoft.Json;
using ProtoStruct = Google.Protobuf.WellKnownTypes.Struct;

namespace Nitric.Sdk.Common
{
public class Struct
{
public static T ToJsonSerializable<T>(ProtoStruct @struct)
{
T jsonSerializable = default;
if (@struct != null)
{
JsonFormatter formatter = new JsonFormatter(JsonFormatter.Settings.Default);
jsonSerializable = JsonConvert.DeserializeObject<T>(formatter.Format(@struct));
}

return jsonSerializable;
}

public static ProtoStruct FromJsonSerializable<T>(T jsonSerializable)
{
ProtoStruct structPayload = null;
if (jsonSerializable != null)
{
var jsonPayload = JsonConvert.SerializeObject(jsonSerializable);
structPayload = JsonParser.Default.Parse<ProtoStruct>(jsonPayload);
}

return structPayload;
}
}
}

104 changes: 0 additions & 104 deletions src/Nitric.Sdk/Document/AbstractCollection.cs

This file was deleted.

41 changes: 0 additions & 41 deletions src/Nitric.Sdk/Document/CollectionGroupRef.cs

This file was deleted.

Loading
Loading