create-windy 0.2.31 → 0.2.33

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.
Files changed (30) hide show
  1. package/dist/cli.js +5 -2
  2. package/package.json +1 -1
  3. package/template/.windy-template.json +2 -2
  4. package/template/AGENTS.md +7 -0
  5. package/template/apps/server/src/settings/drizzle-watermark-repository.integration.test.ts +4 -0
  6. package/template/apps/server/src/settings/drizzle-watermark-repository.ts +6 -0
  7. package/template/apps/server/src/settings/watermark-routes.test.ts +13 -3
  8. package/template/apps/server/src/settings/watermark-routes.ts +41 -3
  9. package/template/apps/web/src/app/auth/login-page.ts +4 -0
  10. package/template/apps/web/src/composables/useLoginFlow.webtest.ts +91 -0
  11. package/template/apps/web/src/composables/useWatermarkSettings.ts +7 -3
  12. package/template/apps/web/src/composables/useWatermarkSettings.webtest.ts +14 -0
  13. package/template/apps/web/src/composables/watermark-settings.ts +131 -9
  14. package/template/apps/web/src/composables/watermark-settings.webtest.ts +73 -7
  15. package/template/apps/web/src/layout/GlobalWatermark.layering.webtest.ts +3 -1
  16. package/template/apps/web/src/layout/GlobalWatermark.vue +24 -11
  17. package/template/apps/web/src/layout/GlobalWatermark.webtest.ts +25 -11
  18. package/template/apps/web/src/pages/auth/login-page-extension.ts +9 -0
  19. package/template/apps/web/src/pages/auth/login-page-extension.webtest.ts +10 -0
  20. package/template/apps/web/src/pages/settings/WatermarkSettingsSection.vue +102 -4
  21. package/template/apps/web/src/router/index.ts +2 -2
  22. package/template/apps/web/src/router/shared-scaffold-neutrality.webtest.ts +3 -2
  23. package/template/docs/development/custom-login-page.md +90 -0
  24. package/template/docs/platform/platform-shell-settings.md +14 -9
  25. package/template/docs/platform/web-system-crud.md +1 -1
  26. package/template/packages/database/drizzle/0034_funny_mesmero.sql +5 -0
  27. package/template/packages/database/drizzle/meta/0034_snapshot.json +7253 -0
  28. package/template/packages/database/drizzle/meta/_journal.json +7 -0
  29. package/template/packages/database/src/schema/platform-settings.ts +13 -0
  30. package/template/packages/shared/src/platform-settings.ts +17 -1
@@ -239,6 +239,13 @@
239
239
  "when": 1784925586891,
240
240
  "tag": "0033_rich_george_stacy",
241
241
  "breakpoints": true
242
+ },
243
+ {
244
+ "idx": 34,
245
+ "version": "7",
246
+ "when": 1784976420447,
247
+ "tag": "0034_funny_mesmero",
248
+ "breakpoints": true
242
249
  }
243
250
  ]
244
251
  }
@@ -19,11 +19,16 @@ import {
19
19
  // @windy-module system.settings begin
20
20
  import {
21
21
  boolean,
22
+ jsonb as settingsJsonb,
22
23
  pgTable as settingsTable,
23
24
  text,
24
25
  varchar as settingsVarchar,
25
26
  } from "drizzle-orm/pg-core";
26
27
  import { auditColumns } from "./common.js";
28
+ import type {
29
+ WatermarkContentField,
30
+ WatermarkDensity,
31
+ } from "@southwind-ai/shared";
27
32
  // @windy-module system.settings end
28
33
 
29
34
  // @windy-module system.settings begin
@@ -44,6 +49,14 @@ export const platformWatermarkPolicies = settingsTable(
44
49
  id: settingsVarchar("id", { length: 64 }).primaryKey(),
45
50
  enabled: boolean("enabled").notNull(),
46
51
  businessPagesEnabled: boolean("business_pages_enabled").notNull(),
52
+ density: settingsVarchar("density", { length: 16 })
53
+ .$type<WatermarkDensity>()
54
+ .default("medium")
55
+ .notNull(),
56
+ contentFields: settingsJsonb("content_fields")
57
+ .$type<WatermarkContentField[]>()
58
+ .default(["username", "displayName"])
59
+ .notNull(),
47
60
  customContent: settingsVarchar("custom_content", { length: 80 }).notNull(),
48
61
  ...auditColumns,
49
62
  },
@@ -4,15 +4,31 @@ export interface PlatformBrandingSettings {
4
4
  description?: string;
5
5
  }
6
6
 
7
+ export const WATERMARK_DENSITIES = ["low", "medium", "high"] as const;
8
+ export type WatermarkDensity = (typeof WATERMARK_DENSITIES)[number];
9
+
10
+ export const WATERMARK_CONTENT_FIELDS = [
11
+ "username",
12
+ "displayName",
13
+ "phone",
14
+ "email",
15
+ "custom",
16
+ ] as const;
17
+ export type WatermarkContentField = (typeof WATERMARK_CONTENT_FIELDS)[number];
18
+
7
19
  export interface PlatformWatermarkPolicy {
8
20
  enabled: boolean;
9
21
  businessPagesEnabled: boolean;
22
+ density: WatermarkDensity;
23
+ contentFields: WatermarkContentField[];
10
24
  customContent: string;
11
25
  }
12
26
 
13
27
  export const DEFAULT_PLATFORM_WATERMARK_POLICY: Readonly<PlatformWatermarkPolicy> =
14
28
  {
15
29
  enabled: true,
16
- businessPagesEnabled: false,
30
+ businessPagesEnabled: true,
31
+ density: "medium",
32
+ contentFields: ["username", "displayName"],
17
33
  customContent: "",
18
34
  };