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