@appium/universal-xml-plugin 1.0.0-beta.0 → 1.0.0-beta.11
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/LICENSE +201 -0
- package/README.md +1 -1
- package/build/lib/attr-map.d.ts +58 -0
- package/build/lib/attr-map.d.ts.map +1 -0
- package/build/lib/attr-map.js +47 -32
- package/build/lib/index.d.ts +5 -0
- package/build/lib/index.d.ts.map +1 -0
- package/build/lib/index.js +49 -0
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +15 -5
- package/build/lib/node-map.d.ts +200 -0
- package/build/lib/node-map.d.ts.map +1 -0
- package/build/lib/node-map.js +146 -267
- package/build/lib/plugin.d.ts +8 -0
- package/build/lib/plugin.d.ts.map +1 -0
- package/build/lib/plugin.js +90 -77
- package/build/lib/source.d.ts +24 -0
- package/build/lib/source.d.ts.map +1 -0
- package/build/lib/source.js +202 -147
- package/build/lib/transformers.d.ts +8 -0
- package/build/lib/transformers.d.ts.map +1 -0
- package/build/lib/transformers.js +35 -26
- package/build/lib/xpath.d.ts +4 -0
- package/build/lib/xpath.d.ts.map +1 -0
- package/build/lib/xpath.js +46 -40
- package/build/tsconfig.tsbuildinfo +1 -0
- package/index.js +3 -17
- package/lib/attr-map.js +1 -1
- package/lib/index.js +19 -0
- package/lib/logger.js +1 -1
- package/lib/node-map.js +14 -58
- package/lib/plugin.js +48 -27
- package/lib/source.js +32 -14
- package/lib/transformers.js +3 -3
- package/lib/xpath.js +7 -6
- package/package.json +39 -22
- package/build/index.js +0 -25
- package/build/test/fixtures/android-transformed-path.xml +0 -38
- package/build/test/fixtures/android-transformed.xml +0 -38
- package/build/test/fixtures/android.xml +0 -39
- package/build/test/fixtures/index.js +0 -25
- package/build/test/fixtures/ios-edge.xml +0 -16
- package/build/test/fixtures/ios-transformed-edge.xml +0 -15
- package/build/test/fixtures/ios-transformed-path.xml +0 -53
- package/build/test/fixtures/ios-transformed.xml +0 -53
- package/build/test/fixtures/ios.xml +0 -51
- package/build/test/unit/plugin-specs.js +0 -76
- package/build/test/unit/source-specs.js +0 -82
- package/build/test/unit/xpath-specs.js +0 -46
- package/test/fixtures/android-transformed-path.xml +0 -38
- package/test/fixtures/android-transformed.xml +0 -38
- package/test/fixtures/android.xml +0 -39
- package/test/fixtures/index.js +0 -14
- package/test/fixtures/ios-edge.xml +0 -16
- package/test/fixtures/ios-transformed-edge.xml +0 -15
- package/test/fixtures/ios-transformed-path.xml +0 -53
- package/test/fixtures/ios-transformed.xml +0 -53
- package/test/fixtures/ios.xml +0 -51
- package/test/unit/plugin-specs.js +0 -57
- package/test/unit/source-specs.js +0 -79
- package/test/unit/xpath-specs.js +0 -43
- package/tsconfig.json +0 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright JS Foundation and other contributors, https://js.foundation
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ No special action is needed to make the features available in the various Appium
|
|
|
19
19
|
The plugin will not be active unless turned on when invoking the Appium server:
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
appium --plugins=universal-xml
|
|
22
|
+
appium --use-plugins=universal-xml
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export namespace ATTR_MAP {
|
|
2
|
+
namespace x {
|
|
3
|
+
const ios: string;
|
|
4
|
+
const android: string;
|
|
5
|
+
}
|
|
6
|
+
namespace y {
|
|
7
|
+
const ios_1: string;
|
|
8
|
+
export { ios_1 as ios };
|
|
9
|
+
const android_1: string;
|
|
10
|
+
export { android_1 as android };
|
|
11
|
+
}
|
|
12
|
+
namespace width {
|
|
13
|
+
const ios_2: string;
|
|
14
|
+
export { ios_2 as ios };
|
|
15
|
+
const android_2: string;
|
|
16
|
+
export { android_2 as android };
|
|
17
|
+
}
|
|
18
|
+
namespace height {
|
|
19
|
+
const ios_3: string;
|
|
20
|
+
export { ios_3 as ios };
|
|
21
|
+
const android_3: string;
|
|
22
|
+
export { android_3 as android };
|
|
23
|
+
}
|
|
24
|
+
namespace enabled {
|
|
25
|
+
const ios_4: string;
|
|
26
|
+
export { ios_4 as ios };
|
|
27
|
+
const android_4: string;
|
|
28
|
+
export { android_4 as android };
|
|
29
|
+
}
|
|
30
|
+
namespace axId {
|
|
31
|
+
const ios_5: string;
|
|
32
|
+
export { ios_5 as ios };
|
|
33
|
+
const android_5: string;
|
|
34
|
+
export { android_5 as android };
|
|
35
|
+
}
|
|
36
|
+
namespace id {
|
|
37
|
+
const android_6: string;
|
|
38
|
+
export { android_6 as android };
|
|
39
|
+
}
|
|
40
|
+
namespace text {
|
|
41
|
+
const ios_6: string;
|
|
42
|
+
export { ios_6 as ios };
|
|
43
|
+
const android_7: string;
|
|
44
|
+
export { android_7 as android };
|
|
45
|
+
}
|
|
46
|
+
namespace visible {
|
|
47
|
+
const ios_7: string;
|
|
48
|
+
export { ios_7 as ios };
|
|
49
|
+
const android_8: string;
|
|
50
|
+
export { android_8 as android };
|
|
51
|
+
}
|
|
52
|
+
namespace value {
|
|
53
|
+
const ios_8: string;
|
|
54
|
+
export { ios_8 as ios };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export const REMOVE_ATTRS: string[];
|
|
58
|
+
//# sourceMappingURL=attr-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attr-map.d.ts","sourceRoot":"","sources":["../../lib/attr-map.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,oCAiBE"}
|
package/build/lib/attr-map.js
CHANGED
|
@@ -1,38 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.REMOVE_ATTRS = exports.ATTR_MAP = void 0;
|
|
4
|
-
|
|
7
|
+
|
|
8
|
+
require("source-map-support/register");
|
|
9
|
+
|
|
5
10
|
const ATTR_MAP = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
x: {
|
|
12
|
+
ios: 'x',
|
|
13
|
+
android: 'x'
|
|
14
|
+
},
|
|
15
|
+
y: {
|
|
16
|
+
ios: 'y',
|
|
17
|
+
android: 'y'
|
|
18
|
+
},
|
|
19
|
+
width: {
|
|
20
|
+
ios: 'width',
|
|
21
|
+
android: 'width'
|
|
22
|
+
},
|
|
23
|
+
height: {
|
|
24
|
+
ios: 'height',
|
|
25
|
+
android: 'height'
|
|
26
|
+
},
|
|
27
|
+
enabled: {
|
|
28
|
+
ios: 'enabled',
|
|
29
|
+
android: 'enabled'
|
|
30
|
+
},
|
|
31
|
+
axId: {
|
|
32
|
+
ios: 'name',
|
|
33
|
+
android: 'content-desc'
|
|
34
|
+
},
|
|
35
|
+
id: {
|
|
36
|
+
android: 'resource-id'
|
|
37
|
+
},
|
|
38
|
+
text: {
|
|
39
|
+
ios: 'label',
|
|
40
|
+
android: 'text'
|
|
41
|
+
},
|
|
42
|
+
visible: {
|
|
43
|
+
ios: 'visible',
|
|
44
|
+
android: 'displayed'
|
|
45
|
+
},
|
|
46
|
+
value: {
|
|
47
|
+
ios: 'value'
|
|
48
|
+
}
|
|
16
49
|
};
|
|
17
50
|
exports.ATTR_MAP = ATTR_MAP;
|
|
18
|
-
|
|
19
|
-
const REMOVE_ATTRS = [
|
|
20
|
-
'index',
|
|
21
|
-
'type',
|
|
22
|
-
'package',
|
|
23
|
-
'class',
|
|
24
|
-
'checkable',
|
|
25
|
-
'checked',
|
|
26
|
-
'clickable',
|
|
27
|
-
'enabled',
|
|
28
|
-
'focusable',
|
|
29
|
-
'focused',
|
|
30
|
-
'long-clickable',
|
|
31
|
-
'password',
|
|
32
|
-
'scrollable',
|
|
33
|
-
'selected',
|
|
34
|
-
'bounds',
|
|
35
|
-
'rotation',
|
|
36
|
-
];
|
|
51
|
+
const REMOVE_ATTRS = ['index', 'type', 'package', 'class', 'checkable', 'checked', 'clickable', 'enabled', 'focusable', 'focused', 'long-clickable', 'password', 'scrollable', 'selected', 'bounds', 'rotation'];
|
|
37
52
|
exports.REMOVE_ATTRS = REMOVE_ATTRS;
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJBVFRSX01BUCIsIngiLCJpb3MiLCJhbmRyb2lkIiwieSIsIndpZHRoIiwiaGVpZ2h0IiwiZW5hYmxlZCIsImF4SWQiLCJpZCIsInRleHQiLCJ2aXNpYmxlIiwidmFsdWUiLCJSRU1PVkVfQVRUUlMiXSwic291cmNlcyI6WyIuLi8uLi9saWIvYXR0ci1tYXAuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdXNlcyB0aGUgc2FtZSBmb3JtYXQgYXMgTk9ERV9NQVAgaW4gbm9kZS1tYXAuanNcbmNvbnN0IEFUVFJfTUFQID0ge1xuICB4OiB7aW9zOiAneCcsIGFuZHJvaWQ6ICd4J30sXG4gIHk6IHtpb3M6ICd5JywgYW5kcm9pZDogJ3knfSxcbiAgd2lkdGg6IHtpb3M6ICd3aWR0aCcsIGFuZHJvaWQ6ICd3aWR0aCd9LFxuICBoZWlnaHQ6IHtpb3M6ICdoZWlnaHQnLCBh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":"AAIA,6BAcC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "UniversalXMLPlugin", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _plugin.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports.default = void 0;
|
|
15
|
+
exports.main = main;
|
|
16
|
+
|
|
17
|
+
require("source-map-support/register");
|
|
18
|
+
|
|
19
|
+
var _plugin = _interopRequireDefault(require("./plugin"));
|
|
20
|
+
|
|
21
|
+
var _default = _plugin.default;
|
|
22
|
+
exports.default = _default;
|
|
23
|
+
|
|
24
|
+
function main() {
|
|
25
|
+
const {
|
|
26
|
+
transformSourceXml
|
|
27
|
+
} = require('./source');
|
|
28
|
+
|
|
29
|
+
const fs = require('fs');
|
|
30
|
+
|
|
31
|
+
const [,, xmlDataPath, platform, optsJson] = process.argv;
|
|
32
|
+
const xmlData = fs.readFileSync(xmlDataPath, 'utf8');
|
|
33
|
+
let opts = {};
|
|
34
|
+
|
|
35
|
+
if (optsJson) {
|
|
36
|
+
opts = JSON.parse(optsJson);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const {
|
|
40
|
+
xml,
|
|
41
|
+
unknowns
|
|
42
|
+
} = transformSourceXml(xmlData, platform, opts);
|
|
43
|
+
console.log(xml);
|
|
44
|
+
|
|
45
|
+
if (unknowns.nodes.length || unknowns.attrs.length) {
|
|
46
|
+
console.error(unknowns);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJVbml2ZXJzYWxYTUxQbHVnaW4iLCJtYWluIi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+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";AACA,wDAAmD"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
require("source-map-support/register");
|
|
9
|
+
|
|
10
|
+
var _support = require("appium/support");
|
|
11
|
+
|
|
12
|
+
const log = _support.logger.getLogger('UniversalXMLPlugin');
|
|
13
|
+
|
|
14
|
+
var _default = log;
|
|
15
|
+
exports.default = _default;
|
|
16
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJsb2ciLCJsb2dnZXIiLCJnZXRMb2dnZXIiXSwic291cmNlcyI6WyIuLi8uLi9saWIvbG9nZ2VyLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7bG9nZ2VyfSBmcm9tICdhcHBpdW0vc3VwcG9ydCc7XG5jb25zdCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdVbml2ZXJzYWxYTUxQbHVnaW4nKTtcbmV4cG9ydCBkZWZhdWx0IGxvZztcbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O0FBQ0EsTUFBTUEsR0FBRyxHQUFHQyxlQUFBLENBQU9DLFNBQVAsQ0FBaUIsb0JBQWpCLENBQVo7O2VBQ2VGLEcifQ==
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
namespace Alert {
|
|
3
|
+
const ios: string;
|
|
4
|
+
const android: string;
|
|
5
|
+
}
|
|
6
|
+
namespace App {
|
|
7
|
+
const ios_1: string;
|
|
8
|
+
export { ios_1 as ios };
|
|
9
|
+
}
|
|
10
|
+
namespace Button {
|
|
11
|
+
const ios_2: string[];
|
|
12
|
+
export { ios_2 as ios };
|
|
13
|
+
const android_1: string[];
|
|
14
|
+
export { android_1 as android };
|
|
15
|
+
}
|
|
16
|
+
namespace Cell {
|
|
17
|
+
const ios_3: string;
|
|
18
|
+
export { ios_3 as ios };
|
|
19
|
+
}
|
|
20
|
+
namespace CheckBox {
|
|
21
|
+
const ios_4: string;
|
|
22
|
+
export { ios_4 as ios };
|
|
23
|
+
const android_2: string;
|
|
24
|
+
export { android_2 as android };
|
|
25
|
+
}
|
|
26
|
+
namespace Column {
|
|
27
|
+
const ios_5: string;
|
|
28
|
+
export { ios_5 as ios };
|
|
29
|
+
}
|
|
30
|
+
namespace DateInput {
|
|
31
|
+
const ios_6: string;
|
|
32
|
+
export { ios_6 as ios };
|
|
33
|
+
const android_3: string;
|
|
34
|
+
export { android_3 as android };
|
|
35
|
+
}
|
|
36
|
+
namespace Element {
|
|
37
|
+
const ios_7: string[];
|
|
38
|
+
export { ios_7 as ios };
|
|
39
|
+
const android_4: string[];
|
|
40
|
+
export { android_4 as android };
|
|
41
|
+
}
|
|
42
|
+
namespace Grid {
|
|
43
|
+
const ios_8: string;
|
|
44
|
+
export { ios_8 as ios };
|
|
45
|
+
const android_5: string[];
|
|
46
|
+
export { android_5 as android };
|
|
47
|
+
}
|
|
48
|
+
namespace Icon {
|
|
49
|
+
const ios_9: string[];
|
|
50
|
+
export { ios_9 as ios };
|
|
51
|
+
}
|
|
52
|
+
namespace Image {
|
|
53
|
+
const ios_10: string;
|
|
54
|
+
export { ios_10 as ios };
|
|
55
|
+
const android_6: string;
|
|
56
|
+
export { android_6 as android };
|
|
57
|
+
}
|
|
58
|
+
namespace Indicator {
|
|
59
|
+
const ios_11: string[];
|
|
60
|
+
export { ios_11 as ios };
|
|
61
|
+
const android_7: string[];
|
|
62
|
+
export { android_7 as android };
|
|
63
|
+
}
|
|
64
|
+
namespace Input {
|
|
65
|
+
const ios_12: string[];
|
|
66
|
+
export { ios_12 as ios };
|
|
67
|
+
const android_8: never[];
|
|
68
|
+
export { android_8 as android };
|
|
69
|
+
}
|
|
70
|
+
namespace List {
|
|
71
|
+
const android_9: string[];
|
|
72
|
+
export { android_9 as android };
|
|
73
|
+
const ios_13: string[];
|
|
74
|
+
export { ios_13 as ios };
|
|
75
|
+
}
|
|
76
|
+
namespace Map {
|
|
77
|
+
const ios_14: string;
|
|
78
|
+
export { ios_14 as ios };
|
|
79
|
+
}
|
|
80
|
+
namespace Menu {
|
|
81
|
+
const ios_15: string[];
|
|
82
|
+
export { ios_15 as ios };
|
|
83
|
+
const android_10: string[];
|
|
84
|
+
export { android_10 as android };
|
|
85
|
+
}
|
|
86
|
+
namespace Modal {
|
|
87
|
+
const android_11: string[];
|
|
88
|
+
export { android_11 as android };
|
|
89
|
+
const ios_16: string[];
|
|
90
|
+
export { ios_16 as ios };
|
|
91
|
+
}
|
|
92
|
+
namespace Nav {
|
|
93
|
+
const ios_17: string;
|
|
94
|
+
export { ios_17 as ios };
|
|
95
|
+
}
|
|
96
|
+
namespace PickerInput {
|
|
97
|
+
const ios_18: string;
|
|
98
|
+
export { ios_18 as ios };
|
|
99
|
+
const android_12: string[];
|
|
100
|
+
export { android_12 as android };
|
|
101
|
+
}
|
|
102
|
+
namespace RadioInput {
|
|
103
|
+
const ios_19: string;
|
|
104
|
+
export { ios_19 as ios };
|
|
105
|
+
const android_13: string;
|
|
106
|
+
export { android_13 as android };
|
|
107
|
+
}
|
|
108
|
+
namespace Row {
|
|
109
|
+
const ios_20: string[];
|
|
110
|
+
export { ios_20 as ios };
|
|
111
|
+
const android_14: string;
|
|
112
|
+
export { android_14 as android };
|
|
113
|
+
}
|
|
114
|
+
namespace Scrollable {
|
|
115
|
+
const ios_21: string;
|
|
116
|
+
export { ios_21 as ios };
|
|
117
|
+
const android_15: string[];
|
|
118
|
+
export { android_15 as android };
|
|
119
|
+
}
|
|
120
|
+
namespace SearchInput {
|
|
121
|
+
const android_16: string;
|
|
122
|
+
export { android_16 as android };
|
|
123
|
+
const ios_22: string;
|
|
124
|
+
export { ios_22 as ios };
|
|
125
|
+
}
|
|
126
|
+
namespace SliderInput {
|
|
127
|
+
const android_17: string;
|
|
128
|
+
export { android_17 as android };
|
|
129
|
+
const ios_23: string[];
|
|
130
|
+
export { ios_23 as ios };
|
|
131
|
+
}
|
|
132
|
+
namespace Spinner {
|
|
133
|
+
const ios_24: string;
|
|
134
|
+
export { ios_24 as ios };
|
|
135
|
+
const android_18: string;
|
|
136
|
+
export { android_18 as android };
|
|
137
|
+
}
|
|
138
|
+
namespace SwitchInput {
|
|
139
|
+
const ios_25: string;
|
|
140
|
+
export { ios_25 as ios };
|
|
141
|
+
const android_19: string;
|
|
142
|
+
export { android_19 as android };
|
|
143
|
+
}
|
|
144
|
+
namespace Table {
|
|
145
|
+
const ios_26: string;
|
|
146
|
+
export { ios_26 as ios };
|
|
147
|
+
const android_20: string;
|
|
148
|
+
export { android_20 as android };
|
|
149
|
+
}
|
|
150
|
+
namespace Text {
|
|
151
|
+
const ios_27: string[];
|
|
152
|
+
export { ios_27 as ios };
|
|
153
|
+
const android_21: string[];
|
|
154
|
+
export { android_21 as android };
|
|
155
|
+
}
|
|
156
|
+
namespace TextInput {
|
|
157
|
+
const ios_28: string[];
|
|
158
|
+
export { ios_28 as ios };
|
|
159
|
+
const android_22: string[];
|
|
160
|
+
export { android_22 as android };
|
|
161
|
+
}
|
|
162
|
+
namespace ToggleInput {
|
|
163
|
+
const ios_29: string;
|
|
164
|
+
export { ios_29 as ios };
|
|
165
|
+
const android_23: string[];
|
|
166
|
+
export { android_23 as android };
|
|
167
|
+
}
|
|
168
|
+
namespace Toolbar {
|
|
169
|
+
const ios_30: string;
|
|
170
|
+
export { ios_30 as ios };
|
|
171
|
+
const android_24: string;
|
|
172
|
+
export { android_24 as android };
|
|
173
|
+
}
|
|
174
|
+
namespace UI {
|
|
175
|
+
const ios_31: string;
|
|
176
|
+
export { ios_31 as ios };
|
|
177
|
+
const android_25: string;
|
|
178
|
+
export { android_25 as android };
|
|
179
|
+
}
|
|
180
|
+
namespace Video {
|
|
181
|
+
const android_26: string;
|
|
182
|
+
export { android_26 as android };
|
|
183
|
+
}
|
|
184
|
+
namespace View {
|
|
185
|
+
const android_27: string[];
|
|
186
|
+
export { android_27 as android };
|
|
187
|
+
const ios_32: string[];
|
|
188
|
+
export { ios_32 as ios };
|
|
189
|
+
}
|
|
190
|
+
namespace WebView {
|
|
191
|
+
const ios_33: string;
|
|
192
|
+
export { ios_33 as ios };
|
|
193
|
+
}
|
|
194
|
+
namespace Window {
|
|
195
|
+
const ios_34: string;
|
|
196
|
+
export { ios_34 as ios };
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
export default _default;
|
|
200
|
+
//# sourceMappingURL=node-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-map.d.ts","sourceRoot":"","sources":["../../lib/node-map.js"],"names":[],"mappings":""}
|