@alauda/doom 1.12.5 → 1.12.7

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/lib/eslint.js CHANGED
@@ -4,6 +4,7 @@ import cspellRecommended from '@cspell/eslint-plugin/recommended';
4
4
  import js from '@eslint/js';
5
5
  import react from '@eslint-react/eslint-plugin';
6
6
  import { merge } from 'es-toolkit/compat';
7
+ import { defineConfig } from 'eslint/config';
7
8
  import * as mdx from 'eslint-plugin-mdx';
8
9
  import globals from 'globals';
9
10
  import tseslint from 'typescript-eslint';
@@ -27,7 +28,7 @@ async function doom(cspellOptionsOrRoot) {
27
28
  cspellOptions = cspellOptionsOrRoot;
28
29
  }
29
30
  const cspellEnabled = cspellOptions !== null;
30
- return tseslint.config([
31
+ return defineConfig([
31
32
  {
32
33
  ignores: ['**/.yarn', '**/dist', '**/lib', '**/node_modules'],
33
34
  },
@@ -3,7 +3,7 @@ import { clsx } from 'clsx';
3
3
  import { useEffect, useRef, useState } from 'react';
4
4
  import { Tooltip } from 'react-tooltip';
5
5
  import { ApiMethod, interceptors, ResponseError, xfetch, } from 'x-fetch';
6
- import { useCloudAuth } from "../context.js";
6
+ import { getCloudAuth, useCloudAuth } from "../context.js";
7
7
  import { Chat } from "./Chat/index.js";
8
8
  import { Preamble } from "./Preamble/index.js";
9
9
  import { ResizableUserInput } from "./ResizableUserInput/index.js";
@@ -132,7 +132,7 @@ export const AIAssistant = ({ open, onOpenChange }) => {
132
132
  await onSend_(content);
133
133
  }
134
134
  catch {
135
- if (!sessionIdRef.current) {
135
+ if (!isLoggedIn(getCloudAuth())) {
136
136
  return;
137
137
  }
138
138
  flushMessages((messages) => {
@@ -14,6 +14,7 @@ export interface CloudAuthContext {
14
14
  }
15
15
  export declare const CloudAuthContext: import("react").Context<CloudAuthContext>;
16
16
  export declare const useCloudAuth: () => CloudAuthContext;
17
+ export declare const getCloudAuth: () => CloudAuth | null;
17
18
  export declare const CloudAuthProvider: ({ children }: {
18
19
  children: ReactNode;
19
20
  }) => import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,7 @@ import { CLOUD_AUTH_ORIGIN_KEY, CLOUD_AUTH_TOKEN_KEY } from './constants.js';
4
4
  import { getAuthInfoFromToken, setLocalStorage } from './utils.js';
5
5
  export const CloudAuthContext = createContext(null);
6
6
  export const useCloudAuth = () => use(CloudAuthContext);
7
- const getCloudAuth = () => {
7
+ export const getCloudAuth = () => {
8
8
  const origin = localStorage.getItem(CLOUD_AUTH_ORIGIN_KEY);
9
9
  const token = localStorage.getItem(CLOUD_AUTH_TOKEN_KEY);
10
10
  if (origin == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "1.12.5",
3
+ "version": "1.12.7",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@alauda/doom-export": "^0.1.0",
44
44
  "@cspell/eslint-plugin": "^8.19.4 || ^9.2.1",
45
- "@eslint-react/eslint-plugin": "^1.52.9",
45
+ "@eslint-react/eslint-plugin": "^1.53.0",
46
46
  "@inquirer/prompts": "^7.8.4",
47
47
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
48
48
  "@playwright/browser-chromium": "^1.55.0",
@@ -50,12 +50,12 @@
50
50
  "@rsbuild/plugin-sass": "^1.4.0",
51
51
  "@rsbuild/plugin-svgr": "^1.2.2",
52
52
  "@rsbuild/plugin-yaml": "^1.0.3",
53
- "@rspress/core": "2.0.0-beta.30",
54
- "@rspress/plugin-algolia": "2.0.0-beta.30",
55
- "@rspress/plugin-llms": "2.0.0-beta.30",
56
- "@rspress/plugin-sitemap": "2.0.0-beta.30",
57
- "@rspress/shared": "2.0.0-beta.30",
58
- "@shikijs/transformers": "^3.12.1",
53
+ "@rspress/core": "2.0.0-beta.31",
54
+ "@rspress/plugin-algolia": "2.0.0-beta.31",
55
+ "@rspress/plugin-llms": "2.0.0-beta.31",
56
+ "@rspress/plugin-sitemap": "2.0.0-beta.31",
57
+ "@rspress/shared": "2.0.0-beta.31",
58
+ "@shikijs/transformers": "^3.12.2",
59
59
  "@total-typescript/ts-reset": "^0.6.1",
60
60
  "ab64": "^0.1.6",
61
61
  "chokidar": "^4.0.3",
@@ -75,7 +75,7 @@
75
75
  "mdast-util-to-markdown": "^2.1.2",
76
76
  "mdast-util-to-string": "^4.0.0",
77
77
  "mermaid": "^11.10.1",
78
- "openai": "^5.16.0",
78
+ "openai": "^5.19.1",
79
79
  "openapi-types": "^12.1.3",
80
80
  "p-ratelimit": "^1.0.1",
81
81
  "picomatch": "^4.0.3",
@@ -96,14 +96,14 @@
96
96
  "remark-mdx": "^3.1.1",
97
97
  "remark-message-control": "^8.0.0",
98
98
  "remark-stringify": "^11.0.0",
99
- "shiki": "^3.12.1",
99
+ "shiki": "^3.12.2",
100
100
  "simple-git": "^3.28.0",
101
101
  "string-width": "^7.2.0",
102
102
  "swagger2openapi": "^7.0.8",
103
103
  "tinyglobby": "^0.2.14",
104
104
  "type-fest": "^4.41.0",
105
105
  "typescript": "^5.9.2",
106
- "typescript-eslint": "^8.41.0",
106
+ "typescript-eslint": "^8.42.0",
107
107
  "unified": "^11.0.5",
108
108
  "unified-lint-rule": "^3.0.1",
109
109
  "unist-util-position": "^5.0.0",