@datapos/datapos-shared 0.3.508 → 0.3.511

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.
@@ -1,15 +1,15 @@
1
- import { DEFAULT_LOCALE_CODE as s } from "./datapos-shared-locale.es.js";
2
- import { l as n, o as i, f as a, b as d, r as b, d as p, s as e, g as o, n as l, h as C, i as g, p as u } from "./componentConfig.schema-C0C6ceb5.js";
3
- import { m as h } from "./moduleConfig.schema-DNq1iU4S.js";
4
- const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
5
- authMethodId: S,
1
+ import { DEFAULT_LOCALE_CODE as p, createLabelMap as C, resolveLabel as g } from "./datapos-shared-locale.es.js";
2
+ import { l as n, o as i, f as t, b as s, r as d, d as u, s as e, g as o, n as l, h, i as S, p as f } from "./componentConfig.schema-C0C6ceb5.js";
3
+ import { m as O } from "./moduleConfig.schema-DNq1iU4S.js";
4
+ const L = n(["apiKey", "disabled", "oAuth2", "none"]), R = i({
5
+ authMethodId: L,
6
6
  activeConnectionCount: o(l()),
7
- canDescribe: o(g()),
7
+ canDescribe: o(S()),
8
8
  id: o(e()),
9
- label: o(C),
9
+ label: o(h),
10
10
  maxConnectionCount: o(l()),
11
- params: o(d(b(e(), e())))
12
- }), O = n(["application", "curatedDataset", "database", "fileStore"]), R = n([
11
+ params: o(s(d(e(), e())))
12
+ }), v = n(["application", "curatedDataset", "database", "fileStore"]), y = n([
13
13
  "abortOperation",
14
14
  "authenticateConnection",
15
15
  "createObject",
@@ -24,34 +24,34 @@ const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
24
24
  "retrieveChunks",
25
25
  "retrieveRecords",
26
26
  "upsertRecords"
27
- ]), y = n(["bidirectional", "destination", "source", "unknown"]), I = i({
27
+ ]), I = n(["bidirectional", "destination", "source", "unknown"]), D = i({
28
28
  id: e(),
29
- label: u
30
- }), U = i({
31
- ...h,
32
- typeId: p("connector"),
33
- category: a(I),
34
- categoryId: O,
35
- implementations: b(e(), f),
36
- operations: d(R),
37
- usageId: y,
38
- vendorAccountURL: a(e()),
39
- vendorDocumentationURL: a(e()),
40
- vendorHomeURL: a(e())
41
- }), v = [
29
+ label: f
30
+ }), F = i({
31
+ ...O,
32
+ typeId: u("connector"),
33
+ category: t(D),
34
+ categoryId: v,
35
+ implementations: d(e(), R),
36
+ operations: s(y),
37
+ usageId: I,
38
+ vendorAccountURL: t(e()),
39
+ vendorDocumentationURL: t(e()),
40
+ vendorHomeURL: t(e())
41
+ }), A = [
42
42
  { id: "application", label: { "en-gb": "Application" } },
43
43
  { id: "curatedDataset", label: { "en-gb": "Curated Dataset" } },
44
44
  { id: "database", label: { "en-gb": "Database" } },
45
45
  { id: "fileStore", label: { "en-gb": "File Store" } }
46
- ], j = (c, m = s) => {
47
- const t = v.find((r) => r.id === c);
48
- if (t) {
49
- const r = t.label[m] ?? t.label[s] ?? t.id;
50
- return { id: t.id, label: r };
46
+ ], N = (c, b = p) => {
47
+ const a = A.find((r) => r.id === c);
48
+ if (a) {
49
+ const r = C(a.label), m = g(r, b);
50
+ return { id: a.id, label: m ?? a.id };
51
51
  }
52
52
  return { id: c, label: c };
53
53
  };
54
54
  export {
55
- U as connectorConfigSchema,
56
- j as constructConnectorCategoryConfig
55
+ F as connectorConfigSchema,
56
+ N as constructConnectorCategoryConfig
57
57
  };
@@ -19,7 +19,6 @@ interface EngineWorkerInterface {
19
19
  initialise: (options: EngineWorkerInitialiseOptions) => Promise<void>;
20
20
  processConnectorRequest: (id: string, connectionConfig: ConnectionConfig, options: ConnectorOperationOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
21
21
  processContextRequest: (id: string, contextConfig: ContextConfig, options: ContextOperationOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
22
- processTestRequest: (settings: TestSettings) => Promise<Record<string, unknown>>;
23
22
  }
24
23
  /** Engine worker initialise options. */
25
24
  interface EngineWorkerInitialiseOptions {
@@ -43,7 +42,7 @@ interface EngineCallbackData {
43
42
  * Engine utilities.
44
43
  */
45
44
  interface EngineUtilities {
46
- inferValues: (parsingRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[]) => InferenceRecord;
45
+ inferValues: (parsingRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[], leadingRecord: boolean) => InferenceRecord;
47
46
  inferDataTypes: (parsedRecords: ParsingRecord[]) => InferenceSummary;
48
47
  }
49
48
  /**
@@ -58,11 +57,4 @@ interface AuditObjectContentOptions extends ConnectorOperationOptions {
58
57
  interface AuditObjectContentResult {
59
58
  contentAuditConfig: ContentAuditConfig;
60
59
  }
61
- interface TestSettings {
62
- action?: string;
63
- delimiter?: string;
64
- forceFallback?: boolean;
65
- hasHeaders?: boolean;
66
- readable: ReadableStream<Uint8Array>;
67
- }
68
- export type { AuditObjectContentOptions, AuditObjectContentResult, EngineCallbackData, EngineConfig, EngineRuntimeInterface, EngineUtilities, EngineWorkerInitialiseOptions, EngineWorkerInterface, TestSettings };
60
+ export type { AuditObjectContentOptions, AuditObjectContentResult, EngineCallbackData, EngineConfig, EngineRuntimeInterface, EngineUtilities, EngineWorkerInitialiseOptions, EngineWorkerInterface };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.508",
3
+ "version": "0.3.511",
4
4
  "description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",
@@ -65,25 +65,25 @@
65
65
  "prettier": "@datapos/datapos-development/prettierrc",
66
66
  "devDependencies": {
67
67
  "@datapos/datapos-development": "^0.3.438",
68
- "@datapos/eslint-config-datapos": "^1.0.35",
69
- "@types/node": "^25.0.3",
70
- "@typescript-eslint/eslint-plugin": "^8.51.0",
71
- "@typescript-eslint/parser": "^8.51.0",
68
+ "@datapos/eslint-config-datapos": "^1.0.40",
69
+ "@types/node": "^25.0.5",
70
+ "@typescript-eslint/eslint-plugin": "^8.52.0",
71
+ "@typescript-eslint/parser": "^8.52.0",
72
72
  "eslint": "^9.39.2",
73
73
  "eslint-import-resolver-typescript": "^4.4.4",
74
74
  "eslint-plugin-import": "^2.32.0",
75
75
  "eslint-plugin-security": "^3.0.1",
76
76
  "eslint-plugin-sonarjs": "^3.0.5",
77
77
  "eslint-plugin-unicorn": "^62.0.0",
78
- "file-type": "^21.2.0",
78
+ "file-type": "^21.3.0",
79
79
  "jiti": "^2.6.1",
80
80
  "license-downloader": "^1.3.3",
81
81
  "license-report": "^6.8.1",
82
82
  "license-report-check": "^0.1.2",
83
83
  "license-report-recursive": "^6.8.2",
84
84
  "md-to-pdf": "^5.2.5",
85
- "npm-check-updates": "^19.2.0",
86
- "owasp-dependency-check": "^1.0.0",
85
+ "npm-check-updates": "^19.3.1",
86
+ "owasp-dependency-check": "^1.0.1",
87
87
  "prettier": "^3.7.4",
88
88
  "rollup-plugin-visualizer": "^6.0.5",
89
89
  "sonda": "^0.10.1",
@@ -93,8 +93,9 @@
93
93
  "typedoc-material-theme": "^1.4.1",
94
94
  "typescript": "^5.9.3",
95
95
  "valibot": "^1.2.0",
96
- "vite": "^7.3.0",
97
- "vite-plugin-dts": "^4.5.4"
96
+ "vite": "^7.3.1",
97
+ "vite-plugin-dts": "^4.5.4",
98
+ "vitest": "^4.0.16"
98
99
  },
99
100
  "scripts": {
100
101
  "audit": "op run --env-file=.env -- node -e \"import('@datapos/datapos-development').then(m => m.auditDependencies())\"",