@firestartr/cli 2.9.0-snapshot-04 → 2.10.0-snapshot-org-secrets-1

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 (22) hide show
  1. package/build/index.js +4125 -15
  2. package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +678 -0
  3. package/build/packages/cdk8s_renderer/src/charts/github/index.d.ts +2 -0
  4. package/build/packages/cdk8s_renderer/src/charts/github/orgSecretSectionChart.d.ts +8 -0
  5. package/build/packages/cdk8s_renderer/src/charts/github/orgVariableSectionChart.d.ts +8 -0
  6. package/build/packages/cdk8s_renderer/src/charts/index.d.ts +3 -1
  7. package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +123 -0
  8. package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +123 -0
  9. package/build/packages/cdk8s_renderer/src/claims/github/orgSecrets.schema.d.ts +55 -0
  10. package/build/packages/cdk8s_renderer/src/claims/github/orgSettings.d.ts +20 -0
  11. package/build/packages/cdk8s_renderer/src/claims/github/orgsettings.schema.d.ts +70 -0
  12. package/build/packages/cdk8s_renderer/src/renderer/claims-render.d.ts +1 -1
  13. package/build/packages/cdk8s_renderer/src/renderer/previous-crs-extractor.d.ts +1 -1
  14. package/build/packages/cdk8s_renderer/src/validations/githubOrgSecretSection.d.ts +4 -0
  15. package/build/packages/cdk8s_renderer/src/validations/githubOrgVariableSection.d.ts +4 -0
  16. package/build/packages/cli/src/subcommands/index.d.ts +2 -0
  17. package/build/packages/cli/src/version.d.ts +3 -0
  18. package/build/packages/gh_provisioner/src/entities/ghorgvarsection/index.d.ts +8 -0
  19. package/build/packages/github/index.d.ts +1 -0
  20. package/build/packages/github/src/organization.d.ts +2 -0
  21. package/build/packages/github/src/with_profile.d.ts +1 -0
  22. package/package.json +5 -1
