latinfo 0.13.2 → 0.13.5
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.
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ const local_search_1 = require("./local-search");
|
|
|
47
47
|
const client_search_1 = require("./client-search");
|
|
48
48
|
const odis_search_1 = require("./odis-search");
|
|
49
49
|
const mphf_search_1 = require("./mphf-search");
|
|
50
|
-
const VERSION = '0.13.
|
|
50
|
+
const VERSION = '0.13.5';
|
|
51
51
|
const API_URL = process.env.LATINFO_API_URL || 'https://api.latinfo.dev';
|
|
52
52
|
const GITHUB_CLIENT_ID = process.env.GITHUB_CLIENT_ID || 'Ov23li5fcQaiCsVtaMKK';
|
|
53
53
|
const CONFIG_DIR = path_1.default.join(os_1.default.homedir(), '.latinfo');
|
|
@@ -1899,7 +1899,7 @@ async function pipeStage(args) {
|
|
|
1899
1899
|
const remoteRepo = '~/actions-runner/_work/latinfo-api/latinfo-api';
|
|
1900
1900
|
console.log('[pipe] Syncing files to Linux Mint...');
|
|
1901
1901
|
try {
|
|
1902
|
-
run(`ssh ${RUNNER} "echo OK"`, { stdio: 'pipe'
|
|
1902
|
+
run(`ssh -o ConnectTimeout=10 ${RUNNER} "echo OK"`, { stdio: 'pipe' });
|
|
1903
1903
|
// Copy import script and YAML
|
|
1904
1904
|
const scriptFile = path_1.default.join(repo, 'src', 'imports', `${sourceName}.ts`);
|
|
1905
1905
|
const yamlFile = path_1.default.join(repo, 'sources', `${sourceName}.yaml`);
|
|
@@ -1932,11 +1932,11 @@ async function pipeStage(args) {
|
|
|
1932
1932
|
if (deps.length > 0) {
|
|
1933
1933
|
console.log(`[pipe] Installing deps on Linux Mint: ${deps.join(', ')}...`);
|
|
1934
1934
|
try {
|
|
1935
|
-
run(`ssh ${RUNNER} "cd ${remoteRepo} && npm install ${deps.join(' ')}"`, { stdio: 'inherit'
|
|
1935
|
+
run(`ssh ${RUNNER} "cd ${remoteRepo} && npm install ${deps.join(' ')}"`, { stdio: 'inherit' });
|
|
1936
1936
|
// Install playwright browsers if needed
|
|
1937
1937
|
if (deps.some(d => d.includes('playwright'))) {
|
|
1938
|
-
console.log(`[pipe] Installing Playwright browser...`);
|
|
1939
|
-
run(`ssh ${RUNNER} "cd ${remoteRepo} && npx playwright install chromium --with-deps"`, { stdio: 'inherit'
|
|
1938
|
+
console.log(`[pipe] Installing Playwright browser (this may take a few minutes)...`);
|
|
1939
|
+
run(`ssh ${RUNNER} "cd ${remoteRepo} && npx playwright install chromium --with-deps"`, { stdio: 'inherit' });
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
1942
|
catch {
|
|
@@ -1949,7 +1949,7 @@ async function pipeStage(args) {
|
|
|
1949
1949
|
console.log(`[pipe] Running import on Linux Mint...`);
|
|
1950
1950
|
try {
|
|
1951
1951
|
run(`ssh ${RUNNER} "cd ${remoteRepo} && set -a && source .env 2>/dev/null; source .dev.vars 2>/dev/null; set +a && R2_BUCKET_NAME=latinfo-data npx tsx src/imports/${sourceName}.ts"`, {
|
|
1952
|
-
stdio: 'inherit',
|
|
1952
|
+
stdio: 'inherit',
|
|
1953
1953
|
});
|
|
1954
1954
|
}
|
|
1955
1955
|
catch {
|
|
@@ -1977,7 +1977,7 @@ Promise.all(Array.from({length:CONC},()=>go())).then(()=>{
|
|
|
1977
1977
|
lats.sort((a,b)=>a-b);
|
|
1978
1978
|
console.log(JSON.stringify({total_ms:Date.now()-t0,success,fails,qps:Math.round(TOTAL/((Date.now()-t0)/1000)),
|
|
1979
1979
|
p50:lats[Math.floor(lats.length*0.5)],p95:lats[Math.floor(lats.length*0.95)],p99:lats[Math.floor(lats.length*0.99)]}));
|
|
1980
|
-
});\\"" `, { encoding: 'utf-8', stdio: 'pipe'
|
|
1980
|
+
});\\"" `, { encoding: 'utf-8', stdio: 'pipe' });
|
|
1981
1981
|
const bench = JSON.parse(benchOutput.trim());
|
|
1982
1982
|
const successRate = ((bench.success) / 500 * 100);
|
|
1983
1983
|
console.log(`\n 500 concurrent: ${bench.qps} q/s, ${successRate.toFixed(1)}% success`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "latinfo",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"description": "Tax registry & procurement API for Latin America. Query RUC, DNI, NIT, licitaciones from Peru & Colombia. Offline MPHF search, full OCDS data, updated daily.",
|
|
5
5
|
"homepage": "https://latinfo.dev",
|
|
6
6
|
"repository": {
|