@uniformdev/canvas-next-rsc 20.7.1-alpha.89 → 20.7.1-alpha.91

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/config.d.mts CHANGED
@@ -1,6 +1,13 @@
1
1
  import { NextConfig } from 'next';
2
2
  export { UniformServerConfig } from '@uniformdev/canvas-next-rsc-shared';
3
3
 
4
+ /**
5
+ * Wraps the Next.js config to set up the Uniform server config alias.
6
+ * This enables the `uniform.server.config` import to resolve to the project's config file.
7
+ *
8
+ * @param nextConfig - The Next.js configuration object
9
+ * @returns The modified Next.js configuration with Uniform config alias set up
10
+ */
4
11
  declare const withUniformConfig: (nextConfig: NextConfig) => NextConfig;
5
12
 
6
13
  export { withUniformConfig };
package/dist/config.d.ts CHANGED
@@ -1,6 +1,13 @@
1
1
  import { NextConfig } from 'next';
2
2
  export { UniformServerConfig } from '@uniformdev/canvas-next-rsc-shared';
3
3
 
4
+ /**
5
+ * Wraps the Next.js config to set up the Uniform server config alias.
6
+ * This enables the `uniform.server.config` import to resolve to the project's config file.
7
+ *
8
+ * @param nextConfig - The Next.js configuration object
9
+ * @returns The modified Next.js configuration with Uniform config alias set up
10
+ */
4
11
  declare const withUniformConfig: (nextConfig: NextConfig) => NextConfig;
5
12
 
6
13
  export { withUniformConfig };
package/dist/config.js CHANGED
@@ -47,34 +47,28 @@ var getConfigPath = () => {
47
47
  };
48
48
  };
49
49
  var withUniformConfig = (nextConfig) => {
50
- var _a, _b, _c;
51
- const { fileName: uniformConfigFileName } = getConfigPath() || {};
52
- const turboResolveAliases = {
53
- ...((_b = (_a = nextConfig.experimental) == null ? void 0 : _a.turbo) == null ? void 0 : _b.resolveAlias) || {}
50
+ var _a;
51
+ const { fileName: uniformConfigFileName, filePath: uniformConfigFilePath } = getConfigPath() || {};
52
+ const turbopackResolveAlias = {
53
+ ...(_a = nextConfig.turbopack) == null ? void 0 : _a.resolveAlias
54
54
  };
55
55
  if (uniformConfigFileName) {
56
- console.log("(Turbo) Using Uniform config from", uniformConfigFileName);
57
- turboResolveAliases["uniform.server.config"] = `./${uniformConfigFileName}`;
56
+ console.log("(Turbopack) Using Uniform config from", uniformConfigFileName);
57
+ turbopackResolveAlias["uniform.server.config"] = `./${uniformConfigFileName}`;
58
58
  }
59
59
  return {
60
60
  ...nextConfig,
61
- experimental: {
62
- ...nextConfig.experimental || {},
63
- turbo: {
64
- ...((_c = nextConfig.experimental) == null ? void 0 : _c.turbo) || {},
65
- resolveAlias: turboResolveAliases
66
- }
61
+ turbopack: {
62
+ ...nextConfig.turbopack,
63
+ resolveAlias: turbopackResolveAlias
67
64
  },
68
65
  webpack: (config, context) => {
69
66
  if (nextConfig.webpack) {
70
67
  nextConfig.webpack(config, context);
71
68
  }
72
- if (context.isServer) {
73
- const { filePath: uniformConfigPath } = getConfigPath() || {};
74
- if (uniformConfigPath) {
75
- console.log("Using Uniform config from", uniformConfigPath);
76
- config.resolve.alias["uniform.server.config"] = (0, import_path.resolve)(config.context, uniformConfigPath);
77
- }
69
+ if (context.isServer && uniformConfigFilePath) {
70
+ console.log("(Webpack) Using Uniform config from", uniformConfigFilePath);
71
+ config.resolve.alias["uniform.server.config"] = (0, import_path.resolve)(config.context, uniformConfigFilePath);
78
72
  }
79
73
  return config;
80
74
  }
package/dist/config.mjs CHANGED
@@ -23,34 +23,28 @@ var getConfigPath = () => {
23
23
  };
24
24
  };
25
25
  var withUniformConfig = (nextConfig) => {
26
- var _a, _b, _c;
27
- const { fileName: uniformConfigFileName } = getConfigPath() || {};
28
- const turboResolveAliases = {
29
- ...((_b = (_a = nextConfig.experimental) == null ? void 0 : _a.turbo) == null ? void 0 : _b.resolveAlias) || {}
26
+ var _a;
27
+ const { fileName: uniformConfigFileName, filePath: uniformConfigFilePath } = getConfigPath() || {};
28
+ const turbopackResolveAlias = {
29
+ ...(_a = nextConfig.turbopack) == null ? void 0 : _a.resolveAlias
30
30
  };
31
31
  if (uniformConfigFileName) {
32
- console.log("(Turbo) Using Uniform config from", uniformConfigFileName);
33
- turboResolveAliases["uniform.server.config"] = `./${uniformConfigFileName}`;
32
+ console.log("(Turbopack) Using Uniform config from", uniformConfigFileName);
33
+ turbopackResolveAlias["uniform.server.config"] = `./${uniformConfigFileName}`;
34
34
  }
35
35
  return {
36
36
  ...nextConfig,
37
- experimental: {
38
- ...nextConfig.experimental || {},
39
- turbo: {
40
- ...((_c = nextConfig.experimental) == null ? void 0 : _c.turbo) || {},
41
- resolveAlias: turboResolveAliases
42
- }
37
+ turbopack: {
38
+ ...nextConfig.turbopack,
39
+ resolveAlias: turbopackResolveAlias
43
40
  },
44
41
  webpack: (config, context) => {
45
42
  if (nextConfig.webpack) {
46
43
  nextConfig.webpack(config, context);
47
44
  }
48
- if (context.isServer) {
49
- const { filePath: uniformConfigPath } = getConfigPath() || {};
50
- if (uniformConfigPath) {
51
- console.log("Using Uniform config from", uniformConfigPath);
52
- config.resolve.alias["uniform.server.config"] = resolve(config.context, uniformConfigPath);
53
- }
45
+ if (context.isServer && uniformConfigFilePath) {
46
+ console.log("(Webpack) Using Uniform config from", uniformConfigFilePath);
47
+ config.resolve.alias["uniform.server.config"] = resolve(config.context, uniformConfigFilePath);
54
48
  }
55
49
  return config;
56
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc",
3
- "version": "20.7.1-alpha.89+4d51815837",
3
+ "version": "20.7.1-alpha.91+61be4bcc91",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -61,15 +61,15 @@
61
61
  "react-dom": "18.3.1"
62
62
  },
63
63
  "dependencies": {
64
- "@uniformdev/canvas": "20.7.1-alpha.89+4d51815837",
65
- "@uniformdev/canvas-next-rsc-client": "^20.7.1-alpha.89+4d51815837",
66
- "@uniformdev/canvas-next-rsc-shared": "^20.7.1-alpha.89+4d51815837",
67
- "@uniformdev/canvas-react": "20.7.1-alpha.89+4d51815837",
68
- "@uniformdev/context": "20.7.1-alpha.89+4d51815837",
69
- "@uniformdev/project-map": "20.7.1-alpha.89+4d51815837",
70
- "@uniformdev/redirect": "20.7.1-alpha.89+4d51815837",
71
- "@uniformdev/richtext": "20.7.1-alpha.89+4d51815837",
72
- "@uniformdev/webhooks": "20.7.1-alpha.89+4d51815837",
64
+ "@uniformdev/canvas": "20.7.1-alpha.91+61be4bcc91",
65
+ "@uniformdev/canvas-next-rsc-client": "^20.7.1-alpha.91+61be4bcc91",
66
+ "@uniformdev/canvas-next-rsc-shared": "^20.7.1-alpha.91+61be4bcc91",
67
+ "@uniformdev/canvas-react": "20.7.1-alpha.91+61be4bcc91",
68
+ "@uniformdev/context": "20.7.1-alpha.91+61be4bcc91",
69
+ "@uniformdev/project-map": "20.7.1-alpha.91+61be4bcc91",
70
+ "@uniformdev/redirect": "20.7.1-alpha.91+61be4bcc91",
71
+ "@uniformdev/richtext": "20.7.1-alpha.91+61be4bcc91",
72
+ "@uniformdev/webhooks": "20.7.1-alpha.91+61be4bcc91",
73
73
  "@vercel/edge-config": "^0.4.0",
74
74
  "encoding": "^0.1.13",
75
75
  "server-only": "^0.0.1",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "4d518158374bf5fadb4ee79dc4d6e89f89d83160"
89
+ "gitHead": "61be4bcc9119659d01d123b63c0fcd0ab37389cb"
90
90
  }