@shepai/cli 1.6.1 → 1.6.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/src/domain/value-objects/index.d.ts +3 -0
- package/dist/src/domain/value-objects/index.d.ts.map +1 -0
- package/dist/src/domain/value-objects/index.js +1 -0
- package/dist/src/domain/value-objects/version-info.d.ts +17 -0
- package/dist/src/domain/value-objects/version-info.d.ts.map +1 -0
- package/dist/src/domain/value-objects/version-info.js +12 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/infrastructure/services/version.service.d.ts +8 -8
- package/dist/src/infrastructure/services/version.service.d.ts.map +1 -1
- package/dist/src/infrastructure/services/version.service.js +11 -6
- package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/ui.command.js +4 -0
- package/dist/src/presentation/cli/ui/index.d.ts +1 -1
- package/dist/src/presentation/cli/ui/index.js +1 -1
- package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts +1 -1
- package/dist/src/presentation/tui/prompts/agent-select.prompt.js +1 -1
- package/dist/src/presentation/tui/prompts/auth-method.prompt.d.ts +1 -1
- package/dist/src/presentation/tui/prompts/auth-method.prompt.js +1 -1
- package/dist/src/presentation/tui/wizards/agent-config.wizard.d.ts +1 -1
- package/dist/src/presentation/tui/wizards/agent-config.wizard.js +1 -1
- package/dist/src/presentation/web/app/page.js +1 -1
- package/dist/src/presentation/web/app/version/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/version/page.js +6 -14
- package/dist/src/presentation/web/app/version/version-page-client.d.ts +8 -0
- package/dist/src/presentation/web/app/version/version-page-client.d.ts.map +1 -0
- package/dist/src/presentation/web/app/version/version-page-client.js +13 -0
- package/dist/src/presentation/web/components/features/theme-toggle/theme-toggle.js +2 -2
- package/dist/src/presentation/web/components/ui/accordion.js +1 -1
- package/dist/src/presentation/web/components/ui/alert.js +1 -1
- package/dist/src/presentation/web/components/ui/badge.js +1 -1
- package/dist/src/presentation/web/components/ui/button.js +1 -1
- package/dist/src/presentation/web/components/ui/card.js +1 -1
- package/dist/src/presentation/web/components/ui/dialog.js +1 -1
- package/dist/src/presentation/web/components/ui/input.js +1 -1
- package/dist/src/presentation/web/components/ui/label.js +1 -1
- package/dist/src/presentation/web/components/ui/popover.js +1 -1
- package/dist/src/presentation/web/components/ui/select.js +1 -1
- package/dist/src/presentation/web/components/ui/tabs.js +1 -1
- package/dist/src/presentation/web/hooks/useTheme.d.ts +1 -1
- package/dist/src/presentation/web/hooks/useTheme.js +1 -1
- package/dist/src/presentation/web/lib/version.d.ts +34 -0
- package/dist/src/presentation/web/lib/version.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/version.js +33 -0
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +31 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/.tsbuildinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +5 -1
- package/web/.next/required-server-files.json +5 -1
- package/web/.next/server/app/_global-error/page.js +1 -1
- package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page.js +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found.html +2 -2
- package/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/index.html +2 -2
- package/web/.next/server/app/index.rsc +1 -1
- package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/page.js +1 -1
- package/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page.js +2 -2
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version.html +2 -2
- package/web/.next/server/app/version.rsc +10 -13
- package/web/.next/server/app/version.segments/_full.segment.rsc +10 -13
- package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +5 -8
- package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__5aff3b12._.js → [root-of-the-server]__2328b471._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__5aff3b12._.js.map → [root-of-the-server]__2328b471._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__d81095d0._.js → [root-of-the-server]__3acee9dd._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3acee9dd._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ccea5183._.js +3 -0
- package/web/.next/server/chunks/ssr/_ccea5183._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_version-page-client_tsx_bd5ab0cf._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_version-page-client_tsx_bd5ab0cf._.js.map +1 -0
- package/web/.next/server/pages/404.html +2 -2
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/{52a5aeb86329ee2e.js → c004e386ce1b8d26.js} +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/web/next.config.ts +33 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d81095d0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e519e92f._.js +0 -3
- package/web/.next/server/chunks/ssr/_e519e92f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_page_tsx_1bab7370._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_page_tsx_1bab7370._.js.map +0 -1
- /package/web/.next/static/{tXmFlRBlP8T8QaqOrcoHM → pUS7zNbHnxONcg65QzPqB}/_buildManifest.js +0 -0
- /package/web/.next/static/{tXmFlRBlP8T8QaqOrcoHM → pUS7zNbHnxONcg65QzPqB}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{tXmFlRBlP8T8QaqOrcoHM → pUS7zNbHnxONcg65QzPqB}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/value-objects/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DEFAULT_VERSION_INFO } from './version-info.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Value Object
|
|
3
|
+
*
|
|
4
|
+
* Represents package version metadata shared across presentation layers.
|
|
5
|
+
* Used by both CLI and Web UI to display consistent version information.
|
|
6
|
+
*/
|
|
7
|
+
export interface VersionInfo {
|
|
8
|
+
/** Package version (e.g., "1.6.1") */
|
|
9
|
+
version: string;
|
|
10
|
+
/** Package name (e.g., "@shepai/cli") */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Package description */
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
/** Default version info when package.json cannot be read */
|
|
16
|
+
export declare const DEFAULT_VERSION_INFO: VersionInfo;
|
|
17
|
+
//# sourceMappingURL=version-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../../../src/domain/value-objects/version-info.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,EAAE,WAIlC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Value Object
|
|
3
|
+
*
|
|
4
|
+
* Represents package version metadata shared across presentation layers.
|
|
5
|
+
* Used by both CLI and Web UI to display consistent version information.
|
|
6
|
+
*/
|
|
7
|
+
/** Default version info when package.json cannot be read */
|
|
8
|
+
export const DEFAULT_VERSION_INFO = {
|
|
9
|
+
version: 'unknown',
|
|
10
|
+
name: '@shepai/cli',
|
|
11
|
+
description: 'Autonomous AI Native SDLC Platform',
|
|
12
|
+
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Automate the development cycle from idea to deploy.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type { VersionInfo } from './domain/value-objects/version-info.js';
|
|
7
|
+
export { DEFAULT_VERSION_INFO } from './domain/value-objects/version-info.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -4,14 +4,8 @@
|
|
|
4
4
|
* Infrastructure service that reads version information from package.json.
|
|
5
5
|
* Follows Clean Architecture: Infrastructure layer implements data access.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
version: string;
|
|
10
|
-
/** Package name (e.g., "@shepai/cli") */
|
|
11
|
-
name: string;
|
|
12
|
-
/** Package description */
|
|
13
|
-
description: string;
|
|
14
|
-
}
|
|
7
|
+
import type { VersionInfo } from '../../domain/value-objects/version-info.js';
|
|
8
|
+
export type { VersionInfo } from '../../domain/value-objects/version-info.js';
|
|
15
9
|
/**
|
|
16
10
|
* Service for reading version information from package.json
|
|
17
11
|
*/
|
|
@@ -24,4 +18,10 @@ export declare class VersionService {
|
|
|
24
18
|
*/
|
|
25
19
|
getVersion(): VersionInfo;
|
|
26
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Set version info as NEXT_PUBLIC environment variables.
|
|
23
|
+
* Must be called BEFORE starting the Next.js web server
|
|
24
|
+
* so the values are available to the web UI.
|
|
25
|
+
*/
|
|
26
|
+
export declare function setVersionEnvVars(info: VersionInfo): void;
|
|
27
27
|
//# sourceMappingURL=version.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAG9E,YAAY,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAuB9E;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;;IAM1C,OAAO,CAAC,eAAe;IAqCvB;;OAEG;IACH,UAAU,IAAI,WAAW;CAG1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAIzD"}
|
|
@@ -7,12 +7,7 @@
|
|
|
7
7
|
import { existsSync, readFileSync } from 'node:fs';
|
|
8
8
|
import { dirname, join } from 'node:path';
|
|
9
9
|
import { fileURLToPath } from 'node:url';
|
|
10
|
-
|
|
11
|
-
const DEFAULT_VERSION_INFO = {
|
|
12
|
-
version: 'unknown',
|
|
13
|
-
name: '@shepai/cli',
|
|
14
|
-
description: 'Autonomous AI Native SDLC Platform',
|
|
15
|
-
};
|
|
10
|
+
import { DEFAULT_VERSION_INFO } from '../../domain/value-objects/version-info.js';
|
|
16
11
|
/**
|
|
17
12
|
* Find package.json by traversing up from a starting directory.
|
|
18
13
|
* Works in both development (src/) and production (dist/) environments.
|
|
@@ -78,3 +73,13 @@ export class VersionService {
|
|
|
78
73
|
return this.versionInfo;
|
|
79
74
|
}
|
|
80
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Set version info as NEXT_PUBLIC environment variables.
|
|
78
|
+
* Must be called BEFORE starting the Next.js web server
|
|
79
|
+
* so the values are available to the web UI.
|
|
80
|
+
*/
|
|
81
|
+
export function setVersionEnvVars(info) {
|
|
82
|
+
process.env.NEXT_PUBLIC_SHEP_VERSION = info.version;
|
|
83
|
+
process.env.NEXT_PUBLIC_SHEP_PACKAGE_NAME = info.name;
|
|
84
|
+
process.env.NEXT_PUBLIC_SHEP_DESCRIPTION = info.description;
|
|
85
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/ui.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ui.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/ui.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAoB1D;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAqDzC"}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { Command, InvalidArgumentError } from 'commander';
|
|
18
18
|
import { findAvailablePort, DEFAULT_PORT } from '../../../infrastructure/services/port.service.js';
|
|
19
|
+
import { VersionService, setVersionEnvVars, } from '../../../infrastructure/services/version.service.js';
|
|
19
20
|
import { WebServerService, resolveWebDir, } from '../../../infrastructure/services/web-server.service.js';
|
|
20
21
|
import { colors, fmt, messages } from '../ui/index.js';
|
|
21
22
|
function parsePort(value) {
|
|
@@ -41,6 +42,9 @@ Examples:
|
|
|
41
42
|
const startPort = options.port ?? DEFAULT_PORT;
|
|
42
43
|
const port = await findAvailablePort(startPort);
|
|
43
44
|
const { dir, dev } = resolveWebDir();
|
|
45
|
+
// Set version env vars so Next.js web UI can read them
|
|
46
|
+
const versionService = new VersionService();
|
|
47
|
+
setVersionEnvVars(versionService.getVersion());
|
|
44
48
|
messages.newline();
|
|
45
49
|
console.log(fmt.heading('Shep Web UI'));
|
|
46
50
|
console.log(colors.muted(`Starting web server${dev ? ' (dev mode)' : ''}...`));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* All CLI commands should use these utilities for visual consistency.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
* import { colors, symbols, fmt, messages } from '
|
|
8
|
+
* import { colors, symbols, fmt, messages } from '../../../presentation/cli/ui';
|
|
9
9
|
*
|
|
10
10
|
* messages.success('Repository initialized');
|
|
11
11
|
* console.log(fmt.heading('Shep AI CLI'));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* All CLI commands should use these utilities for visual consistency.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
* import { colors, symbols, fmt, messages } from '
|
|
8
|
+
* import { colors, symbols, fmt, messages } from '../../../presentation/cli/ui';
|
|
9
9
|
*
|
|
10
10
|
* messages.success('Repository initialized');
|
|
11
11
|
* console.log(fmt.heading('Shep AI CLI'));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Configuration for the @inquirer/select prompt that lets users
|
|
5
5
|
* choose their AI coding agent.
|
|
6
6
|
*/
|
|
7
|
-
import { AgentType } from '
|
|
7
|
+
import { AgentType } from '../../../domain/generated/output.js';
|
|
8
8
|
/**
|
|
9
9
|
* Creates the @inquirer/select configuration for selecting an AI coding agent.
|
|
10
10
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Configuration for the @inquirer/select prompt that lets users
|
|
5
5
|
* choose their AI coding agent.
|
|
6
6
|
*/
|
|
7
|
-
import { AgentType } from '
|
|
7
|
+
import { AgentType } from '../../../domain/generated/output.js';
|
|
8
8
|
import { shepTheme } from '../themes/shep.theme.js';
|
|
9
9
|
/**
|
|
10
10
|
* Creates the @inquirer/select configuration for selecting an AI coding agent.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Configuration for the @inquirer/select prompt that lets users
|
|
5
5
|
* choose their authentication method for the selected agent.
|
|
6
6
|
*/
|
|
7
|
-
import { AgentAuthMethod } from '
|
|
7
|
+
import { AgentAuthMethod } from '../../../domain/generated/output.js';
|
|
8
8
|
/**
|
|
9
9
|
* Creates the @inquirer/select configuration for selecting an authentication method.
|
|
10
10
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Configuration for the @inquirer/select prompt that lets users
|
|
5
5
|
* choose their authentication method for the selected agent.
|
|
6
6
|
*/
|
|
7
|
-
import { AgentAuthMethod } from '
|
|
7
|
+
import { AgentAuthMethod } from '../../../domain/generated/output.js';
|
|
8
8
|
import { shepTheme } from '../themes/shep.theme.js';
|
|
9
9
|
/**
|
|
10
10
|
* Creates the @inquirer/select configuration for selecting an authentication method.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Interactive TUI wizard that guides users through selecting
|
|
5
5
|
* an AI coding agent and configuring authentication.
|
|
6
6
|
*/
|
|
7
|
-
import { AgentAuthMethod, type AgentType } from '
|
|
7
|
+
import { AgentAuthMethod, type AgentType } from '../../../domain/generated/output.js';
|
|
8
8
|
/**
|
|
9
9
|
* Result returned by the agent configuration wizard.
|
|
10
10
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* an AI coding agent and configuring authentication.
|
|
6
6
|
*/
|
|
7
7
|
import { select, password } from '@inquirer/prompts';
|
|
8
|
-
import { AgentAuthMethod } from '
|
|
8
|
+
import { AgentAuthMethod } from '../../../domain/generated/output.js';
|
|
9
9
|
import { createAgentSelectConfig } from '../prompts/agent-select.prompt.js';
|
|
10
10
|
import { createAuthMethodConfig } from '../prompts/auth-method.prompt.js';
|
|
11
11
|
import { shepTheme } from '../themes/shep.theme.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'next/link';
|
|
3
|
-
import { Button } from '
|
|
3
|
+
import { Button } from '../components/ui/button';
|
|
4
4
|
export default function HomePage() {
|
|
5
5
|
return (_jsx("main", { className: "flex min-h-screen flex-col items-center justify-center p-4", children: _jsxs("div", { className: "text-center", children: [_jsx("h1", { className: "text-4xl font-bold tracking-tight", children: "Shep AI" }), _jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: "Autonomous AI Native SDLC Platform" }), _jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: "Web UI Component Library" }), _jsx("div", { className: "mt-6", children: _jsx(Button, { asChild: true, variant: "outline", children: _jsx(Link, { href: "/version", children: "View Version" }) }) })] }) }));
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/version/page.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/version/page.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,WAAW,4CAKlC"}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
|
5
|
-
import { Badge } from '@/components/ui/badge';
|
|
6
|
-
import { Button } from '@/components/ui/button';
|
|
7
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
|
8
|
-
const VERSION = '1.2.0';
|
|
9
|
-
const PACKAGE_NAME = '@shepai/cli';
|
|
10
|
-
const DESCRIPTION = 'Autonomous AI Native SDLC Platform';
|
|
11
|
-
function InfoRow({ label, value, badge, badgeVariant = 'secondary' }) {
|
|
12
|
-
return (_jsxs("div", { className: "flex items-center justify-between py-2", children: [_jsx("span", { className: "text-muted-foreground text-sm", children: label }), badge ? (_jsx(Badge, { variant: badgeVariant, children: value })) : (_jsx("span", { className: "font-mono text-sm", children: value }))] }));
|
|
13
|
-
}
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getVersionInfo, getSystemInfo } from '../../lib/version';
|
|
3
|
+
import VersionPageClient from './version-page-client';
|
|
14
4
|
export default function VersionPage() {
|
|
15
|
-
|
|
5
|
+
const versionInfo = getVersionInfo();
|
|
6
|
+
const systemInfo = getSystemInfo();
|
|
7
|
+
return _jsx(VersionPageClient, { versionInfo: versionInfo, systemInfo: systemInfo });
|
|
16
8
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VersionInfo, SystemInfo } from '../../lib/version';
|
|
2
|
+
interface VersionPageClientProps {
|
|
3
|
+
versionInfo: VersionInfo;
|
|
4
|
+
systemInfo: SystemInfo;
|
|
5
|
+
}
|
|
6
|
+
export default function VersionPageClient({ versionInfo, systemInfo }: VersionPageClientProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=version-page-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-page-client.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/version/version-page-client.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAsB7D,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,sBAAsB,2CAsG5F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../components/ui/card';
|
|
5
|
+
import { Badge } from '../../components/ui/badge';
|
|
6
|
+
import { Button } from '../../components/ui/button';
|
|
7
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../components/ui/tabs';
|
|
8
|
+
function InfoRow({ label, value, badge, badgeVariant = 'secondary' }) {
|
|
9
|
+
return (_jsxs("div", { className: "flex items-center justify-between py-2", children: [_jsx("span", { className: "text-muted-foreground text-sm", children: label }), badge ? (_jsx(Badge, { variant: badgeVariant, children: value })) : (_jsx("span", { className: "font-mono text-sm", children: value }))] }));
|
|
10
|
+
}
|
|
11
|
+
export default function VersionPageClient({ versionInfo, systemInfo }) {
|
|
12
|
+
return (_jsx("main", { className: "flex min-h-screen flex-col items-center justify-center p-4", children: _jsxs("div", { className: "w-full max-w-2xl space-y-6", children: [_jsxs("div", { className: "text-center", children: [_jsx("h1", { className: "text-3xl font-bold tracking-tight", children: versionInfo.name }), _jsx("p", { className: "text-muted-foreground mt-2", children: versionInfo.description }), _jsx("div", { className: "mt-4", children: _jsxs(Badge, { variant: "default", "data-testid": "version-badge", children: ["v", versionInfo.version] }) })] }), _jsxs(Tabs, { defaultValue: "overview", className: "w-full", children: [_jsxs(TabsList, { className: "grid w-full grid-cols-3", children: [_jsx(TabsTrigger, { value: "overview", children: "Overview" }), _jsx(TabsTrigger, { value: "system", children: "System" }), _jsx(TabsTrigger, { value: "features", children: "Features" })] }), _jsx(TabsContent, { value: "overview", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Package Information" }), _jsx(CardDescription, { children: "Details about the Shep AI CLI package" })] }), _jsxs(CardContent, { className: "space-y-1", children: [_jsx(InfoRow, { label: "Package", value: versionInfo.name }), _jsx(InfoRow, { label: "Version", value: `v${versionInfo.version}`, badge: true, badgeVariant: "default" }), _jsx(InfoRow, { label: "License", value: "MIT", badge: true, badgeVariant: "outline" }), _jsx(InfoRow, { label: "Author", value: "Shep AI" })] })] }) }), _jsx(TabsContent, { value: "system", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "System Information" }), _jsx(CardDescription, { children: "Runtime environment details" })] }), _jsxs(CardContent, { className: "space-y-1", children: [_jsx(InfoRow, { label: "Node.js", value: systemInfo.nodeVersion, badge: true, badgeVariant: "secondary" }), _jsx(InfoRow, { label: "Platform", value: `${systemInfo.platform} ${systemInfo.arch}` })] })] }) }), _jsx(TabsContent, { value: "features", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Key Features" }), _jsx(CardDescription, { children: "What Shep AI can do for you" })] }), _jsx(CardContent, { children: _jsxs("ul", { className: "space-y-2 text-sm", children: [_jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "AI" }), _jsx("span", { children: "Autonomous code generation" })] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "SDLC" }), _jsx("span", { children: "Full development lifecycle automation" })] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "CLI" }), _jsx("span", { children: "Powerful command-line interface" })] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "Web" }), _jsx("span", { children: "Modern web UI dashboard" })] })] }) })] }) })] }), _jsxs("div", { className: "flex justify-center gap-4", children: [_jsx(Button, { asChild: true, variant: "outline", children: _jsx(Link, { href: "/", children: "Back to Home" }) }), _jsx(Button, { asChild: true, children: _jsx("a", { href: "https://github.com/shep-ai/cli", target: "_blank", rel: "noopener noreferrer", children: "View on GitHub" }) })] })] }) }));
|
|
13
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Moon, Sun } from 'lucide-react';
|
|
4
|
-
import { Button } from '
|
|
5
|
-
import { useTheme } from '
|
|
4
|
+
import { Button } from '../../ui/button';
|
|
5
|
+
import { useTheme } from '../../../hooks/useTheme';
|
|
6
6
|
export function ThemeToggle() {
|
|
7
7
|
const { theme, resolvedTheme, setTheme } = useTheme();
|
|
8
8
|
const toggleTheme = () => {
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Accordion as AccordionPrimitive } from 'radix-ui';
|
|
5
5
|
import { ChevronDown } from 'lucide-react';
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
7
|
const Accordion = AccordionPrimitive.Root;
|
|
8
8
|
const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: cn('border-b', className), ...props })));
|
|
9
9
|
AccordionItem.displayName = 'AccordionItem';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { cn } from '
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
5
|
const alertVariants = cva('relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7', {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
4
|
const badgeVariants = cva('inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', {
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Slot } from 'radix-ui';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import { cn } from '
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
6
|
const buttonVariants = cva('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
4
|
const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('bg-card text-card-foreground rounded-xl border shadow', className), ...props })));
|
|
5
5
|
Card.displayName = 'Card';
|
|
6
6
|
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex flex-col space-y-1.5 p-6', className), ...props })));
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
5
5
|
import { X } from 'lucide-react';
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
7
|
const Dialog = DialogPrimitive.Root;
|
|
8
8
|
const DialogTrigger = DialogPrimitive.Trigger;
|
|
9
9
|
const DialogPortal = DialogPrimitive.Portal;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
4
|
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
5
5
|
return (_jsx("input", { type: type, className: cn('border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', className), ref: ref, ...props }));
|
|
6
6
|
});
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Label as LabelPrimitive } from 'radix-ui';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
7
|
const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
|
|
8
8
|
const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants(), className), ...props })));
|
|
9
9
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Popover as PopoverPrimitive } from 'radix-ui';
|
|
5
|
-
import { cn } from '
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
6
|
const Popover = PopoverPrimitive.Root;
|
|
7
7
|
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
8
8
|
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Select as SelectPrimitive } from 'radix-ui';
|
|
5
5
|
import { Check, ChevronDown, ChevronUp } from 'lucide-react';
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
7
|
const Select = SelectPrimitive.Root;
|
|
8
8
|
const SelectGroup = SelectPrimitive.Group;
|
|
9
9
|
const SelectValue = SelectPrimitive.Value;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Tabs as TabsPrimitive } from 'radix-ui';
|
|
5
|
-
import { cn } from '
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
6
|
const Tabs = TabsPrimitive.Root;
|
|
7
7
|
const TabsList = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn('bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1', className), ...props })));
|
|
8
8
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import { THEME_STORAGE_KEY } from '
|
|
3
|
+
import { THEME_STORAGE_KEY } from '../types/theme';
|
|
4
4
|
/**
|
|
5
5
|
* Hook to manage theme state with localStorage persistence
|
|
6
6
|
* and system preference detection.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Helpers
|
|
3
|
+
*
|
|
4
|
+
* Provides version and system info for the Web UI.
|
|
5
|
+
* Reads from NEXT_PUBLIC_SHEP_* environment variables which are set by:
|
|
6
|
+
* 1. The CLI (`shep ui`) via setVersionEnvVars() before starting Next.js
|
|
7
|
+
* 2. next.config.ts dev fallback for standalone `pnpm dev:web` mode
|
|
8
|
+
*
|
|
9
|
+
* The VersionInfo shape mirrors src/domain/value-objects/version-info.ts
|
|
10
|
+
* from the CLI domain layer.
|
|
11
|
+
*/
|
|
12
|
+
/** Version information for the package (mirrors domain VersionInfo) */
|
|
13
|
+
export interface VersionInfo {
|
|
14
|
+
version: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
/** System runtime information */
|
|
19
|
+
export interface SystemInfo {
|
|
20
|
+
nodeVersion: string;
|
|
21
|
+
platform: string;
|
|
22
|
+
arch: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get version info from environment variables.
|
|
26
|
+
* Falls back to defaults if not set.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getVersionInfo(): VersionInfo;
|
|
29
|
+
/**
|
|
30
|
+
* Get system runtime information.
|
|
31
|
+
* Must be called from a server context (Server Component or API route).
|
|
32
|
+
*/
|
|
33
|
+
export declare function getSystemInfo(): SystemInfo;
|
|
34
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,iCAAiC;AACjC,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAM5C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAM1C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Helpers
|
|
3
|
+
*
|
|
4
|
+
* Provides version and system info for the Web UI.
|
|
5
|
+
* Reads from NEXT_PUBLIC_SHEP_* environment variables which are set by:
|
|
6
|
+
* 1. The CLI (`shep ui`) via setVersionEnvVars() before starting Next.js
|
|
7
|
+
* 2. next.config.ts dev fallback for standalone `pnpm dev:web` mode
|
|
8
|
+
*
|
|
9
|
+
* The VersionInfo shape mirrors src/domain/value-objects/version-info.ts
|
|
10
|
+
* from the CLI domain layer.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Get version info from environment variables.
|
|
14
|
+
* Falls back to defaults if not set.
|
|
15
|
+
*/
|
|
16
|
+
export function getVersionInfo() {
|
|
17
|
+
return {
|
|
18
|
+
version: process.env.NEXT_PUBLIC_SHEP_VERSION ?? 'unknown',
|
|
19
|
+
name: process.env.NEXT_PUBLIC_SHEP_PACKAGE_NAME ?? '@shepai/cli',
|
|
20
|
+
description: process.env.NEXT_PUBLIC_SHEP_DESCRIPTION ?? 'Autonomous AI Native SDLC Platform',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get system runtime information.
|
|
25
|
+
* Must be called from a server context (Server Component or API route).
|
|
26
|
+
*/
|
|
27
|
+
export function getSystemInfo() {
|
|
28
|
+
return {
|
|
29
|
+
nodeVersion: process.version,
|
|
30
|
+
platform: process.platform,
|
|
31
|
+
arch: process.arch,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.config.d.ts","sourceRoot":"","sources":["../../../../src/presentation/web/next.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"next.config.d.ts","sourceRoot":"","sources":["../../../../src/presentation/web/next.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAgCvC,QAAA,MAAM,UAAU,EAAE,UAYjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Provide fallback env vars for standalone dev mode (pnpm dev:web).
|
|
5
|
+
* When run via `shep ui`, these are already set by the CLI's setVersionEnvVars()
|
|
6
|
+
* before Next.js starts, so this returns an empty object.
|
|
7
|
+
*/
|
|
8
|
+
function loadDevFallbacks() {
|
|
9
|
+
if (process.env.NEXT_PUBLIC_SHEP_VERSION) {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
try {
|
|
13
|
+
// Web package is at src/presentation/web/, root package.json is 3 levels up
|
|
14
|
+
const rootPkgPath = resolve(import.meta.dirname, '../../../package.json');
|
|
15
|
+
const pkg = JSON.parse(readFileSync(rootPkgPath, 'utf-8'));
|
|
16
|
+
return {
|
|
17
|
+
NEXT_PUBLIC_SHEP_VERSION: pkg.version ?? 'unknown',
|
|
18
|
+
NEXT_PUBLIC_SHEP_PACKAGE_NAME: pkg.name ?? '@shepai/cli',
|
|
19
|
+
NEXT_PUBLIC_SHEP_DESCRIPTION: pkg.description ?? 'Autonomous AI Native SDLC Platform',
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return {
|
|
24
|
+
NEXT_PUBLIC_SHEP_VERSION: 'unknown',
|
|
25
|
+
NEXT_PUBLIC_SHEP_PACKAGE_NAME: '@shepai/cli',
|
|
26
|
+
NEXT_PUBLIC_SHEP_DESCRIPTION: 'Autonomous AI Native SDLC Platform',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
1
30
|
const nextConfig = {
|
|
2
31
|
// Enable Turbopack for faster development builds
|
|
3
32
|
turbopack: {},
|
|
@@ -5,5 +34,7 @@ const nextConfig = {
|
|
|
5
34
|
typedRoutes: true,
|
|
6
35
|
// Configure the output directory
|
|
7
36
|
distDir: '.next',
|
|
37
|
+
// Inject version info from package.json for the web UI
|
|
38
|
+
env: loadDevFallbacks(),
|
|
8
39
|
};
|
|
9
40
|
export default nextConfig;
|