@simplysf/simply-utam-core 0.2.0 → 0.3.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 (76) hide show
  1. package/README.md +72 -16
  2. package/lib/forceignore/forceignore-manager.d.ts +30 -0
  3. package/lib/forceignore/forceignore-manager.js +28 -10
  4. package/lib/forceignore/forceignore-manager.js.map +1 -1
  5. package/lib/forceignore/index.d.ts +1 -1
  6. package/lib/forceignore/index.js +1 -1
  7. package/lib/forceignore/index.js.map +1 -1
  8. package/lib/gitignore/gitignore-manager.d.ts +64 -0
  9. package/lib/gitignore/gitignore-manager.js +96 -0
  10. package/lib/gitignore/gitignore-manager.js.map +1 -0
  11. package/lib/gitignore/index.d.ts +1 -0
  12. package/lib/gitignore/index.js +17 -0
  13. package/lib/gitignore/index.js.map +1 -0
  14. package/lib/index.d.ts +3 -1
  15. package/lib/index.js +3 -1
  16. package/lib/index.js.map +1 -1
  17. package/lib/namespaces/namespace-map.d.ts +18 -0
  18. package/lib/namespaces/namespace-map.js +75 -0
  19. package/lib/namespaces/namespace-map.js.map +1 -0
  20. package/lib/namespaces/namespace-rewriter.js +2 -47
  21. package/lib/namespaces/namespace-rewriter.js.map +1 -1
  22. package/lib/scaffold/project-scaffolder.d.ts +26 -1
  23. package/lib/scaffold/project-scaffolder.js +81 -11
  24. package/lib/scaffold/project-scaffolder.js.map +1 -1
  25. package/lib/snapshot/capture.d.ts +56 -0
  26. package/lib/snapshot/capture.js +115 -0
  27. package/lib/snapshot/capture.js.map +1 -0
  28. package/lib/snapshot/console.d.ts +25 -0
  29. package/lib/snapshot/console.js +74 -0
  30. package/lib/snapshot/console.js.map +1 -0
  31. package/lib/snapshot/describe.d.ts +27 -0
  32. package/lib/snapshot/describe.js +76 -0
  33. package/lib/snapshot/describe.js.map +1 -0
  34. package/lib/snapshot/files.d.ts +85 -0
  35. package/lib/snapshot/files.js +185 -0
  36. package/lib/snapshot/files.js.map +1 -0
  37. package/lib/snapshot/find.d.ts +36 -0
  38. package/lib/snapshot/find.js +186 -0
  39. package/lib/snapshot/find.js.map +1 -0
  40. package/lib/snapshot/format.d.ts +96 -0
  41. package/lib/snapshot/format.js +100 -0
  42. package/lib/snapshot/format.js.map +1 -0
  43. package/lib/snapshot/header.d.ts +38 -0
  44. package/lib/snapshot/header.js +120 -0
  45. package/lib/snapshot/header.js.map +1 -0
  46. package/lib/snapshot/index.d.ts +13 -0
  47. package/lib/snapshot/index.js +28 -0
  48. package/lib/snapshot/index.js.map +1 -0
  49. package/lib/snapshot/locate.d.ts +61 -0
  50. package/lib/snapshot/locate.js +110 -0
  51. package/lib/snapshot/locate.js.map +1 -0
  52. package/lib/snapshot/lookup.d.ts +53 -0
  53. package/lib/snapshot/lookup.js +188 -0
  54. package/lib/snapshot/lookup.js.map +1 -0
  55. package/lib/snapshot/page-object-index.d.ts +149 -0
  56. package/lib/snapshot/page-object-index.js +806 -0
  57. package/lib/snapshot/page-object-index.js.map +1 -0
  58. package/lib/snapshot/page-object-packages.d.ts +41 -0
  59. package/lib/snapshot/page-object-packages.js +115 -0
  60. package/lib/snapshot/page-object-packages.js.map +1 -0
  61. package/lib/snapshot/path.d.ts +102 -0
  62. package/lib/snapshot/path.js +381 -0
  63. package/lib/snapshot/path.js.map +1 -0
  64. package/lib/snapshot/query-result.d.ts +20 -0
  65. package/lib/snapshot/query-result.js +32 -0
  66. package/lib/snapshot/query-result.js.map +1 -0
  67. package/lib/snapshot/selector.d.ts +103 -0
  68. package/lib/snapshot/selector.js +280 -0
  69. package/lib/snapshot/selector.js.map +1 -0
  70. package/lib/snapshot/tree.d.ts +76 -0
  71. package/lib/snapshot/tree.js +201 -0
  72. package/lib/snapshot/tree.js.map +1 -0
  73. package/lib/snapshot/walker.js +532 -0
  74. package/package.json +11 -3
  75. package/templates/dom-snapshot.steps.mjs +34 -0
  76. package/templates/wdio.conf.mjs +81 -4
package/README.md CHANGED
@@ -138,6 +138,15 @@ internal.
138
138
  | `ForceignoreRule`, `ForceignoreResult`, `ForceignorePlacement` | Types: a rule, what happened to the file, and where rules were written. |
139
139
  | `MergeForceignoreOptions`, `MergeForceignoreResult`, `EnsureForceignoreOptions` | Option and result types for the functions above. |
140
140
 
141
+ ### `.gitignore` Management
142
+
143
+ | Export | Description |
144
+ | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
145
+ | `ensureGitignore(options?)` | Adds `.utam/snapshots/` to a project's `.gitignore` under a `# Ignore UTAM` comment, creating the file when it's missing. |
146
+ | `mergeGitignore(content, options?)` | Pure merge of missing rules into `.gitignore` content; never changes an existing line. Shares `.forceignore`'s merge. |
147
+ | `SIMPLY_UTAM_GITIGNORE_RULES`, `GITIGNORE_FILE` | The rule (an existing `.utam/` rule counts as covering it), and the `.gitignore` file name. |
148
+ | `GitignoreResult`, `MergeGitignoreOptions`, `EnsureGitignoreOptions` | Result and option types for the functions above. |
149
+
141
150
  ### Rules Generation
142
151
 
143
152
  | Export | Description |
@@ -182,22 +191,69 @@ internal.
182
191
 
183
192
  ### Project Scaffolding
184
193
 
185
- | Export | Description |
186
- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
187
- | `scaffoldProject(options?)` | Scaffolds configuration files, template files, Wireit tasks, the page object `exports` entry, and `.forceignore` rules. |
188
- | `injectWireitConfiguration(packageJson, dir)` | Injects standard UTAM Wireit scripts and tasks non-destructively into package.json. |
189
- | `checkMissingDependencies(pkg, required?)` | Detects missing recommended devDependencies. |
190
- | `ensurePageObjectExports(pkg, outputDir?, importDir?)` | Adds the package.json `exports` entry that maps page object imports (`./<importDir>/*`) to the compiled `.js` files in `outputDir`. |
191
- | `PageObjectExportsResult` | Type: what `ensurePageObjectExports` did to `exports`, and why it skipped. |
192
- | `loadTemplate(name, dir?, tokens?)` | Loads an external scaffold template, performing `{{token}}` replacements. |
193
- | `generateGeneratorConfig(sourceDir, appName)` | Generates parsed `generator.config.json` content. |
194
- | `generateUtamConfig(templatesDir?)` | Generates parsed `utam.config.json` content. |
195
- | `generateWdioConfig(sourceDir, dir?)` | Generates formatted `wdio.conf.mjs` content. |
196
- | `generateNamespaceMap(appName, dir?)` | Generates parsed `namespace-map.json` content. |
197
- | `generateHelloFeature(dir?)` | Generates formatted `hello.feature` starter smoke test content. |
198
- | `generateHelloSteps(dir?)` | Generates formatted `hello.steps.mjs` starter step definition content. |
199
- | `DEFAULT_TEMPLATES_DIR` | Path to starter config templates directory. |
200
- | `DEFAULT_REQUIRED_DEV_DEPENDENCIES` | List of standard recommended UTAM devDependencies. |
194
+ | Export | Description |
195
+ | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
196
+ | `scaffoldProject(options?)` | Scaffolds configuration files, template files, Wireit tasks, the page object `exports` entry, and `.forceignore` rules. |
197
+ | `injectWireitConfiguration(packageJson, dir)` | Injects standard UTAM Wireit scripts and tasks non-destructively into package.json. |
198
+ | `checkMissingDependencies(pkg, required?)` | Detects missing recommended devDependencies. |
199
+ | `ensurePageObjectExports(pkg, outputDir?, importDir?)` | Adds the package.json `exports` entry that maps page object imports (`./<importDir>/*`) to the compiled `.js` files in `outputDir`. |
200
+ | `PageObjectExportsResult` | Type: what `ensurePageObjectExports` did to `exports`, and why it skipped. |
201
+ | `loadTemplate(name, dir?, tokens?)` | Loads an external scaffold template, performing `{{token}}` replacements. |
202
+ | `generateGeneratorConfig(sourceDir, appName)` | Generates parsed `generator.config.json` content. |
203
+ | `generateUtamConfig(templatesDir?)` | Generates parsed `utam.config.json` content. |
204
+ | `generateWdioConfig(sourceDir, dir?, testDirs?)` | Generates formatted `wdio.conf.mjs` content. Its `specs` and `cucumberOpts.require` also cover each of `testDirs` the `<sourceDir>` globs miss. |
205
+ | `generateNamespaceMap(appName, dir?)` | Generates parsed `namespace-map.json` content. |
206
+ | `generateHelloFeature(dir?)` | Generates formatted `hello.feature` starter smoke test content. |
207
+ | `generateHelloSteps(dir?)` | Generates formatted `hello.steps.mjs` starter step definition content. |
208
+ | `generateSnapshotSteps(dir?)` | Generates the DOM snapshot capture step (`dom-snapshot.steps.mjs`). |
209
+ | `DEFAULT_TEMPLATES_DIR` | Path to starter config templates directory. |
210
+ | `DEFAULT_REQUIRED_DEV_DEPENDENCIES` | List of standard recommended UTAM devDependencies. |
211
+
212
+ ### DOM Snapshots
213
+
214
+ Capture a shadow-aware, masked snapshot of the page a WebdriverIO test is on, or of any page from the
215
+ browser console, write it under `.utam/snapshots/`, and query it and the page-object index. Each
216
+ query returns `{ lines, json }`:
217
+ text to print, capped at an output limit, and the same answer as data. The usage guide for people
218
+ and agents ships as the
219
+ [`utam-dom-snapshots` agent skill](../simply-utam/skills/utam-dom-snapshots/SKILL.md) in
220
+ `@simplysf/simply-utam`. See [design 0003](../../docs/design/0003-dom-snapshots.md).
221
+
222
+ | Export | Description |
223
+ | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
224
+ | `captureDomSnapshot(options?)` | Runs the walker in the page through `browser.execute` (the global `browser` by default) or any `SnapshotPage`, and returns the snapshot. Never throws: on a failure it logs a warning through `log` and returns `undefined`. |
225
+ | `domSnapshotSnippet(options?)` | The console snippet: the walker with its options (mask fixed here), wrapped to copy the JSON with the console's `copy` or else download it, and return a one-line summary. ASCII only. |
226
+ | `importDomSnapshot(json, options?)` | Parses snapshot JSON from outside a test run, such as what the snippet copied, and sets `label` when given; the rest of `meta` is kept. Throws `DomSnapshotError`. |
227
+ | `writeDomSnapshot(snapshot, options?)` | Writes the snapshot to `.utam/snapshots/<run id>/<name>.json` and a copy to `latest.json`, replaced through a rename; returns the path. The run id is `runId`, then `UTAM_SNAPSHOT_RUN_ID`, then the time this process first wrote a snapshot. A capture with no scenario is named `manual--<label or number>`. |
228
+ | `pruneDomSnapshots(options?)` | Deletes all but the newest `keepRuns` run folders (default 10), by when each was last written, then by name with numbers compared as numbers; returns the folders deleted. The `manual` folder is kept and not counted. The scaffolded `onComplete` hook runs it, so the run just finished is one of the 10. |
229
+ | `snapshotRunId(date?)` | A run id for `UTAM_SNAPSHOT_RUN_ID`: the time (now by default) as `20261016T120000`. The scaffolded `onPrepare` hook sets it. |
230
+ | `readDomSnapshot(file)`, `parseDomSnapshot(json)` | Reads or parses a snapshot, checks its `format` and `version`, and numbers its node handles (`n1`, `n2`, …). Throws `DomSnapshotError` otherwise. |
231
+ | `serializeDomSnapshot(snapshot)` | The snapshot as file JSON: node addresses, without the handles added on read. |
232
+ | `findNodes(snapshot, options)` | Nodes matching text, an attribute, a tag or a class, visible first; or with `css`, a CSS selector as UTAM's `findElement` runs it, in document order, the first marked, in the document or `within` a node's light DOM or `shadow` root. |
233
+ | `querySnapshot(snapshot, selector, scope?)` | The nodes a CSS selector matches in a scope, in document order, as data, with notes on what the snapshot can't judge, such as names on pruned wrappers. |
234
+ | `componentPath(snapshot, handle, options?)`, `componentPathByText(snapshot, text, options?)` | The custom elements from the document down to a node, annotated from the page-object index: page objects, routes, root selector and scope warnings. |
235
+ | `subtree(snapshot, handle?, options?)` | The tree under a node to a depth, shadow root first, then light DOM. |
236
+ | `nodeDetails(snapshot, handle, options?)`, `nodeAncestors(snapshot, handle, options?)` | One node in full; or its ancestors, nearest first, with each shadow crossing. |
237
+ | `utamErrorHint(snapshot, index?)`, `snapshotHeader(snapshot, options?)` | For UTAM's not-found error, the `find --css` that repeats its search; and the header every snapshot command prints. |
238
+ | `buildPageObjectIndex(options?)` | Indexes the project's own page objects (from `utam.config.json`) and the page-object packages that `generator.config.json` `namespaces` and `.utam/namespace-map.json` map to, by the tags they cover. A mapped package that isn't installed becomes a warning. |
239
+ | `lookupPageObject(index, query, options?)` | The page objects for a tag, or one page object by name, import path or short name: import path, methods with what they do, and public and private elements. |
240
+ | `searchPageObjects(index, words, options?)` | Page objects whose name, import path, tags or description contain every word, name matches first. |
241
+ | `DomSnapshotError` | Thrown for input that isn't a snapshot this version can read. |
242
+ | `DOM_SNAPSHOT_FORMAT`, `DOM_SNAPSHOT_VERSION` | `'simply-utam-dom-snapshot'`, `1`. |
243
+ | `LATEST_SNAPSHOT`, `DEFAULT_OUTPUT_LIMIT` | `'.utam/snapshots/latest.json'`, and `200`, the default text output limit in lines. |
244
+ | `MANUAL_RUN_ID` | `'manual'`: the run id for captures made outside a test run, such as from the console. |
245
+ | `SNAPSHOT_MASK_ENV`, `SNAPSHOT_RUN_ID_ENV` | `'UTAM_SNAPSHOT_MASK'` (`structure`, `labels`, `aria` or `full`), `'UTAM_SNAPSHOT_RUN_ID'`. Read through each function's `env` option. |
246
+ | `DomSnapshot`, `DomNode`, `DomSnapshotMeta` | Types: a snapshot, one element in it, and its metadata. |
247
+ | `ShadowMode`, `SnapshotMask`, `SnapshotTrigger` | Types: `native`, `synthetic`, `unknown` or `unreadable`; the mask mode; `failure`, `step` or `manual`. |
248
+ | `SnapshotBrowser`, `SnapshotPage`, `SnapshotFileSystem` | Structural types: what capture needs of a browser, any other way to run the walker, and the file system calls (`mkdir`, `writeFile`, `readdir`, `stat`, `rm`, `rename`). |
249
+ | `PageObjectIndex`, `PageObjectEntry`, `PageObjectElement` | Types: the index, one page object, and one of its elements. |
250
+ | `PageObjectMethod`, `PageObjectArg`, `PageObjectMatch` | Types: a method with its parameters and `compose` summary, a parameter, and why a query matched a page object. |
251
+ | `FindOptions`, `FindResult`, `FoundNode`, `SelectorScope`, `SelectorMatches` | Option and result types for `find` and the selector check. |
252
+ | `PathOptions`, `PathResult`, `PathByTextResult`, `PathStep`, `PathAnnotation`, `ReachableThrough`, `ScopeMismatch` | Option and result types for `path`. |
253
+ | `SubtreeOptions`, `NodeDetails`, `AncestorLine`, `AncestorsResult`, `UtamErrorHint`, `SnapshotHeaderOptions` | Option and result types for `tree`, `node` and the header. |
254
+ | `LookupResult`, `SearchResult`, `SearchResultLine`, `QueryResult` | Result types for the queries above. |
255
+ | `CaptureDomSnapshotOptions`, `WriteDomSnapshotOptions`, `PruneDomSnapshotsOptions`, `DomSnapshotSnippetOptions`, `ImportDomSnapshotOptions` | Option types for capture, files, the console snippet and import. |
256
+ | `BuildPageObjectIndexOptions`, `QueryOutputOptions` | Option types for the index and its queries. |
201
257
 
