Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
irishcarbomb777 committed Jun 27, 2024
1 parent a300eaa commit 76f0d6b
Show file tree
Hide file tree
Showing 123 changed files with 5,024 additions and 2,417 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
5 changes: 5 additions & 0 deletions .changeset/cold-ties-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thinairthings/uix": patch
---

added bin section to package.json
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
153 changes: 59 additions & 94 deletions CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions babel.config.cjs

This file was deleted.

18 changes: 0 additions & 18 deletions jest.config.cjs

This file was deleted.

7 changes: 7 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"watch": [
"src"
],
"ext": "ts,tsx",
"exec": "tsup-node"
}
107 changes: 49 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,25 @@
{
"name": "@thinairthings/uix",
"author": "Dan Lannan",
"version": "1.2.5",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"version": "2.0.0",
"type": "module",
"bin": {
"uix": "./dist/cli/cli.js"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
"prepublishOnly": "npm run build",
"format": "npx prettier --write .",
"test": "npm run build && jest",
"verdaccio": "pm2 start $(which verdaccio) --name verdaccio",
"localpublish": "pnpm run build && git add . && git commit --amend --no-edit && pnpm version patch && pnpm publish --no-git-checks --registry http://localhost:4873"
"build:run": "tsup-node && node dist/cli/cli.js",
"test": "dotenvx run -f .env.test -- pnpm build && dotenvx run -f .env.test -- vitest run basic --test-timeout=100000",
"uix": "dotenvx run -f .env.test -- node ./dist/cli/cli.js --path-to-config=./tests/uix/uix.config.ts"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./neo4j": {
"types": "./dist/neo4j/index.d.ts",
"import": "./dist/neo4j/index.js",
"require": "./dist/neo4j/index.cjs"
},
"./nextjs": {
"types": "./dist/nextjs/index.d.ts",
"import": "./dist/nextjs/index.js",
"require": "./dist/nextjs/index.cjs"
},
"./react": {
"types": "./dist/react/index.d.ts",
"import": "./dist/react/index.js",
"require": "./dist/react/index.cjs"
"types": "./dist/lib/index.d.ts",
"default": "./dist/lib/index.js"
}
},
"files": [
Expand All @@ -43,40 +30,44 @@
"url": "git+https://github.com/ThinAirThings/uix.git"
},
"keywords": [],
"dependencies": {
"@tanstack/react-query": "^5.32.0",
"@thinairthings/use-immer": "^0.9.1",
"openai": "^4.38.3",
"uuid": "^9.0.1",
"neo4j-driver": "^5.19.0",
"next": "^14.2.0-canary.62",
"zod": "^3.22.5",
"zustand": "^4.5.2"
},
"peerDependencies": {
"react": "^18"
},
"devDependencies": {
"@babel/preset-env": "^7.24.4",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.0.2",
"@semantic-release/npm": "^12.0.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^15.0.5",
"@babel/preset-env": "^7.24.7",
"@sindresorhus/tsconfig": "^5.0.0",
"@types/jest": "^29.5.12",
"@types/node": "20.6.3",
"@types/uuid": "^9.0.8",
"babel-jest": "^29.7.0",
"dotenv": "^16.4.5",
"effect": "^3.3.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"semantic-release": "^23.0.6",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"tsup": "^8.0.2",
"tsx": "^4.7.2",
"typescript": "^5.4.5"
"nodemon": "^3.1.3",
"react-devtools-core": "^5.2.0",
"ts-jest": "^29.1.4",
"tsup": "^8.1.0",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
},
"dependencies": {
"@changesets/cli": "^2.27.6",
"@tanstack/react-query": "^5.32.0",
"file-type": "^19.0.0",
"immer": "^10.1.1",
"ink": "^5.0.1",
"ink-big-text": "^2.0.0",
"ink-gradient": "^3.0.0",
"ink-image": "^2.0.0",
"ink-progress-bar": "^3.0.0",
"ink-spinner": "^5.0.0",
"neo4j-driver": "^5.21.0",
"openai": "^4.49.0",
"package-up": "^5.0.0",
"pastel": "^3.0.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"terminal-image": "^2.0.0",
"ts-morph": "^22.0.0",
"tsx": "^4.15.2",
"uuid": "^10.0.0",
"vite": "^5.3.1",
"znv": "^0.4.0",
"zod": "^3.23.8",
"zustand": "^4.5.2"
}
}
}
40 changes: 0 additions & 40 deletions release.config.cjs

