@contentful/optimization-node 0.1.0-alpha8 → 1.0.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/dist/260.mjs ADDED
@@ -0,0 +1,6 @@
1
+ const OPTIMIZATION_NODE_SDK_VERSION = "1.0.0";
2
+ const OPTIMIZATION_NODE_SDK_NAME = "@contentful/optimization-node";
3
+ export { ANONYMOUS_ID_COOKIE, ANONYMOUS_ID_KEY } from "@contentful/optimization-core/constants";
4
+ export { OPTIMIZATION_NODE_SDK_NAME, OPTIMIZATION_NODE_SDK_VERSION };
5
+
6
+ //# sourceMappingURL=260.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"260.mjs","sources":["../src/constants.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/naming-convention -- Replaced at build-time\ndeclare const __OPTIMIZATION_VERSION__: string | undefined\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Replaced at build-time\ndeclare const __OPTIMIZATION_PACKAGE_NAME__: string | undefined\n\n/**\n * The current version of the Optimization Node SDK, injected at build-time.\n *\n * @defaultValue `'0.0.0'` when the build-time replacement is unavailable.\n *\n * @public\n */\nexport const OPTIMIZATION_NODE_SDK_VERSION =\n typeof __OPTIMIZATION_VERSION__ === 'string' ? __OPTIMIZATION_VERSION__ : '0.0.0'\n\n/**\n * The package name of the Optimization Node SDK, injected at build-time.\n *\n * @defaultValue `'@contentful/optimization-node'` when the build-time replacement is unavailable.\n *\n * @public\n */\nexport const OPTIMIZATION_NODE_SDK_NAME =\n typeof __OPTIMIZATION_PACKAGE_NAME__ === 'string'\n ? __OPTIMIZATION_PACKAGE_NAME__\n : '@contentful/optimization-node'\n\n/**\n * Re-exports of anonymous identifier constants used by the Optimization Core.\n *\n * @remarks\n * This constant is surfaced here to provide a stable import path for Node SDK\n * consumers. It represents the cookie key used by the Optimization Framework\n * to persist an anonymous identifier for tracking optimization and insights\n * events when no explicit profile is known.\n *\n * @example\n * ```ts\n * import { ANONYMOUS_ID_COOKIE, ANONYMOUS_ID_KEY } from '@contentful/optimization-node/constants'\n * const cookieId = request.cookies[ANONYMOUS_ID_COOKIE]\n * const storageId = localStorage.getItem(ANONYMOUS_ID_KEY)\n * ```\n *\n * @see {@link ANONYMOUS_ID_COOKIE} and {@link ANONYMOUS_ID_KEY} in\n * `@contentful/optimization-core` for the\n * authoritative definition and documentation.\n *\n * @public\n */\nexport { ANONYMOUS_ID_COOKIE, ANONYMOUS_ID_KEY } from '@contentful/optimization-core/constants'\n"],"names":["OPTIMIZATION_NODE_SDK_VERSION","__OPTIMIZATION_VERSION__","OPTIMIZATION_NODE_SDK_NAME","__OPTIMIZATION_PACKAGE_NAME__"],"mappings":"AAYO,MAAMA,gCACoCC;AAS1C,MAAMC,6BAEPC"}
package/dist/987.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import * as __rspack_external__contentful_optimization_core_7d4758c6 from "@contentful/optimization-core";
2
+ export { __rspack_external__contentful_optimization_core_7d4758c6 };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __webpack_modules__ = {
3
+ "@contentful/optimization-core/api-client" (module) {
4
+ module.exports = require("@contentful/optimization-core/api-client");
5
+ }
6
+ };
7
+ var __webpack_module_cache__ = {};
8
+ function __webpack_require__(moduleId) {
9
+ var cachedModule = __webpack_module_cache__[moduleId];
10
+ if (void 0 !== cachedModule) return cachedModule.exports;
11
+ var module = __webpack_module_cache__[moduleId] = {
12
+ exports: {}
13
+ };
14
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
15
+ return module.exports;
16
+ }
17
+ (()=>{
18
+ __webpack_require__.n = (module)=>{
19
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
20
+ __webpack_require__.d(getter, {
21
+ a: getter
22
+ });
23
+ return getter;
24
+ };
25
+ })();
26
+ (()=>{
27
+ __webpack_require__.d = (exports1, definition)=>{
28
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
29
+ enumerable: true,
30
+ get: definition[key]
31
+ });
32
+ };
33
+ })();
34
+ (()=>{
35
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
36
+ })();
37
+ (()=>{
38
+ __webpack_require__.r = (exports1)=>{
39
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
40
+ value: 'Module'
41
+ });
42
+ Object.defineProperty(exports1, '__esModule', {
43
+ value: true
44
+ });
45
+ };
46
+ })();
47
+ var __webpack_exports__ = {};
48
+ (()=>{
49
+ __webpack_require__.r(__webpack_exports__);
50
+ var _contentful_optimization_core_api_client__rspack_import_0 = __webpack_require__("@contentful/optimization-core/api-client");
51
+ var __rspack_reexport = {};
52
+ for(const __rspack_import_key in _contentful_optimization_core_api_client__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_contentful_optimization_core_api_client__rspack_import_0[__rspack_import_key];
53
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
54
+ })();
55
+ for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
56
+ Object.defineProperty(exports, '__esModule', {
57
+ value: true
58
+ });
59
+
60
+ //# sourceMappingURL=api-client.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.cjs","sources":["webpack/runtime/compat_get_default_export","webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol"],"mappings":";;;;;;;;;;;;;;;;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
@@ -0,0 +1,4 @@
1
+
2
+ export * from "@contentful/optimization-core/api-client";
3
+
4
+ export { }
@@ -0,0 +1,4 @@
1
+
2
+ export * from "@contentful/optimization-core/api-client";
3
+
4
+ export { }
@@ -0,0 +1,4 @@
1
+
2
+ export * from "@contentful/optimization-core/api-client";
3
+
4
+ export { }
@@ -0,0 +1,2 @@
1
+ import "@contentful/optimization-core/api-client";
2
+ export * from "@contentful/optimization-core/api-client";
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __webpack_modules__ = {
3
+ "@contentful/optimization-core/api-schemas" (module) {
4
+ module.exports = require("@contentful/optimization-core/api-schemas");
5
+ }
6
+ };
7
+ var __webpack_module_cache__ = {};
8
+ function __webpack_require__(moduleId) {
9
+ var cachedModule = __webpack_module_cache__[moduleId];
10
+ if (void 0 !== cachedModule) return cachedModule.exports;
11
+ var module = __webpack_module_cache__[moduleId] = {
12
+ exports: {}
13
+ };
14
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
15
+ return module.exports;
16
+ }
17
+ (()=>{
18
+ __webpack_require__.n = (module)=>{
19
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
20
+ __webpack_require__.d(getter, {
21
+ a: getter
22
+ });
23
+ return getter;
24
+ };
25
+ })();
26
+ (()=>{
27
+ __webpack_require__.d = (exports1, definition)=>{
28
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
29
+ enumerable: true,
30
+ get: definition[key]
31
+ });
32
+ };
33
+ })();
34
+ (()=>{
35
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
36
+ })();
37
+ (()=>{
38
+ __webpack_require__.r = (exports1)=>{
39
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
40
+ value: 'Module'
41
+ });
42
+ Object.defineProperty(exports1, '__esModule', {
43
+ value: true
44
+ });
45
+ };
46
+ })();
47
+ var __webpack_exports__ = {};
48
+ (()=>{
49
+ __webpack_require__.r(__webpack_exports__);
50
+ var _contentful_optimization_core_api_schemas__rspack_import_0 = __webpack_require__("@contentful/optimization-core/api-schemas");
51
+ var __rspack_reexport = {};
52
+ for(const __rspack_import_key in _contentful_optimization_core_api_schemas__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_contentful_optimization_core_api_schemas__rspack_import_0[__rspack_import_key];
53
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
54
+ })();
55
+ for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
56
+ Object.defineProperty(exports, '__esModule', {
57
+ value: true
58
+ });
59
+
60
+ //# sourceMappingURL=api-schemas.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-schemas.cjs","sources":["webpack/runtime/compat_get_default_export","webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol"],"mappings":";;;;;;;;;;;;;;;;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
@@ -0,0 +1,4 @@
1
+
2
+ export * from "@contentful/optimization-core/api-schemas";
3
+
4
+ export { }
@@ -0,0 +1,4 @@
1
+
2
+ export * from "@contentful/optimization-core/api-schemas";
3
+
4
+ export { }
@@ -0,0 +1,4 @@
1
+
2
+ export * from "@contentful/optimization-core/api-schemas";
3
+
4
+ export { }
@@ -0,0 +1,2 @@
1
+ import "@contentful/optimization-core/api-schemas";
2
+ export * from "@contentful/optimization-core/api-schemas";
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ ANONYMOUS_ID_COOKIE: ()=>constants_namespaceObject.ANONYMOUS_ID_COOKIE,
28
+ OPTIMIZATION_NODE_SDK_NAME: ()=>OPTIMIZATION_NODE_SDK_NAME,
29
+ ANONYMOUS_ID_KEY: ()=>constants_namespaceObject.ANONYMOUS_ID_KEY,
30
+ OPTIMIZATION_NODE_SDK_VERSION: ()=>OPTIMIZATION_NODE_SDK_VERSION
31
+ });
32
+ const constants_namespaceObject = require("@contentful/optimization-core/constants");
33
+ const OPTIMIZATION_NODE_SDK_VERSION = "1.0.0";
34
+ const OPTIMIZATION_NODE_SDK_NAME = "@contentful/optimization-node";
35
+ exports.ANONYMOUS_ID_COOKIE = __webpack_exports__.ANONYMOUS_ID_COOKIE;
36
+ exports.ANONYMOUS_ID_KEY = __webpack_exports__.ANONYMOUS_ID_KEY;
37
+ exports.OPTIMIZATION_NODE_SDK_NAME = __webpack_exports__.OPTIMIZATION_NODE_SDK_NAME;
38
+ exports.OPTIMIZATION_NODE_SDK_VERSION = __webpack_exports__.OPTIMIZATION_NODE_SDK_VERSION;
39
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
40
+ "ANONYMOUS_ID_COOKIE",
41
+ "ANONYMOUS_ID_KEY",
42
+ "OPTIMIZATION_NODE_SDK_NAME",
43
+ "OPTIMIZATION_NODE_SDK_VERSION"
44
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
45
+ Object.defineProperty(exports, '__esModule', {
46
+ value: true
47
+ });
48
+
49
+ //# sourceMappingURL=constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.cjs","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../src/constants.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// eslint-disable-next-line @typescript-eslint/naming-convention -- Replaced at build-time\ndeclare const __OPTIMIZATION_VERSION__: string | undefined\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Replaced at build-time\ndeclare const __OPTIMIZATION_PACKAGE_NAME__: string | undefined\n\n/**\n * The current version of the Optimization Node SDK, injected at build-time.\n *\n * @defaultValue `'0.0.0'` when the build-time replacement is unavailable.\n *\n * @public\n */\nexport const OPTIMIZATION_NODE_SDK_VERSION =\n typeof __OPTIMIZATION_VERSION__ === 'string' ? __OPTIMIZATION_VERSION__ : '0.0.0'\n\n/**\n * The package name of the Optimization Node SDK, injected at build-time.\n *\n * @defaultValue `'@contentful/optimization-node'` when the build-time replacement is unavailable.\n *\n * @public\n */\nexport const OPTIMIZATION_NODE_SDK_NAME =\n typeof __OPTIMIZATION_PACKAGE_NAME__ === 'string'\n ? __OPTIMIZATION_PACKAGE_NAME__\n : '@contentful/optimization-node'\n\n/**\n * Re-exports of anonymous identifier constants used by the Optimization Core.\n *\n * @remarks\n * This constant is surfaced here to provide a stable import path for Node SDK\n * consumers. It represents the cookie key used by the Optimization Framework\n * to persist an anonymous identifier for tracking optimization and insights\n * events when no explicit profile is known.\n *\n * @example\n * ```ts\n * import { ANONYMOUS_ID_COOKIE, ANONYMOUS_ID_KEY } from '@contentful/optimization-node/constants'\n * const cookieId = request.cookies[ANONYMOUS_ID_COOKIE]\n * const storageId = localStorage.getItem(ANONYMOUS_ID_KEY)\n * ```\n *\n * @see {@link ANONYMOUS_ID_COOKIE} and {@link ANONYMOUS_ID_KEY} in\n * `@contentful/optimization-core` for the\n * authoritative definition and documentation.\n *\n * @public\n */\nexport { ANONYMOUS_ID_COOKIE, ANONYMOUS_ID_KEY } from '@contentful/optimization-core/constants'\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","OPTIMIZATION_NODE_SDK_VERSION","__OPTIMIZATION_VERSION__","OPTIMIZATION_NODE_SDK_NAME","__OPTIMIZATION_PACKAGE_NAME__"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;ACMO,MAAMI,gCACoCC;AAS1C,MAAMC,6BAEPC"}
@@ -0,0 +1,26 @@
1
+ import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core/constants';
2
+ import { ANONYMOUS_ID_KEY } from '@contentful/optimization-core/constants';
3
+
4
+ export { ANONYMOUS_ID_COOKIE }
5
+
6
+ export { ANONYMOUS_ID_KEY }
7
+
8
+ /**
9
+ * The package name of the Optimization Node SDK, injected at build-time.
10
+ *
11
+ * @defaultValue `'@contentful/optimization-node'` when the build-time replacement is unavailable.
12
+ *
13
+ * @public
14
+ */
15
+ export declare const OPTIMIZATION_NODE_SDK_NAME: string;
16
+
17
+ /**
18
+ * The current version of the Optimization Node SDK, injected at build-time.
19
+ *
20
+ * @defaultValue `'0.0.0'` when the build-time replacement is unavailable.
21
+ *
22
+ * @public
23
+ */
24
+ export declare const OPTIMIZATION_NODE_SDK_VERSION: string;
25
+
26
+ export { }
@@ -0,0 +1,26 @@
1
+ import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core/constants';
2
+ import { ANONYMOUS_ID_KEY } from '@contentful/optimization-core/constants';
3
+
4
+ export { ANONYMOUS_ID_COOKIE }
5
+
6
+ export { ANONYMOUS_ID_KEY }
7
+
8
+ /**
9
+ * The package name of the Optimization Node SDK, injected at build-time.
10
+ *
11
+ * @defaultValue `'@contentful/optimization-node'` when the build-time replacement is unavailable.
12
+ *
13
+ * @public
14
+ */
15
+ export declare const OPTIMIZATION_NODE_SDK_NAME: string;
16
+
17
+ /**
18
+ * The current version of the Optimization Node SDK, injected at build-time.
19
+ *
20
+ * @defaultValue `'0.0.0'` when the build-time replacement is unavailable.
21
+ *
22
+ * @public
23
+ */
24
+ export declare const OPTIMIZATION_NODE_SDK_VERSION: string;
25
+
26
+ export { }
@@ -0,0 +1,26 @@
1
+ import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core/constants';
2
+ import { ANONYMOUS_ID_KEY } from '@contentful/optimization-core/constants';
3
+
4
+ export { ANONYMOUS_ID_COOKIE }
5
+
6
+ export { ANONYMOUS_ID_KEY }
7
+
8
+ /**
9
+ * The package name of the Optimization Node SDK, injected at build-time.
10
+ *
11
+ * @defaultValue `'@contentful/optimization-node'` when the build-time replacement is unavailable.
12
+ *
13
+ * @public
14
+ */
15
+ export declare const OPTIMIZATION_NODE_SDK_NAME: string;
16
+
17
+ /**
18
+ * The current version of the Optimization Node SDK, injected at build-time.
19
+ *
20
+ * @defaultValue `'0.0.0'` when the build-time replacement is unavailable.
21
+ *
22
+ * @public
23
+ */
24
+ export declare const OPTIMIZATION_NODE_SDK_VERSION: string;
25
+
26
+ export { }
@@ -0,0 +1 @@
1
+ export { ANONYMOUS_ID_COOKIE, ANONYMOUS_ID_KEY, OPTIMIZATION_NODE_SDK_NAME, OPTIMIZATION_NODE_SDK_VERSION } from "./260.mjs";
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __webpack_modules__ = {
3
+ "@contentful/optimization-core" (module) {
4
+ module.exports = require("@contentful/optimization-core");
5
+ },
6
+ "@contentful/optimization-core/entry-source" (module) {
7
+ module.exports = require("@contentful/optimization-core/entry-source");
8
+ }
9
+ };
10
+ var __webpack_module_cache__ = {};
11
+ function __webpack_require__(moduleId) {
12
+ var cachedModule = __webpack_module_cache__[moduleId];
13
+ if (void 0 !== cachedModule) return cachedModule.exports;
14
+ var module = __webpack_module_cache__[moduleId] = {
15
+ exports: {}
16
+ };
17
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
18
+ return module.exports;
19
+ }
20
+ (()=>{
21
+ __webpack_require__.n = (module)=>{
22
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
23
+ __webpack_require__.d(getter, {
24
+ a: getter
25
+ });
26
+ return getter;
27
+ };
28
+ })();
29
+ (()=>{
30
+ __webpack_require__.d = (exports1, definition)=>{
31
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
32
+ enumerable: true,
33
+ get: definition[key]
34
+ });
35
+ };
36
+ })();
37
+ (()=>{
38
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
39
+ })();
40
+ (()=>{
41
+ __webpack_require__.r = (exports1)=>{
42
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
43
+ value: 'Module'
44
+ });
45
+ Object.defineProperty(exports1, '__esModule', {
46
+ value: true
47
+ });
48
+ };
49
+ })();
50
+ var __webpack_exports__ = {};
51
+ (()=>{
52
+ __webpack_require__.r(__webpack_exports__);
53
+ __webpack_require__.d(__webpack_exports__, {
54
+ prefetchManagedEntries: ()=>_contentful_optimization_core_entry_source__rspack_import_1.prefetchManagedEntries
55
+ });
56
+ var _contentful_optimization_core__rspack_import_0 = __webpack_require__("@contentful/optimization-core");
57
+ var __rspack_reexport = {};
58
+ for(const __rspack_import_key in _contentful_optimization_core__rspack_import_0)if ([
59
+ "prefetchManagedEntries",
60
+ "default"
61
+ ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_contentful_optimization_core__rspack_import_0[__rspack_import_key];
62
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
63
+ var _contentful_optimization_core_entry_source__rspack_import_1 = __webpack_require__("@contentful/optimization-core/entry-source");
64
+ })();
65
+ exports.prefetchManagedEntries = __webpack_exports__.prefetchManagedEntries;
66
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
67
+ "prefetchManagedEntries"
68
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
69
+ Object.defineProperty(exports, '__esModule', {
70
+ value: true
71
+ });
72
+
73
+ //# sourceMappingURL=core-sdk.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-sdk.cjs","sources":["webpack/runtime/compat_get_default_export","webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol"],"mappings":";;;;;;;;;;;;;;;;;;;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
@@ -0,0 +1,17 @@
1
+ import { ManagedEntryDescriptor } from '@contentful/optimization-core/entry-source';
2
+ import { ManagedEntryHandoff } from '@contentful/optimization-core/entry-source';
3
+ import { ManagedEntryPrefetchRuntime } from '@contentful/optimization-core/entry-source';
4
+ import { prefetchManagedEntries } from '@contentful/optimization-core/entry-source';
5
+
6
+ export { ManagedEntryDescriptor }
7
+
8
+ export { ManagedEntryHandoff }
9
+
10
+ export { ManagedEntryPrefetchRuntime }
11
+
12
+ export { prefetchManagedEntries }
13
+
14
+
15
+ export * from "@contentful/optimization-core";
16
+
17
+ export { }
@@ -0,0 +1,17 @@
1
+ import { ManagedEntryDescriptor } from '@contentful/optimization-core/entry-source';
2
+ import { ManagedEntryHandoff } from '@contentful/optimization-core/entry-source';
3
+ import { ManagedEntryPrefetchRuntime } from '@contentful/optimization-core/entry-source';
4
+ import { prefetchManagedEntries } from '@contentful/optimization-core/entry-source';
5
+
6
+ export { ManagedEntryDescriptor }
7
+
8
+ export { ManagedEntryHandoff }
9
+
10
+ export { ManagedEntryPrefetchRuntime }
11
+
12
+ export { prefetchManagedEntries }
13
+
14
+
15
+ export * from "@contentful/optimization-core";
16
+
17
+ export { }
@@ -0,0 +1,17 @@
1
+ import { ManagedEntryDescriptor } from '@contentful/optimization-core/entry-source';
2
+ import { ManagedEntryHandoff } from '@contentful/optimization-core/entry-source';
3
+ import { ManagedEntryPrefetchRuntime } from '@contentful/optimization-core/entry-source';
4
+ import { prefetchManagedEntries } from '@contentful/optimization-core/entry-source';
5
+
6
+ export { ManagedEntryDescriptor }
7
+
8
+ export { ManagedEntryHandoff }
9
+
10
+ export { ManagedEntryPrefetchRuntime }
11
+
12
+ export { prefetchManagedEntries }
13
+
14
+
15
+ export * from "@contentful/optimization-core";
16
+
17
+ export { }
@@ -0,0 +1,3 @@
1
+ import "./987.mjs";
2
+ export * from "@contentful/optimization-core";
3
+ export { prefetchManagedEntries } from "@contentful/optimization-core/entry-source";
package/dist/index.cjs CHANGED
@@ -1,46 +1,13 @@
1
1
  "use strict";
2
2
  var __webpack_modules__ = {
3
- "./src/Optimization.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
3
+ "./src/constants.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
4
  __webpack_require__.d(__webpack_exports__, {
5
- A: ()=>src_Optimization
5
+ OPTIMIZATION_NODE_SDK_NAME: ()=>OPTIMIZATION_NODE_SDK_NAME,
6
+ OPTIMIZATION_NODE_SDK_VERSION: ()=>OPTIMIZATION_NODE_SDK_VERSION
6
7
  });
7
- var optimization_core_ = __webpack_require__("@contentful/optimization-core");
8
- const external_es_toolkit_namespaceObject = require("es-toolkit");
9
- var global_constants = __webpack_require__("./src/global-constants.ts");
10
- function mergeConfig(config) {
11
- const { app, ...restConfig } = config;
12
- const defaultConfig = {
13
- eventBuilder: {
14
- app,
15
- channel: 'server',
16
- library: {
17
- name: global_constants.EH,
18
- version: global_constants.RS
19
- }
20
- }
21
- };
22
- return (0, external_es_toolkit_namespaceObject.merge)(defaultConfig, restConfig);
23
- }
24
- class Optimization extends optimization_core_.CoreStateless {
25
- constructor(config){
26
- const mergedConfig = mergeConfig(config);
27
- super(mergedConfig);
28
- }
29
- }
30
- const src_Optimization = Optimization;
31
- },
32
- "./src/global-constants.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
33
- __webpack_require__.d(__webpack_exports__, {
34
- EH: ()=>OPTIMIZATION_NODE_SDK_NAME,
35
- RS: ()=>OPTIMIZATION_NODE_SDK_VERSION,
36
- TF: ()=>_contentful_optimization_core__rspack_import_0.ANONYMOUS_ID_COOKIE
37
- });
38
- var _contentful_optimization_core__rspack_import_0 = __webpack_require__("@contentful/optimization-core");
39
- const OPTIMIZATION_NODE_SDK_VERSION = "0.1.0-alpha8";
8
+ require("@contentful/optimization-core/constants");
9
+ const OPTIMIZATION_NODE_SDK_VERSION = "1.0.0";
40
10
  const OPTIMIZATION_NODE_SDK_NAME = "@contentful/optimization-node";
41
- },
42
- "@contentful/optimization-core" (module) {
43
- module.exports = require("@contentful/optimization-core");
44
11
  }
45
12
  };
