@opengis/fastify-table 2.5.4 → 2.5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"getData.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/functions/getData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAwFzD,wBAA8B,OAAO,CACnC,EACE,EAAqB,EACrB,MAAM,EACN,KAAK,EACL,EAAE,EACF,OAAY,EACZ,KAAU,EACV,IAAS,EACT,YAAY,EACZ,YAAY,EACZ,KAAY,EACZ,UAAU,EACV,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,YAAY,EACrB,QAAgB,GACjB,EAAE;IACD,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,MAAM,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,KAAK,CAAC,EAAE,YAAY,EACpB,MAAM,CAAC,EAAE,GAAG,gBA64Bb"}
1
+ {"version":3,"file":"getData.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/functions/getData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAwFzD,wBAA8B,OAAO,CACnC,EACE,EAAqB,EACrB,MAAM,EACN,KAAK,EACL,EAAE,EACF,OAAY,EACZ,KAAU,EACV,IAAS,EACT,YAAY,EACZ,YAAY,EACZ,KAAY,EACZ,UAAU,EACV,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,YAAY,EACrB,QAAgB,GACjB,EAAE;IACD,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,MAAM,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,KAAK,CAAC,EAAE,YAAY,EACpB,MAAM,CAAC,EAAE,GAAG,gBA84Bb"}
@@ -202,6 +202,7 @@ export default async function dataAPI({ pg = pgClients.client, params, table, id
202
202
  if (!pk) {
203
203
  throw NotFoundError(`table not found: ${table1}`);
204
204
  }
205
+ const idx = {};
205
206
  const columnList = dbColumns.map((el) => el.name || el).join(",");
206
207
  const sqlTable = sql
207
208
  ?.filter?.((el) => !el?.disabled &&
@@ -275,7 +276,6 @@ export default async function dataAPI({ pg = pgClients.client, params, table, id
275
276
  const keyQuery = query?.key && (loadTable?.key || tokenData?.key) && !objectId
276
277
  ? `${loadTable?.key || tokenData?.key}=$1`
277
278
  : null;
278
- const idx = {};
279
279
  const args = (objectId ? [objectId] : null) ||
280
280
  (query?.key && loadTable.key ? [query.key] : []);
281
281
  if (args[0]) {
package/package.json CHANGED
@@ -1,98 +1,98 @@
1
- {
2
- "name": "@opengis/fastify-table",
3
- "version": "2.5.4",
4
- "type": "module",
5
- "description": "core-plugins",
6
- "keywords": [
7
- "fastify",
8
- "table",
9
- "crud",
10
- "auth",
11
- "pg",
12
- "backend"
13
- ],
14
- "main": "dist/index.js",
15
- "exports": {
16
- ".": "./dist/index.js",
17
- "./index.js": "./dist/index.js",
18
- "./errors.js": "./dist/errors.js",
19
- "./utils.js": "./dist/utils.js",
20
- "./package.json": "./package.json"
21
- },
22
- "files": [
23
- "dist/*"
24
- ],
25
- "scripts": {
26
- "dump": "bun ./script/dump.ts",
27
- "migrate": "bun ./script/migrate.ts",
28
- "dump1": "bun ./dist/script/dump.js",
29
- "migrate1": "bun ./dist/script/migrate.js",
30
- "prepublishOnly": "npm run build",
31
- "clean": "tsc -b --clean",
32
- "build": "tsc -b --clean && tsc && copyfiles server/plugins/grpc/utils/*.proto dist && copyfiles server/migrations/*.sql dist && copyfiles server/templates/**/*.html dist && copyfiles server/templates/**/*.hbs dist && copyfiles script/* dist && copyfiles -u 2 module/core/*/* dist/module/core",
33
- "prod": "NODE_ENV=production bun dist/server",
34
- "patch": "npm version patch && git push && npm publish",
35
- "minor": "npm version minor && git push && npm publish",
36
- "major": "npm version major && git push && npm publish",
37
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
38
- "test": "npx vitest run",
39
- "compress": "node compress.js",
40
- "dev1": "bun --hot dist/server",
41
- "dev": "NODE_ENV=development bun start",
42
- "start": "LOG_LEVEL=trace bun server",
43
- "start1": "npx tsx server"
44
- },
45
- "dependencies": {
46
- "@aws-sdk/client-s3": "3.1079.0",
47
- "@aws-sdk/lib-storage": "3.1079.0",
48
- "@fastify/cookie": "11.0.2",
49
- "@fastify/http-proxy": "11.5.0",
50
- "@fastify/multipart": "10.0.0",
51
- "@fastify/passport": "3.0.2",
52
- "@fastify/rate-limit": "11.1.0",
53
- "@fastify/session": "11.1.1",
54
- "@grpc/grpc-js": "1.14.4",
55
- "@grpc/proto-loader": "0.8.1",
56
- "apache-crypt": "1.2.6",
57
- "dotenv": "17.4.2",
58
- "fastify": "5.9.0",
59
- "fastify-plugin": "6.0.0",
60
- "fastify-session-redis-store": "7.1.2",
61
- "handlebars": "4.7.9",
62
- "image-size": "2.0.2",
63
- "ioredis": "5.11.1",
64
- "js-yaml": "5.2.1",
65
- "markdown-it": "14.3.0",
66
- "minio": "^8.0.7",
67
- "nodemailer": "9.0.3",
68
- "otplib": "13.4.1",
69
- "pg": "8.22.0",
70
- "pino": "10.3.1",
71
- "pino-abstract-transport": "3.0.0",
72
- "promised-handlebars": "2.0.1",
73
- "qrcode": "1.5.4",
74
- "sharp": "0.35.3",
75
- "uglify-js": "3.19.3",
76
- "undici": "8.6.0"
77
- },
78
- "devDependencies": {
79
- "@stylistic/eslint-plugin": "^5.10.0",
80
- "@types/bun": "^1.3.5",
81
- "@types/js-yaml": "^4.0.9",
82
- "@types/markdown-it": "^14.1.2",
83
- "@types/node": "^26.1.0",
84
- "@types/nodemailer": "^8.0.1",
85
- "@types/passport": "^1.0.17",
86
- "@types/passport-local": "^1.0.38",
87
- "@types/pg": "^8.20.0",
88
- "@types/qrcode": "^1.5.6",
89
- "copyfiles": "^2.4.1",
90
- "eslint": "^10.6.0",
91
- "eslint-stylistic-airbnb": "^3.2.0",
92
- "ts-migrate": "^0.1.35",
93
- "typescript": "^6.0.2",
94
- "vitest": "^4.1.2"
95
- },
96
- "author": "Softpro",
97
- "license": "ISC"
98
- }
1
+ {
2
+ "name": "@opengis/fastify-table",
3
+ "version": "2.5.5",
4
+ "type": "module",
5
+ "description": "core-plugins",
6
+ "keywords": [
7
+ "fastify",
8
+ "table",
9
+ "crud",
10
+ "auth",
11
+ "pg",
12
+ "backend"
13
+ ],
14
+ "main": "dist/index.js",
15
+ "exports": {
16
+ ".": "./dist/index.js",
17
+ "./index.js": "./dist/index.js",
18
+ "./errors.js": "./dist/errors.js",
19
+ "./utils.js": "./dist/utils.js",
20
+ "./package.json": "./package.json"
21
+ },
22
+ "files": [
23
+ "dist/*"
24
+ ],
25
+ "scripts": {
26
+ "dump": "bun ./script/dump.ts",
27
+ "migrate": "bun ./script/migrate.ts",
28
+ "dump1": "bun ./dist/script/dump.js",
29
+ "migrate1": "bun ./dist/script/migrate.js",
30
+ "prepublishOnly": "npm run build",
31
+ "clean": "tsc -b --clean",
32
+ "build": "tsc -b --clean && tsc && copyfiles server/plugins/grpc/utils/*.proto dist && copyfiles server/migrations/*.sql dist && copyfiles server/templates/**/*.html dist && copyfiles server/templates/**/*.hbs dist && copyfiles script/* dist && copyfiles -u 2 module/core/*/* dist/module/core",
33
+ "prod": "NODE_ENV=production bun dist/server",
34
+ "patch": "npm version patch && git push && npm publish",
35
+ "minor": "npm version minor && git push && npm publish",
36
+ "major": "npm version major && git push && npm publish",
37
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
38
+ "test": "npx vitest run",
39
+ "compress": "node compress.js",
40
+ "dev1": "bun --hot dist/server",
41
+ "dev": "NODE_ENV=development bun start",
42
+ "start": "LOG_LEVEL=trace bun server",
43
+ "start1": "npx tsx server"
44
+ },
45
+ "dependencies": {
46
+ "@aws-sdk/client-s3": "3.1079.0",
47
+ "@aws-sdk/lib-storage": "3.1079.0",
48
+ "@fastify/cookie": "11.0.2",
49
+ "@fastify/http-proxy": "11.5.0",
50
+ "@fastify/multipart": "10.0.0",
51
+ "@fastify/passport": "3.0.2",
52
+ "@fastify/rate-limit": "11.1.0",
53
+ "@fastify/session": "11.1.1",
54
+ "@grpc/grpc-js": "1.14.4",
55
+ "@grpc/proto-loader": "0.8.1",
56
+ "apache-crypt": "1.2.6",
57
+ "dotenv": "17.4.2",
58
+ "fastify": "5.9.0",
59
+ "fastify-plugin": "6.0.0",
60
+ "fastify-session-redis-store": "7.1.2",
61
+ "handlebars": "4.7.9",
62
+ "image-size": "2.0.2",
63
+ "ioredis": "5.11.1",
64
+ "js-yaml": "5.2.1",
65
+ "markdown-it": "14.3.0",
66
+ "minio": "^8.0.7",
67
+ "nodemailer": "9.0.3",
68
+ "otplib": "13.4.1",
69
+ "pg": "8.22.0",
70
+ "pino": "10.3.1",
71
+ "pino-abstract-transport": "3.0.0",
72
+ "promised-handlebars": "2.0.1",
73
+ "qrcode": "1.5.4",
74
+ "sharp": "0.35.3",
75
+ "uglify-js": "3.19.3",
76
+ "undici": "8.6.0"
77
+ },
78
+ "devDependencies": {
79
+ "@stylistic/eslint-plugin": "^5.10.0",
80
+ "@types/bun": "^1.3.5",
81
+ "@types/js-yaml": "^4.0.9",
82
+ "@types/markdown-it": "^14.1.2",
83
+ "@types/node": "^26.1.0",
84
+ "@types/nodemailer": "^8.0.1",
85
+ "@types/passport": "^1.0.17",
86
+ "@types/passport-local": "^1.0.38",
87
+ "@types/pg": "^8.20.0",
88
+ "@types/qrcode": "^1.5.6",
89
+ "copyfiles": "^2.4.1",
90
+ "eslint": "^10.6.0",
91
+ "eslint-stylistic-airbnb": "^3.2.0",
92
+ "ts-migrate": "^0.1.35",
93
+ "typescript": "^6.0.2",
94
+ "vitest": "^4.1.2"
95
+ },
96
+ "author": "Softpro",
97
+ "license": "ISC"
98
+ }