@uuv/runner-commons 1.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.
- package/CHANGELOG.md +16 -0
- package/CONTRIBUTING.md +81 -0
- package/LICENSE +202 -0
- package/README.md +52 -0
- package/dist/CHANGELOG.md +16 -0
- package/dist/CONTRIBUTING.md +81 -0
- package/dist/README.md +52 -0
- package/dist/assets/i18n/template.json +64 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +27 -0
- package/dist/runner/step-definitions/_constant.d.ts +1 -0
- package/dist/runner/step-definitions/_constant.js +4 -0
- package/dist/runner/step-definitions/_i-context.d.ts +6 -0
- package/dist/runner/step-definitions/_i-context.js +2 -0
- package/dist/step-definition-generator/common.d.ts +40 -0
- package/dist/step-definition-generator/common.js +71 -0
- package/dist/step-definition-generator/generate-base-step-definitions.d.ts +7 -0
- package/dist/step-definition-generator/generate-base-step-definitions.js +68 -0
- package/dist/step-definition-generator/generate-based-role-step-definitions.d.ts +23 -0
- package/dist/step-definition-generator/generate-based-role-step-definitions.js +78 -0
- package/dist/step-definition-generator/generate-step-definitions-documentation.d.ts +16 -0
- package/dist/step-definition-generator/generate-step-definitions-documentation.js +128 -0
- package/dist/step-definition-generator/generate-step-definitions.d.ts +17 -0
- package/dist/step-definition-generator/generate-step-definitions.js +28 -0
- package/dist/step-definition-generator/lang-enum.d.ts +4 -0
- package/dist/step-definition-generator/lang-enum.js +8 -0
- package/package.json +41 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
# Change Log
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [1.2.0-beta-20230424] - 2023-04-24
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- [#4](https://github.com/e2e-test-quest/uuv/issues/4)
|
|
12
|
+
MINOR Amélioration du scoring npm
|
|
13
|
+
- [#3](https://github.com/e2e-test-quest/uuv/issues/3)
|
|
14
|
+
MAJOR Initialisation du pipeline
|
|
15
|
+
- [#1](https://github.com/e2e-test-quest/uuv/issues/1)
|
|
16
|
+
MAJOR Rajout de la licence Apache 2.0
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Contributors guide
|
|
2
|
+
|
|
3
|
+
**Want to contribute?**
|
|
4
|
+
We try to make it easy, and all contributions, even the smaller ones, are more than welcome.
|
|
5
|
+
This includes bug reports, fixes, documentation, examples...
|
|
6
|
+
But first, read this page (including the small print at the end).
|
|
7
|
+
|
|
8
|
+
Contributions are available on https://github.com/e2e-test-quest/uuv
|
|
9
|
+
|
|
10
|
+
## Legal
|
|
11
|
+
|
|
12
|
+
All original contributions to _UUV_ are licensed under the
|
|
13
|
+
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),
|
|
14
|
+
version 2.0 or later.
|
|
15
|
+
|
|
16
|
+
All contributions are subject to the [Developer Certificate of Origin](https://developercertificate.org/) (DCO).
|
|
17
|
+
The DCO is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project.
|
|
18
|
+
The DCO text is also included verbatim in the [DCO.txt](DCO.txt) file in the root directory of the repository.
|
|
19
|
+
|
|
20
|
+
Contributors **must** _sign-off_ that they adhere to these requirements by adding a `Signed-off-by` line to commit messages, as shown below:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
This is the commit message
|
|
24
|
+
|
|
25
|
+
Signed-off-by: Joe Dev <joe.dev@developer.example.org>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Git has a handy [`-s` command line option](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) to append this automatically to your commit message:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
$ git commit -s -m 'This is the commit message'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Reporting an issue
|
|
35
|
+
|
|
36
|
+
This project uses GitLab issues to manage the issues.
|
|
37
|
+
|
|
38
|
+
Before creating an issue:
|
|
39
|
+
|
|
40
|
+
1. upgrade your project to the latest released template version, and check whether your bug is still present,
|
|
41
|
+
2. have a look in the opened issues if your problem is already known/tracked, and possibly contribute to the thread with your own information.
|
|
42
|
+
|
|
43
|
+
If none of the above was met, open an issue directly in GitLab, select the appropriate issue template and fill-in each section when applicable.
|
|
44
|
+
|
|
45
|
+
## Submitting a code change
|
|
46
|
+
|
|
47
|
+
### Git Setup
|
|
48
|
+
|
|
49
|
+
Before contributing, make sure you have set up your Git authorship correctly:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git config --global user.name "Your Full Name"
|
|
53
|
+
git config --global user.email your.email@example.com
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Workflow
|
|
57
|
+
|
|
58
|
+
All submissions, including submissions by project members, need to be reviewed before being merged.
|
|
59
|
+
|
|
60
|
+
To contribute:
|
|
61
|
+
|
|
62
|
+
1. Create an issue describing the bug or enhancement you want to propose (select the right issue template).
|
|
63
|
+
2. Make sure the issue has been reviewed and agreed.
|
|
64
|
+
3. Create a Merge Request, from your **own** fork (see [forking workflow](https://docs.github.com/en/get-started/quickstart/fork-a-repo) documentation).
|
|
65
|
+
Don't hesitate to mark your MR as `Draft` as long as you think it's not ready to be reviewed.
|
|
66
|
+
|
|
67
|
+
### Git Commit Conventions
|
|
68
|
+
|
|
69
|
+
In addition to being signed-off according the [Developer Certificate of Origin](https://developercertificate.org/) (see above),
|
|
70
|
+
Git commits in _UUV_ shall be:
|
|
71
|
+
|
|
72
|
+
1. **atomic** (1 commit `=` 1 and only 1 _thing_),
|
|
73
|
+
2. **semantic** (using [semantic-release commit message syntax](https://semantic-release.gitbook.io/semantic-release/#commit-message-format)).
|
|
74
|
+
3. **pattern**
|
|
75
|
+
- **SCOPE** : one of (UUV, COMMONS, CYPRESS, PLAYWRIGHT, ASSISTANT, EXTENSION, DOCS)
|
|
76
|
+
- ***TYPE*** : one of (FEAT, FIX, TECH, REFACTOR)
|
|
77
|
+
- [**SCOPE**] [***TYPE***] #issue_identifier: commit message
|
|
78
|
+
- Example :
|
|
79
|
+
```bash
|
|
80
|
+
[CYPRESS] [FEAT] #51: upgrade library @badeball/cypress-cucumber-preprocessor version
|
|
81
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @uuv/runner-commons
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://e2e-test-quest.github.io/uuv/">
|
|
4
|
+
<picture>
|
|
5
|
+
<img alt="UUV Logo" src="../docs/static/img/uuv.png">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://e2e-test-quest.github.io/uuv/"><img src="https://img.shields.io/badge/documentation-black?&style=for-the-badge&logo=github&logoColor=white" alt="documentation"/></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<h3 align="center">
|
|
14
|
+
Test as final user
|
|
15
|
+
</h3>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
Make test writing fast, understandable by any human understanding English or French.
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<a href="https://www.npmjs.com/package/@uuv/commons">
|
|
23
|
+
<img src="https://img.shields.io/badge/available%20on%20npm-grey?logo=npm" alt="npm"/>
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://www.npmjs.com/package/@uuv/commons">
|
|
26
|
+
<img src="https://img.shields.io/badge/accessibility-yes-green" alt="accessibility"/>
|
|
27
|
+
</a>
|
|
28
|
+
<a href="https://jestjs.io/fr/">
|
|
29
|
+
<img src="https://img.shields.io/badge/tested%20with-jest-yellow?logo=jest" alt="jest"/>
|
|
30
|
+
</a>
|
|
31
|
+
<br />
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## What is UUV commons?
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
|
|
38
|
+
It's commons sentence of `@uuv` library (User centric Usecases Validator) that is an ecosystem simplifing the writing of End to End tests in a BDD approach and a user-centric way.
|
|
39
|
+
We can use the cypress engine with [@uuv/cypress](https://www.npmjs.com/package/@uuv/cypress) to run test or playwright with [@uuv/playwright](https://www.npmjs.com/package/@uuv/playwright)
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
## Installing
|
|
43
|
+
|
|
44
|
+
<a href="https://e2e-test-quest.github.io/uuv/">Documentation</a>
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
[<a href="https://www.npmjs.com/package/@uuv/cypress">
|
|
49
|
+
<img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="npm"/>
|
|
50
|
+
</a>](https://www.apache.org/licenses/LICENSE-2.0)
|
|
51
|
+
|
|
52
|
+
This project is licensed under the terms of the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
# Change Log
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [1.2.0-beta-20230424] - 2023-04-24
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- [#4](https://github.com/e2e-test-quest/uuv/issues/4)
|
|
12
|
+
MINOR Amélioration du scoring npm
|
|
13
|
+
- [#3](https://github.com/e2e-test-quest/uuv/issues/3)
|
|
14
|
+
MAJOR Initialisation du pipeline
|
|
15
|
+
- [#1](https://github.com/e2e-test-quest/uuv/issues/1)
|
|
16
|
+
MAJOR Rajout de la licence Apache 2.0
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Contributors guide
|
|
2
|
+
|
|
3
|
+
**Want to contribute?**
|
|
4
|
+
We try to make it easy, and all contributions, even the smaller ones, are more than welcome.
|
|
5
|
+
This includes bug reports, fixes, documentation, examples...
|
|
6
|
+
But first, read this page (including the small print at the end).
|
|
7
|
+
|
|
8
|
+
Contributions are available on https://github.com/e2e-test-quest/uuv
|
|
9
|
+
|
|
10
|
+
## Legal
|
|
11
|
+
|
|
12
|
+
All original contributions to _UUV_ are licensed under the
|
|
13
|
+
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),
|
|
14
|
+
version 2.0 or later.
|
|
15
|
+
|
|
16
|
+
All contributions are subject to the [Developer Certificate of Origin](https://developercertificate.org/) (DCO).
|
|
17
|
+
The DCO is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project.
|
|
18
|
+
The DCO text is also included verbatim in the [DCO.txt](DCO.txt) file in the root directory of the repository.
|
|
19
|
+
|
|
20
|
+
Contributors **must** _sign-off_ that they adhere to these requirements by adding a `Signed-off-by` line to commit messages, as shown below:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
This is the commit message
|
|
24
|
+
|
|
25
|
+
Signed-off-by: Joe Dev <joe.dev@developer.example.org>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Git has a handy [`-s` command line option](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) to append this automatically to your commit message:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
$ git commit -s -m 'This is the commit message'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Reporting an issue
|
|
35
|
+
|
|
36
|
+
This project uses GitLab issues to manage the issues.
|
|
37
|
+
|
|
38
|
+
Before creating an issue:
|
|
39
|
+
|
|
40
|
+
1. upgrade your project to the latest released template version, and check whether your bug is still present,
|
|
41
|
+
2. have a look in the opened issues if your problem is already known/tracked, and possibly contribute to the thread with your own information.
|
|
42
|
+
|
|
43
|
+
If none of the above was met, open an issue directly in GitLab, select the appropriate issue template and fill-in each section when applicable.
|
|
44
|
+
|
|
45
|
+
## Submitting a code change
|
|
46
|
+
|
|
47
|
+
### Git Setup
|
|
48
|
+
|
|
49
|
+
Before contributing, make sure you have set up your Git authorship correctly:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git config --global user.name "Your Full Name"
|
|
53
|
+
git config --global user.email your.email@example.com
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Workflow
|
|
57
|
+
|
|
58
|
+
All submissions, including submissions by project members, need to be reviewed before being merged.
|
|
59
|
+
|
|
60
|
+
To contribute:
|
|
61
|
+
|
|
62
|
+
1. Create an issue describing the bug or enhancement you want to propose (select the right issue template).
|
|
63
|
+
2. Make sure the issue has been reviewed and agreed.
|
|
64
|
+
3. Create a Merge Request, from your **own** fork (see [forking workflow](https://docs.github.com/en/get-started/quickstart/fork-a-repo) documentation).
|
|
65
|
+
Don't hesitate to mark your MR as `Draft` as long as you think it's not ready to be reviewed.
|
|
66
|
+
|
|
67
|
+
### Git Commit Conventions
|
|
68
|
+
|
|
69
|
+
In addition to being signed-off according the [Developer Certificate of Origin](https://developercertificate.org/) (see above),
|
|
70
|
+
Git commits in _UUV_ shall be:
|
|
71
|
+
|
|
72
|
+
1. **atomic** (1 commit `=` 1 and only 1 _thing_),
|
|
73
|
+
2. **semantic** (using [semantic-release commit message syntax](https://semantic-release.gitbook.io/semantic-release/#commit-message-format)).
|
|
74
|
+
3. **pattern**
|
|
75
|
+
- **SCOPE** : one of (UUV, COMMONS, CYPRESS, PLAYWRIGHT, ASSISTANT, EXTENSION, DOCS)
|
|
76
|
+
- ***TYPE*** : one of (FEAT, FIX, TECH, REFACTOR)
|
|
77
|
+
- [**SCOPE**] [***TYPE***] #issue_identifier: commit message
|
|
78
|
+
- Example :
|
|
79
|
+
```bash
|
|
80
|
+
[CYPRESS] [FEAT] #51: upgrade library @badeball/cypress-cucumber-preprocessor version
|
|
81
|
+
```
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @uuv/runner-commons
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://e2e-test-quest.github.io/uuv/">
|
|
4
|
+
<picture>
|
|
5
|
+
<img alt="UUV Logo" src="../docs/static/img/uuv.png">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://e2e-test-quest.github.io/uuv/"><img src="https://img.shields.io/badge/documentation-black?&style=for-the-badge&logo=github&logoColor=white" alt="documentation"/></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<h3 align="center">
|
|
14
|
+
Test as final user
|
|
15
|
+
</h3>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
Make test writing fast, understandable by any human understanding English or French.
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<a href="https://www.npmjs.com/package/@uuv/commons">
|
|
23
|
+
<img src="https://img.shields.io/badge/available%20on%20npm-grey?logo=npm" alt="npm"/>
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://www.npmjs.com/package/@uuv/commons">
|
|
26
|
+
<img src="https://img.shields.io/badge/accessibility-yes-green" alt="accessibility"/>
|
|
27
|
+
</a>
|
|
28
|
+
<a href="https://jestjs.io/fr/">
|
|
29
|
+
<img src="https://img.shields.io/badge/tested%20with-jest-yellow?logo=jest" alt="jest"/>
|
|
30
|
+
</a>
|
|
31
|
+
<br />
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## What is UUV commons?
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
|
|
38
|
+
It's commons sentence of `@uuv` library (User centric Usecases Validator) that is an ecosystem simplifing the writing of End to End tests in a BDD approach and a user-centric way.
|
|
39
|
+
We can use the cypress engine with [@uuv/cypress](https://www.npmjs.com/package/@uuv/cypress) to run test or playwright with [@uuv/playwright](https://www.npmjs.com/package/@uuv/playwright)
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
## Installing
|
|
43
|
+
|
|
44
|
+
<a href="https://e2e-test-quest.github.io/uuv/">Documentation</a>
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
[<a href="https://www.npmjs.com/package/@uuv/cypress">
|
|
49
|
+
<img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="npm"/>
|
|
50
|
+
</a>](https://www.apache.org/licenses/LICENSE-2.0)
|
|
51
|
+
|
|
52
|
+
This project is licensed under the terms of the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"when": {
|
|
3
|
+
"visit": "",
|
|
4
|
+
"click": "",
|
|
5
|
+
"type": "",
|
|
6
|
+
"timeout": "",
|
|
7
|
+
"withinElement": {
|
|
8
|
+
"roleAndName": "",
|
|
9
|
+
"ariaLabel": "",
|
|
10
|
+
"testId": "",
|
|
11
|
+
"selector": ""
|
|
12
|
+
},
|
|
13
|
+
"mock": {
|
|
14
|
+
"withBody": "",
|
|
15
|
+
"withStatusCode": "",
|
|
16
|
+
"withFixture": ""
|
|
17
|
+
},
|
|
18
|
+
"resetContext": "",
|
|
19
|
+
"headers": {
|
|
20
|
+
"forUri": "",
|
|
21
|
+
"forUriAndMethod": ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"given": {
|
|
25
|
+
"viewport": {
|
|
26
|
+
"preset": "",
|
|
27
|
+
"withWidthAndHeight": ""
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"then": {
|
|
31
|
+
"element": {
|
|
32
|
+
"withContent": "",
|
|
33
|
+
"withRoleAndName": "",
|
|
34
|
+
"withTestId": "",
|
|
35
|
+
"withRoleAndNameAndContent": "",
|
|
36
|
+
"withRoleAndNameAndContentDisabled": "",
|
|
37
|
+
"withRoleAndNameAndContentEnabled": "",
|
|
38
|
+
"withAriaLabel": "",
|
|
39
|
+
"withAriaLabelAndContent": "",
|
|
40
|
+
"withSelector": "",
|
|
41
|
+
"not": {
|
|
42
|
+
"withContent": "",
|
|
43
|
+
"withRoleAndName": "",
|
|
44
|
+
"withTestId": "",
|
|
45
|
+
"withRoleAndNameAndContent": "",
|
|
46
|
+
"withAriaLabel": "",
|
|
47
|
+
"withAriaLabelAndContent": ""
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"wait": {
|
|
51
|
+
"mock": "",
|
|
52
|
+
"milliSeconds": ""
|
|
53
|
+
},
|
|
54
|
+
"list": {
|
|
55
|
+
"withNameAndContent": ""
|
|
56
|
+
},
|
|
57
|
+
"attributes": {
|
|
58
|
+
"withValues": ""
|
|
59
|
+
},
|
|
60
|
+
"a11y": {
|
|
61
|
+
"check": ""
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./step-definition-generator/common";
|
|
2
|
+
export * from "./step-definition-generator/generate-step-definitions";
|
|
3
|
+
export * from "./step-definition-generator/generate-step-definitions-documentation";
|
|
4
|
+
export * from "./runner/step-definitions/_constant";
|
|
5
|
+
export * from "./runner/step-definitions/_i-context";
|
|
6
|
+
import key from "./assets/i18n/template.json";
|
|
7
|
+
export { key };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.key = void 0;
|
|
21
|
+
__exportStar(require("./step-definition-generator/common"), exports);
|
|
22
|
+
__exportStar(require("./step-definition-generator/generate-step-definitions"), exports);
|
|
23
|
+
__exportStar(require("./step-definition-generator/generate-step-definitions-documentation"), exports);
|
|
24
|
+
__exportStar(require("./runner/step-definitions/_constant"), exports);
|
|
25
|
+
__exportStar(require("./runner/step-definitions/_i-context"), exports);
|
|
26
|
+
const template_json_1 = __importDefault(require("./assets/i18n/template.json"));
|
|
27
|
+
exports.key = template_json_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_TIMEOUT = 6000;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright UUV.
|
|
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 "fs";
|
|
17
|
+
export { fs };
|
|
18
|
+
export declare abstract class GenerateFileProcessing {
|
|
19
|
+
baseDir?: string;
|
|
20
|
+
stepDefinitionFile?: string;
|
|
21
|
+
generatedDir?: string;
|
|
22
|
+
protected constructor(baseDir: string, runner: TEST_RUNNER_ENUM, stepDefinitionFileName: STEP_DEFINITION_FILE_NAME);
|
|
23
|
+
abstract runGenerate(): void;
|
|
24
|
+
abstract generateWordingFiles(generatedFile: string, lang: string): any;
|
|
25
|
+
abstract computeWordingFile(data: string, wordingFile: string): any;
|
|
26
|
+
}
|
|
27
|
+
export declare enum TEST_RUNNER_ENUM {
|
|
28
|
+
CYPRESS = "cypress",
|
|
29
|
+
PLAYWRIGHT = "playwright"
|
|
30
|
+
}
|
|
31
|
+
export declare enum STEP_DEFINITION_FILE_NAME {
|
|
32
|
+
BASE = "base-check-engine",
|
|
33
|
+
BY_ROLE = "based-role-check-engine"
|
|
34
|
+
}
|
|
35
|
+
export declare class Common {
|
|
36
|
+
static buildDirIfNotExists(directory: string): void;
|
|
37
|
+
static cleanGeneratedFilesIfExists(generatedFile: string): void;
|
|
38
|
+
static cleanFolderIfExists(folder: string): void;
|
|
39
|
+
static writeWordingFile(generatedFile: string, data: string): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright UUV.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Common = exports.STEP_DEFINITION_FILE_NAME = exports.TEST_RUNNER_ENUM = exports.GenerateFileProcessing = exports.fs = void 0;
|
|
22
|
+
const fs_1 = __importDefault(require("fs"));
|
|
23
|
+
exports.fs = fs_1.default;
|
|
24
|
+
class GenerateFileProcessing {
|
|
25
|
+
baseDir;
|
|
26
|
+
stepDefinitionFile = "";
|
|
27
|
+
generatedDir = "";
|
|
28
|
+
constructor(baseDir, runner, stepDefinitionFileName) {
|
|
29
|
+
this.baseDir = baseDir;
|
|
30
|
+
this.stepDefinitionFile = `${this.baseDir}/src/cucumber/step_definitions/${runner.toString()}/${stepDefinitionFileName.toString()}.ts`;
|
|
31
|
+
this.generatedDir = `${this.baseDir}/src/cucumber/step_definitions/${runner.toString()}/generated`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.GenerateFileProcessing = GenerateFileProcessing;
|
|
35
|
+
var TEST_RUNNER_ENUM;
|
|
36
|
+
(function (TEST_RUNNER_ENUM) {
|
|
37
|
+
TEST_RUNNER_ENUM["CYPRESS"] = "cypress";
|
|
38
|
+
TEST_RUNNER_ENUM["PLAYWRIGHT"] = "playwright";
|
|
39
|
+
})(TEST_RUNNER_ENUM = exports.TEST_RUNNER_ENUM || (exports.TEST_RUNNER_ENUM = {}));
|
|
40
|
+
var STEP_DEFINITION_FILE_NAME;
|
|
41
|
+
(function (STEP_DEFINITION_FILE_NAME) {
|
|
42
|
+
STEP_DEFINITION_FILE_NAME["BASE"] = "base-check-engine";
|
|
43
|
+
STEP_DEFINITION_FILE_NAME["BY_ROLE"] = "based-role-check-engine";
|
|
44
|
+
})(STEP_DEFINITION_FILE_NAME = exports.STEP_DEFINITION_FILE_NAME || (exports.STEP_DEFINITION_FILE_NAME = {}));
|
|
45
|
+
class Common {
|
|
46
|
+
static buildDirIfNotExists(directory) {
|
|
47
|
+
console.log(`[CREATE] ${directory} CREATE successfully`);
|
|
48
|
+
if (!fs_1.default.existsSync(directory)) {
|
|
49
|
+
fs_1.default.mkdirSync(directory, { recursive: true });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static cleanGeneratedFilesIfExists(generatedFile) {
|
|
53
|
+
if (fs_1.default.existsSync(generatedFile)) {
|
|
54
|
+
fs_1.default.rmSync(generatedFile);
|
|
55
|
+
const url = generatedFile.split("/");
|
|
56
|
+
console.log(`[DEL] ${url[url.length - 1]} deleted successfully`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
static cleanFolderIfExists(folder) {
|
|
60
|
+
if (fs_1.default.existsSync(folder)) {
|
|
61
|
+
fs_1.default.rmSync(folder, { recursive: true, force: true });
|
|
62
|
+
const url = folder.split("/");
|
|
63
|
+
console.log(`[DEL] ${url[url.length - 1]} deleted successfully`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
static writeWordingFile(generatedFile, data) {
|
|
67
|
+
fs_1.default.writeFileSync(generatedFile, data);
|
|
68
|
+
console.log(`[WRITE] ${generatedFile} written successfully`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.Common = Common;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GenerateFileProcessing, STEP_DEFINITION_FILE_NAME, TEST_RUNNER_ENUM } from "./common";
|
|
2
|
+
export declare class BaseStepDefinition extends GenerateFileProcessing {
|
|
3
|
+
constructor(baseDir: string, runner: TEST_RUNNER_ENUM, stepDefinitionFileName: STEP_DEFINITION_FILE_NAME);
|
|
4
|
+
runGenerate(): void;
|
|
5
|
+
computeWordingFile(data: string, wordingFile: string): string;
|
|
6
|
+
generateWordingFiles(generatedFile: string, lang: string): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseStepDefinition = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright UUV.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
const lang_enum_1 = require("./lang-enum");
|
|
20
|
+
const common_1 = require("./common");
|
|
21
|
+
class BaseStepDefinition extends common_1.GenerateFileProcessing {
|
|
22
|
+
constructor(baseDir, runner, stepDefinitionFileName) {
|
|
23
|
+
super(baseDir, runner, stepDefinitionFileName);
|
|
24
|
+
}
|
|
25
|
+
runGenerate() {
|
|
26
|
+
Object.values(lang_enum_1.LANG).forEach((lang) => {
|
|
27
|
+
const generatedFile = `${this.generatedDir}/_${lang}-generated-cucumber-steps-definition.ts`;
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
29
|
+
common_1.Common.buildDirIfNotExists(this.generatedDir);
|
|
30
|
+
common_1.Common.cleanGeneratedFilesIfExists(generatedFile);
|
|
31
|
+
this.generateWordingFiles(generatedFile, lang);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
computeWordingFile(data, wordingFile) {
|
|
35
|
+
data =
|
|
36
|
+
"/*******************************\n" +
|
|
37
|
+
"NE PAS MODIFIER, FICHIER GENERE\n" +
|
|
38
|
+
"*******************************/\n\n" +
|
|
39
|
+
data;
|
|
40
|
+
data = data
|
|
41
|
+
.replace("./_.common", "../_.common")
|
|
42
|
+
.replace("../_constant", "../../_constant")
|
|
43
|
+
.replace("./_context", "../_context")
|
|
44
|
+
.replace("../../../cypress/commands", "../../../../cypress/commands")
|
|
45
|
+
.replace("../../../playwright/chromium", "../../../../playwright/chromium")
|
|
46
|
+
.replace("../i18n/template.json", "../../i18n/template.json")
|
|
47
|
+
.replace("import {key} from \"@uuv/runner-commons\";", "")
|
|
48
|
+
.replace("import { key } from \"@uuv/runner-commons\";", "")
|
|
49
|
+
.replace("./core-engine", "../core-engine")
|
|
50
|
+
.replace("../../preprocessor/run/world", "../../../preprocessor/run/world");
|
|
51
|
+
const wordings = common_1.fs.readFileSync(wordingFile);
|
|
52
|
+
const wordingsJson = JSON.parse(wordings.toString());
|
|
53
|
+
wordingsJson.forEach((conf) => {
|
|
54
|
+
data = data.replace("${" + conf.key + "}", conf.wording);
|
|
55
|
+
// console.debug(conf, data)
|
|
56
|
+
});
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
generateWordingFiles(generatedFile, lang) {
|
|
60
|
+
const wordingFile = `${__dirname}/../assets/i18n/${lang}.json`;
|
|
61
|
+
const data = common_1.fs.readFileSync(
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
63
|
+
this.stepDefinitionFile, { encoding: "utf8" });
|
|
64
|
+
const updatedData = this.computeWordingFile(data, wordingFile);
|
|
65
|
+
common_1.Common.writeWordingFile(generatedFile, updatedData);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.BaseStepDefinition = BaseStepDefinition;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright UUV.
|
|
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 { GenerateFileProcessing, STEP_DEFINITION_FILE_NAME, TEST_RUNNER_ENUM } from "./common";
|
|
17
|
+
export declare class BasedRoleStepDefinition extends GenerateFileProcessing {
|
|
18
|
+
constructor(baseDir: string, runner: TEST_RUNNER_ENUM, stepDefinitionFileName: STEP_DEFINITION_FILE_NAME);
|
|
19
|
+
generatedFile: string;
|
|
20
|
+
runGenerate(): void;
|
|
21
|
+
generateWordingFiles(generatedFile: string, lang: string): void;
|
|
22
|
+
computeWordingFile(data: string, wordingFile: string): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright UUV.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BasedRoleStepDefinition = void 0;
|
|
19
|
+
const common_1 = require("./common");
|
|
20
|
+
const lang_enum_1 = require("./lang-enum");
|
|
21
|
+
class BasedRoleStepDefinition extends common_1.GenerateFileProcessing {
|
|
22
|
+
constructor(baseDir, runner, stepDefinitionFileName) {
|
|
23
|
+
super(baseDir, runner, stepDefinitionFileName);
|
|
24
|
+
}
|
|
25
|
+
generatedFile = "";
|
|
26
|
+
runGenerate() {
|
|
27
|
+
Object.values(lang_enum_1.LANG).forEach((lang) => {
|
|
28
|
+
const generatedSubfolder = `enriched/${lang}`;
|
|
29
|
+
const generatedFolder = `${this.generatedDir}/${generatedSubfolder}`;
|
|
30
|
+
common_1.Common.cleanFolderIfExists(generatedFolder);
|
|
31
|
+
common_1.Common.buildDirIfNotExists(generatedFolder);
|
|
32
|
+
this.generatedFile = `${generatedFolder}/_${lang}-generated-steps-definition_$roleId.ts`;
|
|
33
|
+
// console.debug("generatedFile template", this.generatedFile)
|
|
34
|
+
this.generateWordingFiles(this.generatedFile, lang);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
generateWordingFiles(generatedFile, lang) {
|
|
38
|
+
const wordingFile = `${__dirname}/../assets/i18n/${lang}-enriched-wordings.json`;
|
|
39
|
+
const data = common_1.fs.readFileSync(
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
41
|
+
this.stepDefinitionFile, { encoding: "utf8" });
|
|
42
|
+
this.computeWordingFile(data, wordingFile);
|
|
43
|
+
}
|
|
44
|
+
computeWordingFile(data, wordingFile) {
|
|
45
|
+
const dataOrigin = data;
|
|
46
|
+
let dataUpdated = dataOrigin;
|
|
47
|
+
const wordings = common_1.fs.readFileSync(wordingFile);
|
|
48
|
+
const wordingsJson = JSON.parse(wordings.toString());
|
|
49
|
+
wordingsJson.role.forEach((role) => {
|
|
50
|
+
// console.debug("role", role)
|
|
51
|
+
dataUpdated =
|
|
52
|
+
"/*******************************\n" +
|
|
53
|
+
"NE PAS MODIFIER, FICHIER GENERE\n" +
|
|
54
|
+
"*******************************/\n\n" +
|
|
55
|
+
dataOrigin;
|
|
56
|
+
dataUpdated = dataUpdated
|
|
57
|
+
.replace("../../cypress/commands", "../../../../../../cypress/commands")
|
|
58
|
+
.replace("../i18n/template.json", "../../../../i18n/template.json")
|
|
59
|
+
.replace("import { key } from \"@uuv/runner-commons\";", "")
|
|
60
|
+
.replace("import {key} from \"@uuv/runner-commons\";", "")
|
|
61
|
+
.replace("./core-engine", "../../../core-engine")
|
|
62
|
+
.replace("../../preprocessor/run/world", "../../../../../preprocessor/run/world");
|
|
63
|
+
wordingsJson.enriched.forEach((conf) => {
|
|
64
|
+
// console.debug(">> conf", conf)
|
|
65
|
+
// console.debug("${" + conf.key + "}");
|
|
66
|
+
dataUpdated = dataUpdated
|
|
67
|
+
.replaceAll("${" + conf.key + "}", conf.wording)
|
|
68
|
+
.replaceAll("$roleId", role.id)
|
|
69
|
+
.replaceAll("$roleName", role.name);
|
|
70
|
+
});
|
|
71
|
+
const generatedFilename = this.generatedFile.replace("$roleId", role.id);
|
|
72
|
+
// console.debug(">>> data", dataUpdated)
|
|
73
|
+
// console.debug(">>> generatedFilename", generatedFilename)
|
|
74
|
+
common_1.Common.writeWordingFile(generatedFilename, dataUpdated);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.BasedRoleStepDefinition = BasedRoleStepDefinition;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright UUV.
|
|
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 declare function runGenerateDoc(destDir: string): void;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright UUV.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.runGenerateDoc = void 0;
|
|
22
|
+
const lang_enum_1 = require("./lang-enum");
|
|
23
|
+
const fs_1 = __importDefault(require("fs"));
|
|
24
|
+
class Common {
|
|
25
|
+
static cleanGeneratedFilesIfExists(generatedFile, lang, indexOfFile) {
|
|
26
|
+
if (fs_1.default.existsSync(generatedFile)) {
|
|
27
|
+
fs_1.default.rmSync(generatedFile);
|
|
28
|
+
console.log(`[DEL] ${indexOfFile}-${lang}-generated-wording-description.md deleted successfully`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function runGenerateDoc(destDir) {
|
|
33
|
+
const GENERATED_DIR_DOC = `${destDir}/docs/03-wordings/01-generated-wording-description`;
|
|
34
|
+
const GENERATED_DIR_DOC_FR = `${destDir}/i18n/fr/docusaurus-plugin-content-docs/current/03-wordings/01-generated-wording-description`;
|
|
35
|
+
Object.values(lang_enum_1.LANG).forEach((lang, index) => {
|
|
36
|
+
const indexOfFile = (index + 1).toLocaleString("fr-FR", {
|
|
37
|
+
minimumIntegerDigits: 2,
|
|
38
|
+
useGrouping: false,
|
|
39
|
+
});
|
|
40
|
+
const generatedFile = `${GENERATED_DIR_DOC}/${indexOfFile}-${lang}-generated-wording-description.md`;
|
|
41
|
+
const wordingBaseFile = `${__dirname}/../assets/i18n/${lang}.json`;
|
|
42
|
+
const wordingEnrichedFile = `${__dirname}/../assets/i18n/${lang}-enriched-wordings.json`;
|
|
43
|
+
Common.cleanGeneratedFilesIfExists(generatedFile, lang, indexOfFile);
|
|
44
|
+
generateWordingFiles(wordingBaseFile, wordingEnrichedFile, generatedFile, lang, indexOfFile);
|
|
45
|
+
fs_1.default.copyFileSync(generatedFile, `${GENERATED_DIR_DOC_FR}/${indexOfFile}-${lang}-generated-wording-description.md`);
|
|
46
|
+
});
|
|
47
|
+
function generateWordingFiles(wordingBaseFile, wordingEnrichedFile, generatedFile, lang, indexOfFile) {
|
|
48
|
+
const data = computeWordingFile(wordingBaseFile, wordingEnrichedFile, lang);
|
|
49
|
+
writeWordingFile(generatedFile, data, lang, indexOfFile);
|
|
50
|
+
}
|
|
51
|
+
function computeWordingFile(wordingBaseFile, wordingEnrichedFile, lang) {
|
|
52
|
+
const wordingsBase = fs_1.default.readFileSync(wordingBaseFile);
|
|
53
|
+
const wordingsBaseJson = JSON.parse(wordingsBase.toString());
|
|
54
|
+
const wordingsEnriched = fs_1.default.readFileSync(wordingEnrichedFile, { encoding: "utf8" });
|
|
55
|
+
const title = (function () {
|
|
56
|
+
switch (lang) {
|
|
57
|
+
case lang_enum_1.LANG.FR.toString():
|
|
58
|
+
return ("# Français \n" +
|
|
59
|
+
":::caution\n" +
|
|
60
|
+
"Pensez bien à rajouter `#language: fr` en entête de votre fichier feature.\n" +
|
|
61
|
+
":::\n\n");
|
|
62
|
+
default:
|
|
63
|
+
return "# Anglais";
|
|
64
|
+
}
|
|
65
|
+
})();
|
|
66
|
+
const rows = [title];
|
|
67
|
+
const stepTitle = (function () {
|
|
68
|
+
switch (lang) {
|
|
69
|
+
case lang_enum_1.LANG.FR.toString():
|
|
70
|
+
return ["## Etant donné que", "## Quand", "## Alors"];
|
|
71
|
+
case lang_enum_1.LANG.EN.toString():
|
|
72
|
+
return ["## Given", "## When", "## Then"];
|
|
73
|
+
default:
|
|
74
|
+
return ["", "", ""];
|
|
75
|
+
}
|
|
76
|
+
})();
|
|
77
|
+
const given = computeStepDefinition(wordingsBaseJson, "key.given", stepTitle[0]);
|
|
78
|
+
const when = computeStepDefinition(wordingsBaseJson, "key.when", stepTitle[1]);
|
|
79
|
+
const then = computeStepDefinition(wordingsBaseJson, "key.then", stepTitle[2]);
|
|
80
|
+
rows.push(...given, ...when, ...then);
|
|
81
|
+
rows.push("## Par rôle");
|
|
82
|
+
const dataOrigin = wordingsEnriched;
|
|
83
|
+
let dataUpdated = dataOrigin;
|
|
84
|
+
// console.debug("roles", wordingsEnrichedJson.role)
|
|
85
|
+
const wordingsEnrichedJson = JSON.parse(dataUpdated);
|
|
86
|
+
wordingsEnrichedJson.role.forEach((role) => {
|
|
87
|
+
rows.push(`### ${role.id}`);
|
|
88
|
+
// console.debug("dataUpdated", dataUpdated)
|
|
89
|
+
dataUpdated = dataOrigin
|
|
90
|
+
.replaceAll("$roleName", role.name)
|
|
91
|
+
.replaceAll("$roleId", role.id);
|
|
92
|
+
const wordingsEnrichedJson = JSON.parse(dataUpdated);
|
|
93
|
+
const enrichedGiven = computeStepDefinition(wordingsEnrichedJson.enriched, "key.given", undefined, "####");
|
|
94
|
+
if (enrichedGiven.length > 1) {
|
|
95
|
+
rows.push(...enrichedGiven);
|
|
96
|
+
}
|
|
97
|
+
const enrichedWhen = computeStepDefinition(wordingsEnrichedJson.enriched, "key.when", undefined, "####");
|
|
98
|
+
if (enrichedWhen.length > 1) {
|
|
99
|
+
rows.push(...enrichedWhen);
|
|
100
|
+
}
|
|
101
|
+
const enrichedThen = computeStepDefinition(wordingsEnrichedJson.enriched, "key.then", undefined, "####");
|
|
102
|
+
if (enrichedThen.length > 1) {
|
|
103
|
+
rows.push(...enrichedThen);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
return rows.join("\n");
|
|
107
|
+
}
|
|
108
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
109
|
+
function computeStepDefinition(wordingsJson, stepKey, stepTitle, level = "###") {
|
|
110
|
+
const step = [];
|
|
111
|
+
if (stepTitle) {
|
|
112
|
+
step.push(stepTitle);
|
|
113
|
+
}
|
|
114
|
+
wordingsJson.forEach((conf) => {
|
|
115
|
+
if (conf.key.startsWith(stepKey)) {
|
|
116
|
+
const wording = `${level} ${conf.wording}`;
|
|
117
|
+
step.push(wording);
|
|
118
|
+
step.push(`> ${conf.description ?? ""}\n`);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
return step;
|
|
122
|
+
}
|
|
123
|
+
function writeWordingFile(generatedFile, data, lang, indexOfFile) {
|
|
124
|
+
fs_1.default.writeFileSync(generatedFile, data);
|
|
125
|
+
console.log(`[WRITE] ${indexOfFile}-${lang}-generated-wording-description.md written successfully`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.runGenerateDoc = runGenerateDoc;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright UUV.
|
|
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 { TEST_RUNNER_ENUM } from "./common";
|
|
17
|
+
export declare function generateStepDefinitionForRunner(baseDir: string, runner: TEST_RUNNER_ENUM): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright UUV.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.generateStepDefinitionForRunner = void 0;
|
|
19
|
+
const generate_base_step_definitions_1 = require("./generate-base-step-definitions");
|
|
20
|
+
const generate_based_role_step_definitions_1 = require("./generate-based-role-step-definitions");
|
|
21
|
+
const common_1 = require("./common");
|
|
22
|
+
function generateStepDefinitionForRunner(baseDir, runner) {
|
|
23
|
+
const cypressBaseStepDefinition = new generate_base_step_definitions_1.BaseStepDefinition(baseDir, runner, common_1.STEP_DEFINITION_FILE_NAME.BASE);
|
|
24
|
+
cypressBaseStepDefinition.runGenerate();
|
|
25
|
+
const cypressBasedRoleStepDefinition = new generate_based_role_step_definitions_1.BasedRoleStepDefinition(baseDir, runner, common_1.STEP_DEFINITION_FILE_NAME.BY_ROLE);
|
|
26
|
+
cypressBasedRoleStepDefinition.runGenerate();
|
|
27
|
+
}
|
|
28
|
+
exports.generateStepDefinitionForRunner = generateStepDefinitionForRunner;
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uuv/runner-commons",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
6
|
+
"description": "A common lib for uuv",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/e2e-test-quest/uuv"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://e2e-test-quest.github.io/uuv/",
|
|
13
|
+
"keywords": ["uuv", "UUV", "accessibilité", "accessibility", "a11y"],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"package": "npm pack --pack-destination=\"../../dist/packages\"",
|
|
16
|
+
"lint": "npx eslint . --ext .js,.ts,.feature --fix",
|
|
17
|
+
"test": "jest"
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "5.59.1",
|
|
22
|
+
"@typescript-eslint/parser": "5.59.1",
|
|
23
|
+
"eslint": "8.39.0",
|
|
24
|
+
"jest": "29.5.0"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/index.d.ts",
|
|
28
|
+
"dist/index.js",
|
|
29
|
+
"dist/step-definition-generator/**/*",
|
|
30
|
+
"dist/assets/**/*",
|
|
31
|
+
"dist/runner/**/*",
|
|
32
|
+
"*.md"
|
|
33
|
+
],
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"import": "./dist/index.js",
|
|
37
|
+
"require": "./dist/index.js",
|
|
38
|
+
"types": "./dist/index.d.ts"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|