@orderful/droid 0.27.1 → 0.27.2
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/CHANGELOG.md +16 -0
- package/dist/bin/droid.js +18 -6
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/commands/update.ts +22 -6
- package/src/lib/migrations.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @orderful/droid
|
|
2
2
|
|
|
3
|
+
## 0.27.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#150](https://github.com/Orderful/droid/pull/150) [`07bffaa`](https://github.com/Orderful/droid/commit/07bffaab1a55363e0b12d7cb2e035dcdae113c8d) Thanks [@frytyler](https://github.com/frytyler)! - Fix config migration not running for users on v0.27.1 and npm cache issues
|
|
8
|
+
|
|
9
|
+
**Bug fix:**
|
|
10
|
+
- Change migration version from v0.27.0 to v0.27.2 to ensure it runs for users already on v0.27.1
|
|
11
|
+
- Add npm cache clear before update to prevent stale package installations
|
|
12
|
+
- Fixes TUI continuing to show tools as not installed after upgrade
|
|
13
|
+
|
|
14
|
+
**Technical details:**
|
|
15
|
+
- Migration was added in v0.27.1 but marked as v0.27.0, causing it to be skipped for users upgrading from v0.27.0 to v0.27.1
|
|
16
|
+
- Update command now runs `npm cache clean --force` before installing to prevent cached packages from being served
|
|
17
|
+
- Migration will now run when users upgrade to v0.27.2
|
|
18
|
+
|
|
3
19
|
## 0.27.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/bin/droid.js
CHANGED
|
@@ -652,7 +652,7 @@ function createConfigSkillNameMigration(version2) {
|
|
|
652
652
|
}
|
|
653
653
|
var PACKAGE_MIGRATIONS = [
|
|
654
654
|
createPlatformSyncMigration("0.25.0"),
|
|
655
|
-
createConfigSkillNameMigration("0.27.
|
|
655
|
+
createConfigSkillNameMigration("0.27.2")
|
|
656
656
|
];
|
|
657
657
|
var TOOL_MIGRATIONS = {
|
|
658
658
|
brain: [createConfigDirMigration("droid-brain", "0.2.3")],
|
|
@@ -1762,21 +1762,32 @@ import { execSync as execSync4 } from "child_process";
|
|
|
1762
1762
|
async function updateCommand(tool, options) {
|
|
1763
1763
|
if (tool) {
|
|
1764
1764
|
console.log(chalk8.yellow("\n\u26A0 Per-tool updates not implemented yet"));
|
|
1765
|
-
console.log(
|
|
1765
|
+
console.log(
|
|
1766
|
+
chalk8.gray(
|
|
1767
|
+
"Tools are bundled with the CLI - run `droid update` to update all."
|
|
1768
|
+
)
|
|
1769
|
+
);
|
|
1766
1770
|
return;
|
|
1767
1771
|
}
|
|
1768
1772
|
if (options?.tools) {
|
|
1769
1773
|
console.log(chalk8.yellow("\n\u26A0 Tool-only updates not implemented yet"));
|
|
1770
|
-
console.log(
|
|
1774
|
+
console.log(
|
|
1775
|
+
chalk8.gray(
|
|
1776
|
+
"Tools are bundled with the CLI - run `droid update` to update all."
|
|
1777
|
+
)
|
|
1778
|
+
);
|
|
1771
1779
|
return;
|
|
1772
1780
|
}
|
|
1773
1781
|
console.log(chalk8.bold("\n\u{1F916} Updating Droid...\n"));
|
|
1774
1782
|
const currentVersion = getVersion();
|
|
1775
1783
|
console.log(chalk8.gray(`Current version: ${currentVersion}`));
|
|
1776
1784
|
try {
|
|
1777
|
-
const latestVersion = execSync4(
|
|
1778
|
-
|
|
1779
|
-
|
|
1785
|
+
const latestVersion = execSync4(
|
|
1786
|
+
"npm view @orderful/droid version 2>/dev/null",
|
|
1787
|
+
{
|
|
1788
|
+
encoding: "utf-8"
|
|
1789
|
+
}
|
|
1790
|
+
).trim();
|
|
1780
1791
|
if (!latestVersion) {
|
|
1781
1792
|
console.log(chalk8.yellow("\n\u26A0 Could not check for updates"));
|
|
1782
1793
|
return;
|
|
@@ -1787,6 +1798,7 @@ async function updateCommand(tool, options) {
|
|
|
1787
1798
|
}
|
|
1788
1799
|
console.log(chalk8.gray(`Latest version: ${latestVersion}`));
|
|
1789
1800
|
console.log(chalk8.gray("\nUpdating..."));
|
|
1801
|
+
execSync4("npm cache clean --force 2>/dev/null", { stdio: "pipe" });
|
|
1790
1802
|
execSync4("npm install -g @orderful/droid@latest", { stdio: "inherit" });
|
|
1791
1803
|
console.log(chalk8.green(`
|
|
1792
1804
|
\u2713 Updated to v${latestVersion}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,aAAa,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,aAAa,CACjC,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,IAAI,CAAC,CA6Df"}
|
package/dist/index.js
CHANGED
|
@@ -615,7 +615,7 @@ function createConfigSkillNameMigration(version) {
|
|
|
615
615
|
}
|
|
616
616
|
var PACKAGE_MIGRATIONS = [
|
|
617
617
|
createPlatformSyncMigration("0.25.0"),
|
|
618
|
-
createConfigSkillNameMigration("0.27.
|
|
618
|
+
createConfigSkillNameMigration("0.27.2")
|
|
619
619
|
];
|
|
620
620
|
var TOOL_MIGRATIONS = {
|
|
621
621
|
brain: [createConfigDirMigration("droid-brain", "0.2.3")],
|
package/package.json
CHANGED
package/src/commands/update.ts
CHANGED
|
@@ -7,18 +7,29 @@ interface UpdateOptions {
|
|
|
7
7
|
cli?: boolean;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export async function updateCommand(
|
|
10
|
+
export async function updateCommand(
|
|
11
|
+
tool?: string,
|
|
12
|
+
options?: UpdateOptions,
|
|
13
|
+
): Promise<void> {
|
|
11
14
|
// If specific tool specified, update just that tool
|
|
12
15
|
if (tool) {
|
|
13
16
|
console.log(chalk.yellow('\n⚠ Per-tool updates not implemented yet'));
|
|
14
|
-
console.log(
|
|
17
|
+
console.log(
|
|
18
|
+
chalk.gray(
|
|
19
|
+
'Tools are bundled with the CLI - run `droid update` to update all.',
|
|
20
|
+
),
|
|
21
|
+
);
|
|
15
22
|
return;
|
|
16
23
|
}
|
|
17
24
|
|
|
18
25
|
// If --tools flag, update tools only
|
|
19
26
|
if (options?.tools) {
|
|
20
27
|
console.log(chalk.yellow('\n⚠ Tool-only updates not implemented yet'));
|
|
21
|
-
console.log(
|
|
28
|
+
console.log(
|
|
29
|
+
chalk.gray(
|
|
30
|
+
'Tools are bundled with the CLI - run `droid update` to update all.',
|
|
31
|
+
),
|
|
32
|
+
);
|
|
22
33
|
return;
|
|
23
34
|
}
|
|
24
35
|
|
|
@@ -30,9 +41,12 @@ export async function updateCommand(tool?: string, options?: UpdateOptions): Pro
|
|
|
30
41
|
|
|
31
42
|
try {
|
|
32
43
|
// Check for latest version
|
|
33
|
-
const latestVersion = execSync(
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
const latestVersion = execSync(
|
|
45
|
+
'npm view @orderful/droid version 2>/dev/null',
|
|
46
|
+
{
|
|
47
|
+
encoding: 'utf-8',
|
|
48
|
+
},
|
|
49
|
+
).trim();
|
|
36
50
|
|
|
37
51
|
if (!latestVersion) {
|
|
38
52
|
console.log(chalk.yellow('\n⚠ Could not check for updates'));
|
|
@@ -47,6 +61,8 @@ export async function updateCommand(tool?: string, options?: UpdateOptions): Pro
|
|
|
47
61
|
console.log(chalk.gray(`Latest version: ${latestVersion}`));
|
|
48
62
|
console.log(chalk.gray('\nUpdating...'));
|
|
49
63
|
|
|
64
|
+
// Clear npm cache to ensure fresh install
|
|
65
|
+
execSync('npm cache clean --force 2>/dev/null', { stdio: 'pipe' });
|
|
50
66
|
execSync('npm install -g @orderful/droid@latest', { stdio: 'inherit' });
|
|
51
67
|
|
|
52
68
|
console.log(chalk.green(`\n✓ Updated to v${latestVersion}`));
|
package/src/lib/migrations.ts
CHANGED
|
@@ -217,7 +217,7 @@ function createConfigSkillNameMigration(version: string): Migration {
|
|
|
217
217
|
*/
|
|
218
218
|
const PACKAGE_MIGRATIONS: Migration[] = [
|
|
219
219
|
createPlatformSyncMigration('0.25.0'),
|
|
220
|
-
createConfigSkillNameMigration('0.27.
|
|
220
|
+
createConfigSkillNameMigration('0.27.2'),
|
|
221
221
|
];
|
|
222
222
|
|
|
223
223
|
/**
|