corequery 0.1.13 → 0.2.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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/server/dist/server/config/about-page-config.d.ts +11 -0
  3. package/server/dist/server/config/about-page-config.js +2 -0
  4. package/server/dist/server/config/about-page-config.js.map +1 -0
  5. package/server/dist/server/config/config.d.ts +19 -0
  6. package/server/dist/server/config/config.js +2 -0
  7. package/server/dist/server/config/config.js.map +1 -0
  8. package/server/dist/server/config/footer-config.d.ts +3 -0
  9. package/server/dist/server/config/footer-config.js +2 -0
  10. package/server/dist/server/config/footer-config.js.map +1 -0
  11. package/server/dist/server/config/index.d.ts +8 -0
  12. package/server/dist/server/config/index.js +9 -0
  13. package/server/dist/server/config/index.js.map +1 -0
  14. package/server/dist/server/config/landing-page-config.d.ts +3 -0
  15. package/server/dist/server/config/landing-page-config.js +2 -0
  16. package/server/dist/server/config/landing-page-config.js.map +1 -0
  17. package/server/dist/server/config/line-config.d.ts +30 -0
  18. package/server/dist/server/config/line-config.js +2 -0
  19. package/server/dist/server/config/line-config.js.map +1 -0
  20. package/server/dist/server/config/lines-page-config.d.ts +7 -0
  21. package/server/dist/server/config/lines-page-config.js +2 -0
  22. package/server/dist/server/config/lines-page-config.js.map +1 -0
  23. package/server/dist/server/config/stop-config.d.ts +15 -0
  24. package/server/dist/server/config/stop-config.js +2 -0
  25. package/server/dist/server/config/stop-config.js.map +1 -0
  26. package/server/dist/server/config/terminology.d.ts +5 -0
  27. package/server/dist/server/config/terminology.js +2 -0
  28. package/server/dist/server/config/terminology.js.map +1 -0
  29. package/server/dist/server/corequery.d.ts +1 -5
  30. package/server/dist/server/corequery.js +0 -1
  31. package/server/dist/server/corequery.js.map +1 -1
  32. package/server/dist/server/index.d.ts +2 -0
  33. package/server/dist/server/index.js +2 -0
  34. package/server/dist/server/index.js.map +1 -1
  35. package/server/dist/server/lint-config.d.ts +7 -0
  36. package/server/dist/server/lint-config.js +8 -0
  37. package/server/dist/server/lint-config.js.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corequery",
