diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000..b47207b --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,10 @@ +name: Daily Tests + +on: + schedule: + - cron: '0 0 * * *' # Runs at 00:00 UTC every day + +jobs: + tests: + uses: ./.github/workflows/tests.yml + secrets: inherit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index f720015..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build Main - -on: - push: - branches: - - 'main' - -jobs: - ########################################################################################## - # Module Tests - ########################################################################################## - tests: - secrets: inherit - uses: ./.github/workflows/tests.yml - - ########################################################################################## - # Format Source Code - ########################################################################################## - format: - name: Code Auto-Formatting - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - - name: Auto-format - uses: Ortus-Solutions/commandbox-action@v1.0.2 - with: - cmd: run-script format - - - name: Commit Format Changes - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: Apply cfformat changes - - ########################################################################################## - # Release it - ########################################################################################## - release: - uses: ./.github/workflows/release.yml - needs: [ tests, format ] - secrets: inherit - with: - snapshot: false diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a48c550..b0bf721 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,10 +6,8 @@ on: - "main" - "master" - "development" - - "releases/v*" pull_request: branches: - - "releases/v*" - development jobs: @@ -17,9 +15,10 @@ jobs: uses: ./.github/workflows/tests.yml secrets: inherit - formatCheck: + # Format PR + format_check: name: Checks Source Code Formatting - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout Repository uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fde92ae..c9069d6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,13 @@ name: Build a Release on: - # Reusable workflow only : called by either the `release` or `main` workflows + # If you push to master|main this will trigger a stable release + push: + branches: + - master + - main + + # Reusable workflow : Usually called by a `snapshot` workflow workflow_call: inputs: snapshot: @@ -10,9 +16,13 @@ on: default: false type: boolean + # Manual Trigger + workflow_dispatch: env: - MODULE_ID: cbfs + MODULE_ID: ${{ github.event.repository.name }} + JDK: 21 SNAPSHOT: ${{ inputs.snapshot || false }} + BUILD_ID: ${{ github.run_number }} jobs: ########################################################################################## @@ -20,7 +30,12 @@ jobs: ########################################################################################## build: name: Build & Publish - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 + permissions: + checks: write + pull-requests: write + contents: write + issues: write steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -30,6 +45,12 @@ jobs: with: forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: ${{ env.JDK }} + - name: "Setup Environment Variables For Build Process" id: current_version run: | @@ -44,7 +65,7 @@ jobs: fi - name: Update changelog [unreleased] with latest version - uses: thomaseizinger/keep-a-changelog-new-release@1.3.0 + uses: thomaseizinger/keep-a-changelog-new-release@3.1.0 if: env.SNAPSHOT == 'false' with: changelogPath: ./changelog.md @@ -55,10 +76,10 @@ jobs: npm install -g markdownlint-cli markdownlint changelog.md --fix box install commandbox-docbox - box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }} + box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ env.BUILD_ID }} :branch=${{ env.BRANCH }} - - name: Commit Changelog To Master - uses: EndBug/add-and-commit@v9.1.1 + - name: Commit Changelog [unreleased] with latest version + uses: EndBug/add-and-commit@v9.1.4 if: env.SNAPSHOT == 'false' with: author_name: Github Actions @@ -67,7 +88,7 @@ jobs: add: changelog.md - name: Tag Version - uses: rickstaa/action-create-tag@v1.6.1 + uses: rickstaa/action-create-tag@v1.7.2 if: env.SNAPSHOT == 'false' with: tag: "v${{ env.VERSION }}" @@ -112,7 +133,7 @@ jobs: box forgebox publish --force - name: Create Github Release - uses: taiki-e/create-gh-release-action@v1.6.2 + uses: taiki-e/create-gh-release-action@v1.8.2 continue-on-error: true if: env.SNAPSHOT == 'false' with: @@ -121,14 +142,31 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} ref: refs/tags/v${{ env.VERSION }} + - name: Inform Slack + if: ${{ always() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: coding + SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' + SLACK_ICON_EMOJI: ":bell:" + SLACK_MESSAGE: "Module ${{ env.MODULE_ID }} v${{ env.VERSION }} Built with ${{ job.status }}!" + SLACK_TITLE: "ColdBox Module ${{ env.MODULE_ID }}" + SLACK_USERNAME: CI + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + ########################################################################################## # Prep Next Release ########################################################################################## prep_next_release: name: Prep Next Release - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-20.04 + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' + runs-on: ubuntu-24.04 needs: [ build ] + permissions: + checks: write + pull-requests: write + contents: write + issues: write steps: # Checkout development - name: Checkout Repository @@ -155,7 +193,7 @@ jobs: # Bump to next version - name: Bump Version run: | - box bump --patch --!TagVersion + box bump --minor --!TagVersion # Commit it back to development - name: Commit Version Bump @@ -163,7 +201,7 @@ jobs: with: author_name: Github Actions author_email: info@ortussolutions.com - message: 'Version bump [ci skip]' + message: 'Version bump' add: | box.json changelog.md diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 37e3183..50c8392 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -5,6 +5,13 @@ on: branches: - 'development' + workflow_dispatch: + +# Unique group name per workflow-branch/tag combo +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: ########################################################################################## # Module Tests @@ -18,7 +25,10 @@ jobs: ########################################################################################## format: name: Code Auto-Formatting - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 + permissions: + contents: write + checks: write steps: - uses: actions/checkout@v4 @@ -39,5 +49,10 @@ jobs: uses: ./.github/workflows/release.yml needs: [ tests, format ] secrets: inherit + permissions: + checks: write + pull-requests: write + contents: write + issues: write with: snapshot: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc2d531..fb064f4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,21 +5,21 @@ on: workflow_call: secrets: SLACK_WEBHOOK_URL: - required: true + required: false S3SDK_AWS_BUCKET_NAME: required: true jobs: tests: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 services: s3Mock: image: adobe/s3mock ports: - 9090:9090 env: - initialBuckets: ${{ secrets.S3SDK_AWS_BUCKET_NAME }} + initialBuckets: cbfs-test env: DB_USER: root DB_PASSWORD: root @@ -27,31 +27,27 @@ jobs: strategy: fail-fast: false matrix: - commandbox_version: [ "6.1.0-rc" ] - cfengine: [ "lucee@5", "adobe@2021", "adobe@2023" ] - coldboxVersion: [ "^6.0.0", "^7.0.0" ] + # Note the boxlang versions are on @be current due to BL-1823 not being available until 1.7 is released + cfengine: [ "boxlang-cfml@1", "lucee@5", "adobe@2021", "adobe@2023" ] + coldboxVersion: [ "^7" ] experimental: [ false ] + # Experimental: ColdBox BE vs All Engines include: - - commandbox_version: "6.1.0-rc" - coldboxVersion: "^6.0.0" - cfengine: "adobe@2018" - experimental: false - - commandbox_version: "6.1.0-rc" - coldboxVersion: "^7.0.0" - cfengine: "lucee@6" - experimental: true - - commandbox_version: "6.1.0-rc" - coldboxVersion: "be" + - coldboxVersion: "be" cfengine: "lucee@5" experimental: true - - commandbox_version: "6.1.0-rc" - coldboxVersion: "be" - cfengine: "adobe@2018" + - coldboxVersion: "be" + cfengine: "lucee@6" experimental: true - - commandbox_version: "6.1.0-rc" - coldboxVersion: "be" + - coldboxVersion: "be" cfengine: "adobe@2021" experimental: true + - coldboxVersion: "be" + cfengine: "adobe@2023" + experimental: true + - coldboxVersion: "be" + cfengine: "boxlang-cfml@1" + experimental: true steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -61,12 +57,40 @@ jobs: uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: "11" + java-version: "21" + + - name: Setup Environment For Testing Process + run: | + # Setup .env + touch .env + # ENV + printf "ENVIRONMENT=development\n" >> .env + printf "DB_HOST=localhost\n" >> .env + printf "DB_USER=${{ env.DB_USER }}\n" >> .env + printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env + printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env + printf "DB_BUNDLEVERSION=8.0.19\n" >> .env + printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env + printf "AWS_S3_DOMAIN=127.0.0.1:9090\n" >> .env + printf "AWS_S3_SSL=false\n" >> .env + printf "AWS_S3_REGION=\n" >> .env + printf "AWS_S3_PUBLIC_DOMAIN=127.0.0.1:9090/cbfs-test\n" >> .env + printf "AWS_S3_BUCKET_NAME=cbfs-test\n" >> .env - name: Setup CommandBox CLI uses: Ortus-Solutions/setup-commandbox@v2.0.1 with: - version: ${{ matrix.commandbox_version }} + version: 6.1.0 + + # This needs to happen until v6.2 of commandbox is released + - name: Update CommandBox-BoxLang + if : ${{ matrix.cfengine == 'boxlang-cfml@1' }} + run: | + box install --force commandbox-boxlang + + - name: Remove DiskServiceSpec until COLDBOX-1294 is fixed + run: | + rm -rf test-harness/tests/specs/services/DiskServiceSpec.cfc - name: Install Dependencies run: | @@ -74,27 +98,14 @@ jobs: cd test-harness box package set dependencies.coldbox=${{ matrix.coldboxVersion }} box install + cd ../ - name: Start ${{ matrix.cfengine }} Server - env: - ENVIRONMENT: development - AWS_S3_DOMAIN: 127.0.0.1:9090 - AWS_S3_SSL: "false" - AWS_S3_REGION: - AWS_S3_PUBLIC_DOMAIN: 127.0.0.1:9090/cbfs-test - AWS_S3_BUCKET_NAME: ${{ secrets.S3SDK_AWS_BUCKET_NAME }} run: | box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug curl http://127.0.0.1:60299 - name: Run Tests - env: - ENVIRONMENT: development - AWS_S3_DOMAIN: 127.0.0.1:9090 - AWS_S3_SSL: "false" - AWS_S3_REGION: - AWS_S3_PUBLIC_DOMAIN: 127.0.0.1:9090/cbfs-test - AWS_S3_BUCKET_NAME: ${{ secrets.S3SDK_AWS_BUCKET_NAME }} run: | mkdir -p test-harness/tests/results box testbox run --verbose outputFile=test-harness/tests/results/test-results outputFormats=json,antjunit @@ -128,15 +139,15 @@ jobs: .engine/**/logs/* .engine/**/WEB-INF/cfusion/logs/* - # - name: Slack Notifications - # # Only on failures and NOT in pull requests - # if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }} - # uses: rtCamp/action-slack-notify@v2 - # env: - # SLACK_CHANNEL: coding - # SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' - # SLACK_ICON_EMOJI: ":bell:" - # SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:' - # SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed - # SLACK_USERNAME: CI - # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + - name: Slack Notifications + # Only on failures and NOT in pull requests + if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: coding + SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' + SLACK_ICON_EMOJI: ":bell:" + SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:' + SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed + SLACK_USERNAME: CI + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.markdownlint.json b/.markdownlint.json index 36204cd..21bc843 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -8,7 +8,9 @@ "no-multiple-blanks": { "maximum": 2 }, - "no-duplicate-header" : false, + "no-duplicate-header" : { + "siblings_only" : true + }, "no-duplicate-heading" : false, "no-inline-html" : false -} \ No newline at end of file +} diff --git a/box.json b/box.json index 3740f30..de774d4 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"CB File Storages", - "version":"1.1.4", + "version":"1.2.0", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbfs/@build.version@/cbfs-@build.version@.zip", "author":"Ortus Solutions, Corp", "homepage":"https://github.com/coldbox-modules/cbfs", @@ -23,9 +23,10 @@ "contributors":[], "dependencies":{ "cbstreams":"^2.0", - "s3sdk":"^5.1.2" + "s3sdk":"^5.7.1" }, "devDependencies":{ + "commandbox-boxlang":"*", "commandbox-cfformat":"*", "commandbox-docbox":"*" }, @@ -51,13 +52,10 @@ "install:dependencies":"install --force && cd test-harness && install --force", "start:S3Mock":"!docker run --rm -d --name cbfs-s3-mock -p 9090:9090 -p 9191:9191 -e initialBuckets=cbfs-test -t adobe/s3mock", "start:lucee":"server start serverConfigFile=server-lucee@5.json", - "start:2018":"server start serverConfigFile=server-adobe@2018.json", "start:2021":"server start serverConfigFile=server-adobe@2021.json", "stop:lucee":"server stop serverConfigFile=server-lucee@5.json", - "stop:2018":"server stop serverConfigFile=server-adobe@2018.json", "stop:2021":"server stop serverConfigFile=server-adobe@2021.json", "logs:lucee":"server log serverConfigFile=server-lucee@5.json --follow", - "logs:2018":"server log serverConfigFile=server-adobe@2018.json --follow", "logs:2021":"server log serverConfigFile=server-adobe@2021.json --follow" } } diff --git a/build/Build.cfc b/build/Build.cfc index 897facd..6a6cd10 100644 --- a/build/Build.cfc +++ b/build/Build.cfc @@ -203,6 +203,7 @@ component { fileSystemUtil.createMapping( arguments.projectName, variables.cwd ); fileSystemUtil.createMapping( "coldbox", variables.cwd & "test-harness/coldbox" ); fileSystemUtil.createMapping( "testbox", variables.cwd & "test-harness/testbox" ); + // Generate Docs print.greenLine( "Generating API Docs, please wait..." ).toConsole(); @@ -308,4 +309,4 @@ component { variables.exportsDir = variables.artifactsDir & "/#projectName#/#arguments.version#"; directoryCreate( variables.exportsDir, true, true ); } -} \ No newline at end of file +} diff --git a/changelog.md b/changelog.md index 74869a8..92cb8ba 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- BoxLang certification +- Github Actions updates + +### Changed + +* Issue #40 - `createFromFile` now returns a file object of the created file +* Issue #41 - `upload` now returns a file object of the uploaded file + ## [1.1.4] - 2024-09-22 ### Fixed diff --git a/models/AbstractDiskProvider.cfc b/models/AbstractDiskProvider.cfc index aa3a241..026b0a7 100644 --- a/models/AbstractDiskProvider.cfc +++ b/models/AbstractDiskProvider.cfc @@ -171,7 +171,7 @@ component accessors="true" { fileDelete( tmpFile ); } - return this; + return file( normalizePath( filePath ) ); } /** diff --git a/models/providers/S3Provider.cfc b/models/providers/S3Provider.cfc index f1ea941..f3d80e4 100644 --- a/models/providers/S3Provider.cfc +++ b/models/providers/S3Provider.cfc @@ -484,8 +484,6 @@ component accessors="true" extends="cbfs.models.AbstractDiskProvider" { var response = variables.s3.getObject( bucketName = variables.properties.bucketName, uri = arguments.path ).response; if ( getMetadata( response ).name == "java.io.ByteArrayOutputStream" ) { - var bytes = []; - response.writeBytes( bytes ); return response.toByteArray(); } else { return response; diff --git a/models/testing/AbstractDiskSpec.cfc b/models/testing/AbstractDiskSpec.cfc index 28f0ff5..9f65b78 100644 --- a/models/testing/AbstractDiskSpec.cfc +++ b/models/testing/AbstractDiskSpec.cfc @@ -95,6 +95,10 @@ component extends="coldbox.system.testing.BaseTestCase" { } ); story( "The disk can create files from an existing file", function(){ + beforeEach( function( currentSpec ){ + disk.delete( variables.pathPrefix & "space_ninja2.png" ); + sleepIfNIO(); + } ); given( "given a existing file path", function(){ then( "it should create the file", function(){ var path = variables.pathPrefix & "space_ninja2.png"; @@ -121,8 +125,12 @@ component extends="coldbox.system.testing.BaseTestCase" { fileDelete( clone ); } + sleepIfNIO(); + fileCopy( original, clone ); + sleepIfNIO(); + disk.createFromFile( source : clone, directory : getDirectoryFromPath( path ), @@ -330,6 +338,7 @@ component extends="coldbox.system.testing.BaseTestCase" { destination = variables.pathPrefix & "test_file_two.txt"; disk.delete( sourcePath ); disk.delete( destination ); + sleepIfNIO(); } ); given( "An existing source and a non-existing destination", function(){ then( "it should move the source to the destination", function(){ @@ -467,7 +476,7 @@ component extends="coldbox.system.testing.BaseTestCase" { { "disk" : disk.getName() } ); try { - if ( server.keyExists( "lucee" ) ) { + if ( server.keyExists( "lucee" ) && !server.keyExists( "boxlang" ) ) { var req = new http( method = "GET", url = downloadTestEndpoint ); var resp = req.send().getPrefix(); } else { @@ -1004,6 +1013,7 @@ component extends="coldbox.system.testing.BaseTestCase" { destinationPath = variables.pathPrefix & "tddtests"; disk.deleteDirectory( sourcePath ); disk.deleteDirectory( destinationPath ); + sleepIfNIO(); } ); given( "a valid source and destination with no recurse and no filter", function(){ @@ -1166,6 +1176,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can get the contents of a directory", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "a valid directory", function(){ then( "it will list the directory", function(){ @@ -1292,6 +1303,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can get file information maps", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "a valid directory", function(){ then( "it can get a file map structure", function(){ @@ -1324,6 +1336,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can get multiple file content maps", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "a valid directory", function(){ then( "it can get a file content map structure", function(){ @@ -1376,6 +1389,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can work with binary and non-binary files", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "we have a json file", function(){ then( "it should determine the file is not binary", function(){ @@ -1496,4 +1510,13 @@ component extends="coldbox.system.testing.BaseTestCase" { return reFindNoCase( "Mac", createObject( "java", "java.lang.System" ).getProperties()[ "os.name" ] ); } + /** + * Boxlang uses java.nio which is non blocking so file operations may take a few ms to complete. + */ + function sleepIfNIO( duration = 50 ){ + if ( getMetadata( this ).name == "LocalProvider" && server.keyExists( "boxlang" ) ) { + sleep( duration ); + } + } + } diff --git a/readme.md b/readme.md index 8abfb9f..b63bc8c 100644 --- a/readme.md +++ b/readme.md @@ -33,9 +33,9 @@ Apache License, Version 2.0. ## System Requirements -- Lucee 5+ -- Adobe ColdFusion 2018+ -- Java 11-15 +- [BoxLang 1+](https://www.boxlang.io/) +- Lucee 5+ +- Adobe ColdFusion 2021+ ## Installation diff --git a/server-adobe@2018.json b/server-adobe@2018.json deleted file mode 100644 index e982feb..0000000 --- a/server-adobe@2018.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name":"cbfs-adobe@2018", - "app":{ - "serverHomeDirectory":".engine/adobe2018", - "cfengine":"adobe@2018" - }, - "web":{ - "http":{ - "port":"60299" - }, - "rewrites":{ - "enable":"true" - }, - "webroot":"test-harness", - "aliases":{ - "/moduleroot/cbfs":"../", - "/root":"./test-harness" - } - }, - "openBrowser":"false", - "cfconfig":{ - "file":".cfconfig.json" - } -} diff --git a/server-adobe@2021.json b/server-adobe@2021.json index e94ea5d..3fc486b 100644 --- a/server-adobe@2021.json +++ b/server-adobe@2021.json @@ -16,6 +16,10 @@ "/moduleroot/cbfs":"../", "/root":"./test-harness" } + }, + "jvm":{ + "heapSize":"1024", + "javaVersion":"openjdk11_jre" }, "openBrowser":"false", "cfconfig":{ diff --git a/server-adobe@2023.json b/server-adobe@2023.json index 01f6ae5..41b35ef 100644 --- a/server-adobe@2023.json +++ b/server-adobe@2023.json @@ -13,11 +13,13 @@ }, "webroot": "test-harness", "aliases":{ - "/moduleroot/cbfs":"../" + "/moduleroot/cbfs":"../", + "/root":"./test-harness" } }, "jvm":{ - "heapSize":"1024" + "heapSize":"1024", + "args" : "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" }, "openBrowser":"false", "cfconfig": { diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json new file mode 100644 index 0000000..4a8bd33 --- /dev/null +++ b/server-boxlang-cfml@1.json @@ -0,0 +1,37 @@ +{ + "app":{ + "cfengine":"boxlang@1", + "serverHomeDirectory":".engine/boxlang-cfml" + }, + "name":"cbfs-boxlang-cfml@1", + "force":true, + "openBrowser":false, + "web":{ + "directoryBrowsing":true, + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot":"test-harness", + "aliases":{ + "/moduleroot/cbfs":"./", + "/root":"./test-harness" + } + }, + "JVM":{ + "heapSize":"1024", + "javaVersion":"openjdk21_jre", + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" + }, + "cfconfig":{ + "file":".cfconfig.json" + }, + "env":{ + "BOXLANG_DEBUG":true + }, + "scripts":{ + "onServerInitialInstall":"install bx-compat-cfml,bx-esapi --noSave" + } +} diff --git a/server-lucee@5.json b/server-lucee@5.json index ca83d70..902d6cf 100644 --- a/server-lucee@5.json +++ b/server-lucee@5.json @@ -17,6 +17,9 @@ "/root":"./test-harness" } }, + "JVM":{ + "javaVersion":"openjdk11_jre" + }, "openBrowser":"false", "cfconfig":{ "file":".cfconfig.json" diff --git a/server-lucee@6.json b/server-lucee@6.json index c7379a3..b7471a0 100644 --- a/server-lucee@6.json +++ b/server-lucee@6.json @@ -17,6 +17,9 @@ "/root":"./test-harness" } }, + "jvm" : { + "args" : "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" + }, "openBrowser":"false", "cfconfig":{ "file":".cfconfig.json" diff --git a/server.json b/server.json deleted file mode 100644 index ca83d70..0000000 --- a/server.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name":"cbfs-lucee@5", - "app":{ - "serverHomeDirectory":".engine/lucee5", - "cfengine":"lucee@5" - }, - "web":{ - "http":{ - "port":"60299" - }, - "rewrites":{ - "enable":"true" - }, - "webroot":"test-harness", - "aliases":{ - "/moduleroot/cbfs":"./", - "/root":"./test-harness" - } - }, - "openBrowser":"false", - "cfconfig":{ - "file":".cfconfig.json" - } -} diff --git a/test-harness/box.json b/test-harness/box.json index 497106f..fab8efb 100644 --- a/test-harness/box.json +++ b/test-harness/box.json @@ -5,10 +5,10 @@ "private":true, "description":"", "dependencies":{ - "coldbox":"7" + "coldbox":"^8" }, "devDependencies":{ - "testbox":"^5.4.0+7" + "testbox":"*" }, "installPaths":{ "coldbox":"coldbox/", diff --git a/test-harness/config/Router.cfc b/test-harness/config/Router.cfc index da3e27b..ad2d264 100644 --- a/test-harness/config/Router.cfc +++ b/test-harness/config/Router.cfc @@ -1,8 +1,6 @@ component { function configure(){ - setFullRewrites( true ); - route( ":handler/:action?" ).end(); }