ci(app): config changes to bruno and incoming sqls

This commit is contained in:
2025-10-16 14:34:58 -05:00
parent 38edc6214b
commit f264c98fbf
13 changed files with 1638 additions and 189 deletions

View File

@@ -12,6 +12,9 @@ LOG_LEVEL=debug
# alpaprod tec apiKey # alpaprod tec apiKey
TEC_API_KEY=api key TEC_API_KEY=api key
# v1 listener
DATABASE_URL_V1=postgresql://ausername:password@localhost:5433/lst_db
# postgres connection # postgres connection
DATABASE_HOST=localhost DATABASE_HOST=localhost
DATABASE_PORT=5432 DATABASE_PORT=5432

View File

@@ -4,8 +4,8 @@ meta {
seq: 3 seq: 3
} }
post { patch {
url: {{url}}/lst/api/admin/:userID/grant url: {{url}}/lst/api/admin/:userID/revoke
body: json body: json
auth: inherit auth: inherit
} }
@@ -16,8 +16,8 @@ params:path {
body:json { body:json {
{ {
"module":"siloAdjustments", "module":"ocp"
"role":"viewer"
} }
} }

View File

@@ -0,0 +1,8 @@
meta {
name: logistics
seq: 4
}
auth {
mode: inherit
}

View File

@@ -0,0 +1,28 @@
meta {
name: Preprint
type: http
seq: 1
}
post {
url: {{url}}/lst/api/logistics/labeling/preprint
body: json
auth: inherit
}
body:json {
{
"scannerId": 999,
"lotNr": 26321,
"machineId": 3, // 457=22, 458=23
"printerId": 7, // 457=22, 458=23
"layoutId": 25,
"numberOfCopies": 0,
"qtyToPrint": 5
}
}
settings {
encodeUrl: true
timeout: 0
}

View File

@@ -0,0 +1,8 @@
meta {
name: labeling
seq: 1
}
auth {
mode: inherit
}

View File

@@ -1,7 +1,7 @@
vars { vars {
url: http://localhost:4200 url: https://usmcd1vms036.alpla.net
session_cookie: session_cookie:
urlv2: http://usiow1vms006:3001 urlv2: http://usmcd1vms036:3000
jwtV2: jwtV2:
} }
vars:secret [ vars:secret [

View File

@@ -0,0 +1,12 @@
CREATE OR REPLACE FUNCTION notify_new_log()
RETURNS trigger AS $$
BEGIN
PERFORM pg_notify('logs_channel', row_to_json(NEW)::text);
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER logs_notify_trigger
AFTER INSERT ON logs
FOR EACH ROW
EXECUTE FUNCTION notify_new_log();

View File

@@ -1,97 +1,97 @@
{ {
"name": "lstv2", "name": "lstv2",
"version": "2.27.0", "version": "2.27.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "concurrently -n \"server,frontend\" -c \"#007755,#2f6da3\" \"npm run dev:server\" \"cd frontend && npm run dev\"", "dev": "concurrently -n \"server,frontend\" -c \"#007755,#2f6da3\" \"npm run dev:server\" \"cd frontend && npm run dev\"",
"dev:server": "dotenvx run -f .env -- tsx watch server/index.ts", "dev:server": "dotenvx run -f .env -- tsx watch server/index.ts",
"dev:frontend": "cd frontend && npm run dev", "dev:frontend": "cd frontend && npm run dev",
"dev:dbgen": " drizzle-kit generate --config=drizzle-dev.config.ts", "dev:dbgen": " drizzle-kit generate --config=drizzle-dev.config.ts",
"dev:dbmigrate": " drizzle-kit migrate --config=drizzle-dev.config.ts", "dev:dbmigrate": " drizzle-kit migrate --config=drizzle-dev.config.ts",
"build": "npm run build:server && npm run build:frontend", "build": "npm run build:server && npm run build:frontend",
"build:server": "rimraf dist && tsc --build && npm run copy:scripts && xcopy server\\services\\notifications\\utils\\views\\ dist\\server\\services\\notifications\\utils\\views\\ /E /I /Y", "build:server": "rimraf dist && tsc --build && npm run copy:scripts && xcopy server\\services\\notifications\\utils\\views\\ dist\\server\\services\\notifications\\utils\\views\\ /E /I /Y ",
"build:frontend": "cd frontend && npm run build", "build:frontend": "cd frontend && npm run build",
"build:iisNet": "rimraf dotnetwrapper\\bin && xcopy frontend\\dist dotnetwrapper\\wwwroot /E /I /Y && cd dotnetwrapper && dotnet publish lst-wrapper.csproj --configuration Release --output ../prodBuild", "build:iisNet": "rimraf dotnetwrapper\\bin && xcopy frontend\\dist dotnetwrapper\\wwwroot /E /I /Y && cd dotnetwrapper && dotnet publish lst-wrapper.csproj --configuration Release --output ../prodBuild",
"copy:scripts": "tsx server/scripts/copyScripts.ts", "copy:scripts": "tsx server/scripts/copyScripts.ts",
"copy:servers": "xcopy server\\services\\server\\utils\\serverData.json dist\\server\\services\\server\\utils /E /I /Y", "copy:servers": "xcopy server\\services\\server\\utils\\serverData.json dist\\server\\services\\server\\utils /E /I /Y",
"start": "set NODE_ENV=production && npm run start:server", "start": "set NODE_ENV=production && npm run start:server",
"start:server": "dotenvx run -f .env -- node dist/server/index.js", "start:server": "dotenvx run -f .env -- node dist/server/index.js",
"db:generate": "npx drizzle-kit generate", "db:generate": "npx drizzle-kit generate",
"db:migrate": "npx drizzle-kit push", "db:migrate": "npx drizzle-kit push",
"db:dev": "npm run build && npm run db:generate && npm run db:migrate", "db:dev": "npm run build && npm run db:generate && npm run db:migrate",
"deploy": "standard-version --conventional-commits && npm run build", "deploy": "standard-version --conventional-commits && npm run build",
"zipServer": "dotenvx run -f .env -- tsx server/scripts/zipUpBuild.ts \"C:\\Users\\matthes01\\Documents\\lstv2\"", "zipServer": "dotenvx run -f .env -- tsx server/scripts/zipUpBuild.ts \"C:\\Users\\matthes01\\Documents\\lstv2\"",
"newBuild": "npm run build:server && npm run build:frontend", "newBuild": "npm run build:server && npm run build:frontend",
"copyToNew": "powershell -ExecutionPolicy Bypass -File server/scripts/copyToLst.ps1 -dir \"C:\\Users\\matthes01\\Documents\\lstv2\"", "copyToNew": "powershell -ExecutionPolicy Bypass -File server/scripts/copyToLst.ps1 -dir \"C:\\Users\\matthes01\\Documents\\lstv2\"",
"removeOld": "rimraf dist && rimraf frontend/dist", "removeOld": "rimraf dist && rimraf frontend/dist",
"prodBuild": "npm run v1Build && npm run build && npm run zipServer && npm run dev", "prodBuild": "npm run v1Build && npm run build && npm run zipServer && npm run dev",
"commit": "cz", "commit": "cz",
"prodinstall": "npm i --omit=dev && npm run db:migrate", "prodinstall": "npm i --omit=dev && npm run db:migrate",
"checkupdates": "npx npm-check-updates", "checkupdates": "npx npm-check-updates",
"testingCode": "dotenvx run -f .env -- tsx watch server/services/logistics/controller/warehouse/cycleCountChecks/cyclecountCheck.ts" "testingCode": "dotenvx run -f .env -- tsx watch server/services/logistics/controller/warehouse/cycleCountChecks/cyclecountCheck.ts"
}, },
"config": { "config": {
"commitizen": { "commitizen": {
"path": "./node_modules/cz-conventional-changelog" "path": "./node_modules/cz-conventional-changelog"
} }
}, },
"admConfig": { "admConfig": {
"build": 661, "build": 661,
"oldBuild": "backend-0.1.3.zip" "oldBuild": "backend-0.1.3.zip"
}, },
"devDependencies": { "devDependencies": {
"@types/adm-zip": "^0.5.7", "@types/adm-zip": "^0.5.7",
"@types/bcrypt": "^5.0.2", "@types/bcrypt": "^5.0.2",
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"@types/js-cookie": "^3.0.6", "@types/js-cookie": "^3.0.6",
"@types/mssql": "^9.1.7", "@types/mssql": "^9.1.7",
"@types/node": "^24.0.3", "@types/node": "^24.0.3",
"@types/node-cron": "^3.0.11", "@types/node-cron": "^3.0.11",
"@types/nodemailer": "^6.4.17", "@types/nodemailer": "^6.4.17",
"@types/pg": "^8.15.4", "@types/pg": "^8.15.4",
"@types/ws": "^8.18.1", "@types/ws": "^8.18.1",
"concurrently": "^9.1.2", "concurrently": "^9.1.2",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
"standard-version": "^9.5.0", "standard-version": "^9.5.0",
"tsx": "^4.20.3", "tsx": "^4.20.3",
"typescript": "^5.8.3" "typescript": "^5.8.3"
}, },
"dependencies": { "dependencies": {
"@dotenvx/dotenvx": "^1.45.1", "@dotenvx/dotenvx": "^1.45.1",
"@hono/node-server": "^1.14.4", "@hono/node-server": "^1.14.4",
"@hono/zod-openapi": "^0.19.8", "@hono/zod-openapi": "^0.19.8",
"@scalar/hono-api-reference": "^0.9.5", "@scalar/hono-api-reference": "^0.9.5",
"@tanstack/react-form": "^1.12.3", "@tanstack/react-form": "^1.12.3",
"@tanstack/react-table": "^8.21.3", "@tanstack/react-table": "^8.21.3",
"@types/jsonwebtoken": "^9.0.10", "@types/jsonwebtoken": "^9.0.10",
"@types/nodemailer-express-handlebars": "^4.0.5", "@types/nodemailer-express-handlebars": "^4.0.5",
"adm-zip": "^0.5.16", "adm-zip": "^0.5.16",
"axios": "^1.10.0", "axios": "^1.10.0",
"bcryptjs": "^3.0.2", "bcryptjs": "^3.0.2",
"croner": "^9.1.0", "croner": "^9.1.0",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"date-fns-tz": "^3.2.0", "date-fns-tz": "^3.2.0",
"drizzle-kit": "^0.31.1", "drizzle-kit": "^0.31.1",
"drizzle-orm": "^0.44.2", "drizzle-orm": "^0.44.2",
"drizzle-zod": "^0.8.2", "drizzle-zod": "^0.8.2",
"excel-date-to-js": "^1.1.5", "excel-date-to-js": "^1.1.5",
"fast-xml-parser": "^5.2.5", "fast-xml-parser": "^5.2.5",
"fs-extra": "^11.3.0", "fs-extra": "^11.3.0",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"morgan": "^1.10.1", "morgan": "^1.10.1",
"mssql": "^11.0.1", "mssql": "^11.0.1",
"nodemailer": "^7.0.3", "nodemailer": "^7.0.3",
"nodemailer-express-handlebars": "^7.0.0", "nodemailer-express-handlebars": "^7.0.0",
"pg": "^8.16.2", "pg": "^8.16.2",
"pino": "^9.7.0", "pino": "^9.7.0",
"pino-abstract-transport": "^2.0.0", "pino-abstract-transport": "^2.0.0",
"pino-pretty": "^13.0.0", "pino-pretty": "^13.0.0",
"postgres": "^3.4.7", "postgres": "^3.4.7",
"react-resizable-panels": "^3.0.3", "react-resizable-panels": "^3.0.3",
"rimraf": "^6.0.1", "rimraf": "^6.0.1",
"st-ethernet-ip": "^2.7.5", "st-ethernet-ip": "^2.7.5",
"ws": "^8.18.2", "ws": "^8.18.2",
"xlsx": "^0.18.5", "xlsx": "^0.18.5",
"zod": "^3.25.67" "zod": "^3.25.67"
} }
} }

View File

@@ -0,0 +1,17 @@
CREATE TABLE "prodPermissions" (
"prodPerm_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"name" text NOT NULL,
"description" text NOT NULL,
"roles" jsonb DEFAULT '[]'::jsonb,
"rolesLegacy" jsonb DEFAULT '[]'::jsonb,
"add_User" text DEFAULT 'LST_System' NOT NULL,
"add_Date" timestamp DEFAULT now(),
"upd_User" text DEFAULT 'LST_System' NOT NULL,
"upd_date" timestamp DEFAULT now()
);
--> statement-breakpoint
ALTER TABLE "serverData" ADD COLUMN "add_user" text DEFAULT 'lst_user';--> statement-breakpoint
ALTER TABLE "serverData" ADD COLUMN "add_date" timestamp DEFAULT now();--> statement-breakpoint
ALTER TABLE "serverData" ADD COLUMN "upd_user" text DEFAULT 'lst_user';--> statement-breakpoint
ALTER TABLE "serverData" ADD COLUMN "upd_date" timestamp DEFAULT now();--> statement-breakpoint
CREATE UNIQUE INDEX "prodPermName" ON "prodPermissions" USING btree ("name");

File diff suppressed because it is too large Load Diff

View File

@@ -134,6 +134,13 @@
"when": 1760480733009, "when": 1760480733009,
"tag": "0018_aspiring_silver_samurai", "tag": "0018_aspiring_silver_samurai",
"breakpoints": true "breakpoints": true
},
{
"idx": 19,
"version": "7",
"when": 1760623729227,
"tag": "0019_bizarre_tarot",
"breakpoints": true
} }
] ]
} }

13
package-lock.json generated
View File

@@ -42,6 +42,7 @@
"@types/node": "^24.7.1", "@types/node": "^24.7.1",
"@types/nodemailer": "^7.0.2", "@types/nodemailer": "^7.0.2",
"@types/nodemailer-express-handlebars": "^4.0.5", "@types/nodemailer-express-handlebars": "^4.0.5",
"@types/pg": "^8.15.5",
"concurrently": "^9.2.1", "concurrently": "^9.2.1",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
"standard-version": "^9.5.0", "standard-version": "^9.5.0",
@@ -3384,6 +3385,18 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/pg": {
"version": "8.15.5",
"resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.5.tgz",
"integrity": "sha512-LF7lF6zWEKxuT3/OR8wAZGzkg4ENGXFNyiV/JeOt9z5B+0ZVwbql9McqX5c/WStFq1GaGso7H1AzP/qSzmlCKQ==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"@types/node": "*",
"pg-protocol": "*",
"pg-types": "^2.2.0"
}
},
"node_modules/@types/qs": { "node_modules/@types/qs": {
"version": "6.14.0", "version": "6.14.0",
"dev": true, "dev": true,

View File

@@ -1,90 +1,91 @@
{ {
"name": "lst", "name": "lst",
"version": "1.5.0", "version": "1.5.0",
"description": "Logistics support tool - the place where the support happens.", "description": "Logistics support tool - the place where the support happens.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"dev:app": "dotenvx run -f .env -- tsx watch app/main.ts", "dev:app": "dotenvx run -f .env -- tsx watch app/main.ts",
"dev:docs": "npm run translateDocs && cd lstDocs && npm start", "dev:docs": "npm run translateDocs && cd lstDocs && npm start",
"dev:front": "cd frontend && npm run dev", "dev:front": "cd frontend && npm run dev",
"dev:db:migrate": "npx drizzle-kit push", "dev:db:migrate": "npx drizzle-kit push",
"dev:db:generate": "tsc && npx drizzle-kit generate --config=drizzle-dev.config.ts", "dev:db:generate": "tsc && npx drizzle-kit generate --config=drizzle-dev.config.ts",
"dev": "concurrently -n \"server,frontend,docs\" -c \"#007755,#2f6da3,#DB4FE0\" \"npm run dev:app\" \"npm run dev:front\" \"npm run dev:docs\"", "dev": "concurrently -n \"server,frontend,docs\" -c \"#007755,#2f6da3,#DB4FE0\" \"npm run dev:app\" \"npm run dev:front\" \"npm run dev:docs\"",
"copy:docs": "node scripts/lstDocCopy.mjs", "copy:docs": "node scripts/lstDocCopy.mjs",
"build:app": "rimraf dist && npx tsc", "build:app": "rimraf dist && npx tsc && xcopy app\\src\\internal\\system\\controller\\settings\\settings.json dist\\src\\internal\\system\\controller\\settings /E /I /Y",
"build:front": "cd frontend && rimraf dist && npm run build", "build:front": "cd frontend && rimraf dist && npm run build",
"build:docs": "cd lstDocs && rimraf build && npm run build", "build:docs": "cd lstDocs && rimraf build && npm run build",
"build:wrapper": "cd lstWrapper && rimraf publish && dotnet publish -c Release -o ./publish", "build:wrapper": "cd lstWrapper && rimraf publish && dotnet publish -c Release -o ./publish",
"build:ctl": " ", "build:ctl": " ",
"build": "npm run translateDocs && npm run build:docs && npm run build:front && npm run build:app", "build": "npm run translateDocs && npm run build:docs && npm run build:front && npm run build:app",
"install:front": "cd frontend && npm i", "install:front": "cd frontend && npm i",
"install:docs": "cd lstDocs && npm i", "install:docs": "cd lstDocs && npm i",
"install:app": "npm i", "install:app": "npm i",
"start:app": "node dist/main.js", "start:app": "node dist/main.js",
"start": "dotenvx run -f .env -- npm run start:app", "start": "dotenvx run -f .env -- npm run start:app",
"start:win": "set NODE_ENV=production && node dist/main.js", "start:win": "set NODE_ENV=production && node dist/main.js",
"docker": "docker compose up --build --force-recreate -d", "docker": "docker compose up --build --force-recreate -d",
"commit": "cz", "commit": "cz",
"deploy": "standard-version --conventional-commits && npm run translateDocs && npm run build && cd lstV2 && npm run build", "deploy": "standard-version --conventional-commits && npm run translateDocs && npm run build && cd lstV2 && npm run build",
"db:migrate": "npx drizzle-kit push", "db:migrate": "npx drizzle-kit push",
"db:generate": "npx drizzle-kit generate", "db:generate": "npx drizzle-kit generate",
"translateDocs": "cd scripts && node translateScript.js", "translateDocs": "cd scripts && node translateScript.js",
"auth:generate": "npx @better-auth/cli generate --config ./app/src/pkg/auth/auth.ts", "auth:generate": "npx @better-auth/cli generate --config ./app/src/pkg/auth/auth.ts",
"updates": "ncu -g" "updates": "ncu -g"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.tuffraid.net/cowch/lst.git" "url": "https://git.tuffraid.net/cowch/lst.git"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@dotenvx/dotenvx": "^1.51.0", "@dotenvx/dotenvx": "^1.51.0",
"@tanstack/react-table": "^8.21.3", "@tanstack/react-table": "^8.21.3",
"@types/cors": "^2.8.19", "@types/cors": "^2.8.19",
"axios": "^1.12.2", "axios": "^1.12.2",
"better-auth": "^1.3.27", "better-auth": "^1.3.27",
"cors": "^2.8.5", "cors": "^2.8.5",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"date-fns-tz": "^3.2.0", "date-fns-tz": "^3.2.0",
"drizzle-kit": "^0.31.5", "drizzle-kit": "^0.31.5",
"drizzle-orm": "^0.44.6", "drizzle-orm": "^0.44.6",
"drizzle-zod": "^0.8.3", "drizzle-zod": "^0.8.3",
"express": "^5.1.0", "express": "^5.1.0",
"handlebars": "^4.7.8", "handlebars": "^4.7.8",
"morgan": "^1.10.1", "morgan": "^1.10.1",
"mssql": "^12.0.0", "mssql": "^12.0.0",
"nodemailer": "^7.0.9", "nodemailer": "^7.0.9",
"nodemailer-express-handlebars": "^7.0.0", "nodemailer-express-handlebars": "^7.0.0",
"npm-check-updates": "^19.0.0", "npm-check-updates": "^19.0.0",
"pg": "^8.16.3", "pg": "^8.16.3",
"pino": "^10.0.0", "pino": "^10.0.0",
"pino-pretty": "^13.1.2", "pino-pretty": "^13.1.2",
"postgres": "^3.4.7", "postgres": "^3.4.7",
"socket.io": "^4.8.1", "socket.io": "^4.8.1",
"zod": "^4.1.12" "zod": "^4.1.12"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "2.2.6", "@biomejs/biome": "2.2.6",
"@types/express": "^5.0.3", "@types/express": "^5.0.3",
"@types/morgan": "^1.9.10", "@types/morgan": "^1.9.10",
"@types/mssql": "^9.1.8", "@types/mssql": "^9.1.8",
"@types/node": "^24.7.1", "@types/node": "^24.7.1",
"@types/nodemailer": "^7.0.2", "@types/nodemailer": "^7.0.2",
"@types/nodemailer-express-handlebars": "^4.0.5", "@types/nodemailer-express-handlebars": "^4.0.5",
"concurrently": "^9.2.1", "@types/pg": "^8.15.5",
"cz-conventional-changelog": "^3.3.0", "concurrently": "^9.2.1",
"standard-version": "^9.5.0", "cz-conventional-changelog": "^3.3.0",
"ts-node-dev": "^2.0.0", "standard-version": "^9.5.0",
"tsx": "^4.20.6", "ts-node-dev": "^2.0.0",
"typescript": "^5.9.3" "tsx": "^4.20.6",
}, "typescript": "^5.9.3"
"config": { },
"commitizen": { "config": {
"path": "./node_modules/cz-conventional-changelog" "commitizen": {
} "path": "./node_modules/cz-conventional-changelog"
} }
}
} }