
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Art by KyasarinHagaren
mayonaka 🌃 (ma-yo-na-ka) is a flexible folder builder for javascript runtimes. It provides a very minimal yet fluent builder interface on top of the familiar node:fs API with concurrency control
npm install mayonaka
.
├── foo
├── bar
│ └── qux
│ ├── quux
│ ├── readable.txt
│ ├── string.txt
│ └── iterable.txt
└── baz
import { Mayonaka } from "mayonaka";
import { Readable } from "node:stream";
await new Mayonaka(__dirname)
// similar to fs.mkdir
.addFolder("foo")
.addFolder("bar", (bar) => {
bar.addFolder("qux", (qux) => {
qux
.addFolder("quux")
// similar to fs.writeFile but data from an async source
.addFile(
"readable.txt",
async () => Readable.from(["mayonaka"]),
"utf-8"
)
.addFile("string.txt", async () => "mayonaka", "utf-8")
.addFile("iterable.txt", async () => iterable(), "utf-8");
});
})
.addFolder("baz")
.build();
function* iterable() {
const strings = ["m", "a", "y", "o", "n", "a", "k", "a"];
for (const str of strings) {
yield str;
}
}
import { Mayonaka } from "mayonaka";
await new Mayonaka(__dirname, { maxConcurrency: 50 })
.addFolder("foo")
.addFolder("bar", (bar) => {
for (let i = 0; i < 1000; i++) {
bar.addFile(`${i}.txt`, async () => expensive(i), "utf-8");
}
})
.build();
import { MayonakaSync } from "mayonaka";
// global access permissions
new MayonakaSync(__dirname, { dirMode: 0o744, fileMode: 0o766 })
// local access permissions, overriding global permissions
.addFolder("foo", { mode: 0o777 })
.addFolder("bar", (bar) => {
bar.addFile("mayonaka.txt", () => "mayonaka 🌃", "utf-8");
})
.addFile("baz.txt", () => "baz", "utf-8", { mode: 0o777 })
.build();
import { MayonakaCustom } from "mayonaka";
type Folder = { name: string; children: (Folder | File)[] };
type File = number;
const structure = await new MayonakaCustom<Folder, File>(
// initial root or null
{ name: 'root', children: [] },
// custom folder creation function
async (parentFolder, data) => {
const folder = { name: data.name, children: [] };
if (parentFolder) {
parentFolder.children.push(folder);
}
return folder;
},
// Custom file creation function
async (parentFolder, content) => {
if (parentFolder) {
parentFolder.children.push(content);
}
},
)
.addFile(async () => 1)
.addFolder({ name: 'docs' }, docs => {
docs.addFolder({ name: 'images' }, images => {
images.addFile(async () => 2);
});
})
.build();
FAQs
A fluent folder builder for javascript runtimes
The npm package mayonaka receives a total of 2 weekly downloads. As such, mayonaka popularity was classified as not popular.
We found that mayonaka demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.