wiki-plugin-shoppe 0.0.26 → 0.0.27
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/client/shoppe.js +4 -4
- package/package.json +1 -1
- package/server/server.js +4 -1
package/client/shoppe.js
CHANGED
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
|
|
174
174
|
div.querySelector('#sw-remove-btn').addEventListener('click', () => {
|
|
175
175
|
const $page = $item.parents('.page');
|
|
176
|
-
if (window.pageHandler && $page.length) {
|
|
177
|
-
pageHandler.put($page, { type: 'remove', id: item.id });
|
|
176
|
+
if (window.wiki && wiki.pageHandler && $page.length) {
|
|
177
|
+
wiki.pageHandler.put($page, { type: 'remove', id: item.id });
|
|
178
178
|
$item.remove();
|
|
179
179
|
} else if (window.wiki && wiki.textEditor) {
|
|
180
180
|
wiki.textEditor($item, item);
|
|
@@ -190,8 +190,8 @@
|
|
|
190
190
|
bind: function($item, item) {
|
|
191
191
|
$item.on('dblclick', () => {
|
|
192
192
|
const $page = $item.parents('.page');
|
|
193
|
-
if (window.pageHandler && $page.length) {
|
|
194
|
-
pageHandler.put($page, { type: 'remove', id: item.id });
|
|
193
|
+
if (window.wiki && wiki.pageHandler && $page.length) {
|
|
194
|
+
wiki.pageHandler.put($page, { type: 'remove', id: item.id });
|
|
195
195
|
$item.remove();
|
|
196
196
|
} else if (window.wiki && wiki.textEditor) {
|
|
197
197
|
wiki.textEditor($item, item);
|
package/package.json
CHANGED
package/server/server.js
CHANGED
|
@@ -219,7 +219,7 @@ function generateBundleBuffer(tenant, ownerPrivateKey, ownerPubKey, wikiOrigin)
|
|
|
219
219
|
private: true,
|
|
220
220
|
description: 'Shoppe content folder',
|
|
221
221
|
dependencies: {
|
|
222
|
-
'sessionless-node': '
|
|
222
|
+
'sessionless-node': 'latest'
|
|
223
223
|
}
|
|
224
224
|
}, null, 2);
|
|
225
225
|
|
|
@@ -489,6 +489,7 @@ async function sanoraCreateProduct(tenant, title, category, description, price,
|
|
|
489
489
|
`${getSanoraUrl()}/user/${uuid}/product/${encodeURIComponent(title)}`,
|
|
490
490
|
{
|
|
491
491
|
method: 'PUT',
|
|
492
|
+
timeout: 15000,
|
|
492
493
|
headers: { 'Content-Type': 'application/json' },
|
|
493
494
|
body: JSON.stringify({
|
|
494
495
|
timestamp,
|
|
@@ -522,6 +523,7 @@ async function sanoraUploadArtifact(tenant, title, fileBuffer, filename, artifac
|
|
|
522
523
|
`${getSanoraUrl()}/user/${uuid}/product/${encodeURIComponent(title)}/artifact`,
|
|
523
524
|
{
|
|
524
525
|
method: 'PUT',
|
|
526
|
+
timeout: 30000,
|
|
525
527
|
headers: {
|
|
526
528
|
'x-pn-artifact-type': artifactType,
|
|
527
529
|
'x-pn-timestamp': timestamp,
|
|
@@ -551,6 +553,7 @@ async function sanoraUploadImage(tenant, title, imageBuffer, filename) {
|
|
|
551
553
|
`${getSanoraUrl()}/user/${uuid}/product/${encodeURIComponent(title)}/image`,
|
|
552
554
|
{
|
|
553
555
|
method: 'PUT',
|
|
556
|
+
timeout: 30000,
|
|
554
557
|
headers: {
|
|
555
558
|
'x-pn-timestamp': timestamp,
|
|
556
559
|
'x-pn-signature': signature,
|