
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.
@graphitation/embedded-document-artefact-loader
Advanced tools
This is a simple set of webpack/jest loaders that will replace embedded GraphQL documents with an import of an external compiled artefact file. It is meant to remain agnostic of a specific AST form, so it can work with pipelines that use babel, tsc, esbui
This is a simple set of webpack/jest loaders that will replace embedded GraphQL documents with an import of an external compiled artefact file. It is meant to remain agnostic of a specific AST form, so it can work with pipelines that use babel, tsc, esbuild, swc, etc.
It works for @graphitation/apollo-react-relay-duct-tape
and react-relay
.
const webpackConfig = {
module: {
rules: [
{
test: /.+?\.tsx?$/,
exclude: /node_modules/,
use: [
{
loader: "@graphitation/embedded-document-artefact-loader/webpack",
},
],
},
],
},
};
If you are using the artifactDirectory
option in your relay config you will need to direct the loader to the same folder.
const webpackConfig = {
module: {
rules: [
{
test: /.+?\.tsx?$/,
exclude: /node_modules/,
use: [
{
loader: "@graphitation/embedded-document-artefact-loader/webpack",
options: {
artifactDirectory: "path/to/your/artifact/directory",
},
},
],
},
],
},
};
The jest loader wraps ts-jest because there's no built-in way to chain loaders. The host still needs to provide ts-jest on their own.
const jestConfig = {
transform: {
"^.+\\.tsx?$": "@graphitation/embedded-document-artefact-loader/ts-jest",
},
};
If you are using the artifactDirectory
option in your relay config you will need to direct the loader to the same folder.
const jestConfig = {
transform: {
"^.+\\.tsx?$": [
"@graphitation/embedded-document-artefact-loader/ts-jest",
{
artifactDirectory: "path/to/your/artifact/directory",
},
],
},
};
FAQs
This is a simple set of webpack/jest loaders that will replace embedded GraphQL documents with an import of an external compiled artefact file. It is meant to remain agnostic of a specific AST form, so it can work with pipelines that use babel, tsc, esbui
The npm package @graphitation/embedded-document-artefact-loader receives a total of 20 weekly downloads. As such, @graphitation/embedded-document-artefact-loader popularity was classified as not popular.
We found that @graphitation/embedded-document-artefact-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.