@betterportal/config-manager 10.6.32 → 10.6.34

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 (26) hide show
  1. package/lib/.bsb/clients/service-betterportal-config-manager.d.ts +1 -1
  2. package/lib/.bsb/clients/service-betterportal-config-manager.js +1 -1
  3. package/lib/bp-contracts/org.betterportal.config-manager.json +69 -1
  4. package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.d.ts +32 -0
  5. package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.d.ts.map +1 -1
  6. package/lib/plugins/service-betterportal-config-manager/appQueries.d.ts +120 -0
  7. package/lib/plugins/service-betterportal-config-manager/appQueries.d.ts.map +1 -1
  8. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview-environments/_renderer.bootstrap5/GET.d.ts.map +1 -1
  9. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview-environments/_renderer.bootstrap5/GET.js +35 -5
  10. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview-environments/_renderer.bootstrap5/GET.js.map +1 -1
  11. package/lib/plugins/service-betterportal-config-manager/menuEditor.d.ts.map +1 -1
  12. package/lib/plugins/service-betterportal-config-manager/menuEditor.js +39 -21
  13. package/lib/plugins/service-betterportal-config-manager/menuEditor.js.map +1 -1
  14. package/lib/plugins/service-betterportal-config-manager/previewEnvironmentManagement.d.ts +10 -0
  15. package/lib/plugins/service-betterportal-config-manager/previewEnvironmentManagement.d.ts.map +1 -1
  16. package/lib/plugins/service-betterportal-config-manager/previewEnvironmentManagement.js +90 -1
  17. package/lib/plugins/service-betterportal-config-manager/previewEnvironmentManagement.js.map +1 -1
  18. package/lib/plugins/service-betterportal-config-manager/previewEnvironments.d.ts.map +1 -1
  19. package/lib/plugins/service-betterportal-config-manager/previewEnvironments.js +133 -23
  20. package/lib/plugins/service-betterportal-config-manager/previewEnvironments.js.map +1 -1
  21. package/lib/plugins/service-betterportal-config-manager/syncApi.d.ts.map +1 -1
  22. package/lib/plugins/service-betterportal-config-manager/syncApi.js +14 -0
  23. package/lib/plugins/service-betterportal-config-manager/syncApi.js.map +1 -1
  24. package/lib/schemas/service-betterportal-config-manager.json +1 -1
  25. package/lib/schemas/service-betterportal-config-manager.plugin.json +1 -1
  26. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated BSB virtual client for service-betterportal-config-manager
3
3
  * DO NOT EDIT - Regenerated on every build
4
- * @version 10.6.32
4
+ * @version 10.6.34
5
5
  */
6
6
  import { ServiceClient, BSBService } from "@bsb/base";
7
7
  import type { Observable, BSBServiceClientDefinition, EventInputType } from "@bsb/base";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated BSB virtual client for service-betterportal-config-manager
3
3
  * DO NOT EDIT - Regenerated on every build
4
- * @version 10.6.32
4
+ * @version 10.6.34
5
5
  */
6
6
  import { ServiceClient, importPortableSchema, createFireAndForgetEvent, createBroadcastEvent, createEventSchemas } from "@bsb/base";
7
7
  const _webhookDeliveryAvailableSchema = importPortableSchema(JSON.parse("{\"anyvaliVersion\":\"1.0\",\"schemaVersion\":\"1.1\",\"root\":{\"kind\":\"object\",\"properties\":{},\"required\":[],\"unknownKeys\":\"strip\"},\"definitions\":{},\"extensions\":{}}"));
@@ -4,7 +4,7 @@
4
4
  "pluginId": "org.betterportal.config-manager",
5
5
  "title": "BetterPortal Config Manager",
6
6
  "description": "Admin-facing BetterPortal service for discovering and managing service config surfaces.",
7
- "version": "10.6.32",
7
+ "version": "10.6.34",
8
8
  "category": "service",
9
9
  "deploymentModes": [
10
10
  "self-hosted"
@@ -1556,6 +1556,23 @@
1556
1556
  },
1557
1557
  "default": []
1558
1558
  },
1559
+ "schemaSource": {
1560
+ "kind": "optional",
1561
+ "inner": {
1562
+ "kind": "enum",
1563
+ "values": [
1564
+ "uploaded",
1565
+ "synced",
1566
+ "unavailable"
1567
+ ]
1568
+ }
1569
+ },
1570
+ "schemaWarning": {
1571
+ "kind": "optional",
1572
+ "inner": {
1573
+ "kind": "string"
1574
+ }
1575
+ },
1559
1576
  "source": {
1560
1577
  "kind": "optional",
1561
1578
  "inner": {
@@ -2404,6 +2421,23 @@
2404
2421
  },
2405
2422
  "default": []
2406
2423
  },
2424
+ "schemaSource": {
2425
+ "kind": "optional",
2426
+ "inner": {
2427
+ "kind": "enum",
2428
+ "values": [
2429
+ "uploaded",
2430
+ "synced",
2431
+ "unavailable"
2432
+ ]
2433
+ }
2434
+ },
2435
+ "schemaWarning": {
2436
+ "kind": "optional",
2437
+ "inner": {
2438
+ "kind": "string"
2439
+ }
2440
+ },
2407
2441
  "source": {
2408
2442
  "kind": "optional",
2409
2443
  "inner": {
@@ -3265,6 +3299,23 @@
3265
3299
  },
3266
3300
  "default": []
3267
3301
  },
3302
+ "schemaSource": {
3303
+ "kind": "optional",
3304
+ "inner": {
3305
+ "kind": "enum",
3306
+ "values": [
3307
+ "uploaded",
3308
+ "synced",
3309
+ "unavailable"
3310
+ ]
3311
+ }
3312
+ },
3313
+ "schemaWarning": {
3314
+ "kind": "optional",
3315
+ "inner": {
3316
+ "kind": "string"
3317
+ }
3318
+ },
3268
3319
  "source": {
3269
3320
  "kind": "optional",
3270
3321
  "inner": {
@@ -4113,6 +4164,23 @@
4113
4164
  },
4114
4165
  "default": []
4115
4166
  },
