From 11d1f11a904a1c95ad0d383cb81334ba1362acd5 Mon Sep 17 00:00:00 2001 From: Hugo Arregui Date: Fri, 16 Feb 2024 14:06:56 -0300 Subject: [PATCH] support for base-wearables --- content/package.json | 6 ++--- .../handlers/filter-by-urn-handler.ts | 4 +-- content/src/ports/activeEntities.ts | 1 + yarn.lock | 27 +++++++++++++++++++ 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/content/package.json b/content/package.json index f21927138..5257ec52a 100644 --- a/content/package.json +++ b/content/package.json @@ -24,12 +24,12 @@ "@dcl/catalyst-api-specs": "^3.2.5", "@dcl/catalyst-contracts": "^4.3.1", "@dcl/catalyst-storage": "^4.1.0", - "@dcl/content-validator": "4.10.1", + "@dcl/content-validator": "https://sdk-team-cdn.decentraland.org/@dcl/content-validator/branch/base-emotes/dcl-content-validator-4.10.2-7933262421.commit-de04792.tgz", "@dcl/crypto": "^3.4.5", "@dcl/hashing": "^3.0.4", - "@dcl/schemas": "^10.2.0", + "@dcl/schemas": "https://sdk-team-cdn.decentraland.org/@dcl/schemas/branch/base-emotes/dcl-schemas-10.2.2-7932756126.commit-cda4f5a.tgz", "@dcl/snapshots-fetcher": "^9.0.3", - "@dcl/urn-resolver": "^3.2.0", + "@dcl/urn-resolver": "https://sdk-team-cdn.decentraland.org/@dcl/urn-resolver/branch/base-emotes/dcl-urn-resolver-3.2.1-7931301689.commit-434c4ef.tgz", "@well-known-components/env-config-provider": "^1.2.0", "@well-known-components/fetch-component": "^2.0.2", "@well-known-components/http-server": "^2.0.0", diff --git a/content/src/controller/handlers/filter-by-urn-handler.ts b/content/src/controller/handlers/filter-by-urn-handler.ts index 91fe299b8..d0f7e7c35 100644 --- a/content/src/controller/handlers/filter-by-urn-handler.ts +++ b/content/src/controller/handlers/filter-by-urn-handler.ts @@ -1,13 +1,13 @@ import { DecentralandAssetIdentifier, parseUrn } from '@dcl/urn-resolver' import { paginationObject } from '../utils' import { HandlerContextWithPath, InvalidRequestError } from '../../types' -import { BASE_AVATARS_COLLECTION_ID } from '../../ports/activeEntities' +import { BASE_AVATARS_COLLECTION_ID, BASE_EMOTES_COLLECTION_ID } from '../../ports/activeEntities' import { GetEntitiesByPointerPrefix200 } from '@dcl/catalyst-api-specs/lib/client' async function isUrnPrefixValid(collectionUrn: string): Promise { const regex = /^[a-zA-Z0-9_.:,-]+$/g if (!regex.test(collectionUrn)) return false - if (collectionUrn === BASE_AVATARS_COLLECTION_ID) { + if (collectionUrn === BASE_AVATARS_COLLECTION_ID || collectionUrn === BASE_EMOTES_COLLECTION_ID) { return collectionUrn } diff --git a/content/src/ports/activeEntities.ts b/content/src/ports/activeEntities.ts index aec9cad9d..66da977ef 100644 --- a/content/src/ports/activeEntities.ts +++ b/content/src/ports/activeEntities.ts @@ -11,6 +11,7 @@ import { AppComponents } from '../types' import { DatabaseClient } from './postgres' export const BASE_AVATARS_COLLECTION_ID = 'urn:decentraland:off-chain:base-avatars' +export const BASE_EMOTES_COLLECTION_ID = 'urn:decentraland:off-chain:base-emotes' export type NotActiveEntity = 'NOT_ACTIVE_ENTITY' diff --git a/yarn.lock b/yarn.lock index c2042d3b0..06ebba23a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -366,6 +366,21 @@ p-queue "^6.6.2" sharp "^0.32.0" +"@dcl/content-validator@https://sdk-team-cdn.decentraland.org/@dcl/content-validator/branch/base-emotes/dcl-content-validator-4.10.2-7933262421.commit-de04792.tgz": + version "4.10.2-7933262421.commit-de04792" + resolved "https://sdk-team-cdn.decentraland.org/@dcl/content-validator/branch/base-emotes/dcl-content-validator-4.10.2-7933262421.commit-de04792.tgz#4b3a9e380623f5f89d54fab9e0679bc678d26732" + dependencies: + "@dcl/block-indexer" "^1.1.1" + "@dcl/content-hash-tree" "^1.1.4" + "@dcl/hashing" "^3.0.1" + "@dcl/schemas" "https://sdk-team-cdn.decentraland.org/@dcl/schemas/branch/base-emotes/dcl-schemas-10.2.2-7932756126.commit-cda4f5a.tgz" + "@dcl/urn-resolver" "https://sdk-team-cdn.decentraland.org/@dcl/urn-resolver/branch/base-emotes/dcl-urn-resolver-3.2.1-7931301689.commit-434c4ef.tgz" + "@well-known-components/interfaces" "^1.3.0" + "@well-known-components/thegraph-component" "^1.5.0" + ms "^2.1.3" + p-queue "^6.6.2" + sharp "0.32.6" + "@dcl/crypto@^3.4.0", "@dcl/crypto@^3.4.5": version "3.4.5" resolved "https://registry.yarnpkg.com/@dcl/crypto/-/crypto-3.4.5.tgz#95ca2beab46fa3494b4d38f009bf0d49c87ba235" @@ -398,6 +413,14 @@ ajv-errors "^3.0.0" ajv-keywords "^5.1.0" +"@dcl/schemas@https://sdk-team-cdn.decentraland.org/@dcl/schemas/branch/base-emotes/dcl-schemas-10.2.2-7932756126.commit-cda4f5a.tgz": + version "10.2.2-7932756126.commit-cda4f5a" + resolved "https://sdk-team-cdn.decentraland.org/@dcl/schemas/branch/base-emotes/dcl-schemas-10.2.2-7932756126.commit-cda4f5a.tgz#42b3faf2f129ed63edcede5ace70186cb6e65c58" + dependencies: + ajv "^8.11.0" + ajv-errors "^3.0.0" + ajv-keywords "^5.1.0" + "@dcl/snapshots-fetcher@^9.0.3": version "9.0.3" resolved "https://registry.yarnpkg.com/@dcl/snapshots-fetcher/-/snapshots-fetcher-9.0.3.tgz#592e67fd9d02fa7eb88cac1b580ab2f0ecb57f49" @@ -420,6 +443,10 @@ resolved "https://registry.yarnpkg.com/@dcl/urn-resolver/-/urn-resolver-3.2.0.tgz#71b1ff609efab7d40c92b9a2a24cc8970811c0ad" integrity sha512-qpVFqSdF2sScMO264AL5pl29aoPN/Nd7ijpD0iS4EIzghJ3KtmHa0hhsYrL0oQo3LmvWyH4t1tW4SeaiHOd9Pw== +"@dcl/urn-resolver@https://sdk-team-cdn.decentraland.org/@dcl/urn-resolver/branch/base-emotes/dcl-urn-resolver-3.2.1-7931301689.commit-434c4ef.tgz": + version "3.2.1-7931301689.commit-434c4ef" + resolved "https://sdk-team-cdn.decentraland.org/@dcl/urn-resolver/branch/base-emotes/dcl-urn-resolver-3.2.1-7931301689.commit-434c4ef.tgz#da4d2d8cea27cbf61991092c3dc93c1c8e3b7ed3" + "@eslint/eslintrc@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f"