Skip to content

Commit c9c9ccf

Browse files
committed
fix: improve package mapping logic, add category field, clean up env vars
1 parent ea27ce9 commit c9c9ccf

File tree

6 files changed

+18
-31
lines changed

6 files changed

+18
-31
lines changed

config/.env

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,8 @@ TELEMETRY=false
6565

6666
MIGRATIONS_PATH="./migrations/dist"
6767

68-
# CLUBMED
69-
CLUBMED_API_URL="https://api.clubmed.com"
70-
71-
# CLUBMED GPT
72-
AI_TOOLKIT_AI_TYPE=CUSTOMAI
73-
AI_TOOLKIT_USERNAME=directus
74-
AI_TOOLKIT_TOKEN_BASE_URL=https://login.microsoftonline.com
75-
AI_TOOLKIT_TOKEN_PATH=/oauth2/v2.0/token
76-
AI_TOOLKIT_BASE_URL=https://translate.ai.clubmed.com/api
77-
7868
WEBSOCKETS_ENABLED=true
7969

80-
# JIRA
81-
JIRA_URL=https://clubmed.atlassian.net
82-
JIRA_EMAIL=
83-
JIRA_TOKEN=
84-
8570
# --- OAuth2 / Single Sign-On Providers -------------------------------------
8671
# Configure Directus authentication providers. Comma-separated list.
8772
# Examples: "github" or "github,google". See each provider block below.

config/.env.production

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
# Database
1212
DB_CLIENT=pg
1313
DB_CONNECTION_STRING="$DATABASE_URL"
14+
DB_SSL_REJECT_UNAUTHORIZED=false
15+

extensions/env-info/src/endpoint/EnvInfoService.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ describe("VersionController", () => {
5555
branch: "main",
5656
env: {
5757
auth_providers: "",
58-
auth_clubmed_driver: "",
59-
auth_clubmed_issuer_url: "",
60-
auth_clubmed_allow_public_registration: false,
61-
auth_clubmed_token_endpoint_auth_method: "",
62-
auth_clubmed_identifier_key: "",
6358
cache_enable: false,
6459
cache_store: "unknown",
6560
cache_auto_purge: false,
@@ -72,8 +67,6 @@ describe("VersionController", () => {
7267
storage_s3_endpoint: "",
7368
storage_s3_force_path_style: "",
7469
storage_s3_public_url: "",
75-
db_url: "",
76-
jira_url: ""
7770
}
7871
});
7972
});

extensions/env-info/src/endpoint/EnvInfoService.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ export class EnvInfoService {
88
env: isAdmin
99
? {
1010
auth_providers: constant<string>("envs.AUTH_PROVIDERS", ""),
11-
auth_clubmed_driver: constant<string>("envs.AUTH_CLUBMED_DRIVER", ""),
12-
auth_clubmed_issuer_url: constant<string>("envs.AUTH_CLUBMED_ISSUER_URL", ""),
13-
auth_clubmed_allow_public_registration: constant<boolean>("envs.AUTH_CLUBMED_ALLOW_PUBLIC_REGISTRATION", false),
14-
auth_clubmed_token_endpoint_auth_method: constant<string>("envs.AUTH_CLUBMED_TOKEN_ENDPOINT_AUTH_METHOD", ""),
15-
auth_clubmed_identifier_key: constant<string>("envs.AUTH_CLUBMED_IDENTIFIER_KEY", ""),
1611
cache_enable: constant<boolean>("envs.CACHE_ENABLE", false),
1712
cache_store: constant<string>("envs.CACHE_STORE", "unknown"),
1813
cache_auto_purge: constant<boolean>("envs.CACHE_AUTO_PURGE", false),
@@ -24,9 +19,7 @@ export class EnvInfoService {
2419
storage_s3_region: constant<string>("envs.STORAGE_S3_REGION", ""),
2520
storage_s3_endpoint: constant<string>("envs.STORAGE_S3_ENDPOINT", ""),
2621
storage_s3_force_path_style: constant<string>("envs.STORAGE_S3_FORCE_PATH_STYLE", ""),
27-
storage_s3_public_url: constant<string>("envs.STORAGE_S3_PUBLIC_URL", ""),
28-
db_url: constant<string>("envs.DB_URL", ""),
29-
jira_url: constant<string>("envs.JIRA_URL", "")
22+
storage_s3_public_url: constant<string>("envs.STORAGE_S3_PUBLIC_URL", "")
3023
}
3124
: undefined
3225
};

extensions/tsed-rest/src/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ import { wrapEndpoint } from "@tsed-cms/infra/bootstrap/directus.js";
44
import { LegacyRestService } from "@tsed-cms/usecases/legacy/LegacyRestService.js";
55
import { SlackService } from "@tsed-cms/usecases/slack/SlackService.js";
66

7+
function getCategory(name: string) {
8+
if (name.startsWith("tsed-cli-") || name.startsWith("@tsed/cli")) {
9+
return "cli";
10+
}
11+
12+
if (name.startsWith("tsed-logger-") || name.startsWith("@tsed/logger")) {
13+
return "logger";
14+
}
15+
16+
return "framework";
17+
}
18+
719
/**
820
* Legacy REST endpoints re-exposed by Directus backed by Directus collections
921
* - GET /rest/github/:owner/:repo → repositories
@@ -70,7 +82,7 @@ export default defineEndpoint({
7082
name: item.name,
7183
icon: item.icon,
7284
description: item.icon,
73-
tags: item.tags,
85+
tags: item.tags || [],
7486
homepage: item.homepage,
7587
downloads: item.downloads || 0,
7688
version: item.downloads || null,
@@ -79,6 +91,7 @@ export default defineEndpoint({
7991
stars: item.stars || 0,
8092
type: item.type,
8193
bugs: item.bugs || "",
94+
category: getCategory(item.name),
8295
maintainers:
8396
item.maintainers?.map((maintainer: any) => {
8497
return {

packages/infra/warehouse/LegacyApiClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface WarehousePluginItem {
2121
type?: "official" | "premium" | "3rd-party" | string | null;
2222
bugs?: string | null;
2323
icon?: string | null;
24+
category?: string | null;
2425
maintainers?: Array<WarehousePluginMaintainer | string> | null;
2526
}
2627

0 commit comments

Comments
 (0)