chore: 增加 build:statging
This commit is contained in:
		
							parent
							
								
									5f8609fc02
								
							
						
					
					
						commit
						6016504c94
					
				| @ -5,6 +5,7 @@ | ||||
|   "type": "module", | ||||
|   "scripts": { | ||||
|     "build": "vitepress build", | ||||
|     "build:staging": "vitepress build --mode staging", | ||||
|     "dev": "vitepress dev", | ||||
|     "docs:preview": "vitepress preview" | ||||
|   }, | ||||
|  | ||||
| @ -10,6 +10,7 @@ | ||||
|   "scripts": { | ||||
|     "build": "pnpm vite build --mode production", | ||||
|     "build:analyze": "pnpm vite build --mode analyze", | ||||
|     "build:staging": "pnpm vite build --mode staging", | ||||
|     "dev": "pnpm vite --mode development", | ||||
|     "preview": "vite preview", | ||||
|     "typecheck": "vue-tsc --noEmit --skipLibCheck" | ||||
|  | ||||
| @ -1,76 +0,0 @@ | ||||
| <script setup lang="ts"> | ||||
| import { onMounted, ref } from 'vue'; | ||||
| import { useRoute } from 'vue-router'; | ||||
| 
 | ||||
| import Postmate from 'postmate'; | ||||
| 
 | ||||
| import { useUserStore } from '#/store/user'; | ||||
| 
 | ||||
| const userStore = useUserStore(); | ||||
| 
 | ||||
| // const MAX_RETRIES = 3; | ||||
| const route = useRoute(); | ||||
| // const MAX_RETRIES = 3; | ||||
| 
 | ||||
| const loading = ref(true); | ||||
| const errorMessage = ref(''); | ||||
| // const retryCount = ref(0); | ||||
| 
 | ||||
| const initPostmate = async () => { | ||||
|   loading.value = true; | ||||
|   errorMessage.value = ''; | ||||
|   const container = document.querySelector('#low-code-adapter'); | ||||
|   if (!container) { | ||||
|     errorMessage.value = '容器元素未找到'; | ||||
|     loading.value = false; | ||||
|     return; | ||||
|   } | ||||
| 
 | ||||
|   const connection = new Postmate({ | ||||
|     container, | ||||
|     url: route.meta?.app?.url, | ||||
|     name: 'y-code-renderer', | ||||
|     classListArray: ['responsive-iframe'], | ||||
|     model: { | ||||
|       accessToken: userStore.token, | ||||
|       name: route.meta?.app?.name, | ||||
|       applicationId: route.meta?.app?.applicationId, | ||||
|       projectId: route.meta?.app?.projectId, | ||||
|       fileId: route.meta?.app?.fileId, | ||||
|       url: route.meta?.app?.url, | ||||
|     }, | ||||
|   }); | ||||
| 
 | ||||
|   connection.then((child) => { | ||||
|     // console.log('Postmate 连接成功', child); | ||||
|     child.on('some-event', (data) => console.log(data)); // Logs "Hello, World!" | ||||
|     child.call('child-connected', { | ||||
|       name: route.meta?.app?.name, | ||||
|     }); | ||||
|     // retryCount.value = 0; // 重置重试计数器 | ||||
|   }); | ||||
| }; | ||||
| 
 | ||||
| onMounted(() => { | ||||
|   initPostmate(); | ||||
| }); | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|   <div id="low-code-adapter"></div> | ||||
| </template> | ||||
| 
 | ||||
| <style> | ||||
| .responsive-iframe { | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
|   border: none; | ||||
| } | ||||
| </style> | ||||
| 
 | ||||
| <style lang="scss" scoped> | ||||
| #low-code-adapter { | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @ -16,6 +16,10 @@ | ||||
|       "dependsOn": ["@sy/vue3-renderer-adapter#build", "^build"], | ||||
|       "outputs": ["dist/**"] | ||||
|     }, | ||||
|     "build:staging": { | ||||
|       "dependsOn": ["@sy/vue3-renderer-adapter#build", "^build:staging"], | ||||
|       "outputs": ["dist/**"] | ||||
|     }, | ||||
|     "dev": { | ||||
|       "dependsOn": ["@sy/vue3-renderer-adapter#build"], | ||||
|       "outputs": [], | ||||
|  | ||||
| @ -5,7 +5,7 @@ | ||||
|   "scripts": { | ||||
|     "dev": "vite dev --mode development", | ||||
|     "build": "vite build --mode production", | ||||
|     "build:staging": "vite build --mode staging", | ||||
|     "#build:staging": "vite build --mode staging", | ||||
|     "build:dev": "vite build --mode development", | ||||
|     "preview": "vite preview", | ||||
|     "typecheck": "vue-tsc --noEmit --skipLibCheck" | ||||
|  | ||||
| @ -8,6 +8,10 @@ | ||||
|       "dependsOn": ["@sy/web-vitals#build"], | ||||
|       "outputs": ["dist/**", "dist.zip"] | ||||
|     }, | ||||
|     "build:staging": { | ||||
|       "dependsOn": ["@sy/web-vitals#build"], | ||||
|       "outputs": ["dist/**"] | ||||
|     }, | ||||
|     "preview": { | ||||
|       "dependsOn": ["@sy/web-vitals#build"], | ||||
|       "outputs": ["dist/**"] | ||||
|  | ||||
| @ -104,6 +104,14 @@ const customConfig: Linter.Config[] = [ | ||||
|       ], | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|     // @core/shared内部组件,不能引入@vben/* 或者 @vben-core/* 里面的包
 | ||||
|     files: ['packages/renderer-adapter/**/**'], | ||||
|     ignores: restrictedImportIgnores, | ||||
|     rules: { | ||||
|       'no-console': 'off', | ||||
|     }, | ||||
|   }, | ||||
| 
 | ||||
|   { | ||||
|     // 不能引入@vben/*里面的包
 | ||||
|  | ||||
| @ -16,6 +16,7 @@ | ||||
|   "type": "module", | ||||
|   "scripts": { | ||||
|     "build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build", | ||||
|     "build:staging": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo run build:staging", | ||||
|     "build:analyze": "turbo build:analyze", | ||||
|     "build:docker": "./scripts/deploy/build-local-docker-image.sh", | ||||
|     "build:docs": "pnpm run build --filter=@vben/docs", | ||||
|  | ||||
| @ -5,15 +5,13 @@ import Postmate from 'postmate'; | ||||
| 
 | ||||
| const props = defineProps<{ | ||||
|   accessToken?: string; | ||||
|   applicationId: string; | ||||
|   fileId: string; | ||||
|   applicationId: number | string; | ||||
|   fileId: number | string; | ||||
|   name: string; | ||||
|   projectId: string; | ||||
|   projectId: number | string; | ||||
|   url: string; | ||||
| }>(); | ||||
| 
 | ||||
| Console.log('props', props); | ||||
| 
 | ||||
| const initPostmate = async () => { | ||||
|   const container = document.querySelector('#low-code-adapter'); | ||||
|   if (!container) { | ||||
| @ -38,6 +36,7 @@ const initPostmate = async () => { | ||||
|   connection.then((child) => { | ||||
|     child.frame.style.height = '100%'; | ||||
|     child.frame.style.width = '100%'; | ||||
|     // @ts-ignore 忽略 console | ||||
|     console.log(`${props.name} 连接成功`, child); | ||||
|     child.call('child-connected', { | ||||
|       name: props.name, | ||||
| @ -51,5 +50,21 @@ onMounted(() => { | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|   <div id="low-code-adapter" style="width: 100%; height: 100%"></div> | ||||
|   <div | ||||
|     id="low-code-adapter" | ||||
|     class="low-code-adapter" | ||||
|     style="width: 100%; height: 100%" | ||||
|   ></div> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| .low-code-adapter { | ||||
|   width: 100%; | ||||
| } | ||||
| 
 | ||||
| .low-code-adapter iframe { | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
|   border: none; | ||||
| } | ||||
| </style> | ||||
|  | ||||
							
								
								
									
										22
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										22
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -494,7 +494,7 @@ catalogs: | ||||
|       version: 2.1.10 | ||||
|     vxe-pc-ui: | ||||
|       specifier: ^4.4.8 | ||||
|       version: 4.4.9 | ||||
|       version: 4.4.10 | ||||
|     vxe-table: | ||||
|       specifier: 4.10.0 | ||||
|       version: 4.10.0 | ||||
| @ -1842,7 +1842,7 @@ importers: | ||||
|         version: 3.5.13(typescript@5.8.2) | ||||
|       vxe-pc-ui: | ||||
|         specifier: 'catalog:' | ||||
|         version: 4.4.9(vue@3.5.13(typescript@5.8.2)) | ||||
|         version: 4.4.10(vue@3.5.13(typescript@5.8.2)) | ||||
|       vxe-table: | ||||
|         specifier: 'catalog:' | ||||
|         version: 4.10.0(vue@3.5.13(typescript@5.8.2)) | ||||
| @ -12646,8 +12646,8 @@ packages: | ||||
|       typescript: | ||||
|         optional: true | ||||
| 
 | ||||
|   vxe-pc-ui@4.4.9: | ||||
|     resolution: {integrity: sha512-3GiU8DIkFxwOb36jmZLLqcTn+O/67KLc1FNmUnVDyjF6ZZhu59U8vVk8fX7523qZyjYPb/3U9666viCbphnkVA==} | ||||
|   vxe-pc-ui@4.4.10: | ||||
|     resolution: {integrity: sha512-DDVKOTOWUKMng/miV9YTDWcj4FYxBBmmsUKEpHk4fCuRvZjbGazfDhE/7Nxsu9/2J0y5tNotMxT1swizQiNNZw==} | ||||
| 
 | ||||
|   vxe-table-plugin-menus@4.0.6: | ||||
|     resolution: {integrity: sha512-340W2H58hC9Qatk05Yfnq1GTzjtqmnHH0i9PK/pOnwX65w102d/UtfHe9Ax0i3uYqsbg6JuMEn6Mjnnm+/U3bQ==} | ||||
| @ -12994,8 +12994,8 @@ packages: | ||||
|   zwitch@2.0.4: | ||||
|     resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} | ||||
| 
 | ||||
|   zx@8.4.0: | ||||
|     resolution: {integrity: sha512-b5+gbUT0akQ5vVuBuHgp0viQx2ZYCuooVD41Z7g47sN0diLsAvB2XteHcp5lec90CNEQ9o7TkXsE3ksaJrZHGw==} | ||||
|   zx@8.4.1: | ||||
|     resolution: {integrity: sha512-1Cb+Tfwt/daKV6wckBeDbB6h3IMauqj9KWp+EcbYzi9doeJeIHCktxp/yWspXOXRdoUzBCQSKoUgm3g8r9fz5A==} | ||||
|     engines: {node: '>= 12.17.0'} | ||||
|     hasBin: true | ||||
| 
 | ||||
| @ -18478,7 +18478,7 @@ snapshots: | ||||
|       node-cleanup: 2.1.2 | ||||
|       typescript: 5.8.2 | ||||
|       update-notifier: 7.3.1 | ||||
|       zx: 8.4.0 | ||||
|       zx: 8.4.1 | ||||
| 
 | ||||
|   citty@0.1.6: | ||||
|     dependencies: | ||||
| @ -19141,7 +19141,7 @@ snapshots: | ||||
|     dependencies: | ||||
|       is-arguments: 1.2.0 | ||||
|       is-date-object: 1.1.0 | ||||
|       is-regex: 1.2.1 | ||||
|       is-regex: 1.1.4 | ||||
|       object-is: 1.1.6 | ||||
|       object-keys: 1.1.1 | ||||
|       regexp.prototype.flags: 1.5.4 | ||||
| @ -25713,7 +25713,7 @@ snapshots: | ||||
|     optionalDependencies: | ||||
|       typescript: 5.8.2 | ||||
| 
 | ||||
|   vxe-pc-ui@4.4.9(vue@3.5.13(typescript@5.8.2)): | ||||
|   vxe-pc-ui@4.4.10(vue@3.5.13(typescript@5.8.2)): | ||||
|     dependencies: | ||||
|       '@vxe-ui/core': 4.0.35(vue@3.5.13(typescript@5.8.2)) | ||||
|     transitivePeerDependencies: | ||||
| @ -25725,7 +25725,7 @@ snapshots: | ||||
| 
 | ||||
|   vxe-table@4.10.0(vue@3.5.13(typescript@5.8.2)): | ||||
|     dependencies: | ||||
|       vxe-pc-ui: 4.4.9(vue@3.5.13(typescript@5.8.2)) | ||||
|       vxe-pc-ui: 4.4.10(vue@3.5.13(typescript@5.8.2)) | ||||
|     transitivePeerDependencies: | ||||
|       - vue | ||||
| 
 | ||||
| @ -26134,4 +26134,4 @@ snapshots: | ||||
| 
 | ||||
|   zwitch@2.0.4: {} | ||||
| 
 | ||||
|   zx@8.4.0: {} | ||||
|   zx@8.4.1: {} | ||||
|  | ||||
| @ -19,7 +19,7 @@ | ||||
|       "cache": false | ||||
|     }, | ||||
|     "build": { | ||||
|       "dependsOn": ["reinstall", "^build"], | ||||
|       "dependsOn": ["^build"], | ||||
|       "outputs": [ | ||||
|         "dist/**", | ||||
|         "dist.zip", | ||||
| @ -31,6 +31,10 @@ | ||||
|       "dependsOn": ["^build"], | ||||
|       "outputs": ["dist/**"] | ||||
|     }, | ||||
|     "build:staging": { | ||||
|       "dependsOn": ["@sy/y-code-renderer#build:staging"], | ||||
|       "outputs": ["dist/**"] | ||||
|     }, | ||||
|     "build:analyze": { | ||||
|       "dependsOn": ["^build"], | ||||
|       "outputs": ["dist/**"] | ||||
|  | ||||
| @ -2,171 +2,175 @@ | ||||
|   "folders": [ | ||||
|     { | ||||
|       "name": "@sy/y-code-designer", | ||||
|       "path": "apps/designer" | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/y-code-platform", | ||||
|       "path": "apps/platform" | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/y-code-renderer", | ||||
|       "path": "apps/renderer" | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/low-code-y-code-v1", | ||||
|       "path": "apps/y-code-v1" | ||||
|       "path": "apps/designer", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/y-code-docs", | ||||
|       "path": "apps/docs" | ||||
|       "path": "apps/docs", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/y-code-platform", | ||||
|       "path": "apps/platform", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/y-code-renderer", | ||||
|       "path": "apps/renderer", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/low-code-y-code-v1", | ||||
|       "path": "apps/y-code-v1", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/commitlint-config", | ||||
|       "path": "internal/lint-configs/commitlint-config" | ||||
|       "path": "internal/lint-configs/commitlint-config", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/eslint-config", | ||||
|       "path": "internal/lint-configs/eslint-config" | ||||
|       "path": "internal/lint-configs/eslint-config", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/prettier-config", | ||||
|       "path": "internal/lint-configs/prettier-config" | ||||
|       "path": "internal/lint-configs/prettier-config", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/stylelint-config", | ||||
|       "path": "internal/lint-configs/stylelint-config" | ||||
|       "path": "internal/lint-configs/stylelint-config", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/node-utils", | ||||
|       "path": "internal/node-utils" | ||||
|       "path": "internal/node-utils", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/tailwind-config", | ||||
|       "path": "internal/tailwind-config" | ||||
|       "path": "internal/tailwind-config", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/tsconfig", | ||||
|       "path": "internal/tsconfig" | ||||
|       "path": "internal/tsconfig", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/vite-config", | ||||
|       "path": "internal/vite-config" | ||||
|       "path": "internal/vite-config", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/design", | ||||
|       "path": "packages/@core/base/design" | ||||
|       "path": "packages/@core/base/design", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/icons", | ||||
|       "path": "packages/@core/base/icons" | ||||
|       "path": "packages/@core/base/icons", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/shared", | ||||
|       "path": "packages/@core/base/shared" | ||||
|       "path": "packages/@core/base/shared", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/typings", | ||||
|       "path": "packages/@core/base/typings" | ||||
|       "path": "packages/@core/base/typings", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/composables", | ||||
|       "path": "packages/@core/composables" | ||||
|       "path": "packages/@core/composables", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/preferences", | ||||
|       "path": "packages/@core/preferences" | ||||
|       "path": "packages/@core/preferences", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/form-ui", | ||||
|       "path": "packages/@core/ui-kit/form-ui" | ||||
|       "path": "packages/@core/ui-kit/form-ui", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/layout-ui", | ||||
|       "path": "packages/@core/ui-kit/layout-ui" | ||||
|       "path": "packages/@core/ui-kit/layout-ui", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/menu-ui", | ||||
|       "path": "packages/@core/ui-kit/menu-ui" | ||||
|       "path": "packages/@core/ui-kit/menu-ui", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/popup-ui", | ||||
|       "path": "packages/@core/ui-kit/popup-ui" | ||||
|       "path": "packages/@core/ui-kit/popup-ui", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/shadcn-ui", | ||||
|       "path": "packages/@core/ui-kit/shadcn-ui" | ||||
|       "path": "packages/@core/ui-kit/shadcn-ui", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben-core/tabs-ui", | ||||
|       "path": "packages/@core/ui-kit/tabs-ui" | ||||
|       "path": "packages/@core/ui-kit/tabs-ui", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/constants", | ||||
|       "path": "packages/constants" | ||||
|       "path": "packages/constants", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/access", | ||||
|       "path": "packages/effects/access" | ||||
|       "path": "packages/effects/access", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/common-ui", | ||||
|       "path": "packages/effects/common-ui" | ||||
|       "path": "packages/effects/common-ui", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/hooks", | ||||
|       "path": "packages/effects/hooks" | ||||
|       "path": "packages/effects/hooks", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/layouts", | ||||
|       "path": "packages/effects/layouts" | ||||
|       "path": "packages/effects/layouts", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/plugins", | ||||
|       "path": "packages/effects/plugins" | ||||
|       "path": "packages/effects/plugins", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/request", | ||||
|       "path": "packages/effects/request" | ||||
|       "path": "packages/effects/request", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/icons", | ||||
|       "path": "packages/icons" | ||||
|       "path": "packages/icons", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/locales", | ||||
|       "path": "packages/locales" | ||||
|       "path": "packages/locales", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/preferences", | ||||
|       "path": "packages/preferences" | ||||
|       "path": "packages/preferences", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/vue3-renderer-adapter", | ||||
|       "path": "packages/renderer-adapter/vue3", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/stores", | ||||
|       "path": "packages/stores" | ||||
|       "path": "packages/stores", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/styles", | ||||
|       "path": "packages/styles" | ||||
|       "path": "packages/styles", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/types", | ||||
|       "path": "packages/types" | ||||
|       "path": "packages/types", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/utils", | ||||
|       "path": "packages/utils" | ||||
|       "path": "packages/utils", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@sy/web-vitals", | ||||
|       "path": "packages/web-vitals" | ||||
|       "path": "packages/web-vitals", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/turbo-run", | ||||
|       "path": "scripts/turbo-run" | ||||
|       "path": "scripts/turbo-run", | ||||
|     }, | ||||
|     { | ||||
|       "name": "@vben/vsh", | ||||
|       "path": "scripts/vsh" | ||||
|     } | ||||
|   ] | ||||
|       "path": "scripts/vsh", | ||||
|     }, | ||||
|   ], | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 wangxuefeng
						wangxuefeng