@opengis/fastify-table 2.5.71 → 2.5.73

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":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/auth/index.ts"],"names":[],"mappings":"AA6DA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAsGtC;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/auth/index.ts"],"names":[],"mappings":"AA8DA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAsGtC;AAED,eAAe,MAAM,CAAC"}
@@ -28,7 +28,7 @@ const loginApiParams = {
28
28
  policy: "L0",
29
29
  tags,
30
30
  package: packageName,
31
- rateLimit: config.rateLimit
31
+ rateLimit: config.rateLimit !== false
32
32
  ? {
33
33
  max: +(config.rateLimit?.login?.max || 5),
34
34
  timeWindow: config.rateLimit?.login?.timeWindow || "1 minute",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/file/index.ts"],"names":[],"mappings":"AAyBA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAuCtC;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/file/index.ts"],"names":[],"mappings":"AAyBA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAwCtC;AAED,eAAe,MAAM,CAAC"}
@@ -25,7 +25,7 @@ function plugin(app, opt = {}) {
25
25
  url: "/file/resize",
26
26
  config: {
27
27
  ...publicParams.config,
28
- rateLimit: config.rateLimit
28
+ rateLimit: config.rateLimit !== false
29
29
  ? {
30
30
  max: +(config.rateLimit?.resize?.max || 1000),
31
31
  timeWindow: config.rateLimit?.resize?.timeWindow || "1 minute",
@@ -1 +1 @@
1
- {"version":3,"file":"getFormByTable.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/getFormByTable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAY5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAezD,wBAA8B,OAAO,CACnC,EACE,EAAqB,EACrB,MAAM,EACN,IAAS,EACT,KAAU,EACV,MAAM,GACP,EAAE;IACD,EAAE,EAAE,UAAU,CAAC;IACf,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,EACD,KAAK,EAAE,YAAY,gBAkLpB"}
1
+ {"version":3,"file":"getFormByTable.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/getFormByTable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAY5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAezD,wBAA8B,OAAO,CACnC,EACE,EAAqB,EACrB,MAAM,EACN,IAAS,EACT,KAAU,EACV,MAAM,GACP,EAAE;IACD,EAAE,EAAE,UAAU,CAAC;IACf,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,EACD,KAAK,EAAE,YAAY,gBAoLpB"}
@@ -41,7 +41,9 @@ export default async function getForm({ pg = pgClients.client, params, user = {}
41
41
  if (!form) {
42
42
  // throw NotFoundError("form not found");
43
43
  }
44
- const { actions = [], message: accessMessage } = (await getAccess({ table, id: edit, form, user, method }, pg)) || {};
44
+ const { actions = [], message: accessMessage } = loadTable?.table || tokenData?.table || hookData?.table || pg.pk?.[table]
45
+ ? (await getAccess({ table, id: edit, form, user, method }, pg)) || {}
46
+ : { message: "invalid table name" };
45
47
  if (accessMessage) {
46
48
  throw ForbiddenError(accessMessage);
47
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/table/index.ts"],"names":[],"mappings":"AAiCA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAsGtC;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/table/index.ts"],"names":[],"mappings":"AAiCA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAuGtC;AAED,eAAe,MAAM,CAAC"}
@@ -25,7 +25,7 @@ function plugin(app, opt = {}) {
25
25
  tags,
26
26
  package: packageName,
27
27
  policy,
28
- rateLimit: config.rateLimit
28
+ rateLimit: config.rateLimit !== false
29
29
  ? {
30
30
  max: config.rateLimit?.suggest?.max || 10000,
31
31
  timeWindow: config.rateLimit?.suggest?.timeWindow || "1 minute",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/upload/index.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,GAAG,QA8GtC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/upload/index.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,GAAG,QA+GtC"}
@@ -40,7 +40,7 @@ export default function plugin(app) {
40
40
  package: packageName,
41
41
  summary: "Upload chunk of data",
42
42
  policy: uploadPolicy,
43
- rateLimit: config.rateLimit
43
+ rateLimit: config.rateLimit !== false
44
44
  ? {
45
45
  max: +(config.rateLimit?.uploadChunk?.max || 1000),
46
46
  timeWindow: config.rateLimit?.uploadChunk?.timeWindow || "1 minute",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.5.71",
3
+ "version": "2.5.73",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [
@@ -96,4 +96,4 @@
96
96
  },
97
97
  "author": "Softpro",
98
98
  "license": "ISC"
99
- }
99
+ }