3
- "version": "0.1.13",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "server/dist",
@@ -0,0 +1,11 @@
1
+ export type AboutPageConfig = {
2
+ readonly primaryMarkdown: string;
3
+ readonly dataSources: readonly {
4
+ readonly name: string;
5
+ readonly licensingMessage: string | null;
6
+ readonly links: readonly {
7
+ readonly label: string;
8
+ readonly url: string;
9
+ }[];
10
+ }[];
11
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=about-page-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about-page-config.js","sourceRoot":"","sources":["../../../config/about-page-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import type { AssetConfig } from "../web-server/asset-preparer.js";
2
+ import type { AboutPageConfig } from "./about-page-config.js";
3
+ import type { FooterConfig } from "./footer-config.js";
4
+ import type { LandingPageConfig } from "./landing-page-config.js";
5
+ import type { LineConfig } from "./line-config.js";
6
+ import type { LinesPageConfig } from "./lines-page-config.js";
7
+ import type { StopConfig } from "./stop-config.js";
8
+ import type { Terminology } from "./terminology.js";
9
+ export type CorequeryConfig = {
10
+ readonly port: number;
11
+ readonly assets: AssetConfig;
12
+ readonly stops: readonly StopConfig[];
13
+ readonly lines: readonly LineConfig[];
14
+ readonly terminology: Terminology;
15
+ readonly landingPage: LandingPageConfig;
16
+ readonly footer: FooterConfig;
17
+ readonly aboutPage: AboutPageConfig;
18
+ readonly linesPage: LinesPageConfig;
19
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../config/config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export type FooterConfig = {
2
+ readonly footerMessageMarkdown: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=footer-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer-config.js","sourceRoot":"","sources":["../../../config/footer-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export * from "./about-page-config.js";
2
+ export * from "./config.js";
3
+ export * from "./footer-config.js";
4
+ export * from "./landing-page-config.js";
5
+ export * from "./line-config.js";
6
+ export * from "./lines-page-config.js";
7
+ export * from "./stop-config.js";
8
+ export * from "./terminology.js";
@@ -0,0 +1,9 @@
1
+ export * from "./about-page-config.js";
2
+ export * from "./config.js";
3
+ export * from "./footer-config.js";
4
+ export * from "./landing-page-config.js";
5
+ export * from "./line-config.js";
6
+ export * from "./lines-page-config.js";
7
+ export * from "./stop-config.js";
8
+ export * from "./terminology.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../config/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type LandingPageConfig = {
2
+ readonly primaryMarkdown: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=landing-page-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"landing-page-config.js","sourceRoot":"","sources":["../../../config/landing-page-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ export type LineConfig = {
2
+ readonly id: number;
3
+ readonly name: string;
4
+ readonly code: string | null;
5
+ readonly tags: string[];
6
+ readonly urlPath: string;
7
+ readonly routes: readonly RouteConfig[];
8
+ readonly diagram: LineDiagramConfig;
9
+ };
10
+ export type RouteConfig = {
11
+ readonly id: number;
12
+ readonly name: string;
13
+ readonly tags: string[];
14
+ readonly stops: readonly {
15
+ readonly stopId: number;
16
+ readonly type: "regular" | "hidden-unless-stopped-at";
17
+ }[];
18
+ readonly color: Color | null;
19
+ };
20
+ export type LineDiagramConfig = {
21
+ readonly entries: {
22
+ readonly name: string | null;
23
+ readonly color: string;
24
+ readonly stops: readonly {
25
+ readonly stopId: number;
26
+ readonly type: "regular" | "always-express";
27
+ }[];
28
+ }[];
29
+ };
30
+ export type Color = "red" | "yellow" | "green" | "cyan" | "blue" | "pink" | "purple" | "gray";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=line-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-config.js","sourceRoot":"","sources":["../../../config/line-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type LinesPageConfig = {
2
+ readonly sections: readonly LinesPageSection[];
3
+ };
4
+ export type LinesPageSection = {
5
+ readonly tag: string;
6
+ readonly name: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lines-page-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines-page-config.js","sourceRoot":"","sources":["../../../config/lines-page-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export type StopConfig = {
2
+ readonly id: number;
3
+ readonly name: string;
4
+ readonly tags: string[];
5
+ readonly urlPath: string;
6
+ readonly location: {
7
+ readonly latitude: number;
8
+ readonly longitude: number;
9
+ } | null;
10
+ /** Positions within in stop, i.e. platforms, bays, wharfs, etc. */
11
+ readonly positions: readonly {
12
+ readonly stopPositionId: number;
13
+ readonly name: string;
14
+ }[];
15
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stop-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop-config.js","sourceRoot":"","sources":["../../../config/stop-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export type Terminology = {
2
+ readonly stop: "stop" | "station";
3
+ readonly line: "line" | "route";
4
+ readonly stopPosition: "platform" | "track" | "bay" | "wharf" | "wharf-and-side" | "stand";
5
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=terminology.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminology.js","sourceRoot":"","sources":["../../../config/terminology.ts"],"names":[],"mappings":""}
@@ -1,8 +1,4 @@
1
- import type { AssetConfig } from "./web-server/asset-preparer.js";
2
- type CorequeryConfig = {
3
- readonly port: number;
4
- readonly assets: AssetConfig;
5
- };
1
+ import type { CorequeryConfig } from "./config/config.js";
6
2
  type CorequeryConfigBuilder = (corequery: Corequery) => CorequeryConfig;
7
3
  export declare class Corequery {
8
4
  private readonly _config;
@@ -7,7 +7,6 @@ export class Corequery {
7
7
  _webServer;
8
8
  constructor(configBuilder) {
9
9
  this._config = configBuilder(this);
10
- console.log("Corequery config:", this._config, env.COREQUERY_HOT_RELOAD ? "vite-middleware" : "dist-folder");
11
10
  this._webServer = new WebServer(this, this._config.port, this._config.assets, env.COREQUERY_HOT_RELOAD ? "vite-middleware" : "dist-folder", serverFolderPath);
12
11
  }
13
12
  async start() {
@@ -1 +1 @@
1
- {"version":3,"file":"corequery.js","sourceRoot":"","sources":["../../corequery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AASvD,MAAM,OAAO,SAAS;IACH,OAAO,CAAkB;IACzB,UAAU,CAAY;IAEvC,YAAY,aAAqC;QAC/C,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;QAEnC,OAAO,CAAC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ACT,aAAa,EAAE,CAAC;QAEhB,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;QACtC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;CACF"}
@@ -1 +1,3 @@
1
1
  export * from "./corequery.js";
2
+ export * from "./lint-config.js";
3
+ export * from "./config/index.js";
@@ -1,2 +1,4 @@
1
1
  export * from "./corequery.js";
2
+ export * from "./lint-config.js";
3
+ export * from "./config/index.js";
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { CorequeryConfig } from "./config/config.js";
2
+ type LintableConfig = Omit<CorequeryConfig, "assets" | "port">;
3
+ type LintOptions = {
4
+ pass?: boolean;
5
+ };
6
+ export declare function lintConfig(_config: LintableConfig, options?: LintOptions): void;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ export function lintConfig(_config, options = {}) {
2
+ const pass = options.pass ?? false;
3
+ if (pass) {
4
+ return;
5
+ }
6
+ throw new Error("Config is invalid - not implemented yet!");
7
+ }
8
+ //# sourceMappingURL=lint-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint-config.js","sourceRoot":"","sources":["../../lint-config.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,UAAU,CAAC,OAAuB,EAAE,UAAuB,EAAE;IAC3E,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAAC;IAEnC,IAAI,IAAI,EAAE,CAAC;QACT,OAAO;IACT,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAC9D,CAAC"}