@forge/manifest 13.6.0-next.2-experimental-554d417 → 13.6.0-next.4
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 +6 -5
- package/out/scopes/index.d.ts +1 -0
- package/out/scopes/index.d.ts.map +1 -1
- package/out/scopes/index.js +5 -0
- package/out/scopes/teamwork-graph-scopes.json +72 -0
- package/out/validators/display-conditions-validator.d.ts +1 -1
- package/out/validators/display-conditions-validator.d.ts.map +1 -1
- package/out/validators/display-conditions-validator.js +7 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# @forge/manifest
|
|
2
2
|
|
|
3
|
-
## 13.6.0-next.
|
|
3
|
+
## 13.6.0-next.4
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 5932866: Allow `and`/`or`/`not` in `displayConditions` on Jira and JSM modules to be a list of composite conditions, in addition to a single condition object.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 13.6.0-next.3
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- e7dc317: Warn when Teamwork Graph API usage is detected without graph scopes in the manifest, with guidance to review scope documentation. The warning does not block builds or automatically add scopes.
|
|
13
14
|
|
|
14
15
|
## 13.6.0-next.2
|
|
15
16
|
|
package/out/scopes/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export type RequiredScopes = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare function getMissingScopes(existing: Scopes | undefined, required: RequiredScopes): Promise<string[]>;
|
|
8
8
|
export declare function getScopesWithInteractiveConsent(): Set<string>;
|
|
9
|
+
export declare function getTeamworkGraphScopes(): ReadonlySet<string>;
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK5C,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA+BhH;AAED,wBAAgB,+BAA+B,IAAI,GAAG,CAAC,MAAM,CAAC,CAE7D;AAGD,wBAAgB,sBAAsB,IAAI,WAAW,CAAC,MAAM,CAAC,CAE5D"}
|
package/out/scopes/index.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMissingScopes = getMissingScopes;
|
|
4
4
|
exports.getScopesWithInteractiveConsent = getScopesWithInteractiveConsent;
|
|
5
|
+
exports.getTeamworkGraphScopes = getTeamworkGraphScopes;
|
|
5
6
|
const tslib_1 = require("tslib");
|
|
6
7
|
const scopes_1 = require("../utils/scopes");
|
|
7
8
|
const shipyard_scopes_with_interactive_consent_json_1 = tslib_1.__importDefault(require("./shipyard-scopes-with-interactive-consent.json"));
|
|
9
|
+
const teamwork_graph_scopes_json_1 = tslib_1.__importDefault(require("./teamwork-graph-scopes.json"));
|
|
8
10
|
async function getMissingScopes(existing, required) {
|
|
9
11
|
const { current: requiredCurrentScopes = [], beta: requiredBetaScopes = [], deprecated: requiredDeprecatedScopes = [] } = required;
|
|
10
12
|
const existingScopes = existing ? (0, scopes_1.getAllScopeKeys)(existing) : [];
|
|
@@ -27,3 +29,6 @@ async function getMissingScopes(existing, required) {
|
|
|
27
29
|
function getScopesWithInteractiveConsent() {
|
|
28
30
|
return new Set(shipyard_scopes_with_interactive_consent_json_1.default);
|
|
29
31
|
}
|
|
32
|
+
function getTeamworkGraphScopes() {
|
|
33
|
+
return new Set(teamwork_graph_scopes_json_1.default);
|
|
34
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[
|
|
2
|
+
"read:graph:assets-object:atlassian",
|
|
3
|
+
"read:graph:blogpost:confluence",
|
|
4
|
+
"read:graph:board:jira",
|
|
5
|
+
"read:graph:branch:external",
|
|
6
|
+
"read:graph:build:external",
|
|
7
|
+
"read:graph:calendar-event:external",
|
|
8
|
+
"read:graph:change-proposal:focus",
|
|
9
|
+
"read:graph:comment:atlassian",
|
|
10
|
+
"read:graph:comment:confluence",
|
|
11
|
+
"read:graph:comment:external",
|
|
12
|
+
"read:graph:comment:loom",
|
|
13
|
+
"read:graph:commit:external",
|
|
14
|
+
"read:graph:component-link:compass",
|
|
15
|
+
"read:graph:component:compass",
|
|
16
|
+
"read:graph:conversation:external",
|
|
17
|
+
"read:graph:customer-contact:external",
|
|
18
|
+
"read:graph:customer-org-category:external",
|
|
19
|
+
"read:graph:customer-org:external",
|
|
20
|
+
"read:graph:dashboard:external",
|
|
21
|
+
"read:graph:data-table:external",
|
|
22
|
+
"read:graph:database:confluence",
|
|
23
|
+
"read:graph:deal:external",
|
|
24
|
+
"read:graph:deployment:external",
|
|
25
|
+
"read:graph:design:external",
|
|
26
|
+
"read:graph:document:external",
|
|
27
|
+
"read:graph:feature-flag:external",
|
|
28
|
+
"read:graph:focus-area-status-update:focus",
|
|
29
|
+
"read:graph:focus-area:focus",
|
|
30
|
+
"read:graph:folder:confluence",
|
|
31
|
+
"read:graph:goal-update:atlassian",
|
|
32
|
+
"read:graph:goal:atlassian",
|
|
33
|
+
"read:graph:issue-comment:jira",
|
|
34
|
+
"read:graph:issue-remote-link:jira",
|
|
35
|
+
"read:graph:issue-status:jira",
|
|
36
|
+
"read:graph:issue-worklog:jira",
|
|
37
|
+
"read:graph:issue:jira",
|
|
38
|
+
"read:graph:meeting-recurrence:loom",
|
|
39
|
+
"read:graph:meeting:loom",
|
|
40
|
+
"read:graph:message:external",
|
|
41
|
+
"read:graph:organisation:external",
|
|
42
|
+
"read:graph:page:confluence",
|
|
43
|
+
"read:graph:position:external",
|
|
44
|
+
"read:graph:position:talent",
|
|
45
|
+
"read:graph:priority:jira",
|
|
46
|
+
"read:graph:project-update:atlassian",
|
|
47
|
+
"read:graph:project:atlassian",
|
|
48
|
+
"read:graph:project:external",
|
|
49
|
+
"read:graph:project:jira",
|
|
50
|
+
"read:graph:pull-request:external",
|
|
51
|
+
"read:graph:remote-link:external",
|
|
52
|
+
"read:graph:repository:external",
|
|
53
|
+
"read:graph:scorecard:compass",
|
|
54
|
+
"read:graph:service:external",
|
|
55
|
+
"read:graph:space:confluence",
|
|
56
|
+
"read:graph:space:external",
|
|
57
|
+
"read:graph:space:loom",
|
|
58
|
+
"read:graph:sprint:jira",
|
|
59
|
+
"read:graph:tag:atlassian",
|
|
60
|
+
"read:graph:team-type:atlassian",
|
|
61
|
+
"read:graph:team:atlassian",
|
|
62
|
+
"read:graph:team:opsgenie",
|
|
63
|
+
"read:graph:user:atlassian",
|
|
64
|
+
"read:graph:version:jira",
|
|
65
|
+
"read:graph:video:external",
|
|
66
|
+
"read:graph:video:loom",
|
|
67
|
+
"read:graph:vulnerability:external",
|
|
68
|
+
"read:graph:whiteboard:confluence",
|
|
69
|
+
"read:graph:work-item:external",
|
|
70
|
+
"read:graph:worker:external",
|
|
71
|
+
"read:graph:worker:talent"
|
|
72
|
+
]
|
|
@@ -7,7 +7,7 @@ export declare class DisplayConditionsValidator<T> implements ValidatorInterface
|
|
|
7
7
|
private readonly moduleSchemas;
|
|
8
8
|
private readonly supportedOperations;
|
|
9
9
|
constructor(schema: object);
|
|
10
|
-
flattenDisplayConditions(moduleKey: string, displayConditions: any, nesting?: number, location?: string): any;
|
|
10
|
+
flattenDisplayConditions(moduleType: string, moduleKey: string, displayConditions: any, nesting?: number, location?: string): any;
|
|
11
11
|
toValidationError(message: string): ValidationError;
|
|
12
12
|
private collectNestedDisplayConditionsTargets;
|
|
13
13
|
private validateDisplayConditions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-conditions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/display-conditions-validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,cAAc,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"display-conditions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/display-conditions-validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,cAAc,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAsBpD,qBAAa,0BAA0B,CAAC,CAAC,CACvC,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAM7E,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJnC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAmB;IAClD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA2B;gBAElC,MAAM,EAAE,MAAM;IAoE3C,wBAAwB,CACtB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,GAAG,EACtB,OAAO,SAAI,EACX,QAAQ,CAAC,EAAE,MAAM,GAChB,GAAG;IAqCN,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe;IAanD,OAAO,CAAC,qCAAqC;IA0C7C,OAAO,CAAC,yBAAyB;IAuD3B,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA4ErD"}
|
|
@@ -9,6 +9,7 @@ const isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object
|
|
|
9
9
|
const errors = text_1.errors.modules.displayConditions;
|
|
10
10
|
const pageLocation = (page, index) => typeof page?.route === 'string' ? `page "${page.route}"` : `page[${index}]`;
|
|
11
11
|
const sectionLocation = (section, index) => typeof section?.header === 'string' ? `section "${section.header}"` : `section[${index}]`;
|
|
12
|
+
const isJiraOrJsmModuleType = (moduleType) => moduleType.startsWith('jira:') || moduleType.startsWith('jiraServiceManagement:');
|
|
12
13
|
class DisplayConditionsValidator {
|
|
13
14
|
schema;
|
|
14
15
|
validateSchema;
|
|
@@ -22,11 +23,14 @@ class DisplayConditionsValidator {
|
|
|
22
23
|
this.moduleSchemas = properties.modules?.properties;
|
|
23
24
|
this.supportedOperations = properties.operations?.items?.enum;
|
|
24
25
|
}
|
|
25
|
-
flattenDisplayConditions(moduleKey, displayConditions, nesting = 0, location) {
|
|
26
|
+
flattenDisplayConditions(moduleType, moduleKey, displayConditions, nesting = 0, location) {
|
|
26
27
|
if (nesting >= 10) {
|
|
27
28
|
throw Error(errors.overcomplicated(moduleKey, location));
|
|
28
29
|
}
|
|
29
30
|
if (Array.isArray(displayConditions)) {
|
|
31
|
+
if (isJiraOrJsmModuleType(moduleType)) {
|
|
32
|
+
return displayConditions.flatMap((entry) => this.flattenDisplayConditions(moduleType, moduleKey, entry, nesting, location));
|
|
33
|
+
}
|
|
30
34
|
return [displayConditions];
|
|
31
35
|
}
|
|
32
36
|
const result = [];
|
|
@@ -34,7 +38,7 @@ class DisplayConditionsValidator {
|
|
|
34
38
|
const keys = Object.keys(displayConditions);
|
|
35
39
|
for (let i = 0; i < keys.length; i += 1) {
|
|
36
40
|
if (this.supportedOperations.includes(keys[i])) {
|
|
37
|
-
result.push(...this.flattenDisplayConditions(moduleKey, displayConditions[keys[i]], nesting + 1, location));
|
|
41
|
+
result.push(...this.flattenDisplayConditions(moduleType, moduleKey, displayConditions[keys[i]], nesting + 1, location));
|
|
38
42
|
}
|
|
39
43
|
else {
|
|
40
44
|
obj[keys[i]] = displayConditions[keys[i]];
|
|
@@ -90,7 +94,7 @@ class DisplayConditionsValidator {
|
|
|
90
94
|
}
|
|
91
95
|
let flattened = [];
|
|
92
96
|
try {
|
|
93
|
-
flattened = this.flattenDisplayConditions(moduleKey, displayConditions, 0, location);
|
|
97
|
+
flattened = this.flattenDisplayConditions(moduleType, moduleKey, displayConditions, 0, location);
|
|
94
98
|
}
|
|
95
99
|
catch (e) {
|
|
96
100
|
reportError('n/a', e.message);
|