Merge branch 'heads/main' into windmill-connection-and-sync

This commit is contained in:
Daniel Hougaard
2025-04-18 04:44:32 +04:00
6 changed files with 29 additions and 20 deletions
@@ -6,7 +6,7 @@ export async function up(knex: Knex): Promise<void> {
const hasCol = await knex.schema.hasColumn(TableName.Project, "hasDeleteProtection"); const hasCol = await knex.schema.hasColumn(TableName.Project, "hasDeleteProtection");
if (!hasCol) { if (!hasCol) {
await knex.schema.alterTable(TableName.Project, (t) => { 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 */ /* eslint-disable no-await-in-loop */
import { AxiosError, AxiosResponse } from "axios"; import { AxiosError } from "axios";
import { request } from "@app/lib/config/request"; import { request } from "@app/lib/config/request";
import { BadRequestError, InternalServerError } from "@app/lib/errors"; import { BadRequestError, InternalServerError } from "@app/lib/errors";
@@ -27,10 +27,8 @@ export const getVercelConnectionListItem = () => {
export const validateVercelConnectionCredentials = async (config: TVercelConnectionConfig) => { export const validateVercelConnectionCredentials = async (config: TVercelConnectionConfig) => {
const { credentials: inputCredentials } = config; const { credentials: inputCredentials } = config;
let response: AxiosResponse<VercelApp[]> | null = null;
try { try {
response = await request.get<VercelApp[]>(`${IntegrationUrls.VERCEL_API_URL}/v9/projects`, { await request.get(`${IntegrationUrls.VERCEL_API_URL}/v2/user`, {
headers: { headers: {
Authorization: `Bearer ${inputCredentials.apiToken}` Authorization: `Bearer ${inputCredentials.apiToken}`
} }
@@ -38,17 +36,14 @@ export const validateVercelConnectionCredentials = async (config: TVercelConnect
} catch (error: unknown) { } catch (error: unknown) {
if (error instanceof AxiosError) { if (error instanceof AxiosError) {
throw new BadRequestError({ 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({ throw new BadRequestError({
message: "Unable to validate connection: verify credentials" message: `Unable to validate connection: ${(error as Error).message || "Verify credentials"}`
});
}
if (!response?.data) {
throw new InternalServerError({
message: "Failed to get organizations: Response was empty"
}); });
} }
+3 -1
View File
@@ -572,7 +572,9 @@
"sdks/languages/node", "sdks/languages/node",
"sdks/languages/python", "sdks/languages/python",
"sdks/languages/java", "sdks/languages/java",
"sdks/languages/go" "sdks/languages/go",
"sdks/languages/ruby",
"sdks/languages/csharp"
] ]
}, },
{ {
+8 -2
View File
@@ -1,4 +1,4 @@
{/* --- ---
title: "Infisical .NET SDK" title: "Infisical .NET SDK"
sidebarTitle: ".NET" sidebarTitle: ".NET"
icon: "bars" 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) - [Nuget Package](https://www.nuget.org/packages/Infisical.Sdk)
- [Github Repository](https://github.com/Infisical/sdk/tree/main/languages/csharp) - [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 ## Basic Usage
```cs ```cs
@@ -584,4 +590,4 @@ var decryptedPlaintext = infisical.DecryptSymmetric(decryptOptions);
#### Returns (string) #### Returns (string)
`Plaintext` (string): The decrypted plaintext. `Plaintext` (string): The decrypted plaintext.
*/}
+1 -1
View File
@@ -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. 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 { if err != nil {
fmt.Printf("Authentication failed: %v", err) fmt.Printf("Authentication failed: %v", err)
+9 -3
View File
@@ -1,4 +1,4 @@
{/* --- ---
title: "Infisical Ruby SDK" title: "Infisical Ruby SDK"
sidebarTitle: "Ruby" sidebarTitle: "Ruby"
icon: "diamond" 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) - [Ruby Package](https://rubygems.org/gems/infisical-sdk)
- [Github Repository](https://github.com/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 ## Basic Usage
```ruby ```ruby
@@ -433,4 +439,4 @@ decrypted_data = infisical.cryptography.decrypt_symmetric(
</ParamField> </ParamField>
#### Returns (string) #### Returns (string)
`Plaintext` (string): The decrypted plaintext. */} `Plaintext` (string): The decrypted plaintext.