202
258
  WebdriverIO and UTAM are not dependencies: the browser and UTAM objects are typed structurally, so
203
259
  the package works with whichever versions your test project already uses.
@@ -118,6 +118,26 @@ export interface ForceignoreResult extends Omit<MergeForceignoreResult, 'content
118
118
  * @returns The merged content and a description of what changed.
119
119
  */
120
120
  export declare function mergeForceignore(content: string, options?: MergeForceignoreOptions): MergeForceignoreResult;
121
+ /** What {@link mergeIgnoreRules} needs to know about an ignore file. */
122
+ export interface IgnoreFileMerge {
123
+ rules: readonly ForceignoreRule[];
124
+ regionStart?: string;
125
+ regionEnd?: string;
126
+ /** The comment line that heads the added rules. */
127
+ header: string;
128
+ /** The file's name, for warnings. */
129
+ fileName: string;
130
+ }
131
+ /**
132
+ * Adds missing rules to an ignore file's content (`.forceignore`, `.gitignore`) without changing any
133
+ * existing line: under the first header comment if there is one, otherwise in a new block above the
134
+ * customization region's end marker, or at the end.
135
+ *
136
+ * @param content - The file's current content; an empty string for a new file.
137
+ * @param merge - The rules, region markers, header and file name.
138
+ * @returns The merged content and a description of what changed.
139
+ */
140
+ export declare function mergeIgnoreRules(content: string, merge: IgnoreFileMerge): MergeForceignoreResult;
121
141
  /**
122
142
  * Builds .forceignore rules for UTAM test folders that sit inside a Salesforce package directory.
123
143
  *
@@ -132,6 +152,16 @@ export declare function mergeForceignore(content: string, options?: MergeForceig
132
152
  * @returns One rule per test folder that needs one, without duplicates.
133
153
  */
