@syengup/friday-channel-next 0.0.26 → 0.0.27
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/{install.js → cli.js} +11 -30
- package/package.json +3 -4
package/{install.js → cli.js}
RENAMED
|
@@ -29,9 +29,7 @@ function realHome() {
|
|
|
29
29
|
const USER_HOME = realHome();
|
|
30
30
|
const PLUGIN_DIR = process.argv[2] || join(USER_HOME, ".openclaw", "extensions", "friday-channel-next");
|
|
31
31
|
const OPENCLAW_CONFIG = join(USER_HOME, ".openclaw", "openclaw.json");
|
|
32
|
-
const REPO_URL = process.env.FRIDAY_NEXT_REPO || "https://github.com/SyengUp/openclaw-fridaynext-channel.git";
|
|
33
32
|
|
|
34
|
-
const G = (s) => `\x1b[32m${s}\x1b[0m`;
|
|
35
33
|
const Y = (s) => `\x1b[33m${s}\x1b[0m`;
|
|
36
34
|
const R = (s) => `\x1b[31m${s}\x1b[0m`;
|
|
37
35
|
function log(msg) {
|
|
@@ -137,37 +135,20 @@ function copyFromNpmPackage() {
|
|
|
137
135
|
});
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
if (
|
|
138
|
+
if (isRunningFromNpmPackage()) {
|
|
139
|
+
copyFromNpmPackage();
|
|
140
|
+
} else if (existsSync(PLUGIN_DIR)) {
|
|
141
141
|
log(`Plugin directory found: ${PLUGIN_DIR}`);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
warn("Could not update from git — continuing with existing source.");
|
|
149
|
-
}
|
|
150
|
-
} else if (isRunningFromNpmPackage()) {
|
|
151
|
-
copyFromNpmPackage();
|
|
152
|
-
} else {
|
|
153
|
-
// No .git, running locally — re-execute via npx to get the latest
|
|
154
|
-
log("Updating via npx...");
|
|
155
|
-
try {
|
|
156
|
-
execSync("npx -y @syengup/friday-channel-next", { stdio: "inherit" });
|
|
157
|
-
process.exit(0);
|
|
158
|
-
} catch {
|
|
159
|
-
warn("Could not update via npx — continuing with existing source.");
|
|
160
|
-
}
|
|
142
|
+
log("Updating via npx...");
|
|
143
|
+
try {
|
|
144
|
+
execSync("npx -y @syengup/friday-channel-next", { stdio: "inherit" });
|
|
145
|
+
process.exit(0);
|
|
146
|
+
} catch {
|
|
147
|
+
warn("Could not update via npx — continuing with existing source.");
|
|
161
148
|
}
|
|
162
|
-
} else if (isRunningFromNpmPackage()) {
|
|
163
|
-
copyFromNpmPackage();
|
|
164
149
|
} else {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
process.exit(1);
|
|
168
|
-
}
|
|
169
|
-
log(`Cloning plugin to ${PLUGIN_DIR} ...`);
|
|
170
|
-
execSync(`git clone "${REPO_URL}" "${PLUGIN_DIR}"`, { stdio: "inherit" });
|
|
150
|
+
err("This plugin is installed via npx. Run: npx -y @syengup/friday-channel-next");
|
|
151
|
+
process.exit(1);
|
|
171
152
|
}
|
|
172
153
|
|
|
173
154
|
process.chdir(PLUGIN_DIR);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syengup/friday-channel-next",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "OpenClaw Friday Next Apple channel plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"index.ts",
|
|
8
8
|
"src/",
|
|
9
|
-
"
|
|
9
|
+
"cli.js",
|
|
10
10
|
"tsconfig.json",
|
|
11
11
|
"openclaw.plugin.json"
|
|
12
12
|
],
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
"test:msg-live": "node scripts/message-roundtrip-live.mjs"
|
|
20
20
|
},
|
|
21
21
|
"bin": {
|
|
22
|
-
"friday-channel-next": "./
|
|
23
|
-
"install-friday-next": "./install.js"
|
|
22
|
+
"friday-channel-next": "./cli.js"
|
|
24
23
|
},
|
|
25
24
|
"main": "./dist/index.js",
|
|
26
25
|
"types": "./dist/index.d.ts",
|