create-houdini 1.2.58 → 1.2.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin.js CHANGED
@@ -184,13 +184,6 @@ if (localSchema) {
184
184
  copy(sourcePath('./fragments/localSchema/' + template))
185
185
  }
186
186
 
187
- // If anything goes wrong, we don't want to block the user
188
- let sponsor_msg = ''
189
- try {
190
- const selected = await getSponsors()
191
- sponsor_msg = `🙏 Special thanks to the ${bold(white(selected))} for supporting Houdini!`
192
- } catch (error) {}
193
-
194
187
  p.outro(`🎉 Everything is ready!
195
188
 
196
189
  👉 Next Steps
@@ -381,43 +374,3 @@ function pCancel(cancelText = 'Operation cancelled.') {
381
374
  p.cancel(cancelText)
382
375
  process.exit(1)
383
376
  }
384
-
385
- async function getSponsors() {
386
- const res = await fetch(
387
- 'https://raw.githubusercontent.com/HoudiniGraphql/sponsors/main/generated/sponsors.json'
388
- )
389
- const /**@type {any[]} */ jsonData = await res.json()
390
-
391
- /** @returns {[number, string]} */
392
- function getTier(/**@type {number}*/ value) {
393
- if (value >= 1500) {
394
- return [10, 'Wizard']
395
- }
396
- if (value >= 500) {
397
- return [5, 'Mage']
398
- }
399
- if (value >= 25) {
400
- return [2, "Magician's Apprentice"]
401
- }
402
- if (value >= 10) {
403
- return [1, 'Supportive Muggle']
404
- }
405
- // don't display the past sponsors
406
- return [0, 'Past Sponsors']
407
- }
408
-
409
- const list = jsonData.flatMap(
410
- (/** @type {{sponsor: {name: string}, monthlyDollars: number}} */ c) => {
411
- const [coef, title] = getTier(c.monthlyDollars)
412
- const names = []
413
- for (let i = 0; i < coef; i++) {
414
- names.push(`${title}, ${c.sponsor.name}`)
415
- }
416
- return names
417
- }
418
- )
419
-
420
- const selected_to_display = list[Math.floor(Math.random() * list.length)]
421
-
422
- return selected_to_display
423
- }
@@ -3,12 +3,12 @@ import { createSchema } from 'graphql-yoga'
3
3
  export default createSchema({
4
4
  typeDefs: /* GraphQL */ `
5
5
  type Query {
6
- hello: String
6
+ message: String
7
7
  }
8
8
  `,
9
9
  resolvers: {
10
10
  Query: {
11
- hello: () => 'Greetings from your local api 👋',
11
+ message: () => 'Greetings from your local api 👋',
12
12
  },
13
13
  },
14
14
  })
@@ -1,9 +1,9 @@
1
- export default function ({ Hello }) {
1
+ export default function ({ HelloHoudini }) {
2
2
  return (
3
3
  <div className="flex flex-col gap-8">
4
4
  <h2>Home</h2>
5
5
 
6
- <p>{Hello.message}</p>
6
+ <p>{HelloHoudini.message}</p>
7
7
  </div>
8
8
  )
9
9
  }
@@ -3,12 +3,12 @@ import { createSchema } from 'graphql-yoga'
3
3
  export default createSchema({
4
4
  typeDefs: /* GraphQL */ `
5
5
  type Query {
6
- hello: String
6
+ message: String
7
7
  }
8
8
  `,
9
9
  resolvers: {
10
10
  Query: {
11
- hello: () => 'Greetings from your local api 👋',
11
+ message: () => 'Greetings from your local api 👋',
12
12
  },
13
13
  },
14
14
  })
@@ -1,11 +1,11 @@
1
1
  import { PageProps } from './$types'
2
2
 
3
- export default function ({ Hello }: PageProps) {
3
+ export default function ({ HelloHoudini }: PageProps) {
4
4
  return (
5
5
  <div className="flex flex-col gap-8">
6
6
  <h2>Home</h2>
7
7
 
8
- <p>{Hello.message}</p>
8
+ <p>{HelloHoudini.message}</p>
9
9
  </div>
10
10
  )
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-houdini",
3
- "version": "1.2.58",
3
+ "version": "1.2.59",
4
4
  "description": "A CLI for creating new Houdini projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
 
3
- export default function App({ children }) {
3
+ export default function App({ children }: { children: React.ReactNode }) {
4
4
  return (
5
5
  <html>
6
6
  <head>