This commit is contained in:
Tuan Dang
2022-12-10 15:41:04 -05:00
34 changed files with 2549 additions and 334 deletions

5
.husky/pre-commit Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged

7
.prettierrc Normal file
View File

@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 80,
"useTabs": false
}

View File

@@ -179,6 +179,20 @@ We're currently setting the foundation and building [integrations](https://infis
<td align="left" valign="middle">
🔜 Netlify (https://github.com/Infisical/infisical/issues/55)
</td>
<td align="left" valign="middle">
🔜 Railway
</td>
</tr>
<tr>
<td align="left" valign="middle">
🔜 Bitbucket
</td>
<td align="left" valign="middle">
🔜 Supabase
</td>
<td align="left" valign="middle">
🔜 Serverless
</td>
</tr>
</tbody>
</table>
@@ -261,6 +275,18 @@ We're currently setting the foundation and building [integrations](https://infis
</a>
</td>
</tr>
<tr>
<td align="left" valign="middle">
<a href="https://infisical.com/docs/integrations/frameworks/fiber?ref=github.com">
✔️ Fiber
</a>
</td>
<td align="left" valign="middle">
<a href="https://infisical.com/docs/integrations/frameworks/nuxt?ref=github.com">
✔️ Nuxt
</a>
</td>
</tr>
</tbody>
</table>
@@ -285,4 +311,4 @@ Looking to report a security vulnerability? Please don't post about it in GitHub
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<a href="https://github.com/dangtony98"><img src="https://avatars.githubusercontent.com/u/25857006?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/mv-turtle"><img src="https://avatars.githubusercontent.com/u/78047717?s=96&v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/maidul98"><img src="https://avatars.githubusercontent.com/u/9300960?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/gangjun06"><img src="https://avatars.githubusercontent.com/u/50910815?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/reginaldbondoc"><img src="https://avatars.githubusercontent.com/u/7693108?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/SH5H"><img src="https://avatars.githubusercontent.com/u/25437192?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/asharonbaltazar"><img src="https://avatars.githubusercontent.com/u/58940073?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/edgarrmondragon"><img src="https://avatars.githubusercontent.com/u/16805946?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/hanywang2"><img src="https://avatars.githubusercontent.com/u/44352119?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/tobias-mintlify"><img src="https://avatars.githubusercontent.com/u/110702161?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/0xflotus"><img src="https://avatars.githubusercontent.com/u/26602940?v=4" width="50" height="50" alt=""/></a>
<a href="https://github.com/dangtony98"><img src="https://avatars.githubusercontent.com/u/25857006?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/mv-turtle"><img src="https://avatars.githubusercontent.com/u/78047717?s=96&v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/maidul98"><img src="https://avatars.githubusercontent.com/u/9300960?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/gangjun06"><img src="https://avatars.githubusercontent.com/u/50910815?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/reginaldbondoc"><img src="https://avatars.githubusercontent.com/u/7693108?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/SH5H"><img src="https://avatars.githubusercontent.com/u/25437192?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/asharonbaltazar"><img src="https://avatars.githubusercontent.com/u/58940073?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/edgarrmondragon"><img src="https://avatars.githubusercontent.com/u/16805946?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/arjunyel"><img src="https://avatars.githubusercontent.com/u/11153289?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/adrianmarinwork"><img src="https://avatars.githubusercontent.com/u/118568289?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/hanywang2"><img src="https://avatars.githubusercontent.com/u/44352119?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/tobias-mintlify"><img src="https://avatars.githubusercontent.com/u/110702161?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/0xflotus"><img src="https://avatars.githubusercontent.com/u/26602940?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/wanjohiryan"><img src="https://avatars.githubusercontent.com/u/71614375?v=4" width="50" height="50" alt=""/></a>

View File

@@ -1,18 +1,13 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 2,
"prettier/prettier": 2
}
}
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 2
}
}

View File

@@ -1,7 +0,0 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 80,
"useTabs": true
}

View File

