Compare commits

...

11 Commits

Author SHA1 Message Date
Cris Stringfellow 321df30177
2.7.1 2023-01-15 01:13:54 +08:00
Cris Stringfellow 09c3faeccc
Windows works 2023-01-15 01:13:53 +08:00
Cris Stringfellow d319d93cec
Works 2023-01-15 01:12:35 +08:00
Cris Stringfellow 698d9f6e34
Mac build works. Windows does not (vendor binary) 2023-01-14 18:30:40 +08:00
Cris Stringfellow 8c5b89f92b
2.7.0 2023-01-14 17:59:28 +08:00
Cris Stringfellow 173e2a2f92
New release. 2023-01-14 17:59:28 +08:00
Cris Stringfellow 8385322b9d
2.6.0 2023-01-14 17:59:04 +08:00
Cris Stringfellow b2dcb0c60f
New release. 2023-01-14 17:59:03 +08:00
Cris Stringfellow 2d4cc344b8
2.5.0 2023-01-14 17:58:40 +08:00
Cris Stringfellow 3bd99034a0
New release. 2023-01-14 17:58:39 +08:00
Cris Stringfellow 44dd74a86f
New 2023-01-14 17:57:37 +08:00
6 changed files with 26 additions and 27 deletions

1
.npm.release Normal file
View File

@ -0,0 +1 @@
Sun Jan 15 01:13:51 CST 2023

22
package-lock.json generated
View File

@ -1,14 +1,15 @@
{
"name": "diskernet",
"version": "2.4.11",
"version": "2.7.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "diskernet",
"version": "2.4.11",
"version": "2.7.1",
"license": "PolyForm Strict 1.0",
"dependencies": {
"@667/ps-list": "^1.1.3",
"chrome-launcher": "latest",
"express": "latest",
"flexsearch": "^0.7.21",
@ -19,7 +20,6 @@
"ndx-query": "^1.0.1",
"ndx-serializable": "^1.0.0",
"node-fetch": "latest",
"ps-list": "^8.1.1",
"ukkonen": "^1.4.0",
"ws": "latest"
},
@ -32,6 +32,11 @@
"nodemon": "latest"
}
},
"node_modules/@667/ps-list": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@667/ps-list/-/ps-list-1.1.3.tgz",
"integrity": "sha512-WQ/PkHADBTpuYqN0CRB901lc+VBbD1DW51/u2IFwRKoWWPsclqa1a0W5U0OEDvAa4kMFs+uVjbCS3k2V81OVFA=="
},
"node_modules/@esbuild/android-arm": {
"version": "0.16.17",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz",
@ -2190,17 +2195,6 @@
"node": ">= 0.10"
}
},
"node_modules/ps-list": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/ps-list/-/ps-list-8.1.1.tgz",
"integrity": "sha512-OPS9kEJYVmiO48u/B9qneqhkMvgCxT+Tm28VCEJpheTpl8cJ0ffZRRNgS5mrQRTrX5yRTpaJ+hRDeefXYmmorQ==",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/pstree.remy": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",

View File

@ -1,10 +1,10 @@
{
"name": "diskernet",
"version": "2.4.11",
"version": "2.7.1",
"type": "module",
"description": "Library server and an archivist browser controller.",
"main": "src/app.js",
"module": "dist/diskernet.js",
"module": "dist/diskernet.mjs",
"bin": {
"diskernet": "build/diskernet.cjs"
},
@ -31,7 +31,8 @@
"pkg": {
"scripts": "build/**/*.js",
"assets": [
"public/**/*"
"public/**/*",
"build/vendor/**/*"
],
"outputPath": "bin"
},
@ -46,6 +47,7 @@
},
"homepage": "https://github.com/dosyago/DiskerNet#readme",
"dependencies": {
"@667/ps-list": "^1.1.3",
"chrome-launcher": "latest",
"express": "latest",
"flexsearch": "^0.7.21",
@ -56,7 +58,6 @@
"ndx-query": "^1.0.1",
"ndx-serializable": "^1.0.0",
"node-fetch": "latest",
"ps-list": "^8.1.1",
"ukkonen": "^1.4.0",
"ws": "latest"
},

View File

@ -2,7 +2,8 @@
./node_modules/.bin/esbuild src/app.js --bundle --outfile=dist/diskernet.mjs --format=esm --platform=node --minify --analyze
./node_modules/.bin/esbuild src/app.js --bundle --outfile=build/out.cjs --platform=node --minify --analyze
echo "#!/usr/bin/env node" > build/diskernet.js
cat build/out.cjs >> build/diskernet.js
chmod +x build/diskernet.js
./node_modules/.bin/esbuild src/app.js --bundle --outfile=build/test.cjs --platform=node
echo "#!/usr/bin/env node" > build/diskernet.cjs
cat build/out.cjs >> build/diskernet.cjs
chmod +x build/diskernet.cjs

View File

@ -5,7 +5,7 @@ import util from 'util';
import {stdin as input, stdout as output} from 'process';
import ChromeLauncher from 'chrome-launcher';
import psList from 'ps-list';
import psList from '@667/ps-list';
import {DEBUG, sleep, NO_SANDBOX, GO_SECURE} from './common.js';
@ -64,7 +64,7 @@ async function start() {
const list = await psList();
chromeOpen = list.some(({name,cmd}) => name.match(/chrome/g) || cmd.match(/chrome/g));
chromeOpen = list.some(({name,cmd}) => name?.match?.(/chrome/g) || cmd?.match?.(/chrome/g));
if ( chromeOpen ) {
console.info(`Seems Chrome is open`);

View File

@ -3,10 +3,12 @@ import {fileURLToPath} from 'url';
import fs from 'fs';
import os from 'os';
const DEEB = false;
export const DEBUG = {
askFirst: true,
verboseSlow: false,
debug: process.env.DEBUG_22120 || false,
verboseSlow: process.env.VERBOSE_DEBUG_22120 || DEEB,
debug: process.env.DEBUG_22120 || DEEB,
checkPred: false
}
export const SHOW_FETCH = false;
@ -73,8 +75,8 @@ export const SNIP_CONTEXT = 31;
export const NO_SANDBOX = (process.env.DEBUG_22120 && process.env.SET_22120_NO_SANDBOX) || false;
//export const APP_ROOT = '.';
//export const APP_ROOT = __dirname;
export const APP_ROOT = path.dirname(fileURLToPath(import.meta.url));
export const APP_ROOT = path.dirname(process.argv[0]);
//export const APP_ROOT = path.dirname(fileURLToPath(import.meta.url));
export const sleep = ms => new Promise(res => setTimeout(res, ms));