mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: review comments
This commit is contained in:
@@ -148,7 +148,7 @@ export const listLaravelForgeServers = async (
|
|||||||
export const listLaravelForgeSites = async (
|
export const listLaravelForgeSites = async (
|
||||||
appConnection: TLaravelForgeConnection,
|
appConnection: TLaravelForgeConnection,
|
||||||
organizationSlug: string,
|
organizationSlug: string,
|
||||||
serverId: number
|
serverId: string
|
||||||
): Promise<TLaravelForgeSite[]> => {
|
): Promise<TLaravelForgeSite[]> => {
|
||||||
const { credentials } = appConnection;
|
const { credentials } = appConnection;
|
||||||
const { apiToken } = credentials;
|
const { apiToken } = credentials;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export const laravelForgeConnectionService = (getAppConnection: TGetAppConnectio
|
|||||||
connectionId: string,
|
connectionId: string,
|
||||||
actor: OrgServiceActor,
|
actor: OrgServiceActor,
|
||||||
organizationSlug: string,
|
organizationSlug: string,
|
||||||
serverId: number
|
serverId: string
|
||||||
): Promise<TLaravelForgeSite[]> => {
|
): Promise<TLaravelForgeSite[]> => {
|
||||||
const appConnection = await getAppConnection(AppConnection.LaravelForge, connectionId, actor);
|
const appConnection = await getAppConnection(AppConnection.LaravelForge, connectionId, actor);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -26,9 +26,10 @@ const LaravelForgeSyncDestinationConfigSchema = z.object({
|
|||||||
)
|
)
|
||||||
.describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.orgSlug),
|
.describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.orgSlug),
|
||||||
orgName: z.string().optional().describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.orgName),
|
orgName: z.string().optional().describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.orgName),
|
||||||
serverId: z.coerce
|
serverId: z
|
||||||
.number()
|
.string()
|
||||||
.int("Server ID must be a valid integer")
|
.min(1, "Server ID is required")
|
||||||
|
.regex(/^\d+$/, "Server ID must be a valid integer")
|
||||||
.describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.serverId),
|
.describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.serverId),
|
||||||
serverName: z.string().optional().describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.serverName),
|
serverName: z.string().optional().describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.serverName),
|
||||||
siteId: z.string().min(1, "Site ID is required").describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.siteId),
|
siteId: z.string().min(1, "Site ID is required").describe(SecretSyncs.DESTINATION_CONFIG.LARAVEL_FORGE.siteId),
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export type TLaravelForgeSyncWithCredentials = TLaravelForgeSync & {
|
|||||||
export type TGetLaravelForgeSecrets = {
|
export type TGetLaravelForgeSecrets = {
|
||||||
apiToken: string;
|
apiToken: string;
|
||||||
orgSlug: string;
|
orgSlug: string;
|
||||||
serverId: number;
|
serverId: string;
|
||||||
siteId: string;
|
siteId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ description: "Learn how to configure a Laravel Forge Sync for Infisical."
|
|||||||
},
|
},
|
||||||
"destinationConfig": {
|
"destinationConfig": {
|
||||||
"orgSlug": "org-abc123",
|
"orgSlug": "org-abc123",
|
||||||
"serverId": "server-abc123",
|
"serverId": "123",
|
||||||
"siteId": "site-abc123"
|
"siteId": "site-abc123"
|
||||||
}
|
}
|
||||||
}'
|
}'
|
||||||
@@ -146,7 +146,7 @@ description: "Learn how to configure a Laravel Forge Sync for Infisical."
|
|||||||
"destination": "laravel-forge",
|
"destination": "laravel-forge",
|
||||||
"destinationConfig": {
|
"destinationConfig": {
|
||||||
"orgSlug": "org-abc123",
|
"orgSlug": "org-abc123",
|
||||||
"serverId": "server-abc123",
|
"serverId": "123",
|
||||||
"siteId": "site-abc123"
|
"siteId": "site-abc123"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const laravelForgeConnectionKeys = {
|
|||||||
[...laravelForgeConnectionKeys.all, "organizations", connectionId] as const,
|
[...laravelForgeConnectionKeys.all, "organizations", connectionId] as const,
|
||||||
listServers: (connectionId: string, organizationSlug: string) =>
|
listServers: (connectionId: string, organizationSlug: string) =>
|
||||||
[...laravelForgeConnectionKeys.all, "servers", connectionId, organizationSlug] as const,
|
[...laravelForgeConnectionKeys.all, "servers", connectionId, organizationSlug] as const,
|
||||||
listSites: (connectionId: string, organizationSlug: string, serverId: number) =>
|
listSites: (connectionId: string, organizationSlug: string, serverId: string) =>
|
||||||
[...laravelForgeConnectionKeys.all, "sites", connectionId, organizationSlug, serverId] as const
|
[...laravelForgeConnectionKeys.all, "sites", connectionId, organizationSlug, serverId] as const
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ export const useLaravelForgeConnectionListServers = (
|
|||||||
export const useLaravelForgeConnectionListSites = (
|
export const useLaravelForgeConnectionListSites = (
|
||||||
connectionId: string,
|
connectionId: string,
|
||||||
organizationSlug: string,
|
organizationSlug: string,
|
||||||
serverId: number,
|
serverId: string,
|
||||||
options?: Omit<
|
options?: Omit<
|
||||||
UseQueryOptions<
|
UseQueryOptions<
|
||||||
TLaravelForgeSite[],
|
TLaravelForgeSite[],
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export type TLaravelForgeSync = TRootSecretSync & {
|
|||||||
destinationConfig: {
|
destinationConfig: {
|
||||||
orgSlug: string;
|
orgSlug: string;
|
||||||
orgName: string;
|
orgName: string;
|
||||||
serverId: number;
|
serverId: string;
|
||||||
serverName: string;
|
serverName: string;
|
||||||
siteId: string;
|
siteId: string;
|
||||||
siteName: string;
|
siteName: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user