Skip to content

Commit 2f3512e

Browse files
authored
Merge branch 'main' into ascott/254
2 parents 836b2cc + 99e94d1 commit 2f3512e

File tree

134 files changed

+5549
-1018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+5549
-1018
lines changed

.github/copilot-instructions.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ The required tools and dependencies are automatically installed via the GitHub A
1212

1313
## Instructions
1414

15-
- Format PR titles with Semantic Commits. The work item number should follow the colon after the commit type like `feat: #12345 added ...`
16-
- Always update the documentation when making changes or adding features that will affect developers who use Coalesce.
17-
- Always add an entry to CHANGELOG.md when adding new features or fixing non-trivial bugs.
18-
- Avoid making breaking changes if not necessary. A less obvious example of a breaking change would be changing an existing CSS class name.
15+
- YOU MUST Format PR titles with Semantic Commits. The work item number should follow the colon after the commit type like `feat: #12345 added ...`
16+
- YOU MUST update the documentation when making changes or adding features that will affect developers who use Coalesce.
17+
- YOU MUST add an entry to CHANGELOG.md when adding new features or fixing non-trivial bugs. Be concise and factual. The changelog is not a marketing document - you don't have to convince users of the value of the feature, or explain how to use it or configure it.
18+
- YOU MUST Avoid making breaking changes if not necessary. A less obvious example of a breaking change would be changing an existing CSS class name.
1919
- Consider adding or updating example files in `playground\Coalesce.Web.Vue3\src\examples` when making changes to coalesce-vue-vuetify.
2020

2121
## Validation Checklist
@@ -30,6 +30,7 @@ npm ci
3030
dotnet build
3131
cd src/coalesce-vue && npm run build
3232
cd ../coalesce-vue-vuetify3 && npm run build
33+
cd ../coalesce-mcp && npm run build
3334
```
3435

3536
2. **Test verification**:
@@ -39,6 +40,7 @@ cd ../coalesce-vue-vuetify3 && npm run build
3940
dotnet test
4041
cd src/coalesce-vue && npm run test
4142
cd ../coalesce-vue-vuetify3 && npm run test
43+
cd ../coalesce-mcp && npm run test
4244
```
4345

4446
3. **Template verification**:

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929

3030
- name: Setup dotnet
3131
uses: actions/setup-dotnet@v4

.github/workflows/part-build.yml

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
- name: Setup dotnet
1818
uses: actions/setup-dotnet@v4
1919
with:
@@ -40,7 +40,7 @@ jobs:
4040
working-directory: playground/Coalesce.Web.Vue3
4141

4242
steps:
43-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v5
4444

4545
- uses: actions/setup-dotnet@v4
4646
with:
@@ -65,7 +65,7 @@ jobs:
6565
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
6666

6767
steps:
68-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@v5
6969

7070
- run: npm ci
7171
working-directory: ${{ github.workspace }}
@@ -93,24 +93,25 @@ jobs:
9393
name: coalesce-vue
9494
path: src/coalesce-vue/coalesce-vue*.tgz
9595

96-
build-coalesce-vue-vuetify3:
96+
build-coalesce-mcp:
9797
runs-on: ubuntu-latest
9898
defaults:
9999
run:
100-
working-directory: src/coalesce-vue-vuetify3
100+
working-directory: src/coalesce-mcp
101101

102102
env:
103103
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
104104

105105
steps:
106-
- uses: actions/checkout@v4
106+
- uses: actions/checkout@v5
107107

108108
- run: npm ci
109109
working-directory: ${{ github.workspace }}
110110

111-
- run: npm run build-local-deps # build coalesce-vue
111+
- name: npm run test
112+
run: npm run test
113+
112114
- run: npm run build
113-
- run: npm run test
114115

