Skip to content

Commit

Permalink
support for base-wearables
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Arregui committed Feb 16, 2024
1 parent b5120ac commit 11d1f11
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
6 changes: 3 additions & 3 deletions content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions content/src/controller/handlers/filter-by-urn-handler.ts
Original file line number Diff line number Diff line change
@@ -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<string | false> {
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
}

Expand Down
1 change: 1 addition & 0 deletions content/src/ports/activeEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
27 changes: 27 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 11d1f11

Please sign in to comment.