@scalar/oas-utils 0.2.113 → 0.2.115

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,19 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.2.115
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [4d03e0f]
8
+ - @scalar/types@0.0.40
9
+ - @scalar/themes@0.9.75
10
+
11
+ ## 0.2.114
12
+
13
+ ### Patch Changes
14
+
15
+ - fb22645: fix: auth selected security scheme undefined
16
+
3
17
  ## 0.2.113
4
18
 
5
19
  ### Patch Changes
@@ -3,8 +3,8 @@ import { isHttpMethod } from '../helpers/httpMethods.js';
3
3
  import { schemaModel } from '../helpers/schema-model.js';
4
4
  import { keysOf } from '@scalar/object-utils/arrays';
5
5
  import { load, upgrade, dereference } from '@scalar/openapi-parser';
6
- import { serverSchema } from '../entities/spec/server.js';
7
6
  import { isDefined } from '../helpers/is-defined.js';
7
+ import { serverSchema } from '../entities/spec/server.js';
8
8
  import { requestSchema } from '../entities/spec/requests.js';
9
9
  import { tagSchema } from '../entities/spec/spec-objects.js';
10
10
  import { createExampleFromRequest } from '../entities/spec/request-examples.js';
@@ -55,7 +55,9 @@ const getSelectedSecuritySchemeUids = (securityRequirements, preferredSecurityNa
55
55
  // Set the first security requirement if no preferred security schemes are set
56
56
  const names = securityRequirements[0] && !preferredSecurityNames.length ? [securityRequirements[0]] : preferredSecurityNames;
57
57
  // Map names to uids
58
- const uids = names.map((name) => Array.isArray(name) ? name.map((k) => securitySchemeMap[k]) : securitySchemeMap[name]);
58
+ const uids = names
59
+ .map((name) => (Array.isArray(name) ? name.map((k) => securitySchemeMap[k]) : securitySchemeMap[name]))
60
+ .filter(isDefined);
59
61
  return uids;
60
62
  };
61
63
  /**
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "specification",
17
17
  "yaml"
18
18
  ],
19
- "version": "0.2.113",
19
+ "version": "0.2.115",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -127,18 +127,18 @@
127
127
  "yaml": "^2.4.5",
128
128
  "zod": "^3.23.8",
129
129
  "@scalar/object-utils": "1.1.13",
130
- "@scalar/themes": "0.9.74",
131
130
  "@scalar/openapi-types": "0.1.9",
132
- "@scalar/types": "0.0.39"
131
+ "@scalar/themes": "0.9.75",
132
+ "@scalar/types": "0.0.40"
133
133
  },
134
134
  "devDependencies": {
135
135
  "type-fest": "^4.20.0",
136
136
  "vite": "^5.4.10",
137
137
  "vitest": "^1.6.0",
138
138
  "zod-to-ts": "github:amritk/zod-to-ts#build",
139
- "@scalar/build-tooling": "0.1.16",
140
- "@scalar/openapi-parser": "0.10.9",
141
- "@scalar/openapi-types": "0.1.9"
139
+ "@scalar/build-tooling": "0.1.17",
140
+ "@scalar/openapi-types": "0.1.9",
141
+ "@scalar/openapi-parser": "0.10.10"
142
142
  },
143
143
  "scripts": {
144
144
  "build": "scalar-build-rollup",