code-foundry 1.51.1 → 1.52.0
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.
|
@@ -35,6 +35,11 @@ on:
|
|
|
35
35
|
required: false
|
|
36
36
|
type: string
|
|
37
37
|
default: ''
|
|
38
|
+
build-env:
|
|
39
|
+
description: 'Optional JSON object of non-secret environment variables for the build command only.'
|
|
40
|
+
required: false
|
|
41
|
+
type: string
|
|
42
|
+
default: '{}'
|
|
38
43
|
bun-version:
|
|
39
44
|
required: false
|
|
40
45
|
type: string
|
|
@@ -267,10 +272,44 @@ jobs:
|
|
|
267
272
|
working-directory: ${{ inputs.working-directory }}
|
|
268
273
|
env:
|
|
269
274
|
BUILD_SCRIPT: ${{ inputs.build-script }}
|
|
275
|
+
BUILD_ENV_JSON: ${{ inputs.build-env }}
|
|
270
276
|
TURBO_API: ${{ vars.TURBO_API }}
|
|
271
277
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
272
278
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
273
|
-
run:
|
|
279
|
+
run: |
|
|
280
|
+
node --input-type=module <<'NODE'
|
|
281
|
+
import { spawnSync } from 'node:child_process'
|
|
282
|
+
const input = process.env.BUILD_ENV_JSON
|
|
283
|
+
let buildEnv
|
|
284
|
+
try {
|
|
285
|
+
buildEnv = JSON.parse(input)
|
|
286
|
+
} catch {
|
|
287
|
+
throw new Error('build-env must be a JSON object of string values')
|
|
288
|
+
}
|
|
289
|
+
if (!buildEnv || typeof buildEnv !== 'object' || Array.isArray(buildEnv)) {
|
|
290
|
+
throw new Error('build-env must be a JSON object of string values')
|
|
291
|
+
}
|
|
292
|
+
const allowedNames = new Set([
|
|
293
|
+
'ADEA_PREVIEW_HYPERDRIVE_ID',
|
|
294
|
+
'ADEA_PREVIEW_SECRETS_STORE_ID',
|
|
295
|
+
'ADEA_PREVIEW_DATABASE_URL_SECRET',
|
|
296
|
+
'ADEA_PREVIEW_AUTH_BASE_URL_SECRET',
|
|
297
|
+
'ADEA_PREVIEW_AUTH_COOKIE_SECRET_NAME',
|
|
298
|
+
'ADEA_PREVIEW_AUTH_TRUSTED_ORIGINS_SECRET',
|
|
299
|
+
])
|
|
300
|
+
for (const [name, value] of Object.entries(buildEnv)) {
|
|
301
|
+
if (!allowedNames.has(name)) {
|
|
302
|
+
throw new Error(`Invalid build-env variable name: ${name}`)
|
|
303
|
+
}
|
|
304
|
+
if (typeof value !== 'string') throw new Error(`build-env value for ${name} must be a string`)
|
|
305
|
+
}
|
|
306
|
+
const result = spawnSync('bun', ['run', process.env.BUILD_SCRIPT], {
|
|
307
|
+
stdio: 'inherit',
|
|
308
|
+
env: { ...process.env, ...buildEnv },
|
|
309
|
+
})
|
|
310
|
+
if (result.error) throw result.error
|
|
311
|
+
process.exit(result.status ?? 1)
|
|
312
|
+
NODE
|
|
274
313
|
- name: Deploy to Cloudflare
|
|
275
314
|
id: deploy
|
|
276
315
|
if: steps.check.outputs.should_deploy != 'false'
|
|
@@ -21,13 +21,20 @@ jobs:
|
|
|
21
21
|
runs-on: ubuntu-slim
|
|
22
22
|
timeout-minutes: 5
|
|
23
23
|
steps:
|
|
24
|
-
- name: Cancel queued and running checks for this
|
|
24
|
+
- name: Cancel queued and running checks for this pull request
|
|
25
25
|
env:
|
|
26
26
|
GH_TOKEN: ${{ github.token }}
|
|
27
27
|
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
|
|
28
|
+
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
28
29
|
CURRENT_RUN_ID: ${{ github.run_id }}
|
|
29
30
|
run: |
|
|
30
31
|
set -euo pipefail
|
|
32
|
+
if ! [[ "$PR_NUMBER" =~ ^[0-9]+$ ]]; then
|
|
33
|
+
echo '::error title=Draft control cannot verify pull request::The event did not include a valid pull request number.'
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
# Only runs associated with this PR may be cancelled. Branch names can
|
|
37
|
+
# be shared by multiple PRs, including heads from different forks.
|
|
31
38
|
for status in queued in_progress; do
|
|
32
39
|
gh api "repos/$GITHUB_REPOSITORY/actions/runs" \
|
|
33
40
|
--method GET \
|
|
@@ -35,7 +42,7 @@ jobs:
|
|
|
35
42
|
-f event=pull_request \
|
|
36
43
|
-f status="$status" \
|
|
37
44
|
--paginate \
|
|
38
|
-
--jq
|
|
45
|
+
--jq ".workflow_runs[]? | select(any(.pull_requests[]?; .number == $PR_NUMBER)) | .id" |
|
|
39
46
|
while read -r run_id; do
|
|
40
47
|
if [ -n "$run_id" ] && [ "$run_id" -lt "$CURRENT_RUN_ID" ]; then
|
|
41
48
|
gh api \
|
|
@@ -45,4 +52,4 @@ jobs:
|
|
|
45
52
|
fi
|
|
46
53
|
done
|
|
47
54
|
done
|
|
48
|
-
echo "CI is halted while pull request #$
|
|
55
|
+
echo "CI is halted while pull request #$PR_NUMBER remains draft."
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.52.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.51.1...v1.52.0) (2026-10-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* scope Cloudflare build variables to build ([#802](https://github.com/0xPlayerOne/code-foundry/issues/802)) ([1f9a89f](https://github.com/0xPlayerOne/code-foundry/commit/1f9a89fa19a868732805a065fe90cc7609928a1e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* scope draft cancellation to its pull request ([#799](https://github.com/0xPlayerOne/code-foundry/issues/799)) ([ba42e81](https://github.com/0xPlayerOne/code-foundry/commit/ba42e811729e6ab8a82e2941abfdaab4f8544eed))
|
|
14
|
+
|
|
3
15
|
## [1.51.1](https://github.com/0xPlayerOne/code-foundry/compare/v1.51.0...v1.51.1) (2026-10-29)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -133,16 +145,9 @@
|
|
|
133
145
|
|
|
134
146
|
* validation-issue-read-v1471 ([#759](https://github.com/0xPlayerOne/code-foundry/issues/759)) ([7119b3e](https://github.com/0xPlayerOne/code-foundry/commit/7119b3e2baebfbfdd47d32428cbf5df2f2079afa))
|
|
135
147
|
|
|
136
|
-
## [1.47.4](https://github.com/0xPlayerOne/code-foundry/compare/v1.47.3...v1.47.4) (2026-10-15)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
### Documentation
|
|
140
|
-
|
|
141
|
-
* fix generated agent contribution and validation references ([#760](https://github.com/0xPlayerOne/code-foundry/issues/760)) ([c3564c9](https://github.com/0xPlayerOne/code-foundry/commit/c3564c92cb168449317afe2e40359144bf7a0c71))
|
|
142
|
-
|
|
143
148
|
<!-- code-foundry: packaged changelog -->
|
|
144
149
|
|
|
145
150
|
---
|
|
146
151
|
|
|
147
|
-
This packaged changelog lists the 20 most recent releases;
|
|
152
|
+
This packaged changelog lists the 20 most recent releases; 266 older releases are omitted to keep the package small.
|
|
148
153
|
See the [full changelog](https://github.com/0xPlayerOne/code-foundry/blob/main/CHANGELOG.md) for the complete history.
|
package/docs/PERFORMANCE.md
CHANGED
|
@@ -34,8 +34,10 @@ and 118 files.
|
|
|
34
34
|
On v1.50.1 base `f671dd8`, the measured artifact was 315,853 packed bytes,
|
|
35
35
|
1,200,759 unpacked bytes, and 120 files. Release caller publication overrides
|
|
36
36
|
measure 316,295 packed bytes, 1,222,905 unpacked bytes, and 120 files: an
|
|
37
|
-
increase of 442 packed bytes and 22,146 unpacked bytes. The packed limit
|
|
38
|
-
|
|
37
|
+
increase of 442 packed bytes and 22,146 unpacked bytes. The packed limit was
|
|
38
|
+
raised to 317,000 bytes for the optional build environment input in the
|
|
39
|
+
Cloudflare reusable workflow, which ships in the npm package. This leaves 235
|
|
40
|
+
bytes above the measured 316,765-byte artifact. The unpacked and file-count
|
|
39
41
|
limits remain 1,225,000 bytes and 120 files.
|
|
40
42
|
|
|
41
43
|
The published package ships a changelog trimmed to the 20 most recent releases
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-foundry",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.0",
|
|
4
4
|
"description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
|
|
5
5
|
"homepage": "https://github.com/0xPlayerOne/code-foundry#readme",
|
|
6
6
|
"bugs": {
|