@web42/cli 0.1.12 → 0.1.14
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/commands/push.js +2 -2
- package/dist/utils/sync.d.ts +1 -0
- package/dist/utils/sync.js +12 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/commands/push.js
CHANGED
|
@@ -7,7 +7,7 @@ import { apiPost, apiFormData } from "../utils/api.js";
|
|
|
7
7
|
import { requireAuth } from "../utils/config.js";
|
|
8
8
|
import { openclawAdapter } from "../platforms/openclaw/adapter.js";
|
|
9
9
|
import { parseSkillMd } from "../utils/skill.js";
|
|
10
|
-
import { buildLocalSnapshot, computeHashFromSnapshot, findLocalAvatar, readResourcesMeta, readSyncState, writeSyncState, } from "../utils/sync.js";
|
|
10
|
+
import { buildLocalSnapshot, computeHashFromSnapshot, findLocalAvatar, findAgentAvatar, readResourcesMeta, readSyncState, writeSyncState, } from "../utils/sync.js";
|
|
11
11
|
function mimeFromExtension(ext) {
|
|
12
12
|
const map = {
|
|
13
13
|
png: "image/png",
|
|
@@ -157,7 +157,7 @@ export const pushCommand = new Command("push")
|
|
|
157
157
|
// -------------------------------------------------------------------
|
|
158
158
|
// Step 6: Upload avatar if present
|
|
159
159
|
// -------------------------------------------------------------------
|
|
160
|
-
const avatarPath = findLocalAvatar(cwd);
|
|
160
|
+
const avatarPath = findLocalAvatar(cwd) || findAgentAvatar(cwd);
|
|
161
161
|
if (avatarPath) {
|
|
162
162
|
spinner.text = "Uploading avatar...";
|
|
163
163
|
const ext = avatarPath.split(".").pop() ?? "png";
|
package/dist/utils/sync.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare function writeSyncState(cwd: string, state: SyncState): void;
|
|
|
7
7
|
export declare function readMarketplace(cwd: string): MarketplaceConfig;
|
|
8
8
|
export declare function writeMarketplace(cwd: string, data: MarketplaceConfig): void;
|
|
9
9
|
export declare function findLocalAvatar(cwd: string): string | null;
|
|
10
|
+
export declare function findAgentAvatar(cwd: string): string | null;
|
|
10
11
|
export declare function readResourcesMeta(cwd: string): ResourceMeta[];
|
|
11
12
|
export declare function writeResourcesMeta(cwd: string, meta: ResourceMeta[]): void;
|
|
12
13
|
export declare function buildLocalSnapshot(cwd: string): AgentSnapshot;
|
package/dist/utils/sync.js
CHANGED
|
@@ -112,6 +112,18 @@ export function findLocalAvatar(cwd) {
|
|
|
112
112
|
}
|
|
113
113
|
return null;
|
|
114
114
|
}
|
|
115
|
+
export function findAgentAvatar(cwd) {
|
|
116
|
+
const avatarSearchPaths = [
|
|
117
|
+
join(cwd, "avatar/avatar.png"),
|
|
118
|
+
join(cwd, "avatars/avatar.png"),
|
|
119
|
+
join(cwd, "avatar.png"),
|
|
120
|
+
];
|
|
121
|
+
for (const ap of avatarSearchPaths) {
|
|
122
|
+
if (existsSync(ap))
|
|
123
|
+
return ap;
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
115
127
|
// ---------------------------------------------------------------------------
|
|
116
128
|
// .web42/resources.json + .web42/resources/
|
|
117
129
|
// ---------------------------------------------------------------------------
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.1.
|
|
1
|
+
export declare const CLI_VERSION = "0.1.14";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.1.
|
|
1
|
+
export const CLI_VERSION = "0.1.14";
|