46
13
  var __webpack_module_cache__ = {};
@@ -53,15 +20,6 @@ function __webpack_require__(moduleId) {
53
20
  __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
54
21
  return module.exports;
55
22
  }
56
- (()=>{
57
- __webpack_require__.n = (module)=>{
58
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
59
- __webpack_require__.d(getter, {
60
- a: getter
61
- });
62
- return getter;
63
- };
64
- })();
65
23
  (()=>{
66
24
  __webpack_require__.d = (exports1, definition)=>{
67
25
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
@@ -87,25 +45,43 @@ var __webpack_exports__ = {};
87
45
  (()=>{
88
46
  __webpack_require__.r(__webpack_exports__);
89
47
  __webpack_require__.d(__webpack_exports__, {
90
- ANONYMOUS_ID_COOKIE: ()=>_global_constants__rspack_import_2.TF,
91
- OPTIMIZATION_NODE_SDK_NAME: ()=>_global_constants__rspack_import_2.EH,
92
- OPTIMIZATION_NODE_SDK_VERSION: ()=>_global_constants__rspack_import_2.RS,
93
- default: ()=>__rspack_default_export
48
+ OPTIMIZATION_NODE_SDK_NAME: ()=>constants.OPTIMIZATION_NODE_SDK_NAME,
49
+ OPTIMIZATION_NODE_SDK_VERSION: ()=>constants.OPTIMIZATION_NODE_SDK_VERSION,
50
+ default: ()=>src
94
51
  });
95
- var _Optimization__rspack_import_0 = __webpack_require__("./src/Optimization.ts");
96
- var _contentful_optimization_core__rspack_import_1 = __webpack_require__("@contentful/optimization-core");
97
- var __rspack_reexport = {};
98
- for(const __rspack_import_key in _contentful_optimization_core__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_contentful_optimization_core__rspack_import_1[__rspack_import_key];
99
- __webpack_require__.d(__webpack_exports__, __rspack_reexport);
100
- var _global_constants__rspack_import_2 = __webpack_require__("./src/global-constants.ts");
101
- const __rspack_default_export = _Optimization__rspack_import_0.A;
52
+ const optimization_core_namespaceObject = require("@contentful/optimization-core");
53
+ var constants = __webpack_require__("./src/constants.ts");
54
+ const DEFAULT_NODE_ALLOWED_EVENT_TYPES = [
55
+ 'identify',
56
+ 'page'
57
+ ];
58
+ class ContentfulOptimization extends optimization_core_namespaceObject.CoreStateless {
59
+ constructor({ app, allowedEventTypes, eventBuilder, ...config }){
60
+ const { library, ...eventBuilderConfig } = eventBuilder ?? {};
61
+ super({
62
+ ...config,
63
+ allowedEventTypes: allowedEventTypes ?? DEFAULT_NODE_ALLOWED_EVENT_TYPES,
64
+ eventBuilder: {
65
+ app,
66
+ channel: 'server',
67
+ ...eventBuilderConfig,
68
+ library: {
69
+ name: constants.OPTIMIZATION_NODE_SDK_NAME,
70
+ version: constants.OPTIMIZATION_NODE_SDK_VERSION,
71
+ ...library
72
+ },
73
+ getConsent: ()=>false
74
+ }
75
+ });
76
+ }
77
+ }
78
+ const src_ContentfulOptimization = ContentfulOptimization;
79
+ const src = src_ContentfulOptimization;
102
80
  })();
103
- exports.ANONYMOUS_ID_COOKIE = __webpack_exports__.ANONYMOUS_ID_COOKIE;
104
81
  exports.OPTIMIZATION_NODE_SDK_NAME = __webpack_exports__.OPTIMIZATION_NODE_SDK_NAME;
105
82
  exports.OPTIMIZATION_NODE_SDK_VERSION = __webpack_exports__.OPTIMIZATION_NODE_SDK_VERSION;
106
83
  exports["default"] = __webpack_exports__["default"];
107
84
  for(var __rspack_i in __webpack_exports__)if (-1 === [
108
- "ANONYMOUS_ID_COOKIE",
109
85
  "OPTIMIZATION_NODE_SDK_NAME",
110
86
  "OPTIMIZATION_NODE_SDK_VERSION",
111
87
  "default"