@egen-civitas/egen 2.2.0 → 3.0.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,49 @@
1
1
  # @egen-civitas/egen
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - aa66db3: **Retrait complet de Carbon et de SCSS.** Tailwind v4 est le seul système de style ; les composants de base sont les nôtres (`esm-styleguide/src/ui`, copiés de shadcn/ui et Radix, MIT).
8
+
9
+ - `@egen-civitas/esm-styleguide` : plus de `@carbon/react`, `@carbon/charts` ni `sass`. Nouveaux composants exportés : `Button`, `IconButton`, `Link`, `Badge`, `Separator`, `Label`, `Input`, `TextInput`, `Switch`, `Spinner`, `InlineLoading`, `Layer`, `Tooltip`, `Tile*`, `Alert*`, `NotificationBanner`, `Dialog*`, `DropdownMenu*`, `Tabs*`, `Table*`, `ModalHeader` / `ModalBody` / `ModalFooter`, `AppHeader*`. `cn` utilise désormais `tailwind-merge`. Le type `CarbonTagColor` devient `TagColor` (et `carbonTagColors` → `tagColors`). Les composants du framework qui reposaient sur Carbon (modales, notifications, snackbars, tags, pagination, menu déroulant, barre d'actions par lots, sélecteur de dates, fenêtres d'espace de travail) sont réécrits sans lui.
10
+ - Feuille globale : `@egen-civitas/esm-styleguide/styles` pointe sur un **fichier CSS standard** (`dist/styles.css`) ; l'export SCSS `./src/vars` et tous les partiels `.scss` disparaissent. Les modules `*.module.scss` sont devenus `*.module.css` (mêmes noms de classes). Les jetons `--cds-*` sont renommés `--ui-*`.
11
+ - `@egen-civitas/rspack-config`, `@egen-civitas/webpack-config` : plus de règle `sass-loader`, `scssRuleConfig` supprimé, `.scss` retiré des extensions résolues.
12
+ - `@egen-civitas/esm-app-shell` : la feuille globale est lue telle quelle (plus de compilation Sass) ; `@carbon/react` n'est plus une dépendance partagée ; la page d'erreur et le fil d'Ariane n'utilisent plus de classes Carbon.
13
+ - `@egen-civitas/tailwind-preset` : importe `tw-animate-css` (animations des composants).
14
+ - `@egen-civitas/esm-ai-tools` : l'identité des composants vient du `data-slot` des composants EGEN (`source: 'slot'`, champ `slot`) à la place du bloc Carbon (`source: 'carbon'`, champ `carbon`) ; `theme.carbonTheme` est supprimé.
15
+ - `@egen-civitas/egen` : les dépendances `sass*` ne sont plus fournies.
16
+
17
+ Guide de migration : `docs/MIGRATION-CARBON.md`.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [aa66db3]
22
+ - @egen-civitas/esm-app-shell@3.0.0
23
+ - @egen-civitas/rspack-config@2.0.0
24
+ - @egen-civitas/webpack-config@2.0.0
25
+
26
+ ## 2.3.0
27
+
28
+ ### Minor Changes
29
+
30
+ - 669cbd6: Réforme multiplateforme, lot P0 (docs/EGEN-FRAMEWORK-DEV.md) :
31
+
32
+ - esm-globals : `EgenTarget`, `CapabilityName`, `getEgenTarget()`, `isNativeTarget()`.
33
+ - esm-platform (nouveau package, 1.0.0) : contrats des capacités (annexe 2), `PlatformError`, détection de la cible, `getPlatform()` (adaptateur Web : session vide, `openExternal`, `lifecycle`, `files.select`, `camera`, `permissions` ; jamais de faux coffre ni de biométrie simulée. En natif, aucune capacité tant que le client de pont n'est pas branché, `ready` rejette `INCOMPATIBLE` sans Host), `createMockPlatform` (sous-chemin `/testing`).
34
+ - esm-framework : ré-export de `@egen-civitas/esm-platform` (`index`, `internal`, mocks).
35
+ - egen (CLI) : option `build --platform web|android|ios`.
36
+ - esm-api : `setAuthorizationProvider` (jeton fourni par la plateforme, rafraîchissement unique sur 401, rejeu GET/HEAD, politique `credentials`) ; `FetchConfig.replayOnUnauthorized` ; `isDevAuthBypassEnabled()` inerte en natif. Sans fournisseur, comportement inchangé.
37
+ - esm-dynamic-loading : overrides d'import map et de route map désactivés en cible native.
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [d1d2d7d]
42
+ - Updated dependencies [b3d9419]
43
+ - Updated dependencies [ef3c97f]
44
+ - Updated dependencies [478e80c]
45
+ - @egen-civitas/esm-app-shell@2.9.0
46
+
3
47
  ## 2.2.0
4
48
 
5
49
  ### Minor Changes
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAc,EAAE,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAiEzC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,YA6W/B"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAc,EAAE,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAiEzC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,YAsX/B"}
package/dist/cli.js CHANGED
@@ -229,6 +229,15 @@ export function buildCli(y) {
229
229
  default: 'production',
230
230
  describe: 'The environment to build for. e.g., development, production.',
231
231
  type: 'string'
232
+ }).option('platform', {
233
+ default: 'web',
234
+ choices: [
235
+ 'web',
236
+ 'android',
237
+ 'ios'
238
+ ],
239
+ describe: 'The target platform of the build. `android` and `ios` produce a self-contained, locked-down SPA for a native host (requires an absolute https API URL and inline importmap/routes).',
240
+ type: 'string'
232
241
  }).option('asset', {
233
242
  default: [],
234
243
  describe: "The path to CSS or JS assets to copy into 'assets/' in the build directory, and include as <link> and <script> tags in the generated HTML. Can be used multiple times.",
@@ -238,7 +247,9 @@ export function buildCli(y) {
238
247
  ...args,
239
248
  configUrls: args['config-url'],
240
249
  configPaths: args['config-path'],
241
- assets: args['asset']
250
+ assets: args['asset'],
251
+ // yargs ne type pas `choices` : la valeur est déjà restreinte à web | android | ios à l'exécution.
252
+ platform: args.platform
242
253
  }));