115116
- name: update version
116117
run: sed -i "s/0.1.0-local/$COALESCE_VERSION/g" package.json
@@ -120,57 +121,64 @@ jobs:
120121
- name: Upload Artifact
121122
uses: actions/upload-artifact@v4
122123
with:
123-
name: coalesce-vue-vuetify3
124-
path: src/coalesce-vue-vuetify3/*.tgz
124+
name: coalesce-mcp
125+
path: src/coalesce-mcp/*.tgz
125126

126-
build-docs:
127+
build-coalesce-vue-vuetify3:
127128
runs-on: ubuntu-latest
128129
defaults:
129130
run:
130-
shell: bash
131-
working-directory: docs
131+
working-directory: src/coalesce-vue-vuetify3
132+
133+
env:
134+
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
132135

133136
steps:
134-
- uses: actions/checkout@v4
135-
with:
136-
# fetch all commits to get last updated time or other git log info
137-
fetch-depth: 0
137+
- uses: actions/checkout@v5
138138

139139
- run: npm ci
140140
working-directory: ${{ github.workspace }}
141141

142-
- name: Build docs (without linkcheck)
143-
run: npm run build-only
142+
- run: npm run build-local-deps # build coalesce-vue
143+
- run: npm run build
144+
- run: npm run test
145+
146+
- name: update version
147+
run: sed -i "s/0.1.0-local/$COALESCE_VERSION/g" package.json
148+
149+
- run: npm pack
144150

145151
- name: Upload Artifact
146152
uses: actions/upload-artifact@v4
147153
with:
148-
name: docs
149-
path: docs/.vitepress/dist/Coalesce
154+
name: coalesce-vue-vuetify3
155+
path: src/coalesce-vue-vuetify3/*.tgz
150156

151-
linkcheck-docs:
157+
build-docs:
152158
runs-on: ubuntu-latest
153-
needs: build-docs
154159
defaults:
155160
run:
156161
shell: bash
157162
working-directory: docs
158163

159164
steps:
160-
- uses: actions/checkout@v4
165+
- uses: actions/checkout@v5
166+
with:
167+
# fetch all commits to get last updated time or other git log info
168+
fetch-depth: 0
161169

162170
- run: npm ci
163-
# working-directory: ${{ github.workspace }}
171+
working-directory: ${{ github.workspace }}
172+
173+
- name: Build docs
174+
run: npm run build
164175

165-
- name: Download built docs
166-
uses: actions/download-artifact@v4
176+
- name: Upload Artifact
177+
uses: actions/upload-artifact@v4
167178
with:
168179
name: docs
169180
path: docs/.vitepress/dist/Coalesce
170181

171-
- name: Run linkcheck
172-
run: npm run linkcheck
173-
174182
validate-template:
175183
runs-on: ubuntu-latest
176184
name: "test template: ${{matrix.testCase}}"
@@ -199,7 +207,7 @@ jobs:
199207
COALESCE_VERSION: ${{ inputs.COALESCE_VERSION }}
200208

201209
steps:
202-
- uses: actions/checkout@v4
210+
- uses: actions/checkout@v5
203211

204212
- name: Setup dotnet
205213
uses: actions/setup-dotnet@v4
@@ -209,7 +217,7 @@ jobs:
209217
9.0.x
210218
211219
- name: Download Artifacts
212-
uses: actions/download-artifact@v4
220+
uses: actions/download-artifact@v5
213221
with:
214222
path: ${{ github.workspace }}/artifacts
215223

.github/workflows/part-compute-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
COALESCE_VERSION: ${{ steps.version.outputs.COALESCE_VERSION }}
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424

2525
- name: "Verify and set COALESCE_VERSION variable"
2626
id: version

.github/workflows/part-publish.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Download all workflow run artifacts
14-
uses: actions/download-artifact@v4
14+
uses: actions/download-artifact@v5
1515

1616
- uses: actions/setup-node@v4
1717
with:
@@ -22,6 +22,11 @@ jobs:
2222
env:
2323
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2424

25+
- name: npm publish coalesce-mcp
26+
run: npm publish ./coalesce-mcp/*.tgz --tag ${{ inputs.prereleaseSlug || 'latest' }} --access public
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
2530
- name: npm publish coalesce-vue-vuetify
2631
run: for f in ./coalesce-vue-vuetify*/*.tgz; do npm publish $f --tag ${{ inputs.prereleaseSlug || 'latest' }} --access public; done
2732
env:
@@ -32,7 +37,7 @@ jobs:
3237

3338
steps:
3439
- name: Download all workflow run artifacts
35-
uses: actions/download-artifact@v4
40+
uses: actions/download-artifact@v5
3641

3742
- name: dotnet nuget push
3843
run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }}
@@ -42,7 +47,7 @@ jobs:
4247

4348
steps:
4449
- name: Download all workflow run artifacts
45-
uses: actions/download-artifact@v4
50+
uses: actions/download-artifact@v5
4651

4752
# @see https://github.com/crazy-max/ghaction-github-pages
4853
- name: Deploy to GitHub Pages

.github/workflows/part-template-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
2222

2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525

2626
- name: Setup dotnet
2727
uses: actions/setup-dotnet@v4

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: ubuntu-latest
4040
needs: [meta, publish]
4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v5
4343
- uses: rickstaa/action-create-tag@v1
4444
if: ${{ success() && !inputs.prereleaseSlug }}
4545
with:
@@ -61,7 +61,7 @@ jobs:
6161

