@datapos/datapos-shared 0.3.38 → 0.3.40

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 CHANGED
@@ -1,27 +1,55 @@
1
- # DataPos Shared Library
1
+ # Data Positioning Shared Library
2
2
 
3
- A TypeScript library containing common declarations and utilities used across DataPos repositories.
3
+ [![npm version](https://img.shields.io/npm/v/@datapos/datapos-shared.svg)](https://www.npmjs.com/package/@datapos/datapos-shared)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
5
+ [![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)](#)
6
+
7
+ A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.
4
8
 
5
9
  ## Installation
6
10
 
11
+ Install as a development (dev) dependency:
12
+
13
+ ```bash
14
+ npm install --save-dev @datapos/datapos-shared
7
15
  ```
8
- npm install -D @datapos/datapos-shared
16
+
17
+ ## Usage
18
+
19
+ Import the library in your TypeScript project:
20
+
21
+ ```ts
22
+ import { type ConnectorConfig, getComponentStatus } from '@datapos/datapos-shared';
23
+
24
+ // Example type usage.
25
+ let connectorConfig: ConnectorConfig;
26
+
27
+ // Example function usage.
28
+ getComponentStatus('alpha');
9
29
  ```
10
30
 
31
+ > ⚠️ This library is intended for TypeScript projects.
32
+
11
33
  ## Repository Management Commands
12
34
 
13
- The following list details the repository management commands implementation by this project. For more details, please refer to the scripts section of the 'package.json' file in this project.
14
-
15
- | Name | Key Code | Notes |
16
- | ------------------ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17
- | audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
18
- | build | alt+ctrl+shift+b | Build the package using Vite build. |
19
- | check | alt+ctrl+shift+c | List the dependencies in the project that are outdated. |
20
- | document | alt+ctrl+shift+d | Identify the licenses of the project's dependencies. |
21
- | format | alt+ctrl+shift+f | NOT implemented. |
22
- | lint | alt+ctrl+shift+l | Check the code for potential errors and enforces coding styles. |
23
- | publishToNPM | alt+ctrl+shift+n | Publishes the package to the [npm](https://www.npmjs.com/) registry. This action will publish the last synchronised version. Use the command line command 'npm publish' when publishing for the first time. |
24
- | release | alt+ctrl+shift+r | Synchronise the local repository with the main GitHub repository and publish the package to the [npm](https://www.npmjs.com/) registry. |
25
- | syncWithGitHub | alt+ctrl+shift+s | Synchronise the local repository with the main GitHub repository. |
26
- | test | alt+ctrl+shift+l | NOT implemented. |
27
- | updateDependencies | alt+ctrl+shift+l | Install the latest version of outdated Data Position package dependencies. |
35
+ The table below lists the repository management commands available in this project.
36
+ For detailed implementation, see the `scripts` section in `package.json`.
37
+
38
+ | Name | Key Code | Notes |
39
+ | ------------------ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
41
+ | build | alt+ctrl+shift+b | Build the package using Vite. |
42
+ | check | alt+ctrl+shift+c | List outdated dependencies. |
43
+ | document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. |
44
+ | format | alt+ctrl+shift+f | NOT implemented. |
45
+ | lint | alt+ctrl+shift+l | Check the code for errors and enforce coding style rules. |
46
+ | publishToNPM | alt+ctrl+shift+n | Publishes the package to the [npm](https://www.npmjs.com/) registry. This action will publish the last synchronised version. For first-time publish, use `npm publish`. |
47
+ | release | alt+ctrl+shift+r | Synchronise local repository with the main GitHub repository and publish to [npm](https://www.npmjs.com/). |
48
+ | syncWithGitHub | alt+ctrl+shift+s | Synchronise local repository with the main GitHub repository. |
49
+ | test | alt+ctrl+shift+l | NOT implemented. |
50
+ | updateDependencies | alt+ctrl+shift+l | Install the latest version of outdated Data Positioning packages. |
51
+ | |
52
+
53
+ ## License
54
+
55
+ [MIT](./LICENSE) © 2026 Data Positioning Pty Ltd
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@datapos/datapos-shared",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.3.38",
5
+ "version": "0.3.40",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"
@@ -17,26 +17,28 @@
17
17
  "types": "./dist/types/src/index.d.ts",
18
18
  "devDependencies": {
19
19
  "@datapos/datapos-development": "^0.3.18",
20
- "@types/node": "^24.5.1",
20
+ "@types/node": "^24.5.2",
21
21
  "@typescript-eslint/eslint-plugin": "^8.44.0",
22
22
  "@typescript-eslint/parser": "^8.44.0",
23
23
  "csv-parse": "^6.1.0",
24
- "eslint": "^9.35.0",
24
+ "eslint": "^9.36.0",
25
25
  "eslint-plugin-import": "^2.32.0",
26
+ "license-report": "^6.8.0",
27
+ "license-report-check": "^0.1.2",
26
28
  "npm-check-updates": "^18.3.0",
27
29
  "prettier": "^3.6.2",
28
30
  "typescript": "^5.9.2",
29
- "vite": "^7.1.5",
31
+ "vite": "^7.1.6",
30
32
  "vite-plugin-dts": "^4.5.4"
31
33
  },
32
34
  "scripts": {
33
35
  "audit": "npm audit",
34
- "build": "npx vite build",
36
+ "build": "vite build",
35
37
  "bumpVersion": "node -e \"require('@datapos/datapos-development').bumpVersion()\"",
36
- "check": "npx npm-check-updates -i && npm outdated",
37
- "document": "npx npm-license-crawler --onlyDirectDependencies --production --relativeLicensePath --json LICENSES.json",
38
+ "check": "npm outdated; npm-check-updates -i",
39
+ "document": "license-report --only=prod,peer > LICENSES.json && license-report-check --source ./LICENSES.json --allowed 'MIT' --allowed 'n/a' --allowed 'Apache-2.0' --output=table",
38
40
  "format": "prettier --write *.ts",
39
- "lint": "npx eslint **/*.ts",
41
+ "lint": "eslint **/*.ts",
40
42
  "publishToNPM": "npm publish --access public",
41
43
  "release": "npm run syncWithGitHub && npm run build && npm run publishToNPM",
42
44
  "syncWithGitHub": "npm run bumpVersion && node -e \"require('@datapos/datapos-development').syncWithGitHub()\"",
File without changes