npm install @serverless/utils
serverless / utils Goto Github PK
View Code? Open in Web Editor NEWGeneral serverless utilities
License: MIT License
General serverless utilities
License: MIT License
npm install @serverless/utils
Add general logging utility, as specified in serverless/serverless#8444, to be used across projects.
make-dir
3.1.0
depends on semver
^6.0.0
which has a vulnerability:
The solution is to upgrade make-dir
to 4.0.0
which updates semver
to ^7.5.3
, which doesn't have the vulnerability.
The purpose of this issue is to introduce account-related methods such as logout
, getAccessKeyForOrg
and refreshToken
that will replace corresponding methods from platform-sdk
and will be used by components
and enterprise-plugin
projects.
Related to: serverless/dashboard-plugin#464
Hi,
In one of our project where we use serverless framework, we are not expecting to use analytics feature of the serverless. Still the framework is making calls to endpoint sp-notifications-and-metrics-v1.serverless-platform.com
How can I configure the serverless to prevent calls to this domain?
If config is not parseable we should ignore it and treat it as if there's no user config (it means that config was manipulated) and we don't keep there any data of which loss would be problematic.
If there's such case we should rename original config to .serverlessrc.bak
, create a new one in place and communicate to user with log message what happened
This package depends on archive-type
and decompress
which seem abandoned and they depend on really old versions of file-type
triggering our CI audit checks:
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ file-type vulnerable to Infinite Loop via malformed MKV file │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=16.5.4 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @the-mill/infra-serverless │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ @the-mill/infra-serverless > serverless > @serverless/utils │
│ │ > archive-type > file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081704 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ file-type vulnerable to Infinite Loop via malformed MKV file │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=16.5.4 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @the-mill/infra-serverless │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ @the-mill/infra-serverless > serverless > @serverless/utils │
│ │ > decompress > decompress-tar > file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081704 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ file-type vulnerable to Infinite Loop via malformed MKV file │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=16.5.4 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @the-mill/infra-serverless │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ @the-mill/infra-serverless > serverless > @serverless/utils │
│ │ > decompress > decompress-tarbz2 > file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081704 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ file-type vulnerable to Infinite Loop via malformed MKV file │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=16.5.4 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @the-mill/infra-serverless │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ @the-mill/infra-serverless > serverless > @serverless/utils │
│ │ > decompress > decompress-targz > file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081704 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ file-type vulnerable to Infinite Loop via malformed MKV file │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=16.5.4 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @the-mill/infra-serverless │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ @the-mill/infra-serverless > serverless > @serverless/utils │
│ │ > decompress > decompress-unzip > file-type │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081704 │
└───────────────┴──────────────────────────────────────────────────────────────┘
Allow customizing location of serverless' global config files: ~/.serverlessrc
and ~/.serverless
.
Some people don't like having their home directories full of files that they neither use nor want. It's nice to be able to put them in other places, like ~/.config
, ~/.local/share
, etc. For examples of software that behaves nicely, see Git, GnuPG, htop, Emacs >= 27, Python, Go, ccache, nodejs, jupyter, julia, ruby, mix, asdf, etc.
Either automatically search common places with something like appdirs, or allow environment variables that specify the locations of the serverlessrc and serverless dirs.
Most tools have priority order: environment -> config dir -> home dir
Similar or dependent issues:
Currently in the cloudformationSchema doc, it states the import should be as:
const cloudFormationSchema = require('@serverless/utils/cloudformationSchema');
But it seems to export directly from the file, so it requires a user to do:
const cloudFormationSchema = require("@serverless/utils/cloudformation-schema")
I'm guessing this is unintentional so I'm reporting it as a bug, though it may just need a doc update.
Proposal of implementation/extension of existing config.js
module so it covers all use cases currently supported by platform-sdk. It is a part of initiative: serverless/dashboard-plugin#464
rc
utility. Reasoning: At the moment, in utils
, when resolving config, we're using rc
to read both local
and global
config files and merge them with local
config overwriting global
. This creates a situation where reading config after saving it can produce inconsistent results due to the fact that we're always saving to global
- if saved property also exist in local config, it will be shadowed by that value when reading configuration. (Please correct me if I'm wrong here)getLoggedInUser
util that will retrieve logged in user data - similar to https://github.com/serverless/platform-sdk/blob/master/src/utils/configFile.js#L80components
and enterprise-plugin
.I'd love to get your opinion on this one @medikoo, thanks in advance 🙇
There are no type definitions for TypeScript. It causes errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.