rapidkit 0.32.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/data/modules-embeddings.json +16907 -80088
- package/dist/{autopilot-release-XRN56SCO.js → autopilot-release-BQT23OL7.js} +1 -1
- package/dist/{chunk-X5KRT2DT.js → chunk-3Q7264EJ.js} +59 -16
- package/dist/{chunk-S2FC4GUS.js → chunk-3V47U5UZ.js} +1 -1
- package/dist/chunk-W62Q2D3K.js +33 -0
- package/dist/{create-6AMYKNEG.js → create-YPTSMFZH.js} +7 -7
- package/dist/{dotnet-webapi-clean-UZXCLWEV.js → dotnet-webapi-clean-TPQMNFSD.js} +111 -43
- package/dist/{gofiber-standard-QGVZHHCP.js → gofiber-standard-NDCBY6OM.js} +1 -1
- package/dist/{gogin-standard-U746R3B5.js → gogin-standard-WUOMIHDR.js} +1 -1
- package/dist/index.js +51 -51
- package/dist/{pythonRapidkitExec-4MP62M5R.js → pythonRapidkitExec-JXOKKTXZ.js} +1 -1
- package/dist/{springboot-standard-TZ3DKKWG.js → springboot-standard-WQWB5E24.js} +1 -1
- package/dist/{workspace-EHYCBFXL.js → workspace-QCU3VBCD.js} +1 -1
- package/dist/workspace-run-KMENEDIZ.js +1 -0
- package/package.json +7 -7
- package/dist/chunk-BFCIY2QK.js +0 -33
- package/dist/workspace-run-OVDAQG4F.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b,c}from'./chunk-
|
|
1
|
+
import {b,c}from'./chunk-3Q7264EJ.js';import {b as b$2}from'./chunk-AC6KIKII.js';import {promises}from'fs';import n from'path';import i from'chalk';import b$1 from'ora';import {execa}from'execa';var C="net8.0",R="8080";function A(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")}function j(e,r){return e.trim().replace(/[^A-Za-z0-9_.]+/g,".").replace(/^\.+|\.+$/g,"").replace(/\.{2,}/g,".").split(".").map(a=>a.replace(/^[^A-Za-z_]+/,"").replace(/[^A-Za-z0-9_]/g,"")).filter(Boolean).join(".")||r}function S(e,r){return e.replace(/[\r\n\t]+/g," ").trim()||r}function y(e){return /^net\d+\.\d+$/.test(e.trim())}function _(){return JSON.stringify({engine:"npm",runtime:"dotnet"},null,2)}function E(e,r){return JSON.stringify({kit_name:"dotnet.webapi.clean",runtime:"dotnet",framework:"dotnet",module_support:false,project_name:e.project_name,root_namespace:e.root_namespace,target_framework:e.target_framework,app_version:e.app_version,created_by:"rapidkit-npm",rapidkit_version:r,created_at:new Date().toISOString()},null,2)}function D(e){return `<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
2
2
|
<PropertyGroup>
|
|
3
3
|
<TargetFramework>${e.target_framework}</TargetFramework>
|
|
4
4
|
<Nullable>enable</Nullable>
|
|
@@ -8,6 +8,7 @@ import {b,c}from'./chunk-X5KRT2DT.js';import {b as b$2}from'./chunk-AC6KIKII.js'
|
|
|
8
8
|
<Version>${e.app_version}</Version>
|
|
9
9
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
10
10
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
11
|
+
<NoWarn>$(NoWarn);1591</NoWarn>
|
|
11
12
|
</PropertyGroup>
|
|
12
13
|
|
|
13
14
|
<ItemGroup>
|
|
@@ -15,7 +16,7 @@ import {b,c}from'./chunk-X5KRT2DT.js';import {b as b$2}from'./chunk-AC6KIKII.js'
|
|
|
15
16
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
|
16
17
|
</ItemGroup>
|
|
17
18
|
</Project>
|
|
18
|
-
`}function
|
|
19
|
+
`}function $(e){return `<Project Sdk="Microsoft.NET.Sdk">
|
|
19
20
|
<PropertyGroup>
|
|
20
21
|
<TargetFramework>${e.target_framework}</TargetFramework>
|
|
21
22
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
@@ -35,7 +36,7 @@ import {b,c}from'./chunk-X5KRT2DT.js';import {b as b$2}from'./chunk-AC6KIKII.js'
|
|
|
35
36
|
<ProjectReference Include="..\\src\\${e.project_name}.csproj" />
|
|
36
37
|
</ItemGroup>
|
|
37
38
|
</Project>
|
|
38
|
-
`}function
|
|
39
|
+
`}function I(e){return `using ${e.root_namespace}.Application;
|
|
39
40
|
using ${e.root_namespace}.Infrastructure;
|
|
40
41
|
using ${e.root_namespace}.Presentation;
|
|
41
42
|
|
|
@@ -68,7 +69,7 @@ app.Run();
|
|
|
68
69
|
public partial class Program
|
|
69
70
|
{
|
|
70
71
|
}
|
|
71
|
-
`}function
|
|
72
|
+
`}function P(e){return `namespace ${e.root_namespace}.Application;
|
|
72
73
|
|
|
73
74
|
public sealed class ApplicationInfoOptions
|
|
74
75
|
{
|
|
@@ -80,7 +81,7 @@ public sealed class ApplicationInfoOptions
|
|
|
80
81
|
|
|
81
82
|
public string Description { get; init; } = "${e.description}";
|
|
82
83
|
}
|
|
83
|
-
`}function
|
|
84
|
+
`}function T(e){return `using Microsoft.Extensions.DependencyInjection;
|
|
84
85
|
|
|
85
86
|
namespace ${e.root_namespace}.Application;
|
|
86
87
|
|
|
@@ -92,7 +93,7 @@ public static class ApplicationServiceRegistration
|
|
|
92
93
|
return services;
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
`}function
|
|
96
|
+
`}function k(e){return `using Microsoft.Extensions.Options;
|
|
96
97
|
|
|
97
98
|
namespace ${e.root_namespace}.Application;
|
|
98
99
|
|
|
@@ -116,7 +117,7 @@ public sealed class SystemInfoService(IOptions<ApplicationInfoOptions> options)
|
|
|
116
117
|
DateTimeOffset.UtcNow);
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
|
-
`}function
|
|
120
|
+
`}function x(e){return `using Microsoft.Extensions.DependencyInjection;
|
|
120
121
|
|
|
121
122
|
namespace ${e.root_namespace}.Infrastructure;
|
|
122
123
|
|
|
@@ -127,7 +128,7 @@ public static class InfrastructureServiceRegistration
|
|
|
127
128
|
return services;
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
|
-
`}function
|
|
131
|
+
`}function w(e){return `using Microsoft.AspNetCore.Diagnostics;
|
|
131
132
|
using Microsoft.AspNetCore.Http;
|
|
132
133
|
using Microsoft.Extensions.DependencyInjection;
|
|
133
134
|
|
|
@@ -161,7 +162,7 @@ internal sealed class GlobalExceptionHandler : IExceptionHandler
|
|
|
161
162
|
return true;
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
|
-
`}function
|
|
165
|
+
`}function v(e){return `using ${e.root_namespace}.Application;
|
|
165
166
|
|
|
166
167
|
namespace ${e.root_namespace}.Presentation;
|
|
167
168
|
|
|
@@ -179,7 +180,7 @@ public static class SystemEndpoints
|
|
|
179
180
|
return app;
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
|
-
`}function d(e){return JSON.stringify({RapidKit:{Name:e.project_name,Version:e.app_version,Description:e.description},Logging:{LogLevel:{Default:"Information","Microsoft.AspNetCore":"Warning"}},AllowedHosts:"*",Kestrel:{Endpoints:{Http:{Url:`http://0.0.0.0:${e.port}`}}}},null,2)}function
|
|
183
|
+
`}function d(e){return JSON.stringify({RapidKit:{Name:e.project_name,Version:e.app_version,Description:e.description},Logging:{LogLevel:{Default:"Information","Microsoft.AspNetCore":"Warning"}},AllowedHosts:"*",Kestrel:{Endpoints:{Http:{Url:`http://0.0.0.0:${e.port}`}}}},null,2)}function N(e){return `FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
183
184
|
WORKDIR /src
|
|
184
185
|
COPY src/*.csproj ./src/
|
|
185
186
|
COPY tests/*.csproj ./tests/
|
|
@@ -196,7 +197,7 @@ ENV ASPNETCORE_URLS=http://+:${e.port}
|
|
|
196
197
|
COPY --from=build /app/publish .
|
|
197
198
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl -fsS http://localhost:${e.port}/health/live || exit 1
|
|
198
199
|
ENTRYPOINT ["dotnet", "${e.root_namespace}.dll"]
|
|
199
|
-
`}function
|
|
200
|
+
`}function h(e){return `services:
|
|
200
201
|
api:
|
|
201
202
|
build: .
|
|
202
203
|
ports:
|
|
@@ -209,36 +210,38 @@ ENTRYPOINT ["dotnet", "${e.root_namespace}.dll"]
|
|
|
209
210
|
interval: 30s
|
|
210
211
|
timeout: 5s
|
|
211
212
|
retries: 3
|
|
212
|
-
`}function
|
|
213
|
+
`}function V(e){return `.PHONY: init dev start build test lint format docker-up docker-down
|
|
213
214
|
|
|
214
215
|
init:
|
|
215
|
-
dotnet restore
|
|
216
|
+
dotnet restore src/${e.project_name}.csproj
|
|
216
217
|
dotnet tool restore || true
|
|
217
218
|
|
|
218
219
|
dev:
|
|
219
|
-
dotnet
|
|
220
|
+
dotnet run --project src/${e.project_name}.csproj
|
|
220
221
|
|
|
221
222
|
start:
|
|
222
223
|
dotnet run --project src/${e.project_name}.csproj
|
|
223
224
|
|
|
224
225
|
build:
|
|
225
|
-
dotnet build -c Release
|
|
226
|
+
dotnet build src/${e.project_name}.csproj -c Release
|
|
226
227
|
|
|
227
228
|
test:
|
|
228
|
-
dotnet test --collect:"XPlat Code Coverage"
|
|
229
|
+
dotnet test tests/${e.project_name}.Tests.csproj --collect:"XPlat Code Coverage"
|
|
229
230
|
|
|
230
231
|
lint:
|
|
231
|
-
dotnet format --verify-no-changes
|
|
232
|
+
dotnet format src/${e.project_name}.csproj --verify-no-changes
|
|
233
|
+
dotnet format tests/${e.project_name}.Tests.csproj --verify-no-changes
|
|
232
234
|
|
|
233
235
|
format:
|
|
234
|
-
dotnet format
|
|
236
|
+
dotnet format src/${e.project_name}.csproj
|
|
237
|
+
dotnet format tests/${e.project_name}.Tests.csproj
|
|
235
238
|
|
|
236
239
|
docker-up:
|
|
237
240
|
docker compose up --build -d
|
|
238
241
|
|
|
239
242
|
docker-down:
|
|
240
243
|
docker compose down
|
|
241
|
-
`}function
|
|
244
|
+
`}function U(e){return `#!/usr/bin/env sh
|
|
242
245
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
243
246
|
CMD="\${1:-help}"
|
|
244
247
|
shift 2>/dev/null || true
|
|
@@ -246,42 +249,58 @@ shift 2>/dev/null || true
|
|
|
246
249
|
case "$CMD" in
|
|
247
250
|
init)
|
|
248
251
|
cd "$SCRIPT_DIR" || exit 1
|
|
249
|
-
dotnet restore "
|
|
252
|
+
dotnet restore "src/${e.project_name}.csproj" || exit $?
|
|
250
253
|
dotnet tool restore 2>/dev/null || true
|
|
251
254
|
;;
|
|
252
|
-
dev) exec dotnet
|
|
255
|
+
dev) exec dotnet run --project "$SCRIPT_DIR/src/${e.project_name}.csproj" "$@" ;;
|
|
253
256
|
start) exec dotnet run --project "$SCRIPT_DIR/src/${e.project_name}.csproj" "$@" ;;
|
|
254
|
-
build) exec dotnet build "$SCRIPT_DIR/${e.project_name}.
|
|
255
|
-
test) exec dotnet test "$SCRIPT_DIR/${e.project_name}.
|
|
256
|
-
lint)
|
|
257
|
-
|
|
257
|
+
build) exec dotnet build "$SCRIPT_DIR/src/${e.project_name}.csproj" -c Release "$@" ;;
|
|
258
|
+
test) exec dotnet test "$SCRIPT_DIR/tests/${e.project_name}.Tests.csproj" "$@" ;;
|
|
259
|
+
lint)
|
|
260
|
+
dotnet format "$SCRIPT_DIR/src/${e.project_name}.csproj" --verify-no-changes "$@" || exit $?
|
|
261
|
+
exec dotnet format "$SCRIPT_DIR/tests/${e.project_name}.Tests.csproj" --verify-no-changes "$@"
|
|
262
|
+
;;
|
|
263
|
+
format|fmt)
|
|
264
|
+
dotnet format "$SCRIPT_DIR/src/${e.project_name}.csproj" "$@" || exit $?
|
|
265
|
+
exec dotnet format "$SCRIPT_DIR/tests/${e.project_name}.Tests.csproj" "$@"
|
|
266
|
+
;;
|
|
258
267
|
help|--help|-h)
|
|
259
268
|
echo "RapidKit \u2014 ASP.NET Core project: ${e.project_name}"
|
|
260
269
|
echo "Available: init, dev, start, build, test, lint, format"
|
|
261
270
|
;;
|
|
262
271
|
*) echo "rapidkit: unknown command: $CMD" >&2; exit 1 ;;
|
|
263
272
|
esac
|
|
264
|
-
`}function
|
|
273
|
+
`}function O(e){return `@echo off
|
|
265
274
|
set CMD=%1
|
|
266
275
|
if "%CMD%"=="" set CMD=help
|
|
267
276
|
shift
|
|
268
277
|
|
|
269
278
|
if "%CMD%"=="init" (
|
|
270
|
-
dotnet restore
|
|
279
|
+
dotnet restore src\\${e.project_name}.csproj
|
|
271
280
|
if errorlevel 1 exit /b %ERRORLEVEL%
|
|
272
281
|
dotnet tool restore 2>nul
|
|
273
282
|
exit /b 0
|
|
274
283
|
)
|
|
275
|
-
if "%CMD%"=="dev" ( dotnet
|
|
284
|
+
if "%CMD%"=="dev" ( dotnet run --project src\\${e.project_name}.csproj %* & exit /b %ERRORLEVEL% )
|
|
276
285
|
if "%CMD%"=="start" ( dotnet run --project src\\${e.project_name}.csproj %* & exit /b %ERRORLEVEL% )
|
|
277
|
-
if "%CMD%"=="build" ( dotnet build
|
|
278
|
-
if "%CMD%"=="test" ( dotnet test
|
|
279
|
-
if "%CMD%"=="lint" (
|
|
280
|
-
|
|
286
|
+
if "%CMD%"=="build" ( dotnet build src\\${e.project_name}.csproj -c Release %* & exit /b %ERRORLEVEL% )
|
|
287
|
+
if "%CMD%"=="test" ( dotnet test tests\\${e.project_name}.Tests.csproj %* & exit /b %ERRORLEVEL% )
|
|
288
|
+
if "%CMD%"=="lint" (
|
|
289
|
+
dotnet format src\\${e.project_name}.csproj --verify-no-changes %*
|
|
290
|
+
if errorlevel 1 exit /b %ERRORLEVEL%
|
|
291
|
+
dotnet format tests\\${e.project_name}.Tests.csproj --verify-no-changes %*
|
|
292
|
+
exit /b %ERRORLEVEL%
|
|
293
|
+
)
|
|
294
|
+
if "%CMD%"=="format" (
|
|
295
|
+
dotnet format src\\${e.project_name}.csproj %*
|
|
296
|
+
if errorlevel 1 exit /b %ERRORLEVEL%
|
|
297
|
+
dotnet format tests\\${e.project_name}.Tests.csproj %*
|
|
298
|
+
exit /b %ERRORLEVEL%
|
|
299
|
+
)
|
|
281
300
|
|
|
282
301
|
echo Available: init, dev, start, build, test, lint, format
|
|
283
302
|
exit /b 1
|
|
284
|
-
`}function
|
|
303
|
+
`}function M(e){return `name: CI
|
|
285
304
|
|
|
286
305
|
on:
|
|
287
306
|
push:
|
|
@@ -300,14 +319,18 @@ jobs:
|
|
|
300
319
|
with:
|
|
301
320
|
dotnet-version: 8.0.x
|
|
302
321
|
- name: Restore
|
|
303
|
-
run:
|
|
322
|
+
run: |
|
|
323
|
+
dotnet restore src/${e.project_name}.csproj
|
|
324
|
+
dotnet restore tests/${e.project_name}.Tests.csproj
|
|
304
325
|
- name: Format check
|
|
305
|
-
run:
|
|
326
|
+
run: |
|
|
327
|
+
dotnet format src/${e.project_name}.csproj --verify-no-changes
|
|
328
|
+
dotnet format tests/${e.project_name}.Tests.csproj --verify-no-changes
|
|
306
329
|
- name: Build
|
|
307
|
-
run: dotnet build
|
|
330
|
+
run: dotnet build src/${e.project_name}.csproj -c Release --no-restore
|
|
308
331
|
- name: Test
|
|
309
|
-
run: dotnet test
|
|
310
|
-
`}function
|
|
332
|
+
run: dotnet test tests/${e.project_name}.Tests.csproj -c Release --no-build --collect:"XPlat Code Coverage"
|
|
333
|
+
`}function W(e){return `using System.Net;
|
|
311
334
|
using Microsoft.AspNetCore.Mvc.Testing;
|
|
312
335
|
using Xunit;
|
|
313
336
|
|
|
@@ -343,15 +366,60 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|
|
343
366
|
# Visual Studio Version 17
|
|
344
367
|
VisualStudioVersion = 17.0.31903.59
|
|
345
368
|
MinimumVisualStudioVersion = 10.0.40219.1
|
|
369
|
+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{33333333-3333-3333-3333-333333333333}"
|
|
370
|
+
EndProject
|
|
371
|
+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{44444444-4444-4444-4444-444444444444}"
|
|
372
|
+
EndProject
|
|
346
373
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "${e.project_name}", "src\\${e.project_name}.csproj", "{11111111-1111-1111-1111-111111111111}"
|
|
347
374
|
EndProject
|
|
348
375
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "${e.project_name}.Tests", "tests\\${e.project_name}.Tests.csproj", "{22222222-2222-2222-2222-222222222222}"
|
|
349
376
|
EndProject
|
|
350
377
|
Global
|
|
378
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
379
|
+
Debug|Any CPU = Debug|Any CPU
|
|
380
|
+
Debug|x64 = Debug|x64
|
|
381
|
+
Debug|x86 = Debug|x86
|
|
382
|
+
Release|Any CPU = Release|Any CPU
|
|
383
|
+
Release|x64 = Release|x64
|
|
384
|
+
Release|x86 = Release|x86
|
|
385
|
+
EndGlobalSection
|
|
386
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
387
|
+
{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
388
|
+
{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
389
|
+
{11111111-1111-1111-1111-111111111111}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
390
|
+
{11111111-1111-1111-1111-111111111111}.Debug|x64.Build.0 = Debug|Any CPU
|
|
391
|
+
{11111111-1111-1111-1111-111111111111}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
392
|
+
{11111111-1111-1111-1111-111111111111}.Debug|x86.Build.0 = Debug|Any CPU
|
|
393
|
+
{11111111-1111-1111-1111-111111111111}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
394
|
+
{11111111-1111-1111-1111-111111111111}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
395
|
+
{11111111-1111-1111-1111-111111111111}.Release|x64.ActiveCfg = Release|Any CPU
|
|
396
|
+
{11111111-1111-1111-1111-111111111111}.Release|x64.Build.0 = Release|Any CPU
|
|
397
|
+
{11111111-1111-1111-1111-111111111111}.Release|x86.ActiveCfg = Release|Any CPU
|
|
398
|
+
{11111111-1111-1111-1111-111111111111}.Release|x86.Build.0 = Release|Any CPU
|
|
399
|
+
{22222222-2222-2222-2222-222222222222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
400
|
+
{22222222-2222-2222-2222-222222222222}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
401
|
+
{22222222-2222-2222-2222-222222222222}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
402
|
+
{22222222-2222-2222-2222-222222222222}.Debug|x64.Build.0 = Debug|Any CPU
|
|
403
|
+
{22222222-2222-2222-2222-222222222222}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
404
|
+
{22222222-2222-2222-2222-222222222222}.Debug|x86.Build.0 = Debug|Any CPU
|
|
405
|
+
{22222222-2222-2222-2222-222222222222}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
406
|
+
{22222222-2222-2222-2222-222222222222}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
407
|
+
{22222222-2222-2222-2222-222222222222}.Release|x64.ActiveCfg = Release|Any CPU
|
|
408
|
+
{22222222-2222-2222-2222-222222222222}.Release|x64.Build.0 = Release|Any CPU
|
|
409
|
+
{22222222-2222-2222-2222-222222222222}.Release|x86.ActiveCfg = Release|Any CPU
|
|
410
|
+
{22222222-2222-2222-2222-222222222222}.Release|x86.Build.0 = Release|Any CPU
|
|
411
|
+
EndGlobalSection
|
|
412
|
+
GlobalSection(SolutionProperties) = preSolution
|
|
413
|
+
HideSolutionNode = FALSE
|
|
414
|
+
EndGlobalSection
|
|
415
|
+
GlobalSection(NestedProjects) = preSolution
|
|
416
|
+
{11111111-1111-1111-1111-111111111111} = {33333333-3333-3333-3333-333333333333}
|
|
417
|
+
{22222222-2222-2222-2222-222222222222} = {44444444-4444-4444-4444-444444444444}
|
|
418
|
+
EndGlobalSection
|
|
351
419
|
EndGlobal
|
|
352
|
-
`.trimStart()}async function
|
|
353
|
-
PORT=${
|
|
354
|
-
`),await c(n.join(e,".github","workflows","ci.yml"),
|
|
420
|
+
`.trimStart()}async function F(e,r){if(!r)try{await execa("git",["init"],{cwd:e,stdio:"ignore"});}catch{console.log(i.gray("\u26A0 git init skipped (git not found or error)"));}}async function L(e){try{await execa("dotnet",["--version"],{cwd:e,timeout:3e3,stdio:"pipe"});}catch{console.log(i.yellow("\u26A0 .NET SDK not found in PATH - project scaffolded, but init/build need .NET 8+")),console.log(i.gray(" Install: https://dotnet.microsoft.com/download"));}}async function Q(e,r){let s=A(r.project_name)||"dotnet-api",c$1=j(r.root_namespace||`RapidKit.${b(s)}`,"RapidKit.App"),a=r.target_framework&&y(r.target_framework)?r.target_framework:C,g=r.port&&/^\d+$/.test(r.port)?r.port:R,o={project_name:s,root_namespace:c$1,description:S(r.description||"","Production-ready ASP.NET Core Web API scaffolded by RapidKit."),target_framework:a,app_version:r.app_version||"0.1.0",port:g,skipGit:r.skipGit??false},f=b$1(`Creating ASP.NET Core Web API project ${s}`).start();await promises.mkdir(e,{recursive:true}),await c(n.join(e,`${s}.sln`),G(o)),await c(n.join(e,"src",`${s}.csproj`),D(o)),await c(n.join(e,"src","Program.cs"),I(o)),await c(n.join(e,"src","Application","ApplicationInfoOptions.cs"),P(o)),await c(n.join(e,"src","Application","ApplicationServiceRegistration.cs"),T(o)),await c(n.join(e,"src","Application","SystemInfoService.cs"),k(o)),await c(n.join(e,"src","Infrastructure","InfrastructureServiceRegistration.cs"),x(o)),await c(n.join(e,"src","Presentation","PresentationServiceRegistration.cs"),w(o)),await c(n.join(e,"src","Presentation","SystemEndpoints.cs"),v(o)),await c(n.join(e,"src","appsettings.json"),d(o)),await c(n.join(e,"src","appsettings.Development.json"),d(o)),await c(n.join(e,"tests",`${s}.Tests.csproj`),$(o)),await c(n.join(e,"tests","RuntimeSmokeTests.cs"),W(o)),await c(n.join(e,"Dockerfile"),N(o)),await c(n.join(e,"docker-compose.yml"),h(o)),await c(n.join(e,"Makefile"),V(o)),await c(n.join(e,"rapidkit"),U(o)),await c(n.join(e,"rapidkit.cmd"),O(o)),await c(n.join(e,".env.example"),`ASPNETCORE_ENVIRONMENT=Development
|
|
421
|
+
PORT=${o.port}
|
|
422
|
+
`),await c(n.join(e,".github","workflows","ci.yml"),M(o)),await c(n.join(e,".rapidkit","context.json"),_()),await c(n.join(e,".rapidkit","project.json"),E(o,b$2())),process.platform!=="win32"&&await promises.chmod(n.join(e,"rapidkit"),493),await F(e,o.skipGit),f.succeed("ASP.NET Core Web API project ready"),await L(e),console.log(i.green(`
|
|
355
423
|
\u2705 ASP.NET Core project ready!
|
|
356
|
-
`)),console.log(
|
|
357
|
-
Endpoints: /health/live, /health/ready, /api/v1/system/info, /docs`)),console.log(
|
|
424
|
+
`)),console.log(i.gray("Next steps:")),console.log(i.white(` cd ${s}`)),console.log(i.white(" ./rapidkit init")),console.log(i.white(" ./rapidkit dev")),console.log(i.gray(`
|
|
425
|
+
Endpoints: /health/live, /health/ready, /api/v1/system/info, /docs`)),console.log(i.gray("\u2139 RapidKit modules are not available for .NET projects yet."));}export{R as DEFAULT_DOTNET_PORT,C as DEFAULT_DOTNET_TARGET_FRAMEWORK,Q as generateDotnetWebApiCleanKit};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c,b as b$1,d as d$1,e,f,a}from'./chunk-
|
|
1
|
+
import {c,b as b$1,d as d$1,e,f,a}from'./chunk-3Q7264EJ.js';import {b}from'./chunk-AC6KIKII.js';import {promises}from'fs';import d from'path';import o from'chalk';import S from'ora';import {execa}from'execa';function _(e){return `package main
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
4
|
"fmt"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c,b as b$2,d as d$1,e,f,a}from'./chunk-
|
|
1
|
+
import {c,b as b$2,d as d$1,e,f,a}from'./chunk-3Q7264EJ.js';import {b as b$1}from'./chunk-AC6KIKII.js';import {promises}from'fs';import d from'path';import o from'chalk';import _ from'ora';import {execa}from'execa';function T(e){return `package main
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
4
|
"context"
|