@open-mercato/shared 0.10.1-develop.7994.1.c9f31972aa → 0.10.1-develop.8004.1.a8a79ee43f

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.
@@ -1,3 +1,3 @@
1
1
  [generate-countries] up to date (259 countries)
2
- [build:shared] found 329 entry points
2
+ [build:shared] found 330 entry points
3
3
  [build:shared] built successfully
@@ -0,0 +1,59 @@
1
+ const openMercatoServerExternalPackages = [
2
+ "@ai-sdk/amazon-bedrock",
3
+ "@ai-sdk/anthropic",
4
+ "@ai-sdk/azure",
5
+ "@ai-sdk/cohere",
6
+ "@ai-sdk/gateway",
7
+ "@ai-sdk/google",
8
+ "@ai-sdk/mistral",
9
+ "@ai-sdk/openai",
10
+ "@ai-sdk/provider-utils",
11
+ "@aws-sdk/client-s3",
12
+ "@aws-sdk/client-sesv2",
13
+ "@grpc/grpc-js",
14
+ "@mikro-orm/migrations",
15
+ "@mikro-orm/postgresql",
16
+ "@mikro-orm/sql",
17
+ "@modelcontextprotocol/sdk",
18
+ "@parse/node-apn",
19
+ "@xmldom/xmldom",
20
+ "ai",
21
+ "ai-sdk-ollama",
22
+ "bcryptjs",
23
+ "bullmq",
24
+ "cron-parser",
25
+ "encoding-japanese",
26
+ "firebase-admin",
27
+ "gpt-tokenizer",
28
+ "html-to-text",
29
+ "iconv-lite",
30
+ "imapflow",
31
+ "ioredis",
32
+ "js-yaml",
33
+ "kysely",
34
+ "libmime",
35
+ "luxon",
36
+ "mailparser",
37
+ "mammoth",
38
+ "node-forge",
39
+ "node-html-markdown",
40
+ "node-html-parser",
41
+ "nodemailer",
42
+ "pg",
43
+ "postal-mime",
44
+ "protobufjs",
45
+ "rate-limiter-flexible",
46
+ "re2js",
47
+ "resend",
48
+ "semver",
49
+ "sharp",
50
+ "stripe",
51
+ "svix",
52
+ "undici",
53
+ "xmlbuilder",
54
+ "yaml"
55
+ ];
56
+ export {
57
+ openMercatoServerExternalPackages
58
+ };
59
+ //# sourceMappingURL=server-external-packages.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/lib/nextjs/server-external-packages.ts"],
4
+ "sourcesContent": ["/**\n * Node-only third-party dependencies of Open Mercato modules that the Next.js server\n * should `require` from `node_modules` instead of bundling.\n *\n * Turbopack compiles every bundled server dependency once per server layer (route\n * handlers, React Server Components, SSR), so these packages otherwise dominate the\n * dev server's module graph and memory. Only list packages that never touch React,\n * do not need bundler transforms, and are never `require()`d by bundled CommonJS code\n * when they ship only ES modules (Turbopack cannot externalize those; `happy-dom`,\n * loaded through `@tiptap/html/server`, is the known case). This config-only\n * entrypoint has no runtime imports and is safe to evaluate from `next.config.ts`.\n */\nexport const openMercatoServerExternalPackages = [\n '@ai-sdk/amazon-bedrock',\n '@ai-sdk/anthropic',\n '@ai-sdk/azure',\n '@ai-sdk/cohere',\n '@ai-sdk/gateway',\n '@ai-sdk/google',\n '@ai-sdk/mistral',\n '@ai-sdk/openai',\n '@ai-sdk/provider-utils',\n '@aws-sdk/client-s3',\n '@aws-sdk/client-sesv2',\n '@grpc/grpc-js',\n '@mikro-orm/migrations',\n '@mikro-orm/postgresql',\n '@mikro-orm/sql',\n '@modelcontextprotocol/sdk',\n '@parse/node-apn',\n '@xmldom/xmldom',\n 'ai',\n 'ai-sdk-ollama',\n 'bcryptjs',\n 'bullmq',\n 'cron-parser',\n 'encoding-japanese',\n 'firebase-admin',\n 'gpt-tokenizer',\n 'html-to-text',\n 'iconv-lite',\n 'imapflow',\n 'ioredis',\n 'js-yaml',\n 'kysely',\n 'libmime',\n 'luxon',\n 'mailparser',\n 'mammoth',\n 'node-forge',\n 'node-html-markdown',\n 'node-html-parser',\n 'nodemailer',\n 'pg',\n 'postal-mime',\n 'protobufjs',\n 'rate-limiter-flexible',\n 're2js',\n 'resend',\n 'semver',\n 'sharp',\n 'stripe',\n 'svix',\n 'undici',\n 'xmlbuilder',\n 'yaml',\n] as const\n"],
5
+ "mappings": "AAYO,MAAM,oCAAoC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
+ "names": []
7
+ }
@@ -1,4 +1,4 @@
1
- const APP_VERSION = "0.10.1-develop.7994.1.c9f31972aa";
1
+ const APP_VERSION = "0.10.1-develop.8004.1.a8a79ee43f";
2
2
  const appVersion = APP_VERSION;
