261 Commits (4914332853bfc8c18cb68685b856cf9174eb4b5d)

Author SHA1 Message Date
Julian Lam 3052256db3 chore: deprecation notices for plugins using plugin old hook methods 4 years ago
Julian Lam 15ba0abb34 docs: update deprecation-removal version for plugin hook helper methods in 1.18.0 4 years ago
Barış Soner Uşaklı a1c014462c revert: bring back backwards compat 4 years ago
Barış Soner Uşaklı 647d3ba810 fix: removed methods 4 years ago
Julian Lam 5a775e09dc chore: remove deprecated plugin hook `filter:privileges:isUserAllowedTo` [breaking]
Use `filter:privileges:isAllowedTo` instead.
4 years ago
Julian Lam d41de481a4 chore: remove deprecated plugin hook methods [breaking]
Call plugins.hooks.fire() instead.
4 years ago
Julian Lam 5f9f241e37 chore: remove deprecated `filter:admin/header.build` hook [breaking]
Use `filter:middleware.renderAdminHeader` instead.
4 years ago
Barış Soner Uşaklı c608b0e8a3 fix: https://github.com/NodeBB/nodebb-plugin-webhooks/issues/3 4 years ago
Barış Soner Uşaklı fcc1e24ad0 feat: rename admin middleware header hook 4 years ago
Julian Lam 378a3a6945 fix: update version removal comments to 1.17 for some features 4 years ago
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 4 years ago
Julian Lam 98a05e4dde chore: add missing plugin hook deprecation warning 4 years ago
Julian Lam 8518404e22
feat: allow groups to specify which cids to show member posts from (#8875)
* feat: allow groups to specify which cids to show member posts from

* docs: fix tests for openapi

* fix: test breakage caused by improper conditional

* feat: server-side checking of memberPostCids for validity

* feat: admin panel template update to select categories to include

* refactor: privilege helpers.isUserAllowedTo

... to helpers.isAllowedTo, allowing group names to be passed in
4 years ago
Barış Soner Uşaklı a05905f196
performance improvements (#8795)
* perf: nconf/winston/render

cache nconf.get calls
modify middleware.pageView to call next earlier
don't call winston.verbose on every hook see https://github.com/winstonjs/winston/issues/1669
translate header/footer separately and cache results for guests

* fix: copy paste fail

* refactor: style and fire hook only log in dev mode

* fix: cache key, header changes based on template

* perf: change replace

* fix: add missing await

* perf: category

* perf: lodash clone

* perf: remove escapeRegexChars
4 years ago
Julian Lam 4a63c20a72 chore: some optimizations for codeclimate 4 years ago
Julian Lam 2ec838fc59 feat(writeapi): token generation/delete routes, ACP updates 4 years ago
Julian Lam 49652e6f1b feat: management of API tokens via ACP 4 years ago
Julian Lam dde5b6b814 fix: unable to register async method as response hook listener
Also fixes #8723, /api/config now runs middleware.authenticateOrGuest
4 years ago
Peter Jaszkowiak 1aa336d837
refactor: shared constants (#8707)
define plugin name and theme name regexs in one location for consistency

define various shared paths in one place for consistency
4 years ago
Peter Jaszkowiak 017af63fb0
fix: #8686, deprecate `plugin.json/library` (#8705)
and also fix deprecated hooks with no alternative
4 years ago
Julian Lam b12e8d6312 feat: show top 5 trending plugins in new tab in Extend > Plugins 4 years ago
Julian Lam 5ddf70221c feat: upon plugin installation via ACP, check against nbbpm first 4 years ago
Barış Soner Uşaklı 5f10d67db5
Remove sounds (#8617)
* feat: remove sounds

* feat: remove more sounds

* feat: disable sounds plugin

* fix: openapi
4 years ago
Barış Soner Uşaklı 4031a8cab1 fix: stack trace 5 years ago
Barış Soner Uşaklı 0189945996 refactor: remove util.promisify calls 5 years ago
Julian Lam 9e3fd0e479 Revert "feat: #8493, plugin helper for standardised link/button injection"
This reverts commit 0bbb813e4b.
5 years ago
Sam Thompson 0bbb813e4b feat: #8493, plugin helper for standardised link/button injection 5 years ago
Barış Soner Uşaklı 303bffdb5f feat: remove require fallback for plugins 5 years ago
Barış Soner Uşaklı ce6b20c4b7 feat: remove topics.async.getTopicData usage 5 years ago
Barış Soner Uşaklı 4eae927d14 feat: remove deprecated hooks 5 years ago
Barış Soner Uşaklı c2ca02dfc7 fix: #8474
make isPrimary and isCluster always booleans
they were strings when using ./nodebb start and boolean if they were in config.json and started with node app.js
5 years ago
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error 5 years ago
Julian Lam 922d49be0b fix(style): switch..case 5 years ago
Jonson Petard e6a1741c2e
Support package manager: cnpm and pnpm (#8222)
* feat: support pnpm, cnpm

* feat: store supportedPackageManager in default package.json

* feat: store supportedPackageManager in src/cli/package-install.js

Co-authored-by: a632079 <a632079@qq.com>
5 years ago
Barış Soner Uşaklı 01d1ae78c8 fix: #8120, bubble errors from static hooks 5 years ago
Barış Soner Uşaklı de404102c0 fix: #8061, don't crash if there is a network problem 5 years ago
Barış Soner Uşaklı 3775301f24 fix: #7958, give rewards one by one
no need to check group.exists when leaving groups, if group doesn't exists isMember will be false anyways
5 years ago
Barış Soner Uşaklı ffe3670ff5 feat: deprecate file.isFileTypeAllowed
use image.isFileTypeAllowed, this function was always meant for images
5 years ago
Julian Lam fe452762b7 fix: inability for plugins to actually alter parser sanitization config
/cc @pitaj
6 years ago
Julian Lam 2580306db9 feat: html sanitization on all filter:parse.* hooks, closes #7872 6 years ago
Barış Soner Uşaklı 592d9c82c5 fix: #7844, add uid to events, log plugin install/uninstall events 6 years ago
Julian Lam 29f96b199c fix(style): requiring parens in block bodies 6 years ago
Julian Lam 0921230976 fix(style): updated code to follow new eslint recommendations
Squashed commit of the following:

commit f9ce878b269b3568f0d649309aae1af4dcfdfeef
Author: Julian Lam <julian@nodebb.org>
Date:   Tue Aug 13 14:30:46 2019 -0400

    fix(style): updated code to follow new eslint recommendations

commit 80dd370e413f22badb96ff2138e7991dfff6d836
Author: Julian Lam <julian@nodebb.org>
Date:   Tue Aug 13 14:14:58 2019 -0400

    fix(deps): update dependency sitemap to v4

    Squashed commit of the following:

    commit f4dd9cabb21e26fdc21f8413be822ea7c64251f8
    Author: Julian Lam <julian@nodebb.org>
    Date:   Tue Aug 13 11:33:05 2019 -0400

        fix: resolved breaking changes from sitemap v4 upgrade

    commit 9043415ee16dcc27a8dcc2e4479d1bc5e2d1b60e
    Merge: e3352b272 72590b346
    Author: Julian Lam <julian@nodebb.org>
    Date:   Tue Aug 13 11:09:55 2019 -0400

        Merge branch 'master' into renovate/sitemap-4.x

    commit e3352b272eb9400bdb00774973181397803765e4
    Author: Renovate Bot <bot@renovateapp.com>
    Date:   Mon Aug 12 07:59:05 2019 +0000

        fix(deps): update dependency sitemap to v4

commit 8e3c0cdcae22acc32d352be8bb72d60e7502dbc5
Author: Renovate Bot <bot@renovateapp.com>
Date:   Fri Aug 9 00:49:51 2019 +0000

    fix(deps): update dependency commander to v3

commit 2104449d38818f2fa4d44b3a58a0a168781acbfb
Author: Renovate Bot <bot@renovateapp.com>
Date:   Tue Aug 13 15:00:27 2019 +0000

    fix(deps): update dependency mongodb to v3.3.0

commit d2937f446a21131c070ae5d0ff33d67cfe465b8c
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Tue Aug 13 10:36:48 2019 -0400

    feat: async/await admin/controllers

commit 1b97e8b199f960dc24e5722702f27499ae049914
Author: Misty (Bot) <deploy@nodebb.org>
Date:   Tue Aug 13 09:28:39 2019 +0000

    Latest translations and fallbacks

commit 69a48957a2f0d23c4d194b664bda3a0431179c01
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Mon Aug 12 21:56:09 2019 -0400

    feat: async/await

commit b9b2a7e593a452de4bef6d0ab6abe368a3bdb8dd
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Mon Aug 12 20:58:29 2019 -0400

    feat: async/await refactor

    controllers/accounts

commit a8d43a175974a0c8ae3dc132bf51a7ed9a4c6305
Author: Baris Usakli <barisusakli@gmail.com>
Date:   Mon Aug 12 14:49:40 2019 -0400

    feat: async/await controllers/accounts

commit 2f25aae57bf9dbe98d655276770e56bed9ec023b
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Sun Aug 11 23:09:50 2019 -0400

    fix: #7831, fix pagination

    convert to async/await

commit c9e83f2374572264855a04156278eef256b0a20c
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Sun Aug 11 00:14:35 2019 -0400

    fix: remove empty line

commit 30be91b26c4dd7583412c4e8d56e9c1688e48a44
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Sun Aug 11 00:13:41 2019 -0400

    fix: remove useless catchs and empty line

commit 2e4a71c0b6104738f15ffbfe3246105b922fdfb3
Author: Renovate Bot <bot@renovateapp.com>
Date:   Sat Aug 10 06:51:50 2019 +0000

    chore(deps): update dependency eslint-config-airbnb-base to v14
6 years ago
Barış Soner Uşaklı 3cc7ec63e8 feat: async/await refactor
controllers/accounts
6 years ago
Julian Lam 52a2e5d61d fix: #7816, adding GDPR and TOU interstitials earlier on route reloading
A use-case was presented that called for a theme to disable the
registration interstitials. However, the plugin hooks were always
fired first, and so the core interstitials could not be removed
at that time because they hadn't been added yet.

This change moved the interstitial adding to the earliest point
possible, right after plugins.loadedHooks is emptied in preparation
for plugin initialisation.
6 years ago
Barış Soner Uşaklı 0d047f4eb9 feat: #7743, webserver 6 years ago
Barış Soner Uşaklı c126cd8572 feat: #7743 plugins 6 years ago
Barış Soner Uşaklı f5f5f76b12 feat: #7743 plugins/data 6 years ago
Baris Usakli f3440ebfca fix: typo 6 years ago
Barış Soner Uşaklı bd640a1107
Topic await errors (#7727)
* feat: derp await

* feat: restore user.getSettings

* feat: cleanup

* feat: make tid const

* feat: cleanup

* fix: tests

* feat: deprecate filter:controllers.topic.get

* feat: rewrite post-index logic

* feat: change calculation to match others

* fix: use .async

* feat: remove try/catch wrapper
6 years ago
Barış Soner Uşaklı a7600b4bbe feat: dont log action:plugins.fireHook 6 years ago
Aziz Khoury a6436716ea feat: hooks can now return promise or call callbacks
* hooks can now return promise or call callbacks, either way works

* cleanups

* moar cleanups and fix callback 1st null arg

* rm unnessesary spread
6 years ago
Barış Soner Uşaklı 5fa5e999f8
Plugin metrics (#7626)
* feat: add enable/disable checkbox for plugin usage

* feat: submit plugin data to packages.nodebb.org

only submit in production mode
submit once every 24 hours
dont submit for plugins that have "private": true in plugin.json
enabled on new installs
disabled on existing installs

* fix: hash not working after first send

fix statusCode

* fix: remove url

* feat: show compatibilty

* feat: add install question for submit plugin usage
6 years ago
Barış Soner Uşaklı 6472a06515 fix: hook names getting objectified by winston 6 years ago
Julian Lam a23854e3ff feat: new hook type: `response`
Used in authentication middleware. Instead of firing an action
hook, it now fires a response hook.

Response hooks are invoked serially, and if headers are sent from
one of the hook listeners, all subsequent hook methods are not
called.

Response hooks should only be used in situations where res.send
(or other like methods) are invoked. Existing plugin hooks that
pass in res purely for data retrieval purposes have not changed).

fixes nodebb/nodebb-plugin-write-api#101
6 years ago
Baris Usakli c14dbfc6b7 attempt to fix tests 6 years ago
Baris Usakli 65f6630722 add new hook action:plugins.firehook 6 years ago
Peter Jaszkowiak e1ca2d81f9 refactor: use loash when possible (#7230) 6 years ago
Barış Soner Uşaklı a662f118a5 fix: #7054 6 years ago
Peter Jaszkowiak ba619c7ec8 style(eslint): match operator-linebreak preferences 6 years ago
Baris Usakli 33d7735690 change deprecated message 6 years ago
Barış Soner Uşaklı f75e2ed1ee fix lint 6 years ago
Barış Soner Uşaklı c36ddec08b promisify plugins 6 years ago
Barış Soner Uşaklı e1eebef398 does this work 6 years ago
Barış Soner Uşaklı e14b0b38be derprelic 6 years ago
Barış Soner Uşaklı 485fbf7386 show more lines in stack 6 years ago
renovate[bot] 64b9dabff8 chore(deps): update dependency eslint-config-airbnb-base to v13 (#6599)
* chore(deps): update dependency eslint-config-airbnb-base to v13

* chore: #6599, linting 😬
6 years ago
Barış Soner Uşaklı da22940b80 dont retry absolute paths 6 years ago
Barış Soner Uşaklı 2f198583c4 change to this 6 years ago
Barış Soner Uşaklı a2aae7f805 shorter error message 6 years ago
Baris Usakli 82cda248f3 fix plugin requires 6 years ago
Baris Usakli 138154a71c move modules 6 years ago
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
6 years ago
Barış Soner Uşaklı 81341e86ee log fired hooks 7 years ago
Peter Jaszkowiak 70ff2d9b88 Support scoped theme packages 7 years ago
Barış Soner Uşaklı b7f5995aab closes #6550 7 years ago
Barış Soner Uşaklı 0b0ce1df8a closes #6549 7 years ago
Barış Soner Uşaklı 25ebd306cc closes #6548 7 years ago
Barış Soner Uşaklı 2edd908aee closes #6547 7 years ago
Julian Lam 3b57d3eadb closes #6434 7 years ago
Barış Soner Uşaklı 15e9bbac92 closes #6311 7 years ago
Peter Jaszkowiak be00a1c013 Support for using yarn instead of npm, include unread counts on cold load (#6179)
* Close #6178

* Support for package managers besides npm

- Also fixes issue where upgrade-plugins wouldn't work
7 years ago
Barış Soner Uşaklı b55087dab7 closes #6166 7 years ago
Peter Jaszkowiak c47c47f7e3 Use less memory to build translation files (#6070)
* Change languages build to use less memory

Add graceful-fs so no ned to worry about fs limits

* Specify encoding for fs.readFile

Use eachLimit since graceful-fs handles that now
7 years ago
Peter Jaszkowiak dfad76120d Support npm@5 and yarn (#6010)
* Support npm@5 and yarn

Use package.default.json
Partial #6008

- Overwrite package.json with package.default.json values
- `dependencies` field is merged with package.default.json version taking precidence
- `./nodebb upgrade` automatically does those things and runs `git pull`
- use `./nodebb upgrade --dev` to avoid the `git pull`

* added logic to preserve extraneous plugins installed in node_modules/

* Don't automatically git pull

* Simplify package-install, run it on upgrade just in case
7 years ago
Peter Jaszkowiak e609e497b3 Provide more error information to logs
Provides full stack instead of just message
7 years ago
Baris Usakli 9101400264 closes #5961 7 years ago
Peter Jaszkowiak da9da8190f Bump dependencies
Bumping eslint & configs meant making some linting fixes

For future reference, the `xmlhttprequest-ssl` library must be of equal versioning to the one in `engine.io-client`, otherwise it won't be deduped which causes the socket.io tests to fail
7 years ago
Julian Lam 4976d13013 removed console log 8 years ago
Julian Lam f7d78771f8 fixes #5921 8 years ago
psychobunny 0e219a8c58 closes #5891 8 years ago
Baris Usakli 2053726c81 up spam-be-gone 8 years ago
Julian Lam 4f9cbabec3 fixes #5853 8 years ago
Julian Lam 29e7bdbc99 expose license info in plugin API for installed plugins 8 years ago
Julian Lam f4fb9ee04b adding filter hooks for flag list and retrieval 8 years ago
Julian Lam b4870654fc Merge pull request #5728 from NodeBB/patch-pitaj
Assorted Fixes
8 years ago
Julian Lam 29e868b002 closes #5585 8 years ago
Peter Jaszkowiak 34af855848 Fix npm@5 saving by default 8 years ago
Peter Jaszkowiak 3c2d4fe649 Switch from underscore to lodash 8 years ago
Barış Soner Uşaklı f1b8492164 remove unnecessary checks 8 years ago