@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 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
- - updateExtension(extensionADF): Updates the currently interacted with extension with new extensionADF passed in
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;AAItC,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,WAAW,CAAC,CAY7D"}
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('Content data is missing');
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,3 @@
1
+ import { ContentData } from './types';
2
+ export declare function getMacroContent(): Promise<ContentData>;
3
+ //# sourceMappingURL=getMacroContent.d.ts.map
@@ -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;
@@ -1,3 +1,4 @@
1
1
  export { getEditorContent } from './getEditorContent';
2
- export { updateExtension } from './updateExtension';
2
+ export { updateMacro } from './updateMacro';
3
+ export { getMacroContent } from './getMacroContent';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateExtension = exports.getEditorContent = void 0;
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 updateExtension_1 = require("./updateExtension");
7
- Object.defineProperty(exports, "updateExtension", { enumerable: true, get: function () { return updateExtension_1.updateExtension; } });
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,3 @@
1
+ import { type ContentData } from './types';
2
+ export declare function updateMacro(macroContent: ContentData): Promise<boolean>;
3
+ //# sourceMappingURL=updateMacro.d.ts.map
@@ -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 { getEditorContent, updateExtension } from './content';
1
+ export * from './content';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
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
- exports.updateExtension = exports.getEditorContent = void 0;
4
- var content_1 = require("./content");
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/confluence-bridge",
3
- "version": "2.0.0",
3
+ "version": "3.0.0-next.0-experimental-01f8230",
4
4
  "description": "Forge Confluence custom bridge API",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -1,3 +0,0 @@
1
- import { type ContentData } from './types';
2
- export declare function updateExtension(extensionContent: ContentData): Promise<boolean>;
3
- //# sourceMappingURL=updateExtension.d.ts.map
@@ -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;