Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add file upload functionality to TextField component #42

Merged
merged 192 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
443ab53
fix(ui): forward JaenToggleButton ref
schettn Nov 26, 2021
fda2070
fix(ui): remove data-name from svg
schettn Nov 26, 2021
e77f04e
fix(ui): seperate props form rest api
schettn Nov 26, 2021
932df90
fix(tsconfig): update references
schettn Nov 28, 2021
d8eb21e
chore(package.json): allow minor, patch updates for jaen-shared-ui
schettn Nov 28, 2021
383d845
chore(release): 2.1.1 [skip ci]
semantic-release-bot Nov 28, 2021
49e5fae
chore(release): 2.0.1 [skip ci]
semantic-release-bot Nov 28, 2021
abe0f16
chore(release): 2.0.1 [skip ci]
semantic-release-bot Nov 28, 2021
d0b268b
refactor(packages): combine all packages in one
schettn Nov 28, 2021
d63694e
fix(jaen/cli): add upload function that works for nodejs
schettn Nov 28, 2021
d2de469
fix(jaen/ui): fix svg loading issues
schettn Nov 28, 2021
0cd1f42
docs(readme): change to new structure
schettn Nov 29, 2021
580dc5b
fix(blockcontainer): add full width to placeholder skeleton
schettn Nov 29, 2021
93696b3
chore: update yarn.lock
schettn Nov 29, 2021
f7598a6
feat: add example page with some jaen fields
schettn Nov 29, 2021
18298f2
chore(release): 2.0.0 [skip ci]
semantic-release-bot Nov 29, 2021
2802626
chore(package.json): update urls
schettn Nov 29, 2021
acb5682
chore(tsconfig.json): add composite compiler option
schettn Nov 30, 2021
f5a34a2
chore(release): 1.0.0 [skip ci]
semantic-release-bot Nov 30, 2021
7f28578
chore(package.json): add publishConfig and set access to public
schettn Nov 30, 2021
82bb60d
chore(release): 1.0.0 [skip ci]
semantic-release-bot Nov 30, 2021
001ee86
chore(release): 2.0.0 [skip ci]
semantic-release-bot Nov 30, 2021
6517d31
fix(files): render snekFinder even without initBackendLink
schettn Nov 30, 2021
24b5276
fix(indexfield): rerender when page data changes (e.g. new childs)
schettn Nov 30, 2021
4741544
feat(basepage): add `id` to BasePageType
schettn Nov 30, 2021
3781ac0
fix(indexfield): addition to 24b5276
schettn Dec 3, 2021
f665aad
style(imports): remove unused imports
schettn Dec 3, 2021
b966c99
chore(package.json): reorder dependencies
schettn Dec 3, 2021
329c3b0
feat(indexfield): add page creation with renderers
schettn Dec 3, 2021
0665282
chore(yarn.lock): update lockfile
schettn Dec 3, 2021
3c4a638
fix(pageexplorer): fix ContextMenu pos in PageTree
schettn Dec 3, 2021
27feb97
feat(pageexplorer): update last publish date
schettn Dec 3, 2021
29009ea
chore(release): 1.1.0 [skip ci]
semantic-release-bot Dec 3, 2021
0cfafb9
chore(release): 2.1.0 [skip ci]
semantic-release-bot Dec 3, 2021
c3cb936
fix: update links to new organisation
schettn Dec 4, 2021
64c0298
chore(release): 2.1.1 [skip ci]
semantic-release-bot Dec 4, 2021
c071f1b
save
schettn Dec 10, 2021
abfc7c0
docs
schettn Dec 11, 2021
45a004f
save
schettn Dec 27, 2021
17a6380
save
schettn Dec 27, 2021
7e452ed
sectionfield
schettn Dec 28, 2021
259cd36
storybook stuff etc
schettn Dec 29, 2021
2d8a548
section delete
schettn Dec 29, 2021
c76549f
connectField: add fieldType to datastructure
schettn Dec 29, 2021
cc11832
add page creator
schettn Dec 30, 2021
becf97e
dashboard and pagecreator
schettn Dec 30, 2021
67b3ae7
update forms
schettn Jan 1, 2022
a75bf2f
improve container structure
schettn Jan 3, 2022
52b81f0
improve dashboard
schettn Jan 5, 2022
e6976c0
basic dynamic paging
schettn Jan 5, 2022
d267f35
refactor pages slice
schettn Jan 5, 2022
66b5ab6
make fields work with dynamic pages
schettn Jan 5, 2022
16c62da
add deep equal selector
schettn Jan 5, 2022
627ba6e
dynamic paging
schettn Jan 8, 2022
545c430
update dpaths
schettn Jan 8, 2022
627672c
changes
schettn Jan 8, 2022
64b4efb
handle relative paths
schettn Jan 8, 2022
2bc44d2
update project structure
schettn Jan 8, 2022
90a2564
move structure
schettn Jan 9, 2022
97fe370
publish and alert dialog
schettn Jan 9, 2022
eedcd30
enable publish button
schettn Jan 9, 2022
e45f682
set default tab
schettn Jan 9, 2022
1fe7f69
save
schettn Jan 11, 2022
a2eb1b4
update storybook
schettn Jan 11, 2022
b36f2e7
editing mode
schettn Jan 11, 2022
a209ca9
save
schettn Jan 12, 2022
0205cb0
add updatemodal for imagefield
schettn Jan 13, 2022
352b2ed
basic imaefield
schettn Jan 13, 2022
ab3ad95
add snekfinder
schettn Jan 15, 2022
5046540
add jaenFiles to gatsby gql
schettn Jan 16, 2022
538de5a
update jaenimage and add story
schettn Jan 16, 2022
e364808
update imports
schettn Jan 18, 2022
f29c099
finder changes
schettn Jan 19, 2022
3c54687
add cool stuff
schettn Jan 24, 2022
ecaebc3
register toolbar buttons and more
schettn Jan 24, 2022
b59cd3d
add site context and fix routing
schettn Jan 24, 2022
71a9672
add basic templating via source file
schettn Jan 24, 2022
fece67e
fix: buggy react-icons version
schettn Jan 25, 2022
77813c9
asd
schettn Jan 25, 2022
b830518
not ready: template loading
schettn Jan 25, 2022
3ade0e6
reworking templating
schettn Jan 25, 2022
921c91a
rework templating
schettn Jan 25, 2022
6c42860
fix routing
schettn Jan 26, 2022
55363a5
fix templating and add root templates
schettn Jan 26, 2022
38cd551
remove alert
schettn Jan 26, 2022
25b426b
persist redux
schettn Jan 28, 2022
ea0c3a5
remove console logs
schettn Jan 28, 2022
b7fa2f1
move theme, update chakraui provider, update ssr
schettn Jan 28, 2022
cec2dee
fix editor state bug
schettn Jan 28, 2022
dcca6b1
remove 'othername' backup
schettn Jan 28, 2022
55fd853
update paths and fix image field ssr
schettn Jan 28, 2022
0c26d1e
update path remove console log
schettn Jan 29, 2022
916c47f
add editbuttongroup to field stories
schettn Jan 29, 2022
9ecfd38
add reference to tsconfig
schettn Jan 29, 2022
d56accc
update fragments
schettn Jan 29, 2022
2330d94
remove JaenPage / exclusion form static data
schettn Jan 29, 2022
b5b5bce
updae jaenprovder to accept only one prop
schettn Jan 29, 2022
8022c7f
add basic indexfield
schettn Jan 29, 2022
54840c2
add jaenPageId to indexfield
schettn Jan 29, 2022
f2dba33
add choicefield
schettn Jan 29, 2022
c52d422
add excludeFromIndex
schettn Jan 29, 2022
0f703fa
fix wrong sidebar selection
schettn Jan 30, 2022
ad58d97
add isEditing to sectionfield
schettn Jan 30, 2022
f765d16
add styling and as props to sectionfield
schettn Jan 30, 2022
08b3108
add chakra theme to storybook
schettn Jan 30, 2022
69c4bdd
fix sectionfield popover error
schettn Jan 30, 2022
abb30d6
save
schettn Jan 30, 2022
ccb1e83
sectionfield: add option to add diffrent sections
schettn Jan 30, 2022
3b4cda8
sectionfield: make popover controlled
schettn Jan 30, 2022
ba8516b
change color
schettn Jan 30, 2022
8a3329d
update pages
schettn Jan 30, 2022
9bc3cc8
add notification service
schettn Jan 31, 2022
36732b0
remove tsconfig
schettn Jan 31, 2022
87dbb84
update notify plugin
schettn Feb 3, 2022
3305871
update cookiemodal
schettn Feb 3, 2022
f071ac5
add name to notify connector
schettn Feb 3, 2022
bc4bf5d
add textfield to notificaitons
schettn Feb 3, 2022
4216c5e
update notifications
schettn Feb 3, 2022
3c70914
add publishing cli
schettn Feb 3, 2022
931fc4e
try add cli
schettn Feb 4, 2022
effe48a
fix publishing.. partially
schettn Feb 4, 2022
d86c17b
save
schettn Feb 5, 2022
3fd695e
fix publising
schettn Feb 5, 2022
e1cefc9
fix publishign
schettn Feb 5, 2022
3c13e3e
save
schettn Feb 5, 2022
1dbd3d5
add sourcing for jaen pages
schettn Feb 6, 2022
f71e608
migration update mergign
schettn Feb 6, 2022
c4a93ef
add jaen-data
schettn Feb 6, 2022
1903cf4
fix ids
schettn Feb 6, 2022
dea30ab
fix
schettn Feb 6, 2022
19fa269
fix page tree
schettn Feb 6, 2022
0c351a4
add path to static pages
schettn Feb 6, 2022
c645376
add notification tab
schettn Feb 6, 2022
20cffa2
wrapp tabs
schettn Feb 6, 2022
4b5262c
update pages null seleciton
schettn Feb 6, 2022
0785e09
update ui
schettn Feb 9, 2022
0ada31a
add admin login and jaen toggle button
schettn Feb 10, 2022
cc69bac
add admin login page
schettn Feb 10, 2022
f967f47
add login ui and apis
schettn Feb 12, 2022
6c512b7
add publish api
schettn Feb 12, 2022
24599ab
add settings
schettn Feb 13, 2022
2da0031
add internal jaen-data
schettn Feb 13, 2022
4e34508
move example project
schettn Feb 13, 2022
240d5bd
save
schettn May 21, 2024
0ee604b
feat: add notification popup
schettn May 22, 2024
5b825b0
fix: jaen update only for jaen:admin
schettn May 23, 2024
0432f9e
chore: update hast-util-sanitize dependency to version 5.0.1
kleberbaum May 27, 2024
e4589fb
feat(jaen-fields-mdx): Add support for TabsTemplate component
kleberbaum May 27, 2024
811f9c0
chore: remove console logs
schettn May 27, 2024
24b8835
fix: useJaenPageIndex handle deleted child pages
schettn May 27, 2024
fc308eb
Merge remote-tracking branch 'netsnek/main'
schettn May 27, 2024
735232a
chore: bump jaen-fields-mdx version to 1.0.0-rc.20
schettn Jun 3, 2024
e8a4364
feat(jaen): add link and unlink functionality to TextField component
schettn Jun 3, 2024
107cb88
feat: update usePage hook to support media injection
schettn Jun 3, 2024
f623013
feat: add default author to blog posts if not provided
schettn Jun 3, 2024
8230a20
chore: update gatsby-plugin-jaen and jaen package versions
schettn Jun 3, 2024
5d151a8
fix(jaen-frame): key issue in NavigationGroups
schettn Jun 5, 2024
6ecb511
chore: remove unused imports
schettn Jun 5, 2024
476be97
fix(jaen-frame): sort navigation group items correctly
schettn Jun 5, 2024
13a5707
refactor: set AuthenticationProvider as first provider
schettn Jun 5, 2024
0339980
fix: update TextField component to allow additional HTML tags and att…
schettn Jun 5, 2024
9478ac3
fix(jaen/usePage): add missing null check for mediaPage
schettn Jun 5, 2024
57936e7
chore: update jaen package version to 1.0.0-rc.90
schettn Jun 5, 2024
17e2238
chore: update gatsby-plugin-jaen version
schettn Jun 5, 2024
21c4e54
fix(jaen): add default props to usePage hook
schettn Jun 10, 2024
1d18348
feat: add createdBy to JaenPage
schettn Jun 17, 2024
aa949bc
Merge @getcronit/jaen into @jaenjs/jaen
schettn Jun 21, 2024
fe0cd0b
remove atsnek prefix form packages and imports
schettn Jun 21, 2024
fa453b3
chore: update versions
schettn Jun 21, 2024
4e4f046
chore(gatsby-jaen-resource): make package private
schettn Jun 21, 2024
3848737
chore: prepare for publish
schettn Jun 21, 2024
68464a4
Merge pull request #1 from getcronit/main
schettn Jun 21, 2024
7f6a039
ci: update release.yml
schettn Jun 21, 2024
8fcdc29
fix: build index for dist
schettn Jun 21, 2024
cdcf90a
Merge pull request #2 from getcronit/main
schettn Jun 21, 2024
269abf6
feat: add file upload functionality to TextField component
schettn Jun 24, 2024
bced0db
refactor: optimize TuneSelectorButton rendering in TextField component
schettn Jun 24, 2024
8ecc9fe
Merge pull request #3 from getcronit/main
schettn Jun 24, 2024
4581e2d
save
schettn Jun 25, 2024
5ef2b66
update to latest jaen
schettn Jun 25, 2024
431f962
Merge pull request #4 from getcronit/main
schettn Jun 25, 2024
c5d466c
Revert "feat: add lens compatibility with jaen and ZITADEL"
schettn Jun 25, 2024
7fe0524
Merge pull request #5 from jaenjs/revert-4-main
schettn Jun 25, 2024
6e3b4ad
feat: add lens compatibility with jaen and ZITADEL
schettn Jun 25, 2024
dacac6a
fix: module export
schettn Jul 22, 2024
c5fd0b0
fix: adjust media choose button size
schettn Jul 29, 2024
ba9b61a
feat: add media selection functionality to MediaPreview component
schettn Jul 29, 2024
81bb84f
ci: add beta branch to release workflow
schettn Jul 29, 2024
78852c2
fix: make media choose button in MediaPreview component variant solid
schettn Aug 5, 2024
e7218e8
fix: update parentPage's childPages duplicate issue on page update
schettn Aug 5, 2024
e6c1a28
Merge remote-tracking branch 'getcronit/main'
kleberbaum Aug 8, 2024
65d8de0
Merge branch 'main' into dev
kleberbaum Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release

