@augmenting-integrations/create-tenant 8.4.1 → 8.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augmenting-integrations/create-tenant",
3
- "version": "8.4.1",
3
+ "version": "8.5.0",
4
4
  "description": "Scaffold a new tenant apex app for an augint deployment. Generates a Next 16 + Auth.js v5 + Cognito apex with TenantConfig wired up, library-owned /api/apps registry handler, and /studio admin. Single command: pnpm dlx @augmenting-integrations/create-tenant my-tenant.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -0,0 +1,22 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "tenantSlug": "__TENANT_NAME__",
4
+ "appSlug": "apex",
5
+ "role": "apex",
6
+ "subdomain": "",
7
+ "displayName": "__TENANT_NAME__ Portal",
8
+ "navOrder": 0,
9
+ "access": {
10
+ "requiredIdentityGroups": []
11
+ },
12
+ "features": {
13
+ "billing": false,
14
+ "settings": true,
15
+ "invitations": false,
16
+ "impersonation": true
17
+ },
18
+ "dataPlane": {
19
+ "type": "none",
20
+ "migrations": false
21
+ }
22
+ }
@@ -14,6 +14,7 @@
14
14
  "@augmenting-integrations/auth": "^8.0.0",
15
15
  "@augmenting-integrations/aws": "^8.0.0",
16
16
  "@augmenting-integrations/brand": "^8.0.0",
17
+ "@augmenting-integrations/platform": "^8.0.0",
17
18
  "@augmenting-integrations/registry": "^8.0.0",
18
19
  "@augmenting-integrations/themes": "^8.0.0",
19
20
  "@augmenting-integrations/ui": "^8.0.0",
@@ -6,7 +6,7 @@ import { SessionProvider } from "@augmenting-integrations/ui";
6
6
  import {
7
7
  TenantProvider,
8
8
  type TenantPublicConfig,
9
- } from "@augmenting-integrations/auth/client";
9
+ } from "@augmenting-integrations/platform/client";
10
10
 
11
11
  export function Providers({
12
12
  children,
@@ -5,7 +5,7 @@ import {
5
5
  THEME_VARIANT_COOKIE_KEY,
6
6
  } from "@augmenting-integrations/themes";
7
7
  import { ThemeBootScript } from "@augmenting-integrations/ui";
8
- import { TenantBootScript, publicSubset } from "@augmenting-integrations/auth/server";
8
+ import { TenantBootScript, publicSubset } from "@augmenting-integrations/platform/server";
9
9
  import { auth, tenant } from "@/lib/auth";
10
10
  import { Providers } from "./Providers";
11
11
  import "./globals.css";
@@ -1,5 +1,19 @@
1
- import { createAuth, loadTenantConfig } from "@augmenting-integrations/auth/server";
1
+ import { createAuth } from "@augmenting-integrations/auth/server";
2
+ import { loadTenantConfig } from "@augmenting-integrations/platform/server";
3
+ import { validateManifest } from "@augmenting-integrations/platform/manifest";
2
4
  import { getSecret } from "@augmenting-integrations/aws/server";
5
+ import manifestJson from "../../app.manifest.json";
6
+
7
+ // app.manifest.json is the local source of truth for slug / subdomain /
8
+ // access policy / feature enablement. Validate at module init so a bad
9
+ // manifest fails the deploy loudly with the field-by-field error list.
10
+ const manifestResult = validateManifest(manifestJson);
11
+ if (!manifestResult.ok) {
12
+ throw new Error(
13
+ `app.manifest.json failed validation: ${manifestResult.errors.map((e) => `${e.path}: ${e.message}`).join("; ")}`,
14
+ );
15
+ }
16
+ export const manifest = manifestResult.value;
3
17
 
4
18
  // Single tenant configuration source.
5
19
  export const tenant = loadTenantConfig({ role: "apex" });
@@ -17,4 +31,7 @@ export const { handlers, auth, signIn, signOut } = createAuth({
17
31
  authedRoutePrefixes: ["/home", "/studio"],
18
32
  authSecret,
19
33
  cognitoClientSecret: cognitoClientSecretRaw,
34
+ appAccess: {
35
+ requiredIdentityGroups: manifest.access.requiredIdentityGroups,
36
+ },
20
37
  });