@futdevpro/fsm-dynamo 1.16.37 → 1.16.38

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.
@@ -1 +1 @@
1
- {"version":3,"file":"global-settings.const.d.ts","sourceRoot":"","sources":["../../../src/_collections/constants/global-settings.const.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACrB,MAAM,gEAAgE,CAAC;AAIxE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,oBAMlC,CAAC"}
1
+ {"version":3,"file":"global-settings.const.d.ts","sourceRoot":"","sources":["../../../src/_collections/constants/global-settings.const.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACrB,MAAM,gEAAgE,CAAC;AAIxE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,oBAUlC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DyFM_global_settings = void 0;
4
+ const environment_flag_enum_1 = require("../../_enums/environment-flag.enum");
4
5
  /**
5
6
  * Default global settings for the application.
6
7
  *
@@ -13,5 +14,8 @@ exports.DyFM_global_settings = {
13
14
  systemShortCodeName: 'DyFM_UNKNOWN_SYSTEM',
14
15
  baseUrl: '/api',
15
16
  log_settings: {},
17
+ // FAIL-SAFE: amig senki nem allitja at, PROD-nak szamit. Igy egy elmaradt bootstrap NEM
18
+ // gyujtja fel a teszt-jelzeseket egy eles feluleten — a hiba iranya a "csendes", nem a "hangos".
19
+ environmentFlag: environment_flag_enum_1.DyFM_EnvironmentFlag.prod,
16
20
  };
17
21
  //# sourceMappingURL=global-settings.const.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-settings.const.js","sourceRoot":"","sources":["../../../src/_collections/constants/global-settings.const.ts"],"names":[],"mappings":";;;AAQA;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAyB;IACxD,mBAAmB,EAAE,qBAAqB;IAE1C,OAAO,EAAE,MAAM;IAEf,YAAY,EAAE,EAAE;CACjB,CAAC"}
1
+ {"version":3,"file":"global-settings.const.js","sourceRoot":"","sources":["../../../src/_collections/constants/global-settings.const.ts"],"names":[],"mappings":";;;AAEA,8EAA0E;AAO1E;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAyB;IACxD,mBAAmB,EAAE,qBAAqB;IAE1C,OAAO,EAAE,MAAM;IAEf,YAAY,EAAE,EAAE;IAEhB,wFAAwF;IACxF,iGAAiG;IACjG,eAAe,EAAE,4CAAoB,CAAC,IAAI;CAC3C,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { DyFM_EnvironmentFlag } from '../../../_enums/environment-flag.enum';
1
2
  import { DyFM_GlobalLog_Settings } from './global-log-settings.interface';
2
3
  /**
3
4
  *
@@ -39,5 +40,25 @@ export interface DyFM_Global_Settings {
39
40
  * the caller's optional `fallback`, then throws a structured DyFM_Error.
40
41
  */
41
42
  envOverrides?: Record<string, string>;
43
+ /**
44
+ * The RESOLVED runtime environment of the application.
45
+ *
46
+ * **Why this exists:** the fleet already knows how to resolve the environment
47
+ * (`FDP_environmentFromHostname` / `FDP_setupFEEnvSettings` in `@futdevpro/fdp-templates`,
48
+ * called from every app's `main.ts`), but the RESULT was never stored anywhere — each app
49
+ * kept it in a local `const`. Bedrock UI (e.g. the "TEST" ribbon in `@futdevpro/ngx-dynamo`)
50
+ * therefore had NO readable source. This field is that source.
51
+ *
52
+ * **Layering:** `ngx-dynamo` must not depend on `fdp-templates` (the dependency runs the other
53
+ * way), so the shared lower layer — this package — owns the field.
54
+ *
55
+ * **FAIL-SAFE default: `prod`.** An unknown/unset environment must never light up a test
56
+ * indicator on a production surface. A missing setup degrades to "silently production-like",
57
+ * not to "warns everyone".
58
+ *
59
+ * Populated at app bootstrap; on the frontend `FDP_setupFEEnvSettings()` writes it as a side
60
+ * effect, so consumers need no extra call.
61
+ */
62
+ environmentFlag: DyFM_EnvironmentFlag;
42
63
  }
43
64
  //# sourceMappingURL=global-settings.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-settings.interface.d.ts","sourceRoot":"","sources":["../../../../src/_models/interfaces/environment/global-settings.interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,EAAE,uBAAuB,CAAC;IAEtC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC"}
1
+ {"version":3,"file":"global-settings.interface.d.ts","sourceRoot":"","sources":["../../../../src/_models/interfaces/environment/global-settings.interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,EAAE,uBAAuB,CAAC;IAEtC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEtC;;;;;;;;;;;;;;;;;;OAkBG;IACH,eAAe,EAAE,oBAAoB,CAAC;CACvC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "01.16.37",
3
+ "version": "01.16.38",
4
4
  "description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
5
5
  "DyBu_settings": {
6
6
  "packageType": "full-stack-package",
@@ -287,7 +287,7 @@
287
287
  "uuid": "11.1.0"
288
288
  },
289
289
  "devDependencies": {
290
- "@futdevpro/dynamo-eslint": "1.15.22",
290
+ "@futdevpro/dynamo-eslint": "1.15.25",
291
291
  "@types/jasmine": "~4.3.5",
292
292
  "@typescript-eslint/eslint-plugin": "^8.41.0",
293
293
  "@typescript-eslint/parser": "^8.41.0",
@@ -0,0 +1,32 @@
1
+ import { DyFM_EnvironmentFlag } from '../../_enums/environment-flag.enum';
2
+ import { DyFM_global_settings } from './global-settings.const';
3
+
4
+
5
+ /**
6
+ * `DyFM_global_settings.environmentFlag` — FAIL-SAFE default guard.
7
+ *
8
+ * @description MIÉRT: ez a mező a bedrock UI környezet-forrása (pl. a „TEST" ribbon a
9
+ * `@futdevpro/ngx-dynamo`-ban). A default IRÁNYA biztonsági kérdés, nem ízlés:
10
+ *
11
+ * - `prod` default → egy elmaradt bootstrap esetén a teszt-jelzés **nem** jelenik meg.
12
+ * A hiba „csendes": egy teszt-rendszer jelöletlen marad.
13
+ * - `test` default → egy elmaradt bootstrap esetén az ÉLES felületen villogna a „TEST"
14
+ * szalag minden valódi felhasználónak. Ez nagyságrendekkel rosszabb.
15
+ *
16
+ * Ezért a default `prod`, és ezt a guard rögzíti — hogy egy későbbi „legyen inkább test,
17
+ * úgy hangosabb" ötlet ne mehessen át némán.
18
+ */
19
+ describe('| DyFM_global_settings.environmentFlag (fail-safe default)', (): void => {
20
+
21
+ it('| a default PROD — ismeretlen kornyezetben NEM gyullad fel a teszt-jelzes', (): void => {
22
+ expect(DyFM_global_settings.environmentFlag).toBe(DyFM_EnvironmentFlag.prod);
23
+ });
24
+
25
+ it('| a mezo LETEZIK a globalis settingsben (a bedrock UI innen olvassa)', (): void => {
26
+ expect(Object.keys(DyFM_global_settings)).toContain('environmentFlag');
27
+ });
28
+
29
+ it('| az ertek a DyFM_EnvironmentFlag keszletbol valo', (): void => {
30
+ expect(Object.values(DyFM_EnvironmentFlag)).toContain(DyFM_global_settings.environmentFlag);
31
+ });
32
+ });
@@ -1,5 +1,6 @@
1
1
 
2
2
 
3
+ import { DyFM_EnvironmentFlag } from '../../_enums/environment-flag.enum';
3
4
  import {
4
5
  DyFM_Global_Settings
5
6
  } from '../../_models/interfaces/environment/global-settings.interface';
@@ -18,7 +19,11 @@ export const DyFM_global_settings: DyFM_Global_Settings = {
18
19
  systemShortCodeName: 'DyFM_UNKNOWN_SYSTEM',
19
20
 
20
21
  baseUrl: '/api',
21
-
22
+
22
23
  log_settings: {},
24
+
25
+ // FAIL-SAFE: amig senki nem allitja at, PROD-nak szamit. Igy egy elmaradt bootstrap NEM
26
+ // gyujtja fel a teszt-jelzeseket egy eles feluleten — a hiba iranya a "csendes", nem a "hangos".
27
+ environmentFlag: DyFM_EnvironmentFlag.prod,
23
28
  };
24
29
 
@@ -1,4 +1,5 @@
1
1
 
2
+ import { DyFM_EnvironmentFlag } from '../../../_enums/environment-flag.enum';
2
3
  import { DyFM_GlobalLog_Settings } from './global-log-settings.interface';
3
4
 
4
5
  /**
@@ -44,4 +45,25 @@ export interface DyFM_Global_Settings {
44
45
  * the caller's optional `fallback`, then throws a structured DyFM_Error.
45
46
  */
46
47
  envOverrides?: Record<string, string>;
48
+
49
+ /**
50
+ * The RESOLVED runtime environment of the application.
51
+ *
52
+ * **Why this exists:** the fleet already knows how to resolve the environment
53
+ * (`FDP_environmentFromHostname` / `FDP_setupFEEnvSettings` in `@futdevpro/fdp-templates`,
54
+ * called from every app's `main.ts`), but the RESULT was never stored anywhere — each app
55
+ * kept it in a local `const`. Bedrock UI (e.g. the "TEST" ribbon in `@futdevpro/ngx-dynamo`)
56
+ * therefore had NO readable source. This field is that source.
57
+ *
58
+ * **Layering:** `ngx-dynamo` must not depend on `fdp-templates` (the dependency runs the other
59
+ * way), so the shared lower layer — this package — owns the field.
60
+ *
61
+ * **FAIL-SAFE default: `prod`.** An unknown/unset environment must never light up a test
62
+ * indicator on a production surface. A missing setup degrades to "silently production-like",
63
+ * not to "warns everyone".
64
+ *
65
+ * Populated at app bootstrap; on the frontend `FDP_setupFEEnvSettings()` writes it as a side
66
+ * effect, so consumers need no extra call.
67
+ */
68
+ environmentFlag: DyFM_EnvironmentFlag;
47
69
  }