@redocly/realm 0.137.0-next.10 → 0.137.0-next.11
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 +16 -0
- package/dist/client/app/search/useFacets.js +1 -1
- package/dist/server/config/env-config.d.ts +2 -0
- package/dist/server/config/env-schema.d.ts +5 -0
- package/dist/server/config/env-schemas/feature-flags.d.ts +4 -0
- package/dist/server/config/env-schemas/feature-flags.js +1 -1
- package/dist/server/plugins/api-docs/options.js +1 -1
- package/dist/server/plugins/config-parser/loaders/content-slugs-loader.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/EditAppDescriptionDialog.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/EditAppDialog.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/EditCallbackUrlDialog.js +1 -1
- package/dist/server/plugins/markdown/is-partial.js +1 -1
- package/dist/server/utils/globs.d.ts +4 -0
- package/dist/server/utils/globs.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @redocly/realm
|
|
2
2
|
|
|
3
|
+
## 0.137.0-next.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 63141551504: Fixed an empty Download panel that appeared on the OpenAPI and AsyncAPI overview page when `downloadUrls` was set to an empty list.
|
|
8
|
+
- 8eb519653cd: Fixed security vulnerabilities `CVE-2026-84375`, `CVE-2026-84363`, `CVE-2026-84364` and `CVE-2026-39408` by upgrading `js-yaml` to version `4.3.2` and `hono` to version `4.13.7`.
|
|
9
|
+
- 2fde3a15587: Fixed an issue in the **Try it** console where closing an inactive tab moved the selection to a different tab instead of keeping the tab the user was working in.
|
|
10
|
+
- efab0652d2f: Fixed an issue in Replay's mobile layout where the first character typed in a request input moved focus to the close button, causing the rest of the input to be lost.
|
|
11
|
+
- e85d19c4926: Fixed an issue where Markdown tables would render a collapsed gray header row when all heading cells were empty.
|
|
12
|
+
- Updated dependencies [63141551504]
|
|
13
|
+
- Updated dependencies [8eb519653cd]
|
|
14
|
+
- Updated dependencies [e85d19c4926]
|
|
15
|
+
- @redocly/api-docs@0.2.0-next.11
|
|
16
|
+
- @redocly/theme@0.69.0-next.10
|
|
17
|
+
- @redocly/portal-plugin-mock-server@0.22.0-next.8
|
|
18
|
+
|
|
3
19
|
## 0.137.0-next.10
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as y,useEffect as
|
|
1
|
+
import{useCallback as y,useEffect as f,useMemo as S,useState as r}from"react";import{withPathPrefix as b}from"@redocly/theme/core/utils";import{ServerRoutes as d}from"../../../constants/api";import{useI18nConfig as g}from"../hooks";function h(e){const[s,a]=r([]),[t,n]=r(null),[c,o]=r(null),[p,i]=r(!1),{currentLocale:l}=g();f(()=>{i(!0),m()},[c]);const m=y(async()=>{if(e&&c===null){i(!1);return}let u={locale:l,field:e};c&&(u={...u,...c});const F=await(await fetch(b(d.SEARCH_FACETS),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)})).json();e?n(F):a(F),i(!1)},[l,c,e]);return{initialFacets:s,searchFacets:t,isFacetsLoading:p,setSearchFacetQuery:o}}function L(e){const[s,a]=r(null),{searchFacets:t,setSearchFacetQuery:n}=h(e);return f(()=>{const c=t?t.find(o=>o.field===e)??null:null;a(c)},[t,e]),{searchFacet:s,setSearchFacet:a,setSearchFacetQuery:n}}const O=e=>{const{initialFacets:s}=h();return{facets:S(()=>!e||!Object.keys(e).length?s:s.map(t=>({...t,values:e[t.field]?.map(n=>({...n,isCounterVisible:!0}))||[]})),[s,e])}};export{L as useFacetQuery,O as useFacets};
|
|
@@ -55,6 +55,7 @@ declare function loadEnvConfig(): {
|
|
|
55
55
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
56
56
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
57
57
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
58
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
58
59
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
59
60
|
SEARCH_DEV_DEBUG: boolean;
|
|
60
61
|
REDOCLY_SKIP_TYPESENSE_INDEXING: boolean;
|
|
@@ -138,6 +139,7 @@ export declare const envConfig: {
|
|
|
138
139
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
139
140
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
140
141
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
142
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
141
143
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
142
144
|
SEARCH_DEV_DEBUG: boolean;
|
|
143
145
|
REDOCLY_SKIP_TYPESENSE_INDEXING: boolean;
|
|
@@ -59,6 +59,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
59
59
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
60
60
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
61
61
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
62
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
62
63
|
} & {
|
|
63
64
|
SEARCH_DEV_REINIT: z.ZodOptional<z.ZodString>;
|
|
64
65
|
SEARCH_DEV_DEBUG: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "false" | "true" | undefined>;
|
|
@@ -139,6 +140,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
139
140
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
140
141
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
141
142
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
143
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
142
144
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
143
145
|
SEARCH_DEV_DEBUG: boolean;
|
|
144
146
|
REDOCLY_SKIP_TYPESENSE_INDEXING: boolean;
|
|
@@ -212,6 +214,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
212
214
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: "false" | "true" | undefined;
|
|
213
215
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: "false" | "true" | undefined;
|
|
214
216
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: "false" | "true" | undefined;
|
|
217
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: "false" | "true" | undefined;
|
|
215
218
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
216
219
|
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
217
220
|
REDOCLY_SKIP_TYPESENSE_INDEXING?: "false" | "true" | undefined;
|
|
@@ -285,6 +288,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
285
288
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
286
289
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
287
290
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
291
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
288
292
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
289
293
|
SEARCH_DEV_DEBUG: boolean;
|
|
290
294
|
REDOCLY_SKIP_TYPESENSE_INDEXING: boolean;
|
|
@@ -358,6 +362,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
358
362
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: "false" | "true" | undefined;
|
|
359
363
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: "false" | "true" | undefined;
|
|
360
364
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: "false" | "true" | undefined;
|
|
365
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: "false" | "true" | undefined;
|
|
361
366
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
362
367
|
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
363
368
|
REDOCLY_SKIP_TYPESENSE_INDEXING?: "false" | "true" | undefined;
|
|
@@ -21,6 +21,8 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
21
21
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
22
22
|
/** Experimental: register custom MCP tools from `@mcp` folders. */
|
|
23
23
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
24
|
+
/** Experimental: enables the GraphQL request body in Try It and embedded Replay. */
|
|
25
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
24
26
|
}, "strip", z.ZodTypeAny, {
|
|
25
27
|
NEW_CATALOG_ENABLED?: boolean | undefined;
|
|
26
28
|
NEW_SCORECARDS_ENABLED?: boolean | undefined;
|
|
@@ -34,6 +36,7 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
34
36
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
35
37
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
36
38
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
39
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
37
40
|
}, {
|
|
38
41
|
NEW_CATALOG_ENABLED?: "false" | "true" | undefined;
|
|
39
42
|
NEW_SCORECARDS_ENABLED?: "false" | "true" | undefined;
|
|
@@ -47,5 +50,6 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
47
50
|
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: "false" | "true" | undefined;
|
|
48
51
|
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: "false" | "true" | undefined;
|
|
49
52
|
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: "false" | "true" | undefined;
|
|
53
|
+
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: "false" | "true" | undefined;
|
|
50
54
|
}>;
|
|
51
55
|
//# sourceMappingURL=feature-flags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as _}from"zod";import{envBooleanStringOptional as E}from"../../utils/envs/env-boolean-string.js";const
|
|
1
|
+
import{z as _}from"zod";import{envBooleanStringOptional as E}from"../../utils/envs/env-boolean-string.js";const D=_.object({NEW_CATALOG_ENABLED:E(),NEW_SCORECARDS_ENABLED:E(),ENABLE_COMMENTS:_.string().optional(),REDOCLY_EXP_DISABLE_MD_VALIDATION:E(),ENABLE_SOURCE_MAPS:E(),PLAN_GATES:_.string().optional(),REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED:E(),REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL:_.string().optional(),REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT:_.string().optional(),REDOCLY_DISABLE_API_FUNCTION_SANDBOX:E(),REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE:E(),REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED:E(),REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED:E()});export{D as featureFlagsSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as F from"node:path";import{findFirstBinding as P,markdocParser as _}from"@redocly/api-docs";import{combineUrls as i}from"@redocly/theme/core/openapi";import{withPathPrefix as k}from"@redocly/theme/core/utils";import{GRAPHQL_SPEC_SLUG as w}from"../../../constants/common.js";import{PUBLIC_API_DEFINITIONS_FOLDER as f}from"../../constants/common.js";import{envConfig as L}from"../../config/env-config.js";import{deepMerge as M}from"../../../utils/object/deep-merge.js";import{normalizeFeedbackOptions as A}from"./utils/normalize-feedback-options.js";import{replaceFileExtension as g}from"./utils/replace-file-extension.js";import{relativePathToBaseSlug as B}from"./utils/relative-path-to-base-slug.js";const R={tags:{},nodes:{},components:{}};function D(o,r){if(!(o?.off!==!0))return o;const t=B(r);return{url:k(`/_mock${t}`),position:"first",description:"Mock server",...o}}function I(o,r){return(r==="graphql"?[i(w,`${g(o,F.posix.extname(o))}?download`)]:[i(f,`${g(o,".json")}?download`),i(f,`${g(o,".yaml")}?download`)]).map(t=>({url:k(t)}))}function j(o,r,m){const{rootConfig:t,config:c,apiConfig:s,mergedConfig:e,relativePath:l}=m,a=M(t?.[o]||{},c[o]||{},s[o]||s.theme?.[o]||{}),b=r["x-feedback"]||a.feedback||c.feedback,S=!!e[o]?.excludeFromSearch||!!e.theme?.[o]?.excludeFromSearch||!!t?.[o]?.excludeFromSearch||!!t?.theme?.[o]?.excludeFromSearch,x=e.rbac||s.rbac,p=A(b),u=c.metadata,C={...p&&{feedback:p},mockServer:D(e?.mockServer||t?.mockServer,l),disableRouter:!0,downloadUrls:a.downloadUrls||I(l,o),excludeFromSearch:S,rbac:x,markdownParser:_,replayFeatures:{graphql:L.REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED??!1}};let d;if(o==="graphql"){const n=a;d={title:n.info?.title,...u,...n.metadata??{}}}else{const n=r.info,E=n?.["x-metadata"];d={title:n?.title,description:n?.description,...o==="openapi"&&{summary:n?.summary},...u,...E}}o==="openapi"&&a.showSchemaCatalogLinks&&(r["x-schema-catalog-link"]=i(f,l));const O=a.markdocOptions??R,h={...a,...C,specType:o,markdocOptions:O,metadata:d};return o==="asyncapi"&&(h.protocol=P(r)??void 0),h}export{I as buildDownloadUrls,j as createOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import f from"path";import{combineUrls as S}from"@redocly/theme/core/utils";import{VERSION_SEPARATOR as b}from"../../../constants/common.js";import{removeTrailingSlash as v}from"../../../../utils/url/remove-trailing-slash.js";import{slash as E}from"../../../../utils/path/slash.js";import{logger as m}from"../../../tools/notifiers/logger.js";import{getDefaultVersionByPath as I}from"./versions-config-loader.js";import{GithubSlugger as N,slug as h}from"../../../utils/index.js";import{isPartial as z}from"../../markdown/is-partial.js";import{parseBaseName as T}from"../../utils.js";const j=new Set([".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".avif",".mp3",".wav",".ogg",".m4a",".mp4",".avi",".mov",".webm",".pdf",".doc",".docx",".zip",".rar",".gz",".ttf",".woff",".woff2"]),U=async(i,{fs:s,cache:r,getConfig:l})=>{const t=m.startTiming(),g=(await r.load("versions-config","versions-config")).data,{markdown:u}=await l(),o=u?.partialsFolders??[],e=new Map,n=new Map,c=new Set,d={pageVsPage:0,dirVsDir:0},D=new N;n.set(".","/"),n.set("/","/");const w=s.scan().sort((a,p)=>p.relativePath.localeCompare(a.relativePath));for(const{relativePath:a}of w){if(j.has(f.posix.extname(a)))continue;const{data:p}=await r.load(a,"is-ignored");if(p||f.posix.extname(a)===".md"&&z(a,o))continue;const F=E(a).replace(new RegExp("^(@i18n|@l10n)\\/"),""),V=I(a,g);y(F,{defaultVersion:V,fileSlugs:e,dirSlugs:n,allFileSlugsList:c,githubSlugger:D,collisions:d})}return m.verboseTime(t,"Calculated slugs. Number of file paths processed: "+w.length),{fileSlugs:e,dirSlugs:n,collisions:d}};function y(i,s){const r=s.fileSlugs.get(i);if(r)return r;let l=f.posix.dirname(i);const t=L(l,s)||"",{baseName:g,isIndexFile:u}=T(i),o=s.dirSlugs.has(f.posix.join(l,g));let e;if(!u&&o){const n=h(S(t,g));s.allFileSlugsList.has(n)||(e=n)}if(!e){const n=u?s.dirSlugs.get(l):void 0;if(n)e=n;else{const c=S(t,g),d=h(c);e=s.githubSlugger.slug(c),e!==d&&(s.collisions.pageVsPage++,m.verbose("File slug collision: %s wanted %s, assigned %s",i,d,e))}}e=v(e),s.fileSlugs.set(i,e),s.allFileSlugsList.add(e)}function L(i,s){if(s.dirSlugs.has(i))return s.dirSlugs.get(i);const r=v(f.posix.normalize(i)).split("/");let l="/",t="";for(const g of r){t=f.posix.join(t,g);const u=P(g,s.defaultVersion);let o=s.dirSlugs.get(t);if(!o){const e=S("/",l,u),n=h(e);o=s.githubSlugger.slug(e),o!==n&&(s.collisions.dirVsDir++,m.verbose("Directory slug collision: %s wanted %s, assigned %s",t,n,o))}o.endsWith("/")||(o=o+"/"),s.dirSlugs.set(t,o),l=o}return s.dirSlugs.get(i)}function P(i,s){if(!i.startsWith(b))return i;const r=i.substring(b.length);return r===s?"":r}export{j as IGNORED_EXTS,U as contentSlugsLoader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useMutation as
|
|
1
|
+
import*as e from"react";import{useMutation as E,useQueryClient as C}from"@tanstack/react-query";import{useParams as f}from"react-router";import{Button as v}from"@redocly/theme/components/Button/Button";import{H2 as D}from"@redocly/theme/components/Typography/H2";import{Admonition as h}from"@redocly/theme/markdoc/components/Admonition/Admonition";import{useTranslate as P}from"../../../../../client/app/hooks";import{Dialog as A}from"./Dialog";import{ButtonWithLoading as k}from"./ButtonWithLoading";import{ButtonsContainer as S}from"./RollAPIKey";import{DialogInputMultiline as T,DialogRow as w,DialogRowContent as K}from"./DialogStyledComponents";import{MAX_DESCRIPTION_LENGTH as d,CharacterCounter as O}from"./CharacterCounter";const Q=o=>{const{initialDescription:n,open:a,onOpen:i,onClose:t}=o;return e.createElement(A,{open:a,onClose:t,onOpen:i},e.createElement(R,{initialDescription:n,onClose:t}))},R=o=>{const{id:n}=f(),{initialDescription:a,onClose:i}=o,{translate:t}=P(),[r,p]=e.useState(a||""),c=async()=>{await y(),i()},u=s=>{s.key==="Enter"&&!l&&c()},g=C(),{mutateAsync:y,isPending:l,error:m}=E({mutationKey:["UPDATE_APP"+n],mutationFn:()=>fetch(`/api/api-keys/apps/${n}`,{method:"PUT",body:JSON.stringify({description:r})}),onSettled:()=>{g.invalidateQueries({queryKey:["APP:"+n]})}});return e.createElement(e.Fragment,null,e.createElement(D,{"data-translation-key":"dev.edit.description.dialog.title"},t("dev.edit.description.dialog.title","Change description")),e.createElement(w,null,e.createElement(K,null,e.createElement(T,{maxLength:d,value:r,onChange:s=>p(s.target.value),onKeyPress:u,rows:6,cols:60}))),e.createElement(O,null,r.length,"/",d),m&&e.createElement(h,{type:"danger"},m.message," "),e.createElement(S,null,e.createElement(v,{onClick:i,"data-translation-key":"dev.edit.description.dialog.cancel",variant:"text",size:"large"},t("dev.edit.description.dialog.cancel","Cancel")),e.createElement(k,{variant:"primary",loading:l,onClick:c,disabled:l,"data-translation-key":"dev.edit.description.dialog.save"},t("dev.edit.description.dialog.save","Save changes"))))};export{Q as EditAppDescriptionDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useMutation as
|
|
1
|
+
import*as e from"react";import{useMutation as v,useQueryClient as E}from"@tanstack/react-query";import{useParams as C}from"react-router";import{Button as h}from"@redocly/theme/components/Button/Button";import{H2 as P}from"@redocly/theme/components/Typography/H2";import{Admonition as A}from"@redocly/theme/markdoc/components/Admonition/Admonition";import{useTranslate as k}from"../../../../../client/app/hooks";import{Dialog as D}from"./Dialog";import{ButtonWithLoading as N}from"./ButtonWithLoading";import{ButtonsContainer as S}from"./RollAPIKey";import{DialogInput as w,DialogRow as K,DialogRowContent as O}from"./DialogStyledComponents";const U=e.forwardRef((l,a)=>{const{appName:s,appDisplayName:o}=l,[n,i]=e.useState(!1),r=()=>{i(!0)},t=()=>{i(!1)};return e.useImperativeHandle(a,()=>({open:r})),e.createElement(D,{open:n,onClose:t,onOpen:r},e.createElement(R,{initialName:o||s||"",onClose:t}))}),R=l=>{const{id:a}=C(),{initialName:s,onClose:o}=l,[n,i]=e.useState(s),r=p=>i(p.target.value),{translate:t}=k(),d=async()=>{await f(),o()},g=p=>{p.key==="Enter"&&!m&&u&&d()},y=E(),{mutateAsync:f,isPending:m,error:c}=v({mutationKey:["UPDATE_APP"+a],mutationFn:()=>fetch(`/api/api-keys/apps/${a}`,{method:"PUT",body:JSON.stringify({name:n})}),onSettled:()=>{y.invalidateQueries({queryKey:["APPS","APP:"+a]})}}),u=/^(?!\s*$).{1,100}$/gi.test(n);return e.createElement(e.Fragment,null,e.createElement(P,{"data-translation-key":"dev.edit.app.dialog.title"},t("dev.edit.app.dialog.title","Change display name")),e.createElement(K,null,e.createElement(O,null,e.createElement(w,{value:n,onChange:r,onKeyPress:g}))),c&&e.createElement(A,{type:"danger"},c.message," "),e.createElement(S,null,e.createElement(h,{onClick:o,"data-translation-key":"dev.edit.app.dialog.cancel",variant:"text",size:"large"},t("dev.edit.app.dialog.cancel","Cancel")),e.createElement(N,{variant:"primary",loading:m,onClick:d,disabled:m||!u,"data-translation-key":"dev.edit.app.dialog.save"},t("dev.edit.app.dialog.save","Save changes"))))};export{U as EditAppDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useMutation as
|
|
1
|
+
import*as e from"react";import{useMutation as y,useQueryClient as b}from"@tanstack/react-query";import{useParams as C}from"react-router";import{Button as U}from"@redocly/theme/components/Button/Button";import{H2 as h}from"@redocly/theme/components/Typography/H2";import{Admonition as v}from"@redocly/theme/markdoc/components/Admonition/Admonition";import{useTranslate as E}from"../../../../../client/app/hooks";import{Dialog as f}from"./Dialog";import{ButtonWithLoading as w}from"./ButtonWithLoading";import{ButtonsContainer as P}from"./RollAPIKey";import{DialogHelperText as D,DialogInputMultiline as R,DialogRow as S,DialogRowContent as A}from"./DialogStyledComponents";const Q=o=>{const{initialCallbackUrl:l,open:r,onOpen:n,onClose:a}=o;return e.createElement(f,{open:r,onClose:a,onOpen:n},e.createElement(T,{initialCallbackUrl:l,onClose:a}))},T=o=>{const{id:l}=C(),{initialCallbackUrl:r,onClose:n}=o,{translate:a}=E(),[c,m]=e.useState(r||""),s=async()=>{await g(),n()},p=t=>{t.key==="Enter"&&!i&&s()},u=b(),{mutateAsync:g,isPending:i,error:d}=y({mutationKey:["UPDATE_APP"+l],mutationFn:async()=>{const t=await fetch(`/api/api-keys/apps/${l}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({callbackUrl:c})});if(!t.ok){const k=await t.json().catch(()=>null);throw new Error(k?.error||`Request failed with status ${t.status}`)}return t.json()},onSettled:()=>{u.invalidateQueries({queryKey:["APP:"+l]})}});return e.createElement(e.Fragment,null,e.createElement(h,{"data-translation-key":"dev.edit.callbackUrls.dialog.title"},a("dev.edit.callbackUrls.dialog.title","Change callback URLs")),e.createElement(S,null,e.createElement(A,null,e.createElement(R,{value:c,onChange:t=>m(t.target.value),onKeyPress:p,placeholder:a("dev.edit.callbackUrls.dialog.placeholder","https://example.com/callback"),rows:3}),e.createElement(D,{"data-translation-key":"dev.edit.callbackUrls.dialog.hint"},a("dev.edit.callbackUrls.dialog.hint","Separate multiple URLs with a comma")))),d&&e.createElement(v,{type:"danger"},d.message," "),e.createElement(P,null,e.createElement(U,{onClick:n,"data-translation-key":"dev.edit.callbackUrls.dialog.cancel",variant:"text",size:"large"},a("dev.edit.callbackUrls.dialog.cancel","Cancel")),e.createElement(w,{variant:"primary",loading:i,onClick:s,disabled:i,"data-translation-key":"dev.edit.callbackUrls.dialog.save"},a("dev.edit.callbackUrls.dialog.save","Save changes"))))};export{Q as EditCallbackUrlDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import c from"path";import{compileGlobMatcher as n}from"../../utils/globs.js";const m=new WeakMap,i=(o,e)=>{if(e.length===0)return!1;let t=m.get(e);return t||(t=n(e.map(r=>c.posix.normalize(r))),m.set(e,t)),t(o)};export{i as isPartial};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import picomatch from 'picomatch';
|
|
2
2
|
export declare const getDeeperGlobPattern: (a: ReturnType<typeof picomatch.scan>, b: ReturnType<typeof picomatch.scan>) => import("picomatch/lib/scan").State;
|
|
3
|
+
/**
|
|
4
|
+
* Parses every pattern once, so the returned function is cheap to call multiple times.
|
|
5
|
+
*/
|
|
6
|
+
export declare function compileGlobMatcher(patterns: string[]): (relativePath: string) => boolean;
|
|
3
7
|
export declare function pathMatchesGlobPattern(relativePath: string, pattern: string): boolean;
|
|
4
8
|
export declare function getMostSpecificMatchingGlobKey(relativePath: string, globMap?: Record<string, unknown>): string | undefined;
|
|
5
9
|
export declare function resolveGlobMapValue<T>(relativePath: string, globMap?: Record<string, T>): T | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from"picomatch";import{minimatch as
|
|
1
|
+
import s from"picomatch";import{minimatch as m,Minimatch as p}from"minimatch";import c from"is-glob";import l from"path";import{removeTrailingSlash as u}from"../../utils/url/remove-trailing-slash.js";import{removeLeadingSlash as f}from"../../utils/url/remove-leading-slash.js";const h=(n,t)=>{const e=n.tokens??[],o=t.tokens??[];if(n.isGlob!==t.isGlob)return n.isGlob?t:n;if(e.length!==o.length)return e.length>o.length?n:t;for(let r=0;r<e.length;r++){if(e[r].isGlob!==o[r].isGlob)return e[r].isGlob?t:n;if(e[r].value!==o[r].value)return e[r].value.length>o[r].value.length?n:t}return n};function v(n){const t=n.map(e=>{if(c(e)){const r=new p(e);return i=>r.match(i)}const o=u(f(l.posix.normalize(e)));return r=>r===o||r.startsWith(o+"/")});return e=>t.some(o=>o(e))}function a(n,t){if(c(t)){if(m(n,t))return!0}else{const e=u(f(l.posix.normalize(t))),o=n.startsWith(e+"/");if(n===e||o)return!0}return!1}function d(n,t){if(!t)return;const e=[];for(const i of Object.keys(t))a(n,i)&&e.push(i);if(!e.length)return;const o=e.map(i=>s.scan(i,{tokens:!0,parts:!0}));let r=o[0];for(let i=1;i<o.length;i++)r=h(r,o[i]);return r.input}function P(n,t){const e=d(n,t);return e!=null&&t?t[e]:void 0}function T(n){const t=s.makeRe(n);return t||void 0}export{v as compileGlobMatcher,T as convertGlobToRegex,h as getDeeperGlobPattern,d as getMostSpecificMatchingGlobKey,a as pathMatchesGlobPattern,P as resolveGlobMapValue};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/realm",
|
|
3
|
-
"version": "0.137.0-next.
|
|
3
|
+
"version": "0.137.0-next.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@opentelemetry/sdk-trace-web": "2.8.0",
|
|
34
34
|
"@opentelemetry/semantic-conventions": "1.40.0",
|
|
35
35
|
"@redocly/ajv": "8.18.0",
|
|
36
|
-
"@redocly/api-docs": "0.2.0-next.
|
|
36
|
+
"@redocly/api-docs": "0.2.0-next.11",
|
|
37
37
|
"@redocly/config": "0.56.0",
|
|
38
38
|
"@redocly/openapi-core": "2.51.2",
|
|
39
39
|
"@redocly/portal-legacy-ui": "0.19.0",
|
|
40
|
-
"@redocly/portal-plugin-mock-server": "0.22.0-next.
|
|
40
|
+
"@redocly/portal-plugin-mock-server": "0.22.0-next.8",
|
|
41
41
|
"@redocly/realm-asyncapi-sdk": "0.15.0-next.3",
|
|
42
|
-
"@redocly/theme": "0.69.0-next.
|
|
42
|
+
"@redocly/theme": "0.69.0-next.10",
|
|
43
43
|
"@shikijs/transformers": "3.21.0",
|
|
44
44
|
"@tanstack/react-query": "5.62.3",
|
|
45
45
|
"@tanstack/react-table": "8.21.3",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"fflate": "0.7.5",
|
|
61
61
|
"flexsearch": "0.7.43",
|
|
62
62
|
"graphql": "16.14.2",
|
|
63
|
-
"hono": "4.13.
|
|
63
|
+
"hono": "4.13.7",
|
|
64
64
|
"htmlparser2": "8.0.2",
|
|
65
65
|
"i18next": "22.4.15",
|
|
66
66
|
"is-glob": "4.0.3",
|
|
67
|
-
"js-yaml": "4.3.
|
|
67
|
+
"js-yaml": "4.3.2",
|
|
68
68
|
"lru-cache": "11.1.0",
|
|
69
69
|
"minimatch": "10.2.4",
|
|
70
70
|
"mri": "1.2.0",
|