@forge/confluence-bridge 2.0.0-next.0
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 +7 -0
- package/LICENSE.txt +7 -0
- package/README.md +7 -0
- package/out/bridge.d.ts +2 -0
- package/out/bridge.d.ts.map +1 -0
- package/out/bridge.js +7 -0
- package/out/content/getEditorContent.d.ts +3 -0
- package/out/content/getEditorContent.d.ts.map +1 -0
- package/out/content/getEditorContent.js +19 -0
- package/out/content/index.d.ts +3 -0
- package/out/content/index.d.ts.map +1 -0
- package/out/content/index.js +7 -0
- package/out/content/types.d.ts +4 -0
- package/out/content/types.d.ts.map +1 -0
- package/out/content/types.js +2 -0
- package/out/content/updateExtension.d.ts +3 -0
- package/out/content/updateExtension.d.ts.map +1 -0
- package/out/content/updateExtension.js +16 -0
- package/out/errors.d.ts +3 -0
- package/out/errors.d.ts.map +1 -0
- package/out/errors.js +6 -0
- package/out/index.d.ts +2 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js +6 -0
- package/package.json +17 -0
package/CHANGELOG.md
ADDED
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2025 Atlassian
|
|
2
|
+
Permission is hereby granted to use this software in accordance with the terms
|
|
3
|
+
and conditions outlined in the Atlassian Developer Terms, which can be found
|
|
4
|
+
at the following URL:
|
|
5
|
+
https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
|
|
6
|
+
By using this software, you agree to comply with these terms and conditions.
|
|
7
|
+
If you do not agree with these terms, you are not permitted to use this software.
|
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Forge Confluence Bridge API
|
|
2
|
+
|
|
3
|
+
Custom bridge methods for extensions to get or modify Confluence editor data.
|
|
4
|
+
|
|
5
|
+
- getEditorContent(): Gets current ADF of editor
|
|
6
|
+
|
|
7
|
+
- updateExtension(extensionADF): Updates the currently interacted with extension with new extensionADF passed in
|
package/out/bridge.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAO,MAAM,CAAC,UAAU,CAAC,CAAC,YAAY,CAE/D,CAAC"}
|
package/out/bridge.js
ADDED
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEditorContent = void 0;
|
|
4
|
+
const errors_1 = require("../errors");
|
|
5
|
+
const bridge_1 = require("../bridge");
|
|
6
|
+
const callBridge = (0, bridge_1.getCallBridge)();
|
|
7
|
+
async function getEditorContent() {
|
|
8
|
+
try {
|
|
9
|
+
const content = await callBridge('getEditorContent');
|
|
10
|
+
if (!content) {
|
|
11
|
+
throw new errors_1.BridgeAPIError('Content data is missing');
|
|
12
|
+
}
|
|
13
|
+
return content;
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
throw new errors_1.BridgeAPIError('Unable to get content: ' + err.message);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.getEditorContent = getEditorContent;
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateExtension = exports.getEditorContent = void 0;
|
|
4
|
+
var getEditorContent_1 = require("./getEditorContent");
|
|
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; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/content/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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;
|
package/out/errors.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAe,SAAQ,KAAK;CAAG"}
|
package/out/errors.js
ADDED
package/out/index.d.ts
ADDED
|
@@ -0,0 +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"}
|
package/out/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
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; } });
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@forge/confluence-bridge",
|
|
3
|
+
"version": "2.0.0-next.0",
|
|
4
|
+
"description": "Forge Confluence custom bridge API",
|
|
5
|
+
"author": "Atlassian",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
|
+
"browser": "out/index.js",
|
|
8
|
+
"types": "out/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "yarn run clean && yarn run compile",
|
|
11
|
+
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo",
|
|
12
|
+
"compile": "tsc -b -v"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|
|
16
|
+
}
|
|
17
|
+
}
|