ccdeck 3.50.0 → 3.52.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/README.md +2 -0
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/dist/web/assets/BrowserWatchModal-CRqdEVdh.js +1 -0
- package/dist/web/assets/IntegrationModal-BDzEIGSM.js +7 -0
- package/dist/web/assets/RadioPanel-BJlsCpnN.js +1 -0
- package/dist/web/assets/TrafficRadar-BGxw-hlO.js +8 -0
- package/dist/web/assets/UsageHistoryModal-C_WBpNIp.js +1 -0
- package/dist/web/assets/app-B53fC4gE.js +358 -0
- package/dist/web/assets/app-Co1HNGP8.css +1 -0
- package/dist/web/assets/{index-DSIUCKoe.js → index-D9nJhUJR.js} +1 -1
- package/dist/web/index.html +3 -3
- package/node_modules/bare-addon-resolve/LICENSE +201 -0
- package/node_modules/bare-addon-resolve/README.md +226 -0
- package/node_modules/bare-addon-resolve/index.d.ts +100 -0
- package/node_modules/bare-addon-resolve/index.js +531 -0
- package/node_modules/bare-addon-resolve/lib/errors.d.ts +16 -0
- package/node_modules/bare-addon-resolve/lib/errors.js +21 -0
- package/node_modules/bare-addon-resolve/package.json +57 -0
- package/node_modules/bare-module-resolve/LICENSE +201 -0
- package/node_modules/bare-module-resolve/README.md +322 -0
- package/node_modules/bare-module-resolve/index.d.ts +171 -0
- package/node_modules/bare-module-resolve/index.js +899 -0
- package/node_modules/bare-module-resolve/lib/errors.d.ts +31 -0
- package/node_modules/bare-module-resolve/lib/errors.js +37 -0
- package/node_modules/bare-module-resolve/package.json +56 -0
- package/node_modules/bare-semver/LICENSE +201 -0
- package/node_modules/bare-semver/README.md +147 -0
- package/node_modules/bare-semver/index.d.ts +61 -0
- package/node_modules/bare-semver/index.js +13 -0
- package/node_modules/bare-semver/lib/comparator.js +37 -0
- package/node_modules/bare-semver/lib/constants.js +7 -0
- package/node_modules/bare-semver/lib/errors.js +22 -0
- package/node_modules/bare-semver/lib/range.js +256 -0
- package/node_modules/bare-semver/lib/version.js +240 -0
- package/node_modules/bare-semver/package.json +43 -0
- package/node_modules/fs-native-extensions/CMakeLists.txt +118 -0
- package/node_modules/fs-native-extensions/LICENSE +201 -0
- package/node_modules/fs-native-extensions/README.md +160 -0
- package/node_modules/fs-native-extensions/binding.c +1825 -0
- package/node_modules/fs-native-extensions/binding.js +3 -0
- package/node_modules/fs-native-extensions/include/fs-ext.h +193 -0
- package/node_modules/fs-native-extensions/index.js +356 -0
- package/node_modules/fs-native-extensions/package.json +72 -0
- package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-x64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/src/apple.c +197 -0
- package/node_modules/fs-native-extensions/src/linux.c +146 -0
- package/node_modules/fs-native-extensions/src/platform.h +51 -0
- package/node_modules/fs-native-extensions/src/posix.c +33 -0
- package/node_modules/fs-native-extensions/src/shared.c +397 -0
- package/node_modules/fs-native-extensions/src/win32/nt.h +226 -0
- package/node_modules/fs-native-extensions/src/win32.c +531 -0
- package/node_modules/require-addon/LICENSE +201 -0
- package/node_modules/require-addon/README.md +19 -0
- package/node_modules/require-addon/lib/bare.js +1 -0
- package/node_modules/require-addon/lib/default.js +7 -0
- package/node_modules/require-addon/lib/node.js +79 -0
- package/node_modules/require-addon/package.json +64 -0
- package/node_modules/which-runtime/LICENSE +201 -0
- package/node_modules/which-runtime/README.md +29 -0
- package/node_modules/which-runtime/index.js +36 -0
- package/node_modules/which-runtime/package.json +32 -0
- package/package.json +9 -2
- package/release-notes.json +33 -0
- package/src/server/integrations/jira-comment.mjs +37 -0
- package/src/server/integrations/jira-move.mjs +37 -11
- package/src/server/integrations/jira-transition.mjs +43 -0
- package/src/server/integrations/jira-write-guard.mjs +218 -0
- package/src/server/integrations/jira.mjs +16 -0
- package/src/server/integrations/routes.mjs +70 -7
- package/src/server/static-cache.mjs +34 -16
- package/src/server/traffic-radar-wire.mjs +6 -0
- package/dist/web/assets/BrowserWatchModal-CSckhvRP.js +0 -1
- package/dist/web/assets/IntegrationModal-CT8_QnAx.js +0 -7
- package/dist/web/assets/RadioPanel-D3JLkVYu.js +0 -1
- package/dist/web/assets/TrafficRadar-Cuk5tXfL.js +0 -8
- package/dist/web/assets/UsageHistoryModal-DiEH73iz.js +0 -1
- package/dist/web/assets/app-BRaZrImF.js +0 -321
- package/dist/web/assets/app-DfGYllmZ.css +0 -1
|
@@ -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 [yyyy] [name of copyright owner]
|
|
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.
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# bare-module-resolve
|
|
2
|
+
|
|
3
|
+
Low-level module resolution algorithm for Bare. The algorithm is implemented as a generator function that yields either package manifests to be read or resolution candidates to be tested by the caller. As a convenience, the main export is a synchronous and asynchronous iterable that relies on package manifests being read by a callback. For asynchronous iteration, the callback may return promises which will be awaited before being passed to the generator.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npm i bare-module-resolve
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
For synchronous resolution:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
const resolve = require('bare-module-resolve')
|
|
15
|
+
|
|
16
|
+
function readPackage(url) {
|
|
17
|
+
// Read and parse `url` if it exists, otherwise `null`
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
for (const resolution of resolve('./file.js', new URL('file:///directory/'), readPackage)) {
|
|
21
|
+
console.log(resolution)
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For asynchronous resolution:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
const resolve = require('bare-module-resolve')
|
|
29
|
+
|
|
30
|
+
async function readPackage(url) {
|
|
31
|
+
// Read and parse `url` if it exists, otherwise `null`
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
for await (const resolution of resolve('./file.js', new URL('file:///directory/'), readPackage)) {
|
|
35
|
+
console.log(resolution)
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
See the [`bare-module-resolve` reference](https://docs.pears.com/reference/bare/modules/bare-module-resolve).
|
|
42
|
+
|
|
43
|
+
## Algorithm
|
|
44
|
+
|
|
45
|
+
The following generator functions implement the resolution algorithm, which has been adapted from the Node.js resolution algorithms for CommonJS and ES modules. Unlike Node.js, Bare uses the same resolution algorithm for both module formats. The yielded values have the following shape:
|
|
46
|
+
|
|
47
|
+
**Package manifest**
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
next.value = {
|
|
51
|
+
package: URL
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If the package manifest identified by `next.value.package` exists, `generator.next()` must be passed the parsed JSON value of the manifest. If it does not exist, pass `null` instead.
|
|
56
|
+
|
|
57
|
+
**Resolution candidate**
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
next.value = {
|
|
61
|
+
resolution: URL
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If the module identified by `next.value.resolution` exists, `generator.next()` may be passed `true` to signal that the resolution for the current set of conditions has been identified. If it does not exist, pass `false` instead.
|
|
66
|
+
|
|
67
|
+
To drive the generator functions, a loop like the following can be used:
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
const generator = resolve.module(specifier, parentURL)
|
|
71
|
+
|
|
72
|
+
let next = generator.next()
|
|
73
|
+
|
|
74
|
+
while (next.done !== true) {
|
|
75
|
+
const value = next.value
|
|
76
|
+
|
|
77
|
+
if (value.package) {
|
|
78
|
+
// Read and parse `value.package` if it exists, otherwise `null`
|
|
79
|
+
let info
|
|
80
|
+
|
|
81
|
+
next = generator.next(info)
|
|
82
|
+
} else {
|
|
83
|
+
const resolution = value.resolution
|
|
84
|
+
|
|
85
|
+
// `true` if `resolution` was the correct candidate, otherwise `false`
|
|
86
|
+
let resolved
|
|
87
|
+
|
|
88
|
+
next = generator.next(resolved)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Options are the same as `resolve()` for all functions.
|
|
94
|
+
|
|
95
|
+
> [!WARNING]
|
|
96
|
+
> These functions are currently subject to change between minor releases. If using them directly, make sure to specify a tilde range (`~1.2.3`) when declaring the module dependency.
|
|
97
|
+
|
|
98
|
+
### `const generator = resolve.module(specifier, parentURL[, options])`
|
|
99
|
+
|
|
100
|
+
1. If `specifier` [starts with a Windows drive letter](https://url.spec.whatwg.org/#start-with-a-windows-drive-letter):
|
|
101
|
+
1. Prepend `/` to `specifier`.
|
|
102
|
+
2. If `options.resolutions` is set:
|
|
103
|
+
1. If `preresolved(specifier, options.resolutions, parentURL, options)` yields, return.
|
|
104
|
+
3. If `url(specifier, parentURL, options)` yields, return.
|
|
105
|
+
4. If `packageImports(specifier, parentURL, options)` yields, return.
|
|
106
|
+
5. If `specifier` equals `.` or `..`, or if `specifier` starts with `/`, `\`, `./`, `.\`, `../`, or `..\`:
|
|
107
|
+
1. If `options.imports` is set:
|
|
108
|
+
1. If `packageImportsExports(specifier, options.imports, parentURL, true, options)` yields, return.
|
|
109
|
+
2. If `deferred(specifier, options)` yields, return.
|
|
110
|
+
3. If `file(specifier, parentURL, false, options)` resolves, return.
|
|
111
|
+
4. Return `directory(specifier, parentURL, options)`.
|
|
112
|
+
6. Return `package(specifier, parentURL, options)`.
|
|
113
|
+
|
|
114
|
+
### `const generator = resolve.url(url, parentURL[, options])`
|
|
115
|
+
|
|
116
|
+
1. If `url` is not a valid URL, return.
|
|
117
|
+
2. If `options.imports` is set:
|
|
118
|
+
1. If `packageImportsExports(url.href, options.imports, parentURL, true, options)` yields, return.
|
|
119
|
+
3. If `url.protocol` equals `options.deferredProtocol`:
|
|
120
|
+
1. Let `specifier` be `url.pathname`.
|
|
121
|
+
2. If `options.resolutions` is set:
|
|
122
|
+
1. Let `imports` be `options.resolutions[parentURL]`.
|
|
123
|
+
2. If `imports` is a non-`null` object:
|
|
124
|
+
1. Set `imports[specifier]` to `null`.
|
|
125
|
+
3. Return `module(specifier, parentURL, options)`.
|
|
126
|
+
4. If `url.protocol` equals `node:`:
|
|
127
|
+
1. Let `specifier` be `url.pathname`.
|
|
128
|
+
2. If `specifier` equals `.` or `..`, or if `specifier` starts with `/`, `\`, `./`, `.\`, `../`, or `..\`, throw.
|
|
129
|
+
3. Return `package(specifier, parentURL, options)`.
|
|
130
|
+
5. Yield `url`.
|
|
131
|
+
|
|
132
|
+
### `const generator = resolve.preresolved(specifier, resolutions, parentURL[, options])`
|
|
133
|
+
|
|
134
|
+
1. Let `imports` be `resolutions[parentURL]`.
|
|
135
|
+
2. If `imports` is a non-`null` object:
|
|
136
|
+
1. Return `packageImportsExports(specifier, imports, parentURL, true, options)`.
|
|
137
|
+
|
|
138
|
+
### `const generator = resolve.deferred(specifier[, options])`
|
|
139
|
+
|
|
140
|
+
1. If `options.defer` includes `specifier`:
|
|
141
|
+
1. Yield `options.deferredProtocol` concatenated with `specifier` and return.
|
|
142
|
+
|
|
143
|
+
### `const generator = resolve.package(packageSpecifier, parentURL[, options])`
|
|
144
|
+
|
|
145
|
+
1. If `packageSpecifier` is the empty string, throw.
|
|
146
|
+
2. If `packageSpecifier` does not start with `@`:
|
|
147
|
+
1. Set `packageName` to the substring of `packageSpecifier` until the first `/` or the end of the string.
|
|
148
|
+
3. Let `packageName` be `undefined`.
|
|
149
|
+
4. Otherwise:
|
|
150
|
+
1. If `packageSpecifier` does not include `/`, throw.
|
|
151
|
+
2. Set `packageName` to the substring of `packageSpecifier` until the second `/` or the end of the string.
|
|
152
|
+
5. If `packageName` starts with `.` or includes `\` or `%`, throw.
|
|
153
|
+
6. If `builtinTarget(packageSpecifier, null, options.builtins, options)` yields, return.
|
|
154
|
+
7. If `deferred(packageSpecifier, options)` yields, return.
|
|
155
|
+
8. Let `packageSubpath` be `.` concatenated with the substring of `packageSpecifier` from the position at the length of `packageName`.
|
|
156
|
+
9. If `packageSelf(packageName, packageSubpath, parentURL, options)` yields, return.
|
|
157
|
+
10. For each value `packageURL` of `lookupPackageRoot(packageName, parentURL, options)`:
|
|
158
|
+
1. Let `info` be the result of yielding `packageURL`.
|
|
159
|
+
2. If `info` is not `null`:
|
|
160
|
+
1. If `info.engines` is set:
|
|
161
|
+
1. Call `validateEngines(packageURL, info.engines, options)`.
|
|
162
|
+
2. If `info.exports` is set:
|
|
163
|
+
1. Return `packageExports(packageURL, packageSubpath, info.exports, options)`.
|
|
164
|
+
3. If `packageSubpath` is `.`:
|
|
165
|
+
1. If `info.main` is a non-empty string:
|
|
166
|
+
1. Set `packageSubpath` to `info.main`.
|
|
167
|
+
2. Otherwise:
|
|
168
|
+
1. Return `file('index', packageURL, true, options)`.
|
|
169
|
+
4. If `file(packageSubpath, packageURL, false, options)` resolves, return.
|
|
170
|
+
5. Return `directory(packageSubpath, packageURL, options)`.
|
|
171
|
+
|
|
172
|
+
### `const generator = resolve.packageSelf(packageName, packageSubpath, parentURL[, options])`
|
|
173
|
+
|
|
174
|
+
1. For each value `packageURL` of `lookupPackageScope(parentURL, options)`:
|
|
175
|
+
1. Let `info` be the result of yielding `packageURL`.
|
|
176
|
+
2. If `info` is not `null`:
|
|
177
|
+
1. If `info.name` does not equal `packageName`, return.
|
|
178
|
+
2. If `info.exports` is set:
|
|
179
|
+
1. Return `packageExports(packageURL, packageSubpath, info.exports, options)`.
|
|
180
|
+
3. If `packageSubpath` is `.`:
|
|
181
|
+
1. If `info.main` is a non-empty string:
|
|
182
|
+
1. Set `packageSubpath` to `info.main`.
|
|
183
|
+
2. Otherwise:
|
|
184
|
+
1. Return `file('index', packageURL, true, options)`.
|
|
185
|
+
4. If `file(packageSubpath, packageURL, false, options)` resolves, return.
|
|
186
|
+
5. Return `directory(packageSubpath, packageURL, options)`.
|
|
187
|
+
|
|
188
|
+
### `const generator = resolve.packageExports(packageURL, subpath, exports[, options])`
|
|
189
|
+
|
|
190
|
+
1. If `exports` is a non-`null`, non-array object whose keys are a mix of ones that start with `.` and ones that don't, throw.
|
|
191
|
+
2. If `subpath` is `.`:
|
|
192
|
+
1. Let `mainExport` be `undefined`.
|
|
193
|
+
2. If `exports` is a string or an array:
|
|
194
|
+
1. Set `mainExport` to `exports`.
|
|
195
|
+
3. If `exports` is a non-`null` object:
|
|
196
|
+
1. If some keys of `exports` start with `.`:
|
|
197
|
+
1. If `.` is a key of `exports`:
|
|
198
|
+
1. Set `mainExport` to `exports['.']`.
|
|
199
|
+
2. Otherwise:
|
|
200
|
+
1. Set `mainExport` to `exports`.
|
|
201
|
+
4. If `mainExport` is not `undefined`:
|
|
202
|
+
1. If `packageTarget(packageURL, mainExport, null, false, options)` yields, return.
|
|
203
|
+
3. Otherwise, if `exports` is a non-`null` object:
|
|
204
|
+
1. If every key of `exports` starts with `.`:
|
|
205
|
+
1. If `packageImportsExports(subpath, exports, packageURL, false, options)` yields, return.
|
|
206
|
+
4. Throw.
|
|
207
|
+
|
|
208
|
+
### `const generator = resolve.packageImports(specifier, parentURL[, options])`
|
|
209
|
+
|
|
210
|
+
1. If `specifier` is `#` or starts with `#/`, throw.
|
|
211
|
+
2. For each value `packageURL` of `lookupPackageScope(parentURL, options)`:
|
|
212
|
+
1. Let `info` be the result of yielding `packageURL`.
|
|
213
|
+
2. If `info` is not `null`:
|
|
214
|
+
1. If `info.imports` is set:
|
|
215
|
+
1. If `packageImportsExports(specifier, info.imports, packageURL, true, options)` yields, return.
|
|
216
|
+
2. If specifier starts with `#`, throw.
|
|
217
|
+
3. Return.
|
|
218
|
+
3. If `options.imports` is set:
|
|
219
|
+
1. If `packageImportsExports(url.href, options.imports, parentURL, true, options)` yields, return.
|
|
220
|
+
|
|
221
|
+
### `const generator = resolve.packageImportsExports(matchKey, matchObject, packageURL, isImports[, options])`
|
|
222
|
+
|
|
223
|
+
1. If `matchKey` is a key of `matchObject` and `matchKey` does not include `*`:
|
|
224
|
+
1. Let `target` be `matchObject[matchKey]`.
|
|
225
|
+
2. Return `packageTarget(packageURL, target, null, isImports, options)`.
|
|
226
|
+
2. Let `expansionKeys` be the keys of `matchObject` that include `*` sorted by `patternKeyCompare`.
|
|
227
|
+
3. For each value `expansionKey` of `expansionKeys`:
|
|
228
|
+
1. Let `patternBase` be the substring of `expansionKey` until the first `*`.
|
|
229
|
+
2. If `matchKey` starts with but isn't equal to `patternBase`:
|
|
230
|
+
1. Let `patternTrailer` be the substring of `expansionKey` from the position at the index after the first `*`.
|
|
231
|
+
2. If `patternTrailer` is the empty string, or if `matchKey` ends with `patternTrailer` and the length of `matchKey` is greater than or equal to the length of `expansionKey`:
|
|
232
|
+
1. Let `target` be `matchObject[expansionKey]`.
|
|
233
|
+
2. Let `patternMatch` be the substring of `matchKey` from the position at the length of `patternBase` until the length of `matchKey` minus the length of `patternTrailer`.
|
|
234
|
+
3. Return `packageTarget(packageURL, target, patternMatch, isImports, options)`.
|
|
235
|
+
|
|
236
|
+
### `const generator = resolve.packageTarget(packageURL, target, patternMatch, isImports[, options])`
|
|
237
|
+
|
|
238
|
+
1. If `target` is a string:
|
|
239
|
+
1. If `target` does not start with `./` and `isImports` is `false`, throw.
|
|
240
|
+
2. If `patternMatch` is not `null`:
|
|
241
|
+
1. Replace every instance of `*` in `target` with `patternMatch`.
|
|
242
|
+
3. If `options.matchedTargets` includes `target`, return, having detected a resolution cycle.
|
|
243
|
+
4. Append `target` to `options.matchedTargets` for the remainder of these steps, removing it again before returning.
|
|
244
|
+
5. If `url(target, packageURL, options)` yields, or if `target` is a valid URL, return.
|
|
245
|
+
6. If `target` equals `.` or `..`, or if `target` starts with `/`, `./`, or `../`:
|
|
246
|
+
1. If `packageURL` has an opaque path, return.
|
|
247
|
+
2. Yield the resolution of `target` relative to `packageURL` and return.
|
|
248
|
+
7. Return `package(target, packageURL, options)`.
|
|
249
|
+
2. If `target` is an array:
|
|
250
|
+
1. For each value `targetValue` of `target`:
|
|
251
|
+
1. If `packageTarget(packageURL, targetValue, patternMatch, isImports, options)` resolves, return.
|
|
252
|
+
3. If `target` is a non-`null` object:
|
|
253
|
+
1. For each key `condition` of `target`:
|
|
254
|
+
1. If `condition` equals `default` or if `options.conditions` includes `condition`:
|
|
255
|
+
1. Let `targetValue` be `target[condition]`.
|
|
256
|
+
2. Append `condition` to `options.matchedConditions`.
|
|
257
|
+
3. Let `status` be the result of `packageTarget(packageURL, targetValue, patternMatch, isImports, options)`.
|
|
258
|
+
4. Remove `condition` from `options.matchedConditions`.
|
|
259
|
+
5. Return `status`.
|
|
260
|
+
|
|
261
|
+
### `const generator = resolve.builtinTarget(packageSpecifier, packageVersion, target[, options])`
|
|
262
|
+
|
|
263
|
+
1. If `target` is a string:
|
|
264
|
+
1. If `target` does not start with `@`:
|
|
265
|
+
1. Let `targetName` be the substring of `target` until the first `@` or the end of the string.
|
|
266
|
+
2. Let `targetVersion` be the substring of `target` from the character following the first `@` and to the end of string, or `null` if no such substring exists.
|
|
267
|
+
2. Otherwise:
|
|
268
|
+
1. Let `targetName` be the substring of `target` until the second `@` or the end of the string.
|
|
269
|
+
2. Let `targetVersion` be the substring of `target` from the character following the second `@` and to the end of string, or `null` if no such substring exists.
|
|
270
|
+
3. If `packageSpecifier` equals `targetName`:
|
|
271
|
+
1. If `packageVersion` is `null` and `targetVersion` is `null`:
|
|
272
|
+
1. Yield `options.builtinProtocol` concatenated with `packageSpecifier` and return.
|
|
273
|
+
2. Let `version` be `null`.
|
|
274
|
+
3. If `packageVersion` is `null`, let `version` be `targetVersion`.
|
|
275
|
+
4. Otherwise, if `targetVersion` is either `null` or equals `packageVersion`, let `version` be `packageVersion`
|
|
276
|
+
5. If `version` is not `null`:
|
|
277
|
+
1. Yield `options.builtinProtocol` concatenated with `packageSpecifier`, `@`, and `version` and return.
|
|
278
|
+
2. If `target` is an array:
|
|
279
|
+
1. For each value `targetValue` of `target`:
|
|
280
|
+
1. If `builtinTarget(packageSpecifier, packageVersion, targetValue, options)` resolves, return.
|
|
281
|
+
3. If `target` is a non-`null` object:
|
|
282
|
+
1. For each key `condition` of `target`:
|
|
283
|
+
1. If `condition` equals `default` or if `options.conditions` includes `condition`:
|
|
284
|
+
1. Let `targetValue` be `target[condition]`.
|
|
285
|
+
2. Append `condition` to `options.matchedConditions`.
|
|
286
|
+
3. Let `status` be the result of `builtinTarget(packageSpecifier, packageVersion, targetValue, options)`.
|
|
287
|
+
4. Remove `condition` from `options.matchedConditions`.
|
|
288
|
+
5. Return `status`.
|
|
289
|
+
|
|
290
|
+
### `const generator = resolve.file(filename, parentURL, isIndex[, options])`
|
|
291
|
+
|
|
292
|
+
1. If `filename` equals `.` or `..`, or if `filename` ends with `/` or `\`, return.
|
|
293
|
+
2. If `parentURL` has an opaque path, return.
|
|
294
|
+
3. If `parentURL` is a `file:` URL and `filename` includes encoded `/` or `\`, throw.
|
|
295
|
+
4. If `isIndex` is `false`:
|
|
296
|
+
1. Yield the resolution of `filename` relative to `parentURL`.
|
|
297
|
+
5. For each value `ext` of `options.extensions`:
|
|
298
|
+
1. If `filename` ends with `ext`, continue.
|
|
299
|
+
2. Yield the resolution of `filename` concatenated with `ext` relative to `parentURL`.
|
|
300
|
+
|
|
301
|
+
### `const generator = resolve.directory(dirname, parentURL[, options])`
|
|
302
|
+
|
|
303
|
+
1. If `parentURL` has an opaque path, return.
|
|
304
|
+
2. Let `directoryURL` be `undefined`.
|
|
305
|
+
3. If `dirname` ends with `/` or `\`:
|
|
306
|
+
1. Set `directoryURL` to the resolution of `dirname` relative to `parentURL`.
|
|
307
|
+
4. Otherwise:
|
|
308
|
+
1. Set `directoryURL` to the resolution of `dirname` concatenated with `/` relative to `parentURL`.
|
|
309
|
+
5. If `options.directories` is `true`:
|
|
310
|
+
1. Yield `directoryURL`.
|
|
311
|
+
6. Let `info` be the result of yielding the resolution of `package.json` relative to `directoryURL`.
|
|
312
|
+
7. If `info` is not `null`:
|
|
313
|
+
1. If `info.exports` is set:
|
|
314
|
+
1. Return `packageExports(directoryURL, '.', info.exports, options)`.
|
|
315
|
+
2. If `info.main` is a non-empty string:
|
|
316
|
+
1. If `file(info.main, directoryURL, false, options)` resolves, return.
|
|
317
|
+
2. Return `directory(info.main, directoryURL, options)`.
|
|
318
|
+
8. Return `file('index', directoryURL, true, options)`.
|
|
319
|
+
|
|
320
|
+
## License
|
|
321
|
+
|
|
322
|
+
Apache-2.0
|