Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lattyware committed Sep 19, 2021
1 parent 0277d10 commit 21fb6aa
Show file tree
Hide file tree
Showing 25 changed files with 6,512 additions and 11,889 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
- name: Get version from tag.
uses: little-core-labs/[email protected]

- name: Get build date/time.
id: date
run: echo "::set-output name=date::$(date --rfc-3339=seconds)"

- name: Set up QEMU.
id: qemu
uses: docker/setup-qemu-action@v1
Expand All @@ -44,13 +48,13 @@ jobs:
uses: docker/login-action@v1
with:
username: latty
password: ${{ secrets.DOCKERHUB_TOKEN }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push
uses: docker/[email protected]
with:
files: "docker-bake.hcl"
env:
VCS_REF: "${GITHUB_SHA}"
VERSION: "${GITHUB_TAG_NAME}"
BUILD_DATE: "$(date --rfc-3339=seconds)"
VCS_REF: ${{ github.sha }}
VERSION: ${{ env.GITHUB_TAG_NAME }}
BUILD_DATE: ${{ steps.date.outputs.date }}
2 changes: 1 addition & 1 deletion client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM --platform=linux/amd64 node:16-alpine AS build

WORKDIR /md

RUN ["apk", "add", "--no-cache", "python", "make", "g++"]
RUN ["apk", "add", "--no-cache", "python3", "make", "g++"]

ARG VERSION=dev
ENV MD_VERSION $VERSION
Expand Down
15,417 changes: 5,601 additions & 9,816 deletions client/package-lock.json

Large diffs are not rendered by default.

51 changes: 25 additions & 26 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"repository": "github:Lattyware/massivedecks",
"scripts": {
"build": "npx webpack",
"dev": "npx webpack serve --mode=development --watch"
"dev": "npx webpack serve --mode=development"
},
"files": [
"dist/*"
Expand All @@ -21,34 +21,33 @@
],
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",
"@material/card": "^11.0.0",
"@material/mwc-button": "^0.21.0",
"@material/mwc-fab": "^0.21.0",
"@material/mwc-icon-button": "^0.21.0",
"@material/mwc-linear-progress": "^0.21.0",
"@material/mwc-menu": "^0.21.0",
"@material/mwc-select": "^0.21.0",
"@material/mwc-slider": "^0.21.0",
"@material/mwc-switch": "^0.21.0",
"@material/mwc-tab": "^0.21.0",
"@material/mwc-tab-bar": "^0.21.0",
"@material/mwc-textarea": "^0.21.0",
"@material/mwc-textfield": "^0.21.0",
"@material/card": "^12.0.0",
"@material/mwc-button": "^0.23.0",
"@material/mwc-fab": "^0.23.0",
"@material/mwc-icon-button": "^0.23.0",
"@material/mwc-linear-progress": "^0.23.0",
"@material/mwc-menu": "^0.23.0",
"@material/mwc-select": "^0.23.0",
"@material/mwc-slider": "^0.23.0",
"@material/mwc-switch": "^0.23.0",
"@material/mwc-tab": "^0.23.0",
"@material/mwc-tab-bar": "^0.23.0",
"@material/mwc-textarea": "^0.23.0",
"@material/mwc-textfield": "^0.23.0",
"@polymer/paper-tooltip": "^3.0.1",
"@webcomponents/webcomponentsjs": "^2.5.0",
"canvas-confetti": "^1.3.2"
},
"devDependencies": {
"@types/canvas-confetti": "^1.3.0",
"@types/chrome": "^0.0.143",
"@types/chromecast-caf-receiver": "^5.0.13",
"@types/chrome": "^0.0.157",
"@types/chromecast-caf-receiver": "^6.0.5",
"@types/chromecast-caf-sender": "^1.0.3",
"app-manifest-loader": "^2.4.1",
"chromecast-device-emulator": "^1.2.7",
"clean-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^8.0.0",
"compression-webpack-plugin": "^9.0.0",
"css-hot-loader": "^1.4.4",
"css-loader": "^5.0.1",
"css-loader": "^6.3.0",
"cssnano": "^5.0.5",
"elm": "^0.19.1-3",
"elm-analyse": "^0.16.5",
Expand All @@ -58,22 +57,22 @@
"fibers": "^5.0.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.3.1",
"mini-css-extract-plugin": "^1.3.3",
"mini-css-extract-plugin": "^2.3.0",
"postcss-import": "^14.0.0",
"postcss-loader": "^5.3.0",
"postcss-loader": "^6.1.1",
"postcss-preset-env": "^6.7.0",
"prettier": "2.3.0",
"prettier-plugin-elm": "^0.7.0",
"prettier": "2.4.1",
"prettier-plugin-elm": "^0.8.0",
"resolve-url-loader": "^4.0.0",
"sass": "^1.32.0",
"sass-loader": "^11.1.1",
"style-loader": "^2.0.0",
"sass-loader": "^12.1.0",
"style-loader": "^3.2.1",
"terser-webpack-plugin": "^5.0.3",
"ts-loader": "^9.2.2",
"tsickle-loader": "^0.5.0",
"typescript": "^4.1.3",
"webpack": "^5.11.1",
"webpack-cli": "^4.3.1",
"webpack-dev-server": "^3.11.1"
"webpack-dev-server": "^4.2.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ maybe default base noOp update model value args =
( False, True )
in
Switch.view
[ checked |> HtmlA.checked
[ checked |> HtmlA.selected
, if readOnly || disabled then
HtmlA.disabled True

Expand All @@ -83,7 +83,7 @@ bool label _ update _ value { shared, readOnly } =
]
)
[ Switch.view
[ value |> Maybe.withDefault False |> HtmlA.checked
[ value |> Maybe.withDefault False |> HtmlA.selected
, if disabled then
HtmlA.disabled True

Expand Down
8 changes: 4 additions & 4 deletions client/src/elm/MassiveDecks/Settings.elm
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ autoAdvanceRound wrap shared =
[ HtmlA.class "multipart" ]
[ Switch.view
[ HtmlE.onCheck (ToggleAutoAdvance >> wrap)
, HtmlA.checked (settings.autoAdvance |> Maybe.withDefault False)
, HtmlA.selected (settings.autoAdvance |> Maybe.withDefault False)
, HtmlA.id "auto-advance-enable"
]
, Html.label [ HtmlA.for "auto-advance-enable" ]
Expand Down Expand Up @@ -381,7 +381,7 @@ speechVoiceSelector wrap shared =
[ Switch.view
[ HtmlE.onCheck (ToggleSpeech >> wrap)
, HtmlA.disabled isDisabled
, HtmlA.checked enabled
, HtmlA.selected enabled
, HtmlA.id "speech-enable"
]
, Html.label [ HtmlA.for "speech-enable" ]
Expand Down Expand Up @@ -483,7 +483,7 @@ notificationsSwitch wrap shared =
[ Switch.view
[ HtmlE.onCheck (ToggleNotifications >> wrap)
, HtmlA.disabled unsupported
, HtmlA.checked enabled
, HtmlA.selected enabled
, HtmlA.id "notifications-enable"
]
, Html.label [ HtmlA.for "notifications-enable" ]
Expand All @@ -501,7 +501,7 @@ notificationsSwitch wrap shared =
[ Switch.view
[ HtmlE.onCheck (ToggleOnlyWhenHidden >> wrap)
, HtmlA.disabled visibilityDisabled
, HtmlA.checked settings.requireNotVisible
, HtmlA.selected settings.requireNotVisible
, HtmlA.id "only-when-hidden-toggle"
]
, Html.label [ HtmlA.for "only-when-hidden-toggle" ]
Expand Down
4 changes: 3 additions & 1 deletion client/src/scss/cards/_size.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@use "sass:math";

$card-width: 18em;
$card-margin: 0.5em;
$card-overlap: 4em;

$card-ratio: 5/7;
$card-ratio: math.div(5, 7);
$card-compact-ratio: 1;

@mixin pad-to-aspect-ratio($ratio) {
Expand Down
34 changes: 14 additions & 20 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const webpack = require("webpack");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const path = require("path");
const CompressionPlugin = require("compression-webpack-plugin");
Expand Down Expand Up @@ -55,6 +54,7 @@ module.exports = (env, argv) => {
}

return {
mode,
context: path.resolve(__dirname),
entry: {
// Main entry point.
Expand All @@ -66,8 +66,8 @@ module.exports = (env, argv) => {
path: dist,
publicPath: "/",
filename: "assets/scripts/[name].[contenthash].js",
clean: true,
},
mode,
module: {
rules: [
// Elm scripts.
Expand Down Expand Up @@ -135,35 +135,28 @@ module.exports = (env, argv) => {
// Image assets.
{
test: /\.(jpg|png|svg)$/,
loader: "file-loader",
options: {
name: "assets/images/[name].[hash].[ext]",
esModule: false,
type: "asset/resource",
generator: {
filename: "assets/images/[name].[hash].[ext]",
},
},
// Font assets.
{
test: /\.(woff2)$/,
loader: "file-loader",
options: {
name: "assets/fonts/[name].[hash].[ext]",
publicPath: "/",
esModule: false,
type: "asset/resource",
generator: {
filename: "assets/fonts/[name].[hash].[ext]",
},
},
// App manifest.
{
test: /\.webmanifest$/,
exclude: [/elm-stuff/, /node_modules/, /dist/],
type: "asset/resource",
generator: {
filename: "assets/[name].[hash].[ext]",
},
use: [
{
loader: "file-loader",
options: {
name: "assets/[name].[hash].[ext]",
publicPath: "/",
esModule: false,
},
},
{
loader: "app-manifest-loader",
},
Expand All @@ -177,7 +170,6 @@ module.exports = (env, argv) => {
},
plugins: [
new InjectMetadataPlugin(),
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: "assets/styles/[name].[contenthash].css",
}),
Expand Down Expand Up @@ -216,7 +208,9 @@ module.exports = (env, argv) => {
},
devtool: !production ? "eval-source-map" : undefined,
devServer: {
static: [{ directory: dist }],
hot: true,
//host: "0.0.0.0",
allowedHosts: ["localhost"],
proxy: {
// Forward to the server.
Expand Down
4 changes: 2 additions & 2 deletions deployment/memory/docker_compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
container_name: server
# If you want to keep your deployment stable, it would be sensible to specify a specific tag rather than just `latest` here.
# Make sure you always deploy the same tag for client and server.
image: "massivedecks/server:latest"
image: "ghcr.io/lattyware/massivedecks/server:latest"
environment:
- NODE_ENV=production
# This needs to be changed to a secret value.
Expand All @@ -27,7 +27,7 @@ services:
- server
# If you want to keep your deployment stable, it would be sensible to specify a specific tag rather than just `latest` here.
# Make sure you always deploy the same tag for client and server.
image: "massivedecks/client:latest"
image: "ghcr.io/lattyware/massivedecks/client:latest"
ports:
- "80:8080"
networks:
Expand Down
6 changes: 3 additions & 3 deletions deployment/postgres/docker_compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ volumes:
services:
storage:
container_name: storage
image: "postgres:12"
image: "postgres:13"
# See the postgres image's documentation for more on configuring it.
# https://hub.docker.com/_/postgres
environment:
Expand All @@ -32,7 +32,7 @@ services:
container_name: server
# If you want to keep your deployment stable, it would be sensible to specify a specific tag rather than just `latest` here.
# Make sure you always deploy the same tag for client and server.
image: "massivedecks/server:latest"
image: "ghcr.io/lattyware/massivedecks/server:latest"
depends_on:
- storage
environment:
Expand All @@ -52,7 +52,7 @@ services:
container_name: client
# If you want to keep your deployment stable, it would be sensible to specify a specific tag rather than just `latest` here.
# Make sure you always deploy the same tag for client and server.
image: "massivedecks/client:latest"
image: "ghcr.io/lattyware/massivedecks/client:latest"
depends_on:
- server
ports:
Expand Down
25 changes: 13 additions & 12 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,36 @@ variable "VCS_REF" {

function "splitSemVer" {
params = [version]
result = regex("^(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", version)
result = regexall("^(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", version)
}

function "generateVersionTags" {
params = [semVer]
result = concat(
["latest-prerelease"], semVer.prerelease != null ?
[ "${semVer.major}.${semVer.minor}.${semVer.patch}-${semVer.prerelease}" ] :
result = length(semVer) != 1 ? [] : concat(
semVer[0]["prerelease"] != null ?
[ "${semVer[0]["major"]}.${semVer[0]["minor"]}.${semVer[0]["patch"]}-${semVer[0]["prerelease"]}" ] :
[
"${semVer[0]["major"]}.${semVer[0]["minor"]}.${semVer[0]["patch"]}",
"${semVer[0]["major"]}.${semVer[0]["minor"]}",
"${semVer[0]["major"]}",
"latest-release",
"${semVer.major}",
"${semVer.major}.${semVer.minor}",
"${semVer.major}.${semVer.minor}.${semVer.patch}",
]
],
["latest-prerelease"]
)
}

function "repos" {
params = []
result = [
"ghcr.io/lattyware/massivedecks/",
"registry.hub.docker.com/lattyware/massivedecks/"
"massivedecks/"
]
}

function "generateTags" {
params = [repos, versionTags, commitHash, component]
result = flatten([
for repo in repos: [ for tag in flatten(["latest", versionTags, commitHash]) : "${repo}${component}:${tag}" ]
for repo in repos: [ for tag in flatten([commitHash, versionTags, "latest"]) : "${repo}${component}:${tag}" ]
])
}

Expand All @@ -50,13 +51,13 @@ target "build" {
target "server" {
context = "./server"
inherits = ["build"]
tags = generateTags(repos(), VERSION == "" ? [] : generateVersionTags(splitSemVer(VERSION)), VCS_REF, "server")
tags = generateTags(repos(), generateVersionTags(splitSemVer(VERSION)), VCS_REF, "server")
}

target "client" {
context = "./client"
inherits = ["build"]
tags = generateTags(repos(), VERSION == "" ? [] : generateVersionTags(splitSemVer(VERSION)), VCS_REF, "client")
tags = generateTags(repos(), generateVersionTags(splitSemVer(VERSION)), VCS_REF, "client")
}

group "default" {
Expand Down
Loading

0 comments on commit 21fb6aa

Please sign in to comment.