@squadbase/vantage-template 0.1.0 → 0.1.1-dev2.7fae7eb

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.
@@ -12,8 +12,8 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@squadbase/react": "^0.1.0",
15
- "@squadbase/vantage": "0.6.1",
16
- "@squadbase/vantage-sdk": "0.1.1",
15
+ "@squadbase/vantage": "0.6.2-dev2.777fe38",
16
+ "@squadbase/vantage-sdk": "0.1.1-dev2.78bd380",
17
17
  "date-fns": "^4.1.0",
18
18
  "lucide-react": "^0.468.0",
19
19
  "react": "^19.2.7",
@@ -3,3 +3,4 @@ version: "1"
3
3
  build:
4
4
  framework: squadbase-vantage
5
5
  runtime: node20
6
+ package_manager: bun
@@ -1,6 +1,6 @@
1
1
  import type { ComponentProps } from "react"
2
2
  import { SquadbaseProvider } from "@squadbase/react"
3
- import { Link, Outlet, useCurrentRoute, useRoutes } from "@squadbase/vantage/router"
3
+ import { Link, Outlet, useCurrentRoute, useNavigate, useRoutes } from "@squadbase/vantage/router"
4
4
  import { AppShell } from "@squadbase/vantage/components"
5
5
  import type { NavGroup } from "@squadbase/vantage/components"
6
6
 
@@ -50,6 +50,7 @@ function useNavGroups(): NavGroup[] {
50
50
  * 「Something went wrong」のままリロードするまで残る。
51
51
  */
52
52
  export default function RootLayout() {
53
+ const navigate = useNavigate()
53
54
  return (
54
55
  <SquadbaseProvider>
55
56
  <AppShell
@@ -57,6 +58,7 @@ export default function RootLayout() {
57
58
  groups={useNavGroups()}
58
59
  actions={<UserCard />}
59
60
  linkComponent={RouterLink}
61
+ onNavigate={(href) => navigate({ to: href })}
60
62
  >
61
63
  <BuildRecovery>
62
64
  <Outlet />
package/dist/index.js CHANGED
@@ -1022,27 +1022,36 @@ function initProject(options) {
1022
1022
  applyChartPreset(targetDir, options.chart);
1023
1023
  log("cyan", ` chart preset: ${options.chart}`);
1024
1024
  }
1025
+ const packageManager = isBunAvailable() ? "bun" : "npm";
1025
1026
  if (options.skipInstall) {
1026
1027
  log("green", "\nProject initialized successfully!");
1027
1028
  log("dim", "\nNext steps:");
1028
- log("dim", " npm install");
1029
- log("dim", " npm run dev");
1029
+ log("dim", ` ${packageManager} install`);
1030
+ log("dim", ` ${packageManager} run dev`);
1030
1031
  return;
1031
1032
  }
1032
- log("green", "\nInstalling dependencies...");
1033
- const install = spawnSync("npm", ["install"], {
1033
+ log("green", `
1034
+ Installing dependencies with ${packageManager}...`);
1035
+ const install = spawnSync(packageManager, ["install"], {
1034
1036
  cwd: targetDir,
1035
1037
  stdio: "inherit",
1036
1038
  shell: process.platform === "win32"
1037
1039
  });
1038
1040
  if (install.error || install.status !== 0) {
1039
1041
  log("red", "\nDependency installation failed.");
1040
- log("yellow", "Run 'npm install' manually in the project directory.");
1042
+ log("yellow", `Run '${packageManager} install' manually in the project directory.`);
1041
1043
  process.exit(1);
1042
1044
  }
1043
1045
  log("green", "\nProject initialized successfully!");
1044
1046
  log("dim", "\nNext steps:");
1045
- log("dim", " npm run dev");
1047
+ log("dim", ` ${packageManager} run dev`);
1048
+ }
1049
+ function isBunAvailable() {
1050
+ const probe = spawnSync("bun", ["--version"], {
1051
+ stdio: "ignore",
1052
+ shell: process.platform === "win32"
1053
+ });
1054
+ return !probe.error && probe.status === 0;
1046
1055
  }
1047
1056
 
1048
1057
  // src/commands/list.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squadbase/vantage-template",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-dev2.7fae7eb",
4
4
  "description": "CLI tool for initializing and customizing Squadbase Vantage projects.",
5
5
  "keywords": [
6
6
  "squadbase",
@@ -42,7 +42,7 @@
42
42
  "type-check": "tsc",
43
43
  "agents": "node scripts/build-agents.cjs",
44
44
  "agents:check": "node scripts/build-agents.cjs --check",
45
- "template:install": "npm --prefix template ci",
45
+ "template:install": "bun install --cwd template --frozen-lockfile",
46
46
  "template:build": "npm --prefix template run build",
47
47
  "prepublishOnly": "npm run agents:check && npm run build",
48
48
  "release": "npm publish --@squadbase:registry=https://registry.npmjs.org",