@_linked/server 2.24.10 → 2.25.0

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,17 @@
1
1
  # @\_linked/server
2
2
 
3
+ ## 2.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#177](https://github.com/linked-fw/server/pull/177) [`781e5d0`](https://github.com/linked-fw/server/commit/781e5d0f41a8fa7a2e0984f9740003968511c759) Thanks [@flyon](https://github.com/flyon)! - GatewayStore: an IDataset that forwards Linked Queries to a gateway. Exported at `@_linked/server/shapes/quadstores/GatewayStore` so an app can select it from `linked.backend.datasets.json`; it posts each query as DSL-JSON with a bearer credential and throws `GatewayUnreachableError` from `init()` when the gateway does not answer.
8
+
9
+ ## 2.24.11
10
+
11
+ ### Patch Changes
12
+
13
+ - [#175](https://github.com/linked-fw/server/pull/175) [`37318c4`](https://github.com/linked-fw/server/commit/37318c468ea9d18a33aa44dd441899e8fb0fbf8b) Thanks [@flyon](https://github.com/flyon)! - In dev, a source workspace's backend is found from `src/` (`src/backend.tsx`, `src/backend.ts`, or its `exports` target mapped from `lib/esm` back to `src`), the way linked's Vite resolver loads it. An unbuilt workspace, whose `exports` name only `lib/esm`, no longer has its `src/backend.ts` silently skipped. Published packages and production are unchanged.
14
+
3
15
  ## 2.24.10
4
16
 
5
17
  ### Patch Changes
@@ -41,7 +41,7 @@ import { getShapeClass, getSuperShapesClasses, } from '@_linked/core/utils/Shape
41
41
  import path from 'path';
42
42
  import { pathToFileURL } from 'node:url';
43
43
  import { isFatalError } from '../utils/fatalError.js';
44
- import { discoverLinkedDependencies, hasModuleEntry, isBundledBySsr, NODE_IMPORT_CONDITIONS, readInstalledPackage, resolveBackendEntry, ssrNoExternalOf, } from '../utils/linkedDependencies.js';
44
+ import { discoverLinkedDependencies, hasModuleEntry, isBundledBySsr, NODE_IMPORT_CONDITIONS, readInstalledPackage, resolveBackendEntry, resolveDevBackendEntry, ssrNoExternalOf, } from '../utils/linkedDependencies.js';
45
45
  /**
46
46
  * `instanceof ShapeProvider`, tolerating a second copy of server-utils.
47
47
  *
@@ -1288,14 +1288,15 @@ let LinkedServer = class LinkedServer extends Shape {
1288
1288
  }
1289
1289
  if (dir && json) {
1290
1290
  if (viteOwnsPackage) {
1291
- // Vite resolves a bundled package with the `development` condition
1292
- // (a workspace's `./backend` may point at src only there). It is
1293
- // still loaded by its bare name, so it is the same module id the
1291
+ // A source package (one with src/) is a workspace to linked's Vite
1292
+ // config, whose resolver maps `<pkg>/backend` to src BEFORE
1293
+ // `exports` (resolveDevBackendEntry mirrors it). Checking only
1294
+ // `exports` missed an unbuilt workspace, whose `exports` name only
1295
+ // lib/esm: its src/backend.ts was never loaded. Otherwise Vite
1296
+ // resolves a bundled package with the `development` condition. It
1297
+ // is still loaded by its bare name, so it is the same module id the
1294
1298
  // rest of the SSR graph imports.
1295
- entry = resolveBackendEntry(dir, json, [
1296
- 'development',
1297
- ...NODE_IMPORT_CONDITIONS,
1298
- ]);
1299
+ entry = resolveDevBackendEntry(dir, json);
1299
1300
  if (entry)
1300
1301
  load = () => vite.ssrLoadModule(`${pkg}/backend`);
1301
1302
  }