@lde/search-api-server 0.8.0 → 0.8.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"schema-module.d.ts","sourceRoot":"","sources":["../src/schema-module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC;iFAC6E;IAC7E,QAAQ,CAAC,aAAa,CAAC,EAAE,yBAAyB,CAAC;IACnD;6EACyE;IACzE,QAAQ,CAAC,aAAa,CAAC,EAAE,4BAA4B,CAAC;CACvD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,CAAC,CAOvB"}
1
+ {"version":3,"file":"schema-module.d.ts","sourceRoot":"","sources":["../src/schema-module.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC;iFAC6E;IAC7E,QAAQ,CAAC,aAAa,CAAC,EAAE,yBAAyB,CAAC;IACnD;6EACyE;IACzE,QAAQ,CAAC,aAAa,CAAC,EAAE,4BAA4B,CAAC;CACvD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,CAAC,CAevB"}
@@ -1,4 +1,4 @@
1
- import { loadSchemaModule as loadDeclarations } from '@lde/search/module';
1
+ import { loadSchemaModule as loadDeclarations, optionalObjectExport, } from '@lde/search/module';
2
2
  /**
3
3
  * Load and validate a mounted schema-declaration module
4
4
  * (`@lde/search/module`’s {@link loadDeclarations | loadSchemaModule} – the
@@ -11,17 +11,7 @@ export async function loadSchemaModule(modulePath) {
11
11
  const { schema, moduleExports } = await loadDeclarations(modulePath);
12
12
  return {
13
13
  searchSchema: schema,
14
- schemaOptions: optionalObject(moduleExports, 'schemaOptions', modulePath),
15
- engineOptions: optionalObject(moduleExports, 'engineOptions', modulePath),
14
+ schemaOptions: optionalObjectExport(moduleExports, 'schemaOptions', modulePath),
15
+ engineOptions: optionalObjectExport(moduleExports, 'engineOptions', modulePath),
16
16
  };
17
17
  }
18
- function optionalObject(moduleExports, name, modulePath) {
19
- const value = moduleExports[name];
20
- if (value === undefined) {
21
- return undefined;
22
- }
23
- if (typeof value !== 'object' || value === null || Array.isArray(value)) {
24
- throw new Error(`Schema module “${modulePath}” export “${name}” must be an object.`);
25
- }
26
- return value;
27
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/search-api-server",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "The served @lde/search API as a bootable process and prebuilt Docker image: loads a mounted schema-declaration module and Typesense connection details from the environment, then serves /graphql (execution, playground, SDL) plus /health over node:http. The composition layer that binds the engine-agnostic @lde/search-api-graphql handler to @lde/search-typesense – for turnkey, non-JS and ops-driven deployments.",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/ldelements/lde.git",
@@ -28,9 +28,9 @@
28
28
  "!**/*.tsbuildinfo"
29
29
  ],
30
30
  "dependencies": {
31
- "@lde/search": "^0.18.0",
32
- "@lde/search-api-graphql": "^0.20.0",
33
- "@lde/search-typesense": "^0.21.0",
31
+ "@lde/search": "^0.18.2",
32
+ "@lde/search-api-graphql": "^0.20.2",
33
+ "@lde/search-typesense": "^0.21.2",
34
34
  "@whatwg-node/server": "^0.11.0",
35
35
  "tslib": "^2.3.0",
36
36
  "typesense": "^3.0.6"