@owox/connectors 0.35.0 → 0.37.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owox/connectors",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "Connectors and storages for different data sources",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,20 +23,28 @@
23
23
  "lint": "eslint . --config ./eslint.config.js",
24
24
  "lint:fix": "eslint . --fix --config ./eslint.config.js",
25
25
  "lint:md": "markdownlint-cli2 --config ../../.markdownlint-cli2.mjs",
26
+ "docs:tiktok-fields": "node scripts/generate-tiktok-fields-doc.mjs",
27
+ "docs:tiktok-fields:check": "node scripts/generate-tiktok-fields-doc.mjs --check",
26
28
  "lint:md:fix": "markdownlint-cli2 --config ../../.markdownlint-cli2.mjs --fix",
27
29
  "format": "prettier --write \"**/*.{js,mjs,json}\"",
28
30
  "format:check": "prettier --check \"**/*.{js,mjs,json}\"",
29
- "test": "vitest run"
31
+ "test": "vitest run && node --test tests/AbstractConnector.test.js tests/AbstractContext.test.js tests/AbstractSource.test.js tests/AbstractStorage.test.js tests/Events.test.js tests/RunFailureReport.test.js tests/RunnerTestMode.test.js tests/buildBundleOnce.test.js \"tests/declarative/*.test.js\" \"tests/regression/*.test.js\"",
32
+ "test:fixtures": "node --test tests/Fixture.test.js",
33
+ "test:types": "tsc -p tests/types/tsconfig.unit.json && tsc -p tests/types/tsconfig.node10.json && tsc -p tests/types/tsconfig.nodenext.json",
34
+ "fixture": "node scripts/run-fixture.js"
30
35
  },
31
36
  "files": [
32
37
  "dist/**/*.js",
33
- "dist/**/*.cjs"
38
+ "dist/**/*.cjs",
39
+ "types/**/*.d.ts"
34
40
  ],
41
+ "types": "./types/index.d.ts",
35
42
  "bin": {
36
43
  "owox-connector-runner": "./dist/connector-runner.cjs"
37
44
  },
38
45
  "exports": {
39
46
  ".": {
47
+ "types": "./types/index.d.ts",
40
48
  "import": "./dist/index.js",
41
49
  "require": "./dist/index.cjs"
42
50
  },
@@ -62,6 +70,7 @@
62
70
  "fs-extra": "^11",
63
71
  "glob": "^13",
64
72
  "globals": "^16",
73
+ "typescript": "~5.9.0",
65
74
  "vite": "^6.3.5",
66
75
  "vitest": "^4.1.8"
67
76
  }
@@ -0,0 +1,36 @@
1
+ // Hand-authored type declarations for the @owox/connectors package.
2
+ //
3
+ // The package is built with a custom Vite pipeline and ships compiled
4
+ // JavaScript only (no emitted .d.ts). Without a `types` entry, TypeScript
5
+ // consumers (the backend) cannot resolve `@owox/connectors` under classic
6
+ // `moduleResolution: node` — existing imports "worked" only via warm
7
+ // incremental cache, and any NEW importing file failed `nest build` with
8
+ // TS2307. These declarations describe the public runtime surface so the module
9
+ // resolves cleanly on a cold build.
10
+ //
11
+ // Types are intentionally permissive: the engine is plain JavaScript, so this
12
+ // mirrors the (effectively `any`) behaviour consumers already had, without
13
+ // pretending to a richer contract. Richer per-member types can be added
14
+ // incrementally later.
15
+
16
+ /**
17
+ * Engine namespace (`Core.ManifestParser`, `Core.EXECUTION_STATUS`,
18
+ * `Core.ConfigDto`, …). The value side exposes every runtime member via an
19
+ * index signature, so new members need no enumeration here.
20
+ */
21
+ export const Core: { [key: string]: any };
22
+
23
+ /**
24
+ * Type-only side of `Core`, merged with the value above. Only members used in
25
+ * TYPE position need a declaration here (a value index signature cannot supply
26
+ * type-space members). Currently only `Core.CONFIG_ATTRIBUTES` is used as a type.
27
+ */
28
+ export namespace Core {
29
+ type CONFIG_ATTRIBUTES = any;
30
+ }
31
+
32
+ /** List of available (bundled) connector names. */
33
+ export const AvailableConnectors: string[];
34
+
35
+ /** Map of bundled connector classes/factories, keyed by name. */
36
+ export const Connectors: Record<string, any>;