@solidxai/core 0.1.13-beta.8 → 0.1.13-beta.9

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": "@solidxai/core",
3
- "version": "0.1.13-beta.8",
3
+ "version": "0.1.13-beta.9",
4
4
  "description": "This module is a NestJS module containing all the required core providers required by a Solid application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,25 +25,29 @@ export abstract class CommonEntity {
25
25
  @Column({ name: 'published_at', default: null, nullable: true, transformer: LocalDateTimeTransformer })
26
26
  publishedAt: Date;
27
27
 
28
+ // Optional (not just nullable) because legacy tables (see LegacyCommonEntityWithExistingId)
29
+ // don't carry these versioning columns at all. CRUDService<T extends CommonEntity> is
30
+ // otherwise used for both plain and legacy entities, so these must stay structurally
31
+ // satisfiable by a type that never declares them.
28
32
  @Expose()
29
33
  @Column({ name: 'is_published', default: false })
30
34
  @Index()
31
- isPublished: boolean;
35
+ isPublished?: boolean;
32
36
 
33
37
  @Expose()
34
38
  @Column({ name: 'is_latest', default: true })
35
39
  @Index()
36
- isLatest: boolean;
40
+ isLatest?: boolean;
37
41
 
38
42
  @Expose()
39
43
  @Column({ type: "int", name: 'initial_entity_version_id', default: null, nullable: true })
40
44
  @Index()
41
- initialEntityVersionId: number;
45
+ initialEntityVersionId?: number;
42
46
 
43
47
  @Expose()
44
48
  @Column({ name: 'published_tracker', default: "na" })
45
49
  @Index()
46
- publishedTracker: string;
50
+ publishedTracker?: string;
47
51
 
48
52
  @Expose()
49
53
  @Column({ type: "varchar", name: 'locale_name', default: null })
@@ -10,6 +10,13 @@ import {
10
10
  export const DEFAULT_MEDIA_UPLOAD_DIR = "media-uploads";
11
11
  export const DEFAULT_MEDIA_FILE_STORAGE_DIR = "media-files-storage";
12
12
 
13
+ // Seeded setting values are written once and never overwritten, so an unparseable
14
+ // env var would persist. Fall back whenever it is missing or not a positive number.
15
+ const timeoutFromEnv = (value: string | undefined, fallback: number): number => {
16
+ const parsed = Number(value);
17
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
18
+ };
19
+
13
20
  // 1.
14
21
  const getSolidCoreSettings = (isProd: boolean) =>
15
22
  [
@@ -1477,7 +1484,7 @@ const getSolidCoreSettings = (isProd: boolean) =>
1477
1484
  {
1478
1485
  moduleName: "solid-core",
1479
1486
  key: "uiTestDefaultTimeoutMs",
1480
- value: 30000,
1487
+ value: timeoutFromEnv(process.env.COMMON_UI_TEST_DEFAULT_TIMEOUT_MS, 30000),
1481
1488
  level: SettingLevel.SystemAdminEditable,
1482
1489
  label: "UI Test Default Timeout (ms)",
1483
1490
  group: "testing-settings",
@@ -1488,7 +1495,10 @@ const getSolidCoreSettings = (isProd: boolean) =>
1488
1495
  {
1489
1496
  moduleName: "solid-core",
1490
1497
  key: "uiTestNavigationTimeoutMs",
1491
- value: 30000,
1498
+ value: timeoutFromEnv(
1499
+ process.env.COMMON_UI_TEST_NAVIGATION_TIMEOUT_MS,
1500
+ timeoutFromEnv(process.env.COMMON_UI_TEST_DEFAULT_TIMEOUT_MS, 30000),
1501
+ ),
1492
1502
  level: SettingLevel.SystemAdminEditable,
1493
1503
  label: "UI Test Navigation Timeout (ms)",
1494
1504
  group: "testing-settings",
@@ -104,6 +104,15 @@ Or set the installation-wide default under **Settings → Testing Settings** in
104
104
  (`uiTestDefaultTimeoutMs` / `uiTestNavigationTimeoutMs`). Those rows are created by `solid seed`;
105
105
  until then the built-in `30000` applies. Flags and env vars still win, so CI keeps per-run control.
106
106
 
107
+ The seeded value of those two settings can be provisioned from the environment with
108
+ `COMMON_UI_TEST_DEFAULT_TIMEOUT_MS` and `COMMON_UI_TEST_NAVIGATION_TIMEOUT_MS` (the latter falls
109
+ back to the former). Seeding is insert-only, so these apply on first seed only — afterwards the
110
+ stored value wins and the setting must be changed in the admin UI. Values that are missing,
111
+ non-numeric, or not positive fall back to `30000`.
112
+
113
+ Note these are distinct from the run-time `UI_TIMEOUT_MS` / `UI_NAVIGATION_TIMEOUT_MS` vars,
114
+ which override the setting on a per-run basis and are read every run.
115
+
107
116
  Or bump only the one slow step, leaving the rest of the suite strict:
108
117
  ```json
109
118
  {