@kitsy/cnos-next 1.2.0 → 1.4.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/index.cjs CHANGED
@@ -24,7 +24,8 @@ __export(index_exports, {
24
24
  withCnosNext: () => withCnosNext
25
25
  });
26
26
  module.exports = __toCommonJS(index_exports);
27
- var import_cnos = require("@kitsy/cnos");
27
+ var import_build = require("@kitsy/cnos/build");
28
+ var import_configure = require("@kitsy/cnos/configure");
28
29
  function resolveRuntimeOptions(options, phase) {
29
30
  const profile = options.profile ?? options.profileFromPhase?.(phase);
30
31
  return {
@@ -39,7 +40,7 @@ async function resolveBaseConfig(config, phase, context) {
39
40
  return config;
40
41
  }
41
42
  async function loadCnosNextEnv(options = {}, phase = "phase-production-build") {
42
- const runtime = await (0, import_cnos.createCnos)(resolveRuntimeOptions(options, phase));
43
+ const runtime = await (0, import_configure.createCnos)(resolveRuntimeOptions(options, phase));
43
44
  return runtime.toPublicEnv({
44
45
  framework: "next",
45
46
  ...options.prefix ? { prefix: options.prefix } : {}
@@ -50,7 +51,7 @@ function withCnosNext(config = {}, options = {}) {
50
51
  const [baseConfig, publicEnv, browserData] = await Promise.all([
51
52
  resolveBaseConfig(config, phase, context),
52
53
  loadCnosNextEnv(options, phase),
53
- (0, import_cnos.resolveBrowserData)(resolveRuntimeOptions(options, phase))
54
+ (0, import_build.resolveBrowserData)(resolveRuntimeOptions(options, phase))
54
55
  ]);
55
56
  return {
56
57
  ...baseConfig,
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { CnosCreateOptions } from '@kitsy/cnos';
1
+ import { CnosCreateOptions } from '@kitsy/cnos/configure';
2
2
 
3
3
  interface NextConfigLike {
4
4
  env?: Record<string, string>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CnosCreateOptions } from '@kitsy/cnos';
1
+ import { CnosCreateOptions } from '@kitsy/cnos/configure';
2
2
 
3
3
  interface NextConfigLike {
4
4
  env?: Record<string, string>;
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // src/index.ts
2
- import { createCnos, resolveBrowserData } from "@kitsy/cnos";
2
+ import { resolveBrowserData } from "@kitsy/cnos/build";
3
+ import { createCnos } from "@kitsy/cnos/configure";
3
4
  function resolveRuntimeOptions(options, phase) {
4
5
  const profile = options.profile ?? options.profileFromPhase?.(phase);
5
6
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitsy/cnos-next",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Next.js integration for CNOS public config injection.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -35,7 +35,7 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@kitsy/cnos": "1.2.0"
38
+ "@kitsy/cnos": "1.4.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "next": ">=14"