@egen-civitas/egen 3.0.0 → 3.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @egen-civitas/egen
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - aea1faa: Ajout du canal `.env` `EGEN_CTX_*` (système de contexte organisationnel Espace/Site, côté Core) : le préfixe devient public (`PUBLIC_ENV_PREFIXES`), le shell et `egen develop` relaient les 13 variables vers `window.egenCtx*` (mêmes mécaniques que `EGEN_TENANT_*`), les globals sont typés dans `esm-globals`, et `.env.defaults` fixe `EGEN_CTX_MODE=off` (système éteint par défaut, aucune trace dans le rendu quand rien n'est défini). Un test de dérive verrouille la synchronisation des tables du pont.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [aea1faa]
12
+ - @egen-civitas/rspack-config@3.1.0
13
+ - @egen-civitas/esm-app-shell@4.3.0
14
+
15
+ ## 3.0.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [b2d283e]
20
+ - @egen-civitas/esm-app-shell@4.0.0
21
+ - @egen-civitas/rspack-config@3.0.0
22
+
3
23
  ## 3.0.0
4
24
 
5
25
  ### Major Changes
@@ -1 +1 @@
1
- {"version":3,"file":"develop.d.ts","sourceRoot":"","sources":["../../src/commands/develop.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAKvB,MAAM,UAAU,CAAC;AAyClB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,oBAAoB,CAAC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,WAAW,iBAsOvE"}
1
+ {"version":3,"file":"develop.d.ts","sourceRoot":"","sources":["../../src/commands/develop.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAKvB,MAAM,UAAU,CAAC;AAwDlB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,oBAAoB,CAAC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,WAAW,iBAyOvE"}
@@ -15,9 +15,9 @@ import { logInfo, logWarn, removeTrailingSlash, resolveBrandDir } from "../utils
15
15
  * plus être changé par le .env du consommateur — seule une valeur posée sur
16
16
  * `window` APRÈS coup, au moment où la page est servie, le peut encore.
17
17
  *
18
- * `windowKey` suit la même convention que window.egenTenantMode /
19
- * window.egenAi* (voir esm-globals/src/types.ts) — la table EGEN_TENANT_*
20
- * ci-dessous est recopiée à l'identique depuis EGEN_TENANT_ENV_TO_WINDOW_KEY
18
+ * `windowKey` suit la même convention que window.egenTenantMode
19
+ * (voir esm-globals/src/types.ts) — les tables EGEN_TENANT_* et EGEN_CTX_*
20
+ * ci-dessous sont recopiées à l'identique depuis EGEN_TENANT_ENV_TO_WINDOW_KEY et EGEN_CTX_ENV_TO_WINDOW_KEY
21
21
  * dans esm-app-shell/rspack.config.js (même mapping, deux moments différents
22
22
  * : build du framework là-bas, service par `egen develop` ici).
23
23
  *
@@ -73,6 +73,73 @@ import { logInfo, logWarn, removeTrailingSlash, resolveBrandDir } from "../utils
73
73
  envKey: 'EGEN_TENANT_ROOT_DOMAIN',
74
74
  windowKey: 'egenTenantRootDomain',
75
75
  type: 'string'
76
+ },
77
+ // Système de contexte organisationnel (Espace/Site) — recopie de EGEN_CTX_ENV_TO_WINDOW_KEY
78
+ // (esm-app-shell/rspack.config.js), même ordre ; verrouillé par tools/env-bridge-drift.test.ts.
79
+ {
80
+ envKey: 'EGEN_CTX_MODE',
81
+ windowKey: 'egenCtxMode',
82
+ type: 'string'
83
+ },
84
+ {
85
+ envKey: 'EGEN_CTX_DEFAULT_SPACE',
86
+ windowKey: 'egenCtxDefaultSpace',
87
+ type: 'string'
88
+ },
89
+ {
90
+ envKey: 'EGEN_CTX_PRESET',
91
+ windowKey: 'egenCtxPreset',
92
+ type: 'string'
93
+ },
94
+ {
95
+ envKey: 'EGEN_CTX_BOOTSTRAP_URL',
96
+ windowKey: 'egenCtxBootstrapUrl',
97
+ type: 'string'
98
+ },
99
+ {
100
+ envKey: 'EGEN_CTX_ADMIN',
101
+ windowKey: 'egenCtxAdmin',
102
+ type: 'string'
103
+ },
104
+ {
105
+ envKey: 'EGEN_CTX_ADMIN_PRIVILEGE',
106
+ windowKey: 'egenCtxAdminPrivilege',
107
+ type: 'string'
108
+ },
109
+ {
110
+ envKey: 'EGEN_CTX_LOCK',
111
+ windowKey: 'egenCtxLock',
112
+ type: 'string'
113
+ },
114
+ {
115
+ envKey: 'EGEN_CTX_PERSIST',
116
+ windowKey: 'egenCtxPersist',
117
+ type: 'string'
118
+ },
119
+ {
120
+ envKey: 'EGEN_CTX_PERSIST_URL',
121
+ windowKey: 'egenCtxPersistUrl',
122
+ type: 'string'
123
+ },
124
+ {
125
+ envKey: 'EGEN_CTX_REMEMBER',
126
+ windowKey: 'egenCtxRemember',
127
+ type: 'string'
128
+ },
129
+ {
130
+ envKey: 'EGEN_CTX_URL_SYNC',
131
+ windowKey: 'egenCtxUrlSync',
132
+ type: 'string'
133
+ },
134
+ {
135
+ envKey: 'EGEN_CTX_SPACE_PARAM',
136
+ windowKey: 'egenCtxSpaceParam',
137
+ type: 'string'
138
+ },
139
+ {
140
+ envKey: 'EGEN_CTX_TENANT_SCOPED',
141
+ windowKey: 'egenCtxTenantScoped',
142
+ type: 'string'
76
143
  }
77
144
  ];
78
145
  export async function runDevelop(args, signal) {
@@ -86,7 +153,7 @@ export async function runDevelop(args, signal) {
86
153
  const source = resolve(require.resolve('@egen-civitas/esm-app-shell/package.json'), '..', 'dist');
87
154
  const index = resolve(source, 'index.html');
88
155
  // @egen-civitas/esm-app-shell est un paquet npm PRÉ-COMPILÉ : son bundle a
89
- // déjà été construit (et process.env.EGEN_DEV_NO_AUTH/EGEN_AI_*/etc. figés
156
+ // déjà été construit (et process.env.EGEN_DEV_NO_AUTH/etc. figés
90
157
  // par rspack DefinePlugin) au moment du build du repo framework, bien
91
158
  // avant que `egen develop` ne tourne ici avec le .env de l'app
92
159
  // consommatrice. Un DefinePlugin ne peut plus aider — il faudrait rebuild
@@ -111,11 +178,14 @@ export async function runDevelop(args, signal) {
111
178
  }
112
179
  }
113
180
  if (runtimeWindowOverrides.egenDevNoAuth) {
114
- logInfo('EGEN_DEV_NO_AUTH=true — bypass d\'authentification actif (session admin fictive, sans backend).');
181
+ logInfo("EGEN_DEV_NO_AUTH=true — bypass d'authentification actif (session admin fictive, sans backend).");
115
182
  }
116
183
  if (runtimeWindowOverrides.egenTenantMode && runtimeWindowOverrides.egenTenantMode !== 'off') {
117
184
  logInfo(`EGEN_TENANT_MODE=${runtimeWindowOverrides.egenTenantMode} — système multi-tenant actif.`);
118
185
  }
186
+ if (runtimeWindowOverrides.egenCtxMode && runtimeWindowOverrides.egenCtxMode !== 'off') {
187
+ logInfo(`EGEN_CTX_MODE=${runtimeWindowOverrides.egenCtxMode} — système de contexte (Espace/Site) actif.`);
188
+ }
119
189
  // URL same-origin du flux de logs du terminal, lue par l'app de logs du shell.
120
190
  const logsPath = `${spaPath}/__egen_logs__`;
121
191
  if (logsPort) runtimeWindowOverrides.egenLogsUrl = logsPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egen-civitas/egen",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "license": "MPL-2.0",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -60,8 +60,8 @@
60
60
  ],
61
61
  "homepage": "https://github.com/amourgit/Frontend-esm-framework/tree/main/packages/tooling/egen#readme",
62
62
  "dependencies": {
63
- "@egen-civitas/esm-app-shell": "^3.0.0",
64
- "@egen-civitas/rspack-config": "^2.0.0",
63
+ "@egen-civitas/esm-app-shell": "^4.3.0",
64
+ "@egen-civitas/rspack-config": "^3.1.0",
65
65
  "@egen-civitas/webpack-config": "^2.0.0",
66
66
  "@inquirer/prompts": "8.3.2",
67
67
  "@pnpm/npm-conf": "^3.0.2",