@simplysf/simply-utam-core 0.0.0 → 0.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.
Files changed (64) hide show
  1. package/LICENSE.txt +206 -0
  2. package/README.md +98 -12
  3. package/lib/discovery/index.d.ts +1 -0
  4. package/lib/discovery/index.js +17 -0
  5. package/lib/discovery/index.js.map +1 -0
  6. package/lib/discovery/project-discovery.d.ts +55 -0
  7. package/lib/discovery/project-discovery.js +180 -0
  8. package/lib/discovery/project-discovery.js.map +1 -0
  9. package/lib/index.d.ts +8 -2
  10. package/lib/index.js +8 -2
  11. package/lib/index.js.map +1 -1
  12. package/lib/namespaces/index.d.ts +1 -0
  13. package/lib/namespaces/index.js +17 -0
  14. package/lib/namespaces/index.js.map +1 -0
  15. package/lib/namespaces/namespace-rewriter.d.ts +50 -0
  16. package/lib/namespaces/namespace-rewriter.js +223 -0
  17. package/lib/namespaces/namespace-rewriter.js.map +1 -0
  18. package/lib/navigator.d.ts +133 -5
  19. package/lib/navigator.js +224 -12
  20. package/lib/navigator.js.map +1 -1
  21. package/lib/overrides/index.d.ts +1 -0
  22. package/lib/overrides/index.js +17 -0
  23. package/lib/overrides/index.js.map +1 -0
  24. package/lib/overrides/overrides-merger.d.ts +63 -0
  25. package/lib/overrides/overrides-merger.js +280 -0
  26. package/lib/overrides/overrides-merger.js.map +1 -0
  27. package/lib/rules/index.d.ts +1 -0
  28. package/lib/rules/index.js +17 -0
  29. package/lib/rules/index.js.map +1 -0
  30. package/lib/rules/rules-generator.d.ts +49 -0
  31. package/lib/rules/rules-generator.js +199 -0
  32. package/lib/rules/rules-generator.js.map +1 -0
  33. package/lib/scaffold/index.d.ts +1 -0
  34. package/lib/scaffold/index.js +17 -0
  35. package/lib/scaffold/index.js.map +1 -0
  36. package/lib/scaffold/project-scaffolder.d.ts +148 -0
  37. package/lib/scaffold/project-scaffolder.js +313 -0
  38. package/lib/scaffold/project-scaffolder.js.map +1 -0
  39. package/lib/steps/expression-matcher.d.ts +42 -0
  40. package/lib/steps/expression-matcher.js +106 -0
  41. package/lib/steps/expression-matcher.js.map +1 -0
  42. package/lib/steps/gherkin-parser.d.ts +27 -0
  43. package/lib/steps/gherkin-parser.js +98 -0
  44. package/lib/steps/gherkin-parser.js.map +1 -0
  45. package/lib/steps/index.d.ts +4 -0
  46. package/lib/steps/index.js +20 -0
  47. package/lib/steps/index.js.map +1 -0
  48. package/lib/steps/snippet-generator.d.ts +34 -0
  49. package/lib/steps/snippet-generator.js +101 -0
  50. package/lib/steps/snippet-generator.js.map +1 -0
  51. package/lib/steps/step-scaffolder.d.ts +49 -0
  52. package/lib/steps/step-scaffolder.js +225 -0
  53. package/lib/steps/step-scaffolder.js.map +1 -0
  54. package/lib/test-environment.d.ts +99 -4
  55. package/lib/test-environment.js +302 -4
  56. package/lib/test-environment.js.map +1 -1
  57. package/package.json +34 -4
  58. package/templates/generator.config.json +13 -0
  59. package/templates/hello.feature +4 -0
  60. package/templates/hello.steps.mjs +7 -0
  61. package/templates/namespace-map.json +3 -0
  62. package/templates/utam.config.json +9 -0
  63. package/templates/wdio.conf.mjs +68 -0
  64. package/templates/wireit.json +37 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,206 @@
