@scalar/cli 0.2.263 → 0.2.264

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.
@@ -1,4 +1,4 @@
1
- import { openapi } from '@scalar/openapi-parser';
1
+ import { load, validate } from '@scalar/openapi-parser';
2
2
  import { fetchUrls } from '@scalar/openapi-parser/plugins/fetch-urls';
3
3
  import { readFiles } from '@scalar/openapi-parser/plugins/read-files';
4
4
  import { Command } from 'commander';
@@ -18,12 +18,10 @@ function ValidateCommand() {
18
18
  // Read file
19
19
  const input = useGivenFileOrConfiguration(inputArgument);
20
20
  // Validate
21
- const result = await openapi()
22
- .load(input, {
21
+ const { filesystem } = await load(input, {
23
22
  plugins: [fetchUrls(), readFiles()],
24
- })
25
- .validate()
26
- .get();
23
+ });
24
+ const result = await validate(filesystem);
27
25
  if (result.valid && result.version) {
28
26
  console.log(kleur.green(`Matches the OpenAPI specification${kleur.white(` (OpenAPI ${kleur.bold(result.version)})`)}`));
29
27
  const endTime = performance.now();
@@ -1,3 +1,3 @@
1
- var version = "0.2.263";
1
+ var version = "0.2.264";
2
2
 
3
3
  export { version };
@@ -1 +1 @@
1
- {"version":3,"file":"ValidateCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/validate/ValidateCommand.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMnC;;GAEG;AACH,wBAAgB,eAAe,YAiE9B"}
1
+ {"version":3,"file":"ValidateCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/validate/ValidateCommand.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMnC;;GAEG;AACH,wBAAgB,eAAe,YAgE9B"}
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "swagger",
17
17
  "cli"
18
18
  ],
19
- "version": "0.2.263",
19
+ "version": "0.2.264",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -44,13 +44,13 @@
44
44
  "hono": "^4.6.5",
45
45
  "kleur": "^4.1.5",
46
46
  "prettyjson": "^1.2.5",
47
- "@scalar/api-reference": "1.25.80",
48
- "@scalar/mock-server": "0.2.92",
49
- "@scalar/oas-utils": "0.2.87",
47
+ "@scalar/config": "0.1.1",
48
+ "@scalar/mock-server": "0.2.93",
49
+ "@scalar/api-reference": "1.25.81",
50
50
  "@scalar/openapi-types": "0.1.5",
51
- "@scalar/openapi-parser": "0.9.0",
51
+ "@scalar/oas-utils": "0.2.88",
52
52
  "@scalar/void-server": "2.0.14",
53
- "@scalar/config": "0.1.1"
53
+ "@scalar/openapi-parser": "0.10.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@rollup/plugin-json": "^6.1.0",