on:
push:
branches:
- main
- beta

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- run: yarn install
- name: Build
run: yarn run build
- name: Release
run: yarn workspaces run semantic-release -e semantic-release-monorepo
19 changes: 0 additions & 19 deletions .releaserc.json

This file was deleted.

2 changes: 1 addition & 1 deletion examples/my-gatsby-site/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GATSBY_LENS_API_URL=https://api.photonq.lens.atsnek.com/graphql
GATSBY_LENS_API_URL=https://api.lens.walther.exp.univie.ac.at:8080/graphql
#SENTRY_AUTH_TOKEN=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
7 changes: 3 additions & 4 deletions examples/my-gatsby-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
"build": "NODE_OPTIONS=--max-old-space-size=8192 gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@atsnek/jaen": "^1.0.0-rc.1",
"@atsnek/jaen-fields-mdx": "^1.0.0-rc.1",
"jaen": "*",
"jaen-fields-mdx": "*",
"@radix-ui/react-icons": "^1.3.0",
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.11.0/react-icons-all-files-4.11.0.tgz",
"gatsby": "^5.11.0",
"gatsby-plugin-jaen": "^1.0.0-rc.1",
"gatsby-plugin-jaen": "*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LayoutProps, useWidget} from '@atsnek/jaen'
import {LayoutProps, useWidget} from 'jaen'
import {Box, Heading, HStack, Button} from '@chakra-ui/react'
import {useEffect} from 'react'

