@redocly/revel-reef 0.130.0-next.1 → 0.130.0-next.3
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 +43 -0
- package/dist/bin.js +1 -1
- package/dist/cli/eject/resolveEjectParams.js +1 -1
- package/dist/cli/stats/collectors/openapi.d.ts +3 -0
- package/dist/cli/stats/collectors/openapi.js +1 -0
- package/dist/cli/stats/index.d.ts +7 -0
- package/dist/cli/stats/index.js +1 -0
- package/dist/cli/stats/options.d.ts +3 -0
- package/dist/cli/stats/options.js +1 -0
- package/dist/cli/telemetry/index.d.ts +1 -1
- package/dist/cli/telemetry/index.js +1 -1
- package/dist/client/app/Sidebar/Sidebar.js +1 -1
- package/dist/server/fs/cache.js +1 -1
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-attributes-db-record.d.ts +8 -0
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-attributes-db-record.js +1 -0
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-read-model.js +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/map-entity-relation-row.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-bff-repository.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-bff-repository.js +14 -14
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-read-repository.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-read-repository.js +5 -3
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-write-repository.d.ts +2 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-write-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-relations-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/remote/catalog-entities-remote-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/arazzo-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/asyncapi-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/base.d.ts +4 -3
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/base.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/graphql-entities-extractor.js +2 -2
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/openapi-entities-extractor.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/openapi-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/get-server-props.js +1 -1
- package/dist/server/plugins/catalog-entities/plugin.js +1 -1
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.d.ts +3 -0
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.js +1 -1
- package/dist/server/plugins/catalog-entities/schemas/dto-schemas.d.ts +12 -0
- package/dist/server/plugins/catalog-entities/schemas/dto-schemas.js +1 -1
- package/dist/server/plugins/catalog-entities/schemas/read-model-schemas.d.ts +1 -0
- package/dist/server/plugins/catalog-entities/types/extractors.d.ts +4 -4
- package/dist/server/plugins/config-parser/loaders/content-slugs-loader.js +1 -1
- package/dist/server/plugins/default-theme/index.js +1 -1
- package/dist/server/plugins/openapi-docs/index.js +1 -1
- package/dist/server/plugins/search/ai-indexer/prepare-ai-search-documents.js +1 -1
- package/dist/server/plugins/search/documents/search-documents.js +1 -1
- package/dist/server/plugins/sso/index.js +1 -1
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/0005_catalog-relations-constraint-fix.sql +2 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/0006_add-catalog-entitities-attributes-table.sql +11 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/meta/0005_snapshot.json +393 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/meta/0006_snapshot.json +458 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/meta/_journal.json +14 -0
- package/dist/server/providers/database/databases/catalog-sqlite/schemas/entities-attributes-table.d.ts +143 -0
- package/dist/server/providers/database/databases/catalog-sqlite/schemas/entities-attributes-table.js +1 -0
- package/dist/server/providers/database/databases/catalog-sqlite/schemas/entities-relations-table.js +1 -1
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/0007_catalog-relations-constraint-fix.sql +2 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/0008_add-catalog-entitities-attributes-table.sql +11 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/meta/0007_snapshot.json +833 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/meta/0008_snapshot.json +898 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/meta/_journal.json +14 -0
- package/dist/server/utils/rbac.d.ts +11 -7
- package/dist/server/utils/rbac.js +1 -1
- package/dist/server/web-server/routes/catalog/bff-catalog.js +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REDOCLY_TEAMS_RBAC as c}from"@redocly/config";import{
|
|
1
|
+
import{REDOCLY_TEAMS_RBAC as c}from"@redocly/config";import{DEV_LOGIN_SLUG as u,INVITE_SLUG as T,PUBLIC_RBAC_SCOPE_ITEM as m,UI_ACCESSIBLE_CONFIG_PROPS as b,CONFIG_FILE_NAME as n,DEFAULT_SSO_IDP_TITLE as P}from"../../../constants/common.js";import{isDevelopMode as _}from"../../utils/envs/is-develop-mode.js";import{getTemplatePath as s}from"./get-template-path.js";import{resolveLinksFromConfig as p}from"../nav-utils.js";import{resolveLogoConfig as F}from"./resolve-logo.js";import{extractTeamNames as E}from"./extract-team-names.js";import{resolveProductsConfig as O}from"./resolve-products-config.js";import{getExcludedFromLinkCheckerPatterns as y}from"../sidebars/utils.js";import{resolveEntitiesCatalogConfig as A}from"./resolve-catalog-entities.js";import{telemetryTraceStep as j}from"../../../cli/telemetry/helpers/trace-step.js";async function q(r){return{id:"Default Theme",async processContent(e){await j("build.plugin.default_theme",async()=>{const t=v(e),a=Object.keys(e.getConfig()?.ssoDirect||{}).length>0,i=e.createTemplate("invite",s("../../../../dist/client/app/pages/Invite/Invite.js"));if(e.addRoute({duplicateInAllLocales:!0,excludeFromSidebar:!0,excludeFromSearch:!0,slug:T,[c]:m,fsPath:T,templateId:i}),r.devLogin&&a){const o={frontmatter:{},seo:{title:"Login page"},authIdps:f(t),rbac:{teams:E(e.getConfig().rbac)}},l=e.createTemplate("dev-login",s("../../../../dist/client/app/pages/DevLogin/DevLogin.js"));e.addRoute({duplicateInAllLocales:!0,excludeFromSidebar:!0,excludeFromSearch:!0,slug:u,[c]:m,fsPath:u,templateId:l,getStaticData:async()=>({props:o})})}else if(t.length>1){const o={frontmatter:{},seo:{title:"Login page"},authIdps:f(t)},l=e.createTemplate("login",s("../../../../dist/client/app/pages/Login/Login.js"));e.addRoute({duplicateInAllLocales:!0,excludeFromSidebar:!0,slug:u,[c]:m,fsPath:u,templateId:l,getStaticData:async()=>({props:o})})}e.createTemplate("404",s("../../../../dist/client/app/pages/404/404.js")),e.createTemplate("403",s("../../../../dist/client/app/pages/403/403.js")),e.createTemplate("403OIDC",s("../../../../dist/client/app/pages/403/403OIDC.js")),_()&&e.createTemplate("compilation-error",s("../../../../dist/client/app/pages/CompilationError/CompilationError.js"))})},async afterRoutesCreated(e,t){const{contentDir:a,outdir:i}=e,o=e.getConfig(),{navbar:l,footer:S,userMenu:g,search:I,breadcrumbs:L,products:D}=o,C=Object.keys(o?.ssoDirect||{}).length>0,d=y(o),h={navFile:n,excludedFromLinkCheckerPatterns:d};e.setGlobalData({...k(o),navbar:await p(l,a,e,t,h),footer:await p(S,a,e,t,h),breadcrumbs:{...L,prefixItems:await p(L?.prefixItems||[],a,e,t,{navFile:n,excludedFromLinkCheckerPatterns:d})},userMenu:{...g,hide:g?.hide??!C,menu:await p(g?.items,a,e,t,{navFile:n,excludedFromLinkCheckerPatterns:d})},logo:await F(o.logo,n,i,t.fs),auth:{idpsInfo:f(v(e)),devLogin:r.devLogin&&C},products:await O(D,e,t),search:{...I,suggestedPages:await p(I?.suggestedPages,a,e,t,{navFile:n,excludedFromLinkCheckerPatterns:d})},entitiesCatalog:await A(o.entitiesCatalog,n,i,t.fs),headScriptTags:void 0,linkTags:void 0,postBodyScriptTags:void 0,preBodyScriptTags:void 0})}}}function v(r){const e=r.getConfig().ssoDirect;return Object.entries(e||{}).map(([a,i])=>({idpId:a,type:i.type,title:i.title}))}function f(r){return process.env.LOCALHOST_LOGIN==="true"?r:r.filter(t=>t.title!==P)}function k(r){const e={};for(const t of b)r[t]&&(e[t]=r[t]);return e}export{q as defaultThemePlugin,k as pickUiAccessibleConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{simplifyAstStructure as Z}from"@redocly/openapi-docs";import{REDOCLY_TEAMS_RBAC as D}from"@redocly/config";import{OPENAPI_DOCS_TEMPLATE_ID as $,PUBLIC_RBAC_SCOPE_ITEM as j}from"../../../constants/common.js";import{DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER as ee,PUBLIC_API_DEFINITIONS_FOLDER as te}from"../../constants/common.js";import{OPENAPI_CUSTOM_FIELDS_SERVER_PROPS_GETTER_ID as oe,OPENAPI_SHARED_DATA_PREFIX as U}from"../../constants/plugins/openapi-docs.js";import{isDevelopMode as V}from"../../utils/envs/is-develop-mode.js";import{searchResolver as ae}from"./search/search-resolver.js";import{convertOpenAPIDocs2Sidebar as re,shouldAddRoute as se}from"./utils.js";import{getTemplatePath as b}from"./get-template-path.js";import{storeDefinitionBundles as ne}from"./store-definition-bundles.js";import{definitionLoader as ie,definitionsLoader as pe}from"./load-definition.js";import{getAiDocumentsStore as de}from"./search/get-ai-search-documents.js";import{fromCurrentDir as ce}from"../../utils/paths.js";import{telemetryTraceStep as le}from"../../../cli/telemetry/helpers/trace-step.js";const w="openapi-spec-download";async function ve(){let L=[],A={},M=new Set;return{id:"openapi",requiredEntitlements:["openapi"],loaders:{"load-oas-docs":pe,"load-oas":ie},processContent:async(e,p)=>{await le("build.plugin.openapi_docs",async u=>{e.createRequestHandler(w,ce(import.meta.url,"./spec-download.api.js")),e.addApiRoute({slug:te+"/*",requestHandlerId:w,httpMethod:"all",[D]:j,getStaticData:async()=>({props:{}})}),e.addApiRoute({slug:ee+"/*",requestHandlerId:w,httpMethod:"all",[D]:j,getStaticData:async()=>({props:{}})});const R=e.createTemplate($,b("./template/OpenAPIDocs.js")),a=e.registerServerPropsGetter($,b("./get-server-props.js")),s=e.registerServerPropsGetter(oe,b("./get-server-props-custom-fields.js")),d=await p.getConfig();u?.setAttribute("config",JSON.stringify(d.openapi||{}));const g=d.rules?.["custom-fields-schema"];A={};const m=await e.loadOpenApiDefinitions(p);L=m.map(({markdocChunks:r,relativePath:f,customOutputRelativeFile:i,isVirtual:n,realRelativePath:c})=>({chunks:r,relativePath:f,realRelativePath:c,isVirtual:i!=null||n})),ne(m,e.outdir);const S={};for(const r of m||[]){const{definition:f,config:i,relativePath:n,customOutputRelativeFile:c,contentItems:_,flatItems:k,parser:E,options:B,rawOptions:q,hash:J}=r,N=c||n,o=[],x={},{definition:Q}=E||{},{info:l}=Q||{},O=l?.["x-metadata"],v=!!i.openapi?.excludeFromSearch||!!i.theme?.openapi?.excludeFromSearch||!!d.openapi?.excludeFromSearch||!!d.theme?.openapi?.excludeFromSearch,G={title:l?.title,description:l?.description,summary:l?.summary,...i.metadata,...O},h={untagged:[],tagged:new Map};for(const t of k){const{id:C,href:I,operationDefinition:y}=t;if(y){const{tags:P}=y;if(P)for(const T of P)h.tagged.has(T)||h.tagged.set(T,[]),h.tagged.get(T)?.push(t);else h.untagged.push(t);V()&&(x[`#${y.pointer}`]=t.href)}if(!se({item:t}))continue;const F=t,Y=F.type==="section"&&!!F.infoDefinition,z=I.split("#")[0]+"/",K=t?.operationDefinition?.[D];o.push({excludeFromSearch:v,slugSuffix:z,fsPath:N,httpVerb:t?.httpVerb||"",path:n,templateId:R,[D]:K||i.rbac,getAiDocumentsStore:de({parser:E,options:B,info:l,tagOperations:h,openapiContentItem:F,metadata:G,relativePath:n,getSearchFacets:e.getSearchFacets,includeInLLMsTxt:Y,excludeFromSearch:v}),getStaticData:async P=>({props:{dynamicMarkdocComponents:["openapi"],baseSlug:P.baseSlug,seo:t["x-metadata"]?.seo||{title:t.name,description:t.description},itemId:C,disableAutoScroll:!0}})})}o[0]={...o[0],metadata:{type:"openapi",...G},hasClientRoutes:!0,getSidebar:(t,C)=>{const I=[];return re({contentItems:_,sidebarItems:I,routeSlug:t.slug,navItem:C}),I},getNavText:()=>l?.title,getSearchDocuments:ae(E,B,k,e.getSearchFacets,e.setSearchFacets,v)},O?.apiId&&(S[O.apiId]={slug:o[0]?.slug||""});const W=o[0];o[0]=o[o.length-1],o[o.length-1]=W;for(const t of o)e.addRoute({...t,serverPropsGetterIds:g?[a,s]:[a]});const X=V()?n:void 0,H=`${U}${n}`;A[H]={fsPath:N,definition:f,options:q,sourcePath:X,routesMapping:x,hash:J};for(const t of o)e.addRoute({...t,sharedData:[{id:H,key:"openAPIDocsStore"}],serverPropsGetterIds:g?[a,s]:[a]})}e.setGlobalData({apiProducts:S})})},afterRoutesCreated:async(e,p)=>{const u=new Set;for(const{chunks:a,relativePath:s,isVirtual:d,realRelativePath:g}of L){const m=e.getAllRoutes().filter(r=>r.fsPath===s).map(r=>r.slug),S=(await p.cache.load(g,"load-oas")).compoundHash;await p.cache.load(s,{loader:async function(){for(const{node:f,markdown:i,key:n,relativePath:c}of a){const{ast:_}=await e.parseMarkdoc({content:i,relativePath:c,isVirtual:d},p,{sharedDataIds:[`${U}${c}`],routeSlugs:m});f[`x-parsed-md-${n}`]={result:Z(_)}}},name:"openapi-markdoc-inline-parser"},[S]);for(const{pointer:r}of a)u.add(r)}const R=M.difference(u);for(const a of R)p.cache.delete(a);M=u;for(const[a,s]of Object.entries(A))await e.createSharedData(a,{...s,baseSlug:e.getRouteByFsPath(s.fsPath)?.baseSlug},s.hash)}}}export{ve as openAPIDocsPlugin};
|
|
1
|
+
import{simplifyAstStructure as Z}from"@redocly/openapi-docs";import{REDOCLY_TEAMS_RBAC as D}from"@redocly/config";import{OPENAPI_DOCS_TEMPLATE_ID as $,PUBLIC_RBAC_SCOPE_ITEM as j}from"../../../constants/common.js";import{DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER as ee,PUBLIC_API_DEFINITIONS_FOLDER as te}from"../../constants/common.js";import{OPENAPI_CUSTOM_FIELDS_SERVER_PROPS_GETTER_ID as oe,OPENAPI_SHARED_DATA_PREFIX as U}from"../../constants/plugins/openapi-docs.js";import{isDevelopMode as V}from"../../utils/envs/is-develop-mode.js";import{searchResolver as ae}from"./search/search-resolver.js";import{convertOpenAPIDocs2Sidebar as re,shouldAddRoute as se}from"./utils.js";import{getTemplatePath as b}from"./get-template-path.js";import{storeDefinitionBundles as ne}from"./store-definition-bundles.js";import{definitionLoader as ie,definitionsLoader as pe}from"./load-definition.js";import{getAiDocumentsStore as de}from"./search/get-ai-search-documents.js";import{fromCurrentDir as ce}from"../../utils/paths.js";import{telemetryTraceStep as le}from"../../../cli/telemetry/helpers/trace-step.js";const w="openapi-spec-download";async function ve(){let L=[],A={},M=new Set;return{id:"openapi",requiredEntitlements:["openapi"],loaders:{"load-oas-docs":pe,"load-oas":ie},processContent:async(e,p)=>{await le("build.plugin.openapi_docs",async u=>{e.createRequestHandler(w,ce(import.meta.url,"./spec-download.api.js")),e.addApiRoute({slug:te+"/*",requestHandlerId:w,httpMethod:"all",[D]:j,getStaticData:async()=>({props:{}})}),e.addApiRoute({slug:ee+"/*",requestHandlerId:w,httpMethod:"all",[D]:j,getStaticData:async()=>({props:{}})});const R=e.createTemplate($,b("./template/OpenAPIDocs.js")),a=e.registerServerPropsGetter($,b("./get-server-props.js")),s=e.registerServerPropsGetter(oe,b("./get-server-props-custom-fields.js")),d=await p.getConfig();u?.setAttribute("config",JSON.stringify(d.openapi||{}));const g=d.rules?.["custom-fields-schema"];A={};const m=await e.loadOpenApiDefinitions(p);L=m.map(({markdocChunks:r,relativePath:f,customOutputRelativeFile:i,isVirtual:n,realRelativePath:c})=>({chunks:r,relativePath:f,realRelativePath:c,isVirtual:i!=null||n})),ne(m,e.outdir);const S={};for(const r of m||[]){const{definition:f,config:i,relativePath:n,customOutputRelativeFile:c,contentItems:_,flatItems:k,parser:E,options:B,rawOptions:q,hash:J}=r,N=c||n,o=[],x={},{definition:Q}=E||{},{info:l}=Q||{},O=l?.["x-metadata"],v=!!i.openapi?.excludeFromSearch||!!i.theme?.openapi?.excludeFromSearch||!!d.openapi?.excludeFromSearch||!!d.theme?.openapi?.excludeFromSearch,G={title:l?.title,description:l?.description,summary:l?.summary,...i.metadata,...O},h={untagged:[],tagged:new Map};for(const t of k){const{id:C,href:I,operationDefinition:y}=t;if(y){const{tags:P}=y;if(P)for(const T of P)h.tagged.has(T)||h.tagged.set(T,[]),h.tagged.get(T)?.push(t);else h.untagged.push(t);V()&&(x[`#${y.pointer}`]=t.href)}if(!se({item:t}))continue;const F=t,Y=F.type==="section"&&!!F.infoDefinition,z=I.split("#")[0]+"/",K=t?.operationDefinition?.[D];o.push({excludeFromSearch:v,slugSuffix:z,fsPath:N,metadata:{subType:"openapi-operation"},httpVerb:t?.httpVerb||"",path:n,templateId:R,[D]:K||i.rbac,getAiDocumentsStore:de({parser:E,options:B,info:l,tagOperations:h,openapiContentItem:F,metadata:G,relativePath:n,getSearchFacets:e.getSearchFacets,includeInLLMsTxt:Y,excludeFromSearch:v}),getStaticData:async P=>({props:{dynamicMarkdocComponents:["openapi"],baseSlug:P.baseSlug,seo:t["x-metadata"]?.seo||{title:t.name,description:t.description},itemId:C,disableAutoScroll:!0}})})}o[0]={...o[0],metadata:{type:"openapi",...G},hasClientRoutes:!0,getSidebar:(t,C)=>{const I=[];return re({contentItems:_,sidebarItems:I,routeSlug:t.slug,navItem:C}),I},getNavText:()=>l?.title,getSearchDocuments:ae(E,B,k,e.getSearchFacets,e.setSearchFacets,v)},O?.apiId&&(S[O.apiId]={slug:o[0]?.slug||""});const W=o[0];o[0]=o[o.length-1],o[o.length-1]=W;for(const t of o)e.addRoute({...t,serverPropsGetterIds:g?[a,s]:[a]});const X=V()?n:void 0,H=`${U}${n}`;A[H]={fsPath:N,definition:f,options:q,sourcePath:X,routesMapping:x,hash:J};for(const t of o)e.addRoute({...t,sharedData:[{id:H,key:"openAPIDocsStore"}],serverPropsGetterIds:g?[a,s]:[a]})}e.setGlobalData({apiProducts:S})})},afterRoutesCreated:async(e,p)=>{const u=new Set;for(const{chunks:a,relativePath:s,isVirtual:d,realRelativePath:g}of L){const m=e.getAllRoutes().filter(r=>r.fsPath===s).map(r=>r.slug),S=(await p.cache.load(g,"load-oas")).compoundHash;await p.cache.load(s,{loader:async function(){for(const{node:f,markdown:i,key:n,relativePath:c}of a){const{ast:_}=await e.parseMarkdoc({content:i,relativePath:c,isVirtual:d},p,{sharedDataIds:[`${U}${c}`],routeSlugs:m});f[`x-parsed-md-${n}`]={result:Z(_)}}},name:"openapi-markdoc-inline-parser"},[S]);for(const{pointer:r}of a)u.add(r)}const R=M.difference(u);for(const a of R)p.cache.delete(a);M=u;for(const[a,s]of Object.entries(A))await e.createSharedData(a,{...s,baseSlug:e.getRouteByFsPath(s.fsPath)?.baseSlug},s.hash)}}}export{ve as openAPIDocsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import p from"node:path";import{existsSync as b}from"node:fs";import{writeFile as
|
|
1
|
+
import p from"node:path";import{existsSync as b}from"node:fs";import{writeFile as D,access as v,rm as N,constants as X}from"fs/promises";import{REDOCLY_ROUTE_RBAC as S,REDOCLY_TEAMS_RBAC as R}from"@redocly/config";import $ from"picomatch";import{DEFAULT_LOCALE_PLACEHOLDER as _}from"../../../../constants/common.js";import{AI_INDEX_EXPORT_FOLDER as j}from"../../../constants/plugins/search.js";import{LLMS_TXT_FILE_NAME as k}from"../../../constants/common.js";import{isBuildMode as B}from"../../../utils/envs/is-build-mode.js";import{logger as a}from"../../../tools/notifiers/logger.js";import{shaHexShort as G}from"../../../utils/crypto/sha-hex-short.js";import{promiseMapLimit as M}from"../../../utils/async/promise-map-limit.js";import{ensureDir as A}from"../../../utils/fs.js";import{isResourcePubliclyAccessible as H,extractTeamsFromScopeItems as U,getRbacTeamsListForResource as Y}from"../../../utils/rbac.js";import{validateLLMsTxtConfig as J,generateLLMsTxt as K,getLLMsTxtMdSlug as V}from"../llmstxt/index.js";const P=20,h="llms.txt:";async function pt(t,i,{aiSearchEnabled:e,llmstxtEnabled:r}){const s=p.join(t.outdir,k);if(!r){try{await v(s,X.W_OK),await N(s)}catch{}if(!e)return}e&&a.info("Preparing AI search documents..."),r&&a.info(`${h} Generating llms.txt files...`);const L=a.startTiming(),c=a.startTiming(),f=t.getGlobalConfig("seo"),l=f?.llmstxt,T=p.resolve(t.outdir,j),u=t.getConfig(),w=u.rbac??{},C=t.getAllRoutes(),F=u?.l10n?.defaultLocale||u?.i18n?.defaultLocale||_,I=(l?.excludeFiles||[]).map(o=>$(o)),d=[];if(await M(C,P,async o=>{if(o.excludeFromSearch)return;const O=await W(o,t),x=await q(o,O,i,t);if(x){if(r)for(const n of await x.getLLMsTxts()){if(I.some(m=>m(n.fsPath)))continue;const g=p.join(t.outdir,V(n.slug));A(g),await D(g,n.content),n.includeInLLMsTxt&&H(o,u)&&d.push(n)}if(e&&B()){const n=await x.getSearchDocuments();if(!n.length)return;const g=z(o,w),m=o.versions?.find(({active:E})=>E),y=m&&{folder:m.folderId,label:m.label,default:m.default};await Q(n,o.fsPath,g,T,F,y)}}}),e&&a.infoTime(c,"AI search documents prepared"),d.length)try{J(l);const o=await K(d,l,{title:f?.title,description:f?.description},i);A(s),await D(s,o),a.infoTime(L,`${h} files generated`)}catch(o){a.error(`${h} Failed to generate llms.txt file. ${o.message}`)}}async function W(t,i){return t.getStaticData?t.getStaticData(t,{...i,contentDir:i.contentDir,parseMarkdoc:(e,r,s)=>i.parseMarkdoc(e,r,s)}):{}}async function q(t,i,e,r){if(t.getAiDocumentsStore)return t.getAiDocumentsStore(t,{...i,[R]:t[R],[S]:t[S]},e,r)}function z(t,i){const e=U(t?.[R]);return e?.length?e:Y(t,i)}async function Q(t,i,e,r,s,L){await M(t,P,async c=>{const f=`${G(i+c.content)}.json`,l=A(p.join(r,f)),T=c.locale===_?s:c.locale;b(l)||await D(l,JSON.stringify({...c,rbacTeams:e||[],version:L,locale:T}),"utf-8")})}export{pt as prepareAiSearchDocuments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REDOCLY_ROUTE_RBAC as T,REDOCLY_TEAMS_RBAC as p}from"@redocly/config";import{existsSync as O}from"fs";import{rm as $}from"node:fs/promises";import{DEFAULT_LOCALE_PLACEHOLDER as y}from"../../../../constants/common.js";import{SEARCH_DATA_EXPORT_FOLDER as S}from"../../../constants/plugins/search.js";import{isBuildMode as A}from"../../../utils/envs/is-build-mode.js";import{logger as n}from"../../../tools/notifiers/logger.js";import{
|
|
1
|
+
import{REDOCLY_ROUTE_RBAC as T,REDOCLY_TEAMS_RBAC as p}from"@redocly/config";import{existsSync as O}from"fs";import{rm as $}from"node:fs/promises";import{DEFAULT_LOCALE_PLACEHOLDER as y}from"../../../../constants/common.js";import{SEARCH_DATA_EXPORT_FOLDER as S}from"../../../constants/plugins/search.js";import{isBuildMode as A}from"../../../utils/envs/is-build-mode.js";import{logger as n}from"../../../tools/notifiers/logger.js";import{extractTeamsFromScopeItems as M,getRbacTeamsListForResource as P}from"../../../utils/index.js";import{getSearchDocumentGroup as I}from"../utils.js";import{telemetry as B}from"../../../../cli/telemetry/index.js";import{telemetryTraceStep as R}from"../../../../cli/telemetry/helpers/trace-step.js";async function J(_,t,l){await R("build.plugin.search.prepare_search_documents",async()=>{n.info("Preparing search documents and create indexes..."),A()&&O(`${t.outdir}/${S}`)&&await $(`${t.outdir}/${S}`,{recursive:!0});const b=n.startTiming(),F=t.getConfig().rbac,v=[y,..._.localeFolders.map(a=>a.toLowerCase())];for(const a of v)await R("build.plugin.search.prepare_search_documents.locale",async c=>{const L=t.getAllRoutesForLocale(a);let g=0,D=0;for(const r of L){if(g++,r.excludeFromSearch)continue;const f=new Map,{product:m}=r,w=await r.getStaticData?.(r,{...t,contentDir:t.contentDir,parseMarkdoc:(s,e,u)=>t.parseMarkdoc(s,e,u)})||{},i=await r.getSearchDocuments?.(r,{...w,[p]:r[p],[T]:r[T]},t),o=r.versions?.find(s=>s.active),C=P(r,F??{});if(i){if(i&&i.length){D+=i.length;for(const s in i){let e=i[s];const u=M(e?.[p]),h=u?.length?u:C,x=e.tags||[];e={...e,...o&&{version:o.version,isDefaultVersion:o.default,versionFolderId:o.folderId},...m&&{product:m},rbacTeams:h,tags:[...x,...h,...o?o.default?["v:default"]:[`v:${o.folderId}:${o.version}`]:["v:default"],...m?[`p:${m.name}`]:[]],url:e.url&&(e.path&&e.path.length>1?e.url:e.url.split("#")[0])};const d=I(e.facets);if(d){const E=f.get(d)??[];f.set(d,[...E,e])}}}for(const[s,e]of f)await l.addDocuments(e,{locale:a,group:s,outDir:t.outdir})}}c?.setAttribute("locale",a),c?.setAttribute("totalDocuments",g),c?.setAttribute("totalSearchDocuments",D)});if(l.cleanupFacetValues(t),n.infoTime(b,"Search indexes created"),A()){n.info("Writing out search data...");const a=n.startTiming();await l.export(t.outdir);const c=n.infoTime(a,"Search data written");c&&B.sendTimingPerformedMessage(c)}})}export{J as prepareSearchDocuments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_SSO_IDP_TITLE as d}from"../../../constants/common.js";import{telemetryTraceStep as u}from"../../../cli/telemetry/helpers/trace-step.js";const f="https://auth.cloud.redocly.com/oidc/.well-known/openid-configuration",y="https://auth.cloud.redocly.com/api/sso/oidc/introspect";async function O(g){return{id:"sso",async processContent(e){await u("build.plugin.sso",async c=>{const o=e.getConfig();if(c?.setAttribute("config",`{"ssoDirect": ${JSON.stringify(o.ssoDirect||{})}}, {"sso": ${JSON.stringify(o.sso||{})}}`),o.ssoDirect&&typeof o.ssoDirect=="object"&&Object.keys(o.ssoDirect).length!==0||o.sso&&Array.isArray(o.sso)&&!o.sso.length)return;const a=!!(o.rbac&&typeof o.rbac=="object"&&Object.keys(o.rbac).length!==0),p=o.requiresLogin;if(!a&&!p)return;let n=f,i=process.env.REDOCLY_OAUTH_USE_INTROSPECT?y:"";const s=o.residency;if(s){const r=s.endsWith("/")?s.slice(0,-1):s;n=`${r.replace("app.","auth.")}/oidc/.well-known/openid-configuration`,i=process.env.REDOCLY_OAUTH_USE_INTROSPECT?`${r}/api/sso/oidc/introspect`:""}let t="AUTO";o.sso&&(Array.isArray(o.sso)?t=o.sso.join(","):t=o.sso);const l={oidc:{title:d,type:"OIDC",configurationUrl:n,clientId:"{{ process.env.OAUTH_CLIENT_ID }}",clientSecret:"{{ process.env.OAUTH_CLIENT_SECRET }}",teamsClaimName:"https://redocly.com/sso/teams",scopes:["openid"],authorizationRequestCustomParams:{login_hint:"{{ process.env.
|
|
1
|
+
import{DEFAULT_SSO_IDP_TITLE as d}from"../../../constants/common.js";import{telemetryTraceStep as u}from"../../../cli/telemetry/helpers/trace-step.js";const f="https://auth.cloud.redocly.com/oidc/.well-known/openid-configuration",y="https://auth.cloud.redocly.com/api/sso/oidc/introspect";async function O(g){return{id:"sso",async processContent(e){await u("build.plugin.sso",async c=>{const o=e.getConfig();if(c?.setAttribute("config",`{"ssoDirect": ${JSON.stringify(o.ssoDirect||{})}}, {"sso": ${JSON.stringify(o.sso||{})}}`),o.ssoDirect&&typeof o.ssoDirect=="object"&&Object.keys(o.ssoDirect).length!==0||o.sso&&Array.isArray(o.sso)&&!o.sso.length)return;const a=!!(o.rbac&&typeof o.rbac=="object"&&Object.keys(o.rbac).length!==0),p=o.requiresLogin;if(!a&&!p)return;let n=f,i=process.env.REDOCLY_OAUTH_USE_INTROSPECT?y:"";const s=o.residency;if(s){const r=s.endsWith("/")?s.slice(0,-1):s;n=`${r.replace("app.","auth.")}/oidc/.well-known/openid-configuration`,i=process.env.REDOCLY_OAUTH_USE_INTROSPECT?`${r}/api/sso/oidc/introspect`:""}let t="AUTO";o.sso&&(Array.isArray(o.sso)?t=o.sso.join(","):t=o.sso);const l={oidc:{title:d,type:"OIDC",configurationUrl:n,clientId:"{{ process.env.OAUTH_CLIENT_ID }}",clientSecret:"{{ process.env.OAUTH_CLIENT_SECRET }}",teamsClaimName:"https://redocly.com/sso/teams",scopes:["openid"],authorizationRequestCustomParams:{login_hint:"{{ process.env.ORG_SLUG }}",login_type:t,prompt:"login"},audience:"{{ process.env.ORG_ID }}",introspectEndpoint:i}};e.setGlobalConfig({ssoDirect:l})})},async afterRoutesCreated(e){}}}export{O as ssoPlugin};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
CREATE TABLE `entities_attributes` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`organization_id` text NOT NULL,
|
|
4
|
+
`project_id` text NOT NULL,
|
|
5
|
+
`entity_key` text NOT NULL,
|
|
6
|
+
`rbac_teams` text,
|
|
7
|
+
`created_at` text NOT NULL,
|
|
8
|
+
`updated_at` text NOT NULL
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
CREATE UNIQUE INDEX `idx_entities_attributes_key` ON `entities_attributes` (`entity_key`);
|
package/dist/server/providers/database/databases/catalog-sqlite/migrations/meta/0005_snapshot.json
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "26cb7c34-fb67-4b31-bf14-8f0ae1b63595",
|
|
5
|
+
"prevId": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
|
|
6
|
+
"tables": {
|
|
7
|
+
"entities_relations": {
|
|
8
|
+
"name": "entities_relations",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"organization_id": {
|
|
18
|
+
"name": "organization_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"project_id": {
|
|
25
|
+
"name": "project_id",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"source_key": {
|
|
32
|
+
"name": "source_key",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"source_version": {
|
|
39
|
+
"name": "source_version",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": true,
|
|
43
|
+
"autoincrement": false,
|
|
44
|
+
"default": "''"
|
|
45
|
+
},
|
|
46
|
+
"source_revision": {
|
|
47
|
+
"name": "source_revision",
|
|
48
|
+
"type": "text",
|
|
49
|
+
"primaryKey": false,
|
|
50
|
+
"notNull": true,
|
|
51
|
+
"autoincrement": false,
|
|
52
|
+
"default": "''"
|
|
53
|
+
},
|
|
54
|
+
"source_to_target_relation": {
|
|
55
|
+
"name": "source_to_target_relation",
|
|
56
|
+
"type": "text",
|
|
57
|
+
"primaryKey": false,
|
|
58
|
+
"notNull": true,
|
|
59
|
+
"autoincrement": false
|
|
60
|
+
},
|
|
61
|
+
"target_key": {
|
|
62
|
+
"name": "target_key",
|
|
63
|
+
"type": "text",
|
|
64
|
+
"primaryKey": false,
|
|
65
|
+
"notNull": true,
|
|
66
|
+
"autoincrement": false
|
|
67
|
+
},
|
|
68
|
+
"target_version": {
|
|
69
|
+
"name": "target_version",
|
|
70
|
+
"type": "text",
|
|
71
|
+
"primaryKey": false,
|
|
72
|
+
"notNull": true,
|
|
73
|
+
"autoincrement": false,
|
|
74
|
+
"default": "''"
|
|
75
|
+
},
|
|
76
|
+
"target_revision": {
|
|
77
|
+
"name": "target_revision",
|
|
78
|
+
"type": "text",
|
|
79
|
+
"primaryKey": false,
|
|
80
|
+
"notNull": true,
|
|
81
|
+
"autoincrement": false,
|
|
82
|
+
"default": "''"
|
|
83
|
+
},
|
|
84
|
+
"target_to_source_relation": {
|
|
85
|
+
"name": "target_to_source_relation",
|
|
86
|
+
"type": "text",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": true,
|
|
89
|
+
"autoincrement": false
|
|
90
|
+
},
|
|
91
|
+
"source_file": {
|
|
92
|
+
"name": "source_file",
|
|
93
|
+
"type": "text",
|
|
94
|
+
"primaryKey": false,
|
|
95
|
+
"notNull": false,
|
|
96
|
+
"autoincrement": false
|
|
97
|
+
},
|
|
98
|
+
"file_hash": {
|
|
99
|
+
"name": "file_hash",
|
|
100
|
+
"type": "text",
|
|
101
|
+
"primaryKey": false,
|
|
102
|
+
"notNull": false,
|
|
103
|
+
"autoincrement": false
|
|
104
|
+
},
|
|
105
|
+
"is_deleted": {
|
|
106
|
+
"name": "is_deleted",
|
|
107
|
+
"type": "integer",
|
|
108
|
+
"primaryKey": false,
|
|
109
|
+
"notNull": false,
|
|
110
|
+
"autoincrement": false,
|
|
111
|
+
"default": false
|
|
112
|
+
},
|
|
113
|
+
"created_at": {
|
|
114
|
+
"name": "created_at",
|
|
115
|
+
"type": "text",
|
|
116
|
+
"primaryKey": false,
|
|
117
|
+
"notNull": true,
|
|
118
|
+
"autoincrement": false
|
|
119
|
+
},
|
|
120
|
+
"updated_at": {
|
|
121
|
+
"name": "updated_at",
|
|
122
|
+
"type": "text",
|
|
123
|
+
"primaryKey": false,
|
|
124
|
+
"notNull": true,
|
|
125
|
+
"autoincrement": false
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"indexes": {
|
|
129
|
+
"idx_entities_relations_source_key": {
|
|
130
|
+
"name": "idx_entities_relations_source_key",
|
|
131
|
+
"columns": ["source_key", "is_deleted"],
|
|
132
|
+
"isUnique": false
|
|
133
|
+
},
|
|
134
|
+
"idx_entities_relations_target_key": {
|
|
135
|
+
"name": "idx_entities_relations_target_key",
|
|
136
|
+
"columns": ["target_key", "is_deleted"],
|
|
137
|
+
"isUnique": false
|
|
138
|
+
},
|
|
139
|
+
"idx_entities_relations_source_target": {
|
|
140
|
+
"name": "idx_entities_relations_source_target",
|
|
141
|
+
"columns": ["source_to_target_relation"],
|
|
142
|
+
"isUnique": false
|
|
143
|
+
},
|
|
144
|
+
"idx_entities_relations_target_source": {
|
|
145
|
+
"name": "idx_entities_relations_target_source",
|
|
146
|
+
"columns": ["target_to_source_relation"],
|
|
147
|
+
"isUnique": false
|
|
148
|
+
},
|
|
149
|
+
"idx_entities_relations_unique": {
|
|
150
|
+
"name": "idx_entities_relations_unique",
|
|
151
|
+
"columns": [
|
|
152
|
+
"source_key",
|
|
153
|
+
"target_key",
|
|
154
|
+
"source_version",
|
|
155
|
+
"target_version",
|
|
156
|
+
"source_revision",
|
|
157
|
+
"target_revision",
|
|
158
|
+
"source_to_target_relation"
|
|
159
|
+
],
|
|
160
|
+
"isUnique": true
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"foreignKeys": {},
|
|
164
|
+
"compositePrimaryKeys": {},
|
|
165
|
+
"uniqueConstraints": {},
|
|
166
|
+
"checkConstraints": {}
|
|
167
|
+
},
|
|
168
|
+
"entities": {
|
|
169
|
+
"name": "entities",
|
|
170
|
+
"columns": {
|
|
171
|
+
"id": {
|
|
172
|
+
"name": "id",
|
|
173
|
+
"type": "text",
|
|
174
|
+
"primaryKey": true,
|
|
175
|
+
"notNull": true,
|
|
176
|
+
"autoincrement": false
|
|
177
|
+
},
|
|
178
|
+
"organization_id": {
|
|
179
|
+
"name": "organization_id",
|
|
180
|
+
"type": "text",
|
|
181
|
+
"primaryKey": false,
|
|
182
|
+
"notNull": true,
|
|
183
|
+
"autoincrement": false
|
|
184
|
+
},
|
|
185
|
+
"project_id": {
|
|
186
|
+
"name": "project_id",
|
|
187
|
+
"type": "text",
|
|
188
|
+
"primaryKey": false,
|
|
189
|
+
"notNull": true,
|
|
190
|
+
"autoincrement": false
|
|
191
|
+
},
|
|
192
|
+
"key": {
|
|
193
|
+
"name": "key",
|
|
194
|
+
"type": "text",
|
|
195
|
+
"primaryKey": false,
|
|
196
|
+
"notNull": true,
|
|
197
|
+
"autoincrement": false
|
|
198
|
+
},
|
|
199
|
+
"type": {
|
|
200
|
+
"name": "type",
|
|
201
|
+
"type": "text",
|
|
202
|
+
"primaryKey": false,
|
|
203
|
+
"notNull": true,
|
|
204
|
+
"autoincrement": false
|
|
205
|
+
},
|
|
206
|
+
"title": {
|
|
207
|
+
"name": "title",
|
|
208
|
+
"type": "text",
|
|
209
|
+
"primaryKey": false,
|
|
210
|
+
"notNull": true,
|
|
211
|
+
"autoincrement": false
|
|
212
|
+
},
|
|
213
|
+
"summary": {
|
|
214
|
+
"name": "summary",
|
|
215
|
+
"type": "text",
|
|
216
|
+
"primaryKey": false,
|
|
217
|
+
"notNull": false,
|
|
218
|
+
"autoincrement": false
|
|
219
|
+
},
|
|
220
|
+
"tags": {
|
|
221
|
+
"name": "tags",
|
|
222
|
+
"type": "text",
|
|
223
|
+
"primaryKey": false,
|
|
224
|
+
"notNull": false,
|
|
225
|
+
"autoincrement": false
|
|
226
|
+
},
|
|
227
|
+
"metadata": {
|
|
228
|
+
"name": "metadata",
|
|
229
|
+
"type": "text",
|
|
230
|
+
"primaryKey": false,
|
|
231
|
+
"notNull": false,
|
|
232
|
+
"autoincrement": false
|
|
233
|
+
},
|
|
234
|
+
"git": {
|
|
235
|
+
"name": "git",
|
|
236
|
+
"type": "text",
|
|
237
|
+
"primaryKey": false,
|
|
238
|
+
"notNull": false,
|
|
239
|
+
"autoincrement": false
|
|
240
|
+
},
|
|
241
|
+
"contact": {
|
|
242
|
+
"name": "contact",
|
|
243
|
+
"type": "text",
|
|
244
|
+
"primaryKey": false,
|
|
245
|
+
"notNull": false,
|
|
246
|
+
"autoincrement": false
|
|
247
|
+
},
|
|
248
|
+
"links": {
|
|
249
|
+
"name": "links",
|
|
250
|
+
"type": "text",
|
|
251
|
+
"primaryKey": false,
|
|
252
|
+
"notNull": false,
|
|
253
|
+
"autoincrement": false
|
|
254
|
+
},
|
|
255
|
+
"created_at": {
|
|
256
|
+
"name": "created_at",
|
|
257
|
+
"type": "text",
|
|
258
|
+
"primaryKey": false,
|
|
259
|
+
"notNull": true,
|
|
260
|
+
"autoincrement": false
|
|
261
|
+
},
|
|
262
|
+
"updated_at": {
|
|
263
|
+
"name": "updated_at",
|
|
264
|
+
"type": "text",
|
|
265
|
+
"primaryKey": false,
|
|
266
|
+
"notNull": true,
|
|
267
|
+
"autoincrement": false
|
|
268
|
+
},
|
|
269
|
+
"source": {
|
|
270
|
+
"name": "source",
|
|
271
|
+
"type": "text",
|
|
272
|
+
"primaryKey": false,
|
|
273
|
+
"notNull": false,
|
|
274
|
+
"autoincrement": false,
|
|
275
|
+
"default": "'file'"
|
|
276
|
+
},
|
|
277
|
+
"source_file": {
|
|
278
|
+
"name": "source_file",
|
|
279
|
+
"type": "text",
|
|
280
|
+
"primaryKey": false,
|
|
281
|
+
"notNull": false,
|
|
282
|
+
"autoincrement": false
|
|
283
|
+
},
|
|
284
|
+
"file_hash": {
|
|
285
|
+
"name": "file_hash",
|
|
286
|
+
"type": "text",
|
|
287
|
+
"primaryKey": false,
|
|
288
|
+
"notNull": false,
|
|
289
|
+
"autoincrement": false
|
|
290
|
+
},
|
|
291
|
+
"version": {
|
|
292
|
+
"name": "version",
|
|
293
|
+
"type": "text",
|
|
294
|
+
"primaryKey": false,
|
|
295
|
+
"notNull": true,
|
|
296
|
+
"autoincrement": false,
|
|
297
|
+
"default": "'not_specified_version'"
|
|
298
|
+
},
|
|
299
|
+
"revision": {
|
|
300
|
+
"name": "revision",
|
|
301
|
+
"type": "text",
|
|
302
|
+
"primaryKey": false,
|
|
303
|
+
"notNull": true,
|
|
304
|
+
"autoincrement": false
|
|
305
|
+
},
|
|
306
|
+
"hash": {
|
|
307
|
+
"name": "hash",
|
|
308
|
+
"type": "text",
|
|
309
|
+
"primaryKey": false,
|
|
310
|
+
"notNull": false,
|
|
311
|
+
"autoincrement": false
|
|
312
|
+
},
|
|
313
|
+
"is_current": {
|
|
314
|
+
"name": "is_current",
|
|
315
|
+
"type": "integer",
|
|
316
|
+
"primaryKey": false,
|
|
317
|
+
"notNull": false,
|
|
318
|
+
"autoincrement": false,
|
|
319
|
+
"default": true
|
|
320
|
+
},
|
|
321
|
+
"is_default_version": {
|
|
322
|
+
"name": "is_default_version",
|
|
323
|
+
"type": "integer",
|
|
324
|
+
"primaryKey": false,
|
|
325
|
+
"notNull": false,
|
|
326
|
+
"autoincrement": false,
|
|
327
|
+
"default": false
|
|
328
|
+
},
|
|
329
|
+
"is_deleted": {
|
|
330
|
+
"name": "is_deleted",
|
|
331
|
+
"type": "integer",
|
|
332
|
+
"primaryKey": false,
|
|
333
|
+
"notNull": false,
|
|
334
|
+
"autoincrement": false,
|
|
335
|
+
"default": false
|
|
336
|
+
},
|
|
337
|
+
"scorecards_status": {
|
|
338
|
+
"name": "scorecards_status",
|
|
339
|
+
"type": "text",
|
|
340
|
+
"primaryKey": false,
|
|
341
|
+
"notNull": false,
|
|
342
|
+
"autoincrement": false
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"indexes": {
|
|
346
|
+
"idx_entities_type": {
|
|
347
|
+
"name": "idx_entities_type",
|
|
348
|
+
"columns": ["type"],
|
|
349
|
+
"isUnique": false
|
|
350
|
+
},
|
|
351
|
+
"idx_entities_hash": {
|
|
352
|
+
"name": "idx_entities_hash",
|
|
353
|
+
"columns": ["hash"],
|
|
354
|
+
"isUnique": false
|
|
355
|
+
},
|
|
356
|
+
"idx_entities_key_source_created_at": {
|
|
357
|
+
"name": "idx_entities_key_source_created_at",
|
|
358
|
+
"columns": ["key", "created_at"],
|
|
359
|
+
"isUnique": false
|
|
360
|
+
},
|
|
361
|
+
"idx_entities_key_source_is_current": {
|
|
362
|
+
"name": "idx_entities_key_source_is_current",
|
|
363
|
+
"columns": ["key", "is_current", "is_deleted"],
|
|
364
|
+
"isUnique": false
|
|
365
|
+
},
|
|
366
|
+
"idx_entities_key_source_is_default": {
|
|
367
|
+
"name": "idx_entities_key_source_is_default",
|
|
368
|
+
"columns": ["key", "is_default_version"],
|
|
369
|
+
"isUnique": false
|
|
370
|
+
},
|
|
371
|
+
"idx_entities_key_source": {
|
|
372
|
+
"name": "idx_entities_key_source",
|
|
373
|
+
"columns": ["key", "source", "revision", "version"],
|
|
374
|
+
"isUnique": true
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"foreignKeys": {},
|
|
378
|
+
"compositePrimaryKeys": {},
|
|
379
|
+
"uniqueConstraints": {},
|
|
380
|
+
"checkConstraints": {}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"views": {},
|
|
384
|
+
"enums": {},
|
|
385
|
+
"_meta": {
|
|
386
|
+
"schemas": {},
|
|
387
|
+
"tables": {},
|
|
388
|
+
"columns": {}
|
|
389
|
+
},
|
|
390
|
+
"internal": {
|
|
391
|
+
"indexes": {}
|
|
392
|
+
}
|
|
393
|
+
}
|