mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: lint
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ export const load: PageLoad = async ({ url, params, parent }) => {
|
||||
}
|
||||
|
||||
// Parse repository information
|
||||
const repoMatch = repoUrl.match(/github\.com[\/:]([^\/]+)\/([^\/\?\s]+)/);
|
||||
const repoMatch = repoUrl.match(/github\.com[/:]([^/]+)\/([^/?s]+)/);
|
||||
if (!repoMatch) {
|
||||
redirect(302, `${base}/project-${params.region}-${params.project}/functions`);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const load: PageLoad = async ({ url, params }) => {
|
||||
}
|
||||
|
||||
// Parse repository information
|
||||
const repoMatch = repoUrl.match(/github\.com[\/:]([^\/]+)\/([^\/\?\s]+)/);
|
||||
const repoMatch = repoUrl.match(/github\.com[/:]([^/]+)\/([^/?s]+)/);
|
||||
if (!repoMatch) {
|
||||
redirect(302, `${base}/project-${params.region}-${params.project}/sites`);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
label="Organization"
|
||||
required
|
||||
placeholder="Select an organization"
|
||||
options={data.organizations.teams.map((o: any) => ({
|
||||
options={data.organizations.teams.map((o) => ({
|
||||
label: o.name,
|
||||
value: o.$id
|
||||
}))}
|
||||
|
||||
@@ -34,18 +34,27 @@ export const load: PageLoad = async ({ parent, url }) => {
|
||||
const envKeys = envParam ? envParam.split(',').map((key: string) => key.trim()) : [];
|
||||
const name = url.searchParams.get('name');
|
||||
|
||||
let deploymentData: {
|
||||
const deploymentData: {
|
||||
type: 'repo';
|
||||
repository: { url: string; owner: string; name: string };
|
||||
runtime?: string;
|
||||
name?: string;
|
||||
} = {
|
||||
type: 'repo',
|
||||
repository: {
|
||||
url: repoUrl!,
|
||||
owner: '',
|
||||
name: ''
|
||||
},
|
||||
runtime: runtime || 'node-18.0',
|
||||
name: name || ''
|
||||
};
|
||||
|
||||
// Get available runtimes
|
||||
const runtimesList = await sdk.forConsole.functions.listRuntimes();
|
||||
|
||||
// Repository deployment only
|
||||
const repoMatch = repoUrl!.match(/github\.com[\/:]([^\/]+)\/([^\/\?\s]+)/);
|
||||
const repoMatch = repoUrl!.match(/github\.com[/:]([^/]+)\/([^/?s]+)/);
|
||||
if (!repoMatch) {
|
||||
redirect(302, base + '/');
|
||||
}
|
||||
@@ -54,16 +63,10 @@ export const load: PageLoad = async ({ parent, url }) => {
|
||||
// Clean repository name (remove .git extension if present)
|
||||
const cleanRepoName = repoName.replace(/\.git$/, '');
|
||||
|
||||
deploymentData = {
|
||||
type: 'repo',
|
||||
repository: {
|
||||
url: repoUrl!,
|
||||
owner,
|
||||
name: cleanRepoName
|
||||
},
|
||||
runtime: runtime || 'node-18.0', // Default to Node.js if not specified
|
||||
name: name || cleanRepoName
|
||||
};
|
||||
// Update deployment data with parsed repository info
|
||||
deploymentData.repository.owner = owner;
|
||||
deploymentData.repository.name = cleanRepoName;
|
||||
deploymentData.name = name || cleanRepoName;
|
||||
|
||||
// Get organizations
|
||||
let organizations: Models.TeamList<Record<string, unknown>> | OrganizationList | undefined;
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
label="Organization"
|
||||
required
|
||||
placeholder="Select an organization"
|
||||
options={data.organizations.teams.map((o: any) => ({
|
||||
options={data.organizations.teams.map((o) => ({
|
||||
label: o.name,
|
||||
value: o.$id
|
||||
}))}
|
||||
|
||||
@@ -64,7 +64,7 @@ export const load: PageLoad = async ({ parent, url }) => {
|
||||
}
|
||||
} else {
|
||||
// Repository deployment
|
||||
const repoMatch = repoUrl!.match(/github\.com[\/:]([^\/]+)\/([^\/\?\s]+)/);
|
||||
const repoMatch = repoUrl!.match(/github\.com[/:]([^/]+)\/([^/?s]+)/);
|
||||
if (!repoMatch) {
|
||||
redirect(302, base + '/');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user