This file was deleted.

27 changes: 27 additions & 0 deletions src/app/(components)/CommandEnvironment.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

import React, { FC } from 'react';
import { ReactQueryProvider } from './ReactQueryProvider';

// const nullStream = new Writable({
// write(chunk, encoding, callback) {
// // Do nothing with the chunk
// // You can reroute this to logs if you want
// callback();
// }
// });
// const { stderr } = useStderr()
// useEffect(() => {
// stderr.write = nullStream.write.bind(nullStream)
// }, [stderr])
export const CommandEnvironment: FC<{
Command: FC<any>
}> = ({
Command
}) => {

return (
<ReactQueryProvider>
<Command />
</ReactQueryProvider>
)
}
26 changes: 26 additions & 0 deletions src/app/(components)/Error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

import React, { FC } from 'react'
import { Text, Box } from 'ink'
import { UixErr } from '../../types/Result'

export const Error: FC<{
message: string,
error: NonNullable<ReturnType<typeof UixErr>['error']>
isBugReport?: boolean
}> = ({
message,
error,
isBugReport
}) => {
return (
<Box flexDirection='column'>
<Text>{message}</Text>
{isBugReport && <>
<Text color='red'>Please file a bug report!</Text>
<Box borderStyle={'round'}>
<Text wrap='wrap'> Message: {error.message}</Text>
</Box>
</>}
</Box>
)
}
42 changes: 42 additions & 0 deletions src/app/(components)/Image.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Text } from 'ink';
import terminalImage from 'terminal-image';
import React from 'react';
import propTypes from 'prop-types';

const { useState, useEffect } = React;

export const Image = (props: any) => {
const [imageData, setImageData] = useState('');

useEffect(() => {
(async () => {
setImageData(await terminalImage.file(props.src, props));
})();
}, [props]);

return <Text>{imageData}</Text>;
};

Image.propTypes = {
src: propTypes.oneOfType([
propTypes.object,
propTypes.string
]).isRequired,
width: propTypes.oneOfType([
propTypes.number,
propTypes.string
]),
height: propTypes.oneOfType([
propTypes.number,
propTypes.string
]),
preserveAspectRatio: propTypes.bool,
maximumFrameRate: propTypes.number
};

Image.defaultProps = {
width: '100%',
height: '100%',
preserveAspectRatio: true,
maximumFrameRate: 30
};
16 changes: 16 additions & 0 deletions src/app/(components)/Loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

import Spinner from 'ink-spinner';
import React, { FC } from 'react';
import { Text } from 'ink';
export const Loading: FC<{
text: string
}> = ({
text
}) => {
return (
<Text color='green'>
<Spinner type="dots" />
{` ${text}`}
</Text>
)
}
16 changes: 16 additions & 0 deletions src/app/(components)/ReactQueryProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

import React, { FC, ReactNode } from 'react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'

const queryClient = new QueryClient()
export const ReactQueryProvider: FC<{
children: ReactNode
}> = ({
children
}) => {
return (
<QueryClientProvider client={queryClient}>
{children}
</QueryClientProvider>
)
}
13 changes: 13 additions & 0 deletions src/app/(components)/Success.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React, { FC } from 'react'
import { Text, Box } from 'ink'


export const Success: FC<{
message: string
}> = ({
message
}) => {
return (
<Text>{message}</Text>
)
}
Loading

0 comments on commit 76f0d6b

Please sign in to comment.