timer in runindex odmdb abd duist package json for wwws
This commit is contained in:
parent
8e373b3dca
commit
3b9d50417d
@ -788,7 +788,7 @@ Odmdb.cud = (objectPathname, crud, itm, role, runindex = true) => {
|
||||
*
|
||||
*/
|
||||
Odmdb.runidx = (objectPathname, schema) => {
|
||||
//if (log) console.log(currentmod, `idx for ${objectPathname}`);
|
||||
const starttime=process.hrtime.bigint();
|
||||
if (!schema || !schema.apxid) {
|
||||
const getschema = Odmdb.Schema(objectPathname, true);
|
||||
if (getschema.status != 200) {
|
||||
@ -898,6 +898,8 @@ Odmdb.runidx = (objectPathname, schema) => {
|
||||
ventil[n].data
|
||||
);
|
||||
});
|
||||
const duration= Number(process.hrtime.bigint()-starttime)/1e6;
|
||||
if (log) console.log(currentmod, `idx for ${objectPathname} elapse time: ${duration.toFixed(3)} ms`);
|
||||
};
|
||||
|
||||
module.exports = Odmdb;
|
||||
|
@ -100,8 +100,8 @@ Wwws.getwco = (wconame, ctx) => {
|
||||
: webpageinit;
|
||||
// check that webconf for tailwindcsscontent property exist for this wco request
|
||||
const pathtocheckfortw = [
|
||||
`../adminapi/objects/wco/${wconame}/*.{html,js,mustache}`,
|
||||
`../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/**/*.{html,js,mustache}`,
|
||||
`../../../../../../../adminapi/objects/wco/${wconame}/*.{html,js,mustache}`,
|
||||
`../../../../../../../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/**/*.{html,js,mustache}`,
|
||||
];
|
||||
if (!webpage.tailwindcsscontent) {
|
||||
webpage.tailwindcsscontent = [];
|
||||
@ -202,8 +202,11 @@ Wwws.getwco = (wconame, ctx) => {
|
||||
// save the conf for update localdb when the web page request it
|
||||
fs.outputJSONSync(webconf, webpage, { spaces: 2 });
|
||||
// create a text file with component to watch for tailwind
|
||||
|
||||
fs.outputFileSync(`../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/static/css/watchtailwind.txt`,webpage.tailwindcsscontent.join("\n"),"utf-8");
|
||||
let sourcetw=""
|
||||
webpage.tailwindcsscontent.forEach(s=>{
|
||||
sourcetw+=`@source "${s}";\n`
|
||||
})
|
||||
fs.outputFileSync(`../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/static/css/sourcetw.css`,sourcetw,"utf-8");
|
||||
return {
|
||||
status: 200,
|
||||
ref: "Wwws",
|
||||
|
10
package.json
10
package.json
@ -20,8 +20,8 @@
|
||||
"publishwall": "scp -r /media/phil/usbfarm/apxtowns/dev-ants/tribes/$space phil@wall-ants://home/phil/apxtowns/wall-ants/tribes/$space/..",
|
||||
"publishhouse": "scp -r /media/phil/usbfarm/apxtowns/dev-ants/tribes/$space phil@house-ants://home/phil/apxtowns/house-ants/tribes/$space/..",
|
||||
"src": "echo '$tribe -- $webapp'",
|
||||
"src:css": "npx @tailwindcss/cli -i ../$tribe/objects/wwws/$webapp/src/static/css/input.css -o ../$tribe/objects/wwws/$webapp/src/static/css/output.css --watch --config ../$tribe/objects/wwws/$webapp/tailwind.config.js",
|
||||
"dist:css": "node apxtri/models/Wwws.js $tribe $webapp dist && tailwindcss --minify -c ../$tribe/objects/wwws/$webapp/tailwind.config.js -i ../$tribe/objects/wwws/$webapp/src/static/css/twdevstyle.css -o ../$tribe/objects/wwws/$webapp/dist/static/css/twstyle.css"
|
||||
"src:css": "npx @tailwindcss/cli -i ../$tribe/objects/wwws/$webapp/src/static/css/input.css -o ../$tribe/objects/wwws/$webapp/src/static/css/output.css --watch",
|
||||
"dist:jscss": "node apxtri/models/Wwws.js $tribe $webapp dist && tailwindcss --minify -c ../$tribe/objects/wwws/$webapp/tailwind.config.js -i ../$tribe/objects/wwws/$webapp/src/static/css/twdevstyle.css -o ../$tribe/objects/wwws/$webapp/dist/static/css/twstyle.css"
|
||||
},
|
||||
"commentscript": "cf wiki apxtri doc for details: yarn startpm2 -n teswallants, yarn pm2 stop testwallants, yarn pm2 delete testwallants, yarn pm2 logs --lines 200 testwall, yarn pm2 monit -n testwallants, yarn pm2 save tribe=tribeid yarn apidoc to build apidoc // space=adminapi/www/cdn/apidoc yarn publishtestwall ",
|
||||
"maintainers": [
|
||||
@ -55,13 +55,13 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"@tailwindcss/cli": "^4.1.4",
|
||||
"apidoc": "^1.2.0",
|
||||
"async": "^3.2.0",
|
||||
"axios": "^1.7.8",
|
||||
"bcrypt": "^5.0.0",
|
||||
"cors": "^2.8.4",
|
||||
"daisyui": "^5.0.12",
|
||||
"daisyui": "^5.0.28",
|
||||
"dayjs": "^1.11.13",
|
||||
"dns-sync": "^0.2.1",
|
||||
"express": "^4.21.1",
|
||||
@ -81,7 +81,7 @@
|
||||
"sharp": "^0.33.5",
|
||||
"smtp-client": "^0.4.0",
|
||||
"stripe": "^17.3.1",
|
||||
"tailwindcss": "^4.0.15",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"uuid": "^11.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user