@antelopejs/dms-api 0.0.1 → 0.1.0

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/index.js CHANGED
@@ -25,7 +25,7 @@ let pruneTask = null;
25
25
  async function construct(config) {
26
26
  (0, config_1.setConfig)(config);
27
27
  await (0, page_1.AddFrontendModule)({
28
- name: "@antelopejs/dms-api",
28
+ name: "@antelopejs/dms-api-frontend-vue",
29
29
  sourcePath: node_path_1.default.join(__dirname, "../frontend-vue"),
30
30
  renderer: { name: "vue", version: "3" },
31
31
  configKey: "dmsApi",
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAqCA,8BAUC;AAED,sBAgBC;AAED,0BAAkC;AAElC,oBAMC;AAxED,gBAAc;AACd,oBAAkB;AAClB,yBAAuB;AACvB,mBAAiB;AAEjB,0DAA6B;AAC7B,6DAAgE;AAChE,6FAGmD;AACnD,yDAAmE;AACnE,0DAAqD;AACrD,6CAGsB;AACtB,qCAAwD;AACxD,6BAKc;AACd,yCAKoB;AACpB,iDAAgD;AAEhD,IAAI,SAAS,GAAyB,IAAI,CAAC;AAEpC,KAAK,UAAU,SAAS,CAAC,MAA8B;IAC5D,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAC;IAElB,MAAM,IAAA,wBAAiB,EAAC;QACtB,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC;QACnD,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE;QACvC,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,CAAC;KACZ,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,KAAK;IACzB,MAAM,IAAA,8CAAc,EAAC,uBAAW,CAAC,CAAC;IAClC,MAAM,IAAA,u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ule: import("@antelopejs/interface-dms/dist/page").CategoryInfo;
@@ -1,3 +1,3 @@
1
1
  import { formSchema } from "@antelopejs/interface-dms/base";
2
- export declare const apiSettingsForm: import("@antelopejs/interface-dms/base").FormBuilder;
2
+ export declare const apiSettingsForm: import("@antelopejs/interface-dms/dist/base").FormBuilder;
3
3
  export declare const apiSettingsFormSchema: ReturnType<typeof formSchema>;
@@ -2,7 +2,7 @@
2
2
  import { computed } from 'vue'
3
3
  import type {
4
4
  ChartDataPoint,
5
- ChartResponse,
5
+ ApiChartResponse,
6
6
  RouteStatsPayload,
7
7
  } from '../composables/useApiIntrospection'
8
8
  import ApiMethodBadge from './internal/ApiMethodBadge.vue'
@@ -57,7 +57,7 @@ const C_WORST = STATUS_CLASSES[2].color
57
57
  const LATENCY_UNIT = 'ms'
58
58
 
59
59
  function seriesByCategory(
60
- payload: ChartResponse,
60
+ payload: ApiChartResponse,
61
61
  colors: Record<string, string>,
62
62
  ) {
63
63
  const buckets = new Map<string, ChartDataPoint[]>()
@@ -121,7 +121,13 @@ export interface ChartDataPoint {
121
121
  category?: string
122
122
  }
123
123
 
124
- export interface ChartResponse {
124
+ /**
125
+ * Payload shape of the dms-api statistics chart endpoints. Deliberately not
126
+ * named `ChartResponse`: the DMS UI layer exports an unrelated `ChartResponse`
127
+ * (`{ series: ChartSeries[] }`) under that name, and the two would shadow each
128
+ * other across layers.
129
+ */
130
+ export interface ApiChartResponse {
125
131
  data?: ChartDataPoint[]
126
132
  }
127
133
 
@@ -155,8 +161,8 @@ export interface RouteStatsPayload {
155
161
  route: { id: string; location: string; method: string }
156
162
  aggregate?: RouteAggregate
157
163
  charts: {
158
- counts: ChartResponse
159
- latency: ChartResponse
164
+ counts: ApiChartResponse
165
+ latency: ApiChartResponse
160
166
  }
161
167
  recent: RequestLogSummary[]
162
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-api",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,6 +16,20 @@
16
16
  "provenance": true,
17
17
  "registry": "https://registry.npmjs.org/"
18
18
  },
19
+ "scripts": {
20
+ "build": "rimraf dist && tsc -p tsconfig.build.json",
21
+ "dev": "ajs project run -w -p playground",
22
+ "lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && pnpm --dir frontend-vue lint:fix",
23
+ "lint": "oxlint && oxfmt --check . && pnpm --dir frontend-vue lint",
24
+ "typecheck": "tsc -p tsconfig.json",
25
+ "test": "pnpm --dir frontend-vue test",
26
+ "format": "oxfmt . && pnpm --dir frontend-vue format",
27
+ "frontend:dev": "cd playground && pnpm frontend:dev",
28
+ "release": "pnpm --dir frontend-vue install --frozen-lockfile && release-it",
29
+ "prepack": "pnpm run build",
30
+ "knip": "knip --dependencies",
31
+ "knip:all": "knip"
32
+ },
19
33
  "dependencies": {
20
34
  "@antelopejs/interface-api": ">=0.0.13 <1.0.0",
21
35
  "@antelopejs/interface-api-util": ">=0.1.2 <1.0.0",
@@ -43,6 +57,7 @@
43
57
  "optionalDependencies": {
44
58
  "@antelopejs/interface-dms-automation": ">=0.0.1 <1.0.0"
45
59
  },
60
+ "packageManager": "pnpm@10.6.5",
46
61
  "antelopeJs": {
47
62
  "baseUrl": "dist",
48
63
  "paths": {
@@ -50,18 +65,5 @@
50
65
  "*"
51
66
  ]
52
67
  }
53
- },
54
- "scripts": {
55
- "build": "rimraf dist && tsc -p tsconfig.build.json",
56
- "dev": "ajs project run -w -p playground",
57
- "lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && pnpm --dir frontend-vue lint:fix",
58
- "lint": "oxlint && oxfmt --check . && pnpm --dir frontend-vue lint",
59
- "typecheck": "tsc -p tsconfig.json",
60
- "test": "pnpm --dir frontend-vue test",
61
- "format": "oxfmt . && pnpm --dir frontend-vue format",
62
- "frontend:dev": "cd playground && pnpm frontend:dev",
63
- "release": "pnpm --dir frontend-vue install --frozen-lockfile && release-it",
64
- "knip": "knip --dependencies",
65
- "knip:all": "knip"
66
68
  }
67
- }
69
+ }