@equinor/roma-nx-plugin 6.4.1 → 6.5.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/generators.json +5 -0
  3. package/package.json +8 -4
  4. package/src/executors/build/build.d.ts +2 -1
  5. package/src/executors/build/build.js +5 -2
  6. package/src/executors/build/build.js.map +1 -1
  7. package/src/executors/build/executor.js +1 -1
  8. package/src/executors/build/executor.js.map +1 -1
  9. package/src/executors/build/schema.d.ts +8 -0
  10. package/src/executors/build/schema.json +21 -1
  11. package/src/executors/create-vite-config.d.ts +2 -1
  12. package/src/executors/create-vite-config.js +13 -4
  13. package/src/executors/create-vite-config.js.map +1 -1
  14. package/src/executors/publish/executor.js +3 -1
  15. package/src/executors/publish/executor.js.map +1 -1
  16. package/src/executors/publish/publish-script.d.ts +2 -1
  17. package/src/executors/publish/publish-script.js +77 -5
  18. package/src/executors/publish/publish-script.js.map +1 -1
  19. package/src/executors/publish/readme.md +39 -1
  20. package/src/executors/publish/release-note-file.d.ts +48 -0
  21. package/src/executors/publish/release-note-file.js +287 -0
  22. package/src/executors/publish/release-note-file.js.map +1 -0
  23. package/src/executors/publish/schema.d.ts +6 -0
  24. package/src/executors/publish/schema.json +5 -0
  25. package/src/executors/serve/executor.js +4 -1
  26. package/src/executors/serve/executor.js.map +1 -1
  27. package/src/executors/serve/schema.d.ts +1 -0
  28. package/src/executors/serve/schema.json +4 -0
  29. package/src/executors/serve/server.d.ts +2 -1
  30. package/src/executors/serve/server.js +2 -2
  31. package/src/executors/serve/server.js.map +1 -1
  32. package/src/executors/utils/file-replacements/file-replacements-plugin.d.ts +6 -0
  33. package/src/executors/utils/file-replacements/file-replacements-plugin.js +46 -0
  34. package/src/executors/utils/file-replacements/file-replacements-plugin.js.map +1 -0
  35. package/src/executors/utils/file-replacements/resolve-file-replacements.d.ts +5 -0
  36. package/src/executors/utils/file-replacements/resolve-file-replacements.js +28 -0
  37. package/src/executors/utils/file-replacements/resolve-file-replacements.js.map +1 -0
  38. package/src/generators/app/generator.js +4 -0
  39. package/src/generators/app/generator.js.map +1 -1
  40. package/src/generators/app/schema.d.ts +1 -0
  41. package/src/generators/app/schema.json +5 -0
  42. package/src/generators/release-note/generator.d.ts +4 -0
  43. package/src/generators/release-note/generator.js +43 -0
  44. package/src/generators/release-note/generator.js.map +1 -0
  45. package/src/generators/release-note/schema.d.ts +3 -0
  46. package/src/generators/release-note/schema.json +16 -0
  47. package/src/generators/skill/files/roma-app-development/SKILL.md +32 -6
  48. package/src/generators/skill/files/roma-app-development/generators.md +48 -3
  49. package/src/generators/skill/generator.d.ts +3 -0
  50. package/src/generators/skill/generator.js +37 -3
  51. package/src/generators/skill/generator.js.map +1 -1
  52. package/src/generators/skill/schema.json +1 -2
  53. package/src/index.d.ts +1 -0
  54. package/src/index.js +1 -0
  55. package/src/index.js.map +1 -1
  56. package/src/vite/breadcrumbs.d.ts +10 -0
  57. package/src/vite/breadcrumbs.js +168 -0
  58. package/src/vite/breadcrumbs.js.map +1 -0
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.releaseNoteGenerator = releaseNoteGenerator;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const release_note_file_1 = require("../../executors/publish/release-note-file");
6
+ function releaseNoteGenerator(tree, options) {
7
+ var _a, _b, _c, _d, _e;
8
+ const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
9
+ const packageJsonPath = (0, devkit_1.joinPathFragments)(project.root, 'package.json');
10
+ if (!tree.exists(packageJsonPath)) {
11
+ throw new Error(`${packageJsonPath} not found`);
12
+ }
13
+ const { version } = (0, devkit_1.readJson)(tree, packageJsonPath);
14
+ if (!version) {
15
+ throw new Error(`${packageJsonPath} has no version`);
16
+ }
17
+ const publish = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.publish;
18
+ const defaultConfiguration = (publish === null || publish === void 0 ? void 0 : publish.defaultConfiguration)
19
+ ? (_b = publish.configurations) === null || _b === void 0 ? void 0 : _b[publish.defaultConfiguration]
20
+ : undefined;
21
+ const releaseNotesDir = (_e = ((_c = defaultConfiguration === null || defaultConfiguration === void 0 ? void 0 : defaultConfiguration.releaseNotesDir) !== null && _c !== void 0 ? _c : (_d = publish === null || publish === void 0 ? void 0 : publish.options) === null || _d === void 0 ? void 0 : _d.releaseNotesDir)) !== null && _e !== void 0 ? _e : release_note_file_1.DEFAULT_RELEASE_NOTES_DIR;
22
+ const filePath = (0, devkit_1.joinPathFragments)(project.root, releaseNotesDir, `${version}.md`);
23
+ if (tree.exists(filePath)) {
24
+ throw new Error(`Release note ${filePath} already exists`);
25
+ }
26
+ tree.write(filePath, releaseNoteTemplate(options.project, version));
27
+ }
28
+ // Title and body are left empty on purpose: publishing fails until they are filled in.
29
+ function releaseNoteTemplate(project, version) {
30
+ return `---
31
+ # Release note for ${project} ${version}. \`nx publish ${project}\` sends it to Roma.
32
+ # Fill in the title and write the Markdown body below the closing "---". Publishing fails while either is empty.
33
+ # Format: https://docs.roma.equinor.com/docs/Features/ReleaseNotes
34
+ title: '' # required, at most 140 characters
35
+ summary: '' # optional, at most 280 characters, shown in the list of release notes
36
+ changeType: other # feature | improvement | fix | security | deprecation | other
37
+ keywords: [] # optional, e.g. [pricing, grid]
38
+ links: [] # optional, e.g. [{ rel: jira, href: 'https://oiltradeent.atlassian.net/browse/ROMA-1' }]
39
+ ---
40
+ `;
41
+ }
42
+ exports.default = releaseNoteGenerator;
43
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/release-note/generator.ts"],"names":[],"mappings":";;AASA,oDA8BC;AAvCD,uCAKoB;AACpB,iFAAsF;AAGtF,SAAgB,oBAAoB,CAClC,IAAU,EACV,OAAmC;;IAEnC,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,E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OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,uFAAuF;AACvF,SAAS,mBAAmB,CAAC,OAAe,EAAE,OAAe;IAC3D,OAAO;qBACY,OAAO,IAAI,OAAO,kBAAkB,OAAO;;;;;;;;;CAS/D,CAAC;AACF,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type ReleaseNoteGeneratorSchema = {
2
+ project: string;
3
+ };
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "$id": "ReleaseNote",
4
+ "title": "Release note",
5
+ "description": "Scaffolds release-notes/<version>.md for a Roma app's current package.json version.",
6
+ "type": "object",
7
+ "properties": {
8
+ "project": {
9
+ "type": "string",
10
+ "description": "The Roma app to write a release note for. The file is named after the version in the app's package.json.",
11
+ "$default": { "$source": "argv", "index": 0 },
12
+ "x-dropdown": "projects"
13
+ }
14
+ },
15
+ "required": ["project"]
16
+ }
@@ -17,16 +17,29 @@ Use this skill when you need to:
17
17
  - Use Fusion Framework modules (event system, auth, navigation, service discovery, feature flags, telemetry)
