
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
@pa-media-group/iptc-ninjs-2-type
Advanced tools
A typescript definition of IPTCs public NinJS 2.0 library.
Typescript type definition of IPTCs NinJS V2.0 standard (https://github.com/iptc/newsinjson).
npm i @pa-media-group/iptc-ninjs-2-type
import { NinjsItem } from '@pa-media-group/iptc-ninjs-2-type';
const typed: NinjsItem = {
"uri": "https://myuri.com/test/1"
};
Included is a validator which can be used to ensure JSON conforms to the IPTC Ninjs 2.0 schema it can be used as follows: -
import { NinjsItem, NinjsValidator } from 'iptc-ninjs-2-type';
const validator: NinjsValidator = new NinjsValidator();
const typed: NinjsItem = {
"uri": "https://myuri.com/test/1"
};
const valid: boolean = validator.validate(typed);
You need node.js installed globally to run the validator and tests. We recommend you manage your Node versions with nvm.
You need node.js installed to run the service. It is recommended that you use nvm for managing the complexity of Node versions. Using nvm, run:
nvm use
This will select the appropriate version of the Node installed on your machine upon the .nvmrc file.
Then to install the dependencies:
npm install
To install the dependencies specified by package-lock.json
:
npm ci
A default typescript style lint (tslint.json) has been included in this build. To ensure that the TS files conform to the lint, run:
npm run lint
Additionally the package.json can be linted by running
npm run lint:package
Commit messages themselves are linted and Husky enforces this an example of an acceptable commit message would be
feat(initial): Define product schema confirming to Ninjs 2.0 standards
Initial commit including validator, linting, testing
[EN-1790](https://alamy.atlassian.net/browse/EN-1790)
In order to set up git hooks for development, please run npm run prepare
after installing the dependencies
Tests are run using the jest framework and include a coverage check as default. They can be executed by running
npm run test
It is recommended for clarity that the ticket reference is included in the commit message body, the format should be as follows:
fix|feat|perf(<short_feature_name>): <ticket> - <description_of_change>
Here is an example of the release type that will be done based on a commit messages.
Commit message | Release type |
---|---|
fix(logging): TICKET-1234 - Additional logging | Patch Release |
feat(publish-endpoint): TICKET-2345 - Addition of the /publish endpoint to the API | |
perf(event-model): TICKET-3456 - Event model update BREAKING CHANGE: The time attribute has been removed. |
FAQs
A typescript definition of IPTCs public NinJS 2.0 library.
We found that @pa-media-group/iptc-ninjs-2-type demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.