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.
Files changed (100) hide show
  1. package/README.md +2 -0
  2. package/THIRD_PARTY_NOTICES.md +28 -0
  3. package/dist/web/assets/BrowserWatchModal-CRqdEVdh.js +1 -0
  4. package/dist/web/assets/IntegrationModal-BDzEIGSM.js +7 -0
  5. package/dist/web/assets/RadioPanel-BJlsCpnN.js +1 -0
  6. package/dist/web/assets/TrafficRadar-BGxw-hlO.js +8 -0
  7. package/dist/web/assets/UsageHistoryModal-C_WBpNIp.js +1 -0
  8. package/dist/web/assets/app-B53fC4gE.js +358 -0
  9. package/dist/web/assets/app-Co1HNGP8.css +1 -0
  10. package/dist/web/assets/{index-DSIUCKoe.js → index-D9nJhUJR.js} +1 -1
  11. package/dist/web/index.html +3 -3
  12. package/node_modules/bare-addon-resolve/LICENSE +201 -0
  13. package/node_modules/bare-addon-resolve/README.md +226 -0
  14. package/node_modules/bare-addon-resolve/index.d.ts +100 -0
  15. package/node_modules/bare-addon-resolve/index.js +531 -0
  16. package/node_modules/bare-addon-resolve/lib/errors.d.ts +16 -0
  17. package/node_modules/bare-addon-resolve/lib/errors.js +21 -0
  18. package/node_modules/bare-addon-resolve/package.json +57 -0
  19. package/node_modules/bare-module-resolve/LICENSE +201 -0
  20. package/node_modules/bare-module-resolve/README.md +322 -0
  21. package/node_modules/bare-module-resolve/index.d.ts +171 -0
  22. package/node_modules/bare-module-resolve/index.js +899 -0
  23. package/node_modules/bare-module-resolve/lib/errors.d.ts +31 -0
  24. package/node_modules/bare-module-resolve/lib/errors.js +37 -0
  25. package/node_modules/bare-module-resolve/package.json +56 -0
  26. package/node_modules/bare-semver/LICENSE +201 -0
  27. package/node_modules/bare-semver/README.md +147 -0
  28. package/node_modules/bare-semver/index.d.ts +61 -0
  29. package/node_modules/bare-semver/index.js +13 -0
  30. package/node_modules/bare-semver/lib/comparator.js +37 -0
  31. package/node_modules/bare-semver/lib/constants.js +7 -0
  32. package/node_modules/bare-semver/lib/errors.js +22 -0
  33. package/node_modules/bare-semver/lib/range.js +256 -0
  34. package/node_modules/bare-semver/lib/version.js +240 -0
  35. package/node_modules/bare-semver/package.json +43 -0
  36. package/node_modules/fs-native-extensions/CMakeLists.txt +118 -0
  37. package/node_modules/fs-native-extensions/LICENSE +201 -0
  38. package/node_modules/fs-native-extensions/README.md +160 -0
  39. package/node_modules/fs-native-extensions/binding.c +1825 -0
  40. package/node_modules/fs-native-extensions/binding.js +3 -0
  41. package/node_modules/fs-native-extensions/include/fs-ext.h +193 -0
  42. package/node_modules/fs-native-extensions/index.js +356 -0
  43. package/node_modules/fs-native-extensions/package.json +72 -0
  44. package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.bare +0 -0
  45. package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.node +0 -0
  46. package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.bare +0 -0
  47. package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.node +0 -0
  48. package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.bare +0 -0
  49. package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.node +0 -0
  50. package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.bare +0 -0
  51. package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.node +0 -0
  52. package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.bare +0 -0
  53. package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.node +0 -0
  54. package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.bare +0 -0
  55. package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.node +0 -0
  56. package/node_modules/fs-native-extensions/prebuilds/ios-arm64/fs-native-extensions.bare +0 -0
  57. package/node_modules/fs-native-extensions/prebuilds/ios-arm64-simulator/fs-native-extensions.bare +0 -0
  58. package/node_modules/fs-native-extensions/prebuilds/ios-x64-simulator/fs-native-extensions.bare +0 -0
  59. package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.bare +0 -0
  60. package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.node +0 -0
  61. package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.bare +0 -0
  62. package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.node +0 -0
  63. package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.bare +0 -0
  64. package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.node +0 -0
  65. package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.bare +0 -0
  66. package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.node +0 -0
  67. package/node_modules/fs-native-extensions/src/apple.c +197 -0
  68. package/node_modules/fs-native-extensions/src/linux.c +146 -0
  69. package/node_modules/fs-native-extensions/src/platform.h +51 -0
  70. package/node_modules/fs-native-extensions/src/posix.c +33 -0
  71. package/node_modules/fs-native-extensions/src/shared.c +397 -0
  72. package/node_modules/fs-native-extensions/src/win32/nt.h +226 -0
  73. package/node_modules/fs-native-extensions/src/win32.c +531 -0
  74. package/node_modules/require-addon/LICENSE +201 -0
  75. package/node_modules/require-addon/README.md +19 -0
  76. package/node_modules/require-addon/lib/bare.js +1 -0
  77. package/node_modules/require-addon/lib/default.js +7 -0
  78. package/node_modules/require-addon/lib/node.js +79 -0
  79. package/node_modules/require-addon/package.json +64 -0
  80. package/node_modules/which-runtime/LICENSE +201 -0
  81. package/node_modules/which-runtime/README.md +29 -0
  82. package/node_modules/which-runtime/index.js +36 -0
  83. package/node_modules/which-runtime/package.json +32 -0
  84. package/package.json +9 -2
  85. package/release-notes.json +33 -0
  86. package/src/server/integrations/jira-comment.mjs +37 -0
  87. package/src/server/integrations/jira-move.mjs +37 -11
  88. package/src/server/integrations/jira-transition.mjs +43 -0
  89. package/src/server/integrations/jira-write-guard.mjs +218 -0
  90. package/src/server/integrations/jira.mjs +16 -0
  91. package/src/server/integrations/routes.mjs +70 -7
  92. package/src/server/static-cache.mjs +34 -16
  93. package/src/server/traffic-radar-wire.mjs +6 -0
  94. package/dist/web/assets/BrowserWatchModal-CSckhvRP.js +0 -1
  95. package/dist/web/assets/IntegrationModal-CT8_QnAx.js +0 -7
  96. package/dist/web/assets/RadioPanel-D3JLkVYu.js +0 -1
  97. package/dist/web/assets/TrafficRadar-Cuk5tXfL.js +0 -8
  98. package/dist/web/assets/UsageHistoryModal-DiEH73iz.js +0 -1
  99. package/dist/web/assets/app-BRaZrImF.js +0 -321
  100. package/dist/web/assets/app-DfGYllmZ.css +0 -1
