From 232cab0aa9806fa89e491a8660b79563fda751b7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 14 Oct 2024 13:10:09 -0700 Subject: [PATCH 1/6] test --- node_modules/.yarn-integrity | 15 +++++++++++++-- programs.yaml | 11 +++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity index b96230f..75796bd 100644 --- a/node_modules/.yarn-integrity +++ b/node_modules/.yarn-integrity @@ -6,7 +6,9 @@ "flags": [], "linkedModules": [], "topLevelPatterns": [ - "@octokit/rest@^21.0.2" + "@octokit/rest@^21.0.2", + "js-yaml@^4.1.0", + "node-fetch@^3.3.2" ], "lockfileEntries": { "@octokit/auth-token@^5.0.0": "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-5.1.1.tgz#3bbfe905111332a17f72d80bd0b51a3e2fa2cf07", @@ -24,9 +26,18 @@ "@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", + "argparse@^2.0.1": "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38", "before-after-hook@^3.0.2": "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-3.0.2.tgz#d5665a5fa8b62294a5aa0a499f933f4a1016195d", + "data-uri-to-buffer@^4.0.0": "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e", + "fetch-blob@^3.1.2": "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9", + "fetch-blob@^3.1.4": "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9", + "formdata-polyfill@^4.0.10": "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423", + "js-yaml@^4.1.0": "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602", + "node-domexception@^1.0.0": "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5", + "node-fetch@^3.3.2": "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b", "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" + "universal-user-agent@^7.0.2": "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-7.0.2.tgz#52e7d0e9b3dc4df06cc33cb2b9fd79041a54827e", + "web-streams-polyfill@^3.0.3": "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" }, "files": [], "artifacts": {} 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 From 72d028fa66a415b9b2caadb3ad2b39a34a533016 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 14 Oct 2024 13:23:12 -0700 Subject: [PATCH 2/6] better debug message --- .github/scripts/validate-and-merge.mjs | 2 +- node_modules/.yarn-integrity | 44 -------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 node_modules/.yarn-integrity diff --git a/.github/scripts/validate-and-merge.mjs b/.github/scripts/validate-and-merge.mjs index 2b809ae..6899cbb 100644 --- a/.github/scripts/validate-and-merge.mjs +++ b/.github/scripts/validate-and-merge.mjs @@ -65,7 +65,7 @@ async function validateAndMerge() { const isValid = requiredKeys.every(key => key in document); if (!isValid) { - console.log('Added object does not contain all required keys'); + console.log(document + ' is missing required keys'); return; } diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity deleted file mode 100644 index 75796bd..0000000 --- a/node_modules/.yarn-integrity +++ /dev/null @@ -1,44 +0,0 @@ -{ - "systemParams": "darwin-arm64-108", - "modulesFolders": [ - "node_modules" - ], - "flags": [], - "linkedModules": [], - "topLevelPatterns": [ - "@octokit/rest@^21.0.2", - "js-yaml@^4.1.0", - "node-fetch@^3.3.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", - "argparse@^2.0.1": "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38", - "before-after-hook@^3.0.2": "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-3.0.2.tgz#d5665a5fa8b62294a5aa0a499f933f4a1016195d", - "data-uri-to-buffer@^4.0.0": "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e", - "fetch-blob@^3.1.2": "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9", - "fetch-blob@^3.1.4": "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9", - "formdata-polyfill@^4.0.10": "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423", - "js-yaml@^4.1.0": "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602", - "node-domexception@^1.0.0": "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5", - "node-fetch@^3.3.2": "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b", - "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", - "web-streams-polyfill@^3.0.3": "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" - }, - "files": [], - "artifacts": {} -} \ No newline at end of file From 3f9c16a49bf7e6f58129343f7d6ad708a61613bc Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 14 Oct 2024 13:24:28 -0700 Subject: [PATCH 3/6] better debug message --- .github/scripts/validate-and-merge.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/validate-and-merge.mjs b/.github/scripts/validate-and-merge.mjs index 6899cbb..284e3b3 100644 --- a/.github/scripts/validate-and-merge.mjs +++ b/.github/scripts/validate-and-merge.mjs @@ -65,7 +65,7 @@ async function validateAndMerge() { const isValid = requiredKeys.every(key => key in document); if (!isValid) { - console.log(document + ' is missing required keys'); + console.log(JSON.stringify(document) + ' is missing required keys'); return; } From a0e23083890462a40321c1ddd7e544142f47b7f2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 14 Oct 2024 13:24:42 -0700 Subject: [PATCH 4/6] better debug message --- .github/scripts/validate-and-merge.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/validate-and-merge.mjs b/.github/scripts/validate-and-merge.mjs index 284e3b3..d73b175 100644 --- a/.github/scripts/validate-and-merge.mjs +++ b/.github/scripts/validate-and-merge.mjs @@ -65,7 +65,7 @@ async function validateAndMerge() { const isValid = requiredKeys.every(key => key in document); if (!isValid) { - console.log(JSON.stringify(document) + ' is missing required keys'); + console.log(JSON.parse(document) + ' is missing required keys'); return; } From 7727b25c240ca2e7c26f3da38c3624cf81b95696 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 14 Oct 2024 13:28:13 -0700 Subject: [PATCH 5/6] subdoc parsing --- .github/scripts/validate-and-merge.mjs | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/scripts/validate-and-merge.mjs b/.github/scripts/validate-and-merge.mjs index d73b175..4383c87 100644 --- a/.github/scripts/validate-and-merge.mjs +++ b/.github/scripts/validate-and-merge.mjs @@ -62,15 +62,9 @@ async function validateAndMerge() { const yamlDocuments = yaml.loadAll(content); for (const document of yamlDocuments) { - const isValid = requiredKeys.every(key => key in document); - + const isValid = validateSubdocument(document); if (!isValid) { - console.log(JSON.parse(document) + ' is missing 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 From eb6c129a072a953d6174e495521924ebd23032f6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 14 Oct 2024 13:32:23 -0700 Subject: [PATCH 6/6] subdoc parsing --- .github/scripts/validate-and-merge.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/validate-and-merge.mjs b/.github/scripts/validate-and-merge.mjs index 4383c87..a36982f 100644 --- a/.github/scripts/validate-and-merge.mjs +++ b/.github/scripts/validate-and-merge.mjs @@ -59,7 +59,7 @@ 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 = validateSubdocument(document);