nodebb-plugin-pdf-secure2 1.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +22 -0
- package/LICENSE +21 -0
- package/README.md +17 -0
- package/commitlint.config.js +26 -0
- package/docs/plans/2026-02-24-premium-gate-design.md +52 -0
- package/docs/plans/2026-02-24-premium-gate.md +323 -0
- package/eslint.config.mjs +10 -0
- package/image.png +0 -0
- package/languages/de/pdf-secure.json +7 -0
- package/languages/en-GB/pdf-secure.json +7 -0
- package/languages/en-US/pdf-secure.json +7 -0
- package/lib/controllers.js +65 -0
- package/lib/nonce-store.js +70 -0
- package/lib/pdf-handler.js +122 -0
- package/library.js +249 -0
- package/package.json +53 -0
- package/plugin.json +37 -0
- package/renovate.json +5 -0
- package/static/image.png +0 -0
- package/static/lib/main.js +477 -0
- package/static/lib/pdf-secure (1).pdf +0 -0
- package/static/lib/pdf.min.mjs +21 -0
- package/static/lib/pdf.worker.min.mjs +21 -0
- package/static/lib/viewer.js +184 -0
- package/static/style.less +142 -0
- package/static/templates/admin/plugins/pdf-secure.tpl +43 -0
- package/static/viewer-app.js +2906 -0
- package/static/viewer-yedek.html +4548 -0
- package/static/viewer.css +1500 -0
- package/static/viewer.html +5632 -0
- package/test/.eslintrc +9 -0
- package/test/index.js +41 -0
package/test/.eslintrc
ADDED
package/test/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* You can run these tests by executing `npx mocha test/plugins-installed.js`
|
|
3
|
+
* from the NodeBB root folder. The regular test runner will also run these
|
|
4
|
+
* tests.
|
|
5
|
+
*
|
|
6
|
+
* Keep in mind tests do not activate all plugins, so if you are testing
|
|
7
|
+
* hook listeners, socket.io, or mounted routes, you will need to add your
|
|
8
|
+
* plugin to `config.json`, e.g.
|
|
9
|
+
*
|
|
10
|
+
* {
|
|
11
|
+
* "test_plugins": [
|
|
12
|
+
* "nodebb-plugin-pdf-secure"
|
|
13
|
+
* ]
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
/* globals describe, it, before */
|
|
20
|
+
|
|
21
|
+
const assert = require('assert');
|
|
22
|
+
|
|
23
|
+
const db = require.main.require('./test/mocks/databasemock');
|
|
24
|
+
|
|
25
|
+
describe('nodebb-plugin-pdf-secure', () => {
|
|
26
|
+
before(() => {
|
|
27
|
+
// Prepare for tests here
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('should pass', (done) => {
|
|
31
|
+
const actual = 'value';
|
|
32
|
+
const expected = 'value';
|
|
33
|
+
assert.strictEqual(actual, expected);
|
|
34
|
+
done();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('should load config object', async () => {
|
|
38
|
+
const config = await db.getObject('config');
|
|
39
|
+
assert(config);
|
|
40
|
+
});
|
|
41
|
+
});
|