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

@tolgee/cli

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tolgee/cli - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

dist/extractor/extractor.js

2

dist/extractor/machines/react.js

@@ -675,3 +675,3 @@ "use strict";

? ctx.hooks[ctx.hooks.length - 1].namespace
: void 0,
: undefined,
}),

@@ -678,0 +678,0 @@ }),

@@ -45,2 +45,9 @@ "use strict";

},
// Svelte
'entity.other.attribute-name.svelte': {
actions: ['markPropertyAsDynamic', 'storePropertyType'],
},
'punctuation.separator.key-value.svelte': {
target: 'value',
},
},

@@ -73,2 +80,4 @@ },

'punctuation.definition.string.template.begin.ts': 'value_string',
'punctuation.definition.string.begin.svelte': 'value_string',
'punctuation.definition.string.template.begin.svelte': 'value_string',
// Variable

@@ -87,2 +96,11 @@ 'variable.other.readwrite.ts': {

},
// Svelte
'string.unquoted.svelte': {
target: 'idle',
actions: [
'storePropertyValue',
'clearPropertyType',
'unmarkAsStatic',
],
},
// Value end

@@ -119,2 +137,10 @@ 'punctuation.separator.comma.ts': {

},
'punctuation.definition.string.end.svelte': {
target: 'idle',
actions: ['storeEmptyPropertyValue', 'clearPropertyType'],
},
'punctuation.definition.string.template.end.svelte': {
target: 'idle',
actions: ['storeEmptyPropertyValue', 'clearPropertyType'],
},
'*': [

@@ -156,2 +182,15 @@ {

},
// Svelte
'punctuation.section.embedded.begin.svelte': {
target: 'idle',
actions: ['markPropertyAsDynamic', 'clearPropertyType'],
},
'punctuation.definition.string.end.svelte': {
target: 'idle',
actions: 'clearPropertyType',
},
'punctuation.section.embedded.end.svelte': {
target: 'idle',
actions: 'clearPropertyType',
},
},

@@ -188,2 +227,6 @@ },

},
'punctuation.definition.tag.end.svelte': {
target: 'end',
actions: 'markPropertyAsDynamic',
},
},

@@ -193,5 +236,7 @@ }, {

isOpenCurly: (_ctx, evt) => evt.token === '{' &&
!evt.scopes.includes('meta.embedded.expression.tsx'),
!evt.scopes.includes('meta.embedded.expression.tsx') &&
!evt.scopes.includes('meta.embedded.expression.svelte'),
isCloseCurly: (_ctx, evt) => evt.token === '}' &&
!evt.scopes.includes('meta.embedded.expression.tsx'),
!evt.scopes.includes('meta.embedded.expression.tsx') &&
!evt.scopes.includes('meta.embedded.expression.svelte'),
isFinalCloseCurly: (ctx, evt) => evt.token === '}' && ctx.depth === 1,

@@ -198,0 +243,0 @@ isOpenSquare: (_ctx, evt) => evt.token === '[',

@@ -11,2 +11,3 @@ "use strict";

["source.tsx" /* Grammar.TYPESCRIPT_TSX */]: (0, path_1.join)(GRAMMAR_PATH, 'TypeScriptReact.tmLanguage'),
["source.svelte" /* Grammar.SVELTE */]: (0, path_1.join)(GRAMMAR_PATH, 'Svelte.tmLanguage'),
};

@@ -31,3 +32,5 @@ let oniguruma;

const grammar = await (0, promises_1.readFile)(file, 'utf8');
return (0, vscode_textmate_1.parseRawGrammar)(grammar);
return grammar.startsWith('{')
? JSON.parse(grammar)
: (0, vscode_textmate_1.parseRawGrammar)(grammar);
}

@@ -46,2 +49,4 @@ function extnameToGrammar(extname) {

return "source.tsx" /* Grammar.TYPESCRIPT_TSX */;
case '.svelte':
return "source.svelte" /* Grammar.SVELTE */;
}

@@ -48,0 +53,0 @@ }

@@ -69,4 +69,2 @@ "use strict";

exports.dumpWarnings = dumpWarnings;
// TODO: Revisit this function and turn it into an actual GitHub Action Annotation?
// https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#update-a-check-run
function emitGitHubWarning(warning, file, line) {

@@ -73,0 +71,0 @@ if (!process.env.GITHUB_ACTIONS)

@@ -10,4 +10,3 @@ "use strict";

const promises_1 = require("fs/promises");
// TODO: this solution won't handle new integrations and it will need a slight tweaking before adding new ones
const react_1 = __importDefault(require("./presets/react"));
const extractor_1 = __importDefault(require("./extractor"));
const moduleLoader_1 = require("../utils/moduleLoader");

@@ -24,3 +23,3 @@ const deferred_1 = require("../utils/deferred");

? await (0, moduleLoader_1.loadModule)(args.extractor).then((mdl) => mdl.default)
: react_1.default;
: extractor_1.default;
}

@@ -27,0 +26,0 @@ const file = (0, path_1.resolve)(args.file);

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

(0, logger_1.info)(`The API key you specified is tied to project #${projectId}, you tried to perform operations on project #${opts.projectId}.`);
(0, logger_1.info)('Learn more about how API keys in Tolgee work here: https://tolgee.io/docs/platform/api-keys-and-pat-tokens');
(0, logger_1.info)('Learn more about how API keys in Tolgee work here: https://tolgee.io/platform/account_settings/api_keys_and_pat_tokens');
process.exit(1);

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

@@ -6,2 +6,3 @@ "use strict";

let tsService;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function realImport(file) {

@@ -8,0 +9,0 @@ return eval('import(file)');

{
"name": "@tolgee/cli",
"version": "1.0.2",
"version": "1.1.0",
"type": "commonjs",

@@ -13,3 +13,3 @@ "description": "A tool to interact with the Tolgee Platform through CLI",

"test:unit": "jest -c jest.unit.config.ts",
"pretest:e2e": "npm run tolgee:start",
"pretest:e2e": "npm run build && npm run tolgee:start",
"posttest:e2e": "npm run tolgee:stop",

@@ -21,3 +21,3 @@ "test:e2e": "jest -c jest.e2e.config.ts --runInBand",

"tolgee:stop": "docker stop tolgee_cli_e2e",
"lint": "prettier --check ./src ./test ./scripts jest.config.ts jest.*.config.ts",
"lint": "eslint --ext .ts --ext .js --ext .mjs ./src ./test ./scripts jest.config.ts jest.*.config.ts",
"prettier": "prettier --write ./src ./test ./scripts jest.config.ts jest.*.config.ts",

@@ -52,3 +52,9 @@ "run-dev": "ts-node ./src/index.ts",

"@types/yauzl": "^2.10.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"eslint": "^8.39.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.3.1",
"js-yaml": "^4.1.0",
"openapi-typescript": "^6.1.0",

@@ -55,0 +61,0 @@ "prettier": "^2.8.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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