mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
pro server: Enterprise edition lite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5219 Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com> Co-authored-by: Nithin <36623418+nithindv@users.noreply.github.com> GitOrigin-RevId: b5c33ea5653a6e107a14d106082cf4301481fc40
This commit is contained in:
parent
bb1020bd47
commit
05d2f05b36
@ -4,7 +4,7 @@ import { getFeaturesCompatibility } from './helpers/versionUtils';
|
||||
import { stripTrailingSlash } from './components/Common/utils/urlUtils';
|
||||
import { isEmpty } from './components/Common/utils/jsUtils';
|
||||
|
||||
type ConsoleType = 'oss' | 'cloud' | 'pro';
|
||||
type ConsoleType = 'oss' | 'cloud' | 'pro' | 'pro-lite';
|
||||
|
||||
type UUID = string;
|
||||
|
||||
@ -32,6 +32,18 @@ type ProServerEnv = {
|
||||
urlPrefix: string;
|
||||
};
|
||||
|
||||
type ProLiteServerEnv = {
|
||||
consoleType: 'pro-lite';
|
||||
consoleId: string;
|
||||
consoleMode: 'server';
|
||||
assetsPath: string;
|
||||
consolePath: string;
|
||||
enableTelemetry: boolean;
|
||||
isAdminSecretSet: boolean;
|
||||
serverVersion: string;
|
||||
urlPrefix: string;
|
||||
};
|
||||
|
||||
type CloudUserRole = 'owner' | 'user';
|
||||
|
||||
type CloudServerEnv = {
|
||||
@ -91,6 +103,7 @@ export type CloudCliEnv = {
|
||||
};
|
||||
|
||||
type ProCliEnv = CloudCliEnv;
|
||||
type ProLiteCliEnv = CloudCliEnv;
|
||||
|
||||
export type EnvVars = {
|
||||
nodeEnv?: string;
|
||||
@ -114,9 +127,11 @@ export type EnvVars = {
|
||||
| OSSServerEnv
|
||||
| CloudServerEnv
|
||||
| ProServerEnv
|
||||
| ProLiteServerEnv
|
||||
| OSSCliEnv
|
||||
| CloudCliEnv
|
||||
| ProCliEnv
|
||||
| ProLiteCliEnv
|
||||
);
|
||||
|
||||
declare global {
|
||||
|
@ -1,4 +1,4 @@
|
||||
export type AllowedConsoleTypes = 'oss' | 'pro' | 'cloud';
|
||||
export type AllowedConsoleTypes = 'oss' | 'pro' | 'cloud' | 'pro-lite';
|
||||
export type AllowedConsoleModes = 'cli' | 'server';
|
||||
|
||||
export type Privileges = string[];
|
||||
|
@ -746,7 +746,9 @@ export const supportedFeatures: DeepRequired<SupportedFeaturesType> = {
|
||||
connection_lifetime: true,
|
||||
namingConvention: true,
|
||||
ssl_certificates:
|
||||
globals.consoleType === 'cloud' || globals.consoleType === 'pro',
|
||||
globals.consoleType === 'cloud' ||
|
||||
globals.consoleType === 'pro' ||
|
||||
globals.consoleType === 'pro-lite',
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -32,6 +32,16 @@ describe('isProConsole', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('when consoleMode is server and consoleType is pro-lite', () => {
|
||||
it('returns true', () => {
|
||||
const env: ProConsoleEnv = {
|
||||
consoleMode: 'server',
|
||||
consoleType: 'pro-lite',
|
||||
};
|
||||
expect(isProConsole(env)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when consoleMode is server and consoleType is oss', () => {
|
||||
it('returns false', () => {
|
||||
const env: ProConsoleEnv = {
|
||||
|
@ -9,7 +9,9 @@ export type ProConsoleEnv = {
|
||||
export const isProConsole = (env: ProConsoleEnv) => {
|
||||
if (
|
||||
env.consoleMode === 'server' &&
|
||||
(env.consoleType === 'cloud' || env.consoleType === 'pro')
|
||||
(env.consoleType === 'cloud' ||
|
||||
env.consoleType === 'pro' ||
|
||||
env.consoleType === 'pro-lite')
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user