package/build/index.js CHANGED
@@ -233775,6 +233775,2770 @@ if (!safer.constants) {
233775
233775
  module.exports = safer
233776
233776
 
233777
233777
 
233778
+ /***/ }),
233779
+
233780
+ /***/ 71790:
233781
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
233782
+
233783
+
233784
+
233785
+ const ANY = Symbol('SemVer ANY')
233786
+ // hoisted class for cyclic dependency
233787
+ class Comparator {
233788
+ static get ANY () {
233789
+ return ANY
233790
+ }
233791
+
233792
+ constructor (comp, options) {
233793
+ options = parseOptions(options)
233794
+
233795
+ if (comp instanceof Comparator) {
233796
+ if (comp.loose === !!options.loose) {
233797
+ return comp
233798
+ } else {
233799
+ comp = comp.value
233800
+ }
233801
+ }
233802
+
233803
+ comp = comp.trim().split(/\s+/).join(' ')
233804
+ debug('comparator', comp, options)
233805
+ this.options = options
233806
+ this.loose = !!options.loose
233807
+ this.parse(comp)
233808
+
233809
+ if (this.semver === ANY) {
233810
+ this.value = ''
233811
+ } else {
233812
+ this.value = this.operator + this.semver.version
233813
+ }
233814
+
233815
+ debug('comp', this)
233816
+ }
233817
+
233818
+ parse (comp) {
233819
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
233820
+ const m = comp.match(r)
233821
+
233822
+ if (!m) {
233823
+ throw new TypeError(`Invalid comparator: ${comp}`)
233824
+ }
233825
+
233826
+ this.operator = m[1] !== undefined ? m[1] : ''
233827
+ if (this.operator === '=') {
233828
+ this.operator = ''
233829
+ }
233830
+
233831
+ // if it literally is just '>' or '' then allow anything.
233832
+ if (!m[2]) {
233833
+ this.semver = ANY
233834
+ } else {
233835
+ this.semver = new SemVer(m[2], this.options.loose)
233836
+ }
233837
+ }
233838
+
233839
+ toString () {
233840
+ return this.value
233841
+ }
233842
+
233843
+ test (version) {
233844
+ debug('Comparator.test', version, this.options.loose)
233845
+
233846
+ if (this.semver === ANY || version === ANY) {
233847
+ return true
233848
+ }
233849
+
233850
+ if (typeof version === 'string') {
233851
+ try {
233852
+ version = new SemVer(version, this.options)
233853
+ } catch (er) {
233854
+ return false
233855
+ }
233856
+ }
233857
+
233858
+ return cmp(version, this.operator, this.semver, this.options)
233859
+ }
233860
+
233861
+ intersects (comp, options) {
233862
+ if (!(comp instanceof Comparator)) {
233863
+ throw new TypeError('a Comparator is required')
233864
+ }
233865
+
233866
+ if (this.operator === '') {
233867
+ if (this.value === '') {
233868
+ return true
233869
+ }
233870
+ return new Range(comp.value, options).test(this.value)
233871
+ } else if (comp.operator === '') {
233872
+ if (comp.value === '') {
233873
+ return true
233874
+ }
233875
+ return new Range(this.value, options).test(comp.semver)
233876
+ }
233877
+
233878
+ options = parseOptions(options)
233879
+
233880
+ // Special cases where nothing can possibly be lower
233881
+ if (options.includePrerelease &&
233882
+ (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
233883
+ return false
233884
+ }
233885
+ if (!options.includePrerelease &&
233886
+ (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
233887
+ return false
233888
+ }
233889
+
233890
+ // Same direction increasing (> or >=)
233891
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
233892
+ return true
233893
+ }
233894
+ // Same direction decreasing (< or <=)
233895
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
233896
+ return true
233897
+ }
233898
+ // same SemVer and both sides are inclusive (<= or >=)
233899
+ if (
233900
+ (this.semver.version === comp.semver.version) &&
233901
+ this.operator.includes('=') && comp.operator.includes('=')) {
233902
+ return true
233903
+ }
233904
+ // opposite directions less than
233905
+ if (cmp(this.semver, '<', comp.semver, options) &&
233906
+ this.operator.startsWith('>') && comp.operator.startsWith('<')) {
233907
+ return true
233908
+ }
233909
+ // opposite directions greater than
233910
+ if (cmp(this.semver, '>', comp.semver, options) &&
233911
+ this.operator.startsWith('<') && comp.operator.startsWith('>')) {
233912
+ return true
233913
+ }
233914
+ return false
233915
+ }
233916
+ }
233917
+
233918
+ module.exports = Comparator
233919
+
233920
+ const parseOptions = __nccwpck_require__(36772)
233921
+ const { safeRe: re, t } = __nccwpck_require__(84063)
233922
+ const cmp = __nccwpck_require__(48801)
233923
+ const debug = __nccwpck_require__(53619)
233924
+ const SemVer = __nccwpck_require__(71490)
233925
+ const Range = __nccwpck_require__(25287)
233926
+
233927
+
233928
+ /***/ }),
233929
+
233930
+ /***/ 25287:
233931
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
233932
+
233933
+
233934
+
233935
+ const SPACE_CHARACTERS = /\s+/g
233936
+
233937
+ // hoisted class for cyclic dependency
233938
+ class Range {
233939
+ constructor (range, options) {
233940
+ options = parseOptions(options)
233941
+
233942
+ if (range instanceof Range) {
233943
+ if (
233944
+ range.loose === !!options.loose &&
233945
+ range.includePrerelease === !!options.includePrerelease
233946
+ ) {
233947
+ return range
233948
+ } else {
233949
+ return new Range(range.raw, options)
233950
+ }
233951
+ }
233952
+
233953
+ if (range instanceof Comparator) {
233954
+ // just put it in the set and return
233955
+ this.raw = range.value
233956
+ this.set = [[range]]
233957
+ this.formatted = undefined
233958
+ return this
233959
+ }
233960
+
233961
+ this.options = options
233962
+ this.loose = !!options.loose
233963
+ this.includePrerelease = !!options.includePrerelease
233964
+
233965
+ // First reduce all whitespace as much as possible so we do not have to rely
233966
+ // on potentially slow regexes like \s*. This is then stored and used for
233967
+ // future error messages as well.
233968
+ this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')
233969
+
233970
+ // First, split on ||
233971
+ this.set = this.raw
233972
+ .split('||')
233973
+ // map the range to a 2d array of comparators
233974
+ .map(r => this.parseRange(r.trim()))
233975
+ // throw out any comparator lists that are empty
233976
+ // this generally means that it was not a valid range, which is allowed
233977
+ // in loose mode, but will still throw if the WHOLE range is invalid.
233978
+ .filter(c => c.length)
233979
+
233980
+ if (!this.set.length) {
233981
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
233982
+ }
233983
+
233984
+ // if we have any that are not the null set, throw out null sets.
233985
+ if (this.set.length > 1) {
233986
+ // keep the first one, in case they're all null sets
233987
+ const first = this.set[0]
233988
+ this.set = this.set.filter(c => !isNullSet(c[0]))
233989
+ if (this.set.length === 0) {
233990
+ this.set = [first]
233991
+ } else if (this.set.length > 1) {
233992
+ // if we have any that are *, then the range is just *
233993
+ for (const c of this.set) {
233994
+ if (c.length === 1 && isAny(c[0])) {
233995
+ this.set = [c]
233996
+ break
233997
+ }
233998
+ }
233999
+ }
234000
+ }
234001
+
234002
+ this.formatted = undefined
234003
+ }
234004
+
234005
+ get range () {
234006
+ if (this.formatted === undefined) {
234007
+ this.formatted = ''
234008
+ for (let i = 0; i < this.set.length; i++) {
234009
+ if (i > 0) {
234010
+ this.formatted += '||'
234011
+ }
234012
+ const comps = this.set[i]
234013
+ for (let k = 0; k < comps.length; k++) {
234014
+ if (k > 0) {
234015
+ this.formatted += ' '
234016
+ }
234017
+ this.formatted += comps[k].toString().trim()
234018
+ }
234019
+ }
234020
+ }
234021
+ return this.formatted
234022
+ }
234023
+
234024
+ format () {
234025
+ return this.range
234026
+ }
234027
+
234028
+ toString () {
234029
+ return this.range
234030
+ }
234031
+
234032
+ parseRange (range) {
234033
+ // strip build metadata so it can't bleed into the version
234034
+ range = range.replace(BUILDSTRIPRE, '')
234035
+
234036
+ // memoize range parsing for performance.
234037
+ // this is a very hot path, and fully deterministic.
234038
+ const memoOpts =
234039
+ (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
234040
+ (this.options.loose && FLAG_LOOSE)
234041
+ const memoKey = memoOpts + ':' + range
234042
+ const cached = cache.get(memoKey)
234043
+ if (cached) {
234044
+ return cached
234045
+ }
234046
+
234047
+ const loose = this.options.loose
234048
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
234049
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
234050
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
234051
+ debug('hyphen replace', range)
234052
+
234053
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
234054
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
234055
+ debug('comparator trim', range)
234056
+
234057
+ // `~ 1.2.3` => `~1.2.3`
234058
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
234059
+ debug('tilde trim', range)
234060
+
234061
+ // `^ 1.2.3` => `^1.2.3`
234062
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
234063
+ debug('caret trim', range)
234064
+
234065
+ // At this point, the range is completely trimmed and
234066
+ // ready to be split into comparators.
234067
+
234068
+ let rangeList = range
234069
+ .split(' ')
234070
+ .map(comp => parseComparator(comp, this.options))
234071
+ .join(' ')
234072
+ .split(/\s+/)
234073
+ // >=0.0.0 is equivalent to *
234074
+ .map(comp => replaceGTE0(comp, this.options))
234075
+
234076
+ if (loose) {
234077
+ // in loose mode, throw out any that are not valid comparators
234078
+ rangeList = rangeList.filter(comp => {
234079
+ debug('loose invalid filter', comp, this.options)
234080
+ return !!comp.match(re[t.COMPARATORLOOSE])
234081
+ })
234082
+ }
234083
+ debug('range list', rangeList)
234084
+
234085
+ // if any comparators are the null set, then replace with JUST null set
234086
+ // if more than one comparator, remove any * comparators
234087
+ // also, don't include the same comparator more than once
234088
+ const rangeMap = new Map()
234089
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
234090
+ for (const comp of comparators) {
234091
+ if (isNullSet(comp)) {
234092
+ return [comp]
234093
+ }
234094
+ rangeMap.set(comp.value, comp)
234095
+ }
234096
+ if (rangeMap.size > 1 && rangeMap.has('')) {
234097
+ rangeMap.delete('')
234098
+ }
234099
+
234100
+ const result = [...rangeMap.values()]
234101
+ cache.set(memoKey, result)
234102
+ return result
234103
+ }
234104
+
234105
+ intersects (range, options) {
234106
+ if (!(range instanceof Range)) {
234107
+ throw new TypeError('a Range is required')
234108
+ }
234109
+
234110
+ return this.set.some((thisComparators) => {
234111
+ return (
234112
+ isSatisfiable(thisComparators, options) &&
234113
+ range.set.some((rangeComparators) => {
234114
+ return (
234115
+ isSatisfiable(rangeComparators, options) &&
234116
+ thisComparators.every((thisComparator) => {
234117
+ return rangeComparators.every((rangeComparator) => {
234118
+ return thisComparator.intersects(rangeComparator, options)
234119
+ })
234120
+ })
234121
+ )
234122
+ })
234123
+ )
234124
+ })
234125
+ }
234126
+
234127
+ // if ANY of the sets match ALL of its comparators, then pass
234128
+ test (version) {
234129
+ if (!version) {
234130
+ return false
234131
+ }
234132
+
234133
+ if (typeof version === 'string') {
234134
+ try {
234135
+ version = new SemVer(version, this.options)
234136
+ } catch (er) {
234137
+ return false
234138
+ }
234139
+ }
234140
+
234141
+ for (let i = 0; i < this.set.length; i++) {
234142
+ if (testSet(this.set[i], version, this.options)) {
234143
+ return true
234144
+ }
234145
+ }
234146
+ return false
234147
+ }
234148
+ }
234149
+
234150
+ module.exports = Range
234151
+
234152
+ const LRU = __nccwpck_require__(91191)
234153
+ const cache = new LRU()
234154
+
234155
+ const parseOptions = __nccwpck_require__(36772)
234156
+ const Comparator = __nccwpck_require__(71790)
234157
+ const debug = __nccwpck_require__(53619)
234158
+ const SemVer = __nccwpck_require__(71490)
234159
+ const {
234160
+ safeRe: re,
234161
+ src,
234162
+ t,
234163
+ comparatorTrimReplace,
234164
+ tildeTrimReplace,
234165
+ caretTrimReplace,
234166
+ } = __nccwpck_require__(84063)
234167
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(9073)
234168
+
234169
+ // unbounded global build-metadata stripper used by parseRange
234170
+ const BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g')
234171
+
234172
+ const isNullSet = c => c.value === '<0.0.0-0'
234173
+ const isAny = c => c.value === ''
234174
+
234175
+ // take a set of comparators and determine whether there
234176
+ // exists a version which can satisfy it
234177
+ const isSatisfiable = (comparators, options) => {
234178
+ let result = true
234179
+ const remainingComparators = comparators.slice()
234180
+ let testComparator = remainingComparators.pop()
234181
+
234182
+ while (result && remainingComparators.length) {
234183
+ result = remainingComparators.every((otherComparator) => {
234184
+ return testComparator.intersects(otherComparator, options)
234185
+ })
234186
+
234187
+ testComparator = remainingComparators.pop()
234188
+ }
234189
+
234190
+ return result
234191
+ }
234192
+
234193
+ // comprised of xranges, tildes, stars, and gtlt's at this point.
234194
+ // already replaced the hyphen ranges
234195
+ // turn into a set of JUST comparators.
234196
+ const parseComparator = (comp, options) => {
234197
+ comp = comp.replace(re[t.BUILD], '')
234198
+ debug('comp', comp, options)
234199
+ comp = replaceCarets(comp, options)
234200
+ debug('caret', comp)
234201
+ comp = replaceTildes(comp, options)
234202
+ debug('tildes', comp)
234203
+ comp = replaceXRanges(comp, options)
234204
+ debug('xrange', comp)
234205
+ comp = replaceStars(comp, options)
234206
+ debug('stars', comp)
234207
+ return comp
234208
+ }
234209
+
234210
+ const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
234211
+
234212
+ const invalidXRangeOrder = (M, m, p) => (
234213
+ (isX(M) && !isX(m)) ||
234214
+ (isX(m) && p && !isX(p))
234215
+ )
234216
+
234217
+ // ~, ~> --> * (any, kinda silly)
234218
+ // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
234219
+ // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
234220
+ // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
234221
+ // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
234222
+ // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
234223
+ // ~0.0.1 --> >=0.0.1 <0.1.0-0
234224
+ const replaceTildes = (comp, options) => {
234225
+ return comp
234226
+ .trim()
234227
+ .split(/\s+/)
234228
+ .map((c) => replaceTilde(c, options))
234229
+ .join(' ')
234230
+ }
234231
+
234232
+ const replaceTilde = (comp, options) => {
234233
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
234234
+ // if we're including prereleases in the match, then the lower bound is
234235
+ // -0, the lowest possible prerelease value, just like x-ranges and carets.
234236
+ // this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.
234237
+ const z = options.includePrerelease ? '-0' : ''
234238
+ return comp.replace(r, (_, M, m, p, pr) => {
234239
+ debug('tilde', comp, _, M, m, p, pr)
234240
+ let ret
234241
+
234242
+ if (isX(M)) {
234243
+ ret = ''
234244
+ } else if (isX(m)) {
234245
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
234246
+ } else if (isX(p)) {
234247
+ // ~1.2 == >=1.2.0 <1.3.0-0
234248
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
234249
+ } else if (pr) {
234250
+ debug('replaceTilde pr', pr)
234251
+ ret = `>=${M}.${m}.${p}-${pr
234252
+ } <${M}.${+m + 1}.0-0`
234253
+ } else {
234254
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
234255
+ ret = `>=${M}.${m}.${p
234256
+ } <${M}.${+m + 1}.0-0`
234257
+ }
234258
+
234259
+ debug('tilde return', ret)
234260
+ return ret
234261
+ })
234262
+ }
234263
+
234264
+ // ^ --> * (any, kinda silly)
234265
+ // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
234266
+ // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
234267
+ // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
234268
+ // ^1.2.3 --> >=1.2.3 <2.0.0-0
234269
+ // ^1.2.0 --> >=1.2.0 <2.0.0-0
234270
+ // ^0.0.1 --> >=0.0.1 <0.0.2-0
234271
+ // ^0.1.0 --> >=0.1.0 <0.2.0-0
234272
+ const replaceCarets = (comp, options) => {
234273
+ return comp
234274
+ .trim()
234275
+ .split(/\s+/)
234276
+ .map((c) => replaceCaret(c, options))
234277
+ .join(' ')
234278
+ }
234279
+
234280
+ const replaceCaret = (comp, options) => {
234281
+ debug('caret', comp, options)
234282
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
234283
+ const z = options.includePrerelease ? '-0' : ''
234284
+ return comp.replace(r, (_, M, m, p, pr) => {
234285
+ debug('caret', comp, _, M, m, p, pr)
234286
+ let ret
234287
+
234288
+ if (isX(M)) {
234289
+ ret = ''
234290
+ } else if (isX(m)) {
234291
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
234292
+ } else if (isX(p)) {
234293
+ if (M === '0') {
234294
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
234295
+ } else {
234296
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
234297
+ }
234298
+ } else if (pr) {
234299
+ debug('replaceCaret pr', pr)
234300
+ if (M === '0') {
234301
+ if (m === '0') {
234302
+ ret = `>=${M}.${m}.${p}-${pr
234303
+ } <${M}.${m}.${+p + 1}-0`
234304
+ } else {
234305
+ ret = `>=${M}.${m}.${p}-${pr
234306
+ } <${M}.${+m + 1}.0-0`
234307
+ }
234308
+ } else {
234309
+ ret = `>=${M}.${m}.${p}-${pr
234310
+ } <${+M + 1}.0.0-0`
234311
+ }
234312
+ } else {
234313
+ debug('no pr')
234314
+ if (M === '0') {
234315
+ if (m === '0') {
234316
+ ret = `>=${M}.${m}.${p
234317
+ } <${M}.${m}.${+p + 1}-0`
234318
+ } else {
234319
+ ret = `>=${M}.${m}.${p
234320
+ } <${M}.${+m + 1}.0-0`
234321
+ }
234322
+ } else {
234323
+ ret = `>=${M}.${m}.${p
234324
+ } <${+M + 1}.0.0-0`
234325
+ }
234326
+ }
234327
+
234328
+ debug('caret return', ret)
234329
+ return ret
234330
+ })
234331
+ }
234332
+
234333
+ const replaceXRanges = (comp, options) => {
234334
+ debug('replaceXRanges', comp, options)
234335
+ return comp
234336
+ .split(/\s+/)
234337
+ .map((c) => replaceXRange(c, options))
234338
+ .join(' ')
234339
+ }
234340
+
234341
+ const replaceXRange = (comp, options) => {
234342
+ comp = comp.trim()
234343
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
234344
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
234345
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
234346
+ if (invalidXRangeOrder(M, m, p)) {
234347
+ return comp
234348
+ }
234349
+
234350
+ const xM = isX(M)
234351
+ const xm = xM || isX(m)
234352
+ const xp = xm || isX(p)
234353
+ const anyX = xp
234354
+
234355
+ if (gtlt === '=' && anyX) {
234356
+ gtlt = ''
234357
+ }
234358
+
234359
+ // if we're including prereleases in the match, then we need
234360
+ // to fix this to -0, the lowest possible prerelease value
234361
+ pr = options.includePrerelease ? '-0' : ''
234362
+
234363
+ if (xM) {
234364
+ if (gtlt === '>' || gtlt === '<') {
234365
+ // nothing is allowed
234366
+ ret = '<0.0.0-0'
234367
+ } else {
234368
+ // nothing is forbidden
234369
+ ret = '*'
234370
+ }
234371
+ } else if (gtlt && anyX) {
234372
+ // we know patch is an x, because we have any x at all.
234373
+ // replace X with 0
234374
+ if (xm) {
234375
+ m = 0
234376
+ }
234377
+ p = 0
234378
+
234379
+ if (gtlt === '>') {
234380
+ // >1 => >=2.0.0
234381
+ // >1.2 => >=1.3.0
234382
+ gtlt = '>='
234383
+ if (xm) {
234384
+ M = +M + 1
234385
+ m = 0
234386
+ p = 0
234387
+ } else {
234388
+ m = +m + 1
234389
+ p = 0
234390
+ }
234391
+ } else if (gtlt === '<=') {
234392
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
234393
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
234394
+ gtlt = '<'
234395
+ if (xm) {
234396
+ M = +M + 1
234397
+ } else {
234398
+ m = +m + 1
234399
+ }
234400
+ }
234401
+
234402
+ if (gtlt === '<') {
234403
+ pr = '-0'
234404
+ }
234405
+
234406
+ ret = `${gtlt + M}.${m}.${p}${pr}`
234407
+ } else if (xm) {
234408
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
234409
+ } else if (xp) {
234410
+ ret = `>=${M}.${m}.0${pr
234411
+ } <${M}.${+m + 1}.0-0`
234412
+ }
234413
+
234414
+ debug('xRange return', ret)
234415
+
234416
+ return ret
234417
+ })
234418
+ }
234419
+
234420
+ // Because * is AND-ed with everything else in the comparator,
234421
+ // and '' means "any version", just remove the *s entirely.
234422
+ const replaceStars = (comp, options) => {
234423
+ debug('replaceStars', comp, options)
234424
+ // Looseness is ignored here. star is always as loose as it gets!
234425
+ return comp
234426
+ .trim()
234427
+ .replace(re[t.STAR], '')
234428
+ }
234429
+
234430
+ const replaceGTE0 = (comp, options) => {
234431
+ debug('replaceGTE0', comp, options)
234432
+ return comp
234433
+ .trim()
234434
+ .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
234435
+ }
234436
+
234437
+ // This function is passed to string.replace(re[t.HYPHENRANGE])
234438
+ // M, m, patch, prerelease, build
234439
+ // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
234440
+ // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
234441
+ // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
234442
+ // TODO build?
234443
+ const hyphenReplace = incPr => ($0,
234444
+ from, fM, fm, fp, fpr, fb,
234445
+ to, tM, tm, tp, tpr) => {
234446
+ if (isX(fM)) {
234447
+ from = ''
234448
+ } else if (isX(fm)) {
234449
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`
234450
+ } else if (isX(fp)) {
234451
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
234452
+ } else if (fpr) {
234453
+ from = `>=${from}`
234454
+ } else {
234455
+ from = `>=${from}${incPr ? '-0' : ''}`
234456
+ }
234457
+
234458
+ if (isX(tM)) {
234459
+ to = ''
234460
+ } else if (isX(tm)) {
234461
+ to = `<${+tM + 1}.0.0-0`
234462
+ } else if (isX(tp)) {
234463
+ to = `<${tM}.${+tm + 1}.0-0`
234464
+ } else if (tpr) {
234465
+ to = `<=${tM}.${tm}.${tp}-${tpr}`
234466
+ } else if (incPr) {
234467
+ to = `<${tM}.${tm}.${+tp + 1}-0`
234468
+ } else {
234469
+ to = `<=${to}`
234470
+ }
234471
+
234472
+ return `${from} ${to}`.trim()
234473
+ }
234474
+
234475
+ const testSet = (set, version, options) => {
234476
+ for (let i = 0; i < set.length; i++) {
234477
+ if (!set[i].test(version)) {
234478
+ return false
234479
+ }
234480
+ }
234481
+
234482
+ if (version.prerelease.length && !options.includePrerelease) {
234483
+ // Find the set of versions that are allowed to have prereleases
234484
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
234485
+ // That should allow `1.2.3-pr.2` to pass.
234486
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
234487
+ // even though it's within the range set by the comparators.
234488
+ for (let i = 0; i < set.length; i++) {
234489
+ debug(set[i].semver)
234490
+ if (set[i].semver === Comparator.ANY) {
234491
+ continue
234492
+ }
234493
+
234494
+ if (set[i].semver.prerelease.length > 0) {
234495
+ const allowed = set[i].semver
234496
+ if (allowed.major === version.major &&
234497
+ allowed.minor === version.minor &&
234498
+ allowed.patch === version.patch) {
234499
+ return true
234500
+ }
234501
+ }
234502
+ }
234503
+
234504
+ // Version has a -pre, but it's not one of the ones we like.
234505
+ return false
234506
+ }
234507
+
234508
+ return true
234509
+ }
234510
+
234511
+
234512
+ /***/ }),
234513
+
234514
+ /***/ 71490:
234515
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
234516
+
234517
+
234518
+
234519
+ const debug = __nccwpck_require__(53619)
234520
+ const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(9073)
234521
+ const { safeRe: re, t } = __nccwpck_require__(84063)
234522
+
234523
+ const parseOptions = __nccwpck_require__(36772)
234524
+ const { compareIdentifiers } = __nccwpck_require__(48587)
234525
+
234526
+ const isPrereleaseIdentifier = (prerelease, identifier) => {
234527
+ const identifiers = identifier.split('.')
234528
+ if (identifiers.length > prerelease.length) {
234529
+ return false
234530
+ }
234531
+
234532
+ for (let i = 0; i < identifiers.length; i++) {
234533
+ if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
234534
+ return false
234535
+ }
234536
+ }
234537
+
234538
+ return true
234539
+ }
234540
+
234541
+ class SemVer {
234542
+ constructor (version, options) {
234543
+ options = parseOptions(options)
234544
+
234545
+ if (version instanceof SemVer) {
234546
+ if (version.loose === !!options.loose &&
234547
+ version.includePrerelease === !!options.includePrerelease) {
234548
+ return version
234549
+ } else {
234550
+ version = version.version
234551
+ }
234552
+ } else if (typeof version !== 'string') {
234553
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
234554
+ }
234555
+
234556
+ if (version.length > MAX_LENGTH) {
234557
+ throw new TypeError(
234558
+ `version is longer than ${MAX_LENGTH} characters`
234559
+ )
234560
+ }
234561
+
234562
+ debug('SemVer', version, options)
234563
+ this.options = options
234564
+ this.loose = !!options.loose
234565
+ // this isn't actually relevant for versions, but keep it so that we
234566
+ // don't run into trouble passing this.options around.
234567
+ this.includePrerelease = !!options.includePrerelease
234568
+
234569
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
234570
+
234571
+ if (!m) {
234572
+ throw new TypeError(`Invalid Version: ${version}`)
234573
+ }
234574
+
234575
+ this.raw = version
234576
+
234577
+ // these are actually numbers
234578
+ this.major = +m[1]
234579
+ this.minor = +m[2]
234580
+ this.patch = +m[3]
234581
+
234582
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
234583
+ throw new TypeError('Invalid major version')
234584
+ }
234585
+
234586
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
234587
+ throw new TypeError('Invalid minor version')
234588
+ }
234589
+
234590
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
234591
+ throw new TypeError('Invalid patch version')
234592
+ }
234593
+
234594
+ // numberify any prerelease numeric ids
234595
+ if (!m[4]) {
234596
+ this.prerelease = []
234597
+ } else {
234598
+ this.prerelease = m[4].split('.').map((id) => {
234599
+ if (/^[0-9]+$/.test(id)) {
234600
+ const num = +id
234601
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
234602
+ return num
234603
+ }
234604
+ }
234605
+ return id
234606
+ })
234607
+ }
234608
+
234609
+ this.build = m[5] ? m[5].split('.') : []
234610
+ this.format()
234611
+ }
234612
+
234613
+ format () {
234614
+ this.version = `${this.major}.${this.minor}.${this.patch}`
234615
+ if (this.prerelease.length) {
234616
+ this.version += `-${this.prerelease.join('.')}`
234617
+ }
234618
+ return this.version
234619
+ }
234620
+
234621
+ toString () {
234622
+ return this.version
234623
+ }
234624
+
234625
+ compare (other) {
234626
+ debug('SemVer.compare', this.version, this.options, other)
234627
+ if (!(other instanceof SemVer)) {
234628
+ if (typeof other === 'string' && other === this.version) {
234629
+ return 0
234630
+ }
234631
+ other = new SemVer(other, this.options)
234632
+ }
234633
+
234634
+ if (other.version === this.version) {
234635
+ return 0
234636
+ }
234637
+
234638
+ return this.compareMain(other) || this.comparePre(other)
234639
+ }
234640
+
234641
+ compareMain (other) {
234642
+ if (!(other instanceof SemVer)) {
234643
+ other = new SemVer(other, this.options)
234644
+ }
234645
+
234646
+ if (this.major < other.major) {
234647
+ return -1
234648
+ }
234649
+ if (this.major > other.major) {
234650
+ return 1
234651
+ }
234652
+ if (this.minor < other.minor) {
234653
+ return -1
234654
+ }
234655
+ if (this.minor > other.minor) {
234656
+ return 1
234657
+ }
234658
+ if (this.patch < other.patch) {
234659
+ return -1
234660
+ }
234661
+ if (this.patch > other.patch) {
234662
+ return 1
234663
+ }
234664
+ return 0
234665
+ }
234666
+
234667
+ comparePre (other) {
234668
+ if (!(other instanceof SemVer)) {
234669
+ other = new SemVer(other, this.options)
234670
+ }
234671
+
234672
+ // NOT having a prerelease is > having one
234673
+ if (this.prerelease.length && !other.prerelease.length) {
234674
+ return -1
234675
+ } else if (!this.prerelease.length && other.prerelease.length) {
234676
+ return 1
234677
+ } else if (!this.prerelease.length && !other.prerelease.length) {
234678
+ return 0
234679
+ }
234680
+
234681
+ let i = 0
234682
+ do {
234683
+ const a = this.prerelease[i]
234684
+ const b = other.prerelease[i]
234685
+ debug('prerelease compare', i, a, b)
234686
+ if (a === undefined && b === undefined) {
234687
+ return 0
234688
+ } else if (b === undefined) {
234689
+ return 1
234690
+ } else if (a === undefined) {
234691
+ return -1
234692
+ } else if (a === b) {
234693
+ continue
234694
+ } else {
234695
+ return compareIdentifiers(a, b)
234696
+ }
234697
+ } while (++i)
234698
+ }
234699
+
234700
+ compareBuild (other) {
234701
+ if (!(other instanceof SemVer)) {
234702
+ other = new SemVer(other, this.options)
234703
+ }
234704
+
234705
+ let i = 0
234706
+ do {
234707
+ const a = this.build[i]
234708
+ const b = other.build[i]
234709
+ debug('build compare', i, a, b)
234710
+ if (a === undefined && b === undefined) {
234711
+ return 0
234712
+ } else if (b === undefined) {
234713
+ return 1
234714
+ } else if (a === undefined) {
234715
+ return -1
234716
+ } else if (a === b) {
234717
+ continue
234718
+ } else {
234719
+ return compareIdentifiers(a, b)
234720
+ }
234721
+ } while (++i)
234722
+ }
234723
+
234724
+ // preminor will bump the version up to the next minor release, and immediately
234725
+ // down to pre-release. premajor and prepatch work the same way.
234726
+ inc (release, identifier, identifierBase) {
234727
+ if (release.startsWith('pre')) {
234728
+ if (!identifier && identifierBase === false) {
234729
+ throw new Error('invalid increment argument: identifier is empty')
234730
+ }
234731
+ // Avoid an invalid semver results
234732
+ if (identifier) {
234733
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
234734
+ if (!match || match[1] !== identifier) {
234735
+ throw new Error(`invalid identifier: ${identifier}`)
234736
+ }
234737
+ }
234738
+ }
234739
+
234740
+ switch (release) {
234741
+ case 'premajor':
234742
+ this.prerelease.length = 0
234743
+ this.patch = 0
234744
+ this.minor = 0
234745
+ this.major++
234746
+ this.inc('pre', identifier, identifierBase)
234747
+ break
234748
+ case 'preminor':
234749
+ this.prerelease.length = 0
234750
+ this.patch = 0
234751
+ this.minor++
234752
+ this.inc('pre', identifier, identifierBase)
234753
+ break
234754
+ case 'prepatch':
234755
+ // If this is already a prerelease, it will bump to the next version
234756
+ // drop any prereleases that might already exist, since they are not
234757
+ // relevant at this point.
234758
+ this.prerelease.length = 0
234759
+ this.inc('patch', identifier, identifierBase)
234760
+ this.inc('pre', identifier, identifierBase)
234761
+ break
234762
+ // If the input is a non-prerelease version, this acts the same as
234763
+ // prepatch.
234764
+ case 'prerelease':
234765
+ if (this.prerelease.length === 0) {
234766
+ this.inc('patch', identifier, identifierBase)
234767
+ }
234768
+ this.inc('pre', identifier, identifierBase)
234769
+ break
234770
+ case 'release':
234771
+ if (this.prerelease.length === 0) {
234772
+ throw new Error(`version ${this.raw} is not a prerelease`)
234773
+ }
234774
+ this.prerelease.length = 0
234775
+ break
234776
+
234777
+ case 'major':
234778
+ // If this is a pre-major version, bump up to the same major version.
234779
+ // Otherwise increment major.
234780
+ // 1.0.0-5 bumps to 1.0.0
234781
+ // 1.1.0 bumps to 2.0.0
234782
+ if (
234783
+ this.minor !== 0 ||
234784
+ this.patch !== 0 ||
234785
+ this.prerelease.length === 0
234786
+ ) {
234787
+ this.major++
234788
+ }
234789
+ this.minor = 0
234790
+ this.patch = 0
234791
+ this.prerelease = []
234792
+ break
234793
+ case 'minor':
234794
+ // If this is a pre-minor version, bump up to the same minor version.
234795
+ // Otherwise increment minor.
234796
+ // 1.2.0-5 bumps to 1.2.0
234797
+ // 1.2.1 bumps to 1.3.0
234798
+ if (this.patch !== 0 || this.prerelease.length === 0) {
234799
+ this.minor++
234800
+ }
234801
+ this.patch = 0
234802
+ this.prerelease = []
234803
+ break
234804
+ case 'patch':
234805
+ // If this is not a pre-release version, it will increment the patch.
234806
+ // If it is a pre-release it will bump up to the same patch version.
234807
+ // 1.2.0-5 patches to 1.2.0
234808
+ // 1.2.0 patches to 1.2.1
234809
+ if (this.prerelease.length === 0) {
234810
+ this.patch++
234811
+ }
234812
+ this.prerelease = []
234813
+ break
234814
+ // This probably shouldn't be used publicly.
234815
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
234816
+ case 'pre': {
234817
+ const base = Number(identifierBase) ? 1 : 0
234818
+
234819
+ if (this.prerelease.length === 0) {
234820
+ this.prerelease = [base]
234821
+ } else {
234822
+ let i = this.prerelease.length
234823
+ while (--i >= 0) {
234824
+ if (typeof this.prerelease[i] === 'number') {
234825
+ this.prerelease[i]++
234826
+ i = -2
234827
+ }
234828
+ }
234829
+ if (i === -1) {
234830
+ // didn't increment anything
234831
+ if (identifier === this.prerelease.join('.') && identifierBase === false) {
234832
+ throw new Error('invalid increment argument: identifier already exists')
234833
+ }
234834
+ this.prerelease.push(base)
234835
+ }
234836
+ }
234837
+ if (identifier) {
234838
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
234839
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
234840
+ let prerelease = [identifier, base]
234841
+ if (identifierBase === false) {
234842
+ prerelease = [identifier]
234843
+ }
234844
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
234845
+ const prereleaseBase = this.prerelease[identifier.split('.').length]
234846
+ if (isNaN(prereleaseBase)) {
234847
+ this.prerelease = prerelease
234848
+ }
234849
+ } else {
234850
+ this.prerelease = prerelease
234851
+ }
234852
+ }
234853
+ break
234854
+ }
234855
+ default:
234856
+ throw new Error(`invalid increment argument: ${release}`)
234857
+ }
234858
+ this.raw = this.format()
234859
+ if (this.build.length) {
234860
+ this.raw += `+${this.build.join('.')}`
234861
+ }
234862
+ return this
234863
+ }
234864
+ }
234865
+
234866
+ module.exports = SemVer
234867
+
234868
+
234869
+ /***/ }),
234870
+
234871
+ /***/ 57876:
234872
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
234873
+
234874
+
234875
+
234876
+ const parse = __nccwpck_require__(58257)
234877
+ const clean = (version, options) => {
234878
+ const s = parse(version.trim().replace(/^[=v]+/, ''), options)
234879
+ return s ? s.version : null
234880
+ }
234881
+ module.exports = clean
234882
+
234883
+
234884
+ /***/ }),
234885
+
234886
+ /***/ 48801:
234887
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
234888
+
234889
+
234890
+
234891
+ const eq = __nccwpck_require__(41561)
234892
+ const neq = __nccwpck_require__(18671)
234893
+ const gt = __nccwpck_require__(93473)
234894
+ const gte = __nccwpck_require__(42967)
234895
+ const lt = __nccwpck_require__(86762)
234896
+ const lte = __nccwpck_require__(80973)
234897
+
234898
+ const cmp = (a, op, b, loose) => {
234899
+ switch (op) {
234900
+ case '===':
234901
+ if (typeof a === 'object') {
234902
+ a = a.version
234903
+ }
234904
+ if (typeof b === 'object') {
234905
+ b = b.version
234906
+ }
234907
+ return a === b
234908
+
234909
+ case '!==':
234910
+ if (typeof a === 'object') {
234911
+ a = a.version
234912
+ }
234913
+ if (typeof b === 'object') {
234914
+ b = b.version
234915
+ }
234916
+ return a !== b
234917
+
234918
+ case '':
234919
+ case '=':
234920
+ case '==':
234921
+ return eq(a, b, loose)
234922
+
234923
+ case '!=':
234924
+ return neq(a, b, loose)
234925
+
234926
+ case '>':
234927
+ return gt(a, b, loose)
234928
+
234929
+ case '>=':
234930
+ return gte(a, b, loose)
234931
+
234932
+ case '<':
234933
+ return lt(a, b, loose)
234934
+
234935
+ case '<=':
234936
+ return lte(a, b, loose)
234937
+
234938
+ default:
234939
+ throw new TypeError(`Invalid operator: ${op}`)
234940
+ }
234941
+ }
234942
+ module.exports = cmp
234943
+
234944
+
234945
+ /***/ }),
234946
+
234947
+ /***/ 96899:
234948
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
234949
+
234950
+
234951
+
234952
+ const SemVer = __nccwpck_require__(71490)
234953
+ const parse = __nccwpck_require__(58257)
234954
+ const { safeRe: re, t } = __nccwpck_require__(84063)
234955
+
234956
+ const coerce = (version, options) => {
234957
+ if (version instanceof SemVer) {
234958
+ return version
234959
+ }
234960
+
234961
+ if (typeof version === 'number') {
234962
+ version = String(version)
234963
+ }
234964
+
234965
+ if (typeof version !== 'string') {
234966
+ return null
234967
+ }
234968
+
234969
+ options = options || {}
234970
+
234971
+ let match = null
234972
+ if (!options.rtl) {
234973
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
234974
+ } else {
234975
+ // Find the right-most coercible string that does not share
234976
+ // a terminus with a more left-ward coercible string.
234977
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
234978
+ // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
234979
+ //
234980
+ // Walk through the string checking with a /g regexp
234981
+ // Manually set the index so as to pick up overlapping matches.
234982
+ // Stop when we get a match that ends at the string end, since no
234983
+ // coercible string can be more right-ward without the same terminus.
234984
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
234985
+ let next
234986
+ while ((next = coerceRtlRegex.exec(version)) &&
234987
+ (!match || match.index + match[0].length !== version.length)
234988
+ ) {
234989
+ if (!match ||
234990
+ next.index + next[0].length !== match.index + match[0].length) {
234991
+ match = next
234992
+ }
234993
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
234994
+ }
234995
+ // leave it in a clean state
234996
+ coerceRtlRegex.lastIndex = -1
234997
+ }
234998
+
234999
+ if (match === null) {
235000
+ return null
235001
+ }
235002
+
235003
+ const major = match[2]
235004
+ const minor = match[3] || '0'
235005
+ const patch = match[4] || '0'
235006
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
235007
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
235008
+
235009
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
235010
+ }
235011
+ module.exports = coerce
235012
+
235013
+
235014
+ /***/ }),
235015
+
235016
+ /***/ 77375:
235017
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235018
+
235019
+
235020
+
235021
+ const SemVer = __nccwpck_require__(71490)
235022
+ const compareBuild = (a, b, loose) => {
235023
+ const versionA = new SemVer(a, loose)
235024
+ const versionB = new SemVer(b, loose)
235025
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
235026
+ }
235027
+ module.exports = compareBuild
235028
+
235029
+
235030
+ /***/ }),
235031
+
235032
+ /***/ 68186:
235033
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235034
+
235035
+
235036
+
235037
+ const compare = __nccwpck_require__(84905)
235038
+ const compareLoose = (a, b) => compare(a, b, true)
235039
+ module.exports = compareLoose
235040
+
235041
+
235042
+ /***/ }),
235043
+
235044
+ /***/ 84905:
235045
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235046
+
235047
+
235048
+
235049
+ const SemVer = __nccwpck_require__(71490)
235050
+ const compare = (a, b, loose) =>
235051
+ new SemVer(a, loose).compare(new SemVer(b, loose))
235052
+
235053
+ module.exports = compare
235054
+
235055
+
235056
+ /***/ }),
235057
+
235058
+ /***/ 83272:
235059
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235060
+
235061
+
235062
+
235063
+ const parse = __nccwpck_require__(58257)
235064
+
235065
+ const diff = (version1, version2) => {
235066
+ const v1 = parse(version1, null, true)
235067
+ const v2 = parse(version2, null, true)
235068
+ const comparison = v1.compare(v2)
235069
+
235070
+ if (comparison === 0) {
235071
+ return null
235072
+ }
235073
+
235074
+ const v1Higher = comparison > 0
235075
+ const highVersion = v1Higher ? v1 : v2
235076
+ const lowVersion = v1Higher ? v2 : v1
235077
+ const highHasPre = !!highVersion.prerelease.length
235078
+ const lowHasPre = !!lowVersion.prerelease.length
235079
+
235080
+ if (lowHasPre && !highHasPre) {
235081
+ // Going from prerelease -> no prerelease requires some special casing
235082
+
235083
+ // If the low version has only a major, then it will always be a major
235084
+ // Some examples:
235085
+ // 1.0.0-1 -> 1.0.0
235086
+ // 1.0.0-1 -> 1.1.1
235087
+ // 1.0.0-1 -> 2.0.0
235088
+ if (!lowVersion.patch && !lowVersion.minor) {
235089
+ return 'major'
235090
+ }
235091
+
235092
+ // If the main part has no difference
235093
+ if (lowVersion.compareMain(highVersion) === 0) {
235094
+ if (lowVersion.minor && !lowVersion.patch) {
235095
+ return 'minor'
235096
+ }
235097
+ return 'patch'
235098
+ }
235099
+ }
235100
+
235101
+ // add the `pre` prefix if we are going to a prerelease version
235102
+ const prefix = highHasPre ? 'pre' : ''
235103
+
235104
+ if (v1.major !== v2.major) {
235105
+ return prefix + 'major'
235106
+ }
235107
+
235108
+ if (v1.minor !== v2.minor) {
235109
+ return prefix + 'minor'
235110
+ }
235111
+
235112
+ if (v1.patch !== v2.patch) {
235113
+ return prefix + 'patch'
235114
+ }
235115
+
235116
+ // high and low are prereleases
235117
+ return 'prerelease'
235118
+ }
235119
+
235120
+ module.exports = diff
235121
+
235122
+
235123
+ /***/ }),
235124
+
235125
+ /***/ 41561:
235126
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235127
+
235128
+
235129
+
235130
+ const compare = __nccwpck_require__(84905)
235131
+ const eq = (a, b, loose) => compare(a, b, loose) === 0
235132
+ module.exports = eq
235133
+
235134
+
235135
+ /***/ }),
235136
+
235137
+ /***/ 93473:
235138
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235139
+
235140
+
235141
+
235142
+ const compare = __nccwpck_require__(84905)
235143
+ const gt = (a, b, loose) => compare(a, b, loose) > 0
235144
+ module.exports = gt
235145
+
235146
+
235147
+ /***/ }),
235148
+
235149
+ /***/ 42967:
235150
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235151
+
235152
+
235153
+
235154
+ const compare = __nccwpck_require__(84905)
235155
+ const gte = (a, b, loose) => compare(a, b, loose) >= 0
235156
+ module.exports = gte
235157
+
235158
+
235159
+ /***/ }),
235160
+
235161
+ /***/ 25009:
235162
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235163
+
235164
+
235165
+
235166
+ const SemVer = __nccwpck_require__(71490)
235167
+
235168
+ const inc = (version, release, options, identifier, identifierBase) => {
235169
+ if (typeof (options) === 'string') {
235170
+ identifierBase = identifier
235171
+ identifier = options
235172
+ options = undefined
235173
+ }
235174
+
235175
+ try {
235176
+ return new SemVer(
235177
+ version instanceof SemVer ? version.version : version,
235178
+ options
235179
+ ).inc(release, identifier, identifierBase).version
235180
+ } catch (er) {
235181
+ return null
235182
+ }
235183
+ }
235184
+ module.exports = inc
235185
+
235186
+
235187
+ /***/ }),
235188
+
235189
+ /***/ 86762:
235190
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235191
+
235192
+
235193
+
235194
+ const compare = __nccwpck_require__(84905)
235195
+ const lt = (a, b, loose) => compare(a, b, loose) < 0
235196
+ module.exports = lt
235197
+
235198
+
235199
+ /***/ }),
235200
+
235201
+ /***/ 80973:
235202
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235203
+
235204
+
235205
+
235206
+ const compare = __nccwpck_require__(84905)
235207
+ const lte = (a, b, loose) => compare(a, b, loose) <= 0
235208
+ module.exports = lte
235209
+
235210
+
235211
+ /***/ }),
235212
+
235213
+ /***/ 39799:
235214
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235215
+
235216
+
235217
+
235218
+ const SemVer = __nccwpck_require__(71490)
235219
+ const major = (a, loose) => new SemVer(a, loose).major
235220
+ module.exports = major
235221
+
235222
+
235223
+ /***/ }),
235224
+
235225
+ /***/ 27600:
235226
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235227
+
235228
+
235229
+
235230
+ const SemVer = __nccwpck_require__(71490)
235231
+ const minor = (a, loose) => new SemVer(a, loose).minor
235232
+ module.exports = minor
235233
+
235234
+
235235
+ /***/ }),
235236
+
235237
+ /***/ 18671:
235238
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235239
+
235240
+
235241
+
235242
+ const compare = __nccwpck_require__(84905)
235243
+ const neq = (a, b, loose) => compare(a, b, loose) !== 0
235244
+ module.exports = neq
235245
+
235246
+
235247
+ /***/ }),
235248
+
235249
+ /***/ 58257:
235250
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235251
+
235252
+
235253
+
235254
+ const SemVer = __nccwpck_require__(71490)
235255
+ const parse = (version, options, throwErrors = false) => {
235256
+ if (version instanceof SemVer) {
235257
+ return version
235258
+ }
235259
+ try {
235260
+ return new SemVer(version, options)
235261
+ } catch (er) {
235262
+ if (!throwErrors) {
235263
+ return null
235264
+ }
235265
+ throw er
235266
+ }
235267
+ }
235268
+
235269
+ module.exports = parse
235270
+
235271
+
235272
+ /***/ }),
235273
+
235274
+ /***/ 2112:
235275
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235276
+
235277
+
235278
+
235279
+ const SemVer = __nccwpck_require__(71490)
235280
+ const patch = (a, loose) => new SemVer(a, loose).patch
235281
+ module.exports = patch
235282
+
235283
+
235284
+ /***/ }),
235285
+
235286
+ /***/ 45094:
235287
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235288
+
235289
+
235290
+
235291
+ const parse = __nccwpck_require__(58257)
235292
+ const prerelease = (version, options) => {
235293
+ const parsed = parse(version, options)
235294
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
235295
+ }
235296
+ module.exports = prerelease
235297
+
235298
+
235299
+ /***/ }),
235300
+
235301
+ /***/ 76110:
235302
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235303
+
235304
+
235305
+
235306
+ const compare = __nccwpck_require__(84905)
235307
+ const rcompare = (a, b, loose) => compare(b, a, loose)
235308
+ module.exports = rcompare
235309
+
235310
+
235311
+ /***/ }),
235312
+
235313
+ /***/ 24550:
235314
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235315
+
235316
+
235317
+
235318
+ const compareBuild = __nccwpck_require__(77375)
235319
+ const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
235320
+ module.exports = rsort
235321
+
235322
+
235323
+ /***/ }),
235324
+
235325
+ /***/ 81495:
235326
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235327
+
235328
+
235329
+
235330
+ const Range = __nccwpck_require__(25287)
235331
+ const satisfies = (version, range, options) => {
235332
+ try {
235333
+ range = new Range(range, options)
235334
+ } catch (er) {
235335
+ return false
235336
+ }
235337
+ return range.test(version)
235338
+ }
235339
+ module.exports = satisfies
235340
+
235341
+
235342
+ /***/ }),
235343
+
235344
+ /***/ 56034:
235345
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235346
+
235347
+
235348
+
235349
+ const compareBuild = __nccwpck_require__(77375)
235350
+ const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
235351
+ module.exports = sort
235352
+
235353
+
235354
+ /***/ }),
235355
+
235356
+ /***/ 40818:
235357
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235358
+
235359
+
235360
+
235361
+ const parse = __nccwpck_require__(58257)
235362
+ const constants = __nccwpck_require__(9073)
235363
+ const SemVer = __nccwpck_require__(71490)
235364
+
235365
+ const truncate = (version, truncation, options) => {
235366
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
235367
+ return null
235368
+ }
235369
+
235370
+ const clonedVersion = cloneInputVersion(version, options)
235371
+ return clonedVersion && doTruncation(clonedVersion, truncation)
235372
+ }
235373
+
235374
+ const cloneInputVersion = (version, options) => {
235375
+ const versionStringToParse = (
235376
+ version instanceof SemVer ? version.version : version
235377
+ )
235378
+
235379
+ return parse(versionStringToParse, options)
235380
+ }
235381
+
235382
+ const doTruncation = (version, truncation) => {
235383
+ if (isPrerelease(truncation)) {
235384
+ return version.version
235385
+ }
235386
+
235387
+ version.prerelease = []
235388
+
235389
+ switch (truncation) {
235390
+ case 'major':
235391
+ version.minor = 0
235392
+ version.patch = 0
235393
+ break
235394
+ case 'minor':
235395
+ version.patch = 0
235396
+ break
235397
+ }
235398
+
235399
+ return version.format()
235400
+ }
235401
+
235402
+ const isPrerelease = (type) => {
235403
+ return type.startsWith('pre')
235404
+ }
235405
+
235406
+ module.exports = truncate
235407
+
235408
+
235409
+ /***/ }),
235410
+
235411
+ /***/ 3863:
235412
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235413
+
235414
+
235415
+
235416
+ const parse = __nccwpck_require__(58257)
235417
+ const valid = (version, options) => {
235418
+ const v = parse(version, options)
235419
+ return v ? v.version : null
235420
+ }
235421
+ module.exports = valid
235422
+
235423
+
235424
+ /***/ }),
235425
+
235426
+ /***/ 77546:
235427
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235428
+
235429
+
235430
+
235431
+ // just pre-load all the stuff that index.js lazily exports
235432
+ const internalRe = __nccwpck_require__(84063)
235433
+ const constants = __nccwpck_require__(9073)
235434
+ const SemVer = __nccwpck_require__(71490)
235435
+ const identifiers = __nccwpck_require__(48587)
235436
+ const parse = __nccwpck_require__(58257)
235437
+ const valid = __nccwpck_require__(3863)
235438
+ const clean = __nccwpck_require__(57876)
235439
+ const inc = __nccwpck_require__(25009)
235440
+ const diff = __nccwpck_require__(83272)
235441
+ const major = __nccwpck_require__(39799)
235442
+ const minor = __nccwpck_require__(27600)
235443
+ const patch = __nccwpck_require__(2112)
235444
+ const prerelease = __nccwpck_require__(45094)
235445
+ const compare = __nccwpck_require__(84905)
235446
+ const rcompare = __nccwpck_require__(76110)
235447
+ const compareLoose = __nccwpck_require__(68186)
235448
+ const compareBuild = __nccwpck_require__(77375)
235449
+ const sort = __nccwpck_require__(56034)
235450
+ const rsort = __nccwpck_require__(24550)
235451
+ const gt = __nccwpck_require__(93473)
235452
+ const lt = __nccwpck_require__(86762)
235453
+ const eq = __nccwpck_require__(41561)
235454
+ const neq = __nccwpck_require__(18671)
235455
+ const gte = __nccwpck_require__(42967)
235456
+ const lte = __nccwpck_require__(80973)
235457
+ const cmp = __nccwpck_require__(48801)
235458
+ const coerce = __nccwpck_require__(96899)
235459
+ const truncate = __nccwpck_require__(40818)
235460
+ const Comparator = __nccwpck_require__(71790)
235461
+ const Range = __nccwpck_require__(25287)
235462
+ const satisfies = __nccwpck_require__(81495)
235463
+ const toComparators = __nccwpck_require__(382)
235464
+ const maxSatisfying = __nccwpck_require__(81706)
235465
+ const minSatisfying = __nccwpck_require__(97095)
235466
+ const minVersion = __nccwpck_require__(80507)
235467
+ const validRange = __nccwpck_require__(38029)
235468
+ const outside = __nccwpck_require__(47714)
235469
+ const gtr = __nccwpck_require__(9104)
235470
+ const ltr = __nccwpck_require__(15072)
235471
+ const intersects = __nccwpck_require__(79057)
235472
+ const simplifyRange = __nccwpck_require__(69550)
235473
+ const subset = __nccwpck_require__(48693)
235474
+ module.exports = {
235475
+ parse,
235476
+ valid,
235477
+ clean,
235478
+ inc,
235479
+ diff,
235480
+ major,
235481
+ minor,
235482
+ patch,
235483
+ prerelease,
235484
+ compare,
235485
+ rcompare,
235486
+ compareLoose,
235487
+ compareBuild,
235488
+ sort,
235489
+ rsort,
235490
+ gt,
235491
+ lt,
235492
+ eq,
235493
+ neq,
235494
+ gte,
235495
+ lte,
235496
+ cmp,
235497
+ coerce,
235498
+ truncate,
235499
+ Comparator,
235500
+ Range,
235501
+ satisfies,
235502
+ toComparators,
235503
+ maxSatisfying,
235504
+ minSatisfying,
235505
+ minVersion,
235506
+ validRange,
235507
+ outside,
235508
+ gtr,
235509
+ ltr,
235510
+ intersects,
235511
+ simplifyRange,
235512
+ subset,
235513
+ SemVer,
235514
+ re: internalRe.re,
235515
+ src: internalRe.src,
235516
+ tokens: internalRe.t,
235517
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
235518
+ RELEASE_TYPES: constants.RELEASE_TYPES,
235519
+ compareIdentifiers: identifiers.compareIdentifiers,
235520
+ rcompareIdentifiers: identifiers.rcompareIdentifiers,
235521
+ }
235522
+
235523
+
235524
+ /***/ }),
235525
+
235526
+ /***/ 9073:
235527
+ /***/ ((module) => {
235528
+
235529
+
235530
+
235531
+ // Note: this is the semver.org version of the spec that it implements
235532
+ // Not necessarily the package version of this code.
235533
+ const SEMVER_SPEC_VERSION = '2.0.0'
235534
+
235535
+ const MAX_LENGTH = 256
235536
+ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
235537
+ /* istanbul ignore next */ 9007199254740991
235538
+
235539
+ // Max safe segment length for coercion.
235540
+ const MAX_SAFE_COMPONENT_LENGTH = 16
235541
+
235542
+ // Max safe length for a build identifier. The max length minus 6 characters for
235543
+ // the shortest version with a build 0.0.0+BUILD.
235544
+ const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
235545
+
235546
+ const RELEASE_TYPES = [
235547
+ 'major',
235548
+ 'premajor',
235549
+ 'minor',
235550
+ 'preminor',
235551
+ 'patch',
235552
+ 'prepatch',
235553
+ 'prerelease',
235554
+ ]
235555
+
235556
+ module.exports = {
235557
+ MAX_LENGTH,
235558
+ MAX_SAFE_COMPONENT_LENGTH,
235559
+ MAX_SAFE_BUILD_LENGTH,
235560
+ MAX_SAFE_INTEGER,
235561
+ RELEASE_TYPES,
235562
+ SEMVER_SPEC_VERSION,
235563
+ FLAG_INCLUDE_PRERELEASE: 0b001,
235564
+ FLAG_LOOSE: 0b010,
235565
+ }
235566
+
235567
+
235568
+ /***/ }),
235569
+
235570
+ /***/ 53619:
235571
+ /***/ ((module) => {
235572
+
235573
+
235574
+
235575
+ const debug = (
235576
+ typeof process === 'object' &&
235577
+ process.env &&
235578
+ process.env.NODE_DEBUG &&
235579
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)
235580
+ ) ? (...args) => console.error('SEMVER', ...args)
235581
+ : () => {}
235582
+
235583
+ module.exports = debug
235584
+
235585
+
235586
+ /***/ }),
235587
+
235588
+ /***/ 48587:
235589
+ /***/ ((module) => {
235590
+
235591
+
235592
+
235593
+ const numeric = /^[0-9]+$/
235594
+ const compareIdentifiers = (a, b) => {
235595
+ if (typeof a === 'number' && typeof b === 'number') {
235596
+ return a === b ? 0 : a < b ? -1 : 1
235597
+ }
235598
+
235599
+ const anum = numeric.test(a)
235600
+ const bnum = numeric.test(b)
235601
+
235602
+ if (anum && bnum) {
235603
+ a = +a
235604
+ b = +b
235605
+ }
235606
+
235607
+ return a === b ? 0
235608
+ : (anum && !bnum) ? -1
235609
+ : (bnum && !anum) ? 1
235610
+ : a < b ? -1
235611
+ : 1
235612
+ }
235613
+
235614
+ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
235615
+
235616
+ module.exports = {
235617
+ compareIdentifiers,
235618
+ rcompareIdentifiers,
235619
+ }
235620
+
235621
+
235622
+ /***/ }),
235623
+
235624
+ /***/ 91191:
235625
+ /***/ ((module) => {
235626
+
235627
+
235628
+
235629
+ class LRUCache {
235630
+ constructor () {
235631
+ this.max = 1000
235632
+ this.map = new Map()
235633
+ }
235634
+
235635
+ get (key) {
235636
+ const value = this.map.get(key)
235637
+ if (value === undefined) {
235638
+ return undefined
235639
+ } else {
235640
+ // Remove the key from the map and add it to the end
235641
+ this.map.delete(key)
235642
+ this.map.set(key, value)
235643
+ return value
235644
+ }
235645
+ }
235646
+
235647
+ delete (key) {
235648
+ return this.map.delete(key)
235649
+ }
235650
+
235651
+ set (key, value) {
235652
+ const deleted = this.delete(key)
235653
+
235654
+ if (!deleted && value !== undefined) {
235655
+ // If cache is full, delete the least recently used item
235656
+ if (this.map.size >= this.max) {
235657
+ const firstKey = this.map.keys().next().value
235658
+ this.delete(firstKey)
235659
+ }
235660
+
235661
+ this.map.set(key, value)
235662
+ }
235663
+
235664
+ return this
235665
+ }
235666
+ }
235667
+
235668
+ module.exports = LRUCache
235669
+
235670
+
235671
+ /***/ }),
235672
+
235673
+ /***/ 36772:
235674
+ /***/ ((module) => {
235675
+
235676
+
235677
+
235678
+ // parse out just the options we care about
235679
+ const looseOption = Object.freeze({ loose: true })
235680
+ const emptyOpts = Object.freeze({ })
235681
+ const parseOptions = options => {
235682
+ if (!options) {
235683
+ return emptyOpts
235684
+ }
235685
+
235686
+ if (typeof options !== 'object') {
235687
+ return looseOption
235688
+ }
235689
+
235690
+ return options
235691
+ }
235692
+ module.exports = parseOptions
235693
+
235694
+
235695
+ /***/ }),
235696
+
235697
+ /***/ 84063:
235698
+ /***/ ((module, exports, __nccwpck_require__) => {
235699
+
235700
+
235701
+
235702
+ const {
235703
+ MAX_SAFE_COMPONENT_LENGTH,
235704
+ MAX_SAFE_BUILD_LENGTH,
235705
+ MAX_LENGTH,
235706
+ } = __nccwpck_require__(9073)
235707
+ const debug = __nccwpck_require__(53619)
235708
+ exports = module.exports = {}
235709
+
235710
+ // The actual regexps go on exports.re
235711
+ const re = exports.re = []
235712
+ const safeRe = exports.safeRe = []
235713
+ const src = exports.src = []
235714
+ const safeSrc = exports.safeSrc = []
235715
+ const t = exports.t = {}
235716
+ let R = 0
235717
+
235718
+ const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
235719
+
235720
+ // Replace some greedy regex tokens to prevent regex dos issues. These regex are
235721
+ // used internally via the safeRe object since all inputs in this library get
235722
+ // normalized first to trim and collapse all extra whitespace. The original
235723
+ // regexes are exported for userland consumption and lower level usage. A
235724
+ // future breaking change could export the safer regex only with a note that
235725
+ // all input should have extra whitespace removed.
235726
+ const safeRegexReplacements = [
235727
+ ['\\s', 1],
235728
+ ['\\d', MAX_LENGTH],
235729
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
235730
+ ]
235731
+
235732
+ const makeSafeRegex = (value) => {
235733
+ for (const [token, max] of safeRegexReplacements) {
235734
+ value = value
235735
+ .split(`${token}*`).join(`${token}{0,${max}}`)
235736
+ .split(`${token}+`).join(`${token}{1,${max}}`)
235737
+ }
235738
+ return value
235739
+ }
235740
+
235741
+ const createToken = (name, value, isGlobal) => {
235742
+ const safe = makeSafeRegex(value)
235743
+ const index = R++
235744
+ debug(name, index, value)
235745
+ t[name] = index
235746
+ src[index] = value
235747
+ safeSrc[index] = safe
235748
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
235749
+ safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
235750
+ }
235751
+
235752
+ // The following Regular Expressions can be used for tokenizing,
235753
+ // validating, and parsing SemVer version strings.
235754
+
235755
+ // ## Numeric Identifier
235756
+ // A single `0`, or a non-zero digit followed by zero or more digits.
235757
+
235758
+ createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
235759
+ createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
235760
+
235761
+ // ## Non-numeric Identifier
235762
+ // Zero or more digits, followed by a letter or hyphen, and then zero or
235763
+ // more letters, digits, or hyphens.
235764
+
235765
+ createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
235766
+
235767
+ // ## Main Version
235768
+ // Three dot-separated numeric identifiers.
235769
+
235770
+ createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
235771
+ `(${src[t.NUMERICIDENTIFIER]})\\.` +
235772
+ `(${src[t.NUMERICIDENTIFIER]})`)
235773
+
235774
+ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
235775
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
235776
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
235777
+
235778
+ // ## Pre-release Version Identifier
235779
+ // A numeric identifier, or a non-numeric identifier.
235780
+ // Non-numeric identifiers include numeric identifiers but can be longer.
235781
+ // Therefore non-numeric identifiers must go first.
235782
+
235783
+ createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
235784
+ }|${src[t.NUMERICIDENTIFIER]})`)
235785
+
235786
+ createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
235787
+ }|${src[t.NUMERICIDENTIFIERLOOSE]})`)
235788
+
235789
+ // ## Pre-release Version
235790
+ // Hyphen, followed by one or more dot-separated pre-release version
235791
+ // identifiers.
235792
+
235793
+ createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
235794
+ }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
235795
+
235796
+ createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
235797
+ }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
235798
+
235799
+ // ## Build Metadata Identifier
235800
+ // Any combination of digits, letters, or hyphens.
235801
+
235802
+ createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
235803
+
235804
+ // ## Build Metadata
235805
+ // Plus sign, followed by one or more period-separated build metadata
235806
+ // identifiers.
235807
+
235808
+ createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
235809
+ }(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
235810
+
235811
+ // ## Full Version String
235812
+ // A main version, followed optionally by a pre-release version and
235813
+ // build metadata.
235814
+
235815
+ // Note that the only major, minor, patch, and pre-release sections of
235816
+ // the version string are capturing groups. The build metadata is not a
235817
+ // capturing group, because it should not ever be used in version
235818
+ // comparison.
235819
+
235820
+ createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
235821
+ }${src[t.PRERELEASE]}?${
235822
+ src[t.BUILD]}?`)
235823
+
235824
+ createToken('FULL', `^${src[t.FULLPLAIN]}$`)
235825
+
235826
+ // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
235827
+ // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
235828
+ // common in the npm registry.
235829
+ createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
235830
+ }${src[t.PRERELEASELOOSE]}?${
235831
+ src[t.BUILD]}?`)
235832
+
235833
+ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
235834
+
235835
+ createToken('GTLT', '((?:<|>)?=?)')
235836
+
235837
+ // Something like "2.*" or "1.2.x".
235838
+ // Note that "x.x" is a valid xRange identifier, meaning "any version"
235839
+ // Only the first item is strictly required.
235840
+ createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
235841
+ createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
235842
+
235843
+ createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
235844
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
235845
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
235846
+ `(?:${src[t.PRERELEASE]})?${
235847
+ src[t.BUILD]}?` +
235848
+ `)?)?`)
235849
+
235850
+ createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
235851
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
235852
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
235853
+ `(?:${src[t.PRERELEASELOOSE]})?${
235854
+ src[t.BUILD]}?` +
235855
+ `)?)?`)
235856
+
235857
+ createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
235858
+ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
235859
+
235860
+ // Coercion.
235861
+ // Extract anything that could conceivably be a part of a valid semver
235862
+ createToken('COERCEPLAIN', `${'(^|[^\\d])' +
235863
+ '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
235864
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
235865
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
235866
+ createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
235867
+ createToken('COERCEFULL', src[t.COERCEPLAIN] +
235868
+ `(?:${src[t.PRERELEASE]})?` +
235869
+ `(?:${src[t.BUILD]})?` +
235870
+ `(?:$|[^\\d])`)
235871
+ createToken('COERCERTL', src[t.COERCE], true)
235872
+ createToken('COERCERTLFULL', src[t.COERCEFULL], true)
235873
+
235874
+ // Tilde ranges.
235875
+ // Meaning is "reasonably at or greater than"
235876
+ createToken('LONETILDE', '(?:~>?)')
235877
+
235878
+ createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
235879
+ exports.tildeTrimReplace = '$1~'
235880
+
235881
+ createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
235882
+ createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
235883
+
235884
+ // Caret ranges.
235885
+ // Meaning is "at least and backwards compatible with"
235886
+ createToken('LONECARET', '(?:\\^)')
235887
+
235888
+ createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
235889
+ exports.caretTrimReplace = '$1^'
235890
+
235891
+ createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
235892
+ createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
235893
+
235894
+ // A simple gt/lt/eq thing, or just "" to indicate "any version"
235895
+ createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
235896
+ createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
235897
+
235898
+ // An expression to strip any whitespace between the gtlt and the thing
235899
+ // it modifies, so that `> 1.2.3` ==> `>1.2.3`
235900
+ createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
235901
+ }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
235902
+ exports.comparatorTrimReplace = '$1$2$3'
235903
+
235904
+ // Something like `1.2.3 - 1.2.4`
235905
+ // Note that these all use the loose form, because they'll be
235906
+ // checked against either the strict or loose comparator form
235907
+ // later.
235908
+ createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
235909
+ `\\s+-\\s+` +
235910
+ `(${src[t.XRANGEPLAIN]})` +
235911
+ `\\s*$`)
235912
+
235913
+ createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
235914
+ `\\s+-\\s+` +
235915
+ `(${src[t.XRANGEPLAINLOOSE]})` +
235916
+ `\\s*$`)
235917
+
235918
+ // Star ranges basically just allow anything at all.
235919
+ createToken('STAR', '(<|>)?=?\\s*\\*')
235920
+ // >=0.0.0 is like a star
235921
+ createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
235922
+ createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
235923
+
235924
+
235925
+ /***/ }),
235926
+
235927
+ /***/ 9104:
235928
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235929
+
235930
+
235931
+
235932
+ // Determine if version is greater than all the versions possible in the range.
235933
+ const outside = __nccwpck_require__(47714)
235934
+ const gtr = (version, range, options) => outside(version, range, '>', options)
235935
+ module.exports = gtr
235936
+
235937
+
235938
+ /***/ }),
235939
+
235940
+ /***/ 79057:
235941
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235942
+
235943
+
235944
+
235945
+ const Range = __nccwpck_require__(25287)
235946
+ const intersects = (r1, r2, options) => {
235947
+ r1 = new Range(r1, options)
235948
+ r2 = new Range(r2, options)
235949
+ return r1.intersects(r2, options)
235950
+ }
235951
+ module.exports = intersects
235952
+
235953
+
235954
+ /***/ }),
235955
+
235956
+ /***/ 15072:
235957
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235958
+
235959
+
235960
+
235961
+ const outside = __nccwpck_require__(47714)
235962
+ // Determine if version is less than all the versions possible in the range
235963
+ const ltr = (version, range, options) => outside(version, range, '<', options)
235964
+ module.exports = ltr
235965
+
235966
+
235967
+ /***/ }),
235968
+
235969
+ /***/ 81706:
235970
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
235971
+
235972
+
235973
+
235974
+ const SemVer = __nccwpck_require__(71490)
235975
+ const Range = __nccwpck_require__(25287)
235976
+
235977
+ const maxSatisfying = (versions, range, options) => {
235978
+ let max = null
235979
+ let maxSV = null
235980
+ let rangeObj = null
235981
+ try {
235982
+ rangeObj = new Range(range, options)
235983
+ } catch (er) {
235984
+ return null
235985
+ }
235986
+ versions.forEach((v) => {
235987
+ if (rangeObj.test(v)) {
235988
+ // satisfies(v, range, options)
235989
+ if (!max || maxSV.compare(v) === -1) {
235990
+ // compare(max, v, true)
235991
+ max = v
235992
+ maxSV = new SemVer(max, options)
235993
+ }
235994
+ }
235995
+ })
235996
+ return max
235997
+ }
235998
+ module.exports = maxSatisfying
235999
+
236000
+
236001
+ /***/ }),
236002
+
236003
+ /***/ 97095:
236004
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
236005
+
236006
+
236007
+
236008
+ const SemVer = __nccwpck_require__(71490)
236009
+ const Range = __nccwpck_require__(25287)
236010
+ const minSatisfying = (versions, range, options) => {
236011
+ let min = null
236012
+ let minSV = null
236013
+ let rangeObj = null
236014
+ try {
236015
+ rangeObj = new Range(range, options)
236016
+ } catch (er) {
236017
+ return null
236018
+ }
236019
+ versions.forEach((v) => {
236020
+ if (rangeObj.test(v)) {
236021
+ // satisfies(v, range, options)
236022
+ if (!min || minSV.compare(v) === 1) {
236023
+ // compare(min, v, true)
236024
+ min = v
236025
+ minSV = new SemVer(min, options)
236026
+ }
236027
+ }
236028
+ })
236029
+ return min
236030
+ }
236031
+ module.exports = minSatisfying
236032
+
236033
+
236034
+ /***/ }),
236035
+
236036
+ /***/ 80507:
236037
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
236038
+
236039
+
236040
+
236041
+ const SemVer = __nccwpck_require__(71490)
236042
+ const Range = __nccwpck_require__(25287)
236043
+ const gt = __nccwpck_require__(93473)
236044
+
236045
+ const minVersion = (range, loose) => {
236046
+ range = new Range(range, loose)
236047
+
236048
+ let minver = new SemVer('0.0.0')
236049
+ if (range.test(minver)) {
236050
+ return minver
236051
+ }
236052
+
236053
+ minver = new SemVer('0.0.0-0')
236054
+ if (range.test(minver)) {
236055
+ return minver
236056
+ }
236057
+
236058
+ minver = null
236059
+ for (let i = 0; i < range.set.length; ++i) {
236060
+ const comparators = range.set[i]
236061
+
236062
+ let setMin = null
236063
+ comparators.forEach((comparator) => {
236064
+ // Clone to avoid manipulating the comparator's semver object.
236065
+ const compver = new SemVer(comparator.semver.version)
236066
+ switch (comparator.operator) {
236067
+ case '>':
236068
+ if (compver.prerelease.length === 0) {
236069
+ compver.patch++
236070
+ } else {
236071
+ compver.prerelease.push(0)
236072
+ }
236073
+ compver.raw = compver.format()
236074
+ /* fallthrough */
236075
+ case '':
236076
+ case '>=':
236077
+ if (!setMin || gt(compver, setMin)) {
236078
+ setMin = compver
236079
+ }
236080
+ break
236081
+ case '<':
236082
+ case '<=':
236083
+ /* Ignore maximum versions */
236084
+ break
236085
+ /* istanbul ignore next */
236086
+ default:
236087
+ throw new Error(`Unexpected operation: ${comparator.operator}`)
236088
+ }
236089
+ })
236090
+ if (setMin && (!minver || gt(minver, setMin))) {
236091
+ minver = setMin
236092
+ }
236093
+ }
236094
+
236095
+ if (minver && range.test(minver)) {
236096
+ return minver
236097
+ }
236098
+
236099
+ return null
236100
+ }
236101
+ module.exports = minVersion
236102
+
236103
+
236104
+ /***/ }),
236105
+
236106
+ /***/ 47714:
236107
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
236108
+
236109
+
236110
+
236111
+ const SemVer = __nccwpck_require__(71490)
236112
+ const Comparator = __nccwpck_require__(71790)
236113
+ const { ANY } = Comparator
236114
+ const Range = __nccwpck_require__(25287)
236115
+ const satisfies = __nccwpck_require__(81495)
236116
+ const gt = __nccwpck_require__(93473)
236117
+ const lt = __nccwpck_require__(86762)
236118
+ const lte = __nccwpck_require__(80973)
236119
+ const gte = __nccwpck_require__(42967)
236120
+
236121
+ const outside = (version, range, hilo, options) => {
236122
+ version = new SemVer(version, options)
236123
+ range = new Range(range, options)
236124
+
236125
+ let gtfn, ltefn, ltfn, comp, ecomp
236126
+ switch (hilo) {
236127
+ case '>':
236128
+ gtfn = gt
236129
+ ltefn = lte
236130
+ ltfn = lt
236131
+ comp = '>'
236132
+ ecomp = '>='
236133
+ break
236134
+ case '<':
236135
+ gtfn = lt
236136
+ ltefn = gte
236137
+ ltfn = gt
236138
+ comp = '<'
236139
+ ecomp = '<='
236140
+ break
236141
+ default:
236142
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
236143
+ }
236144
+
236145
+ // If it satisfies the range it is not outside
236146
+ if (satisfies(version, range, options)) {
236147
+ return false
236148
+ }
236149
+
236150
+ // From now on, variable terms are as if we're in "gtr" mode.
236151
+ // but note that everything is flipped for the "ltr" function.
236152
+
236153
+ for (let i = 0; i < range.set.length; ++i) {
236154
+ const comparators = range.set[i]
236155
+
236156
+ let high = null
236157
+ let low = null
236158
+
236159
+ comparators.forEach((comparator) => {
236160
+ if (comparator.semver === ANY) {
236161
+ comparator = new Comparator('>=0.0.0')
236162
+ }
236163
+ high = high || comparator
236164
+ low = low || comparator
236165
+ if (gtfn(comparator.semver, high.semver, options)) {
236166
+ high = comparator
236167
+ } else if (ltfn(comparator.semver, low.semver, options)) {
236168
+ low = comparator
236169
+ }
236170
+ })
236171
+
236172
+ // If the edge version comparator has a operator then our version
236173
+ // isn't outside it
236174
+ if (high.operator === comp || high.operator === ecomp) {
236175
+ return false
236176
+ }
236177
+
236178
+ // If the lowest version comparator has an operator and our version
236179
+ // is less than it then it isn't higher than the range
236180
+ if ((!low.operator || low.operator === comp) &&
236181
+ ltefn(version, low.semver)) {
236182
+ return false
236183
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
236184
+ return false
236185
+ }
236186
+ }
236187
+ return true
236188
+ }
236189
+
236190
+ module.exports = outside
236191
+
236192
+
236193
+ /***/ }),
236194
+
236195
+ /***/ 69550:
236196
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
236197
+
236198
+
236199
+
236200
+ // given a set of versions and a range, create a "simplified" range
236201
+ // that includes the same versions that the original range does
236202
+ // If the original range is shorter than the simplified one, return that.
236203
+ const satisfies = __nccwpck_require__(81495)
236204
+ const compare = __nccwpck_require__(84905)
236205
+ module.exports = (versions, range, options) => {
236206
+ const set = []
236207
+ let first = null
236208
+ let prev = null
236209
+ const v = versions.sort((a, b) => compare(a, b, options))
236210
+ for (const version of v) {
236211
+ const included = satisfies(version, range, options)
236212
+ if (included) {
236213
+ prev = version
236214
+ if (!first) {
236215
+ first = version
236216
+ }
236217
+ } else {
236218
+ if (prev) {
236219
+ set.push([first, prev])
236220
+ }
236221
+ prev = null
236222
+ first = null
236223
+ }
236224
+ }
236225
+ if (first) {
236226
+ set.push([first, null])
236227
+ }
236228
+
236229
+ const ranges = []
236230
+ for (const [min, max] of set) {
236231
+ if (min === max) {
236232
+ ranges.push(min)
236233
+ } else if (!max && min === v[0]) {
236234
+ ranges.push('*')
236235
+ } else if (!max) {
236236
+ ranges.push(`>=${min}`)
236237
+ } else if (min === v[0]) {
236238
+ ranges.push(`<=${max}`)
236239
+ } else {
236240
+ ranges.push(`${min} - ${max}`)
236241
+ }
236242
+ }
236243
+ const simplified = ranges.join(' || ')
236244
+ const original = typeof range.raw === 'string' ? range.raw : String(range)
236245
+ return simplified.length < original.length ? simplified : range
236246
+ }
236247
+
236248
+
236249
+ /***/ }),
236250
+
236251
+ /***/ 48693:
236252
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
236253
+
236254
+
236255
+
236256
+ const Range = __nccwpck_require__(25287)
236257
+ const Comparator = __nccwpck_require__(71790)
236258
+ const { ANY } = Comparator
236259
+ const satisfies = __nccwpck_require__(81495)
236260
+ const compare = __nccwpck_require__(84905)
236261
+
236262
+ // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
236263
+ // - Every simple range `r1, r2, ...` is a null set, OR
236264
+ // - Every simple range `r1, r2, ...` which is not a null set is a subset of
236265
+ // some `R1, R2, ...`
236266
+ //
236267
+ // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
236268
+ // - If c is only the ANY comparator
236269
+ // - If C is only the ANY comparator, return true
236270
+ // - Else if in prerelease mode, return false
236271
+ // - else replace c with `[>=0.0.0]`
236272
+ // - If C is only the ANY comparator
236273
+ // - if in prerelease mode, return true
236274
+ // - else replace C with `[>=0.0.0]`
236275
+ // - Let EQ be the set of = comparators in c
236276
+ // - If EQ is more than one, return true (null set)
236277
+ // - Let GT be the highest > or >= comparator in c
236278
+ // - Let LT be the lowest < or <= comparator in c
236279
+ // - If GT and LT, and GT.semver > LT.semver, return true (null set)
236280
+ // - If any C is a = range, and GT or LT are set, return false
236281
+ // - If EQ
236282
+ // - If GT, and EQ does not satisfy GT, return true (null set)
236283
+ // - If LT, and EQ does not satisfy LT, return true (null set)
236284
+ // - If EQ satisfies every C, return true
236285
+ // - Else return false
236286
+ // - If GT
236287
+ // - If GT.semver is lower than any > or >= comp in C, return false
236288
+ // - If GT is >=, and GT.semver does not satisfy every C, return false
236289
+ // - If GT.semver has a prerelease, and not in prerelease mode
236290
+ // - If no C has a prerelease and the GT.semver tuple, return false
236291
+ // - If LT
236292
+ // - If LT.semver is greater than any < or <= comp in C, return false
236293
+ // - If LT is <=, and LT.semver does not satisfy every C, return false
236294
+ // - If LT.semver has a prerelease, and not in prerelease mode
236295
+ // - If no C has a prerelease and the LT.semver tuple, return false
236296
+ // - Else return true
236297
+
236298
+ const subset = (sub, dom, options = {}) => {
236299
+ if (sub === dom) {
236300
+ return true
236301
+ }
236302
+
236303
+ sub = new Range(sub, options)
236304
+ dom = new Range(dom, options)
236305
+ let sawNonNull = false
236306
+
236307
+ OUTER: for (const simpleSub of sub.set) {
236308
+ for (const simpleDom of dom.set) {
236309
+ const isSub = simpleSubset(simpleSub, simpleDom, options)
236310
+ sawNonNull = sawNonNull || isSub !== null
236311
+ if (isSub) {
236312
+ continue OUTER
236313
+ }
236314
+ }
236315
+ // the null set is a subset of everything, but null simple ranges in
236316
+ // a complex range should be ignored. so if we saw a non-null range,
236317
+ // then we know this isn't a subset, but if EVERY simple range was null,
236318
+ // then it is a subset.
236319
+ if (sawNonNull) {
236320
+ return false
236321
+ }
236322
+ }
236323
+ return true
236324
+ }
236325
+
236326
+ const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
236327
+ const minimumVersion = [new Comparator('>=0.0.0')]
236328
+
236329
+ const simpleSubset = (sub, dom, options) => {
236330
+ if (sub === dom) {
236331
+ return true
236332
+ }
236333
+
236334
+ if (sub.length === 1 && sub[0].semver === ANY) {
236335
+ if (dom.length === 1 && dom[0].semver === ANY) {
236336
+ return true
236337
+ } else if (options.includePrerelease) {
236338
+ sub = minimumVersionWithPreRelease
236339
+ } else {
236340
+ sub = minimumVersion
236341
+ }
236342
+ }
236343
+
236344
+ if (dom.length === 1 && dom[0].semver === ANY) {
236345
+ if (options.includePrerelease) {
236346
+ return true
236347
+ } else {
236348
+ dom = minimumVersion
236349
+ }
236350
+ }
236351
+
236352
+ const eqSet = new Set()
236353
+ let gt, lt
236354
+ for (const c of sub) {
236355
+ if (c.operator === '>' || c.operator === '>=') {
236356
+ gt = higherGT(gt, c, options)
236357
+ } else if (c.operator === '<' || c.operator === '<=') {
236358
+ lt = lowerLT(lt, c, options)
236359
+ } else {
236360
+ eqSet.add(c.semver)
236361
+ }
236362
+ }
236363
+
236364
+ if (eqSet.size > 1) {
236365
+ return null
236366
+ }
236367
+
236368
+ let gtltComp
236369
+ if (gt && lt) {
236370
+ gtltComp = compare(gt.semver, lt.semver, options)
236371
+ if (gtltComp > 0) {
236372
+ return null
236373
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
236374
+ return null
236375
+ }
236376
+ }
236377
+
236378
+ // will iterate one or zero times
236379
+ for (const eq of eqSet) {
236380
+ if (gt && !satisfies(eq, String(gt), options)) {
236381
+ return null
236382
+ }
236383
+
236384
+ if (lt && !satisfies(eq, String(lt), options)) {
236385
+ return null
236386
+ }
236387
+
236388
+ for (const c of dom) {
236389
+ if (!satisfies(eq, String(c), options)) {
236390
+ return false
236391
+ }
236392
+ }
236393
+
236394
+ return true
236395
+ }
236396
+
236397
+ let higher, lower
236398
+ let hasDomLT, hasDomGT
236399
+ // if the subset has a prerelease, we need a comparator in the superset
236400
+ // with the same tuple and a prerelease, or it's not a subset
236401
+ let needDomLTPre = lt &&
236402
+ !options.includePrerelease &&
236403
+ lt.semver.prerelease.length ? lt.semver : false
236404
+ let needDomGTPre = gt &&
236405
+ !options.includePrerelease &&
236406
+ gt.semver.prerelease.length ? gt.semver : false
236407
+ // exception: <1.2.3-0 is the same as <1.2.3
236408
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
236409
+ lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
236410
+ needDomLTPre = false
236411
+ }
236412
+
236413
+ for (const c of dom) {
236414
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
236415
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
236416
+ if (gt) {
236417
+ if (needDomGTPre) {
236418
+ if (c.semver.prerelease && c.semver.prerelease.length &&
236419
+ c.semver.major === needDomGTPre.major &&
236420
+ c.semver.minor === needDomGTPre.minor &&
236421
+ c.semver.patch === needDomGTPre.patch) {
236422
+ needDomGTPre = false
236423
+ }
236424
+ }
236425
+ if (c.operator === '>' || c.operator === '>=') {
236426
+ higher = higherGT(gt, c, options)
236427
+ if (higher === c && higher !== gt) {
236428
+ return false
236429
+ }
236430
+ } else if (gt.operator === '>=' && !c.test(gt.semver)) {
236431
+ return false
236432
+ }
236433
+ }
236434
+ if (lt) {
236435
+ if (needDomLTPre) {
236436
+ if (c.semver.prerelease && c.semver.prerelease.length &&
236437
+ c.semver.major === needDomLTPre.major &&
236438
+ c.semver.minor === needDomLTPre.minor &&
236439
+ c.semver.patch === needDomLTPre.patch) {
236440
+ needDomLTPre = false
236441
+ }
236442
+ }
236443
+ if (c.operator === '<' || c.operator === '<=') {
236444
+ lower = lowerLT(lt, c, options)
236445
+ if (lower === c && lower !== lt) {
236446
+ return false
236447
+ }
236448
+ } else if (lt.operator === '<=' && !c.test(lt.semver)) {
236449
+ return false
236450
+ }
236451
+ }
236452
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
236453
+ return false
236454
+ }
236455
+ }
236456
+
236457
+ // if there was a < or >, and nothing in the dom, then must be false
236458
+ // UNLESS it was limited by another range in the other direction.
236459
+ // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
236460
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
236461
+ return false
236462
+ }
236463
+
236464
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
236465
+ return false
236466
+ }
236467
+
236468
+ // we needed a prerelease range in a specific tuple, but didn't get one
236469
+ // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
236470
+ // because it includes prereleases in the 1.2.3 tuple
236471
+ if (needDomGTPre || needDomLTPre) {
236472
+ return false
236473
+ }
236474
+
236475
+ return true
236476
+ }
236477
+
236478
+ // >=1.2.3 is lower than >1.2.3
236479
+ const higherGT = (a, b, options) => {
236480
+ if (!a) {
236481
+ return b
236482
+ }
236483
+ const comp = compare(a.semver, b.semver, options)
236484
+ return comp > 0 ? a
236485
+ : comp < 0 ? b
236486
+ : b.operator === '>' && a.operator === '>=' ? b
236487
+ : a
236488
+ }
236489
+
236490
+ // <=1.2.3 is higher than <1.2.3
236491
+ const lowerLT = (a, b, options) => {
236492
+ if (!a) {
236493
+ return b
236494
+ }
236495
+ const comp = compare(a.semver, b.semver, options)
236496
+ return comp < 0 ? a
236497
+ : comp > 0 ? b
236498
+ : b.operator === '<' && a.operator === '<=' ? b
236499
+ : a
236500
+ }
236501
+
236502
+ module.exports = subset
236503
+
236504
+
236505
+ /***/ }),
236506
+
236507
+ /***/ 382:
236508
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
236509
+
236510
+
236511
+
236512
+ const Range = __nccwpck_require__(25287)
236513
+
236514
+ // Mostly just for testing and legacy API reasons
236515
+ const toComparators = (range, options) =>
236516
+ new Range(range, options).set
236517
+ .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
236518
+
236519
+ module.exports = toComparators
236520
+
236521
+
236522
+ /***/ }),
236523
+
236524
+ /***/ 38029:
236525
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
236526
+
236527
+
236528
+
236529
+ const Range = __nccwpck_require__(25287)
236530
+ const validRange = (range, options) => {
236531
+ try {
236532
+ // Return '*' instead of '' so that truthiness works.
236533
+ // This will throw if it's invalid anyway
236534
+ return new Range(range, options).range || '*'
236535
+ } catch (er) {
236536
+ return null
236537
+ }
236538
+ }
236539
+ module.exports = validRange
236540
+
236541
+
233778
236542
  /***/ }),
233779
236543
 
233780
236544
  /***/ 27134:
@@ -281849,6 +284613,17 @@ async function doPaginatedRequest(options) {
281849
284613
  'Cache-Control': 'no-cache',
281850
284614
  });
281851
284615
  }
284616
+ async function getOrgVariable(org, variableName, octokit) {
284617
+ logger.info(`Getting org variable ${variableName} for org ${org}`);
284618
+ if (!octokit) {
284619
+ octokit = await getOctokitForOrg(org);
284620
+ }
284621
+ const response = await octokit.rest.actions.getOrgVariable({
284622
+ org,
284623
+ name: variableName,
284624
+ });
284625
+ return response.data;
284626
+ }
281852
284627
  /* harmony default export */ const organization = ({
281853
284628
  getRepositoryList,
281854
284629
  getTeamList,
@@ -281859,6 +284634,7 @@ async function doPaginatedRequest(options) {
281859
284634
  getOrgTeamsDirectAccess,
281860
284635
  getOrgPlanName,
281861
284636
  getWebhookList,
284637
+ getOrgVariable,
281862
284638
  });
281863
284639
 
281864
284640
  // EXTERNAL MODULE: external "fs"
@@ -283351,6 +286127,10 @@ function createFacade(profileName) {
283351
286127
  const octokit = await getOctokitForOrg(orgName);
283352
286128
  return getOrgPlanName(orgName, octokit);
283353
286129
  },
286130
+ getOrgVariable: async (orgName, variableName) => {
286131
+ const octokit = await getOctokitForOrg(orgName);
286132
+ return getOrgVariable(orgName, variableName, octokit);
286133
+ },
283354
286134
  },
