@sowonai/crewx-sdk 0.7.8-rc.13 → 0.7.8-rc.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/package.json +4 -9
- package/scripts/postinstall-sdk.mjs +0 -74
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sowonai/crewx-sdk",
|
|
3
|
-
"version": "0.7.8-rc.
|
|
3
|
+
"version": "0.7.8-rc.14",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.19.0"
|
|
7
|
+
},
|
|
5
8
|
"description": "SowonAI CrewX SDK",
|
|
6
9
|
"type": "commonjs",
|
|
7
10
|
"main": "dist/index.js",
|
|
@@ -9,13 +12,11 @@
|
|
|
9
12
|
"types": "dist/index.d.ts",
|
|
10
13
|
"files": [
|
|
11
14
|
"dist",
|
|
12
|
-
"scripts",
|
|
13
15
|
"schema",
|
|
14
16
|
"README.md",
|
|
15
17
|
"LICENSE"
|
|
16
18
|
],
|
|
17
19
|
"scripts": {
|
|
18
|
-
"postinstall": "node ./scripts/postinstall-sdk.mjs",
|
|
19
20
|
"build": "tsc -p tsconfig.json",
|
|
20
21
|
"test": "vitest run --config ./vitest.config.ts",
|
|
21
22
|
"test:watch": "vitest --config ./vitest.config.ts",
|
|
@@ -58,7 +59,6 @@
|
|
|
58
59
|
}
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
|
-
"@sindresorhus/slugify": "1.1.2",
|
|
62
62
|
"@ai-sdk/anthropic": "^1.0.8",
|
|
63
63
|
"@ai-sdk/google": "^1.0.10",
|
|
64
64
|
"@ai-sdk/openai": "^1.0.11",
|
|
@@ -86,12 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@types/js-yaml": "^4.0.9",
|
|
89
|
-
"@types/mdast": "^4.0.4",
|
|
90
|
-
"@types/unist": "^3.0.3",
|
|
91
89
|
"dotenv": "^17.2.3",
|
|
92
90
|
"typescript": "^5.0.0"
|
|
93
|
-
},
|
|
94
|
-
"overrides": {
|
|
95
|
-
"@sindresorhus/slugify": "1.1.2"
|
|
96
91
|
}
|
|
97
92
|
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* postinstall hook to fix @sindresorhus/slugify ESM-only issue.
|
|
4
|
-
* Forces installation of CommonJS-compatible version 1.1.2.
|
|
5
|
-
*
|
|
6
|
-
* Issue: @mastra/core depends on @sindresorhus/slugify@^2.x which is ESM-only,
|
|
7
|
-
* but our package is CommonJS. This causes ERR_REQUIRE_ESM errors on npm install.
|
|
8
|
-
*/
|
|
9
|
-
import { execSync } from 'child_process';
|
|
10
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, cpSync } from 'fs';
|
|
11
|
-
import { dirname, join } from 'path';
|
|
12
|
-
import { fileURLToPath } from 'url';
|
|
13
|
-
|
|
14
|
-
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
15
|
-
const packageRoot = dirname(scriptDir);
|
|
16
|
-
|
|
17
|
-
// Find node_modules - could be at package level or hoisted to root
|
|
18
|
-
const findSlugifyPath = () => {
|
|
19
|
-
const candidates = [
|
|
20
|
-
join(packageRoot, 'node_modules', '@sindresorhus', 'slugify'),
|
|
21
|
-
join(packageRoot, '..', '..', 'node_modules', '@sindresorhus', 'slugify'),
|
|
22
|
-
join(packageRoot, '..', 'node_modules', '@sindresorhus', 'slugify'),
|
|
23
|
-
];
|
|
24
|
-
return candidates.find(p => existsSync(p));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const slugifyPath = findSlugifyPath();
|
|
28
|
-
|
|
29
|
-
if (!slugifyPath) {
|
|
30
|
-
console.log('ℹ️ @sindresorhus/slugify not found, skipping postinstall fix');
|
|
31
|
-
process.exit(0);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Check current version
|
|
35
|
-
try {
|
|
36
|
-
const pkgPath = join(slugifyPath, 'package.json');
|
|
37
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
38
|
-
|
|
39
|
-
if (pkg.version === '1.1.2') {
|
|
40
|
-
console.log('✅ @sindresorhus/slugify@1.1.2 already installed');
|
|
41
|
-
process.exit(0);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
console.log(`⚠️ Found @sindresorhus/slugify@${pkg.version} (ESM-only), replacing with 1.1.2...`);
|
|
45
|
-
|
|
46
|
-
// Remove the ESM-only version
|
|
47
|
-
rmSync(slugifyPath, { recursive: true, force: true });
|
|
48
|
-
|
|
49
|
-
// Install CommonJS-compatible version
|
|
50
|
-
const parentDir = dirname(dirname(slugifyPath)); // node_modules
|
|
51
|
-
execSync(`npm pack @sindresorhus/slugify@1.1.2 --pack-destination="${parentDir}"`, {
|
|
52
|
-
cwd: parentDir,
|
|
53
|
-
stdio: 'pipe'
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// Extract the package
|
|
57
|
-
const tarball = join(parentDir, 'sindresorhus-slugify-1.1.2.tgz');
|
|
58
|
-
execSync(`tar -xzf "${tarball}" -C "${parentDir}"`, { stdio: 'pipe' });
|
|
59
|
-
|
|
60
|
-
// Move package to correct location
|
|
61
|
-
const extractedDir = join(parentDir, 'package');
|
|
62
|
-
mkdirSync(dirname(slugifyPath), { recursive: true });
|
|
63
|
-
cpSync(extractedDir, slugifyPath, { recursive: true });
|
|
64
|
-
|
|
65
|
-
// Cleanup
|
|
66
|
-
rmSync(tarball, { force: true });
|
|
67
|
-
rmSync(extractedDir, { recursive: true, force: true });
|
|
68
|
-
|
|
69
|
-
console.log('✅ Replaced with @sindresorhus/slugify@1.1.2 (CommonJS compatible)');
|
|
70
|
-
|
|
71
|
-
} catch (err) {
|
|
72
|
-
console.warn('⚠️ postinstall slugify fix failed:', err.message);
|
|
73
|
-
// Don't fail the install
|
|
74
|
-
}
|