@bragduck/cli 2.10.1 → 2.10.2
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/dist/bin/bragduck.js +14 -6
- package/dist/bin/bragduck.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/bragduck.js
CHANGED
|
@@ -3711,13 +3711,19 @@ var ConfluenceService = class {
|
|
|
3711
3711
|
return "";
|
|
3712
3712
|
}
|
|
3713
3713
|
const queries = [];
|
|
3714
|
-
queries.push("type=page");
|
|
3715
|
-
queries.push("status=current");
|
|
3714
|
+
queries.push("type = page");
|
|
3715
|
+
queries.push("status = current");
|
|
3716
3716
|
if (options.days) {
|
|
3717
|
-
queries.push(`lastModified >=
|
|
3717
|
+
queries.push(`lastModified >= -${options.days}d`);
|
|
3718
3718
|
}
|
|
3719
3719
|
if (options.author) {
|
|
3720
|
-
|
|
3720
|
+
if (options.author.includes("@")) {
|
|
3721
|
+
queries.push("(creator = currentUser() OR contributor = currentUser())");
|
|
3722
|
+
} else {
|
|
3723
|
+
queries.push(`(creator = "${options.author}" OR contributor = "${options.author}")`);
|
|
3724
|
+
}
|
|
3725
|
+
} else {
|
|
3726
|
+
queries.push("(creator = currentUser() OR contributor = currentUser())");
|
|
3721
3727
|
}
|
|
3722
3728
|
if (options.cql) {
|
|
3723
3729
|
queries.push(`(${options.cql})`);
|
|
@@ -3736,6 +3742,9 @@ var ConfluenceService = class {
|
|
|
3736
3742
|
*/
|
|
3737
3743
|
async getPages(options = {}) {
|
|
3738
3744
|
const cql = this.buildCQL(options);
|
|
3745
|
+
if (cql) {
|
|
3746
|
+
logger.debug(`Using CQL query: ${cql}`);
|
|
3747
|
+
}
|
|
3739
3748
|
const allPages = [];
|
|
3740
3749
|
const seenPageIds = /* @__PURE__ */ new Set();
|
|
3741
3750
|
let start = 0;
|
|
@@ -3753,7 +3762,6 @@ var ConfluenceService = class {
|
|
|
3753
3762
|
let endpoint;
|
|
3754
3763
|
let params;
|
|
3755
3764
|
if (cql) {
|
|
3756
|
-
logger.debug(`Using CQL search: ${cql}`);
|
|
3757
3765
|
params = {
|
|
3758
3766
|
cql,
|
|
3759
3767
|
start: start.toString(),
|
|
@@ -3826,7 +3834,7 @@ var ConfluenceService = class {
|
|
|
3826
3834
|
return allPages.map((page) => this.transformPageToCommit(page));
|
|
3827
3835
|
}
|
|
3828
3836
|
/**
|
|
3829
|
-
* Fetch pages for the current authenticated user
|
|
3837
|
+
* Fetch pages for the current authenticated user (created or contributed to)
|
|
3830
3838
|
*/
|
|
3831
3839
|
async getPagesByCurrentUser(options = {}) {
|
|
3832
3840
|
const email = await this.getCurrentUser();
|