
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
A library for creating a couch app design document. (to be used with CouchN but you could hook it up standalone) The code uses node.js to run any "*_design.js" documents in the project and convert them to "*_design.json" (where * is the name of your design doc) Once the json document has been created you should make it an embedded resource for the project. Then you can have your main project update design documents in couch with a one liner. ** NOTE ** you need to include the CreateDesignDoc.targets into your projects *.proj file. Just open it in nodepad and enter this line near the botton: <Import Project="CreateDesignDocs.targets" /> TheCouch.SetupDatabaseAndDesignDocuments<DesignDocuments>("MyDb", "http://thecouchdb:5987"); This will create a new database "MyDb" if it doesn't exist and then upload the design documents embbed in the assembly which contans the "DesignDocuments" type.
npm install watch
The intention of this module is provide tools that make managing the watching of file & directory trees easier.
The first argument is the directory root you want to watch.
The options object is passed to fs.watchFile but can also be used to provide two additional watchTree specific options:
'ignoreDotFiles'
- When true this option means that when the file tree is walked it will ignore files that being with "."'filter'
- You can use this option to provide a function that returns true or false for each file and directory that is walked to decide whether or not that file/directory is included in the watcher.The callback takes 3 arguments. The first is the file that was modified. The second is the current stat object for that file and the third is the previous stat object.
When a file is new the previous stat object is null.
When watchTree is finished walking the tree and adding all the listeners it passes the file hash (key if the file/directory names and the values are the current stat objects) as the first argument and null as both the previous and current stat object arguments.
watch.watchTree('/home/mikeal', function (f, curr, prev) { if (typeof f == "object" && prev === null && curr === null) { // Finished walking the tree } else if (prev === null) { // f is a new file } else if (curr.nlink === 0) { // f was removed } else { // f was changed } })
This function creates an EventEmitter that gives notifications for different changes that happen to the file and directory tree under the given root argument.
The options object is passed to watch.watchTree.
The callback receives the monitor object.
The monitor object contains a property, files
, which is a hash of files and directories as keys with the current stat object as the value.
The monitor has the following events.
'created'
- New file has been created. Two arguments, the filename and the stat object.'removed'
- A file has been moved or deleted. Two arguments, the filename and the stat object for the fd.'changed'
- A file has been changed. Three arguments, the filename, the current stat object, and the previous stat object.watch.createMonitor('/home/mikeal', function (monitor) { monitor.files['/home/mikeal/.zshrc'] // Stat object for my zshrc. monitor.on("created", function (f, stat) { // Handle file changes }) monitor.on("changed", function (f, curr, prev) { // Handle new files }) monitor.on("removed", function (f, stat) { // Handle removed files }) }
FAQs
A library for creating a couch app design document. (to be used with CouchN but you could hook it up standalone) The code uses node.js to run any "*_design.js" documents in the project and convert them to "*_design.json" (where * is the name of your design doc) Once the json document has been created you should make it an embedded resource for the project. Then you can have your main project update design documents in couch with a one liner. ** NOTE ** you need to include the CreateDesignDoc.targets into your projects *.proj file. Just open it in nodepad and enter this line near the botton: <Import Project="CreateDesignDocs.targets" /> TheCouch.SetupDatabaseAndDesignDocuments<DesignDocuments>("MyDb", "http://thecouchdb:5987"); This will create a new database "MyDb" if it doesn't exist and then upload the design documents embbed in the assembly which contans the "DesignDocuments" type.
We found that couchn.couchapp 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.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.