Skip to content

Commit

Permalink
Revert "feat: add file upload functionality to TextField component (#42
Browse files Browse the repository at this point in the history
…)"

This reverts commit e385c83.
  • Loading branch information
kleberbaum authored Aug 8, 2024
1 parent e385c83 commit 0fee28e
Show file tree
Hide file tree
Showing 96 changed files with 1,615 additions and 846 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/release.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "semantic-release-monorepo",
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{"name": "beta", "prerelease": true},
{"name": "alpha", "prerelease": true}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
}
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.lens.walther.exp.univie.ac.at:8080/graphql
GATSBY_LENS_API_URL=https://api.photonq.lens.atsnek.com/graphql
#SENTRY_AUTH_TOKEN=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
7 changes: 4 additions & 3 deletions examples/my-gatsby-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
"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": {
"jaen": "*",
"jaen-fields-mdx": "*",
"@atsnek/jaen": "^1.0.0-rc.1",
"@atsnek/jaen-fields-mdx": "^1.0.0-rc.1",
"@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": "*",
"gatsby-plugin-jaen": "^1.0.0-rc.1",
"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 'jaen'
import {LayoutProps, useWidget} from '@atsnek/jaen'
import {Box, Heading, HStack, Button} from '@chakra-ui/react'
import {useEffect} from 'react'

Expand Down
Binary file added examples/my-gatsby-site/src/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 'jaen'
import {PageConfig} from '@atsnek/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 'jaen'
export {Head} from '@atsnek/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 'jaen'
import {PageConfig, PageProps, useNotificationsContext} from '@atsnek/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 'jaen'
import {Field, PageConfig, PageProps} from '@atsnek/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 'jaen'
import {PageConfig, PageProps} from '@atsnek/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 'jaen'
} from '@atsnek/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 'jaen-fields-mdx'
import {UncontrolledMdxField} from '@atsnek/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 'jaen'
export {Head} from '@atsnek/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 'jaen'
import {Field, PageConfig, PageProps} from '@atsnek/jaen'
import {Box} from '@chakra-ui/react'
import {MdxField, UncontrolledMdxField} from 'jaen-fields-mdx'
import {MdxField, UncontrolledMdxField} from '@atsnek/jaen-fields-mdx'
import {Link} from 'gatsby-plugin-jaen'
import {usePage} from 'jaen'
import {usePage} from '@atsnek/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 'jaen'
import {connectBlock, Field, PageConfig, PageProps} from '@atsnek/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 'jaen'
} from '@atsnek/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 'jaen'
import {PageConfig, PageProps} from '@atsnek/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 'jaen'
import {PageConfig, PageProps} from '@atsnek/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 'jaen'
import {Field, PageConfig, useField, useJaenPageIndex} from '@atsnek/jaen'
import {Button} from '@chakra-ui/react'
import {MdxField} from 'jaen-fields-mdx'
import {MdxField} from '@atsnek/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 'jaen'
export {Head} from '@atsnek/jaen'
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
"description": "The Webapps framework for creating scalable and dynamic applications with ease.",
"private": true,
"version": "1.0.0",
"repository": "https://github.com/jaenjs/jaen",
"author": "Nico Schett <nico.schett@cronit.io>",
"repository": "https://github.com/atsnek/jaen",
"author": "Nico Schett <schett@atsnek.com>",
"scripts": {
"lint:fix": "yarn eslint packages/jaen/src/ --fix",
"prettier:fix": "yarn prettier packages/jaen/src/ --write",
"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"
"format": "yarn prettier:fix && yarn lint:fix"
},
"workspaces": [
"packages/jaen",
Expand All @@ -26,18 +25,13 @@
"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",
"semantic-release": "^24.0.0",
"semantic-release-monorepo": "^8.0.2"
"eslint-plugin-react": "^7.32.0"
}
}
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 'jaen'
import {PageConfig} from '@atsnek/jaen'
import {GatsbyNode, PluginOptions} from 'gatsby'

export interface JaenLensPluginOptions extends PluginOptions {
Expand Down
5 changes: 3 additions & 2 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": "1.0.0",
"version": "0.0.17",
"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",
"jaen",
"@atsnek/jaen",
"snek-lens",
"proxy"
],
Expand All @@ -27,6 +27,7 @@
},
"peerDependencies": {
"@chakra-ui/react": "^2.8.0",
"@snek-functions/origin": "^0.9.0",
"react": "^18.2.0"
},
"devDependencies": {
Expand Down
18 changes: 1 addition & 17 deletions packages/gatsby-jaen-lens/src/clients/lens/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
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 @@ -13,19 +10,6 @@ if (!apiURL) {
export const sq = makeSnekQuery(
{Query, Mutation},
{
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}`
}
}
]
apiURL
}
)
Loading

0 comments on commit 0fee28e

Please sign in to comment.