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

@opensea/i18n-upload

Package Overview
Dependencies
Maintainers
10
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opensea/i18n-upload - npm Package Compare versions

Comparing version 0.0.16 to 0.0.20

34

dist/cli.js

@@ -11,6 +11,7 @@ #!/usr/bin/env node

// src/client.ts
import fs from "fs";
// ../smartling-client/src/client.ts
import ky from "ky";
import fs from "fs";
var BASE_URL = "https://api.smartling.com";
var SmartlingClient = class {
var SmartlingClient = class _SmartlingClient {
userSecret;

@@ -22,2 +23,3 @@ userIdentifier;

accessToken = "";
static BASE_URL = "https://api.smartling.com";
constructor({ userSecret, userIdentifier, ref, projectId }) {

@@ -29,3 +31,3 @@ this.userSecret = userSecret;

this.client = ky.create({
prefixUrl: BASE_URL,
prefixUrl: _SmartlingClient.BASE_URL,
hooks: {

@@ -77,2 +79,21 @@ beforeRequest: [

}
getProjectDetails = () => {
return this.client.get(`projects-api/v2/projects/${this.projectId}`).json().then((response) => response.response.data);
};
};
// src/client.ts
var UploadClient = class extends SmartlingClient {
async authenticate() {
const response = await this.client.post("auth-api/v2/authenticate", {
json: { userSecret: this.userSecret, userIdentifier: this.userIdentifier }
});
const {
response: {
data: { accessToken }
}
} = await response.json();
this.accessToken = accessToken;
return accessToken;
}
async createJob(jobName, targetLocaleIds) {

@@ -129,5 +150,2 @@ jobName = this.prefix(jobName);

}
getProjectDetails = () => {
return this.client.get(`projects-api/v2/projects/${this.projectId}`).json().then((response) => response.response.data);
};
async startBatch(batch) {

@@ -158,3 +176,3 @@ return await this.client.post(

}) => {
const client = new SmartlingClient({
const client = new UploadClient({
userSecret,

@@ -161,0 +179,0 @@ userIdentifier,

{
"name": "@opensea/i18n-upload",
"version": "0.0.16",
"version": "0.0.20",
"description": "Package for i18n key upload",

@@ -13,3 +13,3 @@ "license": "MIT",

"scripts": {
"build": "tsup src/cli.ts --format esm",
"build": "tsup",
"lint": "concurrently \"npm run typecheck\" \"npm run prettier:package.json:check\"",

@@ -28,2 +28,3 @@ "prettier:package.json:check": "prettier-package-json --list-different",

"devDependencies": {
"@opensea/smartling-client": "*",
"@types/uuid": "9.0.2",

@@ -30,0 +31,0 @@ "msw": "1.2.5",

# upload
## Install
```sh
npm install --save-dev @opensea/i18n-upload
```
## Running tests

@@ -4,0 +10,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