@opengis/fastify-table 2.5.54 → 2.5.56

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":"schema.d.ts","sourceRoot":"","sources":["../../../../server/routes/access/schema.ts"],"names":[],"mappings":";AAAA,wBAAoB;AAEpB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,GACrB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;CAQtB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;;;;;;;CAQrB,CAAC;AAEF,QAAA,MAAM,qBAAqB;;;;;;;;;;;CAQ1B,CAAC;AAEF,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD1B,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDzB,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../server/routes/access/schema.ts"],"names":[],"mappings":";AAAA,wBAAoB;AAEpB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,GACrB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;CAQtB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;;;;;;;CAQrB,CAAC;AAEF,QAAA,MAAM,qBAAqB;;;;;;;;;;;CAQ1B,CAAC;AAEF,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D1B,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DzB,CAAC"}
@@ -57,7 +57,7 @@ const accessGroupPostSchema = {
57
57
  properties: {
58
58
  path: {
59
59
  type: "string",
60
- pattern: "^([\\d\\w._-]+)$",
60
+ pattern: "^(\\/|[\\d\\w._-]+)$",
61
61
  },
62
62
  resource: {
63
63
  type: "string",
@@ -67,7 +67,17 @@ const accessGroupPostSchema = {
67
67
  type: "array",
68
68
  items: {
69
69
  type: "string",
70
- enum: ["read", "create", "update", "delete"],
70
+ // enum: ["read", "create", "update", "delete"],
71
+ enum: [
72
+ "read",
73
+ "create",
74
+ "update",
75
+ "delete",
76
+ "view",
77
+ "add",
78
+ "edit",
79
+ "del",
80
+ ], // legacy actions support
71
81
  },
72
82
  },
73
83
  },
@@ -106,7 +116,7 @@ const accessUserPostSchema = {
106
116
  properties: {
107
117
  path: {
108
118
  type: "string",
109
- pattern: "^([\\d\\w._-]+)$",
119
+ pattern: "^(\\/|[\\d\\w._-]+)$",
110
120
  },
111
121
  resource: {
112
122
  type: "string",
@@ -116,7 +126,17 @@ const accessUserPostSchema = {
116
126
  type: "array",
117
127
  items: {
118
128
  type: "string",
119
- enum: ["read", "create", "update", "delete"],
129
+ // enum: ["read", "create", "update", "delete"],
130
+ enum: [
131
+ "read",
132
+ "create",
133
+ "update",
134
+ "delete",
135
+ "view",
136
+ "add",
137
+ "edit",
138
+ "del",
139
+ ], // legacy actions support
120
140
  },
121
141
  },
122
142
  },
@@ -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,QAqCtC;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,QAuCtC;AAED,eAAe,MAAM,CAAC"}
@@ -43,7 +43,9 @@ function plugin(app, opt = {}) {
43
43
  schema: resizeSchema,
44
44
  handler: resizeAll,
45
45
  });
46
- app.post("/file/upload/*", privateParams, upload);
46
+ if (!app.hasRoute({ method: "POST", url: "/file/upload/*" })) {
47
+ app.post("/file/upload/*", privateParams, upload);
48
+ }
47
49
  app.post("/file/upload-image/*", privateParams, uploadImage);
48
50
  app.get("/file/download/*", publicParams, download);
49
51
  app.get("/file/delete/*", publicParams, deleteFileAPI);
@@ -1 +1 @@
1
- {"version":3,"file":"suggest.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA+BpD,wBAAsB,kBAAkB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,EACV,GAAG,EACH,EAAqB,GACtB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB;;;;;UAwFA;AAED,wBAA8B,OAAO,CAAC,GAAG,EAAE,GAAG,gBA2d7C"}
1
+ {"version":3,"file":"suggest.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA+BpD,wBAAsB,kBAAkB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,EACV,GAAG,EACH,EAAqB,GACtB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB;;;;;UAwFA;AAED,wBAA8B,OAAO,CAAC,GAAG,EAAE,GAAG,gBA4d7C"}
@@ -186,7 +186,8 @@ export default async function suggest(req) {
186
186
  if (!pg || !pg.pk || !pg.pgType) {
187
187
  throw Error("empty pg");
188
188
  }
189
- if (table && !pg?.pk?.[tableName]) {
189
+ // allow materialized views, simple views along regular tables
190
+ if (table && !pg?.tlist?.includes?.(tableName)) {
190
191
  throw BadRequestError("param name is invalid: 1");
191
192
  }
192
193
  const columns = hookBody?.columns || body?.columns;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.5.54",
3
+ "version": "2.5.56",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [