@mintlify/msft-sdk 1.1.67 → 1.1.69

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.
@@ -0,0 +1,14 @@
1
+ import { isOpenAPIV3orV31Document as i, openApiToSchemaGraph as o } from "@mintlify/validation";
2
+ function l(r, e) {
3
+ if (!i(r))
4
+ throw new Error("Invalid OpenAPI document: must be OpenAPI 3.0 or 3.1");
5
+ const n = JSON.parse(JSON.stringify(r)), a = (e == null ? void 0 : e.filename) ?? "openapi.json", c = (e == null ? void 0 : e.originalFileLocation) ?? a;
6
+ return o({
7
+ spec: n,
8
+ filename: a,
9
+ originalFileLocation: c
10
+ });
11
+ }
12
+ export {
13
+ l as convertOpenApiSpecToGraph
14
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/msft-sdk",
3
- "version": "1.1.67",
3
+ "version": "1.1.69",
4
4
  "description": "Lightweight SDK for Microsoft documentation with MDX rendering",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -36,7 +36,10 @@
36
36
  "dev": "vite build --watch",
37
37
  "lint": "eslint .",
38
38
  "lint:fix": "eslint . --fix",
39
- "prepublishOnly": "npm run clean && npm run build"
39
+ "prepublishOnly": "npm run clean && npm run build",
40
+ "test": "vitest run",
41
+ "test:watch": "vitest watch",
42
+ "test:coverage": "vitest run --coverage"
40
43
  },
41
44
  "keywords": [
42
45
  "microsoft",
@@ -1,15 +0,0 @@
1
- import { useMemo as n, useContext as t } from "react";
2
- import { ApiReferenceContext as o } from "../contexts/ConfigContext.js";
3
- const p = () => {
4
- const {
5
- apiReferenceData: { endpoint: e }
6
- } = t(o);
7
- return e;
8
- }, s = () => {
9
- const e = p();
10
- return n(() => e, [e]);
11
- };
12
- export {
13
- s as useEndpoint,
14
- p as useOpenApiEndpoint
15
- };