codewhale.history 2.8.3 → 2.8.5
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/package.json +4 -1
- package/tools-install.js +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codewhale.history",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"description": "CodeWhale utility commands: session history, tool listing, file snapshot, interactive code quiz — global install",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codewhale-history": "./_list_sessions.js",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"instructions.md",
|
|
14
14
|
"skills"
|
|
15
15
|
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"postinstall": "codewhale-tools-install"
|
|
18
|
+
},
|
|
16
19
|
"engines": {
|
|
17
20
|
"node": ">=14"
|
|
18
21
|
}
|
package/tools-install.js
CHANGED
|
@@ -18,7 +18,9 @@ const sourceDir = __dirname;
|
|
|
18
18
|
// Parse -p flag
|
|
19
19
|
const pIndex = process.argv.indexOf('-p');
|
|
20
20
|
const workspaceArg = pIndex !== -1 ? process.argv[pIndex + 1] : null;
|
|
21
|
-
|
|
21
|
+
// When run via npm postinstall, process.cwd() is the package dir.
|
|
22
|
+
// INIT_CWD points to the project root where the user ran `npm install`.
|
|
23
|
+
const workspacePath = path.resolve(workspaceArg || process.env.INIT_CWD || process.cwd());
|
|
22
24
|
|
|
23
25
|
// ── 1. Install skills ──────────────────────────────────
|
|
24
26
|
const skillsSource = path.join(sourceDir, 'skills');
|
|
@@ -106,8 +108,7 @@ for (const [name, filePath] of Object.entries(checklist)) {
|
|
|
106
108
|
console.log('');
|
|
107
109
|
if (errors === 0) {
|
|
108
110
|
console.log('=== Installation complete! ===');
|
|
109
|
-
console.log('
|
|
110
|
-
console.log('Then type //tools, //history, //snapshot, or //teach-me in any CodeWhale session.');
|
|
111
|
+
console.log('Type //tools, //history, //snapshot, or //teach-me in any CodeWhale session.');
|
|
111
112
|
} else {
|
|
112
113
|
console.log(`=== Installation finished with ${errors} error(s). ===`);
|
|
113
114
|
}
|