@tramvai/tokens-core 1.55.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/lib/action.d.ts +1 -0
- package/lib/bundle.d.ts +20 -0
- package/lib/command.d.ts +1 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.es.js +27 -0
- package/lib/index.js +41 -0
- package/package.json +29 -0
package/README.md
ADDED
package/lib/action.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActionConditionsParameters, ActionParameters, Action, ActionContext, ACTION_PARAMETERS, } from '@tramvai/types-actions-state-context';
|
package/lib/bundle.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Action } from './action';
|
|
2
|
+
export interface BundleOptions {
|
|
3
|
+
presets?: BundlePreset[];
|
|
4
|
+
name: string;
|
|
5
|
+
components: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
reducers?: any[];
|
|
9
|
+
actions?: Action[];
|
|
10
|
+
}
|
|
11
|
+
export declare type BundlePreset = Partial<BundleOptions>;
|
|
12
|
+
export interface Bundle {
|
|
13
|
+
name: string;
|
|
14
|
+
components: BundleOptions['components'];
|
|
15
|
+
actions?: BundleOptions['actions'];
|
|
16
|
+
reducers?: BundleOptions['reducers'];
|
|
17
|
+
}
|
|
18
|
+
export declare type BundleImport = () => Promise<{
|
|
19
|
+
default: Bundle;
|
|
20
|
+
}>;
|
package/lib/command.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Command = () => any;
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Container, Provider } from '@tinkoff/dippy';
|
|
2
|
+
import type { Command } from './command';
|
|
3
|
+
import type { Action } from './action';
|
|
4
|
+
export * from './action';
|
|
5
|
+
export * from './command';
|
|
6
|
+
export * from './bundle';
|
|
7
|
+
export declare const BUNDLE_LIST_TOKEN: any;
|
|
8
|
+
export declare const ACTIONS_LIST_TOKEN: Action<any, any, any>[];
|
|
9
|
+
export declare const MODULES_LIST_TOKEN: any;
|
|
10
|
+
export declare const APP_INFO_TOKEN: {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
appName: string;
|
|
13
|
+
};
|
|
14
|
+
export interface CommandLine {
|
|
15
|
+
lines: CommandLines;
|
|
16
|
+
run(type: keyof CommandLines, status: keyof CommandLineDescription, providers?: Provider[], customDi?: Container): Promise<Container>;
|
|
17
|
+
}
|
|
18
|
+
export declare type CommandLineDescription = Record<string, Command[]>;
|
|
19
|
+
export declare type CommandLines = {
|
|
20
|
+
server: CommandLineDescription;
|
|
21
|
+
client: CommandLineDescription;
|
|
22
|
+
};
|
|
23
|
+
export declare const COMMAND_LINE_RUNNER_TOKEN: CommandLine;
|
|
24
|
+
export declare const COMMAND_LINES_TOKEN: CommandLines;
|
|
25
|
+
export declare const commandLineListTokens: {
|
|
26
|
+
init: Command;
|
|
27
|
+
listen: Command;
|
|
28
|
+
customerStart: Command;
|
|
29
|
+
resolveUserDeps: Command;
|
|
30
|
+
resolvePageDeps: Command;
|
|
31
|
+
generatePage: Command;
|
|
32
|
+
clear: Command;
|
|
33
|
+
spaTransition: Command;
|
|
34
|
+
close: Command;
|
|
35
|
+
};
|
package/lib/index.es.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createToken } from '@tinkoff/dippy';
|
|
2
|
+
export { ACTION_PARAMETERS } from '@tramvai/types-actions-state-context';
|
|
3
|
+
|
|
4
|
+
const BUNDLE_LIST_TOKEN = createToken('bundleList');
|
|
5
|
+
const ACTIONS_LIST_TOKEN = createToken('actionsList');
|
|
6
|
+
const MODULES_LIST_TOKEN = createToken('modulesList');
|
|
7
|
+
const APP_INFO_TOKEN = createToken('appInfo');
|
|
8
|
+
const COMMAND_LINE_RUNNER_TOKEN = createToken('commandLineRunner');
|
|
9
|
+
const COMMAND_LINES_TOKEN = createToken('commandLines');
|
|
10
|
+
const multiOptions = { multi: true };
|
|
11
|
+
const commandLineListTokens = {
|
|
12
|
+
// Block: Initializing
|
|
13
|
+
init: createToken('init', multiOptions),
|
|
14
|
+
listen: createToken('listen', multiOptions),
|
|
15
|
+
// Block: Request handling
|
|
16
|
+
customerStart: createToken('customer_start', multiOptions),
|
|
17
|
+
resolveUserDeps: createToken('resolve_user_deps', multiOptions),
|
|
18
|
+
resolvePageDeps: createToken('resolve_page_deps', multiOptions),
|
|
19
|
+
generatePage: createToken('generate_page', multiOptions),
|
|
20
|
+
clear: createToken('clear', multiOptions),
|
|
21
|
+
// Block: Client navigations
|
|
22
|
+
spaTransition: createToken('spa_transition', multiOptions),
|
|
23
|
+
// Block: Server stop
|
|
24
|
+
close: createToken('close', multiOptions),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { ACTIONS_LIST_TOKEN, APP_INFO_TOKEN, BUNDLE_LIST_TOKEN, COMMAND_LINES_TOKEN, COMMAND_LINE_RUNNER_TOKEN, MODULES_LIST_TOKEN, commandLineListTokens };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var dippy = require('@tinkoff/dippy');
|
|
6
|
+
var typesActionsStateContext = require('@tramvai/types-actions-state-context');
|
|
7
|
+
|
|
8
|
+
const BUNDLE_LIST_TOKEN = dippy.createToken('bundleList');
|
|
9
|
+
const ACTIONS_LIST_TOKEN = dippy.createToken('actionsList');
|
|
10
|
+
const MODULES_LIST_TOKEN = dippy.createToken('modulesList');
|
|
11
|
+
const APP_INFO_TOKEN = dippy.createToken('appInfo');
|
|
12
|
+
const COMMAND_LINE_RUNNER_TOKEN = dippy.createToken('commandLineRunner');
|
|
13
|
+
const COMMAND_LINES_TOKEN = dippy.createToken('commandLines');
|
|
14
|
+
const multiOptions = { multi: true };
|
|
15
|
+
const commandLineListTokens = {
|
|
16
|
+
// Block: Initializing
|
|
17
|
+
init: dippy.createToken('init', multiOptions),
|
|
18
|
+
listen: dippy.createToken('listen', multiOptions),
|
|
19
|
+
// Block: Request handling
|
|
20
|
+
customerStart: dippy.createToken('customer_start', multiOptions),
|
|
21
|
+
resolveUserDeps: dippy.createToken('resolve_user_deps', multiOptions),
|
|
22
|
+
resolvePageDeps: dippy.createToken('resolve_page_deps', multiOptions),
|
|
23
|
+
generatePage: dippy.createToken('generate_page', multiOptions),
|
|
24
|
+
clear: dippy.createToken('clear', multiOptions),
|
|
25
|
+
// Block: Client navigations
|
|
26
|
+
spaTransition: dippy.createToken('spa_transition', multiOptions),
|
|
27
|
+
// Block: Server stop
|
|
28
|
+
close: dippy.createToken('close', multiOptions),
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
Object.defineProperty(exports, 'ACTION_PARAMETERS', {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return typesActionsStateContext.ACTION_PARAMETERS; }
|
|
34
|
+
});
|
|
35
|
+
exports.ACTIONS_LIST_TOKEN = ACTIONS_LIST_TOKEN;
|
|
36
|
+
exports.APP_INFO_TOKEN = APP_INFO_TOKEN;
|
|
37
|
+
exports.BUNDLE_LIST_TOKEN = BUNDLE_LIST_TOKEN;
|
|
38
|
+
exports.COMMAND_LINES_TOKEN = COMMAND_LINES_TOKEN;
|
|
39
|
+
exports.COMMAND_LINE_RUNNER_TOKEN = COMMAND_LINE_RUNNER_TOKEN;
|
|
40
|
+
exports.MODULES_LIST_TOKEN = MODULES_LIST_TOKEN;
|
|
41
|
+
exports.commandLineListTokens = commandLineListTokens;
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tramvai/tokens-core",
|
|
3
|
+
"version": "1.55.2",
|
|
4
|
+
"description": "Tramvai core tokens",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "lib/index.es.js",
|
|
7
|
+
"typings": "lib/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib"
|
|
10
|
+
],
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git@github.com:Tinkoff/tramvai.git"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tramvai-build --for-publish",
|
|
18
|
+
"watch": "tsc -w",
|
|
19
|
+
"build-for-publish": "true"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@tramvai/types-actions-state-context": "1.55.2"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@tinkoff/dippy": "0.7.38",
|
|
26
|
+
"tslib": "^2.0.3"
|
|
27
|
+
},
|
|
28
|
+
"license": "Apache-2.0"
|
|
29
|
+
}
|