Socket
Socket
Sign inDemoInstall

@talend/i18n-scripts

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@talend/i18n-scripts - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

26

common/xtm.js

@@ -9,3 +9,3 @@ /* eslint-disable no-param-reassign */

const error = require('./error');
const { printRunning, printSuccess } = require('./log');
const { printInfo, printRunning, printSuccess } = require('./log');

@@ -53,9 +53,23 @@ function throwError(missingVar) {

function getProjectsWithStatus(status) {
return fetch(`${xtm.apiUrl}/projects?customerIds=${xtm.customerId}&status=${status}`, {
headers: { Authorization: `XTM-Basic ${xtm.token}` },
})
function getProjectsWithStatus(status, page = 1) {
const url = `${xtm.apiUrl}/projects?customerIds=${xtm.customerId}&status=${status}&pageSize=100&page=${page}`;
printInfo(`fetch ${url}`);
return fetch(url, { headers: { Authorization: `XTM-Basic ${xtm.token}` } })
.then(handleError)
.then(res => res.json())
.then(projects => projects.find(({ name }) => name === projectName))
.then(projects => {
// page is empty, the project hasn't been found with this status
if (!projects.length) {
return;
}
// page has elements, search the project by name
const wantedProject = projects.find(({ name }) => name === projectName);
if (wantedProject) {
return wantedProject;
}
// project is not in this page, we try next page
return getProjectsWithStatus(status, page + 1);
})
.then(project => (data.project = project));

@@ -62,0 +76,0 @@ }

{
"name": "@talend/i18n-scripts",
"description": "Set of scripts to ease i18n workflow",
"version": "0.2.1",
"version": "0.2.2",
"license": "Apache-2.0",

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

@@ -18,16 +18,2 @@ # Talend i18n scripts

# Installation
```shell
yarn global install @talend/i18n-scripts
```
or
```shell
npm install -g @talend/i18n-scripts
```
Now the cli `talend-i18n` is available.
# Actions

@@ -38,6 +24,6 @@

```shell
talend-i18n extract
talend-i18n upload
talend-i18n download
talend-i18n deploy
npx @talend/i18n-scripts extract
npx @talend/i18n-scripts upload
npx @talend/i18n-scripts download
npx @talend/i18n-scripts deploy
```

@@ -44,0 +30,0 @@

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