Skip to content

Commit

Permalink
Merge pull request supabase#17426 from supabase/cleanup-deps-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcodez authored Sep 14, 2023
2 parents 12cf750 + 0f576e9 commit c6b1283
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 1,351 deletions.
3 changes: 2 additions & 1 deletion apps/docs/generator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import CliGenerator from './cli'
import ConfigGenerator from './config'
import SdkGenerator from './sdk'
import LegacyGenerator from './legacy'
import * as minimist from 'minimist'

const main = (command: string[], options: any) => {
handleInput(command[0], options)
}

// Run everything
const argv = require('minimist')(process.argv.slice(2))
const argv = minimist(process.argv.slice(2))
main(argv['_'], argv)

function handleInput(command: string, options: any) {
Expand Down
23 changes: 3 additions & 20 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@
"gen:analytics:usage": "ts-node ./generator/index.ts gen --type api --input ../../spec/transforms/analytics_v0_openapi_deparsed.json --output ./docs/reference/analytics/generated/usage.mdx"
},
"dependencies": {
"@algolia/autocomplete-js": "^1.7.2",
"@algolia/autocomplete-plugin-recent-searches": "^1.7.2",
"@code-hike/mdx": "^0.8.3",
"@docsearch/react": "^3.3.0",
"@mdx-js/loader": "^2.1.5",
"@mdx-js/react": "^2.1.5",
"@next/bundle-analyzer": "^13.4.0",
Expand All @@ -58,9 +55,6 @@
"@supabase/auth-helpers-nextjs": "^0.5.6",
"@supabase/auth-helpers-react": "^0.3.1",
"@supabase/supabase-js": "^2.23.0",
"algoliasearch": "^4.14.2",
"babel": "^6.23.0",
"clsx": "^1.2.1",
"common": "*",
"config": "*",
"framer-motion": "^6.5.1",
Expand All @@ -80,47 +74,36 @@
"mermaid": "^10.0.2",
"micromark-extension-mdxjs": "^1.0.0",
"next": "^12.3.2",
"next-compose-plugins": "^2.2.1",
"next-mdx-remote": "^4.1.0",
"next-mdx-toc": "^0.1.3",
"next-plugin-yaml": "^1.0.1",
"next-seo": "^5.14.1",
"openai": "^3.2.1",
"react": "^17.0.2",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^17.0.2",
"react-intersection-observer": "^9.4.0",
"react-markdown": "^8.0.3",
"react-syntax-highlighter": "^15.5.0",
"rehype-slug": "^5.1.0",
"remark": "^14.0.2",
"remark-admonitions": "^1.2.1",
"remark-gfm": "^3.0.1",
"remark-slug": "^7.0.1",
"remark-emoji": "^3.1.2",
"shiki": "^0.11.1",
"sse.js": "^0.6.1",
"ui": "*",
"unist-builder": "^3.0.1",
"unist-util-filter": "^4.0.1",
"unist-util-visit": "^4.1.2",
"uuid": "^9.0.0",
"valtio": "^1.7.6",
"yargs": "^17.7.2"
"valtio": "^1.7.6"
},
"devDependencies": {
"@aws-sdk/client-secrets-manager": "^3.410.0",
"@types/hast": "^2.3.4",
"@types/node": "^17.0.24",
"@types/react": "17.0.39",
"@types/unist": "^2.0.6",
"@types/yargs": "^17.0.24",
"config": "*",
"dotenv": "^16.0.3",
"ejs": "^3.1.8",
"eslint": "^8.41.0",
"globby": "^12.0.2",
"minimist": "^1.2.6",
"globby": "^13.2.2",
"minimist": "^1.2.8",
"next-transpile-modules": "^9.0.0",
"npm-run-all": "^4.1.5",
"openapi-types": "^12.0.2",
Expand Down
10 changes: 3 additions & 7 deletions apps/docs/scripts/search/generate-embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ import { Configuration, OpenAIApi } from 'openai'
import { inspect } from 'util'
import { v4 as uuidv4 } from 'uuid'
import { fetchSources } from './sources'
import yargs from 'yargs'
import * as minimist from 'minimist'

dotenv.config()

async function generateEmbeddings() {
const argv = await yargs.option('refresh', {
alias: 'r',
description: 'Refresh data',
type: 'boolean',
}).argv
const argv = minimist(process.argv.slice(2))

const shouldRefresh = argv.refresh
const shouldRefresh = Boolean(argv.refresh)

const requiredEnvVars = [
'NEXT_PUBLIC_SUPABASE_URL',
Expand Down
12 changes: 0 additions & 12 deletions apps/docs/types/sse.d.ts

This file was deleted.

Loading

0 comments on commit c6b1283

Please sign in to comment.