diff --git a/icons/chiffre.png b/icons/chiffre.png new file mode 100644 index 000000000..e815acc2a Binary files /dev/null and b/icons/chiffre.png differ diff --git a/lib/cli.ts b/lib/cli.ts index 9c9f05abb..14fe05b4f 100644 --- a/lib/cli.ts +++ b/lib/cli.ts @@ -14,8 +14,10 @@ async function main () { console.log('Synced', module.name) } else { console.log('Syncing all modules') - const modules = await syncAll() - console.log('Sync ' + modules.length + ' modules') + const { count, success } = await syncAll() + console.log('Sync ' + count + ' modules') + if (!success) + process.exit(1) } } break diff --git a/lib/modules.ts b/lib/modules.ts index a4d89fc4b..dc05528ed 100644 --- a/lib/modules.ts +++ b/lib/modules.ts @@ -6,7 +6,8 @@ import defu from 'defu' import pLimit from 'p-limit' import { categories } from './categories' import { ModuleInfo } from './types' -import { fetchGithubPkg, modulesDir, distDir, distFile } from './utils' +import { fetchGithubPkg, modulesDir, distDir, distFile, rootDir } from './utils' +import { $fetch } from 'ofetch' export async function sync (name, repo?: string, isNew: boolean = false) { const mod = await getModule(name) @@ -63,6 +64,30 @@ export async function sync (name, repo?: string, isNew: boolean = false) { } } + for (const key of ['website', 'learn_more']) { + if (mod[key] && !mod[key].includes('github.com')) { + // we just need to test that we get a 200 response (or a valid redirect) + const res = await $fetch.raw(mod[key], { + // some sites block HEAD + method: ['stripe', 'stripe-next', 'chiffre'].includes(name) ? 'GET' : 'HEAD', + redirect: 'follow', // allow redirects + }).catch((err) => { + throw new Error(`${key} link is invalid for ${mod.name}: ${err}`) + }) + if (res.status !== 200) { + throw new Error(`${key} link is invalid for ${mod.name}, returned a ${res.status}`) + } + } + } + + // validate icon + if (mod.icon) { + const file = resolve(rootDir, 'icons', mod.icon) + if (!existsSync(file)) { + throw new Error(`Icon ${mod.icon} does not exist for ${mod.name}`) + } + } + // TODO: Remove extra fields const validFields = [ 'name', @@ -169,11 +194,16 @@ export async function readModules () { export async function syncAll () { const modules = await readModules() const limit = pLimit(10) + let success = true const updatedModules = await Promise.allSettled(modules.map(module => limit(() => { console.log(`Syncing ${module.name}`) - return sync(module.name, module.repo) + return sync(module.name, module.repo).catch((err) => { + console.error(`Error syncing ${module.name}`) + console.error(err) + success = false + }) }))) - return updatedModules + return { count: updatedModules.length, success } } export async function build () { diff --git a/lib/utils.ts b/lib/utils.ts index 2e44418c4..aed543259 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -15,7 +15,8 @@ export function fetchRawGithub (path) { export function fetchGithubPkg (repo) { let path - [repo, path = 'main'] = repo.split('#') + // HEAD will be the default branch + [repo, path = 'HEAD'] = repo.split('#') return fetchRawGithub(repo + '/' + path + '/' + 'package.json') } diff --git a/modules/chiffre.yml b/modules/chiffre.yml index f2a868e7b..b7ee3bb18 100644 --- a/modules/chiffre.yml +++ b/modules/chiffre.yml @@ -2,10 +2,10 @@ name: chiffre description: Privacy-first, end-to-end encrypted analytics repo: chiffre-io/nuxt-chiffre npm: nuxt-chiffre -icon: https://avatars.githubusercontent.com/u/58789215?v=4 +icon: chiffre.png github: https://github.com/chiffre-io/nuxt-chiffre website: https://github.com/chiffre-io/nuxt-chiffre -learn_more: https://chiffre.io +learn_more: https://chiffre.io/ category: Analytics type: 3rd-party maintainers: diff --git a/modules/form-actions.yml b/modules/form-actions.yml index aa36445d4..62abb10b3 100644 --- a/modules/form-actions.yml +++ b/modules/form-actions.yml @@ -1,6 +1,6 @@ name: form-actions description: A set of features and composables to interact with forms and server data. -repo: Hebilicious/form-actions-nuxt#main/packages/form-action-nuxt +repo: Hebilicious/form-actions-nuxt#main/packages/form-actions-nuxt npm: '@hebilicious/form-actions-nuxt' icon: form-actions.svg github: https://github.com/Hebilicious/form-actions-nuxt diff --git a/modules/formkit.yml b/modules/formkit.yml index 0f86447ce..73915a506 100644 --- a/modules/formkit.yml +++ b/modules/formkit.yml @@ -5,7 +5,7 @@ npm: '@formkit/nuxt' icon: formkit.png github: https://github.com/formkit/formkit website: https://formkit.com -learn_more: https://formkit.com/essentials/installation#with-nuxt +learn_more: https://formkit.com/getting-started/installation category: Libraries type: 3rd-party maintainers: diff --git a/modules/graphql-client.yml b/modules/graphql-client.yml index d2aa7c211..8549e8961 100644 --- a/modules/graphql-client.yml +++ b/modules/graphql-client.yml @@ -7,7 +7,7 @@ npm: nuxt-graphql-client icon: graphql-client.svg github: https://github.com/diizzayy/nuxt-graphql-client website: https://github.com/diizzayy/nuxt-graphql-client -learn_more: https://www.graphql-code-generator.com/plugins/typescript-graphql-request +learn_more: https://nuxt-graphql-client.web.app/ category: Request type: 3rd-party maintainers: diff --git a/modules/logrocket.yml b/modules/logrocket.yml index a52bb802f..3be5cc00f 100644 --- a/modules/logrocket.yml +++ b/modules/logrocket.yml @@ -1,7 +1,5 @@ name: logrocket -description: >- - LogRocket module for Nuxt to help you fix bugs and understand user - behaviour. +description: LogRocket module for Nuxt to help you fix bugs and understand user behaviour. repo: nuxt-modules/logrocket npm: nuxt-logrocket icon: logrocket.png diff --git a/modules/maz-ui.yml b/modules/maz-ui.yml index 254341b2b..a7f34312d 100644 --- a/modules/maz-ui.yml +++ b/modules/maz-ui.yml @@ -1,14 +1,15 @@ name: maz-ui description: >- - install easily maz-ui library to take advantage of auto-import components, plugins, composables and CSS files. + install easily maz-ui library to take advantage of auto-import components, + plugins, composables and CSS files. repo: louismazel/maz-ui -npm: 'maz-ui' +npm: root icon: maz-ui.png github: https://github.com/louismazel/maz-ui website: https://louismazel.github.io/maz-ui-3/ learn_more: https://louismazel.github.io/maz-ui-3/ category: UI -type: community +type: 3rd-party maintainers: - name: Loïc Mazuel github: LouisMazel diff --git a/modules/meilisearch.yml b/modules/meilisearch.yml index cb6a0f43d..eed2e26ed 100644 --- a/modules/meilisearch.yml +++ b/modules/meilisearch.yml @@ -14,6 +14,6 @@ maintainers: avatar: https://avatars.githubusercontent.com/u/13418668?v=4 compatibility: nuxt: ^3.0.0 - devtools: ^0.0.0 requires: bridge: false + devtools: ^0.0.0 diff --git a/modules/netlify-cache.yml b/modules/netlify-cache.yml index 0327a9c72..e1e51ad02 100644 --- a/modules/netlify-cache.yml +++ b/modules/netlify-cache.yml @@ -1,7 +1,7 @@ name: netlify-cache description: >- - Nuxt module that uses netlify cache to speed up redeploy for Nuxt - version < 2.14 + Nuxt module that uses netlify cache to speed up redeploy for Nuxt version < + 2.14 repo: DreaMinder/nuxt-netlify-cache npm: nuxt-netlify-cache icon: netlify.png diff --git a/modules/netlify.yml b/modules/netlify.yml index c1a04984a..e1ef0ab4f 100644 --- a/modules/netlify.yml +++ b/modules/netlify.yml @@ -2,12 +2,12 @@ name: netlify description: >- Dynamically generate _headers and _redirects files for Netlify in your Nuxt projects. -repo: bazzite/nuxt-netlify +repo: juliomrqz/nuxt-netlify npm: '@aceforth/nuxt-netlify' icon: netlify.png -github: https://github.com/bazzite/nuxt-netlify -website: https://marquez.co/docs/nuxt-netlify/ -learn_more: '' +github: https://github.com/juliomrqz/nuxt-netlify +website: https://github.com/juliomrqz/nuxt-netlify +learn_more: https://github.com/juliomrqz/nuxt-netlify/tree/develop/docs category: Deployment type: 3rd-party maintainers: diff --git a/modules/nuxt-feather-icons.yml b/modules/nuxt-feather-icons.yml index 5ffcd36f1..7a4fef5c8 100644 --- a/modules/nuxt-feather-icons.yml +++ b/modules/nuxt-feather-icons.yml @@ -2,7 +2,7 @@ name: nuxt-feather-icons description: The Feather Icons in Nuxt 3. repo: 4sllan/nuxt-feather-icons npm: nuxt-feather-icons -icon: nuxt-feather-icons.svg +icon: nuxt-feather-icons.png github: https://github.com/4sllan/nuxt-feather-icons website: https://github.com/4sllan/nuxt-feather-icons learn_more: https://github.com/4sllan/nuxt-feather-icons diff --git a/modules/nuxt-graphql-middleware.yml b/modules/nuxt-graphql-middleware.yml index 234db6324..a75ad29e0 100644 --- a/modules/nuxt-graphql-middleware.yml +++ b/modules/nuxt-graphql-middleware.yml @@ -4,7 +4,7 @@ repo: dulnan/nuxt-graphql-middleware npm: nuxt-graphql-middleware icon: nuxt-graphql-middleware.svg github: https://github.com/dulnan/nuxt-graphql-middleware -website: https://nuxt-graphql-middleware.dulnan.net +website: https://nuxt-graphql-middleware.dulnan.net/ learn_more: '' category: Request type: 3rd-party diff --git a/modules/nuxt-localtunnel.yml b/modules/nuxt-localtunnel.yml index 252801872..549037524 100644 --- a/modules/nuxt-localtunnel.yml +++ b/modules/nuxt-localtunnel.yml @@ -4,8 +4,8 @@ repo: nuxtus/localtunnel npm: '@nuxtus/nuxt-localtunnel' icon: nuxt-localtunnel.svg github: https://github.com/nuxtus/localtunnel -website: https://nuxtus.com -learn_more: https://docs.nuxtus.com/#/localtunnel +website: https://docs.nuxtus.com +learn_more: https://docs.nuxtus.com/localtunnel.html category: Devtools type: 3rd-party maintainers: diff --git a/modules/nuxt-mail.yml b/modules/nuxt-mail.yml index 1b1c02744..062b3aea4 100644 --- a/modules/nuxt-mail.yml +++ b/modules/nuxt-mail.yml @@ -1,5 +1,7 @@ name: nuxt-mail -description: Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails. +description: >- + Adds email sending capability to a Nuxt.js app. Adds a server route, an + injected variable, and uses nodemailer to send emails. repo: dword-design/nuxt-mail npm: nuxt-mail icon: '' diff --git a/modules/nuxt-openapi-docs-module.yml b/modules/nuxt-openapi-docs-module.yml index 6ed4bad6d..3d7e745be 100644 --- a/modules/nuxt-openapi-docs-module.yml +++ b/modules/nuxt-openapi-docs-module.yml @@ -2,7 +2,7 @@ name: nuxt-openapi-docs-module description: Generate pages from OpenAPI specifications repo: on-org/nuxt-openapi-docs-module npm: nuxt-openapi-docs-module -icon: nuxt-openapi-docs-module.svg +icon: nuxt-openapi-docs-module.png github: https://github.com/on-org/nuxt-openapi-docs-module website: https://github.com/on-org/nuxt-openapi-docs-module learn_more: https://www.npmjs.com/package/nuxt-openapi-docs-module diff --git a/modules/nuxt-storm.yml b/modules/nuxt-storm.yml index 936bea295..9ed31c4f9 100644 --- a/modules/nuxt-storm.yml +++ b/modules/nuxt-storm.yml @@ -2,7 +2,7 @@ name: nuxt-storm description: WebStorm & PHPStorm support for Nuxt components repo: fumeapp/nuxt-storm npm: nuxt-storm -icon: nuxt-storm.png +icon: '' github: https://github.com/fumeapp/nuxt-storm website: https://github.com/fumeapp/nuxt-storm learn_more: https://github.com/fumeapp/nuxt-storm diff --git a/modules/og-image.yml b/modules/og-image.yml index 83052147e..b751ea7af 100644 --- a/modules/og-image.yml +++ b/modules/og-image.yml @@ -7,7 +7,7 @@ github: https://github.com/nuxt-modules/og-image website: https://nuxtseo.com/og-image learn_more: https://nuxtseo.com/og-image category: SEO -type: 3rd-party +type: community maintainers: - name: Harlan Wilton github: harlan-zw diff --git a/modules/optimized-images.yml b/modules/optimized-images.yml index 4c110c715..181adadac 100644 --- a/modules/optimized-images.yml +++ b/modules/optimized-images.yml @@ -1,13 +1,13 @@ name: optimized-images description: >- - Automatically optimizes images used in Nuxt projects (jpeg, png, svg, webp - and gif). + Automatically optimizes images used in Nuxt projects (jpeg, png, svg, webp and + gif). repo: juliomrqz/nuxt-optimized-images npm: '@aceforth/nuxt-optimized-images' icon: '' github: https://github.com/juliomrqz/nuxt-optimized-images -website: https://marquez.co/docs/nuxt-optimized-images/ -learn_more: '' +website: https://github.com/juliomrqz/nuxt-optimized-images +learn_more: https://github.com/juliomrqz/nuxt-optimized-images/tree/develop/docs category: Images type: 3rd-party maintainers: diff --git a/modules/robots.yml b/modules/robots.yml index 6238f16ab..40871edc0 100644 --- a/modules/robots.yml +++ b/modules/robots.yml @@ -5,7 +5,7 @@ npm: '@nuxtjs/robots' icon: robots.png github: https://github.com/nuxt-modules/robots website: https://github.com/nuxt-modules/robots -learn_more: https://support.google.com/webmasters/answer/6062608?hl=en +learn_more: '' category: SEO type: community maintainers: diff --git a/modules/segment.yml b/modules/segment.yml index 803f56b86..ab7f4eb38 100644 --- a/modules/segment.yml +++ b/modules/segment.yml @@ -5,8 +5,7 @@ npm: '@dansmaculotte/nuxt-segment' icon: segment.png github: https://github.com/dansmaculotte/nuxt-segment website: https://github.com/dansmaculotte/nuxt-segment -learn_more: >- - https://segment.com/docs/connections/sources/catalog/Libraries/website/javascript/ +learn_more: '' category: Analytics type: 3rd-party maintainers: diff --git a/modules/server-block.yml b/modules/server-block.yml index 5359f9ba7..30aaec1b2 100644 --- a/modules/server-block.yml +++ b/modules/server-block.yml @@ -1,6 +1,6 @@ name: server-block description: Use tags in your Nuxt pages components. -repo: Hebilicious/server-block-nuxt/packages/server-block-nuxt#main +repo: Hebilicious/server-block-nuxt#main/packages/server-block-nuxt npm: '@hebilicious/server-block-nuxt' icon: server-block.svg github: https://github.com/Hebilicious/server-block-nuxt diff --git a/modules/storage.yml b/modules/storage.yml index 8b45f8341..d39f7ef41 100644 --- a/modules/storage.yml +++ b/modules/storage.yml @@ -1,7 +1,5 @@ name: storage -description: >- - Utilities to easily read and write to the browser's storage in a Nuxt - project +description: Utilities to easily read and write to the browser's storage in a Nuxt project repo: mazipan/nuxt-storage npm: nuxt-storage icon: '' diff --git a/modules/storyblok.yml b/modules/storyblok.yml index 5ed486866..fa53318aa 100644 --- a/modules/storyblok.yml +++ b/modules/storyblok.yml @@ -1,6 +1,6 @@ name: storyblok description: Storyblok Nuxt module -repo: storyblok/storyblok-nuxt#master/lib +repo: storyblok/storyblok-nuxt#main npm: '@storyblok/nuxt' icon: storyblok.png github: https://github.com/storyblok/storyblok-nuxt @@ -13,5 +13,5 @@ maintainers: github: storyblok compatibility: nuxt: ^2.0.0 || ^3.0.0 - devtools: ^0.0.0 requires: {} + devtools: ^0.0.0 diff --git a/modules/unlazy.yml b/modules/unlazy.yml index 2e80fd44f..3f8f87fdd 100644 --- a/modules/unlazy.yml +++ b/modules/unlazy.yml @@ -1,6 +1,6 @@ name: unlazy description: Lazy loading library for placeholder images -repo: johannschopplich/unlazy/packages/nuxt +repo: johannschopplich/unlazy#main/packages/nuxt npm: '@unlazy/nuxt' icon: unlazy.svg github: https://github.com/johannschopplich/unlazy/tree/main/packages/nuxt @@ -13,3 +13,4 @@ maintainers: github: johannschopplich compatibility: nuxt: ^3.0.0 + requires: {} diff --git a/modules/validate.yml b/modules/validate.yml index 8c44aa9a7..cf534153f 100644 --- a/modules/validate.yml +++ b/modules/validate.yml @@ -5,7 +5,7 @@ npm: nuxt-validate icon: vee-validate.png github: https://github.com/lewyuburi/nuxt-validate website: https://github.com/lewyuburi/nuxt-validate -learn_more: https://logaretm.github.io/vee-validate/ +learn_more: '' category: Libraries type: 3rd-party maintainers: diff --git a/modules/vue-final-modal.yml b/modules/vue-final-modal.yml index a9c7ece29..25c707ff7 100644 --- a/modules/vue-final-modal.yml +++ b/modules/vue-final-modal.yml @@ -1,7 +1,7 @@ -name: 'vue-final-modal' +name: vue-final-modal description: The most powerful yet most light-weight modal library for Vue 3. repo: vue-final/vue-final-modal -npm: '@vue-final-modal/nuxt' +npm: vfm icon: vue-final-modal.svg github: https://github.com/vue-final/vue-final-modal website: https://vue-final-modal.org/ diff --git a/modules/vue-query.yml b/modules/vue-query.yml index 796b259c3..c12e9bda1 100644 --- a/modules/vue-query.yml +++ b/modules/vue-query.yml @@ -1,6 +1,6 @@ name: vue-query description: 0 config lightweight Nuxt module for @tanstack/vue-query. -repo: Hebilicious/vue-query-nuxt/packages/vue-query-nuxt#main +repo: Hebilicious/vue-query-nuxt#main/packages/vue-query-nuxt npm: '@hebilicious/vue-query-nuxt' icon: vue-query.svg github: https://github.com/Hebilicious/vue-query-nuxt diff --git a/modules/vue3-carousel-nuxt.yml b/modules/vue3-carousel-nuxt.yml index 883b89de1..6bc5f2feb 100644 --- a/modules/vue3-carousel-nuxt.yml +++ b/modules/vue3-carousel-nuxt.yml @@ -1,10 +1,12 @@ name: vue3-carousel-nuxt description: >- - This module seamlessly integrates the Vue 3 Carousel module of ismail9k into Nuxt applications. + This module seamlessly integrates the Vue 3 Carousel module of ismail9k into + Nuxt applications. repo: gaetansenn/vue3-carousel-nuxt -npm: 'vue3-carousel-nuxt' +npm: vue3-carousel-nuxt icon: '' github: https://github.com/gaetansenn/vue3-carousel-nuxt +website: https://github.com/gaetansenn/vue3-carousel-nuxt learn_more: '' category: UI type: 3rd-party diff --git a/modules/vuefire.yml b/modules/vuefire.yml index 7377dfbf9..45493d0f3 100644 --- a/modules/vuefire.yml +++ b/modules/vuefire.yml @@ -1,7 +1,7 @@ name: vuefire description: Idiomatic composables for the Firebase SDK -repo: vuejs/vuefire/packages/nuxt -npm: 'nuxt-vuefire' +repo: vuejs/vuefire#main/packages/nuxt +npm: nuxt-vuefire icon: vuefire.svg github: https://github.com/vuejs/vuefire/tree/main/packages/nuxt website: https://vuefire.vuejs.org/ @@ -13,3 +13,4 @@ maintainers: github: posva compatibility: nuxt: ^3.0.0 + requires: {} diff --git a/modules/vueform-builder.yml b/modules/vueform-builder.yml index 7f842e244..97b3dd1de 100644 --- a/modules/vueform-builder.yml +++ b/modules/vueform-builder.yml @@ -1,6 +1,6 @@ name: vueform-builder description: Official Vueform Builder module for Nuxt -repo: vueform/builder/nuxt +repo: vueform/builder#main/nuxt npm: '@vueform/builder-nuxt' icon: vueform.svg github: https://github.com/vueform/builder diff --git a/modules/vueform.yml b/modules/vueform.yml index 147069b16..b1893b5a0 100644 --- a/modules/vueform.yml +++ b/modules/vueform.yml @@ -1,7 +1,7 @@ name: vueform description: Official Vueform module for Nuxt -repo: vueform/vueform/nuxt -npm: '@vueform/nuxt' +repo: vueform/vueform +npm: '@vueform/vueform' icon: vueform.svg github: https://github.com/vueform/vueform website: https://vueform.com diff --git a/modules/vuestic.yml b/modules/vuestic.yml index e5c13f5e7..f10c41f27 100644 --- a/modules/vuestic.yml +++ b/modules/vuestic.yml @@ -4,8 +4,8 @@ repo: epicmaxco/vuestic-ui#develop/packages/nuxt npm: '@vuestic/nuxt' icon: vuestic.png github: https://github.com/epicmaxco/vuestic-ui/tree/develop/packages/nuxt -website: https://vuestic.dev -learn_more: https://vuestic.dev/en/getting-started/nuxt +website: https://ui.vuestic.dev +learn_more: https://ui.vuestic.dev/getting-started/nuxt category: UI type: 3rd-party maintainers: diff --git a/modules/vuetify.yml b/modules/vuetify.yml index a007f4776..7aec07aed 100644 --- a/modules/vuetify.yml +++ b/modules/vuetify.yml @@ -1,7 +1,5 @@ name: vuetify -description: >- - Vuetify Module for Nuxt to add Material Design components to your - application. +description: Vuetify Module for Nuxt to add Material Design components to your application. repo: nuxt-community/vuetify-module npm: '@nuxtjs/vuetify' icon: vuetify.png diff --git a/modules/webpackmonitor.yml b/modules/webpackmonitor.yml index 97428a7a1..c36c2d50e 100644 --- a/modules/webpackmonitor.yml +++ b/modules/webpackmonitor.yml @@ -5,7 +5,7 @@ npm: '@nuxtjs/webpackmonitor' icon: webpack.png github: https://github.com/nuxt-community/webpackmonitor-module website: https://github.com/nuxt-community/webpackmonitor-module -learn_more: http://webpackmonitor.com/ +learn_more: '' category: Devtools type: community maintainers: