@dcl/content-validator 1.4.1 → 1.4.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../src/validations/access-checker/access.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../src/validations/access-checker/access.ts"],"names":[],"mappings":"AAEA,OAAO,EAAM,UAAU,EAAoB,MAAM,aAAa,CAAA;AAc9D;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,UAgBpB,CAAA"}
|
|
@@ -23,9 +23,18 @@ exports.access = {
|
|
|
23
23
|
const { deployment, externalCalls } = args;
|
|
24
24
|
const deployedBeforeDCLLaunch = deployment.entity.timestamp <= __1.LEGACY_CONTENT_MIGRATION_TIMESTAMP;
|
|
25
25
|
const address = externalCalls.ownerAddress(deployment.auditInfo);
|
|
26
|
+
// Default scenes were removed from the Content Servers after https://github.com/decentraland/catalyst/issues/878
|
|
27
|
+
if (isDefaultScene(deployment.entity)) {
|
|
28
|
+
return types_1.validationFailed(`Scene pointers should only contain two integers separated by a comma, for example (10,10) or (120,-45).`);
|
|
29
|
+
}
|
|
30
|
+
// Legacy entities still need to be synchronized
|
|
26
31
|
if (deployedBeforeDCLLaunch && externalCalls.isAddressOwnedByDecentraland(address))
|
|
27
32
|
return types_1.OK;
|
|
28
33
|
return accessCheckers[deployment.entity.type].validate(args);
|
|
29
34
|
},
|
|
30
35
|
};
|
|
36
|
+
function isDefaultScene(entity) {
|
|
37
|
+
return entity.type === dcl_catalyst_commons_1.EntityType.SCENE &&
|
|
38
|
+
entity.pointers.some(p => p.toLowerCase().startsWith('default'));
|
|
39
|
+
}
|
|
31
40
|
//# sourceMappingURL=access.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../../src/validations/access-checker/access.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../../src/validations/access-checker/access.ts"],"names":[],"mappings":";;;AAAA,+DAAyD;AACzD,0BAAuD;AACvD,uCAA8D;AAC9D,yCAAqC;AACrC,qCAAiC;AACjC,qCAAiC;AACjC,2CAAuC;AAGvC,MAAM,cAAc,GAAmC;IACrD,CAAC,iCAAU,CAAC,OAAO,CAAC,EAAE,mBAAQ;IAC9B,CAAC,iCAAU,CAAC,KAAK,CAAC,EAAE,eAAM;IAC1B,CAAC,iCAAU,CAAC,QAAQ,CAAC,EAAE,qBAAS;IAChC,CAAC,iCAAU,CAAC,KAAK,CAAC,EAAE,eAAM;CAC3B,CAAA;AAED;;;GAGG;AACU,QAAA,MAAM,GAAe;IAChC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACvB,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,IAAI,CAAA;QAC1C,MAAM,uBAAuB,GAAG,UAAU,CAAC,MAAM,CAAC,SAAS,IAAI,sCAAkC,CAAA;QACjG,MAAM,OAAO,GAAG,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QAEhE,iHAAiH;QACjH,IAAI,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACrC,OAAO,wBAAgB,CACrB,yGAAyG,CAAC,CAAA;SAC7G;QACD,gDAAgD;QAChD,IAAI,uBAAuB,IAAI,aAAa,CAAC,4BAA4B,CAAC,OAAO,CAAC;YAAE,OAAO,UAAE,CAAA;QAE7F,OAAO,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC9D,CAAC;CACF,CAAA;AAED,SAAS,cAAc,CAAC,MAAc;IACpC,OAAO,MAAM,CAAC,IAAI,KAAK,iCAAU,CAAC,KAAK;QACrC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAA;AACpE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/content-validator",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Catalyst content validations",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@dcl/content-hash-tree": "1.1.2",
|
|
37
37
|
"@dcl/hashing": "1.1.0",
|
|
38
|
-
"@dcl/schemas": "4.
|
|
38
|
+
"@dcl/schemas": "4.2.0",
|
|
39
39
|
"@dcl/urn-resolver": "1.3.0",
|
|
40
40
|
"@ethersproject/address": "5.5.0",
|
|
41
41
|
"@well-known-components/interfaces": "1.1.1",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"files": [
|
|
50
50
|
"dist"
|
|
51
51
|
],
|
|
52
|
-
"commit": "
|
|
52
|
+
"commit": "a9976bbf301efe3345fbdc869d978dfaca870271"
|
|
53
53
|
}
|