Expand Down
Binary file removed examples/my-gatsby-site/src/images/icon.png
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/my-gatsby-site/src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import {Link, HeadFC, PageProps} from 'gatsby'
import {PageConfig} from '@atsnek/jaen'
import {PageConfig} from 'jaen'
import {LightMode, GlobalStyle} from '@chakra-ui/react'

const pageStyles = {
Expand Down Expand Up @@ -55,7 +55,7 @@ const NotFoundPage: React.FC<PageProps> = () => {

export default NotFoundPage

export {Head} from '@atsnek/jaen'
export {Head} from 'jaen'

export const pageConfig: PageConfig = {
label: 'Oops! Page not found',
Expand Down
2 changes: 1 addition & 1 deletion examples/my-gatsby-site/src/pages/contact.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PageConfig, PageProps, useNotificationsContext} from '@atsnek/jaen'
import {PageConfig, PageProps, useNotificationsContext} from 'jaen'

import {
Button,
Expand Down
2 changes: 1 addition & 1 deletion examples/my-gatsby-site/src/pages/editor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Field, PageConfig, PageProps} from '@atsnek/jaen'
import {Field, PageConfig, PageProps} from 'jaen'

const Page: React.FC<PageProps> = ({location, pageContext}) => {
return <Field.Editor name="editor" />
Expand Down
2 changes: 1 addition & 1 deletion examples/my-gatsby-site/src/pages/hidden-node.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PageConfig, PageProps} from '@atsnek/jaen'
import {PageConfig, PageProps} from 'jaen'

const Page: React.FC<PageProps> = ({location, pageContext}) => {
return (
Expand Down
6 changes: 3 additions & 3 deletions examples/my-gatsby-site/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import {
useMediaModal,
usePageContext,
useSiteMetadataContext
} from '@atsnek/jaen'
} from 'jaen'
import {Link, useJaenFrameMenuContext} from 'gatsby-plugin-jaen'

import {Box, Button, LightMode, Text} from '@chakra-ui/react'
import {graphql} from 'gatsby'
import * as React from 'react'

import {UncontrolledMdxField} from '@atsnek/jaen-fields-mdx'
import {UncontrolledMdxField} from 'jaen-fields-mdx'
import {FaCogs} from '@react-icons/all-files/fa/FaCogs'

const pageStyles = {
Expand Down Expand Up @@ -403,4 +403,4 @@ export const query = graphql`
}
`

export {Head} from '@atsnek/jaen'
export {Head} from 'jaen'
6 changes: 3 additions & 3 deletions examples/my-gatsby-site/src/pages/mdx.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Field, PageConfig, PageProps} from '@atsnek/jaen'
import {Field, PageConfig, PageProps} from 'jaen'
import {Box} from '@chakra-ui/react'
import {MdxField, UncontrolledMdxField} from '@atsnek/jaen-fields-mdx'
import {MdxField, UncontrolledMdxField} from 'jaen-fields-mdx'
import {Link} from 'gatsby-plugin-jaen'
import {usePage} from '@atsnek/jaen'
import {usePage} from 'jaen'
import {useState} from 'react'

const QASMPlayground: React.FC<{
Expand Down
2 changes: 1 addition & 1 deletion examples/my-gatsby-site/src/pages/section.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {connectBlock, Field, PageConfig, PageProps} from '@atsnek/jaen'
import {connectBlock, Field, PageConfig, PageProps} from 'jaen'
import {VStack} from '@chakra-ui/react'

const Block = connectBlock(
Expand Down
2 changes: 1 addition & 1 deletion examples/my-gatsby-site/src/pages/tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
PageConfig,
PageProps,
useCMSManagementContext
} from '@atsnek/jaen'
} from 'jaen'
import {CMSManagement} from 'gatsby-plugin-jaen'

const Page: React.FC<PageProps> = ({location, pageContext}) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/my-gatsby-site/src/pages/user/[...].tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PageConfig, PageProps} from '@atsnek/jaen'
import {PageConfig, PageProps} from 'jaen'

const Page: React.FC<PageProps> = ({location, pageContext}) => {
// everything after /user/ is the handle
Expand Down
2 changes: 1 addition & 1 deletion examples/my-gatsby-site/src/pages/wholesale.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PageConfig, PageProps} from '@atsnek/jaen'
import {PageConfig, PageProps} from 'jaen'

const Page: React.FC<PageProps> = ({location, pageContext}) => {
return (
Expand Down
6 changes: 3 additions & 3 deletions examples/my-gatsby-site/src/templates/BlogPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react'
import {Link, HeadFC, PageProps, navigate, graphql} from 'gatsby'
import {Field, PageConfig, useField, useJaenPageIndex} from '@atsnek/jaen'
import {Field, PageConfig, useField, useJaenPageIndex} from 'jaen'
import {Button} from '@chakra-ui/react'
import {MdxField} from '@atsnek/jaen-fields-mdx'
import {MdxField} from 'jaen-fields-mdx'

const BlogPage: React.FC<PageProps> = props => {
const index = useJaenPageIndex()
Expand Down Expand Up @@ -67,4 +67,4 @@ export const query = graphql`
}
`

export {Head} from '@atsnek/jaen'
export {Head} from 'jaen'
5 changes: 0 additions & 5 deletions lerna.json

This file was deleted.

14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"description": "The Webapps framework for creating scalable and dynamic applications with ease.",
"private": true,
"version": "1.0.0",
"repository": "https://github.com/atsnek/jaen",
"author": "Nico Schett <schett@atsnek.com>",
"repository": "https://github.com/jaenjs/jaen",
"author": "Nico Schett <nico.schett@cronit.io>",
"scripts": {
"lint:fix": "yarn eslint packages/jaen/src/ --fix",
"prettier:fix": "yarn prettier packages/jaen/src/ --write",
"format": "yarn prettier:fix && yarn lint:fix"
"format": "yarn prettier:fix && yarn lint:fix",
"build": "yarn workspace jaen run build && yarn workspace gatsby-source-jaen run build && yarn workspace gatsby-plugin-jaen run build && yarn workspace gatsby-jaen-mailpress run build && yarn workspace gatsby-jaen-lens run build && yarn workspace jaen-fields-mdx run build"
},
"workspaces": [
"packages/jaen",
Expand All @@ -25,13 +26,18 @@
"prettier-plugin-organize-imports": "^3.2.2"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/release-notes-generator": "^14.0.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"eslint": "^8.0.1",
"eslint-config-standard-with-typescript": "^27.0.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.32.0"
"eslint-plugin-react": "^7.32.0",
"semantic-release": "^24.0.0",
"semantic-release-monorepo": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-jaen-lens/gatsby/gatsby-node.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PageConfig} from '@atsnek/jaen'
import {PageConfig} from 'jaen'
import {GatsbyNode, PluginOptions} from 'gatsby'

export interface JaenLensPluginOptions extends PluginOptions {
Expand Down
5 changes: 2 additions & 3 deletions packages/gatsby-jaen-lens/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-jaen-lens",
"version": "0.0.17",
"version": "1.0.0",
"description": "Snek lens plugin for Jaen to render proxied views of internal services behind a firewall.",
"main": "index.js",
"scripts": {
Expand All @@ -14,7 +14,7 @@
],
"keywords": [
"gatsby",
"@atsnek/jaen",
"jaen",
"snek-lens",
"proxy"
],
Expand All @@ -27,7 +27,6 @@
},
"peerDependencies": {
"@chakra-ui/react": "^2.8.0",
"@snek-functions/origin": "^0.9.0",
"react": "^18.2.0"
},
"devDependencies": {
Expand Down
18 changes: 17 additions & 1 deletion packages/gatsby-jaen-lens/src/clients/lens/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import {makeSnekQuery} from 'snek-query'
import {User} from 'oidc-client-ts'
import 'jaen/dist/types'

import {Query, Mutation} from './schema.generated'

const apiURL = process.env.GATSBY_LENS_API_URL
Expand All @@ -10,6 +13,19 @@ if (!apiURL) {
export const sq = makeSnekQuery(
{Query, Mutation},
{
apiURL
apiURL,
middlewares: [
({context}) => {
const oidcStorage = sessionStorage.getItem(
`oidc.user:${__JAEN_ZITADEL__.authority}:${__JAEN_ZITADEL__.clientId}`
)

if (oidcStorage) {
const user = User.fromStorageString(oidcStorage)

context.headers['Authorization'] = `Bearer ${user.access_token}`
}
}
]
}
)
Loading
Loading