Skip to content

Updated self-update.sh to use SHA-512 instead of SHA-256. Updated Dockerfile to use Node v22. Fixed CHANGELOG. Updated dependencies. Removed versions from Ngrok installs. #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

# [v6.1.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v6.0.1...v6.1.0) (2024-11-18)
### Features

* Updated dependencies.
* Fixed CHANGELOG.
* Set minimum Node version to v22.11, to help encourage updating.
* Updated self-updater to use SHA-512 for stronger file integrity, and future-proofing (also keeps in-line with Node standards).

# [v6.0.1](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v6.0.0...v6.0.1) (2024-11-12)
### Features

* Updated Sails.
* Rebuilt `package-lock.json` (it had several tweaks for security issues, which are no longer an issue).

# [v6.0.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v5.3.4...v6.0.0) (2024-11-06)
### Features

* Removed unneeded index.jsx.
* Made self-update a little smarter.
* Updated dependencies.

# [v5.3.4](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v5.3.3...v5.3.4) (2024-05-03)
### Features

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-slim
FROM node:22-slim
MAINTAINER NeoNexus DeMortis

RUN mkdir /var/www && mkdir /var/www/myapp
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# sails-react-bootstrap-webpack

[![Sails version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.1%2Fpackage.json&query=%24.dependencies.sails&label=Sails&logo=sailsdotjs)](https://sailsjs.com)
[![React version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.1%2Fpackage.json&query=%24.devDependencies.react&label=React&logo=react)](https://react.dev)
[![Bootstrap version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.1%2Fpackage.json&query=%24.devDependencies.bootstrap&label=Bootstrap&logo=bootstrap&logoColor=white)](https://getbootstrap.com)
[![Webpack version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.1%2Fpackage.json&query=%24.devDependencies.webpack&label=Webpack&logo=webpack)](https://webpack.js.org)
[![Sails version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.1.0%2Fpackage.json&query=%24.dependencies.sails&label=Sails&logo=sailsdotjs)](https://sailsjs.com)
[![React version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.1.0%2Fpackage.json&query=%24.devDependencies.react&label=React&logo=react)](https://react.dev)
[![Bootstrap version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.1.0%2Fpackage.json&query=%24.devDependencies.bootstrap&label=Bootstrap&logo=bootstrap&logoColor=white)](https://getbootstrap.com)
[![Webpack version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.1.0%2Fpackage.json&query=%24.devDependencies.webpack&label=Webpack&logo=webpack)](https://webpack.js.org)

Latest version only:
[![FOSSA License Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fneonexus%2Fsails-react-bootstrap-webpack.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fneonexus%2Fsails-react-bootstrap-webpack?ref=badge_shield)
Expand Down
2 changes: 1 addition & 1 deletion assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Here is where images, fonts, styles, and React source files live.

React source files can be found in `src`, while the rest can be found in their respective folders.
React source files can be found in `src`, while the rest can be found in their respective folders (fonts, images, styles).
2 changes: 1 addition & 1 deletion ngrok.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ try {
if (answer.installNgrok) {
function installNgrok() {
return new Promise((resolve, reject) => {
const ngrokInstall = spawn('npm', ['install', '@ngrok/ngrok@v0.9.1', '--save-dev', '--save-exact'], {cwd: __dirname, stdio: 'inherit'});
const ngrokInstall = spawn('npm', ['install', '@ngrok/ngrok', '--save-dev', '--save-exact'], {cwd: __dirname, stdio: 'inherit'});

ngrokInstall.on('error', (err) => {
return reject(err);
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sails-react-bootstrap-webpack",
"version": "6.0.1",
"version": "6.1.0",
"description": "A glass-box starter framework that grows with you. Built on proven and reliable tech like Sails, React, Bootstrap & Webpack.",
"keywords": [
"sails",
Expand Down Expand Up @@ -49,7 +49,7 @@
"favicons": "7.2.0",
"favicons-webpack-plugin": "6.0.1",
"file-loader": "6.2.0",
"fixted": "4.2.6",
"fixted": "4.2.7",
"html-webpack-plugin": "5.6.3",
"mini-css-extract-plugin": "2.9.2",
"mocha": "10.8.2",
Expand All @@ -62,7 +62,7 @@
"react-dom": "18.3.1",
"react-router-dom": "6.28.0",
"readline-sync": "1.4.10",
"sass": "1.80.6",
"sass": "1.81.0",
"sass-loader": "16.0.3",
"style-loader": "4.0.0",
"supertest": "7.0.0",
Expand Down Expand Up @@ -116,6 +116,6 @@
"author": "NeoNexus DeMortis <neonexus.demortis@gmail.com>",
"license": "Unlicense",
"engines": {
"node": ">=20.10"
"node": ">=22.11"
}
}
11 changes: 7 additions & 4 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ To run scripts in Sails, one just needs to `sails run SCRIPT_NAME`, where `SCRIP
<td nowrap><a href="create-admin.js">create-admin.js</a></td>
<td>
<ul>
<li><code>email</code></li>
<li><code>firstName</code></li>
<li><code>lastName</code></li>
<li><code>password</code></li>
<li>NONE (interactive)</li>
</ul>
</td>
<td>
Create an ADMIN user in the configured datastore. Can only be run once. For safety, if there is an active admin user found, the script will halt. The API endpoints must be used from that point forward.
</td>
</tr>
<tr>
<td><pre><code>sails run datastore-wipe</code></pre></td>
<td nowrap><a href="datastore-wipe.js">datastore-wipe.js</a></td>
<td><ul><li>NONE</li></ul></td>
<td>Wipe the entire datastore this instance is connected to. Will be asked multiple, random questions to prevent disaster.<br /><br />WILL NEVER RUN ON PRODUCTION FOR SAFETY REASONS!</td>
</tr>
</tbody>
</table>

Expand Down
15 changes: 9 additions & 6 deletions self-update.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
#!/usr/bin/env bash
##!/usr/bin/env zsh

# This file will git pull, npm i, and if needed, build assets. See README "getting setup remotely" for more.
# This file will git pull, npm install, and if needed, build assets. See README "getting setup remotely" for more.

# Function to calculate hash using sha256sum or shasum based on availability
# Function to calculate hash using SHA-512 based on availability
calculate_hash() {
local dir="$1"
local hash_command

# Check if sha256sum command is available
if command -v sha256sum >/dev/null 2>&1; then
hash_command="sha256sum"
if command -v sha512sum >/dev/null 2>&1; then
hash_command="sha512sum"
elif command -v shasum >/dev/null 2>&1 && shasum -a 512 /dev/null >/dev/null 2>&1; then
hash_command="shasum -a 512"
else
hash_command="shasum -a 256"
echo "Error: SHA-512 is not available on your system. Please install 'sha512sum' or 'shasum' to proceed." >&2
return 1
fi

# Calculate hash using the determined command
find "$dir" -type f -exec $hash_command {} + | awk '{print $1}' | $hash_command
}


# Calculate the old hash of the assets/webpack directories
old_hash=$(calculate_hash "assets")
old_wp_hash=$(calculate_hash "webpack")
Expand Down
2 changes: 1 addition & 1 deletion setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ function generateDEK(){

function installNgrok() {
return new Promise((resolve, reject) => {
const ngrokInstall = spawn('npm', ['install', '@ngrok/ngrok@v1.4.1', '--save-dev', '--save-exact'], {cwd: __dirname, stdio: 'inherit'});
const ngrokInstall = spawn('npm', ['install', '@ngrok/ngrok', '--save-dev', '--save-exact'], {cwd: __dirname, stdio: 'inherit'});

ngrokInstall.on('error', (err) => {
return reject(err);
Expand Down
3 changes: 2 additions & 1 deletion tmux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
##!/usr/bin/env zsh

# This file is used to start things inside of TMUX. See README "getting setup remotely" for more.

Expand Down