Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
ember-git-data
Advanced tools
Minimal wrapper for git-data.js. For API info, please see git-data.js's docs.
$ ember install ember-git-data
Extend the Ember.Service that comes with this addon, and provide your GitHub access token:
// app/services/github.js
import Ember from 'ember'
import GitHub from 'ember-git-data/services/github'
const {
inject: { service },
computed: { readOnly },
} = Ember
// don't forget to extend!
export default GitHub.extend({
session: service(),
token: readOnly('session.accessToken'),
})
You can now create as many Repo objects as you wish. Often, you will want to return the Repo object as part of an Ember.Route's model hook:
// app/routes/index.js
import Ember from 'ember'
const {
inject: { service },
get,
} = Ember
export default Ember.Route.extend({
github: service(),
async model() {
const g = get(this, 'github')
const repo = g.repo({
owner: 'nucleartide',
repo: 'ember-git-data',
branch: 'master',
})
try {
const packageJson = await repo.readFile('package.json')
return { packageJson, repo }
} catch (err) {
// ...
}
},
actions: {
doStuffWithRepo() {
const { repo } = this.modelFor(this.routeName)
// ...
}
}
})
The Repo object is now cached while a user is visiting the route, and you can perform any actions you wish.
The async/await syntax works with apps that opt in by setting the following in their ember-cli-build.js
:
babel: {
includePolyfill: true
}
Ember Data is great, and git-data.js could have easily been implemented as Ember Data models/adapters/serializers. I wanted to decouple git-data.js from Ember Data though, and make it usable in non-Ember environments.
git-data.js focuses solely on GitHub's Git Data API. ember-data-github seems to have a broader focus.
FAQs
The default blueprint for ember-cli addons.
The npm package ember-git-data receives a total of 0 weekly downloads. As such, ember-git-data popularity was classified as not popular.
We found that ember-git-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.