assistant-ui 0.0.116 → 0.0.117
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/codemods/utils/createTransformer.d.ts +3 -4
- package/dist/codemods/utils/createTransformer.d.ts.map +1 -1
- package/dist/commands/add.d.ts +3 -4
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/agent.d.ts +1 -2
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/create.d.ts +10 -11
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +21 -11
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/doctor.d.ts +9 -10
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/info.d.ts +3 -3
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/init.d.ts +3 -4
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mcp.d.ts +1 -2
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/update.d.ts +1 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/upgrade.d.ts +3 -4
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/lib/agent-skill.d.ts +3 -4
- package/dist/lib/agent-skill.d.ts.map +1 -1
- package/dist/lib/create-project.d.ts +11 -12
- package/dist/lib/create-project.d.ts.map +1 -1
- package/dist/lib/handle-cli-error.d.ts +1 -2
- package/dist/lib/handle-cli-error.d.ts.map +1 -1
- package/dist/lib/install-ai-sdk-lib.d.ts +1 -2
- package/dist/lib/install-ai-sdk-lib.d.ts.map +1 -1
- package/dist/lib/install-edge-lib.d.ts +1 -2
- package/dist/lib/install-edge-lib.d.ts.map +1 -1
- package/dist/lib/run-spawn.d.ts +6 -7
- package/dist/lib/run-spawn.d.ts.map +1 -1
- package/dist/lib/transform-options.d.ts +1 -2
- package/dist/lib/transform-options.d.ts.map +1 -1
- package/dist/lib/transform.d.ts +4 -5
- package/dist/lib/transform.d.ts.map +1 -1
- package/dist/lib/upgrade.d.ts +1 -2
- package/dist/lib/upgrade.d.ts.map +1 -1
- package/dist/lib/utils/config.d.ts +4 -5
- package/dist/lib/utils/config.d.ts.map +1 -1
- package/dist/lib/utils/file-scanner.d.ts +4 -5
- package/dist/lib/utils/file-scanner.d.ts.map +1 -1
- package/dist/lib/utils/logger.d.ts +1 -2
- package/dist/lib/utils/logger.d.ts.map +1 -1
- package/dist/lib/utils/package-installer.d.ts +2 -3
- package/dist/lib/utils/package-installer.d.ts.map +1 -1
- package/dist/lib/utils/package-json.d.ts +1 -2
- package/dist/lib/utils/package-json.d.ts.map +1 -1
- package/dist/lib/utils/package-manager.d.ts +7 -8
- package/dist/lib/utils/package-manager.d.ts.map +1 -1
- package/dist/lib/utils/registry.d.ts +5 -6
- package/dist/lib/utils/registry.d.ts.map +1 -1
- package/dist/lib/utils/workspace.d.ts +2 -3
- package/dist/lib/utils/workspace.d.ts.map +1 -1
- package/dist/program.d.ts +1 -2
- package/dist/program.d.ts.map +1 -1
- package/dist/run.d.ts +1 -2
- package/dist/run.d.ts.map +1 -1
- package/package.json +8 -7
- package/plugin/skills/assistant-ui/SKILL.md +3 -3
- package/src/commands/create.ts +29 -5
- package/src/commands/init.ts +1 -2
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { PackageManagerName } from "./utils/package-manager.js";
|
|
2
2
|
//#region src/lib/create-project.d.ts
|
|
3
|
-
declare function dlxCommand(pm: PackageManagerName): [string, string[]];
|
|
4
|
-
interface TransformOptions {
|
|
3
|
+
export declare function dlxCommand(pm: PackageManagerName): [string, string[]];
|
|
4
|
+
export interface TransformOptions {
|
|
5
5
|
hasLocalComponents: boolean;
|
|
6
6
|
skipInstall?: boolean;
|
|
7
7
|
packageManager: PackageManagerName;
|
|
8
8
|
}
|
|
9
|
-
type ProjectSource = {
|
|
9
|
+
export type ProjectSource = {
|
|
10
10
|
kind: "github";
|
|
11
11
|
ref: string | undefined;
|
|
12
12
|
} | {
|
|
13
13
|
kind: "local";
|
|
14
14
|
rootDir: string;
|
|
15
15
|
};
|
|
16
|
-
declare function resolvePackageManager(opts: {
|
|
16
|
+
export declare function resolvePackageManager(opts: {
|
|
17
17
|
useNpm?: boolean;
|
|
18
18
|
usePnpm?: boolean;
|
|
19
19
|
useYarn?: boolean;
|
|
20
20
|
useBun?: boolean;
|
|
21
21
|
}): PackageManagerName | undefined;
|
|
22
|
-
declare function resolveLatestReleaseRef(): Promise<string | undefined>;
|
|
23
|
-
declare function downloadProject(repoPath: string, destDir: string, ref?: string): Promise<void>;
|
|
24
|
-
declare function scaffoldProject(repoPath: string, destDir: string, source: ProjectSource): Promise<void>;
|
|
25
|
-
interface TransformResult {
|
|
22
|
+
export declare function resolveLatestReleaseRef(): Promise<string | undefined>;
|
|
23
|
+
export declare function downloadProject(repoPath: string, destDir: string, ref?: string): Promise<void>;
|
|
24
|
+
export declare function scaffoldProject(repoPath: string, destDir: string, source: ProjectSource): Promise<void>;
|
|
25
|
+
export interface TransformResult {
|
|
26
26
|
registryInstallFailure?: {
|
|
27
27
|
retryCommand: string;
|
|
28
28
|
};
|
|
29
29
|
registryInstallCommand?: string;
|
|
30
30
|
}
|
|
31
|
-
declare function transformProject(projectDir: string, opts: TransformOptions): Promise<TransformResult>;
|
|
31
|
+
export declare function transformProject(projectDir: string, opts: TransformOptions): Promise<TransformResult>;
|
|
32
32
|
interface RequiredComponents {
|
|
33
33
|
assistantUI: string[];
|
|
34
34
|
shadcnUI: string[];
|
|
@@ -41,8 +41,7 @@ interface RequiredComponents {
|
|
|
41
41
|
* specifier against the files the registry actually installed and rewrite it
|
|
42
42
|
* only when the legacy path is absent and the elements layout has it.
|
|
43
43
|
*/
|
|
44
|
-
declare function reconcileAssistantUIImportLayout(projectDir: string): Promise<void>;
|
|
45
|
-
declare function scanRequiredComponents(projectDir: string): RequiredComponents;
|
|
44
|
+
export declare function reconcileAssistantUIImportLayout(projectDir: string): Promise<void>;
|
|
45
|
+
export declare function scanRequiredComponents(projectDir: string): RequiredComponents;
|
|
46
46
|
//#endregion
|
|
47
|
-
export { ProjectSource, TransformOptions, TransformResult, dlxCommand, downloadProject, reconcileAssistantUIImportLayout, resolveLatestReleaseRef, resolvePackageManager, scaffoldProject, scanRequiredComponents, transformProject };
|
|
48
47
|
//# sourceMappingURL=create-project.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-project.d.ts","names":[],"sources":["../../src/lib/create-project.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"create-project.d.ts","names":[],"sources":["../../src/lib/create-project.ts"],"mappings":";;wBAiBgB,WAAW,IAAI;iBAad;EACf;EACA;EACA,gBAAgB;;YAGN;EAEN;EACA;;EAGA;EACA;;wBAcU,sBAAsB;EACpC;EACA;EACA;EACA;IACE;wBAmBkB,2BAA2B;wBAmB3B,gBACpB,kBACA,iBACA,eACC;wBAuDmB,gBACpB,kBACA,iBACA,QAAQ,gBACP;iBA2Bc;EACf;IAA2B;;EAC3B;;wBAGoB,iBACpB,oBACA,MAAM,mBACL,QAAQ;UAiMD;EACR;EACA;;;;;;;;;;wBAqDoB,iCACpB,qBACC;wBAgHa,uBAAuB,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-cli-error.d.ts","names":[],"sources":["../../src/lib/handle-cli-error.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"handle-cli-error.d.ts","names":[],"sources":["../../src/lib/handle-cli-error.ts"],"mappings":";wBAGgB,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-ai-sdk-lib.d.ts","names":[],"sources":["../../src/lib/install-ai-sdk-lib.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"install-ai-sdk-lib.d.ts","names":[],"sources":["../../src/lib/install-ai-sdk-lib.ts"],"mappings":";wBAE8B,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-edge-lib.d.ts","names":[],"sources":["../../src/lib/install-edge-lib.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"install-edge-lib.d.ts","names":[],"sources":["../../src/lib/install-edge-lib.ts"],"mappings":";wBAE8B,kBAAkB"}
|
package/dist/lib/run-spawn.d.ts
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
//#region src/lib/run-spawn.d.ts
|
|
2
|
-
declare class SpawnExitError extends Error {
|
|
2
|
+
export declare class SpawnExitError extends Error {
|
|
3
3
|
code: number;
|
|
4
4
|
stderr: string;
|
|
5
5
|
constructor(code: number, stderr?: string);
|
|
6
6
|
}
|
|
7
|
-
declare class SpawnSignalError extends Error {
|
|
7
|
+
export declare class SpawnSignalError extends Error {
|
|
8
8
|
signal: NodeJS.Signals;
|
|
9
9
|
forwarded: boolean;
|
|
10
10
|
constructor(signal: NodeJS.Signals, forwarded: boolean);
|
|
11
11
|
}
|
|
12
|
-
interface SpawnResult {
|
|
12
|
+
export interface SpawnResult {
|
|
13
13
|
code: number | null;
|
|
14
14
|
signal: NodeJS.Signals | null;
|
|
15
15
|
stdout: string;
|
|
16
16
|
stderr: string;
|
|
17
17
|
}
|
|
18
|
-
declare const hasActiveSpawn: () => boolean;
|
|
19
|
-
declare function runSpawn(command: string, args: string[], cwd?: string): Promise<void>;
|
|
20
|
-
declare function runSpawnCapture(command: string, args: string[], cwd?: string): Promise<SpawnResult>;
|
|
18
|
+
export declare const hasActiveSpawn: () => boolean;
|
|
19
|
+
export declare function runSpawn(command: string, args: string[], cwd?: string): Promise<void>;
|
|
20
|
+
export declare function runSpawnCapture(command: string, args: string[], cwd?: string): Promise<SpawnResult>;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { SpawnExitError, SpawnResult, SpawnSignalError, hasActiveSpawn, runSpawn, runSpawnCapture };
|
|
23
22
|
//# sourceMappingURL=run-spawn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-spawn.d.ts","names":[],"sources":["../../src/lib/run-spawn.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"run-spawn.d.ts","names":[],"sources":["../../src/lib/run-spawn.ts"],"mappings":";qBAEa,uBAAuB;EAClC;EACA;EAEY,YAAA,cAAc;;qBAWf,yBAAyB;EACpC,QAAQ,OAAO;EACf;EAEY,YAAA,QAAQ,OAAO,SAAS;;iBAOrB;EACf;EACA,QAAQ,OAAO;EACf;EACA;;qBAOW;wBAiFG,SACd,iBACA,gBACA,eACC;wBAWa,gBACd,iBACA,gBACA,eACC,QAAQ"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
//#region src/lib/transform-options.d.ts
|
|
2
|
-
interface TransformOptions {
|
|
2
|
+
export interface TransformOptions {
|
|
3
3
|
dry?: boolean;
|
|
4
4
|
print?: boolean;
|
|
5
5
|
verbose?: boolean;
|
|
6
6
|
jscodeshift?: string;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
export { TransformOptions };
|
|
10
9
|
//# sourceMappingURL=transform-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-options.d.ts","names":[],"sources":["../../src/lib/transform-options.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"transform-options.d.ts","names":[],"sources":["../../src/lib/transform-options.ts"],"mappings":";iBAAiB;EACf;EACA;EACA;EACA"}
|
package/dist/lib/transform.d.ts
CHANGED
|
@@ -4,21 +4,20 @@ import { TransformOptions } from "./transform-options.js";
|
|
|
4
4
|
* Gets the list of files that need to be processed in the codebase
|
|
5
5
|
* Only includes files that contain "assistant-ui" to optimize performance
|
|
6
6
|
*/
|
|
7
|
-
declare function getRelevantFiles(cwd: string): string[];
|
|
7
|
+
export declare function getRelevantFiles(cwd: string): string[];
|
|
8
8
|
/**
|
|
9
9
|
* Counts the number of files that need to be processed
|
|
10
10
|
*/
|
|
11
|
-
declare function countFilesToProcess(cwd: string): number;
|
|
12
|
-
type TransformErrors = {
|
|
11
|
+
export declare function countFilesToProcess(cwd: string): number;
|
|
12
|
+
export type TransformErrors = {
|
|
13
13
|
transform: string;
|
|
14
14
|
filename: string;
|
|
15
15
|
summary: string;
|
|
16
16
|
}[];
|
|
17
|
-
declare function transform(codemod: string, source: string, transformOptions: TransformOptions, options?: {
|
|
17
|
+
export declare function transform(codemod: string, source: string, transformOptions: TransformOptions, options?: {
|
|
18
18
|
logStatus: boolean;
|
|
19
19
|
onProgress?: (processedFiles: number) => void;
|
|
20
20
|
relevantFiles?: string[];
|
|
21
21
|
}): Promise<TransformErrors>;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { TransformErrors, countFilesToProcess, getRelevantFiles, transform };
|
|
24
23
|
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","names":[],"sources":["../../src/lib/transform.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","names":[],"sources":["../../src/lib/transform.ts"],"mappings":";;;;;;wBAkBgB,iBAAiB;;;;wBA6BjB,oBAAoB;YAsCxB;EACV;EACA;EACA;;wBAoBoB,UACpB,iBACA,gBACA,kBAAkB,kBAClB;EACE;EACA,cAAc;EACd;IAED,QAAQ"}
|
package/dist/lib/upgrade.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { TransformOptions } from "./transform-options.js";
|
|
|
6
6
|
* - Displays progress using cli-progress.
|
|
7
7
|
* - After codemods run, checks if any file now imports from the new packages and prompts for install.
|
|
8
8
|
*/
|
|
9
|
-
declare function upgrade(options: TransformOptions): Promise<void>;
|
|
9
|
+
export declare function upgrade(options: TransformOptions): Promise<void>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { upgrade };
|
|
12
11
|
//# sourceMappingURL=upgrade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","names":[],"sources":["../../src/lib/upgrade.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","names":[],"sources":["../../src/lib/upgrade.ts"],"mappings":";;;;;;;;wBA0BsB,QAAQ,SAAS,mBAAgB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/lib/utils/config.d.ts
|
|
2
|
-
interface AssistantUIConfig {
|
|
2
|
+
export interface AssistantUIConfig {
|
|
3
3
|
$schema?: string;
|
|
4
4
|
style?: string;
|
|
5
5
|
tailwind?: {
|
|
@@ -15,9 +15,8 @@ interface AssistantUIConfig {
|
|
|
15
15
|
lib?: string;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
declare function getConfig(cwd?: string): AssistantUIConfig | null;
|
|
19
|
-
declare function saveConfig(config: AssistantUIConfig, cwd?: string): void;
|
|
20
|
-
declare function hasConfig(cwd?: string): boolean;
|
|
18
|
+
export declare function getConfig(cwd?: string): AssistantUIConfig | null;
|
|
19
|
+
export declare function saveConfig(config: AssistantUIConfig, cwd?: string): void;
|
|
20
|
+
export declare function hasConfig(cwd?: string): boolean;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { AssistantUIConfig, getConfig, hasConfig, saveConfig };
|
|
23
22
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","names":[],"sources":["../../../src/lib/utils/config.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"config.d.ts","names":[],"sources":["../../../src/lib/utils/config.ts"],"mappings":";iBAIiB;EACf;EACA;EACA;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;wBASY,UACd,eACC;wBAmBa,WACd,QAAQ,mBACR;wBAMc,UAAU"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//#region src/lib/utils/file-scanner.d.ts
|
|
2
|
-
interface ScanOptions {
|
|
2
|
+
export interface ScanOptions {
|
|
3
3
|
cwd?: string;
|
|
4
4
|
pattern?: string;
|
|
5
5
|
ignore?: string[];
|
|
6
6
|
}
|
|
7
|
-
declare function readProjectFiles(pattern: string, options: {
|
|
7
|
+
export declare function readProjectFiles(pattern: string, options: {
|
|
8
8
|
cwd: string;
|
|
9
9
|
ignore?: string[];
|
|
10
10
|
}): Generator<{
|
|
@@ -12,8 +12,7 @@ declare function readProjectFiles(pattern: string, options: {
|
|
|
12
12
|
fullPath: string;
|
|
13
13
|
content: string;
|
|
14
14
|
}>;
|
|
15
|
-
declare function scanForImport(importPattern: string | string[], options?: ScanOptions): boolean;
|
|
16
|
-
declare function getFilesContaining(searchString: string, options?: ScanOptions): string[];
|
|
15
|
+
export declare function scanForImport(importPattern: string | string[], options?: ScanOptions): boolean;
|
|
16
|
+
export declare function getFilesContaining(searchString: string, options?: ScanOptions): string[];
|
|
17
17
|
//#endregion
|
|
18
|
-
export { ScanOptions, getFilesContaining, readProjectFiles, scanForImport };
|
|
19
18
|
//# sourceMappingURL=file-scanner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-scanner.d.ts","names":[],"sources":["../../../src/lib/utils/file-scanner.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"file-scanner.d.ts","names":[],"sources":["../../../src/lib/utils/file-scanner.ts"],"mappings":";iBAIiB;EACf;EACA;EACA;;wBAGe,iBACf,iBACA;EAAW;EAAa;IACvB;EAAY;EAAc;EAAkB;;wBAc/B,cACd,kCACA,UAAS;wBAuBK,mBACd,sBACA,UAAS"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/lib/utils/logger.d.ts
|
|
2
|
-
declare const logger: {
|
|
2
|
+
export declare const logger: {
|
|
3
3
|
info: (message: string) => void;
|
|
4
4
|
success: (message: string) => void;
|
|
5
5
|
error: (message: string) => void;
|
|
@@ -8,5 +8,4 @@ declare const logger: {
|
|
|
8
8
|
break: () => void;
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
|
-
export { logger };
|
|
12
11
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../../src/lib/utils/logger.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../../src/lib/utils/logger.ts"],"mappings":";qBAEa;EACK,OAAA;EAGG,UAAA;EAGF,QAAA;EAGD,OAAA;EAGA,OAAA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/lib/utils/package-installer.d.ts
|
|
2
|
-
interface PackageInstallConfig {
|
|
2
|
+
export interface PackageInstallConfig {
|
|
3
3
|
packageName: string;
|
|
4
4
|
importPatterns: string[];
|
|
5
5
|
promptMessage: string;
|
|
6
6
|
skipMessage: string;
|
|
7
7
|
notFoundMessage: string;
|
|
8
8
|
}
|
|
9
|
-
declare function installPackageIfNeeded(config: PackageInstallConfig): Promise<void>;
|
|
9
|
+
export declare function installPackageIfNeeded(config: PackageInstallConfig): Promise<void>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { PackageInstallConfig, installPackageIfNeeded };
|
|
12
11
|
//# sourceMappingURL=package-installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-installer.d.ts","names":[],"sources":["../../../src/lib/utils/package-installer.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"package-installer.d.ts","names":[],"sources":["../../../src/lib/utils/package-installer.ts"],"mappings":";iBAQiB;EACf;EACA;EACA;EACA;EACA;;wBAGoB,uBACpB,QAAQ,uBACP"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/lib/utils/package-json.d.ts
|
|
2
|
-
declare function logPackageJsonParseError(packageJsonPath: string, commandName: string): void;
|
|
2
|
+
export declare function logPackageJsonParseError(packageJsonPath: string, commandName: string): void;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { logPackageJsonParseError };
|
|
5
4
|
//# sourceMappingURL=package-json.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json.d.ts","names":[],"sources":["../../../src/lib/utils/package-json.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"package-json.d.ts","names":[],"sources":["../../../src/lib/utils/package-json.ts"],"mappings":";wBAEgB,yBACd,yBACA"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
//#region src/lib/utils/package-manager.d.ts
|
|
2
|
-
type PackageManagerName = "npm" | "pnpm" | "yarn" | "bun";
|
|
3
|
-
declare function askQuestion(query: string): Promise<string>;
|
|
4
|
-
declare function isPackageInstalled(pkg: string, cwd?: string): boolean;
|
|
5
|
-
interface InstallCommand {
|
|
2
|
+
export type PackageManagerName = "npm" | "pnpm" | "yarn" | "bun";
|
|
3
|
+
export declare function askQuestion(query: string): Promise<string>;
|
|
4
|
+
export declare function isPackageInstalled(pkg: string, cwd?: string): boolean;
|
|
5
|
+
export interface InstallCommand {
|
|
6
6
|
command: string;
|
|
7
7
|
args: string[];
|
|
8
8
|
}
|
|
9
|
-
declare function getInstallCommand(packageName: string | string[], cwd?: string): Promise<InstallCommand>;
|
|
10
|
-
declare function resolvePackageManagerForCwd(cwd: string, packageManager?: PackageManagerName): Promise<PackageManagerName>;
|
|
11
|
-
declare function installPackage(packageName: string, cwd?: string): Promise<boolean>;
|
|
9
|
+
export declare function getInstallCommand(packageName: string | string[], cwd?: string): Promise<InstallCommand>;
|
|
10
|
+
export declare function resolvePackageManagerForCwd(cwd: string, packageManager?: PackageManagerName): Promise<PackageManagerName>;
|
|
11
|
+
export declare function installPackage(packageName: string, cwd?: string): Promise<boolean>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { InstallCommand, PackageManagerName, askQuestion, getInstallCommand, installPackage, isPackageInstalled, resolvePackageManagerForCwd };
|
|
14
13
|
//# sourceMappingURL=package-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.d.ts","names":[],"sources":["../../../src/lib/utils/package-manager.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"package-manager.d.ts","names":[],"sources":["../../../src/lib/utils/package-manager.ts"],"mappings":";YAOY;wBAEI,YAAY,gBAAgB;wBAa5B,mBACd,aACA;iBAmBe;EACf;EACA;;wBAGoB,kBACpB,gCACA,eACC,QAAQ;wBAyBW,4BACpB,aACA,iBAAiB,qBAChB,QAAQ;wBAWW,eACpB,qBACA,eACC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
//#region src/lib/utils/registry.d.ts
|
|
2
|
-
declare const SHARED_REGISTRY_ITEMS: Set<string>;
|
|
3
|
-
declare function detectRegistryPlatform(cwd: string): "web" | "native";
|
|
4
|
-
declare function getComponentsJsonStyle(cwd: string): string | undefined;
|
|
5
|
-
declare function resolveQuickStartRegistryUrl(style?: string): string;
|
|
6
|
-
declare function resolveRegistryItemUrl(component: string, style?: string, platform?: "web" | "native"): string;
|
|
2
|
+
export declare const SHARED_REGISTRY_ITEMS: Set<string>;
|
|
3
|
+
export declare function detectRegistryPlatform(cwd: string): "web" | "native";
|
|
4
|
+
export declare function getComponentsJsonStyle(cwd: string): string | undefined;
|
|
5
|
+
export declare function resolveQuickStartRegistryUrl(style?: string): string;
|
|
6
|
+
export declare function resolveRegistryItemUrl(component: string, style?: string, platform?: "web" | "native"): string;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { SHARED_REGISTRY_ITEMS, detectRegistryPlatform, getComponentsJsonStyle, resolveQuickStartRegistryUrl, resolveRegistryItemUrl };
|
|
9
8
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","names":[],"sources":["../../../src/lib/utils/registry.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"registry.d.ts","names":[],"sources":["../../../src/lib/utils/registry.ts"],"mappings":";qBAIa,uBAAqB;wBAElB,uBAAuB;wBA2BvB,uBAAuB;wBAavB,6BAA6B;wBAW7B,uBACd,mBACA,gBACA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region src/lib/utils/workspace.d.ts
|
|
2
|
-
declare function resolveRealPath(inputPath: string): string;
|
|
3
|
-
declare function findWorkspaceRoot(cwd: string): string | null;
|
|
2
|
+
export declare function resolveRealPath(inputPath: string): string;
|
|
3
|
+
export declare function findWorkspaceRoot(cwd: string): string | null;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { findWorkspaceRoot, resolveRealPath };
|
|
6
5
|
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","names":[],"sources":["../../../src/lib/utils/workspace.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","names":[],"sources":["../../../src/lib/utils/workspace.ts"],"mappings":";wBAGgB,gBAAgB;wBAUhB,kBAAkB"}
|
package/dist/program.d.ts
CHANGED
package/dist/program.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","names":[],"sources":["../src/program.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"program.d.ts","names":[],"sources":["../src/program.ts"],"mappings":";;wBAWgB,gBAAY"}
|
package/dist/run.d.ts
CHANGED
package/dist/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","names":[],"sources":["../src/run.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"run.d.ts","names":[],"sources":["../src/run.ts"],"mappings":";wBAEsB,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assistant-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.117",
|
|
4
4
|
"description": "CLI for assistant-ui",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@assistant-ui/agent-launcher": "^0.1.
|
|
30
|
-
"@clack/prompts": "^1.
|
|
29
|
+
"@assistant-ui/agent-launcher": "^0.1.16",
|
|
30
|
+
"@clack/prompts": "^1.8.1",
|
|
31
31
|
"chalk": "^6.0.0",
|
|
32
32
|
"cli-progress": "^3.12.0",
|
|
33
33
|
"commander": "^15.0.0",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"semver": "^7.8.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@assistant-ui/x-buildutils": "0.0.
|
|
44
|
+
"@assistant-ui/x-buildutils": "0.0.28",
|
|
45
45
|
"@types/cli-progress": "^3.11.6",
|
|
46
46
|
"@types/cross-spawn": "^6.0.6",
|
|
47
47
|
"@types/debug": "^4.1.13",
|
|
48
48
|
"@types/jscodeshift": "^17.3.0",
|
|
49
|
-
"@types/node": "^26.
|
|
49
|
+
"@types/node": "^26.5.1",
|
|
50
50
|
"@types/semver": "^7.8.0",
|
|
51
|
-
"@vitest/coverage-v8": "^5.0.
|
|
52
|
-
"vitest": "^5.0.
|
|
51
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
52
|
+
"vitest": "^5.0.1"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"scripts": {
|
|
68
68
|
"build": "aui-build",
|
|
69
69
|
"test": "vitest run",
|
|
70
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
70
71
|
"test:watch": "vitest",
|
|
71
72
|
"test:coverage": "vitest run --coverage"
|
|
72
73
|
}
|
|
@@ -169,14 +169,14 @@ export default defineToolkit({
|
|
|
169
169
|
Register the toolkit in your assistant component:
|
|
170
170
|
|
|
171
171
|
```tsx
|
|
172
|
-
import { AssistantRuntimeProvider,
|
|
172
|
+
import { AssistantRuntimeProvider, AuiConfig, Tools } from "@assistant-ui/react";
|
|
173
173
|
import toolkit from "@/app/toolkit";
|
|
174
174
|
|
|
175
|
-
const
|
|
175
|
+
const config = AuiConfig({
|
|
176
176
|
tools: Tools({ toolkit }),
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
<AssistantRuntimeProvider
|
|
179
|
+
<AssistantRuntimeProvider runtime={runtime} config={config}>
|
|
180
180
|
<Thread />
|
|
181
181
|
</AssistantRuntimeProvider>
|
|
182
182
|
```
|
package/src/commands/create.ts
CHANGED
|
@@ -520,6 +520,12 @@ export const create = new Command()
|
|
|
520
520
|
.option("--skip-install", "skip installing packages")
|
|
521
521
|
.option("--skills", "add assistant-ui agent skills for AI coding assistants")
|
|
522
522
|
.option("--no-skills", "skip adding assistant-ui agent skills")
|
|
523
|
+
.addOption(
|
|
524
|
+
new Option(
|
|
525
|
+
"--cwd <cwd>",
|
|
526
|
+
"the working directory. defaults to the current directory.",
|
|
527
|
+
).hideHelp(),
|
|
528
|
+
)
|
|
523
529
|
.addOption(
|
|
524
530
|
new Option(
|
|
525
531
|
"--debug-source-root <path>",
|
|
@@ -575,9 +581,13 @@ export const create = new Command()
|
|
|
575
581
|
}
|
|
576
582
|
|
|
577
583
|
// Check directory
|
|
578
|
-
const absoluteProjectDir = path.resolve(
|
|
584
|
+
const absoluteProjectDir = path.resolve(
|
|
585
|
+
opts.cwd ?? process.cwd(),
|
|
586
|
+
resolvedProjectDirectory,
|
|
587
|
+
);
|
|
579
588
|
const { display: displayProjectDir, cdCommand } =
|
|
580
589
|
resolveProjectDirectoryGuidance({ absoluteProjectDir });
|
|
590
|
+
let projectDirExisted = true;
|
|
581
591
|
try {
|
|
582
592
|
const files = fs.readdirSync(absoluteProjectDir);
|
|
583
593
|
if (files.length > 0) {
|
|
@@ -591,6 +601,7 @@ export const create = new Command()
|
|
|
591
601
|
err instanceof Error ? (err as NodeJS.ErrnoException).code : undefined;
|
|
592
602
|
if (code === "ENOENT") {
|
|
593
603
|
// Directory doesn't exist — good, proceed
|
|
604
|
+
projectDirExisted = false;
|
|
594
605
|
} else if (code === "ENOTDIR") {
|
|
595
606
|
logger.error(
|
|
596
607
|
`${displayProjectDir} already exists and is not a directory`,
|
|
@@ -638,11 +649,24 @@ export const create = new Command()
|
|
|
638
649
|
);
|
|
639
650
|
|
|
640
651
|
// Clean up partial project directory on unexpected exit (e.g. Ctrl+C)
|
|
652
|
+
const resetProjectDir = () => {
|
|
653
|
+
if (!projectDirExisted) {
|
|
654
|
+
fs.rmSync(absoluteProjectDir, { recursive: true, force: true });
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
if (!fs.existsSync(absoluteProjectDir)) return;
|
|
658
|
+
for (const entry of fs.readdirSync(absoluteProjectDir)) {
|
|
659
|
+
fs.rmSync(path.join(absoluteProjectDir, entry), {
|
|
660
|
+
recursive: true,
|
|
661
|
+
force: true,
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
};
|
|
641
665
|
let cleanupArmed = true;
|
|
642
666
|
const cleanupOnExit = () => {
|
|
643
667
|
if (!cleanupArmed) return;
|
|
644
668
|
cleanupArmed = false;
|
|
645
|
-
|
|
669
|
+
resetProjectDir();
|
|
646
670
|
};
|
|
647
671
|
const disarmCleanup = () => {
|
|
648
672
|
cleanupArmed = false;
|
|
@@ -651,8 +675,8 @@ export const create = new Command()
|
|
|
651
675
|
process.removeListener("SIGTERM", cleanupOnSignal);
|
|
652
676
|
};
|
|
653
677
|
// Node emits no "exit" when a signal kills the process. An in-flight
|
|
654
|
-
// runSpawn forwards the signal itself, so
|
|
655
|
-
//
|
|
678
|
+
// runSpawn forwards the signal itself, so cleanup runs on the error path
|
|
679
|
+
// once the child is reaped rather than while it is still writing.
|
|
656
680
|
const cleanupOnSignal = (signal: NodeJS.Signals) => {
|
|
657
681
|
if (hasActiveSpawn()) return;
|
|
658
682
|
cleanupOnExit();
|
|
@@ -696,7 +720,7 @@ export const create = new Command()
|
|
|
696
720
|
ref &&
|
|
697
721
|
!fs.existsSync(path.join(absoluteProjectDir, "package.json"))
|
|
698
722
|
) {
|
|
699
|
-
|
|
723
|
+
resetProjectDir();
|
|
700
724
|
logger.warn(
|
|
701
725
|
"Template not found at release tag, downloading from HEAD",
|
|
702
726
|
);
|
package/src/commands/init.ts
CHANGED
|
@@ -83,8 +83,7 @@ export const init = new Command()
|
|
|
83
83
|
logger.break();
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
const createArgs
|
|
87
|
-
if (projectDirectory) createArgs.push(targetDir);
|
|
86
|
+
const createArgs = projectDirectory ? [targetDir] : ["--cwd", cwd];
|
|
88
87
|
if (presetUrl) createArgs.push("--preset", presetUrl);
|
|
89
88
|
if (opts.useNpm) createArgs.push("--use-npm");
|
|
90
89
|
if (opts.usePnpm) createArgs.push("--use-pnpm");
|