@kithinji/pod 1.0.1 → 1.0.3

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/dist/main.js CHANGED
@@ -3925,7 +3925,16 @@ function addNew(name) {
3925
3925
  dirs: [
3926
3926
  {
3927
3927
  name: "src",
3928
- files: [{ name: "main.ts", content: genMainTs() }]
3928
+ files: [{ name: "main.ts", content: genMainTs() }],
3929
+ dirs: [
3930
+ {
3931
+ name: "client",
3932
+ files: [
3933
+ { name: "index.html", content: genIndexHtml(name) },
3934
+ { name: "client.ts", content: genClientTs() }
3935
+ ]
3936
+ }
3937
+ ]
3929
3938
  }
3930
3939
  ]
3931
3940
  };
@@ -3950,7 +3959,8 @@ function genPackageJson(name) {
3950
3959
  dependencies: {
3951
3960
  "reflect-metadata": "latest",
3952
3961
  zod: "^4.2.1",
3953
- "@kithinji/orca": "latest"
3962
+ "@kithinji/orca": "latest",
3963
+ "@kithinji/arcane": "latest"
3954
3964
  },
3955
3965
  devDependencies: {
3956
3966
  "@types/node": "^20.19.27",
@@ -4011,6 +4021,57 @@ function genEnv() {
4011
4021
  return `NODE_ENV=development
4012
4022
  `;
4013
4023
  }
4024
+ function genIndexHtml(name) {
4025
+ return `<!DOCTYPE html>
4026
+ <html lang="en">
4027
+ <head>
4028
+ <meta charset="UTF-8" />
4029
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4030
+ <title>${name} app</title>
4031
+ <link rel="stylesheet" href="index.css" />
4032
+ </head>
4033
+ <body>
4034
+ <div id="root"></div>
4035
+ <script type="module" src="/src/client/client.js"></script>
4036
+ </body>
4037
+ </html>
4038
+ `;
4039
+ }
4040
+ function genClientTs() {
4041
+ return `"use interactive";
4042
+
4043
+ import {
4044
+ Module,
4045
+ BrowserFactory,
4046
+ Component,
4047
+ RouterModule,
4048
+ RouterOutlet,
4049
+ HttpClientModule,
4050
+ } from "@kithinji/orca";
4051
+
4052
+ @Component({
4053
+ deps: [RouterOutlet],
4054
+ })
4055
+ class AppComponent {
4056
+ build() {
4057
+ return <RouterOutlet />;
4058
+ }
4059
+ }
4060
+
4061
+ @Module({
4062
+ imports: [RouterModule.forRoot(), HttpClientModule],
4063
+ declarations: [AppComponent],
4064
+ bootstrap: AppComponent,
4065
+ })
4066
+ class AppModule {}
4067
+
4068
+ export function bootstrap() {
4069
+ BrowserFactory.create(AppModule, document.getElementById("root")!);
4070
+ }
4071
+
4072
+ bootstrap();
4073
+ `;
4074
+ }
4014
4075
  function genMainTs() {
4015
4076
  return `import { NodeFactory } from "@kithinji/orca";
4016
4077
  import { AppModule } from "./app/app.module";