@embrace-ai/infra-api-schema-sync 1.0.4 → 1.0.6

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
  # Changelog
2
2
 
3
+ ## [1.0.6](https://github.com/Embrace-AI/infra-api-schema-sync/compare/v1.0.5...v1.0.6) (2025-10-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **fetch:** remove explicit region passing ([#22](https://github.com/Embrace-AI/infra-api-schema-sync/issues/22)) ([6103289](https://github.com/Embrace-AI/infra-api-schema-sync/commit/61032896230c2edd746eda57a92d6a8aa9ee8a6f))
9
+
10
+ ## [1.0.5](https://github.com/Embrace-AI/infra-api-schema-sync/compare/v1.0.4...v1.0.5) (2025-10-14)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **fetch:** use signed fetch to get graphql schema ([#19](https://github.com/Embrace-AI/infra-api-schema-sync/issues/19)) ([ec1d24b](https://github.com/Embrace-AI/infra-api-schema-sync/commit/ec1d24b9f672342bbf07911fcd3b5375de177eb6))
16
+
3
17
  ## [1.0.4](https://github.com/Embrace-AI/infra-api-schema-sync/compare/v1.0.3...v1.0.4) (2025-10-14)
4
18
 
5
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-schema.d.ts","sourceRoot":"","sources":["../../src/fetch-schema.js"],"names":[],"mappings":"AAIO;;;kBA+BN"}
1
+ {"version":3,"file":"fetch-schema.d.ts","sourceRoot":"","sources":["../../src/fetch-schema.js"],"names":[],"mappings":"AAKO;;;kBAqCN"}
@@ -1,10 +1,14 @@
1
+ import { createSignedFetch } from "@scaldwell77/aws-signed-fetch";
1
2
  import fs from "fs";
2
3
  import fse from "fs-extra";
3
4
  import path from "path";
4
5
  export const fetchSchema = async ({ url, output }) => {
5
6
  try {
6
7
  console.log(`🔄 Fetching GraphQL schema from ${url}...`);
7
- const response = await fetch(url, {
8
+ const signedFetch = createSignedFetch({
9
+ service: "execute-api",
10
+ });
11
+ const response = await signedFetch(url, {
8
12
  method: "GET",
9
13
  headers: {
10
14
  Accept: "application/graphql, text/plain",
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-schema.js","sourceRoot":"","sources":["../../src/fetch-schema.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IACnD,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,mCAAmC,GAAG,KAAK,CAAC,CAAC;QAGzD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,MAAM,EAAE,iCAAiC;aAC1C;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;QACrE,CAAC;QAGD,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAGxC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACvC,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAG7B,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAE5C,OAAO,CAAC,GAAG,CAAC,kCAAkC,MAAM,EAAE,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5D,OAAO,CAAC,IAA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C;QACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAGF,eAAe,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embrace-ai/infra-api-schema-sync",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "bin": {
5
5
  "api-tool": "./dist/src/index.js"
6
6
  },
@@ -25,6 +25,7 @@
25
25
  "@graphql-codegen/cli": "^5.0.7",
26
26
  "@graphql-codegen/typescript": "^4.1.6",
27
27
  "@graphql-inspector/cli": "^5.0.8",
28
+ "@scaldwell77/aws-signed-fetch": "^4.0.0",
28
29
  "commander": "^14.0.0",
29
30
  "fs-extra": "^11.3.0",
30
31
  "globals": "^16.2.0",
@@ -1,3 +1,4 @@
1
+ import { createSignedFetch } from "@scaldwell77/aws-signed-fetch";
1
2
  import fs from "fs";
2
3
  import fse from "fs-extra";
3
4
  import path from "path";
@@ -6,8 +7,14 @@ export const fetchSchema = async ({ url, output }) => {
6
7
  try {
7
8
  console.log(`🔄 Fetching GraphQL schema from ${url}...`);
8
9
 
10
+ // Create AWS signed fetch for API Gateway authentication
11
+ // Region is automatically picked up from AWS_REGION environment variable
12
+ const signedFetch = createSignedFetch({
13
+ service: "execute-api",
14
+ });
15
+
9
16
  // Fetch schema SDL directly via GET
10
- const response = await fetch(url, {
17
+ const response = await signedFetch(url, {
11
18
  method: "GET",
12
19
  headers: {
13
20
  Accept: "application/graphql, text/plain",