@contentful/optimization-node 0.1.0-alpha → 0.1.0-alpha11

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/index.d.ts CHANGED
@@ -1,54 +1,95 @@
1
- import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core';
2
- import { App } from '@contentful/optimization-core';
1
+ /**
2
+ * Contentful ContentfulOptimization Node SDK.
3
+ *
4
+ * @remarks
5
+ * Adds Node-specific defaults via the {@link ContentfulOptimization} class.
6
+ * Core and transitive API exports are available from dedicated entrypoints:
7
+ * `@contentful/optimization-node/core-sdk`,
8
+ * `@contentful/optimization-node/api-client`,
9
+ * and `@contentful/optimization-node/api-schemas`.
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+
14
+ import type { App } from '@contentful/optimization-core/api-schemas';
3
15
  import { CoreStateless } from '@contentful/optimization-core';
4
16
  import { CoreStatelessConfig } from '@contentful/optimization-core';
5
17
 
6
- export { ANONYMOUS_ID_COOKIE }
7
-
8
18
  /**
9
- * Node-specific Optimization SDK built on {@link CoreStateless}.
19
+ * Node-specific ContentfulOptimization SDK built on {@link CoreStateless}.
10
20
  *
11
- * @public
12
21
  * @remarks
13
- * This class adapts the stateless Optimization Core for Node runtimes by
22
+ * This class adapts the stateless ContentfulOptimization Core for Node runtimes by
14
23
  * applying environment-appropriate defaults (e.g., server channel, Node SDK
15
- * library metadata). No analytics or personalization behavior is modified—
16
- * only configuration defaults differ.
24
+ * library metadata). No core runtime behavior is modified; only configuration
25
+ * defaults differ.
17
26
  *
18
27
  * @example
19
28
  * ```ts
20
- * import Optimization from '@contentful/optimization-node'
29
+ * import ContentfulOptimization from '@contentful/optimization-node'
21
30
  *
22
- * const sdk = new Optimization({
31
+ * const sdk = new ContentfulOptimization({
23
32
  * clientId: 'abc-123',
24
33
  * environment: 'main',
25
34
  * logLevel: 'info',
26
35
  * })
27
36
  *
28
- * await sdk.track({ event: 'server_event', properties: { id: 1 } })
37
+ * const request = sdk.forRequest({ locale: 'en-US' })
38
+ *
39
+ * await request.track({ event: 'server_event', properties: { id: 1 } })
29
40
  * ```
41
+ *
42
+ * @see {@link CoreStateless}
43
+ *
44
+ * @public
30
45
  */
31
- declare class Optimization extends CoreStateless {
46
+ declare class ContentfulOptimization extends CoreStateless {
32
47
  /**
33
48
  * Create an instance of the Node SDK with merged defaults.
34
49
  *
35
50
  * @param config - Partial Node-specific configuration. Any eventBuilder
36
51
  * fields provided are merged with Node's defaults.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * import ContentfulOptimization from '@contentful/optimization-node'
56
+ *
57
+ * const optimization = new ContentfulOptimization({ clientId: 'my-client-id' })
58
+ * ```
37
59
  */
38
60
  constructor(config: OptimizationNodeConfig);
39
61
  }
40
- export default Optimization;
62
+ export default ContentfulOptimization;
41
63
 
42
- export declare const OPTIMIZATION_NODE_SDK_VERSION: string;
64
+ /**
65
+ * The package name of the Optimization Node SDK, injected at build-time.
66
+ *
67
+ * @defaultValue `'@contentful/optimization-node'` when the build-time replacement is unavailable.
68
+ *
69
+ * @public
70
+ */
71
+ export declare const OPTIMIZATION_NODE_SDK_NAME: string;
43
72
 
44
73
  /**
45
- * Configuration for the Node-specific Optimization SDK.
74
+ * The current version of the Optimization Node SDK, injected at build-time.
75
+ *
76
+ * @defaultValue `'0.0.0'` when the build-time replacement is unavailable.
46
77
  *
47
78
  * @public
79
+ */
80
+ export declare const OPTIMIZATION_NODE_SDK_VERSION: string;
81
+
82
+ /**
83
+ * Configuration for the Node-specific ContentfulOptimization SDK.
84
+ *
48
85
  * @remarks
49
- * This configuration extends {@link CoreConfig} but allows partial overrides
50
- * of the event-builder configuration. SDKs commonly inject their own library
51
- * metadata or channel definitions.
86
+ * This configuration extends {@link CoreStatelessConfig} but allows partial
87
+ * overrides of the event-builder configuration. SDKs commonly inject their own
88
+ * library metadata or channel definitions.
89
+ *
90
+ * @see {@link CoreStatelessConfig}
91
+ *
92
+ * @public
52
93
  */
53
94
  export declare interface OptimizationNodeConfig extends Omit<CoreStatelessConfig, 'eventBuilder'> {
54
95
  /**
@@ -63,13 +104,10 @@ export declare interface OptimizationNodeConfig extends Omit<CoreStatelessConfig
63
104
  *
64
105
  * @remarks
65
106
  * Any provided fields are merged with the default Node SDK metadata.
66
- * This differs from {@link CoreConfig.eventBuilder}, which expects a
67
- * full configuration object.
107
+ * This differs from {@link CoreStatelessConfig} eventBuilder, which expects
108
+ * a full configuration object.
68
109
  */
69
110
  eventBuilder?: Partial<Omit<CoreStatelessConfig['eventBuilder'], 'app'>>;
70
111
  }
71
112
 
72
-
73
- export * from "@contentful/optimization-core";
74
-
75
113
  export { }
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import * as __rspack_external__contentful_optimization_core_7d4758c6 from "@contentful/optimization-core";
2
1
  import { merge } from "es-toolkit";
3
- const OPTIMIZATION_NODE_SDK_VERSION = "0.1.0-alpha";
2
+ import { __rspack_external__contentful_optimization_core_7d4758c6 } from "./987.mjs";
3
+ import { OPTIMIZATION_NODE_SDK_NAME, OPTIMIZATION_NODE_SDK_VERSION } from "./260.mjs";
4
4
  function mergeConfig(config) {
5
5
  const { app, ...restConfig } = config;
6
6
  const defaultConfig = {
@@ -8,24 +8,22 @@ function mergeConfig(config) {
8
8
  app,
9
9
  channel: 'server',
10
10
  library: {
11
- name: 'Optimization Node API',
11
+ name: OPTIMIZATION_NODE_SDK_NAME,
12
12
  version: OPTIMIZATION_NODE_SDK_VERSION
13
13
  }
14
14
  }
15
15
  };
16
16
  return merge(defaultConfig, restConfig);
17
17
  }
18
- class Optimization extends __rspack_external__contentful_optimization_core_7d4758c6.CoreStateless {
18
+ class ContentfulOptimization extends __rspack_external__contentful_optimization_core_7d4758c6.CoreStateless {
19
19
  constructor(config){
20
20
  const mergedConfig = mergeConfig(config);
21
21
  super(mergedConfig);
22
22
  }
23
23
  }
24
- const src_Optimization = Optimization;
25
- const src = src_Optimization;
26
- var ANONYMOUS_ID_COOKIE = __rspack_external__contentful_optimization_core_7d4758c6.ANONYMOUS_ID_COOKIE;
27
- export * from "@contentful/optimization-core";
24
+ const src_ContentfulOptimization = ContentfulOptimization;
25
+ const src = src_ContentfulOptimization;
26
+ export { OPTIMIZATION_NODE_SDK_NAME, OPTIMIZATION_NODE_SDK_VERSION } from "./260.mjs";
28
27
  export default src;
29
- export { ANONYMOUS_ID_COOKIE, OPTIMIZATION_NODE_SDK_VERSION };
30
28
 
31
29
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/global-constants.ts","../src/Optimization.ts","../src/index.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/naming-convention -- Replaced at build-time\ndeclare const __OPTIMIZATION_VERSION__: string | undefined\n\nexport const OPTIMIZATION_NODE_SDK_VERSION =\n typeof __OPTIMIZATION_VERSION__ === 'string' ? __OPTIMIZATION_VERSION__ : '0.0.0'\n\n/**\n * Re-export of the anonymous-ID cookie name used by the Optimization Core.\n *\n * @public\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 personalization and analytics\n * events when no explicit profile is known.\n *\n * @see {@link ANONYMOUS_ID_COOKIE} in `@contentful/optimization-core` for the\n * authoritative definition and documentation.\n *\n * @example\n * ```ts\n * import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-node'\n * const id = request.cookies[ANONYMOUS_ID_COOKIE]\n * ```\n */\nexport { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core'\n","import { type App, type CoreStatelessConfig, CoreStateless } from '@contentful/optimization-core'\nimport { merge } from 'es-toolkit'\nimport { OPTIMIZATION_NODE_SDK_VERSION } from './global-constants'\n\n/**\n * Configuration for the Node-specific Optimization SDK.\n *\n * @public\n * @remarks\n * This configuration extends {@link CoreConfig} but allows partial overrides\n * of the event-builder configuration. SDKs commonly inject their own library\n * metadata or channel definitions.\n */\nexport interface OptimizationNodeConfig extends Omit<CoreStatelessConfig, 'eventBuilder'> {\n /**\n * The application definition used to attribute events to a specific consumer app.\n *\n * @remarks\n * When not provided, events will not contain app metadata in their context.\n */\n app?: App\n\n /**\n * Partial overrides for the event builder configuration.\n *\n * @remarks\n * Any provided fields are merged with the default Node SDK metadata.\n * This differs from {@link CoreConfig.eventBuilder}, which expects a\n * full configuration object.\n */\n eventBuilder?: Partial<Omit<CoreStatelessConfig['eventBuilder'], 'app'>>\n}\n\n/**\n * Merge user-supplied configuration with defaults for the Node SDK.\n *\n * @param config - The input configuration supplied by the caller.\n * @returns A fully composed {@link CoreConfig} object suitable for\n * constructing the core runtime.\n *\n * @internal\n * @remarks\n * Ensures that the Node SDK always identifies itself via a `server` channel\n * and a `library` metadata block unless explicitly overridden.\n */\nfunction mergeConfig(config: OptimizationNodeConfig): CoreStatelessConfig {\n const { app, ...restConfig } = config\n\n const defaultConfig: Partial<CoreStatelessConfig> = {\n eventBuilder: {\n app,\n channel: 'server',\n library: { name: 'Optimization Node API', version: OPTIMIZATION_NODE_SDK_VERSION },\n },\n }\n return merge(defaultConfig, restConfig)\n}\n\n/**\n * Node-specific Optimization SDK built on {@link CoreStateless}.\n *\n * @public\n * @remarks\n * This class adapts the stateless Optimization Core for Node runtimes by\n * applying environment-appropriate defaults (e.g., server channel, Node SDK\n * library metadata). No analytics or personalization behavior is modified—\n * only configuration defaults differ.\n *\n * @example\n * ```ts\n * import Optimization from '@contentful/optimization-node'\n *\n * const sdk = new Optimization({\n * clientId: 'abc-123',\n * environment: 'main',\n * logLevel: 'info',\n * })\n *\n * await sdk.track({ event: 'server_event', properties: { id: 1 } })\n * ```\n */\nclass Optimization extends CoreStateless {\n /**\n * Create an instance of the Node SDK with merged defaults.\n *\n * @param config - Partial Node-specific configuration. Any eventBuilder\n * fields provided are merged with Node's defaults.\n */\n constructor(config: OptimizationNodeConfig) {\n const mergedConfig: CoreStatelessConfig = mergeConfig(config)\n\n super(mergedConfig)\n }\n}\n\nexport default Optimization\n","import Optimization from './Optimization'\n\nexport * from '@contentful/optimization-core'\n\nexport * from './global-constants'\nexport * from './Optimization'\n\nexport default Optimization\n"],"names":["OPTIMIZATION_NODE_SDK_VERSION","__OPTIMIZATION_VERSION__","mergeConfig","config","app","restConfig","defaultConfig","merge","Optimization","CoreStateless","mergedConfig"],"mappings":";;AAGO,MAAMA,gCACoCC;ACyCjD,SAASC,YAAYC,MAA8B;IACjD,MAAM,EAAEC,GAAG,EAAE,GAAGC,YAAY,GAAGF;IAE/B,MAAMG,gBAA8C;QAClD,cAAc;YACZF;YACA,SAAS;YACT,SAAS;gBAAE,MAAM;gBAAyB,SAASJ;YAA8B;QACnF;IACF;IACA,OAAOO,MAAMD,eAAeD;AAC9B;AAyBA,MAAMG,qBAAqBC,yDAAAA,aAAaA;IAOtC,YAAYN,MAA8B,CAAE;QAC1C,MAAMO,eAAoCR,YAAYC;QAEtD,KAAK,CAACO;IACR;AACF;AAEA,yBAAeF;ACxFf,YAAeA"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/ContentfulOptimization.ts","../src/index.ts"],"sourcesContent":["import { type CoreStatelessConfig, CoreStateless } from '@contentful/optimization-core'\nimport type { App } from '@contentful/optimization-core/api-schemas'\nimport { merge } from 'es-toolkit'\nimport { OPTIMIZATION_NODE_SDK_NAME, OPTIMIZATION_NODE_SDK_VERSION } from './constants'\n\n/**\n * Configuration for the Node-specific ContentfulOptimization SDK.\n *\n * @remarks\n * This configuration extends {@link CoreStatelessConfig} but allows partial\n * overrides of the event-builder configuration. SDKs commonly inject their own\n * library metadata or channel definitions.\n *\n * @see {@link CoreStatelessConfig}\n *\n * @public\n */\nexport interface OptimizationNodeConfig extends Omit<CoreStatelessConfig, 'eventBuilder'> {\n /**\n * The application definition used to attribute events to a specific consumer app.\n *\n * @remarks\n * When not provided, events will not contain app metadata in their context.\n */\n app?: App\n\n /**\n * Partial overrides for the event builder configuration.\n *\n * @remarks\n * Any provided fields are merged with the default Node SDK metadata.\n * This differs from {@link CoreStatelessConfig} eventBuilder, which expects\n * a full configuration object.\n */\n eventBuilder?: Partial<Omit<CoreStatelessConfig['eventBuilder'], 'app'>>\n}\n\n/**\n * Merge user-supplied configuration with defaults for the Node SDK.\n *\n * @param config - The input configuration supplied by the caller.\n * @returns A fully composed {@link CoreStatelessConfig} object suitable for\n * constructing the core runtime.\n *\n * @remarks\n * Ensures that the Node SDK always identifies itself via a `server` channel\n * and a `library` metadata block unless explicitly overridden.\n *\n * @internal\n */\nfunction mergeConfig(config: OptimizationNodeConfig): CoreStatelessConfig {\n const { app, ...restConfig } = config\n\n const defaultConfig: Partial<CoreStatelessConfig> = {\n eventBuilder: {\n app,\n channel: 'server',\n library: { name: OPTIMIZATION_NODE_SDK_NAME, version: OPTIMIZATION_NODE_SDK_VERSION },\n },\n }\n return merge(defaultConfig, restConfig)\n}\n\n/**\n * Node-specific ContentfulOptimization SDK built on {@link CoreStateless}.\n *\n * @remarks\n * This class adapts the stateless ContentfulOptimization Core for Node runtimes by\n * applying environment-appropriate defaults (e.g., server channel, Node SDK\n * library metadata). No core runtime behavior is modified; only configuration\n * defaults differ.\n *\n * @example\n * ```ts\n * import ContentfulOptimization from '@contentful/optimization-node'\n *\n * const sdk = new ContentfulOptimization({\n * clientId: 'abc-123',\n * environment: 'main',\n * logLevel: 'info',\n * })\n *\n * const request = sdk.forRequest({ locale: 'en-US' })\n *\n * await request.track({ event: 'server_event', properties: { id: 1 } })\n * ```\n *\n * @see {@link CoreStateless}\n *\n * @public\n */\nclass ContentfulOptimization extends CoreStateless {\n /**\n * Create an instance of the Node SDK with merged defaults.\n *\n * @param config - Partial Node-specific configuration. Any eventBuilder\n * fields provided are merged with Node's defaults.\n *\n * @example\n * ```ts\n * import ContentfulOptimization from '@contentful/optimization-node'\n *\n * const optimization = new ContentfulOptimization({ clientId: 'my-client-id' })\n * ```\n */\n constructor(config: OptimizationNodeConfig) {\n const mergedConfig: CoreStatelessConfig = mergeConfig(config)\n\n super(mergedConfig)\n }\n}\n\nexport default ContentfulOptimization\n","/**\n * Contentful ContentfulOptimization Node SDK.\n *\n * @remarks\n * Adds Node-specific defaults via the {@link ContentfulOptimization} class.\n * Core and transitive API exports are available from dedicated entrypoints:\n * `@contentful/optimization-node/core-sdk`,\n * `@contentful/optimization-node/api-client`,\n * and `@contentful/optimization-node/api-schemas`.\n *\n * @packageDocumentation\n */\n\nimport ContentfulOptimization from './ContentfulOptimization'\n\nexport { OPTIMIZATION_NODE_SDK_NAME, OPTIMIZATION_NODE_SDK_VERSION } from './constants'\nexport * from './ContentfulOptimization'\n\nexport default ContentfulOptimization\n"],"names":["mergeConfig","config","app","restConfig","defaultConfig","OPTIMIZATION_NODE_SDK_NAME","OPTIMIZATION_NODE_SDK_VERSION","merge","ContentfulOptimization","CoreStateless","mergedConfig"],"mappings":";;;AAkDA,SAASA,YAAYC,MAA8B;IACjD,MAAM,EAAEC,GAAG,EAAE,GAAGC,YAAY,GAAGF;IAE/B,MAAMG,gBAA8C;QAClD,cAAc;YACZF;YACA,SAAS;YACT,SAAS;gBAAE,MAAMG;gBAA4B,SAASC;YAA8B;QACtF;IACF;IACA,OAAOC,MAAMH,eAAeD;AAC9B;AA8BA,MAAMK,+BAA+BC,yDAAAA,aAAaA;IAchD,YAAYR,MAA8B,CAAE;QAC1C,MAAMS,eAAoCV,YAAYC;QAEtD,KAAK,CAACS;IACR;AACF;AAEA,mCAAeF;AC9Ff,YAAeA"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __webpack_modules__ = {
3
+ "@contentful/optimization-core/logger" (module) {
4
+ module.exports = require("@contentful/optimization-core/logger");
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
+ __webpack_require__.d(__webpack_exports__, {
51
+ default: ()=>_contentful_optimization_core_logger__rspack_import_0_default.a
52
+ });
53
+ var _contentful_optimization_core_logger__rspack_import_0 = __webpack_require__("@contentful/optimization-core/logger");
54
+ var _contentful_optimization_core_logger__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_contentful_optimization_core_logger__rspack_import_0);
55
+ var __rspack_reexport = {};
56
+ for(const __rspack_import_key in _contentful_optimization_core_logger__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_contentful_optimization_core_logger__rspack_import_0[__rspack_import_key];
57
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
58
+ })();
59
+ exports["default"] = __webpack_exports__["default"];
60
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
61
+ "default"
62
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
63
+ Object.defineProperty(exports, '__esModule', {
64
+ value: true
65
+ });
66
+
67
+ //# sourceMappingURL=logger.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.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,8 @@
1
+ import { default as default_2 } from '@contentful/optimization-core/logger';
2
+
3
+ export default default_2;
4
+
5
+
6
+ export * from "@contentful/optimization-core/logger";
7
+
8
+ export { }
@@ -0,0 +1,8 @@
1
+ import { default as default_2 } from '@contentful/optimization-core/logger';
2
+
3
+ export default default_2;
4
+
5
+
6
+ export * from "@contentful/optimization-core/logger";
7
+
8
+ export { }
@@ -0,0 +1,8 @@
1
+ import { default as default_2 } from '@contentful/optimization-core/logger';
2
+
3
+ export default default_2;
4
+
5
+
6
+ export * from "@contentful/optimization-core/logger";
7
+
8
+ export { }
@@ -0,0 +1,4 @@
1
+ import * as __rspack_external__contentful_optimization_core_logger_01eb57e0 from "@contentful/optimization-core/logger";
2
+ var default_0 = __rspack_external__contentful_optimization_core_logger_01eb57e0["default"];
3
+ export * from "@contentful/optimization-core/logger";
4
+ export default default_0;
package/package.json CHANGED
@@ -1,24 +1,92 @@
1
1
  {
2
2
  "name": "@contentful/optimization-node",
3
- "version": "0.1.0-alpha",
3
+ "version": "0.1.0-alpha11",
4
4
  "license": "MIT",
5
- "type": "commonjs",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/contentful/optimization.git",
8
+ "directory": "packages/node/node-sdk"
9
+ },
10
+ "type": "module",
6
11
  "main": "./dist/index.cjs",
7
12
  "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.ts",
13
+ "types": "./dist/index.d.mts",
9
14
  "exports": {
10
15
  ".": {
11
- "types": "./dist/index.d.ts",
12
- "require": "./dist/index.cjs",
13
- "import": "./dist/index.mjs"
16
+ "import": {
17
+ "types": "./dist/index.d.mts",
18
+ "default": "./dist/index.mjs"
19
+ },
20
+ "require": {
21
+ "types": "./dist/index.d.cts",
22
+ "default": "./dist/index.cjs"
23
+ }
24
+ },
25
+ "./logger": {
26
+ "import": {
27
+ "types": "./dist/logger.d.mts",
28
+ "default": "./dist/logger.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/logger.d.cts",
32
+ "default": "./dist/logger.cjs"
33
+ }
34
+ },
35
+ "./constants": {
36
+ "import": {
37
+ "types": "./dist/constants.d.mts",
38
+ "default": "./dist/constants.mjs"
39
+ },
40
+ "require": {
41
+ "types": "./dist/constants.d.cts",
42
+ "default": "./dist/constants.cjs"
43
+ }
44
+ },
45
+ "./core-sdk": {
46
+ "import": {
47
+ "types": "./dist/core-sdk.d.mts",
48
+ "default": "./dist/core-sdk.mjs"
49
+ },
50
+ "require": {
51
+ "types": "./dist/core-sdk.d.cts",
52
+ "default": "./dist/core-sdk.cjs"
53
+ }
54
+ },
55
+ "./api-client": {
56
+ "import": {
57
+ "types": "./dist/api-client.d.mts",
58
+ "default": "./dist/api-client.mjs"
59
+ },
60
+ "require": {
61
+ "types": "./dist/api-client.d.cts",
62
+ "default": "./dist/api-client.cjs"
63
+ }
64
+ },
65
+ "./api-schemas": {
66
+ "import": {
67
+ "types": "./dist/api-schemas.d.mts",
68
+ "default": "./dist/api-schemas.mjs"
69
+ },
70
+ "require": {
71
+ "types": "./dist/api-schemas.d.cts",
72
+ "default": "./dist/api-schemas.cjs"
73
+ }
14
74
  },
15
75
  "./package.json": "./package.json"
16
76
  },
17
77
  "files": [
18
78
  "dist/**/*"
19
79
  ],
80
+ "buildTools": {
81
+ "bundleSize": {
82
+ "gzipBudgets": {
83
+ "index.cjs": 1200,
84
+ "index.mjs": 500
85
+ }
86
+ }
87
+ },
20
88
  "dependencies": {
21
- "es-toolkit": "^1.39.10",
22
- "@contentful/optimization-core": "0.1.0-alpha"
89
+ "es-toolkit": "^1.44.0",
90
+ "@contentful/optimization-core": "0.1.0-alpha11"
23
91
  }
24
92
  }