diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index 1b2178ca03..fd8f9c55b4 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -1,5 +1,5 @@ const PORT = process.env.PORT || 4000; -const EMAIL_TOKEN_LIFETIME = process.env.EMAIL_TOKEN_LIFETIME! || '86400'; // investigate +const EMAIL_TOKEN_LIFETIME = process.env.EMAIL_TOKEN_LIFETIME! || '86400'; const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY!; const JWT_AUTH_LIFETIME = process.env.JWT_AUTH_LIFETIME! || '10d'; const JWT_AUTH_SECRET = process.env.JWT_AUTH_SECRET!; diff --git a/backend/src/controllers/organizationController.ts b/backend/src/controllers/organizationController.ts index bce757d0a7..056990acc9 100644 --- a/backend/src/controllers/organizationController.ts +++ b/backend/src/controllers/organizationController.ts @@ -8,6 +8,7 @@ import { STRIPE_PRODUCT_CARD_AUTH } from '../config'; import Stripe from 'stripe'; + const stripe = new Stripe(STRIPE_SECRET_KEY, { apiVersion: '2022-08-01' }); diff --git a/cli/packages/cmd/root.go b/cli/packages/cmd/root.go index f33cbb249f..826ccb4df6 100644 --- a/cli/packages/cmd/root.go +++ b/cli/packages/cmd/root.go @@ -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.4", + Version: "0.1.5", } // Execute adds all child commands to the root command and sets flags appropriately. diff --git a/cli/packages/cmd/run.go b/cli/packages/cmd/run.go index d9ed47a365..6b44fa5481 100644 --- a/cli/packages/cmd/run.go +++ b/cli/packages/cmd/run.go @@ -33,7 +33,7 @@ var runCmd = &cobra.Command{ return } - substitute, err := cmd.Flags().GetBool("substitute") + shouldExpandSecrets, err := cmd.Flags().GetBool("expand") if err != nil { log.Errorln("Unable to parse the substitute flag") log.Debugln(err) @@ -89,7 +89,7 @@ var runCmd = &cobra.Command{ } } - if substitute { + if shouldExpandSecrets { substitutions := util.SubstituteSecrets(envsFromApi) execCmd(args[0], args[1:], substitutions) } else { @@ -103,7 +103,7 @@ func init() { rootCmd.AddCommand(runCmd) runCmd.Flags().StringP("env", "e", "dev", "Set the environment (dev, prod, etc.) from which your secrets should be pulled from") runCmd.Flags().String("projectId", "", "The project ID from which your secrets should be pulled from") - runCmd.Flags().Bool("substitute", true, "Parse shell variable substitutions in your secrets") + runCmd.Flags().Bool("expand", true, "Parse shell parameter expansions in your secrets") } // Credit: inspired by AWS Valut diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index dc3c680584..6eabfe4d96 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -55,6 +55,8 @@ services: - NEXT_PUBLIC_WEBSITE_URL=${SITE_URL} - NEXT_PUBLIC_POSTHOG_HOST=${POSTHOG_HOST} - NEXT_PUBLIC_POSTHOG_API_KEY=${POSTHOG_PROJECT_API_KEY} + - NEXT_PUBLIC_STRIPE_PRODUCT_PRO=${STRIPE_PRODUCT_PRO} + - NEXT_PUBLIC_STRIPE_PRODUCT_STARTER=${STRIPE_PRODUCT_STARTER} - NEXT_PUBLIC_TELEMETRY_ENABLED=${TELEMETRY_ENABLED} networks: - infisical-dev diff --git a/docker-compose.yml b/docker-compose.yml index 648da0e3d5..3204f92574 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,6 +49,9 @@ services: - NEXT_PUBLIC_WEBSITE_URL=${SITE_URL} - NEXT_PUBLIC_POSTHOG_HOST=${POSTHOG_HOST} - NEXT_PUBLIC_POSTHOG_API_KEY=${POSTHOG_PROJECT_API_KEY} + - NEXT_PUBLIC_STRIPE_PRODUCT_PRO=${STRIPE_PRODUCT_PRO} + - NEXT_PUBLIC_STRIPE_PRODUCT_STARTER=${STRIPE_PRODUCT_STARTER} + - NEXT_PUBLIC_TELEMETRY_ENABLED=${TELEMETRY_ENABLED} networks: - infisical diff --git a/docs/cli/reference/run.mdx b/docs/cli/reference/run.mdx index 104a5caf77..7fb2076129 100644 --- a/docs/cli/reference/run.mdx +++ b/docs/cli/reference/run.mdx @@ -12,7 +12,8 @@ Inject environment variables from the platform into an application process. ## Options -| Option | Description | Default value | -| ------------- | ----------------------------------------------------------------------------------------------------------- | ------------- | -| `--env` | Used to set the environment that secrets are pulled from. Accepted values: `dev`, `staging`, `test`, `prod` | `dev` | -| `--projectId` | Used to link a local project to the platform (required only if injecting via the service token method) | `None` | +| Option | Description | Default value | +| -------------- | ----------------------------------------------------------------------------------------------------------- | ------------- | +| `--env` | Used to set the environment that secrets are pulled from. Accepted values: `dev`, `staging`, `test`, `prod` | `dev` | +| `--projectId` | Used to link a local project to the platform (required only if injecting via the service token method) | `None` | +| `--expand` | Parse shell parameter expansions in your secrets (e.g., `${DOMAIN}`) | `true` | diff --git a/docs/cli/usage.mdx b/docs/cli/usage.mdx index 6b1b30b7df..ea7180068f 100644 --- a/docs/cli/usage.mdx +++ b/docs/cli/usage.mdx @@ -29,10 +29,11 @@ infisical run -- [your application start command] Options you can specify: -| Option | Description | Default value | -| ------------- | ----------------------------------------------------------------------------------------------------------- | ------------- | -| `--env` | Used to set the environment that secrets are pulled from. Accepted values: `dev`, `staging`, `test`, `prod` | `dev` | -| `--projectId` | Used to link a local project to the platform (required only if injecting via the service token method) | `None` | +| Option | Description | Default value | +| ------------- | ----------------------------------------------------------------------------------------------------------- | ------------- | +| `--env` | Used to set the environment that secrets are pulled from. Accepted values: `dev`, `staging`, `test`, `prod` | `dev` | +| `--projectId` | Used to link a local project to the platform (required only if injecting via the service token method) | `None` | +| `--expand` | Parse shell parameter expansions in your secrets (e.g., `${DOMAIN}`) | `true` | ## Examples: diff --git a/frontend/pages/settings/billing/[id].js b/frontend/pages/settings/billing/[id].js index 18a87353b3..cd5bc540eb 100644 --- a/frontend/pages/settings/billing/[id].js +++ b/frontend/pages/settings/billing/[id].js @@ -50,6 +50,7 @@ export default function SettingsBilling() { const subscriptions = await getOrganizationSubscriptions({ orgId: localStorage.getItem("orgData.id"), }); + setCurrentPlan(subscriptions.data[0].plan.product); const orgUsers = await getOrganizationUsers({ orgId: localStorage.getItem("orgData.id"),