@alpamayo-solutions/colca-client 0.0.0 → 0.1.9
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 +143 -3
- package/dist/door.d.ts +155 -0
- package/dist/door.d.ts.map +1 -0
- package/dist/door.js +212 -0
- package/dist/door.js.map +1 -0
- package/dist/generated/contracts.d.ts +626 -0
- package/dist/generated/contracts.d.ts.map +1 -0
- package/dist/generated/contracts.js +39 -0
- package/dist/generated/contracts.js.map +1 -0
- package/dist/ids.d.ts +36 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +64 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/live.d.ts +148 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +500 -0
- package/dist/live.js.map +1 -0
- package/dist/stream.d.ts +54 -0
- package/dist/stream.d.ts.map +1 -0
- package/dist/stream.js +85 -0
- package/dist/stream.js.map +1 -0
- package/dist/topics.d.ts +45 -0
- package/dist/topics.d.ts.map +1 -0
- package/dist/topics.js +70 -0
- package/dist/topics.js.map +1 -0
- package/package.json +66 -3
- package/LICENSE.md +0 -105
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAwBH,MAAM,OAAO,MAAM;IAEE;IACR;IACA;IACQ;IAJnB,YACmB,IAAU,EAClB,IAAY,EACZ,MAAc,EACN,UAAyB,EAAE;QAH3B,SAAI,GAAJ,IAAI,CAAM;QAClB,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;QACN,YAAO,GAAP,OAAO,CAAoB;IAC3C,CAAC;IAEJ,mEAAmE;IACnE,KAAK,CAAC,IAAI,CAAC,MAAoB;QAC7B,OAAO,IAAI,C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C"}
|
package/dist/topics.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colca topics: `{root}/v1/_{Contract}/{node}/{path…}`.
|
|
3
|
+
*
|
|
4
|
+
* Level 4 is the publishing node for every class, definitions included — the
|
|
5
|
+
* broker reads the node off that level whatever the contract is, and a topic
|
|
6
|
+
* without it is refused. A client that special-cases definitions builds topics
|
|
7
|
+
* the node will not take.
|
|
8
|
+
*/
|
|
9
|
+
/** The topic version this client speaks. */
|
|
10
|
+
export declare const TOPIC_VERSION = "v1";
|
|
11
|
+
/** The root used when none is given. Deployments override it (`steine`, `alp`). */
|
|
12
|
+
export declare const DEFAULT_ROOT = "colca";
|
|
13
|
+
export interface TopicParts {
|
|
14
|
+
root: string;
|
|
15
|
+
version: string;
|
|
16
|
+
/** With the leading underscore, as it appears on the wire: `_Metric`. */
|
|
17
|
+
contract: string;
|
|
18
|
+
node: string;
|
|
19
|
+
/** Everything below the node, joined with `/`. Empty for a node-level topic. */
|
|
20
|
+
path: string;
|
|
21
|
+
}
|
|
22
|
+
export interface TopicOptions {
|
|
23
|
+
contract: string;
|
|
24
|
+
node: string;
|
|
25
|
+
/** One pre-joined path, or the segments; both render the same. */
|
|
26
|
+
path?: string | readonly (string | number)[];
|
|
27
|
+
root?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Build a topic. Throws on a segment that would change the topic's shape. */
|
|
30
|
+
export declare function topic({ contract, node, path, root }: TopicOptions): string;
|
|
31
|
+
/** The prefix every topic under `root` starts with, wildcards included. */
|
|
32
|
+
export declare function topicPrefix(root?: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Take a topic apart. Returns undefined rather than throwing: a subscriber sees
|
|
35
|
+
* whatever the broker delivers, and an unparseable topic is a routing decision,
|
|
36
|
+
* not an error.
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseTopic(value: string): TopicParts | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Whether a subscription filter covers a topic. `+` is one level, `#` the rest
|
|
41
|
+
* including the level above it (`a/#` covers `a`), and neither reaches into a
|
|
42
|
+
* `$` topic, as MQTT has it.
|
|
43
|
+
*/
|
|
44
|
+
export declare function topicMatches(filter: string, topic: string): boolean;
|
|
45
|
+
//# sourceMappingURL=topics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["../src/topics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4CAA4C;AAC5C,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,mFAAmF;AACnF,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,8EAA8E;AAC9E,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAS,EAAE,IAAmB,EAAE,EAAE,YAAY,GAAG,MAAM,CAS9F;AAED,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAAqB,GAAG,MAAM,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAMhE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAUnE"}
|
package/dist/topics.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colca topics: `{root}/v1/_{Contract}/{node}/{path…}`.
|
|
3
|
+
*
|
|
4
|
+
* Level 4 is the publishing node for every class, definitions included — the
|
|
5
|
+
* broker reads the node off that level whatever the contract is, and a topic
|
|
6
|
+
* without it is refused. A client that special-cases definitions builds topics
|
|
7
|
+
* the node will not take.
|
|
8
|
+
*/
|
|
9
|
+
/** The topic version this client speaks. */
|
|
10
|
+
export const TOPIC_VERSION = "v1";
|
|
11
|
+
/** The root used when none is given. Deployments override it (`steine`, `alp`). */
|
|
12
|
+
export const DEFAULT_ROOT = "colca";
|
|
13
|
+
const SEGMENT = /^[^/+#]+$/;
|
|
14
|
+
/** Build a topic. Throws on a segment that would change the topic's shape. */
|
|
15
|
+
export function topic({ contract, node, path = [], root = DEFAULT_ROOT }) {
|
|
16
|
+
if (!contract.startsWith("_")) {
|
|
17
|
+
throw new Error(`contract must be a class name such as _Metric, got ${JSON.stringify(contract)}`);
|
|
18
|
+
}
|
|
19
|
+
check("root", root);
|
|
20
|
+
check("node", node);
|
|
21
|
+
const segments = (typeof path === "string" ? path.split("/") : path.map(String)).filter((s) => s !== "");
|
|
22
|
+
for (const segment of segments)
|
|
23
|
+
check("path segment", segment);
|
|
24
|
+
return [root, TOPIC_VERSION, contract, node, ...segments].join("/");
|
|
25
|
+
}
|
|
26
|
+
/** The prefix every topic under `root` starts with, wildcards included. */
|
|
27
|
+
export function topicPrefix(root = DEFAULT_ROOT) {
|
|
28
|
+
check("root", root);
|
|
29
|
+
return `${root}/${TOPIC_VERSION}/`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Take a topic apart. Returns undefined rather than throwing: a subscriber sees
|
|
33
|
+
* whatever the broker delivers, and an unparseable topic is a routing decision,
|
|
34
|
+
* not an error.
|
|
35
|
+
*/
|
|
36
|
+
export function parseTopic(value) {
|
|
37
|
+
const parts = value.split("/");
|
|
38
|
+
if (parts.length < 4)
|
|
39
|
+
return undefined;
|
|
40
|
+
const [root, version, contract, node, ...rest] = parts;
|
|
41
|
+
if (version !== TOPIC_VERSION || !contract.startsWith("_"))
|
|
42
|
+
return undefined;
|
|
43
|
+
return { root, version, contract, node, path: rest.join("/") };
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Whether a subscription filter covers a topic. `+` is one level, `#` the rest
|
|
47
|
+
* including the level above it (`a/#` covers `a`), and neither reaches into a
|
|
48
|
+
* `$` topic, as MQTT has it.
|
|
49
|
+
*/
|
|
50
|
+
export function topicMatches(filter, topic) {
|
|
51
|
+
const wanted = filter.split("/");
|
|
52
|
+
const levels = topic.split("/");
|
|
53
|
+
if (topic.startsWith("$") && (wanted[0] === "+" || wanted[0] === "#"))
|
|
54
|
+
return false;
|
|
55
|
+
for (let i = 0; i < wanted.length; i += 1) {
|
|
56
|
+
if (wanted[i] === "#")
|
|
57
|
+
return true;
|
|
58
|
+
if (i >= levels.length)
|
|
59
|
+
return false;
|
|
60
|
+
if (wanted[i] !== "+" && wanted[i] !== levels[i])
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return wanted.length === levels.length;
|
|
64
|
+
}
|
|
65
|
+
function check(what, value) {
|
|
66
|
+
if (!SEGMENT.test(value)) {
|
|
67
|
+
throw new Error(`${what} must be one topic level without + or #, got ${JSON.stringify(value)}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=topics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topics.js","sourceRoot":"","sources":["../src/topics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4CAA4C;AAC5C,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AAoBpC,MAAM,OAAO,GAAG,WAAW,CAAC;AAE5B,8EAA8E;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AC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,gDAAgD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClG,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpamayo-solutions/colca-client",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "Client for a Colca node's door: fetch, ack, publish, kv, self.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"colca",
|
|
7
|
+
"mqtt",
|
|
8
|
+
"uns",
|
|
9
|
+
"unified-namespace",
|
|
10
|
+
"industrial"
|
|
11
|
+
],
|
|
5
12
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
13
|
+
"author": "Alpamayo Solutions",
|
|
14
|
+
"homepage": "https://alpamayo-solutions.github.io/colca/",
|
|
6
15
|
"repository": {
|
|
7
16
|
"type": "git",
|
|
8
17
|
"url": "git+https://github.com/alpamayo-solutions/colca.git",
|
|
9
18
|
"directory": "clients/ts"
|
|
10
19
|
},
|
|
11
|
-
"
|
|
20
|
+
"bugs": "https://github.com/alpamayo-solutions/colca/issues",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./live": {
|
|
28
|
+
"types": "./dist/live.d.ts",
|
|
29
|
+
"default": "./dist/live.js"
|
|
30
|
+
},
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=22.12.0"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc -p tsconfig.build.json",
|
|
43
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
44
|
+
"lint": "eslint . && prettier --check .",
|
|
45
|
+
"format": "prettier --write .",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"package-check": "publint --strict && attw --pack . --profile esm-only",
|
|
48
|
+
"generate:types": "node scripts/generate-types.mjs ../../build/bundle/contracts-bundle.json"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"mqtt": "^5.0.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"mqtt": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@arethetypeswrong/cli": "0.18.5",
|
|
60
|
+
"@eslint/js": "10.0.1",
|
|
61
|
+
"@types/node": "22.20.3",
|
|
62
|
+
"eslint": "10.10.0",
|
|
63
|
+
"mqtt": "5.16.0",
|
|
64
|
+
"prettier": "3.9.7",
|
|
65
|
+
"publint": "0.3.24",
|
|
66
|
+
"typescript": "6.0.3",
|
|
67
|
+
"typescript-eslint": "8.70.0",
|
|
68
|
+
"vite": "8.3.0",
|
|
69
|
+
"vitest": "5.0.1"
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public",
|
|
73
|
+
"provenance": true
|
|
74
|
+
}
|
|
12
75
|
}
|
package/LICENSE.md
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Functional Source License, Version 1.1, ALv2 Future License
|
|
2
|
-
|
|
3
|
-
## Abbreviation
|
|
4
|
-
|
|
5
|
-
FSL-1.1-ALv2
|
|
6
|
-
|
|
7
|
-
## Notice
|
|
8
|
-
|
|
9
|
-
Copyright 2026 Alpamayo Intelligent Quality Solutions GmbH
|
|
10
|
-
|
|
11
|
-
## Terms and Conditions
|
|
12
|
-
|
|
13
|
-
### Licensor ("We")
|
|
14
|
-
|
|
15
|
-
The party offering the Software under these Terms and Conditions.
|
|
16
|
-
|
|
17
|
-
### The Software
|
|
18
|
-
|
|
19
|
-
The "Software" is each version of the software that we make available under
|
|
20
|
-
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
-
Conditions with the Software.
|
|
22
|
-
|
|
23
|
-
### License Grant
|
|
24
|
-
|
|
25
|
-
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
-
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
-
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
-
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
-
|
|
30
|
-
### Permitted Purpose
|
|
31
|
-
|
|
32
|
-
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
-
means making the Software available to others in a commercial product or
|
|
34
|
-
service that:
|
|
35
|
-
|
|
36
|
-
1. substitutes for the Software;
|
|
37
|
-
|
|
38
|
-
2. substitutes for any other product or service we offer using the Software
|
|
39
|
-
that exists as of the date we make the Software available; or
|
|
40
|
-
|
|
41
|
-
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
-
|
|
43
|
-
Permitted Purposes specifically include using the Software:
|
|
44
|
-
|
|
45
|
-
1. for your internal use and access;
|
|
46
|
-
|
|
47
|
-
2. for non-commercial education;
|
|
48
|
-
|
|
49
|
-
3. for non-commercial research; and
|
|
50
|
-
|
|
51
|
-
4. in connection with professional services that you provide to a licensee
|
|
52
|
-
using the Software in accordance with these Terms and Conditions.
|
|
53
|
-
|
|
54
|
-
### Patents
|
|
55
|
-
|
|
56
|
-
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
-
patents, the license grant above includes a license under our patents. If you
|
|
58
|
-
make a claim against any party that the Software infringes or contributes to
|
|
59
|
-
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
-
immediately.
|
|
61
|
-
|
|
62
|
-
### Redistribution
|
|
63
|
-
|
|
64
|
-
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
-
the Software.
|
|
66
|
-
|
|
67
|
-
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
-
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
-
remove any copyright notices provided in or with the Software.
|
|
70
|
-
|
|
71
|
-
### Disclaimer
|
|
72
|
-
|
|
73
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
-
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
-
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
-
|
|
77
|
-
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
-
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
-
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
-
|
|
81
|
-
### Trademarks
|
|
82
|
-
|
|
83
|
-
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
-
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
-
trademarks, trade names, service marks or product names.
|
|
86
|
-
|
|
87
|
-
## Grant of Future License
|
|
88
|
-
|
|
89
|
-
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
-
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
-
the date we make the Software available. On or after that date, you may use the
|
|
92
|
-
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
-
will apply:
|
|
94
|
-
|
|
95
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
-
this file except in compliance with the License.
|
|
97
|
-
|
|
98
|
-
You may obtain a copy of the License at
|
|
99
|
-
|
|
100
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
-
|
|
102
|
-
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
-
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
-
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
-
specific language governing permissions and limitations under the License.
|