@omnigraph/openapi 0.109.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331 → 0.109.0-alpha-20250303152151-d99794163758395e3b9780a2cfdef2a5a39433df

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.
@@ -16,7 +16,7 @@ const defaultHateoasConfig = {
16
16
  linkObjectExtensionIdentifier: 'x-links',
17
17
  };
18
18
  const futureLinks = new Set();
19
- async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams = {}, selectQueryOrMutationField = [], logger = new utils_1.DefaultLogger('getJSONSchemaOptionsFromOpenAPIOptions'), jsonApi, HATEOAS, }) {
19
+ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch: fetchFn, endpoint, schemaHeaders, operationHeaders, queryParams = {}, selectQueryOrMutationField = [], logger = new utils_1.DefaultLogger('getJSONSchemaOptionsFromOpenAPIOptions'), jsonApi, HATEOAS, }) {
20
20
  const hateOasConfig = HATEOAS === true
21
21
  ? defaultHateoasConfig
22
22
  : HATEOAS === false
@@ -39,7 +39,7 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
39
39
  let oasOrSwagger;
40
40
  const readFileOrUrlForJsonMachete = (path, opts) => (0, utils_1.readFileOrUrl)(path, {
41
41
  cwd: opts.cwd,
42
- fetch,
42
+ fetch: fetchFn,
43
43
  headers: schemaHeadersFactory({ env: cross_helpers_1.process.env }),
44
44
  importFn: utils_1.defaultImportFn,
45
45
  logger,
@@ -50,7 +50,6 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
50
50
  $ref: source,
51
51
  }, {
52
52
  cwd,
53
- fetch,
54
53
  readFileOrUrl: readFileOrUrlForJsonMachete,
55
54
  debugLogFn: logger.debug.bind(logger),
56
55
  }));
@@ -60,7 +59,6 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
60
59
  cwd,
61
60
  readFileOrUrl: readFileOrUrlForJsonMachete,
62
61
  debugLogFn: logger.debug.bind(logger),
63
- fetch,
64
62
  });
65
63
  }
66
64
  (0, json_machete_1.handleUntitledDefinitions)(oasOrSwagger);
@@ -549,7 +547,6 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
549
547
  cwd,
550
548
  root: oasOrSwagger,
551
549
  readFileOrUrl: readFileOrUrlForJsonMachete,
552
- fetch,
553
550
  });
554
551
  responseByStatusCode[responseKey].links = responseByStatusCode[responseKey].links || {};
555
552
  for (const linkName in dereferencedLinkObj.links) {
@@ -664,7 +661,7 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
664
661
  operations,
665
662
  endpoint,
666
663
  cwd,
667
- fetch,
664
+ fetch: fetchFn,
668
665
  schemaHeaders,
669
666
  operationHeaders,
670
667
  };
@@ -13,7 +13,7 @@ const defaultHateoasConfig = {
13
13
  linkObjectExtensionIdentifier: 'x-links',
14
14
  };
15
15
  const futureLinks = new Set();
16
- export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams = {}, selectQueryOrMutationField = [], logger = new DefaultLogger('getJSONSchemaOptionsFromOpenAPIOptions'), jsonApi, HATEOAS, }) {
16
+ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch: fetchFn, endpoint, schemaHeaders, operationHeaders, queryParams = {}, selectQueryOrMutationField = [], logger = new DefaultLogger('getJSONSchemaOptionsFromOpenAPIOptions'), jsonApi, HATEOAS, }) {
17
17
  const hateOasConfig = HATEOAS === true
18
18
  ? defaultHateoasConfig
19
19
  : HATEOAS === false
@@ -36,7 +36,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
36
36
  let oasOrSwagger;
37
37
  const readFileOrUrlForJsonMachete = (path, opts) => readFileOrUrl(path, {
38
38
  cwd: opts.cwd,
39
- fetch,
39
+ fetch: fetchFn,
40
40
  headers: schemaHeadersFactory({ env: process.env }),
41
41
  importFn: defaultImportFn,
42
42
  logger,
@@ -47,7 +47,6 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
47
47
  $ref: source,
48
48
  }, {
49
49
  cwd,
50
- fetch,
51
50
  readFileOrUrl: readFileOrUrlForJsonMachete,
52
51
  debugLogFn: logger.debug.bind(logger),
53
52
  }));
