@scalar/oas-utils 0.2.49 → 0.2.50

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
  # @scalar/oas-utils
2
2
 
3
+ ## 0.2.50
4
+
5
+ ### Patch Changes
6
+
7
+ - 9057781: fix: add missing securityDefinitions check on import
8
+
3
9
  ## 0.2.49
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/transforms/import-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,cAAc,EAGnB,KAAK,MAAM,EACX,KAAK,GAAG,EAOT,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,0BAA0B,CAAA;AAKjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAiCxD;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,GAAG,aAAa,EAC5B,uBAAuB,CAAC,EAAE,mBAAmB,CAAC,yBAAyB,CAAC,GACvE,OAAO,CACN;IACE,KAAK,EAAE,KAAK,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,eAAe,EAAE,cAAc,EAAE,CAAA;CAClC,GACD;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAC5C,CAiQA"}
1
+ {"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/transforms/import-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,cAAc,EAGnB,KAAK,MAAM,EACX,KAAK,GAAG,EAOT,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,0BAA0B,CAAA;AAKjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAiCxD;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,GAAG,aAAa,EAC5B,uBAAuB,CAAC,EAAE,mBAAmB,CAAC,yBAAyB,CAAC,GACvE,OAAO,CACN;IACE,KAAK,EAAE,KAAK,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,eAAe,EAAE,cAAc,EAAE,CAAA;CAClC,GACD;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAC5C,CAkQA"}
@@ -66,7 +66,7 @@ async function importSpecToWorkspace(spec, preferredSecurityScheme) {
66
66
  const tagNames = new Set();
67
67
  // ---------------------------------------------------------------------------
68
68
  // SECURITY HANDLING
69
- const security = schema.components?.securitySchemes ?? {};
69
+ const security = schema.components?.securitySchemes ?? schema?.securityDefinitions ?? {};
70
70
  const securitySchemes = Object.entries(security)
71
71
  .map?.(([nameKey, s]) => {
72
72
  const scheme = schemaModel(
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "specification",
17
17
  "yaml"
18
18
  ],
19
- "version": "0.2.49",
19
+ "version": "0.2.50",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -92,9 +92,9 @@
92
92
  "nanoid": "^5.0.7",
93
93
  "yaml": "^2.4.5",
94
94
  "zod": "^3.23.8",
95
+ "@scalar/object-utils": "1.1.9",
95
96
  "@scalar/openapi-types": "0.1.1",
96
97
  "@scalar/themes": "0.9.32",
97
- "@scalar/object-utils": "1.1.9",
98
98
  "@scalar/types": "0.0.11"
99
99
  },
100
100
  "devDependencies": {
@@ -104,8 +104,8 @@
104
104
  "vitest": "^1.6.0",
105
105
  "zod-to-ts": "^1.2.0",
106
106
  "@scalar/build-tooling": "0.1.10",
107
- "@scalar/openapi-types": "0.1.1",
108
- "@scalar/openapi-parser": "0.8.4"
107
+ "@scalar/openapi-parser": "0.8.4",
108
+ "@scalar/openapi-types": "0.1.1"
109
109
  },
110
110
  "scripts": {
111
111
  "build": "scalar-build-rollup",