open-index/open-npm huggingface dataset:
npm package: @kauza/knex-types
Description: Generates TypeScript definitions (types) from a (PostgreSQL) database schema.
Author: Kriasoft
Latest version: 4.0.1

# Knex.js types generator

[![NPM Version](https://img.shields.io/npm/v/knex-types?style=flat-square)](https://www.npmjs.com/package/knex-types)
[![NPM Downloads](https://img.shields.io/npm/dm/knex-types?style=flat-square)](https://www.npmjs.com/package/knex-types)
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg?style=flat-square)](http://www.typescriptlang.org/)
[![Donate](https://img.shields.io/badge/dynamic/json?color=%23ff424d&label=Patreon&style=flat-square&query=data.attributes.patron_count&suffix=%20patrons&url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F233228)](http://patreon.com/koistya)
[![Discord](https://img.shields.io/discord/643523529131950086?label=Chat&style=flat-square)](https://discord.gg/bSsv7XM)

An utility module for [Knex.js](https://knexjs.org/) that generates TypeScript
definitions (types) from a PostgreSQL database schema.

```
$ npm install knex
$ npm install knex-types --dev
```

## Usage Example

```js
const { knex } = require("knex");
const { updateTypes } = require("knex-types");

const db = knex(require("./knexfile"));

updateTypes(db, { output: "./types.ts" }).catch((err) => {
  console.error(err);
  process.exit(1);
});
```

Find an example of generated types in [`./main.test.ts`](./main.test.ts).

## Publishing

```
npm login # you need access to our kauza npm account
npm version <major|minor|patch>
npm publish
```

## License

Copyright © 2021-present Kriasoft. This source code is licensed under the MIT license found in the
[LICENSE](https://github.com/kriasoft/knex-types/blob/main/LICENSE) file.

---

<sup>Made with ♥ by Konstantin Tarkus ([@koistya](https://twitter.com/koistya), [blog](https://medium.com/@koistya))
and [contributors](https://github.com/kriasoft/knex-types/graphs/contributors).</sup>
npm package: @kauza/react-native-geckoview
Description: GeckoView implementation on android for React Native.
Author: ammarahm-ed
Latest version: 2.0.0

# react-native-geckoview

A fully functional implementation of `GeckoView` on android for react native. The component supports two-way messaging similar to react-native-webview.

## Installation

```
yarn add @ammarahmed/react-native-geckoview
```

## Basic Example

```ts
import GeckoView from "react-native-geckoview";
const App = () => {
  const ref = useRef<GeckoView>(null);

  return (
    <SafeAreaView
      style={{
        backgroundColor: "white",
        flex: 1,
      }}
    >
      <GeckoView
        ref={ref}
        style={{
          flex: 1,
        }}
        source={{ uri: "https://google.com" }}
        onLoadingStart={(e) => {
          console.log(e.nativeEvent.uri);
        }}
        onLoadingFinish={(e) => {
          console.log("success:", e.nativeEvent.success);
        }}
        remoteDebugging={true}
        onMessage={(event) => {
          console.log(event.nativeEvent);
        }}
        injectedJavaScript={
          'window.ReactNativeWebView.postMessage("hello world")'
        }
      />
    </SafeAreaView>
  );
};
```

## API

`GeckoView` implements a simple interface with basic url loading & messaging features.

```ts
interface GeckoViewInterface extends ViewProps {
  source?: { html?: string; uri?: string };
  forceDarkOn?: boolean;
  autoFillEnabled?: boolean;
  remoteDebugging?: boolean;
  userAgent?: string;
  onLoadingStart?: (event: NativeSyntheticEvent<{ uri: string }>) => void;
  onLoadingFinish?: (event: NativeSyntheticEvent<{ success: string }>) => void;
  onLoadingError?: (
    event: NativeSyntheticEvent<{ error: string; uri: string }>
  ) => void;
  onMessage?: (event: NativeSyntheticEvent<any>) => void;
  onLoadingProgress?: (
    event: NativeSyntheticEvent<{ progress: number }>
  ) => void;
  onMessagingDisconnected?: () => void;
  injectedJavaScript?: string;
}
```

## Commands

A small set of commands can also be invoked on `ref` of `GeckoView` for basic messaging & page navigation.

```ts
type WebViewCommands = {
  goBack: () => void;
  goForward: () => void;
  reload: () => void;
  stopLoading: () => void;
  postMessage: (message: string) => void;
  injectJavaScript: (script: string) => void;
  loadUrl: (url: string) => void;
  requestFocus: () => void;
  clearHistory: () => void;
  clearCache: () => void;
  connectMessagingPort: () => void;
};
```

Commands can be invoked on the `GeckoView` ref.

```ts
const ref = useRef<GeckoView>(null);

// In your function
ref.current?.reload();
```

## Messaging

Messaging works through an extension for `GeckoView` which can be found at the root of the project. Copy contents of `extensions/messaging` to your Apps's `android/app/src/main/assets/messaging` folder.

## Thanks to
- [fushixiang](https://github.com/a251115100/geckoview-jsdemo) for GeckoView extension example.
- [sunnylqm](https://github.com/sunnylqm/react-native-geckoview) for basic example of GeckoView.

## MIT License