4167
+ "schemaSource": {
4168
+ "kind": "optional",
4169
+ "inner": {
4170
+ "kind": "enum",
4171
+ "values": [
4172
+ "uploaded",
4173
+ "synced",
4174
+ "unavailable"
4175
+ ]
4176
+ }
4177
+ },
4178
+ "schemaWarning": {
4179
+ "kind": "optional",
4180
+ "inner": {
4181
+ "kind": "string"
4182
+ }
4183
+ },
4116
4184
  "source": {
4117
4185
  "kind": "optional",
4118
4186
  "inner": {
@@ -792,6 +792,8 @@ export declare const registry: {
792
792
  label: import("anyvali").StringSchema;
793
793
  }>>;
794
794
  }>>;
795
+ schemaSource: import("anyvali").OptionalSchema<import("anyvali").EnumSchema<readonly ["uploaded", "synced", "unavailable"]>>;
796
+ schemaWarning: import("anyvali").OptionalSchema<import("anyvali").StringSchema>;
795
797
  source: import("anyvali").OptionalSchema<import("anyvali").ObjectSchema<{
796
798
  instanceId: import("anyvali").StringSchema;
797
799
  hostname: import("anyvali").StringSchema;
@@ -924,6 +926,8 @@ export declare const registry: {
924
926
  }[];
925
927
  encryptedTenantConfig: string;
926
928
  encryptedAppConfig: string;
929
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
930
+ schemaWarning?: string | undefined;
927
931
  source?: {
928
932
  instanceId: string;
929
933
  hostname: string;
@@ -1066,6 +1070,8 @@ export declare const registry: {
1066
1070
  }[];
1067
1071
  encryptedTenantConfig: string;
1068
1072
  encryptedAppConfig: string;
1073
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
1074
+ schemaWarning?: string | undefined;
1069
1075
  source?: {
1070
1076
  instanceId: string;
1071
1077
  hostname: string;
@@ -1216,6 +1222,8 @@ export declare const registry: {
1216
1222
  label: import("anyvali").StringSchema;
1217
1223
  }>>;
1218
1224
  }>>;
1225
+ schemaSource: import("anyvali").OptionalSchema<import("anyvali").EnumSchema<readonly ["uploaded", "synced", "unavailable"]>>;
1226
+ schemaWarning: import("anyvali").OptionalSchema<import("anyvali").StringSchema>;
1219
1227
  source: import("anyvali").OptionalSchema<import("anyvali").ObjectSchema<{
1220
1228
  instanceId: import("anyvali").StringSchema;
1221
1229
  hostname: import("anyvali").StringSchema;
@@ -1351,6 +1359,8 @@ export declare const registry: {
1351
1359
  }[];
1352
1360
  encryptedTenantConfig: string;
1353
1361
  encryptedAppConfig: string;
1362
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
1363
+ schemaWarning?: string | undefined;
1354
1364
  source?: {
1355
1365
  instanceId: string;
1356
1366
  hostname: string;
@@ -1493,6 +1503,8 @@ export declare const registry: {
1493
1503
  }[];
1494
1504
  encryptedTenantConfig: string;
1495
1505
  encryptedAppConfig: string;
1506
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
1507
+ schemaWarning?: string | undefined;
1496
1508
  source?: {
1497
1509
  instanceId: string;
1498
1510
  hostname: string;
@@ -1653,6 +1665,8 @@ export declare const registry: {
1653
1665
  label: import("anyvali").StringSchema;
1654
1666
  }>>;
1655
1667
  }>>;
1668
+ schemaSource: import("anyvali").OptionalSchema<import("anyvali").EnumSchema<readonly ["uploaded", "synced", "unavailable"]>>;
1669
+ schemaWarning: import("anyvali").OptionalSchema<import("anyvali").StringSchema>;
1656
1670
  source: import("anyvali").OptionalSchema<import("anyvali").ObjectSchema<{
1657
1671
  instanceId: import("anyvali").StringSchema;
1658
1672
  hostname: import("anyvali").StringSchema;
@@ -1785,6 +1799,8 @@ export declare const registry: {
1785
1799
  }[];
1786
1800
  encryptedTenantConfig: string;
1787
1801
  encryptedAppConfig: string;
1802
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
1803
+ schemaWarning?: string | undefined;
1788
1804
  source?: {
1789
1805
  instanceId: string;
1790
1806
  hostname: string;
@@ -1927,6 +1943,8 @@ export declare const registry: {
1927
1943
  }[];
1928
1944
  encryptedTenantConfig: string;
1929
1945
  encryptedAppConfig: string;
1946
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
1947
+ schemaWarning?: string | undefined;
1930
1948
  source?: {
1931
1949
  instanceId: string;
1932
1950
  hostname: string;
@@ -2077,6 +2095,8 @@ export declare const registry: {
2077
2095
  label: import("anyvali").StringSchema;
2078
2096
  }>>;
2079
2097
  }>>;
2098
+ schemaSource: import("anyvali").OptionalSchema<import("anyvali").EnumSchema<readonly ["uploaded", "synced", "unavailable"]>>;
2099
+ schemaWarning: import("anyvali").OptionalSchema<import("anyvali").StringSchema>;
2080
2100
  source: import("anyvali").OptionalSchema<import("anyvali").ObjectSchema<{
2081
2101
  instanceId: import("anyvali").StringSchema;
2082
2102
  hostname: import("anyvali").StringSchema;
@@ -2209,6 +2229,8 @@ export declare const registry: {
2209
2229
  }[];
2210
2230
  encryptedTenantConfig: string;
2211
2231
  encryptedAppConfig: string;
2232
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
2233
+ schemaWarning?: string | undefined;
2212
2234
  source?: {
2213
2235
  instanceId: string;
2214
2236
  hostname: string;
@@ -2351,6 +2373,8 @@ export declare const registry: {
2351
2373
  }[];
2352
2374
  encryptedTenantConfig: string;
2353
2375
  encryptedAppConfig: string;
2376
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
2377
+ schemaWarning?: string | undefined;
2354
2378
  source?: {
2355
2379
  instanceId: string;
2356
2380
  hostname: string;
@@ -2491,6 +2515,8 @@ export declare const registry: {
2491
2515
  }[];
2492
2516
  encryptedTenantConfig: string;
2493
2517
  encryptedAppConfig: string;
2518
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
2519
+ schemaWarning?: string | undefined;
2494
2520
  source?: {
2495
2521
  instanceId: string;
2496
2522
  hostname: string;
@@ -2628,6 +2654,8 @@ export declare const registry: {
2628
2654
  }[];
2629
2655
  encryptedTenantConfig: string;
2630
2656
  encryptedAppConfig: string;
2657
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
2658
+ schemaWarning?: string | undefined;
2631
2659
  source?: {
2632
2660
  instanceId: string;
2633
2661
  hostname: string;
@@ -2765,6 +2793,8 @@ export declare const registry: {
2765
2793
  }[];
2766
2794
  encryptedTenantConfig: string;
2767
2795
  encryptedAppConfig: string;
2796
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
2797
+ schemaWarning?: string | undefined;
2768
2798
  source?: {
2769
2799
  instanceId: string;
2770
2800
  hostname: string;
@@ -2902,6 +2932,8 @@ export declare const registry: {
2902
2932
  }[];
2903
2933
  encryptedTenantConfig: string;
2904
2934
  encryptedAppConfig: string;
2935
+ schemaSource?: "uploaded" | "synced" | "unavailable" | undefined;
2936
+ schemaWarning?: string | undefined;
2905
2937
  source?: {
2906
2938
  instanceId: string;
2907
2939
  hostname: string;
@@ -1 +1 @@
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoOW,CAAC"}
@@ -559,6 +559,46 @@ export declare function readRequestConfig(db: AppDatabase, headers: HeaderMap, o
559
559
  app: import("@betterportal/framework").JsonObject;
560
560
  };
561
561
  title?: string | undefined;
562
+ configSchemas?: {
563
+ id: string;
564
+ title: string;
565
+ description: string;
566
+ scope: "tenant" | "app";
567
+ jsonSchema: import("@betterportal/framework").JsonObject;
568
+ fields: {
569
+ key: string;
570
+ title: string;
571
+ description: string;
572
+ scope: "tenant" | "app";
573
+ visibility: "public" | "protected" | "secret";
574
+ ownership: "bp" | "plugin" | "mixed";
575
+ sourceOfTruth: "external" | "bp" | "plugin";
576
+ required: boolean;
577
+ groupId?: string | undefined;
578
+ order?: number | undefined;
579
+ defaultValue?: import("@betterportal/framework").JsonValue | undefined;
580
+ ui?: {
581
+ control?: "number" | "email" | "text" | "select" | "url" | "date" | "textarea" | "password" | "checkbox" | "multiselect" | "color" | "time" | "datetime-local" | undefined;
582
+ placeholder?: string | undefined;
583
+ options?: {
584
+ value: string;
585
+ label: string;
586
+ }[] | undefined;
587
+ optionsSource?: "app.routes" | undefined;
588
+ min?: string | number | undefined;
589
+ max?: string | number | undefined;
590
+ step?: number | undefined;
591
+ rows?: number | undefined;
592
+ } | undefined;
593
+ }[];
594
+ groups?: {
595
+ id: string;
596
+ title: string;
597
+ description?: string | undefined;
598
+ order?: number | undefined;
599
+ optional?: boolean | undefined;
600
+ }[] | undefined;
601
+ }[] | undefined;
562
602
  }[];
563
603
  createdAt: string;
564
604
  updatedAt: string;
@@ -594,6 +634,46 @@ export declare function readRequestConfig(db: AppDatabase, headers: HeaderMap, o
594
634
  app: import("@betterportal/framework").JsonObject;
595
635
  };
596
636
  title?: string | undefined;
637
+ configSchemas?: {
638
+ id: string;
639
+ title: string;
640
+ description: string;
641
+ scope: "tenant" | "app";
642
+ jsonSchema: import("@betterportal/framework").JsonObject;
643
+ fields: {
644
+ key: string;
645
+ title: string;
646
+ description: string;
647
+ scope: "tenant" | "app";
648
+ visibility: "public" | "protected" | "secret";
649
+ ownership: "bp" | "plugin" | "mixed";
650
+ sourceOfTruth: "external" | "bp" | "plugin";
651
+ required: boolean;
652
+ groupId?: string | undefined;
653
+ order?: number | undefined;
654
+ defaultValue?: import("@betterportal/framework").JsonValue | undefined;
655
+ ui?: {
656
+ control?: "number" | "email" | "text" | "select" | "url" | "date" | "textarea" | "password" | "checkbox" | "multiselect" | "color" | "time" | "datetime-local" | undefined;
657
+ placeholder?: string | undefined;
658
+ options?: {
659
+ value: string;
660
+ label: string;
661
+ }[] | undefined;
662
+ optionsSource?: "app.routes" | undefined;
663
+ min?: string | number | undefined;
664
+ max?: string | number | undefined;
665
+ step?: number | undefined;
666
+ rows?: number | undefined;
667
+ } | undefined;
668
+ }[];
669
+ groups?: {
670
+ id: string;
671
+ title: string;
672
+ description?: string | undefined;
673
+ order?: number | undefined;
674
+ optional?: boolean | undefined;
675
+ }[] | undefined;
676
+ }[] | undefined;
597
677
  }[];
598
678
  elevatedRoleIds: string[];
599
679
  } | undefined;
@@ -953,6 +1033,46 @@ export declare function readAppPage(db: AppDatabase, appId?: string, chooseFirst
953
1033
  app: import("@betterportal/framework").JsonObject;
954
1034
  };
955
1035
  title?: string | undefined;
1036
+ configSchemas?: {
1037
+ id: string;
1038
+ title: string;
1039
+ description: string;
1040
+ scope: "tenant" | "app";
1041
+ jsonSchema: import("@betterportal/framework").JsonObject;
1042
+ fields: {
1043
+ key: string;
1044
+ title: string;
1045
+ description: string;
1046
+ scope: "tenant" | "app";
1047
+ visibility: "public" | "protected" | "secret";
1048
+ ownership: "bp" | "plugin" | "mixed";
1049
+ sourceOfTruth: "external" | "bp" | "plugin";
1050
+ required: boolean;
1051
+ groupId?: string | undefined;
1052
+ order?: number | undefined;
1053
+ defaultValue?: import("@betterportal/framework").JsonValue | undefined;
1054
+ ui?: {
1055
+ control?: "number" | "email" | "text" | "select" | "url" | "date" | "textarea" | "password" | "checkbox" | "multiselect" | "color" | "time" | "datetime-local" | undefined;
1056
+ placeholder?: string | undefined;
1057
+ options?: {
1058
+ value: string;
1059
+ label: string;
1060
+ }[] | undefined;
1061
+ optionsSource?: "app.routes" | undefined;
1062
+ min?: string | number | undefined;
1063
+ max?: string | number | undefined;
1064
+ step?: number | undefined;
1065
+ rows?: number | undefined;
1066
+ } | undefined;
1067
+ }[];
1068
+ groups?: {
1069
+ id: string;
1070
+ title: string;
1071
+ description?: string | undefined;
1072
+ order?: number | undefined;
1073
+ optional?: boolean | undefined;
1074
+ }[] | undefined;
1075
+ }[] | undefined;
956
1076
  }[];
957
1077
  elevatedRoleIds: string[];
958
1078
  } | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"appQueries.d.ts","sourceRoot":"","sources":["../../../src/plugins/service-betterportal-config-manager/appQueries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAA4G,KAAK,SAAS,EAAE,KAAK,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAC5N,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;AACtD,yFAAyF;AACzF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,0BAA0B,GAAG,+BAA+B,CAAC,CAAC;AAEtL,wBAAsB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA0B9G;AAED,wFAAwF;AACxF,wBAAsB,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,SAAS,EAC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AED,wBAAsB,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CASpF;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,0BAA0B,GAAG,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACjL,2FAA2F;AAC3F,wBAAsB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAyB3E;AAED,uFAAuF;AACvF,wBAAsB,cAAc,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAM5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-config-manager/bp-routes/preview-environments/_renderer.bootstrap5/GET.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAmC7E,wBAAgB,kBAAkB,IAAI,cAAc,CAqPnD;AAiED,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,cAAc,CAyDnH;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAmLzD"}
1
+ {"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-config-manager/bp-routes/preview-environments/_renderer.bootstrap5/GET.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAmC7E,wBAAgB,kBAAkB,IAAI,cAAc,CAmRnD;AAiED,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,cAAc,CAsFnH;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAuLzD"}
@@ -35,6 +35,36 @@ function pageScript() {
35
35
  }
36
36
  export function configEditorScript() {
37
37
  return js(`(() => {
38
+ document.querySelectorAll("[data-bp-schema-form]:not([data-bp-ready])").forEach((form) => {
39
+ form.dataset.bpReady = "true";
40
+ const fileInput = form.querySelector("[data-bp-schema-file]");
41
+ const text = form.querySelector("[name=schemas]");
42
+ const status = form.querySelector("[data-bp-schema-status]");
43
+ const submit = form.querySelector("[type=submit]");
44
+ text.addEventListener("input", () => {
45
+ fileInput.value = "";
46
+ fileInput.setCustomValidity("");
47
+ status.textContent = "";
48
+ });
49
+ fileInput.addEventListener("change", async () => {
50
+ const file = fileInput.files[0];
51
+ if (!file) return;
52
+ submit.disabled = true;
53
+ try {
54
+ if (file.size > 1024 * 1024) throw new Error("BP schema upload exceeds 1 MiB");
55
+ const contents = await file.text();
56
+ JSON.parse(contents);
57
+ text.value = contents;
58
+ fileInput.setCustomValidity("");
59
+ status.textContent = file.name;
60
+ } catch (error) {
61
+ fileInput.setCustomValidity(error.message || String(error));
62
+ status.textContent = error.message || String(error);
63
+ } finally {
64
+ submit.disabled = false;
65
+ }
66
+ });
67
+ });
38
68
  const decode64 = (value) => {
39
69
  const base64 = value.replace(/-/g, "+").replace(/_/g, "/") + "===".slice((value.length + 3) % 4);
40
70
  return Uint8Array.from(atob(base64), (char) => char.charCodeAt(0));
@@ -315,12 +345,12 @@ export function configEditor(group, path, ticketUrl) {
315
345
  }
316
346
  return _jsx("input", { class: "form-control", type: field.secret ? "password" : field.control === "email" || field.control === "url" || field.control === "number" ? field.control : "text", maxlength: "255", value: field.secret ? "" : value, autocomplete: field.secret ? "new-password" : "off", "data-bp-config-field": "", "data-service-id": service.serviceId, "data-scope": field.scope, "data-key": field.key, "data-title": field.title, "data-secret": field.secret ? "true" : "false", "data-default-value": field.defaultValue === undefined ? undefined : JSON.stringify(field.defaultValue), disabled: field.secret, required: field.required && !field.secret });
317
347
  };
318
- return (_jsxs("details", { class: "border rounded p-3 mt-3", children: [_jsx("summary", { class: "fw-semibold", children: "Encrypted service configuration" }), !hasFields ? _jsx("div", { class: "alert alert-secondary mt-3 mb-0", children: "No synced service config schemas are available for this group." }) : (_jsxs("form", { class: "mt-3", "data-bp-preview-config-form": "", "data-group-id": group.id, "data-path": path, "data-ticket-url": ticketUrl, "data-source-tenant-id": group.sourceTenantId, "data-source-app-id": group.sourceAppId, children: [_jsxs("div", { class: "alert alert-warning small", children: ["Use preview-only values. The key and decrypted secrets stay in this browser; BetterPortal stores only ", _jsx("code", { children: "encrypted:" }), " envelopes."] }), _jsx("label", { class: "form-label", for: `bp-preview-key-${group.id}`, children: "Preview config key" }), _jsxs("div", { class: "input-group mb-2", children: [_jsx("input", { id: `bp-preview-key-${group.id}`, class: "form-control font-monospace", type: "password", autocomplete: "off", "data-bp-preview-key": "" }), _jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-generate-key": "", children: "Generate" }), _jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-copy-target": `bp-preview-key-${group.id}`, children: "Copy" })] }), _jsxs("div", { class: "form-text mb-3", children: ["Template changes apply to newly created previews. Existing previews keep their own settings. Set this exact value as ", _jsx("code", { children: "BP_PREVIEW_CONFIG_KEY" }), " on every configured preview service. Keep it outside BetterPortal."] }), _jsx("button", { class: "btn btn-sm btn-outline-secondary mb-3", type: "button", "data-bp-decrypt-config": "", children: "Decrypt stored secrets" }), group.services.map((service) => (_jsxs("fieldset", { class: "border rounded p-3 mb-3", children: [_jsx("legend", { class: "float-none w-auto px-2 fs-6", children: service.title }), _jsx("span", { hidden: true, "data-bp-existing-config": "", "data-service-id": service.serviceId, "data-tenant": service.encryptedTenantConfig, "data-app": service.encryptedAppConfig, "data-source-instance-id": service.source?.instanceId, "data-source-hostname": service.source?.hostname }), service.fields.length === 0 ? _jsx("div", { class: "alert alert-warning mb-0", children: "This service has not synced a config schema yet. Its existing preview config will be preserved." }) : null, ["tenant", "app"].map((scope) => {
319
- const fields = service.fields.filter((field) => field.scope === scope);
320
- return fields.length === 0 ? null : _jsxs("div", { class: "mb-3", children: [_jsxs("div", { class: "text-uppercase text-secondary small fw-semibold mb-2", children: [scope, " config"] }), _jsx("div", { class: "row g-3", children: fields.map((field) => _jsxs("div", { class: "col-12 col-lg-6", children: [_jsxs("label", { class: "form-label", children: [field.title, field.required ? " *" : ""] }), fieldControl(service, field), _jsxs("div", { class: "form-text", children: [field.description, field.secret ? " Unlock with a generated key or decrypt the stored values first." : ""] }), field.secret && !field.required ? _jsxs("div", { class: "form-check mt-1", children: [_jsx("input", { class: "form-check-input", type: "checkbox", disabled: true, "data-bp-clear-secret": "", "data-service-id": service.serviceId, "data-scope": field.scope, "data-key": field.key, id: `bp-clear-${group.id}-${service.serviceId}-${field.scope}-${field.key}` }), _jsx("label", { class: "form-check-label small", for: `bp-clear-${group.id}-${service.serviceId}-${field.scope}-${field.key}`, children: "Clear stored value" })] }) : null] })) })] });
321
- })] }))), _jsx("div", { class: "alert alert-secondary py-2", "data-bp-preview-config-status": "", role: "status", children: "Key is never submitted." }), _jsxs("div", { class: "d-flex flex-wrap gap-2", children: [_jsx("button", { class: "btn btn-primary", type: "submit", children: "Encrypt and save config" }), _jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-sync-prod": "", children: "Sync from prod" })] }), _jsxs("dialog", { class: "border-0 rounded shadow p-0", style: "width:min(92vw,72rem);max-height:90vh", "data-bp-sync-dialog": "", children: [_jsxs("div", { class: "p-3 border-bottom d-flex justify-content-between align-items-center", children: [_jsx("h3", { class: "h5 mb-0", children: "Production config diff" }), _jsx("button", { class: "btn-close", type: "button", "aria-label": "Close", "data-bp-sync-close": "" })] }), _jsx("div", { class: "p-3 overflow-auto", style: "max-height:70vh", "data-bp-sync-body": "" }), _jsxs("div", { class: "p-3 border-top d-flex justify-content-end gap-2", children: [_jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-sync-close": "", children: "Cancel" }), _jsx("button", { class: "btn btn-primary", type: "button", "data-bp-sync-apply": "", children: "Apply selected and save" })] })] })] }))] }));
348
+ return (_jsxs("div", { children: [_jsxs("section", { class: "mt-3", "aria-labelledby": `bp-plugin-definitions-${group.id}`, children: [_jsx("h4", { class: "h6", id: `bp-plugin-definitions-${group.id}`, children: "BP plugins" }), _jsxs("form", { class: "d-flex flex-wrap gap-2 mb-3", "hx-post": path, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "save-service" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsx("label", { class: "visually-hidden", for: `bp-plugin-id-${group.id}`, children: "BP plugin ID" }), _jsx("input", { id: `bp-plugin-id-${group.id}`, class: "form-control font-monospace", style: "flex:1 1 16rem;min-width:0", name: "serviceId", placeholder: "org.example.service", required: true }), _jsx("button", { class: "btn btn-outline-primary", type: "submit", children: "Add BP plugin" })] }), group.services.map((service) => (_jsxs("details", { class: "border-bottom py-2", children: [_jsxs("summary", { children: [_jsx("code", { class: "text-break", children: service.serviceId }), " ", _jsx("span", { class: "small text-secondary", children: service.schemaSource === "uploaded" ? "Uploaded schema" : service.schemaSource === "synced" ? "Synced schema" : "No schema" })] }), service.schemaWarning ? _jsx("div", { class: "alert alert-warning mt-2", role: "status", children: service.schemaWarning }) : null, _jsxs("form", { class: "mt-2", "data-bp-schema-form": "", "hx-post": path, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "save-service" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsx("input", { type: "hidden", name: "serviceId", value: service.serviceId }), _jsx("label", { class: "form-label", for: `bp-schema-file-${group.id}-${service.serviceId}`, children: "BP config schema file" }), _jsx("input", { id: `bp-schema-file-${group.id}-${service.serviceId}`, class: "form-control mb-2", type: "file", accept: ".json,application/json", "data-bp-schema-file": "" }), _jsx("label", { class: "form-label", for: `bp-schema-json-${group.id}-${service.serviceId}`, children: "BP configSchemas JSON" }), _jsx("textarea", { id: `bp-schema-json-${group.id}-${service.serviceId}`, class: "form-control font-monospace mb-2", name: "schemas", rows: 4, maxlength: 1048576, required: true }), _jsx("div", { class: "small text-secondary mb-2", "data-bp-schema-status": "", role: "status" }), _jsx("button", { class: "btn btn-sm btn-outline-primary", type: "submit", children: "Save schema" })] })] })))] }), _jsxs("details", { class: "border rounded p-3 mt-3", children: [_jsx("summary", { class: "fw-semibold", children: "Encrypted service configuration" }), !hasFields ? _jsx("div", { class: "alert alert-secondary mt-3 mb-0", children: "No BP config fields are available." }) : (_jsxs("form", { class: "mt-3", "data-bp-preview-config-form": "", "data-group-id": group.id, "data-path": path, "data-ticket-url": ticketUrl, "data-source-tenant-id": group.sourceTenantId, "data-source-app-id": group.sourceAppId, children: [_jsxs("div", { class: "alert alert-warning small", children: ["Use preview-only values. The key and decrypted secrets stay in this browser; BetterPortal stores only ", _jsx("code", { children: "encrypted:" }), " envelopes."] }), _jsx("label", { class: "form-label", for: `bp-preview-key-${group.id}`, children: "Preview config key" }), _jsxs("div", { class: "input-group mb-2", children: [_jsx("input", { id: `bp-preview-key-${group.id}`, class: "form-control font-monospace", type: "password", autocomplete: "off", "data-bp-preview-key": "" }), _jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-generate-key": "", children: "Generate" }), _jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-copy-target": `bp-preview-key-${group.id}`, children: "Copy" })] }), _jsxs("div", { class: "form-text mb-3", children: ["Template changes apply to newly created previews. Existing previews keep their own settings. Set this exact value as ", _jsx("code", { children: "BP_PREVIEW_CONFIG_KEY" }), " on every configured preview service. Keep it outside BetterPortal."] }), _jsx("button", { class: "btn btn-sm btn-outline-secondary mb-3", type: "button", "data-bp-decrypt-config": "", children: "Decrypt stored secrets" }), group.services.map((service) => (_jsxs("fieldset", { class: "border rounded p-3 mb-3", children: [_jsx("legend", { class: "float-none w-auto px-2 fs-6", children: service.title }), _jsx("span", { hidden: true, "data-bp-existing-config": "", "data-service-id": service.serviceId, "data-tenant": service.encryptedTenantConfig, "data-app": service.encryptedAppConfig, "data-source-instance-id": service.source?.instanceId, "data-source-hostname": service.source?.hostname }), service.fields.length === 0 ? _jsx("div", { class: "alert alert-warning mb-0", children: "This service has not synced a config schema yet. Its existing preview config will be preserved." }) : null, ["tenant", "app"].map((scope) => {
349
+ const fields = service.fields.filter((field) => field.scope === scope);
350
+ return fields.length === 0 ? null : _jsxs("div", { class: "mb-3", children: [_jsxs("div", { class: "text-uppercase text-secondary small fw-semibold mb-2", children: [scope, " config"] }), _jsx("div", { class: "row g-3", children: fields.map((field) => _jsxs("div", { class: "col-12 col-lg-6", children: [_jsxs("label", { class: "form-label", children: [field.title, field.required ? " *" : ""] }), fieldControl(service, field), _jsxs("div", { class: "form-text", children: [field.description, field.secret ? " Unlock with a generated key or decrypt the stored values first." : ""] }), field.secret && !field.required ? _jsxs("div", { class: "form-check mt-1", children: [_jsx("input", { class: "form-check-input", type: "checkbox", disabled: true, "data-bp-clear-secret": "", "data-service-id": service.serviceId, "data-scope": field.scope, "data-key": field.key, id: `bp-clear-${group.id}-${service.serviceId}-${field.scope}-${field.key}` }), _jsx("label", { class: "form-check-label small", for: `bp-clear-${group.id}-${service.serviceId}-${field.scope}-${field.key}`, children: "Clear stored value" })] }) : null] })) })] });
351
+ })] }))), _jsx("div", { class: "alert alert-secondary py-2", "data-bp-preview-config-status": "", role: "status", children: "Key is never submitted." }), _jsxs("div", { class: "d-flex flex-wrap gap-2", children: [_jsx("button", { class: "btn btn-primary", type: "submit", children: "Encrypt and save config" }), _jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-sync-prod": "", children: "Sync from prod" })] }), _jsxs("dialog", { class: "border-0 rounded shadow p-0", style: "width:min(92vw,72rem);max-height:90vh", "data-bp-sync-dialog": "", children: [_jsxs("div", { class: "p-3 border-bottom d-flex justify-content-between align-items-center", children: [_jsx("h3", { class: "h5 mb-0", children: "Production config diff" }), _jsx("button", { class: "btn-close", type: "button", "aria-label": "Close", "data-bp-sync-close": "" })] }), _jsx("div", { class: "p-3 overflow-auto", style: "max-height:70vh", "data-bp-sync-body": "" }), _jsxs("div", { class: "p-3 border-top d-flex justify-content-end gap-2", children: [_jsx("button", { class: "btn btn-outline-secondary", type: "button", "data-bp-sync-close": "", children: "Cancel" }), _jsx("button", { class: "btn btn-primary", type: "button", "data-bp-sync-apply": "", children: "Apply selected and save" })] })] })] }))] })] }));
322
352
  }
323
353
  export function render(data) {
324
- return (_jsxs("div", { class: "container-fluid px-0", children: [_jsxs("div", { class: "d-flex flex-wrap justify-content-between align-items-start gap-3 mb-4", children: [_jsxs("div", { children: [_jsx("h2", { class: "mb-1", children: data.title }), _jsx("p", { class: "text-secondary mb-0", children: "Clone an existing tenant/app configuration while CI owns where each service runs." })] }), _jsx("button", { class: "btn btn-primary", "data-bs-toggle": "offcanvas", "data-bs-target": "#bp-create-preview-group", children: "Create group" })] }), data.notice ? _jsx("div", { class: "alert alert-success", role: "status", children: data.notice }) : null, data.error ? _jsx("div", { class: "alert alert-danger", role: "alert", children: data.error }) : null, credentials(data), _jsxs("div", { class: "alert alert-info d-flex gap-2 align-items-start", children: [_jsx("span", { "aria-hidden": "true", children: "i" }), _jsxs("div", { children: [_jsx("strong", { children: "Pull setup only." }), " Services receive credentials from CI, publish their manifest on first sync, and rebuild preview routes/menu automatically."] })] }), data.groups.length === 0 ? (_jsx("div", { class: "card border-0 shadow-sm", children: _jsx("div", { class: "card-body py-5 text-center text-secondary", children: "No preview groups configured." }) })) : data.groups.map((group) => (_jsx("section", { class: "card border-0 shadow-sm mb-4", "aria-labelledby": `bp-group-${group.id}`, children: _jsxs("div", { class: "card-body", children: [_jsxs("div", { class: "d-flex flex-wrap justify-content-between align-items-start gap-3 mb-3", children: [_jsxs("div", { children: [_jsx("h3", { class: "h5 mb-1", id: `bp-group-${group.id}`, children: group.name }), _jsx("div", { class: "small text-secondary", children: group.sourceLabel }), _jsx("code", { class: "small", children: group.id })] }), _jsxs("div", { class: "d-flex flex-wrap gap-2", children: [_jsx("button", { class: "btn btn-sm btn-outline-primary", "data-bs-toggle": "collapse", "data-bs-target": `#bp-new-${group.id}`, children: "New preview" }), _jsx("button", { class: "btn btn-sm btn-outline-secondary", "data-bs-toggle": "collapse", "data-bs-target": `#bp-settings-${group.id}`, "hx-get": `${data.previewPath}?_c=config&groupId=${encodeURIComponent(group.id)}`, "hx-trigger": `click[!document.getElementById('bp-config-${group.id}').querySelector('form')]`, "hx-target": `#bp-config-${group.id}`, "hx-swap": "innerHTML", children: "Settings" }), _jsx("button", { class: "btn btn-sm btn-outline-danger", "hx-delete": `${data.previewPath}?entity=group&id=${encodeURIComponent(group.id)}`, "hx-confirm": `Delete ${group.name} and all of its previews?`, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: "Delete" })] })] }), _jsxs("div", { class: "row g-3 mb-3", children: [_jsxs("div", { class: "col-12 col-xl-7", children: [_jsx("div", { class: "small text-secondary mb-1", children: "CI endpoint" }), _jsxs("code", { class: "d-block text-break", children: ["POST ", data.deploymentApiBase, "/", group.id, "/deployments/<key>"] })] }), _jsxs("div", { class: "col-12 col-xl-5", children: [_jsx("div", { class: "small text-secondary mb-1", children: "Discovered services" }), _jsx("div", { class: "d-flex flex-wrap gap-1", children: group.services.length ? group.services.map((service) => _jsx("span", { class: "badge text-bg-secondary", children: service.serviceId })) : _jsx("span", { class: "small text-secondary", children: "Added by the first preview create request." }) })] })] }), _jsx("div", { class: "collapse mb-4", id: `bp-new-${group.id}`, children: _jsxs("div", { class: "border rounded p-3 bg-body-tertiary", children: [_jsx("h4", { class: "h6", children: "Create preview manually" }), _jsxs("form", { "hx-post": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "create-deployment" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsxs("div", { class: "row g-3", children: [_jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Key" }), _jsx("input", { class: "form-control font-monospace", name: "key", maxlength: "255", pattern: "[A-Za-z0-9][A-Za-z0-9._:-]*", required: true })] }), _jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Name" }), _jsx("input", { class: "form-control", name: "name" })] }), _jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Expiry" }), expiryInput(undefined, true)] }), _jsxs("div", { class: "col-12", children: [_jsx("label", { class: "form-label", children: "App hostname or origin" }), _jsx("input", { class: "form-control font-monospace", name: "hostname", placeholder: "pr-123.preview.example.com", required: true })] }), _jsxs("div", { class: "col-12", children: [_jsx("label", { class: "form-label", for: `bp-preview-services-${group.id}`, children: "Services" }), _jsx("textarea", { id: `bp-preview-services-${group.id}`, class: "form-control font-monospace", name: "services", rows: Math.max(4, group.services.length + 2), required: true, children: JSON.stringify(Object.fromEntries(group.services.map((service) => [service.serviceId, ""])), null, 2) }), _jsx("div", { class: "form-text", children: "JSON object mapping service IDs to public HTTPS URLs." })] })] }), _jsx("button", { class: "btn btn-primary mt-3", type: "submit", children: "Create preview" })] })] }) }), _jsx("div", { class: "collapse mb-4", id: `bp-settings-${group.id}`, children: _jsxs("div", { class: "border rounded p-3", children: [_jsxs("form", { "hx-put": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "update-group" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsxs("div", { class: "row g-3 mb-3", children: [_jsxs("div", { class: "col-12 col-md-8", children: [_jsx("label", { class: "form-label", children: "Group name" }), _jsx("input", { class: "form-control", name: "name", value: group.name, required: true })] }), _jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Maximum/default expiry" }), expiryInput(group.expiresInDays)] })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: `bp-elevated-roles-${group.id}`, children: "Preview admin role IDs" }), _jsx("textarea", { id: `bp-elevated-roles-${group.id}`, class: "form-control", name: "elevatedRoleIds", rows: "3", maxlength: "12900", "aria-describedby": `bp-elevated-roles-help-${group.id}`, children: (group.elevatedRoleIds ?? []).join("\n") }), _jsx("div", { class: "form-text", id: `bp-elevated-roles-help-${group.id}`, children: "Defaults for newly created previews; existing previews keep their own role settings. One exact role ID per line (or comma-separated), e.g. admin, staff, client. Users with any listed role get full access within this group's previews only. Empty keeps normal permissions. Changes apply to existing previews on config sync." })] }), oidcFields(`bp-group-${group.id}`, group.oidc), _jsx("button", { class: "btn btn-primary", type: "submit", children: "Save settings" })] }), _jsx("hr", {}), _jsxs("form", { "hx-post": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "rotate-key" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsx("button", { class: "btn btn-outline-warning", type: "submit", "hx-confirm": "Rotate this group API key? Existing CI credentials will stop working.", children: "Rotate API key" })] }), _jsx("div", { id: `bp-config-${group.id}`, children: _jsx("div", { class: "text-secondary small mt-3", role: "status", children: "Open settings to load service configuration." }) })] }) }), group.deployments.length === 0 ? _jsx("div", { class: "text-secondary small", children: "No active previews." }) : (_jsx("div", { class: "table-responsive", children: _jsxs("table", { class: "table table-sm align-middle mb-0", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Preview" }), _jsx("th", { children: "App" }), _jsx("th", { children: "Services" }), _jsx("th", { children: "Expiry" }), _jsx("th", {})] }) }), _jsx("tbody", { children: group.deployments.map((deployment) => (_jsxs("tr", { children: [_jsxs("td", { children: [_jsx("div", { class: "fw-semibold", children: deployment.name }), _jsx("code", { class: "small", children: deployment.key }), _jsx("div", { children: _jsx("span", { class: `badge ${deployment.ready ? "text-bg-success" : "text-bg-warning"}`, children: deployment.ready ? "Configured" : "Needs attention" }) })] }), _jsx("td", { children: _jsx("a", { href: deployment.hostname.startsWith("http") ? deployment.hostname : `https://${deployment.hostname}`, target: "_blank", rel: "noreferrer", children: deployment.hostname }) }), _jsx("td", { children: deployment.services.map((service) => _jsxs("div", { class: "small", children: [_jsx("span", { class: `badge ${service.ready ? "text-bg-success" : "text-bg-warning"}`, children: service.status.state }), " ", _jsx("span", { class: "font-monospace", children: service.serviceId })] })) }), _jsxs("td", { children: [_jsxs("form", { class: "d-flex gap-2", "hx-put": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "update-expiry" }), _jsx("input", { type: "hidden", name: "deploymentId", value: deployment.id }), expiryInput(deployment.expiresInDays, false, `Expiry for ${deployment.name}`), _jsx("button", { class: "btn btn-sm btn-outline-secondary", type: "submit", children: "Save" })] }), _jsx("div", { class: "small text-secondary mt-1", children: deployment.expiresAt ? new Date(deployment.expiresAt).toLocaleString() : "Never expires" })] }), _jsxs("td", { children: [_jsx("button", { type: "button", class: "btn btn-sm btn-outline-secondary me-2", "data-bs-toggle": "offcanvas", "data-bs-target": "#bp-preview-debug", "hx-get": `${data.previewPath}?_c=debug&deploymentId=${encodeURIComponent(deployment.id)}`, "hx-target": "#bp-preview-debug-body", "hx-swap": "innerHTML", children: "Debug" }), _jsx("button", { class: "btn btn-sm btn-outline-danger", "hx-delete": `${data.previewPath}?entity=deployment&id=${encodeURIComponent(deployment.id)}`, "hx-confirm": `Delete preview ${deployment.name}?`, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: "Delete" })] })] }))) })] }) }))] }) }))), _jsxs("aside", { class: "offcanvas offcanvas-end", tabindex: -1, id: "bp-preview-debug", "aria-labelledby": "bp-preview-debug-title", style: "width:min(95vw,52rem)", children: [_jsxs("div", { class: "offcanvas-header", children: [_jsx("h3", { class: "offcanvas-title h5", id: "bp-preview-debug-title", children: "Preview diagnostics" }), _jsx("button", { type: "button", class: "btn-close", "data-bs-dismiss": "offcanvas", "aria-label": "Close" })] }), _jsx("div", { class: "offcanvas-body", id: "bp-preview-debug-body", "aria-live": "polite", children: "Select a deployment to load diagnostics." })] }), _jsxs("aside", { class: "offcanvas offcanvas-end", tabindex: -1, id: "bp-create-preview-group", "aria-labelledby": "bp-create-preview-group-title", children: [_jsxs("div", { class: "offcanvas-header", children: [_jsx("h3", { class: "offcanvas-title h5", id: "bp-create-preview-group-title", children: "Create preview group" }), _jsx("button", { type: "button", class: "btn-close", "data-bs-dismiss": "offcanvas", "aria-label": "Close" })] }), _jsx("div", { class: "offcanvas-body", children: _jsxs("form", { "hx-post": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "create-group" }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-preview-group-name", children: "Name" }), _jsx("input", { id: "bp-preview-group-name", class: "form-control", name: "name", maxlength: "120", required: true })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-preview-source-tenant", children: "Source tenant" }), _jsxs("select", { id: "bp-preview-source-tenant", class: "form-select", name: "sourceTenantId", required: true, children: [_jsx("option", { value: "", children: "Select tenant" }), data.sourceTenants.map((tenant) => _jsx("option", { value: tenant.id, children: tenant.title }))] })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-preview-source-app", children: "Source app" }), _jsxs("select", { id: "bp-preview-source-app", class: "form-select", name: "sourceAppId", required: true, children: [_jsx("option", { value: "", children: "Select app" }), data.sourceApps.map((app) => _jsx("option", { value: app.id, "data-tenant-id": app.tenantId, children: app.title }))] })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", children: "Maximum/default expiry" }), expiryInput(30)] }), oidcFields("bp-new-group"), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-new-elevated-roles", children: "Preview admin role IDs" }), _jsx("textarea", { id: "bp-new-elevated-roles", class: "form-control", name: "elevatedRoleIds", rows: "3", maxlength: "12900", placeholder: "admin, staff, client", "aria-describedby": "bp-new-elevated-roles-help" }), _jsx("div", { class: "form-text", id: "bp-new-elevated-roles-help", children: "One exact role ID per line or comma-separated. Grants full access only inside this group's previews; it does not assign roles to users or grant platform-admin access. Empty keeps normal permissions." })] }), _jsx("button", { class: "btn btn-primary w-100", type: "submit", children: "Create group" })] }) })] }), _jsx("script", { children: pageScript() })] }));
354
+ return (_jsxs("div", { class: "container-fluid px-0", children: [_jsxs("div", { class: "d-flex flex-wrap justify-content-between align-items-start gap-3 mb-4", children: [_jsxs("div", { children: [_jsx("h2", { class: "mb-1", children: data.title }), _jsx("p", { class: "text-secondary mb-0", children: "Clone an existing tenant/app configuration while CI owns where each service runs." })] }), _jsx("button", { class: "btn btn-primary", "data-bs-toggle": "offcanvas", "data-bs-target": "#bp-create-preview-group", children: "Create group" })] }), data.notice ? _jsx("div", { class: "alert alert-success", role: "status", children: data.notice }) : null, data.error ? _jsx("div", { class: "alert alert-danger", role: "alert", children: data.error }) : null, credentials(data), _jsxs("div", { class: "alert alert-info d-flex gap-2 align-items-start", children: [_jsx("span", { "aria-hidden": "true", children: "i" }), _jsxs("div", { children: [_jsx("strong", { children: "Pull setup only." }), " Services receive credentials from CI, publish their manifest on first sync, and rebuild preview routes/menu automatically."] })] }), data.groups.length === 0 ? (_jsx("div", { class: "card border-0 shadow-sm", children: _jsx("div", { class: "card-body py-5 text-center text-secondary", children: "No preview groups configured." }) })) : data.groups.map((group) => (_jsx("section", { class: "card border-0 shadow-sm mb-4", "aria-labelledby": `bp-group-${group.id}`, children: _jsxs("div", { class: "card-body", children: [_jsxs("div", { class: "d-flex flex-wrap justify-content-between align-items-start gap-3 mb-3", children: [_jsxs("div", { children: [_jsx("h3", { class: "h5 mb-1", id: `bp-group-${group.id}`, children: group.name }), _jsx("div", { class: "small text-secondary", children: group.sourceLabel }), _jsx("code", { class: "small", children: group.id })] }), _jsxs("div", { class: "d-flex flex-wrap gap-2", children: [_jsx("button", { class: "btn btn-sm btn-outline-primary", "data-bs-toggle": "collapse", "data-bs-target": `#bp-new-${group.id}`, children: "New preview" }), _jsx("button", { class: "btn btn-sm btn-outline-secondary", "data-bs-toggle": "collapse", "data-bs-target": `#bp-settings-${group.id}`, "hx-get": `${data.previewPath}?_c=config&groupId=${encodeURIComponent(group.id)}`, "hx-trigger": `click[!document.getElementById('bp-config-${group.id}').querySelector('form')]`, "hx-target": `#bp-config-${group.id}`, "hx-swap": "innerHTML", children: "Settings" }), _jsx("button", { class: "btn btn-sm btn-outline-danger", "hx-delete": `${data.previewPath}?entity=group&id=${encodeURIComponent(group.id)}`, "hx-confirm": `Delete ${group.name} and all of its previews?`, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: "Delete" })] })] }), _jsxs("div", { class: "row g-3 mb-3", children: [_jsxs("div", { class: "col-12 col-xl-7", children: [_jsx("div", { class: "small text-secondary mb-1", children: "CI endpoint" }), _jsxs("code", { class: "d-block text-break", children: ["POST ", data.deploymentApiBase, "/", group.id, "/deployments/<key>"] })] }), _jsxs("div", { class: "col-12 col-xl-5", children: [_jsx("div", { class: "small text-secondary mb-1", children: "BP plugins" }), _jsx("div", { class: "d-flex flex-wrap gap-1", children: group.services.length ? group.services.map((service) => _jsx("span", { class: "badge text-bg-secondary", children: service.serviceId })) : _jsx("span", { class: "small text-secondary", children: "Added by the first preview create request." }) })] })] }), _jsx("div", { class: "collapse mb-4", id: `bp-new-${group.id}`, children: _jsxs("div", { class: "border rounded p-3 bg-body-tertiary", children: [_jsx("h4", { class: "h6", children: "Create preview manually" }), _jsxs("form", { "hx-post": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "create-deployment" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsxs("div", { class: "row g-3", children: [_jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Key" }), _jsx("input", { class: "form-control font-monospace", name: "key", maxlength: "255", pattern: "[A-Za-z0-9][A-Za-z0-9._:-]*", required: true })] }), _jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Name" }), _jsx("input", { class: "form-control", name: "name" })] }), _jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Expiry" }), expiryInput(undefined, true)] }), _jsxs("div", { class: "col-12", children: [_jsx("label", { class: "form-label", children: "App hostname or origin" }), _jsx("input", { class: "form-control font-monospace", name: "hostname", placeholder: "pr-123.preview.example.com", required: true })] }), _jsxs("div", { class: "col-12", children: [_jsx("label", { class: "form-label", for: `bp-preview-services-${group.id}`, children: "Services" }), _jsx("textarea", { id: `bp-preview-services-${group.id}`, class: "form-control font-monospace", name: "services", rows: Math.max(4, group.services.length + 2), required: true, children: JSON.stringify(Object.fromEntries(group.services.map((service) => [service.serviceId, ""])), null, 2) }), _jsx("div", { class: "form-text", children: "JSON object mapping service IDs to public HTTPS URLs." })] })] }), _jsx("button", { class: "btn btn-primary mt-3", type: "submit", children: "Create preview" })] })] }) }), _jsx("div", { class: "collapse mb-4", id: `bp-settings-${group.id}`, children: _jsxs("div", { class: "border rounded p-3", children: [_jsxs("form", { "hx-put": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "update-group" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsxs("div", { class: "row g-3 mb-3", children: [_jsxs("div", { class: "col-12 col-md-8", children: [_jsx("label", { class: "form-label", children: "Group name" }), _jsx("input", { class: "form-control", name: "name", value: group.name, required: true })] }), _jsxs("div", { class: "col-12 col-md-4", children: [_jsx("label", { class: "form-label", children: "Maximum/default expiry" }), expiryInput(group.expiresInDays)] })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: `bp-elevated-roles-${group.id}`, children: "Preview admin role IDs" }), _jsx("textarea", { id: `bp-elevated-roles-${group.id}`, class: "form-control", name: "elevatedRoleIds", rows: "3", maxlength: "12900", "aria-describedby": `bp-elevated-roles-help-${group.id}`, children: (group.elevatedRoleIds ?? []).join("\n") }), _jsx("div", { class: "form-text", id: `bp-elevated-roles-help-${group.id}`, children: "Defaults for newly created previews; existing previews keep their own role settings. One exact role ID per line (or comma-separated), e.g. admin, staff, client. Users with any listed role get full access within this group's previews only. Empty keeps normal permissions. Changes apply to existing previews on config sync." })] }), oidcFields(`bp-group-${group.id}`, group.oidc), _jsx("button", { class: "btn btn-primary", type: "submit", children: "Save settings" })] }), _jsx("hr", {}), _jsxs("form", { "hx-post": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "rotate-key" }), _jsx("input", { type: "hidden", name: "groupId", value: group.id }), _jsx("button", { class: "btn btn-outline-warning", type: "submit", "hx-confirm": "Rotate this group API key? Existing CI credentials will stop working.", children: "Rotate API key" })] }), _jsx("div", { id: `bp-config-${group.id}`, children: _jsx("div", { class: "text-secondary small mt-3", role: "status", children: "Open settings to load service configuration." }) })] }) }), group.deployments.length === 0 ? _jsx("div", { class: "text-secondary small", children: "No active previews." }) : (_jsx("div", { class: "table-responsive", children: _jsxs("table", { class: "table table-sm align-middle mb-0", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Preview" }), _jsx("th", { children: "App" }), _jsx("th", { children: "Services" }), _jsx("th", { children: "Expiry" }), _jsx("th", {})] }) }), _jsx("tbody", { children: group.deployments.map((deployment) => (_jsxs("tr", { children: [_jsxs("td", { children: [_jsx("div", { class: "fw-semibold", children: deployment.name }), _jsx("code", { class: "small", children: deployment.key }), _jsx("div", { children: _jsx("span", { class: `badge ${deployment.ready ? "text-bg-success" : "text-bg-warning"}`, children: deployment.ready ? "Configured" : "Needs attention" }) })] }), _jsx("td", { children: _jsx("a", { href: deployment.hostname.startsWith("http") ? deployment.hostname : `https://${deployment.hostname}`, target: "_blank", rel: "noreferrer", children: deployment.hostname }) }), _jsx("td", { children: deployment.services.map((service) => _jsxs("div", { class: "small", children: [_jsx("span", { class: `badge ${service.ready ? "text-bg-success" : "text-bg-warning"}`, children: service.status.state }), " ", _jsx("span", { class: "font-monospace", children: service.serviceId })] })) }), _jsxs("td", { children: [_jsxs("form", { class: "d-flex gap-2", "hx-put": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "update-expiry" }), _jsx("input", { type: "hidden", name: "deploymentId", value: deployment.id }), expiryInput(deployment.expiresInDays, false, `Expiry for ${deployment.name}`), _jsx("button", { class: "btn btn-sm btn-outline-secondary", type: "submit", children: "Save" })] }), _jsx("div", { class: "small text-secondary mt-1", children: deployment.expiresAt ? new Date(deployment.expiresAt).toLocaleString() : "Never expires" })] }), _jsxs("td", { children: [_jsx("button", { type: "button", class: "btn btn-sm btn-outline-secondary me-2", "data-bs-toggle": "offcanvas", "data-bs-target": "#bp-preview-debug", "hx-get": `${data.previewPath}?_c=debug&deploymentId=${encodeURIComponent(deployment.id)}`, "hx-target": "#bp-preview-debug-body", "hx-swap": "innerHTML", children: "Debug" }), _jsx("button", { class: "btn btn-sm btn-outline-danger", "hx-delete": `${data.previewPath}?entity=deployment&id=${encodeURIComponent(deployment.id)}`, "hx-confirm": `Delete preview ${deployment.name}?`, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: "Delete" })] })] }))) })] }) }))] }) }))), _jsxs("aside", { class: "offcanvas offcanvas-end", tabindex: -1, id: "bp-preview-debug", "aria-labelledby": "bp-preview-debug-title", style: "width:min(95vw,52rem)", children: [_jsxs("div", { class: "offcanvas-header", children: [_jsx("h3", { class: "offcanvas-title h5", id: "bp-preview-debug-title", children: "Preview diagnostics" }), _jsx("button", { type: "button", class: "btn-close", "data-bs-dismiss": "offcanvas", "aria-label": "Close" })] }), _jsx("div", { class: "offcanvas-body", id: "bp-preview-debug-body", "aria-live": "polite", children: "Select a deployment to load diagnostics." })] }), _jsxs("aside", { class: "offcanvas offcanvas-end", tabindex: -1, id: "bp-create-preview-group", "aria-labelledby": "bp-create-preview-group-title", children: [_jsxs("div", { class: "offcanvas-header", children: [_jsx("h3", { class: "offcanvas-title h5", id: "bp-create-preview-group-title", children: "Create preview group" }), _jsx("button", { type: "button", class: "btn-close", "data-bs-dismiss": "offcanvas", "aria-label": "Close" })] }), _jsx("div", { class: "offcanvas-body", children: _jsxs("form", { "hx-post": data.previewPath, "hx-target": "#bp-main", "hx-swap": "innerHTML", children: [_jsx("input", { type: "hidden", name: "action", value: "create-group" }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-preview-group-name", children: "Name" }), _jsx("input", { id: "bp-preview-group-name", class: "form-control", name: "name", maxlength: "120", required: true })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-preview-source-tenant", children: "Source tenant" }), _jsxs("select", { id: "bp-preview-source-tenant", class: "form-select", name: "sourceTenantId", required: true, children: [_jsx("option", { value: "", children: "Select tenant" }), data.sourceTenants.map((tenant) => _jsx("option", { value: tenant.id, children: tenant.title }))] })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-preview-source-app", children: "Source app" }), _jsxs("select", { id: "bp-preview-source-app", class: "form-select", name: "sourceAppId", required: true, children: [_jsx("option", { value: "", children: "Select app" }), data.sourceApps.map((app) => _jsx("option", { value: app.id, "data-tenant-id": app.tenantId, children: app.title }))] })] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", children: "Maximum/default expiry" }), expiryInput(30)] }), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-new-plugin-ids", children: "BP plugin IDs" }), _jsx("textarea", { id: "bp-new-plugin-ids", class: "form-control font-monospace", name: "pluginIds", rows: 3, placeholder: "org.example.service" })] }), oidcFields("bp-new-group"), _jsxs("div", { class: "mb-3", children: [_jsx("label", { class: "form-label", for: "bp-new-elevated-roles", children: "Preview admin role IDs" }), _jsx("textarea", { id: "bp-new-elevated-roles", class: "form-control", name: "elevatedRoleIds", rows: "3", maxlength: "12900", placeholder: "admin, staff, client", "aria-describedby": "bp-new-elevated-roles-help" }), _jsx("div", { class: "form-text", id: "bp-new-elevated-roles-help", children: "One exact role ID per line or comma-separated. Grants full access only inside this group's previews; it does not assign roles to users or grant platform-admin access. Empty keeps normal permissions." })] }), _jsx("button", { class: "btn btn-primary w-100", type: "submit", children: "Create group" })] }) })] }), _jsx("script", { children: pageScript() })] }));
325
355
  }
326
356
  //# sourceMappingURL=GET.js.map