3
3
  export {
4
4
  APP_VERSION,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/lib/version.ts"],
4
- "sourcesContent": ["// Build-time generated version\nexport const APP_VERSION = '0.10.1-develop.7994.1.c9f31972aa';\nexport const appVersion = APP_VERSION;\n"],
4
+ "sourcesContent": ["// Build-time generated version\nexport const APP_VERSION = '0.10.1-develop.8004.1.a8a79ee43f';\nexport const appVersion = APP_VERSION;\n"],
5
5
  "mappings": "AACO,MAAM,cAAc;AACpB,MAAM,aAAa;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/shared",
3
- "version": "0.10.1-develop.7994.1.c9f31972aa",
3
+ "version": "0.10.1-develop.8004.1.a8a79ee43f",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -130,7 +130,7 @@
130
130
  "@mikro-orm/core": "^7.1.14",
131
131
  "@mikro-orm/decorators": "^7.1.14",
132
132
  "@mikro-orm/postgresql": "^7.1.14",
133
- "@open-mercato/cache": "0.10.1-develop.7994.1.c9f31972aa",
133
+ "@open-mercato/cache": "0.10.1-develop.8004.1.a8a79ee43f",
134
134
  "@types/html-to-text": "^9.0.4",
135
135
  "@types/sanitize-html": "^2.16.1",
136
136
  "dotenv": "^17.4.2",
@@ -0,0 +1,32 @@
1
+ import fs from 'node:fs'
2
+ import path from 'node:path'
3
+
4
+ import { openMercatoServerExternalPackages } from '../server-external-packages'
5
+
6
+ type PackageManifest = {
7
+ dependencies?: Record<string, string>
8
+ peerDependencies?: Record<string, string>
9
+ }
10
+
11
+ function readInstalledManifest(packageName: string): PackageManifest | null {
12
+ let directory = __dirname
13
+ for (;;) {
14
+ const candidate = path.join(directory, 'node_modules', packageName, 'package.json')
15
+ if (fs.existsSync(candidate)) return JSON.parse(fs.readFileSync(candidate, 'utf8')) as PackageManifest
16
+ const parent = path.dirname(directory)
17
+ if (parent === directory) return null
18
+ directory = parent
19
+ }
20
+ }
21
+
22
+ describe('openMercatoServerExternalPackages', () => {
23
+ it.each(openMercatoServerExternalPackages.map((name) => [name]))(
24
+ '%s is installed and does not depend on React',
25
+ (packageName) => {
26
+ const manifest = readInstalledManifest(packageName)
27
+ expect(manifest).not.toBeNull()
28
+ const declared = Object.keys({ ...manifest?.dependencies, ...manifest?.peerDependencies })
29
+ expect(declared.filter((name) => name === 'react' || name === 'react-dom')).toEqual([])
30
+ },
31
+ )
32
+ })
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Node-only third-party dependencies of Open Mercato modules that the Next.js server
3
+ * should `require` from `node_modules` instead of bundling.
4
+ *
5
+ * Turbopack compiles every bundled server dependency once per server layer (route
6
+ * handlers, React Server Components, SSR), so these packages otherwise dominate the
7
+ * dev server's module graph and memory. Only list packages that never touch React,
8
+ * do not need bundler transforms, and are never `require()`d by bundled CommonJS code
9
+ * when they ship only ES modules (Turbopack cannot externalize those; `happy-dom`,
10
+ * loaded through `@tiptap/html/server`, is the known case). This config-only
11
+ * entrypoint has no runtime imports and is safe to evaluate from `next.config.ts`.
12
+ */
13
+ export const openMercatoServerExternalPackages = [
14
+ '@ai-sdk/amazon-bedrock',
15
+ '@ai-sdk/anthropic',
16
+ '@ai-sdk/azure',
17
+ '@ai-sdk/cohere',
18
+ '@ai-sdk/gateway',
19
+ '@ai-sdk/google',
20
+ '@ai-sdk/mistral',
21
+ '@ai-sdk/openai',
22
+ '@ai-sdk/provider-utils',
23
+ '@aws-sdk/client-s3',
24
+ '@aws-sdk/client-sesv2',
25
+ '@grpc/grpc-js',
26
+ '@mikro-orm/migrations',
27
+ '@mikro-orm/postgresql',
28
+ '@mikro-orm/sql',
29
+ '@modelcontextprotocol/sdk',
30
+ '@parse/node-apn',
31
+ '@xmldom/xmldom',
32
+ 'ai',
33
+ 'ai-sdk-ollama',
34
+ 'bcryptjs',
35
+ 'bullmq',
36
+ 'cron-parser',
37
+ 'encoding-japanese',
38
+ 'firebase-admin',
39
+ 'gpt-tokenizer',
40
+ 'html-to-text',
41
+ 'iconv-lite',
42
+ 'imapflow',
43
+ 'ioredis',
44
+ 'js-yaml',
45
+ 'kysely',
46
+ 'libmime',
47
+ 'luxon',
48
+ 'mailparser',
49
+ 'mammoth',
50
+ 'node-forge',
51
+ 'node-html-markdown',
52
+ 'node-html-parser',
53
+ 'nodemailer',
54
+ 'pg',
55
+ 'postal-mime',
56
+ 'protobufjs',
57
+ 'rate-limiter-flexible',
58
+ 're2js',
59
+ 'resend',
60
+ 'semver',
61
+ 'sharp',
62
+ 'stripe',
63
+ 'svix',
64
+ 'undici',
65
+ 'xmlbuilder',
66
+ 'yaml',
67
+ ] as const