@opengis/fastify-table 2.4.6 → 2.4.8

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.
package/dist/errors.d.ts CHANGED
@@ -31,8 +31,16 @@ export declare const UnsupportedMediaTypeError: createError.FastifyErrorConstruc
31
31
  code: "UNSUPPORTED_MEDIA_TYPE_ERROR";
32
32
  statusCode: 415;
33
33
  }, [any?, any?, any?]>;
34
+ export declare const TooManyRequestsError: createError.FastifyErrorConstructor<{
35
+ code: "TOO_MANY_REQUESTS_ERROR";
36
+ statusCode: 429;
37
+ }, [any?, any?, any?]>;
34
38
  export declare const NotImplementedError: createError.FastifyErrorConstructor<{
35
39
  code: "NOT_IMPLEMENTED_ERROR";
36
40
  statusCode: 501;
37
41
  }, [any?, any?, any?]>;
42
+ export declare const ServiceUnavailableError: createError.FastifyErrorConstructor<{
43
+ code: "SERVICE_UNAVAILABLE_ERROR";
44
+ statusCode: 503;
45
+ }, [any?, any?, any?]>;
38
46
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../errors.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAO,MAAM,eAAe;;;sBAI3B,CAAC;AACF,eAAO,MAAM,iBAAiB;;;sBAI7B,CAAC;AACF,eAAO,MAAM,cAAc;;;sBAI1B,CAAC;AACF,eAAO,MAAM,aAAa;;;sBAIzB,CAAC;AACF,eAAO,MAAM,aAAa;;;sBAIzB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;sBAI/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;sBAIhC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;sBAIrC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;sBAI/B,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../errors.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAO,MAAM,eAAe;;;sBAI3B,CAAC;AACF,eAAO,MAAM,iBAAiB;;;sBAI7B,CAAC;AACF,eAAO,MAAM,cAAc;;;sBAI1B,CAAC;AACF,eAAO,MAAM,aAAa;;;sBAIzB,CAAC;AACF,eAAO,MAAM,aAAa;;;sBAIzB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;sBAI/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;sBAIhC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;sBAIrC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;sBAIhC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;sBAI/B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;sBAInC,CAAC"}
package/dist/errors.js CHANGED
@@ -7,4 +7,6 @@ export const ConflictError = createError("CONFLICT_ERROR", "Injection attempt: %
7
7
  export const LengthRequiredError = createError("LENGTH_REQUIRED_ERROR", "Length Required: %s", 411);
8
8
  export const PayloadTooLargeError = createError("PAYLOAD_TOO_LARGE_ERROR", "Payload Too Large: %s", 413);
9
9
  export const UnsupportedMediaTypeError = createError("UNSUPPORTED_MEDIA_TYPE_ERROR", "Unsupported Media Type: %s", 415);
10
+ export const TooManyRequestsError = createError("TOO_MANY_REQUESTS_ERROR", "Too many requests: %s", 429);
10
11
  export const NotImplementedError = createError("NOT_IMPLEMENTED_ERROR", "Not implemented: %s", 501);
12
+ export const ServiceUnavailableError = createError("SERVICE_UNAVAILABLE_ERROR", "Service Unavailable: %s", 503);
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../server/routes/util/controllers/config.ts"],"names":[],"mappings":"AAyBA,wBAA8B,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,gBAOpD"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../server/routes/util/controllers/config.ts"],"names":[],"mappings":"AAyBA,wBAA8B,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,gBAWpD"}
@@ -25,7 +25,9 @@ function processObject(obj, substr) {
25
25
  : substringObject(obj, substr);
26
26
  }
27
27
  export default async function apiConfig({ user }) {
28
- if (config.local || (config.debug && user?.user_type?.includes?.("admin"))) {
28
+ if (process.platform === "win32" ||
29
+ config.local ||
30
+ (config.debug && user?.user_type?.includes?.("admin"))) {
29
31
  return config;
30
32
  }
31
33
  const reductConfig = processObject(config, 3);
@@ -40,7 +40,7 @@ addHook("onWidgetSet", onWidgetSet);
40
40
  const policy = "L0";
41
41
  const params = { config: { tags, policy }, schema: tableSchema };
42
42
  export default function route(app) {
43
- app.get("/widget/:type/:entityType/:objectid", params, async (req) => {
43
+ app.get("/v2/widget/:type/:entityType/:objectid", params, async (req) => {
44
44
  const result = await widgetEntityGet({
45
45
  type: req.params.type,
46
46
  entityType: req.params.entityType,
@@ -51,7 +51,7 @@ export default function route(app) {
51
51
  }, req.pg);
52
52
  return result;
53
53
  });
54
- app.post("/widget/:type/:entityType/:objectid", params, async (req) => {
54
+ app.post("/v2/widget/:type/:entityType/:objectid", params, async (req) => {
55
55
  if (["gallery", "file"].includes(req.params.type) &&
56
56
  req.headers["content-type"]?.startsWith("multipart/form-data")) {
57
57
  const file = await uploadMultiPart(req);
@@ -74,7 +74,7 @@ export default function route(app) {
74
74
  }, req.pg);
75
75
  return result;
76
76
  });
77
- app.put("/widget/:type/:entityType/:objectid/:id", params, async (req) => {
77
+ app.put("/v2/widget/:type/:entityType/:objectid/:id", params, async (req) => {
78
78
  if (["gallery", "file"].includes(req.params.type) &&
79
79
  req.headers["content-type"]?.startsWith("multipart/form-data")) {
80
80
  const file = await uploadMultiPart(req);
@@ -99,7 +99,7 @@ export default function route(app) {
99
99
  }, req.pg);
100
100
  return result;
101
101
  });
102
- app.delete("/widget/:type/:entityType/:objectid/:id", params, async (req) => {
102
+ app.delete("/v2/widget/:type/:entityType/:objectid/:id", params, async (req) => {
103
103
  const result = await widgetEntityDel({
104
104
  type: req.params.type,
105
105
  entityType: req.params.entityType,
@@ -111,8 +111,8 @@ export default function route(app) {
111
111
  return result;
112
112
  });
113
113
  app.get("/widget/:type/:objectid", params, widgetGet);
114
- app.post("/widget/:type/:objectid", params, widgetSet);
115
- app.put("/widget/:type/:objectid/:id", params, widgetSet);
114
+ app.post("/widget/:type/:objectid/:id?", params, widgetSet);
115
+ // app.put("/widget/:type/:objectid/:id", params, widgetSet);
116
116
  app.delete("/widget/:type/:objectid/:id", params, widgetDel);
117
117
  app.put("/file-edit/:id", params, fileEdit);
118
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.4.6",
3
+ "version": "2.4.8",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [