@_linked/server 2.13.0 → 2.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @\_linked/server
2
2
 
3
+ ## 2.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#87](https://github.com/linked-fw/server/pull/87) [`063464c`](https://github.com/linked-fw/server/commit/063464ccfe9df2ae3498479483b33f12e926c91f) Thanks [@flyon](https://github.com/flyon)! - Ontology terms are no longer individual module exports.
8
+
9
+ `lincd-server.ts` exported all 11 of its terms as module-scope bindings, and
10
+ several of those names are also shape class names in this package —
11
+ `LincdWebApp`, `LincdAPI`, `BackendAPIStore` and others. Two bindings of the
12
+ same name in one bundle scope make the bundler rename one of them:
13
+
14
+ ```js
15
+ Ju = ns("BackendAPIStore"); // the term keeps the binding
16
+ n(nt, "BackendAPIStore2"); // the class is renamed
17
+ ```
18
+
19
+ When the loser is a shape class, `constructor.name` is its IRI and the name
20
+ `Server.call` routes on, so a production client asks the backend for a shape it
21
+ has never heard of and the call answers 501.
22
+
23
+ Terms are now reached only through the `lincdServer` namespace object:
24
+
25
+ ```ts
26
+ import { lincdServer } from "@_linked/server/ontologies/lincd-server";
27
+ lincdServer.LincdWebApp; // instead of a bare `LincdWebApp` import
28
+ ```
29
+
30
+ Nothing imported a term individually, so no call site changes.
31
+
3
32
  ## 2.13.0
4
33
 
5
34
  ### Minor Changes
@@ -22,17 +22,6 @@ export declare var loadData: () => Promise<{
22
22
  }>;
23
23
  export declare var ns: (term: string) => import("@_linked/core/utils/NodeReference").NodeReferenceValue;
24
24
  export declare var _self: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
25
- export declare var LincdServer: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
26
- export declare var BackendFileStore: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
27
- export declare var NodeFileStore: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
28
- export declare var BackendStore: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
29
- export declare var BackendAPIStore: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
30
- export declare var LincdWebApp: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
31
- export declare var ownPackage: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
32
- export declare var maintainsPackage: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
33
- export declare var N3FileStore: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
34
- export declare var LincdAPI: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
35
- export declare var hasAPI: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
36
25
  export declare const lincdServer: {
37
26
  LincdServer: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
38
27
  BackendFileStore: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
@@ -14,17 +14,24 @@ export var loadData = async () => {
14
14
  };
15
15
  export var ns = createNameSpace('http://lincd.org/ont/lincd-server/');
16
16
  export var _self = ns('');
17
- export var LincdServer = ns('LincdServer');
18
- export var BackendFileStore = ns('BackendFileStore');
19
- export var NodeFileStore = ns('NodeFileStore');
20
- export var BackendStore = ns('BackendStore');
21
- export var BackendAPIStore = ns('BackendAPIStore');
22
- export var LincdWebApp = ns('LincdWebApp');
23
- export var ownPackage = ns('ownPackage');
24
- export var maintainsPackage = ns('maintainsPackage');
25
- export var N3FileStore = ns('N3FileStore');
26
- export var LincdAPI = ns('LincdAPI');
27
- export var hasAPI = ns('hasAPI');
17
+ // Terms are properties of the namespace object below, not module-scope
18
+ // exports. Most of these names are also SHAPE CLASS names in this package
19
+ // (BackendAPIStore, LincdWebApp, LincdAPI, ...). Two bindings of the same name
20
+ // in one bundle scope make the bundler rename one of them, and when the loser
21
+ // is the class, `constructor.name` becomes `BackendAPIStore2` -- which is the
22
+ // shape's IRI and the name `Server.call` routes on. The client then asks a
23
+ // backend that has no such shape, and every store round-trip answers 501.
24
+ const LincdServer = ns('LincdServer');
25
+ const BackendFileStore = ns('BackendFileStore');
26
+ const NodeFileStore = ns('NodeFileStore');
27
+ const BackendStore = ns('BackendStore');
28
+ const BackendAPIStore = ns('BackendAPIStore');
29
+ const LincdWebApp = ns('LincdWebApp');
30
+ const ownPackage = ns('ownPackage');
31
+ const maintainsPackage = ns('maintainsPackage');
32
+ const N3FileStore = ns('N3FileStore');
33
+ const LincdAPI = ns('LincdAPI');
34
+ const hasAPI = ns('hasAPI');
28
35
  export const lincdServer = {
29
36
  LincdServer,
30
37
  BackendFileStore,
@@ -1 +1 @@
1
- {"version":3,"file":"lincd-server.js","sourceRoot":"","sources":["../../../src/ontologies/lincd-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,IAAI,QAAQ,GAAG,KAAK,IAAI,EAAE;IAC/B,YAAY;IACZ,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,2BAA2B,EAAE;QACrD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACvB,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC,IAAI,EAAE,GAAG,eAAe,CAAC,oCAAoC,CAAC,CAAC;AAEtE,MAAM,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAE1B,MAAM,CAAC,IAAI,WAAW,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC;AAC3C,MAAM,CAAC,IAAI,gBAAgB,GAAG,EAAE,CAAC,kBAAkB,CAAC,CAAC;AACrD,MAAM,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAC/C,MAAM,CAAC,IAAI,YAAY,GAAG,EAAE,C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
12
  },
13
- "version": "2.13.0",
13
+ "version": "2.13.1",
14
14
  "packageManager": "npm@11.19.1",
15
15
  "linkedPackage": true,
16
16
  "type": "module",