From a0d288057f5afe1ff6b6f48e488e9e26a13b9e39 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 28 Oct 2025 14:10:04 -0500 Subject: [PATCH 1/4] Add Docker Image build and Publish to workflow Adds docker:build and docker:publish npm scripts expects DOCKERID to contain the user/organization id for formatting the tag ( DOCKERID/hombrewery:version ) Add CircleCI test to ensure image still builds --- .circleci/config.yml | 3 +++ package.json | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fb239ceb3..bcdf362ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,6 +88,9 @@ jobs: - run: name: Test - Content Negotiation command: npm run test:content-negotiation + - run: + name: Test - Build Docker image + command: DOCKERID=circliciTest npm run docker:build workflows: build_and_test: diff --git a/package.json b/package.json index 666832db8..37b362bc8 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,9 @@ "phb": "node --experimental-require-module scripts/phb.js", "prod": "set NODE_ENV=production && npm run build", "postinstall": "npm run build", - "start": "node --experimental-require-module server.js" + "start": "node --experimental-require-module server.js", + "docker:build": "docker build -t ${DOCKERID}/homebrewery:$npm_package_version .", + "docker:publish": "docker login && docker push ${DOCKERID}/homebrewery:$npm_package_version" }, "author": "stolksdorf", "license": "MIT", From bc41b9043d093dcb0968c37cd982228a95e60af8 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 28 Oct 2025 14:44:54 -0500 Subject: [PATCH 2/4] Remove circleci tests --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bcdf362ec..fb239ceb3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,9 +88,6 @@ jobs: - run: name: Test - Content Negotiation command: npm run test:content-negotiation - - run: - name: Test - Build Docker image - command: DOCKERID=circliciTest npm run docker:build workflows: build_and_test: From fc569e560b7a4e9f93d47b25f83256c37858a8d9 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Mon, 3 Nov 2025 21:50:31 -0600 Subject: [PATCH 3/4] Move renderWarnings from shared to client Moving this component to the component folder so it's closer to where it is actually used. Not moving to the `homebrew` folder because ultimately i think pretty much everything in that folder should move to the components as well (`homebrew` isn't a helpful folder distinction). Deletes a directory, moves 2 files. --- .../components}/renderWarnings/renderWarnings.jsx | 4 ++-- .../components}/renderWarnings/renderWarnings.less | 0 client/homebrew/brewRenderer/brewRenderer.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename {shared/homebrewery => client/components}/renderWarnings/renderWarnings.jsx (93%) rename {shared/homebrewery => client/components}/renderWarnings/renderWarnings.less (100%) diff --git a/shared/homebrewery/renderWarnings/renderWarnings.jsx b/client/components/renderWarnings/renderWarnings.jsx similarity index 93% rename from shared/homebrewery/renderWarnings/renderWarnings.jsx rename to client/components/renderWarnings/renderWarnings.jsx index e9c5f6f57..6b8ea8184 100644 --- a/shared/homebrewery/renderWarnings/renderWarnings.jsx +++ b/client/components/renderWarnings/renderWarnings.jsx @@ -3,7 +3,7 @@ const React = require('react'); const createClass = require('create-react-class'); const _ = require('lodash'); -import Dialog from '../../../client/components/dialog.jsx'; +import Dialog from '../dialog.jsx'; const RenderWarnings = createClass({ displayName : 'RenderWarnings', @@ -25,7 +25,7 @@ const RenderWarnings = createClass({ if(!isChrome){ return
  • Built for Chrome
    - Other browsers have not been tested for compatiblilty. If you + Other browsers have not been tested for compatibility. If you experience issues with your document not rendering or printing properly, please try using the latest version of Chrome before submitting a bug report. diff --git a/shared/homebrewery/renderWarnings/renderWarnings.less b/client/components/renderWarnings/renderWarnings.less similarity index 100% rename from shared/homebrewery/renderWarnings/renderWarnings.less rename to client/components/renderWarnings/renderWarnings.less diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index a19d33375..fa4625c84 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -10,7 +10,7 @@ const ErrorBar = require('./errorBar/errorBar.jsx'); const ToolBar = require('./toolBar/toolBar.jsx'); //TODO: move to the brew renderer -const RenderWarnings = require('homebrewery/renderWarnings/renderWarnings.jsx'); +const RenderWarnings = require('client/components/renderWarnings/renderWarnings.jsx'); const NotificationPopup = require('./notificationPopup/notificationPopup.jsx'); const Frame = require('react-frame-component').default; const dedent = require('dedent-tabs').default; From c5aa774daa3153c1e3a8d61ef7bcf9db831d09c2 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Tue, 4 Nov 2025 22:29:28 -0600 Subject: [PATCH 4/4] Move markdown.js and markdownlegacy.js Moves the two files up a level, directly in `/shared/`. Everything else is just updating paths for that. --- client/homebrew/brewRenderer/brewRenderer.jsx | 4 ++-- .../brewRenderer/notificationPopup/notificationPopup.jsx | 2 +- client/homebrew/editor/editor.jsx | 2 +- client/homebrew/pages/editPage/editPage.jsx | 2 +- client/homebrew/pages/errorPage/errorPage.jsx | 2 +- client/homebrew/pages/homePage/homePage.jsx | 2 +- client/homebrew/pages/newPage/newPage.jsx | 2 +- server/homebrew.api.js | 2 +- shared/{naturalcrit => }/markdown.js | 8 ++++---- shared/{naturalcrit => }/markdownLegacy.js | 0 shared/naturalcrit/codeEditor/autocompleteEmoji.js | 8 ++++---- tests/markdown/basic.test.js | 2 +- tests/markdown/definition-lists.test.js | 2 +- tests/markdown/emojis.test.js | 2 +- tests/markdown/hard-breaks.test.js | 2 +- tests/markdown/mustache-syntax.test.js | 2 +- tests/markdown/non-breaking-spaces.test.js | 2 +- tests/markdown/paragraph-justification.test.js | 2 +- tests/markdown/variables.test.js | 2 +- themes/V3/Blank/snippets/footer.gen.js | 2 +- 20 files changed, 26 insertions(+), 26 deletions(-) rename shared/{naturalcrit => }/markdown.js (98%) rename shared/{naturalcrit => }/markdownLegacy.js (100%) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index a19d33375..2450a3041 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -4,8 +4,8 @@ const React = require('react'); const { useState, useRef, useMemo, useEffect } = React; const _ = require('lodash'); -const MarkdownLegacy = require('naturalcrit/markdownLegacy.js'); -import Markdown from 'naturalcrit/markdown.js'; +const MarkdownLegacy = require('markdownLegacy.js'); +import Markdown from 'markdown.js'; const ErrorBar = require('./errorBar/errorBar.jsx'); const ToolBar = require('./toolBar/toolBar.jsx'); diff --git a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx index 38a85e0c7..ad8f9140a 100644 --- a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx +++ b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx @@ -1,7 +1,7 @@ require('./notificationPopup.less'); import React, { useEffect, useState } from 'react'; import request from '../../utils/request-middleware.js'; -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; import Dialog from '../../../components/dialog.jsx'; diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index d6fdf3f08..2f38d41aa 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -4,7 +4,7 @@ const React = require('react'); const createClass = require('create-react-class'); const _ = require('lodash'); const dedent = require('dedent-tabs').default; -import Markdown from '../../../shared/naturalcrit/markdown.js'; +import Markdown from '../../../shared/markdown.js'; const CodeEditor = require('naturalcrit/codeEditor/codeEditor.jsx'); const SnippetBar = require('./snippetbar/snippetbar.jsx'); diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index 524f31ac9..cb696a758 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -4,7 +4,7 @@ import './editPage.less'; // Common imports import React, { useState, useEffect, useRef } from 'react'; import request from '../../utils/request-middleware.js'; -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; import _ from 'lodash'; import { DEFAULT_BREW_LOAD } from '../../../../server/brewDefaults.js'; diff --git a/client/homebrew/pages/errorPage/errorPage.jsx b/client/homebrew/pages/errorPage/errorPage.jsx index 4ac73da8c..1b7b19e2f 100644 --- a/client/homebrew/pages/errorPage/errorPage.jsx +++ b/client/homebrew/pages/errorPage/errorPage.jsx @@ -1,7 +1,7 @@ require('./errorPage.less'); const React = require('react'); const UIPage = require('../basePages/uiPage/uiPage.jsx'); -import Markdown from '../../../../shared/naturalcrit/markdown.js'; +import Markdown from '../../../../shared/markdown.js'; const ErrorIndex = require('./errors/errorIndex.js'); const ErrorPage = ({ brew })=>{ diff --git a/client/homebrew/pages/homePage/homePage.jsx b/client/homebrew/pages/homePage/homePage.jsx index 82c5b7084..8e2dd9a18 100644 --- a/client/homebrew/pages/homePage/homePage.jsx +++ b/client/homebrew/pages/homePage/homePage.jsx @@ -4,7 +4,7 @@ import './homePage.less'; // Common imports import React, { useState, useEffect, useRef } from 'react'; import request from '../../utils/request-middleware.js'; -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; import _ from 'lodash'; import { DEFAULT_BREW } from '../../../../server/brewDefaults.js'; diff --git a/client/homebrew/pages/newPage/newPage.jsx b/client/homebrew/pages/newPage/newPage.jsx index dccf7deb7..13bddfc87 100644 --- a/client/homebrew/pages/newPage/newPage.jsx +++ b/client/homebrew/pages/newPage/newPage.jsx @@ -4,7 +4,7 @@ import './newPage.less'; // Common imports import React, { useState, useEffect, useRef } from 'react'; import request from '../../utils/request-middleware.js'; -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; import _ from 'lodash'; import { DEFAULT_BREW } from '../../../../server/brewDefaults.js'; diff --git a/server/homebrew.api.js b/server/homebrew.api.js index 2cedb5972..4d4f5a911 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -4,7 +4,7 @@ import { model as HomebrewModel } from './homebrew.model.js'; import express from 'express'; import zlib from 'zlib'; import GoogleActions from './googleActions.js'; -import Markdown from '../shared/naturalcrit/markdown.js'; +import Markdown from '../shared/markdown.js'; import yaml from 'js-yaml'; import asyncHandler from 'express-async-handler'; import { nanoid } from 'nanoid'; diff --git a/shared/naturalcrit/markdown.js b/shared/markdown.js similarity index 98% rename from shared/naturalcrit/markdown.js rename to shared/markdown.js index c48539008..412be27a7 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/markdown.js @@ -16,10 +16,10 @@ import { gfmHeadingId as MarkedGFMHeadingId, resetHeadings as MarkedGFMResetHead import { markedEmoji as MarkedEmojis } from 'marked-emoji'; //Icon fonts included so they can appear in emoji autosuggest dropdown -import diceFont from '../../themes/fonts/iconFonts/diceFont.js'; -import elderberryInn from '../../themes/fonts/iconFonts/elderberryInn.js'; -import gameIcons from '../../themes/fonts/iconFonts/gameIcons.js'; -import fontAwesome from '../../themes/fonts/iconFonts/fontAwesome.js'; +import diceFont from '../themes/fonts/iconFonts/diceFont.js'; +import elderberryInn from '../themes/fonts/iconFonts/elderberryInn.js'; +import gameIcons from '../themes/fonts/iconFonts/gameIcons.js'; +import fontAwesome from '../themes/fonts/iconFonts/fontAwesome.js'; const renderer = new Marked.Renderer(); const tokenizer = new Marked.Tokenizer(); diff --git a/shared/naturalcrit/markdownLegacy.js b/shared/markdownLegacy.js similarity index 100% rename from shared/naturalcrit/markdownLegacy.js rename to shared/markdownLegacy.js diff --git a/shared/naturalcrit/codeEditor/autocompleteEmoji.js b/shared/naturalcrit/codeEditor/autocompleteEmoji.js index c7efa172b..ae7f2628f 100644 --- a/shared/naturalcrit/codeEditor/autocompleteEmoji.js +++ b/shared/naturalcrit/codeEditor/autocompleteEmoji.js @@ -1,7 +1,7 @@ -import diceFont from '../../../themes/fonts/iconFonts/diceFont.js'; -import elderberryInn from '../../../themes/fonts/iconFonts/elderberryInn.js'; -import fontAwesome from '../../../themes/fonts/iconFonts/fontAwesome.js'; -import gameIcons from '../../../themes/fonts/iconFonts/gameIcons.js'; +import diceFont from 'themes/fonts/iconFonts/diceFont.js'; +import elderberryInn from 'themes/fonts/iconFonts/elderberryInn.js'; +import fontAwesome from 'themes/fonts/iconFonts/fontAwesome.js'; +import gameIcons from 'themes/fonts/iconFonts/gameIcons.js'; const emojis = { ...diceFont, diff --git a/tests/markdown/basic.test.js b/tests/markdown/basic.test.js index aaa2adf58..ddceb9197 100644 --- a/tests/markdown/basic.test.js +++ b/tests/markdown/basic.test.js @@ -1,6 +1,6 @@ -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; test('Processes the markdown within an HTML block if its just a class wrapper', function() { const source = '
    *Bold text*
    '; diff --git a/tests/markdown/definition-lists.test.js b/tests/markdown/definition-lists.test.js index 144dad880..12499d559 100644 --- a/tests/markdown/definition-lists.test.js +++ b/tests/markdown/definition-lists.test.js @@ -1,6 +1,6 @@ -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; describe('Inline Definition Lists', ()=>{ test('No Term 1 Definition', function() { diff --git a/tests/markdown/emojis.test.js b/tests/markdown/emojis.test.js index e70ebb673..e21eec414 100644 --- a/tests/markdown/emojis.test.js +++ b/tests/markdown/emojis.test.js @@ -1,4 +1,4 @@ -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; const dedent = require('dedent-tabs').default; // Marked.js adds line returns after closing tags on some default tokens. diff --git a/tests/markdown/hard-breaks.test.js b/tests/markdown/hard-breaks.test.js index 63bfaef9c..068b2053a 100644 --- a/tests/markdown/hard-breaks.test.js +++ b/tests/markdown/hard-breaks.test.js @@ -1,6 +1,6 @@ -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; describe('Hard Breaks', ()=>{ test('Single Break', function() { diff --git a/tests/markdown/mustache-syntax.test.js b/tests/markdown/mustache-syntax.test.js index d17518411..5743f7903 100644 --- a/tests/markdown/mustache-syntax.test.js +++ b/tests/markdown/mustache-syntax.test.js @@ -1,7 +1,7 @@ /* eslint-disable max-lines */ const dedent = require('dedent-tabs').default; -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; // Marked.js adds line returns after closing tags on some default tokens. // This removes those line returns for comparison sake. diff --git a/tests/markdown/non-breaking-spaces.test.js b/tests/markdown/non-breaking-spaces.test.js index e498645a6..9da59b047 100644 --- a/tests/markdown/non-breaking-spaces.test.js +++ b/tests/markdown/non-breaking-spaces.test.js @@ -1,6 +1,6 @@ -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; describe('Non-Breaking Spaces Interactions', ()=>{ test('I am actually a single-line definition list!', function() { diff --git a/tests/markdown/paragraph-justification.test.js b/tests/markdown/paragraph-justification.test.js index 7876f5a26..f5a5b12ab 100644 --- a/tests/markdown/paragraph-justification.test.js +++ b/tests/markdown/paragraph-justification.test.js @@ -1,6 +1,6 @@ -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; describe('Justification', ()=>{ test('Left Justify', function() { diff --git a/tests/markdown/variables.test.js b/tests/markdown/variables.test.js index ea98fe56c..64232078f 100644 --- a/tests/markdown/variables.test.js +++ b/tests/markdown/variables.test.js @@ -1,7 +1,7 @@ /* eslint-disable max-lines */ const dedent = require('dedent-tabs').default; -import Markdown from 'naturalcrit/markdown.js'; +import Markdown from 'markdown.js'; // Marked.js adds line returns after closing tags on some default tokens. // This removes those line returns for comparison sake. diff --git a/themes/V3/Blank/snippets/footer.gen.js b/themes/V3/Blank/snippets/footer.gen.js index 9384baed7..417085642 100644 --- a/themes/V3/Blank/snippets/footer.gen.js +++ b/themes/V3/Blank/snippets/footer.gen.js @@ -1,4 +1,4 @@ -import Markdown from '../../../../shared/naturalcrit/markdown.js'; +import Markdown from '../../../../shared/markdown.js'; module.exports = { createFooterFunc : function(headerSize=1){