Giter Site home page Giter Site logo

ember-phoenix's Introduction

Ember-phoenix Build Status Ember Observer Score npm version

Greenkeeper badge

Installation

ember install ember-phoenix

Low-Level Use

You can import phoenix framework client-side utilities as an ES6 module

import { Socket } from 'ember-phoenix';

let socket = new Socket('/socket', {
  logger: ((kind, msg, data) => {
    console.log(`${kind}: ${msg}`, data);
  })
});

Recommended Use

Build a service around a socket (you will usually have only one, since phoenix multiplexes for you)

import PhoenixSocket from 'ember-phoenix/services/phoenix-socket';

export default PhoenixSocket.extend({

  init() {
    // You may listen to open, "close" and "error"
    this.on('open', () => {
      console.log('Socket was opened!');
    })
  },

  connect(/*url, options*/) {
    const myjwt = "abacnwih12eh12...";
    // connect the socket
    this._super("wss://myhost.com/socket/mysocket", {
      params: {token: myjwt}
    });

    // join a channel
    const channel = this.joinChannel("room:123", {
      nickname: "Mike"
    });

    // add message handlers
    channel.on("notification", () => _onNotification(...arguments));
  },

  _onNotification(message) {
    alert(`Notification: ${message}`);
  }
});

Contributing

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Copyright

(c) 2016 Levanto Financial

ember-phoenix's People

Contributors

arnodirlam avatar bcardarella avatar deepflame avatar ember-tomster avatar greenkeeper[bot] avatar greenkeeperio-bot avatar mike-north avatar pavlos avatar renovate-bot avatar renovate[bot] avatar rrunyon avatar rxbsxn avatar tricknotes avatar zeppelin 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  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

ember-phoenix's Issues

Dependency deprecation warning: ember-ajax (npm)

On registry https://registry.npmjs.org/, the "latest" version (v4.0.0) of dependency ember-ajax has the following deprecation notice:

Please see the release notes for information on this release -> https://github.com/ember-cli/ember-ajax/releases/tag/v4.0.0

Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.

Please take the actions necessary to rename or substitute this deprecated package and commit to your base branch. If you wish to ignore this deprecation warning and continue using ember-ajax as-is, please add it to your ignoreDeps array in Renovate config before closing this issue, otherwise another issue will be recreated the next time Renovate runs.

Affected package file(s): package.json

Would you like to disable Renovate's deprecation warning issues? Add the following to your config:

"suppressNotifications": ["deprecationWarningIssues"]

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Make the "receive" function available to caller

Hello,
I just started playing with phoenix's channels and found a small issue with this library.
I try to get information from the reply of the "join" call. According to the doc, this could be done using the receive function :

channel.join()
  .receive("ok", resp => { console.log("Joined successfully", resp) })

But when I try to use ember-phoenix :

const channel = this.joinChannel("room:123", {
  nickname: "Mike"
  })
  .receive("ok", resp => { console.log("Joined successfully", resp) });

this throws a "receive function is not defined"
So I had to make ember-phoenix return the channel.join() object instead of the channel object, and it works. But now, to access the channel object itself, I have to do this :

    const channel = this.joinChannel("room:123", {
      nickname: "Mike"
    });
    // add message handlers
    channel.channel.on("notification", () => _onNotification(...arguments));

Is there a more "elegant" way to address this issue ?
Thanks !

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two-Factor Authentication, make configure the auth-only level is supported. semantic-release cannot publish with the default auth-and-writes level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

websocket mock server

First, thanks for the great addon!

I was wondering whether you'd consider adding a socket mock-server to this addon, maybe via mock-socket or something similar to it? It would be a great complement and allow for a full front-end development cycle without the need to pass things to a backend API.

