Skip to content

Commit

Permalink
Add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaista committed Jun 15, 2024
1 parent b2c5d04 commit 8db2705
Show file tree
Hide file tree
Showing 80 changed files with 3,311 additions and 5,580 deletions.
29 changes: 0 additions & 29 deletions .eslintrc.cjs

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: npm ci
- working-directory: .
run: npm run lint

- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
Expand All @@ -33,7 +33,7 @@ jobs:
name: playwright-report
path: playwright-report/
retention-days: 30

- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yaml" down
run: docker-compose -f "docker-compose.yaml" down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/private
/node_modules
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public/utils
Empty file added .prettierrc
Empty file.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ A SecretSanta app for my friends.
Checkout the live thing here: https://secretsanta.jovanilic.com

# local dev

```
$ npm run start
```

See the LICENSE.md for license information.
See the LICENSE.md for license information.
12 changes: 7 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ app.use(
session({
secret: process.env.sessionKey,
resave: false,
saveUninitialized: false
saveUninitialized: false,
})
);

app.use(passport.initialize());
app.use(passport.session());

// register regenerate & save until passport v0.6 is fixed
app.use(function(request, response, next) {
app.use(function (request, response, next) {
if (request.session && !request.session.regenerate) {
request.session.regenerate = (cb) => {
cb();
Expand Down Expand Up @@ -64,7 +64,7 @@ app.use('/modules/menu', (req, res) => {
if (!req.user) return res.status(401).send({ error: 'User not logged in' });
const options = {
groups: req.user.groups,
activeGroup: req.session.activeGroup
activeGroup: req.session.activeGroup,
};
res.render('modules/menu.html', options);
});
Expand All @@ -74,11 +74,13 @@ app.use('/modules/footer', (req, res) => {
});

app.use('/api/setActiveGroup', (req, res) => {
req.session.activeGroup = req.user.groups.filter(group => group._id.toString() === req.query.groupId)[0];
req.session.activeGroup = req.user.groups.filter(
(group) => group._id.toString() === req.query.groupId
)[0];
res.send({ success: 'Group changed' });
});

app.use(function(req, res) {
app.use(function (req, res) {
res.status(404).sendFile('public/not-found/santa404.html', { root: '.' });
});

Expand Down
2 changes: 1 addition & 1 deletion app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ env_variables:
minioUseSSL: ##_MINIOSSL##
minioAccessKey: ##_MINIOACCESSKEY##
minioSecretKey: ##_MINIOSECRETKEY##
minioBucket: ##_MINIOBUCKET##
minioBucket: ##_MINIOBUCKET##
40 changes: 20 additions & 20 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
steps:
- name: node:18.13.0
entrypoint: npm
args: ["install"]
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- |
sed -i "s|##_PROFILE##|${_PROFILE}|" app.yaml
sed -i "s|##_ADMINELEVATEDPRIVILEGES##|${_ADMINELEVATEDPRIVILEGES}|" app.yaml
sed -i "s|##_MONGOURI##|${_MONGOURI}|" app.yaml
sed -i "s|##_SENDGRIDAPI##|${_SENDGRIDAPI}|" app.yaml
sed -i "s|##_SESSIONKEY##|${_SESSIONKEY}|" app.yaml
sed -i "s|##_MINIOENDPOINT##|${_MINIOENDPOINT}|" app.yaml
sed -i "s|##_MINIOSSL##|${_MINIOSSL}|" app.yaml
sed -i "s|##_MINIOACCESSKEY##|${_MINIOACCESSKEY}|" app.yaml
sed -i "s|##_MINIOSECRETKEY##|${_MINIOSECRETKEY}|" app.yaml
sed -i "s|##_MINIOBUCKET##|${_MINIOBUCKET}|" app.yaml
gcloud app deploy
- name: node:18.13.0
entrypoint: npm
args: ['install']
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- |
sed -i "s|##_PROFILE##|${_PROFILE}|" app.yaml
sed -i "s|##_ADMINELEVATEDPRIVILEGES##|${_ADMINELEVATEDPRIVILEGES}|" app.yaml
sed -i "s|##_MONGOURI##|${_MONGOURI}|" app.yaml
sed -i "s|##_SENDGRIDAPI##|${_SENDGRIDAPI}|" app.yaml
sed -i "s|##_SESSIONKEY##|${_SESSIONKEY}|" app.yaml
sed -i "s|##_MINIOENDPOINT##|${_MINIOENDPOINT}|" app.yaml
sed -i "s|##_MINIOSSL##|${_MINIOSSL}|" app.yaml
sed -i "s|##_MINIOACCESSKEY##|${_MINIOACCESSKEY}|" app.yaml
sed -i "s|##_MINIOSECRETKEY##|${_MINIOSECRETKEY}|" app.yaml
sed -i "s|##_MINIOBUCKET##|${_MINIOBUCKET}|" app.yaml
gcloud app deploy
timeout: 1800s
substitutions:
_PROFILE: ${_PROFILE}
Expand All @@ -29,4 +29,4 @@ substitutions:
_MINIOSSL: ${_MINIOSSL}
_MINIOACCESSKEY: ${_MINIOACCESSKEY}
_MINIOSECRETKEY: ${_MINIOSECRETKEY}
_MINIOBUCKET: ${_MINIOBUCKET}
_MINIOBUCKET: ${_MINIOBUCKET}
5 changes: 2 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.8'

services:

mongo:
image: mongo
restart: always
Expand All @@ -25,7 +24,7 @@ services:
ports:
- '9000:${minioPort}'
- '9001:9001'

createbuckets:
image: minio/mc
depends_on:
Expand All @@ -36,4 +35,4 @@ services:
/usr/bin/mc mb myminio/${minioBucket};
/usr/bin/mc anonymous set download myminio/${minioBucket};
exit 0;
"
"
Loading

0 comments on commit 8db2705

Please sign in to comment.