18
18
  - Use Roma custom modules (page titles, real-time SSE events)
19
19
  - Build UI with Roma / EDS components
20
+ - Write and publish release notes for an app version
20
21
 
21
22
  ## Roma Documentation
22
23
 
23
- Before implementing, load the Roma docs index: **https://docs.roma.equinor.com/llms.txt**.
24
- It lists every docs page (framework, modules, components, guides, design guidelines) with links —
25
- fetch the pages relevant to your task instead of guessing APIs.
24
+ Before implementing, load the Roma docs index (`llms.txt`). It lists every docs page (framework,
25
+ modules, components, guides, design guidelines) with links — fetch the pages relevant to your task
26
+ instead of guessing APIs.
26
27
 
27
- - The site is behind Equinor GitHub SSO. If the fetch redirects to a GitHub login page, ask the user
28
- to paste the relevant content, or read the source markdown in `equinor/tops-roma` under
29
- `roma-workbench/apps/roma-docs/docs/` (e.g. `gh api repos/equinor/tops-roma/contents/roma-workbench/apps/roma-docs/docs`).
28
+ The docs site (https://docs.roma.equinor.com) is private, so don't fetch it directly. Every build is
29
+ mirrored to the `roma-docs-dist` branch of `equinor/tops-roma`; read it with the GitHub CLI:
30
+
31
+ ```bash
32
+ # Index of all pages
33
+ gh api 'repos/equinor/tops-roma/contents/llms.txt?ref=roma-docs-dist' -H 'Accept: application/vnd.github.raw'
34
+ # A page linked from llms.txt: strip https://docs.roma.equinor.com/ to get the file path
35
+ gh api 'repos/equinor/tops-roma/contents/docs/Modules/QueryModule.md?ref=roma-docs-dist' -H 'Accept: application/vnd.github.raw'
36
+ # All docs in one (large) file
37
+ gh api 'repos/equinor/tops-roma/contents/llms-full.txt?ref=roma-docs-dist' -H 'Accept: application/vnd.github.raw'
38
+ ```
39
+
40
+ - Without `gh`, use the GitHub MCP `get_file_contents` tool (owner `equinor`, repo `tops-roma`,
41
+ ref `roma-docs-dist`) with the same paths.
42
+ - If access fails, ask the user to paste the relevant content.
30
43
  - Prefer the docs over the files in this skill when they disagree — the docs are kept current.
31
44
 
32
45
  ## UI Components — always `@equinor/roma-ui`
@@ -50,6 +63,19 @@ import { Button, Card, Typography } from '@equinor/eds-core-react';
50
63
  - Existing apps: run `nx migrate @equinor/roma-nx-plugin` — the `swap-eds-to-roma-ui` migration rewrites
51
64
  imports and dependencies. Code generated by older templates may still import EDS directly; swap it.
52
65
 
66
+ ## Release Notes
67
+
68
+ When a change is user-visible, add a release note for the version being published:
69
+
70
+ 1. Bump `version` in the app's `package.json`.
71
+ 2. Run `nx g @equinor/roma-nx-plugin:release-note <project>` to create `release-notes/<version>.md`.
72
+ 3. Fill in `title` and the Markdown body (both required); add `summary`, `changeType`, `keywords` and `links` as
73
+ needed.
74
+ 4. `nx publish <project>` validates the file before uploading and publishes the note with the app.
75
+
76
+ See the Release Note Generator section of `generators.md` for the file format and publish behaviour, and the Release
77
+ Notes page in the Roma docs for the REST API.
78
+
53
79
  ## Installation
54
80
 
55
81
  This skill was added via the Roma NX plugin generator:
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- The Roma NX plugin (`@equinor/roma-nx-plugin`) provides four generators for scaffolding Roma-compatible projects:
5
+ The Roma NX plugin (`@equinor/roma-nx-plugin`) provides these generators for scaffolding Roma-compatible projects:
6
6
 
7
7
  | Generator | Command | Purpose |
8
8
  |-----------|---------|---------|
@@ -10,6 +10,7 @@ The Roma NX plugin (`@equinor/roma-nx-plugin`) provides four generators for scaf
10
10
  | **preset** | `nx g @equinor/roma-nx-plugin:preset {name}` | Initialize a new Roma NX workspace (wraps the app generator) |
11
11
  | **component-test** | `nx g @equinor/roma-nx-plugin:component-test --project={name}` | Add Cypress component testing to an existing Roma app |
12
12
  | **skill** | `nx g @equinor/roma-nx-plugin:skill` | Add the Roma development skill for AI assistants |
13
+ | **release-note** | `nx g @equinor/roma-nx-plugin:release-note {project}` | Scaffold `release-notes/<version>.md`; `nx publish` validates it before upload and sends it to Roma |
13
14
 
14
15
  ---
15
16
 
@@ -30,6 +31,7 @@ nx g @equinor/roma:app my-app --minimal # minimal scaffolding
30
31
  3. Replaces them with Roma-specific templates (see below)
31
32
  4. Configures project targets to use Roma executors (`@equinor/roma-nx-plugin:build`, `:serve`, `:portal`, `:publish`)
32
33
  5. Adds Roma + Fusion + EDS dependencies
34
+ 6. Installs the Roma AI assistant skills in `.github/skills`, or refreshes an existing install in place (skip with `--skipSkill`)
33
35
 
34
36
  ### Schema Options
35
37
 
@@ -41,7 +43,8 @@ nx g @equinor/roma:app my-app --minimal # minimal scaffolding
41
43
  "unitTestRunner": "jest | vitest | none (default: vitest)",
42
44
  "e2eTestRunner": "cypress | playwright | none (default: none)",
43
45
  "minimal": "boolean (default: false) — Minimal scaffolding",
44
- "tags": "string — Comma-separated NX tags"
46
+ "tags": "string — Comma-separated NX tags",
47
+ "skipSkill": "boolean (default: false) — Don't install the AI assistant skills"
45
48
  }