Thanks

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @types/ember to v3.16.14
  • chore(deps): update dependency ember-cli-fastboot to v4
  • chore(deps): update dependency ember-maybe-import-regenerator to v1
  • chore(deps): update dependency ember-qunit to v8
  • chore(deps): update dependency ember-resolver to v11
  • chore(deps): update dependency ember-source to v5
  • chore(deps): update dependency ember-try to v3
  • chore(deps): update dependency eslint-plugin-ember to v12
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency qunit-dom to v3
  • chore(deps): update dependency semantic-release to v23
  • fix(deps): update dependency ember-cli-babel to v8
  • 🔐 Create all rate-limited PRs at once 🔐

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • broccoli-funnel ^2.0.1
  • broccoli-merge-trees ^3.0.1
  • ember-cli-babel 6.18.0
  • phoenix ^1.2.1
  • @ember/optional-features 0.7.0
  • @types/ember 3.16.9
  • broccoli-asset-rev 3.0.0
  • ember-ajax 5.1.2
  • ember-cli 3.28.6
  • ember-cli-dependency-checker 3.3.2
  • ember-cli-eslint 5.1.0
  • ember-cli-fastboot 2.2.3
  • ember-cli-htmlbars 3.1.0
  • ember-cli-htmlbars-inline-precompile 2.1.0
  • ember-cli-inject-live-reload 2.1.0
  • ember-cli-release 1.0.0-beta.2
  • ember-cli-sri 2.1.1
  • ember-cli-template-lint 1.0.0
  • ember-cli-uglify 3.0.0
  • ember-disable-prototype-extensions 1.1.3
  • ember-export-application-global 2.0.1
  • ember-load-initializers 2.1.2
  • ember-maybe-import-regenerator 0.1.6
  • ember-new-modules-shim 0.5.0
  • ember-qunit 4.6.0
  • ember-resolver 5.3.0
  • ember-source 3.28.12
  • ember-source-channel-url 2.0.1
  • ember-try 1.4.0
  • eslint-plugin-ember 6.10.1
  • eslint-plugin-node 9.2.0
  • husky 1.3.1
  • loader.js 4.7.0
  • qunit-dom 0.9.2
  • semantic-release 15.14.0
  • node 6.* || 8.* || >= 10.*
travis
.travis.yml
  • node 8

  • Check this box to trigger a request for Renovate to run again on this repository

Fix breaking changes in FastBoot 1.0

The current ember-cli-fastboot releases (1.0.0-rc.1 and above) introduce breaking changes. These will most likely break your current FastBoot implementation.

See ember-fastboot/ember-cli-fastboot#387 for more information and a guide on how to fix your addon. Also you may want to visit the -fastboot Slack channel to get help from other users.

Note: this issue has been created automatically, by searching for certain patterns in your code. If you think this has been falsely created, feel free to close!

Outdated Ember-Cli-Babel dependency

EDIT: I've realised that the library itself is considerably out of date and this is unlikely to be resolved!

Updating to Ember 3.28 has caused a deprecation warning to display around the use of the Ember Global.

This appears to be because ember-phoenix is using [email protected]. The deprecation warning suggests an update to [email protected].

Full Deprecation text:

WARNING: [DEPRECATION] [DEPRECATION] Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.

See https://deprecations.emberjs.com/v3.x/#toc_ember-global for details.

Usages of the Ember Global may be caused by an outdated ember-cli-babel dependency. The following steps may help:

* Upgrade the following addons to the latest version:
  * ember-phoenix

### Important ###

In order to avoid repeatedly showing the same deprecation messages, no further deprecation messages will be shown for usages of the Ember Global until ember-cli-babel is upgraded to v7.26.6 or above.

To see all instances of this deprecation message, set the `EMBER_GLOBAL_DEPRECATIONS` environment variable to "all", e.g. `EMBER_GLOBAL_DEPRECATIONS=all ember test`.

### Details ###

Prior to v7.26.6, ember-cli-babel sometimes transpiled imports into the equivalent Ember Global API, potentially triggering this deprecation message indirectly, even when you did not observe these deprecated usages in your code.

The following outdated versions are found in your project:

* [email protected], currently used by:
  * [email protected]
    * Depends on [email protected]

Note: Addons marked as "Dormant" does not appear to have any JavaScript files. Therefore, even if they are using an old version ember-cli-babel, they are unlikely to be the culprit of this deprecation and can likely be ignored.

Updating Token

Hello,

Using the example provided in the README, what's the best way to update the token?

Thank you,

Binh

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.