Files
windmill/frontend/sharedUtils/vite.sharedUtils.config.js
T
hugocasaandClaude Opus 5.5 07d4f7fe61 feat: app conversations through the memory_id query parameter (#12025)
* feat: app conversations through the memory_id query parameter, chat-mode flows included

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: regenerate the mcp session instructions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: type backendAsync's memoryId option in the eval diagnostics

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: pin git-sync hub scripts to windmill-cli 1.849.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: memoryId option on the sync backend call too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: bump the ui builder artifact for the memoryId option

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: shared-utils 1.0.14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: cli takes shared-utils 1.0.14 for the memoryId option

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: pin the app conversation scoping and the memoryId signatures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: assert the ownership refusal, not any refusal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: match the memoryId option in the cli wmill.ts signature tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: file an app's turns as the deployed flow's conversation, preview included

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 23:51:35 +01:00

96 lines
2.3 KiB
JavaScript

import { defineConfig } from 'vite'
import { resolve } from 'path'
import { writeFileSync } from 'fs'
import { exec } from 'child_process'
import { promisify } from 'util'
const execAsync = promisify(exec)
const VERSION = '1.0.14'
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, '../src/lib/sharedUtils.ts'),
name: 'sharedUtils',
fileName: (format) => `lib.${format}.js`,
formats: ['es']
},
outDir: 'dist/sharedUtils',
rolldownOptions: {
external: [],
output: {
globals: {}
}
}
},
plugins: [
{
name: 'bundle-types',
async closeBundle() {
try {
console.log('Bundling types...')
// Create a temporary tsconfig for this specific build
const tempTsConfig = {
extends: './tsconfig.json',
compilerOptions: {
declaration: true,
emitDeclarationOnly: true,
outDir: 'dist/sharedUtils',
skipLibCheck: true,
noEmit: false
},
include: ['src/lib/sharedUtils.ts', 'sharedUtils/sharedUtils.d.ts'],
exclude: ['node_modules']
}
writeFileSync('tsconfig.sharedUtils.json', JSON.stringify(tempTsConfig, null, 2))
// Use the temporary tsconfig
await execAsync('npx tsc -p tsconfig.sharedUtils.json')
console.log('Generating types...')
// Clean up temp tsconfig
await execAsync('rm tsconfig.sharedUtils.json')
// Rename sharedUtils.d.ts to lib.d.ts
await execAsync('mv dist/sharedUtils/sharedUtils.d.ts dist/sharedUtils/lib.d.ts')
const pkgJson = {
name: '@windmill-labs/shared-utils',
version: VERSION,
type: 'module',
private: false,
main: './lib.es.js',
module: './lib.es.js',
exports: {
'.': './lib.es.js'
},
types: './lib.d.ts'
}
const jsrJson = {
name: '@windmill-labs/shared-utils',
version: VERSION,
license: 'MIT',
exports: './lib.es.js'
}
writeFileSync(
resolve(__dirname, '../dist/sharedUtils/package.json'),
JSON.stringify(pkgJson, null, 2)
)
writeFileSync(
resolve(__dirname, '../dist/sharedUtils/jsr.json'),
JSON.stringify(jsrJson, null, 2)
)
console.log('Types bundled successfully')
} catch (error) {
console.error('Error bundling types:', error)
throw error
}
}
}
]
})