@lume.produtos/intelidente-agent-tools 1.0.1 → 1.0.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.
|
@@ -4,6 +4,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
4
4
|
import fs from 'node:fs';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import process from 'node:process';
|
|
7
|
+
import os from 'node:os';
|
|
7
8
|
|
|
8
9
|
/*
|
|
9
10
|
|--------------------------------------------------------------------------
|
|
@@ -57,11 +58,9 @@ const targets = targetArg
|
|
|
57
58
|
? targetArg
|
|
58
59
|
.replace('--targets=', '')
|
|
59
60
|
.split(/[,\s]+/)
|
|
60
|
-
.map(item => item.trim())
|
|
61
|
+
.map(item => item.trim().toLowerCase())
|
|
61
62
|
.filter(Boolean)
|
|
62
63
|
: ['claude', 'codex'];
|
|
63
|
-
|
|
64
|
-
console.log(targets);
|
|
65
64
|
|
|
66
65
|
/*
|
|
67
66
|
|--------------------------------------------------------------------------
|
|
@@ -96,6 +95,8 @@ if (!name) {
|
|
|
96
95
|
|
|
97
96
|
const projectPath = process.cwd();
|
|
98
97
|
|
|
98
|
+
const userHome = os.homedir();
|
|
99
|
+
|
|
99
100
|
const __filename = fileURLToPath(import.meta.url);
|
|
100
101
|
const __dirname = path.dirname(__filename);
|
|
101
102
|
|
|
@@ -105,6 +106,8 @@ const packagePath = path.resolve(__dirname, '..');
|
|
|
105
106
|
|--------------------------------------------------------------------------
|
|
106
107
|
| Claude
|
|
107
108
|
|--------------------------------------------------------------------------
|
|
109
|
+
| Claude fica LOCAL no projeto
|
|
110
|
+
|--------------------------------------------------------------------------
|
|
108
111
|
*/
|
|
109
112
|
|
|
110
113
|
if (targets.includes('claude')) {
|
|
@@ -141,7 +144,7 @@ if (targets.includes('claude')) {
|
|
|
141
144
|
fs.copyFileSync(claudeSource, claudeTarget);
|
|
142
145
|
|
|
143
146
|
console.log(
|
|
144
|
-
`✓ Claude command instalado: ${
|
|
147
|
+
`✓ Claude command instalado: ${claudeTarget}`
|
|
145
148
|
);
|
|
146
149
|
}
|
|
147
150
|
|
|
@@ -149,6 +152,8 @@ if (targets.includes('claude')) {
|
|
|
149
152
|
|--------------------------------------------------------------------------
|
|
150
153
|
| Codex
|
|
151
154
|
|--------------------------------------------------------------------------
|
|
155
|
+
| Codex fica GLOBAL no usuário
|
|
156
|
+
|--------------------------------------------------------------------------
|
|
152
157
|
*/
|
|
153
158
|
|
|
154
159
|
if (targets.includes('codex')) {
|
|
@@ -163,7 +168,7 @@ if (targets.includes('codex')) {
|
|
|
163
168
|
);
|
|
164
169
|
|
|
165
170
|
const codexTarget = path.join(
|
|
166
|
-
|
|
171
|
+
userHome,
|
|
167
172
|
'.codex',
|
|
168
173
|
'skills',
|
|
169
174
|
name
|
|
@@ -181,7 +186,7 @@ if (targets.includes('codex')) {
|
|
|
181
186
|
copyDir(codexSource, codexTarget);
|
|
182
187
|
|
|
183
188
|
console.log(
|
|
184
|
-
`✓ Codex skill instalada: ${
|
|
189
|
+
`✓ Codex skill instalada: ${codexTarget}`
|
|
185
190
|
);
|
|
186
191
|
}
|
|
187
192
|
|