
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@aitmed/cloudobjectstorage
Advanced tools
> Note: this boilerplate is not intended for react applications. You need to extend this boilerplate with additional configurations if you want this to bundle out to a react library components.
Note: this boilerplate is not intended for react applications. You need to extend this boilerplate with additional configurations if you want this to bundle out to a react library components.
Put all .js or .ts files in src/ directory and make sure they are exported using src/index.ts. There are a couple of ways to export things out to the output bundle depending on how you want devs to use your library.
For example, for a directory like this:
src
createS3Object.tsdeleteS3Object.tsupdateS3Object.tsmakeRequest.tsindex.tsYour index.ts file should look like this:
export { default as createS3Object } from './createS3Object'
export { default as deleteS3Object } from './deleteS3Object'
export { default as updateS3Object } from './updateS3Object'
export { default as makeRequest } from './makeRequest'
When you npm run build, it will generate files into the ./dist directory. This dist directory will be imported in JavaScript applications like this:
import { createS3Object, makeRequest } from 'js-sdk-boilerplate'
function callSomeApi() {
const req = makeRequest()
return createS3Object(...).then(...).catch(...)
}
If you want developers to import it and use it like this:
import aitmedSdk from 'js-sdk-boilerplate'
function callSomeApi() {
const req = aitmedSdk.makeRequest()
return aitmedSdk.createS3Object(...).then(...).catch(...)
}
Then the index.ts file above will not work. You will have to export it differently like this so that it exports a main object:
src/index.ts
import createS3Object from './createS3Object'
import deleteS3Object from './deleteS3Object'
import updateS3Object from './updateS3Object'
import makeRequest from './makeRequest'
// This main object will be exported
export default {
createS3Object,
deleteS3Object,
updateS3Object,
makeRequest,
}
You can also make a main object to be exported out by just directly importing and exporting the target file back out:
src/index.ts
export { default } from './someMethodOrSomething'
src/someMethodOrSomething.ts
function someMethod() {
console.log('hello')
return null
}
export default someMethod
Devs can then use the main object like this in their apps:
import someMethodOrWhatever from '@aitmed/js-sdk-boilerplate'
When you want to publish to NPM, type in npm publish and it will publish the library to NPM.
Since this repo was created using a scope, it should already be private only to NPM users who are members of the aitmed organization on NPM.
The name of this repo is currently @aitmed/js-sdk-boilerplate and that will be the name the devs will import from in their applications, which is probably what you don't want. Try changing the name property in package.json to some name of your choice after the aitmed part like this:
{
"name": "@aitmed/my-custom-sdk",
"version": "1.0.0",
...
}
To make the package free to the public, instead of typing npm publish in the CLI you do this:
npm publish --access public
For including typescript definition files coming from outside the repo, try putting them in src/types and adding that path to typeRoots or types in the tsconfig.json file (not sure if this will work).
| Package | Description |
|---|---|
| dotenv | Loads environment variables from .env for nodejs projects. |
| mocha | Test runner. |
| chai | Test matchers. |
dotenv
.gitignore).env file in this format: MY_ENV_VARIABLE=MY_ENV_VARIABLE_VALUEmocha
chai
FAQs
> Note: this boilerplate is not intended for react applications. You need to extend this boilerplate with additional configurations if you want this to bundle out to a react library components.
We found that @aitmed/cloudobjectstorage demonstrated a not healthy version release cadence and project activity because the last version was released 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 discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.