@fnndsc/menu 0.3.1

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.
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @file The wire-contract version and its compatibility rule.
3
+ *
4
+ * The contract version is carried by a client in the attach handshake and
5
+ * refused by the daemon on mismatch, with no silent degradation. Per
6
+ * `docs/calypso.adoc`, it tracks the calypso package's major version at
7
+ * release; within a major, changes are additive only (new message types,
8
+ * new optional fields, new model kinds), so a daemon tolerates unknown
9
+ * additions from a newer minor but rejects a different major outright.
10
+ *
11
+ * @module
12
+ */
13
+ /**
14
+ * The wire-contract major version this build speaks.
15
+ */
16
+ export const CONTRACT_VERSION = 1;
17
+ /**
18
+ * Decides whether a client's declared contract version is compatible with
19
+ * this build. Compatibility is exact-major: a client on a different major is
20
+ * refused, because a major bump removes or re-types something.
21
+ *
22
+ * @param clientVersion - The contract major the client declared at attach.
23
+ * @returns True when the client may attach.
24
+ */
25
+ export function version_isCompatible(clientVersion) {
26
+ return clientVersion === CONTRACT_VERSION;
27
+ }
28
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAW,CAAC,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,aAAqB;IACxD,OAAO,aAAa,KAAK,gBAAgB,CAAC;AAC5C,CAAC"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@fnndsc/menu",
3
+ "version": "0.3.1",
4
+ "description": "The mise wire contract: envelope, session protocol, and result-model schemas that surfaces and the kernel both speak",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/FNNDSC/mise.git",
8
+ "directory": "packages/menu"
9
+ },
10
+ "homepage": "https://github.com/FNNDSC/mise/tree/main/packages/menu#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/FNNDSC/mise/issues"
13
+ },
14
+ "main": "dist/index.js",
15
+ "module": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "exports": {
21
+ ".": {
22
+ "import": "./dist/index.js",
23
+ "types": "./dist/index.d.ts"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "scripts": {
28
+ "build": "rm -fr dist && tsc",
29
+ "test": "NODE_OPTIONS='--experimental-vm-modules --disable-warning=ExperimentalWarning' jest --coverage",
30
+ "prepublishOnly": "test -f dist/index.js && test -f dist/index.d.ts"
31
+ },
32
+ "keywords": [
33
+ "chris",
34
+ "mise",
35
+ "wire-contract",
36
+ "schema",
37
+ "fnndsc"
38
+ ],
39
+ "author": "Rudolph Pienaar",
40
+ "license": "MIT",
41
+ "dependencies": {
42
+ "zod": "^3.23.8"
43
+ },
44
+ "devDependencies": {
45
+ "@jest/globals": "^29.7.0",
46
+ "@types/jest": "^29.5.12",
47
+ "jest": "^29.7.0",
48
+ "ts-jest": "^29.2.5",
49
+ "typescript": "^5.0.0"
50
+ },
51
+ "type": "module"
52
+ }