@usereactify/search 5.16.3 → 5.17.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
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [5.17.0](https://bitbucket.org/usereactify/reactify-search-ui/compare/release-v5.16.3...release-v5.17.0) (2022-12-15)
6
+
7
+
8
+ ### Features
9
+
10
+ * remove javascript cache ttl behaviour for config and rely on rs cache option and browser cache-control ([730a9c5](https://bitbucket.org/usereactify/reactify-search-ui/commit/730a9c541e57a7336015c5d93b7b23371cf64bef))
11
+
5
12
  ### [5.16.3](https://bitbucket.org/usereactify/reactify-search-ui/compare/release-v5.16.2...release-v5.16.3) (2022-12-08)
6
13
 
7
14
 
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usereactify/search",
3
3
  "description": "React UI library for Reactify Search",
4
- "version": "5.16.3",
4
+ "version": "5.17.0",
5
5
  "license": "MIT",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",
@@ -15,42 +15,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.useConfig = void 0;
16
16
  const react_1 = __importDefault(require("react"));
17
17
  const utility_1 = require("../utility");
18
- // 5 minute cache expiry
19
- const CACHE_EXPIRY = 5 * 60 * 1000;
20
18
  const useConfig = (shopifyPermanentDomain, configId) => {
21
19
  // synchronously returns cached and non-expired config from session storage
22
20
  const cachedConfig = react_1.default.useMemo(() => {
23
- var _a;
21
+ var _a, _b;
24
22
  if (typeof window === "undefined") {
25
23
  return;
26
24
  }
27
25
  utility_1.debug.log("useConfig", "checking config cache");
28
- // skip checking cache if url search param "nocache" is set
29
- const skipCache = new URLSearchParams(window.location.href.split("?")[1]).get("nocache") !==
30
- null;
31
- if (skipCache) {
32
- utility_1.debug.log("useConfig", "cache is disabled");
33
- return;
34
- }
35
26
  const sessionConfig = JSON.parse((_a = window.sessionStorage.getItem("reactify-search:config")) !== null && _a !== void 0 ? _a : "null");
36
27
  if (sessionConfig) {
37
- const sessionConfigTtl = sessionConfig.expiresAt - Date.now();
38
- if (sessionConfigTtl > 0) {
39
- utility_1.debug.log("useConfig", `config cache valid, expires in ${(sessionConfigTtl / 1000).toFixed()} seconds`);
40
- return sessionConfig.config;
41
- }
42
- else {
43
- utility_1.debug.log("useConfig", `config cache invalid, expired ${((sessionConfigTtl * -1) /
44
- 1000).toFixed()} seconds ago`);
28
+ if (((_b = sessionConfig.config.cache) === null || _b === void 0 ? void 0 : _b.enabled) === false) {
29
+ utility_1.debug.log("useConfig", `cache disabled, ignoring cached config`);
30
+ return;
45
31
  }
32
+ utility_1.debug.log("useConfig", `cache enabled, using cached config`);
33
+ return sessionConfig.config;
34
+ }
35
+ else {
36
+ utility_1.debug.log("useConfig", `cached config missing`);
46
37
  }
47
38
  return;
48
39
  }, []);
49
40
  const [config, setConfig] = react_1.default.useState(cachedConfig);
50
41
  react_1.default.useEffect(() => {
51
- if (config) {
52
- return;
53
- }
54
42
  (() => __awaiter(void 0, void 0, void 0, function* () {
55
43
  utility_1.debug.log("useConfig", "loading fresh config");
56
44
  const searchParams = new URLSearchParams();
@@ -58,16 +46,10 @@ const useConfig = (shopifyPermanentDomain, configId) => {
58
46
  if (configId) {
59
47
  searchParams.set("id", configId);
60
48
  }
61
- const skipCache = new URLSearchParams(window.location.href.split("?")[1]).get("nocache") !== null;
62
- if (skipCache) {
63
- searchParams.set("nocache", "true");
64
- }
65
49
  const json = yield fetch(`https://config.search.reactify.app/?${searchParams.toString()}`).then((response) => response.json());
66
50
  setConfig(json.body);
67
51
  utility_1.debug.log("useConfig", "loaded fresh config");
68
52
  window.sessionStorage.setItem("reactify-search:config", JSON.stringify({
69
- expiresAt: new Date().getTime() + CACHE_EXPIRY,
70
- noCache: skipCache,
71
53
  config: json.body,
72
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AAC,cAAc,CAAC,OAAO,CAC3B,wBAAwB,EACxB,IAAI,CAAC,SAAS,CAAC;gBACb,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,YAAY;gBAC9C,OAAO,EAAE,SAAS;gBAClB,MAAM,EAAE,IAAI,CAAC,IAAI;aAClB,CAAC,CACH,CAAC;QACJ,CAAC,CAAA,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvC,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,eAAK,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO;QACL,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AA1GW,QAAA,SAAS,aA0GpB","sourcesContent":["import React from \"react\";\n\nimport { Config } from \"../types/config\";\nimport { debug } from \"../utility\";\n\n// 5 minute cache expiry\nconst CACHE_EXPIRY = 5 * 60 * 1000;\n\nexport const useConfig = (\n shopifyPermanentDomain: string,\n configId?: string\n): {\n config: Config | undefined;\n} => {\n // synchronously returns cached and non-expired config from session storage\n const cachedConfig = React.useMemo(() => {\n if (typeof window === \"undefined\") {\n return;\n }\n debug.log(\"useConfig\", \"checking config cache\");\n\n // skip checking cache if url search param \"nocache\" is set\n const skipCache =\n new URLSearchParams(window.location.href.split(\"?\")[1]).get(\"nocache\") !==\n null;\n if (skipCache) {\n debug.log(\"useConfig\", \"cache is disabled\");\n\n return;\n }\n\n const sessionConfig: {\n expiresAt: number;\n config: Config;\n } | null = JSON.parse(\n window.sessionStorage.getItem(\"reactify-search:config\") ?? \"null\"\n );\n\n if (sessionConfig) {\n const sessionConfigTtl = sessionConfig.expiresAt - Date.now();\n if (sessionConfigTtl > 0) {\n debug.log(\n \"useConfig\",\n `config cache valid, expires in ${(\n sessionConfigTtl / 1000\n ).toFixed()} seconds`\n );\n\n return sessionConfig.config;\n } else {\n debug.log(\n \"useConfig\",\n `config cache invalid, expired ${(\n (sessionConfigTtl * -1) /\n 1000\n ).toFixed()} seconds ago`\n );\n }\n }\n\n return;\n }, []);\n\n const [config, setConfig] = React.useState<Config | undefined>(cachedConfig);\n\n React.useEffect(() => {\n if (config) {\n return;\n }\n\n (async () => {\n debug.log(\"useConfig\", \"loading fresh config\");\n const searchParams = new URLSearchParams();\n searchParams.set(\"shop\", shopifyPermanentDomain);\n\n if (configId) {\n searchParams.set(\"id\", configId);\n }\n\n const skipCache =\n new URLSearchParams(window.location.href.split(\"?\")[1]).get(\n \"nocache\"\n ) !== null;\n\n if (skipCache) {\n searchParams.set(\"nocache\", \"true\");\n }\n\n const json = await fetch(\n `https://config.search.reactify.app/?${searchParams.toString()}`\n ).then((response) => response.json());\n\n setConfig(json.body);\n\n debug.log(\"useConfig\", \"loaded fresh config\");\n\n window.sessionStorage.setItem(\n \"reactify-search:config\",\n JSON.stringify({\n expiresAt: new Date().getTime() + CACHE_EXPIRY,\n noCache: skipCache,\n config: json.body,\n })\n );\n })();\n }, [shopifyPermanentDomain, configId]);\n\n React.useEffect(() => {\n debug.log(\"useConfig\", \"config\", config);\n }, [config]);\n\n return {\n config,\n };\n};\n"]}
1
+ {"version":3,"file":"useConfig.js","sourceRoot":"","sources":["../../../src/hooks/useConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA0B;AAG1B,wCAAmC;AAE5B,MAAM,SAAS,GAAG,CACvB,sBAA8B,EAC9B,QAAiB,EAGjB,EAAE;IACF,2EAA2E;IAC3E,MAAM,YAAY,GAAG,eAAK,CAAC,OAAO,CAAC,GAAG,EAAE;;QACtC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,OAAO;SACR;QACD,eAAK,CAAC,GAAG,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;QAEhD,MAAM,aAAa,GAER,IAAI,CAAC,KAAK,CACnB,M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AAc,CAAC,OAAO,CAC3B,wBAAwB,EACxB,IAAI,CAAC,SAAS,CAAC;gBACb,MAAM,EAAE,IAAI,CAAC,IAAI;aAClB,CAAC,CACH,CAAC;QACJ,CAAC,CAAA,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvC,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,eAAK,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO;QACL,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,SAAS,aAuEpB","sourcesContent":["import React from \"react\";\n\nimport { Config } from \"../types/config\";\nimport { debug } from \"../utility\";\n\nexport const useConfig = (\n shopifyPermanentDomain: string,\n configId?: string\n): {\n config: Config | undefined;\n} => {\n // synchronously returns cached and non-expired config from session storage\n const cachedConfig = React.useMemo(() => {\n if (typeof window === \"undefined\") {\n return;\n }\n debug.log(\"useConfig\", \"checking config cache\");\n\n const sessionConfig: {\n config: Config;\n } | null = JSON.parse(\n window.sessionStorage.getItem(\"reactify-search:config\") ?? \"null\"\n );\n\n if (sessionConfig) {\n if (sessionConfig.config.cache?.enabled === false) {\n debug.log(\"useConfig\", `cache disabled, ignoring cached config`);\n return;\n }\n\n debug.log(\"useConfig\", `cache enabled, using cached config`);\n\n return sessionConfig.config;\n } else {\n debug.log(\"useConfig\", `cached config missing`);\n }\n\n return;\n }, []);\n\n const [config, setConfig] = React.useState<Config | undefined>(cachedConfig);\n\n React.useEffect(() => {\n (async () => {\n debug.log(\"useConfig\", \"loading fresh config\");\n const searchParams = new URLSearchParams();\n searchParams.set(\"shop\", shopifyPermanentDomain);\n\n if (configId) {\n searchParams.set(\"id\", configId);\n }\n\n const json = await fetch(\n `https://config.search.reactify.app/?${searchParams.toString()}`\n ).then((response) => response.json());\n\n setConfig(json.body);\n\n debug.log(\"useConfig\", \"loaded fresh config\");\n\n window.sessionStorage.setItem(\n \"reactify-search:config\",\n JSON.stringify({\n config: json.body,\n })\n );\n })();\n }, [shopifyPermanentDomain, configId]);\n\n React.useEffect(() => {\n debug.log(\"useConfig\", \"config\", config);\n }, [config]);\n\n return {\n config,\n };\n};\n"]}
@@ -1,11 +1,15 @@
1
1
  import { Sort, Filter, FilterOption, Redirect, Field, Curation } from "./firestore";
2
2
  export interface Config {
3
3
  index: string;
4
- sort: ConfigSort[];
5
- fields: ConfigField[];
6
- filters: ConfigFilter[];
7
- redirects: ConfigRedirect[];
8
- curations: ConfigCuration[];
4
+ cache: {
5
+ enabled: boolean;
6
+ seconds: number;
7
+ };
8
+ sort: Array<ConfigSort>;
9
+ fields: Array<ConfigField>;
10
+ filters: Array<ConfigFilter>;
11
+ redirects: Array<ConfigRedirect>;
12
+ curations: Array<ConfigCuration>;
9
13
  }
10
14
  export declare type ConfigSort = Omit<Sort, "enabled">;
11
15
  export declare type ConfigField = Omit<Field, "enabled">;
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/types/config.ts"],"names":[],"mappings":"","sourcesContent":["import {\n Sort,\n Filter,\n FilterOption,\n Redirect,\n Field,\n Curation,\n} from \"./firestore\";\n\n// when exposed as config, most resources have the `enabled` and `keywords` attributes removed\n// curation boosting groupings and sortings both have a json encoded elastic query added to them\nexport interface Config {\n index: string;\n sort: ConfigSort[];\n fields: ConfigField[];\n filters: ConfigFilter[];\n redirects: ConfigRedirect[];\n curations: ConfigCuration[];\n}\n\nexport type ConfigSort = Omit<Sort, \"enabled\">;\nexport type ConfigField = Omit<Field, \"enabled\">;\nexport type ConfigRedirect = Omit<Redirect, \"enabled\" | \"keywords\">;\nexport type ConfigFilter = Omit<Filter, \"enabled\" | \"keywords\"> & {\n options: Omit<FilterOption, \"enabled\">[];\n};\nexport type ConfigFilterOption = Omit<FilterOption, \"enabled\">;\nexport type ConfigCuration = Omit<\n Curation,\n \"keywords\" | \"boosting\" | \"longRunningTask\" | \"callouts\"\n> & {\n boosting: {\n groupings: (NonNullable<\n NonNullable<Curation[\"boosting\"]>[\"groupings\"]\n >[0] & { query: string })[];\n sortings: (NonNullable<NonNullable<Curation[\"boosting\"]>[\"sortings\"]>[0] & {\n query: string;\n })[];\n };\n};\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/types/config.ts"],"names":[],"mappings":"","sourcesContent":["import {\n Sort,\n Filter,\n FilterOption,\n Redirect,\n Field,\n Curation,\n} from \"./firestore\";\n\n// when exposed as config, most resources have the `enabled` and `keywords` attributes removed\n// curation boosting groupings and sortings both have a json encoded elastic query added to them\nexport interface Config {\n index: string;\n cache: {\n enabled: boolean;\n seconds: number;\n };\n sort: Array<ConfigSort>;\n fields: Array<ConfigField>;\n filters: Array<ConfigFilter>;\n redirects: Array<ConfigRedirect>;\n curations: Array<ConfigCuration>;\n}\n\nexport type ConfigSort = Omit<Sort, \"enabled\">;\nexport type ConfigField = Omit<Field, \"enabled\">;\nexport type ConfigRedirect = Omit<Redirect, \"enabled\" | \"keywords\">;\nexport type ConfigFilter = Omit<Filter, \"enabled\" | \"keywords\"> & {\n options: Omit<FilterOption, \"enabled\">[];\n};\nexport type ConfigFilterOption = Omit<FilterOption, \"enabled\">;\nexport type ConfigCuration = Omit<\n Curation,\n \"keywords\" | \"boosting\" | \"longRunningTask\" | \"callouts\"\n> & {\n boosting: {\n groupings: (NonNullable<\n NonNullable<Curation[\"boosting\"]>[\"groupings\"]\n >[0] & { query: string })[];\n sortings: (NonNullable<NonNullable<Curation[\"boosting\"]>[\"sortings\"]>[0] & {\n query: string;\n })[];\n };\n};\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usereactify/search",
3
3
  "description": "React UI library for Reactify Search",
4
- "version": "5.16.3",
4
+ "version": "5.17.0",
5
5
  "license": "MIT",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",