Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

i18nexus-cli

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18nexus-cli - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

commands/addNamespace.js

23

bin/index.js

@@ -10,2 +10,3 @@ #!/usr/bin/env node

const importJson = require('../commands/importJson');
const addNamespace = require('../commands/addNamespace');

@@ -197,2 +198,24 @@ // Using Next's env variable loader because

program
.command('add-namespace <namespaceTitle>')
.alias('a-ns')
.description('Add a new namespace to your project')
.requiredOption(
'-k, --api-key <apiKey>',
'The API key for your project',
process.env.I18NEXUS_API_KEY
)
.requiredOption(
'-t, --pat <personalAccessToken>',
'A personal access token generated for your account in i18nexus',
process.env.I18NEXUS_PERSONAL_ACCESS_TOKEN
)
.action((namespaceTitle, options) => {
addNamespace({
title: namespaceTitle,
apiKey: options.apiKey,
pat: options.pat
});
});
program.parse(process.argv);

2

package.json
{
"name": "i18nexus-cli",
"version": "3.0.0",
"version": "3.1.0",
"description": "Command line interface (CLI) for accessing the i18nexus API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -228,1 +228,26 @@ # i18nexus-cli

If any keys already exist in the target namespace, overwrite the values with the imported values.
## Adding new namespaces
`i18nexus add-namespace <namespaceTitle>`
```sh
i18nexus add-namespace common -k <PROJECT_API_KEY> -t <YOUR_PERSONAL_ACCESS_TOKEN>
```
The above snippet will create a new namespace in your i18nexus project with the title `common`.
### Options
| Option | Required? |
| ------------------- | --------- |
| `--api-key` or `-k` | &#10004; |
| `--pat` or `-t` | &#10004; |
### Notes
`--api-key`
Your project API key (Can also be set using environment variable `I18NEXUS_API_KEY`)
`--pat`
A personal access token that you have generated in your i18nexus account (Can also be set using environment variable `I18NEXUS_PERSONAL_ACCESS_TOKEN`)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc