Skip to content

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

Get Examples for #21 - Creation of examples folder since the number of examples will just grow from here. - Examples for Reading

Angelicobb7ab7e25342
diff --git a/web/docs/common/filters/eq.mdx b/web/docs/common/filters/eq.mdx
index 695596c7e2d..3607c2417cf 100644
--- a/web/docs/common/filters/eq.mdx
+++ b/web/docs/common/filters/eq.mdx
@@ -9,17 +9,6 @@ supabase
Finds all rows whose value on the stated columnName exactly matches the specified filterValue. Equivalent of `filter(columName, 'eq', criteria)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .eq('name', 'New Zealand')
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of the database column.
diff --git a/web/docs/common/filters/filter.mdx b/web/docs/common/filters/filter.mdx
index fdba909fd1a..aec385f123a 100644
--- a/web/docs/common/filters/filter.mdx
+++ b/web/docs/common/filters/filter.mdx
@@ -9,18 +9,6 @@ supabase
This allows you to apply various filters on your query. Filters can also be chained together.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3-5}
-supabase
- .from('countries')
- .filter('name', 'in', ['China', 'France'])
- .filter('status', 'eq', 'ACTIVE')
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of the database column.
diff --git a/web/docs/common/filters/gt.mdx b/web/docs/common/filters/gt.mdx
index 8d3ec19950c..8470390ad04 100644
--- a/web/docs/common/filters/gt.mdx
+++ b/web/docs/common/filters/gt.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is greater than the specified filterValue. Eqiuvalent of `filter(columnName, 'gt', criteria)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .gt('id', 20)
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/gte.mdx b/web/docs/common/filters/gte.mdx
index 4e9e237bc79..ed5eae2d38f 100644
--- a/web/docs/common/filters/gte.mdx
+++ b/web/docs/common/filters/gte.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is greater than or equal to the specified filterValue. Eqiuvalent of `filter(columnName, 'gte', criteria)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .gte('id', 20)
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/ilike.mdx b/web/docs/common/filters/ilike.mdx
index b8a53782361..0fe84b25193 100644
--- a/web/docs/common/filters/ilike.mdx
+++ b/web/docs/common/filters/ilike.mdx
@@ -9,18 +9,6 @@ supabase
A case-sensitive version of `like()`. Equivalent of `filter(columnName, 'ilike', stringPattern)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .ilike('name', '%united%')
-```
-
-</Collapsable>
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/in.mdx b/web/docs/common/filters/in.mdx
index f5f2d8b1cdd..d59a5981a73 100644
--- a/web/docs/common/filters/in.mdx
+++ b/web/docs/common/filters/in.mdx
@@ -9,17 +9,6 @@ supabase
Finds all rows whose value on the stated columnName is found on the specified filterArray. Equivalent of `filter(columnName, 'in', criteria)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .in('name', ['China', 'France'])
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/is.mdx b/web/docs/common/filters/is.mdx
index 9aebdf18934..821c832333d 100644
--- a/web/docs/common/filters/is.mdx
+++ b/web/docs/common/filters/is.mdx
@@ -10,18 +10,6 @@ supabase
A check for exact equality (**null**, **true**, **false**), finds all rows whose value on the state columnName exactly match the specified filterValue.
Equivalent of `filter(columnName, 'is', filterValue)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .is('name', null)
-```
-
-</Collapsable>
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/like.mdx b/web/docs/common/filters/like.mdx
index 197edd22e3e..e8d288e3fcb 100644
--- a/web/docs/common/filters/like.mdx
+++ b/web/docs/common/filters/like.mdx
@@ -9,18 +9,6 @@ supabase
Finds all rows whose value in the stated columnName matches the supplied pattern. Equivalent of `filter(columnName, 'like', stringPattern)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .like('name', '%United%')
-```
-
-</Collapsable>
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/lt.mdx b/web/docs/common/filters/lt.mdx
index 437984b372a..c35aba41fb5 100644
--- a/web/docs/common/filters/lt.mdx
+++ b/web/docs/common/filters/lt.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is less than the specified filterValue. Eqiuvalent of `filter(columnName, 'lt', criteria)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .lt('id', 20)
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/lte.mdx b/web/docs/common/filters/lte.mdx
index 6477ac050be..3d6997332d6 100644
--- a/web/docs/common/filters/lte.mdx
+++ b/web/docs/common/filters/lte.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is less than or equal to the specified filterValue. Eqiuvalent of `filter(columnName, 'lte', criteria)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .lte('id', 20)
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/match.mdx b/web/docs/common/filters/match.mdx
index 1f7c030b15f..0d1fff63ec0 100644
--- a/web/docs/common/filters/match.mdx
+++ b/web/docs/common/filters/match.mdx
@@ -7,19 +7,7 @@ supabase
.match(filterObject)
```
-Finds rows that exactly match the specified filterObject. Equivilent of `filter('columnName', 'eq', criteria)`.
-
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .match({ 'continent': 'Asia' })
-```
-
-</Collapsable>
-
+Finds rows that exactly match the specified filterObject. Equivalent of multiple `filter('columnName', 'eq', criteria)`.
#### `filterObject: object`
An object of `{ 'columnName': 'criteria' }`
diff --git a/web/docs/common/filters/not.mdx b/web/docs/common/filters/not.mdx
index 33fcd5044f6..9d2ca22f21c 100644
--- a/web/docs/common/filters/not.mdx
+++ b/web/docs/common/filters/not.mdx
@@ -9,17 +9,6 @@ supabase
Finds all rows whose value on the stated columnName does not match the specified filterValue. Equivalent of `filter(columnName, 'not', criteria)`.
-<Collapsable title="Toggle Example">
-
-<!-- prettier-ignore -->
-```js {3}
-supabase
- .from('countries')
- .not('name', 'China')
-```
-
-</Collapsable>
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/library/delete.mdx b/web/docs/library/delete.mdx
index b5e96bf730b..0b2f5519ca0 100644
--- a/web/docs/library/delete.mdx
+++ b/web/docs/library/delete.mdx
@@ -10,7 +10,7 @@ import CommonResponses from '../common/CommonResponses.mdx'
import CommonFilters from '../common/CommonFilters'
import FromFunction from '../common/FromFunction.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { deleteRecordJs } from './getExamples'
+import { deleteRecordJs } from './examples/delete'
<DummyData />
diff --git a/web/docs/library/examples/delete.js b/web/docs/library/examples/delete.js
new file mode 100644
index 00000000000..c8502ec1847
--- /dev/null
+++ b/web/docs/library/examples/delete.js
@@ -0,0 +1,22 @@
+/**
+ * delete.mdx examples
+ */
+
+export const deleteRecordJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const updateCountryName = async () => {
+ try {
+ let values = await supabase
+ .from('cities')
+ .match({ id: 666 })
+ .delete()
+
+ return values
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
\ No newline at end of file
diff --git a/web/docs/library/examples/get.js b/web/docs/library/examples/get.js
new file mode 100644
index 00000000000..dd8ee91465c
--- /dev/null
+++ b/web/docs/library/examples/get.js
@@ -0,0 +1,351 @@
+/**
+ * get.mdx examples
+ */
+
+export const getSimpleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getColumnsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .select('name')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getForeignJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCountries = async () => {
+ try {
+ let countries = await supabase
+ .from('countries')
+ .select(\`
+ name,
+ cities (
+ name
+ )
+ \`)
+ return countries
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getForeignMultipleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://shop.supabase.co', 'public-key-bOYapLADERfE')
+
+const getProducts = async () => {
+ try {
+ let products = await supabase
+ .from('products')
+ .select(\`
+ id,
+ supplier:supplier_id ( name ),
+ purchaser:purchaser_id ( name )
+ \`)
+ return products
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getOrderJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .order('id')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getRangeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .range(0,3)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getSingleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .range(0)
+ .single()
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getFilterJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .filter({'name', 'eq', 'Paris})
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getMatchJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .match({name: 'Beijing', country_id: 156})
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getEqJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .eq('name', 'San Francisco')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getGtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gt('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getLtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lt('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getGteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gte('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getLteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lte('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getLikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .like('name', '%la%')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getIlikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .ilike('name', '%la%')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getIsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .is('name', null)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getInJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getNotJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .not('name', 'Lagos')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
diff --git a/web/docs/library/examples/patch.js b/web/docs/library/examples/patch.js
new file mode 100644
index 00000000000..b11195dab8e
--- /dev/null
+++ b/web/docs/library/examples/patch.js
@@ -0,0 +1,22 @@
+/**
+ * patch.mdx examples
+ */
+
+export const patchRecordJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const updateCountryName = async () => {
+ try {
+ let updates = await supabase
+ .from('countries')
+ .update({ name: 'Middle Earth' })
+ .match({ name: 'New Zealand' })
+
+ return updates
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
\ No newline at end of file
diff --git a/web/docs/library/examples/post.js b/web/docs/library/examples/post.js
new file mode 100644
index 00000000000..cb23c309327
--- /dev/null
+++ b/web/docs/library/examples/post.js
@@ -0,0 +1,42 @@
+/**
+ * post.mdx examples
+ */
+
+export const postSingleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .insert([
+ { name: 'The Shire', country_id: 554 }
+ ])
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const postBulkJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const createCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .insert([
+ { name: 'The Shire', country_id: 554 },
+ { name: 'Rohan', country_id: 555 },
+ ])
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
\ No newline at end of file
diff --git a/web/docs/library/examples/stored.js b/web/docs/library/examples/stored.js
new file mode 100644
index 00000000000..f60788ab198
--- /dev/null
+++ b/web/docs/library/examples/stored.js
@@ -0,0 +1,54 @@
+/**
+ * stored-procedures.mdx examples
+ */
+
+export const storedSingleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const echoCity = async () => {
+ try{
+ let city = await supabase
+ .rpc('echo_city', { name: 'The Shire' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const storedBulkJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const echoCities = async () => {
+ try{
+ let cities = await supabase
+ .rpc('echo_city', [
+ { name: 'The Shire' },
+ { name: 'Mordor' }
+ ])
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const storedReadingJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const echoCities = async () => {
+ try{
+ let cities = await supabase
+ .rpc('asian_pacific_countries')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
diff --git a/web/docs/library/examples/subscribe.js b/web/docs/library/examples/subscribe.js
new file mode 100644
index 00000000000..bf2eff37e0e
--- /dev/null
+++ b/web/docs/library/examples/subscribe.js
@@ -0,0 +1,128 @@
+/**
+ * subscribe.mdx examples
+ */
+
+export const subscribeAllJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('*')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeTableJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeInsertsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('INSERT', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeUpdatesJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('UPDATE', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeDeletesJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('DELETE', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeMultipleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('INSERT', handleRecordInserted)
+ .on('DELETE', handleRecordDeleted)
+ .subscribe()
+`
+
+export const subscribeUnsubscribeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+
+// Unsubscribe from changes
+mySubscription.unsubscribe()
+`
+
+export const subscribeRemoveJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+
+// Disconnect mySubscription
+supabase.removeSubscription(mySubscription)
+`
diff --git a/web/docs/library/get.mdx b/web/docs/library/get.mdx
index f6cf76b9e5b..9bae9c789c0 100644
--- a/web/docs/library/get.mdx
+++ b/web/docs/library/get.mdx
@@ -12,7 +12,26 @@ import Collapsable from '../../src/components/Collapsable'
import FromFunction from '../common/FromFunction.mdx'
import DummyData from '../common/DummyData.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from './getExamples'
+import { getSimpleJs,
+ getColumnsJs,
+ getForeignJs,
+ getForeignMultipleJs,
+ getOrderJs,
+ getRangeJs,
+ getSingleJs,
+ getFilterJs,
+ getMatchJs,
+ getEqJs,
+ getGtJs,
+ getLtJs,
+ getGteJs,
+ getLteJs,
+ getLikeJs,
+ getIlikeJs,
+ getIsJs,
+ getInJs,
+ getNotJs
+ } from './examples/get'
<DummyData />
@@ -188,6 +207,27 @@ supabase
### `order()`
+<CustomCodeBlock
+ header="Shows how to use order( ) with select( )"
+ js={getOrderJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "San Francisco", "country_id": 840 },
+ { "name": "Lagos", "country_id": 556 },
+ { "name": "Auckland", "country_id": 554 },
+ { "name": "Paris", "country_id": 250 },
+ { "name": "Beijing", "country_id": 156 },
+ { "name": "Rio de Janeiro", "country_id": 76 }
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<!-- prettier-ignore -->
```js {3}
supabase
@@ -210,6 +250,25 @@ Specifies whether null values will be displayed first.
### `range()`
+<CustomCodeBlock
+ header="Shows how to use range( ) with select( )"
+ js={getRangeJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Rio de Janeiro", "country_id": 76 },
+ { "name": "Beijing", "country_id": 156 },
+ { "name": "Paris", "country_id": 250 },
+ { "name": "Auckland", "country_id": 554 },
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<!-- prettier-ignore -->
```js {3}
supabase
@@ -229,6 +288,22 @@ Index or position of the end of the specified range. If not stated, all remainin
### `single()`
+<CustomCodeBlock
+ header="Shows how to use single( ) with select( )"
+ js={getSingleJs}
+ jsHighlight="{10}"
+ response={`{
+ "body": {
+ "name": "San Francisco", "country_id": 840
+ },
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<!-- prettier-ignore -->
```js {3}
supabase
@@ -244,39 +319,257 @@ with `200 OK`. Otherwise, it will return an error with `406 Not Acceptable`.
## Filtering
### `filter()`
+
+<CustomCodeBlock
+ header="Shows how to use filter( ) with select( )"
+ js={getFilterJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Paris", "country_id": 250 },
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='filter'/>
### `match()`
+
+<CustomCodeBlock
+ header="Shows how to use match( ) with select( )"
+ js={getMatchJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Beijing", "country_id": 156 },
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='match'/>
### `eq()`
+
+<CustomCodeBlock
+ header="Shows how to use eq( ) with select( )"
+ js={getEqJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "San Francisco", "country_id": 840 },
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='eq'/>
### `gt()`
+
+<CustomCodeBlock
+ header="Shows how to use gt( ) with select( )"
+ js={getGtJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Auckland", "country_id": 554 },
+ { "name": "Lagos", "country_id": 556 },
+ { "name": "San Francisco", "country_id": 840 }
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='gt'/>
### `lt()`
+
+<CustomCodeBlock
+ header="Shows how to use lt( ) with select( )"
+ js={getLtJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Rio de Janeiro", "country_id": 76 },
+ { "name": "Beijing", "country_id": 156 }
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='lt'/>
### `gte()`
+
+<CustomCodeBlock
+ header="Shows how to use gte( ) with select( )"
+ js={getGteJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Paris", "country_id": 250 },
+ { "name": "Auckland", "country_id": 554 },
+ { "name": "Lagos", "country_id": 556 },
+ { "name": "San Francisco", "country_id": 840 }
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='gte'/>
### `lte()`
+
+<CustomCodeBlock
+ header="Shows how to use lte( ) with select( )"
+ js={getLteJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Rio de Janeiro", "country_id": 76 },
+ { "name": "Beijing", "country_id": 156 },
+ { "name": "Paris", "country_id": 250 }
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='lte'/>
### `like()`
+
+<CustomCodeBlock
+ header="Shows how to use like( ) with select( )"
+ js={getLikeJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Auckland", "country_id": 554 },
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='like'/>
### `ilike()`
+
+<CustomCodeBlock
+ header="Shows how to use ilike( ) with select( )"
+ js={getIlikeJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Auckland", "country_id": 554 },
+ { "name": "Lagos", "country_id": 556 },
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='ilike'/>
### `is()`
+
+<CustomCodeBlock
+ header="Shows how to use is( ) with select( )"
+ js={getIsJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='is'/>
### `in()`
+
+<CustomCodeBlock
+ header="Shows how to use in( ) with select( )"
+ js={getInJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Rio de Janeiro", "country_id": 76 },
+ { "name": "San Francisco", "country_id": 840 }
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='in'/>
### `not()`
+
+<CustomCodeBlock
+ header="Shows how to use not( ) with select( )"
+ js={getNotJs}
+ jsHighlight="{9}"
+ response={`{
+ "body": [
+ { "name": "Rio de Janeiro", "country_id": 76 },
+ { "name": "Beijing", "country_id": 156 },
+ { "name": "Paris", "country_id": 250 },
+ { "name": "Auckland", "country_id": 554 },
+ { "name": "Lagos", "country_id": 556 },
+ { "name": "San Francisco", "country_id": 840 }
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
+}`}
+/>
+
+<br/>
+
<CommonFilters filter='not'/>
## Responses
diff --git a/web/docs/library/getExamples.js b/web/docs/library/getExamples.js
deleted file mode 100644
index 2be78a1459c..00000000000
--- a/web/docs/library/getExamples.js
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * subscribe.mdx examples
- */
-
-export const subscribeAllJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('*')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeTableJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeInsertsJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('INSERT', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeUpdatesJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('UPDATE', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeDeletesJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('DELETE', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeMultipleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('INSERT', handleRecordInserted)
- .on('DELETE', handleRecordDeleted)
- .subscribe()
-`
-
-export const subscribeUnsubscribeJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-
-// Unsubscribe from changes
-mySubscription.unsubscribe()
-`
-
-export const subscribeRemoveJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-
-// Disconnect mySubscription
-supabase.removeSubscription(mySubscription)
-`
-
-/**
- * get.mdx examples
- */
-
-export const getSimpleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
-
-const getCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .select('*')
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const getColumnsJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
-
-const getCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .select('name')
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const getForeignJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
-
-const getCountries = async () => {
- try {
- let countries = await supabase
- .from('countries')
- .select(\`
- name,
- cities (
- name
- )
- \`)
- return countries
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const getForeignMultipleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://shop.supabase.co', 'public-key-bOYapLADERfE')
-
-const getProducts = async () => {
- try {
- let products = await supabase
- .from('products')
- .select(\`
- id,
- supplier:supplier_id ( name ),
- purchaser:purchaser_id ( name )
- \`)
- return products
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * post.mdx examples
- */
-
-export const postSingleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const getCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .insert([
- { name: 'The Shire', country_id: 554 }
- ])
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const postBulkJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const createCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .insert([
- { name: 'The Shire', country_id: 554 },
- { name: 'Rohan', country_id: 555 },
- ])
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * patch.mdx examples
- */
-
-export const patchRecordJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const updateCountryName = async () => {
- try {
- let updates = await supabase
- .from('countries')
- .update({ name: 'Middle Earth' })
- .match({ name: 'New Zealand' })
-
- return updates
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * delete.mdx examples
- */
-
-export const deleteRecordJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const updateCountryName = async () => {
- try {
- let values = await supabase
- .from('cities')
- .match({ id: 666 })
- .delete()
-
- return values
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * stored-procedures.mdx examples
- */
-
-export const storedSingleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const echoCity = async () => {
- try{
- let city = await supabase
- .rpc('echo_city', { name: 'The Shire' })
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const storedBulkJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const echoCities = async () => {
- try{
- let cities = await supabase
- .rpc('echo_city', [
- { name: 'The Shire' },
- { name: 'Mordor' }
- ])
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const storedReadingJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const echoCities = async () => {
- try{
- let cities = await supabase
- .rpc('asian_pacific_countries')
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
diff --git a/web/docs/library/patch.mdx b/web/docs/library/patch.mdx
index 34f894b0f83..b1d835a7c8f 100644
--- a/web/docs/library/patch.mdx
+++ b/web/docs/library/patch.mdx
@@ -11,7 +11,7 @@ import CommonResponses from '../common/CommonResponses.mdx'
import CommonFilters from '../common/CommonFilters'
import FromFunction from '../common/FromFunction.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { patchRecordJs } from './getExamples'
+import { patchRecordJs } from './examples/patch'
<DummyData />
@@ -22,7 +22,9 @@ import { patchRecordJs } from './getExamples'
js={patchRecordJs}
jsHighlight="{7-10}"
response={`{
- "body": null,
+ "body": [
+ {"id": 554, "name": "Middle Earth", "iso2": "NZ", "continent": "Oceania"}
+ ],
"status": 204,
"statusCode": 204,
"statusText": "No Content"
diff --git a/web/docs/library/post.mdx b/web/docs/library/post.mdx
index d9c51555896..ed2e85486cc 100644
--- a/web/docs/library/post.mdx
+++ b/web/docs/library/post.mdx
@@ -10,7 +10,7 @@ import Collapsable from '../../src/components/Collapsable'
import CommonResponses from '../common/CommonResponses.mdx'
import FromFunction from '../common/FromFunction.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { postSingleJs, postBulkJs } from './getExamples'
+import { postSingleJs, postBulkJs } from './examples/post'
<DummyData />
diff --git a/web/docs/library/stored-procedures.mdx b/web/docs/library/stored-procedures.mdx
index 6137bba9af4..a08910ee9ea 100644
--- a/web/docs/library/stored-procedures.mdx
+++ b/web/docs/library/stored-procedures.mdx
@@ -9,7 +9,7 @@ import CommonFilters from '../common/CommonFilters'
import CommonResponses from '../common/CommonResponses.mdx'
import DummyData from '../common/DummyData.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { storedSingleJs, storedBulkJs, storedReadingJs } from './getExamples'
+import { storedSingleJs, storedBulkJs, storedReadingJs } from './examples/stored'
You can call stored procedures as a "Remote Procedure Call".
diff --git a/web/docs/library/subscribe.mdx b/web/docs/library/subscribe.mdx
index f7d2c9f669e..34746e099a5 100644
--- a/web/docs/library/subscribe.mdx
+++ b/web/docs/library/subscribe.mdx
@@ -8,7 +8,7 @@ import DummyData from '../common/DummyData.mdx'
import FromFunction from '../common/FromFunction.mdx'
import Collapsable from '../../src/components/Collapsable'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { subscribeAllJs, subscribeTableJs, subscribeInsertsJs, subscribeUpdatesJs, subscribeDeletesJs, subscribeMultipleJs, subscribeUnsubscribeJs, subscribeRemoveJs } from './getExamples'
+import { subscribeAllJs, subscribeTableJs, subscribeInsertsJs, subscribeUpdatesJs, subscribeDeletesJs, subscribeMultipleJs, subscribeUnsubscribeJs, subscribeRemoveJs } from './examples/subscribe'
Subscribe to realtime changes in your own database.
diff --git a/web/package-lock.json b/web/package-lock.json
index ef0fb5076cd..c125c3d69e8 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -4993,7 +4993,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -5011,11 +5012,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -5028,15 +5031,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -5139,7 +5145,8 @@
},
"inherits": {
"version": "2.0.4",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -5149,6 +5156,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -5161,17 +5169,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -5188,6 +5199,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -5268,7 +5280,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -5278,6 +5291,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -5353,7 +5367,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -5383,6 +5398,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -5400,6 +5416,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -5438,11 +5455,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
@@ -12547,7 +12566,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -12565,11 +12585,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -12582,15 +12604,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -12693,7 +12718,8 @@
},
"inherits": {
"version": "2.0.4",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -12703,6 +12729,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -12715,17 +12742,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -12742,6 +12772,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -12822,7 +12853,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -12832,6 +12864,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -12907,7 +12940,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -12937,6 +12971,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -12954,6 +12989,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -12992,11 +13028,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
@@ -13546,7 +13584,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -13564,11 +13603,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -13581,15 +13622,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -13692,7 +13736,8 @@
},
"inherits": {
"version": "2.0.4",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -13702,6 +13747,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -13714,17 +13760,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -13741,6 +13790,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -13821,7 +13871,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -13831,6 +13882,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -13906,7 +13958,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -13936,6 +13989,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -13953,6 +14007,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -13991,11 +14046,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},