
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@ember-data-mirror/adapter
Advanced tools
Provides Legacy JSON:API and REST Implementations of the Adapter Interface for use with @ember-data-mirror/store
Provides REST and JSON:API Implementations of the legacy Adapter Interface
Caution ⚠️ This is LEGACY documentation for a feature that is no longer encouraged to be used. If starting a new app or thinking of implementing a new adapter, consider writing a Handler instead to be used with the RequestManager
This package is currently installed when installing ember-data
.
If installing @ember-data/
packages individually install using your javascript package manager of choice. For instance with pnpm
pnpm add @ember-data-mirror/adapter
Tagged Releases
If using ember-data
no additional setup is necesssary.
Note When using ember-data the below configuration is handled for you automatically.
To use legacy adapters you will need to have installed and configured the LegacyNetworkHandler from @ember-data-mirror/legacy-compat
pnpm add @ember-data-mirror/legacy-compat
import Store, { CacheHandler } from '@ember-data-mirror/store';
import RequestManager from '@ember-data-mirror/request';
import { LegacyNetworkHandler } from '@ember-data-mirror/legacy-compat';
export default class extends Store {
requestManager = new RequestManager()
.use([LegacyNetworkHandler])
.useCache(CacheHandler);
}
To use as either a per-type or application adapter, export one of the
implementations within the adapters/
directory of your app as appropriate.
For instance, to configure an application adapter to use JSON:API
app/adapters/application.ts
export { default } from '@ember-data-mirror/adapter/json-api';
By default adapters are resolved by looking for an adapter with the same name in the adapters folder as the type
given to store.adapterFor(<type>)
, falling back to looking for an adapter named application
.
Overriding Resolution
If you would like to avoid using resolver semantics and your application has only one or a few adapters, you may ovveride the adapterFor
hook on the store.
import Store from '@ember-data-mirror/store';
import Adapter from '@ember-data-mirror/adapter/json-api';
class extends Store {
#adapter = new Adapter();
adapterFor() {
return this.#adapter;
}
}
For the full list of APIs available read the code documentation for @ember-data-mirror/adapter. You may also be interested in learning more about EmberData's Adapter Interface.
FAQs
Provides Legacy JSON:API and REST Implementations of the Adapter Interface for use with @ember-data-mirror/store
The npm package @ember-data-mirror/adapter receives a total of 96 weekly downloads. As such, @ember-data-mirror/adapter popularity was classified as not popular.
We found that @ember-data-mirror/adapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers 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
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.