@stainless-api/docs 0.1.0-beta.53 → 0.1.0-beta.56

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.
@@ -11,12 +11,12 @@ config();
11
11
 
12
12
  const envSchema = z.object({
13
13
  // absolute path to the Stainless monorepo root
14
- STAINLESS_MONOREPO_PATH: z.string(),
14
+ STAINLESS_ROOT: z.string(),
15
15
  });
16
16
 
17
17
  const env = envSchema.parse(process.env);
18
18
 
19
- console.log(`Using Stainless monorepo at ${env.STAINLESS_MONOREPO_PATH}`);
19
+ console.log(`Using Stainless monorepo at ${env.STAINLESS_ROOT}`);
20
20
 
21
21
  if (fs.existsSync(DEPS_DIR)) {
22
22
  fs.rmSync(DEPS_DIR, { recursive: true });
@@ -25,11 +25,11 @@ if (fs.existsSync(DEPS_DIR)) {
25
25
  fs.mkdirSync(DEPS_DIR, { recursive: true });
26
26
 
27
27
  const previewWorkerPath = path.join(
28
- env.STAINLESS_MONOREPO_PATH,
28
+ env.STAINLESS_ROOT,
29
29
  '/packages/preview-worker/dist/stainless/preview.worker.docs.js',
30
30
  );
31
31
 
32
- const readmeTemplatePath = path.join(env.STAINLESS_MONOREPO_PATH, '/legacy-dir-root/templates');
32
+ const readmeTemplatePath = path.join(env.STAINLESS_ROOT, '/legacy-dir-root/templates');
33
33
 
34
34
  fs.copyFileSync(previewWorkerPath, path.join(DEPS_DIR, 'preview.worker.docs.js'));
35
35
 
package/stl-docs/index.ts CHANGED
@@ -197,7 +197,7 @@ function stainlessDocsIntegration(
197
197
  'astro:build:done': ({ dir }) => {
198
198
  if (redirects !== null) {
199
199
  const stainlessDir = join(dir.pathname, '_stainless');
200
- mkdirSync(stainlessDir);
200
+ mkdirSync(stainlessDir, { recursive: true });
201
201
  const outputPath = join(stainlessDir, 'redirects.json');
202
202
  writeFileSync(outputPath, JSON.stringify(redirects, null, 2), {
203
203
  encoding: 'utf-8',
@@ -1,3 +1,7 @@
1
+ declare module 'virtual:stl-playground/create' {
2
+ export const createPlayground: CreatePlayground;
3
+ }
4
+
1
5
  declare module 'virtual:stl-starlight-virtual-module' {
2
6
  import type { CreateShikiHighlighterOptions } from '@astrojs/markdown-remark';
3
7
  import type { PropertySettingsType } from '@stainless-api/docs-ui/contexts';
@@ -15,6 +19,7 @@ declare module 'virtual:stl-starlight-virtual-module' {
15
19
  export const CONTENT_PANEL_LAYOUT: 'double-pane' | 'single-pane';
16
20
  export const EXPERIMENTAL_COLLAPSIBLE_SNIPPETS: boolean | undefined;
17
21
  export const EXPERIMENTAL_COLLAPSIBLE_METHOD_DESCRIPTIONS: boolean | undefined;
22
+ export const EXPERIMENTAL_PLAYGROUNDS: boolean | undefined;
18
23
  export const PROPERTY_SETTINGS: PropertySettingsType;
19
24
  export const MIDDLEWARE: StlStarlightMiddleware;
20
25
  export const ENABLE_CONTEXT_MENU: boolean;