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

@tramvai/tokens-core

Package Overview
Dependencies
Maintainers
0
Versions
572
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tramvai/tokens-core - npm Package Compare versions

Comparing version 5.16.2 to 5.17.0

lib/hooks.d.ts

46

lib/command.d.ts
import type { Container, MultiTokenInterface, Provider } from '@tinkoff/dippy';
import type { AsyncTapableHookInstance } from '@tinkoff/hook-runner';
export type Command = () => any;
export interface CommandLineRunner {
lines: CommandLines;
/**
* Hook for command line run, for example when `customer` line is executed like this:
*
* ```ts
* commandLineRunner.run('server', 'customer');
* ```
*/
runLineHook: AsyncTapableHookInstance<{
env: keyof CommandLines;
line: keyof CommandLineDescription;
di: Container;
key?: string | number;
}, void>;
/**
* Hook for line commands run, for example when `customer` line is executed,
* this hook will be called sequentially for each command from this list:
* - `customerStart`
* - `resolveUserDeps`
* - `resolvePageDeps`
* - `generatePage`
* - `clear`
*/
runCommandHook: AsyncTapableHookInstance<{
env: keyof CommandLines;
line: keyof CommandLineDescription;
di: Container;
command: MultiTokenInterface<Command>;
}, void>;
/**
* Hook for command function run, for example when `customerStart` command is executed,
* and you have a few `commandLineListTokens.customerStart` providers,
* this hook will be called sequentially for each provided function
*/
runCommandFnHook: AsyncTapableHookInstance<{
fn: Command;
line: keyof CommandLineDescription;
command: MultiTokenInterface<Command>;
di: Container;
}, void>;
run(type: keyof CommandLines, status: keyof CommandLineDescription, providers?: Provider[], customDi?: Container, key?: string | number): Promise<Container>;

@@ -98,2 +138,8 @@ resolveDi(type: keyof CommandLines, status: keyof CommandLineDescription, rootDi: Container, providers?: Provider[]): Container;

};
export type CommandLineRunnerPlugin = {
apply(commandLineRunner: CommandLineRunner): void;
};
export declare const COMMAND_LINE_RUNNER_PLUGIN: CommandLineRunnerPlugin & {
__type?: "multi token" | undefined;
};
//# sourceMappingURL=command.d.ts.map

6

lib/command.es.js

@@ -69,3 +69,7 @@ import { createToken, Scope } from '@tinkoff/dippy';

};
const COMMAND_LINE_RUNNER_PLUGIN = createToken('tramvai commandLineRunner plugin', {
multi: true,
scope: Scope.SINGLETON,
});
export { COMMAND_LINES_TOKEN, COMMAND_LINE_RUNNER_TOKEN, commandLineListTokens };
export { COMMAND_LINES_TOKEN, COMMAND_LINE_RUNNER_PLUGIN, COMMAND_LINE_RUNNER_TOKEN, commandLineListTokens };

@@ -73,5 +73,10 @@ 'use strict';

};
const COMMAND_LINE_RUNNER_PLUGIN = dippy.createToken('tramvai commandLineRunner plugin', {
multi: true,
scope: dippy.Scope.SINGLETON,
});
exports.COMMAND_LINES_TOKEN = COMMAND_LINES_TOKEN;
exports.COMMAND_LINE_RUNNER_PLUGIN = COMMAND_LINE_RUNNER_PLUGIN;
exports.COMMAND_LINE_RUNNER_TOKEN = COMMAND_LINE_RUNNER_TOKEN;
exports.commandLineListTokens = commandLineListTokens;

@@ -5,2 +5,3 @@ import type { PageAction } from './action';

export * from './bundle';
export * from './hooks';
export declare const BUNDLE_LIST_TOKEN: any;

@@ -7,0 +8,0 @@ export declare const ACTIONS_LIST_TOKEN: PageAction[] & {

3

lib/index.es.js
import { createToken } from '@tinkoff/dippy';
export { ACTION_PARAMETERS } from '@tramvai/types-actions-state-context';
export { COMMAND_LINES_TOKEN, COMMAND_LINE_RUNNER_TOKEN, commandLineListTokens } from './command.es.js';
export { COMMAND_LINES_TOKEN, COMMAND_LINE_RUNNER_PLUGIN, COMMAND_LINE_RUNNER_TOKEN, commandLineListTokens } from './command.es.js';
export { TAPABLE_HOOK_FACTORY_TOKEN } from './hooks.es.js';

@@ -5,0 +6,0 @@ const BUNDLE_LIST_TOKEN = createToken('bundleList');

@@ -8,2 +8,3 @@ 'use strict';

var command = require('./command.js');
var hooks = require('./hooks.js');

@@ -20,4 +21,6 @@ const BUNDLE_LIST_TOKEN = dippy.createToken('bundleList');

exports.COMMAND_LINES_TOKEN = command.COMMAND_LINES_TOKEN;
exports.COMMAND_LINE_RUNNER_PLUGIN = command.COMMAND_LINE_RUNNER_PLUGIN;
exports.COMMAND_LINE_RUNNER_TOKEN = command.COMMAND_LINE_RUNNER_TOKEN;
exports.commandLineListTokens = command.commandLineListTokens;
exports.TAPABLE_HOOK_FACTORY_TOKEN = hooks.TAPABLE_HOOK_FACTORY_TOKEN;
exports.ACTIONS_LIST_TOKEN = ACTIONS_LIST_TOKEN;

@@ -24,0 +27,0 @@ exports.APP_INFO_TOKEN = APP_INFO_TOKEN;

{
"name": "@tramvai/tokens-core",
"version": "5.16.2",
"version": "5.17.0",
"description": "Tramvai core tokens",

@@ -21,4 +21,7 @@ "main": "lib/index.js",

"dependencies": {
"@tramvai/types-actions-state-context": "5.16.2"
"@tramvai/types-actions-state-context": "5.17.0"
},
"devDependencies": {
"@tinkoff/hook-runner": "0.7.3"
},
"peerDependencies": {

@@ -25,0 +28,0 @@ "@tinkoff/dippy": "0.11.3",

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