diff --git a/.github/scripts/validate-and-merge.mjs b/.github/scripts/validate-and-merge.mjs index 2b809ae..a36982f 100644 --- a/.github/scripts/validate-and-merge.mjs +++ b/.github/scripts/validate-and-merge.mjs @@ -59,18 +59,12 @@ async function validateAndMerge() { const content = Buffer.from(fileContent.content, 'base64').toString('utf-8'); // Parse all YAML documents in the file - const yamlDocuments = yaml.loadAll(content); + const yamlDocuments = yaml.load(content); for (const document of yamlDocuments) { - const isValid = requiredKeys.every(key => key in document); - + const isValid = validateSubdocument(document); if (!isValid) { - console.log('Added object does not contain all required keys'); - return; - } - - if (!Array.isArray(document.categories) || document.categories.length === 0) { - console.log('Categories must be a non-empty array'); + console.log(`Invalid subdocument: ${JSON.stringify(document)}`); return; } } @@ -88,4 +82,20 @@ async function validateAndMerge() { } } +function validateSubdocument(subdocument) { + const isValid = requiredKeys.every(key => key in subdocument); + + if (!isValid) { + console.log(`Subdocument is missing required keys: ${JSON.stringify(subdocument)}`); + return false; + } + + if (!Array.isArray(subdocument.categories) || subdocument.categories.length === 0) { + console.log('Categories must be a non-empty array'); + return false; + } + + return true; +} + validateAndMerge(); \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity deleted file mode 100644 index b96230f..0000000 --- a/node_modules/.yarn-integrity +++ /dev/null @@ -1,33 +0,0 @@ -{ - "systemParams": "darwin-arm64-108", - "modulesFolders": [ - "node_modules" - ], - "flags": [], - "linkedModules": [], - "topLevelPatterns": [ - "@octokit/rest@^21.0.2" - ], - "lockfileEntries": { - "@octokit/auth-token@^5.0.0": "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-5.1.1.tgz#3bbfe905111332a17f72d80bd0b51a3e2fa2cf07", - "@octokit/core@^6.1.2": "https://registry.yarnpkg.com/@octokit/core/-/core-6.1.2.tgz#20442d0a97c411612da206411e356014d1d1bd17", - "@octokit/endpoint@^10.0.0": "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-10.1.1.tgz#1a9694e7aef6aa9d854dc78dd062945945869bcc", - "@octokit/graphql@^8.0.0": "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-8.1.1.tgz#3cacab5f2e55d91c733e3bf481d3a3f8a5f639c4", - "@octokit/openapi-types@^22.2.0": "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-22.2.0.tgz#75aa7dcd440821d99def6a60b5f014207ae4968e", - "@octokit/plugin-paginate-rest@^11.0.0": "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.5.tgz#a1929b3ba3dc7b63bc73bb6d3c7a3faf2a9c7649", - "@octokit/plugin-request-log@^5.3.1": "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz#ccb75d9705de769b2aa82bcd105cc96eb0c00f69", - "@octokit/plugin-rest-endpoint-methods@^13.0.0": "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.6.tgz#b9d343dbe88a6cb70cc7fa16faa98f0a29ffe654", - "@octokit/request-error@^6.0.1": "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-6.1.5.tgz#907099e341c4e6179db623a0328d678024f54653", - "@octokit/request@^9.0.0": "https://registry.yarnpkg.com/@octokit/request/-/request-9.1.3.tgz#42b693bc06238f43af3c037ebfd35621c6457838", - "@octokit/rest@^21.0.2": "https://registry.yarnpkg.com/@octokit/rest/-/rest-21.0.2.tgz#9b767dbc1098daea8310fd8b76bf7a97215d5972", - "@octokit/types@^13.0.0": "https://registry.yarnpkg.com/@octokit/types/-/types-13.6.1.tgz#432fc6c0aaae54318e5b2d3e15c22ac97fc9b15f", - "@octokit/types@^13.1.0": "https://registry.yarnpkg.com/@octokit/types/-/types-13.6.1.tgz#432fc6c0aaae54318e5b2d3e15c22ac97fc9b15f", - "@octokit/types@^13.6.0": "https://registry.yarnpkg.com/@octokit/types/-/types-13.6.1.tgz#432fc6c0aaae54318e5b2d3e15c22ac97fc9b15f", - "@octokit/types@^13.6.1": "https://registry.yarnpkg.com/@octokit/types/-/types-13.6.1.tgz#432fc6c0aaae54318e5b2d3e15c22ac97fc9b15f", - "before-after-hook@^3.0.2": "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-3.0.2.tgz#d5665a5fa8b62294a5aa0a499f933f4a1016195d", - "universal-user-agent@^7.0.0": "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-7.0.2.tgz#52e7d0e9b3dc4df06cc33cb2b9fd79041a54827e", - "universal-user-agent@^7.0.2": "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-7.0.2.tgz#52e7d0e9b3dc4df06cc33cb2b9fd79041a54827e" - }, - "files": [], - "artifacts": {} -} \ No newline at end of file diff --git a/programs.yaml b/programs.yaml index 2052f26..d42ec03 100644 --- a/programs.yaml +++ b/programs.yaml @@ -82,3 +82,14 @@ - NFT Marketplace - Nft Launchpad - Nft infra + +- name: test + description: test + repo: https://github.com/blobscriptions/blobscriptions + icon: https://blobscriptions.xyz/blobscriptions-logo.png + framework: NextJS + program_address: "sfsd" + categories: + - NFT Marketplace + - Nft Launchpad + - Nft infra \ No newline at end of file