@wopr-network/platform-core 1.56.0 → 1.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -399,7 +399,7 @@ export class FleetManager {
399
399
  Binds: binds.length > 0 ? binds : undefined,
400
400
  SecurityOpt: ["no-new-privileges"],
401
401
  CapDrop: isEphemeral ? undefined : ["ALL"],
402
- CapAdd: isEphemeral ? undefined : ["NET_BIND_SERVICE"],
402
+ CapAdd: isEphemeral ? undefined : ["NET_BIND_SERVICE", "CHOWN", "DAC_OVERRIDE"],
403
403
  ReadonlyRootfs: !isEphemeral,
404
404
  Tmpfs: isEphemeral
405
405
  ? undefined
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Auth Social Router — exposes which OAuth providers are configured.
3
+ *
4
+ * Returns a list of provider IDs (e.g., ["github", "google"]) based on
5
+ * which env vars are set. Used by platform-ui-core's OAuthButtons component.
6
+ */
7
+ export declare const authSocialRouter: import("@trpc/server").TRPCBuiltRouter<{
8
+ ctx: import("./init.js").TRPCContext;
9
+ meta: object;
10
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
11
+ transformer: false;
12
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13
+ enabledSocialProviders: import("@trpc/server").TRPCQueryProcedure<{
14
+ input: void;
15
+ output: ("github" | "discord" | "google")[];
16
+ meta: object;
17
+ }>;
18
+ }>>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Auth Social Router — exposes which OAuth providers are configured.
3
+ *
4
+ * Returns a list of provider IDs (e.g., ["github", "google"]) based on
5
+ * which env vars are set. Used by platform-ui-core's OAuthButtons component.
6
+ */
7
+ import { publicProcedure, router } from "./init.js";
8
+ const PROVIDERS = [
9
+ { id: "github", envKey: "GITHUB_CLIENT_ID" },
10
+ { id: "google", envKey: "GOOGLE_CLIENT_ID" },
11
+ { id: "discord", envKey: "DISCORD_CLIENT_ID" },
12
+ ];
13
+ export const authSocialRouter = router({
14
+ enabledSocialProviders: publicProcedure.query(() => {
15
+ return PROVIDERS.filter((p) => process.env[p.envKey]).map((p) => p.id);
16
+ }),
17
+ });
@@ -1,4 +1,5 @@
1
1
  export { createAdminFleetUpdateRouter } from "./admin-fleet-update-router.js";
2
+ export { authSocialRouter } from "./auth-social-router.js";
2
3
  export { createFleetUpdateConfigRouter } from "./fleet-update-config-router.js";
3
4
  export { adminProcedure, createCallerFactory, orgAdminProcedure, orgMemberProcedure, protectedProcedure, publicProcedure, router, setTrpcOrgMemberRepo, type TRPCContext, tenantProcedure, } from "./init.js";
4
5
  export { createNotificationTemplateRouter } from "./notification-template-router.js";
@@ -1,4 +1,5 @@
1
1
  export { createAdminFleetUpdateRouter } from "./admin-fleet-update-router.js";
2
+ export { authSocialRouter } from "./auth-social-router.js";
2
3
  export { createFleetUpdateConfigRouter } from "./fleet-update-config-router.js";
3
4
  export { adminProcedure, createCallerFactory, orgAdminProcedure, orgMemberProcedure, protectedProcedure, publicProcedure, router, setTrpcOrgMemberRepo, tenantProcedure, } from "./init.js";
4
5
  export { createNotificationTemplateRouter } from "./notification-template-router.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wopr-network/platform-core",
3
- "version": "1.56.0",
3
+ "version": "1.57.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -449,7 +449,7 @@ export class FleetManager {
449
449
  Binds: binds.length > 0 ? binds : undefined,
450
450
  SecurityOpt: ["no-new-privileges"],
451
451
  CapDrop: isEphemeral ? undefined : ["ALL"],
452
- CapAdd: isEphemeral ? undefined : ["NET_BIND_SERVICE"],
452
+ CapAdd: isEphemeral ? undefined : ["NET_BIND_SERVICE", "CHOWN", "DAC_OVERRIDE"],
453
453
  ReadonlyRootfs: !isEphemeral,
454
454
  Tmpfs: isEphemeral
455
455
  ? undefined
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Auth Social Router — exposes which OAuth providers are configured.
3
+ *
4
+ * Returns a list of provider IDs (e.g., ["github", "google"]) based on
5
+ * which env vars are set. Used by platform-ui-core's OAuthButtons component.
6
+ */
7
+
8
+ import { publicProcedure, router } from "./init.js";
9
+
10
+ const PROVIDERS = [
11
+ { id: "github", envKey: "GITHUB_CLIENT_ID" },
12
+ { id: "google", envKey: "GOOGLE_CLIENT_ID" },
13
+ { id: "discord", envKey: "DISCORD_CLIENT_ID" },
14
+ ] as const;
15
+
16
+ export const authSocialRouter = router({
17
+ enabledSocialProviders: publicProcedure.query(() => {
18
+ return PROVIDERS.filter((p) => process.env[p.envKey]).map((p) => p.id);
19
+ }),
20
+ });
package/src/trpc/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { createAdminFleetUpdateRouter } from "./admin-fleet-update-router.js";
2
+ export { authSocialRouter } from "./auth-social-router.js";
2
3
  export { createFleetUpdateConfigRouter } from "./fleet-update-config-router.js";
3
4
  export {
4
5
  adminProcedure,