Commit 9d518a57 authored by Jonathan Porta's avatar Jonathan Porta
Browse files

Works; Still needs some cleanup.

parent ce5a4650
{
"name": "steemit.com",
"repository": {
"type": "git",
"url": "https://github.com/steemit/steemit.com.git"
},
"version": "1.0.0",
"description": "steemit.com is the koa web server & middleware and react.js in-browser code for the world's first blockchain content + social media monetization platform!",
"main": "index.js",
"scripts": {
"build": "NODE_ENV=production webpack --config ./webpack/prod.config.js && rm -rf ./lib && babel src --out-dir lib -Dq",
"test": "jest",
"eslint": "LIST=`git diff-index --name-only HEAD | grep .*\\.js | grep -v json`; if [ \"$LIST\" ]; then eslint $LIST; fi",
"fmt": "prettier --config .prettierrc --write 'src/**/*.js*'",
"precommit": "lint-staged",
"production": "NODE_ENV=production node lib/server/index.js",
"start": "NODE_ENV=development babel-node ./webpack/dev-server.js",
"debug": "NODE_ENV=development webpack --config ./webpack/debug.config.js && rm -rf ./lib && babel src --source-maps --out-dir lib -D && node --inspect-brk lib/server/index.js",
"checktranslations": "node scripts/check_translations.js",
"storybook": "start-storybook -p 9001 -c .storybook",
"storybook-build": "build-storybook -c .storybook -o docs"
},
"author": "Steemit, Inc.",
"license": "MIT",
"dependencies": {
"@steem/crypto-session": "git+https://github.com/steemit/crypto-session.git#83a90b319ce5bc6a70362d52a15a815de7e729bb",
"@steemit/steem-js": "git+https://github.com/steemit/steem-js.git#8705228e3d0f5fd46e2b974ac46facb044c0388d",
"assert": "1.4.1",
"autoprefixer-loader": "3.2.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-eslint": "6.1.2",
"babel-loader": "7.1.2",
"babel-plugin-react-intl": "2.3.1",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-inline-environment-variables": "0.2.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"bigi": "1.4.2",
"blocked": "1.2.1",
"blueimp-file-upload": "9.22.1",
"bs58": "3.1.0",
"bytebuffer": "5.0.1",
"bytes": "2.5.0",
"classnames": "2.2.5",
"cluster": "0.7.7",
"co-body": "5.1.1",
"config": "1.26.2",
"counterpart": "0.17.9",
"cpu-stat": "2.0.1",
"css-loader": "^2.1.1",
"currency-symbol-map": "3.1.0",
"diff-match-patch": "1.0.0",
"disk-stat": "1.0.4",
"ecurve": "1.0.5",
"estraverse-fb": "1.3.2",
"file-loader": "0.11.2",
"foundation-sites": "git+https://github.com/steemit/foundation-sites.git#e8e32c715bbc4c822b80b555345f61337269ca78",
"git-rev-sync": "1.9.1",
"highcharts": "4.2.7",
"humanize-number": "0.0.2",
"imports-loader": "0.7.1",
"intl": "1.2.5",
"iso": "5.2.0",
"json-loader": "0.5.7",
"koa": "1.4.1",
"koa-body": "1.6.0",
"koa-compressor": "1.0.3",
"koa-conditional-get": "1.0.4",
"koa-csrf": "2.5.0",
"koa-etag": "2.1.2",
"koa-favicon": "1.2.1",
"koa-helmet": "1.2.0",
"koa-isbot": "0.1.1",
"koa-locale": "1.3.0",
"koa-logger": "1.3.1",
"koa-mount": "1.3.0",
"koa-proxy": "0.5.0",
"koa-route": "2.4.2",
"koa-router": "5.4.2",
"koa-session": "3.4.0",
"koa-static-cache": "4.1.1",
"lodash.debounce": "4.0.8",
"mem-stat": "1.0.5",
"minimist": "1.2.0",
"mixpanel": "0.5.0",
"mysql": "2.15.0",
"net": "1.0.2",
"node-sass": "4.9.0",
"os": "0.1.1",
"picturefill": "3.0.2",
"raw-loader": "0.5.1",
"react": "15.6.2",
"react-ab-test": "1.7.0",
"react-addons-pure-render-mixin": "15.4.2",
"react-autocomplete": "1.7.2",
"react-copy-to-clipboard": "4.3.1",
"react-dom": "15.6.2",
"react-dropzone": "3.13.4",
"react-highcharts": "8.4.2",
"react-intl": "2.4.0",
"react-medium-editor": "1.8.1",
"react-notification": "5.0.7",
"react-overlays": "0.7.2",
"react-portal": "2.2.1",
"react-prop-types": "0.3.2",
"react-qr": "0.0.2",
"react-rangeslider": "2.2.0",
"react-redux": "5.0.6",
"react-router": "3.2.0",
"react-router-redux": "4.0.8",
"react-router-scroll": "0.4.4",
"react-rte-image": "0.3.1",
"react-timeago": "3.4.3",
"redux": "3.7.2",
"redux-form": "5.3.4",
"redux-saga": "0.16.0",
"remarkable": "1.7.1",
"sanitize-html": "1.14.1",
"sass-loader": "6.0.6",
"secure-random": "1.1.1",
"sendgrid": "4.10.0",
"sequelize": "3.33.0",
"sequelize-cli": "3.2.0",
"speakingurl": "9.0.0",
"sqlite3": "4.0.9",
"statsd-client": "0.4.2",
"steemscript": "1.1.0",
"store": "1.3.20",
"style-loader": "0.18.2",
"svg-inline-loader": "0.8.0",
"svg-inline-react": "1.0.3",
"svgo-loader": "1.2.1",
"twilio": "3.17.0",
"uncontrollable": "3.3.1",
"underscore.string": "3.3.5",
"url-loader": "0.6.2",
"web-push": "3.2.3",
"webpack": "3.7.1",
"webpack-dev-middleware": "1.12.0",
"webpack-isomorphic-tools": "3.0.5",
"websocket": "1.0.24",
"whatwg-fetch": "0.11.1",
"xmldom": "0.1.27"
},
"devDependencies": {
"babel-jest": "22.0.6",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"co-supertest": "0.0.10",
"dev-ip": "1.0.1",
"enzyme": "3.3.0",
"enzyme-adapter-react-15": "1.0.5",
"escope": "3.6.0",
"eslint": "4.18.2",
"eslint-config-airbnb": "15.1.0",
"eslint-plugin-babel": "4.1.2",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.1",
"husky": "0.14.3",
"jest": "22.0.6",
"jsdom": "9.12.0",
"koa-webpack-dev-middleware": "1.4.6",
"koa-webpack-hot-middleware": "1.0.3",
"lint-staged": "6.0.0",
"mock-local-storage": "1.0.5",
"node-watch": "0.5.5",
"prettier": "1.8.2",
"react-addons-perf": "15.4.2",
"react-addons-test-utils": "15.4.2",
"react-test-renderer": "15.6.2",
"react-transform-catch-errors": "1.0.2",
"react-transform-hmr": "1.0.4",
"redux-devtools-extension": "2.13.5",
"redux-mock-store": "1.5.1",
"regenerator-runtime": "0.11.1",
"sinon": "1.17.7",
"supertest": "1.2.0",
"webpack-bundle-analyzer": "2.9.0"
},
"engines": {
"node": ">=8.7.0",
"npm": ">=5.4.2"
},
"lint-staged": {
"src/**/*.js*": [
"prettier --write",
"git add"
]
},
"jest": {
"testURL": "http://localhost/",
"rootDir": "src",
"modulePaths": [
"<rootDir>/"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js"
"name": "steemit.com",
"repository": {
"type": "git",
"url": "https://github.com/steemit/steemit.com.git"
},
"version": "1.0.0",
"description": "steemit.com is the koa web server & middleware and react.js in-browser code for the world's first blockchain content + social media monetization platform!",
"main": "index.js",
"scripts": {
"build": "NODE_ENV=production webpack --config ./webpack/prod.config.js && rm -rf ./lib && babel src --out-dir lib -Dq",
"test": "jest",
"eslint": "LIST=`git diff-index --name-only HEAD | grep .*\\.js | grep -v json`; if [ \"$LIST\" ]; then eslint $LIST; fi",
"fmt": "prettier --config .prettierrc --write 'src/**/*.js*'",
"precommit": "lint-staged",
"production": "NODE_ENV=production node lib/server/index.js",
"start": "NODE_ENV=development babel-node ./webpack/dev-server.js",
"debug": "NODE_ENV=development webpack --config ./webpack/debug.config.js && rm -rf ./lib && babel src --source-maps --out-dir lib -D && node --inspect-brk lib/server/index.js",
"checktranslations": "node scripts/check_translations.js",
"storybook": "start-storybook -p 9001 -c .storybook",
"storybook-build": "build-storybook -c .storybook -o docs"
},
"author": "Steemit, Inc.",
"license": "MIT",
"dependencies": {
"@steem/crypto-session": "git+https://github.com/steemit/crypto-session.git#83a90b319ce5bc6a70362d52a15a815de7e729bb",
"@steemit/steem-js": "^0.7.6",
"assert": "1.4.1",
"autoprefixer-loader": "3.2.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-eslint": "6.1.2",
"babel-loader": "7.1.2",
"babel-plugin-react-intl": "2.3.1",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-inline-environment-variables": "0.2.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"bigi": "1.4.2",
"blocked": "1.2.1",
"blueimp-file-upload": "9.22.1",
"bs58": "3.1.0",
"bytebuffer": "5.0.1",
"bytes": "2.5.0",
"classnames": "2.2.5",
"cluster": "0.7.7",
"co-body": "5.1.1",
"config": "1.26.2",
"counterpart": "0.17.9",
"cpu-stat": "2.0.1",
"css-loader": "^2.1.1",
"currency-symbol-map": "3.1.0",
"diff-match-patch": "1.0.0",
"disk-stat": "1.0.4",
"ecurve": "1.0.5",
"estraverse-fb": "1.3.2",
"file-loader": "0.11.2",
"foundation-sites": "git+https://github.com/steemit/foundation-sites.git#e8e32c715bbc4c822b80b555345f61337269ca78",
"git-rev-sync": "1.9.1",
"highcharts": "4.2.7",
"humanize-number": "0.0.2",
"imports-loader": "0.7.1",
"intl": "1.2.5",
"iso": "5.2.0",
"json-loader": "0.5.7",
"koa": "1.4.1",
"koa-body": "1.6.0",
"koa-compressor": "1.0.3",
"koa-conditional-get": "1.0.4",
"koa-csrf": "2.5.0",
"koa-etag": "2.1.2",
"koa-favicon": "1.2.1",
"koa-helmet": "1.2.0",
"koa-isbot": "0.1.1",
"koa-locale": "1.3.0",
"koa-logger": "1.3.1",
"koa-mount": "1.3.0",
"koa-proxy": "0.5.0",
"koa-route": "2.4.2",
"koa-router": "5.4.2",
"koa-session": "3.4.0",
"koa-static-cache": "4.1.1",
"lodash.debounce": "4.0.8",
"mem-stat": "1.0.5",
"minimist": "1.2.0",
"mixpanel": "0.5.0",
"moment": "^2.24.0",
"mysql": "2.15.0",
"net": "1.0.2",
"node-sass": "4.9.0",
"number-abbreviate": "^2.0.0",
"os": "0.1.1",
"picturefill": "3.0.2",
"raw-loader": "0.5.1",
"react": "15.6.2",
"react-ab-test": "1.7.0",
"react-addons-pure-render-mixin": "15.4.2",
"react-autocomplete": "1.7.2",
"react-copy-to-clipboard": "4.3.1",
"react-dom": "15.6.2",
"react-dropzone": "3.13.4",
"react-highcharts": "8.4.2",
"react-intl": "2.4.0",
"react-medium-editor": "1.8.1",
"react-notification": "5.0.7",
"react-overlays": "0.7.2",
"react-portal": "2.2.1",
"react-prop-types": "0.3.2",
"react-qr": "0.0.2",
"react-rangeslider": "2.2.0",
"react-redux": "5.0.6",
"react-router": "3.2.0",
"react-router-redux": "4.0.8",
"react-router-scroll": "0.4.4",
"react-rte-image": "0.3.1",
"react-timeago": "3.4.3",
"redux": "3.7.2",
"redux-form": "5.3.4",
"redux-saga": "0.16.0",
"remarkable": "1.7.1",
"sanitize-html": "1.14.1",
"sass-loader": "6.0.6",
"secure-random": "1.1.1",
"sendgrid": "4.10.0",
"sequelize": "3.33.0",
"sequelize-cli": "3.2.0",
"speakingurl": "9.0.0",
"sqlite3": "4.0.9",
"statsd-client": "0.4.2",
"steemscript": "1.1.0",
"store": "1.3.20",
"style-loader": "0.18.2",
"svg-inline-loader": "0.8.0",
"svg-inline-react": "1.0.3",
"svgo-loader": "1.2.1",
"twilio": "3.17.0",
"uncontrollable": "3.3.1",
"underscore.string": "3.3.5",
"url-loader": "0.6.2",
"web-push": "3.2.3",
"webpack": "3.7.1",
"webpack-dev-middleware": "1.12.0",
"webpack-isomorphic-tools": "3.0.5",
"websocket": "1.0.24",
"whatwg-fetch": "0.11.1",
"xmldom": "0.1.27"
},
"devDependencies": {
"babel-jest": "22.0.6",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"co-supertest": "0.0.10",
"dev-ip": "1.0.1",
"enzyme": "3.3.0",
"enzyme-adapter-react-15": "1.0.5",
"escope": "3.6.0",
"eslint": "4.18.2",
"eslint-config-airbnb": "15.1.0",
"eslint-plugin-babel": "4.1.2",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.1",
"husky": "0.14.3",
"jest": "22.0.6",
"jsdom": "9.12.0",
"koa-webpack-dev-middleware": "1.4.6",
"koa-webpack-hot-middleware": "1.0.3",
"lint-staged": "6.0.0",
"mock-local-storage": "1.0.5",
"node-watch": "0.5.5",
"prettier": "1.13.4",
"react-addons-perf": "15.4.2",
"react-addons-test-utils": "15.4.2",
"react-test-renderer": "15.6.2",
"react-transform-catch-errors": "1.0.2",
"react-transform-hmr": "1.0.4",
"redux-devtools-extension": "2.13.5",
"redux-mock-store": "1.5.1",
"regenerator-runtime": "0.11.1",
"sinon": "1.17.7",
"supertest": "1.2.0",
"webpack-bundle-analyzer": "2.9.0"
},
"engines": {
"node": ">=8.7.0",
"npm": ">=5.4.2"
},
"lint-staged": {
"src/**/*.js*": [
"prettier --write",
"git add"
]
},
"jest": {
"testURL": "http://localhost/",
"rootDir": "src",
"modulePaths": [
"<rootDir>/"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js"
}
}
}
}
......@@ -61,14 +61,20 @@ export default function resolveRoute(path) {
if (path === '/steem_proposal_system') {
return { page: 'SteemProposalSystem' };
}
if (path === '/proposals') {
console.log('/proposals');
return { page: 'Proposals' };
}
match =
path.match(routeRegex.UserProfile1) ||
path.match(routeRegex.UserProfile2);
if (match) {
console.log('MATCH');
if (GDPRUserList.includes(match[1].substring(1))) {
return { page: 'NotFound' };
}
return { page: 'UserProfile', params: match.slice(1) };
}
console.log('NO MATCH');
return { page: 'NotFound' };
}
......@@ -34,6 +34,7 @@ describe('resolveRoute', () => {
['/market', { page: 'Market' }],
['/~witnesses', { page: 'Witnesses' }],
['/steem_proposal_system', { page: 'SteemProposalSystem' }],
['/proposals', { page: 'Proposals' }],
['/@gdpr/nice345', { page: 'NotFound' }],
['/taggy/@gdpr/nice345', { page: 'NotFound' }],
];
......@@ -49,12 +50,14 @@ describe('resolveRoute', () => {
expect(resolveRoute('/xss/test')).toEqual({ page: 'XSSTest' });
delete process.env.NODE_ENV;
});
it('should resolve benchmark route in development environment', () => {
expect(resolveRoute('/benchmark')).toEqual({ page: 'NotFound' });
process.env.OFFLINE_SSR_TEST = true;
expect(resolveRoute('/benchmark')).toEqual({ page: 'Benchmark' });
delete process.env.OFFLINE_SSR_TEST;
});
it('should resolve an unknown route to NotFound', () => {
expect(resolveRoute('/randomness')).toEqual({ page: 'NotFound' });
});
......
......@@ -46,6 +46,8 @@ export default {
cb(null, [require('app/components/pages/Witnesses')]);
} else if (route.page === 'SteemProposalSystem') {
cb(null, [require('app/components/pages/SteemProposalSystem')]);
} else if (route.page === 'Proposals') {
cb(null, [require('app/components/pages/Proposals')]);
} else if (route.page === 'UserProfile') {
cb(null, [require('app/components/pages/UserProfile')]);
} else if (route.page === 'Market') {
......
@import "./App";
@import './App';
// cards
@import "./cards/MarkdownViewer";
@import "./cards/TransferHistoryRow/style";
@import './cards/MarkdownViewer';
@import './cards/TransferHistoryRow/style';
// elements
@import "./elements/Icon";
@import "./elements/LoadingIndicator";
@import "./elements/Userpic";
@import "./elements/FormattedAsset";
@import "./elements/DropdownMenu";
@import "./elements/VerticalMenu";
@import "./elements/HorizontalMenu";
@import "./elements/GeneratedPasswordInput";
@import "./elements/ChangePassword";
@import "./elements/YoutubePreview";
@import "./elements/UserKeys";
@import "./elements/Voting";
@import "./elements/QrKeyView";
@import "./elements/SearchInput/styles";
@import "./elements/IconButton/styles";
@import "./elements/NativeSelect/styles";
@import "./elements/SteemLogo/styles";
@import "./elements/SanitizedLink/styles";
@import "./elements/HelpTip/styles";
@import "./elements/Dropdown";
@import "./elements/Pagination/styles";
@import './elements/Icon';
@import './elements/LoadingIndicator';
@import './elements/Userpic';
@import './elements/FormattedAsset';
@import './elements/DropdownMenu';
@import './elements/VerticalMenu';
@import './elements/HorizontalMenu';
@import './elements/GeneratedPasswordInput';
@import './elements/ChangePassword';
@import './elements/YoutubePreview';
@import './elements/UserKeys';
@import './elements/Voting';
@import './elements/QrKeyView';
@import './elements/SearchInput/styles';
@import './elements/IconButton/styles';
@import './elements/NativeSelect/styles';
@import './elements/SteemLogo/styles';
@import './elements/SanitizedLink/styles';
@import './elements/HelpTip/styles';
@import './elements/Dropdown';
@import './elements/Pagination/styles';
// modules
@import "./modules/Header/styles";
@import "./modules/SignUp";
@import "./modules/LoginForm";
@import "./modules/MiniHeader";
@import "./modules/SidePanel/styles";
@import "./modules/Settings";
@import "./modules/BottomPanel";
@import "./modules/UserWallet";
@import "./modules/Powerdown";
@import "./modules/ConfirmTransactionForm";
@import "./modules/Transfer";
@import './modules/Header/styles';
@import './modules/SignUp';
@import './modules/LoginForm';
@import './modules/MiniHeader';
@import './modules/SidePanel/styles';
@import './modules/Settings';
@import './modules/BottomPanel';
@import './modules/UserWallet';
@import './modules/Powerdown';
@import './modules/ConfirmTransactionForm';
@import './modules/Transfer';
@import './modules/ProposalList/styles';
// pages
@import "./pages/CreateAccount";
@import "./pages/Privacy";
@import "./pages/Tos";
@import "./pages/UserProfile";
@import "./pages/Market";
@import "./pages/Welcome";
@import "./pages/RecoverAccountStep1";
@import "./pages/Witnesses";
@import "./pages/About";
@import "./pages/WalletIndex";
@import "./pages/SteemProposalSystem";
@import './pages/CreateAccount';
@import './pages/Privacy';
@import './pages/Tos';
@import './pages/UserProfile';
@import './pages/Market';
@import './pages/Welcome';
@import './pages/RecoverAccountStep1';
@import './pages/Witnesses';
@import './pages/About';
@import './pages/WalletIndex';