@sitecore-jss/sitecore-jss-dev-tools 22.3.1 → 22.4.0-canary.10
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.txt +202 -202
- package/README.md +12 -12
- package/dist/cjs/package-deploy.js +20 -50
- package/dist/esm/package-deploy.js +20 -27
- package/package.json +4 -4
- package/types/package-deploy.d.ts +2 -4
package/LICENSE.txt
CHANGED
|
@@ -1,202 +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.
|
|
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
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# Sitecore JavaScript Rendering SDK Developer Tools
|
|
2
|
-
|
|
3
|
-
This module is provided as a part of Sitecore JavaScript Rendering SDK (JSS). It contains developer tooling, such as development proxies and deployment scripts.
|
|
4
|
-
|
|
5
|
-
<!---
|
|
6
|
-
@TODO: Update to next version docs before release
|
|
7
|
-
-->
|
|
8
|
-
[Documentation (Experience Platform)](https://doc.sitecore.com/xp/en/developers/hd/22/sitecore-headless-development/sitecore-javascript-rendering-sdks--jss-.html)
|
|
9
|
-
|
|
10
|
-
[Documentation (XM Cloud)](https://doc.sitecore.com/xmc/en/developers/xm-cloud/sitecore-javascript-rendering-sdks--jss-.html)
|
|
11
|
-
|
|
12
|
-
[API reference documentation](/ref-docs/sitecore-jss-dev-tools/)
|
|
1
|
+
# Sitecore JavaScript Rendering SDK Developer Tools
|
|
2
|
+
|
|
3
|
+
This module is provided as a part of Sitecore JavaScript Rendering SDK (JSS). It contains developer tooling, such as development proxies and deployment scripts.
|
|
4
|
+
|
|
5
|
+
<!---
|
|
6
|
+
@TODO: Update to next version docs before release
|
|
7
|
+
-->
|
|
8
|
+
[Documentation (Experience Platform)](https://doc.sitecore.com/xp/en/developers/hd/22/sitecore-headless-development/sitecore-javascript-rendering-sdks--jss-.html)
|
|
9
|
+
|
|
10
|
+
[Documentation (XM Cloud)](https://doc.sitecore.com/xmc/en/developers/xm-cloud/sitecore-javascript-rendering-sdks--jss-.html)
|
|
11
|
+
|
|
12
|
+
[API reference documentation](/ref-docs/sitecore-jss-dev-tools/)
|
|
@@ -1,27 +1,4 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -45,11 +22,12 @@ exports.extractProxy = extractProxy;
|
|
|
45
22
|
exports.getHttpsTransport = getHttpsTransport;
|
|
46
23
|
const chalk_1 = __importDefault(require("chalk"));
|
|
47
24
|
const fs_1 = __importDefault(require("fs"));
|
|
48
|
-
const https_1 =
|
|
25
|
+
const https_1 = __importDefault(require("https"));
|
|
49
26
|
const path_1 = __importDefault(require("path"));
|
|
50
27
|
const form_data_1 = __importDefault(require("form-data"));
|
|
51
|
-
const axios_1 = __importDefault(require("axios"));
|
|
52
28
|
const digest_1 = require("./digest");
|
|
29
|
+
const sitecore_jss_1 = require("@sitecore-jss/sitecore-jss");
|
|
30
|
+
const undici_1 = require("undici");
|
|
53
31
|
// Node does not use system level trusted CAs. This causes issues because SIF likes to install
|
|
54
32
|
// using a Windows trusted CA - so SSL connections to Sitecore will fail from Node.
|
|
55
33
|
// If the options.acceptCertificate is passed, we disable normal SSL validation and use this function
|
|
@@ -161,24 +139,20 @@ function watchJobStatus(options, taskName) {
|
|
|
161
139
|
const warnings = [];
|
|
162
140
|
const factors = [options.appName, taskName, `${options.importServiceUrl}/status`];
|
|
163
141
|
const mac = (0, digest_1.hmac)(factors, options.secret);
|
|
164
|
-
const isHttps = options.importServiceUrl.startsWith('https');
|
|
165
142
|
const requestBaseOptions = {
|
|
166
|
-
transport: isHttps ? getHttpsTransport(options) : undefined,
|
|
167
143
|
headers: {
|
|
168
144
|
'User-Agent': 'Sitecore/JSS-Import',
|
|
169
145
|
'Cache-Control': 'no-cache',
|
|
170
146
|
'X-JSS-Auth': mac,
|
|
171
147
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
// we turn off normal CA cert validation when we are whitelisting a single cert thumbprint
|
|
148
|
+
dispatcher: new undici_1.ProxyAgent({
|
|
149
|
+
uri: options.proxy || '',
|
|
150
|
+
maxRedirections: 0,
|
|
151
|
+
connect: {
|
|
177
152
|
rejectUnauthorized: options.acceptCertificate ? false : true,
|
|
178
|
-
// needed to allow whitelisting a cert thumbprint if a connection is reused
|
|
179
153
|
maxCachedSessions: options.acceptCertificate ? 0 : undefined,
|
|
180
|
-
}
|
|
181
|
-
|
|
154
|
+
},
|
|
155
|
+
}),
|
|
182
156
|
};
|
|
183
157
|
if (options.debugSecurity) {
|
|
184
158
|
console.log(`Deployment status security factors: ${factors}`);
|
|
@@ -189,12 +163,12 @@ function watchJobStatus(options, taskName) {
|
|
|
189
163
|
* Send job status request
|
|
190
164
|
*/
|
|
191
165
|
function sendJobStatusRequest() {
|
|
192
|
-
|
|
166
|
+
new sitecore_jss_1.NativeDataFetcher()
|
|
193
167
|
.get(`${options.importServiceUrl}/status?appName=${options.appName}&jobName=${taskName}&after=${logOffset}`, requestBaseOptions)
|
|
194
168
|
.then((response) => {
|
|
195
169
|
const body = response.data;
|
|
196
170
|
try {
|
|
197
|
-
const { state, messages } = body;
|
|
171
|
+
const { state, messages } = body.data;
|
|
198
172
|
messages.forEach((entry) => {
|
|
199
173
|
logOffset++;
|
|
200
174
|
const entryBits = /^(\[([A-Z]+)\] )?(.+)/.exec(entry);
|
|
@@ -270,24 +244,22 @@ function packageDeploy(options) {
|
|
|
270
244
|
const formData = new form_data_1.default();
|
|
271
245
|
formData.append('path', fs_1.default.createReadStream(packageFile));
|
|
272
246
|
formData.append('appName', options.appName);
|
|
273
|
-
const isHttps = options.importServiceUrl.startsWith('https');
|
|
274
247
|
const requestBaseOptions = {
|
|
275
|
-
transport: isHttps ? getHttpsTransport(options) : undefined,
|
|
276
248
|
headers: Object.assign({ 'User-Agent': 'Sitecore/JSS-Import', 'Cache-Control': 'no-cache', 'X-JSS-Auth': (0, digest_1.hmac)(factors, options.secret) }, formData.getHeaders()),
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
249
|
+
dispatcher: new undici_1.ProxyAgent({
|
|
250
|
+
uri: options.proxy ? options.proxy : '',
|
|
251
|
+
maxRedirections: 0,
|
|
252
|
+
connect: {
|
|
280
253
|
// we turn off normal CA cert validation when we are whitelisting a single cert thumbprint
|
|
281
254
|
rejectUnauthorized: options.acceptCertificate ? false : true,
|
|
282
255
|
// needed to allow whitelisting a cert thumbprint if a connection is reused
|
|
283
256
|
maxCachedSessions: options.acceptCertificate ? 0 : undefined,
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
maxRedirects: 0,
|
|
257
|
+
},
|
|
258
|
+
}),
|
|
287
259
|
};
|
|
288
260
|
console.log(`Sending package ${packageFile} to ${options.importServiceUrl}...`);
|
|
289
261
|
return new Promise((resolve, reject) => {
|
|
290
|
-
|
|
262
|
+
new sitecore_jss_1.NativeDataFetcher()
|
|
291
263
|
.post(options.importServiceUrl, formData, requestBaseOptions)
|
|
292
264
|
.then((response) => {
|
|
293
265
|
const body = response.data;
|
|
@@ -309,7 +281,7 @@ function packageDeploy(options) {
|
|
|
309
281
|
});
|
|
310
282
|
}
|
|
311
283
|
/**
|
|
312
|
-
* Creates valid proxy object
|
|
284
|
+
* Creates valid proxy object
|
|
313
285
|
* @param {string} [proxy] proxy url
|
|
314
286
|
*/
|
|
315
287
|
function extractProxy(proxy) {
|
|
@@ -329,9 +301,7 @@ function extractProxy(proxy) {
|
|
|
329
301
|
}
|
|
330
302
|
}
|
|
331
303
|
/**
|
|
332
|
-
* Provides way to customize
|
|
333
|
-
* in order to execute certificate pinning before request sent:
|
|
334
|
-
* {@link https://github.com/axios/axios/issues/2808}
|
|
304
|
+
* Provides way to customize request adapter
|
|
335
305
|
* @param {PackageDeployOptions} options
|
|
336
306
|
*/
|
|
337
307
|
function getHttpsTransport(options) {
|
|
@@ -9,11 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import chalk from 'chalk';
|
|
11
11
|
import fs from 'fs';
|
|
12
|
-
import https
|
|
12
|
+
import https from 'https';
|
|
13
13
|
import path from 'path';
|
|
14
14
|
import FormData from 'form-data';
|
|
15
|
-
import axios from 'axios';
|
|
16
15
|
import { digest, hmac } from './digest';
|
|
16
|
+
import { NativeDataFetcher } from '@sitecore-jss/sitecore-jss';
|
|
17
|
+
import { ProxyAgent } from 'undici';
|
|
17
18
|
// Node does not use system level trusted CAs. This causes issues because SIF likes to install
|
|
18
19
|
// using a Windows trusted CA - so SSL connections to Sitecore will fail from Node.
|
|
19
20
|
// If the options.acceptCertificate is passed, we disable normal SSL validation and use this function
|
|
@@ -125,24 +126,20 @@ function watchJobStatus(options, taskName) {
|
|
|
125
126
|
const warnings = [];
|
|
126
127
|
const factors = [options.appName, taskName, `${options.importServiceUrl}/status`];
|
|
127
128
|
const mac = hmac(factors, options.secret);
|
|
128
|
-
const isHttps = options.importServiceUrl.startsWith('https');
|
|
129
129
|
const requestBaseOptions = {
|
|
130
|
-
transport: isHttps ? getHttpsTransport(options) : undefined,
|
|
131
130
|
headers: {
|
|
132
131
|
'User-Agent': 'Sitecore/JSS-Import',
|
|
133
132
|
'Cache-Control': 'no-cache',
|
|
134
133
|
'X-JSS-Auth': mac,
|
|
135
134
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
// we turn off normal CA cert validation when we are whitelisting a single cert thumbprint
|
|
135
|
+
dispatcher: new ProxyAgent({
|
|
136
|
+
uri: options.proxy || '',
|
|
137
|
+
maxRedirections: 0,
|
|
138
|
+
connect: {
|
|
141
139
|
rejectUnauthorized: options.acceptCertificate ? false : true,
|
|
142
|
-
// needed to allow whitelisting a cert thumbprint if a connection is reused
|
|
143
140
|
maxCachedSessions: options.acceptCertificate ? 0 : undefined,
|
|
144
|
-
}
|
|
145
|
-
|
|
141
|
+
},
|
|
142
|
+
}),
|
|
146
143
|
};
|
|
147
144
|
if (options.debugSecurity) {
|
|
148
145
|
console.log(`Deployment status security factors: ${factors}`);
|
|
@@ -153,12 +150,12 @@ function watchJobStatus(options, taskName) {
|
|
|
153
150
|
* Send job status request
|
|
154
151
|
*/
|
|
155
152
|
function sendJobStatusRequest() {
|
|
156
|
-
|
|
153
|
+
new NativeDataFetcher()
|
|
157
154
|
.get(`${options.importServiceUrl}/status?appName=${options.appName}&jobName=${taskName}&after=${logOffset}`, requestBaseOptions)
|
|
158
155
|
.then((response) => {
|
|
159
156
|
const body = response.data;
|
|
160
157
|
try {
|
|
161
|
-
const { state, messages } = body;
|
|
158
|
+
const { state, messages } = body.data;
|
|
162
159
|
messages.forEach((entry) => {
|
|
163
160
|
logOffset++;
|
|
164
161
|
const entryBits = /^(\[([A-Z]+)\] )?(.+)/.exec(entry);
|
|
@@ -234,24 +231,22 @@ export function packageDeploy(options) {
|
|
|
234
231
|
const formData = new FormData();
|
|
235
232
|
formData.append('path', fs.createReadStream(packageFile));
|
|
236
233
|
formData.append('appName', options.appName);
|
|
237
|
-
const isHttps = options.importServiceUrl.startsWith('https');
|
|
238
234
|
const requestBaseOptions = {
|
|
239
|
-
transport: isHttps ? getHttpsTransport(options) : undefined,
|
|
240
235
|
headers: Object.assign({ 'User-Agent': 'Sitecore/JSS-Import', 'Cache-Control': 'no-cache', 'X-JSS-Auth': hmac(factors, options.secret) }, formData.getHeaders()),
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
236
|
+
dispatcher: new ProxyAgent({
|
|
237
|
+
uri: options.proxy ? options.proxy : '',
|
|
238
|
+
maxRedirections: 0,
|
|
239
|
+
connect: {
|
|
244
240
|
// we turn off normal CA cert validation when we are whitelisting a single cert thumbprint
|
|
245
241
|
rejectUnauthorized: options.acceptCertificate ? false : true,
|
|
246
242
|
// needed to allow whitelisting a cert thumbprint if a connection is reused
|
|
247
243
|
maxCachedSessions: options.acceptCertificate ? 0 : undefined,
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
maxRedirects: 0,
|
|
244
|
+
},
|
|
245
|
+
}),
|
|
251
246
|
};
|
|
252
247
|
console.log(`Sending package ${packageFile} to ${options.importServiceUrl}...`);
|
|
253
248
|
return new Promise((resolve, reject) => {
|
|
254
|
-
|
|
249
|
+
new NativeDataFetcher()
|
|
255
250
|
.post(options.importServiceUrl, formData, requestBaseOptions)
|
|
256
251
|
.then((response) => {
|
|
257
252
|
const body = response.data;
|
|
@@ -273,7 +268,7 @@ export function packageDeploy(options) {
|
|
|
273
268
|
});
|
|
274
269
|
}
|
|
275
270
|
/**
|
|
276
|
-
* Creates valid proxy object
|
|
271
|
+
* Creates valid proxy object
|
|
277
272
|
* @param {string} [proxy] proxy url
|
|
278
273
|
*/
|
|
279
274
|
export function extractProxy(proxy) {
|
|
@@ -293,9 +288,7 @@ export function extractProxy(proxy) {
|
|
|
293
288
|
}
|
|
294
289
|
}
|
|
295
290
|
/**
|
|
296
|
-
* Provides way to customize
|
|
297
|
-
* in order to execute certificate pinning before request sent:
|
|
298
|
-
* {@link https://github.com/axios/axios/issues/2808}
|
|
291
|
+
* Provides way to customize request adapter
|
|
299
292
|
* @param {PackageDeployOptions} options
|
|
300
293
|
*/
|
|
301
294
|
export function getHttpsTransport(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-jss/sitecore-jss-dev-tools",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.0-canary.10",
|
|
4
4
|
"description": "Utilities to assist in the development and deployment of Sitecore JSS apps.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/parser": "^7.24.0",
|
|
36
|
-
"@sitecore-jss/sitecore-jss": "22.
|
|
37
|
-
"axios": "^1.3.2",
|
|
36
|
+
"@sitecore-jss/sitecore-jss": "^22.4.0-canary.10",
|
|
38
37
|
"chalk": "^4.1.2",
|
|
39
38
|
"chokidar": "^3.6.0",
|
|
40
39
|
"del": "^6.0.0",
|
|
@@ -51,6 +50,7 @@
|
|
|
51
50
|
"recast": "^0.23.5",
|
|
52
51
|
"resolve": "^1.22.1",
|
|
53
52
|
"ts-node": "^10.9.1",
|
|
53
|
+
"undici": "^7.2.1",
|
|
54
54
|
"url-join": "^4.0.1",
|
|
55
55
|
"uuid": "^9.0.0",
|
|
56
56
|
"yargs": "^17.6.2"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"typescript": "~5.6.3"
|
|
87
87
|
},
|
|
88
88
|
"types": "types/index.d.ts",
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "1220b71aa4c565d5f8dffde56f362543d6fda3f7",
|
|
90
90
|
"files": [
|
|
91
91
|
"dist",
|
|
92
92
|
"types",
|
|
@@ -54,7 +54,7 @@ export declare function logJobStatus({ message, entryLevel, warnings, errors, }:
|
|
|
54
54
|
*/
|
|
55
55
|
export declare function packageDeploy(options: PackageDeployOptions): Promise<unknown>;
|
|
56
56
|
/**
|
|
57
|
-
* Creates valid proxy object
|
|
57
|
+
* Creates valid proxy object
|
|
58
58
|
* @param {string} [proxy] proxy url
|
|
59
59
|
*/
|
|
60
60
|
export declare function extractProxy(proxy?: string): {
|
|
@@ -63,9 +63,7 @@ export declare function extractProxy(proxy?: string): {
|
|
|
63
63
|
port: number;
|
|
64
64
|
} | undefined;
|
|
65
65
|
/**
|
|
66
|
-
* Provides way to customize
|
|
67
|
-
* in order to execute certificate pinning before request sent:
|
|
68
|
-
* {@link https://github.com/axios/axios/issues/2808}
|
|
66
|
+
* Provides way to customize request adapter
|
|
69
67
|
* @param {PackageDeployOptions} options
|
|
70
68
|
*/
|
|
71
69
|
export declare function getHttpsTransport(options: PackageDeployOptions): {
|