@@ -57,7 +56,6 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
57
56
  cwd,
58
57
  readFileOrUrl: readFileOrUrlForJsonMachete,
59
58
  debugLogFn: logger.debug.bind(logger),
60
- fetch,
61
59
  });
62
60
  }
63
61
  handleUntitledDefinitions(oasOrSwagger);
@@ -546,7 +544,6 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
546
544
  cwd,
547
545
  root: oasOrSwagger,
548
546
  readFileOrUrl: readFileOrUrlForJsonMachete,
549
- fetch,
550
547
  });
551
548
  responseByStatusCode[responseKey].links = responseByStatusCode[responseKey].links || {};
552
549
  for (const linkName in dereferencedLinkObj.links) {
@@ -661,7 +658,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
661
658
  operations,
662
659
  endpoint,
663
660
  cwd,
664
- fetch,
661
+ fetch: fetchFn,
665
662
  schemaHeaders,
666
663
  operationHeaders,
667
664
  };
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@omnigraph/openapi",
3
- "version": "0.109.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
3
+ "version": "0.109.0-alpha-20250303152151-d99794163758395e3b9780a2cfdef2a5a39433df",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "*"
7
7
  },
8
8
  "dependencies": {
9
- "@graphql-mesh/cross-helpers": "^0.4.9",
10
- "@graphql-mesh/fusion-composition": "0.8.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
9
+ "@graphql-mesh/cross-helpers": "^0.4.10",
10
+ "@graphql-mesh/fusion-composition": "0.8.0-alpha-20250303152151-d99794163758395e3b9780a2cfdef2a5a39433df",
11
11
  "@graphql-mesh/string-interpolation": "^0.5.8",
12
- "@graphql-mesh/types": "0.104.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
13
- "@graphql-mesh/utils": "0.104.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
12
+ "@graphql-mesh/types": "0.104.0-alpha-20250303152151-d99794163758395e3b9780a2cfdef2a5a39433df",
13
+ "@graphql-mesh/utils": "0.104.0-alpha-20250303152151-d99794163758395e3b9780a2cfdef2a5a39433df",
14
14
  "@graphql-tools/utils": "^10.6.4",
15
- "@omnigraph/json-schema": "0.109.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
15
+ "@omnigraph/json-schema": "0.109.0-alpha-20250303152151-d99794163758395e3b9780a2cfdef2a5a39433df",
16
16
  "change-case": "^4.1.2",
17
- "json-machete": "0.98.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
17
+ "json-machete": "^0.97.6",
18
18
  "openapi-types": "^12.1.0",
19
19
  "tslib": "^2.4.0"
20
20
  },
@@ -34,7 +34,7 @@ interface GetJSONSchemaOptionsFromOpenAPIOptionsParams {
34
34
  jsonApi?: boolean;
35
35
  HATEOAS?: Partial<HATEOASConfig> | boolean;
36
36
  }
37
- export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams, selectQueryOrMutationField, logger, jsonApi, HATEOAS, }: GetJSONSchemaOptionsFromOpenAPIOptionsParams): Promise<{
37
+ export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch: fetchFn, endpoint, schemaHeaders, operationHeaders, queryParams, selectQueryOrMutationField, logger, jsonApi, HATEOAS, }: GetJSONSchemaOptionsFromOpenAPIOptionsParams): Promise<{
38
38
  operations: JSONSchemaOperationConfig[];
39
39
  endpoint: string;
40
40
  cwd: string;
@@ -34,7 +34,7 @@ interface GetJSONSchemaOptionsFromOpenAPIOptionsParams {
34
34
  jsonApi?: boolean;
35
35
  HATEOAS?: Partial<HATEOASConfig> | boolean;
36
36
  }
37
- export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams, selectQueryOrMutationField, logger, jsonApi, HATEOAS, }: GetJSONSchemaOptionsFromOpenAPIOptionsParams): Promise<{
37
+ export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch: fetchFn, endpoint, schemaHeaders, operationHeaders, queryParams, selectQueryOrMutationField, logger, jsonApi, HATEOAS, }: GetJSONSchemaOptionsFromOpenAPIOptionsParams): Promise<{
38
38
  operations: JSONSchemaOperationConfig[];
39
39
  endpoint: string;
40
40
  cwd: string;