From b770e1b43810b3628d38fadfd6426e99d7310a72 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Tue, 9 Sep 2025 11:16:22 -0600 Subject: [PATCH 1/4] chore(CI): Update to new CI matrix --- .github/workflows/cron.yml | 29 +++++--- .github/workflows/pr.yml | 54 ++++++++++++--- .github/workflows/prerelease.yml | 41 ----------- .github/workflows/release.yml | 69 +++++++++++++++++-- .github/workflows/tests.yml | 44 ------------ .gitignore | 1 + box.json | 2 +- server-adobe@2021.json | 23 +++++++ server-adobe@2023.json | 22 ++++++ server-adobe@2025.json | 23 +++++++ server-adobe@be.json | 22 ++++++ server-boxlang-cfml@1.json | 25 +++++++ server-boxlang@1.json | 25 +++++++ server-boxlang@be.json | 11 ++- server-lucee@5.json | 16 +++++ server-lucee@6.json | 16 +++++ server-lucee@be.json | 16 +++++ server.json | 10 --- .../integration/IncompleteRequestsSpec.cfc | 3 + 19 files changed, 330 insertions(+), 122 deletions(-) delete mode 100644 .github/workflows/prerelease.yml delete mode 100644 .github/workflows/tests.yml create mode 100644 server-adobe@2021.json create mode 100644 server-adobe@2023.json create mode 100644 server-adobe@2025.json create mode 100644 server-adobe@be.json create mode 100644 server-boxlang-cfml@1.json create mode 100644 server-boxlang@1.json create mode 100644 server-lucee@5.json create mode 100644 server-lucee@6.json create mode 100644 server-lucee@be.json delete mode 100644 server.json diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 0635ec7..f8e1b15 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -11,28 +11,39 @@ jobs: strategy: fail-fast: false matrix: - cfengine: ["lucee@5", "lucee@be", "adobe@2018", "adobe@2021", "adobe@be"] - coldbox: ["coldbox@6", "coldbox@7", "coldbox@be"] - javaVersion: ["openjdk8", "openjdk11"] + cfengine: ["lucee@5", "lucee@6", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang@1", "boxlang-cfml@1"] + experimental: [ false ] + include: + - cfengine: "lucee@be" + experimental: true + - cfengine: "adobe@be" + experimental: true + - cfengine: "boxlang@be" + experimental: true steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.2.0 - name: Setup Java JDK - uses: actions/setup-java@v1.4.3 + uses: actions/setup-java@v3.9.0 with: - java-version: 11 + distribution: 'zulu' + java-version: 21 - name: Set Up CommandBox - uses: elpete/setup-commandbox@v1.0.0 + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + install: commandbox-boxlang,commandbox-cfconfig - name: Install dependencies run: | box install - box install ${{ matrix.coldbox }} --noSave - name: Start server - run: box server start cfengine=${{ matrix.cfengine }} javaVersion=${{ matrix.javaVersion }} --noSaveSettings + run: | + box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug + curl http://127.0.0.1:8500 - name: Run TestBox Tests + continue-on-error: ${{ matrix.experimental }} run: box testbox run \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 1a54a57..f17f428 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,26 +13,64 @@ on: - development jobs: - ############################################# - # Tests First baby! We fail, no build :( - ############################################# tests: - uses: ./.github/workflows/tests.yml + runs-on: ubuntu-latest + name: Tests + strategy: + fail-fast: false + matrix: + cfengine: ["lucee@5", "lucee@6", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang@1", "boxlang-cfml@1"] + experimental: [ false ] + include: + - cfengine: "lucee@be" + experimental: true + - cfengine: "adobe@be" + experimental: true + - cfengine: "boxlang@be" + experimental: true + steps: + - name: Checkout Repository + uses: actions/checkout@v3.2.0 + + - name: Setup Java JDK + uses: actions/setup-java@v3.9.0 + with: + distribution: 'zulu' + java-version: 21 + + - name: Setup CommandBox CLI + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + install: commandbox-boxlang,commandbox-cfconfig + + - name: Install dependencies + run: | + box install + + - name: Start server + run: | + box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug + curl http://127.0.0.1:8500 + + - name: Run TestBox Tests + continue-on-error: ${{ matrix.experimental }} + run: box testbox run format: runs-on: ubuntu-latest name: Format steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.2.0 - name: Setup Java JDK - uses: actions/setup-java@v1.4.3 + uses: actions/setup-java@v3.9.0 with: + distribution: 'zulu' java-version: 11 - - name: Set Up CommandBox - uses: elpete/setup-commandbox@v1.0.0 + - name: Setup CommandBox CLI + uses: Ortus-Solutions/setup-commandbox@v2.0.1 - name: Install CFFormat run: box install commandbox-cfformat diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml deleted file mode 100644 index a2d0d95..0000000 --- a/.github/workflows/prerelease.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Prerelease - -on: - push: - branches: - - development - -jobs: - tests: - uses: ./.github/workflows/tests.yml - # release: - # name: Semantic Release - # if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')" - # needs: tests - # runs-on: ubuntu-latest - # env: - # GA_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - # steps: - # - name: Checkout Repository - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - - # - name: Setup Java JDK - # uses: actions/setup-java@v1.4.3 - # with: - # java-version: 11 - - # - name: Set Up CommandBox - # uses: elpete/setup-commandbox@v1.0.0 - - # - name: Install and Configure Semantic Release - # run: | - # box install commandbox-semantic-release - # box config set endpoints.forgebox.APIToken=${{ secrets.FORGEBOX_TOKEN }} - # box config set modules.commandbox-semantic-release.plugins='{ "VerifyConditions": "GitHubActionsConditionsVerifier@commandbox-semantic-release", "FetchLastRelease": "ForgeBoxReleaseFetcher@commandbox-semantic-release", "RetrieveCommits": "JGitCommitsRetriever@commandbox-semantic-release", "ParseCommit": "ConventionalChangelogParser@commandbox-semantic-release", "FilterCommits": "DefaultCommitFilterer@commandbox-semantic-release", "AnalyzeCommits": "DefaultCommitAnalyzer@commandbox-semantic-release", "VerifyRelease": "NullReleaseVerifier@commandbox-semantic-release", "GenerateNotes": "GitHubMarkdownNotesGenerator@commandbox-semantic-release", "UpdateChangelog": "FileAppendChangelogUpdater@commandbox-semantic-release", "CommitArtifacts": "NullArtifactsCommitter@commandbox-semantic-release", "PublishRelease": "ForgeBoxReleasePublisher@commandbox-semantic-release", "PublicizeRelease": "GitHubReleasePublicizer@commandbox-semantic-release" }' - - # - name: Run Semantic Release - # env: - # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: box semantic-release --prerelease \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b6f858..f633f59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,41 @@ on: jobs: tests: - uses: ./.github/workflows/tests.yml + name: Tests + if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + cfengine: ["lucee@5", "lucee@6", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang@1", "boxlang-cfml@1"] + experimental: [ false ] + steps: + - name: Checkout Repository + uses: actions/checkout@v3.2.0 + + - name: Setup Java JDK + uses: actions/setup-java@v3.9.0 + with: + distribution: 'zulu' + java-version: 21 + + - name: Setup CommandBox CLI + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + install: commandbox-boxlang,commandbox-cfconfig + + - name: Install dependencies + run: | + box install + + - name: Start server + run: | + box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug + curl http://127.0.0.1:8500 + + - name: Run TestBox Tests + continue-on-error: ${{ matrix.experimental }} + run: box testbox run release: name: Semantic Release @@ -19,26 +53,47 @@ jobs: GA_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.2.0 with: fetch-depth: 0 - name: Setup Java JDK - uses: actions/setup-java@v1.4.3 + uses: actions/setup-java@v3.9.0 with: - java-version: 11 + distribution: 'zulu' + java-version: 21 - - name: Set Up CommandBox - uses: elpete/setup-commandbox@v1.0.0 + - name: Setup CommandBox CLI + uses: Ortus-Solutions/setup-commandbox@v2.0.1 - name: Install and Configure Semantic Release run: | box install commandbox-semantic-release@^3.0.0 box config set endpoints.forgebox.APIToken=${{ secrets.FORGEBOX_TOKEN }} box config set modules.commandbox-semantic-release.targetBranch=main - box config set modules.commandbox-semantic-release.plugins='{ "VerifyConditions": "GitHubActionsConditionsVerifier@commandbox-semantic-release", "FetchLastRelease": "ForgeBoxReleaseFetcher@commandbox-semantic-release", "RetrieveCommits": "JGitCommitsRetriever@commandbox-semantic-release", "ParseCommit": "ConventionalChangelogParser@commandbox-semantic-release", "FilterCommits": "DefaultCommitFilterer@commandbox-semantic-release", "AnalyzeCommits": "DefaultCommitAnalyzer@commandbox-semantic-release", "VerifyRelease": "NullReleaseVerifier@commandbox-semantic-release", "GenerateNotes": "GitHubMarkdownNotesGenerator@commandbox-semantic-release", "UpdateChangelog": "FileAppendChangelogUpdater@commandbox-semantic-release", "CommitArtifacts": "NullArtifactsCommitter@commandbox-semantic-release", "PublishRelease": "ForgeBoxReleasePublisher@commandbox-semantic-release", "PublicizeRelease": "GitHubReleasePublicizer@commandbox-semantic-release" }' + box config set modules.commandbox-semantic-release.plugins='{ "VerifyConditions": "GitHubActionsConditionsVerifier@commandbox-semantic-release", "FetchLastRelease": "ForgeBoxReleaseFetcher@commandbox-semantic-release", "RetrieveCommits": "JGitCommitsRetriever@commandbox-semantic-release", "ParseCommit": "ConventionalChangelogParser@commandbox-semantic-release", "FilterCommits": "DefaultCommitFilterer@commandbox-semantic-release", "AnalyzeCommits": "DefaultCommitAnalyzer@commandbox-semantic-release", "VerifyRelease": "NullReleaseVerifier@commandbox-semantic-release", "GenerateNotes": "GitHubMarkdownNotesGenerator@commandbox-semantic-release", "UpdateChangelog": "FileAppendChangelogUpdater@commandbox-semantic-release", "CommitArtifacts": "GitHubArtifactsCommitter@commandbox-semantic-release", "PublishRelease": "ForgeBoxReleasePublisher@commandbox-semantic-release", "PublicizeRelease": "GitHubReleasePublicizer@commandbox-semantic-release" }' - name: Run Semantic Release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: box semantic-release + + - name: Generate API Docs + run: | + box install commandbox-docbox + box run-script generateAPIDocs + + - name: Get Current Version + id: current_version + run: echo "version=`cat box.json | jq '.version' -r`" >> $GITHUB_OUTPUT + + - name: Upload API Docs to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read + env: + AWS_S3_BUCKET: "apidocs.ortussolutions.com" + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} + SOURCE_DIR: ".tmp/apidocs" + DEST_DIR: "${{ github.repository }}/${{ steps.current_version.outputs.version }}" \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 5bafa15..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Test Suites - -# We are a reusable Workflow only -on: - workflow_call: - -jobs: - tests: - runs-on: ubuntu-latest - name: Tests - strategy: - fail-fast: false - matrix: - cfengine: ["lucee@5", "adobe@2018", "adobe@2021", "adobe@2023", "boxlang@be"] - coldbox: ["coldbox@6", "coldbox@7"] - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Setup Java JDK - uses: actions/setup-java@v1.4.3 - with: - java-version: 11 - - - name: Set Up CommandBox - uses: elpete/setup-commandbox@v1.0.0 - - - name: Install dependencies - run: | - box install - box install ${{ matrix.coldbox }} --noSave - - - name: Start server - run: | - if [[ "${{ matrix.cfengine }}" == *"boxlang"* ]] ; then - box server start cfengine=${{ matrix.cfengine }} javaVersion=openjdk21 --noSaveSettings - box run-script bx-modules:install - box server restart - else - box server start cfengine=${{ matrix.cfengine }} --noSaveSettings - fi - - - name: Run TestBox Tests - run: box testbox run \ No newline at end of file diff --git a/.gitignore b/.gitignore index e2f7ae1..aee841e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /tests/resources/app/coldbox /node_modules /modules +.engine jmimemagic.log .vscode \ No newline at end of file diff --git a/box.json b/box.json index a9d59c0..2d3b109 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"hyper", - "version":"7.5.2", + "version":"8.0.0", "author":"Eric Peterson ", "location":"forgeboxStorage", "homepage":"https://github.com/coldbox-modules/hyper", diff --git a/server-adobe@2021.json b/server-adobe@2021.json new file mode 100644 index 0000000..87ecf21 --- /dev/null +++ b/server-adobe@2021.json @@ -0,0 +1,23 @@ +{ + "name":"hyper-adobe@2021", + "app":{ + "serverHomeDirectory":".engine/adobe2021", + "cfengine":"adobe@2021" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "jvm":{ + "heapSize":"1024", + "javaVersion":"openjdk11_jre" + }, + "openBrowser":"false", + "scripts":{ + "onServerInstall":"cfpm install zip,debugger" + } +} diff --git a/server-adobe@2023.json b/server-adobe@2023.json new file mode 100644 index 0000000..a446bdf --- /dev/null +++ b/server-adobe@2023.json @@ -0,0 +1,22 @@ +{ + "name":"hyper-adobe@2023", + "app":{ + "serverHomeDirectory":".engine/adobe2023", + "cfengine":"adobe@2023" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "jvm":{ + "heapSize":"1024" + }, + "openBrowser":"false", + "scripts":{ + "onServerInstall":"cfpm install zip,debugger" + } +} diff --git a/server-adobe@2025.json b/server-adobe@2025.json new file mode 100644 index 0000000..ebeea78 --- /dev/null +++ b/server-adobe@2025.json @@ -0,0 +1,23 @@ +{ + "name":"hyper-adobe@2025", + "app":{ + "serverHomeDirectory":".engine/adobe2025", + "cfengine":"adobe@2025" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "jvm":{ + "heapSize":"1024", + "javaVersion":"openjdk21_jre" + }, + "openBrowser":"false", + "scripts":{ + "onServerInstall":"cfpm install zip,debugger" + } +} diff --git a/server-adobe@be.json b/server-adobe@be.json new file mode 100644 index 0000000..326edfa --- /dev/null +++ b/server-adobe@be.json @@ -0,0 +1,22 @@ +{ + "name":"hyper-adobe@be", + "app":{ + "serverHomeDirectory":".engine/adobeBE", + "cfengine":"adobe@be" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "jvm":{ + "heapSize":"1024" + }, + "openBrowser":"false", + "scripts" : { + "onServerInstall":"cfpm install zip,debugger" + } +} diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json new file mode 100644 index 0000000..0113c1a --- /dev/null +++ b/server-boxlang-cfml@1.json @@ -0,0 +1,25 @@ +{ + "name":"hyper-boxlang-cfml@1", + "app":{ + "serverHomeDirectory":".engine/boxlangCFML", + "cfengine":"boxlang@^1.0.0" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites": { + "enable": true + } + }, + "JVM": { + "heapSize": "1024", + "javaVersion": "openjdk21_jre", + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" + }, + "openBrowser": false, + "env": {}, + "scripts": { + "onServerInitialInstall": "install bx-esapi,bx-compat-cfml" + } +} \ No newline at end of file diff --git a/server-boxlang@1.json b/server-boxlang@1.json new file mode 100644 index 0000000..d28e80a --- /dev/null +++ b/server-boxlang@1.json @@ -0,0 +1,25 @@ +{ + "name":"hyper-boxlang@1", + "app":{ + "serverHomeDirectory":".engine/boxlang", + "cfengine":"boxlang@^1.0.0" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites": { + "enable": true + } + }, + "JVM": { + "heapSize": "1024", + "javaVersion": "openjdk21_jre", + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" + }, + "openBrowser": false, + "env": {}, + "scripts": { + "onServerInitialInstall": "install bx-esapi" + } +} \ No newline at end of file diff --git a/server-boxlang@be.json b/server-boxlang@be.json index cb222aa..cc6810e 100644 --- a/server-boxlang@be.json +++ b/server-boxlang@be.json @@ -1,18 +1,25 @@ { "name":"hyper-boxlang@be", "app":{ + "serverHomeDirectory":".engine/boxlangBE", "cfengine":"boxlang@be" }, "web":{ "http":{ "port":"8500" + }, + "rewrites": { + "enable": true } }, "JVM": { "heapSize": "1024", - "javaVersion": "openjdk21_jre" + "javaVersion": "openjdk21_jre", + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" }, + "openBrowser": false, + "env": {}, "scripts": { - "onServerInitialInstall": "install bx-compat-cfml,bx-esapi" + "onServerInitialInstall": "install bx-esapi" } } \ No newline at end of file diff --git a/server-lucee@5.json b/server-lucee@5.json new file mode 100644 index 0000000..e81037d --- /dev/null +++ b/server-lucee@5.json @@ -0,0 +1,16 @@ +{ + "name":"hyper-lucee@5", + "app":{ + "serverHomeDirectory":".engine/lucee5", + "cfengine":"lucee@5" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "openBrowser":"false" +} diff --git a/server-lucee@6.json b/server-lucee@6.json new file mode 100644 index 0000000..ef8b8eb --- /dev/null +++ b/server-lucee@6.json @@ -0,0 +1,16 @@ +{ + "name":"hyper-lucee@6", + "app":{ + "serverHomeDirectory":".engine/lucee6", + "cfengine":"lucee@6" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "openBrowser":"false" +} diff --git a/server-lucee@be.json b/server-lucee@be.json new file mode 100644 index 0000000..ab913e5 --- /dev/null +++ b/server-lucee@be.json @@ -0,0 +1,16 @@ +{ + "name":"hyper-lucee@be", + "app":{ + "serverHomeDirectory":".engine/luceeBE", + "cfengine":"lucee@be" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "openBrowser":"false" +} diff --git a/server.json b/server.json deleted file mode 100644 index 7dd1bf0..0000000 --- a/server.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "app":{ - "cfengine":"adobe@2023" - }, - "web":{ - "http":{ - "port":"8500" - } - } -} \ No newline at end of file diff --git a/tests/specs/integration/IncompleteRequestsSpec.cfc b/tests/specs/integration/IncompleteRequestsSpec.cfc index 0f404c1..348bca6 100644 --- a/tests/specs/integration/IncompleteRequestsSpec.cfc +++ b/tests/specs/integration/IncompleteRequestsSpec.cfc @@ -20,6 +20,9 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" { it( "returns a 408 status code for any request that times out", function() { var res = hyper.setTimeout( 1 ).get( "https://httpbin.org/delay/5" ); + if ( res.getStatusCode() == 503 ) { + skip( "Got a 503 from the server. Skipping test." ); + } expect( res.getStatusCode() ).toBe( 408 ); expect( res.getStatusText() ).toBe( "Request Timeout" ); } ); From 3f624f5ed386ddd6e228c3d39aa2aa122f05ec1e Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Tue, 9 Sep 2025 11:44:40 -0600 Subject: [PATCH 2/4] chore(tests): Use local server for timeout test --- tests/resources/app/handlers/api.cfc | 6 ++++++ tests/specs/integration/IncompleteRequestsSpec.cfc | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/resources/app/handlers/api.cfc b/tests/resources/app/handlers/api.cfc index 2148516..f296379 100644 --- a/tests/resources/app/handlers/api.cfc +++ b/tests/resources/app/handlers/api.cfc @@ -78,4 +78,10 @@ component { ); } + function sleep( event, rc, prc ) { + param rc.delay = 0; + sleep( rc.delay * 1000 ); + return event.renderData( type = "plain", statusCode = 200, data = "Slept for #rc.delay# seconds." ); + } + } diff --git a/tests/specs/integration/IncompleteRequestsSpec.cfc b/tests/specs/integration/IncompleteRequestsSpec.cfc index 348bca6..ba7861b 100644 --- a/tests/specs/integration/IncompleteRequestsSpec.cfc +++ b/tests/specs/integration/IncompleteRequestsSpec.cfc @@ -1,5 +1,7 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" { + variables.localEndpoint = "http://#CGI[ "server_name" ]#:#CGI[ "server_port" ]#/tests/resources/app/index.cfm/api"; + function run() { describe( "incomplete requests", function() { beforeEach( function() { @@ -19,10 +21,7 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" { } ); it( "returns a 408 status code for any request that times out", function() { - var res = hyper.setTimeout( 1 ).get( "https://httpbin.org/delay/5" ); - if ( res.getStatusCode() == 503 ) { - skip( "Got a 503 from the server. Skipping test." ); - } + var res = hyper.setTimeout( 1 ).get( "#localEndpoint#/sleep/delay/5" ); expect( res.getStatusCode() ).toBe( 408 ); expect( res.getStatusText() ).toBe( "Request Timeout" ); } ); From c1b5bbd7e484af82bb17098459ff4904003dd6c1 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sat, 11 Oct 2025 07:20:11 -0600 Subject: [PATCH 3/4] chore(CI): Update for ColdBox 8, Lucee 7, and full BoxLang Prime support --- .github/workflows/cron.yml | 22 +++++++++++++++++++++- .github/workflows/pr.yml | 22 +++++++++++++++++++++- .github/workflows/release.yml | 8 +++++++- models/CfhttpHttpClient.cfc | 7 ++++--- models/HyperRequest.cfc | 8 ++++---- server-boxlang-cfml@1.json | 18 +++++++++--------- server-boxlang@1.json | 18 +++++++++--------- server-lucee@7.json | 16 ++++++++++++++++ tests/Application.cfc | 6 +++++- tests/resources/app/config/Router.cfc | 4 ---- tests/resources/app/handlers/api.cfc | 6 +++++- tests/specs/integration/AsyncSpec.cfc | 4 ---- tests/specs/integration/GetSpec.cfc | 6 +++--- tests/specs/unit/HyperResponseSpec.cfc | 6 +++--- 14 files changed, 107 insertions(+), 44 deletions(-) create mode 100644 server-lucee@7.json diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index f8e1b15..81dd566 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -11,15 +11,34 @@ jobs: strategy: fail-fast: false matrix: - cfengine: ["lucee@5", "lucee@6", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang@1", "boxlang-cfml@1"] + cfengine: ["lucee@5", "lucee@6", "lucee@7", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang-cfml@1"] + coldbox: ["^6.0.0", "^7.0.0", "^8.0.0"] experimental: [ false ] include: - cfengine: "lucee@be" + coldbox: "^6.0.0" + experimental: true + - cfengine: "lucee@be" + coldbox: "^7.0.0" + experimental: true + - cfengine: "lucee@be" + coldbox: "^8.0.0" + experimental: true + - cfengine: "adobe@be" + coldbox: "^6.0.0" + experimental: true + - cfengine: "adobe@be" + coldbox: "^7.0.0" experimental: true - cfengine: "adobe@be" + coldbox: "^8.0.0" experimental: true - cfengine: "boxlang@be" + coldbox: "^8.0.0" experimental: true + - cfengine: "boxlang@1" + coldbox: "^8.0.0" + experimental: false steps: - name: Checkout Repository uses: actions/checkout@v3.2.0 @@ -38,6 +57,7 @@ jobs: - name: Install dependencies run: | box install + box install coldbox@{{ matrix.coldbox }} --noSave - name: Start server run: | diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f17f428..951fa9b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,15 +19,34 @@ jobs: strategy: fail-fast: false matrix: - cfengine: ["lucee@5", "lucee@6", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang@1", "boxlang-cfml@1"] + cfengine: ["lucee@5", "lucee@6", "lucee@7", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang-cfml@1"] + coldbox: ["^6.0.0", "^7.0.0", "^8.0.0"] experimental: [ false ] include: - cfengine: "lucee@be" + coldbox: "^6.0.0" + experimental: true + - cfengine: "lucee@be" + coldbox: "^7.0.0" + experimental: true + - cfengine: "lucee@be" + coldbox: "^8.0.0" + experimental: true + - cfengine: "adobe@be" + coldbox: "^6.0.0" + experimental: true + - cfengine: "adobe@be" + coldbox: "^7.0.0" experimental: true - cfengine: "adobe@be" + coldbox: "^8.0.0" experimental: true - cfengine: "boxlang@be" + coldbox: "^8.0.0" experimental: true + - cfengine: "boxlang@1" + coldbox: "^8.0.0" + experimental: false steps: - name: Checkout Repository uses: actions/checkout@v3.2.0 @@ -46,6 +65,7 @@ jobs: - name: Install dependencies run: | box install + box install coldbox@{{ matrix.coldbox }} --noSave - name: Start server run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f633f59..c80742b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,8 +14,13 @@ jobs: strategy: fail-fast: false matrix: - cfengine: ["lucee@5", "lucee@6", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang@1", "boxlang-cfml@1"] + cfengine: ["lucee@5", "lucee@6", "lucee@7", "adobe@2021", "adobe@2023", "adobe@2025", "boxlang-cfml@1"] + coldbox: ["^6.0.0", "^7.0.0", "^8.0.0"] experimental: [ false ] + include: + - cfengine: "boxlang@1" + coldbox: "^8.0.0" + experimental: false steps: - name: Checkout Repository uses: actions/checkout@v3.2.0 @@ -34,6 +39,7 @@ jobs: - name: Install dependencies run: | box install + box install coldbox@{{ matrix.coldbox }} --noSave - name: Start server run: | diff --git a/models/CfhttpHttpClient.cfc b/models/CfhttpHttpClient.cfc index e3922e1..94d338b 100644 --- a/models/CfhttpHttpClient.cfc +++ b/models/CfhttpHttpClient.cfc @@ -254,9 +254,10 @@ component implements="HyperHttpClientInterface" { var queryParams = req.getQueryParams(); for ( var param in queryParams ) { cfhttpparam( - type = "url", - name = param.name, - value = param.value + type = "url", + name = param.name, + value = param.value, + encoded = true // this will be ignored by ACF, but used by Lucee and BoxLang (currently) ); } diff --git a/models/HyperRequest.cfc b/models/HyperRequest.cfc index fcd5597..dfd6a3e 100644 --- a/models/HyperRequest.cfc +++ b/models/HyperRequest.cfc @@ -216,7 +216,7 @@ component accessors="true" { // This is overwritten by the HyperBuilder if WireBox exists. variables.interceptorService = { - "processState" : function() { + "announce" : function() { } }; @@ -1096,7 +1096,7 @@ component accessors="true" { for ( var callback in variables.requestCallbacks ) { callback( this ); } - variables.interceptorService.processState( "onHyperRequest", { "request" : this } ); + variables.interceptorService.announce( "onHyperRequest", { "request" : this } ); try { var res = shouldFake() ? generateFakeRequest() : variables.httpClient.send( this ); @@ -1104,7 +1104,7 @@ component accessors="true" { for ( var callback in variables.responseCallbacks ) { callback( res ); } - variables.interceptorService.processState( + variables.interceptorService.announce( "onHyperResponse", { "response" : res, @@ -1166,7 +1166,7 @@ component accessors="true" { for ( var callback in variables.requestCallbacks ) { callback( this ); } - variables.interceptorService.processState( "onHyperRequest", { "request" : this } ); + variables.interceptorService.announce( "onHyperRequest", { "request" : this } ); return httpClient.debug( this ); } diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json index 0113c1a..42e282c 100644 --- a/server-boxlang-cfml@1.json +++ b/server-boxlang-cfml@1.json @@ -8,18 +8,18 @@ "http":{ "port":"8500" }, - "rewrites": { - "enable": true + "rewrites":{ + "enable":true } }, - "JVM": { - "heapSize": "1024", - "javaVersion": "openjdk21_jre", + "JVM":{ + "heapSize":"1024", + "javaVersion":"openjdk21_jre", "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" }, - "openBrowser": false, - "env": {}, - "scripts": { - "onServerInitialInstall": "install bx-esapi,bx-compat-cfml" + "openBrowser":false, + "env":{}, + "scripts":{ + "onServerInitialInstall":"install bx-esapi,bx-compat-cfml" } } \ No newline at end of file diff --git a/server-boxlang@1.json b/server-boxlang@1.json index d28e80a..3938370 100644 --- a/server-boxlang@1.json +++ b/server-boxlang@1.json @@ -8,18 +8,18 @@ "http":{ "port":"8500" }, - "rewrites": { - "enable": true + "rewrites":{ + "enable":true } }, - "JVM": { - "heapSize": "1024", - "javaVersion": "openjdk21_jre", + "JVM":{ + "heapSize":"1024", + "javaVersion":"openjdk21_jre", "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" }, - "openBrowser": false, - "env": {}, - "scripts": { - "onServerInitialInstall": "install bx-esapi" + "openBrowser":false, + "env":{}, + "scripts":{ + "onServerInitialInstall":"install bx-esapi" } } \ No newline at end of file diff --git a/server-lucee@7.json b/server-lucee@7.json new file mode 100644 index 0000000..6c4acf0 --- /dev/null +++ b/server-lucee@7.json @@ -0,0 +1,16 @@ +{ + "name":"hyper-lucee@7", + "app":{ + "serverHomeDirectory":".engine/lucee7", + "cfengine":"lucee@7" + }, + "web":{ + "http":{ + "port":"8500" + }, + "rewrites":{ + "enable":"true" + } + }, + "openBrowser":"false" +} diff --git a/tests/Application.cfc b/tests/Application.cfc index c587399..931f1d0 100644 --- a/tests/Application.cfc +++ b/tests/Application.cfc @@ -12,7 +12,11 @@ component { this.mappings[ "/root" ] = rootPath; this.mappings[ "/hyper" ] = rootPath; this.mappings[ "/globber" ] = rootPath & "modules/globber"; - this.mappings[ "/testingModuleRoot" ] = listDeleteAt( rootPath, listLen( rootPath, '\/' ), "\/" ); + testingModuleRootMapping = listDeleteAt( rootPath, listLen( rootPath, '\/' ), "\/" ); + if ( left( testingModuleRootMapping, 1 ) != "/" ) { + testingModuleRootMapping = "/" & testingModuleRootMapping; + } + this.mappings[ "/testingModuleRoot" ] = testingModuleRootMapping; this.mappings[ "/app" ] = testsPath & "resources/app"; this.mappings[ "/coldbox" ] = testsPath & "resources/app/coldbox"; this.mappings[ "/testbox" ] = rootPath & "/testbox"; diff --git a/tests/resources/app/config/Router.cfc b/tests/resources/app/config/Router.cfc index ca31db2..03d95a8 100644 --- a/tests/resources/app/config/Router.cfc +++ b/tests/resources/app/config/Router.cfc @@ -1,10 +1,6 @@ component { function configure() { - // Set Full Rewrites - setFullRewrites( false ); - - // Conventions based routing route( ":handler/:action?" ).end(); } diff --git a/tests/resources/app/handlers/api.cfc b/tests/resources/app/handlers/api.cfc index f296379..bc22dfb 100644 --- a/tests/resources/app/handlers/api.cfc +++ b/tests/resources/app/handlers/api.cfc @@ -81,7 +81,11 @@ component { function sleep( event, rc, prc ) { param rc.delay = 0; sleep( rc.delay * 1000 ); - return event.renderData( type = "plain", statusCode = 200, data = "Slept for #rc.delay# seconds." ); + return event.renderData( + type = "plain", + statusCode = 200, + data = "Slept for #rc.delay# seconds." + ); } } diff --git a/tests/specs/integration/AsyncSpec.cfc b/tests/specs/integration/AsyncSpec.cfc index 6d27363..0969a88 100644 --- a/tests/specs/integration/AsyncSpec.cfc +++ b/tests/specs/integration/AsyncSpec.cfc @@ -9,10 +9,6 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" { function run() { describe( "async requests", function() { it( "can send a request asynchronously", function() { - if ( isBoxLang() ) { - return skip( "Variadic parameters are not yet supported in BoxLang." ); - } - var future = hyper.setUrl( "https://jsonplaceholder.typicode.com/posts/1" ).sendAsync(); expect( future ).toBeInstanceOf( "Future", "A Future object should have been returned." ); var res = future.get(); diff --git a/tests/specs/integration/GetSpec.cfc b/tests/specs/integration/GetSpec.cfc index c371fc6..108c7bd 100644 --- a/tests/specs/integration/GetSpec.cfc +++ b/tests/specs/integration/GetSpec.cfc @@ -48,10 +48,10 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" { } ); it( "deserializes query string parameters in the url (to reserialize later)", function() { - var res = hyper + var req = hyper .setBaseUrl( "https://jsonplaceholder.typicode.com" ) - .setUrl( "/posts?param=with+spaces" ) - .get(); + .setUrl( "/posts?param=with+spaces" ); + var res = req.get(); expect( res.getRequest().getFullUrl( withQueryString = true ) ).toBeWithCase( "https://jsonplaceholder.typicode.com/posts?param=with+spaces" ); diff --git a/tests/specs/unit/HyperResponseSpec.cfc b/tests/specs/unit/HyperResponseSpec.cfc index dad5b7a..749743f 100644 --- a/tests/specs/unit/HyperResponseSpec.cfc +++ b/tests/specs/unit/HyperResponseSpec.cfc @@ -228,7 +228,7 @@ component extends="testbox.system.BaseSpec" { headers = { "Set-Cookie" : [ "foo=bar;path=/;secure;samesite=none;httponly", - "baz=qux;path=/;expires=Mon, 31 Dec 2038 23:59:59 GMT", + "baz=qux;path=/;expires=Fri, 31 Dec 2038 23:59:59 GMT", "one=two;max-age=2592000;domain=example.com" ] } @@ -244,7 +244,7 @@ component extends="testbox.system.BaseSpec" { "baz" : { "value" : "qux", "path" : "/", - "expires" : "Mon, 31 Dec 2038 23:59:59 GMT" + "expires" : "Fri, 31 Dec 2038 23:59:59 GMT" }, "one" : { "value" : "two", @@ -262,7 +262,7 @@ component extends="testbox.system.BaseSpec" { headers = { "Set-Cookie" : [ "foo=bar;path=/;secure;samesite=none;httponly", - "baz=qux;path=/;expires=Mon, 31 Dec 2038 23:59:59 GMT", + "baz=qux;path=/;expires=Fri, 31 Dec 2038 23:59:59 GMT", "one=two;max-age=2592000;domain=example.com" ] } From f15e49e9438dcfd9d16e3245aac05ba966be102e Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sat, 11 Oct 2025 07:24:17 -0600 Subject: [PATCH 4/4] Fix coldbox version expansion --- .github/workflows/cron.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 81dd566..18f9723 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -57,7 +57,7 @@ jobs: - name: Install dependencies run: | box install - box install coldbox@{{ matrix.coldbox }} --noSave + box install coldbox@${{ matrix.coldbox }} --noSave - name: Start server run: | diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 951fa9b..7f81c74 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -65,7 +65,7 @@ jobs: - name: Install dependencies run: | box install - box install coldbox@{{ matrix.coldbox }} --noSave + box install coldbox@${{ matrix.coldbox }} --noSave - name: Start server run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c80742b..b29e478 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: - name: Install dependencies run: | box install - box install coldbox@{{ matrix.coldbox }} --noSave + box install coldbox@${{ matrix.coldbox }} --noSave - name: Start server run: |