Skip to content

Commit

Permalink
Merge branch 'staging' into chore-document-conventional-commits-2230
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbo authored Jul 17, 2023
2 parents 95fc76a + 3efc58a commit 82fdd4e
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const finalRules = {

const overrides = [
{
files: ["frontend/components/site/downloadBuildLogsButton.jsx"],
files: ["frontend/**/*"],
env: {
'browser': true,
'node': true
Expand Down
14 changes: 9 additions & 5 deletions admin-client/src/components/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@
}
.usa-logo a {
background-image: url("/images/logo.svg");
background-position: center;
background-image: url("/images/pages-logo.svg");
background-position: left;
background-repeat: no-repeat;
background-size: contain;
color: transparent;
background-size: 20px;
color: white;
display: inline-block;
height: auto;
text-decoration: none;
padding-left: 26px;
font-weight: 400;
font-size: 20px;
line-height: 47px;
}
</style>

Expand All @@ -61,7 +65,7 @@
href="/"
title="Home"
aria-label="Home">
Pages
Pages Admin
</a>
</em>
</div>
Expand Down
2 changes: 0 additions & 2 deletions frontend/actions/organizationActions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global window:true */

import federalist from '../util/federalistApi';
import alertActions from './alertActions';
import { dispatch } from '../store';
Expand Down
2 changes: 0 additions & 2 deletions frontend/actions/siteActions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global window:true */

import federalist from '../util/federalistApi';
import alertActions from './alertActions';

Expand Down
2 changes: 0 additions & 2 deletions frontend/actions/userActions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global window:true */

import federalist from '../util/federalistApi';
import alertActions from './alertActions';
import { dispatch } from '../store';
Expand Down
1 change: 0 additions & 1 deletion frontend/actions/userEnvironmentVariableActions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window:true */
import federalist from '../util/federalistApi';
import { httpError } from './actionCreators/alertActions';
import {
Expand Down
1 change: 0 additions & 1 deletion frontend/components/GithubAuthButton.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window */
import React from 'react';
import PropTypes from 'prop-types';

Expand Down
1 change: 0 additions & 1 deletion frontend/components/organization/Edit.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window */
import React, { useEffect, useReducer } from 'react';
import { useParams } from 'react-router-dom';
import { success } from 'react-notification-system-redux';
Expand Down
1 change: 0 additions & 1 deletion frontend/components/site/SiteSettings/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window:true */
import React from 'react';
import { useSelector } from 'react-redux';
import { useParams, useNavigate } from 'react-router-dom';
Expand Down
2 changes: 0 additions & 2 deletions frontend/main.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global document:true */

import '@babel/polyfill';
import { createRoot } from 'react-dom/client';
import React from 'react';
Expand Down
1 change: 0 additions & 1 deletion frontend/store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window */
import {
combineReducers, compose, createStore, applyMiddleware,
} from 'redux';
Expand Down
2 changes: 0 additions & 2 deletions frontend/util/federalistApi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global window:true */

import fetch from './fetch';
import alertActions from '../actions/alertActions';

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"inflection": "^1.13.1",
"ioredis": "^4.27.6",
"js-yaml": "^4.1.0",
"json-to-csv": "^1.0.0",
"json2csv": "juanjoDiaz/json2csv#v7.0.1",
"jsonwebtoken": "^8.5.1",
"moment": "^2.29.2",
Expand Down
19 changes: 17 additions & 2 deletions scripts/exportSitesAsCsv.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* eslint no-console: 0 */
const path = require('path');
const fs = require('fs');

const _ = require('underscore');
const jsonToCSV = require('json-to-csv');
const json2csv = require('@json2csv/plainjs');

const { User, Site } = require('../api/models');

Expand Down Expand Up @@ -40,6 +41,20 @@ function consolidateOnSiteId(sites) {
});
}

function writeCSV(sites, fileName) {
return new Promise((resolve, reject) => {
let csv;
try {
const fields = Object.keys(sites[0]);
const parser = new json2csv.Parser({ fields });
csv = parser.parse(sites);
} catch (err) {
reject(err);
}
fs.writeFile(fileName, csv, err => (!err ? resolve() : reject(err)));
});
}

const args = Array.prototype.slice.call(process.argv);
const destination = resolveDestination(args[2] || './current-sites.csv');
console.log('Final output can be found at', destination);
Expand All @@ -53,7 +68,7 @@ User.findAll({ include: [Site] })
console.log(`Found ${sites.length} unique sites`);
return sites;
})
.then(sites => jsonToCSV(sites, destination))
.then(sites => writeCSV(sites, destination))
.then(() => {
console.log('Current sites written to file', destination);
process.exit(0);
Expand Down
66 changes: 4 additions & 62 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3059,13 +3059,6 @@ cli-cursor@^3.1.0:
dependencies:
restore-cursor "^3.1.0"

cli-table@^0.3.1:
version "0.3.11"
resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.11.tgz#ac69cdecbe81dccdba4889b9a18b7da312a9d3ee"
integrity sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==
dependencies:
colors "1.0.3"

cli-truncate@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7"
Expand Down Expand Up @@ -3197,7 +3190,7 @@ colorette@^2.0.19:
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==

colors@1.0.3, colors@1.0.x:
colors@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
integrity sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==
Expand Down Expand Up @@ -3232,7 +3225,7 @@ commander@^10.0.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==

commander@^2.19.0, commander@^2.20.0, commander@^2.8.1:
commander@^2.19.0, commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
Expand Down Expand Up @@ -3756,7 +3749,7 @@ debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, de
dependencies:
ms "2.1.2"

debug@^3.1.0, debug@^3.2.7:
debug@^3.2.7:
version "3.2.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
Expand Down Expand Up @@ -4997,13 +4990,6 @@ flat-cache@^3.0.4:
flatted "^3.1.0"
rimraf "^3.0.2"

flat@^4.0.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b"
integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==
dependencies:
is-buffer "~2.0.3"

flat@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
Expand Down Expand Up @@ -5769,11 +5755,6 @@ is-buffer@^1.1.0, is-buffer@~1.1.1:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==

is-buffer@~2.0.3:
version "2.0.5"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191"
integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==

is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
Expand Down Expand Up @@ -6238,30 +6219,6 @@ json-stringify-safe@^5.0.0, json-stringify-safe@^5.0.1:
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==

json-to-csv@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/json-to-csv/-/json-to-csv-1.0.0.tgz#4640bf7df930c0ebba6ad13d12a6d42d3b7ea213"
integrity sha512-qOzFqlzM2E3GitqK2SWGigAf6sGPS+06arFjXJK3sFluWvS4Jol3FcMPBbS3aawQZ11ZuWubFMepl7xiFl4qhQ==
dependencies:
json2csv "^3.4.2"
ramda "^0.21.0"

json2csv@^3.4.2:
version "3.11.5"
resolved "https://registry.yarnpkg.com/json2csv/-/json2csv-3.11.5.tgz#088006c3b5c06425a48cb7326ca712a6f8661417"
integrity sha512-ORsw84BuRKMLxfI+HFZuvxRDnsJps53D5fIGr6tLn4ZY+ymcG8XU00E+JJ2wfAiHx5w2QRNmOLE8xHiGAeSfuQ==
dependencies:
cli-table "^0.3.1"
commander "^2.8.1"
debug "^3.1.0"
flat "^4.0.0"
lodash.clonedeep "^4.5.0"
lodash.flatten "^4.4.0"
lodash.get "^4.4.0"
lodash.set "^4.3.0"
lodash.uniq "^4.5.0"
path-is-absolute "^1.0.0"

json2csv@juanjoDiaz/json2csv#v7.0.1:
version "7.0.1"
resolved "https://codeload.github.com/juanjoDiaz/json2csv/tar.gz/b43c7dd556b7afc9728ecc31ccc96c8c76056f09"
Expand Down Expand Up @@ -6526,7 +6483,7 @@ lodash.flattendeep@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2"
integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==

lodash.get@^4.4.0, lodash.get@^4.4.2:
lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==
Expand Down Expand Up @@ -6586,11 +6543,6 @@ lodash.once@^4.0.0:
resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac"
integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==

lodash.set@^4.3.0:
version "4.3.2"
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
integrity sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==

lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
Expand All @@ -6601,11 +6553,6 @@ lodash.truncate@^4.4.2:
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==

lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==

lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
Expand Down Expand Up @@ -8195,11 +8142,6 @@ railroad-diagrams@^1.0.0:
resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e"
integrity sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==

ramda@^0.21.0:
version "0.21.0"
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.21.0.tgz#a001abedb3ff61077d4ff1d577d44de77e8d0a35"
integrity sha512-HGd5aczYKQXGILB+abY290V7Xz62eFajpa6AtMdwEmQSakJmgSO7ks4eI3HdR34j+X2Vz4Thp9VAJbrCAMbO2w==

randexp@0.4.6:
version "0.4.6"
resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3"
Expand Down

0 comments on commit 82fdd4e

Please sign in to comment.