Skip to content

Commit ef9369e

Browse files
committed
fix instructuon for manifest upload
1 parent 2a56e66 commit ef9369e

File tree

4 files changed

+24
-314
lines changed

4 files changed

+24
-314
lines changed

packages/app/src/main.tsx

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import ProfilePage from "./pages/profile.tsx";
2323
import ProjectBase from "./pages/projects/project/base.tsx";
2424
import ProjectIndex from "./pages/projects/project/index.tsx";
2525
import ProjectManifests from "./pages/projects/project/manifests/index.tsx";
26-
import ProjectManifestsAdd from "./pages/projects/project/manifests/add.tsx.tsx";
2726
import ProjectManifestsCliSetup from "./pages/projects/project/manifests/cliSetup.tsx";
2827
import ProjectManifest from "./pages/projects/project/manifests/manifest.tsx";
2928
import ProjectSettings from "./pages/projects/project/settings.tsx";
@@ -145,13 +144,13 @@ const router = createBrowserRouter([
145144
} satisfies BreadcrumbHandle,
146145
children: [
147146
{
148-
path: "manifests/add",
149-
Component: ProjectManifestsAdd,
147+
path: "manifests/cliSetup",
148+
Component: ProjectManifestsCliSetup,
150149
handle: {
151150
breadcrumb: {
152-
title: "Add Manifest",
151+
title: "CLI Setup",
153152
href: (params) =>
154-
`/projects/${params.projectId}/manifests/add`,
153+
`/projects/${params.projectId}/manifests/add/cli`,
155154
},
156155
} satisfies BreadcrumbHandle,
157156
},
@@ -162,31 +161,14 @@ const router = createBrowserRouter([
162161
{ index: true, element: <Navigate to="manifests" replace /> },
163162
{
164163
path: "manifests",
164+
Component: ProjectManifests,
165165
handle: {
166166
breadcrumb: {
167167
title: "Manifests",
168168
href: (params) =>
169169
`/projects/${params.projectId}/manifests`,
170170
},
171171
} satisfies BreadcrumbHandle,
172-
children: [
173-
{
174-
index: true,
175-
Component: ProjectManifests,
176-
},
177-
178-
{
179-
path: "cliSetup",
180-
Component: ProjectManifestsCliSetup,
181-
handle: {
182-
breadcrumb: {
183-
title: "CLI Setup",
184-
href: (params) =>
185-
`/projects/${params.projectId}/manifests/add/cli`,
186-
},
187-
} satisfies BreadcrumbHandle,
188-
},
189-
],
190172
},
191173
{
192174
path: "settings",

packages/app/src/pages/projects/project/manifests/add.tsx.tsx

Lines changed: 0 additions & 280 deletions
This file was deleted.

packages/app/src/pages/projects/project/manifests/cliSetup.tsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,32 @@ export default function ProjectManifestsCliSetup() {
3636
const cliCommands = [
3737
{
3838
title: "Install the CLI",
39-
command: "npm install -g @stackcore/cli",
40-
description: "Install the StackCore CLI globally on your system",
39+
command: "https://github.com/nanoapi-io/napi",
40+
description:
41+
"Follow the instructions to install napi CLI globally on your system",
4142
},
4243
{
4344
title: "Login to your account",
44-
command: "napi auth login",
45-
description: "Authenticate with your StackCore account",
45+
command: "napi login",
46+
description: "Authenticate with your nanoapi account",
47+
},
48+
{
49+
title: "Initialize your project (if not already done)",
50+
command: "napi init",
51+
description:
52+
`You will be prompted to select an existing project, select project "${context.project.name}"`,
4653
},
4754
{
4855
title: "Generate the manifest",
4956
command: "napi manifest generate",
50-
description: "Generate a manifest file with metadata",
57+
description: "This will generate a manifest and push it to your project.",
5158
},
5259
{
53-
title: "Upload with commit info (optional)",
60+
title: "Generate the manifest (in a CI/CD pipeline)",
5461
command:
55-
`napi manifest push --project-id ${context.project.id} --file ./manifest.json --commit-sha $(git rev-parse HEAD) --branch $(git branch --show-current)`,
56-
description: "Automatically include Git commit information",
62+
"napi manifest generate --branch=${{ github.ref_name }} --commit-sha=${{ github.sha }} --commit-sha-date=${{ github.event_time }}",
63+
description:
64+
"This will generate a manifest and push it to your project without prompting.",
5765
},
5866
];
5967

@@ -66,8 +74,8 @@ export default function ProjectManifestsCliSetup() {
6674
CLI Instructions
6775
</CardTitle>
6876
<CardDescription>
69-
Upload manifests programmatically using our CLI tool for{" "}
70-
{context.project.name}
77+
Upload manifests programmatically using our CLI tool for your
78+
project: {context.project.name}
7179
</CardDescription>
7280
</CardHeader>
7381
<CardContent className="space-y-4">

0 commit comments

Comments
 (0)