feat: add hasura cloud

This commit is contained in:
nafees nazik
2023-10-18 22:40:34 +05:30
parent ebe4f70b51
commit a6e02238ad
4 changed files with 575 additions and 560 deletions
+23 -20
View File
@@ -14,6 +14,7 @@ import {
INTEGRATION_GITHUB, INTEGRATION_GITHUB,
INTEGRATION_GITLAB, INTEGRATION_GITLAB,
INTEGRATION_HASHICORP_VAULT, INTEGRATION_HASHICORP_VAULT,
INTEGRATION_HASURA_CLOUD,
INTEGRATION_HEROKU, INTEGRATION_HEROKU,
INTEGRATION_LARAVELFORGE, INTEGRATION_LARAVELFORGE,
INTEGRATION_NETLIFY, INTEGRATION_NETLIFY,
@@ -76,7 +77,8 @@ export interface IIntegration {
| "cloud-66" | "cloud-66"
| "northflank" | "northflank"
| "windmill" | "windmill"
| "gcp-secret-manager"; | "gcp-secret-manager"
| "hasura-cloud";
integrationAuth: Types.ObjectId; integrationAuth: Types.ObjectId;
metadata: Metadata; metadata: Metadata;
} }
@@ -86,67 +88,67 @@ const integrationSchema = new Schema<IIntegration>(
workspace: { workspace: {
type: Schema.Types.ObjectId, type: Schema.Types.ObjectId,
ref: "Workspace", ref: "Workspace",
required: true, required: true
}, },
environment: { environment: {
type: String, type: String,
required: true, required: true
}, },
isActive: { isActive: {
type: Boolean, type: Boolean,
required: true, required: true
}, },
url: { url: {
// for custom self-hosted integrations (e.g. self-hosted GitHub enterprise) // for custom self-hosted integrations (e.g. self-hosted GitHub enterprise)
type: String, type: String,
default: null, default: null
}, },
app: { app: {
// name of app in provider // name of app in provider
type: String, type: String,
default: null, default: null
}, },
appId: { appId: {
// id of app in provider // id of app in provider
type: String, type: String,
default: null, default: null
}, },
targetEnvironment: { targetEnvironment: {
// target environment // target environment
type: String, type: String,
default: null, default: null
}, },
targetEnvironmentId: { targetEnvironmentId: {
type: String, type: String,
default: null, default: null
}, },
targetService: { targetService: {
// railway-specific service // railway-specific service
// qovery-specific project // qovery-specific project
type: String, type: String,
default: null, default: null
}, },
targetServiceId: { targetServiceId: {
// railway-specific service // railway-specific service
// qovery specific project // qovery specific project
type: String, type: String,
default: null, default: null
}, },
owner: { owner: {
// github-specific repo owner-login // github-specific repo owner-login
type: String, type: String,
default: null, default: null
}, },
path: { path: {
// aws-parameter-store-specific path // aws-parameter-store-specific path
// (also) vercel preview-branch // (also) vercel preview-branch
type: String, type: String,
default: null, default: null
}, },
region: { region: {
// aws-parameter-store-specific path // aws-parameter-store-specific path
type: String, type: String,
default: null, default: null
}, },
scope: { scope: {
// qovery-specific scope // qovery-specific scope
@@ -183,19 +185,20 @@ const integrationSchema = new Schema<IIntegration>(
INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM, INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM,
INTEGRATION_CLOUD_66, INTEGRATION_CLOUD_66,
INTEGRATION_NORTHFLANK, INTEGRATION_NORTHFLANK,
INTEGRATION_GCP_SECRET_MANAGER INTEGRATION_GCP_SECRET_MANAGER,
INTEGRATION_HASURA_CLOUD
], ],
required: true, required: true
}, },
integrationAuth: { integrationAuth: {
type: Schema.Types.ObjectId, type: Schema.Types.ObjectId,
ref: "IntegrationAuth", ref: "IntegrationAuth",
required: true, required: true
}, },
secretPath: { secretPath: {
type: String, type: String,
required: true, required: true,
default: "/", default: "/"
}, },
metadata: { metadata: {
type: Schema.Types.Mixed, type: Schema.Types.Mixed,
@@ -203,8 +206,8 @@ const integrationSchema = new Schema<IIntegration>(
} }
}, },
{ {
timestamps: true, timestamps: true
} }
); );
export const Integration = model<IIntegration>("Integration", integrationSchema); export const Integration = model<IIntegration>("Integration", integrationSchema);
@@ -1,205 +1,203 @@
import { import {
ALGORITHM_AES_256_GCM, ALGORITHM_AES_256_GCM,
ENCODING_SCHEME_BASE64, ENCODING_SCHEME_BASE64,
ENCODING_SCHEME_UTF8, ENCODING_SCHEME_UTF8,
INTEGRATION_AWS_PARAMETER_STORE, INTEGRATION_AWS_PARAMETER_STORE,
INTEGRATION_AWS_SECRET_MANAGER, INTEGRATION_AWS_SECRET_MANAGER,
INTEGRATION_AZURE_KEY_VAULT, INTEGRATION_AZURE_KEY_VAULT,
INTEGRATION_BITBUCKET, INTEGRATION_BITBUCKET,
INTEGRATION_CIRCLECI, INTEGRATION_CIRCLECI,
INTEGRATION_CLOUDFLARE_PAGES, INTEGRATION_CLOUDFLARE_PAGES,
INTEGRATION_CLOUD_66, INTEGRATION_CLOUD_66,
INTEGRATION_CODEFRESH, INTEGRATION_CODEFRESH,
INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM, INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM,
INTEGRATION_FLYIO, INTEGRATION_FLYIO,
INTEGRATION_GCP_SECRET_MANAGER, INTEGRATION_GCP_SECRET_MANAGER,
INTEGRATION_GITHUB, INTEGRATION_GITHUB,
INTEGRATION_GITLAB, INTEGRATION_GITLAB,
INTEGRATION_HASHICORP_VAULT, INTEGRATION_HASHICORP_VAULT,
INTEGRATION_HEROKU, INTEGRATION_HASURA_CLOUD,
INTEGRATION_LARAVELFORGE, INTEGRATION_HEROKU,
INTEGRATION_NETLIFY, INTEGRATION_LARAVELFORGE,
INTEGRATION_NORTHFLANK, INTEGRATION_NETLIFY,
INTEGRATION_RAILWAY, INTEGRATION_NORTHFLANK,
INTEGRATION_RENDER, INTEGRATION_RAILWAY,
INTEGRATION_SUPABASE, INTEGRATION_RENDER,
INTEGRATION_TEAMCITY, INTEGRATION_SUPABASE,
INTEGRATION_TERRAFORM_CLOUD, INTEGRATION_TEAMCITY,
INTEGRATION_TRAVISCI, INTEGRATION_TERRAFORM_CLOUD,
INTEGRATION_VERCEL, INTEGRATION_TRAVISCI,
INTEGRATION_WINDMILL INTEGRATION_VERCEL,
} from "../../variables"; INTEGRATION_WINDMILL
import { Document, Schema, Types, model } from "mongoose"; } from "../../variables";
import { IntegrationAuthMetadata } from "./types"; import { Document, Schema, Types, model } from "mongoose";
import { IntegrationAuthMetadata } from "./types";
export interface IIntegrationAuth extends Document {
_id: Types.ObjectId; export interface IIntegrationAuth extends Document {
workspace: Types.ObjectId; _id: Types.ObjectId;
integration: workspace: Types.ObjectId;
| "heroku" integration:
| "vercel" | "heroku"
| "netlify" | "vercel"
| "github" | "netlify"
| "gitlab" | "github"
| "render" | "gitlab"
| "railway" | "render"
| "flyio" | "railway"
| "azure-key-vault" | "flyio"
| "laravel-forge" | "azure-key-vault"
| "circleci" | "laravel-forge"
| "travisci" | "circleci"
| "supabase" | "travisci"
| "aws-parameter-store" | "supabase"
| "aws-secret-manager" | "aws-parameter-store"
| "checkly" | "aws-secret-manager"
| "qovery" | "checkly"
| "cloudflare-pages" | "qovery"
| "codefresh" | "cloudflare-pages"
| "digital-ocean-app-platform" | "codefresh"
| "bitbucket" | "digital-ocean-app-platform"
| "cloud-66" | "bitbucket"
| "terraform-cloud" | "cloud-66"
| "teamcity" | "terraform-cloud"
| "northflank" | "teamcity"
| "windmill" | "northflank"
| "gcp-secret-manager"; | "windmill"
teamId: string; | "gcp-secret-manager"
accountId: string; | "hasura-cloud";
url: string; teamId: string;
namespace: string; accountId: string;
refreshCiphertext?: string; url: string;
refreshIV?: string; namespace: string;
refreshTag?: string; refreshCiphertext?: string;
accessIdCiphertext?: string; refreshIV?: string;
accessIdIV?: string; refreshTag?: string;
accessIdTag?: string; accessIdCiphertext?: string;
accessCiphertext?: string; accessIdIV?: string;
accessIV?: string; accessIdTag?: string;
accessTag?: string; accessCiphertext?: string;
algorithm?: "aes-256-gcm"; accessIV?: string;
keyEncoding?: "utf8" | "base64"; accessTag?: string;
accessExpiresAt?: Date; algorithm?: "aes-256-gcm";
metadata?: IntegrationAuthMetadata; keyEncoding?: "utf8" | "base64";
} accessExpiresAt?: Date;
metadata?: IntegrationAuthMetadata;
const integrationAuthSchema = new Schema<IIntegrationAuth>( }
{
workspace: { const integrationAuthSchema = new Schema<IIntegrationAuth>(
type: Schema.Types.ObjectId, {
ref: "Workspace", workspace: {
required: true, type: Schema.Types.ObjectId,
}, ref: "Workspace",
integration: { required: true
type: String,
enum: [
INTEGRATION_AZURE_KEY_VAULT,
INTEGRATION_AWS_PARAMETER_STORE,
INTEGRATION_AWS_SECRET_MANAGER,
INTEGRATION_HEROKU,
INTEGRATION_VERCEL,
INTEGRATION_NETLIFY,
INTEGRATION_GITHUB,
INTEGRATION_GITLAB,
INTEGRATION_RENDER,
INTEGRATION_RAILWAY,
INTEGRATION_FLYIO,
INTEGRATION_CIRCLECI,
INTEGRATION_LARAVELFORGE,
INTEGRATION_TRAVISCI,
INTEGRATION_TEAMCITY,
INTEGRATION_SUPABASE,
INTEGRATION_TERRAFORM_CLOUD,
INTEGRATION_HASHICORP_VAULT,
INTEGRATION_CLOUDFLARE_PAGES,
INTEGRATION_CODEFRESH,
INTEGRATION_WINDMILL,
INTEGRATION_BITBUCKET,
INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM,
INTEGRATION_CLOUD_66,
INTEGRATION_NORTHFLANK,
INTEGRATION_GCP_SECRET_MANAGER
],
required: true,
},
teamId: {
// vercel-specific integration param
type: String,
},
url: {
// for any self-hosted integrations (e.g. self-hosted hashicorp-vault)
type: String,
},
namespace: {
// hashicorp-vault-specific integration param
type: String,
},
accountId: {
// netlify-specific integration param
type: String,
},
refreshCiphertext: {
type: String,
select: false,
},
refreshIV: {
type: String,
select: false,
},
refreshTag: {
type: String,
select: false,
},
accessIdCiphertext: {
type: String,
select: false,
},
accessIdIV: {
type: String,
select: false,
},
accessIdTag: {
type: String,
select: false,
},
accessCiphertext: {
type: String,
select: false,
},
accessIV: {
type: String,
select: false,
},
accessTag: {
type: String,
select: false,
},
accessExpiresAt: {
type: Date,
select: false,
},
algorithm: { // the encryption algorithm used
type: String,
enum: [ALGORITHM_AES_256_GCM],
required: true,
},
keyEncoding: {
type: String,
enum: [
ENCODING_SCHEME_UTF8,
ENCODING_SCHEME_BASE64,
],
required: true,
},
metadata: {
type: Schema.Types.Mixed
}
}, },
{ integration: {
timestamps: true, type: String,
enum: [
INTEGRATION_AZURE_KEY_VAULT,
INTEGRATION_AWS_PARAMETER_STORE,
INTEGRATION_AWS_SECRET_MANAGER,
INTEGRATION_HEROKU,
INTEGRATION_VERCEL,
INTEGRATION_NETLIFY,
INTEGRATION_GITHUB,
INTEGRATION_GITLAB,
INTEGRATION_RENDER,
INTEGRATION_RAILWAY,
INTEGRATION_FLYIO,
INTEGRATION_CIRCLECI,
INTEGRATION_LARAVELFORGE,
INTEGRATION_TRAVISCI,
INTEGRATION_TEAMCITY,
INTEGRATION_SUPABASE,
INTEGRATION_TERRAFORM_CLOUD,
INTEGRATION_HASHICORP_VAULT,
INTEGRATION_CLOUDFLARE_PAGES,
INTEGRATION_CODEFRESH,
INTEGRATION_WINDMILL,
INTEGRATION_BITBUCKET,
INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM,
INTEGRATION_CLOUD_66,
INTEGRATION_NORTHFLANK,
INTEGRATION_GCP_SECRET_MANAGER,
INTEGRATION_HASURA_CLOUD
],
required: true
},
teamId: {
// vercel-specific integration param
type: String
},
url: {
// for any self-hosted integrations (e.g. self-hosted hashicorp-vault)
type: String
},
namespace: {
// hashicorp-vault-specific integration param
type: String
},
accountId: {
// netlify-specific integration param
type: String
},
refreshCiphertext: {
type: String,
select: false
},
refreshIV: {
type: String,
select: false
},
refreshTag: {
type: String,
select: false
},
accessIdCiphertext: {
type: String,
select: false
},
accessIdIV: {
type: String,
select: false
},
accessIdTag: {
type: String,
select: false
},
accessCiphertext: {
type: String,
select: false
},
accessIV: {
type: String,
select: false
},
accessTag: {
type: String,
select: false
},
accessExpiresAt: {
type: Date,
select: false
},
algorithm: {
// the encryption algorithm used
type: String,
enum: [ALGORITHM_AES_256_GCM],
required: true
},
keyEncoding: {
type: String,
enum: [ENCODING_SCHEME_UTF8, ENCODING_SCHEME_BASE64],
required: true
},
metadata: {
type: Schema.Types.Mixed
} }
); },
{
export const IntegrationAuth = model<IIntegrationAuth>( timestamps: true
"IntegrationAuth", }
integrationAuthSchema );
);
export const IntegrationAuth = model<IIntegrationAuth>("IntegrationAuth", integrationAuthSchema);
+312 -300
View File
@@ -1,12 +1,12 @@
import { import {
getClientIdAzure, getClientIdAzure,
getClientIdBitBucket, getClientIdBitBucket,
getClientIdGCPSecretManager, getClientIdGCPSecretManager,
getClientIdGitHub, getClientIdGitHub,
getClientIdGitLab, getClientIdGitLab,
getClientIdHeroku, getClientIdHeroku,
getClientIdNetlify, getClientIdNetlify,
getClientSlugVercel getClientSlugVercel
} from "../config"; } from "../config";
// integrations // integrations
@@ -22,7 +22,7 @@ export const INTEGRATION_GITLAB = "gitlab";
export const INTEGRATION_RENDER = "render"; export const INTEGRATION_RENDER = "render";
export const INTEGRATION_RAILWAY = "railway"; export const INTEGRATION_RAILWAY = "railway";
export const INTEGRATION_FLYIO = "flyio"; export const INTEGRATION_FLYIO = "flyio";
export const INTEGRATION_LARAVELFORGE = "laravel-forge" export const INTEGRATION_LARAVELFORGE = "laravel-forge";
export const INTEGRATION_CIRCLECI = "circleci"; export const INTEGRATION_CIRCLECI = "circleci";
export const INTEGRATION_TRAVISCI = "travisci"; export const INTEGRATION_TRAVISCI = "travisci";
export const INTEGRATION_TEAMCITY = "teamcity"; export const INTEGRATION_TEAMCITY = "teamcity";
@@ -38,32 +38,34 @@ export const INTEGRATION_WINDMILL = "windmill";
export const INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM = "digital-ocean-app-platform"; export const INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM = "digital-ocean-app-platform";
export const INTEGRATION_CLOUD_66 = "cloud-66"; export const INTEGRATION_CLOUD_66 = "cloud-66";
export const INTEGRATION_NORTHFLANK = "northflank"; export const INTEGRATION_NORTHFLANK = "northflank";
export const INTEGRATION_HASURA_CLOUD = "hasura-cloud";
export const INTEGRATION_SET = new Set([ export const INTEGRATION_SET = new Set([
INTEGRATION_GCP_SECRET_MANAGER, INTEGRATION_GCP_SECRET_MANAGER,
INTEGRATION_AZURE_KEY_VAULT, INTEGRATION_AZURE_KEY_VAULT,
INTEGRATION_HEROKU, INTEGRATION_HEROKU,
INTEGRATION_VERCEL, INTEGRATION_VERCEL,
INTEGRATION_NETLIFY, INTEGRATION_NETLIFY,
INTEGRATION_GITHUB, INTEGRATION_GITHUB,
INTEGRATION_GITLAB, INTEGRATION_GITLAB,
INTEGRATION_RENDER, INTEGRATION_RENDER,
INTEGRATION_FLYIO, INTEGRATION_FLYIO,
INTEGRATION_CIRCLECI, INTEGRATION_CIRCLECI,
INTEGRATION_LARAVELFORGE, INTEGRATION_LARAVELFORGE,
INTEGRATION_TRAVISCI, INTEGRATION_TRAVISCI,
INTEGRATION_TEAMCITY, INTEGRATION_TEAMCITY,
INTEGRATION_SUPABASE, INTEGRATION_SUPABASE,
INTEGRATION_CHECKLY, INTEGRATION_CHECKLY,
INTEGRATION_QOVERY, INTEGRATION_QOVERY,
INTEGRATION_TERRAFORM_CLOUD, INTEGRATION_TERRAFORM_CLOUD,
INTEGRATION_HASHICORP_VAULT, INTEGRATION_HASHICORP_VAULT,
INTEGRATION_CLOUDFLARE_PAGES, INTEGRATION_CLOUDFLARE_PAGES,
INTEGRATION_CODEFRESH, INTEGRATION_CODEFRESH,
INTEGRATION_WINDMILL, INTEGRATION_WINDMILL,
INTEGRATION_BITBUCKET, INTEGRATION_BITBUCKET,
INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM, INTEGRATION_DIGITAL_OCEAN_APP_PLATFORM,
INTEGRATION_CLOUD_66, INTEGRATION_CLOUD_66,
INTEGRATION_NORTHFLANK INTEGRATION_NORTHFLANK,
INTEGRATION_HASURA_CLOUD
]); ]);
// integration types // integration types
@@ -71,15 +73,14 @@ export const INTEGRATION_OAUTH2 = "oauth2";
// integration oauth endpoints // integration oauth endpoints
export const INTEGRATION_GCP_TOKEN_URL = "https://oauth2.googleapis.com/token"; export const INTEGRATION_GCP_TOKEN_URL = "https://oauth2.googleapis.com/token";
export const INTEGRATION_AZURE_TOKEN_URL = "https://login.microsoftonline.com/common/oauth2/v2.0/token"; export const INTEGRATION_AZURE_TOKEN_URL =
"https://login.microsoftonline.com/common/oauth2/v2.0/token";
export const INTEGRATION_HEROKU_TOKEN_URL = "https://id.heroku.com/oauth/token"; export const INTEGRATION_HEROKU_TOKEN_URL = "https://id.heroku.com/oauth/token";
export const INTEGRATION_VERCEL_TOKEN_URL = export const INTEGRATION_VERCEL_TOKEN_URL = "https://api.vercel.com/v2/oauth/access_token";
"https://api.vercel.com/v2/oauth/access_token";
export const INTEGRATION_NETLIFY_TOKEN_URL = "https://api.netlify.com/oauth/token"; export const INTEGRATION_NETLIFY_TOKEN_URL = "https://api.netlify.com/oauth/token";
export const INTEGRATION_GITHUB_TOKEN_URL = export const INTEGRATION_GITHUB_TOKEN_URL = "https://github.com/login/oauth/access_token";
"https://github.com/login/oauth/access_token";
export const INTEGRATION_GITLAB_TOKEN_URL = "https://gitlab.com/oauth/token"; export const INTEGRATION_GITLAB_TOKEN_URL = "https://gitlab.com/oauth/token";
export const INTEGRATION_BITBUCKET_TOKEN_URL = "https://bitbucket.org/site/oauth2/access_token" export const INTEGRATION_BITBUCKET_TOKEN_URL = "https://bitbucket.org/site/oauth2/access_token";
// integration apps endpoints // integration apps endpoints
export const INTEGRATION_GCP_API_URL = "https://cloudresourcemanager.googleapis.com"; export const INTEGRATION_GCP_API_URL = "https://cloudresourcemanager.googleapis.com";
@@ -106,268 +107,279 @@ export const INTEGRATION_WINDMILL_API_URL = "https://app.windmill.dev/api";
export const INTEGRATION_DIGITAL_OCEAN_API_URL = "https://api.digitalocean.com"; export const INTEGRATION_DIGITAL_OCEAN_API_URL = "https://api.digitalocean.com";
export const INTEGRATION_CLOUD_66_API_URL = "https://app.cloud66.com/api"; export const INTEGRATION_CLOUD_66_API_URL = "https://app.cloud66.com/api";
export const INTEGRATION_NORTHFLANK_API_URL = "https://api.northflank.com"; export const INTEGRATION_NORTHFLANK_API_URL = "https://api.northflank.com";
export const INTEGRATION_HASURA_CLOUD_API_URL = "https://data.pro.hasura.io/v1/graphql";
export const INTEGRATION_GCP_SECRET_MANAGER_SERVICE_NAME = "secretmanager.googleapis.com" export const INTEGRATION_GCP_SECRET_MANAGER_SERVICE_NAME = "secretmanager.googleapis.com";
export const INTEGRATION_GCP_SECRET_MANAGER_URL = `https://${INTEGRATION_GCP_SECRET_MANAGER_SERVICE_NAME}`; export const INTEGRATION_GCP_SECRET_MANAGER_URL = `https://${INTEGRATION_GCP_SECRET_MANAGER_SERVICE_NAME}`;
export const INTEGRATION_GCP_SERVICE_USAGE_URL = "https://serviceusage.googleapis.com"; export const INTEGRATION_GCP_SERVICE_USAGE_URL = "https://serviceusage.googleapis.com";
export const INTEGRATION_GCP_CLOUD_PLATFORM_SCOPE = "https://www.googleapis.com/auth/cloud-platform"; export const INTEGRATION_GCP_CLOUD_PLATFORM_SCOPE =
"https://www.googleapis.com/auth/cloud-platform";
export const getIntegrationOptions = async () => { export const getIntegrationOptions = async () => {
const INTEGRATION_OPTIONS = [ const INTEGRATION_OPTIONS = [
{ {
name: "Heroku", name: "Heroku",
slug: "heroku", slug: "heroku",
image: "Heroku.png", image: "Heroku.png",
isAvailable: true, isAvailable: true,
type: "oauth", type: "oauth",
clientId: await getClientIdHeroku(), clientId: await getClientIdHeroku(),
docsLink: "", docsLink: ""
}, },
{ {
name: "Vercel", name: "Vercel",
slug: "vercel", slug: "vercel",
image: "Vercel.png", image: "Vercel.png",
isAvailable: true, isAvailable: true,
type: "oauth", type: "oauth",
clientId: "", clientId: "",
clientSlug: await getClientSlugVercel(), clientSlug: await getClientSlugVercel(),
docsLink: "", docsLink: ""
}, },
{ {
name: "Netlify", name: "Netlify",
slug: "netlify", slug: "netlify",
image: "Netlify.png", image: "Netlify.png",
isAvailable: true, isAvailable: true,
type: "oauth", type: "oauth",
clientId: await getClientIdNetlify(), clientId: await getClientIdNetlify(),
docsLink: "", docsLink: ""
}, },
{ {
name: "GitHub", name: "GitHub",
slug: "github", slug: "github",
image: "GitHub.png", image: "GitHub.png",
isAvailable: true, isAvailable: true,
type: "oauth", type: "oauth",
clientId: await getClientIdGitHub(), clientId: await getClientIdGitHub(),
docsLink: "", docsLink: ""
}, },
{ {
name: "Render", name: "Render",
slug: "render", slug: "render",
image: "Render.png", image: "Render.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Railway", name: "Railway",
slug: "railway", slug: "railway",
image: "Railway.png", image: "Railway.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Fly.io", name: "Fly.io",
slug: "flyio", slug: "flyio",
image: "Flyio.svg", image: "Flyio.svg",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "AWS Parameter Store", name: "AWS Parameter Store",
slug: "aws-parameter-store", slug: "aws-parameter-store",
image: "Amazon Web Services.png", image: "Amazon Web Services.png",
isAvailable: true, isAvailable: true,
type: "custom", type: "custom",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Laravel Forge", name: "Laravel Forge",
slug: "laravel-forge", slug: "laravel-forge",
image: "Laravel Forge.png", image: "Laravel Forge.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "AWS Secrets Manager", name: "AWS Secrets Manager",
slug: "aws-secret-manager", slug: "aws-secret-manager",
image: "Amazon Web Services.png", image: "Amazon Web Services.png",
isAvailable: true, isAvailable: true,
type: "custom", type: "custom",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Azure Key Vault", name: "Azure Key Vault",
slug: "azure-key-vault", slug: "azure-key-vault",
image: "Microsoft Azure.png", image: "Microsoft Azure.png",
isAvailable: true, isAvailable: true,
type: "oauth", type: "oauth",
clientId: await getClientIdAzure(), clientId: await getClientIdAzure(),
docsLink: "", docsLink: ""
}, },
{ {
name: "Circle CI", name: "Circle CI",
slug: "circleci", slug: "circleci",
image: "Circle CI.png", image: "Circle CI.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "GitLab", name: "GitLab",
slug: "gitlab", slug: "gitlab",
image: "GitLab.png", image: "GitLab.png",
isAvailable: true, isAvailable: true,
type: "custom", type: "custom",
clientId: await getClientIdGitLab(), clientId: await getClientIdGitLab(),
docsLink: "", docsLink: ""
}, },
{ {
name: "Terraform Cloud", name: "Terraform Cloud",
slug: "terraform-cloud", slug: "terraform-cloud",
image: "Terraform Cloud.png", image: "Terraform Cloud.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
cliendId: "", cliendId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Travis CI", name: "Travis CI",
slug: "travisci", slug: "travisci",
image: "Travis CI.png", image: "Travis CI.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "TeamCity", name: "TeamCity",
slug: "teamcity", slug: "teamcity",
image: "TeamCity.png", image: "TeamCity.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Supabase", name: "Supabase",
slug: "supabase", slug: "supabase",
image: "Supabase.png", image: "Supabase.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Checkly", name: "Checkly",
slug: "checkly", slug: "checkly",
image: "Checkly.png", image: "Checkly.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Qovery", name: "Qovery",
slug: "qovery", slug: "qovery",
image: "Qovery.png", image: "Qovery.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "HashiCorp Vault", name: "HashiCorp Vault",
slug: "hashicorp-vault", slug: "hashicorp-vault",
image: "Vault.png", image: "Vault.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "GCP Secret Manager", name: "GCP Secret Manager",
slug: "gcp-secret-manager", slug: "gcp-secret-manager",
image: "Google Cloud Platform.png", image: "Google Cloud Platform.png",
isAvailable: true, isAvailable: true,
type: "oauth", type: "oauth",
clientId: await getClientIdGCPSecretManager(), clientId: await getClientIdGCPSecretManager(),
docsLink: "" docsLink: ""
}, },
{ {
name: "Cloudflare Pages", name: "Cloudflare Pages",
slug: "cloudflare-pages", slug: "cloudflare-pages",
image: "Cloudflare.png", image: "Cloudflare.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "" docsLink: ""
}, },
{ {
name: "BitBucket", name: "BitBucket",
slug: "bitbucket", slug: "bitbucket",
image: "BitBucket.png", image: "BitBucket.png",
isAvailable: true, isAvailable: true,
type: "oauth", type: "oauth",
clientId: await getClientIdBitBucket(), clientId: await getClientIdBitBucket(),
docsLink: "" docsLink: ""
}, },
{ {
name: "Codefresh", name: "Codefresh",
slug: "codefresh", slug: "codefresh",
image: "Codefresh.png", image: "Codefresh.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Windmill", name: "Windmill",
slug: "windmill", slug: "windmill",
image: "Windmill.png", image: "Windmill.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Digital Ocean App Platform", name: "Digital Ocean App Platform",
slug: "digital-ocean-app-platform", slug: "digital-ocean-app-platform",
image: "Digital Ocean.png", image: "Digital Ocean.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Cloud 66", name: "Cloud 66",
slug: "cloud-66", slug: "cloud-66",
image: "Cloud 66.png", image: "Cloud 66.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "", docsLink: ""
}, },
{ {
name: "Northflank", name: "Northflank",
slug: "northflank", slug: "northflank",
image: "Northflank.png", image: "Northflank.png",
isAvailable: true, isAvailable: true,
type: "pat", type: "pat",
clientId: "", clientId: "",
docsLink: "" docsLink: ""
}, },
] {
name: "Hasura Cloud",
return INTEGRATION_OPTIONS; slug: "hasura-cloud",
} image: "Northflank.png",
isAvailable: true,
type: "pat",
clientId: "",
docsLink: ""
}
];
return INTEGRATION_OPTIONS;
};
+40 -38
View File
@@ -6,74 +6,75 @@ const integrationSlugNameMapping: Mapping = {
"azure-key-vault": "Azure Key Vault", "azure-key-vault": "Azure Key Vault",
"aws-parameter-store": "AWS Parameter Store", "aws-parameter-store": "AWS Parameter Store",
"aws-secret-manager": "AWS Secrets Manager", "aws-secret-manager": "AWS Secrets Manager",
"heroku": "Heroku", heroku: "Heroku",
"vercel": "Vercel", vercel: "Vercel",
"netlify": "Netlify", netlify: "Netlify",
"github": "GitHub", github: "GitHub",
"gitlab": "GitLab", gitlab: "GitLab",
"render": "Render", render: "Render",
"laravel-forge": "Laravel Forge", "laravel-forge": "Laravel Forge",
"railway": "Railway", railway: "Railway",
"flyio": "Fly.io", flyio: "Fly.io",
"circleci": "CircleCI", circleci: "CircleCI",
"travisci": "TravisCI", travisci: "TravisCI",
"supabase": "Supabase", supabase: "Supabase",
"checkly": "Checkly", checkly: "Checkly",
"qovery": "Qovery", qovery: "Qovery",
"terraform-cloud": "Terraform Cloud", "terraform-cloud": "Terraform Cloud",
"teamcity": "TeamCity", teamcity: "TeamCity",
"hashicorp-vault": "Vault", "hashicorp-vault": "Vault",
"cloudflare-pages": "Cloudflare Pages", "cloudflare-pages": "Cloudflare Pages",
"codefresh": "Codefresh", codefresh: "Codefresh",
"digital-ocean-app-platform": "Digital Ocean App Platform", "digital-ocean-app-platform": "Digital Ocean App Platform",
"bitbucket": "BitBucket", bitbucket: "BitBucket",
"cloud-66": "Cloud 66", "cloud-66": "Cloud 66",
"northflank": "Northflank", northflank: "Northflank",
"windmill": "Windmill", windmill: "Windmill",
"gcp-secret-manager": "GCP Secret Manager" "gcp-secret-manager": "GCP Secret Manager",
} "hasura-cloud": "Hasura Cloud"
};
const envMapping: Mapping = { const envMapping: Mapping = {
Development: "dev", Development: "dev",
Staging: "staging", Staging: "staging",
Production: "prod", Production: "prod",
Testing: "test", Testing: "test"
}; };
const reverseEnvMapping: Mapping = { const reverseEnvMapping: Mapping = {
dev: "Development", dev: "Development",
staging: "Staging", staging: "Staging",
prod: "Production", prod: "Production",
test: "Testing", test: "Testing"
}; };
const contextNetlifyMapping: Mapping = { const contextNetlifyMapping: Mapping = {
"dev": "Local development", dev: "Local development",
"branch-deploy": "Branch deploys", "branch-deploy": "Branch deploys",
"deploy-preview": "Deploy Previews", "deploy-preview": "Deploy Previews",
"production": "Production" production: "Production"
} };
const reverseContextNetlifyMapping: Mapping = { const reverseContextNetlifyMapping: Mapping = {
"Local development": "dev", "Local development": "dev",
"Branch deploys": "branch-deploy", "Branch deploys": "branch-deploy",
"Deploy Previews": "deploy-preview", "Deploy Previews": "deploy-preview",
"Production": "production" Production: "production"
} };
const plansDev: Mapping = { const plansDev: Mapping = {
"starter": "prod_Mb4ATFT5QAHoPM", starter: "prod_Mb4ATFT5QAHoPM",
"team": "prod_NEpD2WMXUS2eDn", team: "prod_NEpD2WMXUS2eDn",
"professional": "prod_Mb4CetZ2jE7jdl", professional: "prod_Mb4CetZ2jE7jdl",
"enterprise": "licence_key_required" enterprise: "licence_key_required"
} };
const plansProd: Mapping = { const plansProd: Mapping = {
"starter": "prod_Mb8oR5XNwyFTul", starter: "prod_Mb8oR5XNwyFTul",
"team": "prod_NEp7fAB3UJWK6A", team: "prod_NEp7fAB3UJWK6A",
"professional": "prod_Mb8pUIpA0OUi5N", professional: "prod_Mb8pUIpA0OUi5N",
"enterprise": "licence_key_required" enterprise: "licence_key_required"
} };
const plans = plansProd || plansDev; const plans = plansProd || plansDev;
@@ -83,4 +84,5 @@ export {
integrationSlugNameMapping, integrationSlugNameMapping,
plans, plans,
reverseContextNetlifyMapping, reverseContextNetlifyMapping,
reverseEnvMapping} reverseEnvMapping
};