Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
> npm install atma -g
# ...
> atma --help
> atma [action] [arg] [...] -KEY VALUE [...]
> atma [*.json | *.js | *.yml]
# Load Config and process
# .json - JSON
# .yml - yml
# .js - JS Module, that exports tasks(s)
... some more, just run atma -help
To get help from cli for a particular action run $ atma actionName -help
Configuration object consists from any number of actions/tasks you want to run.
Javascript sample
// Single action
module.exports = ActionObject;
// Multiple actions
module.exports = [ActionObject, ActionObject, /*..*/];
// Grouped actions
module.exports = {
groupName: ActionObject, // [ActionObject]
otherGroup: ActionObject, // [ActionObject]
// optional
defaults: ['groupName']
}
/*
* Normally, if you run `atma config.js` then all grouped actions will be started,
* but if `defaults` property is used, then only that groups will be activated.
* Also you can run any group with: 'atma config.js groupName'
*/
{
action: 'NAME',
// ... action configuration
}
If ActionObject is in a group, and that groupname has the name of existed action, then you can ommit 'action' property
module.exports = {
copy: {
// action: 'copy' - is not required
files: {
'filePath': 'destinationPath',
// ...
}
}
}
Application Builder for (IncludeJS)[http://atmajs.com/include]
Features:
Combine javascript into a single file
Combine style into a single file
Combine templates into resulted HTML file
load
s and embed them into the HTML{
"action": "build"
// <String> — HTML input file
"file": "index.dev.html",
// <Boolean> — run MinifyJS and clean-css
"minify": true,
// <Object> - optional — UglifyJS compressor settings. @default {global_defs: {DEBUG: false}}
"uglify": {}
"jshint" : {
"options" : Object // — JSHINT options
"globals" : Object // — global variables. @default {"window": false, "document": false}
"ignore" : Object // — file names to ignore
}
"outputMain": "index.html" // — output name of a built html
"outputSources": "build/" // — directory of combined/copied resources
}
{
action: "project-import"
}
Copy resources, that are used by current project, from referenced directories in .reference/* to .import directory
{
action: "project-reference"
}
Switch back from "project-import" to resource referencing
{
action: "shell",
/* Commands: Array or String */
command: [
"cmd /C copy /B index.html c:/app",
"cmd /C copy /B index.build/ c:/app/index.build",
// ... other commands
]
}
Execuate shell commands
{
action: "custom",
script: "scriptPath.js"
}
Or from CLI
> atma custom scriptPath
Custom script should export process(config, done)
function
// scriptPath.js
include.exports = {
process: function(config, done){
// config is current ActionObject - it can contain additional information
// for a script
// do smth. and call done if ready
done(/* ?error */);
}
}
@IMPORTANT
/*
Any require(module) could also be resolved from global npm directory
Example, you have installed jQuery globally - > npm install jquery -g
and you can use it from the script as if it was installed in a directory, where
scriptPath.js is located.
var jquery = require('jquery');
This is perfect for a cli scripting.
Also you can use IncludeJS API here - as io.File:
var content = new io.File('someTxt').read();
new io.Directory().readFiles('*.txt).files.forEach(function(file){
var txt = file.read() + '...';
new io.File('path').write(txt);
});
*/
{
action: 'server',
port: 5777, // default 5777
open: 'index.dev.html' // auto open file in browser
}
Start integrated server in a current working directory.
To start the server direct from command line, use cli action pattern
atma [action] -KEY VALUE
> atma server -port 5500
{
"action": "reference"
"path": directory path || name of a project from globals.txt
"name": reference name /* optional @default directory name*/
}
> atma reference atmajs
Creates symbolic link in "%current directory%/.reference" folder
Scaffolding
{
action: "gen",
name: "name"
}
> atma gen [name]
Templates:
You can create any other templates - just put all required files to:
%npm-global-directory%/node_modules/atma/template/%YourTemplateName%
> atma atma-clone
# only primary libraries are cloned from github, to clone all:
> atma atma-clone --all
> atma globals
Sample:
projects:
atma:
path: "file:///c:/Development/atma/"
defaultRoutes:
atma_lib: "{atma}/{0}/lib/{1}.js"
atma_ruqq: "{atma}/ruqq/lib/{0}.js"
atma_compo: "{atma}/compos/{0}/lib/{1}.js"
FAQs
Atma.Toolkit
The npm package atma receives a total of 119 weekly downloads. As such, atma popularity was classified as not popular.
We found that atma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.