@aws-amplify/graphql-auth-transformer 0.7.12 → 0.8.0-beta.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,54 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.8.0-beta.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-auth-transformer@0.7.12...@aws-amplify/graphql-auth-transformer@0.8.0-beta.2) (2022-04-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add handling of colon-delimited identity claims to query ([#10189](https://github.com/aws-amplify/amplify-cli/issues/10189)) ([d7983f4](https://github.com/aws-amplify/amplify-cli/commit/d7983f411f69e79cbe7508684b31ba9f9f2d9c33))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Reverts
|
|
15
|
+
|
|
16
|
+
* Revert "feat: add handling of colon-delimited identity claims to query (#10189)" (#10213) ([9f13064](https://github.com/aws-amplify/amplify-cli/commit/9f13064d592937c82e534c32469053d7e96a169b)), closes [#10189](https://github.com/aws-amplify/amplify-cli/issues/10189) [#10213](https://github.com/aws-amplify/amplify-cli/issues/10213)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [0.8.0-beta.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-auth-transformer@0.7.12...@aws-amplify/graphql-auth-transformer@0.8.0-beta.1) (2022-04-14)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add handling of colon-delimited identity claims to query ([#10189](https://github.com/aws-amplify/amplify-cli/issues/10189)) ([d7983f4](https://github.com/aws-amplify/amplify-cli/commit/d7983f411f69e79cbe7508684b31ba9f9f2d9c33))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Reverts
|
|
31
|
+
|
|
32
|
+
* Revert "feat: add handling of colon-delimited identity claims to query (#10189)" (#10213) ([9f13064](https://github.com/aws-amplify/amplify-cli/commit/9f13064d592937c82e534c32469053d7e96a169b)), closes [#10189](https://github.com/aws-amplify/amplify-cli/issues/10189) [#10213](https://github.com/aws-amplify/amplify-cli/issues/10213)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [0.8.0-beta.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-auth-transformer@0.7.12...@aws-amplify/graphql-auth-transformer@0.8.0-beta.0) (2022-04-14)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* add handling of colon-delimited identity claims to query ([#10189](https://github.com/aws-amplify/amplify-cli/issues/10189)) ([d7983f4](https://github.com/aws-amplify/amplify-cli/commit/d7983f411f69e79cbe7508684b31ba9f9f2d9c33))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Reverts
|
|
47
|
+
|
|
48
|
+
* Revert "feat: add handling of colon-delimited identity claims to query (#10189)" (#10213) ([9f13064](https://github.com/aws-amplify/amplify-cli/commit/9f13064d592937c82e534c32469053d7e96a169b)), closes [#10189](https://github.com/aws-amplify/amplify-cli/issues/10189) [#10213](https://github.com/aws-amplify/amplify-cli/issues/10213)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
6
54
|
## [0.7.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-auth-transformer@0.7.11...@aws-amplify/graphql-auth-transformer@0.7.12) (2022-04-11)
|
|
7
55
|
|
|
8
56
|
**Note:** Version bump only for package @aws-amplify/graphql-auth-transformer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/resolvers/subscriptions.ts"],"names":[],"mappings":"AAcA,OAAO,EAEL,uBAAuB,EAGvB,cAAc,EAEf,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/resolvers/subscriptions.ts"],"names":[],"mappings":"AAcA,OAAO,EAEL,uBAAuB,EAGvB,cAAc,EAEf,MAAM,UAAU,CAAC;AAsClB,eAAO,MAAM,sCAAsC,cAAe,uBAAuB,SAAS,MAAM,cAAc,CAAC,KAAG,MAgCzH,CAAC"}
|
|
@@ -8,11 +8,14 @@ const dynamicRoleExpression = (roles) => {
|
|
|
8
8
|
const ownerExpression = new Array();
|
|
9
9
|
roles.forEach((role, idx) => {
|
|
10
10
|
if (role.strategy === 'owner') {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const roleClaims = role.claim.split(':');
|
|
12
|
+
ownerExpression.push((0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(`ownerEntity${idx}`), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.args.${role.entity}.split(":")[0]`), (0, graphql_mapping_template_1.nul)())));
|
|
13
|
+
roleClaims.forEach((claim, secIdx) => {
|
|
14
|
+
ownerExpression.push((0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)(utils_1.IS_AUTHORIZED_FLAG)), (0, graphql_mapping_template_1.compoundExpression)([
|
|
15
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(`ownerClaim${idx}_${secIdx}`), (0, helpers_1.getOwnerClaim)(claim)),
|
|
16
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)(`ownerEntity${idx}`), (0, graphql_mapping_template_1.ref)(`ownerClaim${idx}_${secIdx}`)), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(utils_1.IS_AUTHORIZED_FLAG), (0, graphql_mapping_template_1.bool)(true))),
|
|
17
|
+
])));
|
|
18
|
+
});
|
|
16
19
|
}
|
|
17
20
|
});
|
|
18
21
|
return [...(ownerExpression.length > 0 ? ownerExpression : [])];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/resolvers/subscriptions.ts"],"names":[],"mappings":";;;AAAA,uEAakC;AAClC,oCAOkB;AAClB,uCAQmB;AAEnB,MAAM,qBAAqB,GAAG,CAAC,KAA4B,EAAqB,EAAE;IAChF,MAAM,eAAe,GAAG,IAAI,KAAK,EAAc,CAAC;IAEhD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QAC1B,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,EAAE;YAC7B,
|
|
1
|
+
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/resolvers/subscriptions.ts"],"names":[],"mappings":";;;AAAA,uEAakC;AAClC,oCAOkB;AAClB,uCAQmB;AAEnB,MAAM,qBAAqB,GAAG,CAAC,KAA4B,EAAqB,EAAE;IAChF,MAAM,eAAe,GAAG,IAAI,KAAK,EAAc,CAAC;IAEhD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QAC1B,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,EAAE;YAC7B,MAAM,UAAU,GAAG,IAAI,CAAC,KAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1C,eAAe,CAAC,IAAI,CAAC,IAAA,8BAAG,EAAC,IAAA,8BAAG,EAAC,cAAc,GAAG,EAAE,CAAC,EAAE,IAAA,qCAAU,EAAC,IAAA,8BAAG,EAAC,oBAAoB,CAAC,EAAE,IAAA,8BAAG,EAAC,YAAY,IAAI,CAAC,MAAO,gBAAgB,CAAC,EAAE,IAAA,8BAAG,GAA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C,CAAC,CAAC,CAAC;IACzF,OAAO,IAAA,qCAAU,EAAC,qBAAqB,CAAC,CAAC,IAAA,6CAAkB,EAAC,CAAC,GAAG,oBAAoB,EAAE,sBAAY,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC,CAAC;AAhCW,QAAA,sCAAsC,0CAgCjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/graphql-auth-transformer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-beta.2",
|
|
4
4
|
"description": "Amplify GraphQL @auth Transformer",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"watch": "tsc -w"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-amplify/graphql-model-transformer": "0.13.
|
|
31
|
-
"@aws-amplify/graphql-relational-transformer": "0.
|
|
32
|
-
"@aws-amplify/graphql-transformer-core": "0.16.
|
|
33
|
-
"@aws-amplify/graphql-transformer-interfaces": "1.13.
|
|
30
|
+
"@aws-amplify/graphql-model-transformer": "0.13.5-beta.2",
|
|
31
|
+
"@aws-amplify/graphql-relational-transformer": "0.8.0-beta.2",
|
|
32
|
+
"@aws-amplify/graphql-transformer-core": "0.16.5-beta.2",
|
|
33
|
+
"@aws-amplify/graphql-transformer-interfaces": "1.13.1-beta.2",
|
|
34
34
|
"@aws-cdk/aws-appsync": "~1.124.0",
|
|
35
35
|
"@aws-cdk/aws-dynamodb": "~1.124.0",
|
|
36
36
|
"@aws-cdk/aws-iam": "~1.124.0",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"md5": "^2.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@aws-amplify/graphql-index-transformer": "0.11.
|
|
47
|
-
"@aws-amplify/graphql-searchable-transformer": "0.13.
|
|
46
|
+
"@aws-amplify/graphql-index-transformer": "0.11.5-beta.2",
|
|
47
|
+
"@aws-amplify/graphql-searchable-transformer": "0.13.7-beta.2",
|
|
48
48
|
"@types/node": "^12.12.6"
|
|
49
49
|
},
|
|
50
50
|
"jest": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
],
|
|
64
64
|
"collectCoverage": true
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "0d579e30c94f61df5bdae29adf16843f9033e430"
|
|
67
67
|
}
|