@agentuity/cli 1.0.43 → 1.0.45
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/bin/cli.ts +189 -143
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +45 -2
- package/dist/cli.js.map +1 -1
- package/dist/cmd/build/patch/_util.d.ts +6 -0
- package/dist/cmd/build/patch/_util.d.ts.map +1 -1
- package/dist/cmd/build/patch/_util.js +20 -1
- package/dist/cmd/build/patch/_util.js.map +1 -1
- package/dist/cmd/build/patch/index.d.ts +2 -1
- package/dist/cmd/build/patch/index.d.ts.map +1 -1
- package/dist/cmd/build/patch/index.js +2 -1
- package/dist/cmd/build/patch/index.js.map +1 -1
- package/dist/cmd/build/vite/server-bundler.d.ts.map +1 -1
- package/dist/cmd/build/vite/server-bundler.js +2 -6
- package/dist/cmd/build/vite/server-bundler.js.map +1 -1
- package/dist/cmd/cloud/sandbox/cp.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/cp.js +69 -13
- package/dist/cmd/cloud/sandbox/cp.js.map +1 -1
- package/dist/cmd/cloud/sandbox/events.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/events.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/events.js +92 -0
- package/dist/cmd/cloud/sandbox/events.js.map +1 -0
- package/dist/cmd/cloud/sandbox/exec.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/exec.js +8 -0
- package/dist/cmd/cloud/sandbox/exec.js.map +1 -1
- package/dist/cmd/cloud/sandbox/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/index.js +2 -0
- package/dist/cmd/cloud/sandbox/index.js.map +1 -1
- package/dist/cmd/profile/create.js +1 -1
- package/dist/cmd/profile/create.js.map +1 -1
- package/dist/utils/route-migration.d.ts +3 -3
- package/dist/utils/route-migration.d.ts.map +1 -1
- package/dist/utils/route-migration.js +8 -31
- package/dist/utils/route-migration.js.map +1 -1
- package/package.json +6 -6
- package/src/api.ts +1 -1
- package/src/cli.ts +56 -2
- package/src/cmd/build/patch/_util.ts +20 -1
- package/src/cmd/build/patch/index.ts +2 -1
- package/src/cmd/build/vite/server-bundler.ts +2 -6
- package/src/cmd/cloud/sandbox/cp.ts +89 -14
- package/src/cmd/cloud/sandbox/events.ts +108 -0
- package/src/cmd/cloud/sandbox/exec.ts +9 -0
- package/src/cmd/cloud/sandbox/index.ts +2 -0
- package/src/cmd/profile/create.ts +1 -1
- package/src/utils/route-migration.ts +8 -33
|
@@ -697,19 +697,19 @@ export function performMigration(rootDir: string, routeFiles: string[]): Migrati
|
|
|
697
697
|
* Show the migration notice and optionally perform migration.
|
|
698
698
|
*
|
|
699
699
|
* Called during `dev` and `build` after dependency upgrades.
|
|
700
|
-
*
|
|
701
|
-
*
|
|
700
|
+
* Shows an informational banner with instructions — never blocks on
|
|
701
|
+
* interactive prompts (which would hang agents and CI pipelines).
|
|
702
702
|
*
|
|
703
703
|
* @returns true if migration was performed, false otherwise
|
|
704
704
|
*/
|
|
705
705
|
export async function promptRouteMigration(
|
|
706
706
|
rootDir: string,
|
|
707
|
-
|
|
707
|
+
_logger: Logger,
|
|
708
708
|
options?: { interactive?: boolean }
|
|
709
709
|
): Promise<boolean> {
|
|
710
710
|
const interactive = options?.interactive ?? process.stdin.isTTY;
|
|
711
711
|
|
|
712
|
-
// Only show the
|
|
712
|
+
// Only show the migration notice in TTY sessions
|
|
713
713
|
if (!interactive) {
|
|
714
714
|
return false;
|
|
715
715
|
}
|
|
@@ -722,7 +722,7 @@ export async function promptRouteMigration(
|
|
|
722
722
|
|
|
723
723
|
const { routeFiles, alreadyNotified } = eligibility;
|
|
724
724
|
|
|
725
|
-
// Only
|
|
725
|
+
// Only notify once — if the user has already been notified or dismissed, don't show again
|
|
726
726
|
if (alreadyNotified) {
|
|
727
727
|
return false;
|
|
728
728
|
}
|
|
@@ -748,35 +748,10 @@ export async function promptRouteMigration(
|
|
|
748
748
|
);
|
|
749
749
|
|
|
750
750
|
tui.newline();
|
|
751
|
-
|
|
752
|
-
const action = await tui.confirm('Would you like to migrate to explicit routing now?', false);
|
|
753
|
-
|
|
754
|
-
if (!action) {
|
|
755
|
-
writeMigrationState(rootDir, 'dismissed');
|
|
756
|
-
tui.info(`You can migrate later by running: ${tui.muted('agentuity dev --migrate-routes')}`);
|
|
757
|
-
tui.newline();
|
|
758
|
-
return false;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
// Perform migration
|
|
751
|
+
tui.info(`Migrate by running: ${tui.muted('agentuity dev --migrate-routes')}`);
|
|
762
752
|
tui.newline();
|
|
763
|
-
const result = performMigration(rootDir, routeFiles);
|
|
764
753
|
|
|
765
|
-
|
|
766
|
-
tui.success(result.message);
|
|
767
|
-
if (result.filesCreated.length > 0) {
|
|
768
|
-
tui.info(`Created: ${result.filesCreated.map((f) => tui.muted(f)).join(', ')}`);
|
|
769
|
-
}
|
|
770
|
-
if (result.filesModified.length > 0) {
|
|
771
|
-
tui.info(`Modified: ${result.filesModified.map((f) => tui.muted(f)).join(', ')}`);
|
|
772
|
-
}
|
|
773
|
-
tui.newline();
|
|
774
|
-
tui.info('Your existing route files were not changed — they already export routers.');
|
|
775
|
-
tui.newline();
|
|
776
|
-
} else {
|
|
777
|
-
tui.warning(result.message);
|
|
778
|
-
tui.newline();
|
|
779
|
-
}
|
|
754
|
+
writeMigrationState(rootDir, 'notified');
|
|
780
755
|
|
|
781
|
-
return
|
|
756
|
+
return false;
|
|
782
757
|
}
|