134
154
  export declare function resolveUtamTestIgnoreRules(testDirs: string[], packageDirectories: string[]): ForceignoreRule[];
155
+ /**
156
+ * Replaces a file's content by writing a temporary file next to it and renaming it into place, so an
157
+ * interrupted write can't leave the project's file truncated. A symlink is followed, an existing file's
158
+ * permissions are kept, and a read-only file is refused just as a plain write would refuse it.
159
+ *
160
+ * When that isn't possible (the folder doesn't allow new files, or on Windows another process briefly
161
+ * holds the file), the temporary file is removed and the file is written in place instead. An error
162
+ * from that write is thrown.
163
+ */
164
+ export declare function writeFileSafely(filePath: string, content: string): void;
135
165
  /**
136
166
  * Ensures a project's .forceignore covers UTAM artifacts, adding only the missing rules.
137
167
  *
@@ -76,11 +76,11 @@ function findBlockEnd(lines, headerIndex) {
76
76
  /**
77
77
  * Finds the index of the region's end marker, or a warning when the region is malformed.
78
78
  */
79
- function findRegionEnd(lines, regionStart, regionEnd) {
79
+ function findRegionEnd(lines, regionStart, regionEnd, fileName) {
80
80
  if (!regionStart || !regionEnd) {
81
81
  // An empty marker would match every blank line.
82
82
  return {
83
- warning: `A customization region marker is empty, so UTAM rules were added at the end of ${FORCEIGNORE_FILE}.`,
83
+ warning: `A customization region marker is empty, so UTAM rules were added at the end of ${fileName}.`,
84
84
  };
85
85
  }
86
86
  const starts = findMarker(lines, regionStart);
@@ -92,7 +92,7 @@ function findRegionEnd(lines, regionStart, regionEnd) {
92
92
  return { index: ends[0] };
93
93
  }
94
94
  return {
95
- warning: `The customization region ('${regionStart}' … '${regionEnd}') is malformed, so UTAM rules were added at the end of ${FORCEIGNORE_FILE}.`,
95
+ warning: `The customization region ('${regionStart}' … '${regionEnd}') is malformed, so UTAM rules were added at the end of ${fileName}.`,
96
96
  };
97
97
  }
98
98
  /**
@@ -123,9 +123,27 @@ function needsSeparator(lines, index) {
123
123
  * @returns The merged content and a description of what changed.
124
124
  */
125
125
  export function mergeForceignore(content, options) {
126
- const rules = options?.rules ?? SIMPLY_UTAM_FORCEIGNORE_RULES;
127
- const regionStart = (options?.regionStart ?? DEFAULT_FORCEIGNORE_REGION.start).trim();
128
- const regionEnd = (options?.regionEnd ?? DEFAULT_FORCEIGNORE_REGION.end).trim();
126
+ return mergeIgnoreRules(content, {
127
+ rules: options?.rules ?? SIMPLY_UTAM_FORCEIGNORE_RULES,
128
+ regionStart: options?.regionStart,
129
+ regionEnd: options?.regionEnd,
130
+ header: FORCEIGNORE_HEADER,
131
+ fileName: FORCEIGNORE_FILE,
132
+ });
133
+ }
134
+ /**
135
+ * Adds missing rules to an ignore file's content (`.forceignore`, `.gitignore`) without changing any
136
+ * existing line: under the first header comment if there is one, otherwise in a new block above the
137
+ * customization region's end marker, or at the end.
138
+ *
139
+ * @param content - The file's current content; an empty string for a new file.
140
+ * @param merge - The rules, region markers, header and file name.
141
+ * @returns The merged content and a description of what changed.
142
+ */
143
+ export function mergeIgnoreRules(content, merge) {
144
+ const { rules, header, fileName } = merge;
145
+ const regionStart = (merge.regionStart ?? DEFAULT_FORCEIGNORE_REGION.start).trim();
146
+ const regionEnd = (merge.regionEnd ?? DEFAULT_FORCEIGNORE_REGION.end).trim();
129
147
  const bom = content.startsWith(BYTE_ORDER_MARK) ? BYTE_ORDER_MARK : '';
130
148
  const body = content.slice(bom.length);
131
149
  const lines = splitLines(body);
@@ -140,15 +158,15 @@ export function mergeForceignore(content, options) {
140
158
  let insertAt;
141
159
  let newLines;
142
160
  let placement;
143
- const headerIndex = lines.findIndex((line) => line.text.trim() === FORCEIGNORE_HEADER);
161
+ const headerIndex = lines.findIndex((line) => line.text.trim() === header);
144
162
  if (headerIndex === -1) {
145
- const region = findRegionEnd(lines, regionStart, regionEnd);
163
+ const region = findRegionEnd(lines, regionStart, regionEnd, fileName);
146
164
  if (region.warning) {
147
165
  warnings.push(region.warning);
148
166
  }
149
167
  placement = region.index === undefined ? 'end' : 'region';
150
168
  insertAt = region.index ?? lines.length;
151
- newLines = [...(needsSeparator(lines, insertAt) ? [''] : []), FORCEIGNORE_HEADER, ...addedPatterns];
169
+ newLines = [...(needsSeparator(lines, insertAt) ? [''] : []), header, ...addedPatterns];
152
170
  }
153
171
  else {
154
172
  placement = 'block';
@@ -224,7 +242,7 @@ export function resolveUtamTestIgnoreRules(testDirs, packageDirectories) {
224
242
  * holds the file), the temporary file is removed and the file is written in place instead. An error
225
243
  * from that write is thrown.
226
244
  */
227
- function writeFileSafely(filePath, content) {
245
+ export function writeFileSafely(filePath, content) {
228
246
  const exists = fs.existsSync(filePath);
229
247
  const target = exists ? fs.realpathSync(filePath) : filePath;
230
248
  if (exists) {
@@ -1 +1 @@
1
- {"version":3,"file":"forceignore-manager.js","sourceRoot":"","sources":["../../src/forceignore/forceignore-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,0BAA0B;IACjC,GAAG,EAAE,wBAAwB;CACrB,CAAC;AAiBX;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAA+B;IACvE,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE;IACrG,EAAE,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAAE;IACxF,EAAE,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAAE,CAAC,uBAAuB,CAAC,EAAE;CACjF,CAAC;AA2FF,MAAM,eAAe,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAOpD,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,OAAO,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,C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ager.js';
1
+ export { DEFAULT_FORCEIGNORE_REGION, FORCEIGNORE_FILE, FORCEIGNORE_HEADER, SIMPLY_UTAM_FORCEIGNORE_RULES, ensureForceignore, mergeForceignore, resolveUtamTestIgnoreRules, type EnsureForceignoreOptions, type ForceignorePlacement, type ForceignoreResult, type ForceignoreRule, type MergeForceignoreOptions, type MergeForceignoreResult, } from './forceignore-manager.js';
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export * from './forceignore-manager.js';
16
+ export { DEFAULT_FORCEIGNORE_REGION, FORCEIGNORE_FILE, FORCEIGNORE_HEADER, SIMPLY_UTAM_FORCEIGNORE_RULES, ensureForceignore, mergeForceignore, resolveUtamTestIgnoreRules, } from './forceignore-manager.js';
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/forceignore/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/forceignore/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,EAC7B,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,GAO3B,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { type ForceignoreRule, type MergeForceignoreResult } from '../forceignore/forceignore-manager.js';
2
+ /**
3
+ * File name of git's ignore file, relative to the project root.
4
+ */
5
+ export declare const GITIGNORE_FILE = ".gitignore";
6
+ /**
7
+ * Rules that keep DOM snapshots out of git. Snapshots are per-run output and can hold page text, so
8
+ * they're ignored; the rest of `.utam/`, such as `namespace-map.json`, is project configuration.
9
+ */
10
+ export declare const SIMPLY_UTAM_GITIGNORE_RULES: readonly ForceignoreRule[];
11
+ /**
12
+ * Options for merging UTAM rules into .gitignore content.
13
+ */
14
+ export interface MergeGitignoreOptions {
15
+ /**
16
+ * Rules that must be present. Defaults to SIMPLY_UTAM_GITIGNORE_RULES.
17
+ */
18
+ rules?: readonly ForceignoreRule[];
19
+ }
20
+ /**
21
+ * Options for ensuring a project's .gitignore keeps UTAM output out of git.
22
+ */
23
+ export interface EnsureGitignoreOptions extends MergeGitignoreOptions {
24
+ /**
25
+ * Root directory of the consumer project. Defaults to current working directory.
26
+ */
27
+ projectDir?: string;
28
+ /**
29
+ * If true, computes the result without writing to disk.
30
+ */
31
+ dryRun?: boolean;
32
+ }
33
+ /**
34
+ * Outcome of ensuring a project's .gitignore keeps UTAM output out of git.
35
+ */
36
+ export interface GitignoreResult extends Omit<MergeForceignoreResult, 'content' | 'action'> {
37
+ /**
38
+ * Path of the .gitignore file, relative to the project root.
39
+ */
40
+ path: string;
41
+ /**
42
+ * What happened to the file. 'created' wrote a new file, and 'failed' means the file could not be
43
+ * read or written (the reason is in warnings).
44
+ */
45
+ action: 'created' | 'appended' | 'inserted' | 'unchanged' | 'failed';
46
+ }
47
+ /**
48
+ * Merges missing UTAM rules into .gitignore content without changing any existing line, under a
49
+ * `# Ignore UTAM` comment, as `mergeForceignore` does for .forceignore.
50
+ *
51
+ * @param content - The current .gitignore content. An empty string for a new file.
52
+ * @param options - Rules to ensure.
53
+ * @returns The merged content and a description of what changed.
54
+ */
55
+ export declare function mergeGitignore(content: string, options?: MergeGitignoreOptions): MergeForceignoreResult;
56
+ /**
57
+ * Ensures a project's .gitignore keeps UTAM output out of git, adding only the missing rules and
58
+ * creating the file when it's missing. Existing lines are never removed, rewritten, or reordered. A
59
+ * read or write error is reported as a 'failed' result rather than thrown.
60
+ *
61
+ * @param options - Project directory, rules, and dry-run flag.
62
+ * @returns What happened to the file.
63
+ */
64
+ export declare function ensureGitignore(options?: EnsureGitignoreOptions): GitignoreResult;
@@ -0,0 +1,96 @@
1
+ /*
2
+ * Copyright (c) 2026, SimplySF.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as fs from 'node:fs';
17
+ import * as path from 'node:path';
18
+ import { FORCEIGNORE_HEADER, mergeIgnoreRules, writeFileSafely, } from '../forceignore/forceignore-manager.js';
19
+ /**
20
+ * File name of git's ignore file, relative to the project root.
21
+ */
22
+ export const GITIGNORE_FILE = '.gitignore';
23
+ /**
24
+ * Rules that keep DOM snapshots out of git. Snapshots are per-run output and can hold page text, so
25
+ * they're ignored; the rest of `.utam/`, such as `namespace-map.json`, is project configuration.
26
+ */
27
+ export const SIMPLY_UTAM_GITIGNORE_RULES = [
28
+ {
29
+ pattern: '.utam/snapshots/',
30
+ alternatives: [
31
+ '.utam/snapshots',
32
+ '.utam/snapshots/**',
33
+ '/.utam/snapshots/',
34
+ '/.utam/snapshots',
35
+ '/.utam/snapshots/**',
36
+ '.utam/',
37
+ '.utam',
38
+ '/.utam/',
39
+ '/.utam',
40
+ '.utam/**',
41
+ ],
42
+ },
43
+ ];
44
+ /**
45
+ * Merges missing UTAM rules into .gitignore content without changing any existing line, under a
46
+ * `# Ignore UTAM` comment, as `mergeForceignore` does for .forceignore.
47
+ *
48
+ * @param content - The current .gitignore content. An empty string for a new file.
49
+ * @param options - Rules to ensure.
50
+ * @returns The merged content and a description of what changed.
51
+ */
52
+ export function mergeGitignore(content, options) {
53
+ return mergeIgnoreRules(content, {
54
+ rules: options?.rules ?? SIMPLY_UTAM_GITIGNORE_RULES,
55
+ header: FORCEIGNORE_HEADER,
56
+ fileName: GITIGNORE_FILE,
57
+ });
58
+ }
59
+ /**
60
+ * Ensures a project's .gitignore keeps UTAM output out of git, adding only the missing rules and
61
+ * creating the file when it's missing. Existing lines are never removed, rewritten, or reordered. A
62
+ * read or write error is reported as a 'failed' result rather than thrown.
63
+ *
64
+ * @param options - Project directory, rules, and dry-run flag.
65
+ * @returns What happened to the file.
66
+ */
67
+ export function ensureGitignore(options) {
68
+ const projectDir = path.resolve(options?.projectDir ?? process.cwd());
69
+ const filePath = path.join(projectDir, GITIGNORE_FILE);
70
+ const exists = fs.existsSync(filePath);
71
+ let merged;
72
+ try {
73
+ merged = mergeGitignore(exists ? fs.readFileSync(filePath, 'utf-8') : '', options);
74
+ if (merged.action !== 'unchanged' && !options?.dryRun) {
75
+ writeFileSafely(filePath, merged.content);
76
+ }
77
+ }
78
+ catch (error) {
79
+ const reason = error instanceof Error ? error.message : String(error);
80
+ return {
81
+ path: GITIGNORE_FILE,
82
+ action: 'failed',
83
+ addedPatterns: [],
84
+ warnings: [`Could not update ${GITIGNORE_FILE}, so UTAM rules were not added: ${reason}`],
85
+ };
86
+ }
87
+ const action = exists || merged.action === 'unchanged' ? merged.action : 'created';
88
+ return {
89
+ path: GITIGNORE_FILE,
90
+ action,
91
+ placement: merged.placement,
92
+ addedPatterns: merged.addedPatterns,
93
+ warnings: merged.warnings,
94
+ };
95
+ }
96
+ //# sourceMappingURL=gitignore-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitignore-manager.js","sourceRoot":"","sources":["../../src/gitignore/gitignore-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,GAGhB,MAAM,uCAAuC,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,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C,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO;YACL,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,EAAE;YACjB,QAAQ,EAAE,CAAC,oBAAoB,cAAc,mCAAmC,MAAM,EAAE,CAAC;SAC1F,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACnF,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,MAAM;QACN,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export { GITIGNORE_FILE, SIMPLY_UTAM_GITIGNORE_RULES, ensureGitignore, mergeGitignore, type EnsureGitignoreOptions, type GitignoreResult, type MergeGitignoreOptions, } from './gitignore-manager.js';
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright (c) 2026, SimplySF.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export { GITIGNORE_FILE, SIMPLY_UTAM_GITIGNORE_RULES, ensureGitignore, mergeGitignore, } from './gitignore-manager.js';
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gitignore/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,EACd,2BAA2B,EAC3B,eAAe,EACf,cAAc,GAIf,MAAM,wBAAwB,CAAC"}
package/lib/index.d.ts CHANGED
@@ -4,8 +4,10 @@ export { LightningNavigator, goToLoginUrl, goToExperiencePage, loginAsUser, logi
4
4
  export { formatUtamHtml, getUtamHtml, logUtamHtml, type UtamElementLike, type UtamHtml } from './utam-html.js';
5
5
  export { findLwcDirectories, discoverComponentsInPackageDir, discoverProject, type SfdxPackageDirectory, type SfdxProjectConfig, type DiscoveredLwcComponent, type DiscoveredProject, } from './discovery/index.js';
6
6
  export { FORCEIGNORE_FILE, FORCEIGNORE_HEADER, DEFAULT_FORCEIGNORE_REGION, SIMPLY_UTAM_FORCEIGNORE_RULES, mergeForceignore, resolveUtamTestIgnoreRules, ensureForceignore, type ForceignoreRule, type ForceignorePlacement, type MergeForceignoreOptions, type MergeForceignoreResult, type EnsureForceignoreOptions, type ForceignoreResult, } from './forceignore/index.js';
7
+ export { GITIGNORE_FILE, SIMPLY_UTAM_GITIGNORE_RULES, ensureGitignore, mergeGitignore, type EnsureGitignoreOptions, type GitignoreResult, type MergeGitignoreOptions, } from './gitignore/index.js';
7
8
  export { ROOT_TARGETS, convertLwcNameToHtml, getTargetsFromMeta, generateLwcRules, type GenerateRulesOptions, type RuleAction, type GenerateRulesResult, } from './rules/index.js';
8
9
  export { detectIndentation, findUtamOverridesFiles, walkElements, mergeElements, applyUtamOverrides, type ApplyOverridesOptions, type OverrideChange, type FileOverrideResult, type ApplyOverridesResult, type UtamOverrideItem, } from './overrides/index.js';
9
10
  export { findUtamJsonFiles, updateValueWithMappings, rewriteUtamNamespaces, type RewriteNamespacesOptions, type NamespaceReplacement, type FileRewriteResult, type RewriteNamespacesResult, } from './namespaces/index.js';
10
11
  export { parseGherkinDocument, extractStepsFromGherkin, normalizeExpression, extractStepExpressionsFromContent, compileStepExpressions, matchStepAgainstExpressions, formatParameterNames, generateStepSnippet, formatCode, resolveGlobs, resolveDefaultTargetOutput, generateCucumberSteps, type StepSemanticKeyword, type ParsedGherkinStep, type RawExtractedExpression, type CompiledStepExpression, type GeneratedStepSnippet, type GenerateStepsOptions, type GenerateStepsResult, } from './steps/index.js';
11
- export { DEFAULT_TEMPLATES_DIR, DEFAULT_REQUIRED_DEV_DEPENDENCIES, loadTemplate, generateGeneratorConfig, generateUtamConfig, generateWdioConfig, generateNamespaceMap, generateHelloFeature, generateHelloSteps, injectWireitConfiguration, checkMissingDependencies, ensurePageObjectExports, scaffoldProject, type PageObjectExportsResult, type ScaffoldOptions, type ScaffoldResult, } from './scaffold/index.js';
12
+ export { DEFAULT_TEMPLATES_DIR, DEFAULT_REQUIRED_DEV_DEPENDENCIES, loadTemplate, generateGeneratorConfig, generateUtamConfig, generateWdioConfig, generateNamespaceMap, generateHelloFeature, generateHelloSteps, generateSnapshotSteps, injectWireitConfiguration, checkMissingDependencies, ensurePageObjectExports, scaffoldProject, type PageObjectExportsResult, type ScaffoldOptions, type ScaffoldResult, } from './scaffold/index.js';
13
+ export { DEFAULT_OUTPUT_LIMIT, DOM_SNAPSHOT_FORMAT, DOM_SNAPSHOT_VERSION, DomSnapshotError, LATEST_SNAPSHOT, MANUAL_RUN_ID, SNAPSHOT_MASK_ENV, SNAPSHOT_RUN_ID_ENV, buildPageObjectIndex, captureDomSnapshot, componentPath, componentPathByText, domSnapshotSnippet, findNodes, importDomSnapshot, nodeAncestors, nodeDetails, querySnapshot, snapshotHeader, subtree, utamErrorHint, parseDomSnapshot, pruneDomSnapshots, readDomSnapshot, serializeDomSnapshot, snapshotRunId, writeDomSnapshot, type AncestorLine, type AncestorsResult, type CaptureDomSnapshotOptions, type DomSnapshotSnippetOptions, type ImportDomSnapshotOptions, type FindOptions, type FindResult, type FoundNode, type NodeDetails, type PathAnnotation, type PathByTextResult, type PathOptions, type PathResult, type PathStep, type ReachableThrough, type ScopeMismatch, type SelectorMatches, type SelectorScope, type SnapshotHeaderOptions, type SubtreeOptions, type UtamErrorHint, type DomNode, type DomSnapshot, type DomSnapshotMeta, type PruneDomSnapshotsOptions, type ShadowMode, type SnapshotBrowser, type SnapshotFileSystem, type SnapshotMask, type SnapshotPage, type SnapshotTrigger, type WriteDomSnapshotOptions, lookupPageObject, searchPageObjects, type BuildPageObjectIndexOptions, type LookupResult, type PageObjectArg, type PageObjectElement, type PageObjectEntry, type PageObjectIndex, type PageObjectMatch, type PageObjectMethod, type QueryOutputOptions, type QueryResult, type SearchResult, type SearchResultLine, } from './snapshot/index.js';
package/lib/index.js CHANGED
@@ -26,9 +26,11 @@ export { LightningNavigator, goToLoginUrl, goToExperiencePage, loginAsUser, logi
26
26
  export { formatUtamHtml, getUtamHtml, logUtamHtml } from './utam-html.js';
27
27
  export { findLwcDirectories, discoverComponentsInPackageDir, discoverProject, } from './discovery/index.js';
28
28
  export { FORCEIGNORE_FILE, FORCEIGNORE_HEADER, DEFAULT_FORCEIGNORE_REGION, SIMPLY_UTAM_FORCEIGNORE_RULES, mergeForceignore, resolveUtamTestIgnoreRules, ensureForceignore, } from './forceignore/index.js';
29
+ export { GITIGNORE_FILE, SIMPLY_UTAM_GITIGNORE_RULES, ensureGitignore, mergeGitignore, } from './gitignore/index.js';
29
30
  export { ROOT_TARGETS, convertLwcNameToHtml, getTargetsFromMeta, generateLwcRules, } from './rules/index.js';
30
31
  export { detectIndentation, findUtamOverridesFiles, walkElements, mergeElements, applyUtamOverrides, } from './overrides/index.js';
31
32
  export { findUtamJsonFiles, updateValueWithMappings, rewriteUtamNamespaces, } from './namespaces/index.js';
32
33
  export { parseGherkinDocument, extractStepsFromGherkin, normalizeExpression, extractStepExpressionsFromContent, compileStepExpressions, matchStepAgainstExpressions, formatParameterNames, generateStepSnippet, formatCode, resolveGlobs, resolveDefaultTargetOutput, generateCucumberSteps, } from './steps/index.js';
33
- export { DEFAULT_TEMPLATES_DIR, DEFAULT_REQUIRED_DEV_DEPENDENCIES, loadTemplate, generateGeneratorConfig, generateUtamConfig, generateWdioConfig, generateNamespaceMap, generateHelloFeature, generateHelloSteps, injectWireitConfiguration, checkMissingDependencies, ensurePageObjectExports, scaffoldProject, } from './scaffold/index.js';
34
+ export { DEFAULT_TEMPLATES_DIR, DEFAULT_REQUIRED_DEV_DEPENDENCIES, loadTemplate, generateGeneratorConfig, generateUtamConfig, generateWdioConfig, generateNamespaceMap, generateHelloFeature, generateHelloSteps, generateSnapshotSteps, injectWireitConfiguration, checkMissingDependencies, ensurePageObjectExports, scaffoldProject, } from './scaffold/index.js';
35
+ export { DEFAULT_OUTPUT_LIMIT, DOM_SNAPSHOT_FORMAT, DOM_SNAPSHOT_VERSION, DomSnapshotError, LATEST_SNAPSHOT, MANUAL_RUN_ID, SNAPSHOT_MASK_ENV, SNAPSHOT_RUN_ID_ENV, buildPageObjectIndex, captureDomSnapshot, componentPath, componentPathByText, domSnapshotSnippet, findNodes, importDomSnapshot, nodeAncestors, nodeDetails, querySnapshot, snapshotHeader, subtree, utamErrorHint, parseDomSnapshot, pruneDomSnapshots, readDomSnapshot, serializeDomSnapshot, snapshotRunId, writeDomSnapshot, lookupPageObject, searchPageObjects, } from './snapshot/index.js';
34
36
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,gGAAgG;AAChG,+EAA+E;AAC/E,gGAAgG;AAChG,2CAA2C;AAC3C,EAAE;AACF,iGAAiG;AACjG,uFAAuF;AAEvF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,6BAA6B,EAC7B,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GAGrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;A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AAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,iCAAiC,EACjC,sBAAsB,EACtB,2BAA2B,EAC3B,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,0BAA0B,EAC1B,qBAAqB,GAQtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,iCAAiC,EACjC,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,GAIhB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,aAAa,EACb,cAAc,EACd,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAiChB,gBAAgB,EAChB,iBAAiB,GAalB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /** Where `init` scaffolds the namespace map, relative to the project. */
2
+ export declare const DEFAULT_NAMESPACE_MAP: string;
3
+ export interface NamespaceMapResolution {
4
+ /** `[originalPrefix, replacementPrefix]` pairs, longest original prefix first. */
5
+ sortedMappings: Array<[string, string]>;
6
+ configMissingOrEmpty: boolean;
7
+ notice?: string;
8
+ }
9
+ /**
10
+ * Read a namespace map, or take the mappings given, sorted so longer, more specific prefixes match
11
+ * first. Internal to core: `rewrite` and the page-object index share it, so both read the file the
12
+ * same way.
13
+ *
14
+ * @param rootDir The project folder a relative `configFile` resolves against.
15
+ * @param configFile The map's path. Defaults to `.utam/namespace-map.json`.
16
+ * @param mappings Mappings to use instead of reading a file.
17
+ */
18
+ export declare function resolveNamespaceMappings(rootDir: string, configFile?: string, mappings?: Record<string, string>): NamespaceMapResolution;