@sitecore-content-sdk/search 0.2.0-canary.2 → 0.2.0-canary.22
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/dist/cjs/debug.js +9 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/search-service.js +5 -2
- package/dist/esm/debug.js +6 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/search-service.js +6 -3
- package/package.json +3 -3
- package/types/debug.d.ts +7 -0
- package/types/debug.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/search-service.d.ts.map +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.debug = void 0;
|
|
4
|
+
const core_1 = require("@sitecore-content-sdk/core");
|
|
5
|
+
/**
|
|
6
|
+
* Debugger for the search package
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
exports.debug = (0, core_1.debugModule)(`${core_1.debugNamespace}:search`);
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchService = void 0;
|
|
3
|
+
exports.debug = exports.SearchService = void 0;
|
|
4
4
|
var search_service_1 = require("./search-service");
|
|
5
5
|
Object.defineProperty(exports, "SearchService", { enumerable: true, get: function () { return search_service_1.SearchService; } });
|
|
6
|
+
var debug_1 = require("./debug");
|
|
7
|
+
Object.defineProperty(exports, "debug", { enumerable: true, get: function () { return debug_1.debug; } });
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SearchService = void 0;
|
|
4
4
|
const core_1 = require("@sitecore-content-sdk/core");
|
|
5
|
+
const tools_1 = require("@sitecore-content-sdk/core/tools");
|
|
6
|
+
const debug_1 = require("./debug");
|
|
5
7
|
/**
|
|
6
8
|
* Service that fetches search results from Sitecore.
|
|
7
9
|
* @public
|
|
8
10
|
*/
|
|
9
11
|
class SearchService {
|
|
10
12
|
constructor(config) {
|
|
13
|
+
var _a;
|
|
11
14
|
this.config = config;
|
|
12
|
-
this.config.edgeUrl = this.config.edgeUrl
|
|
15
|
+
this.config.edgeUrl = (_a = this.config.edgeUrl) !== null && _a !== void 0 ? _a : (0, tools_1.resolveEdgeUrl)();
|
|
13
16
|
this.fetcher = new core_1.NativeDataFetcher({
|
|
14
|
-
debugger:
|
|
17
|
+
debugger: debug_1.debug,
|
|
15
18
|
});
|
|
16
19
|
}
|
|
17
20
|
/**
|
package/dist/esm/index.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { NativeDataFetcher
|
|
1
|
+
import { NativeDataFetcher } from '@sitecore-content-sdk/core';
|
|
2
|
+
import { resolveEdgeUrl } from '@sitecore-content-sdk/core/tools';
|
|
3
|
+
import { debug } from './debug';
|
|
2
4
|
/**
|
|
3
5
|
* Service that fetches search results from Sitecore.
|
|
4
6
|
* @public
|
|
5
7
|
*/
|
|
6
8
|
export class SearchService {
|
|
7
9
|
constructor(config) {
|
|
10
|
+
var _a;
|
|
8
11
|
this.config = config;
|
|
9
|
-
this.config.edgeUrl = this.config.edgeUrl
|
|
12
|
+
this.config.edgeUrl = (_a = this.config.edgeUrl) !== null && _a !== void 0 ? _a : resolveEdgeUrl();
|
|
10
13
|
this.fetcher = new NativeDataFetcher({
|
|
11
|
-
debugger: debug
|
|
14
|
+
debugger: debug,
|
|
12
15
|
});
|
|
13
16
|
}
|
|
14
17
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/search",
|
|
3
|
-
"version": "0.2.0-canary.
|
|
3
|
+
"version": "0.2.0-canary.22",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"url": "https://github.com/sitecore/content-sdk/issues"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@sitecore-content-sdk/core": "
|
|
39
|
+
"@sitecore-content-sdk/core": "2.0.0-canary.12"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/chai": "^5.2.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"description": "",
|
|
57
57
|
"types": "types/index.d.ts",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "4a26005860f4931f25d8c63d765a030e04a5b1f4",
|
|
59
59
|
"files": [
|
|
60
60
|
"dist",
|
|
61
61
|
"types",
|
package/types/debug.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,QAAkD,CAAC"}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-service.d.ts","sourceRoot":"","sources":["../src/search-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-service.d.ts","sourceRoot":"","sources":["../src/search-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG9D;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI;IACnE,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAiBD;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACvE;;OAEG;IACH,OAAO,EAAE,CAAC,EAAE,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACzE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAEtF;;;GAGG;AACH,qBAAa,aAAa;IAGZ,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,OAAO,CAAoB;gBAEf,MAAM,EAAE,mBAAmB;IAQ/C;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,EACpD,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC3B,YAAY,CAAC,EAAE,yBAAyB,GACvC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IA+C7B,OAAO,CAAC,kBAAkB;CAyB3B"}
|