Coder Social home page Coder Social logo

apiland's Introduction

apiland

The Deno API Server.

Documentation

The APIs that are available with this server are documented in /specs/api-2.0.0.yaml as an OpenAPI 3.1 specification and can be viewed here.

Usage

The current production API server is available on apiland.deno.dev. Currently only the /webhook/publish requires an API token and it not part of the public API of the server.

Architecture

The API server uses Google Datastore as the persistance layer. It connects to the datastore using the google_datastore module.

The API server uses an API focused framework named acorn to serve the APIs.

The API server processes and documents third party modules registered on deno.land as well as the Deno Standard Library and built-in APIs for the Deno. It uses deno_graph and deno_doc to accomplish this, which are components that are part of the Deno CLI but are also available as Wasm libraries with a JavaScript/TypeScript interface.

Local development

A local development server is available using:

> deno task dev

Note that you need to have a properly configured .env file for this to work. An example file is included in .env.example, but for obvious reasons we will not make the production keys available.

apiland's People

Contributors

crowlkats avatar kitsonk avatar lino-levan avatar lucacasonato avatar satyarohith avatar willnewby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apiland's Issues

chore: apiland tests

We have abysmial test coverage, we need both unit and integration tests.

The biggest challenge is that we need a way to mock the datastore.

BadResource: Bad resource ID

deploy logs have this recurring error

BadResource: Bad resource ID
    at Object.respondWith (ext:deno_http/01_http.js:278:15)
    at eventLoopTick (ext:core/01_core.js:182:7)

potentially fixed by moving acorn to use Deno.serve

Ability to publish a specific commit without tagging or setting up webhook

I'd like the ability to publish a specific commit in a repo instead of having to rely on the webhook and tag the repo.

Essentially I would like to make a request using an OIDC token in a GH Action that specifies:

  1. The commit hash.
  2. The name of the version being published.

Reason: When the main repo gets tagged, I want to run a GitHub action that builds my library and pushes it to an orphaned "build branch". I'd then like to tell apiland that I want to publish this commit with a specific version.

loading some modules timeouts in Deploy

Loading and docking some modules takes to long in deploy (like std) and exceeds the CPU limit. This means that things will get lazily loaded, but with the caching of pages, it means that many pages will be cached in the datastore with incomplete information, like module doc summaries.

We need to likely have a batch process that runs as a github action which will "cleanup" any incomplete module loads where CPU time won't get exhausted.

Is the 404 Not found intentional when accessing `x/aws_sdk`?

from denoland/deno#18877 (comment)

When I access https://deno.land/x/[email protected]/client-s3/mod.ts from the browser, 404 Not Found is displayed, but when I access it from the CLI, I can get the content normally.

PS C:\Users\ayame> curl https://deno.land/x/[email protected]/client-s3/mod.ts
export * from "./S3Client.ts";
export * from "./S3.ts";
export * from "./commands/AbortMultipartUploadCommand.ts";
export * from "./commands/CompleteMultipartUploadCommand.ts";
export * from "./commands/CopyObjectCommand.ts";
export * from "./commands/CreateBucketCommand.ts";
...

As far as I know, the 3 modules aws_sdk, masto, react_icons are no longer accessible from the browser due to website performance issues. (ref: https://github.com/denoland/apiland/pull/86/files#diff-0f333eea5d2787b19b89ca1e52a1d009170cb0ce2adb68a68c7090678fa41175)

In my opinion, when people see 404 Not found when accessing these modules, it gives them the illusion that they have been removed from deno.land. I wish I could see the message "Document rendering was skipped due to performance issues".

bug: Ordered lists aren't properly ordered on `/x` when spaced using codeblocks

This snippet

1. Create Tui instance

`​``ts
import { crayon } from "https://deno.land/x/crayon@version/mod.ts";
import { Canvas, Tui } from "https://deno.land/x/tui@version/mod.ts";

const tui = new Tui({
  style: crayon.bgBlack, // Make background black
  refreshRate: 1000 / 60, // Run in 60FPS
});

tui.dispatch(); // Close Tui on CTRL+C
`​``

2. Enable interaction using keyboard and mouse

`​``ts
import { handleInput, handleKeyboardControls, handleMouseControls } from "https://deno.land/x/tui@version/mod.ts";
...

handleInput(tui);
handleMouseControls(tui);
handleKeyboardControls(tui);
`​``

3. Add some components

`​``ts
import { Button } from "https://deno.land/x/tui@version/src/components/mod.ts";
import { Signal, Computed } from "https://deno.land/x/tui@version/mod.ts";

...
`​``

Renders order correctly on github:
https://github.com/Im-Beast/deno_tui
image

But renders only 1's on /x
https://deno.land/x/[email protected]
image

Http: connection closed while sending response

deploy logs have this recurring error

Http: connection closed while sending response
    at async Object.respondWith (ext:deno_http/01_http.js:278:9)

potentially fixed by moving acorn to use Deno.serve

search by key words in repo description

now we have the possibility to search module by name, I hope you add possibility to search module by by key words in git repo description for example when search for react in /x I expect to see all module related to react even the the name don't contain react

algolia: cron to copy index from `deno_manual` to `deno_land` app

The crawler in the deno_manual app helps us collect deno.land/manual records. Unfortunately, Algolia didn't allow us to create another index in the deno_manual app currently on an open source plan.

It turns out a costly affair to set up a crawler for a paid application. For the time being, we need to copy the manual index from the deno_manual application to the deno_land application regularly.

Slow response on /x/ for modules with a large number of files

I want to refer to a file in this module, but no response comes back. It seems to be very slow or hung.

https://deno.land/x/[email protected]/tsx/accessible.tsx

The reason that comes to mind is the very large number of files under this directory. there're 2687 files.

https://deno.land/x/[email protected]/tsx?source

update:

Now the response comes back. Apparently complex modules take longer to cache. This does not appear to be a bug, but will be left as an issue.

Http: connection error: broken pipe: broken pipe

deploy logs have this recurring error

Http: connection error: broken pipe: broken pipe
    at async HttpConn.nextRequest (ext:deno_http/01_http.js:114:21)
    at async serve (https://deno.land/x/[email protected]/http_server_native.ts:90:34)

potentially fixed by moving acorn to use Deno.serve

imagemagick_deno wasn't updated with the latests tags

Hello.
The last version of the package https://deno.land/x/imagemagick_deno is 0.0.14 in deno.land/x but in the git repository there are two more recent tags (0.0.15 and 0.0.16 that wasn't updated) https://github.com/lumeland/imagemagick-deno/tags

The webhook is configured correctly, and looking to the recent deliveries, everything looks fine:
imaxe

but these two versions are missing in the deno registry. I've also tried to redelivery a webhook without lucky.

Improve performance by caching module, module_version, module_entry in memory, doc_page

Currently for high traffic items, these items require round trips to the db to lookup and for high traffic volumes, we should have a better mechanism.

Only module is mutable, the rest of the these types are immutable, though module only changes when a new module is published (or the metrics are run), so invalidation would need to be considered.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.