1
+ Apache License Version 2.0
2
+
3
+ Copyright (c) 2026, SimplySF.
4
+ All rights reserved.
5
+
6
+ Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "{}"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright {yyyy} {name of copyright owner}
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
package/README.md CHANGED
@@ -2,12 +2,13 @@
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/@simplysf/simply-utam-core?label=@simplysf/simply-utam-core)](https://npmjs.com/@simplysf/simply-utam-core) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://raw.githubusercontent.com/SimplySF/simply-utam/main/LICENSE.txt)
4
4
 
5
- Org authentication, Lightning navigation, and debugging helpers for
5
+ Org authentication, Lightning navigation, UTAM compilation helpers, AST transformations, and debugging helpers for
6
6
  [UTAM](https://utam.dev/) UI tests against Salesforce, built by [SimplySF](https://github.com/SimplySF).
7
7
 
8
8
  It logs the test browser in to an org you have already authorized with the Salesforce CLI — no
9
9
  passwords in the test project — and opens Lightning pages directly, so a test starts on the page it
10
- is about instead of clicking its way there.
10
+ is about instead of clicking its way there. It also provides zero-config build transformations for LWC root rules,
11
+ AST overrides, namespace mapping, and offline Cucumber step scaffolding.
11
12
 
12
13
  ## Install
13
14
 
@@ -64,16 +65,28 @@ browser history, WebDriver logs, or a screenshot of the address bar. The org is
64
65
  Everything below is exported from the package root and is semver-covered. Anything not listed is
65
66
  internal.
66
67
 
67
- ### Org authentication
68
-
69
- | Export | Description |
70
- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
71
- | `TestEnvironment` | The org under test. `new TestEnvironment({ username?, env? })` throws when neither a username nor `UTAM_USERNAME` is set. |
72
- | `testEnvironment.getOrg()` | The authenticated `Org`. Authenticates on first call and shares the result; a failure is not cached. |
73
- | `testEnvironment.init()` | Authenticates eagerly, for a runner hook that wants auth failures reported before any test starts. Optional. |
74
- | `testEnvironment.buildFrontdoorUrl(returnUrl?)` | A one-time URL that logs a browser in and lands on `returnUrl`. |
75
- | `USERNAME_ENV` | `'UTAM_USERNAME'`. |
76
- | `TestEnvironmentOptions`, `EnvLike` | Types for the constructor options and an environment-shaped map. |
68
+ ### Org authentication & Environment
69
+
70
+ | Export | Description |
71
+ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
72
+ | `TestEnvironment` | The org under test. `new TestEnvironment({ username?, env?, allowedDomains? })` throws when neither a username nor `UTAM_USERNAME` is set. |
73
+ | `testEnvironment.getOrg()` | The authenticated `Org`. Authenticates on first call and shares the result; a failure is not cached. |
74
+ | `testEnvironment.getConnection()` | The underlying `@salesforce/core` Connection. |
75
+ | `testEnvironment.init()` | Authenticates eagerly, for a runner hook that wants auth failures reported before any test starts. Optional. |
76
+ | `testEnvironment.buildFrontdoorUrl(returnUrl?)` | A one-time URL that logs a browser in and lands on `returnUrl`. |
77
+ | `testEnvironment.buildExperienceFrontdoorUrl(prefix?, ret?)` | One-time single-access login URL for Experience Cloud sites. |
78
+ | `testEnvironment.getOrgId()` | Dynamically queries the 15- or 18-character Salesforce Organization ID. |
79
+ | `testEnvironment.getUserIdByUsername(username)` | Resolves a target username to its Salesforce User record ID. |
80
+ | `testEnvironment.getNetworkIdByPrefix(prefix?)` | Resolves an Experience site prefix to its corresponding Network ID. |
81
+ | `testEnvironment.buildExperienceUrl(prefix?, path?)` | Constructs a fully qualified secure Experience Cloud site URL. |
82
+ | `getTestEnvironment(options?)` | Retrieves the global singleton `TestEnvironment` instance. |
83
+ | `setTestEnvironment(instance)` | Overrides the global `TestEnvironment` singleton. |
84
+ | `resetTestEnvironment()` | Resets and unsets the global `TestEnvironment` singleton. |
85
+ | `isHostAllowed(host, instanceUrl?, allowedDomains?)` | Validates a hostname against Salesforce default patterns and custom overrides. |
86
+ | `validateAndParseSecureUrl(secureUrl, siteId, validator?)` | Validates and parses a raw secure URL retrieved from SiteDetail. |
87
+ | `DEFAULT_ALLOWED_HOST_PATTERNS` | Default trusted Salesforce domain RegExp matchers. |
88
+ | `USERNAME_ENV` | `'UTAM_USERNAME'`. |
89
+ | `TestEnvironmentOptions`, `EnvLike` | Types for the constructor options and an environment-shaped map. |
77
90
 
78
91
  ### Navigation
79
92
 
@@ -85,6 +98,12 @@ internal.
85
98
  | `navigator.goToCreateNewRecord(app, objectApiName)` | An object's new-record form. |
86
99
  | `navigator.goToRecord(app, recordId)` | A record's detail page. |
87
100
  | `navigator.goToRelatedList(app, recordId, relatedListName)` | One of a record's related lists. |
101
+ | `navigator.goToExperiencePage(sitePrefix, pageName)` | Log in and navigate directly to an Experience Cloud community page. |
102
+ | `navigator.loginAsUser(username, returnUrl?)` | Impersonate a user via admin session and redirect to target page. |
103
+ | `navigator.loginAsExperienceUser(username, sitePrefix, pageName)` | Impersonate a user and switch network to an Experience Cloud site. |
104
+ | `goToLoginUrl`, `goToExperiencePage`, `loginAsUser` | Standalone functional wrappers for navigation methods. |
105
+ | `goToApplication`, `goToCreateNewRecord`, `goToRecord` | Standalone functional wrappers for record and app navigation. |
106
+ | `goToRelatedList`, `resolveBrowser` | Standalone helper to open related list and resolve browser instance. |
88
107
  | `applicationPath`, `newRecordPath`, `recordPath`, `relatedListPath` | The Lightning paths the methods above open, for a caller building its own URLs. |
89
108
  | `lightningAppName(app)` | The namespacing rule: `MyApp` becomes `c__MyApp`, a namespaced name is unchanged. |
90
109
  | `NavigableBrowser`, `FrontdoorUrlSource`, `LightningNavigatorOptions` | Structural types: anything with `navigateTo(url)`, anything with `buildFrontdoorUrl(returnUrl?)`. |
@@ -98,6 +117,73 @@ internal.
98
117
  | `formatUtamHtml(utamHtml)` | The colored block `logUtamHtml` writes. |
99
118
  | `UtamElementLike`, `UtamHtml` | Types: any UTAM page object or element, and what it resolved to. |
100
119
 
120
+ ### Discovery
121
+
122
+ | Export | Description |
123
+ | ------------------------------------------------- | ------------------------------------------------------------------------------------- |
124
+ | `discoverProject(rootDir?)` | Discovers `sfdx-project.json`, package directories, namespaces, and LWC components. |
125
+ | `findLwcDirectories(dirPath)` | Recursively locates directories named `lwc`. |
126
+ | `discoverComponentsInPackageDir(pkgDir, rootDir)` | Finds all LWC components and metadata inside a given package directory. |
127
+
128
+ ### Rules Generation
129
+
130
+ | Export | Description |
131
+ | -------------------------------------------- | ------------------------------------------------------------------------------------- |
132
+ | `generateLwcRules(options?)` | Scans LWC components and generates or updates `<component>.rules.json` files. |
133
+ | `convertLwcNameToHtml(componentName, ns?)` | Converts component name to kebab-case HTML tag with namespace prefix. |
134
+ | `getTargetsFromMeta(xmlContent)` | Extracts targets from `<targets>` in a `*.js-meta.xml` file. |
135
+ | `ROOT_TARGETS` | Target page names that designate an LWC as a root component. |
136
+
137
+ ### Overrides Merger
138
+
139
+ | Export | Description |
140
+ | -------------------------------------------- | ------------------------------------------------------------------------------------- |
141
+ | `applyUtamOverrides(options?)` | Deep merges `*.utam-overrides.json` definitions into generated `*.utam.json` files. |
142
+ | `findUtamOverridesFiles(dirPath)` | Locates all `*.utam-overrides.json` files in a directory tree. |
143
+ | `detectIndentation(content)` | Detects indentation formatting of a JSON file (2 spaces, 4 spaces, or tabs). |
144
+ | `mergeElements(target, source)` | Deep merges override properties into a target AST node. |
145
+ | `walkElements(node, callback)` | Traverses AST nodes across root elements, nested elements, and shadow DOM roots. |
146
+
147
+ ### Namespace Rewriting
148
+
149
+ | Export | Description |
150
+ | -------------------------------------------- | ------------------------------------------------------------------------------------- |
151
+ | `rewriteUtamNamespaces(options?)` | Rewrites namespace prefixes across `*.utam.json` files according to mapping config. |
152
+ | `findUtamJsonFiles(dirPath)` | Locates all `*.utam.json` schema files in a directory tree. |
153
+ | `updateValueWithMappings(value, map, list)` | Replaces namespace prefixes in AST values based on longest-match sorting. |
154
+
155
+ ### Step Scaffolding Engine
156
+
157
+ | Export | Description |
158
+ | -------------------------------------------- | ------------------------------------------------------------------------------------- |
159
+ | `generateCucumberSteps(options?)` | Scans Gherkin features, compiles existing step expressions, and scaffolds skeletons. |
160
+ | `parseGherkinDocument(content)` | Parses Gherkin source text into an AST document representation. |
161
+ | `extractStepsFromGherkin(content, path?)` | Extracts all scenario and background steps, normalizing And/But keywords. |
162
+ | `extractStepExpressionsFromContent(content)` | Statically extracts registered step expressions from definition code. |
163
+ | `compileStepExpressions(raw, registry?)` | Compiles string and RegExp expressions using `@cucumber/cucumber-expressions`. |
164
+ | `matchStepAgainstExpressions(stepText, list)`| Matches a feature step text against compiled expressions. |
165
+ | `generateStepSnippet(step, registry?)` | Generates an idiomatic async step snippet with Cucumber expressions. |
166
+ | `formatParameterNames(names, table?, doc?)` | Formats parameter names to eliminate collisions and add dataTable/docString. |
167
+ | `formatCode(code)` | Formats generated TypeScript / JavaScript code using Prettier. |
168
+ | `resolveGlobs(patterns, rootDir)` | Resolves one or more glob patterns or file paths. |
169
+
170
+ ### Project Scaffolding
171
+
172
+ | Export | Description |
173
+ | -------------------------------------------- | ------------------------------------------------------------------------------------- |
174
+ | `scaffoldProject(options?)` | Scaffolds configuration files, template files, and injects Wireit tasks into package. |
175
+ | `injectWireitConfiguration(packageJson, dir)`| Injects standard UTAM Wireit scripts and tasks non-destructively into package.json. |
176
+ | `checkMissingDependencies(pkg, required?)` | Detects missing recommended devDependencies. |
177
+ | `loadTemplate(name, dir?, tokens?)` | Loads an external scaffold template, performing `{{token}}` replacements. |
178
+ | `generateGeneratorConfig(sourceDir, appName)`| Generates parsed `generator.config.json` content. |
179
+ | `generateUtamConfig(templatesDir?)` | Generates parsed `utam.config.json` content. |
180
+ | `generateWdioConfig(sourceDir, dir?)` | Generates formatted `wdio.conf.mjs` content. |
181
+ | `generateNamespaceMap(appName, dir?)` | Generates parsed `namespace-map.json` content. |
182
+ | `generateHelloFeature(dir?)` | Generates formatted `hello.feature` starter smoke test content. |
183
+ | `generateHelloSteps(dir?)` | Generates formatted `hello.steps.mjs` starter step definition content. |
184
+ | `DEFAULT_TEMPLATES_DIR` | Path to starter config templates directory. |
185
+ | `DEFAULT_REQUIRED_DEV_DEPENDENCIES` | List of standard recommended UTAM devDependencies. |
186
+
101
187
  WebdriverIO and UTAM are not dependencies: the browser and UTAM objects are typed structurally, so
102
188
  the package works with whichever versions your test project already uses.
103
189
 
@@ -0,0 +1 @@
1
+ export * from './project-discovery.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 * from './project-discovery.js';
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,55 @@
1
+ export interface SfdxPackageDirectory {
2
+ [key: string]: unknown;
3
+ default?: boolean;
4
+ package?: string;
5
+ path: string;
6
+ versionName?: string;
7
+ versionNumber?: string;
8
+ }
9
+ export interface SfdxProjectConfig {
10
+ [key: string]: unknown;
11
+ namespace?: string;
12
+ packageDirectories: SfdxPackageDirectory[];
13
+ sfdcLoginUrl?: string;
14
+ sourceApiVersion?: string;
15
+ }
16
+ export interface DiscoveredLwcComponent {
17
+ name: string;
18
+ directory: string;
19
+ packageDirectory: string;
20
+ metaFile: string | null;
21
+ hasMetaFile: boolean;
22
+ }
23
+ export interface DiscoveredProject {
24
+ rootDir: string;
25
+ sfdxProjectFile: string | null;
26
+ packageJsonFile: string | null;
27
+ packageName: string | null;
28
+ namespace: string | null;
29
+ packageDirectories: string[];
30
+ defaultPackageDirectory: string | null;
31
+ lwcComponents: DiscoveredLwcComponent[];
32
+ }
33
+ /**
34
+ * Recursively locates all folders named 'lwc' inside the specified directory.
35
+ *
36
+ * @param dirPath - Directory path to search within.
37
+ * @returns Array of absolute paths to discovered 'lwc' directories.
38
+ */
39
+ export declare function findLwcDirectories(dirPath: string): string[];
40
+ /**
41
+ * Discovers LWC components within the given package directory.
42
+ *
43
+ * @param packageDirPath - Path of the package directory.
44
+ * @param rootDir - Root directory of the project.
45
+ * @returns Array of discovered LWC components with metadata.
46
+ */
47
+ export declare function discoverComponentsInPackageDir(packageDirPath: string, rootDir: string): DiscoveredLwcComponent[];
48
+ /**
49
+ * Inspects a Salesforce project workspace and extracts configuration, package directories,
50
+ * packaging namespace, and discovered LWC components.
51
+ *
52
+ * @param rootDir - Root workspace directory to discover.
53
+ * @returns Discovered project configuration and LWC components.
54
+ */
55
+ export declare function discoverProject(rootDir?: string): DiscoveredProject;
@@ -0,0 +1,180 @@
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 fs from 'node:fs';
17
+ import path from 'node:path';
18
+ /**
19
+ * Recursively locates all folders named 'lwc' inside the specified directory.
20
+ *
21
+ * @param dirPath - Directory path to search within.
22
+ * @returns Array of absolute paths to discovered 'lwc' directories.
23
+ */
24
+ export function findLwcDirectories(dirPath) {
25
+ let lwcDirs = [];
26
+ try {
27
+ if (!fs.existsSync(dirPath)) {
28
+ return [];
29
+ }
30
+ const entries = fs.readdirSync(dirPath, { withFileTypes: true });
31
+ for (const entry of entries) {
32
+ const fullPath = path.join(dirPath, entry.name);
33
+ if (entry.isDirectory()) {
34
+ if (entry.name === 'lwc') {
35
+ lwcDirs.push(fullPath);
36
+ }
37
+ else if (entry.name !== 'node_modules' &&
38
+ entry.name !== '.git' &&
39
+ entry.name !== 'dist' &&
40
+ entry.name !== 'lib' &&
41
+ entry.name !== '.wireit' &&
42
+ entry.name !== '.sfdx' &&
43
+ entry.name !== '.sf') {
44
+ lwcDirs = lwcDirs.concat(findLwcDirectories(fullPath));
45
+ }
46
+ }
47
+ }
48
+ }
49
+ catch {
50
+ // Gracefully handle permission or read errors
51
+ }
52
+ return lwcDirs;
53
+ }
54
+ /**
55
+ * Discovers LWC components within the given package directory.
56
+ *
57
+ * @param packageDirPath - Path of the package directory.
58
+ * @param rootDir - Root directory of the project.
59
+ * @returns Array of discovered LWC components with metadata.
60
+ */
61
+ export function discoverComponentsInPackageDir(packageDirPath, rootDir) {
62
+ const components = [];
63
+ const absolutePkgDir = path.isAbsolute(packageDirPath) ? packageDirPath : path.resolve(rootDir, packageDirPath);
64
+ if (!fs.existsSync(absolutePkgDir)) {
65
+ return components;
66
+ }
67
+ const lwcDirs = findLwcDirectories(absolutePkgDir);
68
+ for (const lwcDir of lwcDirs) {
69
+ try {
70
+ const entries = fs.readdirSync(lwcDir, { withFileTypes: true });
71
+ for (const entry of entries) {
72
+ if (entry.isDirectory()) {
73
+ const componentName = entry.name;
74
+ if (componentName.startsWith('.') || componentName === '__tests__') {
75
+ continue;
76
+ }
77
+ const componentDir = path.join(lwcDir, componentName);
78
+ const metaFilePath = path.join(componentDir, `${componentName}.js-meta.xml`);
79
+ const hasMetaFile = fs.existsSync(metaFilePath);
80
+ components.push({
81
+ name: componentName,
82
+ directory: componentDir,
83
+ packageDirectory: packageDirPath,
84
+ metaFile: hasMetaFile ? metaFilePath : null,
85
+ hasMetaFile,
86
+ });
87
+ }
88
+ }
89
+ }
90
+ catch {
91
+ // Gracefully handle directory read errors
92
+ }
93
+ }
94
+ return components;
95
+ }
96
+ function parseSfdxProject(resolvedRoot) {
97
+ let sfdxProjectFile = null;
98
+ let namespace = null;
99
+ const packageDirectories = [];
100
+ let defaultPackageDirectory = null;
101
+ const candidate = path.join(resolvedRoot, 'sfdx-project.json');
102
+ if (fs.existsSync(candidate)) {
103
+ sfdxProjectFile = candidate;
104
+ try {
105
+ const parsed = JSON.parse(fs.readFileSync(candidate, 'utf-8'));
106
+ if (typeof parsed.namespace === 'string' && parsed.namespace.trim()) {
107
+ namespace = parsed.namespace.trim();
108
+ }
109
+ if (Array.isArray(parsed.packageDirectories)) {
110
+ for (const pkgDir of parsed.packageDirectories) {
111
+ if (typeof pkgDir?.path === 'string') {
112
+ packageDirectories.push(pkgDir.path);
113
+ if (pkgDir.default === true && !defaultPackageDirectory) {
114
+ defaultPackageDirectory = pkgDir.path;
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ catch {
121
+ // Continue with empty defaults on JSON read error
122
+ }
123
+ }
124
+ if (packageDirectories.length === 0) {
125
+ for (const fallback of ['force-app', 'sfdx-source', 'src']) {
126
+ if (fs.existsSync(path.join(resolvedRoot, fallback))) {
127
+ packageDirectories.push(fallback);
128
+ }
129
+ }
130
+ }
131
+ if (!defaultPackageDirectory && packageDirectories.length > 0) {
132
+ defaultPackageDirectory = packageDirectories[0];
133
+ }
134
+ return { sfdxProjectFile, namespace, packageDirectories, defaultPackageDirectory };
135
+ }
136
+ function parsePackageJson(resolvedRoot) {
137
+ let packageJsonFile = null;
138
+ let packageName = null;
139
+ const candidate = path.join(resolvedRoot, 'package.json');
140
+ if (fs.existsSync(candidate)) {
141
+ packageJsonFile = candidate;
142
+ try {
143
+ const parsed = JSON.parse(fs.readFileSync(candidate, 'utf-8'));
144
+ if (typeof parsed['name'] === 'string') {
145
+ packageName = parsed['name'];
146
+ }
147
+ }
148
+ catch {
149
+ // Continue with null on parse error
150
+ }
151
+ }
152
+ return { packageJsonFile, packageName };
153
+ }
154
+ /**
155
+ * Inspects a Salesforce project workspace and extracts configuration, package directories,
156
+ * packaging namespace, and discovered LWC components.
157
+ *
158
+ * @param rootDir - Root workspace directory to discover.
159
+ * @returns Discovered project configuration and LWC components.
160
+ */
161
+ export function discoverProject(rootDir = process.cwd()) {
162
+ const resolvedRoot = path.resolve(rootDir);
163
+ const sfdx = parseSfdxProject(resolvedRoot);
164
+ const pkg = parsePackageJson(resolvedRoot);
165
+ const lwcComponents = [];
166
+ for (const pkgDir of sfdx.packageDirectories) {
167
+ lwcComponents.push(...discoverComponentsInPackageDir(pkgDir, resolvedRoot));
168
+ }
169
+ return {
170
+ rootDir: resolvedRoot,
171
+ sfdxProjectFile: sfdx.sfdxProjectFile,
172
+ packageJsonFile: pkg.packageJsonFile,
173
+ packageName: pkg.packageName,
174
+ namespace: sfdx.namespace,
175
+ packageDirectories: sfdx.packageDirectories,
176
+ defaultPackageDirectory: sfdx.defaultPackageDirectory,
177
+ lwcComponents,
178
+ };
179
+ }
180
+ //# sourceMappingURL=project-discovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-discovery.js","sourceRoot":"","sources":["../../src/discovery/project-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAsC7B;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,IAAI,OAAO,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACjE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAChD,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;oBACzB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACzB,CAAC;qBAAM,IACL,KAAK,CAAC,IAAI,KAAK,cAAc;oBAC7B,KAAK,CAAC,IAAI,KAAK,MAAM;oBACrB,KAAK,CAAC,IAAI,KAAK,MAAM;oBACrB,KAAK,CAAC,IAAI,KAAK,KAAK;oBACpB,KAAK,CAAC,IAAI,KAAK,SAAS;oBACxB,KAAK,CAAC,IAAI,KAAK,OAAO;oBACtB,KAAK,CAAC,IAAI,KAAK,KAAK,EACpB,CAAC;oBACD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,kBA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AAE,OAAO,CAAC,CAA4B,CAAC;YAC1F,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;gBACvC,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,oCAAoC;QACtC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;AAC1C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB,OAAO,CAAC,GAAG,EAAE;IAC7D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAE3C,MAAM,aAAa,GAA6B,EAAE,CAAC;IACnD,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC7C,aAAa,CAAC,IAAI,CAAC,GAAG,8BAA8B,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,eAAe,EAAE,GAAG,CAAC,eAAe;QACpC,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;QAC3C,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;QACrD,aAAa;KACd,CAAC;AACJ,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,4 +1,10 @@
1
- export { TestEnvironment, USERNAME_ENV, type EnvLike, type TestEnvironmentOptions } from './test-environment.js';
1
+ export { TestEnvironment, USERNAME_ENV, DEFAULT_ALLOWED_HOST_PATTERNS, isHostAllowed, validateAndParseSecureUrl, getTestEnvironment, setTestEnvironment, resetTestEnvironment, type EnvLike, type TestEnvironmentOptions, } from './test-environment.js';
2
2
  export { applicationPath, lightningAppName, newRecordPath, recordPath, relatedListPath } from './lightning-paths.js';
3
- export { LightningNavigator, type FrontdoorUrlSource, type LightningNavigatorOptions, type NavigableBrowser, } from './navigator.js';
3
+ export { LightningNavigator, goToLoginUrl, goToExperiencePage, loginAsUser, loginAsExperienceUser, goToApplication, goToCreateNewRecord, goToRecord, goToRelatedList, resolveBrowser, type FrontdoorUrlSource, type LightningNavigatorOptions, type NavigableBrowser, } from './navigator.js';
4
4
  export { formatUtamHtml, getUtamHtml, logUtamHtml, type UtamElementLike, type UtamHtml } from './utam-html.js';
5
+ export { findLwcDirectories, discoverComponentsInPackageDir, discoverProject, type SfdxPackageDirectory, type SfdxProjectConfig, type DiscoveredLwcComponent, type DiscoveredProject, } from './discovery/index.js';
6
+ export { ROOT_TARGETS, convertLwcNameToHtml, getTargetsFromMeta, generateLwcRules, type GenerateRulesOptions, type RuleAction, type GenerateRulesResult, } from './rules/index.js';
7
+ export { detectIndentation, findUtamOverridesFiles, walkElements, mergeElements, applyUtamOverrides, type ApplyOverridesOptions, type OverrideChange, type FileOverrideResult, type ApplyOverridesResult, type UtamOverrideItem, } from './overrides/index.js';
8
+ export { findUtamJsonFiles, updateValueWithMappings, rewriteUtamNamespaces, type RewriteNamespacesOptions, type NamespaceReplacement, type FileRewriteResult, type RewriteNamespacesResult, } from './namespaces/index.js';
9
+ 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';
10
+ export { DEFAULT_TEMPLATES_DIR, DEFAULT_REQUIRED_DEV_DEPENDENCIES, loadTemplate, generateGeneratorConfig, generateUtamConfig, generateWdioConfig, generateNamespaceMap, generateHelloFeature, generateHelloSteps, injectWireitConfiguration, checkMissingDependencies, scaffoldProject, type ScaffoldOptions, type ScaffoldResult, } from './scaffold/index.js';