Merge pull request #14066 from supabase/j0/update_swift_version

feat: update swift version to match library
This commit is contained in:
Joel Lee
2023-05-02 14:31:25 +00:00
committed by GitHub
9 changed files with 22 additions and 22 deletions

View File

@@ -22,7 +22,7 @@ export const REFERENCES: References = {
swift: {
name: 'Swift',
library: 'supabase-swift',
versions: ['v1'],
versions: ['v0'],
icon: '/docs/img/libraries/swift-icon.svg',
},
cli: {
@@ -1054,7 +1054,7 @@ export const reference_python_v2 = {
parent: '/reference',
}
export const reference_swift_v1 = {
export const reference_swift_v0 = {
icon: 'reference-swift',
title: 'swift',
url: 'guides/reference/swift',
@@ -1177,7 +1177,7 @@ export const references = [
},
{
label: 'supabase-swift',
versions: ['v1'],
versions: ['v0'],
description: 'something about the reference',
icon: '/docs/img/icons/swift-icon.svg',
url: '/reference/swift/start',

View File

@@ -16,7 +16,7 @@ import spec_csharp_v0 from '~/../../spec/supabase_csharp_v0.yml' assert { type:
// @ts-expect-error
import spec_python_v2 from '~/../../spec/supabase_py_v2.yml' assert { type: 'yml' }
// @ts-expect-error
import spec_swift_v1 from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }
import spec_swift_v0 from '~/../../spec/supabase_swift_v0.yml' assert { type: 'yml' }
// import { gen_v3 } from '~/lib/refGenerator/helpers'
import apiCommonSections from '~/../../spec/common-api-sections.json'
@@ -58,7 +58,7 @@ export type RefIdOptions =
| 'reference_dart_v1'
| 'reference_csharp_v0'
| 'reference_python_v2'
| 'reference_swift_v1'
| 'reference_swift_v0'
| 'reference_cli'
| 'reference_api'
| 'reference_self_hosting_auth'
@@ -151,7 +151,7 @@ const NavigationMenu = () => {
break
// swift v1 (latest)
case url.includes(`/docs/reference/swift`) && url:
menuState.setMenuLevelId('reference_swift_v1')
menuState.setMenuLevelId('reference_swift_v0')
break
case url.includes(`/docs/reference/cli/config`) && url:
menuState.setMenuLevelId('supabase_cli')
@@ -215,7 +215,7 @@ const NavigationMenu = () => {
const isReference_Dart_V1 = 'reference_dart_v1' === level
const isReference_Csharp_V0 = 'reference_csharp_v0' === level
const isReference_Python_V2 = 'reference_python_v2' === level
const isReference_Swift_V1 = 'reference_swift_v1' === level
const isReference_Swift_V0 = 'reference_swift_v0' === level
const isReference_Cli = 'reference_cli' === level
const isReference_Api = 'reference_api' === level
const isReference_Self_Hosting_Auth = 'reference_self_hosting_auth' === level
@@ -288,11 +288,11 @@ const NavigationMenu = () => {
/>
<NavigationMenuRefList
key={'reference-swift-menu-v1'}
id={'reference_swift_v1'}
active={isReference_Swift_V1}
id={'reference_swift_v0'}
active={isReference_Swift_V0}
commonSections={libCommonSections}
lib="swift"
spec={spec_swift_v1}
spec={spec_swift_v0}
/>
<NavigationMenuRefList
key={'reference-python-menu-v2'}

View File

@@ -91,7 +91,7 @@ const levelsData = {
icon: '/docs/img/icons/menu/reference-python',
name: 'Python Reference v2.0',
},
reference_swift_v1: {
reference_swift_v0: {
icon: '/docs/img/icons/menu/reference-swift',
name: 'Swift Reference v1.0',
},

View File

@@ -1,6 +1,6 @@
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
// @ts-expect-error
import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }
import spec from '~/../../spec/supabase_swift_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'

View File

@@ -1,7 +1,7 @@
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
import typeSpec from '~/../../spec/enrichments/tsdoc_v2/combined.json'
// @ts-expect-error
import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }
import spec from '~/../../spec/supabase_swift_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'

View File

@@ -1,6 +1,6 @@
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
// @ts-expect-error
import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }
import spec from '~/../../spec/supabase_swift_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
@@ -13,7 +13,7 @@ export default function JSReference(props) {
}
export async function getStaticProps() {
return handleRefStaticProps(sections, '/swift/v1')
return handleRefStaticProps(sections, '/swift/v0')
}
export function getStaticPaths() {

View File

@@ -1,7 +1,7 @@
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
import typeSpec from '~/../../spec/enrichments/tsdoc_v2/combined.json'
// @ts-expect-error
import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }
import spec from '~/../../spec/supabase_swift_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
@@ -35,7 +35,7 @@ export default function JSReference(props) {
}
export async function getStaticProps() {
return handleRefStaticProps(sections, '/swift/v1')
return handleRefStaticProps(sections, '/swift/v0')
}
export function getStaticPaths() {

View File

@@ -14,7 +14,7 @@
"reference_javascript_v1",
"reference_dart_v0",
"reference_python_v2",
"reference_swift_v1"
"reference_swift_v0"
]
},
{
@@ -34,7 +34,7 @@
"reference_dart_v1",
"reference_python_v2",
"reference_csharp_v0",
"reference_swift_v1"
"reference_swift_v0"
]
},
{
@@ -47,7 +47,7 @@
"reference_dart_v1",
"reference_python_v2",
"reference_csharp_v0",
"reference_swift_v1"
"reference_swift_v0"
]
},
{
@@ -898,7 +898,7 @@
"reference_dart_v0",
"reference_python_v2",
"reference_csharp_v0",
"reference_swift_v1"
"reference_swift_v0"
],
"items": [
{

View File

@@ -7,7 +7,7 @@ info:
Supabase Swift.
specUrl: https://github.com/supabase/supabase/edit/master/spec/supabase_swift_v1.yml
specUrl: https://github.com/supabase/supabase/edit/master/spec/supabase_swift_v0.yml
slugPrefix: '/'
libraries:
- id: 'Swift'