6262
steps:
6363
- name: Download Artifacts
64-
uses: actions/download-artifact@v4
64+
uses: actions/download-artifact@v5
6565
with:
6666
name: template-packages
6767

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
// The markdown formatter flat out ruins some of our docs
88
"editor.formatOnSave": false
99
},
10-
"typescript.tsdk": "node_modules\\typescript\\lib"
10+
"typescript.tsdk": "node_modules\\typescript\\lib",
11+
// XML element content is often whitespace sensitive.
12+
// Introducing wrapping breaks some csproj elements.
13+
"xml.format.maxLineWidth": 0
1114
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
- The types generated for inheritance hierarchies have changed significantly. If two or more models in a type hierarchy (i.e. a base type and a derived type) are both exposed by Coalesce, that relationship is now reflected throughout the generated DTOs, generated TypeScript, and admin pages. The generated ViewModels classes for abstract classes are now just proxies intended to be used only for loading one of the concrete implementation types.
77
- `StandardBehaviors.AfterDelete` is now `AfterDeleteAsync` and has a different signature and semantics. Instead of modifying the resulting `item` and `includeTree` with `ref` parameters, these values can be optionally overridden by returning an ItemResult with its `Object` and `IncludeTree` properties populated with non-null values.
88
- `ViewModel.$getErrors` now returns a `string[]` instead of a `Generator<string>`.
9+
- `IntelliTect.Coalesce.AuditLogging` now uses stored procedures by default to upsert audit log entries. You can disable this (e.g. if your application lacks permission to create/update stored procedures) by chaining `.WithStoredProcedures(false)` when you configure audit logging.
910
- The CommonJS build of coalesce-vue has been dropped - only the ESM build remains. Most projects should be unaffected.
1011

1112
## Features
1213

1314
- Added support for generating Semantic Kernel plugins from CRUD models and custom methods via the new `[SemanticKernel]` attribute. Semantic Kernel is a Microsoft framework that allows you to create AI Agents that can call tool functions provided by your application. This feature is in beta and may undergo breaking changes in non-major releases.
15+
- Added `[SimpleModel]` attribute to explicitly declare types as Simple Models, allowing TypeScript outputs to be generated for types that are otherwise unused by Coalesce endpoints.
1416
- Added a set of Roslyn analyzers to help avoid common issues and suggest improvements. These analyzers are included and enabled by default.
1517
- All endpoints with bodies are now sent as JSON instead of form data, with the exception of endpoints that have file parameter(s) and no other non-scalar parameters.
1618
- Coalesce's Vite middleware (`UseViteDevelopmentServer`) now checks if your installed NPM packages match what's defined in package.json and package-lock.json, presenting an in-browser warning if they do not. This helps avoid forgetting to reinstall packages after pulling down changes in multi-developer projects.
@@ -36,6 +38,7 @@
3638
## Fixes
3739
- Fix error in codegen when using JS reserved keywords or C# contextual keywords as parameter names.
3840
- Fix c-select not receiving proper disabled styling
41+
- Default search behavior when no SearchAttribute is present no longer splits on spaces. The old behavior would result in multi-word searches failing to match because the default search behavior is StartsWith, not Contains.
3942

4043
# 5.3.8
4144

Directory.Packages.props

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,21 @@
1717
<PackageVersion Include="GenFu" Version="1.4.22" />
1818
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="2.3.0" />
1919
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(DotNetPackageVersionSpec)" />
20-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson"
21-
Version="$(DotNetPackageVersionSpec)" />
20+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="$(DotNetPackageVersionSpec)" />
2221
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="$(DotNetPackageVersionSpec)" />
23-
<PackageVersion Include="Microsoft.AspNetCore.SpaServices.Extensions"
24-
Version="$(DotNetPackageVersionSpec)" />
22+
<PackageVersion Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="$(DotNetPackageVersionSpec)" />
2523
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.2" />
2624
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.2" />
2725
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
2826
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.14.0" />
2927
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
3028
<PackageVersion Include="Microsoft.DotNet.Cli.Utils" Version="2.0.0" />
3129
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="$(DotNetPackageVersionSpec)" />
32-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design"
33-
Version="$(DotNetPackageVersionSpec)" />
34-
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory"
35-
Version="$(DotNetPackageVersionSpec)" />
36-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational"
37-
Version="$(DotNetPackageVersionSpec)" />
38-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite"
39-
Version="$(DotNetPackageVersionSpec)" />
40-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer"
41-
Version="$(DotNetPackageVersionSpec)" />
30+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="$(DotNetPackageVersionSpec)" />
31+
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(DotNetPackageVersionSpec)" />
32+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="$(DotNetPackageVersionSpec)" />
33+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(DotNetPackageVersionSpec)" />
34+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(DotNetPackageVersionSpec)" />
4235
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
4336
<PackageVersion Include="Microsoft.OpenApi" Version="1.6.24" />
4437
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.6.24" />

0 commit comments

Comments
 (0)