@stainless-api/docs 0.1.0-beta.130 → 0.1.0-beta.132
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/CHANGELOG.md +18 -0
- package/package.json +3 -3
- package/plugin/loadPluginConfig.ts +6 -16
- package/plugin/vendor/preview.worker.docs.js +7748 -7333
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @stainless-api/docs
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.132
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 53772cd: Improve handling of invalid refs
|
|
8
|
+
- 6091b54: Allow local files for builds
|
|
9
|
+
- Updated dependencies [53772cd]
|
|
10
|
+
- @stainless-api/docs-ui@0.1.0-beta.95
|
|
11
|
+
- @stainless-api/docs-search@0.1.0-beta.48
|
|
12
|
+
|
|
13
|
+
## 0.1.0-beta.131
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [be32bea]
|
|
18
|
+
- @stainless-api/docs-ui@0.1.0-beta.94
|
|
19
|
+
- @stainless-api/docs-search@0.1.0-beta.47
|
|
20
|
+
|
|
3
21
|
## 0.1.0-beta.130
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.132",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"unified": "^11.0.5",
|
|
65
65
|
"vite-plugin-prebundle-workers": "^0.2.0",
|
|
66
66
|
"web-worker": "^1.5.0",
|
|
67
|
-
"@stainless-api/docs-search": "0.1.0-beta.
|
|
68
|
-
"@stainless-api/docs-ui": "0.1.0-beta.
|
|
67
|
+
"@stainless-api/docs-search": "0.1.0-beta.48",
|
|
68
|
+
"@stainless-api/docs-ui": "0.1.0-beta.95",
|
|
69
69
|
"@stainless-api/ui-primitives": "0.1.0-beta.53"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
@@ -203,11 +203,7 @@ function resolvePath(inputPath: string) {
|
|
|
203
203
|
return path.resolve(process.cwd(), inputPath);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
function getLocalFilePaths(
|
|
207
|
-
if (command !== 'dev') {
|
|
208
|
-
return null;
|
|
209
|
-
}
|
|
210
|
-
|
|
206
|
+
function getLocalFilePaths() {
|
|
211
207
|
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
|
212
208
|
const oasPath = process.env.OPENAPI_PATH;
|
|
213
209
|
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
|
@@ -295,10 +291,7 @@ type ResolvedAPIConfigEntry = {
|
|
|
295
291
|
loadSpecs: () => Promise<SpecCacheResult[]>;
|
|
296
292
|
};
|
|
297
293
|
|
|
298
|
-
function makeSimpleAPIConfig(
|
|
299
|
-
partial: SomeStainlessStarlightUserConfig,
|
|
300
|
-
astroOptions: AstroOptions,
|
|
301
|
-
): ResolvedAPIConfigEntry {
|
|
294
|
+
function makeSimpleAPIConfig(partial: SomeStainlessStarlightUserConfig): ResolvedAPIConfigEntry {
|
|
302
295
|
if (!('stainlessProject' in partial)) {
|
|
303
296
|
throw new Error('You must provide a stainlessProject when using Stainless Starlight');
|
|
304
297
|
}
|
|
@@ -308,7 +301,7 @@ function makeSimpleAPIConfig(
|
|
|
308
301
|
const apiKey = loadApiKey(partial.apiKey);
|
|
309
302
|
|
|
310
303
|
function getResolver() {
|
|
311
|
-
const localFilePaths = getLocalFilePaths(
|
|
304
|
+
const localFilePaths = getLocalFilePaths();
|
|
312
305
|
if (localFilePaths) {
|
|
313
306
|
return resolveSpec.fromFiles({
|
|
314
307
|
oasPath: localFilePaths.oasPath,
|
|
@@ -357,10 +350,7 @@ function makeSimpleAPIConfig(
|
|
|
357
350
|
};
|
|
358
351
|
}
|
|
359
352
|
|
|
360
|
-
function loadAPIConfig(
|
|
361
|
-
partial: SomeStainlessStarlightUserConfig,
|
|
362
|
-
astroOptions: AstroOptions,
|
|
363
|
-
): ResolvedAPIConfigEntry {
|
|
353
|
+
function loadAPIConfig(partial: SomeStainlessStarlightUserConfig): ResolvedAPIConfigEntry {
|
|
364
354
|
if (partial.advanced?.overrideSpecs) {
|
|
365
355
|
const overrides = partial.advanced.overrideSpecs;
|
|
366
356
|
const apiKey = loadApiKey(partial.apiKey);
|
|
@@ -375,7 +365,7 @@ function loadAPIConfig(
|
|
|
375
365
|
},
|
|
376
366
|
};
|
|
377
367
|
}
|
|
378
|
-
return makeSimpleAPIConfig(partial
|
|
368
|
+
return makeSimpleAPIConfig(partial);
|
|
379
369
|
}
|
|
380
370
|
|
|
381
371
|
function normalizeConfig(partial: SomeStainlessStarlightUserConfig, astroOptions: AstroOptions) {
|
|
@@ -418,7 +408,7 @@ function normalizeConfig(partial: SomeStainlessStarlightUserConfig, astroOptions
|
|
|
418
408
|
},
|
|
419
409
|
};
|
|
420
410
|
|
|
421
|
-
const api = loadAPIConfig(partial
|
|
411
|
+
const api = loadAPIConfig(partial);
|
|
422
412
|
|
|
423
413
|
return {
|
|
424
414
|
...configWithDefaults,
|