diff --git a/Cargo.lock b/Cargo.lock index 62eb8e2..1288f78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -882,9 +882,9 @@ checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" dependencies = [ "bitflags", ] @@ -1237,9 +1237,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.45.1" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", diff --git a/Cargo.toml b/Cargo.toml index a327141..46922e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,4 @@ bon = "3.6.3" reqwest = { version = "0.12.15", features = ["json", "multipart", "stream"] } serde = "1.0.219" serde_json = "1.0.140" - -[dev-dependencies] -tokio = { version = "1.45.1", features = ["full"] } +tokio = { version = "1.44.2", features = ["full"] } diff --git a/LICENSE b/LICENSE deleted file mode 100644 index fdddb29..0000000 --- a/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to diff --git a/README.md b/README.md index 6237136..628a496 100644 --- a/README.md +++ b/README.md @@ -81,11 +81,3 @@ println!("{status_show:#?}"); ## Notes - If you use a `maybe_fn()` then if you provide `None` it will be ignored and that parameter will not be added to the JSON body. This library assumes `None` would not be provided as a value (since the cases where it is a value is often the default value that the CKAN API already has set for that parameter). - -## Tests - -To run the tests in the `tests` directory, first replace the values for `CKAN_API_TOKEN` and `CKAN_URL` then run: - -```bash -cargo test -``` diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 55a12ae..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# deps -/node_modules - -# generated content -.contentlayer -.content-collections -.source - -# test & build -/coverage -/.next/ -/out/ -/build -*.tsbuildinfo - -# misc -.DS_Store -*.pem -/.pnp -.pnp.js -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# others -.env*.local -.vercel -next-env.d.ts \ No newline at end of file diff --git a/docs/.nvmrc b/docs/.nvmrc deleted file mode 100644 index b009dfb..0000000 --- a/docs/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -lts/* diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index c6e05c9..0000000 --- a/docs/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# ckanaction docs website (ckanaction.dathere.com) - -This directory includes a Next.js project built with [Fumadocs](https://github.com/fuma-nama/fumadocs) for documentation of ckanaction. The documentation can be viewed at [ckanaction.dathere.com](https://ckanaction.dathere.com). - -## Development - -Run development server: - -```bash -bun dev -``` - -Open http://localhost:3000 with your browser to see the result. - -## Explore - -In the project, you can see: - -- `lib/source.ts`: Code for content source adapter, `loader()` provides the interface to access your content. -- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep. -- `lib/openapi.yml`: The source file of the CKAN Actions API (v3) in an OpenAPI format which is then used in a script by running `bun ./scripts/generate-docs.ts` to generate the relevant docs files in `content/docs`. - -| Route | Description | -| ------------------------- | ------------------------------------------------------ | -| `app/(home)` | The route group for your landing page and other pages. | -| `app/docs` | The documentation layout and pages. | -| `app/api/search/route.ts` | The Route Handler for search. | - -## Linting - -We use [Biome](https://biomejs.dev) for linting. We recommend you install the [biome-vscode extension](https://github.com/biomejs/biome-vscode) if you are using [VSCodium](https://vscodium.com/) or VSCode for developing the docs. diff --git a/docs/app/(home)/layout.tsx b/docs/app/(home)/layout.tsx deleted file mode 100644 index 77379fa..0000000 --- a/docs/app/(home)/layout.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { HomeLayout } from 'fumadocs-ui/layouts/home'; -import { baseOptions } from '@/lib/layout.shared'; - -export default function Layout({ children }: LayoutProps<'/'>) { - return {children}; -} diff --git a/docs/app/(home)/page.tsx b/docs/app/(home)/page.tsx deleted file mode 100644 index 2478c1e..0000000 --- a/docs/app/(home)/page.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import Link from 'next/link'; - -export default function HomePage() { - return ( -
-

ckanaction

-

- You can open{' '} - - /docs - {' '} - and see the interactive documentation. -

-
- ); -} diff --git a/docs/app/api/search/route.ts b/docs/app/api/search/route.ts deleted file mode 100644 index 7ba7e82..0000000 --- a/docs/app/api/search/route.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { source } from '@/lib/source'; -import { createFromSource } from 'fumadocs-core/search/server'; - -export const { GET } = createFromSource(source, { - // https://docs.orama.com/docs/orama-js/supported-languages - language: 'english', -}); diff --git a/docs/app/docs/[[...slug]]/page.tsx b/docs/app/docs/[[...slug]]/page.tsx deleted file mode 100644 index 9b6d208..0000000 --- a/docs/app/docs/[[...slug]]/page.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { getPageImage, source } from '@/lib/source'; -import { - DocsBody, - DocsDescription, - DocsPage, - DocsTitle, -} from 'fumadocs-ui/page'; -import { notFound } from 'next/navigation'; -import { getMDXComponents } from '@/mdx-components'; -import type { Metadata } from 'next'; -import { createRelativeLink } from 'fumadocs-ui/mdx'; - -export default async function Page(props: PageProps<'/docs/[[...slug]]'>) { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); - - const MDX = page.data.body; - - return ( - - {page.data.title} - {page.data.description} - - - - - ); -} - -export async function generateStaticParams() { - return source.generateParams(); -} - -export async function generateMetadata( - props: PageProps<'/docs/[[...slug]]'>, -): Promise { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); - - return { - title: page.data.title, - description: page.data.description, - openGraph: { - images: getPageImage(page).url, - }, - }; -} diff --git a/docs/app/docs/layout.tsx b/docs/app/docs/layout.tsx deleted file mode 100644 index 8e9ec72..0000000 --- a/docs/app/docs/layout.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { DocsLayout } from 'fumadocs-ui/layouts/docs'; -import { baseOptions } from '@/lib/layout.shared'; -import { source } from '@/lib/source'; - -export default function Layout({ children }: LayoutProps<'/docs'>) { - return ( - - {children} - - ); -} diff --git a/docs/app/global.css b/docs/app/global.css deleted file mode 100644 index 7d105b7..0000000 --- a/docs/app/global.css +++ /dev/null @@ -1,5 +0,0 @@ -@import 'tailwindcss'; -@import 'fumadocs-ui/css/neutral.css'; -@import 'fumadocs-ui/css/preset.css'; -@import 'fumadocs-openapi/css/preset.css'; - diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx deleted file mode 100644 index bad5bbc..0000000 --- a/docs/app/layout.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import "@/app/global.css"; -import { RootProvider } from "fumadocs-ui/provider/next"; -import { Inter } from "next/font/google"; -import Script from "next/script"; - -const inter = Inter({ - subsets: ["latin"], -}); - -export default function Layout({ children }: LayoutProps<"/">) { - return ( - - - - {children} -