Skip to content

Commit e20eb7d

Browse files
committed
cp dines
1 parent bde6207 commit e20eb7d

7 files changed

Lines changed: 134 additions & 18 deletions

File tree

package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@
2626
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
2727
"format": "prettier --write --cache --cache-strategy metadata . !dist",
2828
"prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build && ./scripts/utils/git-swap.sh; fi",
29+
"postinstall": "if [ -d node_modules/typedoc-mintlify/node_modules/typedoc ] && [ ! -L node_modules/typedoc-mintlify/node_modules/typedoc ]; then rm -rf node_modules/typedoc-mintlify/node_modules/typedoc && ln -s ../../typedoc node_modules/typedoc-mintlify/node_modules/typedoc; fi",
2930
"tsn": "ts-node -r tsconfig-paths/register",
3031
"lint": "./scripts/lint",
3132
"fix": "./scripts/format",
3233
"docs:sdk": "typedoc --options typedoc.json",
33-
"docs:sdk:markdown": "typedoc --options typedoc.markdown.json"
34+
"docs:sdk:markdown": "typedoc --options typedoc.markdown.json",
35+
"docs": "typedoc --options typedoc.json",
36+
"docs:watch": "typedoc --options typedoc.json --watch"
3437
},
3538
"dependencies": {
3639
"@types/node": "^18.11.18",
@@ -43,6 +46,10 @@
4346
"uuidv7": "^1.0.2",
4447
"zod": "^3.24.1"
4548
},
49+
"resolutions": {
50+
"typedoc": "^0.28.14",
51+
"typedoc-plugin-markdown": "^4.9.0"
52+
},
4653
"devDependencies": {
4754
"@shipgirl/typedoc-plugin-versions": "^0.3.2",
4855
"@swc/core": "^1.3.102",
@@ -62,8 +69,11 @@
6269
"tsconfig-paths": "^4.0.0",
6370
"typedoc": "^0.28.14",
6471
"typedoc-material-theme": "^1.4.1",
72+
"typedoc-mintlify": "file:../typedoc-mintlify",
73+
"typedoc-plugin-include-example": "^3.0.2",
6574
"typedoc-plugin-markdown": "^4.9.0",
66-
"typescript": "^4.8.2"
75+
"typedoc-plugin-pages": "^1.1.0",
76+
"typescript": "^5.9.0"
6777
},
6878
"sideEffects": [
6979
"./_shims/index.js",

scripts/generate-docs.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
const { execSync } = require('child_process');
2+
const fs = require('fs');
3+
const path = require('path');
4+
5+
console.log('==========================================');
6+
console.log('Generating API Client TypeScript Docs');
7+
console.log('==========================================\n');
8+
9+
console.log('Step 1: Building typedoc-mintlify plugin...');
10+
try {
11+
execSync('npm run build', {
12+
cwd: path.join(__dirname, '..', '..', 'typedoc-mintlify'),
13+
stdio: 'inherit'
14+
});
15+
console.log('✅ Plugin built successfully\n');
16+
} catch (e) {
17+
console.error('❌ Build failed:', e.message);
18+
process.exit(1);
19+
}
20+
21+
console.log('Step 2: Installing dependencies in api-client-ts...');
22+
try {
23+
execSync('yarn install', {
24+
cwd: path.join(__dirname, '..'),
25+
stdio: 'inherit'
26+
});
27+
console.log('✅ Dependencies installed\n');
28+
} catch (e) {
29+
console.error('❌ Install failed:', e.message);
30+
process.exit(1);
31+
}
32+
33+
console.log('Step 3: Generating documentation...');
34+
try {
35+
execSync('yarn docs', {
36+
cwd: path.join(__dirname, '..'),
37+
stdio: 'inherit'
38+
});
39+
console.log('✅ Documentation generated\n');
40+
} catch (e) {
41+
console.error('❌ Docs generation failed:', e.message);
42+
if (e.stdout) console.error('Stdout:', e.stdout.toString());
43+
if (e.stderr) console.error('Stderr:', e.stderr.toString());
44+
process.exit(1);
45+
}
46+
47+
console.log('Step 4: Verifying output...');
48+
const docsDir = path.join(__dirname, '..', '..', 'docs', 'reference', 'ts');
49+
if (!fs.existsSync(docsDir)) {
50+
console.error('❌ Directory does not exist:', docsDir);
51+
process.exit(1);
52+
}
53+
54+
const files = fs.readdirSync(docsDir);
55+
console.log(`✅ Found ${files.length} files`);
56+
if (files.length > 0) {
57+
files.slice(0, 10).forEach(f => console.log(` - ${f}`));
58+
} else {
59+
console.error('❌ No files generated!');
60+
process.exit(1);
61+
}
62+
63+
console.log('\n==========================================');
64+
console.log('✅ Documentation generation complete!');
65+
console.log('==========================================');

tests/smoketests/object-oriented/snapshot.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ describe('smoketest: object-oriented snapshot', () => {
121121

122122
// Verify it's deleted by trying to get info (should fail)
123123
try {
124-
await snapshot.getInfo();
124+
const status = await snapshot.getInfo();
125+
status.
125126
fail('Expected snapshot to be deleted');
126127
} catch (error) {
127128
expect(error).toBeDefined();

tsconfig.typedoc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
]
1616
}
1717

18+
19+

typedoc.json

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"src/sdk.ts"
55
],
66
"entryPointStrategy": "expand",
7-
"out": "docs",
7+
"out": "../docs/reference/ts",
88
"tsconfig": "tsconfig.typedoc.json",
99
"includeVersion": true,
1010
"readme": "README-SDK.md",
@@ -14,16 +14,17 @@
1414
"excludeInternal": false,
1515
"excludeExternals": false,
1616
"plugin": [
17-
"typedoc-material-theme",
18-
"typedoc-plugin-pages",
19-
"typedoc-plugin-include-example",
20-
"typedoc-plugin-mdn-links",
21-
"@shipgirl/typedoc-plugin-versions"
17+
"typedoc-plugin-markdown",
18+
"typedoc-mintlify"
2219
],
23-
"versions": {
24-
"makeRelativeLinks": true
25-
},
26-
"themeColor": "#1976d2",
20+
"theme": "mintlify",
21+
"mintlifyComponents": true,
22+
"generateMintlifyNav": false,
23+
"fileExtension": ".mdx",
24+
"entryFileName": "index",
25+
"flattenOutputFiles": false,
26+
"outputFileStrategy": "members",
27+
"membersWithOwnFile": ["Class", "Interface", "Function", "Enum", "TypeAlias"],
2728
"navigation": {
2829
"includeCategories": true,
2930
"includeGroups": true
@@ -57,6 +58,11 @@
5758
"validation": {
5859
"invalidLink": true,
5960
"notDocumented": false
61+
},
62+
"externalSymbolLinkMappings": {
63+
"@runloop/api-client": {
64+
"BlobLikePart": "#"
65+
}
6066
}
6167
}
6268

typedoc.markdown.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"excludeInternal": false,
1616
"excludeExternals": false,
1717
"plugin": ["typedoc-plugin-markdown"],
18+
"flattenOutputFiles": true,
19+
"entryFileName": "README.md",
1820
"categorizeByGroup": true,
1921
"searchInComments": true,
2022
"sort": [

yarn.lock

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,11 @@ combined-stream@^1.0.8:
13781378
dependencies:
13791379
delayed-stream "~1.0.0"
13801380

1381+
compare-versions@^3.6.0:
1382+
version "3.6.0"
1383+
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
1384+
integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
1385+
13811386
concat-map@0.0.1:
13821387
version "0.0.1"
13831388
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -2652,7 +2657,7 @@ lru-cache@^5.1.1:
26522657
dependencies:
26532658
yallist "^3.0.2"
26542659

2655-
lunr@^2.3.9:
2660+
lunr@^2.3.8, lunr@^2.3.9:
26562661
version "2.3.9"
26572662
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1"
26582663
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==
@@ -3356,18 +3361,43 @@ type-fest@^4.41.0:
33563361
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58"
33573362
integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==
33583363

3364+
typedoc-default-themes@^0.10.1:
3365+
version "0.10.2"
3366+
resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.10.2.tgz#743380a80afe62c5ef92ca1bd4abe2ac596be4d2"
3367+
integrity sha512-zo09yRj+xwLFE3hyhJeVHWRSPuKEIAsFK5r2u47KL/HBKqpwdUSanoaz5L34IKiSATFrjG5ywmIu98hPVMfxZg==
3368+
dependencies:
3369+
lunr "^2.3.8"
3370+
33593371
typedoc-material-theme@^1.4.1:
33603372
version "1.4.1"
33613373
resolved "https://registry.yarnpkg.com/typedoc-material-theme/-/typedoc-material-theme-1.4.1.tgz#c879e9af508775c0ea41108b8231961a798678ef"
33623374
integrity sha512-/inKZw8SqZPt+pmawpMhDmXCJQyIm+fHFuGChioyJQICZcX2FyzpwZnyPWcZHmJ09upttWFhti4ZI3hESJNkSA==
33633375
dependencies:
33643376
"@material/material-color-utilities" "^0.3.0"
33653377

3378+
"typedoc-mintlify@file:../typedoc-mintlify":
3379+
version "0.1.0"
3380+
dependencies:
3381+
typedoc-plugin-markdown "^4.9.0"
3382+
3383+
typedoc-plugin-include-example@^3.0.2:
3384+
version "3.0.2"
3385+
resolved "https://registry.yarnpkg.com/typedoc-plugin-include-example/-/typedoc-plugin-include-example-3.0.2.tgz#fc1b8bd32be4e69f6e53c618a69c485177bf4c67"
3386+
integrity sha512-A9yknAVTnWBAEl+EJgjssGYkpPdWegItYoZqddWgg39dHwlkh24zkeLZgTKucugF1BG3nm4eE+OJrDtpp1G0ww==
3387+
33663388
typedoc-plugin-markdown@^4.9.0:
33673389
version "4.9.0"
33683390
resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz#88f37ba2417fc8b93951d457a3a557682ce5e01e"
33693391
integrity sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw==
33703392

3393+
typedoc-plugin-pages@^1.1.0:
3394+
version "1.1.0"
3395+
resolved "https://registry.yarnpkg.com/typedoc-plugin-pages/-/typedoc-plugin-pages-1.1.0.tgz#c51367404b87b9b2e8cc440a53ff641c42b9fd7a"
3396+
integrity sha512-pmCCp3G2aCeEWb829dcVe9Pl+pI5OsaqfyrkEutcAHZi6IMVfQ5G5NdrkIkFCGhJU/DY04rGrVdynWqnaO5/jg==
3397+
dependencies:
3398+
compare-versions "^3.6.0"
3399+
typedoc-default-themes "^0.10.1"
3400+
33713401
typedoc@^0.28.14:
33723402
version "0.28.14"
33733403
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.28.14.tgz#f48d650efc983b5cb3034b3b0e986b1702074326"
@@ -3379,10 +3409,10 @@ typedoc@^0.28.14:
33793409
minimatch "^9.0.5"
33803410
yaml "^2.8.1"
33813411

3382-
typescript@^4.8.2:
3383-
version "4.9.5"
3384-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
3385-
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
3412+
typescript@^5.9.0:
3413+
version "5.9.3"
3414+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
3415+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
33863416

33873417
uc.micro@^2.0.0, uc.micro@^2.1.0:
33883418
version "2.1.0"

0 commit comments

Comments
 (0)