Files
flipper/flipper-js-client-sdk
dependabot[bot] d77aaf5cad Bump prettier from 2.1.0 to 2.1.2 in /flipper-js-client-sdk (#1539)
Summary:
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.0 to 2.1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/releases">prettier's releases</a>.</em></p>
<blockquote>
<h2>2.1.2</h2>
<p><a href="https://github.com/prettier/prettier/blob/master/CHANGELOG.md#212">{emoji:1f517}Changelog</a></p>
<h2>2.1.1</h2>
<p><a href="https://github.com/prettier/prettier/blob/master/CHANGELOG.md#211">{emoji:1f517}Changelog</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/blob/master/CHANGELOG.md">prettier's changelog</a>.</em></p>
<blockquote>
<h1>2.1.2</h1>
<p><a href="https://github.com/prettier/prettier/compare/2.1.1...2.1.2">diff</a></p>
<h4>Fix formatting for directives in fields (<a href="https://github-redirect.dependabot.com/prettier/prettier/pull/9116">#9116</a> by <a href="https://github.com/sosukesuzuki">sosukesuzuki</a>)</h4>

<pre lang="graphql"><code># Input
type Query {
  someQuery(id: ID!, someOtherData: String!): String! deprecated isAuthenticated
  versions: Versions!
}
<h1>Prettier stable</h1>
<p>type Query {
someQuery(id: ID!, someOtherData: String!): String!
<a href="https://github.com/deprecated">deprecated</a>
<a href="https://github.com/isAuthenticated">isAuthenticated</a>
versions: Versions!
}</p>
<h1>Prettier master</h1>
<p>type Query {
someQuery(id: ID!, someOtherData: String!): String!
<a href="https://github.com/deprecated">deprecated</a>
<a href="https://github.com/isAuthenticated">isAuthenticated</a>
versions: Versions!
}</p>
<p></code></pre></p>
<h4>Fix line breaks for CSS in JS (<a href="https://github-redirect.dependabot.com/prettier/prettier/pull/9136">#9136</a> by <a href="https://github.com/sosukesuzuki">sosukesuzuki</a>)</h4>

<pre lang="js"><code>// Input
styled.div`
  // prettier-ignore
  media (aaaaaaaaaaaaa) {
	z-index: ${(props) =&gt; (props.isComplete ? '1' : '0')};
  }
`;
styled.div`
  ${props =&gt; getSize(props.$size.xs)}
  ${props =&gt; getSize(props.$size.sm, 'sm')}
  ${props =&gt; getSize(props.$size.md, 'md')}
`;
<p>&lt;/tr&gt;&lt;/table&gt; ... (truncated)
</code></pre></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8eb8f9ed2d"><code>8eb8f9e</code></a> Release 2.1.2</li>
<li><a href="f75844a453"><code>f75844a</code></a> Fix changelog</li>
<li><a href="9153bf20ac"><code>9153bf2</code></a> Build(deps): Bump yaml-unist-parser from 1.3.0 to 1.3.1 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9169">#9169</a>)</li>
<li><a href="ec1b419307"><code>ec1b419</code></a> YAML: Fix printing doubles a blank line before a comment (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9143">#9143</a>)</li>
<li><a href="ab9474eacc"><code>ab9474e</code></a> Fix line breaks for CSS in JS (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9136">#9136</a>)</li>
<li><a href="d5da779cb1"><code>d5da779</code></a> GraphQL: Fix formatting for directives in fields (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9116">#9116</a>)</li>
<li><a href="a836319711"><code>a836319</code></a> Bump Prettier dependency to 2.1.1</li>
<li><a href="18bcaefc77"><code>18bcaef</code></a> Release 2.1.1</li>
<li><a href="ebe9e07716"><code>ebe9e07</code></a> Vue: Fix format on self-closing and empty blocks (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9055">#9055</a>)</li>
<li><a href="5a12f52bbe"><code>5a12f52</code></a> Replace changelog versions in ./scripts/draft-blog-post.js (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9058">#9058</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/prettier/prettier/compare/2.1.0...2.1.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettier&package-manager=npm_and_yarn&previous-version=2.1.0&new-version=2.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/1539

Reviewed By: mweststrate

Differential Revision: D23876327

Pulled By: cekkaewnumchai

fbshipit-source-id: 97c82809776213991f742a60050727ecc1b8f3ff
2020-09-24 18:45:01 -07:00
..
2020-09-10 08:18:14 -07:00
2020-06-11 08:45:35 -07:00
2020-06-11 08:45:35 -07:00

flipper-sdk-api

SDK to build Flipper clients for JS based apps

Installation

yarn add flipper-client-sdk

Usage

Example

class SeaMammalPlugin extends AbsctractFlipperPlugin {
  getId(): string {
    return 'sea-mammals';
  }

  runInBackground(): boolean {
    return true;
  }

  newRow(row: {id: string, url: string, title: string}) {
    this.connection?.send("newRow", row)
  }
}

const flipperClient = newWebviewClient();
cosnt plugin = new SeaMammalPlugin();
flipperClient.addPlugin();
flipperClient.start('Example JS App');
plugin.newRow({id: '1', title: 'Dolphin', url: 'example.com'})