mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge branch 'heads/main' into windmill-connection-and-sync
This commit is contained in:
@@ -6,7 +6,7 @@ export async function up(knex: Knex): Promise<void> {
|
||||
const hasCol = await knex.schema.hasColumn(TableName.Project, "hasDeleteProtection");
|
||||
if (!hasCol) {
|
||||
await knex.schema.alterTable(TableName.Project, (t) => {
|
||||
t.boolean("hasDeleteProtection").defaultTo(true);
|
||||
t.boolean("hasDeleteProtection").defaultTo(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import { AxiosError, AxiosResponse } from "axios";
|
||||
import { AxiosError } from "axios";
|
||||
|
||||
import { request } from "@app/lib/config/request";
|
||||
import { BadRequestError, InternalServerError } from "@app/lib/errors";
|
||||
@@ -27,10 +27,8 @@ export const getVercelConnectionListItem = () => {
|
||||
export const validateVercelConnectionCredentials = async (config: TVercelConnectionConfig) => {
|
||||
const { credentials: inputCredentials } = config;
|
||||
|
||||
let response: AxiosResponse<VercelApp[]> | null = null;
|
||||
|
||||
try {
|
||||
response = await request.get<VercelApp[]>(`${IntegrationUrls.VERCEL_API_URL}/v9/projects`, {
|
||||
await request.get(`${IntegrationUrls.VERCEL_API_URL}/v2/user`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${inputCredentials.apiToken}`
|
||||
}
|
||||
@@ -38,17 +36,14 @@ export const validateVercelConnectionCredentials = async (config: TVercelConnect
|
||||
} catch (error: unknown) {
|
||||
if (error instanceof AxiosError) {
|
||||
throw new BadRequestError({
|
||||
message: `Failed to validate credentials: ${error.message || "Unknown error"}`
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
message: `Failed to validate credentials: ${
|
||||
error.response?.data ? JSON.stringify(error.response?.data) : error.message || "Unknown error"
|
||||
}`
|
||||
});
|
||||
}
|
||||
throw new BadRequestError({
|
||||
message: "Unable to validate connection: verify credentials"
|
||||
});
|
||||
}
|
||||
|
||||
if (!response?.data) {
|
||||
throw new InternalServerError({
|
||||
message: "Failed to get organizations: Response was empty"
|
||||
message: `Unable to validate connection: ${(error as Error).message || "Verify credentials"}`
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -572,7 +572,9 @@
|
||||
"sdks/languages/node",
|
||||
"sdks/languages/python",
|
||||
"sdks/languages/java",
|
||||
"sdks/languages/go"
|
||||
"sdks/languages/go",
|
||||
"sdks/languages/ruby",
|
||||
"sdks/languages/csharp"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{/* ---
|
||||
---
|
||||
title: "Infisical .NET SDK"
|
||||
sidebarTitle: ".NET"
|
||||
icon: "bars"
|
||||
@@ -9,6 +9,12 @@ If you're working with C#, the official [Infisical C# SDK](https://github.com/In
|
||||
- [Nuget Package](https://www.nuget.org/packages/Infisical.Sdk)
|
||||
- [Github Repository](https://github.com/Infisical/sdk/tree/main/languages/csharp)
|
||||
|
||||
<Warning>
|
||||
**Deprecation Notice**
|
||||
|
||||
All versions prior to **2.3.9** should be considered deprecated and are no longer supported by Infisical. Please update to version **2.3.9** or newer. All changes are fully backwards compatible with older versions.
|
||||
</Warning>
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```cs
|
||||
@@ -584,4 +590,4 @@ var decryptedPlaintext = infisical.DecryptSymmetric(decryptOptions);
|
||||
|
||||
#### Returns (string)
|
||||
`Plaintext` (string): The decrypted plaintext.
|
||||
*/}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ func main() {
|
||||
AutoTokenRefresh: true, // Wether or not to let the SDK handle the access token lifecycle. Defaults to true if not specified.
|
||||
})
|
||||
|
||||
_, err = client.Auth().UniversalAuthLogin("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
|
||||
_, err := client.Auth().UniversalAuthLogin("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("Authentication failed: %v", err)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{/* ---
|
||||
---
|
||||
title: "Infisical Ruby SDK"
|
||||
sidebarTitle: "Ruby"
|
||||
icon: "diamond"
|
||||
@@ -6,11 +6,17 @@ icon: "diamond"
|
||||
|
||||
|
||||
|
||||
If you're working with Ruby , the official [Infisical Ruby SDK](https://github.com/infisical/sdk) package is the easiest way to fetch and work with secrets for your application.
|
||||
If you're working with Ruby, the official [Infisical Ruby SDK](https://github.com/infisical/sdk) package is the easiest way to fetch and work with secrets for your application.
|
||||
|
||||
- [Ruby Package](https://rubygems.org/gems/infisical-sdk)
|
||||
- [Github Repository](https://github.com/infisical/sdk)
|
||||
|
||||
<Warning>
|
||||
**Deprecation Notice**
|
||||
|
||||
All versions prior to **2.3.9** should be considered deprecated and are no longer supported by Infisical. Please update to version **2.3.9** or newer. All changes are fully backwards compatible with older versions.
|
||||
</Warning>
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```ruby
|
||||
@@ -433,4 +439,4 @@ decrypted_data = infisical.cryptography.decrypt_symmetric(
|
||||
</ParamField>
|
||||
|
||||
#### Returns (string)
|
||||
`Plaintext` (string): The decrypted plaintext. */}
|
||||
`Plaintext` (string): The decrypted plaintext.
|
||||
Reference in New Issue
Block a user