@only1btayy/g2w 1.0.6 → 1.0.8

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.
Files changed (2) hide show
  1. package/lib/install.js +10 -1
  2. package/package.json +1 -1
package/lib/install.js CHANGED
@@ -2,6 +2,15 @@ const fs = require('fs');
2
2
  const path = require('path');
3
3
  const os = require('os');
4
4
  const { LOGO } = require('./logo');
5
+
6
+ function writeTTY(text) {
7
+ try {
8
+ const { spawnSync } = require('child_process');
9
+ spawnSync(process.execPath, ['-e', `process.stdout.write(${JSON.stringify(text)})`], { stdio: 'inherit' });
10
+ } catch {
11
+ process.stderr.write(text);
12
+ }
13
+ }
5
14
  const SKILLS_SRC = path.join(__dirname, '../skills');
6
15
 
7
16
  const G2W_HOOKS = {
@@ -113,7 +122,7 @@ async function run() {
113
122
  const { dest, count } = copySkills(base);
114
123
  const settingsPath = mergeHooks(base);
115
124
 
116
- process.stderr.write(`${LOGO}
125
+ writeTTY(`${LOGO}
117
126
  \x1b[32m✅ G2W installed at ${label}\x1b[0m
118
127
 
119
128
  ${count} skills → ${path.join(label, 'skills/g2w/')}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@only1btayy/g2w",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "G2W — a relationship protocol for building trust with AI",
5
5
  "bin": {
6
6
  "g2w": "bin/g2w.js"