Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: clean up unused files in about website

Copplea582f4678d5f
diff --cc about/.gitignore
index daf4804dfa6,daf4804dfa6..9b744063823
--- a/about/.gitignore
+++ b/about/.gitignore
@@@ -1,8 -1,8 +1,3 @@@
node_modules
build
.docusaurus
--docs/client
--docs/gotrue/client
--docs/postgrest/client
--docs/realtime/client
--docs/reference
diff --cc about/ReferenceGenerator.ts
index 6ced45c8481,6ced45c8481..00000000000
deleted file mode 100644,100644
--- a/about/ReferenceGenerator.ts
+++ /dev/null
@@@ -1,268 -1,268 +1,0 @@@
--/**
-- * Usage:
-- * ts-node ReferenceGenerator.ts -o {output_dir} {input}.yml
-- *
-- * Example:
-- * ts-node ReferenceGenerator.ts -o docs/client spec/supabase.yml
-- */
--
--import Example from './spec/gen/components/Example'
--import Page from './spec/gen/components/Page'
--import Sidebar from './spec/gen/components/Sidebar'
--import SidebarCategory from './spec/gen/components/SidebarCategory'
--import Tab from './spec/gen/components/Tab'
--import Tabs from './spec/gen/components/Tabs'
--import { slugify, tsDocCommentToMdComment, writeToDisk } from './spec/gen/lib/helpers'
--import { TsDoc, OpenRef } from './spec/gen/definitions'
--
--const yaml = require('js-yaml')
--const fs = require('fs')
--
--const main = (fileNames, options) => {
-- try {
-- const outputDir = options.o || options.output || ''
-- fileNames.forEach((inputFileName) => {
-- gen(inputFileName, outputDir)
-- })
-- return
-- } catch (e) {
-- console.log(e)
-- }
--}
--
--async function gen(inputFileName, outputDir) {
-- const docSpec = yaml.safeLoad(fs.readFileSync(inputFileName, 'utf8'))
-- const defRef = fs.readFileSync(docSpec.info.definition, 'utf8')
-- if (!defRef) return
--
-- const definition = JSON.parse(defRef)
-- const id = docSpec.info.id
-- const allLanguages = docSpec.info.libraries
-- const pages = Object.entries(docSpec.pages).map(([name, x]: [string, OpenRef.Page]) => ({
-- ...x,
-- pageName: name,
-- }))
--
-- // Sidebar
-- const inputFileNameToSnakeCase = inputFileName.replace('/', '_').replace('.yml', '')
-- const sidebarFileName = `sidebar_${inputFileNameToSnakeCase}.js`
-- const sidebar = generateSidebar(docSpec)
-- await writeToDisk(sidebarFileName, sidebar)
-- console.log('Sidebar created: ', sidebarFileName)
--
-- // Index Page
-- const indexFilename = outputDir + `/index.mdx`
-- const index = generateDocsIndexPage(docSpec, inputFileName)
-- await writeToDisk(indexFilename, index)
-- console.log('The index was saved: ', indexFilename)
--
-- // Generate Pages
-- pages.forEach(async (pageSpec: OpenRef.Page) => {
-- try {
-- const slug = slugify(pageSpec.pageName)
-- const hasTsRef = pageSpec['$ref'] || null
-- const tsDefinition = hasTsRef && extractTsDocNode(hasTsRef, definition)
-- if (hasTsRef && !tsDefinition) throw new Error('Definition not found: ' + hasTsRef)
--
-- const description =
-- pageSpec.description || tsDocCommentToMdComment(getDescriptionFromDefintion(tsDefinition))
--
-- // Create page
-- const content = Page({
-- slug,
-- id: slug,
-- specFileName: inputFileName,
-- title: pageSpec.title || pageSpec.pageName,
-- description,
-- parameters: hasTsRef ? generateParameters(tsDefinition) : '',
-- spotlight: generateSpotlight(id, pageSpec['examples'] || [], allLanguages),
-- examples: generateExamples(id, pageSpec['examples'] || [], allLanguages),
-- notes: pageSpec.notes,
-- })
--
-- // Write to disk
-- const dest = outputDir + `/${slug}.mdx`
-- await writeToDisk(dest, content)
-- console.log('Saved: ', dest)
-- } catch (error) {
-- console.error(error)
-- }
-- })
--}
--
--function generateParameters(tsDefinition: any) {
-- let functionDeclaration = null
-- if (tsDefinition.kindString == 'Method') {
-- functionDeclaration = tsDefinition
-- } else if (tsDefinition.kindString == 'Constructor') {
-- functionDeclaration = tsDefinition
-- } else functionDeclaration = tsDefinition?.type?.declaration
-- if (!functionDeclaration) return ''
--
-- const paramDefinitions: TsDoc.TypeDefinition[] = functionDeclaration.signatures[0].parameters // PMC: seems flaky.. why the [0]?
-- if (!paramDefinitions) return ''
--
-- // const paramsComments: TsDoc.CommentTag = tsDefinition.comment?.tags?.filter(x => x.tag == 'param')
-- let parameters = paramDefinitions.map((x) => recurseThroughParams(x)).join(`\n`)
-- return methodListGroup(parameters)
--}
--
--function getDescriptionFromDefintion(tsDefinition) {
-- if (!tsDefinition) return null
-- if (['Method', 'Constructor', 'Constructor signature'].includes(tsDefinition.kindString))
-- return tsDefinition?.signatures[0].comment
-- else return tsDefinition?.comment || ''
--}
--
--function recurseThroughParams(paramDefinition: TsDoc.TypeDefinition) {
-- let children = paramDefinition.type?.declaration?.children
-- const labelParams = {
-- name: paramDefinition.name,
-- isOptional: !!paramDefinition.flags.isOptional,
-- type: extractParamTypeAsString(paramDefinition),
-- description: paramDefinition.comment ? tsDocCommentToMdComment(paramDefinition.comment) : null,
-- }
-- let subContent = ''
--
-- if (!!children) {
-- let properties = children
-- .sort((a, b) => a.name.localeCompare(b.name)) // first alphabetical
-- .sort((a, b) => (a.flags?.isOptional ? 1 : -1)) // required params first
-- .map((x) => recurseThroughParams(x))
-- let heading = `<h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>`
-- subContent = methodListGroup([heading].concat(properties).join('\n'))
-- }
--
-- return methodListItemLabel(labelParams, subContent)
--}
--
--const methodListGroup = (items) => `
--<ul className="method-list-group">
-- ${items}
--</ul>
--`
--
--const methodListItemLabel = ({ name, isOptional, type, description }, subContent) => `
--<li className="method-list-item">
-- <h4 className="method-list-item-label">
-- <span className="method-list-item-label-name">
-- ${name}
-- </span>
-- <span className="method-list-item-label-badge ${!isOptional && 'required'}">
-- ${isOptional ? 'optional' : 'required'}
-- </span>
-- <span className="method-list-item-validation">
-- ${type}
-- </span>
-- </h4>
-- <div class="method-list-item-description">
--
--${description ? description : 'No description provided. '}
--
-- </div>
-- ${subContent}
--</li>
--`
--
--function generateExamples(id: string, specExamples: any, allLanguages: any) {
-- return specExamples.map((example) => {
-- let allTabs = example.hideCodeBlock
-- ? ''
-- : Tabs(id, allLanguages, generateTabs(allLanguages, example))
-- return Example({ name: example.name, description: example.description, tabs: allTabs })
-- })
--}
--
--/**
-- * A spotlight is an example which appears at the top of the page.
-- */
--function generateSpotlight(id: string, specExamples: any, allLanguages: any) {
-- const spotlight = specExamples.find((x) => x.isSpotlight) || null
-- const spotlightContent = !spotlight
-- ? ''
-- : Tabs(id, allLanguages, generateTabs(allLanguages, spotlight))
-- return spotlightContent
--}
--
--function generateTabs(allLanguages: any, example: any) {
-- return allLanguages
-- .map((library) => {
-- let content = example[library.id] || notImplemented
-- return Tab(library.id, content)
-- })
-- .join('\n')
--}
--
--const notImplemented = `
--\`\`\`
--Not yet implemented
--\`\`\`
--`
--
--function extractParamTypeAsString(paramDefinition) {
-- if (paramDefinition.type?.name) {
-- return `<code>${paramDefinition.type.name}</code>`
-- }
-- if (paramDefinition.type?.type == 'union') {
-- return paramDefinition.type.types
-- .map((x) =>
-- x.value
-- ? `<code>${x.value}</code>`
-- : x.name
-- ? `<code>${x.name}</code>`
-- : x.type
-- ? `<code>${x.type}</code>`
-- : ''
-- )
-- .join(' | ')
-- } else {
-- return '<code>object</code>'
-- }
--}
--
--/**
-- * Iterates through the definition to find the correct definition.
-- * You can pass it a deeply nested node using dot notation. eg: 'LoggedInUser.data.email'
-- */
--function extractTsDocNode(nodeToFind: string, definition: any) {
-- const nodePath = nodeToFind.split('.')
-- let i = 0
-- let previousNode = definition
-- let currentNode = definition
-- while (i < nodePath.length) {
-- previousNode = currentNode
-- currentNode = previousNode.children.find((x) => x.name == nodePath[i]) || null
-- if (currentNode == null) {
-- console.log(`Cant find ${nodePath[i]} in ${previousNode.children.map((x) => '\n' + x.name)}`)
-- break
-- }
-- i++
-- }
-- return currentNode
--}
--
--function generateSidebar(docSpec: any) {
-- let path = docSpec.info.docs.path || ''
-- let categories = docSpec.info.docs.sidebar.map((x) => {
-- const items = x.items.map((item) => {
-- let slug = slugify(item)
-- return `'${path}${slug}'`
-- })
-- return SidebarCategory(x.name, items)
-- })
-- return Sidebar(categories)
--}
--
--function generateDocsIndexPage(docSpec: any, inputFileName: string) {
-- return Page({
-- slug: slugify(docSpec.info.title),
-- id: 'index',
-- title: docSpec.info.title,
-- specFileName: inputFileName,
-- description: docSpec.info.description,
-- })
--}
--
--// Run everything
--const argv = require('minimist')(process.argv.slice(2))
--main(argv['_'], argv)
diff --cc about/docusaurus.config.js
index 7bf635b5c72,7bf635b5c72..9a28c67d478
--- a/about/docusaurus.config.js
+++ b/about/docusaurus.config.js
@@@ -1,9 -1,9 +1,3 @@@
--/**
-- * Copyright (c) 2017-present, Facebook, Inc.
-- *
-- * This source code is licensed under the MIT license found in the
-- * LICENSE file in the root directory of this source tree.
-- */
module.exports = {
title: 'Supabase',
tagline: 'Build in a weekend. Scale to millions.',
@@@ -169,7 -169,7 +163,6 @@@
},
],
],
-- scripts: [{ src: '/scripts/telemetry.js' }],
plugins: [
// [
// '@docusaurus/plugin-content-docs',
diff --cc about/sidebars.js
index 01f559a3582,01f559a3582..26d93d0e8be
--- a/about/sidebars.js
+++ b/about/sidebars.js
@@@ -1,11 -1,11 +1,3 @@@
--/**
-- * Copyright (c) 2017-present, Facebook, Inc.
-- *
-- * This source code is licensed under the MIT license found in the
-- * LICENSE file in the root directory of this source tree.
-- */
--
--
module.exports = {
docs: [
{
@@@ -18,10 -18,10 +10,7 @@@
type: 'category',
label: 'See Also',
collapsed: false,
-- items: [
-- 'handbook/contributing',
-- 'handbook/supasquad',
-- ],
++ items: ['handbook/contributing', 'handbook/supasquad'],
},
],
}
diff --cc about/sponsors.js
index 385612ed914,385612ed914..00000000000
deleted file mode 100644,100644
--- a/about/sponsors.js
+++ /dev/null
@@@ -1,71 -1,71 +1,0 @@@
--require('dotenv').config()
--var axios = require('axios')
--var fs = require('fs')
--
--const query = `
--query BIO_QUERY($username: String!) {
-- organization(login: $username) {
-- id
-- sponsorshipsAsMaintainer(first: 100) {
-- totalCount
-- nodes {
-- createdAt
-- privacyLevel
-- tier {
-- name
-- }
-- sponsor {
-- login
-- }
-- }
-- }
-- }
--}
--`
--
--const fetchAllSponsors = async () => {
-- const { data } = await axios.post(
-- `https://api.github.com/graphql`,
-- {
-- query,
-- variables: {
-- username: 'supabase',
-- },
-- },
-- {
-- headers: {
-- 'Content-Type': 'application/json',
-- Authorization: `token ${process.env.GITHUB_SPONSORS_TOKEN}`,
-- },
-- }
-- )
-- return data.data.organization.sponsorshipsAsMaintainer
--}
--
--const formatResults = (graphqlResponse) => {
-- return graphqlResponse.nodes
-- .filter((x) => !!x.sponsor)
-- .map((x) => ({
-- tier: x.tier.name,
-- sponsor: x.sponsor.login,
-- }))
--}
--
--const writeFile = (data) => {
-- fs.writeFile(
-- './src/data/sponsors.json',
-- JSON.stringify(data, null, 2),
-- 'utf8',
-- function (err) {
-- if (err) throw err
-- console.log('sponsors.json saved.')
-- }
-- )
--}
--
--const main = async () => {
-- const sponsorsResponse = await fetchAllSponsors()
-- const formatted = formatResults(sponsorsResponse)
-- writeFile(formatted)
--}
--main()
diff --cc about/src/pages/styles.module.css
index da5317c7e9e,da5317c7e9e..ab23c39eabb
--- a/about/src/pages/styles.module.css
+++ b/about/src/pages/styles.module.css
@@@ -1,10 -1,10 +1,3 @@@
--/**
-- * Copyright (c) 2017-present, Facebook, Inc.
-- *
-- * This source code is licensed under the MIT license found in the
-- * LICENSE file in the root directory of this source tree.
-- */
--
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.