283355
286135
  repo: {
283356
286136
  addStatusCheck: async (output, isFailure, headSha, name, status, repoName, owner) => {
@@ -316758,9 +319538,14 @@ class UUIDInitializer extends InitializerPatches {
316758
319538
  },
316759
319539
  apply(cr) {
316760
319540
  const ctx = helperCTX(this);
316761
- const uuid = previousCR?.spec?.firestartr?.tfStateKey ||
316762
- claim.providers?.[ctx.provider]?.tfStateKey ||
316763
- (0,wrapper.v4)();
319541
+ const reusePrevious = previousCR && previousCR.kind === ctx.kind;
319542
+ const uuid = reusePrevious
319543
+ ? previousCR?.spec?.firestartr?.tfStateKey ||
319544
+ claim.providers?.[ctx.provider]?.tfStateKey ||
319545
+ (0,wrapper.v4)()
319546
+ : cr.spec?.firestartr?.tfStateKey ||
319547
+ claim.providers?.[ctx.provider]?.tfStateKey ||
319548
+ (0,wrapper.v4)();
316764
319549
  if (!cr.spec)
316765
319550
  cr.spec = {};
316766
319551
  if (!cr.spec.firestartr)
@@ -317302,6 +320087,7 @@ const ONE_WAY_DEFINITIONS = [
317302
320087
  '/spec/vars',
317303
320088
  '/spec/actions/oidc',
317304
320089
  '/spec/repo/labels',
320090
+ '/spec/actionsVariables',
317305
320091
  ];
317306
320092
  function applyOneWayDefs(crSpecs) {
317307
320093
  const crSpecsClone = JSON.parse(JSON.stringify(crSpecs));
@@ -319297,6 +322083,42 @@ function extractAllRefs(claimData) {
319297
322083
  refs.push(...secretsRefs);
319298
322084
  break;
319299
322085
  }
322086
+ case 'OrgSettingsClaim': {
322087
+ const actionsVariables = parsedClaim.providers?.github?.actions_variables;
322088
+ if (Array.isArray(actionsVariables)) {
322089
+ for (const variable of actionsVariables) {
322090
+ if (variable.visibility !== 'selected')
322091
+ continue;
322092
+ const selectedRepos = variable.selected_repositories;
322093
+ if (!Array.isArray(selectedRepos))
322094
+ continue;
322095
+ for (const repoRef of selectedRepos) {
322096
+ const match = repoRef.match(/^component:(.+)$/);
322097
+ if (match) {
322098
+ refs.push(`ComponentClaim-${match[1]}`);
322099
+ }
322100
+ }
322101
+ }
322102
+ }
322103
+ const orgSecrets = parsedClaim.providers?.github?.org_secrets;
322104
+ if (orgSecrets && typeof orgSecrets === 'object') {
322105
+ const secretRefRegex = /^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$/;
322106
+ for (const section of ['actions', 'codespaces', 'dependabot']) {
322107
+ const secrets = orgSecrets[section];
322108
+ if (!Array.isArray(secrets))
322109
+ continue;
322110
+ for (const secret of secrets) {
322111
+ if (!secret.value)
322112
+ continue;
322113
+ const match = secret.value.match(secretRefRegex);
322114
+ if (match) {
322115
+ refs.push(`SecretsClaim-${match[1]}`);
322116
+ }
322117
+ }
322118
+ }
322119
+ }
322120
+ break;
322121
+ }
319300
322122
  }
319301
322123
  logger.info(`Refs for ${parsedClaim.kind}-${parsedClaim.name}: ${[...new Set(refs)].join(',')}`);
319302
322124
  return [...new Set(refs)];
@@ -320423,6 +323245,73 @@ const organizationSettingsProperties = {
320423
323245
  secret_scanning_push_protection_enabled_for_new_repositories: {
320424
323246
  type: 'boolean',
320425
323247
  },
323248
+ actions_variables: {
323249
+ type: 'array',
323250
+ items: {
323251
+ type: 'object',
323252
+ properties: {
323253
+ name: {
323254
+ type: 'string',
323255
+ pattern: '^[A-Za-z0-9_]+$',
323256
+ },
323257
+ value: {
323258
+ type: 'string',
323259
+ },
323260
+ visibility: {
323261
+ type: 'string',
323262
+ enum: ['all', 'private', 'selected'],
323263
+ },
323264
+ selected_repositories: {
323265
+ type: 'array',
323266
+ items: {
323267
+ $ref: 'firestartr.dev://common/FirestartrComponentRef',
323268
+ },
323269
+ },
323270
+ },
323271
+ required: ['name', 'value', 'visibility'],
323272
+ additionalProperties: false,
323273
+ allOf: [
323274
+ {
323275
+ if: {
323276
+ properties: {
323277
+ visibility: { const: 'selected' },
323278
+ },
323279
+ required: ['visibility'],
323280
+ },
323281
+ then: {},
323282
+ else: {
323283
+ properties: {
323284
+ selected_repositories: { type: 'array', maxItems: 0 },
323285
+ },
323286
+ },
323287
+ },
323288
+ ],
323289
+ },
323290
+ },
323291
+ org_secrets: {
323292
+ type: 'object',
323293
+ properties: {
323294
+ actions: {
323295
+ type: 'array',
323296
+ items: {
323297
+ $ref: 'firestartr.dev://github/GithubOrgClaimSecret',
323298
+ },
323299
+ },
323300
+ codespaces: {
323301
+ type: 'array',
323302
+ items: {
323303
+ $ref: 'firestartr.dev://github/GithubOrgClaimSecret',
323304
+ },
323305
+ },
323306
+ dependabot: {
323307
+ type: 'array',
323308
+ items: {
323309
+ $ref: 'firestartr.dev://github/GithubOrgClaimSecret',
323310
+ },
323311
+ },
323312
+ },
323313
+ additionalProperties: false,
323314
+ },
320426
323315
  };
320427
323316
  /* harmony default export */ const github_orgsettings_schema = ({
320428
323317
  $schema: SCHEMA,
@@ -320610,6 +323499,63 @@ const organizationSettingsProperties = {
320610
323499
  },
320611
323500
  });
320612
323501
 
323502
+ ;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/orgSecrets.schema.ts
323503
+
323504
+ /* harmony default export */ const orgSecrets_schema = ({
323505
+ $schema: SCHEMA,
323506
+ $id: 'GithubOrgClaimSecrets',
323507
+ definitions: {
323508
+ GithubOrgClaimSecrets: {
323509
+ $id: 'firestartr.dev://github/GithubOrgClaimSecrets',
323510
+ type: 'object',
323511
+ description: 'Organization-level GitHub Actions secrets',
323512
+ properties: {
323513
+ actions: {
323514
+ type: 'array',
323515
+ items: {
323516
+ $ref: 'firestartr.dev://github/GithubOrgClaimSecret',
323517
+ },
323518
+ },
323519
+ codespaces: {
323520
+ type: 'array',
323521
+ items: {
323522
+ $ref: 'firestartr.dev://github/GithubOrgClaimSecret',
323523
+ },
323524
+ },
323525
+ dependabot: {
323526
+ type: 'array',
323527
+ items: {
323528
+ $ref: 'firestartr.dev://github/GithubOrgClaimSecret',
323529
+ },
323530
+ },
323531
+ },
323532
+ additionalProperties: false,
323533
+ },
323534
+ GithubOrgClaimSecretRef: {
323535
+ $id: 'firestartr.dev://github/GithubOrgClaimSecretRef',
323536
+ type: 'string',
323537
+ description: 'the reference of the secret',
323538
+ pattern: '^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$',
323539
+ },
323540
+ GithubOrgClaimSecret: {
323541
+ $id: 'firestartr.dev://github/GithubOrgClaimSecret',
323542
+ type: 'object',
323543
+ description: 'An organization-level secret for GitHub Actions',
323544
+ properties: {
323545
+ name: {
323546
+ type: 'string',
323547
+ description: 'the name of the secret',
323548
+ },
323549
+ value: {
323550
+ $ref: 'firestartr.dev://github/GithubOrgClaimSecretRef',
323551
+ },
323552
+ },
323553
+ required: ['name', 'value'],
323554
+ additionalProperties: false,
323555
+ },
323556
+ },
323557
+ });
323558
+
320613
323559
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/index.ts
320614
323560
 
320615
323561
 
@@ -320619,6 +323565,7 @@ const organizationSettingsProperties = {
320619
323565
 
320620
323566
 
320621
323567
 
323568
+
320622
323569
  const GithubSchemas = [
320623
323570
  github_group_schema,
320624
323571
  github_user_schema,
@@ -320628,6 +323575,7 @@ const GithubSchemas = [
320628
323575
  github_orgsettings_schema,
320629
323576
  component_secrets_vars_schema,
320630
323577
  component_labels_schema,
323578
+ orgSecrets_schema,
320631
323579
  ];
320632
323580
 
320633
323581
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/tfworkspaces/terraform.schema.ts
@@ -323774,7 +326722,7 @@ const VARIANT_OF_ANNOTATION = 'firestartr.dev/variant-of';
323774
326722
  function isVariantCR(cr) {
323775
326723
  return cr.metadata?.annotations?.[VARIANT_OF_ANNOTATION] !== undefined;
323776
326724
  }
323777
- function getPreviousCRfromClaim(claim, previousCRs) {
326725
+ function getPreviousCRfromClaim(claim, previousCRs, expectedKind) {
323778
326726
  const previousCRsKeys = Object.keys(previousCRs);
323779
326727
  const isVariantClaim = !!claim._parentClaimName;
323780
326728
  for (const previousCRKey of previousCRsKeys) {
@@ -323783,6 +326731,8 @@ function getPreviousCRfromClaim(claim, previousCRs) {
323783
326731
  continue;
323784
326732
  if (isExcludedFromPreviousCR(previousCR.kind))
323785
326733
  continue;
326734
+ if (expectedKind && previousCR.kind !== expectedKind)
326735
+ continue;
323786
326736
  const crVariant = isVariantCR(previousCR);
323787
326737
  if (isVariantClaim && !crVariant)
323788
326738
  continue;
@@ -324539,6 +327489,361 @@ var FirestartrGithubMembershipSpecContextProviderRefKind;
324539
327489
  /** FirestartrProviderConfig */
324540
327490
  FirestartrGithubMembershipSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
324541
327491
  })(FirestartrGithubMembershipSpecContextProviderRefKind || (FirestartrGithubMembershipSpecContextProviderRefKind = {}));
327492
+ /**
327493
+ * A resource to handle GitHub Organization Actions Secrets.
327494
+ *
327495
+ * @schema FirestartrGithubOrganizationSecretSection
327496
+ */
327497
+ class FirestartrGithubOrganizationSecretSection extends lib.ApiObject {
327498
+ /**
327499
+ * Renders a Kubernetes manifest for "FirestartrGithubOrganizationSecretSection".
327500
+ *
327501
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
327502
+ *
327503
+ * @param props initialization props
327504
+ */
327505
+ static manifest(props) {
327506
+ return {
327507
+ ...FirestartrGithubOrganizationSecretSection.GVK,
327508
+ ...toJson_FirestartrGithubOrganizationSecretSectionProps(props),
327509
+ };
327510
+ }
327511
+ /**
327512
+ * Defines a "FirestartrGithubOrganizationSecretSection" API object
327513
+ * @param scope the scope in which to define this object
327514
+ * @param id a scope-local name for the object
327515
+ * @param props initialization props
327516
+ */
327517
+ constructor(scope, id, props) {
327518
+ super(scope, id, {
327519
+ ...FirestartrGithubOrganizationSecretSection.GVK,
327520
+ ...props,
327521
+ });
327522
+ }
327523
+ /**
327524
+ * Renders the object to Kubernetes JSON.
327525
+ */
327526
+ toJson() {
327527
+ const resolved = super.toJson();
327528
+ return {
327529
+ ...FirestartrGithubOrganizationSecretSection.GVK,
327530
+ ...toJson_FirestartrGithubOrganizationSecretSectionProps(resolved),
327531
+ };
327532
+ }
327533
+ }
327534
+ /**
327535
+ * Returns the apiVersion and kind for "FirestartrGithubOrganizationSecretSection"
327536
+ */
327537
+ FirestartrGithubOrganizationSecretSection.GVK = {
327538
+ apiVersion: 'firestartr.dev/v1',
327539
+ kind: 'FirestartrGithubOrganizationSecretSection',
327540
+ };
327541
+
327542
+ /**
327543
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionProps' to JSON representation.
327544
+ */
327545
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327546
+ function toJson_FirestartrGithubOrganizationSecretSectionProps(obj) {
327547
+ if (obj === undefined) {
327548
+ return undefined;
327549
+ }
327550
+ const result = {
327551
+ 'metadata': obj.metadata,
327552
+ 'spec': toJson_FirestartrGithubOrganizationSecretSectionSpec(obj.spec),
327553
+ };
327554
+ // filter undefined values
327555
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327556
+ }
327557
+ /**
327558
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpec' to JSON representation.
327559
+ */
327560
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327561
+ function toJson_FirestartrGithubOrganizationSecretSectionSpec(obj) {
327562
+ if (obj === undefined) {
327563
+ return undefined;
327564
+ }
327565
+ const result = {
327566
+ 'org': obj.org,
327567
+ 'secrets': toJson_FirestartrGithubOrganizationSecretSectionSpecSecrets(obj.secrets),
327568
+ 'context': toJson_FirestartrGithubOrganizationSecretSectionSpecContext(obj.context),
327569
+ 'firestartr': toJson_FirestartrGithubOrganizationSecretSectionSpecFirestartr(obj.firestartr),
327570
+ 'writeConnectionSecretToRef': toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRef(obj.writeConnectionSecretToRef),
327571
+ };
327572
+ // filter undefined values
327573
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327574
+ }
327575
+ /**
327576
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecrets' to JSON representation.
327577
+ */
327578
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327579
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecSecrets(obj) {
327580
+ if (obj === undefined) {
327581
+ return undefined;
327582
+ }
327583
+ const result = {
327584
+ 'actions': obj.actions?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActions(y)),
327585
+ 'codespaces': obj.codespaces?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespaces(y)),
327586
+ 'dependabot': obj.dependabot?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabot(y)),
327587
+ };
327588
+ // filter undefined values
327589
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327590
+ }
327591
+ /**
327592
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContext' to JSON representation.
327593
+ */
327594
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327595
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecContext(obj) {
327596
+ if (obj === undefined) {
327597
+ return undefined;
327598
+ }
327599
+ const result = {
327600
+ 'backend': toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackend(obj.backend),
327601
+ 'provider': toJson_FirestartrGithubOrganizationSecretSectionSpecContextProvider(obj.provider),
327602
+ };
327603
+ // filter undefined values
327604
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327605
+ }
327606
+ /**
327607
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecFirestartr' to JSON representation.
327608
+ */
327609
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327610
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecFirestartr(obj) {
327611
+ if (obj === undefined) {
327612
+ return undefined;
327613
+ }
327614
+ const result = {
327615
+ 'tfStateKey': obj.tfStateKey,
327616
+ };
327617
+ // filter undefined values
327618
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327619
+ }
327620
+ /**
327621
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRef' to JSON representation.
327622
+ */
327623
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327624
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRef(obj) {
327625
+ if (obj === undefined) {
327626
+ return undefined;
327627
+ }
327628
+ const result = {
327629
+ 'name': obj.name,
327630
+ 'outputs': obj.outputs?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRefOutputs(y)),
327631
+ };
327632
+ // filter undefined values
327633
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327634
+ }
327635
+ /**
327636
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsActions' to JSON representation.
327637
+ */
327638
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327639
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActions(obj) {
327640
+ if (obj === undefined) {
327641
+ return undefined;
327642
+ }
327643
+ const result = {
327644
+ 'name': obj.name,
327645
+ 'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRef(obj.ref),
327646
+ };
327647
+ // filter undefined values
327648
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327649
+ }
327650
+ /**
327651
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsCodespaces' to JSON representation.
327652
+ */
327653
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327654
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespaces(obj) {
327655
+ if (obj === undefined) {
327656
+ return undefined;
327657
+ }
327658
+ const result = {
327659
+ 'name': obj.name,
327660
+ 'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRef(obj.ref),
327661
+ };
327662
+ // filter undefined values
327663
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327664
+ }
327665
+ /**
327666
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsDependabot' to JSON representation.
327667
+ */
327668
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327669
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabot(obj) {
327670
+ if (obj === undefined) {
327671
+ return undefined;
327672
+ }
327673
+ const result = {
327674
+ 'name': obj.name,
327675
+ 'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRef(obj.ref),
327676
+ };
327677
+ // filter undefined values
327678
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327679
+ }
327680
+ /**
327681
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextBackend' to JSON representation.
327682
+ */
327683
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327684
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackend(obj) {
327685
+ if (obj === undefined) {
327686
+ return undefined;
327687
+ }
327688
+ const result = {
327689
+ 'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackendRef(obj.ref),
327690
+ };
327691
+ // filter undefined values
327692
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327693
+ }
327694
+ /**
327695
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextProvider' to JSON representation.
327696
+ */
327697
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327698
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecContextProvider(obj) {
327699
+ if (obj === undefined) {
327700
+ return undefined;
327701
+ }
327702
+ const result = {
327703
+ 'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecContextProviderRef(obj.ref),
327704
+ };
327705
+ // filter undefined values
327706
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327707
+ }
327708
+ /**
327709
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRefOutputs' to JSON representation.
327710
+ */
327711
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327712
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRefOutputs(obj) {
327713
+ if (obj === undefined) {
327714
+ return undefined;
327715
+ }
327716
+ const result = {
327717
+ 'key': obj.key,
327718
+ };
327719
+ // filter undefined values
327720
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327721
+ }
327722
+ /**
327723
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRef' to JSON representation.
327724
+ */
327725
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327726
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRef(obj) {
327727
+ if (obj === undefined) {
327728
+ return undefined;
327729
+ }
327730
+ const result = {
327731
+ 'kind': obj.kind,
327732
+ 'name': obj.name,
327733
+ 'key': obj.key,
327734
+ };
327735
+ // filter undefined values
327736
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327737
+ }
327738
+ /**
327739
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRef' to JSON representation.
327740
+ */
327741
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327742
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRef(obj) {
327743
+ if (obj === undefined) {
327744
+ return undefined;
327745
+ }
327746
+ const result = {
327747
+ 'kind': obj.kind,
327748
+ 'name': obj.name,
327749
+ 'key': obj.key,
327750
+ };
327751
+ // filter undefined values
327752
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327753
+ }
327754
+ /**
327755
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRef' to JSON representation.
327756
+ */
327757
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327758
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRef(obj) {
327759
+ if (obj === undefined) {
327760
+ return undefined;
327761
+ }
327762
+ const result = {
327763
+ 'kind': obj.kind,
327764
+ 'name': obj.name,
327765
+ 'key': obj.key,
327766
+ };
327767
+ // filter undefined values
327768
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327769
+ }
327770
+ /**
327771
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextBackendRef' to JSON representation.
327772
+ */
327773
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327774
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackendRef(obj) {
327775
+ if (obj === undefined) {
327776
+ return undefined;
327777
+ }
327778
+ const result = {
327779
+ 'kind': obj.kind,
327780
+ 'name': obj.name,
327781
+ };
327782
+ // filter undefined values
327783
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327784
+ }
327785
+ /**
327786
+ * Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextProviderRef' to JSON representation.
327787
+ */
327788
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327789
+ function toJson_FirestartrGithubOrganizationSecretSectionSpecContextProviderRef(obj) {
327790
+ if (obj === undefined) {
327791
+ return undefined;
327792
+ }
327793
+ const result = {
327794
+ 'kind': obj.kind,
327795
+ 'name': obj.name,
327796
+ };
327797
+ // filter undefined values
327798
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
327799
+ }
327800
+ /* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
327801
+ /**
327802
+ * The type of Kubernetes resource to reference.
327803
+ *
327804
+ * @schema FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind
327805
+ */
327806
+ var FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind;
327807
+ (function (FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind) {
327808
+ /** Secret */
327809
+ FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind["SECRET"] = "Secret";
327810
+ })(FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind || (FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind = {}));
327811
+ /**
327812
+ * The type of Kubernetes resource to reference.
327813
+ *
327814
+ * @schema FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind
327815
+ */
327816
+ var FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind;
327817
+ (function (FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind) {
327818
+ /** Secret */
327819
+ FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind["SECRET"] = "Secret";
327820
+ })(FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind || (FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind = {}));
327821
+ /**
327822
+ * The type of Kubernetes resource to reference.
327823
+ *
327824
+ * @schema FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind
327825
+ */
327826
+ var FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind;
327827
+ (function (FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind) {
327828
+ /** Secret */
327829
+ FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind["SECRET"] = "Secret";
327830
+ })(FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind || (FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind = {}));
327831
+ /**
327832
+ * @schema FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind
327833
+ */
327834
+ var FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind;
327835
+ (function (FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind) {
327836
+ /** FirestartrProviderConfig */
327837
+ FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
327838
+ })(FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind || (FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind = {}));
327839
+ /**
327840
+ * @schema FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind
327841
+ */
327842
+ var FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind;
327843
+ (function (FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind) {
327844
+ /** FirestartrProviderConfig */
327845
+ FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
327846
+ })(FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind || (FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind = {}));
324542
327847
  /**
324543
327848
  * A resource to handle GitHub Organization Settings.
324544
327849
  *
@@ -324797,6 +328102,254 @@ var FirestartrGithubOrganizationSettingsSpecContextProviderRefKind;
324797
328102
  /** FirestartrProviderConfig */
324798
328103
  FirestartrGithubOrganizationSettingsSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
324799
328104
  })(FirestartrGithubOrganizationSettingsSpecContextProviderRefKind || (FirestartrGithubOrganizationSettingsSpecContextProviderRefKind = {}));
328105
+ /**
328106
+ * A resource to handle GitHub Organization Actions Variables.
328107
+ *
328108
+ * @schema FirestartrGithubOrganizationVariableSection
328109
+ */
328110
+ class FirestartrGithubOrganizationVariableSection extends lib.ApiObject {
328111
+ /**
328112
+ * Renders a Kubernetes manifest for "FirestartrGithubOrganizationVariableSection".
328113
+ *
328114
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
328115
+ *
328116
+ * @param props initialization props
328117
+ */
328118
+ static manifest(props) {
328119
+ return {
328120
+ ...FirestartrGithubOrganizationVariableSection.GVK,
328121
+ ...toJson_FirestartrGithubOrganizationVariableSectionProps(props),
328122
+ };
328123
+ }
328124
+ /**
328125
+ * Defines a "FirestartrGithubOrganizationVariableSection" API object
328126
+ * @param scope the scope in which to define this object
328127
+ * @param id a scope-local name for the object
328128
+ * @param props initialization props
328129
+ */
328130
+ constructor(scope, id, props) {
328131
+ super(scope, id, {
328132
+ ...FirestartrGithubOrganizationVariableSection.GVK,
328133
+ ...props,
328134
+ });
328135
+ }
328136
+ /**
328137
+ * Renders the object to Kubernetes JSON.
328138
+ */
328139
+ toJson() {
328140
+ const resolved = super.toJson();
328141
+ return {
328142
+ ...FirestartrGithubOrganizationVariableSection.GVK,
328143
+ ...toJson_FirestartrGithubOrganizationVariableSectionProps(resolved),
328144
+ };
328145
+ }
328146
+ }
328147
+ /**
328148
+ * Returns the apiVersion and kind for "FirestartrGithubOrganizationVariableSection"
328149
+ */
328150
+ FirestartrGithubOrganizationVariableSection.GVK = {
328151
+ apiVersion: 'firestartr.dev/v1',
328152
+ kind: 'FirestartrGithubOrganizationVariableSection',
328153
+ };
328154
+
328155
+ /**
328156
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionProps' to JSON representation.
328157
+ */
328158
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328159
+ function toJson_FirestartrGithubOrganizationVariableSectionProps(obj) {
328160
+ if (obj === undefined) {
328161
+ return undefined;
328162
+ }
328163
+ const result = {
328164
+ 'metadata': obj.metadata,
328165
+ 'spec': toJson_FirestartrGithubOrganizationVariableSectionSpec(obj.spec),
328166
+ };
328167
+ // filter undefined values
328168
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328169
+ }
328170
+ /**
328171
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpec' to JSON representation.
328172
+ */
328173
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328174
+ function toJson_FirestartrGithubOrganizationVariableSectionSpec(obj) {
328175
+ if (obj === undefined) {
328176
+ return undefined;
328177
+ }
328178
+ const result = {
328179
+ 'org': obj.org,
328180
+ 'actionsVariables': obj.actionsVariables?.map(y => toJson_FirestartrGithubOrganizationVariableSectionSpecActionsVariables(y)),
328181
+ 'context': toJson_FirestartrGithubOrganizationVariableSectionSpecContext(obj.context),
328182
+ 'firestartr': toJson_FirestartrGithubOrganizationVariableSectionSpecFirestartr(obj.firestartr),
328183
+ 'writeConnectionSecretToRef': toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRef(obj.writeConnectionSecretToRef),
328184
+ };
328185
+ // filter undefined values
328186
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328187
+ }
328188
+ /**
328189
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecActionsVariables' to JSON representation.
328190
+ */
328191
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328192
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecActionsVariables(obj) {
328193
+ if (obj === undefined) {
328194
+ return undefined;
328195
+ }
328196
+ const result = {
328197
+ 'name': obj.name,
328198
+ 'value': obj.value,
328199
+ 'visibility': obj.visibility,
328200
+ 'selectedRepositories': obj.selectedRepositories?.map(y => y),
328201
+ };
328202
+ // filter undefined values
328203
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328204
+ }
328205
+ /**
328206
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContext' to JSON representation.
328207
+ */
328208
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328209
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecContext(obj) {
328210
+ if (obj === undefined) {
328211
+ return undefined;
328212
+ }
328213
+ const result = {
328214
+ 'backend': toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackend(obj.backend),
328215
+ 'provider': toJson_FirestartrGithubOrganizationVariableSectionSpecContextProvider(obj.provider),
328216
+ };
328217
+ // filter undefined values
328218
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328219
+ }
328220
+ /**
328221
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecFirestartr' to JSON representation.
328222
+ */
328223
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328224
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecFirestartr(obj) {
328225
+ if (obj === undefined) {
328226
+ return undefined;
328227
+ }
328228
+ const result = {
328229
+ 'tfStateKey': obj.tfStateKey,
328230
+ };
328231
+ // filter undefined values
328232
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328233
+ }
328234
+ /**
328235
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRef' to JSON representation.
328236
+ */
328237
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328238
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRef(obj) {
328239
+ if (obj === undefined) {
328240
+ return undefined;
328241
+ }
328242
+ const result = {
328243
+ 'name': obj.name,
328244
+ 'outputs': obj.outputs?.map(y => toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRefOutputs(y)),
328245
+ };
328246
+ // filter undefined values
328247
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328248
+ }
328249
+ /* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328250
+ /**
328251
+ * Visibility of the variable
328252
+ *
328253
+ * @schema FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility
328254
+ */
328255
+ var FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility;
328256
+ (function (FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility) {
328257
+ /** all */
328258
+ FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility["ALL"] = "all";
328259
+ /** private */
328260
+ FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility["PRIVATE"] = "private";
328261
+ /** selected */
328262
+ FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility["SELECTED"] = "selected";
328263
+ })(FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility || (FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility = {}));
328264
+ /**
328265
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextBackend' to JSON representation.
328266
+ */
328267
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328268
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackend(obj) {
328269
+ if (obj === undefined) {
328270
+ return undefined;
328271
+ }
328272
+ const result = {
328273
+ 'ref': toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackendRef(obj.ref),
328274
+ };
328275
+ // filter undefined values
328276
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328277
+ }
328278
+ /**
328279
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextProvider' to JSON representation.
328280
+ */
328281
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328282
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecContextProvider(obj) {
328283
+ if (obj === undefined) {
328284
+ return undefined;
328285
+ }
328286
+ const result = {
328287
+ 'ref': toJson_FirestartrGithubOrganizationVariableSectionSpecContextProviderRef(obj.ref),
328288
+ };
328289
+ // filter undefined values
328290
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328291
+ }
328292
+ /**
328293
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRefOutputs' to JSON representation.
328294
+ */
328295
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328296
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRefOutputs(obj) {
328297
+ if (obj === undefined) {
328298
+ return undefined;
328299
+ }
328300
+ const result = {
328301
+ 'key': obj.key,
328302
+ };
328303
+ // filter undefined values
328304
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328305
+ }
328306
+ /**
328307
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextBackendRef' to JSON representation.
328308
+ */
328309
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328310
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackendRef(obj) {
328311
+ if (obj === undefined) {
328312
+ return undefined;
328313
+ }
328314
+ const result = {
328315
+ 'kind': obj.kind,
328316
+ 'name': obj.name,
328317
+ };
328318
+ // filter undefined values
328319
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328320
+ }
328321
+ /**
328322
+ * Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextProviderRef' to JSON representation.
328323
+ */
328324
+ /* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328325
+ function toJson_FirestartrGithubOrganizationVariableSectionSpecContextProviderRef(obj) {
328326
+ if (obj === undefined) {
328327
+ return undefined;
328328
+ }
328329
+ const result = {
328330
+ 'kind': obj.kind,
328331
+ 'name': obj.name,
328332
+ };
328333
+ // filter undefined values
328334
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
328335
+ }
328336
+ /* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
328337
+ /**
328338
+ * @schema FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind
328339
+ */
328340
+ var FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind;
328341
+ (function (FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind) {
328342
+ /** FirestartrProviderConfig */
328343
+ FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
328344
+ })(FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind || (FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind = {}));
328345
+ /**
328346
+ * @schema FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind
328347
+ */
328348
+ var FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind;
328349
+ (function (FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind) {
328350
+ /** FirestartrProviderConfig */
328351
+ FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
328352
+ })(FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind || (FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind = {}));
324800
328353
  /**
324801
328354
  * A resource to handle GitHub Organization Webhooks
324802
328355
  *
@@ -327646,6 +331199,120 @@ class GithubOrgSettingsChart extends BaseGithubChart {
327646
331199
  }
327647
331200
  }
327648
331201
 
331202
+ ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/github/orgVariableSectionChart.ts
331203
+
331204
+
331205
+
331206
+ class GithubOrgVariableSectionChart extends BaseGithubChart {
331207
+ template() {
331208
+ const claim = this.get('claim');
331209
+ const firestartrId = this.get('firestartrId');
331210
+ const githubProvider = claim.providers.github;
331211
+ const actionsVariables = (githubProvider.actions_variables || []).map((v) => {
331212
+ const entry = {
331213
+ name: v.name,
331214
+ value: v.value,
331215
+ visibility: v.visibility,
331216
+ };
331217
+ if (v.selected_repositories && v.selected_repositories.length > 0) {
331218
+ entry.selectedRepositories = v.selected_repositories.map((ref) => {
331219
+ const match = ref.match(/^component:(.+)$/);
331220
+ if (!match) {
331221
+ throw new ChartRenderError('OrgSettingsClaim', claim.name, `Invalid component ref "${ref}" in selected_repositories. Expected format: component:<name>`);
331222
+ }
331223
+ const componentName = match[1];
331224
+ const resolvedCr = this.refResolver('ComponentClaim', componentName);
331225
+ const org = resolvedCr?.spec?.org;
331226
+ const repoName = resolvedCr?.metadata?.annotations?.['firestartr.dev/external-name'] || resolvedCr?.metadata?.name?.replace(/-[0-9a-f-]{36}$/, '');
331227
+ if (!org || !repoName) {
331228
+ throw new ChartRenderError('OrgSettingsClaim', claim.name, `Referenced component "${componentName}" has no GitHub provider configured`);
331229
+ }
331230
+ return `${org}/${repoName}`;
331231
+ });
331232
+ }
331233
+ return entry;
331234
+ });
331235
+ const template = {
331236
+ metadata: {
331237
+ name: githubProvider.name,
331238
+ },
331239
+ spec: {
331240
+ org: githubProvider.org,
331241
+ actionsVariables,
331242
+ firestartr: {
331243
+ tfStateKey: firestartrId,
331244
+ },
331245
+ writeConnectionSecretToRef: {
331246
+ name: `firestartrgithuborganizationvariablesection-${githubProvider.name}-outputs`.toLowerCase(),
331247
+ outputs: [{ key: 'managed_variables' }, { key: 'variable_ids' }],
331248
+ },
331249
+ },
331250
+ };
331251
+ return JSON.parse(JSON.stringify(template));
331252
+ }
331253
+ gvk() {
331254
+ return FirestartrGithubOrganizationVariableSection.GVK;
331255
+ }
331256
+ instanceApiObject(template) {
331257
+ return new FirestartrGithubOrganizationVariableSection(this, template.metadata.name, template);
331258
+ }
331259
+ }
331260
+
331261
+ ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/github/orgSecretSectionChart.ts
331262
+
331263
+
331264
+ class GithubOrgSecretSectionChart extends BaseGithubChart {
331265
+ template() {
331266
+ const claim = this.get('claim');
331267
+ const firestartrId = this.get('firestartrId');
331268
+ const githubProvider = claim.providers.github;
331269
+ const orgSecrets = githubProvider.org_secrets || {};
331270
+ const renderSecrets = (section) => {
331271
+ const secrets = orgSecrets[section];
331272
+ if (!Array.isArray(secrets))
331273
+ return [];
331274
+ return secrets.map((secret) => {
331275
+ const parts = secret.value.split(':');
331276
+ return {
331277
+ name: secret.name,
331278
+ ref: {
331279
+ kind: 'Secret',
331280
+ name: parts[2],
331281
+ key: parts[3],
331282
+ },
331283
+ };
331284
+ });
331285
+ };
331286
+ const template = {
331287
+ metadata: {
331288
+ name: `${githubProvider.name}-secrets`,
331289
+ },
331290
+ spec: {
331291
+ org: githubProvider.org,
331292
+ secrets: {
331293
+ actions: renderSecrets('actions'),
331294
+ codespaces: renderSecrets('codespaces'),
331295
+ dependabot: renderSecrets('dependabot'),
331296
+ },
331297
+ firestartr: {
331298
+ tfStateKey: firestartrId ? `${firestartrId}-secrets` : firestartrId,
331299
+ },
331300
+ writeConnectionSecretToRef: {
331301
+ name: `firestartrgithuborganizationsecretsection-${githubProvider.name}-outputs`.toLowerCase(),
331302
+ outputs: [{ key: 'managed_secrets' }, { key: 'secret_ids' }],
331303
+ },
331304
+ },
331305
+ };
331306
+ return JSON.parse(JSON.stringify(template));
331307
+ }
331308
+ gvk() {
331309
+ return FirestartrGithubOrganizationSecretSection.GVK;
331310
+ }
331311
+ instanceApiObject(template) {
331312
+ return new FirestartrGithubOrganizationSecretSection(this, template.metadata.name, template);
331313
+ }
331314
+ }
331315
+
327649
331316
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/github/index.ts
327650
331317
 
327651
331318
 
@@ -327653,6 +331320,8 @@ class GithubOrgSettingsChart extends BaseGithubChart {
327653
331320
 
327654
331321
 
327655
331322
 
331323
+
331324
+
327656
331325
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/catalog/base.ts
327657
331326
 
327658
331327
  class BaseCatalogChart extends BaseChart {
@@ -328400,6 +332069,8 @@ class SecretsChart extends BaseSecretsChart {
328400
332069
  SecretsChart: SecretsChart,
328401
332070
  GithubOrgWebhookChart: GithubOrgWebhookChart,
328402
332071
  GithubOrgSettingsChart: GithubOrgSettingsChart,
332072
+ GithubOrgVariableSectionChart: GithubOrgVariableSectionChart,
332073
+ GithubOrgSecretSectionChart: GithubOrgSecretSectionChart,
328403
332074
  });
328404
332075
 
328405
332076
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/renderer/claims-render.ts
@@ -328444,13 +332115,28 @@ async function renderClaims(catalogScope, firestartrScope, data) {
328444
332115
  if (configuredProvider !== AllowedProviders.all.toString()) {
328445
332116
  providers = providers.filter((provider) => provider === configuredProvider);
328446
332117
  }
328447
- const previousCR = getPreviousCRfromClaim(claim, crs);
332118
+ const expectedKind = claim.kind === 'OrgSettingsClaim'
332119
+ ? 'FirestartrGithubOrganizationSettings'
332120
+ : undefined;
332121
+ const previousCR = getPreviousCRfromClaim(claim, crs, expectedKind);
332122
+ const variableSectionPreviousCR = claim.kind === 'OrgSettingsClaim'
332123
+ ? getPreviousCRfromClaim({ kind: claim.kind, name: `${claim.name}-variable-section` }, crs, 'FirestartrGithubOrganizationVariableSection')
332124
+ : false;
332125
+ const secretSectionPreviousCR = claim.kind === 'OrgSettingsClaim'
332126
+ ? getPreviousCRfromClaim({ kind: claim.kind, name: `${claim.name}-secret-section` }, crs, 'FirestartrGithubOrganizationSecretSection')
332127
+ : false;
328448
332128
  const patches = await extractPatches(renderClaims[claimKey], previousCR);
332129
+ let variableSectionPatches = undefined;
332130
+ let secretSectionPatches = undefined;
332131
+ if (claim.kind === 'OrgSettingsClaim') {
332132
+ variableSectionPatches = await extractPatches(renderClaims[claimKey], variableSectionPreviousCR);
332133
+ secretSectionPatches = await extractPatches(renderClaims[claimKey], secretSectionPreviousCR);
332134
+ }
328449
332135
  if (!previousCR) {
328450
332136
  logger.debug(`No CR found for claim ${claimKey}, it will be rendered from scratch`);
328451
332137
  }
328452
332138
  const claimPath = renderClaims[claimKey].claimPath;
328453
- const { firestartrEntity, extraCharts, catalogEntity } = await renderClaim(catalogScope, firestartrScope, claim, patches, previousCR, claimPath);
332139
+ const { firestartrEntity, extraCharts, catalogEntity } = await renderClaim(catalogScope, firestartrScope, claim, patches, previousCR, claimPath, variableSectionPreviousCR, variableSectionPatches, secretSectionPreviousCR, secretSectionPatches);
328454
332140
  if (catalogEntity) {
328455
332141
  result[`${catalogEntity.kind}-${catalogEntity.metadata.name}`] =
328456
332142
  catalogEntity.toJson();
@@ -328479,7 +332165,7 @@ async function renderClaims(catalogScope, firestartrScope, data) {
328479
332165
  }
328480
332166
  return result;
328481
332167
  }
328482
- async function renderClaim(catalogScope, firestartrScope, claim, patches, previousCR = null, claimPath) {
332168
+ async function renderClaim(catalogScope, firestartrScope, claim, patches, previousCR = null, claimPath, variableSectionPreviousCR = false, variableSectionPatches, secretSectionPreviousCR = false, secretSectionPatches) {
328483
332169
  let catalogEntity = undefined;
328484
332170
  let firestartrEntity = undefined;
328485
332171
  const extraCharts = [];
@@ -328627,6 +332313,48 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
328627
332313
  case 'OrgSettingsClaim':
328628
332314
  if (loadGithub) {
328629
332315
  firestartrEntity = new charts.GithubOrgSettingsChart(firestartrScope, `github-${chartId}`, firestartrId, claim, renderPatches);
332316
+ const variableSectionFirestartrId = variableSectionPreviousCR
332317
+ ? variableSectionPreviousCR.spec?.firestartr?.tfStateKey
332318
+ : firestartrId
332319
+ ? `${firestartrId}-variables`
332320
+ : null;
332321
+ const vsRenderPatches = variableSectionPatches
332322
+ ? variableSectionPatches.filter((patch) => !patch.isPostPatch)
332323
+ : renderPatches;
332324
+ const vsPostPatches = variableSectionPatches
332325
+ ? variableSectionPatches.filter((patch) => patch.isPostPatch)
332326
+ : postPatches;
332327
+ const variableSectionChart = new charts.GithubOrgVariableSectionChart(firestartrScope, `github-variables-${chartId}`, variableSectionFirestartrId, claim, vsRenderPatches);
332328
+ await variableSectionChart.render();
332329
+ const variableSectionObject = await variableSectionChart.postRenderer(vsPostPatches);
332330
+ extraCharts.push({
332331
+ claim: {
332332
+ kind: claim.kind,
332333
+ name: `${claim.name}-variable-section`,
332334
+ },
332335
+ chart: variableSectionObject,
332336
+ });
332337
+ const secretSectionFirestartrId = secretSectionPreviousCR
332338
+ ? secretSectionPreviousCR.spec?.firestartr?.tfStateKey
332339
+ : firestartrId
332340
+ ? `${firestartrId}-secrets`
332341
+ : null;
332342
+ const ssRenderPatches = secretSectionPatches
332343
+ ? secretSectionPatches.filter((patch) => !patch.isPostPatch)
332344
+ : renderPatches;
332345
+ const ssPostPatches = secretSectionPatches
332346
+ ? secretSectionPatches.filter((patch) => patch.isPostPatch)
332347
+ : postPatches;
332348
+ const secretSectionChart = new charts.GithubOrgSecretSectionChart(firestartrScope, `github-secrets-${chartId}`, secretSectionFirestartrId, claim, ssRenderPatches);
332349
+ await secretSectionChart.render();
332350
+ const secretSectionObject = await secretSectionChart.postRenderer(ssPostPatches);
332351
+ extraCharts.push({
332352
+ claim: {
332353
+ kind: claim.kind,
332354
+ name: `${claim.name}-secret-section`,
332355
+ },
332356
+ chart: secretSectionObject,
332357
+ });
328630
332358
  }
328631
332359
  break;
328632
332360
  default:
@@ -328791,6 +332519,205 @@ function validateGithubOrgSettingsSingleton(crs) {
328791
332519
  }
328792
332520
  }
328793
332521
 
332522
+ ;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/githubOrgVariableSection.ts
332523
+ const GITHUB_ORG_VARIABLE_SECTION_KIND = 'FirestartrGithubOrganizationVariableSection';
332524
+ const githubOrgVariableSection_FIRESTARTR_CLAIM_REF_ANNOTATION = 'firestartr.dev/claim-ref';
332525
+ const githubOrgVariableSection_CLAIM_REF_LABEL = 'claim-ref';
332526
+ const COMPONENT_REF_PATTERN = /^component:(.+)$/;
332527
+ function githubOrgVariableSection_formatResourceRef(name, claimRef) {
332528
+ return claimRef ? `${name} (claim: ${claimRef})` : name;
332529
+ }
332530
+ function validateGithubOrgVariableSectionSingleton(crs) {
332531
+ const refsByOrg = new Map();
332532
+ const seenClaimRefs = new Map();
332533
+ for (const crKey of Object.keys(crs)) {
332534
+ const cr = crs[crKey];
332535
+ if (cr.kind !== GITHUB_ORG_VARIABLE_SECTION_KIND)
332536
+ continue;
332537
+ const org = cr.spec?.org;
332538
+ if (typeof org !== 'string' || !org)
332539
+ continue;
332540
+ const name = cr.metadata?.name || crKey;
332541
+ const claimRef = cr.metadata?.annotations?.[githubOrgVariableSection_FIRESTARTR_CLAIM_REF_ANNOTATION] ||
332542
+ cr.metadata?.labels?.[githubOrgVariableSection_CLAIM_REF_LABEL];
332543
+ const normalizedOrg = org.toLowerCase();
332544
+ if (claimRef) {
332545
+ const seen = seenClaimRefs.get(normalizedOrg) || new Set();
332546
+ if (seen.has(claimRef))
332547
+ continue;
332548
+ seen.add(claimRef);
332549
+ seenClaimRefs.set(normalizedOrg, seen);
332550
+ }
332551
+ const refs = refsByOrg.get(normalizedOrg) || [];
332552
+ refs.push(githubOrgVariableSection_formatResourceRef(name, claimRef));
332553
+ refsByOrg.set(normalizedOrg, refs);
332554
+ }
332555
+ for (const [org, refs] of refsByOrg.entries()) {
332556
+ if (refs.length < 2)
332557
+ continue;
332558
+ throw new Error(`Duplicate ${GITHUB_ORG_VARIABLE_SECTION_KIND} resources found for GitHub organization "${org}": ${refs.join(', ')}`);
332559
+ }
332560
+ }
332561
+ function validateActionsVariablesUniqueness(crs) {
332562
+ for (const crKey of Object.keys(crs)) {
332563
+ const cr = crs[crKey];
332564
+ if (cr.kind !== GITHUB_ORG_VARIABLE_SECTION_KIND)
332565
+ continue;
332566
+ const actionsVariables = cr.spec?.actionsVariables;
332567
+ if (!Array.isArray(actionsVariables))
332568
+ continue;
332569
+ const names = new Set();
332570
+ for (const variable of actionsVariables) {
332571
+ const varName = variable?.name;
332572
+ if (!varName)
332573
+ continue;
332574
+ if (names.has(varName)) {
332575
+ const org = cr.spec?.org || 'unknown';
332576
+ throw new Error(`Duplicate action variable name "${varName}" found in ${GITHUB_ORG_VARIABLE_SECTION_KIND} for organization "${org}"`);
332577
+ }
332578
+ names.add(varName);
332579
+ }
332580
+ }
332581
+ }
332582
+ function validateActionsVariablesSelectedRepositories(renderClaims) {
332583
+ for (const claimKey of Object.keys(renderClaims)) {
332584
+ if (!claimKey.startsWith('OrgSettingsClaim-'))
332585
+ continue;
332586
+ const claimData = renderClaims[claimKey];
332587
+ const claim = claimData?.claim;
332588
+ const actionsVariables = claim?.providers?.github?.actions_variables;
332589
+ if (!Array.isArray(actionsVariables))
332590
+ continue;
332591
+ for (const variable of actionsVariables) {
332592
+ if (variable.visibility !== 'selected')
332593
+ continue;
332594
+ const selectedRepos = variable.selected_repositories;
332595
+ if (!Array.isArray(selectedRepos) || selectedRepos.length === 0)
332596
+ continue;
332597
+ for (const ref of selectedRepos) {
332598
+ const match = ref.match(COMPONENT_REF_PATTERN);
332599
+ if (!match)
332600
+ continue;
332601
+ const componentName = match[1];
332602
+ const expectedKey = `ComponentClaim-${componentName}`;
332603
+ if (!renderClaims[expectedKey]) {
332604
+ throw new Error(`CrossReference error: OrgSettingsClaim/${claim.name} references a non-existent component "${componentName}" in actions_variables.${variable.name}.selected_repositories`);
332605
+ }
332606
+ }
332607
+ }
332608
+ }
332609
+ }
332610
+
332611
+ ;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/githubOrgSecretSection.ts
332612
+ const GITHUB_ORG_SECRET_SECTION_KIND = 'FirestartrGithubOrganizationSecretSection';
332613
+ const githubOrgSecretSection_FIRESTARTR_CLAIM_REF_ANNOTATION = 'firestartr.dev/claim-ref';
332614
+ const githubOrgSecretSection_CLAIM_REF_LABEL = 'claim-ref';
332615
+ const SECRETS_CLAIM_REF_PATTERN = /^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$/;
332616
+ function githubOrgSecretSection_formatResourceRef(name, claimRef) {
332617
+ return claimRef ? `${name} (claim: ${claimRef})` : name;
332618
+ }
332619
+ function validateGithubOrgSecretSectionSingleton(crs) {
332620
+ const refsByOrg = new Map();
332621
+ const seenClaimRefs = new Map();
332622
+ for (const crKey of Object.keys(crs)) {
332623
+ const cr = crs[crKey];
332624
+ if (cr.kind !== GITHUB_ORG_SECRET_SECTION_KIND)
332625
+ continue;
332626
+ const org = cr.spec?.org;
332627
+ if (typeof org !== 'string' || !org)
332628
+ continue;
332629
+ const name = cr.metadata?.name || crKey;
332630
+ const claimRef = cr.metadata?.annotations?.[githubOrgSecretSection_FIRESTARTR_CLAIM_REF_ANNOTATION] ||
332631
+ cr.metadata?.labels?.[githubOrgSecretSection_CLAIM_REF_LABEL];
332632
+ const normalizedOrg = org.toLowerCase();
332633
+ if (claimRef) {
332634
+ const seen = seenClaimRefs.get(normalizedOrg) || new Set();
332635
+ if (seen.has(claimRef))
332636
+ continue;
332637
+ seen.add(claimRef);
332638
+ seenClaimRefs.set(normalizedOrg, seen);
332639
+ }
332640
+ const refs = refsByOrg.get(normalizedOrg) || [];
332641
+ refs.push(githubOrgSecretSection_formatResourceRef(name, claimRef));
332642
+ refsByOrg.set(normalizedOrg, refs);
332643
+ }
332644
+ for (const [org, refs] of refsByOrg.entries()) {
332645
+ if (refs.length < 2)
332646
+ continue;
332647
+ throw new Error(`Duplicate ${GITHUB_ORG_SECRET_SECTION_KIND} resources found for GitHub organization "${org}": ${refs.join(', ')}`);
332648
+ }
332649
+ }
332650
+ function validateSecretNamesUniqueness(crs) {
332651
+ for (const crKey of Object.keys(crs)) {
332652
+ const cr = crs[crKey];
332653
+ if (cr.kind !== GITHUB_ORG_SECRET_SECTION_KIND)
332654
+ continue;
332655
+ const secrets = cr.spec?.secrets;
332656
+ if (!secrets || typeof secrets !== 'object')
332657
+ continue;
332658
+ for (const section of ['actions', 'codespaces', 'dependabot']) {
332659
+ const sectionSecrets = secrets[section];
332660
+ if (!Array.isArray(sectionSecrets))
332661
+ continue;
332662
+ const names = new Set();
332663
+ for (const secret of sectionSecrets) {
332664
+ const secretName = secret?.name;
332665
+ if (!secretName)
332666
+ continue;
332667
+ if (names.has(secretName)) {
332668
+ const org = cr.spec?.org || 'unknown';
332669
+ throw new Error(`Duplicate secret name "${secretName}" found in ${section} section of ${GITHUB_ORG_SECRET_SECTION_KIND} for organization "${org}"`);
332670
+ }
332671
+ names.add(secretName);
332672
+ }
332673
+ }
332674
+ }
332675
+ }
332676
+ function validateOrgSecretsCrossReferences(renderClaims) {
332677
+ for (const claimKey of Object.keys(renderClaims)) {
332678
+ if (!claimKey.startsWith('OrgSettingsClaim-'))
332679
+ continue;
332680
+ const claimData = renderClaims[claimKey];
332681
+ const claim = claimData?.claim;
332682
+ const orgSecrets = claim?.providers?.github?.org_secrets;
332683
+ if (!orgSecrets || typeof orgSecrets !== 'object')
332684
+ continue;
332685
+ for (const section of ['actions', 'codespaces', 'dependabot']) {
332686
+ const secrets = orgSecrets[section];
332687
+ if (!Array.isArray(secrets))
332688
+ continue;
332689
+ for (const secret of secrets) {
332690
+ if (!secret.value)
332691
+ continue;
332692
+ const match = secret.value.match(SECRETS_CLAIM_REF_PATTERN);
332693
+ if (!match)
332694
+ continue;
332695
+ const [, secretClaimName, secretKey] = match;
332696
+ const expectedKey = `SecretsClaim-${secretClaimName}`;
332697
+ if (!renderClaims[expectedKey])
332698
+ continue;
332699
+ const secretClaim = renderClaims[expectedKey]?.claim;
332700
+ const externalSecrets = secretClaim?.providers?.external_secrets?.externalSecrets?.secrets;
332701
+ const pushSecrets = secretClaim?.providers?.external_secrets?.pushSecrets;
332702
+ let keyFound = false;
332703
+ if (Array.isArray(pushSecrets)) {
332704
+ keyFound =
332705
+ pushSecrets.find((s) => s.secretName === secretKey) !==
332706
+ undefined;
332707
+ }
332708
+ if (!keyFound && Array.isArray(externalSecrets)) {
332709
+ keyFound =
332710
+ externalSecrets.find((s) => s.secretName === secretKey) !==
332711
+ undefined;
332712
+ }
332713
+ if (!keyFound) {
332714
+ throw new Error(`CrossReference error: OrgSettingsClaim/${claim.name} references a non-existent secret key "${secretKey}" in SecretsClaim/${secretClaimName} via org_secrets.${section}.${secret.name}`);
332715
+ }
332716
+ }
332717
+ }
332718
+ }
332719
+ }
332720
+
328794
332721
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/renderer/renderer.ts
328795
332722
 
328796
332723
 
@@ -328801,6 +332728,8 @@ function validateGithubOrgSettingsSingleton(crs) {
328801
332728
 
328802
332729
 
328803
332730
 
332731
+
332732
+
328804
332733
  /*
328805
332734
  * Function called when rendering but not importing
328806
332735
  *
@@ -328822,8 +332751,14 @@ async function renderer_render(catalogScope, firestartrScope, claimList) {
328822
332751
  try {
328823
332752
  validateSubReferences(data.renderClaims);
328824
332753
  validateComponentPagesPath(data.renderClaims);
332754
+ validateActionsVariablesSelectedRepositories(data.renderClaims);
332755
+ validateOrgSecretsCrossReferences(data.renderClaims);
328825
332756
  validateTfStateKeyUniqueness(result);
328826
332757
  validateGithubOrgSettingsSingleton(fullCrSet);
332758
+ validateGithubOrgVariableSectionSingleton(fullCrSet);
332759
+ validateActionsVariablesUniqueness(result);
332760
+ validateGithubOrgSecretSectionSingleton(fullCrSet);
332761
+ validateSecretNamesUniqueness(result);
328827
332762
  validateCrSizes(result);
328828
332763
  validatePermissionsUniqueness(result);
328829
332764
  }
@@ -331155,6 +335090,7 @@ const kindPluralMap = {
331155
335090
  terraformmodules: 'FirestartrTerraformModule',
331156
335091
  githuborgwebhooks: 'FirestartrGithubOrgWebhook',
331157
335092
  githuborganizationsettings: 'FirestartrGithubOrganizationSettings',
335093
+ githuborganizationvariablesections: 'FirestartrGithubOrganizationVariableSection',
331158
335094
  terraformworkspaces: 'FirestartrTerraformWorkspace',
331159
335095
  terraformworkspaceplans: 'FirestartrTerraformWorkspacePlan',
331160
335096
  providerconfigs: 'FirestartrProviderConfig',
@@ -332734,9 +336670,6 @@ async function getItemIfNeededSync(watcher, watchers) {
332734
336670
  const targetWatchers = watchers ?? syncWatchers;
332735
336671
  try {
332736
336672
  const item = await ctl_getItemByItemPath(watcher.itemPath);
332737
- const isProvisioning = item.status?.conditions?.find((condition) => condition.type === 'PROVISIONING' && condition.status === 'True');
332738
- if (isProvisioning)
332739
- return null;
332740
336673
  const isDeleting = item.status?.conditions?.find((condition) => condition.type === 'DELETING' && condition.status === 'True');
332741
336674
  if (isDeleting)
332742
336675
  return null;
@@ -333135,6 +337068,7 @@ const kindsWithFinalizer = [
333135
337068
  'FirestartrGithubRepositoryFeature',
333136
337069
  'FirestartrGithubOrgWebhook',
333137
337070
  'FirestartrGithubOrganizationSettings',
337071
+ 'FirestartrGithubOrganizationVariableSection',
333138
337072
  'FirestartrGithubRepositorySecretsSection',
333139
337073
  ];
333140
337074
  const kindsWithDependants = [
@@ -333386,7 +337320,10 @@ async function inform(pluralKind, item, op, lastWorkItem = null) {
333386
337320
  return null;
333387
337321
  switch (op) {
333388
337322
  case 'onSync':
333389
- if (workItem !== null && workItem.workStatus !== WorkStatus.FINISHED) {
337323
+ if (workItem !== null &&
337324
+ workItem.workStatus !== WorkStatus.FINISHED &&
337325
+ (workItem.operation === OperationType.SYNC ||
337326
+ workItem.operation === OperationType.RETRY_SYNC)) {
333390
337327
  return null;
333391
337328
  }
333392
337329
  workItem = {
@@ -339673,6 +343610,10 @@ const MODULES = {
339673
343610
  // github-org-settings-v0.1.0
339674
343611
  ref: 'c30c5dfdaddf2bca9e966a726d45970c98576e9e',
339675
343612
  },
343613
+ FirestartrGithubOrganizationVariableSection: {
343614
+ module: 'git::https://github.com/prefapp/tfm.git//modules/github-org-variables-section',
343615
+ ref: '79c1407',
343616
+ },
339676
343617
  };
339677
343618
  function getFirestartrDefaultTFM(kind) {
339678
343619
  if (kind in MODULES) {
@@ -341475,6 +345416,94 @@ class EntityGHOrgSettings extends base_Entity {
341475
345416
  }
341476
345417
  }
341477
345418
 
345419
+ ;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghorgvarsection/index.ts
345420
+
345421
+
345422
+
345423
+ class EntityGHOrgVarsSection extends base_Entity {
345424
+ constructor(artifact) {
345425
+ super(artifact, {
345426
+ config: {
345427
+ variables: {},
345428
+ },
345429
+ });
345430
+ }
345431
+ async loadResources(tfOp) {
345432
+ gh_provisioner_src_logger.info(`[gh-provisioner] running ${tfOp} on ${this.k8sId}`);
345433
+ try {
345434
+ const cr = this.cr;
345435
+ const actionsVariables = cr.spec.actionsVariables || [];
345436
+ const variables = {};
345437
+ for (const v of actionsVariables) {
345438
+ const entry = {
345439
+ value: v.value,
345440
+ visibility: v.visibility,
345441
+ };
345442
+ if (v.visibility === 'selected' && v.selectedRepositories) {
345443
+ entry.selectedRepositoryIds = v.selectedRepositories;
345444
+ }
345445
+ variables[v.name] = entry;
345446
+ }
345447
+ this.patchData({
345448
+ op: PatchOperations.replace,
345449
+ path: '/config/variables',
345450
+ value: variables,
345451
+ });
345452
+ if (tfOp === 'apply') {
345453
+ await this.adoptVariablesIfNeeded(actionsVariables);
345454
+ }
345455
+ gh_provisioner_src_logger.debug(`[gh-provisioner] ${this.k8sId} loaded its data`);
345456
+ }
345457
+ catch (err) {
345458
+ const message = err instanceof Error ? err.message : String(err);
345459
+ gh_provisioner_src_logger.error(`[gh-provisioner] ${this.k8sId} error loading resources: ${message}`);
345460
+ throw new Error(`[gh-provisioner] ${this.k8sId} error loading resources: ${message}`);
345461
+ }
345462
+ }
345463
+ async adoptVariablesIfNeeded(declaredVars) {
345464
+ const cr = this.cr;
345465
+ const managedVariables = this.cr.fResolveSelfOutputs('managed_variables') || [];
345466
+ const declaredNames = declaredVars.map((v) => v.name);
345467
+ const newToModule = declaredNames.filter((name) => !managedVariables.includes(name));
345468
+ if (newToModule.length === 0) {
345469
+ gh_provisioner_src_logger.debug(`[gh-provisioner] ${this.k8sId} all declared variables are already managed, no adoption needed`);
345470
+ return;
345471
+ }
345472
+ if (managedVariables.length === 0) {
345473
+ gh_provisioner_src_logger.info(`[gh-provisioner] ${this.k8sId} no managed_variables output — first reconciliation, treating all ${newToModule.length} declared variable(s) as new to module`);
345474
+ }
345475
+ for (const varName of newToModule) {
345476
+ try {
345477
+ await this.runWithGithubProvider(async () => {
345478
+ await github["default"].org.getOrgVariable(cr.spec.org, varName);
345479
+ });
345480
+ gh_provisioner_src_logger.info(`[gh-provisioner] ${this.k8sId} adopting pre-existing variable '${varName}' on GitHub org '${cr.spec.org}'`);
345481
+ this.patchImportData({
345482
+ op: PatchOperations.add,
345483
+ path: '/imports/-',
345484
+ value: {
345485
+ to: `github_actions_organization_variable.this["${varName}"]`,
345486
+ id: varName,
345487
+ },
345488
+ });
345489
+ }
345490
+ catch (err) {
345491
+ if (err && err.status === 404) {
345492
+ gh_provisioner_src_logger.info(`[gh-provisioner] ${this.k8sId} variable '${varName}' not found on GitHub org '${cr.spec.org}' — will be created by TFM`);
345493
+ }
345494
+ else if (err && (err.status === 401 || err.status === 403)) {
345495
+ gh_provisioner_src_logger.warn(`[gh-provisioner] ${this.k8sId} token lacks scope to check variable '${varName}' on org '${cr.spec.org}' — skipping adoption gracefully`);
345496
+ }
345497
+ else {
345498
+ gh_provisioner_src_logger.error(`[gh-provisioner] ${this.k8sId} unexpected error checking variable '${varName}' on org '${cr.spec.org}': ${err instanceof Error ? err.message : String(err)}`);
345499
+ }
345500
+ }
345501
+ }
345502
+ }
345503
+ async postProvision(tfOp) { }
345504
+ async loadAddressesToImport() { }
345505
+ }
345506
+
341478
345507
  ;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghorgwebhook/index.ts
341479
345508
 
341480
345509
 
@@ -341551,6 +345580,7 @@ class EntityGHOrgWebHook extends base_Entity {
341551
345580
 
341552
345581
 
341553
345582
 
345583
+
341554
345584
  function entities_getEntity(cr) {
341555
345585
  const entityClass = getEntityClass(cr.kind);
341556
345586
  return new entityClass(cr);
@@ -341571,6 +345601,8 @@ function getEntityClass(kind) {
341571
345601
  return EntityGHOrgWebHook;
341572
345602
  case 'FirestartrGithubOrganizationSettings':
341573
345603
  return EntityGHOrgSettings;
345604
+ case 'FirestartrGithubOrganizationVariableSection':
345605
+ return EntityGHOrgVarsSection;
341574
345606
  default:
341575
345607
  throw new Error(`kind ${kind} has no entity associated`);
341576
345608
  }
@@ -341984,6 +346016,7 @@ const GITHUB_RESOURCE_KINDS = [
341984
346016
  'FirestartrGithubRepositorySecretsSection',
341985
346017
  'FirestartrGithubOrgWebhook',
341986
346018
  'FirestartrGithubOrganizationSettings',
346019
+ 'FirestartrGithubOrganizationVariableSection',
341987
346020
  ];
341988
346021
  const GITHUB_REPOSITORY_DEPENDENT_KINDS = [
341989
346022
  'FirestartrGithubRepositoryFeature',
@@ -343242,6 +347275,9 @@ function isObserveModeActive() {
343242
347275
  function runOperator(opts) {
343243
347276
  const { ignoreLease, dummyExec, namespace, kindList, importMode, importModeSkipPlan, observeMode, withMetrics, } = opts;
343244
347277
  const implementedKinds = filterImplementedKinds(kindList);
347278
+ operator_src_logger.info(`operator kindList: ${JSON.stringify(kindList)}`);
347279
+ operator_src_logger.info(`operator implementedKinds: ${JSON.stringify(implementedKinds)}`);
347280
+ operator_src_logger.info(`operator ignoring kinds: ${JSON.stringify(kindList.filter((k) => !implementedKinds.includes(k)))}`);
343245
347281
  if (observeMode)
343246
347282
  observeModeActive = true;
343247
347283
  if (withMetrics)
@@ -343315,6 +347351,7 @@ const provisionImplementations = {
343315
347351
  githubmemberships: process_operation_processOperation,
343316
347352
  githuborgwebhooks: process_operation_processOperation,
343317
347353
  githuborganizationsettings: process_operation_processOperation,
347354
+ githuborganizationvariablesections: process_operation_processOperation,
343318
347355
  fsdummiesa: processFirestartrDummies,
343319
347356
  fsdummiesb: processFirestartrDummies,
343320
347357
  fsdummiesc: processFirestartrDummies,
@@ -522133,9 +526170,34 @@ const crsStatusSubcommand = {
522133
526170
  };
522134
526171
 
522135
526172
  ;// CONCATENATED MODULE: ./package.json
522136
- const package_namespaceObject = JSON.parse('{"i8":"2.9.0-snapshot-04"}');
526173
+ const package_namespaceObject = JSON.parse('{"i8":"2.10.0-snapshot-org-secrets-1"}');
522137
526174
  ;// CONCATENATED MODULE: ../../package.json
522138
526175
  const package_namespaceObject_1 = {"i8":"2.9.0"};
526176
+ // EXTERNAL MODULE: ../../node_modules/semver/index.js
526177
+ var semver = __nccwpck_require__(77546);
526178
+ var semver_default = /*#__PURE__*/__nccwpck_require__.n(semver);
526179
+ ;// CONCATENATED MODULE: ./src/version.ts
526180
+
526181
+
526182
+ function isSnapshot(version) {
526183
+ return /^v?\d+\.\d+\.\d+-/.test(version);
526184
+ }
526185
+ function validateVersionConstraint(constraint, version, options) {
526186
+ if (!semver_default().validRange(constraint)) {
526187
+ throw new Error(`Invalid version constraint: "${constraint}"`);
526188
+ }
526189
+ const targetVersion = version || package_namespaceObject.i8;
526190
+ if (isSnapshot(targetVersion)) {
526191
+ if (options?.ignoreSnapshots)
526192
+ return true;
526193
+ throw new Error(`Snapshot version "${targetVersion}" is not a valid semver release; use --ignore-snapshots to allow snapshots`);
526194
+ }
526195
+ if (!semver_default().valid(targetVersion)) {
526196
+ throw new Error(`Invalid version: "${targetVersion}"`);
526197
+ }
526198
+ return semver_default().satisfies(targetVersion, constraint);
526199
+ }
526200
+
522139
526201
  ;// CONCATENATED MODULE: ./src/subcommands/index.ts
522140
526202
 
522141
526203
 
@@ -522146,6 +526208,39 @@ const package_namespaceObject_1 = {"i8":"2.9.0"};
522146
526208
 
522147
526209
 
522148
526210
 
526211
+
526212
+
526213
+ const versionSubcommand = {
526214
+ description: 'Show CLI version or validate a version constraint',
526215
+ requiredEnv: [],
526216
+ subparameters: [
526217
+ { name: 'help', type: Boolean },
526218
+ { name: 'validate', type: String },
526219
+ { name: 'cli-version', type: String },
526220
+ { name: 'ignore-snapshots', type: Boolean },
526221
+ ],
526222
+ run: async (options) => {
526223
+ if (options['help']) {
526224
+ showVersionHelp();
526225
+ return;
526226
+ }
526227
+ if (options['validate']) {
526228
+ const constraint = options['validate'];
526229
+ const targetVersion = options['cli-version'] || package_namespaceObject.i8;
526230
+ const ignoreSnapshots = options['ignore-snapshots'];
526231
+ if (validateVersionConstraint(constraint, targetVersion, {
526232
+ ignoreSnapshots,
526233
+ })) {
526234
+ console.log(`CLI version ${targetVersion} satisfies constraint "${constraint}"`);
526235
+ }
526236
+ else {
526237
+ throw new Error(`Version constraint "${constraint}" not met by CLI version ${targetVersion}`);
526238
+ }
526239
+ return;
526240
+ }
526241
+ showCliVersion();
526242
+ },
526243
+ };
522149
526244
  const SUBCOMMANDS = {
522150
526245
  import: importSubcommand,
522151
526246
  importer: importSubcommand,
@@ -522154,6 +526249,7 @@ const SUBCOMMANDS = {
522154
526249
  cdk8s: cdk8s_rendererSubcommands,
522155
526250
  analyzer: crs_analyzerSubcommand,
522156
526251
  'crs-status': crsStatusSubcommand,
526252
+ version: versionSubcommand,
522157
526253
  };
522158
526254
  // Check that the subcommand exists and it's env is defined
522159
526255
  function validateAndGetSubcommand(name) {
@@ -522186,6 +526282,23 @@ function showSubcommandsHelp() {
522186
526282
  function showCliVersion() {
522187
526283
  console.log(`CLI Version: ${package_namespaceObject.i8}. Firestartr Version: ${package_namespaceObject_1.i8}`);
522188
526284
  }
526285
+ function showVersionHelp() {
526286
+ console.log(`Usage: firestartr-cli version [options]
526287
+
526288
+ Show the current CLI and Firestartr versions, or validate a version constraint.
526289
+
526290
+ Options:
526291
+ --help Show this help message
526292
+ --validate <constraint> Validate that the CLI version satisfies a semver constraint (e.g. ">=2.6.4")
526293
+ --cli-version <version> Override the version to check against (default: installed CLI version)
526294
+ --ignore-snapshots Allow snapshot versions (e.g. "2.9.0-snapshot-01") to bypass validation
526295
+
526296
+ Examples:
526297
+ firestartr-cli version
526298
+ firestartr-cli version --validate ">=2.6.4"
526299
+ firestartr-cli version --validate ">=2.6.4" --cli-version "2.7.0"
526300
+ firestartr-cli version --validate ">=2.6.4" --ignore-snapshots`);
526301
+ }
522189
526302
 
522190
526303
  ;// CONCATENATED MODULE: ./src/command_line.ts
522191
526304
 
@@ -522206,9 +526319,6 @@ class CommandLine {
522206
526319
  case 'help':
522207
526320
  showSubcommandsHelp();
522208
526321
  break;
522209
- case 'version':
522210
- showCliVersion();
522211
- break;
522212
526322
  default: {
522213
526323
  // Get the subcommand data
522214
526324
  const subcommandData = validateAndGetSubcommand(subcommand);