forked from aws/agentcore-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconstants.ts
More file actions
60 lines (50 loc) · 1.64 KB
/
Copy pathconstants.ts
File metadata and controls
60 lines (50 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const packageJson = require('../../package.json') as { version: string };
export const PACKAGE_VERSION: string = packageJson.version;
/**
* Distribution mode for the CLI.
* - PROD_DISTRO: Public npm registry (npmjs.org)
* - PRIVATE_DEV_DISTRO: GitHub Package Registry (private/scoped)
*/
export type DistroMode = 'PROD_DISTRO' | 'PRIVATE_DEV_DISTRO';
export const DISTRO_MODE: DistroMode = 'PROD_DISTRO';
/**
* Configuration for each distribution mode.
*/
export const DISTRO_CONFIG = {
PROD_DISTRO: {
packageName: '@aws/agentcore',
registryUrl: 'https://registry.npmjs.org',
installCommand: 'npm install -g @aws/agentcore@latest',
},
PRIVATE_DEV_DISTRO: {
packageName: '@aws/agentcore',
registryUrl: 'https://npm.pkg.github.com',
installCommand: 'npm install -g @aws/agentcore@latest --registry=https://npm.pkg.github.com',
},
} as const;
/**
* Get the current distribution configuration.
*/
export function getDistroConfig() {
return DISTRO_CONFIG[DISTRO_MODE];
}
/**
* Directory name where the CDK project is generated by `agentcore create`.
* This is relative to CONFIG_DIR (agentcore/cdk/).
*/
export const CDK_PROJECT_DIR = 'cdk';
/**
* CDK app entry point relative to the CDK project directory.
* Points to the compiled JS in the dist directory.
*/
export const CDK_APP_ENTRY = 'dist/bin/cdk.js';
/**
* Current schema version for AgentCore configuration files.
*/
export const SCHEMA_VERSION = 1;
/**
* Default runtime endpoint name used in log group paths and console URLs.
*/
export const DEFAULT_ENDPOINT_NAME = 'DEFAULT';