Commit Graph

84 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
d20b07cfea Webpack5 (#10311)
* feat: webpack 5 part 1

* fix: gruntfile fixes

* fix: fix taskbar warning

add app.importScript
copy public/src/modules to build folder

* refactor: remove commented old code

* feat: reenable admin

* fix: acp settings pages, fix sortable on manage categories

embedded require in html not allowed

* fix: bundle serialize/deserizeli so plugins dont break

* test: fixe util tests

* test: fix require path

* test: more test fixes

* test: require correct utils module

* test: require correct utils

* test: log stack

* test: fix db require blowing up tests

* test: move and disable bundle test

* refactor: add aliases

* test: disable testing route

* fix: move webpack modules necessary for build, into `dependencies`

* test: fix one more test

remove 500-embed.tpl

* fix: restore use of assets/nodebb.min.js, at least for now

* fix: remove unnecessary line break

* fix: point to proper ACP bundle

* test: maybe fix build test

* test: composer

* refactor: dont need dist

* refactor: more cleanup

use everything from build/public folder

* get rid of conditional import in app.js

* fix: ace

* refactor: cropper alias

* test: lint and test fixes

* lint: fix

* refactor: rename function to app.require

* refactor: go back to using app.require

* chore: use github branch

* chore: use webpack branch

* feat: webpack webinstaller

* feat: add chunkFile name with contenthash

* refactor: move hooks to top

* refactor: get rid of template500Function

* fix(deps): use webpack5 branch of 2factor plugin

* chore: tagging v2.0.0-beta.0 pre-release version 💥 :shipit: 🎉 🚀

* refactor: disable cache on templates

loadTemplate is called once by benchpress and the result is cache internally

* refactor: add server side helpers.js

* feat: deprecate /plugins shorthand route, closes #10343

* refactor: use build/public for webpack

* test: fix filename

* fix: more specific selector

* lint: ignore

* refactor: fix comments

* test: add debug for random failing test

* refactor: cleanup

remove test page, remove dupe functions in utils.common

* lint: use relative path  for now

* chore: bump prerelease version

* feat: add translateKeys

* fix: optional params

* fix: get rid of extra timeago files

* refactor: cleanup, require timeago locale earlier

remove translator.prepareDOM, it is in header.tpl html tag

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* feat: allow app.require('bootbox'/'benchpressjs')

* refactor: require server side utils

* test: jquery ready

* change istaller to use build/public

* test: use document.addEventListener

* refactor: closes #10301

* refactor: generateTopicClass

* fix: column counts for other privileges

* fix: #10443, regression where sorted-list items did not render into the DOM in the predicted order [breaking]

* fix: typo in hook name

* refactor: introduce a generic autocomplete.init() method that can be called to add nodebb-style autocompletion but using different data sources (e.g. not user/groups/tags)

* fix: crash if `delay` not passed in (as it cannot be destructured)

* refactor: replace substr

* feat: set --panel-offset style in html element based on stored value in localStorage

* refactor: addDropupHandler() logic to be less naive

- Take into account height of the menu
- Don't apply dropUp logic if there's nothing in the dropdown
- Remove 'hidden' class (added by default in Persona for post tools) when menu items are added

closes #10423

* refactor: simplify utils.params [breaking]

Retrospective analysis of the usage of this method suggests that the options passed in are superfluous, and that only `url` is required. Using a browser built-in makes more sense to accomplish what this method sets out to do.

* feat: add support for returning full URLSearchParams for utils.params

* fix: utils.params() fallback handling

* fix: default empty obj for params()

* fix: remove \'loggedin\' and \'register\' qs parameters once they have been used, delay invocation of messages until ajaxify.end

* fix: utils.params() not allowing relative paths to be passed in

* refactor(DRY): new assertPasswordValidity utils method

* fix: incorrect error message returned on insufficient privilege on flag edit

* fix: read/update/delete access to flags API should be limited for moderators to only post flags in categories they moderate

- added failing tests and patched up middleware.assert.flags to fix

* refactor: flag api v3 tests to create new post and flags on every round

* fix: missing error:no-flag language key

* refactor: flags.canView to check flag existence, simplify middleware.assert.flag

* feat: flag deletion API endpoint, #10426

* feat: UI for flag deletion, closes #10426

* chore: update plugin versions

* chore: up emoji

* chore: update markdown

* chore: up emoji-android

* fix: regression caused by utils.params() refactor, supports arrays and pipes all values through utils.toType, adjusts tests to type check

Co-authored-by: Julian Lam <julian@nodebb.org>
2022-04-29 21:39:33 -04:00
Barış Soner Uşaklı
997ab7d416 fix: #10377, remove logging of env vars 2022-03-10 12:14:19 -05:00
Barış Soner Uşaklı
6b22d0e15f fix: #10334, use the correct env vars for web install 2022-02-21 20:12:45 -05:00
Julian Lam
6e156daaf6 fix: don't load setup.json into nconf if setup.json doesn't exist 2022-02-17 14:07:51 -05:00
Barış Soner Uşaklı
14bc83a88e refactor: less.render returns promise 2021-10-18 18:19:21 -04:00
Julian Lam
16e0bca570 fix: improper use of filename extensions 2021-05-28 14:05:30 -04:00
Peter Jaszkowiak
5c2f0f0557 chore: eslint no-restricted-syntax 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
dab3b23575 chore: eslint no-var, vars-on-top 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
4ee0f1459d chore: eslint import/newline-after-import 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
dad01e3051 chore: eslint no-bitwise 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
d30ea25629 feat(deps): benchpressjs@2.2.1 (#8887)
Better warnings, faster template compiles
2020-11-16 11:55:24 -05:00
Peter Jaszkowiak
de5a21f19b fix(#8828): web install templates now compiled (#8832) 2020-11-05 12:05:31 -05:00
Barış Soner Uşaklı
3881ac309f refactor: async/await install/web.js 2020-10-14 23:20:45 -04:00
Barış Soner Uşaklı
dc29f4dca2 refactor: switch to using slugify module 2020-10-11 21:49:37 -04:00
Billy Ohgren
89062d8e70 add filename to less render call (#8459) 2020-07-03 09:16:47 -04:00
Barış Soner Uşaklı
e80379dc0e feat: display stack trace on winston.error 2020-06-20 23:32:12 -04:00
Barış Soner Uşaklı
4bc77d064b feat: disable timeout on launch route 2019-10-07 17:42:29 -04:00
Andrew Rodrigues
962b7f73d3 fix: #7472 2019-03-19 14:01:31 -04:00
Barış Soner Uşaklı
f4df89fe90 closes #6840 2018-10-16 15:17:14 -04:00
Barış Soner Uşaklı
85c60316ed upgrade to winston 3.1, closes #6590 (#6838)
* upgrade to winston 3.1

* fix winston in web/install and tests
2018-10-16 13:07:13 -04:00
Ben Lubar
33228bb7fe PostgreSQL database driver (#5861)
* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
2018-08-08 15:13:48 -04:00
Barış Soner Uşaklı
fc56347c22 closes #6520 2018-05-26 13:12:33 -04:00
Barış Soner Uşaklı
085034a103 store success error for page reloads 2018-05-23 12:39:04 -04:00
Barış Soner Uşaklı
c2f088cb61 dont install multiple times 2018-05-23 11:40:03 -04:00
Julian Lam
943d33ed09 closes #6502, also fixed issue with type: 'literal' in config.json 2018-05-15 15:26:06 -04:00
Peter Jaszkowiak
a00f1f9a81 Use uglify-es for ES6 support (#6402) 2018-03-26 15:37:53 -04:00
Julian Lam
da328662c5 don't flatten arrays, stringify them, in installer 2018-03-22 19:35:58 -04:00
Barış Soner Uşaklı
fbed4c056e show env vars passed to setup 2018-03-22 18:45:00 -04:00
Julian Lam
1d42d1a6d2 moving expected location of setup.json to root 2018-03-22 14:50:39 -04:00
Julian Lam
741693bc1f closes #6378 2018-03-21 17:00:49 -04:00
Barış Soner Uşaklı
3b3a28dc15 add ping routes to webinstaller 2018-01-24 21:05:08 -05:00
Barış Soner Uşaklı
82f2025944 disable timeout on post install route 2018-01-16 14:27:48 -05:00
Barış Soner Uşaklı
e092778ba6 closes #6200 2018-01-15 15:05:33 -05:00
Peter Jaszkowiak
dbdc05404d Use console.log instead of process.stdout.write (#6123)
* Use console.log instead of process.stdout.write

* Don't break the installer
2017-11-27 15:44:30 -05:00
Peter Jaszkowiak
c731661a39 Remove external sources from installer page (#6101)
* Remove external sources from installer page

* Remove bootstrap.min.css

* Make spinner display consistently cross-platform

* Change spinner to look better
2017-11-23 10:50:10 -05:00
Baris Usakli
5ca3b535e7 closes #6105 2017-11-22 12:19:08 -05:00
Julian Lam
158e47e2ac linting 2017-09-13 16:51:31 -04:00
Peter Jaszkowiak
2ca1475eee Fix web installer benchpress issue 2017-09-13 13:50:00 -06:00
Peter Jaszkowiak
abffc29128 Use Benchpress (#5901)
* Use Benchpress

* Use Benchpress.compileParse

* Error for template load failure

* Use benchpressjs package

* Compile templates on demand

* Fix user settings page

* Fix admin search to exclude `.jst` files

* Fix 500-embed

So ajaxify can still show an error if the server goes down
2017-08-24 19:26:50 -04:00
Barış Soner Uşaklı
75e5073fc9 closes #5859 2017-08-04 22:23:59 -04:00
Barış Soner Uşaklı
5d53c41db7 fix unlink calls 2017-08-03 20:15:55 -04:00
Peter Jaszkowiak
c4bdb72941 ESlint no-unneeded-ternary
and no-extend-native, no-sequences
2017-02-18 12:59:46 -07:00
Peter Jaszkowiak
feb8405f95 ESlint eol-last 2017-02-18 02:30:48 -07:00
Peter Jaszkowiak
a038c66549 ESlint quotes 2017-02-18 01:56:23 -07:00
Peter Jaszkowiak
604358ecc4 ESlint keyword-spacing, no-multi-spaces 2017-02-18 01:52:56 -07:00
Peter Jaszkowiak
2e031f3759 ESlint comma-spacing 2017-02-18 01:31:47 -07:00
Peter Jaszkowiak
277a7fb8b4 ESlint key-spacing, no-trailing-spaces 2017-02-18 01:27:46 -07:00
Peter Jaszkowiak
bc1d70c126 ESlint comma-dangle 2017-02-17 19:31:21 -07:00