@@ -50,7 +50,6 @@
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"install": "^0.13.0",
"jest": "^29.3.1",
"nodemon": "^2.0.19",
@@ -2594,19 +2593,6 @@
"@maxmind/geoip2-node": "^3.4.0"
}
},
"node_modules/@sentry/core": {
"version": "7.17.4",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.17.4.tgz",
"integrity": "sha512-U3ABSJBKGK8dJ01nEG2+qNOb6Wv7U3VqoajiZxfV4lpPWNFGCoEhiTytxBlFTOCmdUH8209zSZiWJZaDLy+TSA==",
"dependencies": {
"@sentry/types": "7.17.4",
"@sentry/utils": "7.17.4",
"tslib": "^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/node": {
"version": "7.19.0",
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.19.0.tgz",
@@ -2704,26 +2690,6 @@
"node": ">=8"
}
},
"node_modules/@sentry/types": {
"version": "7.17.4",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.17.4.tgz",
"integrity": "sha512-QJj8vO4AtxuzQfJIzDnECSmoxwnS+WJsm1Ta2Cwdy+TUCBJyWpW7aIJJGta76zb9gNPGb3UcAbeEjhMJBJeRMQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/utils": {
"version": "7.17.4",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.17.4.tgz",
"integrity": "sha512-ioG0ANy8uiWzig82/e7cc+6C9UOxkyBzJDi1luoQVDH6P0/PvM8GzVU+1iUVUipf8+OL1Jh09GrWnd5wLm3XNQ==",
"dependencies": {
"@sentry/types": "7.17.4",
"tslib": "^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sinclair/typebox": {
"version": "0.24.51",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz",
@@ -5146,21 +5112,6 @@
"node": ">=10.17.0"
}
},
"node_modules/husky": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz",
"integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==",
"dev": true,
"bin": {
"husky": "lib/bin.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -13113,16 +13064,6 @@
"@maxmind/geoip2-node": "^3.4.0"
}
},
"@sentry/core": {
"version": "7.17.4",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.17.4.tgz",
"integrity": "sha512-U3ABSJBKGK8dJ01nEG2+qNOb6Wv7U3VqoajiZxfV4lpPWNFGCoEhiTytxBlFTOCmdUH8209zSZiWJZaDLy+TSA==",
"requires": {
"@sentry/types": "7.17.4",
"@sentry/utils": "7.17.4",
"tslib": "^1.9.3"
}
},
"@sentry/node": {
"version": "7.19.0",
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.19.0.tgz",
@@ -13200,20 +13141,6 @@
}
}
},
"@sentry/types": {
"version": "7.17.4",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.17.4.tgz",
"integrity": "sha512-QJj8vO4AtxuzQfJIzDnECSmoxwnS+WJsm1Ta2Cwdy+TUCBJyWpW7aIJJGta76zb9gNPGb3UcAbeEjhMJBJeRMQ=="
},
"@sentry/utils": {
"version": "7.17.4",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.17.4.tgz",
"integrity": "sha512-ioG0ANy8uiWzig82/e7cc+6C9UOxkyBzJDi1luoQVDH6P0/PvM8GzVU+1iUVUipf8+OL1Jh09GrWnd5wLm3XNQ==",
"requires": {
"@sentry/types": "7.17.4",
"tslib": "^1.9.3"
}
},
"@sinclair/typebox": {
"version": "0.24.51",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz",
@@ -13641,8 +13568,7 @@
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true,
"requires": {}
"dev": true
},
"acorn-walk": {
"version": "8.2.0",
@@ -14433,8 +14359,7 @@
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz",
"integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==",
"dev": true,
"requires": {}
"dev": true
},
"eslint-plugin-prettier": {
"version": "4.2.1",
@@ -14643,8 +14568,7 @@
"express-rate-limit": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.7.0.tgz",
"integrity": "sha512-vhwIdRoqcYB/72TK3tRZI+0ttS8Ytrk24GfmsxDXK9o9IhHNO5bXRiXQSExPQ4GbaE5tvIS7j1SGrxsuWs+sGA==",
"requires": {}
"integrity": "sha512-vhwIdRoqcYB/72TK3tRZI+0ttS8Ytrk24GfmsxDXK9o9IhHNO5bXRiXQSExPQ4GbaE5tvIS7j1SGrxsuWs+sGA=="
},
"express-validator": {
"version": "6.14.2",
@@ -15034,12 +14958,6 @@
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true
},
"husky": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz",
"integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==",
"dev": true
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -15492,8 +15410,7 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz",
"integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==",
"dev": true,
"requires": {}
"dev": true
},
"jest-regex-util": {
"version": "29.2.0",

View File

@@ -35,7 +35,8 @@
"build": "rimraf ./build && tsc && cp -R ./src/templates ./src/json ./build",
"lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix",
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write"
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
"lint-staged": "lint-staged"
},
"repository": {
"type": "git",
@@ -63,7 +64,6 @@
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"install": "^0.13.0",
"jest": "^29.3.1",
"nodemon": "^2.0.19",

View File

@@ -15,7 +15,7 @@ var rootCmd = &cobra.Command{
Short: "Infisical CLI is used to inject environment variables into any process",
Long: `Infisical is a simple, end-to-end encrypted service that enables teams to sync and manage their environment variables across their development life cycle.`,
CompletionOptions: cobra.CompletionOptions{DisableDefaultCmd: true},
Version: "0.1.8",
Version: "0.1.10",
}
// Execute adds all child commands to the root command and sets flags appropriately.

View File

@@ -196,7 +196,6 @@ func GetSecretsFromAPIUsingInfisicalToken(infisicalToken string, envName string,
}
func GetAllEnvironmentVariables(projectId string, envName string) ([]models.SingleEnvironmentVariable, error) {
var envsFromApi []models.SingleEnvironmentVariable
infisicalToken := os.Getenv(INFISICAL_TOKEN_NAME)
if infisicalToken == "" {
@@ -204,19 +203,19 @@ func GetAllEnvironmentVariables(projectId string, envName string) ([]models.Sing
if err != nil {
log.Info("Unexpected issue occurred while checking login status. To see more details, add flag --debug")
log.Debugln(err)
return envsFromApi, err
return nil, err
}
if !hasUserLoggedInbefore {
log.Infoln("No logged in user. To login, please run command [infisical login]")
return envsFromApi, fmt.Errorf("user not logged in")
return nil, fmt.Errorf("user not logged in")
}
userCreds, err := GetUserCredsFromKeyRing(loggedInUserEmail)
if err != nil {
log.Infoln("Unable to get user creds from key ring")
log.Debug(err)
return envsFromApi, err
return nil, err
}
workspaceConfigs, err := GetAllWorkSpaceConfigsStartingFromCurrentPath()
@@ -226,25 +225,28 @@ func GetAllEnvironmentVariables(projectId string, envName string) ([]models.Sing
if len(workspaceConfigs) == 0 {
log.Infoln("Your local project is not connected to a Infisical project yet. Run command [infisical init]")
return envsFromApi, fmt.Errorf("project not initialized")
return nil, fmt.Errorf("project not initialized")
}
envsFromApi, err = GetSecretsFromAPIUsingCurrentLoggedInUser(envName, userCreds)
envsFromApi, err := GetSecretsFromAPIUsingCurrentLoggedInUser(envName, userCreds)
if err != nil {
log.Errorln("Something went wrong when pulling secrets using your logged in credentials. If the issue persists, double check your project id/try logging in again.")
log.Debugln(err)
return envsFromApi, err
return nil, err
}
return envsFromApi, nil
} else {
envsFromApi, err := GetSecretsFromAPIUsingInfisicalToken(infisicalToken, envName, projectId)
if err != nil {
log.Errorln("Something went wrong when pulling secrets using your Infisical token. Double check the token, project id or environment name (dev, prod, ect.)")
log.Debugln(err)
return envsFromApi, err
return nil, err
}
}
return envsFromApi, nil
return envsFromApi, nil
}
}
func GetWorkSpacesFromAPI(userCreds models.UserCredentials) (workspaces []models.Workspace, err error) {

View File

@@ -1,5 +1,5 @@
---
title: "Install"
title: 'Install'
---
Prerequisite: Set up an account with [Infisical Cloud](https://app.infisical.com) or via a [self-hosted installation](/self-hosting/overview).
@@ -13,11 +13,7 @@ The Infisical CLI provides a way to inject environment variables from the platfo
Use [brew](https://brew.sh/) package manager
```bash
# install
brew install infisical/get-cli/infisical
# check version
infisical --version
```
## Updates
@@ -31,14 +27,13 @@ The Infisical CLI provides a way to inject environment variables from the platfo
Use [Scoop](https://scoop.sh/) package manager
```bash
# install
scoop bucket add org https://github.com/Infisical/scoop-infisical.git
scoop install infisical
# check version
infisical --version
```
```bash
scoop install infisical
```
## Updates
```bash
@@ -49,33 +44,33 @@ The Infisical CLI provides a way to inject environment variables from the platfo
<Tab title="Alpine">
Install prerequisite
```bash
$ sudo apk add --no-cache bash sudo
sudo apk add --no-cache bash sudo
```
Add Infisical repository
```bash
$ curl -1sLf \
curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' \
| sudo -E bash
```
Then install CLI
```bash
$ sudo apk update && sudo apk add infisical
sudo apk update && sudo apk add infisical
```
</Tab>
<Tab title="RedHat/CentOs/Amazon">
Add Infisical repository
```bash
$ curl -1sLf \
curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' \
| sudo -E bash
```
Then install CLI
```bash
$ sudo yum install infisical
sudo yum install infisical
```
</Tab>
@@ -83,14 +78,14 @@ The Infisical CLI provides a way to inject environment variables from the platfo
Add Infisical repository
```bash
$ curl -1sLf \
curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' \
| sudo -E bash
```
Then install CLI
```bash
$ sudo apt-get update && sudo apt-get install -y infisical
sudo apt-get update && sudo apt-get install -y infisical
```
</Tab>

View File

@@ -16,17 +16,52 @@ cd infisical
## Set up environment variables
Tweak the `.env` according to your preferences. Refer to the available [environment variables](/self-hosting/configuration/envars).
Before running the docker-compose we have to generate the .env file with the environment variables, you can create your own file or start with the
`.env.example` as an example guide.
Mandatory variables in the `.env` file:
1. Keys and JWT variables
![image](https://user-images.githubusercontent.com/118568289/206791534-9c9d1431-e83d-49c0-8a54-b373ed0df820.png)
The `.env.example` has these variables empty, you can self generate the `JWT and ENCRYPTION_KEY` with this [32-byte random hex strings generator](https://www.browserling.com/tools/random-hex).
For the `PRIVATE_KEY and PUBLIC_KEY` you can use the ones shown in the screenshot:
```bash
cp .env.example .env
```
PRIVATE_KEY='oGVv5rThrpZ7WLgQW27chY1cXngr4wLQIZnGfSKgHPk='
PUBLIC_KEY='ldr6JaC7AY+tun3omGLdE4SWpkJbtVBOI54KfUP53Xc='
```
2. Mongo variables and site URL
![image](https://user-images.githubusercontent.com/118568289/206792171-3376e3c6-c3ac-4d5d-8776-d78ee089b520.png)
These variables are used to connect the MongoDB and set the URL for the localhost.
For development, you can use `root` for the `MONGO_USERNAME` and `example` for the `MONGO_PASSWORD` as shown in the screenshot.
Take into account that if you use your own `MONGO_USERNAME` and `MONGO_PASSWORD`, you also have to change the `MONGO_URL` with the form of `MONGO_USERNAME:MONGO_PASSWORD` after the `//` part of the URL.
3. Mail SMTP service variables
![image](https://user-images.githubusercontent.com/118568289/206792653-ba3211d1-1071-43f2-93a7-8b408bbd9e0e.png)
These variables are needed to use the Mail SMTP service that takes care of sending the verification code when you
register in the app.
For the `SMTP_USERNAME` variable, you will need an email with 2-steps-verification.
For the `SMTP_PASSWORD` variable, you will need to [generate an app password](https://support.google.com/mail/answer/185833?hl=en) with the email you used in the `SMTP_USERNAME` variable.
With this environment variables, you will be ready to run the docker-compose.
## Docker for development
```bash
# build and start the services
docker-compose -f docker-compose.dev.yml up --build
docker-compose -f docker-compose.dev.yml up --build --force-recreate
```
Then browse http://localhost:8080

View File

@@ -9,13 +9,13 @@
"plugins": ["simple-import-sort", "@typescript-eslint"],
"rules": {
"react-hooks/exhaustive-deps": "off",
"no-unused-vars": "off",
"no-unused-vars": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": [
"warn",

View File

@@ -1,4 +0,0 @@
{
"tabWidth": 2,
"useTabs": false
}

View File

@@ -1,16 +1,13 @@
import posthog from "posthog-js";
import posthog from 'posthog-js';
import {
ENV,
POSTHOG_API_KEY,
POSTHOG_HOST,
} from "../utilities/config";
import { ENV, POSTHOG_API_KEY, POSTHOG_HOST } from '../utilities/config';
export const initPostHog = () => {
if (typeof window !== "undefined") {
if (ENV == "production" && TELEMETRY_CAPTURING_ENABLED) { // eslint-disable-line
if (typeof window !== 'undefined') {
// eslint-disable-next-line
if (ENV == 'production' && TELEMETRY_CAPTURING_ENABLED) {
posthog.init(POSTHOG_API_KEY, {
api_host: POSTHOG_HOST,
api_host: POSTHOG_HOST
});
}
}

View File

@@ -21,7 +21,10 @@ interface InputFieldProps {
onChangeHandler: (value: string) => void;
}
const InputField = (props: InputFieldProps) => {
const InputField = (
props: InputFieldProps &
Pick<JSX.IntrinsicElements["input"], "autoComplete" | "id">
) => {
const [passwordVisible, setPasswordVisible] = useState(false);
const router = useRouter();
@@ -43,6 +46,8 @@ const InputField = (props: InputFieldProps) => {
className="bg-bunker-800 text-gray-400 border border-gray-600 rounded-md text-md p-2 w-full min-w-16 outline-none"
name={props.name}
readOnly
autoComplete={props.autoComplete}
id={props.id}
/>
</div>
);
@@ -88,6 +93,8 @@ const InputField = (props: InputFieldProps) => {
} relative peer bg-bunker-800 rounded-md text-gray-400 text-md p-2 w-full min-w-16 outline-none focus:ring-4 duration-200`}
name={props.name}
spellCheck="false"
autoComplete={props.autoComplete}
id={props.id}
/>
{props.label?.includes("Password") && (
<button

View File

@@ -1,36 +1,38 @@
/* eslint-disable no-unexpected-multiline */
/* eslint-disable react-hooks/exhaustive-deps */
import { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect, useState } from 'react';
import Link from 'next/link';
import { useRouter } from 'next/router';
import {
faBookOpen,
faGear,
faKey,
faMobile,
faPlug,
faUser,
} from "@fortawesome/free-solid-svg-icons";
import { faPlus } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
faUser
} from '@fortawesome/free-solid-svg-icons';
import { faPlus } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import getOrganizations from "~/pages/api/organization/getOrgs";
import getOrganizationUserProjects from "~/pages/api/organization/GetOrgUserProjects";
import getOrganizationUsers from "~/pages/api/organization/GetOrgUsers";
import addUserToWorkspace from "~/pages/api/workspace/addUserToWorkspace";
import createWorkspace from "~/pages/api/workspace/createWorkspace";
import getWorkspaces from "~/pages/api/workspace/getWorkspaces";
import uploadKeys from "~/pages/api/workspace/uploadKeys";
import getOrganizations from '~/pages/api/organization/getOrgs';
import getOrganizationUserProjects from '~/pages/api/organization/GetOrgUserProjects';
import getOrganizationUsers from '~/pages/api/organization/GetOrgUsers';
import checkUserAction from '~/pages/api/userActions/checkUserAction';
import addUserToWorkspace from '~/pages/api/workspace/addUserToWorkspace';
import createWorkspace from '~/pages/api/workspace/createWorkspace';
import getWorkspaces from '~/pages/api/workspace/getWorkspaces';
import uploadKeys from '~/pages/api/workspace/uploadKeys';
import NavBarDashboard from "../navigation/NavBarDashboard";
import { tempLocalStorage } from "../utilities/checks/tempLocalStorage";
import NavBarDashboard from '../navigation/NavBarDashboard';
import onboardingCheck from '../utilities/checks/OnboardingCheck';
import { tempLocalStorage } from '../utilities/checks/tempLocalStorage';
import {
decryptAssymmetric,
encryptAssymmetric,
} from "../utilities/cryptography/crypto";
import Button from "./buttons/Button";
import AddWorkspaceDialog from "./dialog/AddWorkspaceDialog";
import Listbox from "./Listbox";
encryptAssymmetric
} from '../utilities/cryptography/crypto';
import Button from './buttons/Button';
import AddWorkspaceDialog from './dialog/AddWorkspaceDialog';
import Listbox from './Listbox';
interface LayoutProps {
children: React.ReactNode;
@@ -40,11 +42,13 @@ export default function Layout({ children }: LayoutProps) {
const router = useRouter();
const [workspaceList, setWorkspaceList] = useState([]);
const [workspaceMapping, setWorkspaceMapping] = useState([{ 1: 2 }]);
const [workspaceSelected, setWorkspaceSelected] = useState("∞");
const [newWorkspaceName, setNewWorkspaceName] = useState("");
const [workspaceSelected, setWorkspaceSelected] = useState('∞');
const [newWorkspaceName, setNewWorkspaceName] = useState('');
const [isOpen, setIsOpen] = useState(false);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(false);
const [totalOnboardingActionsDone, setTotalOnboardingActionsDone] =
useState(0);
function closeModal() {
setIsOpen(false);
@@ -71,35 +75,35 @@ export default function Layout({ children }: LayoutProps) {
if (!currentWorkspaces.includes(workspaceName)) {
const newWorkspace = await createWorkspace({
workspaceName,
organizationId: tempLocalStorage("orgData.id"),
organizationId: tempLocalStorage('orgData.id')
});
const newWorkspaceId = newWorkspace._id;
if (addAllUsers) {
const orgUsers = await getOrganizationUsers({
orgId: tempLocalStorage("orgData.id"),
orgId: tempLocalStorage('orgData.id')
});
orgUsers.map(async (user: any) => {
if (user.status == "accepted") {
if (user.status == 'accepted') {
const result = await addUserToWorkspace(
user.user.email,
newWorkspaceId
);
if (result?.invitee && result?.latestKey) {
const PRIVATE_KEY = tempLocalStorage("PRIVATE_KEY");
const PRIVATE_KEY = tempLocalStorage('PRIVATE_KEY');
// assymmetrically decrypt symmetric key with local private key
const key = decryptAssymmetric({
ciphertext: result.latestKey.encryptedKey,
nonce: result.latestKey.nonce,
publicKey: result.latestKey.sender.publicKey,
privateKey: PRIVATE_KEY,
privateKey: PRIVATE_KEY
});
const { ciphertext, nonce } = encryptAssymmetric({
plaintext: key,
publicKey: result.invitee.publicKey,
privateKey: PRIVATE_KEY,
privateKey: PRIVATE_KEY
}) as { ciphertext: string; nonce: string };
uploadKeys(
@@ -112,11 +116,11 @@ export default function Layout({ children }: LayoutProps) {
}
});
}
router.push("/dashboard/" + newWorkspaceId + "?Development");
router.push('/dashboard/' + newWorkspaceId + '?Development');
setIsOpen(false);
setNewWorkspaceName("");
setNewWorkspaceName('');
} else {
console.error("A project with this name already exists.");
console.error('A project with this name already exists.');
setError(true);
setLoading(false);
}
@@ -130,59 +134,59 @@ export default function Layout({ children }: LayoutProps) {
const menuItems = [
{
href:
"/dashboard/" +
'/dashboard/' +
workspaceMapping[workspaceSelected as any] +
"?Development",
title: "Secrets",
emoji: <FontAwesomeIcon icon={faKey} />,
'?Development',
title: 'Secrets',
emoji: <FontAwesomeIcon icon={faKey} />
},
{
href: "/users/" + workspaceMapping[workspaceSelected as any],
title: "Members",
emoji: <FontAwesomeIcon icon={faUser} />,
href: '/users/' + workspaceMapping[workspaceSelected as any],
title: 'Members',
emoji: <FontAwesomeIcon icon={faUser} />
},
{
href: "/integrations/" + workspaceMapping[workspaceSelected as any],
title: "Integrations",
emoji: <FontAwesomeIcon icon={faPlug} />,
href: '/integrations/' + workspaceMapping[workspaceSelected as any],
title: 'Integrations',
emoji: <FontAwesomeIcon icon={faPlug} />
},
{
href: "/settings/project/" + workspaceMapping[workspaceSelected as any],
title: "Project Settings",
emoji: <FontAwesomeIcon icon={faGear} />,
},
href: '/settings/project/' + workspaceMapping[workspaceSelected as any],
title: 'Project Settings',
emoji: <FontAwesomeIcon icon={faGear} />
}
];
useEffect(() => {
// Put a user in a workspace if they're not in one yet
const putUserInWorkSpace = async () => {
if (tempLocalStorage("orgData.id") === "") {
if (tempLocalStorage('orgData.id') === '') {
const userOrgs = await getOrganizations();
localStorage.setItem("orgData.id", userOrgs[0]._id);
localStorage.setItem('orgData.id', userOrgs[0]._id);
}
const orgUserProjects = await getOrganizationUserProjects({
orgId: tempLocalStorage("orgData.id"),
orgId: tempLocalStorage('orgData.id')
});
const userWorkspaces = orgUserProjects;
if (
userWorkspaces.length == 0 &&
router.asPath != "/noprojects" &&
!router.asPath.includes("settings")
router.asPath != '/noprojects' &&
!router.asPath.includes('settings')
) {
router.push("/noprojects");
} else if (router.asPath != "/noprojects") {
router.push('/noprojects');
} else if (router.asPath != '/noprojects') {
const intendedWorkspaceId = router.asPath
.split("/")
[router.asPath.split("/").length - 1].split("?")[0];
.split('/')
[router.asPath.split('/').length - 1].split('?')[0];
// If a user is not a member of a workspace they are trying to access, just push them to one of theirs
if (
intendedWorkspaceId != "heroku" &&
intendedWorkspaceId != 'heroku' &&
!userWorkspaces
.map((workspace: { _id: string }) => workspace._id)
.includes(intendedWorkspaceId)
) {
router.push("/dashboard/" + userWorkspaces[0]._id + "?Development");
router.push('/dashboard/' + userWorkspaces[0]._id + '?Development');
} else {
setWorkspaceList(
userWorkspaces.map((workspace: any) => workspace.name)
@@ -191,7 +195,7 @@ export default function Layout({ children }: LayoutProps) {
Object.fromEntries(
userWorkspaces.map((workspace: any) => [
workspace.name,
workspace._id,
workspace._id
])
) as any
);
@@ -199,18 +203,19 @@ export default function Layout({ children }: LayoutProps) {
Object.fromEntries(
userWorkspaces.map((workspace: any) => [
workspace._id,
workspace.name,
workspace.name
])
)[
router.asPath
.split("/")
[router.asPath.split("/").length - 1].split("?")[0]
.split('/')
[router.asPath.split('/').length - 1].split('?')[0]
]
);
}
}
};
putUserInWorkSpace();
onboardingCheck({ setTotalOnboardingActionsDone });
}, []);
useEffect(() => {
@@ -219,16 +224,16 @@ export default function Layout({ children }: LayoutProps) {
workspaceMapping[Number(workspaceSelected)] &&
`${workspaceMapping[Number(workspaceSelected)]}` !==
router.asPath
.split("/")
[router.asPath.split("/").length - 1].split("?")[0]
.split('/')
[router.asPath.split('/').length - 1].split('?')[0]
) {
router.push(
"/dashboard/" +
'/dashboard/' +
workspaceMapping[Number(workspaceSelected)] +
"?Development"
'?Development'
);
localStorage.setItem(
"projectData.id",
'projectData.id',
`${workspaceMapping[Number(workspaceSelected)]}`
);
}
@@ -240,6 +245,10 @@ export default function Layout({ children }: LayoutProps) {
return (
<>
<div className="fixed w-full hidden md:block flex flex-col h-screen">
<script
src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.2.2/cdn.js"
defer
></script>
<NavBarDashboard />
<div className="flex flex-col md:flex-row flex-1">
<aside className="bg-bunker-600 border-r border-mineshaft-500 w-full md:w-60 h-screen">
@@ -273,11 +282,11 @@ export default function Layout({ children }: LayoutProps) {
{workspaceList.length > 0 &&
menuItems.map(({ href, title, emoji }) => (
<li className="mt-0.5 mx-2" key={title}>
{router.asPath.split("/")[1] === href.split("/")[1] &&
(["project", "billing", "org", "personal"].includes(
router.asPath.split("/")[2]
{router.asPath.split('/')[1] === href.split('/')[1] &&
(['project', 'billing', 'org', 'personal'].includes(
router.asPath.split('/')[2]
)
? router.asPath.split("/")[2] === href.split("/")[2]
? router.asPath.split('/')[2] === href.split('/')[2]
: true) ? (
<div
className={`flex relative px-0.5 py-2.5 text-white text-sm rounded cursor-pointer bg-primary-50/10`}
@@ -288,7 +297,7 @@ export default function Layout({ children }: LayoutProps) {
</p>
{title}
</div>
) : router.asPath == "/noprojects" ? (
) : router.asPath == '/noprojects' ? (
<div
className={`flex p-2.5 text-white text-sm rounded`}
>
@@ -314,7 +323,7 @@ export default function Layout({ children }: LayoutProps) {
</ul>
</div>
<div className="w-full mt-40 mb-4 px-2">
{router.asPath.split("/")[1] === "home" ? (
{router.asPath.split('/')[1] === 'home' ? (
<div
className={`flex relative px-0.5 py-2.5 text-white text-sm rounded cursor-pointer bg-primary-50/10`}
>
@@ -323,18 +332,44 @@ export default function Layout({ children }: LayoutProps) {
<FontAwesomeIcon icon={faBookOpen} />
</p>
Infisical Guide
<img
src={`/images/progress-${
totalOnboardingActionsDone == 0 ? '0' : ''
}${totalOnboardingActionsDone == 1 ? '14' : ''}${
totalOnboardingActionsDone == 2 ? '28' : ''
}${totalOnboardingActionsDone == 3 ? '43' : ''}${
totalOnboardingActionsDone == 4 ? '57' : ''
}${totalOnboardingActionsDone == 5 ? '71' : ''}.svg`}
height={58}
width={58}
alt="progress bar"
className="absolute right-2 -top-2"
></img>
</div>
) : (
<Link
href={`/home/` + workspaceMapping[workspaceSelected as any]}
>
<div
className={`flex p-2.5 text-white text-sm rounded cursor-pointer hover:bg-primary-50/5 mt-max border border-dashed border-bunker-400`}
className={`relative flex p-2.5 overflow-visible text-white h-10 text-sm rounded cursor-pointer bg-white/10 hover:bg-primary-50/[0.15] mt-max`}
>
<p className="w-10 flex items-center justify-center text-lg">
<FontAwesomeIcon icon={faBookOpen} />
</p>
Infisical Guide
<img
src={`/images/progress-${
totalOnboardingActionsDone == 0 ? '0' : ''
}${totalOnboardingActionsDone == 1 ? '14' : ''}${
totalOnboardingActionsDone == 2 ? '28' : ''
}${totalOnboardingActionsDone == 3 ? '43' : ''}${
totalOnboardingActionsDone == 4 ? '57' : ''
}${totalOnboardingActionsDone == 5 ? '71' : ''}.svg`}
height={58}
width={58}
alt="progress bar"
className="absolute right-2 -top-2"
></img>
</div>
</Link>
)}
@@ -359,9 +394,9 @@ export default function Layout({ children }: LayoutProps) {
className="text-gray-300 text-7xl mb-8"
/>
<p className="text-gray-200 px-6 text-center text-lg max-w-sm">
{" "}
{' '}
To use Infisical, please log in through a device with larger
dimensions.{" "}
dimensions.{' '}
</p>
</div>
</>

View File

@@ -0,0 +1,71 @@
import getOrganizationUsers from '~/pages/api/organization/GetOrgUsers';
import checkUserAction from '~/pages/api/userActions/checkUserAction';
interface OnboardingCheckProps {
setTotalOnboardingActionsDone?: (value: number) => void;
setHasUserClickedSlack?: (value: boolean) => void;
setHasUserClickedIntro?: (value: boolean) => void;
setHasUserStarred?: (value: boolean) => void;
setHasUserPushedSecrets?: (value: boolean) => void;
setUsersInOrg?: (value: boolean) => void;
}
/**
* This function checks which onboarding steps a user has already finished.
*/
const onboardingCheck = async ({
setTotalOnboardingActionsDone,
setHasUserClickedSlack,
setHasUserClickedIntro,
setHasUserStarred,
setHasUserPushedSecrets,
setUsersInOrg
}: OnboardingCheckProps) => {
let countActions = 0;
const userActionSlack = await checkUserAction({
action: 'slack_cta_clicked'
});
if (userActionSlack) {
countActions = countActions + 1;
}
setHasUserClickedSlack &&
setHasUserClickedSlack(userActionSlack ? true : false);
const userActionSecrets = await checkUserAction({
action: 'first_time_secrets_pushed'
});
if (userActionSecrets) {
countActions = countActions + 1;
}
setHasUserPushedSecrets &&
setHasUserPushedSecrets(userActionSecrets ? true : false);
const userActionIntro = await checkUserAction({
action: 'intro_cta_clicked'
});
if (userActionIntro) {
countActions = countActions + 1;
}
setHasUserClickedIntro &&
setHasUserClickedIntro(userActionIntro ? true : false);
const userActionStar = await checkUserAction({
action: 'star_cta_clicked'
});
if (userActionStar) {
countActions = countActions + 1;
}
setHasUserStarred && setHasUserStarred(userActionStar ? true : false);
const orgId = localStorage.getItem('orgData.id');
const orgUsers = await getOrganizationUsers({
orgId: orgId ? orgId : ''
});
if (orgUsers.length > 1) {
countActions = countActions + 1;
}
setUsersInOrg && setUsersInOrg(orgUsers.length > 1);
setTotalOnboardingActionsDone && setTotalOnboardingActionsDone(countActions);
};
export default onboardingCheck;

View File

@@ -1,92 +1,134 @@
import React, { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import { IconProp } from "@fortawesome/fontawesome-svg-core";
import { faSlack } from "@fortawesome/free-brands-svg-icons";
import { faCheckCircle, faHandPeace, faNetworkWired, faPlug, faPlus, faStar, faUserPlus } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { useEffect, useState } from 'react';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import { faSlack } from '@fortawesome/free-brands-svg-icons';
import {
faCheckCircle,
faHandPeace,
faNetworkWired,
faPlug,
faPlus,
faStar,
faUserPlus
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import getOrganizationUsers from "../api/organization/GetOrgUsers";
import checkUserAction from "../api/userActions/checkUserAction";
import registerUserAction from "../api/userActions/registerUserAction";
import onboardingCheck from '~/components/utilities/checks/OnboardingCheck';
type ItemProps = {
text: string;
subText: string;
complete: boolean;
icon: IconProp;
time: string;
import registerUserAction from '../api/userActions/registerUserAction';
type ItemProps = {
text: string;
subText: string;
complete: boolean;
icon: IconProp;
time: string;
userAction?: string;
link?: string;
};
const learningItem = ({ text, subText, complete, icon, time, userAction, link }: ItemProps): JSX.Element => {
const learningItem = ({
text,
subText,
complete,
icon,
time,
userAction,
link
}: ItemProps): JSX.Element => {
if (link) {
return (
<Link href={link}>
<a target={`${link.includes("https") ? "_blank" : "_self"}`} rel="noopener noreferrer" className="w-full">
<div
onClick={async () => {
if (userAction) {
await registerUserAction({
action: userAction
})
<a
target={`${link.includes('https') ? '_blank' : '_self'}`}
rel="noopener noreferrer"
className="w-full"
>
<div
onClick={async () => {
if (userAction) {
await registerUserAction({
action: userAction
});
}
}}
className="relative bg-bunker-700 hover:bg-bunker-500 shadow-xl duration-200 rounded-md border border-dashed border-bunker-400 pl-2 pr-6 py-2 h-[5.5rem] w-full flex items-center justify-between overflow-hidden my-1.5 cursor-pointer">
className="relative bg-bunker-700 hover:bg-bunker-500 shadow-xl duration-200 rounded-md border border-dashed border-bunker-400 pl-2 pr-6 py-2 h-[5.5rem] w-full flex items-center justify-between overflow-hidden my-1.5 cursor-pointer"
>
<div className="flex flex-row items-center mr-4">
<FontAwesomeIcon icon={icon} className="text-4xl mx-2 w-16" />
{complete &&
<div className="bg-bunker-700 w-7 h-7 rounded-full absolute left-11 top-10 p-2 flex items-center justify-center">
<FontAwesomeIcon icon={faCheckCircle} className="text-4xl w-5 h-5 text-green" />
</div>}
{complete && (
<div className="bg-bunker-700 w-7 h-7 rounded-full absolute left-12 top-10 p-2 flex items-center justify-center">
<FontAwesomeIcon
icon={faCheckCircle}
className="text-4xl w-5 h-5 text-green"
/>
</div>
)}
<div className="flex flex-col items-start">
<div className="text-xl font-semibold mt-0.5">{text}</div>
<div className="text-sm font-normal">{subText}</div>
</div>
</div>
<div className={`pr-4 font-semibold text-sm w-28 text-right ${complete && "text-green"}`}>
{complete ? "Complete!" : "About " + time}
<div
className={`pr-4 font-semibold text-sm w-28 text-right ${
complete && 'text-green'
}`}
>
{complete ? 'Complete!' : 'About ' + time}
</div>
{complete && <div className="absolute bottom-0 left-0 h-1 w-full bg-green"></div>}
{complete && (
<div className="absolute bottom-0 left-0 h-1 w-full bg-green"></div>
)}
</div>
</a>
</Link>
);
} else {
return (
<div
onClick={async () => {
if (userAction) {
await registerUserAction({
action: userAction
})
}
}}
className="relative bg-bunker-700 hover:bg-bunker-500 shadow-xl duration-200 rounded-md border border-dashed border-bunker-400 pl-2 pr-6 py-2 h-[5.5rem] w-full flex items-center justify-between overflow-hidden my-1.5 cursor-pointer">
<div
onClick={async () => {
if (userAction) {
await registerUserAction({
action: userAction
});
}
}}
className="relative bg-bunker-700 hover:bg-bunker-500 shadow-xl duration-200 rounded-md border border-dashed border-bunker-400 pl-2 pr-6 py-2 h-[5.5rem] w-full flex items-center justify-between overflow-hidden my-1.5 cursor-pointer"
>
<div className="flex flex-row items-center mr-4">
<FontAwesomeIcon icon={icon} className="text-4xl mx-2 w-16" />
{complete &&
<div className="bg-bunker-700 w-7 h-7 rounded-full absolute left-11 top-10">
<FontAwesomeIcon icon={faCheckCircle} className="absolute text-4xl left-12 top-16 w-5 h-5 text-green" />
</div>}
{complete && (
<div className="bg-bunker-700 w-7 h-7 rounded-full absolute left-11 top-10">
<FontAwesomeIcon
icon={faCheckCircle}
className="absolute text-4xl left-12 top-16 w-5 h-5 text-green"
/>
</div>
)}
<div className="flex flex-col items-start">
<div className="text-xl font-semibold mt-0.5">{text}</div>
<div className="text-sm font-normal mt-0.5">{subText}</div>
</div>
</div>
<div className={`pr-4 font-semibold text-sm w-28 text-right ${complete && "text-green"}`}>
{complete ? "Complete!" : "About " + time}
<div
className={`pr-4 font-semibold text-sm w-28 text-right ${
complete && 'text-green'
}`}
>
{complete ? 'Complete!' : 'About ' + time}
</div>
{complete && <div className="absolute bottom-0 left-0 h-1 w-full bg-green"></div>}
{complete && (
<div className="absolute bottom-0 left-0 h-1 w-full bg-green"></div>
)}
</div>
);
}
}
};
/**
* This tab is called Home because in the future it will include some company news,
* updates, roadmap, relavant blogs, etc. Currently it only has the setup instruction
* This tab is called Home because in the future it will include some company news,
* updates, roadmap, relavant blogs, etc. Currently it only has the setup instruction
* for the new users
*/
export default function Home() {
@@ -94,46 +136,90 @@ export default function Home() {
const [hasUserClickedSlack, setHasUserClickedSlack] = useState(false);
const [hasUserClickedIntro, setHasUserClickedIntro] = useState(false);
const [hasUserStarred, setHasUserStarred] = useState(false);
const [hasUserPushedSecrets, setHasUserPushedSecrets] = useState(false);
const [usersInOrg, setUsersInOrg] = useState(false);
useEffect(() => {
const checkUserActionsFunction = async () => {
const userActionSlack = await checkUserAction({
action: "slack_cta_clicked",
});
setHasUserClickedSlack(userActionSlack ? true : false);
const userActionIntro = await checkUserAction({
action: "intro_cta_clicked",
});
setHasUserClickedIntro(userActionIntro ? true : false);
const userActionStar = await checkUserAction({
action: "star_cta_clicked",
});
setHasUserStarred(userActionStar ? true : false);
const orgId = localStorage.getItem("orgData.id");
const orgUsers = await getOrganizationUsers({
orgId: orgId ? orgId : "",
});
setUsersInOrg(orgUsers.length > 1)
};
checkUserActionsFunction();
onboardingCheck({
setHasUserClickedIntro,
setHasUserClickedSlack,
setHasUserPushedSecrets,
setHasUserStarred,
setUsersInOrg
});
}, []);
return (
<div className="mx-6 lg:mx-0 w-full overflow-y-scroll pt-20 h-screen">
<div className="flex flex-col items-center text-gray-300 text-lg mx-auto max-w-2xl lg:max-w-3xl xl:max-w-4xl py-6">
<div className="text-3xl font-bold text-left w-full">Your quick start guide</div>
<div className="text-md text-left w-full pt-2 pb-4 text-bunker-300">Click on the items below and follow the instructions.</div>
{learningItem({ text: "Get to know Infisical", subText: "", complete: hasUserClickedIntro, icon: faHandPeace, time: "3 min", userAction: "intro_cta_clicked", link: "https://www.youtube.com/watch?v=JS3OKYU2078" })}
{learningItem({ text: "Add your secrets", subText: "Click to see example secrets, and add your own.", complete: false, icon: faPlus, time: "2 min", userAction: "first_time_secrets_pushed", link: "/dashboard/" + router.query.id })}
{learningItem({ text: "Inject secrets locally", subText: "Replace .env files with a more secure an efficient alternative.", complete: false, icon: faNetworkWired, time: "8 min", link: "https://infisical.com/docs/getting-started/quickstart" })}
{learningItem({ text: "Integrate Infisical with your infrastructure", subText: "Only a few integrations are currently available. Many more coming soon!", complete: false, icon: faPlug, time: "15 min", link: "https://infisical.com/docs/integrations/overview" })}
{learningItem({ text: "Invite your teammates", subText: "", complete: usersInOrg, icon: faUserPlus, time: "2 min", link: "/settings/org/" + router.query.id + "?invite" })}
{learningItem({ text: "Join Infisical Slack", subText: "Have any questions? Ask us!", complete: hasUserClickedSlack, icon: faSlack, time: "1 min", userAction: "slack_cta_clicked", link: "https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g" })}
{learningItem({ text: "Star Infisical on GitHub", subText: "Like what we're doing? You know what to do! :)", complete: hasUserStarred, icon: faStar, time: "1 min", userAction: "star_cta_clicked", link: "https://github.com/Infisical/infisical" })}
<div className="text-3xl font-bold text-left w-full">
Your quick start guide
</div>
<div className="text-md text-left w-full pt-2 pb-4 text-bunker-300">
Click on the items below and follow the instructions.
</div>
{learningItem({
text: 'Get to know Infisical',
subText: '',
complete: hasUserClickedIntro,
icon: faHandPeace,
time: '3 min',
userAction: 'intro_cta_clicked',
link: 'https://www.youtube.com/watch?v=JS3OKYU2078'
})}
{learningItem({
text: 'Add your secrets',
subText: 'Click to see example secrets, and add your own.',
complete: hasUserPushedSecrets,
icon: faPlus,
time: '2 min',
userAction: 'first_time_secrets_pushed',
link: '/dashboard/' + router.query.id
})}
{learningItem({
text: 'Inject secrets locally',
subText:
'Replace .env files with a more secure an efficient alternative.',
complete: false,
icon: faNetworkWired,
time: '8 min',
link: 'https://infisical.com/docs/getting-started/quickstart'
})}
{learningItem({
text: 'Integrate Infisical with your infrastructure',
subText:
'Only a few integrations are currently available. Many more coming soon!',
complete: false,
icon: faPlug,
time: '15 min',
link: 'https://infisical.com/docs/integrations/overview'
})}
{learningItem({
text: 'Invite your teammates',
subText: '',
complete: usersInOrg,
icon: faUserPlus,
time: '2 min',
link: '/settings/org/' + router.query.id + '?invite'
})}
{learningItem({
text: 'Join Infisical Slack',
subText: 'Have any questions? Ask us!',
complete: hasUserClickedSlack,
icon: faSlack,
time: '1 min',
userAction: 'slack_cta_clicked',
link: 'https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g'
})}
{learningItem({
text: 'Star Infisical on GitHub',
subText: "Like what we're doing? You know what to do! :)",
complete: hasUserStarred,
icon: faStar,
time: '1 min',
userAction: 'star_cta_clicked',
link: 'https://github.com/Infisical/infisical'
})}
</div>
</div>
);

View File

@@ -98,6 +98,7 @@ export default function Login() {
value={email}
placeholder=""
isRequired
autocomplete="username"
/>
</div>
<div className="flex items-center justify-center w-full md:p-2 rounded-lg md:mt-2 mt-6 max-h-24 md:max-h-28">
@@ -108,6 +109,8 @@ export default function Login() {
value={password}
placeholder=""
isRequired
autoComplete="current-password"
id="current-password"
/>
</div>
{errorLogin && <Error text="Your email and/or password are wrong." />}

View File

@@ -119,19 +119,21 @@ export default function PersonalSettings() {
isRequired
error={currentPasswordError}
errorText="The current password may be wrong"
autoComplete="current-password"
id="current-password"
/>
<div className="py-2"></div>
<InputField
label="New Password"
onChangeHandler={(password) => {
setNewPassword(password);
passwordCheck(
passwordCheck({
password,
setPasswordErrorLength,
setPasswordErrorNumber,
setPasswordErrorLowerCase,
false
);
currentErrorCheck: false,
});
}}
type="password"
value={newPassword}
@@ -141,6 +143,8 @@ export default function PersonalSettings() {
passwordErrorLowerCase &&
passwordErrorNumber
}
autoComplete="new-password"
id="new-password"
/>
</div>
{passwordErrorLength ||
@@ -283,6 +287,8 @@ export default function PersonalSettings() {
isRequired
error={backupKeyError}
errorText="The current password is wrong"
autoComplete="current-password"
id="current-password"
/>
</div>
<div className="flex flex-row items-center mt-3 w-full w-60">

View File

@@ -272,6 +272,7 @@ export default function SignUp() {
isRequired
error={emailError}
errorText={emailErrorMessage}
autoComplete="username"
/>
</div>
{/* <div className='flex flex-row justify-left mt-4 max-w-md mx-auto'>
@@ -357,6 +358,7 @@ export default function SignUp() {
isRequired
errorText="Please input your first name."
error={firstNameError}
autoComplete="given-name"
/>
</div>
<div className="mt-2 flex items-center justify-center w-full md:p-2 rounded-lg max-h-24">
@@ -368,6 +370,7 @@ export default function SignUp() {
isRequired
errorText="Please input your last name."
error={lastNameError}
autoComplete="family-name"
/>
</div>
<div className="mt-2 flex flex-col items-center justify-center w-full md:p-2 rounded-lg max-h-60">
@@ -389,6 +392,8 @@ export default function SignUp() {
error={
passwordErrorLength && passwordErrorNumber && passwordErrorLowerCase
}
autoComplete="new-password"
id="new-password"
/>
{passwordErrorLength ||
passwordErrorLowerCase ||

View File

@@ -186,6 +186,7 @@ export default function SignupInvite() {
isRequired
errorText="Please input your first name."
error={firstNameError}
autoComplete="given-name"
/>
</div>
<div className="flex items-center justify-center w-full md:p-2 rounded-lg max-h-24">
@@ -197,6 +198,7 @@ export default function SignupInvite() {
isRequired
errorText="Please input your last name."
error={lastNameError}
autoComplete="family-name"
/>
</div>
<div className="mt-2 flex flex-col items-center justify-center w-full md:p-2 rounded-lg max-h-60">
@@ -204,13 +206,13 @@ export default function SignupInvite() {
label="Password"
onChangeHandler={(password) => {
setPassword(password);
passwordCheck(
passwordCheck({
password,
setPasswordErrorLength,
setPasswordErrorNumber,
setPasswordErrorLowerCase,
false
);
currentErrorCheck: false,
});
}}
type="password"
value={password}
@@ -218,6 +220,8 @@ export default function SignupInvite() {
error={
passwordErrorLength && passwordErrorNumber && passwordErrorLowerCase
}
autoComplete="new-password"
id="new-password"
/>
{passwordErrorLength ||
passwordErrorLowerCase ||

View File

@@ -0,0 +1,5 @@
<svg width="465" height="465" viewBox="0 0 465 465" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M432.802 232.798C432.802 272.354 421.072 311.022 399.096 343.912C377.119 376.802 345.884 402.436 309.339 417.574C272.793 432.711 232.58 436.672 193.784 428.955C154.988 421.238 119.351 402.19 91.3806 374.219C63.4101 346.249 44.3619 310.612 36.6448 271.816C28.9277 233.02 32.8882 192.807 48.0257 156.262C63.1631 119.716 88.7975 88.4805 121.687 66.5042C154.577 44.5278 193.245 32.798 232.801 32.7978" stroke="#67704D" stroke-width="64"/>
<path d="M215.758 33.5259C255.17 30.1556 294.697 38.5481 329.34 57.6422C363.983 76.7362 392.185 105.674 410.381 140.797C428.578 175.919 435.95 215.649 431.567 254.962C427.183 294.274 411.241 331.404 385.755 361.656C360.27 391.908 326.386 413.923 288.388 424.918C250.391 435.912 209.986 435.393 172.284 423.424C134.582 411.455 101.276 388.575 76.5769 357.678C51.8782 326.78 36.8963 289.252 33.5259 249.84" stroke="#67704D" stroke-width="64"/>
<path d="M197.461 263.218C192.386 263.218 188.011 262.016 184.336 259.61C180.662 257.186 177.831 253.711 175.842 249.184C173.853 244.639 172.869 239.175 172.887 232.792C172.906 226.41 173.901 220.993 175.87 216.542C177.859 212.072 180.681 208.673 184.336 206.343C188.011 203.995 192.386 202.821 197.461 202.821C202.537 202.821 206.912 203.995 210.586 206.343C214.28 208.673 217.12 212.072 219.109 216.542C221.098 221.012 222.083 226.429 222.064 232.792C222.064 239.194 221.069 244.667 219.081 249.213C217.092 253.758 214.261 257.233 210.586 259.639C206.931 262.025 202.556 263.218 197.461 263.218ZM197.461 251.713C200.492 251.713 202.944 250.169 204.819 247.082C206.694 243.976 207.622 239.213 207.603 232.792C207.603 228.588 207.177 225.122 206.325 222.394C205.473 219.648 204.289 217.603 202.774 216.258C201.259 214.913 199.488 214.241 197.461 214.241C194.45 214.241 192.016 215.766 190.16 218.815C188.304 221.845 187.367 226.504 187.348 232.792C187.329 237.054 187.736 240.586 188.569 243.389C189.422 246.192 190.615 248.285 192.149 249.667C193.683 251.031 195.454 251.713 197.461 251.713ZM262.703 250.889V247.821C262.703 245.434 263.214 243.228 264.237 241.201C265.279 239.175 266.784 237.546 268.754 236.315C270.724 235.084 273.129 234.468 275.97 234.468C278.868 234.468 281.301 235.084 283.271 236.315C285.26 237.527 286.756 239.146 287.76 241.173C288.782 243.18 289.294 245.396 289.294 247.821V250.889C289.294 253.275 288.782 255.482 287.76 257.508C286.737 259.535 285.231 261.163 283.243 262.394C281.254 263.626 278.83 264.241 275.97 264.241C273.091 264.241 270.667 263.626 268.697 262.394C266.727 261.163 265.231 259.535 264.208 257.508C263.205 255.482 262.703 253.275 262.703 250.889ZM271.765 247.821V250.889C271.765 252.101 272.059 253.266 272.646 254.383C273.252 255.501 274.36 256.059 275.97 256.059C277.618 256.059 278.726 255.519 279.294 254.44C279.862 253.341 280.146 252.158 280.146 250.889V247.821C280.146 246.552 279.871 245.358 279.322 244.241C278.792 243.105 277.674 242.536 275.97 242.536C274.379 242.536 273.28 243.105 272.674 244.241C272.068 245.358 271.765 246.552 271.765 247.821ZM232.532 217.593V214.525C232.532 212.101 233.053 209.885 234.095 207.877C235.155 205.851 236.671 204.232 238.64 203.019C240.61 201.788 242.996 201.173 245.799 201.173C248.697 201.173 251.131 201.788 253.101 203.019C255.089 204.232 256.595 205.851 257.618 207.877C258.64 209.885 259.152 212.101 259.152 214.525V217.593C259.152 220.018 258.631 222.233 257.589 224.241C256.566 226.249 255.061 227.849 253.072 229.042C251.083 230.235 248.659 230.832 245.799 230.832C242.94 230.832 240.515 230.226 238.527 229.014C236.557 227.802 235.061 226.192 234.038 224.184C233.034 222.177 232.532 219.98 232.532 217.593ZM241.68 214.525V217.593C241.68 218.862 241.974 220.046 242.561 221.144C243.167 222.224 244.246 222.764 245.799 222.764C247.466 222.764 248.574 222.224 249.123 221.144C249.691 220.046 249.976 218.862 249.976 217.593V214.525C249.976 213.256 249.71 212.063 249.18 210.946C248.65 209.809 247.523 209.241 245.799 209.241C244.208 209.241 243.119 209.819 242.532 210.974C241.964 212.129 241.68 213.313 241.68 214.525ZM236.822 261.798L276.822 203.616H284.578L244.578 261.798H236.822Z" fill="#BADC58"/>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,6 @@
<svg width="566" height="566" viewBox="0 0 566 566" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M483.002 282.999C483.002 322.556 471.272 361.223 449.296 394.113C427.32 427.003 396.084 452.638 359.539 467.775C322.994 482.913 282.78 486.873 243.984 479.156C205.188 471.439 169.551 452.391 141.581 424.421C113.61 396.45 94.5621 360.814 86.845 322.018C79.1278 283.221 83.0884 243.008 98.2259 206.463C113.363 169.918 138.998 138.682 171.887 116.706C204.777 94.7293 243.445 82.9994 283.001 82.9993" stroke="#67704D" stroke-width="64"/>
<path d="M426.898 144.1C454.37 172.56 472.785 208.528 479.815 247.454C486.846 286.381 482.175 326.518 466.394 362.79C450.613 399.062 424.431 429.84 391.158 451.231C357.885 472.623 319.015 483.668 279.465 482.969C239.915 482.27 201.461 469.858 168.964 447.304C136.468 424.75 111.389 393.067 96.9001 356.26C82.4107 319.453 79.1612 279.176 87.5626 240.522C95.9639 201.868 115.639 166.574 144.099 139.102" stroke="#67704D" stroke-width="64"/>
<path d="M283.002 82.9993C312.374 82.9993 341.385 89.4686 367.974 101.948C394.563 114.427 418.078 132.609 436.846 155.202" stroke="#BADC58" stroke-width="64" stroke-linecap="round"/>
<path d="M231.401 253.817V311.999H217.367V266.942H217.026L204.015 274.897V262.738L218.361 253.817H231.401ZM243.553 302.34V291.374L267.388 253.817H277.132V268.704H271.479L257.53 290.806V291.261H292.047V302.34H243.553ZM271.649 311.999V298.988L271.934 294.187V253.817H285.087V311.999H271.649ZM332.005 301.09V298.022C332.005 295.636 332.516 293.429 333.539 291.403C334.58 289.376 336.086 287.747 338.056 286.516C340.025 285.285 342.431 284.67 345.272 284.67C348.169 284.67 350.603 285.285 352.573 286.516C354.561 287.728 356.058 289.348 357.061 291.374C358.084 293.382 358.595 295.598 358.595 298.022V301.09C358.595 303.477 358.084 305.683 357.061 307.709C356.039 309.736 354.533 311.365 352.544 312.596C350.556 313.827 348.131 314.442 345.272 314.442C342.393 314.442 339.969 313.827 337.999 312.596C336.029 311.365 334.533 309.736 333.51 307.709C332.506 305.683 332.005 303.477 332.005 301.09ZM341.067 298.022V301.09C341.067 302.302 341.361 303.467 341.948 304.584C342.554 305.702 343.662 306.261 345.272 306.261C346.919 306.261 348.027 305.721 348.595 304.641C349.164 303.543 349.448 302.359 349.448 301.09V298.022C349.448 296.753 349.173 295.56 348.624 294.442C348.094 293.306 346.976 292.738 345.272 292.738C343.681 292.738 342.582 293.306 341.976 294.442C341.37 295.56 341.067 296.753 341.067 298.022ZM301.834 267.795V264.727C301.834 262.302 302.355 260.086 303.397 258.079C304.457 256.052 305.972 254.433 307.942 253.221C309.912 251.99 312.298 251.374 315.101 251.374C317.999 251.374 320.433 251.99 322.402 253.221C324.391 254.433 325.897 256.052 326.919 258.079C327.942 260.086 328.453 262.302 328.453 264.727V267.795C328.453 270.219 327.933 272.435 326.891 274.442C325.868 276.45 324.363 278.05 322.374 279.244C320.385 280.437 317.961 281.033 315.101 281.033C312.241 281.033 309.817 280.427 307.828 279.215C305.859 278.003 304.363 276.393 303.34 274.386C302.336 272.378 301.834 270.181 301.834 267.795ZM310.982 264.727V267.795C310.982 269.064 311.275 270.247 311.863 271.346C312.469 272.425 313.548 272.965 315.101 272.965C316.768 272.965 317.876 272.425 318.425 271.346C318.993 270.247 319.277 269.064 319.277 267.795V264.727C319.277 263.458 319.012 262.264 318.482 261.147C317.952 260.011 316.825 259.442 315.101 259.442C313.51 259.442 312.421 260.02 311.834 261.175C311.266 262.331 310.982 263.514 310.982 264.727ZM306.124 311.999L346.124 253.817H353.88L313.88 311.999H306.124Z" fill="#BADC58"/>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -0,0 +1,5 @@
<svg width="464" height="464" viewBox="0 0 464 464" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M432 232C432 271.556 420.27 310.224 398.294 343.114C376.318 376.004 345.082 401.638 308.537 416.776C271.992 431.913 231.778 435.874 192.982 428.157C154.186 420.44 118.549 401.392 90.5788 373.422C62.6083 345.451 43.5601 309.815 35.843 271.018C28.1259 232.222 32.0865 192.009 47.2239 155.464C62.3614 118.918 87.9958 87.6827 120.886 65.7063C153.775 43.73 192.443 32.0001 231.999 32" stroke="#67704D" stroke-width="64"/>
<path d="M232 32C277.35 32 321.353 47.4122 356.792 75.7084C392.23 104.005 417 143.505 427.039 187.729C437.077 231.954 431.787 278.277 412.038 319.1C392.288 359.923 359.251 392.823 318.345 412.401" stroke="#BADC58" stroke-width="64" stroke-linecap="round"/>
<path d="M145.988 251.341V240.375L169.824 202.818H179.568V217.705H173.915L159.966 239.807V240.261H194.483V251.341H145.988ZM174.085 261V247.989L174.369 243.188V202.818H187.522V261H174.085ZM223.986 261.795C219.554 261.795 215.624 261.038 212.196 259.523C208.787 257.989 206.097 255.877 204.128 253.188C202.158 250.498 201.154 247.402 201.116 243.898H215.264C215.321 245.167 215.728 246.294 216.486 247.278C217.243 248.244 218.275 249.002 219.582 249.551C220.889 250.1 222.376 250.375 224.042 250.375C225.709 250.375 227.177 250.081 228.446 249.494C229.734 248.888 230.737 248.064 231.457 247.023C232.177 245.962 232.527 244.75 232.508 243.386C232.527 242.023 232.139 240.811 231.344 239.75C230.548 238.689 229.421 237.866 227.963 237.278C226.523 236.691 224.819 236.398 222.849 236.398H217.196V226.398H222.849C224.573 226.398 226.088 226.114 227.395 225.545C228.72 224.977 229.753 224.182 230.491 223.159C231.23 222.117 231.59 220.924 231.571 219.58C231.59 218.273 231.277 217.127 230.633 216.142C230.008 215.138 229.128 214.362 227.991 213.812C226.874 213.263 225.576 212.989 224.099 212.989C222.546 212.989 221.135 213.263 219.866 213.812C218.616 214.362 217.622 215.138 216.883 216.142C216.145 217.146 215.756 218.311 215.719 219.636H202.281C202.319 216.17 203.285 213.121 205.179 210.489C207.073 207.837 209.648 205.763 212.906 204.267C216.183 202.771 219.914 202.023 224.099 202.023C228.266 202.023 231.931 202.752 235.094 204.21C238.256 205.669 240.719 207.657 242.48 210.176C244.241 212.676 245.122 215.508 245.122 218.67C245.141 221.947 244.071 224.646 241.912 226.767C239.772 228.888 237.016 230.195 233.645 230.688V231.142C238.152 231.672 241.552 233.131 243.844 235.517C246.154 237.903 247.3 240.886 247.281 244.466C247.281 247.837 246.287 250.83 244.298 253.443C242.328 256.038 239.582 258.083 236.059 259.58C232.556 261.057 228.531 261.795 223.986 261.795ZM287.799 250.091V247.023C287.799 244.636 288.311 242.43 289.334 240.403C290.375 238.377 291.881 236.748 293.851 235.517C295.82 234.286 298.226 233.67 301.067 233.67C303.964 233.67 306.398 234.286 308.368 235.517C310.356 236.729 311.853 238.348 312.856 240.375C313.879 242.383 314.39 244.598 314.39 247.023V250.091C314.39 252.477 313.879 254.684 312.856 256.71C311.834 258.737 310.328 260.366 308.339 261.597C306.351 262.828 303.926 263.443 301.067 263.443C298.188 263.443 295.764 262.828 293.794 261.597C291.824 260.366 290.328 258.737 289.305 256.71C288.301 254.684 287.799 252.477 287.799 250.091ZM296.862 247.023V250.091C296.862 251.303 297.156 252.468 297.743 253.585C298.349 254.703 299.457 255.261 301.067 255.261C302.714 255.261 303.822 254.722 304.39 253.642C304.959 252.544 305.243 251.36 305.243 250.091V247.023C305.243 245.754 304.968 244.561 304.419 243.443C303.889 242.307 302.771 241.739 301.067 241.739C299.476 241.739 298.377 242.307 297.771 243.443C297.165 244.561 296.862 245.754 296.862 247.023ZM257.629 216.795V213.727C257.629 211.303 258.15 209.087 259.192 207.08C260.252 205.053 261.767 203.434 263.737 202.222C265.707 200.991 268.093 200.375 270.896 200.375C273.794 200.375 276.228 200.991 278.197 202.222C280.186 203.434 281.692 205.053 282.714 207.08C283.737 209.087 284.248 211.303 284.248 213.727V216.795C284.248 219.22 283.728 221.436 282.686 223.443C281.663 225.451 280.157 227.051 278.169 228.244C276.18 229.437 273.756 230.034 270.896 230.034C268.036 230.034 265.612 229.428 263.623 228.216C261.654 227.004 260.157 225.394 259.135 223.386C258.131 221.379 257.629 219.182 257.629 216.795ZM266.777 213.727V216.795C266.777 218.064 267.07 219.248 267.657 220.347C268.264 221.426 269.343 221.966 270.896 221.966C272.563 221.966 273.671 221.426 274.22 220.347C274.788 219.248 275.072 218.064 275.072 216.795V213.727C275.072 212.458 274.807 211.265 274.277 210.148C273.746 209.011 272.62 208.443 270.896 208.443C269.305 208.443 268.216 209.021 267.629 210.176C267.061 211.331 266.777 212.515 266.777 213.727ZM261.919 261L301.919 202.818H309.674L269.674 261H261.919Z" fill="#BADC58"/>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,5 @@
<svg width="464" height="464" viewBox="0 0 464 464" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M432 232C432 271.556 420.27 310.224 398.294 343.114C376.318 376.004 345.082 401.638 308.537 416.776C271.992 431.913 231.778 435.874 192.982 428.157C154.186 420.44 118.549 401.392 90.5788 373.422C62.6083 345.451 43.5601 309.815 35.843 271.018C28.1259 232.222 32.0865 192.009 47.2239 155.464C62.3614 118.918 87.9958 87.6827 120.886 65.7063C153.775 43.73 192.443 32.0001 231.999 32" stroke="#67704D" stroke-width="64"/>
<path d="M232 32C261.853 32 291.327 38.6829 318.261 51.5585C345.194 64.4342 368.904 83.1759 387.65 106.409C406.396 129.642 419.704 156.777 426.596 185.823C433.489 214.869 433.792 245.09 427.482 274.269C421.173 303.447 408.412 330.843 390.135 354.447C371.858 378.051 348.529 397.264 321.859 410.677C295.189 424.089 265.854 431.362 236.008 431.96C206.161 432.558 176.558 426.467 149.372 414.134" stroke="#BADC58" stroke-width="64" stroke-linecap="round"/>
<path d="M172.839 261.795C168.596 261.795 164.827 261.028 161.532 259.494C158.236 257.96 155.632 255.848 153.719 253.159C151.825 250.47 150.84 247.383 150.765 243.898H164.401C164.515 246.038 165.386 247.761 167.015 249.068C168.643 250.356 170.585 251 172.839 251C174.6 251 176.162 250.612 177.526 249.835C178.89 249.059 179.96 247.97 180.736 246.568C181.513 245.148 181.892 243.519 181.873 241.682C181.892 239.807 181.503 238.169 180.708 236.767C179.931 235.366 178.852 234.277 177.469 233.5C176.106 232.705 174.534 232.307 172.753 232.307C171.068 232.288 169.467 232.657 167.952 233.415C166.456 234.172 165.32 235.205 164.543 236.511L152.128 234.182L154.657 202.818H191.986V214.153H166.219L164.884 227.875H165.225C166.191 226.265 167.744 224.939 169.884 223.898C172.043 222.837 174.496 222.307 177.242 222.307C180.727 222.307 183.833 223.121 186.56 224.75C189.306 226.36 191.465 228.595 193.037 231.455C194.628 234.314 195.424 237.591 195.424 241.284C195.424 245.28 194.477 248.822 192.583 251.909C190.708 254.996 188.075 257.42 184.685 259.182C181.314 260.924 177.365 261.795 172.839 261.795ZM205.616 261L229.081 214.523V214.153H201.638V202.818H243.627V214.239L220.076 261H205.616ZM283.932 250.091V247.023C283.932 244.636 284.444 242.43 285.466 240.403C286.508 238.377 288.014 236.748 289.983 235.517C291.953 234.286 294.358 233.67 297.199 233.67C300.097 233.67 302.531 234.286 304.5 235.517C306.489 236.729 307.985 238.348 308.989 240.375C310.012 242.383 310.523 244.598 310.523 247.023V250.091C310.523 252.477 310.012 254.684 308.989 256.71C307.966 258.737 306.461 260.366 304.472 261.597C302.483 262.828 300.059 263.443 297.199 263.443C294.321 263.443 291.896 262.828 289.927 261.597C287.957 260.366 286.461 258.737 285.438 256.71C284.434 254.684 283.932 252.477 283.932 250.091ZM292.995 247.023V250.091C292.995 251.303 293.288 252.468 293.875 253.585C294.482 254.703 295.589 255.261 297.199 255.261C298.847 255.261 299.955 254.722 300.523 253.642C301.091 252.544 301.375 251.36 301.375 250.091V247.023C301.375 245.754 301.101 244.561 300.552 243.443C300.021 242.307 298.904 241.739 297.199 241.739C295.608 241.739 294.51 242.307 293.904 243.443C293.298 244.561 292.995 245.754 292.995 247.023ZM253.762 216.795V213.727C253.762 211.303 254.283 209.087 255.324 207.08C256.385 205.053 257.9 203.434 259.87 202.222C261.839 200.991 264.226 200.375 267.029 200.375C269.927 200.375 272.36 200.991 274.33 202.222C276.319 203.434 277.824 205.053 278.847 207.08C279.87 209.087 280.381 211.303 280.381 213.727V216.795C280.381 219.22 279.86 221.436 278.819 223.443C277.796 225.451 276.29 227.051 274.302 228.244C272.313 229.437 269.889 230.034 267.029 230.034C264.169 230.034 261.745 229.428 259.756 228.216C257.786 227.004 256.29 225.394 255.268 223.386C254.264 221.379 253.762 219.182 253.762 216.795ZM262.91 213.727V216.795C262.91 218.064 263.203 219.248 263.79 220.347C264.396 221.426 265.476 221.966 267.029 221.966C268.696 221.966 269.804 221.426 270.353 220.347C270.921 219.248 271.205 218.064 271.205 216.795V213.727C271.205 212.458 270.94 211.265 270.41 210.148C269.879 209.011 268.752 208.443 267.029 208.443C265.438 208.443 264.349 209.021 263.762 210.176C263.194 211.331 262.91 212.515 262.91 213.727ZM258.052 261L298.052 202.818H305.807L265.807 261H258.052Z" fill="#BADC58"/>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,5 @@
<svg width="464" height="464" viewBox="0 0 464 464" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M432 232C432 271.556 420.27 310.224 398.294 343.114C376.318 376.004 345.082 401.638 308.537 416.776C271.992 431.913 231.778 435.874 192.982 428.157C154.186 420.44 118.549 401.392 90.5788 373.422C62.6083 345.451 43.5601 309.815 35.843 271.018C28.1259 232.222 32.0865 192.009 47.2239 155.464C62.3614 118.918 87.9958 87.6827 120.886 65.7063C153.775 43.73 192.443 32.0001 231.999 32" stroke="#67704D" stroke-width="64"/>
<path d="M232 32C269.593 32 306.424 42.5951 338.271 62.5703C370.118 82.5454 395.69 111.092 412.055 144.936C428.42 178.779 434.915 216.55 430.796 253.917C426.676 291.283 412.108 326.732 388.764 356.198C365.419 385.664 334.242 407.954 298.809 420.511C263.376 433.069 225.12 435.386 188.43 427.197C151.741 419.007 118.102 400.643 91.3713 374.21C64.641 347.776 45.9018 314.345 37.3027 277.749" stroke="#BADC58" stroke-width="64" stroke-linecap="round"/>
<path d="M159.444 261L182.91 214.523V214.153H155.466V202.818H197.455V214.239L173.904 261H159.444ZM232.079 202.818V261H218.045V215.943H217.704L204.692 223.898V211.739L219.039 202.818H232.079ZM277.526 250.091V247.023C277.526 244.636 278.037 242.43 279.06 240.403C280.102 238.377 281.607 236.748 283.577 235.517C285.547 234.286 287.952 233.67 290.793 233.67C293.691 233.67 296.125 234.286 298.094 235.517C300.083 236.729 301.579 238.348 302.583 240.375C303.606 242.383 304.117 244.598 304.117 247.023V250.091C304.117 252.477 303.606 254.684 302.583 256.71C301.56 258.737 300.054 260.366 298.066 261.597C296.077 262.828 293.653 263.443 290.793 263.443C287.914 263.443 285.49 262.828 283.52 261.597C281.551 260.366 280.054 258.737 279.032 256.71C278.028 254.684 277.526 252.477 277.526 250.091ZM286.589 247.023V250.091C286.589 251.303 286.882 252.468 287.469 253.585C288.075 254.703 289.183 255.261 290.793 255.261C292.441 255.261 293.549 254.722 294.117 253.642C294.685 252.544 294.969 251.36 294.969 250.091V247.023C294.969 245.754 294.695 244.561 294.145 243.443C293.615 242.307 292.498 241.739 290.793 241.739C289.202 241.739 288.104 242.307 287.498 243.443C286.892 244.561 286.589 245.754 286.589 247.023ZM247.356 216.795V213.727C247.356 211.303 247.876 209.087 248.918 207.08C249.979 205.053 251.494 203.434 253.464 202.222C255.433 200.991 257.82 200.375 260.623 200.375C263.52 200.375 265.954 200.991 267.924 202.222C269.912 203.434 271.418 205.053 272.441 207.08C273.464 209.087 273.975 211.303 273.975 213.727V216.795C273.975 219.22 273.454 221.436 272.412 223.443C271.39 225.451 269.884 227.051 267.895 228.244C265.907 229.437 263.482 230.034 260.623 230.034C257.763 230.034 255.339 229.428 253.35 228.216C251.38 227.004 249.884 225.394 248.861 223.386C247.857 221.379 247.356 219.182 247.356 216.795ZM256.503 213.727V216.795C256.503 218.064 256.797 219.248 257.384 220.347C257.99 221.426 259.07 221.966 260.623 221.966C262.289 221.966 263.397 221.426 263.947 220.347C264.515 219.248 264.799 218.064 264.799 216.795V213.727C264.799 212.458 264.534 211.265 264.003 210.148C263.473 209.011 262.346 208.443 260.623 208.443C259.032 208.443 257.943 209.021 257.356 210.176C256.787 211.331 256.503 212.515 256.503 213.727ZM251.645 261L291.645 202.818H299.401L259.401 261H251.645Z" fill="#BADC58"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -7,7 +7,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.2
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to

View File

@@ -21,7 +21,7 @@ spec:
ports:
- containerPort: 4000
env:
{{- range $key, $value := .Values.secrets }}
{{- range $key, $value := .Values.backendEnvironmentVariables }}
{{- if eq $value "MUST_REPLACE" }}
{{ fail "Environment variables are not set. Please set all environment variables to continue." }}
{{ end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: frontend
image: infisical/frontend
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
env:
{{- range $key, $value := .Values.frontendEnvironmentVariables }}
- name: {{ $key }}
value: {{ quote $value }}
{{- end }}
ports:
- containerPort: 4000
---

View File

@@ -34,10 +34,10 @@ ingress:
## Complete Ingress example
# ingress:
# enabled: true
# annotations:
# annotations:
# kubernetes.io/ingress.class: "nginx"
# cert-manager.io/issuer: letsencrypt-nginx
# hostName: example.com
# hostName: k8.infisical.com
# frontend:
# path: /
# pathType: Prefix
@@ -45,14 +45,14 @@ ingress:
# path: /api
# pathType: Prefix
# tls:
# hosts:
# - k8.infisical.com
# secretName: letsencrypt-nginx
# - secretName: letsencrypt-nginx
# hosts:
# - k8.infisical.com
###
### YOU MUST FILL IN ALL SECRETS BELOW
###
secrets:
backendEnvironmentVariables:
# Required keys for platform encryption/decryption ops. Replace with nacl sk keys
PRIVATE_KEY: MUST_REPLACE
PUBLIC_KEY: MUST_REPLACE
@@ -73,4 +73,7 @@ secrets:
# You may replace with Mongo Cloud URI
MONGO_URL: mongodb://root:root@mongodb-service:27017/
# frontendEnvironmentVariables:
# INFISICAL_TELEMETRY_ENABLED: true

1963
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

28
package.json Normal file
View File

@@ -0,0 +1,28 @@
{
"name": "infisical",
"repository": {
"type": "git",
"url": "git+https://github.com/infisical/infisical.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/infisical/infisical/issues"
},
"homepage": "https://github.com/infisical/infisical#readme",
"scripts": {
"prepare": "husky install"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown",
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
]
},
"devDependencies": {
"eslint": "^8.29.0",
"husky": "^8.0.2",
"prettier": "^2.8.1"
}
}