@nitra/cursor 3.2.2 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.2.3] - 2026-06-01
4
+
5
+ ### Fixed
6
+
7
+ - k8s `workloadAppLabel`: CronJob/workload без `spec` (чи `spec: null`) повертає `null` замість TypeError — `check k8s` більше не падає на неповному маніфесті
8
+
3
9
  ## [3.2.2] - 2026-06-01
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/cursor",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "CLI для завантаження cursor-правил (префікс n-) у локальний репозиторій",
5
5
  "keywords": [
6
6
  "cli",
@@ -4044,13 +4044,13 @@ function appLabelFromPodTemplate(spec) {
4044
4044
  export function workloadAppLabel(manifest) {
4045
4045
  const kind = manifest.kind
4046
4046
  if (typeof kind !== 'string') return null
4047
+ const spec = getNestedObject(manifest, 'spec')
4048
+ if (spec === null) return null
4047
4049
  if (kind === 'CronJob') {
4048
- const jobTemplate = getNestedObject(getNestedObject(manifest, 'spec'), 'jobTemplate')
4050
+ const jobTemplate = getNestedObject(spec, 'jobTemplate')
4049
4051
  const jobSpec = jobTemplate === null ? null : getNestedObject(jobTemplate, 'spec')
4050
4052
  return jobSpec === null ? null : appLabelFromPodTemplate(jobSpec)
4051
4053
  }
4052
- const spec = getNestedObject(manifest, 'spec')
4053
- if (spec === null) return null
4054
4054
  if (kind === 'Job') return appLabelFromPodTemplate(spec)
4055
4055
  return appLabelFromSpecSelector(spec)
4056
4056
  }