Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@nrk/ps-octo-publisher
Advanced tools
⚠️ This is an internal tool used by the TV web team @ NRK
The package is public only for ease of use withnpx
in CI
settings so we dont have to providenpx --userconfig <.npmrc>
Simple NodeJS cli tool for:
For the
pack->push->releaseNotes
flow to work the Octopus project needs to be set up with automatic release creation
The tool uses name
from ${process.cwd()}/package.json
for:
The package exposes a bin (waop
) if installed locally or globally.
Typical use case for node apps in the PS.Web
repo, use npx
in npm script
and be explicit about the version (@1.0.x
)
{
"scripts": {
"predeploy": "npm prune --production",
"deploy": "npx @nrk/ps-octo-publisher@1.0.x publish -w <AzureProdAppName>"
}
}
Or, install globally and use exported bin waop
> npm i -g @nrk/ps-octo-publisher
> waop publish
Display help
> npx @nrk/ps-octo-publisher -h
> npx @nrk/ps-octo-publisher notes -h
> npx @nrk/ps-octo-publisher publish -h
Generating release notes (commit history) in current directory.
Name | Alias | Default |
---|---|---|
-u | --url | '' |
-w | --webApp | '' |
-o | --outFile | '' |
-p | --plain | false |
-d | --debug | false |
waop notes
Options -u
and -w
are used for the same purpose, but -w
is inserted into a template https://${w}.azurewebsites.net/ping
and -u
is used as is. The options expect the resulting url to respond with json that satisfies:
interface Ping {
hash?: string; // commit hash
date?: string; // json date
env?: {
DEPLOY_TIME?: string; // json date
};
}
If either of those properties exist they are used to determine which commits are to be included in the release notes so that commies = [<prop>...master]
.
waop notes
- generate notes from last 5 commits in current folderwaop notes -p
- generate notes as plain text (no markdown links)waop notes -o releaseNotes.md
- output to filewaop notes -u https://tv.nrk.no/ping
- provide urlwaop notes -w web-header-prod-we
- provide Azure Web App namePackages app in zip and pushes to Octopus Deploy. On publish success tries to set release notes on the auto-created release.
For release notes to be exact commit diff from what is currently in production, provide the -w
option with the Azure Web App name (e.g. -w tv-web-search-prod-we
)
Name | Alias | Default |
---|---|---|
-g | --globs | ['*.*', 'dist/**', 'static/**', 'scripts/**', 'node_modules/**'] |
-c | --pm2 | true |
-w | --webApp | '' |
-k | --octoKey | '' (by default read from process.env['OCTOPUS_API_KEY'] ) |
-s | --octoServer | 'https://madeploy04/' |
-v | --buildVersion | '' (by default read from process.env['BuildVersion'] ) |
-n | --dryRun | '' |
By default octoKey
and buildVersion
is read from env['OCTOPUS_API_KEY']
and env.BuildVersion
respectively. Passing those variables in does nothing if the environment variables are defined.
waop publish
waop publish -v 0.1.1 -k <api-key>
- publish version 0.1.1waop publish -g dist/**
- publish only content in dist/**
waop publish --pm2 false
- publish and do't add pm2.config.json
waop publish --w tv-web-search-prod-we
- publish and call https://tv-web-search-prod-we.azurewebsites.net/ping to get commit hash / build date to use for release notes.There are many alternatives we could use for the commit history.
Some of the placeholders that can be used in --pretty=format:""
are:
'%h'
: abbreviated commit hash'%an'
: author name'%aN'
: author name (respecting .mailmap)'%ae'
: author email'%aE'
: author email (respecting .mailmap)'%ad'
: author date (format respects --date= option)'%aD'
: author date, RFC2822 style'%ar'
: author date, relative'%at'
: author date, UNIX timestamp'%ai'
: author date, ISO 8601-like format'%aI'
: author date, strict ISO 8601 format'%cn'
: committer name'%cN'
: committer name (respecting .mailmap, see git-shortlog[1] or git-blame[1])'%ce'
: committer email'%cE'
: committer email (respecting .mailmap, see git-shortlog[1] or git-blame[1])'%cd'
: committer date (format respects --date= option)'%cD'
: committer date, RFC2822 style'%cr'
: committer date, relative'%ct'
: committer date, UNIX timestamp'%ci'
: committer date, ISO 8601-like format'%cI'
: committer date, strict ISO 8601 format'%d'
: ref names, like the --decorate option of git-log[1]'%D'
: ref names without the " (", ")" wrapping.'%e'
: encoding'%s'
: subject'%f'
: sanitized subject line, suitable for a filename'%b'
: body'%B'
: raw body (unwrapped subject and body)'%N'
: commit notesFAQs
WebApp publisher for Octopus
The npm package @nrk/ps-octo-publisher receives a total of 30 weekly downloads. As such, @nrk/ps-octo-publisher popularity was classified as not popular.
We found that @nrk/ps-octo-publisher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 146 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.