create-vidra-app 0.4.0 → 0.5.1
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 +24 -31
- package/dist/index.js +46 -85
- package/package.json +13 -10
- package/templates/react-vite/README.md +22 -74
- package/templates/react-vite/_gitignore +2 -0
- package/templates/react-vite/package.json +2 -1
- package/templates/react-vite/src/{{projectName}}.Host/MainPage.cs +13 -2
- package/templates/react-vite/src/{{projectName}}.Host/MauiProgram.cs +17 -13
- package/templates/react-vite/src/{{projectName}}.Host/Platforms/MacCatalyst/Program.cs +8 -11
- package/templates/react-vite/src/{{projectName}}.Host/Platforms/Windows/Program.cs +8 -12
- package/templates/react-vite/src/{{projectName}}.Host/{{projectName}}.Host.csproj +19 -4
- package/templates/react-vite/ui/package.json +3 -3
- package/templates/react-vite/ui/src/generated/vidra-access-policy.ts +6 -0
- package/templates/react-vite/ui/src/main.tsx +1 -0
- package/templates/react-vite/ui/vite.config.ts +4 -1
- package/templates/react-vite/vidra.config.ts +33 -0
- package/bin/vidra.mjs +0 -2
- package/dist/cli.js +0 -4320
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
2
2
|
|
|
3
3
|
<PropertyGroup>
|
|
4
|
+
<!-- Pinned, not inferred: a Release Catalyst publish is universal
|
|
5
|
+
(maccatalyst-x64 + maccatalyst-arm64) while a Debug build takes
|
|
6
|
+
the host RID alone, and both share one obj/. Whichever restored
|
|
7
|
+
last owns project.assets.json, so a publish that no-ops its
|
|
8
|
+
restore can read an assets file with no x64 target and fail with
|
|
9
|
+
NETSDK1047. Naming the set here makes every restore write both. -->
|
|
10
|
+
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers>
|
|
4
11
|
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('osx'))">net10.0-maccatalyst</TargetFrameworks>
|
|
5
12
|
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net10.0-windows10.0.19041.0</TargetFrameworks>
|
|
6
13
|
<ValidateXcodeVersion>false</ValidateXcodeVersion>
|
|
@@ -62,9 +69,9 @@
|
|
|
62
69
|
argument and expects it to do that work and exit without ever showing a
|
|
63
70
|
window, and `vpk pack` inspects the assembly and warns when it finds the
|
|
64
71
|
call outside the entry point. Entry-point shape is the one thing a package
|
|
65
|
-
reference cannot retrofit, so every Vidra app ships with it
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
reference cannot retrofit, so every Vidra app ships with it, live, from the
|
|
73
|
+
first scaffold. Mac Catalyst already has a real `Main`, so it needs no
|
|
74
|
+
equivalent switch.
|
|
68
75
|
-->
|
|
69
76
|
<DefineConstants Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
|
|
70
77
|
|
|
@@ -88,8 +95,16 @@
|
|
|
88
95
|
|
|
89
96
|
<ItemGroup>
|
|
90
97
|
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
|
|
91
|
-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="
|
|
98
|
+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.10" />
|
|
92
99
|
<PackageReference Include="Vidra.Hosting.Maui" Version="{{vidraVersion}}" />
|
|
100
|
+
<!--
|
|
101
|
+
Whole-app updates, via Velopack. Referenced from the first scaffold and
|
|
102
|
+
inert until vidra.config.ts names a native feed: ~280 KB of managed code
|
|
103
|
+
against a self-contained .NET + MAUI app, which is the price of never
|
|
104
|
+
having to retrofit an entry point, a package reference and a builder call
|
|
105
|
+
into an app that has already shipped.
|
|
106
|
+
-->
|
|
107
|
+
<PackageReference Include="Vidra.Updates.Native" Version="{{vidraVersion}}" />
|
|
93
108
|
</ItemGroup>
|
|
94
109
|
|
|
95
110
|
</Project>
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/react": "^19.0.0",
|
|
18
18
|
"@types/react-dom": "^19.0.0",
|
|
19
|
-
"@vitejs/plugin-react": "^
|
|
20
|
-
"typescript": "^
|
|
21
|
-
"vite": "^
|
|
19
|
+
"@vitejs/plugin-react": "^6.0.5",
|
|
20
|
+
"typescript": "^7.0.2",
|
|
21
|
+
"vite": "^8.2.1"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -25,8 +25,11 @@ export default defineConfig({
|
|
|
25
25
|
emptyOutDir: true,
|
|
26
26
|
rollupOptions: {
|
|
27
27
|
output: {
|
|
28
|
+
// `format: "iife"` already implies no code splitting, and since Vite 8
|
|
29
|
+
// saying so twice is a warning on every app build: "inlineDynamicImports
|
|
30
|
+
// option is ignored because codeSplitting: false is set". Output is
|
|
31
|
+
// byte-identical without it — still one file, still no import map.
|
|
28
32
|
format: "iife",
|
|
29
|
-
inlineDynamicImports: true,
|
|
30
33
|
},
|
|
31
34
|
},
|
|
32
35
|
},
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineConfig,
|
|
3
|
+
events as builtInEvents,
|
|
4
|
+
native as builtInNative,
|
|
5
|
+
} from "@vidra-dev/sdk/config";
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
bridge: {
|
|
9
|
+
allow: [
|
|
10
|
+
builtInNative.app.getInfo,
|
|
11
|
+
builtInNative.appWindow.center,
|
|
12
|
+
builtInNative.appWindow.configure,
|
|
13
|
+
builtInNative.appWindow.getCurrent,
|
|
14
|
+
builtInNative.appWindow.getSupport,
|
|
15
|
+
builtInNative.appWindow.maximize,
|
|
16
|
+
builtInNative.appWindow.minimize,
|
|
17
|
+
builtInNative.appWindow.restore,
|
|
18
|
+
builtInNative.appWindow.setTitle,
|
|
19
|
+
builtInNative.browser.open,
|
|
20
|
+
builtInNative.clipboard.getText,
|
|
21
|
+
builtInNative.notifications.requestPermission,
|
|
22
|
+
builtInNative.notifications.show,
|
|
23
|
+
],
|
|
24
|
+
events: [
|
|
25
|
+
builtInEvents.appWindow.resized,
|
|
26
|
+
builtInEvents.appWindow.stateChanged,
|
|
27
|
+
builtInEvents.runtime.hotReloaded,
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
updates: {
|
|
31
|
+
feed: "",
|
|
32
|
+
},
|
|
33
|
+
});
|
package/bin/vidra.mjs
DELETED