boomack 0.13.0 → 0.13.1
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/package.json
CHANGED
|
@@ -39,6 +39,7 @@ function sanitizeOptions(options) {
|
|
|
39
39
|
options.debug = utils.enforceBoolean(options.debug, false);
|
|
40
40
|
options.transformation = utils.enforceString(options.transformation);
|
|
41
41
|
options.syntax = utils.enforceString(options.syntax);
|
|
42
|
+
options.renderer = utils.enforceString(options.renderer);
|
|
42
43
|
options.cache = utils.enforceEnum(optionsCacheEnum, options.cache, 'auto');
|
|
43
44
|
options.iframe = utils.enforceBoolean(options.iframe, null);
|
|
44
45
|
if (options.extend === 'beginning' ||
|
|
@@ -43,6 +43,7 @@ describe('model/display-request', function () {
|
|
|
43
43
|
debug: false,
|
|
44
44
|
transformation: null,
|
|
45
45
|
syntax: null,
|
|
46
|
+
renderer: null,
|
|
46
47
|
iframe: null,
|
|
47
48
|
cache: 'auto',
|
|
48
49
|
extend: 'no',
|
|
@@ -54,6 +55,7 @@ describe('model/display-request', function () {
|
|
|
54
55
|
'debug',
|
|
55
56
|
'transformation',
|
|
56
57
|
'syntax',
|
|
58
|
+
'renderer',
|
|
57
59
|
'iframe',
|
|
58
60
|
'cache',
|
|
59
61
|
'extend',
|
|
@@ -82,6 +84,7 @@ describe('model/display-request', function () {
|
|
|
82
84
|
debug: false,
|
|
83
85
|
transformation: null,
|
|
84
86
|
syntax: null,
|
|
87
|
+
renderer: null,
|
|
85
88
|
iframe: null,
|
|
86
89
|
cache: 'auto',
|
|
87
90
|
extend: 'no',
|
|
@@ -104,6 +107,7 @@ describe('model/display-request', function () {
|
|
|
104
107
|
options: {
|
|
105
108
|
transformation: 'highlight',
|
|
106
109
|
syntax: 'xml',
|
|
110
|
+
renderer: 'custom',
|
|
107
111
|
iframe: 'off',
|
|
108
112
|
cache: 'memory',
|
|
109
113
|
scale: 'invalid',
|
|
@@ -126,6 +130,7 @@ describe('model/display-request', function () {
|
|
|
126
130
|
debug: false,
|
|
127
131
|
transformation: 'highlight',
|
|
128
132
|
syntax: 'xml',
|
|
133
|
+
renderer: 'custom',
|
|
129
134
|
iframe: false,
|
|
130
135
|
cache: 'memory',
|
|
131
136
|
extend: 'end',
|
package/server-build/pipeline.js
CHANGED
|
@@ -98,6 +98,9 @@ function applyDisplayRequestDefaults(displayRequest, cb) {
|
|
|
98
98
|
o.transformation = null;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
if (o.transformation === 'none') {
|
|
102
|
+
o.transformation = null;
|
|
103
|
+
}
|
|
101
104
|
if (o.transformation !== 'highlight') {
|
|
102
105
|
o.syntax = null;
|
|
103
106
|
}
|
|
@@ -120,6 +123,9 @@ function applyDisplayRequestDefaults(displayRequest, cb) {
|
|
|
120
123
|
o.renderer = null;
|
|
121
124
|
}
|
|
122
125
|
}
|
|
126
|
+
if (o.renderer === 'none') {
|
|
127
|
+
o.renderer = null;
|
|
128
|
+
}
|
|
123
129
|
const fixedRenderer = o.renderer;
|
|
124
130
|
// read configuration values
|
|
125
131
|
const autoMemoryCacheThreshold = parseDataAmount(cfg.get('cache.memory.autoThreshold.global', 1 * 1024 * 1024)); // 1MB
|