243
254
  y.command('assemble', 'Assembles an import map incl. all required resources.', (argv)=>argv.option('target', {
244
255
  default: 'dist',
@@ -5,6 +5,7 @@ export interface BuildArgs {
5
5
  importmap?: string;
6
6
  routes?: string;
7
7
  spaPath: string;
8
+ platform?: 'web' | 'android' | 'ios';
8
9
  fresh?: boolean;
9
10
  apiUrl: string;
10
11
  pageTitle: string;
@@ -25,6 +26,7 @@ export type BuildConfig = Partial<{
25
26
  importmap: string;
26
27
  routes: string;
27
28
  spaPath: string;
29
+ platform: 'web' | 'android' | 'ios';
28
30
  env: string;
29
31
  assets: Array<string>;
30
32
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;I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AAS,GAAG,KAAK,CAAC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACvB,CAAC,CAAC;AAiBH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,SAAS,iBAqG7C"}
@@ -56,6 +56,7 @@ export async function runBuild(args) {
56
56
  pageTitle: buildConfig.pageTitle || args.pageTitle,
57
57
  supportOffline: buildConfig.supportOffline ?? args.supportOffline,
58
58
  spaPath: buildConfig.spaPath || args.spaPath,
59
+ platform: buildConfig.platform || args.platform,
59
60
  fresh: args.fresh ?? false,
60
61
  assets: args.assets || buildConfig.assets || []
61
62
  });
@@ -6,6 +6,8 @@ export interface BuildOptions {
6
6
  routes?: RoutesDeclaration;
7
7
  apiUrl?: string;
8
8
  spaPath?: string;
9
+ /** Cible de build : web (défaut), android ou ios. Voir `tools/targets.js` du shell. */
10
+ platform?: 'web' | 'android' | 'ios';
9
11
  pageTitle?: string;
10
12
  supportOffline?: boolean;
11
13
  configUrls?: Array<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG3E,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,YAAiB,QA2EvD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,YAAiB,wCAa3D"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG3E,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,KAAK,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,YAAiB,QAiFvD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,YAAiB,wCAmB3D"}
@@ -8,7 +8,12 @@ import { setEnvVariables } from "./variables.js";
8
8
  if (typeof options.backend === 'string') {
9
9
  variables.EGEN_PROXY_TARGET = options.backend;
10
10
  }
11
- if (typeof options.spaPath === 'string') {
11
+ if (typeof options.platform === 'string') {
12
+ variables.EGEN_TARGET = options.platform;
13
+ }
14
+ // Cibles natives : le chemin public est IMPOSÉ par la cible (voir tools/targets.js du shell) ; on ne
15
+ // transmet donc pas le `--spa-path` (dont la valeur par défaut est celle du Web).
16
+ if (typeof options.spaPath === 'string' && (options.platform === undefined || options.platform === 'web')) {
12
17
  variables.EGEN_PUBLIC_PATH = options.spaPath;
13
18
  }
14
19
  if (typeof options.apiUrl === 'string') {
@@ -67,6 +72,10 @@ import { setEnvVariables } from "./variables.js";
67
72
  export function loadBundlerConfig(options = {}) {
68
73
  setBundlerEnv(options);
69
74
  const require = createRequire(import.meta.url);
75
+ // La config rspack lit `process.env` à l'ÉVALUATION du module (constantes de tête) : Node met les modules CJS en
76
+ // cache, donc un second appel dans le même processus (mode watch, usage programmatique, tests) réutiliserait
77
+ // silencieusement les valeurs du premier (apiUrl, configUrls…), malgré `setBundlerEnv` ci-dessus.
78
+ delete require.cache[require.resolve('@egen-civitas/esm-app-shell/rspack.config.js')];
70
79
  const config = require('@egen-civitas/esm-app-shell/rspack.config.js');
71
80
  if (typeof config === 'function') {
72
81
  return config({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egen-civitas/egen",
3
- "version": "2.2.0",
3
+ "version": "3.0.0",
4
4
  "license": "MPL-2.0",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -60,9 +60,9 @@
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": "^2.7.0",
64
- "@egen-civitas/rspack-config": "^1.1.0",
65
- "@egen-civitas/webpack-config": "^1.0.0",
63
+ "@egen-civitas/esm-app-shell": "^3.0.0",
64
+ "@egen-civitas/rspack-config": "^2.0.0",
65
+ "@egen-civitas/webpack-config": "^2.0.0",
66
66
  "@inquirer/prompts": "8.3.2",
67
67
  "@pnpm/npm-conf": "^3.0.2",
68
68
  "@rspack/cli": "1.7.9",
@@ -85,8 +85,6 @@
85
85
  "npm-registry-fetch": "19.1.1",
86
86
  "open": "11.0.0",
87
87
  "pacote": "21.5.0",
88
- "sass-embedded": "1.89.2",
89
- "sass-loader": "16.0.5",
90
88
  "semver": "^7.7.3",
91
89
  "style-loader": "3.3.4",
92
90
  "swc-loader": "0.2.7",
@@ -114,7 +112,6 @@
114
112
  "postcss": "^8.5.8",
115
113
  "react-is": "^17.0.2",
116
114
  "rimraf": "^6.1.3",
117
- "sass": "^1.98.0",
118
115
  "vitest": "^4.1.2"
119
116
  }
120
117
  }