46
49
  ```
47
50
 
@@ -318,6 +321,48 @@ import { mount } from 'cypress/react18';
318
321
 
319
322
  ---
320
323
 
324
+ ## Release Note Generator
325
+
326
+ Scaffolds the release note for the app's current `package.json` version:
327
+
328
+ ```sh
329
+ nx g @equinor/roma-nx-plugin:release-note my-app # writes apps/my-app/release-notes/<version>.md
330
+ ```
331
+
332
+ - The file goes in the publish target's `releaseNotesDir` (default `release-notes`, relative to the project root). A
333
+ `releaseNotesDir` in the target's `defaultConfiguration` takes precedence over `options`.
334
+ - It fails if `package.json` has no `version` or the file already exists.
335
+ - The template leaves `title` and the body empty, so `nx publish` fails until both are filled in.
336
+
337
+ ### File format
338
+
339
+ ```markdown
340
+ ---
341
+ title: Faster grid filtering # required, at most 140 characters
342
+ summary: Filters apply instantly. # optional, at most 280 characters
343
+ changeType: improvement # feature | improvement | fix | security | deprecation | other (default other)
344
+ keywords: [pricing, grid] # optional free text; no commas inside a keyword
345
+ links: # optional; rel is docs | jira | support | changelog; label at most 80 characters
346
+ - { rel: jira, href: 'https://oiltradeent.atlassian.net/browse/ROMA-1', label: ROMA-1 }
347
+ ---
348
+
349
+ Markdown body (required).
350
+ ```
351
+
352
+ Any other front-matter field is an error. A note from a file always targets the app plus its keywords; to target
353
+ services or categories, use the REST API (see the Release Notes docs page).
354
+
355
+ ### Publishing
356
+
357
+ `nx publish` validates `<releaseNotesDir>/<version>.md` before uploading anything and lists every problem if it is
358
+ invalid. Without a file it logs `No release notes for <version>` and continues. After the manifest is published it
359
+ sends `PUT /api/release-notes/apps/{appKey}/versions/{version}` to the same environment (`-c qa` creates a QA note);
360
+ publishing the same version again replaces the note. If that request fails, the publish still succeeds with a
361
+ warning — publish again to retry. The publishing identity needs the `Roma.App` role and must be allowed by the app's
362
+ `config.admins`.
363
+
364
+ ---
365
+
321
366
  ## Skill Generator
322
367
 
323
368
  Adds the Roma development skill files for AI assistants (Claude, Copilot, etc.) to the repository:
@@ -330,7 +375,7 @@ nx g @equinor/roma-nx-plugin:skill
330
375
 
331
376
  | Option | Default | Description |
332
377
  |--------|---------|-------------|
333
- | `directory` | `.claude/skills` | Target directory for the skill files |
378
+ | `directory` | Existing install, else `.github/skills` | Target directory for the skill files |
334
379
 
335
380
  ### What It Generates
336
381
 
@@ -1,4 +1,7 @@
1
1
  import { type Tree } from '@nx/devkit';
2
2
  import type { SkillGeneratorSchema } from './schema';
3
+ export declare const DEFAULT_SKILLS_DIR = ".github/skills";
4
+ /** Finds the skills directory of a previously installed Roma skill, if any. */
5
+ export declare function findInstalledSkillsDir(tree: Tree): string | undefined;
3
6
  export declare function skillGenerator(tree: Tree, options: SkillGeneratorSchema): Promise<void>;
4
7
  export default skillGenerator;
@@ -1,12 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_SKILLS_DIR = void 0;
4
+ exports.findInstalledSkillsDir = findInstalledSkillsDir;
3
5
  exports.skillGenerator = skillGenerator;
4
6
  const tslib_1 = require("tslib");
7
+ const path = tslib_1.__importStar(require("node:path"));
5
8
  const devkit_1 = require("@nx/devkit");
6
- const path = tslib_1.__importStar(require("path"));
9
+ exports.DEFAULT_SKILLS_DIR = '.github/skills';
10
+ const MARKER = 'roma-app-development/SKILL.md';
11
+ const IGNORED_DIRS = new Set(['node_modules', 'dist', '.git', '.nx', 'tmp']);
12
+ const MAX_SEARCH_DEPTH = 5;
13
+ /** Finds the skills directory of a previously installed Roma skill, if any. */
14
+ function findInstalledSkillsDir(tree) {
15
+ const search = (dir, depth) => {
16
+ if (tree.isFile(path.posix.join(dir, MARKER))) {
17
+ return dir;
18
+ }
19
+ if (depth >= MAX_SEARCH_DEPTH) {
20
+ return undefined;
21
+ }
22
+ for (const child of tree.children(dir).sort()) {
23
+ const childPath = path.posix.join(dir, child);
24
+ if (IGNORED_DIRS.has(child) || tree.isFile(childPath)) {
25
+ continue;
26
+ }
27
+ const found = search(childPath, depth + 1);
28
+ if (found) {
29
+ return found;
30
+ }
31
+ }
32
+ return undefined;
33
+ };
34
+ for (const dir of [exports.DEFAULT_SKILLS_DIR, '.claude/skills', '.agents/skills']) {
35
+ if (tree.isFile(path.posix.join(dir, MARKER))) {
36
+ return dir;
37
+ }
38
+ }
39
+ return search('', 0);
40
+ }
7
41
  async function skillGenerator(tree, options) {
8
- var _a;
9
- const targetDir = (_a = options.directory) !== null && _a !== void 0 ? _a : '.claude/skills';
42
+ var _a, _b;
43
+ const targetDir = (_b = (_a = options.directory) !== null && _a !== void 0 ? _a : findInstalledSkillsDir(tree)) !== null && _b !== void 0 ? _b : exports.DEFAULT_SKILLS_DIR;
10
44
  (0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), targetDir, options);
11
45
  await (0, devkit_1.formatFiles)(tree);
12
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/skill/generator.ts"],"names":[],"mappings":";;AAIA,wCAQC;;AAZD,uCAAmE;AACnE,mDAA6B;AAGtB,KAAK,UAAU,cAAc,CAClC,IAAU,EACV,OAA6B;;IAE7B,MAAM,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,gBAAgB,CAAC;IAExD,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,kBAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/skill/generator.ts"],"names":[],"mappings":";;;AAUA,wDA0BC;AAED,wCASC;;AA/CD,wDAAkC;AAClC,uCAAmE;AAGtD,QAAA,kBAAkB,GAAG,gBAAgB,CAAC;AACnD,MAAM,MAAM,GAAG,+BAA+B,CAAC;AAC/C,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7E,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,+E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ACb,MAAA,MAAA,OAAO,CAAC,SAAS,mCAAI,sBAAsB,CAAC,IAAI,CAAC,mCAAI,0BAAkB,CAAC;IAE1E,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,kBAAe,cAAc,CAAC"}
@@ -6,8 +6,7 @@
6
6
  "properties": {
7
7
  "directory": {
8
8
  "type": "string",
9
- "description": "Target directory for the skill files. Defaults to .claude/skills",
10
- "default": ".claude/skills"
9
+ "description": "Target directory for the skill files. Defaults to the directory of an already installed Roma skill, otherwise .github/skills"
11
10
  }
12
11
  },
13
12
  "required": []
package/src/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './executors/create-vite-config';
2
+ export * from './vite/breadcrumbs';
package/src/index.js CHANGED
@@ -2,4 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./executors/create-vite-config"), exports);
5
+ tslib_1.__exportStar(require("./vite/breadcrumbs"), exports);
5
6
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../plugins/roma/src/index.ts"],"names":[],"mappings":";;;AAAA,yEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../plugins/roma/src/index.ts"],"names":[],"mappings":";;;AAAA,yEAA+C;AAC/C,6DAAmC"}
@@ -0,0 +1,10 @@
1
+ import { type Plugin } from 'vite';
2
+ export type RomaBreadcrumbsPluginOptions = {
3
+ /** Absolute route configuration path, or a path relative to the Vite root. */
4
+ routes?: string;
5
+ };
6
+ /**
7
+ * Opt-in companion to Fusion's route compiler. It adds a pathless breadcrumb
8
+ * layout and uses static index-page metadata to label path-only prefixes.
9
+ */
10
+ export declare function romaBreadcrumbsPlugin({ routes, }?: RomaBreadcrumbsPluginOptions): Plugin;
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.romaBreadcrumbsPlugin = romaBreadcrumbsPlugin;
4
+ const node_fs_1 = require("node:fs");
5
+ const node_path_1 = require("node:path");
6
+ const ts_morph_1 = require("ts-morph");
7
+ const vite_1 = require("vite");
8
+ function unwrap(expression) {
9
+ while (ts_morph_1.Node.isParenthesizedExpression(expression) ||
10
+ ts_morph_1.Node.isAsExpression(expression) ||
11
+ ts_morph_1.Node.isSatisfiesExpression(expression)) {
12
+ expression = expression.getExpression();
13
+ }
14
+ return expression;
15
+ }
16
+ function property(object, name) {
17
+ const member = object.getProperty(name);
18
+ return ts_morph_1.Node.isPropertyAssignment(member)
19
+ ? member.getInitializer()
20
+ : undefined;
21
+ }
22
+ /**
23
+ * Opt-in companion to Fusion's route compiler. It adds a pathless breadcrumb
24
+ * layout and uses static index-page metadata to label path-only prefixes.
25
+ */
26
+ function romaBreadcrumbsPlugin({ routes = 'src/routes.ts', } = {}) {
27
+ let routeFile;
28
+ const dependencies = new Set();
29
+ return {
30
+ name: 'roma:breadcrumbs',
31
+ enforce: 'post',
32
+ configResolved(config) {
33
+ routeFile = (0, vite_1.normalizePath)((0, node_path_1.resolve)(config.root, routes));
34
+ },
35
+ transform(code, id) {
36
+ var _a, _b;
37
+ if ((0, vite_1.normalizePath)(id.split('?')[0]) !== routeFile)
38
+ return null;
39
+ dependencies.clear();
40
+ const project = new ts_morph_1.Project({
41
+ useInMemoryFileSystem: true,
42
+ skipAddingFilesFromTsConfig: true,
43
+ });
44
+ const source = project.createSourceFile(routeFile, code);
45
+ const declaration = source.getVariableDeclaration('routes');
46
+ if (!(declaration === null || declaration === void 0 ? void 0 : declaration.isExported())) {
47
+ throw new Error('Roma breadcrumbs requires an exported routes variable.');
48
+ }
49
+ const handles = new Map();
50
+ const components = new Map();
51
+ for (const statement of source.getImportDeclarations()) {
52
+ for (const imported of statement.getNamedImports()) {
53
+ const name = imported.getName();
54
+ if (name !== 'handle' && name !== 'default')
55
+ continue;
56
+ const file = (0, vite_1.normalizePath)((0, node_path_1.resolve)((0, node_path_1.dirname)(routeFile), statement.getModuleSpecifierValue()));
57
+ (name === 'handle' ? handles : components).set((_b = (_a = imported.getAliasNode()) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _b !== void 0 ? _b : name, file);
58
+ }
59
+ }
60
+ const metadata = (handle, component) => {
61
+ var _a, _b, _c;
62
+ const file = (_b = (_a = (handle && handles.get(handle.getText()))) !== null && _a !== void 0 ? _a : component === null || component === void 0 ? void 0 : component.getDescendantsOfKind(ts_morph_1.SyntaxKind.Identifier).map((node) => components.get(node.getText())).find(Boolean)) !== null && _b !== void 0 ? _b : (component && components.get(component.getText()));
63
+ if (!file) {
64
+ throw new Error('Roma breadcrumbs expected a Fusion-generated page handle. ' +
65
+ 'Enable reactRouterPlugin() before romaBreadcrumbsPlugin().');
66
+ }
67
+ dependencies.add(file);
68
+ this.addWatchFile(file);
69
+ const module = (_c = project.getSourceFile(file)) !== null && _c !== void 0 ? _c : project.createSourceFile(file, (0, node_fs_1.readFileSync)(file, 'utf8'));
70
+ const declaration = module.getVariableDeclaration('handle');
71
+ const value = (declaration === null || declaration === void 0 ? void 0 : declaration.isExported())
72
+ ? declaration.getInitializer()
73
+ : undefined;
74
+ const object = value && unwrap(value);
75
+ const member = object && ts_morph_1.Node.isObjectLiteralExpression(object)
76
+ ? object.getProperty('breadcrumb')
77
+ : undefined;
78
+ if (ts_morph_1.Node.isMethodDeclaration(member) ||
79
+ ts_morph_1.Node.isShorthandPropertyAssignment(member))
80
+ return member;
81
+ const breadcrumb = ts_morph_1.Node.isPropertyAssignment(member)
82
+ ? member.getInitializer()
83
+ : undefined;
84
+ if (!breadcrumb) {
85
+ throw new Error(`${file}: export handle with breadcrumb metadata. ` +
86
+ 'The prototype requires an object-literal handle.');
87
+ }
88
+ return unwrap(breadcrumb);
89
+ };
90
+ const objects = (expression) => {
91
+ var _a;
92
+ const value = unwrap(expression);
93
+ if (ts_morph_1.Node.isIdentifier(value)) {
94
+ const initializer = (_a = source
95
+ .getVariableDeclaration(value.getText())) === null || _a === void 0 ? void 0 : _a.getInitializer();
96
+ if (initializer)
97
+ return objects(initializer);
98
+ }
99
+ if (ts_morph_1.Node.isArrayLiteralExpression(value)) {
100
+ return value.getElements().flatMap((element) => {
101
+ if (ts_morph_1.Node.isObjectLiteralExpression(element))
102
+ return [element];
103
+ throw new Error('Roma breadcrumbs requires static Fusion-generated route arrays.');
104
+ });
105
+ }
106
+ throw new Error('Roma breadcrumbs requires Fusion-generated routes. ' +
107
+ 'Enable reactRouterPlugin() before romaBreadcrumbsPlugin().');
108
+ };
109
+ const visit = (nodes) => {
110
+ for (const node of nodes) {
111
+ const children = property(node, 'children');
112
+ const nested = children ? objects(children) : [];
113
+ const path = property(node, 'path');
114
+ const component = property(node, 'Component');
115
+ if (path && !component && children) {
116
+ if (ts_morph_1.Node.isStringLiteral(path) &&
117
+ path.getLiteralValue().split('/').filter(Boolean).length > 1) {
118
+ throw new Error(`${path.getText()}: a prefix must have a single path segment; nest prefixes instead.`);
119
+ }
120
+ const index = nested.find((child) => { var _a; return ((_a = property(child, 'index')) === null || _a === void 0 ? void 0 : _a.getText()) === 'true'; });
121
+ if (!index) {
122
+ throw new Error(`${path.getText()}: a prefix needs an index page with a static breadcrumb label.`);
123
+ }
124
+ const label = metadata(property(index, 'handle'), property(index, 'Component'));
125
+ if (!(ts_morph_1.Node.isStringLiteral(label) ||
126
+ ts_morph_1.Node.isNoSubstitutionTemplateLiteral(label)) ||
127
+ !label.getLiteralValue().trim()) {
128
+ throw new Error(`${path.getText()}: a prefix needs a non-empty static index breadcrumb label.`);
129
+ }
130
+ node.addPropertyAssignment({
131
+ name: 'handle',
132
+ initializer: `{ breadcrumb: ${JSON.stringify(label.getLiteralValue())} }`,
133
+ });
134
+ }
135
+ else if (path && component) {
136
+ metadata(property(node, 'handle'), component);
137
+ }
138
+ visit(nested);
139
+ }
140
+ };
141
+ visit(objects(declaration.getInitializerOrThrow()));
142
+ const identifiers = new Set(source
143
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.Identifier)
144
+ .map((node) => node.getText()));
145
+ let alias = '__RomaBreadcrumbLayout';
146
+ while (identifiers.has(alias)) {
147
+ alias += '_';
148
+ }
149
+ const original = declaration.getInitializerOrThrow().getText();
150
+ declaration.setInitializer(`[{ Component: ${alias}, children: ${original} }]`);
151
+ source.addImportDeclaration({
152
+ moduleSpecifier: '@equinor/roma-framework',
153
+ namedImports: [{ name: 'RomaBreadcrumbLayout', alias }],
154
+ });
155
+ return { code: source.getFullText(), map: null };
156
+ },
157
+ handleHotUpdate(context) {
158
+ if (!dependencies.has((0, vite_1.normalizePath)(context.file)))
159
+ return;
160
+ const module = context.server.moduleGraph.getModuleById(routeFile);
161
+ if (!module)
162
+ return;
163
+ context.server.moduleGraph.invalidateModule(module);
164
+ return [...new Set([...context.modules, module])];
165
+ },
166
+ };
167
+ }
168
+ //# sourceMappingURL=breadcrumbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/vite/breadcrumbs.ts"],"names":[],"mappings":";;AAsCA,sDAgMC;AAtOD,qCAAuC;AACvC,yCAA6C;AAC7C,uCAMkB;AAClB,+BAAkD;AAOlD,SAAS,MAAM,CAAC,UAAsB;IACpC,OACE,eAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC;QAC1C,eAAI,CAAC,cAAc,CAAC,UAAU,CAAC;QAC/B,eAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,EACtC,CAAC;QACD,UAAU,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC;IAC1C,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,QAAQ,CAAC,MAA+B,EAAE,IAAY;IAC7D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