85 Commits (6061d611ea63cb714961d04df16a0fb7bfda494f)

Author SHA1 Message Date
Barış Soner Uşaklı 1928a18617 fix: #10586, fix webinstaller folders 3 years ago
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 <[email protected]>
3 years ago
Barış Soner Uşaklı 997ab7d416 fix: #10377, remove logging of env vars 3 years ago
Barış Soner Uşaklı 6b22d0e15f fix: #10334, use the correct env vars for web install 3 years ago
Julian Lam 6e156daaf6 fix: don't load setup.json into nconf if setup.json doesn't exist 3 years ago
Barış Soner Uşaklı 14bc83a88e refactor: less.render returns promise 3 years ago
Julian Lam 16e0bca570 fix: improper use of filename extensions 4 years ago
Peter Jaszkowiak 5c2f0f0557 chore: eslint no-restricted-syntax 4 years ago
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top 4 years ago
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback 4 years ago
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template 4 years ago
Peter Jaszkowiak 4ee0f1459d chore: eslint import/newline-after-import 4 years ago
Peter Jaszkowiak dad01e3051 chore: eslint no-bitwise 4 years ago
Peter Jaszkowiak d30ea25629
feat(deps): [email protected] (#8887)
Better warnings, faster template compiles
4 years ago
Peter Jaszkowiak de5a21f19b
fix(#8828): web install templates now compiled (#8832) 4 years ago
Barış Soner Uşaklı 3881ac309f refactor: async/await install/web.js 4 years ago
Barış Soner Uşaklı dc29f4dca2 refactor: switch to using slugify module 4 years ago
Billy Ohgren 89062d8e70
add filename to less render call (#8459) 5 years ago
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error 5 years ago
Barış Soner Uşaklı 4bc77d064b feat: disable timeout on launch route 5 years ago
Andrew Rodrigues 962b7f73d3 fix: #7472 6 years ago
Barış Soner Uşaklı f4df89fe90 closes #6840 6 years ago
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
6 years ago
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.
7 years ago
Barış Soner Uşaklı fc56347c22 closes #6520 7 years ago
Barış Soner Uşaklı 085034a103 store success error for page reloads 7 years ago
Barış Soner Uşaklı c2f088cb61 dont install multiple times 7 years ago
Julian Lam 943d33ed09 closes #6502, also fixed issue with type: 'literal' in config.json 7 years ago
Peter Jaszkowiak a00f1f9a81 Use uglify-es for ES6 support (#6402) 7 years ago
Julian Lam da328662c5 don't flatten arrays, stringify them, in installer 7 years ago
Barış Soner Uşaklı fbed4c056e show env vars passed to setup 7 years ago
Julian Lam 1d42d1a6d2 moving expected location of setup.json to root 7 years ago
Julian Lam 741693bc1f closes #6378 7 years ago
Barış Soner Uşaklı 3b3a28dc15 add ping routes to webinstaller 7 years ago
Barış Soner Uşaklı 82f2025944 disable timeout on post install route 7 years ago
Barış Soner Uşaklı e092778ba6 closes #6200 7 years ago
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
7 years ago
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
7 years ago
Baris Usakli 5ca3b535e7 closes #6105 7 years ago
Julian Lam 158e47e2ac linting 7 years ago
Peter Jaszkowiak 2ca1475eee Fix web installer benchpress issue 7 years ago
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
8 years ago
Barış Soner Uşaklı 75e5073fc9 closes #5859 8 years ago
Barış Soner Uşaklı 5d53c41db7 fix unlink calls 8 years ago
Peter Jaszkowiak c4bdb72941 ESlint no-unneeded-ternary
and no-extend-native, no-sequences
8 years ago
Peter Jaszkowiak feb8405f95 ESlint eol-last 8 years ago
Peter Jaszkowiak a038c66549 ESlint quotes 8 years ago
Peter Jaszkowiak 604358ecc4 ESlint keyword-spacing, no-multi-spaces 8 years ago
Peter Jaszkowiak 2e031f3759 ESlint comma-spacing 8 years ago
Peter Jaszkowiak 277a7fb8b4 ESlint key-spacing, no-trailing-spaces 8 years ago