@embrace-ai/infra-api-schema-sync 1.0.2 → 1.1.1
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 +20 -13
- package/dist/src/generate-schema-url.d.ts.map +1 -1
- package/dist/src/generate-schema-url.js +2 -3
- package/dist/src/generate-schema-url.js.map +1 -1
- package/package.json +1 -1
- package/src/generate-schema-url.js +10 -3
- package/templates/workflows/emit-schema-update.yml +1 -1
- package/templates/workflows/graphql-schema-validate.yml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [1.
|
|
4
|
-
|
|
3
|
+
## [1.1.1](https://github.com/Embrace-AI/infra-api-schema-sync/compare/v1.0.1...v1.1.1) (2025-10-07)
|
|
5
4
|
|
|
6
5
|
### Bug Fixes
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
- **generate-schema-url:** fix stdout pollution in generate-schema-url command
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
- Changed logging to use GitHub Step Summary instead of stdout
|
|
10
|
+
- Stdout now contains only the URL for safe command substitution
|
|
11
|
+
- Fixes "Invalid format" error in GitHub Actions GITHUB_OUTPUT
|
|
12
|
+
- Logs appear in Actions Summary tab when GITHUB_STEP_SUMMARY is available
|
|
13
|
+
- Falls back to stderr notice when not in GitHub Actions
|
|
11
14
|
|
|
15
|
+
- **workflows:** fix validation report format in graphql-schema-validate.yml
|
|
16
|
+
- Changed `jq '.issues | length'` to `jq 'length'` to match actual report format
|
|
17
|
+
- Validation report is an array, not an object with issues property
|
|
18
|
+
|
|
19
|
+
## [1.0.1](https://github.com/Embrace-AI/infra-api-schema-sync/compare/v1.0.0...v1.0.1) (2025-06-19)
|
|
12
20
|
|
|
13
21
|
### Bug Fixes
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
- **workflows:** use pnpm exec in workflows, use correct build path in package.json for cli tool ([#8](https://github.com/Embrace-AI/infra-api-schema-sync/issues/8)) ([5b8daf3](https://github.com/Embrace-AI/infra-api-schema-sync/commit/5b8daf305dc8c868cf1766c1b4b4b5d86503b282))
|
|
16
24
|
|
|
17
25
|
## 1.0.0 (2025-06-19)
|
|
18
26
|
|
|
19
|
-
|
|
20
27
|
### Bug Fixes
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
- **commands:** remove unnecessary cli commands, update workflows, move bash to dispath-update ([14aa3a8](https://github.com/Embrace-AI/infra-api-schema-sync/commit/14aa3a82e142eb9c135bf6d409ad36d9cad5e20f))
|
|
30
|
+
- **lockfile:** update lockfile ([706bf37](https://github.com/Embrace-AI/infra-api-schema-sync/commit/706bf372d80d49692db9159da6ff25593869064a))
|
|
31
|
+
- **logging:** add globals for console logging in workflows ([fe00324](https://github.com/Embrace-AI/infra-api-schema-sync/commit/fe003249a5859b7769fce977556b71e610cb42d9))
|
|
32
|
+
- **workflow:** move dispatch logic to js, and update consumer workflow ([b0ff4c1](https://github.com/Embrace-AI/infra-api-schema-sync/commit/b0ff4c14096d090a50a93795dc45f69e5f2a6d8e))
|
|
33
|
+
- **workflows:** add issue_count and remove token in env ([662e8ad](https://github.com/Embrace-AI/infra-api-schema-sync/commit/662e8adae80cfc6a4f1ddfa389a28a94a7c04ac7))
|
|
34
|
+
- **workflows:** only emit update on \**/*schema.ts change, only show summary when issues are found ([2c2a589](https://github.com/Embrace-AI/infra-api-schema-sync/commit/2c2a589eff7192c833d008ac64e6bad6f5186acb))
|
|
35
|
+
- **workflows:** restore workflow files ([63eb5ad](https://github.com/Embrace-AI/infra-api-schema-sync/commit/63eb5ad7e1a4f2e004f6fad3524d3d30bb0278aa))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-schema-url.d.ts","sourceRoot":"","sources":["../../src/generate-schema-url.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-schema-url.d.ts","sourceRoot":"","sources":["../../src/generate-schema-url.js"],"names":[],"mappings":"AAaO,yDALJ;IAAwB,KAAK,EAArB,MAAM;IACU,OAAO,EAAvB,MAAM;IACU,IAAI,EAApB,MAAM;CACd,GAAU,MAAM,CAwBlB;AAkGM,qDAiDN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { execSync } from "child_process";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import path from "path";
|
|
3
|
+
import fs from "fs";
|
|
4
4
|
export const buildSchemaUrl = ({ stage = "dev", service, repo }) => {
|
|
5
5
|
if (!repo) {
|
|
6
6
|
repo = detectRepositoryName();
|
|
@@ -90,7 +90,6 @@ export const generateSchemaUrl = (opts) => {
|
|
|
90
90
|
fs.appendFileSync(summaryPath, md);
|
|
91
91
|
}
|
|
92
92
|
catch (e) {
|
|
93
|
-
console.warn("Failed to write summary:", e.message);
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-schema-url.js","sourceRoot":"","sources":["../../src/generate-schema-url.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"generate-schema-url.js","sourceRoot":"","sources":["../../src/generate-schema-url.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAWpB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IAEjE,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,oBAAoB,EAAE,CAAC;IAChC,CAAC;IAGD,IAAI,CAAC,OAAO,EAA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GAAG;gBACT,2BAA2B;gBAC3B,EAAE;gBACF,iBAAiB,YAAY,EAAE;gBAC/B,cAAc,eAAe,EAAE;gBAC/B,YAAY,KAAK,EAAE;gBACnB,UAAU,GAAG,EAAE;gBACf,EAAE;aACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACb,IAAI,CAAC;gBACH,EAAE,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;YACrC,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;YAEb,CAAC;QACH,CAAC;aAAM,CAAC;YAEN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAC3D,CAAC;QAGD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE1B,OAAO,GAAG,CAAC;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACnE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { execSync } from "child_process";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import path from "path";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Generate a dynamic GraphQL schema URL based on repository and deployment stage
|
|
@@ -134,10 +135,16 @@ export const generateSchemaUrl = (opts) => {
|
|
|
134
135
|
try {
|
|
135
136
|
const { stage, service, repo } = opts;
|
|
136
137
|
|
|
138
|
+
|
|
139
|
+
|
|
137
140
|
// Detect values if not provided
|
|
138
141
|
const detectedRepo = repo || detectRepositoryName();
|
|
139
142
|
const detectedService = service || extractServiceName(detectedRepo);
|
|
140
143
|
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
141
148
|
const url = buildSchemaUrl({
|
|
142
149
|
stage,
|
|
143
150
|
service: detectedService,
|
|
@@ -158,7 +165,7 @@ export const generateSchemaUrl = (opts) => {
|
|
|
158
165
|
try {
|
|
159
166
|
fs.appendFileSync(summaryPath, md);
|
|
160
167
|
} catch (e) {
|
|
161
|
-
|
|
168
|
+
// Ignore summary write failures
|
|
162
169
|
}
|
|
163
170
|
} else {
|
|
164
171
|
// Optional: Create a GitHub Actions notice without using console.*
|
|
@@ -49,7 +49,7 @@ jobs:
|
|
|
49
49
|
|
|
50
50
|
- name: Install GraphQL schema sync tool
|
|
51
51
|
# Update below to use the version you want
|
|
52
|
-
run: pnpm install -w @embrace-ai/infra-api-schema-sync@
|
|
52
|
+
run: pnpm install -w @embrace-ai/infra-api-schema-sync@1.1.1
|
|
53
53
|
|
|
54
54
|
# Generate dynamic schema URL based on repository and stage
|
|
55
55
|
- name: Generate schema URL
|
|
@@ -29,7 +29,7 @@ jobs:
|
|
|
29
29
|
|
|
30
30
|
- name: Install GraphQL schema sync tool
|
|
31
31
|
# Update line below to use the version you want
|
|
32
|
-
run: pnpm install -w @embrace-ai/infra-api-schema-sync@
|
|
32
|
+
run: pnpm install -w @embrace-ai/infra-api-schema-sync@1.1.1
|
|
33
33
|
|
|
34
34
|
- name: Configure aws credentials
|
|
35
35
|
uses: aws-actions/configure-aws-credentials@v4.2.1
|