diff --git a/apps/google-docs/contentful-app-manifest.json b/apps/google-docs/contentful-app-manifest.json index 6163a4ec75..96a19c3a2d 100644 --- a/apps/google-docs/contentful-app-manifest.json +++ b/apps/google-docs/contentful-app-manifest.json @@ -28,8 +28,8 @@ }, { "id": "prompt", - "name": "Prompt fromt he user", - "type": "String", + "name": "Prompt from the user", + "type": "Symbol", "required": true } ] diff --git a/apps/google-docs/functions/agents/documentParser.agent.ts b/apps/google-docs/functions/agents/documentParser.agent.ts index e7d650a259..23b29220f3 100644 --- a/apps/google-docs/functions/agents/documentParser.agent.ts +++ b/apps/google-docs/functions/agents/documentParser.agent.ts @@ -13,7 +13,7 @@ import { generateText } from 'ai'; /** * Configuration for the content type parser */ -interface ContentTypeParserConfig { +interface DocumentParserConfig { openaiApiKey: string; modelVersion: string; jsonData: any; @@ -25,7 +25,7 @@ interface ContentTypeParserConfig { * @param config - Parser configuration * @returns Promise resolving to LLM response */ -export async function createDocument(config: ContentTypeParserConfig) { +export async function createDocument(config: DocumentParserConfig) { const { openaiApiKey, modelVersion, jsonData, document } = config; const prompt = buildPrompt(jsonData); return await callOpenAI(prompt, modelVersion, openaiApiKey); diff --git a/apps/google-docs/package-lock.json b/apps/google-docs/package-lock.json index 4ca6448c4a..24620ed4b9 100644 --- a/apps/google-docs/package-lock.json +++ b/apps/google-docs/package-lock.json @@ -7798,20 +7798,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "node_modules/zod": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", diff --git a/apps/google-docs/package.json b/apps/google-docs/package.json index 6aac2f42d4..8e41b8ee78 100644 --- a/apps/google-docs/package.json +++ b/apps/google-docs/package.json @@ -18,18 +18,16 @@ "scripts": { "start": "vite", "dev": "vite", - "build": "vite build", "preview": "vite preview", "test": "vitest", + "build": "rimraf build && npm run build:frontend && npm run build:functions", + "build:frontend": "rm -rf build && tsc && vite build", + "build:functions": "contentful-app-scripts build-functions --ci", "create-app-definition": "contentful-app-scripts create-app-definition", - "deploy": "contentful-app-scripts upload --ci --bundle-dir ./build --organization-id ${DEFINITIONS_ORG_ID} --definition-id {3EaGZUMKRKVZUyrcoNJ4o4} --token ${CONTENTFUL_CMA_TOKEN}", "upload": "contentful-app-scripts upload --bundle-dir ./build", "upload-ci": "contentful-app-scripts upload --ci --bundle-dir ./build --organization-id $CONTENTFUL_ORG_ID --definition-id $CONTENTFUL_APP_DEF_ID --token $CONTENTFUL_ACCESS_TOKEN", - "upsert-actions": "contentful-app-scripts upsert-actions --ci --organization-id $CONTENTFUL_ORG_ID --definition-id $CONTENTFUL_APP_DEF_ID --token $CONTENTFUL_ACCESS_TOKEN", - "build:functions": "contentful-app-scripts build-functions --ci", - "deploy:dev": "source .env && contentful-app-scripts upload --ci --bundle-dir ./build --organization-id \"$DEFINITIONS_ORG_ID\" --definition-id {653vTnuQw3j5onU1tUoH6t} --token \"$CONTENTFUL_CMA_TOKEN\"", - "upload-ci:dev": "source .env && contentful-app-scripts upload --ci --bundle-dir ./build --organization-id \"$CONTENTFUL_ORG_ID\" --definition-id \"$CONTENTFUL_APP_DEF_ID\" --token \"$CONTENTFUL_ACCESS_TOKEN\"", - "upsert-actions:dev": "source .env && contentful-app-scripts upsert-actions --ci --organization-id \"$CONTENTFUL_ORG_ID\" --definition-id \"$CONTENTFUL_APP_DEF_ID\" --token \"$CONTENTFUL_ACCESS_TOKEN\"" + "deploy": "contentful-app-scripts upload --ci --bundle-dir ./build --organization-id ${DEFINITIONS_ORG_ID} --definition-id 3EaGZUMKRKVZUyrcoNJ4o4 --token ${CONTENTFUL_CMA_TOKEN}", + "deploy:dev": "source .env && contentful-app-scripts upload --ci --bundle-dir ./build --organization-id \"$DEFINITIONS_ORG_ID\" --definition-id 653vTnuQw3j5onU1tUoH6t --token \"$CONTENTFUL_CMA_TOKEN\"" }, "eslintConfig": { "extends": "react-app" diff --git a/apps/google-docs/tsconfig.json b/apps/google-docs/tsconfig.json index 697fd88e96..84a37f5ee6 100644 --- a/apps/google-docs/tsconfig.json +++ b/apps/google-docs/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "target": "ESNext", "lib": ["DOM", "DOM.Iterable", "ESNext"], + "types": ["vitest/globals"], "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, diff --git a/apps/rich-text-versioning/package-lock.json b/apps/rich-text-versioning/package-lock.json index 3945ea0a6f..9adf4c7e24 100644 --- a/apps/rich-text-versioning/package-lock.json +++ b/apps/rich-text-versioning/package-lock.json @@ -111,7 +111,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.3.tgz", "integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==", "devOptional": true, - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", @@ -308,7 +307,6 @@ "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/parser": "^7.27.2", @@ -386,7 +384,6 @@ "resolved": "https://registry.npmjs.org/@contentful/app-sdk/-/app-sdk-4.45.0.tgz", "integrity": "sha512-3NCLi7B/VL17k3iMA+0hsycFn6mrDyKIE3LZPRfJjFtcFO7OVZwQ4Aysp0e2Hbatrppin3QIc8feTdg59JMNkQ==", "license": "MIT", - "peer": true, "dependencies": { "contentful-management": "^11.57.1" } @@ -3494,7 +3491,6 @@ "url": "https://opencollective.com/csstools" } ], - "peer": true, "engines": { "node": ">=18" }, @@ -3517,7 +3513,6 @@ "url": "https://opencollective.com/csstools" } ], - "peer": true, "engines": { "node": ">=18" } @@ -3539,7 +3534,6 @@ "resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-6.3.1.tgz", "integrity": "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==", "license": "MIT", - "peer": true, "dependencies": { "@dnd-kit/accessibility": "^3.1.1", "@dnd-kit/utilities": "^3.2.2", @@ -4158,7 +4152,6 @@ "resolved": "https://registry.npmjs.org/@lingui/core/-/core-5.5.1.tgz", "integrity": "sha512-jxmeLTnKKbnVaLUllHpnM3XolFipHqgr0hQkuAj5+SGTGimaHx6RyGm/YL5FxWeYMt7wRRoH86SIJ3sn44pxAw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.20.13", "@lingui/message-utils": "5.5.1" @@ -4239,7 +4232,6 @@ "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -4921,7 +4913,8 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/@types/babel__core": { "version": "7.20.5", @@ -5004,7 +4997,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", "dev": true, - "peer": true, "dependencies": { "undici-types": "~7.8.0" } @@ -5018,7 +5010,6 @@ "version": "19.1.9", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.9.tgz", "integrity": "sha512-WmdoynAX8Stew/36uTSVMcLJJ1KRh6L3IZRx1PZ7qJtBqT3dYTgyDTx8H1qoRghErydW7xw9mSJ3wS//tCRpFA==", - "peer": true, "dependencies": { "csstype": "^3.0.2" } @@ -5028,7 +5019,6 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.7.tgz", "integrity": "sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw==", "devOptional": true, - "peer": true, "peerDependencies": { "@types/react": "^19.0.0" } @@ -5087,7 +5077,6 @@ "resolved": "https://registry.npmjs.org/@udecode/plate-common/-/plate-common-36.5.9.tgz", "integrity": "sha512-lQaMkd6ZeCiUd6IBUkdDmbTSIpzzfR2rsynU3irRE0PH3/s8kMDI3cvZSeUS1CgvwokwJoRW6dBcRDChhmAXxw==", "license": "MIT", - "peer": true, "dependencies": { "@udecode/plate-core": "36.5.9", "@udecode/plate-utils": "36.5.9", @@ -5773,7 +5762,6 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", - "peer": true, "dependencies": { "@babel/runtime": "^7.7.2", "cosmiconfig": "^6.0.0", @@ -5881,7 +5869,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001735", "electron-to-chromium": "^1.5.204", @@ -6320,7 +6307,6 @@ "version": "2.30.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "peer": true, "dependencies": { "@babel/runtime": "^7.21.0" }, @@ -6428,7 +6414,8 @@ "version": "0.5.16", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", - "dev": true + "dev": true, + "peer": true }, "node_modules/dompurify": { "version": "3.2.6", @@ -6594,7 +6581,6 @@ "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", "dev": true, "hasInstallScript": true, - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -7144,7 +7130,6 @@ "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz", "integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==", "license": "MIT", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/immer" @@ -7339,7 +7324,6 @@ "resolved": "https://registry.npmjs.org/jotai/-/jotai-2.15.0.tgz", "integrity": "sha512-nbp/6jN2Ftxgw0VwoVnOg0m5qYM1rVcfvij+MZx99Z5IK13eGve9FJoCwGv+17JvVthTjhSmNtT5e1coJnr6aw==", "license": "MIT", - "peer": true, "engines": { "node": ">=12.20.0" }, @@ -7576,6 +7560,7 @@ "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, + "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -7889,8 +7874,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/optics-ts/-/optics-ts-2.4.1.tgz", "integrity": "sha512-HaYzMHvC80r7U/LqAd4hQyopDezC60PO2qF5GuIwALut2cl5rK1VWHsqTp0oqoJJWjiv6uXKqsO+Q2OO0C3MmQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/ora": { "version": "5.4.1", @@ -8046,7 +8030,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -8087,6 +8070,7 @@ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, + "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -8101,6 +8085,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, + "peer": true, "engines": { "node": ">=10" }, @@ -8187,7 +8172,6 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -8235,7 +8219,6 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -8682,7 +8665,6 @@ "resolved": "https://registry.npmjs.org/slate/-/slate-0.94.1.tgz", "integrity": "sha512-GH/yizXr1ceBoZ9P9uebIaHe3dC/g6Plpf9nlUwnvoyf6V1UOYrRwkabtOCd3ZfIGxomY4P7lfgLr7FPH8/BKA==", "license": "MIT", - "peer": true, "dependencies": { "immer": "^9.0.6", "is-plain-object": "^5.0.0", @@ -8694,7 +8676,6 @@ "resolved": "https://registry.npmjs.org/slate-history/-/slate-history-0.100.0.tgz", "integrity": "sha512-x5rUuWLNtH97hs9PrFovGgt3Qc5zkTm/5mcUB+0NR/TK923eLax4HsL6xACLHMs245nI6aJElyM1y6hN0y5W/Q==", "license": "MIT", - "peer": true, "dependencies": { "is-plain-object": "^5.0.0" }, @@ -8707,7 +8688,6 @@ "resolved": "https://registry.npmjs.org/slate-hyperscript/-/slate-hyperscript-0.77.0.tgz", "integrity": "sha512-M6uRpttwKnosniQORNPYQABHQ9XWC7qaSr/127LWWPjTOR5MSSwrHGrghN81BhZVqpICHrI7jkPA2813cWdHNA==", "license": "MIT", - "peer": true, "dependencies": { "is-plain-object": "^5.0.0" }, @@ -8720,7 +8700,6 @@ "resolved": "https://registry.npmjs.org/slate-react/-/slate-react-0.102.0.tgz", "integrity": "sha512-SAcFsK5qaOxXjm0hr/t2pvIxfRv6HJGzmWkG58TdH4LdJCsgKS1n6hQOakHPlRVCwPgwvngB6R+t3pPjv8MqwA==", "license": "MIT", - "peer": true, "dependencies": { "@juggle/resize-observer": "^3.4.0", "@types/is-hotkey": "^0.1.8", @@ -9253,7 +9232,6 @@ "integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -9603,7 +9581,6 @@ "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==", "license": "MIT", - "peer": true, "dependencies": { "use-sync-external-store": "^1.2.2" },