@forge/confluence-bridge 2.0.0 → 3.0.0-next.0-experimental-01f8230
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/CHANGELOG.md +12 -0
- package/README.md +3 -1
- package/out/content/getEditorContent.d.ts.map +1 -1
- package/out/content/getEditorContent.js +3 -3
- package/out/content/getMacroContent.d.ts +3 -0
- package/out/content/getMacroContent.d.ts.map +1 -0
- package/out/content/getMacroContent.js +19 -0
- package/out/content/index.d.ts +2 -1
- package/out/content/index.d.ts.map +1 -1
- package/out/content/index.js +5 -3
- package/out/content/updateMacro.d.ts +3 -0
- package/out/content/updateMacro.d.ts.map +1 -0
- package/out/content/updateMacro.js +16 -0
- package/out/index.d.ts +1 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -4
- package/package.json +1 -1
- package/out/content/updateExtension.d.ts +0 -3
- package/out/content/updateExtension.d.ts.map +0 -1
- package/out/content/updateExtension.js +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @forge/confluence-bridge
|
|
2
2
|
|
|
3
|
+
## 3.0.0-next.0-experimental-01f8230
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 1f895d0: Change updateExtension name to updateMacro and add a new function getMacroContent
|
|
8
|
+
|
|
9
|
+
## 3.0.0-next.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 1f895d0: Change updateExtension name to updateMacro and add a new function getMacroContent
|
|
14
|
+
|
|
3
15
|
## 2.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
Custom bridge methods for extensions to get or modify Confluence editor data.
|
|
4
4
|
|
|
5
5
|
- getEditorContent(): Gets current ADF of editor
|
|
6
|
+
|
|
7
|
+
- getMacroContent(): Gets current ADF of the current macro
|
|
6
8
|
|
|
7
|
-
-
|
|
9
|
+
- updateMacro(macroADF): Updates the current macro with new macro ADF passed in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEditorContent.d.ts","sourceRoot":"","sources":["../../src/content/getEditorContent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"getEditorContent.d.ts","sourceRoot":"","sources":["../../src/content/getEditorContent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,WAAW,CAAC,CAc7D"}
|
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getEditorContent = void 0;
|
|
4
4
|
const errors_1 = require("../errors");
|
|
5
5
|
const bridge_1 = require("../bridge");
|
|
6
|
-
const callBridge = (0, bridge_1.getCallBridge)();
|
|
7
6
|
async function getEditorContent() {
|
|
7
|
+
const callBridge = (0, bridge_1.getCallBridge)();
|
|
8
8
|
try {
|
|
9
9
|
const content = await callBridge('getEditorContent');
|
|
10
10
|
if (!content) {
|
|
11
|
-
throw new errors_1.BridgeAPIError('
|
|
11
|
+
throw new errors_1.BridgeAPIError('Editor content data is missing');
|
|
12
12
|
}
|
|
13
13
|
return content;
|
|
14
14
|
}
|
|
15
15
|
catch (err) {
|
|
16
|
-
throw new errors_1.BridgeAPIError('Unable to get content: ' + err.message);
|
|
16
|
+
throw new errors_1.BridgeAPIError('Unable to get editor content: ' + err.message);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
exports.getEditorContent = getEditorContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMacroContent.d.ts","sourceRoot":"","sources":["../../src/content/getMacroContent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,wBAAsB,eAAe,IAAI,OAAO,CAAC,WAAW,CAAC,CAc5D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMacroContent = void 0;
|
|
4
|
+
const errors_1 = require("../errors");
|
|
5
|
+
const bridge_1 = require("../bridge");
|
|
6
|
+
async function getMacroContent() {
|
|
7
|
+
const callBridge = (0, bridge_1.getCallBridge)();
|
|
8
|
+
try {
|
|
9
|
+
const content = await callBridge('getMacroContent');
|
|
10
|
+
if (!content) {
|
|
11
|
+
throw new errors_1.BridgeAPIError('Macro content data is missing');
|
|
12
|
+
}
|
|
13
|
+
return content;
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
throw new errors_1.BridgeAPIError('Unable to get macro content: ' + err.message);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.getMacroContent = getMacroContent;
|
package/out/content/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/out/content/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getMacroContent = exports.updateMacro = exports.getEditorContent = void 0;
|
|
4
4
|
var getEditorContent_1 = require("./getEditorContent");
|
|
5
5
|
Object.defineProperty(exports, "getEditorContent", { enumerable: true, get: function () { return getEditorContent_1.getEditorContent; } });
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "
|
|
6
|
+
var updateMacro_1 = require("./updateMacro");
|
|
7
|
+
Object.defineProperty(exports, "updateMacro", { enumerable: true, get: function () { return updateMacro_1.updateMacro; } });
|
|
8
|
+
var getMacroContent_1 = require("./getMacroContent");
|
|
9
|
+
Object.defineProperty(exports, "getMacroContent", { enumerable: true, get: function () { return getMacroContent_1.getMacroContent; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateMacro.d.ts","sourceRoot":"","sources":["../../src/content/updateMacro.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAsB,WAAW,CAAC,YAAY,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAW7E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateMacro = void 0;
|
|
4
|
+
const errors_1 = require("../errors");
|
|
5
|
+
const bridge_1 = require("../bridge");
|
|
6
|
+
async function updateMacro(macroContent) {
|
|
7
|
+
const callBridge = (0, bridge_1.getCallBridge)();
|
|
8
|
+
try {
|
|
9
|
+
const updateMacroResult = await callBridge('updateMacro', macroContent);
|
|
10
|
+
return updateMacroResult;
|
|
11
|
+
}
|
|
12
|
+
catch (err) {
|
|
13
|
+
throw new errors_1.BridgeAPIError('Unable to update macro: ' + err.message);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.updateMacro = updateMacro;
|
package/out/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './content';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
package/out/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "getEditorContent", { enumerable: true, get: function () { return content_1.getEditorContent; } });
|
|
6
|
-
Object.defineProperty(exports, "updateExtension", { enumerable: true, get: function () { return content_1.updateExtension; } });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./content"), exports);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateExtension.d.ts","sourceRoot":"","sources":["../../src/content/updateExtension.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,wBAAsB,eAAe,CAAC,gBAAgB,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CASrF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateExtension = void 0;
|
|
4
|
-
const errors_1 = require("../errors");
|
|
5
|
-
const bridge_1 = require("../bridge");
|
|
6
|
-
const callBridge = (0, bridge_1.getCallBridge)();
|
|
7
|
-
async function updateExtension(extensionContent) {
|
|
8
|
-
try {
|
|
9
|
-
const replaceExtensionResult = await callBridge('updateExtension', extensionContent);
|
|
10
|
-
return replaceExtensionResult;
|
|
11
|
-
}
|
|
12
|
-
catch (err) {
|
|
13
|
-
throw new errors_1.BridgeAPIError('Unable to update extension: ' + err.message);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.updateExtension = updateExtension;
|