szdl-utils-kit 0.3.31 → 0.3.32

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.
@@ -82,8 +82,13 @@ declare class Batch {
82
82
  errorMessages: Record<string, string>;
83
83
  /** Глобальное состояние лимита выполнения */
84
84
  timeLimit: TTimeLimitState;
85
- /** Лимит команд в одном запросе (по умолчанию 50) */
85
+ /** Лимит команд в одном HTTP-запросе callBatch (по умолчанию 50) */
86
86
  limit: number;
87
+ /**
88
+ * Размер страницы list/`user.get` для пагинации (по умолчанию 50).
89
+ * Не путать с `limit`: уменьшение пакета не должно менять критерий «полной страницы».
90
+ */
91
+ pageSize: number;
87
92
  /** Флаг продолжения выполнения запросов */
88
93
  canContinue: boolean;
89
94
  /** Callback прогресса выполнения batch */
@@ -0,0 +1,16 @@
1
+ export type Bx24Source = "preloaded" | "com" | "tech" | "local";
2
+
3
+ export declare const BX24_REMOTE_SOURCES: ReadonlyArray<{
4
+ readonly name: string;
5
+ readonly url: string;
6
+ }>;
7
+
8
+ export declare const BX24_SOURCE_TIMEOUT_MS: number;
9
+
10
+ export declare class Bx24EnvironmentError extends Error {
11
+ source: string;
12
+ }
13
+
14
+ export declare function loadBx24(options?: {
15
+ timeoutMs?: number;
16
+ }): Promise<{ source: Bx24Source }>;
@@ -6,6 +6,12 @@ import BackgroundWorker, {
6
6
  DEFAULT_BACKGROUND_WORKER_TIMING,
7
7
  resolveBackgroundWorkerTiming,
8
8
  } from "./background-worker";
9
+ import {
10
+ loadBx24,
11
+ BX24_REMOTE_SOURCES,
12
+ BX24_SOURCE_TIMEOUT_MS,
13
+ Bx24EnvironmentError,
14
+ } from "./bx24-loader";
9
15
 
10
16
  declare function tempus():{
11
17
  format();
@@ -24,5 +30,9 @@ export {
24
30
  BackgroundWorker,
25
31
  DEFAULT_BACKGROUND_WORKER_TIMING,
26
32
  resolveBackgroundWorkerTiming,
33
+ loadBx24,
34
+ BX24_REMOTE_SOURCES,
35
+ BX24_SOURCE_TIMEOUT_MS,
36
+ Bx24EnvironmentError,
27
37
  tempus,
28
38
  };
package/package.json CHANGED
@@ -1,45 +1,47 @@
1
- {
2
- "name": "szdl-utils-kit",
3
- "description": "utils-kit library",
4
- "private": false,
5
- "version": "0.3.31",
6
- "type": "module",
7
- "author": "Stanislav Ovv",
8
- "license": "BSD",
9
- "module": "./dist/index.js",
10
- "main": "./dist/index.umd.cjs",
11
- "types": "./dist/types/index.d.ts",
12
- "exports": {
13
- ".": {
14
- "import": "./dist/index.js",
15
- "require": "./dist/index.umd.cjs"
16
- }
17
- },
18
- "files": [
19
- "dist"
20
- ],
21
- "keywords": [
22
- "szdl",
23
- "utils",
24
- "szdl-utils-kit"
25
- ],
26
- "scripts": {
27
- "dev": "vite --host",
28
- "watch": "vite build --watch",
29
- "build": "vite build",
30
- "build:test-html": "vite build --mode test-html",
31
- "preview": "vite preview",
32
- "test": "vitest",
33
- "test:run": "vitest run",
34
- "pub": "npm version patch --no-git-tag-version && npm publish"
35
- },
36
- "devDependencies": {
37
- "vitest": "^2.1.9",
38
- "vite": "^4.4.5",
39
- "vite-plugin-dts": "^3.6.0",
40
- "vite-plugin-static-copy": "^0.17.0"
41
- },
42
- "dependencies": {
43
- "tempusjs": "^0.2.18"
44
- }
45
- }
1
+ {
2
+ "name": "szdl-utils-kit",
3
+ "description": "utils-kit library",
4
+ "private": false,
5
+ "version": "0.3.32",
6
+ "type": "module",
7
+ "author": "Stanislav Ovv",
8
+ "license": "BSD",
9
+ "module": "./dist/index.js",
10
+ "main": "./dist/index.umd.cjs",
11
+ "types": "./dist/types/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.umd.cjs"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "keywords": [
22
+ "szdl",
23
+ "utils",
24
+ "szdl-utils-kit"
25
+ ],
26
+ "scripts": {
27
+ "dev": "vite --host",
28
+ "watch": "vite build --watch",
29
+ "build": "vite build && vite build --mode legacy",
30
+ "build:test-html": "vite build --mode test-html",
31
+ "preview": "vite preview",
32
+ "test": "vitest",
33
+ "test:run": "vitest run",
34
+ "pub": "npm version patch --no-git-tag-version && npm publish",
35
+ "build:legacy": "vite build --mode legacy",
36
+ "update:bx24-local": "node scripts/update-bx24-local.mjs"
37
+ },
38
+ "devDependencies": {
39
+ "vitest": "^2.1.9",
40
+ "vite": "^4.4.5",
41
+ "vite-plugin-dts": "^3.6.0",
42
+ "vite-plugin-static-copy": "^0.17.0"
43
+ },
44
+ "dependencies": {
45
+ "tempusjs": "^0.2.18"
46
+ }
47
+ }