@@ -0,0 +1,256 @@
1
+ const constants = require('./constants')
2
+ const errors = require('./errors')
3
+ const Version = require('./version')
4
+ const Comparator = require('./comparator')
5
+
6
+ class Range {
7
+ constructor(comparators = []) {
8
+ this.comparators = comparators
9
+ }
10
+
11
+ test(version) {
12
+ for (const set of this.comparators) {
13
+ let matches = true
14
+
15
+ for (const comparator of set) {
16
+ if (comparator.test(version)) continue
17
+ matches = false
18
+ break
19
+ }
20
+
21
+ if (!matches) continue
22
+
23
+ // Following npm, a version with prerelease tags may only satisfy a
24
+ // comparator set if at least one comparator in the set targets the same
25
+ // [major, minor, patch] tuple and itself carries prerelease tags. This
26
+ // keeps a range like '>=1.2.3-beta.2 <1.3.0-0' from matching
27
+ // '1.2.4-alpha', whose prerelease was never opted into.
28
+ if (version.prerelease.length && !allows(set, version)) continue
29
+
30
+ return true
31
+ }
32
+
33
+ return false
34
+ }
35
+
36
+ toString() {
37
+ let result = ''
38
+ let first = true
39
+
40
+ for (const set of this.comparators) {
41
+ if (first) first = false
42
+ else result += ' || '
43
+
44
+ result += set.join(' ')
45
+ }
46
+
47
+ return result
48
+ }
49
+ }
50
+
51
+ module.exports = exports = Range
52
+
53
+ exports.parse = function parse(input, state = { position: 0, partial: false }) {
54
+ let i = state.position
55
+ let c
56
+
57
+ const unexpected = (expected) => {
58
+ let msg
59
+
60
+ if (i >= input.length) {
61
+ msg = `Unexpected end of input in '${input}'`
62
+ } else {
63
+ msg = `Unexpected token '${input[i]}' in '${input}' at position ${i}`
64
+ }
65
+
66
+ if (expected) msg += `, ${expected}`
67
+
68
+ throw errors.INVALID_VERSION(msg, unexpected)
69
+ }
70
+
71
+ const comparators = []
72
+
73
+ while (i < input.length) {
74
+ const set = []
75
+
76
+ while (i < input.length) {
77
+ c = input[i]
78
+
79
+ let operator = constants.EQ
80
+ let caret = false
81
+ let tilde = false
82
+
83
+ if (c === '<') {
84
+ operator = constants.LT
85
+ c = input[++i]
86
+
87
+ if (c === '=') {
88
+ operator = constants.LTE
89
+ c = input[++i]
90
+ }
91
+ } else if (c === '>') {
92
+ operator = constants.GT
93
+ c = input[++i]
94
+
95
+ if (c === '=') {
96
+ operator = constants.GTE
97
+ c = input[++i]
98
+ }
99
+ } else if (c === '=') {
100
+ c = input[++i]
101
+ } else if (c === '^') {
102
+ caret = true
103
+ c = input[++i]
104
+ } else if (c === '~') {
105
+ tilde = true
106
+ c = input[++i]
107
+
108
+ // Accept the legacy `~>` spelling as an alias for `~`.
109
+ if (c === '>') c = input[++i]
110
+ }
111
+
112
+ while (c === ' ') c = input[++i]
113
+
114
+ const state = { position: i, partial: true, range: true }
115
+
116
+ const lower = Version.parse(input, state)
117
+
118
+ const precision = state.precision
119
+
120
+ c = input[(i = state.position)]
121
+
122
+ while (c === ' ') c = input[++i]
123
+
124
+ // A hyphen range, e.g. '1.2.3 - 2.3.4', is only valid as a bare version
125
+ // pair without an operator or shorthand prefix.
126
+ if (c === '-' && input[i + 1] === ' ' && operator === constants.EQ && !caret && !tilde) {
127
+ c = input[++i]
128
+
129
+ while (c === ' ') c = input[++i]
130
+
131
+ state.position = i
132
+
133
+ const high = Version.parse(input, state)
134
+
135
+ c = input[(i = state.position)]
136
+
137
+ set.push(new Comparator(constants.GTE, lower))
138
+
139
+ if (state.precision === 3) {
140
+ set.push(new Comparator(constants.LTE, high))
141
+ } else if (state.precision === 2) {
142
+ set.push(upper(high.major, high.minor + 1, 0))
143
+ } else if (state.precision === 1) {
144
+ set.push(upper(high.major + 1, 0, 0))
145
+ }
146
+
147
+ while (c === ' ') c = input[++i]
148
+ } else {
149
+ if (caret) {
150
+ for (const comparator of expandCaret(lower, precision)) set.push(comparator)
151
+ } else if (tilde) {
152
+ for (const comparator of expandTilde(lower, precision)) set.push(comparator)
153
+ } else if (operator === constants.EQ) {
154
+ for (const comparator of expandPartial(lower, precision)) set.push(comparator)
155
+ } else {
156
+ set.push(new Comparator(operator, lower))
157
+ }
158
+ }
159
+
160
+ if (c === '|' && input[i + 1] === '|') {
161
+ c = input[(i += 2)]
162
+
163
+ while (c === ' ') c = input[++i]
164
+
165
+ break
166
+ }
167
+
168
+ if (c && c !== '<' && c !== '>' && c !== '^' && c !== '~' && c !== '=') {
169
+ unexpected("expected '||', '<', '>', '^', '~', or '='")
170
+ }
171
+ }
172
+
173
+ if (set.length) comparators.push(set)
174
+ }
175
+
176
+ if (i < input.length && state.partial === false) {
177
+ unexpected('expected end of input')
178
+ }
179
+
180
+ state.position = i
181
+
182
+ return new Range(comparators)
183
+ }
184
+
185
+ // Determines whether a comparator set opts into prerelease versions for the
186
+ // given version's [major, minor, patch] tuple, i.e. whether any comparator
187
+ // targets that exact tuple with prerelease tags of its own.
188
+ function allows(set, version) {
189
+ for (const comparator of set) {
190
+ const target = comparator.version
191
+
192
+ if (
193
+ target.prerelease.length &&
194
+ target.major === version.major &&
195
+ target.minor === version.minor &&
196
+ target.patch === version.patch
197
+ ) {
198
+ return true
199
+ }
200
+ }
201
+
202
+ return false
203
+ }
204
+
205
+ // Constructs a `< major.minor.patch-0` comparator. The `-0` prerelease sentinel
206
+ // is the lowest possible prerelease, so it excludes every prerelease of the
207
+ // upper bound, matching the desugaring used by node-semver.
208
+ function upper(major, minor, patch) {
209
+ return new Comparator(constants.LT, new Version(major, minor, patch, { prerelease: ['0'] }))
210
+ }
211
+
212
+ // Expands a partial version or X-range into a set of comparators, e.g. '1.2'
213
+ // and '1.2.x' both become '>=1.2.0 <1.3.0-0'.
214
+ function expandPartial(version, precision) {
215
+ if (precision === 0) return [new Comparator(constants.GTE, new Version(0, 0, 0))]
216
+ if (precision === 3) return [new Comparator(constants.EQ, version)]
217
+
218
+ const set = [new Comparator(constants.GTE, version)]
219
+
220
+ if (precision === 1) set.push(upper(version.major + 1, 0, 0))
221
+ else set.push(upper(version.major, version.minor + 1, 0))
222
+
223
+ return set
224
+ }
225
+
226
+ // Expands a caret range, allowing changes that do not modify the left-most
227
+ // non-zero component, e.g. '^1.2.3' becomes '>=1.2.3 <2.0.0-0'.
228
+ function expandCaret(version, precision) {
229
+ if (precision === 0) return [new Comparator(constants.GTE, new Version(0, 0, 0))]
230
+
231
+ const { major, minor, patch } = version
232
+ const set = [new Comparator(constants.GTE, version)]
233
+
234
+ if (major !== 0) set.push(upper(major + 1, 0, 0))
235
+ else if (precision === 1) set.push(upper(1, 0, 0))
236
+ else if (minor !== 0) set.push(upper(0, minor + 1, 0))
237
+ else if (precision === 2) set.push(upper(0, 1, 0))
238
+ else set.push(upper(0, 0, patch + 1))
239
+
240
+ return set
241
+ }
242
+
243
+ // Expands a tilde range, allowing patch-level changes if a minor version is
244
+ // specified and minor-level changes if not, e.g. '~1.2.3' becomes
245
+ // '>=1.2.3 <1.3.0-0' and '~1' becomes '>=1.0.0 <2.0.0-0'.
246
+ function expandTilde(version, precision) {
247
+ if (precision === 0) return [new Comparator(constants.GTE, new Version(0, 0, 0))]
248
+
249
+ const { major, minor } = version
250
+ const set = [new Comparator(constants.GTE, version)]
251
+
252
+ if (precision === 1) set.push(upper(major + 1, 0, 0))
253
+ else set.push(upper(major, minor + 1, 0))
254
+
255
+ return set
256
+ }
@@ -0,0 +1,240 @@
1
+ const errors = require('./errors')
2
+
3
+ class Version {
4
+ constructor(major, minor, patch, opts = {}) {
5
+ const { prerelease = [], build = [] } = opts
6
+
7
+ this.major = major
8
+ this.minor = minor
9
+ this.patch = patch
10
+ this.prerelease = prerelease
11
+ this.build = build
12
+ }
13
+
14
+ compare(version) {
15
+ return exports.compare(this, version)
16
+ }
17
+
18
+ toString() {
19
+ let result = `${this.major}.${this.minor}.${this.patch}`
20
+
21
+ if (this.prerelease.length) {
22
+ result += '-' + this.prerelease.join('.')
23
+ }
24
+
25
+ if (this.build.length) {
26
+ result += '+' + this.build.join('.')
27
+ }
28
+
29
+ return result
30
+ }
31
+ }
32
+
33
+ module.exports = exports = Version
34
+
35
+ exports.parse = function parse(
36
+ input,
37
+ state = { position: 0, partial: false, range: false, precision: 0 }
38
+ ) {
39
+ let i = state.position
40
+ let c
41
+
42
+ const unexpected = (expected) => {
43
+ let msg
44
+
45
+ if (i >= input.length) {
46
+ msg = `Unexpected end of input in '${input}'`
47
+ } else {
48
+ msg = `Unexpected token '${input[i]}' in '${input}' at position ${i}`
49
+ }
50
+
51
+ if (expected) msg += `, ${expected}`
52
+
53
+ throw errors.INVALID_VERSION(msg, unexpected)
54
+ }
55
+
56
+ const components = [0, 0, 0]
57
+
58
+ let k = 0
59
+
60
+ while (k < 3) {
61
+ c = input[i]
62
+
63
+ if (k > 0) {
64
+ if (c === '.') c = input[++i]
65
+ else if (state.range) break
66
+ else unexpected("expected '.'")
67
+ }
68
+
69
+ if (state.range && (c === 'x' || c === 'X' || c === '*')) {
70
+ i++
71
+
72
+ // This component is a wildcard, so every component that follows is also
73
+ // treated as a wildcard regardless of its value.
74
+ while (input[i] === '.') {
75
+ let j = i + 1
76
+
77
+ while (
78
+ (input[j] >= '0' && input[j] <= '9') ||
79
+ input[j] === 'x' ||
80
+ input[j] === 'X' ||
81
+ input[j] === '*'
82
+ ) {
83
+ j++
84
+ }
85
+
86
+ if (j === i + 1) break
87
+
88
+ i = j
89
+ }
90
+
91
+ break
92
+ }
93
+
94
+ if (c === '0') {
95
+ i++
96
+ k++
97
+ } else if (c >= '1' && c <= '9') {
98
+ let j = 0
99
+ do c = input[i + ++j]
100
+ while (c >= '0' && c <= '9')
101
+
102
+ components[k++] = parseInt(input.substring(i, i + j))
103
+
104
+ i += j
105
+ } else unexpected('expected /[0-9]/')
106
+ }
107
+
108
+ // The number of explicitly specified components, where a wildcard or a
109
+ // truncated version counts as unspecified. This lets the range parser tell
110
+ // '1.2.3', '1.2', and '1.x' apart when expanding shorthand syntax.
111
+ state.precision = k
112
+
113
+ const prerelease = []
114
+
115
+ if (k === 3 && input[i] === '-') {
116
+ i++
117
+
118
+ while (true) {
119
+ c = input[i]
120
+
121
+ let tag = ''
122
+ let j = 0
123
+
124
+ while (c >= '0' && c <= '9') c = input[i + ++j]
125
+
126
+ let isNumeric = false
127
+
128
+ if (j) {
129
+ tag += input.substring(i, i + j)
130
+
131
+ c = input[(i += j)]
132
+
133
+ isNumeric = tag[0] !== '0' || tag.length === 1
134
+ }
135
+
136
+ j = 0
137
+
138
+ while (
139
+ (c >= '0' && c <= '9') ||
140
+ (c >= 'a' && c <= 'z') ||
141
+ (c >= 'A' && c <= 'Z') ||
142
+ c === '-'
143
+ ) {
144
+ c = input[i + ++j]
145
+ }
146
+
147
+ if (j) {
148
+ tag += input.substring(i, i + j)
149
+
150
+ c = input[(i += j)]
151
+ } else if (!isNumeric) unexpected('expected /[a-zA-Z-]/')
152
+
153
+ prerelease.push(tag)
154
+
155
+ if (c === '.') c = input[++i]
156
+ else break
157
+ }
158
+ }
159
+
160
+ const build = []
161
+
162
+ if (k === 3 && input[i] === '+') {
163
+ i++
164
+
165
+ while (true) {
166
+ c = input[i]
167
+
168
+ let tag = ''
169
+ let j = 0
170
+
171
+ while (
172
+ (c >= '0' && c <= '9') ||
173
+ (c >= 'a' && c <= 'z') ||
174
+ (c >= 'A' && c <= 'Z') ||
175
+ c === '-'
176
+ ) {
177
+ c = input[i + ++j]
178
+ }
179
+
180
+ if (j) {
181
+ tag += input.substring(i, i + j)
182
+
183
+ c = input[(i += j)]
184
+ } else unexpected('expected /[0-9a-zA-Z-]/')
185
+
186
+ build.push(tag)
187
+
188
+ if (c === '.') c = input[++i]
189
+ else break
190
+ }
191
+ }
192
+
193
+ if (i < input.length && state.partial === false) {
194
+ unexpected('expected end of input')
195
+ }
196
+
197
+ state.position = i
198
+
199
+ return new Version(...components, { prerelease, build })
200
+ }
201
+
202
+ const integer = /^[0-9]+$/
203
+
204
+ exports.compare = function compare(a, b) {
205
+ if (a.major > b.major) return 1
206
+ if (a.major < b.major) return -1
207
+
208
+ if (a.minor > b.minor) return 1
209
+ if (a.minor < b.minor) return -1
210
+
211
+ if (a.patch > b.patch) return 1
212
+ if (a.patch < b.patch) return -1
213
+
214
+ if (a.prerelease.length === 0) return b.prerelease.length === 0 ? 0 : 1
215
+ if (b.prerelease.length === 0) return -1
216
+
217
+ let i = 0
218
+ do {
219
+ let x = a.prerelease[i]
220
+ let y = b.prerelease[i]
221
+
222
+ if (x === undefined) return y === undefined ? 0 : -1
223
+ if (y === undefined) return 1
224
+
225
+ if (x === y) continue
226
+
227
+ const xInt = integer.test(x)
228
+ const yInt = integer.test(y)
229
+
230
+ if (xInt && yInt) {
231
+ x = +x
232
+ y = +y
233
+ } else {
234
+ if (xInt) return -1
235
+ if (yInt) return 1
236
+ }
237
+
238
+ return x > y ? 1 : -1
239
+ } while (++i)
240
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "bare-semver",
3
+ "version": "1.1.0",
4
+ "description": "Minimal semantic versioning library for Bare",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./index.d.ts",
8
+ "default": "./index.js"
9
+ },
10
+ "./package": "./package.json",
11
+ "./constants": "./lib/constants.js",
12
+ "./errors": "./lib/errors.js",
13
+ "./version": "./lib/version.js",
14
+ "./range": "./lib/range.js",
15
+ "./comparator": "./lib/comparator.js"
16
+ },
17
+ "files": [
18
+ "index.js",
19
+ "index.d.ts",
20
+ "lib"
21
+ ],
22
+ "scripts": {
23
+ "format": "prettier --write . && lunte --fix",
24
+ "lint": "prettier --check . && lunte",
25
+ "test": "brittle-bare --coverage test.js"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/holepunchto/bare-semver.git"
30
+ },
31
+ "author": "Holepunch",
32
+ "license": "Apache-2.0",
33
+ "bugs": {
34
+ "url": "https://github.com/holepunchto/bare-semver/issues"
35
+ },
36
+ "homepage": "https://github.com/holepunchto/bare-semver#readme",
37
+ "devDependencies": {
38
+ "brittle": "^3.2.1",
39
+ "lunte": "^1.6.0",
40
+ "prettier": "^3.4.2",
41
+ "prettier-config-holepunch": "^2.0.0"
42
+ }
43
+ }
@@ -0,0 +1,118 @@
1
+ cmake_minimum_required(VERSION 3.25)
2
+
3
+ find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare)
4
+ find_package(cmake-fetch REQUIRED PATHS node_modules/cmake-fetch)
5
+ find_package(cmake-napi REQUIRED PATHS node_modules/cmake-napi)
6
+ find_package(cmake-npm REQUIRED PATHS node_modules/cmake-npm)
7
+
8
+ project(fs_native_extensions C)
9
+
10
+ fetch_package("github:libuv/libuv@1.51.0")
11
+
12
+ add_library(fs_native_extensions STATIC)
13
+
14
+ target_sources(
15
+ fs_native_extensions
16
+ INTERFACE
17
+ include/fs-ext.h
18
+ PRIVATE
19
+ src/platform.h
20
+ src/shared.c
21
+ )
22
+
23
+ target_include_directories(
24
+ fs_native_extensions
25
+ INTERFACE
26
+ include
27
+ PRIVATE
28
+ $<TARGET_PROPERTY:uv,INTERFACE_INCLUDE_DIRECTORIES>
29
+ )
30
+
31
+ if(APPLE)
32
+ target_sources(
33
+ fs_native_extensions
34
+ PRIVATE
35
+ src/apple.c
36
+ )
37
+ endif()
38
+
39
+ if(LINUX OR ANDROID)
40
+ target_sources(
41
+ fs_native_extensions
42
+ PRIVATE
43
+ src/linux.c
44
+ )
45
+ endif()
46
+
47
+ if(WIN32)
48
+ target_sources(
49
+ fs_native_extensions
50
+ PRIVATE
51
+ src/win32.c
52
+ src/win32/nt.h
53
+ )
54
+ else()
55
+ target_sources(
56
+ fs_native_extensions
57
+ PRIVATE
58
+ src/posix.c
59
+ )
60
+ endif()
61
+
62
+ add_bare_module(fs_native_extensions_bare)
63
+
64
+ target_sources(
65
+ ${fs_native_extensions_bare}
66
+ PRIVATE
67
+ binding.c
68
+ )
69
+
70
+ target_link_libraries(
71
+ ${fs_native_extensions_bare}
72
+ PRIVATE
73
+ fs_native_extensions
74
+ )
75
+
76
+ if(WIN32)
77
+ target_link_libraries(
78
+ ${fs_native_extensions_bare}
79
+ PUBLIC
80
+ ntdll
81
+ )
82
+ endif()
83
+
84
+ add_napi_module(fs_native_extensions_napi)
85
+
86
+ target_sources(
87
+ ${fs_native_extensions_napi}
88
+ PRIVATE
89
+ binding.c
90
+ )
91
+
92
+ target_link_libraries(
93
+ ${fs_native_extensions_napi}
94
+ PRIVATE
95
+ fs_native_extensions
96
+ )
97
+
98
+ target_compile_definitions(
99
+ ${fs_native_extensions_napi}
100
+ PRIVATE
101
+ NAPI_VERSION=9
102
+ )
103
+
104
+ resolve_node_module(bare-compat-napi compat)
105
+
106
+ target_include_directories(
107
+ ${fs_native_extensions_napi}
108
+ PRIVATE
109
+ "${compat}/include"
110
+ )
111
+
112
+ if(WIN32)
113
+ target_link_libraries(
114
+ ${fs_native_extensions_napi}
115
+ PUBLIC
116
+ ntdll
117
+ )
118
+ endif()