diff --git a/.cfconfig.json b/.cfconfig.json index bd49f5d..f9b3828 100644 --- a/.cfconfig.json +++ b/.cfconfig.json @@ -1,8 +1,26 @@ { + "adminPassword" : "coldbox", "debuggingEnabled":true, "debuggingReportExecutionTimes":false, "disableInternalCFJavaComponents":false, "inspectTemplate":"always", "requestTimeout":"0,0,0,90", - "robustExceptionEnabled":true -} \ No newline at end of file + "robustExceptionEnabled":true, + "datasources": { + "coolblog": { + "class":"${DB_CLASS}", + "dbdriver": "MySQL", + "dsn":"jdbc:mysql://{host}:{port}/{database}", + "custom":"useUnicode=true&characterEncoding=UTF8&serverTimezone=UTC&useLegacyDatetimeCode=true&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true", + "host":"${DB_HOST:127.0.0.1}", + "username": "${DB_USER:root}", + "password": "${DB_PASSWORD}", + "database": "coolblog", + "port": "${DB_PORT:3306}", + "storage":"false", + "bundleName": "${DB_BUNDLENAME}", + "bundleVersion": "${DB_BUNDLEVERSION}", + "validate":"false" + } + } +} diff --git a/.github/CODE_OF_CONDUCT.MD b/.github/CODE_OF_CONDUCT.MD new file mode 100644 index 0000000..12507ab --- /dev/null +++ b/.github/CODE_OF_CONDUCT.MD @@ -0,0 +1,3 @@ +# Code of Conduct + +Please see it in our [Contributing Guidelines](../CONTRIBUTING.md#code-of-conduct). diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000..300232e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +--- + + + +## What are the steps to reproduce this issue? + +1. … +2. … +3. … + +## What happens? + +… + +## What were you expecting to happen? + +… + +## Any logs, error output, etc? + +… + +## Any other comments? + +… + +## What versions are you using? + +**Operating System:** … +**Package Version:** … diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..c10946f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,18 @@ +--- +name: Feature Request +about: Request a new feature or enhancement +--- + + + +## Summary + + + +## Detailed Description + + + +## Possible Implementation Ideas + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e8bd9f9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ +# Description + +Please include a summary of the changes and which issue(s) is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +**Please note that all PRs must have tests attached to them** + +IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines. + +## Issues + +All PRs must have an accompanied issue. Please make sure you created it and linked it here. + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug Fix +- [ ] Improvement +- [ ] New Feature +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## Checklist + +- [ ] My code follows the style guidelines of this project [cfformat](../.cfformat.json) +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..f057099 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security Policy + +Please see it in our [Contributing Guidelines](../CONTRIBUTING.md#security-vulnerabilities). diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000..3bb8adb --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,3 @@ +# Support & Help + +Please see it in our [Contributing Guidelines](../CONTRIBUTING.md#support-questions). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index dff8226..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: cbmarkdown CI - -# Only on Development we build snapshots -on: - push: - branches: - - development - - master - -env: - MODULE_ID: cbmarkdown - -jobs: - ############################################# - # Tests First baby! We fail, no build :( - ############################################# - tests: - uses: ./.github/workflows/tests.yml - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - ############################################# - # Build Module - ############################################# - build: - name: Build & Publish - needs: tests - runs-on: ubuntu-20.04 - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup Java - uses: actions/setup-java@v2 - with: - distribution: "adopt" - java-version: "11" - - - name: Setup CommandBox - uses: Ortus-Solutions/setup-commandbox@main - with: - forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} - - - name: Setup Environment Variables For Build Process - id: current_version - run: | - echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV - box package set version=@build.version@+@build.number@ - # master or snapshot - echo "Github Ref is $GITHUB_REF" - echo "BRANCH=master" >> $GITHUB_ENV - if [ $GITHUB_REF == 'refs/heads/development' ] - then - echo "BRANCH=development" >> $GITHUB_ENV - fi - - - name: Build ${{ env.MODULE_ID }} - run: | - 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 }} - - - name: Upload Build Artifacts - if: success() - uses: actions/upload-artifact@v2 - with: - name: ${{ env.MODULE_ID }} - path: | - .artifacts/**/* - - - name: Upload Binaries to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: "downloads.ortussolutions.com" - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} - SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" - DEST_DIR: "ortussolutions/coldbox-modules/${{ env.MODULE_ID }}" - - - 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: "coldbox-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}" - - - name: Publish To ForgeBox - run: | - cd .tmp/${{ env.MODULE_ID }} - cat box.json - box forgebox publish - - - 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: '${{ env.MODULE_ID }} Built with ${{ job.status }}!' - SLACK_TITLE: "${{ env.MODULE_ID }} Build" - SLACK_USERNAME: CI - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/gh-release.yml b/.github/workflows/gh-release.yml deleted file mode 100644 index 5193ae5..0000000 --- a/.github/workflows/gh-release.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Publish Github Release -name: Github Release - -on: - push: - tags: - - v[0-9]+.* - -jobs: - create-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: taiki-e/create-gh-release-action@v1.5.0 - with: - # Produced by the build/Build.cfc - changelog: changelog.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5da1b04..7018845 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,27 +1,28 @@ name: Pull Requests on: + push: + branches-ignore: + - "main" + - "master" + - "development" + - "releases/v*" pull_request: branches: + - "releases/v*" - development jobs: tests: - uses: coldbox-modules/cbmarkdown/.github/workflows/tests.yml@development + uses: ./.github/workflows/tests.yml - # Format PR - format: - name: Format + formatCheck: + name: Checks Source Code Formatting runs-on: ubuntu-20.04 steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - uses: Ortus-Solutions/commandbox-action@v1.0.2 with: - cmd: run-script format - - - name: Commit Format Changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Apply cfformat changes + cmd: run-script format:check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e301154 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,175 @@ +name: Build a Release + +on: + # 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: + description: 'Is this a snapshot build?' + required: false + default: false + type: boolean + +env: + MODULE_ID: cbmarkdown + SNAPSHOT: ${{ inputs.snapshot || false }} + +jobs: + ########################################################################################## + # Build & Publish + ########################################################################################## + build: + name: Build & Publish + runs-on: ubuntu-20.04 + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup CommandBox + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} + + - name: "Setup Environment Variables For Build Process" + id: current_version + run: | + echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV + box package set version=@build.version@+@build.number@ + # master or snapshot + echo "Github Ref is $GITHUB_REF" + echo "BRANCH=master" >> $GITHUB_ENV + if [ $GITHUB_REF == 'refs/heads/development' ] + then + echo "BRANCH=development" >> $GITHUB_ENV + fi + + - name: Update changelog [unreleased] with latest version + uses: thomaseizinger/keep-a-changelog-new-release@1.3.0 + if: env.SNAPSHOT == 'false' + with: + changelogPath: ./changelog.md + tag: v${{ env.VERSION }} + + - name: Build ${{ env.MODULE_ID }} + run: | + 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 }} + + - name: Commit Changelog To Master + uses: EndBug/add-and-commit@v9.1.1 + if: env.SNAPSHOT == 'false' + with: + author_name: Github Actions + author_email: info@ortussolutions.com + message: 'Finalized changelog for v${{ env.VERSION }}' + add: changelog.md + + - name: Tag Version + uses: rickstaa/action-create-tag@v1.6.1 + if: env.SNAPSHOT == 'false' + with: + tag: "v${{ env.VERSION }}" + force_push_tag: true + message: "Latest Release v${{ env.VERSION }}" + + - name: Upload Build Artifacts + if: success() + uses: actions/upload-artifact@v3 + with: + name: ${{ env.MODULE_ID }} + path: | + .artifacts/**/* + changelog.md + + - name: Upload Binaries to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read + env: + AWS_S3_BUCKET: "downloads.ortussolutions.com" + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} + SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" + DEST_DIR: "ortussolutions/coldbox-modules/${{ env.MODULE_ID }}" + + - 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: "coldbox-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}" + + - name: Publish To ForgeBox + run: | + cd .tmp/${{ env.MODULE_ID }} + cat box.json + box forgebox publish --force + + - name: Create Github Release + uses: taiki-e/create-gh-release-action@v1.6.2 + continue-on-error: true + if: env.SNAPSHOT == 'false' + with: + title: ${{ env.VERSION }} + changelog: changelog.md + token: ${{ secrets.GITHUB_TOKEN }} + ref: refs/tags/v${{ env.VERSION }} + + ########################################################################################## + # Prep Next Release + ########################################################################################## + prep_next_release: + name: Prep Next Release + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' + runs-on: ubuntu-20.04 + needs: [ build ] + steps: + # Checkout development + - name: Checkout Repository + uses: actions/checkout@v3 + with: + ref: development + + - name: Setup CommandBox + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} + + - name: Download build artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ env.MODULE_ID }} + path: .tmp + + # Copy the changelog to the development branch + - name: Copy Changelog + run: | + cp .tmp/changelog.md changelog.md + + # Bump to next version + - name: Bump Version + run: | + box bump --minor --!TagVersion + + # Commit it back to development + - name: Commit Version Bump + uses: EndBug/add-and-commit@v9.1.1 + with: + author_name: Github Actions + author_email: info@ortussolutions.com + message: 'Version bump' + add: | + box.json + changelog.md diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 0000000..45d7dd1 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,43 @@ +name: Build Snapshot + +on: + push: + branches: + - 'development' + +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@v3 + + - 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@v4 + with: + commit_message: Apply cfformat changes + + ########################################################################################## + # Release it + ########################################################################################## + release: + uses: ./.github/workflows/release.yml + needs: [ tests, format ] + secrets: inherit + with: + snapshot: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ba6eddd..ca7b12b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: workflow_call: secrets: SLACK_WEBHOOK_URL: - required: true + required: false jobs: tests: @@ -14,75 +14,101 @@ jobs: env: DB_USER: root DB_PASSWORD: root + continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: - cfengine: [ "lucee@5", "adobe@2016", "adobe@2018", "adobe@2021" ] + cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ] + coldboxVersion: [ "^6.0.0" ] + experimental: [ false ] + include: + - cfengine: "adobe@2023" + coldboxVersion: "^6.0.0" + experimental: true + - coldboxVersion: "be" + cfengine: "lucee@5" + experimental: true + - coldboxVersion: "be" + cfengine: "adobe@2018" + experimental: true + - coldboxVersion: "be" + cfengine: "adobe@2021" + experimental: true steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + # - name: Setup Database and Fixtures + # run: | + # sudo systemctl start mysql.service + # mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE mementifier;' + # mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: - distribution: "adopt" + distribution: "temurin" java-version: "11" + - name: Setup CommandBox CLI + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + - 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_DATABASE=mydatabase\n" >> .env + printf "DB_DRIVER=MySQL\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 - - name: Setup CommandBox CLI - uses: Ortus-Solutions/setup-commandbox@main - - - name: Install Dependencies + - name: Install Test Harness with ColdBox ${{ matrix.coldboxVersion }} run: | box install - cd test-harness && box install + cd test-harness + box package set dependencies.coldbox=${{ matrix.coldboxVersion }} + box install - name: Start ${{ matrix.cfengine }} Server run: | box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug - # Install Adobe 2021 cfpm modules - if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then - box run-script install:2021 - fi curl http://127.0.0.1:60299 - name: Run Tests run: | mkdir -p test-harness/tests/results box testbox run --verbose outputFile=test-harness/tests/results/test-results outputFormats=json,antjunit - ls -lR test-harness/tests - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 + uses: EnricoMi/publish-unit-test-result-action@v2 if: always() with: - files: test-harness/tests/results/**/*.xml - check_name: "${{ matrix.cfengine }} Test Results" + junit_files: test-harness/tests/results/**/*.xml + check_name: "${{ matrix.cfengine }} ColdBox ${{ matrix.coldboxVersion }} Test Results" - name: Upload Test Results to Artifacts if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: test-results-${{ matrix.cfengine }} + name: test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }} path: | test-harness/tests/results/**/* - - name: Failure Debugging Log + - name: Show Server Log On Failures if: ${{ failure() }} run: | box server log serverConfigFile="server-${{ matrix.cfengine }}.json" - - name: Upload Debugging Log To Artifacts + - name: Upload Debug Logs To Artifacts if: ${{ failure() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: Failure Debugging Info - ${{ matrix.cfengine }} + name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.coldboxVersion }} path: | .engine/**/logs/* .engine/**/WEB-INF/cfusion/logs/* @@ -96,6 +122,6 @@ jobs: 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 }} failed + 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 new file mode 100644 index 0000000..3707fcb --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,15 @@ +{ + "line-length": false, + "single-h1": false, + "no-hard-tabs" : false, + "fenced-code-language" : false, + "no-bare-urls" : false, + "first-line-h1": false, + "no-multiple-blanks": { + "maximum": 2 + }, + "no-duplicate-header" : { + "siblings_only" : true + }, + "no-inline-html" : false +} diff --git a/.markdownlintrc.json b/.markdownlintrc.json deleted file mode 100644 index ceacd1f..0000000 --- a/.markdownlintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "line-length": false, - "single-h1": false, - "first-line-h1": false, - "no-multiple-blanks": { - "maximum": 2 - } -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..6092c9d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,33 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run CommandBox Task", + "type": "shell", + "command": "box task run ${relativeFile}", + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [] + }, + { + "label": "Run TestBox Bundle", + "type": "shell", + "command": "box testbox run bundles=${relativeFile} --!recurse", + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [] + } + ] +} diff --git a/ModuleConfig.cfc b/ModuleConfig.cfc index fc0d430..cff33fb 100644 --- a/ModuleConfig.cfc +++ b/ModuleConfig.cfc @@ -12,7 +12,7 @@ component { this.author = "Ortus Solutions, Corp"; this.webURL = "http://www.ortussolutions.com/products/codexwiki"; this.description = "Markdown processor for ColdBox applications"; - this.version = "@build.version@+@build.number@"; + this.version = "@build.version@+@build.number@"; // If true, looks for views in the parent first, if not found, then in the module. Else vice-versa this.viewParentLookup = true; // If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa diff --git a/box.json b/box.json index a7a64a2..2873e7c 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"ColdBox Markdown", - "version":"3.5.0", + "version":"3.6.0", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbmarkdown/@build.version@/cbmarkdown-@build.version@.zip", "author":"Ortus Solutions.com ", "slug":"cbmarkdown", @@ -23,7 +23,7 @@ "cbjavaloader":"^2.0.0", "cbemoji":"^1.0.1" }, - "devDependencies":{ + "devDependencies":{ "commandbox-cfformat":"*", "commandbox-docbox":"*", "commandbox-dotenv":"*", @@ -34,19 +34,29 @@ "test-harness", "/server*.json" ], - "testbox":{ + "testbox":{ "runner":"http://localhost:60299/tests/runner.cfm" }, "scripts":{ "build:module":"task run taskFile=build/Build.cfc :projectName=`package show slug` :version=`package show version`", "build:docs":"task run taskFile=build/Build.cfc target=docs :projectName=`package show slug` :version=`package show version`", + "install:dependencies":"install && cd test-harness && install", "release":"recipe build/release.boxr", - "format":"cfformat run models,test-harness/**/*.cfc,ModuleConfig.cfc --overwrite", - "format:watch":"cfformat watch models,test-harness/**/*.cfc,ModuleConfig.cfc ./.cfformat.json", - "format:check":"cfformat check models,test-harness/**/*.cfc,ModuleConfig.cfc", - "cfpm":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\"' | run", - "cfpm:install":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\" install ${1}' | run", - "install:2021":"run-script cfpm:install zip,debugger", - "install:dependencies":"install && cd test-harness && install" + "format":"cfformat run helpers,models,test-harness/tests/,ModuleConfig.cfc --overwrite", + "format:watch":"cfformat watch helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json", + "format:check":"cfformat check helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json", + "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" + }, + "installPaths":{ + "cbjavaloader":"modules/cbjavaloader/", + "cbemoji":"modules/cbemoji/" } } diff --git a/build/.travis.yml b/build/.travis.yml deleted file mode 100644 index 5a25a2f..0000000 --- a/build/.travis.yml +++ /dev/null @@ -1,126 +0,0 @@ -language: java - -notifications: - slack: - secure: FIHlTn/YO7Wgumm1uIqmoEsqjQA7fV0AE94Rjc5yKzM3AquQa8HicgDVVk0d2GrKRnl0xt3j4ZJV//VJyIjlCd/QVKuj48R2ChjEY2im3+99HFPafCUI5/S2uyowKU6mJTFonH9v6p41eqxdbiAxJdDGOT0V2Gpt3UBSNuHz8ED9/aIHqv+P7M+VD6Xd2XYwctPniWlaSWx57sWcnG/VkFG45qFQAyha64uxOOe4M3ZmG/n5FfauZ8cBVLiRKEIr+CyNhh1ujfzi7+4uzMlSNL5t/BbZamAQuZzqGzGQ9RVvIlyPgUGNJtDEE/hWS09aagXF5T6EMj00szizErh4J1/x4qZwml5+TcBN31E0QmAhCtZe85sr3tYgic+hEz9XX1yymQzf/C7n4to2yNvq0r4g51xDk8IuP95WEh7zaqLlvFZvBFgxpHZBMYlRvhytjOYDeIFRMcGwHZcXosaG2ejqDwcGq/LC4oeG4sSwmg9sdRrtcmcanrNqrBka86WYO6LntI3JdZ86/1ACEUHzhCCwvrKELc9Ji1xxGAgS7QKH+s2/hnJuiMyv73gOVLKYC+wPMLt+fvOmPLSEl+PJiAIlToBq1KUBg03RSQLfPOLD7OrJ8VvDZsEPwejqlGDyc4wRglS9OTi7SnN5LYHSDNDdGdREegWqq9qDHEYEVLI= - -env: - # Fill out these global variables for build process - global: - - MODULE_ID=cbmarkdown - matrix: - - ENGINE=lucee@5 - - ENGINE=adobe@2016 - - ENGINE=adobe@2018 - -branches: - only: - - development - - master - -dist: trusty - -sudo: required - -before_install: - # CommandBox Keys - - curl -fsSl https://downloads.ortussolutions.com/debs/gpg | sudo apt-key add - - - sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a - /etc/apt/sources.list.d/commandbox.list - -install: - # Install Commandbox - - sudo apt-get update && sudo apt-get --assume-yes install rsync jq commandbox - # Install CommandBox Supporting Librarires - - box install commandbox-cfconfig,commandbox-dotenv,commandbox-docbox - # If using auto-publish, you will need to provide your API token with this line: - - box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null - -script: - # Set Current Version and Travis Tag - - TARGET_VERSION=`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r` - - TRAVIS_TAG=${TARGET_VERSION} - - echo "Starting build for ${MODULE_ID} v${TARGET_VERSION}" - # Replace version so builder can issue it - - box package set version=@build.version@+@build.number@ - # Startup the harness - - cd test-harness - # run our dependency install to ensure the workbench is in place - - box install - # run our matrix server - - box server start serverConfigFile="server-${ENGINE}.json" - # Startup the app - - curl http://localhost:60299 - # Debugging of tests - #- curl http://localhost:60299/tests/runner.cfm?reporter=json -o testresults.json && cat testresults.json - # move back to build dir to build it - - cd $TRAVIS_BUILD_DIR - # Build Project - - box task run taskfile=build/Build target=run :version=${TARGET_VERSION} :projectName=${MODULE_ID} :buildID=${TRAVIS_BUILD_NUMBER} :branch=${TRAVIS_BRANCH} - # Cat results for debugging - #- cat build/results.json - -after_failure: - - cd $TRAVIS_BUILD_DIR/test-harness - # Display the contents of our root directory - # Spit out our Commandbox log in case we need to debug - - box server log server-${ENGINE}.json - - cat `box system-log` - -deploy: - # Module Deployment - - provider: s3 - on: - branch: - - master - - development - condition: "$ENGINE = lucee@5" - skip_cleanup: true - #AWS Credentials need to be set in Travis - access_key_id: $AWS_ACCESS_KEY - secret_access_key: $AWS_ACCESS_SECRET - # Destination - bucket: "downloads.ortussolutions.com" - local-dir: $TRAVIS_BUILD_DIR/.artifacts/$MODULE_ID - upload-dir: ortussolutions/coldbox-modules/$MODULE_ID - acl: public_read - - # API Docs Deployment - - provider: s3 - on: - branch: - - master - - development - condition: "$ENGINE = lucee@5" - skip_cleanup: true - #AWS Credentials need to be set in Travis - access_key_id: $AWS_ACCESS_KEY - secret_access_key: $AWS_ACCESS_SECRET - bucket: "apidocs.ortussolutions.com" - local-dir: $TRAVIS_BUILD_DIR/.tmp/apidocs - upload-dir: coldbox-modules/$MODULE_ID/$TARGET_VERSION - acl: public_read - - # Github Release only on Master - - provider: releases - api_key: ${GITHUB_TOKEN} - on: - branch: - - master - condition: "$ENGINE = lucee@5" - skip_cleanup: true - edge: true - file_glob: true - file: $TRAVIS_BUILD_DIR/.artifacts/$MODULE_ID/**/* - release_notes_file: changelog.md - name: v${TRAVIS_TAG} - tag_name: v${TRAVIS_TAG} - overwrite: true - -# Once API Docs and Binaries are deployed to S3 Publish to ForgeBox -after_deploy: - # Move to build out artifact - - cd ${TRAVIS_BUILD_DIR}/.tmp/${MODULE_ID} - - cat box.json - # Only publish once using the lucee matrix - - if [ ${ENGINE} = 'lucee@5' ]; then box forgebox publish; fi diff --git a/build/Build.cfc b/build/Build.cfc index 926cce1..ee9366e 100644 --- a/build/Build.cfc +++ b/build/Build.cfc @@ -76,9 +76,6 @@ component { // checksums buildChecksums(); - // Build latest changelog - latestChangelog(); - // Finalize Message print .line() @@ -130,9 +127,7 @@ component { ) .toConsole(); - // Prepare exports directory - variables.exportsDir = variables.artifactsDir & "/#projectName#/#arguments.version#"; - directoryCreate( variables.exportsDir, true, true ); + ensureExportDir( argumentCollection = arguments ); // Project Build Dir variables.projectBuildDir = variables.buildDir & "/#projectName#"; @@ -200,11 +195,12 @@ component { version = "1.0.0", outputDir = ".tmp/apidocs" ){ + ensureExportDir( argumentCollection = arguments ); + // Create project mapping fileSystemUtil.createMapping( arguments.projectName, variables.cwd ); // Generate Docs print.greenLine( "Generating API Docs, please wait..." ).toConsole(); - directoryCreate( arguments.outputDir, true, true ); command( "docbox generate" ) .params( @@ -228,27 +224,6 @@ component { ); } - /** - * Build the latest changelog file: changelog-latest.md - */ - function latestChangelog(){ - print.blueLine( "Building latest changelog..." ).toConsole(); - - if ( !fileExists( variables.cwd & "changelog.md" ) ) { - return error( "Cannot continue building, changelog.md file doesn't exist!" ); - } - - fileWrite( - variables.cwd & "changelog-latest.md", - fileRead( variables.cwd & "changelog.md" ).split( "----" )[ 2 ].trim() & chr( 13 ) & chr( 10 ) - ); - - print - .greenLine( "Latest changelog file created at `changelog-latest.md`" ) - .line() - .line( fileRead( variables.cwd & "changelog-latest.md" ) ); - } - /********************************************* PRIVATE HELPERS *********************************************/ /** @@ -315,4 +290,18 @@ component { return ( createObject( "java", "java.lang.System" ).getProperty( "cfml.cli.exitCode" ) ?: 0 ); } + /** + * Ensure the export directory exists at artifacts/NAME/VERSION/ + */ + private function ensureExportDir( + required projectName, + version = "1.0.0" + ){ + if ( structKeyExists( variables, "exportsDir" ) && directoryExists( variables.exportsDir ) ){ + return; + } + // Prepare exports directory + variables.exportsDir = variables.artifactsDir & "/#projectName#/#arguments.version#"; + directoryCreate( variables.exportsDir, true, true ); + } } diff --git a/build/release.boxr b/build/release.boxr index e216f22..a63f2cc 100755 --- a/build/release.boxr +++ b/build/release.boxr @@ -7,19 +7,8 @@ # Merge development into it for release !git merge --no-ff development -# Tag the master repo with the version from box.json -!git tag v`box package show version` - # Push all branches back out to github !git push origin --all -# Push all tags -!git push origin --tags - # Check development again !git checkout -f development - -# Bump to prepare for a new release, do minor, change if needed and don't tag -bump --minor --!tagVersion -!git commit -a -m "version bump" -!git push origin development \ No newline at end of file diff --git a/changelog.md b/changelog.md index 686fdb1..a425361 100644 --- a/changelog.md +++ b/changelog.md @@ -7,74 +7,66 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## [3.5.0] => 2022-MAY-18 +## [Unreleased] ### Added -* New module template updates -* Add options for configuring code blocks and how they render thanks to @michaelborn -* Migration to github actions +- Upgraded flexmark to latest stable 0.64.0 with all dependencies and extensions +- New github actions +- ColdBox 7 auto testing ----- +## [3.5.0] => 2022-MAY-18 + +### Added + +- New module template updates +- Add options for configuring code blocks and how they render thanks to @michaelborn +- Migration to github actions ## [3.4.0] => 2020-MAY-28 ### Added -* Updated flexmark to 0.50.50 -* Added auto formatting thanks to cfformat -* Auto-publishing of changelos and artifacts to github upon release -* New Autolinking extension -* New Autoanchor extension -* New YouTube Transformer extension -* New TOC extension -* New TaskList extension -* New Strikethrough extension -* New Subscript extension - ----- +- Updated flexmark to 0.50.50 +- Added auto formatting thanks to cfformat +- Auto-publishing of changelos and artifacts to github upon release +- New Autolinking extension +- New Autoanchor extension +- New YouTube Transformer extension +- New TOC extension +- New TaskList extension +- New Strikethrough extension +- New Subscript extension ## [3.3.0] => 2019-DEC-13 -* New module layout -* New flexmark core v0.50.44 thanks to @michaelborn - ----- +- New module layout +- New flexmark core v0.50.44 thanks to @michaelborn ## [3.2.0] => 2018-MAR-22 -* Full Emoji support via the `cbemoji` library - ----- +- Full Emoji support via the `cbemoji` library ## [3.1.0] => 2018-MAR-08 -* Dropped ACF10 support -* Fixes the appending of user options instead of default options always taking precedence -* Added accessors to Processor so you can retrieve internal parser and renderer - ----- +- Dropped ACF10 support +- Fixes the appending of user options instead of default options always taking precedence +- Added accessors to Processor so you can retrieve internal parser and renderer ## [3.0.0] => 2017-JUL-26 -* Updated entire core to use Flexmark markdown processor -* Added global options for processor - ----- +- Updated entire core to use Flexmark markdown processor +- Added global options for processor ## [2.0.1] -* Unified workbench -* Updated javaloader - ----- +- Unified workbench +- Updated javaloader ## [2.0.0] -* Updated internal markdown Java library to txtmark: https://github.com/rjeschke/txtmark - ----- +- Updated internal markdown Java library to txtmark: ## [1.0.0] -* Create first module version +- Create first module version diff --git a/models/lib/annotations-15.0.jar b/models/lib/annotations-15.0.jar new file mode 100644 index 0000000..3f83832 Binary files /dev/null and b/models/lib/annotations-15.0.jar differ diff --git a/models/lib/flexmark-0.50.50.jar b/models/lib/flexmark-0.50.50.jar deleted file mode 100644 index 9ad6f08..0000000 Binary files a/models/lib/flexmark-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-0.64.0.jar b/models/lib/flexmark-0.64.0.jar new file mode 100644 index 0000000..1706280 Binary files /dev/null and b/models/lib/flexmark-0.64.0.jar differ diff --git a/models/lib/flexmark-all-0.64.0.jar b/models/lib/flexmark-all-0.64.0.jar new file mode 100644 index 0000000..9f82aef Binary files /dev/null and b/models/lib/flexmark-all-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-abbreviation-0.64.0.jar b/models/lib/flexmark-ext-abbreviation-0.64.0.jar new file mode 100644 index 0000000..812ed86 Binary files /dev/null and b/models/lib/flexmark-ext-abbreviation-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-admonition-0.64.0.jar b/models/lib/flexmark-ext-admonition-0.64.0.jar new file mode 100644 index 0000000..9674667 Binary files /dev/null and b/models/lib/flexmark-ext-admonition-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-anchorlink-0.50.50.jar b/models/lib/flexmark-ext-anchorlink-0.50.50.jar deleted file mode 100644 index 96bd76e..0000000 Binary files a/models/lib/flexmark-ext-anchorlink-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-anchorlink-0.64.0.jar b/models/lib/flexmark-ext-anchorlink-0.64.0.jar new file mode 100644 index 0000000..f8c2438 Binary files /dev/null and b/models/lib/flexmark-ext-anchorlink-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-aside-0.64.0.jar b/models/lib/flexmark-ext-aside-0.64.0.jar new file mode 100644 index 0000000..f881b53 Binary files /dev/null and b/models/lib/flexmark-ext-aside-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-attributes-0.64.0.jar b/models/lib/flexmark-ext-attributes-0.64.0.jar new file mode 100644 index 0000000..ff1141a Binary files /dev/null and b/models/lib/flexmark-ext-attributes-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-autolink-0.50.50.jar b/models/lib/flexmark-ext-autolink-0.50.50.jar deleted file mode 100644 index 7e02f20..0000000 Binary files a/models/lib/flexmark-ext-autolink-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-autolink-0.64.0.jar b/models/lib/flexmark-ext-autolink-0.64.0.jar new file mode 100644 index 0000000..ae9d20e Binary files /dev/null and b/models/lib/flexmark-ext-autolink-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-definition-0.64.0.jar b/models/lib/flexmark-ext-definition-0.64.0.jar new file mode 100644 index 0000000..fc041aa Binary files /dev/null and b/models/lib/flexmark-ext-definition-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-emoji-0.64.0.jar b/models/lib/flexmark-ext-emoji-0.64.0.jar new file mode 100644 index 0000000..cec2159 Binary files /dev/null and b/models/lib/flexmark-ext-emoji-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-enumerated-reference-0.64.0.jar b/models/lib/flexmark-ext-enumerated-reference-0.64.0.jar new file mode 100644 index 0000000..ffd6c46 Binary files /dev/null and b/models/lib/flexmark-ext-enumerated-reference-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-escaped-character-0.64.0.jar b/models/lib/flexmark-ext-escaped-character-0.64.0.jar new file mode 100644 index 0000000..7522238 Binary files /dev/null and b/models/lib/flexmark-ext-escaped-character-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-footnotes-0.64.0.jar b/models/lib/flexmark-ext-footnotes-0.64.0.jar new file mode 100644 index 0000000..5b14953 Binary files /dev/null and b/models/lib/flexmark-ext-footnotes-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-gfm-issues-0.64.0.jar b/models/lib/flexmark-ext-gfm-issues-0.64.0.jar new file mode 100644 index 0000000..a4bbe6d Binary files /dev/null and b/models/lib/flexmark-ext-gfm-issues-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-gfm-strikethrough-0.50.50.jar b/models/lib/flexmark-ext-gfm-strikethrough-0.50.50.jar deleted file mode 100644 index 0c35bee..0000000 Binary files a/models/lib/flexmark-ext-gfm-strikethrough-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-gfm-strikethrough-0.64.0.jar b/models/lib/flexmark-ext-gfm-strikethrough-0.64.0.jar new file mode 100644 index 0000000..5bafbbc Binary files /dev/null and b/models/lib/flexmark-ext-gfm-strikethrough-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-gfm-tables-0.50.50.jar b/models/lib/flexmark-ext-gfm-tables-0.50.50.jar deleted file mode 100644 index b6629a7..0000000 Binary files a/models/lib/flexmark-ext-gfm-tables-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-gfm-tasklist-0.50.50.jar b/models/lib/flexmark-ext-gfm-tasklist-0.50.50.jar deleted file mode 100644 index 44b1776..0000000 Binary files a/models/lib/flexmark-ext-gfm-tasklist-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-gfm-tasklist-0.64.0.jar b/models/lib/flexmark-ext-gfm-tasklist-0.64.0.jar new file mode 100644 index 0000000..99ec16d Binary files /dev/null and b/models/lib/flexmark-ext-gfm-tasklist-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-gfm-users-0.64.0.jar b/models/lib/flexmark-ext-gfm-users-0.64.0.jar new file mode 100644 index 0000000..7c4c278 Binary files /dev/null and b/models/lib/flexmark-ext-gfm-users-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-ins-0.64.0.jar b/models/lib/flexmark-ext-ins-0.64.0.jar new file mode 100644 index 0000000..3e10602 Binary files /dev/null and b/models/lib/flexmark-ext-ins-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-macros-0.64.0.jar b/models/lib/flexmark-ext-macros-0.64.0.jar new file mode 100644 index 0000000..c2a827d Binary files /dev/null and b/models/lib/flexmark-ext-macros-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-media-tags-0.64.0.jar b/models/lib/flexmark-ext-media-tags-0.64.0.jar new file mode 100644 index 0000000..2dfdfc8 Binary files /dev/null and b/models/lib/flexmark-ext-media-tags-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-resizable-image-0.64.0.jar b/models/lib/flexmark-ext-resizable-image-0.64.0.jar new file mode 100644 index 0000000..b4b54a1 Binary files /dev/null and b/models/lib/flexmark-ext-resizable-image-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-superscript-0.64.0.jar b/models/lib/flexmark-ext-superscript-0.64.0.jar new file mode 100644 index 0000000..c38e77f Binary files /dev/null and b/models/lib/flexmark-ext-superscript-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-tables-0.50.50.jar b/models/lib/flexmark-ext-tables-0.50.50.jar deleted file mode 100644 index a060348..0000000 Binary files a/models/lib/flexmark-ext-tables-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-tables-0.64.0.jar b/models/lib/flexmark-ext-tables-0.64.0.jar new file mode 100644 index 0000000..d8f0270 Binary files /dev/null and b/models/lib/flexmark-ext-tables-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-toc-0.50.50.jar b/models/lib/flexmark-ext-toc-0.50.50.jar deleted file mode 100644 index 063074c..0000000 Binary files a/models/lib/flexmark-ext-toc-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-toc-0.64.0.jar b/models/lib/flexmark-ext-toc-0.64.0.jar new file mode 100644 index 0000000..49a7120 Binary files /dev/null and b/models/lib/flexmark-ext-toc-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-typographic-0.64.0.jar b/models/lib/flexmark-ext-typographic-0.64.0.jar new file mode 100644 index 0000000..5a7e31b Binary files /dev/null and b/models/lib/flexmark-ext-typographic-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-wikilink-0.64.0.jar b/models/lib/flexmark-ext-wikilink-0.64.0.jar new file mode 100644 index 0000000..9f7f4ce Binary files /dev/null and b/models/lib/flexmark-ext-wikilink-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-xwiki-macros-0.64.0.jar b/models/lib/flexmark-ext-xwiki-macros-0.64.0.jar new file mode 100644 index 0000000..c6aa67e Binary files /dev/null and b/models/lib/flexmark-ext-xwiki-macros-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-yaml-front-matter-0.64.0.jar b/models/lib/flexmark-ext-yaml-front-matter-0.64.0.jar new file mode 100644 index 0000000..2a16d2a Binary files /dev/null and b/models/lib/flexmark-ext-yaml-front-matter-0.64.0.jar differ diff --git a/models/lib/flexmark-ext-youtube-embedded-0.50.50.jar b/models/lib/flexmark-ext-youtube-embedded-0.50.50.jar deleted file mode 100644 index 6b26a35..0000000 Binary files a/models/lib/flexmark-ext-youtube-embedded-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-ext-youtube-embedded-0.64.0.jar b/models/lib/flexmark-ext-youtube-embedded-0.64.0.jar new file mode 100644 index 0000000..b7a8394 Binary files /dev/null and b/models/lib/flexmark-ext-youtube-embedded-0.64.0.jar differ diff --git a/models/lib/flexmark-formatter-0.50.50.jar b/models/lib/flexmark-formatter-0.50.50.jar deleted file mode 100644 index 877ef71..0000000 Binary files a/models/lib/flexmark-formatter-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-html-parser-0.50.50.jar b/models/lib/flexmark-html-parser-0.50.50.jar deleted file mode 100644 index 0c4bf2c..0000000 Binary files a/models/lib/flexmark-html-parser-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-html2md-converter-0.50.50.jar b/models/lib/flexmark-html2md-converter-0.50.50.jar deleted file mode 100644 index 1fd34aa..0000000 Binary files a/models/lib/flexmark-html2md-converter-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-html2md-converter-0.64.0.jar b/models/lib/flexmark-html2md-converter-0.64.0.jar new file mode 100644 index 0000000..755a705 Binary files /dev/null and b/models/lib/flexmark-html2md-converter-0.64.0.jar differ diff --git a/models/lib/flexmark-util-0.50.50.jar b/models/lib/flexmark-util-0.50.50.jar deleted file mode 100644 index 887e207..0000000 Binary files a/models/lib/flexmark-util-0.50.50.jar and /dev/null differ diff --git a/models/lib/flexmark-util-0.64.0.jar b/models/lib/flexmark-util-0.64.0.jar new file mode 100644 index 0000000..de60860 Binary files /dev/null and b/models/lib/flexmark-util-0.64.0.jar differ diff --git a/models/lib/flexmark-util-ast-0.64.0.jar b/models/lib/flexmark-util-ast-0.64.0.jar new file mode 100644 index 0000000..cf776b4 Binary files /dev/null and b/models/lib/flexmark-util-ast-0.64.0.jar differ diff --git a/models/lib/flexmark-util-builder-0.64.0.jar b/models/lib/flexmark-util-builder-0.64.0.jar new file mode 100644 index 0000000..3e02f7e Binary files /dev/null and b/models/lib/flexmark-util-builder-0.64.0.jar differ diff --git a/models/lib/flexmark-util-collection-0.64.0.jar b/models/lib/flexmark-util-collection-0.64.0.jar new file mode 100644 index 0000000..7c73ade Binary files /dev/null and b/models/lib/flexmark-util-collection-0.64.0.jar differ diff --git a/models/lib/flexmark-util-data-0.64.0.jar b/models/lib/flexmark-util-data-0.64.0.jar new file mode 100644 index 0000000..5875987 Binary files /dev/null and b/models/lib/flexmark-util-data-0.64.0.jar differ diff --git a/models/lib/flexmark-util-dependency-0.64.0.jar b/models/lib/flexmark-util-dependency-0.64.0.jar new file mode 100644 index 0000000..44b4cb7 Binary files /dev/null and b/models/lib/flexmark-util-dependency-0.64.0.jar differ diff --git a/models/lib/flexmark-util-format-0.64.0.jar b/models/lib/flexmark-util-format-0.64.0.jar new file mode 100644 index 0000000..d4df968 Binary files /dev/null and b/models/lib/flexmark-util-format-0.64.0.jar differ diff --git a/models/lib/flexmark-util-html-0.64.0.jar b/models/lib/flexmark-util-html-0.64.0.jar new file mode 100644 index 0000000..ac0fe34 Binary files /dev/null and b/models/lib/flexmark-util-html-0.64.0.jar differ diff --git a/models/lib/flexmark-util-misc-0.64.0.jar b/models/lib/flexmark-util-misc-0.64.0.jar new file mode 100644 index 0000000..a47d87e Binary files /dev/null and b/models/lib/flexmark-util-misc-0.64.0.jar differ diff --git a/models/lib/flexmark-util-options-0.64.0.jar b/models/lib/flexmark-util-options-0.64.0.jar new file mode 100644 index 0000000..c16cd5c Binary files /dev/null and b/models/lib/flexmark-util-options-0.64.0.jar differ diff --git a/models/lib/flexmark-util-sequence-0.64.0.jar b/models/lib/flexmark-util-sequence-0.64.0.jar new file mode 100644 index 0000000..d51dff6 Binary files /dev/null and b/models/lib/flexmark-util-sequence-0.64.0.jar differ diff --git a/models/lib/flexmark-util-visitor-0.64.0.jar b/models/lib/flexmark-util-visitor-0.64.0.jar new file mode 100644 index 0000000..e34a067 Binary files /dev/null and b/models/lib/flexmark-util-visitor-0.64.0.jar differ diff --git a/models/lib/jsoup-1.11.3.jar b/models/lib/jsoup-1.11.3.jar deleted file mode 100644 index 962e355..0000000 Binary files a/models/lib/jsoup-1.11.3.jar and /dev/null differ diff --git a/models/lib/jsoup-1.14.3.jar b/models/lib/jsoup-1.14.3.jar new file mode 100644 index 0000000..a2f961b Binary files /dev/null and b/models/lib/jsoup-1.14.3.jar differ diff --git a/readme.md b/readme.md index 6f07d53..0941390 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,19 @@ -[![Build Status](https://travis-ci.org/coldbox-modules/cbmarkdown.svg?branch=development)](https://travis-ci.org/coldbox-modules/cbmarkdown) +

+ +
+ + + +

+ +

+ Copyright Since 2005 ColdBox Platform by Luis Majano and Ortus Solutions, Corp +
+ www.coldbox.org | + www.ortussolutions.com +

+ +---- # Welcome to the CBMarkdown Project @@ -13,6 +28,7 @@ Apache License, Version 2.0. - https://github.com/coldbox-modules/cbmarkdown - http://forgebox.io/view/cbmarkdown - https://github.com/vsch/flexmark-java +- https://jar-download.com/?search_box=flexmark ## System Requirements @@ -43,31 +59,31 @@ A subset of the flexmark options are supported. These can be configured in your moduleSettings = { cbmarkdown = { // Looks for www or emails and converts them to links - autoLinkUrls : true, + autoLinkUrls : true, // Creates anchor links for headings - anchorLinks : true, + anchorLinks : true, // Set the anchor id - anchorSetId : true, + anchorSetId : true, // Set the anchor id but also the name - achorSetName : true, + achorSetName : true, // Do we create the anchor for the full header or just before it. True is wrap, false is just create anchor tag - anchorWrapText : false, + anchorWrapText : false, // The class(es) to apply to the anchor - anchorClass : "anchor", + anchorClass : "anchor", // raw html prefix. Added before heading text, wrapped or unwrapped - anchorPrefix : "", + anchorPrefix : "", // raw html suffix. Added before heading text, wrapped or unwrapped - anchorSuffix : "", + anchorSuffix : "", // Enable youtube embedded link transformer - enableYouTubeTransformer : false, - // override HTML to use for wrapping style. - codeStyleHTMLOpen : '', - // override HTML to use for wrapping style. - codeStyleHTMLClose : '', - // add a class prefix to the "fenced" code blocks, i.e. ```js. Useful for supporting various syntax highlighters. - fencedCodeLanguageClassPrefix : "brush", + enableYouTubeTransformer : false, + // default null, custom inline code open HTML + codeStyleHTMLOpen : "", + // default null, custom inline code close HTML + codeStyleHTMLClose : "", + // default "language-", prefix used for generating the class for a fenced code block, only used if info is not empty and language is not defined in + fencedCodeLanguageClassPrefix : "language-", // Table options - tableOptions : { + tableOptions : { // Treat consecutive pipes at the end of a column as defining spanning column. columnSpans : true, // Whether table body columns should be at least the number or header columns. diff --git a/server-adobe@2021.json b/server-adobe@2021.json index 7808d80..9ff9135 100644 --- a/server-adobe@2021.json +++ b/server-adobe@2021.json @@ -19,5 +19,8 @@ "openBrowser":"false", "cfconfig":{ "file":".cfconfig.json" + }, + "scripts" : { + "onServerInstall":"cfpm install zip,debugger" } } diff --git a/server-adobe@2023.json b/server-adobe@2023.json new file mode 100644 index 0000000..565f79d --- /dev/null +++ b/server-adobe@2023.json @@ -0,0 +1,29 @@ +{ + "name":"@MODULE_NAME@-adobe@2023", + "app":{ + "serverHomeDirectory":".engine/adobe2023", + "cfengine":"adobe@2023.0.0-beta.1" + }, + "web":{ + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot": "test-harness", + "aliases":{ + "/moduleroot/@MODULE_NAME@":"../" + } + }, + "jvm":{ + "heapSize":"1024" + }, + "openBrowser":"false", + "cfconfig": { + "file" : ".cfconfig.json" + }, + "scripts" : { + "onServerInstall":"cfpm install zip,debugger" + } +} diff --git a/server-lucee@5.json b/server-lucee@5.json index bc06a61..9384714 100644 --- a/server-lucee@5.json +++ b/server-lucee@5.json @@ -11,13 +11,13 @@ "rewrites":{ "enable":"true" }, - "webroot":"test-harness", + "webroot":"test-harness", "aliases":{ "/moduleroot/cbmarkdown":"../" } }, "openBrowser":"false", - "cfconfig":{ + "cfconfig":{ "file":".cfconfig.json" } } diff --git a/test-harness/box.json b/test-harness/box.json index 0183324..a2727d5 100644 --- a/test-harness/box.json +++ b/test-harness/box.json @@ -5,7 +5,7 @@ "private":true, "description":"", "dependencies":{ - "coldbox":"^6", + "coldbox":"be", "cbjavaloader":"^2.0.0+44", "cbemoji":"^1.1.0+16" }, diff --git a/test-harness/handlers/Main.cfc b/test-harness/handlers/Main.cfc index 9794de0..f9db47c 100644 --- a/test-harness/handlers/Main.cfc +++ b/test-harness/handlers/Main.cfc @@ -7,7 +7,7 @@ component { // Index any function index( event, rc, prc ){ - prc.html = processor.toHTML( renderView( "main/markdown.md" ) ); + prc.html = processor.toHTML( view( "main/markdown.md" ) ); event.setView( "main/index" ); } diff --git a/test-harness/tests/Application.cfc b/test-harness/tests/Application.cfc index e036430..17141b4 100644 --- a/test-harness/tests/Application.cfc +++ b/test-harness/tests/Application.cfc @@ -1,18 +1,24 @@ /** -******************************************************************************** -Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp -www.ortussolutions.com -******************************************************************************** -*/ + * Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp + * www.ortussolutions.com + * --- + */ component { + // The name of the module used in cfmappings ,etc + request.MODULE_NAME = "cbmarkdown"; + // The directory name of the module on disk. Usually, it's the same as the module name + request.MODULE_PATH = "cbmarkdown"; + // APPLICATION CFC PROPERTIES - this.name = "ColdBoxTestingSuite" & hash( getCurrentTemplatePath() ); - this.sessionManagement = true; - this.clientManagement = true; - this.sessionTimeout = createTimespan( 0, 0, 15, 0 ); - this.applicationTimeout = createTimespan( 0, 0, 15, 0 ); - this.setClientCookies = true; + this.name = "#request.MODULE_NAME# Testing Suite"; + this.sessionManagement = true; + this.sessionTimeout = createTimespan( 0, 0, 15, 0 ); + this.applicationTimeout = createTimespan( 0, 0, 15, 0 ); + this.setClientCookies = true; + // Turn on/off white space management + this.whiteSpaceManagement = "smart"; + this.enableNullSupport = shouldEnableFullNullSupport(); // Create testing mapping this.mappings[ "/tests" ] = getDirectoryFromPath( getCurrentTemplatePath() ); @@ -21,16 +27,63 @@ component { rootPath = reReplaceNoCase( this.mappings[ "/tests" ], "tests(\\|/)", "" ); this.mappings[ "/root" ] = rootPath; - // UPDATE THE NAME OF THE MODULE IN TESTING BELOW - request.MODULE_NAME = "cbmarkdown"; - // The module root path moduleRootPath = reReplaceNoCase( - this.mappings[ "/root" ], - "#request.module_name#(\\|/)test-harness(\\|/)", + rootPath, + "#request.MODULE_PATH#(\\|/)test-harness(\\|/)", "" ); this.mappings[ "/moduleroot" ] = moduleRootPath; - this.mappings[ "/#request.MODULE_NAME#" ] = moduleRootPath & "#request.MODULE_NAME#"; + this.mappings[ "/#request.MODULE_NAME#" ] = moduleRootPath & "#request.MODULE_PATH#"; + + // ORM Definitions + /** + this.datasource = "coolblog"; + this.ormEnabled = "true"; + this.ormSettings = { + cfclocation = [ "/root/models" ], + logSQL = true, + dbcreate = "update", + secondarycacheenabled = false, + cacheProvider = "ehcache", + flushAtRequestEnd = false, + eventhandling = true, + eventHandler = "cborm.models.EventHandler", + skipcfcWithError = false + }; + **/ + + function onRequestStart( required targetPage ){ + // Set a high timeout for long running tests + setting requestTimeout ="9999"; + // New ColdBox Virtual Application Starter + request.coldBoxVirtualApp= new coldbox.system.testing.VirtualApp( appMapping = "/root" ); + + // If hitting the runner or specs, prep our virtual app + if ( getBaseTemplatePath().replace( expandPath( "/tests" ), "" ).reFindNoCase( "(runner|specs)" ) ) { + request.coldBoxVirtualApp.startup(); + } + + // ORM Reload for fresh results + if ( structKeyExists( url, "fwreinit" ) ) { + if ( structKeyExists( server, "lucee" ) ) { + pagePoolClear(); + } + // ormReload(); + request.coldBoxVirtualApp.restart(); + } + + return true; + } + + public void function onRequestEnd( required targetPage ){ + request.coldBoxVirtualApp.shutdown(); + } + + private boolean function shouldEnableFullNullSupport(){ + var system = createObject( "java", "java.lang.System" ); + var value = system.getEnv( "FULL_NULL" ); + return isNull( value ) ? false : !!value; + } }