SIGN IN SIGN UP
oramasearch / orama UNCLAIMED

🌌 A complete search engine and RAG pipeline in your browser, server or edge network with support for full-text, vector, and hybrid search in less than 2kb.

0 0 0 TypeScript
2023-03-31 17:22:37 +02:00
import { spawn } from 'node:child_process'
import { resolve, relative } from 'node:path'
const rootDir = process.cwd()
2023-03-31 17:22:37 +02:00
const packages = [
'orama',
'plugin-astro',
'plugin-data-persistence',
'plugin-docusaurus',
'plugin-docusaurus-v3',
2023-12-06 22:08:02 +01:00
'plugin-vitepress',
2023-03-31 17:22:37 +02:00
'plugin-match-highlight',
'plugin-nextra',
2023-03-31 17:22:37 +02:00
'plugin-parsedoc',
2024-03-08 13:35:10 -08:00
'plugin-analytics',
'plugin-secure-proxy',
'stemmers',
2024-02-13 16:15:05 +01:00
'stopwords',
'tokenizers'
2023-03-31 17:22:37 +02:00
]
function step(message) {
console.log(`\x1b[1m\x1b[32m--- ${message}\x1b[0m`)
}
async function execute(command, args, cwd) {
if (!Array.isArray(args)) {
args = [args]
}
let success, fail
const promise = new Promise((resolve, reject) => {
success = resolve
fail = reject
})
if (cwd) {
step(`Executing: ${command} ${args.join(' ')} (from folder ${relative(rootDir, cwd)}) ...`)
} else {
step(`Executing: ${command} ${args.join(' ')} ...`)
}
const childProcess = spawn(command, args, { cwd, stdio: 'inherit' })
childProcess.on('close', code => {
if (code !== 0) {
fail(new Error(`Process failed with status code ${code}.`))
}
success()
})
return promise
}
async function main() {
process.env.BUILD_TOKENIZERS = '1'
2023-07-26 11:21:10 +02:00
await execute('pnpm', 'build')
2023-12-04 17:08:09 +01:00
// await execute('pnpm', 'test')
2023-03-31 17:22:37 +02:00
for (const pkg of packages) {
const cwd = resolve(rootDir, 'packages', pkg)
await execute('pnpm', ['publish'], cwd)
}
}
await main()