@golemio/city-districts 1.2.4-dev.804360444 → 1.2.4-dev.836337066

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/db/example/00_truncate_tables.sql +1 -0
  2. package/dist/integration-engine/repositories/index.d.ts +0 -1
  3. package/dist/integration-engine/repositories/index.js +0 -1
  4. package/dist/integration-engine/repositories/index.js.map +1 -1
  5. package/dist/integration-engine/transformations/index.d.ts +0 -1
  6. package/dist/integration-engine/transformations/index.js +0 -1
  7. package/dist/integration-engine/transformations/index.js.map +1 -1
  8. package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.d.ts +0 -2
  9. package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.js +2 -7
  10. package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.js.map +1 -1
  11. package/dist/output-gateway/index.d.ts +1 -2
  12. package/dist/output-gateway/index.js +1 -2
  13. package/dist/output-gateway/index.js.map +1 -1
  14. package/dist/output-gateway/repositories/CityDistrictsPostgresRepository.d.ts +3 -3
  15. package/dist/output-gateway/repositories/CityDistrictsPostgresRepository.js +11 -8
  16. package/dist/output-gateway/repositories/CityDistrictsPostgresRepository.js.map +1 -1
  17. package/dist/output-gateway/repositories/index.d.ts +0 -1
  18. package/dist/output-gateway/repositories/index.js +0 -1
  19. package/dist/output-gateway/repositories/index.js.map +1 -1
  20. package/dist/schema-definitions/index.js +0 -14
  21. package/dist/schema-definitions/index.js.map +1 -1
  22. package/package.json +3 -3
  23. package/db/example/mongo_data/dataplatform/citydistricts.bson +0 -0
  24. package/db/example/mongo_data/dataplatform/citydistricts.metadata.json +0 -1
  25. package/dist/integration-engine/repositories/CityDistrictMongoRepository.d.ts +0 -5
  26. package/dist/integration-engine/repositories/CityDistrictMongoRepository.js +0 -26
  27. package/dist/integration-engine/repositories/CityDistrictMongoRepository.js.map +0 -1
  28. package/dist/integration-engine/transformations/CityDistrictsMongoTransformation.d.ts +0 -6
  29. package/dist/integration-engine/transformations/CityDistrictsMongoTransformation.js +0 -41
  30. package/dist/integration-engine/transformations/CityDistrictsMongoTransformation.js.map +0 -1
  31. package/dist/output-gateway/CityDistrictsMongoRouter.d.ts +0 -8
  32. package/dist/output-gateway/CityDistrictsMongoRouter.js +0 -15
  33. package/dist/output-gateway/CityDistrictsMongoRouter.js.map +0 -1
  34. package/dist/output-gateway/repositories/CityDistrictsMongoRepository.d.ts +0 -7
  35. package/dist/output-gateway/repositories/CityDistrictsMongoRepository.js +0 -17
  36. package/dist/output-gateway/repositories/CityDistrictsMongoRepository.js.map +0 -1
  37. /package/db/example/{citydistricts.sql → 01_citydistricts.sql} +0 -0
@@ -0,0 +1 @@
1
+ TRUNCATE "citydistricts";
@@ -1,2 +1 @@
1
- export * from "./CityDistrictMongoRepository";
2
1
  export * from "./CityDistrictPostgresRepository";
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* ie/repositories/index.ts */
18
- __exportStar(require("./CityDistrictMongoRepository"), exports);
19
18
  __exportStar(require("./CityDistrictPostgresRepository"), exports);
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,gEAA8C;AAC9C,mEAAiD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,mEAAiD"}
@@ -1,2 +1 @@
1
- export * from "./CityDistrictsMongoTransformation";
2
1
  export * from "./CityDistrictsPostgresTransformation";
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* ie/transformations/index.ts */
18
- __exportStar(require("./CityDistrictsMongoTransformation"), exports);
19
18
  __exportStar(require("./CityDistrictsPostgresTransformation"), exports);
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,qEAAmD;AACnD,wEAAsD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,wEAAsD"}
@@ -3,8 +3,6 @@ export declare class RefreshDataInDBTask extends AbstractEmptyTask {
3
3
  readonly queueName = "refreshDataInDB";
4
4
  readonly queueTtl: number;
5
5
  private dataSource;
6
- private mongoTransformation;
7
- private mongoRepository;
8
6
  private postgresTransformation;
9
7
  private postgresRepository;
10
8
  constructor(queuePrefix: string);
@@ -13,28 +13,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.RefreshDataInDBTask = void 0;
16
- const integration_engine_1 = require("@golemio/core/dist/integration-engine");
17
16
  const _ie_1 = require("../..");
18
- const CityDistrictPostgresRepository_1 = __importDefault(require("../../repositories/CityDistrictPostgresRepository"));
19
17
  const datasources_1 = require("../../datasources");
20
- const CityDistrictMongoRepository_1 = __importDefault(require("../../repositories/CityDistrictMongoRepository"));
18
+ const CityDistrictPostgresRepository_1 = __importDefault(require("../../repositories/CityDistrictPostgresRepository"));
19
+ const integration_engine_1 = require("@golemio/core/dist/integration-engine");
21
20
  class RefreshDataInDBTask extends integration_engine_1.AbstractEmptyTask {
22
21
  constructor(queuePrefix) {
23
22
  super(queuePrefix);
24
23
  this.queueName = "refreshDataInDB";
25
24
  this.queueTtl = 15 * 24 * 60 * 60 * 1000; // 15 days
26
25
  this.dataSource = datasources_1.CityDistrictsDataSourceFactory.getDataSource();
27
- this.mongoTransformation = new _ie_1.CityDistrictsMongoTransformation();
28
- this.mongoRepository = new CityDistrictMongoRepository_1.default();
29
26
  this.postgresRepository = new CityDistrictPostgresRepository_1.default();
30
27
  this.postgresTransformation = new _ie_1.CityDistrictsPostgresTransformation();
31
28
  }
32
29
  execute() {
33
30
  return __awaiter(this, void 0, void 0, function* () {
34
31
  const data = yield this.dataSource.getAll();
35
- const transformedData = yield this.mongoTransformation.transform(data);
36
32
  const transformedPostgresData = yield this.postgresTransformation.transform(data);
37
- yield this.mongoRepository.save(transformedData);
38
33
  yield this.postgresRepository.bulkUpdate(transformedPostgresData);
39
34
  });
40
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RefreshDataInDBTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/tasks/RefreshDataInDBTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8EAA0E;AAE1E,+BAA4F;AAE5F,uHAA8F;AAC9F,mDAAiE;AACjE,iHAAwF;AAExF,MAAa,mBAAoB,SAAQ,sCAAiB;IAUtD,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAVP,cAAS,GAAG,iBAAiB,CAAC;QAC9B,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,UAAU;QAU3D,IAAI,CAAC,UAAU,GAAG,4CAA8B,CAAC,aAAa,EAAE,CAAC;QACjE,IAAI,CAAC,mBAAmB,GAAG,IAAI,sCAAgC,EAAE,CAAC;QAClE,IAAI,CAAC,eAAe,GAAG,IAAI,qCAA4B,EAAE,CAAC;QAC1D,IAAI,CAAC,kBAAkB,GAAG,IAAI,wCAA+B,EAAE,CAAC;QAChE,IAAI,CAAC,sBAAsB,GAAG,IAAI,yCAAmC,EAAE,CAAC;IAC5E,CAAC;IAEe,OAAO;;YACnB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAA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;AAtBD,kDAsBC"}
@@ -1,3 +1,2 @@
1
- export * from "./repositories";
2
- export * from "./CityDistrictsMongoRouter";
3
1
  export * from "./CityDistrictsPostgresRouter";
2
+ export * from "./repositories";
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./repositories"), exports);
18
- __exportStar(require("./CityDistrictsMongoRouter"), exports);
19
17
  __exportStar(require("./CityDistrictsPostgresRouter"), exports);
18
+ __exportStar(require("./repositories"), exports);
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,6DAA2C;AAC3C,gEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,iDAA+B"}
@@ -1,7 +1,6 @@
1
- import { SequelizeModel } from "@golemio/core/dist/output-gateway";
2
- import { IGeoJsonModel } from "@golemio/core/dist/output-gateway/models/interfaces/IGeoJsonModel";
3
- import { IGeoJsonAllFilterParameters, IGeoJSONFeatureCollection } from "@golemio/core/dist/output-gateway";
1
+ import { IGeoJSONFeatureCollection, IGeoJsonAllFilterParameters, SequelizeModel } from "@golemio/core/dist/output-gateway";
4
2
  import { IGeoCoordinatesPolygon } from "@golemio/core/dist/output-gateway/Geo";
3
+ import { IGeoJsonModel } from "@golemio/core/dist/output-gateway/models/interfaces/IGeoJsonModel";
5
4
  export interface ICityDistrictsOutput {
6
5
  id: number;
7
6
  name: string;
@@ -10,6 +9,7 @@ export interface ICityDistrictsOutput {
10
9
  updated_at: string;
11
10
  }
12
11
  export declare class CityDistrictsPostgresRepository extends SequelizeModel implements IGeoJsonModel {
12
+ private readonly DATE_FORMAT;
13
13
  constructor();
14
14
  IsPrimaryIdNumber(): Promise<boolean>;
15
15
  PrimaryIdentifierSelection(id: string): object;
@@ -33,17 +33,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.CityDistrictsPostgresRepository = void 0;
36
- const sequelize_1 = __importStar(require("@golemio/core/dist/shared/sequelize"));
37
- const output_gateway_1 = require("@golemio/core/dist/output-gateway");
38
- const output_gateway_2 = require("@golemio/core/dist/output-gateway");
39
- const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
40
36
  const _sch_1 = require("../../schema-definitions");
41
37
  const CityDistrictModel_1 = require("../../schema-definitions/models/CityDistrictModel");
38
+ const output_gateway_1 = require("@golemio/core/dist/output-gateway");
39
+ const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
40
+ const sequelize_1 = __importStar(require("@golemio/core/dist/shared/sequelize"));
42
41
  class CityDistrictsPostgresRepository extends output_gateway_1.SequelizeModel {
43
42
  constructor() {
44
43
  super(_sch_1.CityDistricts.name + "Repository", _sch_1.CityDistricts.pgTableName, CityDistrictModel_1.CityDistrictModel.attributeModel, {
45
44
  schema: _sch_1.CityDistricts.pgSchema,
46
45
  });
46
+ this.DATE_FORMAT = "YYYYMMDDHH24MISS";
47
47
  this.GetProperties = () => __awaiter(this, void 0, void 0, function* () {
48
48
  throw new Error("Not implemented");
49
49
  });
@@ -59,7 +59,7 @@ class CityDistrictsPostgresRepository extends output_gateway_1.SequelizeModel {
59
59
  : []),
60
60
  ...(options.updatedSince
61
61
  ? [
62
- sequelize_1.default.where(sequelize_1.default.fn("to_timestamp", sequelize_1.default.literal("change_date"), "YYYYMMDDHH24MISS"), sequelize_1.Op.gte, options.updatedSince),
62
+ sequelize_1.default.where(sequelize_1.default.fn("to_timestamp", sequelize_1.default.literal("change_date"), this.DATE_FORMAT), sequelize_1.Op.gte, options.updatedSince),
63
63
  ]
64
64
  : []),
65
65
  ],
@@ -74,7 +74,7 @@ class CityDistrictsPostgresRepository extends output_gateway_1.SequelizeModel {
74
74
  ["district_name", "name"],
75
75
  ["district_name_slug", "slug"],
76
76
  "geom",
77
- [sequelize_1.default.fn("to_timestamp", sequelize_1.default.literal("change_date"), "YYYYMMDDHH24MISS"), "updated_at"],
77
+ [sequelize_1.default.fn("to_timestamp", sequelize_1.default.literal("change_date"), this.DATE_FORMAT), "updated_at"],
78
78
  ],
79
79
  raw: true,
80
80
  where: whereAttributes,
@@ -82,7 +82,7 @@ class CityDistrictsPostgresRepository extends output_gateway_1.SequelizeModel {
82
82
  offset: Number.isInteger(options === null || options === void 0 ? void 0 : options.offset) ? options === null || options === void 0 ? void 0 : options.offset : undefined,
83
83
  order,
84
84
  }));
85
- return (0, output_gateway_2.buildGeojsonFeatureCollection)(result.map((record) => {
85
+ return (0, output_gateway_1.buildGeojsonFeatureCollection)(result.map((record) => {
86
86
  return this.formatOutput(record);
87
87
  }));
88
88
  });
@@ -93,7 +93,10 @@ class CityDistrictsPostgresRepository extends output_gateway_1.SequelizeModel {
93
93
  ["district_name", "name"],
94
94
  ["district_name_slug", "slug"],
95
95
  "geom",
96
- [sequelize_1.default.fn("to_timestamp", sequelize_1.default.literal("change_date::double precision / 1000")), "updated_at"],
96
+ [
97
+ sequelize_1.default.literal(`(to_timestamp(change_date, '${this.DATE_FORMAT}')::timestamp at time zone 'Europe/Prague')`),
98
+ "updated_at",
99
+ ],
97
100
  ],
98
101
  where: { district_name_slug: id },
99
102
  raw: true,
@@ -1 +1 @@
1
- {"version":3,"file":"CityDistrictsPostgresRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/CityDistrictsPostgresRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iFAAkF;AAClF,sEAAmE;AAEnE,sEAI2C;AAC3C,+DAAwG;AACxG,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C,CAAC;YACrC,CAAC,CAAC,CACL,CAAC;QACN,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,CAAO,EAAU,EAAE,EAAE;YACjC,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;gBAC9C,UAAU,EAAE;oBACR,IAAI;oBACJ,CAAC,eAAe,EAAE,MAAM,CAAC;oBACzB,CAAC,oBAAoB,EAAE,MAAM,CAAC;oBAC9B,MAAM;oBACN,CAAC,mBAAS,CAAC,EAAE,CAAC,cAAc,EAAE,mBAAS,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC,EAAE,YAAY,CAAC;iBAC1G;gBACD,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE;gBACjC,GAAG,EAAE,IAAI;aACZ,CAAC,CAAyB,CAAC;YAE5B,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,CAAC,CAAA,CAAC;QAEM,iBAAY,GAAG,CAAC,MAA4B,EAAE,EAAE;YACpD,OAAO,IAAA,6BAAuB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC,CAAC;IAnGF,CAAC;IAEM,iBAAiB;QACpB,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEM,0BAA0B,CAAC,EAAU;QACxC,OAAO,EAAE,EAAE,EAAE,CAAC;IAClB,CAAC;CA4FJ;AAzGD,0EAyGC"}
1
+ {"version":3,"file":"CityDistrictsPostgresRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/CityDistrictsPostgresRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAqC;AACrC,yFAAkE;AAClE,sEAK2C;AAC3C,+DAAwG;AAExG,iFAAkF;AASlF,MAAa,+BAAgC,SAAQ,+BAAc;IAG/D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ACrC,CAAC,CAAC,CACL,CAAC;QACN,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,CAAO,EAAU,EAAE,EAAE;YACjC,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;gBAC9C,UAAU,EAAE;oBACR,IAAI;oBACJ,CAAC,eAAe,EAAE,MAAM,CAAC;oBACzB,CAAC,oBAAoB,EAAE,MAAM,CAAC;oBAC9B,MAAM;oBACN;wBACI,mBAAS,CAAC,OAAO,CACb,+BAA+B,IAAI,CAAC,WAAW,6CAA6C,CAC/F;wBACD,YAAY;qBACf;iBACJ;gBACD,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE;gBACjC,GAAG,EAAE,IAAI;aACZ,CAAC,CAAyB,CAAC;YAE5B,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,CAAC,CAAA,CAAC;QAEM,iBAAY,GAAG,CAAC,MAA4B,EAAE,EAAE;YACpD,OAAO,IAAA,6BAAuB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC,CAAC;IAxGF,CAAC;IAEM,iBAAiB;QACpB,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEM,0BAA0B,CAAC,EAAU;QACxC,OAAO,EAAE,EAAE,EAAE,CAAC;IAClB,CAAC;CAiGJ;AAhHD,0EAgHC"}
@@ -1,2 +1 @@
1
- export * from "./CityDistrictsMongoRepository";
2
1
  export * from "./CityDistrictsPostgresRepository";
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* og/repositories/index.ts */
18
- __exportStar(require("./CityDistrictsMongoRepository"), exports);
19
18
  __exportStar(require("./CityDistrictsPostgresRepository"), exports);
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,iEAA+C;AAC/C,oEAAkD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,oEAAkD"}
@@ -2,26 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CityDistricts = void 0;
4
4
  const CityDistrictsJsonSchema_1 = require("./datasources/CityDistrictsJsonSchema");
5
- const outputMongoMSO = {
6
- geometry: {
7
- coordinates: { type: Array },
8
- type: { type: String },
9
- },
10
- properties: {
11
- id: { type: Number, required: true },
12
- name: { type: String, required: true },
13
- slug: { type: String, required: true },
14
- updated_at: { type: Number, required: true },
15
- },
16
- type: { type: String, required: true },
17
- };
18
5
  const forExport = {
19
6
  name: "CityDistricts",
20
7
  pgSchema: "common",
21
8
  pgTableName: "citydistricts",
22
9
  mongoCollectionName: "citydistricts",
23
10
  datasourceJsonSchema: CityDistrictsJsonSchema_1.cityDistrictsDatasourceJsonSchema,
24
- outputMongooseSchemaObject: outputMongoMSO,
25
11
  };
26
12
  exports.CityDistricts = forExport;
27
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AACA,mFAA6F;AAE7F,MAAM,cAAc,GAAqB;IACrC,QAAQ,EAAE;QACN,WAAW,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;QAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACzB;IACD,UAAU,EAAE;QACR,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACpC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACtC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACtC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC/C;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;CACzC,CAAC;AAEF,MAAM,SAAS,GAAQ;IACnB,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,eAAe;IAC5B,mBAAmB,EAAE,eAAe;IACpC,oBAAoB,EAAE,2DAAiC;IACvD,0BAA0B,EAAE,cAAc;CAC7C,CAAC;AAEoB,kCAAa"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AAAA,mFAA6F;AAE7F,MAAM,SAAS,GAAQ;IACnB,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,eAAe;IAC5B,mBAAmB,EAAE,eAAe;IACpC,oBAAoB,EAAE,2DAAiC;CAC1D,CAAC;AAEoB,kCAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/city-districts",
3
- "version": "1.2.4-dev.804360444",
3
+ "version": "1.2.4-dev.836337066",
4
4
  "description": "Golemio City Districts Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
9
9
  "build-minimal": "run-s 'build -- --sourceMap false --declaration false'",
10
10
  "build-watch": "run-s 'build -- --watch --preserveWatchOutput'",
11
- "pretest": "golemio import-db-data --postgres && export SQL_DUMP_FILES='' && npx golemio-import-test-data",
11
+ "pretest": "golemio import-db-data --postgres",
12
12
  "test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config --file 'test/setup.ts' 'test/**/*.test.ts'",
13
13
  "test-debug": "run-s 'test -- --inspect-brk=9230'",
14
14
  "code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
@@ -32,7 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@commitlint/cli": "^11.0.0",
34
34
  "@commitlint/config-conventional": "^11.0.0",
35
- "@golemio/cli": "1.4.1",
35
+ "@golemio/cli": "1.4.2",
36
36
  "@golemio/core": "1.5.3-dev.789363554",
37
37
  "@golemio/db-common": "1.1.0",
38
38
  "@golemio/eslint-config": "1.1.0",
@@ -1 +0,0 @@
1
- {"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"dataplatform.citydistricts"},{"v":2,"key":{"properties.id":1},"name":"properties.id_1","ns":"dataplatform.citydistricts"},{"v":2,"key":{"properties.slug":1},"name":"properties.slug_1","ns":"dataplatform.citydistricts"},{"v":2,"key":{"geometry":"2dsphere"},"name":"geometry_2dsphere","ns":"dataplatform.citydistricts","2dsphereIndexVersion":3}],"uuid":"03e3cae3e18c407c9d9a9ea115c0bb50"}
@@ -1,5 +0,0 @@
1
- import { IModel } from "@golemio/core/dist/integration-engine";
2
- import { MongoModel } from "@golemio/core/dist/integration-engine/models";
3
- export default class CityDistrictsMongoRepository extends MongoModel implements IModel {
4
- constructor();
5
- }
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
4
- const models_1 = require("@golemio/core/dist/integration-engine/models");
5
- const _sch_1 = require("../../schema-definitions");
6
- class CityDistrictsMongoRepository extends models_1.MongoModel {
7
- constructor() {
8
- super(_sch_1.CityDistricts.name + "Model", {
9
- identifierPath: "properties.id",
10
- mongoCollectionName: _sch_1.CityDistricts.mongoCollectionName,
11
- outputMongooseSchemaObject: _sch_1.CityDistricts.outputMongooseSchemaObject,
12
- resultsPath: "properties",
13
- savingType: "insertOrUpdate",
14
- searchPath: (id, multiple) => (multiple ? { "properties.id": { $in: id } } : { "properties.id": id }),
15
- updateValues: (a, b) => {
16
- a.geometry.coordinates = b.geometry.coordinates;
17
- a.properties.name = b.properties.name;
18
- a.properties.slug = b.properties.slug;
19
- a.properties.updated_at = b.properties.updated_at;
20
- return a;
21
- },
22
- }, new golemio_validator_1.Validator(_sch_1.CityDistricts.name + "ModelValidator", _sch_1.CityDistricts.outputMongooseSchemaObject));
23
- }
24
- }
25
- exports.default = CityDistrictsMongoRepository;
26
- //# sourceMappingURL=CityDistrictMongoRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CityDistrictMongoRepository.js","sourceRoot":"","sources":["../../../src/integration-engine/repositories/CityDistrictMongoRepository.ts"],"names":[],"mappings":";;AACA,mFAAwE;AACxE,yEAA0E;AAC1E,mDAAqC;AAErC,MAAqB,4BAA6B,SAAQ,mBAAU;IAChE;QACI,KAAK,CACD,oBAAa,CAAC,IAAI,GAAG,OAAO,EAC5B;YACI,cAAc,EAAE,eAAe;YAC/B,mBAAmB,EAAE,oBAAa,CAAC,mBAAmB;YACtD,0BAA0B,EAAE,oBAAa,CAAC,0BAA0B;YACpE,WAAW,EAAE,YAAY;YACzB,UAAU,EAAE,gBAAgB;YAC5B,UAAU,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;YACrG,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBACnB,CAAC,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC;gBAChD,CAAC,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;gBACtC,CAAC,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;gBACtC,CAAC,CAAC,UAAU,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;gBAClD,OAAO,CAAC,CAAC;YACb,CAAC;SACJ,EACD,IAAI,6BAAS,CAAC,oBAAa,CAAC,IAAI,GAAG,gBAAgB,EAAE,oBAAa,CAAC,0BAA0B,CAAC,CACjG,CAAC;IACN,CAAC;CACJ;AAtBD,+CAsBC"}
@@ -1,6 +0,0 @@
1
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine";
2
- export declare class CityDistrictsMongoTransformation extends BaseTransformation implements ITransformation {
3
- name: string;
4
- constructor();
5
- protected transformElement: (element: any) => Promise<any>;
6
- }
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.CityDistrictsMongoTransformation = void 0;
16
- const slugify_1 = __importDefault(require("slugify"));
17
- const integration_engine_1 = require("@golemio/core/dist/integration-engine");
18
- const _sch_1 = require("../../schema-definitions");
19
- class CityDistrictsMongoTransformation extends integration_engine_1.BaseTransformation {
20
- constructor() {
21
- super();
22
- this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
23
- return {
24
- geometry: {
25
- coordinates: element.geometry.coordinates,
26
- type: element.geometry.type,
27
- },
28
- properties: {
29
- id: parseInt(element.properties.KOD_MC, 10),
30
- name: element.properties.NAZEV_MC,
31
- slug: (0, slugify_1.default)(element.properties.NAZEV_MC, { lower: true, remove: /[*+~.()'"!:@]/g }),
32
- updated_at: new Date().getTime(),
33
- },
34
- type: element.type,
35
- };
36
- });
37
- this.name = _sch_1.CityDistricts.name;
38
- }
39
- }
40
- exports.CityDistrictsMongoTransformation = CityDistrictsMongoTransformation;
41
- //# sourceMappingURL=CityDistrictsMongoTransformation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CityDistrictsMongoTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/CityDistrictsMongoTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA2B;AAC3B,8EAA4F;AAC5F,mDAAqC;AAErC,MAAa,gCAAiC,SAAQ,uCAAkB;IAGpE;QACI,KAAK,EAAE,CAAC;QAIF,qBAAgB,GAAG,CAAO,OAAY,EAAgB,EAAE;YAC9D,OAAO;gBACH,QAAQ,EAAE;oBACN,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,WAAW;oBACzC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;iBAC9B;gBACD,UAAU,EAAE;oBACR,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC;oBAC3C,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;oBACjC,IAAI,EAAE,IAAA,iBAAI,EAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;oBAClF,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;iBACnC;gBACD,IAAI,EAAE,OAAO,CAAC,IAAI;aACrB,CAAC;QACN,CAAC,CAAA,CAAC;QAjBE,IAAI,CAAC,IAAI,GAAG,oBAAa,CAAC,IAAI,CAAC;IACnC,CAAC;CAiBJ;AAvBD,4EAuBC"}
@@ -1,8 +0,0 @@
1
- /// <reference types="express" />
2
- import { Router } from "@golemio/core/dist/shared/express";
3
- import { GeoJsonRouter } from "@golemio/core/dist/output-gateway";
4
- export declare class CityDistrictsMongoRouter extends GeoJsonRouter {
5
- constructor();
6
- }
7
- declare const cityDistrictsMongoRouter: Router;
8
- export { cityDistrictsMongoRouter };
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cityDistrictsMongoRouter = exports.CityDistrictsMongoRouter = void 0;
4
- const output_gateway_1 = require("@golemio/core/dist/output-gateway");
5
- const repositories_1 = require("./repositories");
6
- class CityDistrictsMongoRouter extends output_gateway_1.GeoJsonRouter {
7
- constructor() {
8
- super(new repositories_1.CityDistrictsMongoRepository());
9
- this.initRoutes();
10
- }
11
- }
12
- exports.CityDistrictsMongoRouter = CityDistrictsMongoRouter;
13
- const cityDistrictsMongoRouter = new CityDistrictsMongoRouter().router;
14
- exports.cityDistrictsMongoRouter = cityDistrictsMongoRouter;
15
- //# sourceMappingURL=CityDistrictsMongoRouter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CityDistrictsMongoRouter.js","sourceRoot":"","sources":["../../src/output-gateway/CityDistrictsMongoRouter.ts"],"names":[],"mappings":";;;AACA,sEAAkE;AAClE,iDAAgE;AAEhE,MAAa,wBAAyB,SAAQ,8BAAa;IACvD;QACI,KAAK,CAAC,IAAI,2CAA4B,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ;AALD,4DAKC;AAED,MAAM,wBAAwB,GAAW,IAAI,wBAAwB,EAAE,CAAC,MAAM,CAAC;AAEtE,4DAAwB"}
@@ -1,7 +0,0 @@
1
- import { GeoJsonModel } from "@golemio/core/dist/output-gateway";
2
- export declare class CityDistrictsMongoRepository extends GeoJsonModel {
3
- constructor();
4
- PrimaryIdentifierSelection: (inId: string) => {
5
- "properties.slug": string;
6
- };
7
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CityDistrictsMongoRepository = void 0;
4
- const _sch_1 = require("../../schema-definitions");
5
- const output_gateway_1 = require("@golemio/core/dist/output-gateway");
6
- class CityDistrictsMongoRepository extends output_gateway_1.GeoJsonModel {
7
- constructor() {
8
- super(_sch_1.CityDistricts.name, _sch_1.CityDistricts.outputMongooseSchemaObject, _sch_1.CityDistricts.mongoCollectionName);
9
- this.PrimaryIdentifierSelection = (inId) => {
10
- return { "properties.slug": inId };
11
- };
12
- // Set model-specific indexes
13
- this.schema.index({ "properties.name": "text" });
14
- }
15
- }
16
- exports.CityDistrictsMongoRepository = CityDistrictsMongoRepository;
17
- //# sourceMappingURL=CityDistrictsMongoRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CityDistrictsMongoRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/CityDistrictsMongoRepository.ts"],"names":[],"mappings":";;;AAAA,mDAAqC;AACrC,sEAAiE;AAEjE,MAAa,4BAA6B,SAAQ,6BAAY;IAC1D;QACI,KAAK,CAAC,oBAAa,CAAC,IAAI,EAAE,oBAAa,CAAC,0BAA0B,EAAE,oBAAa,CAAC,mBAAmB,CAAC,CAAC;QAMpG,+BAA0B,GAAG,CAAC,IAAY,EAAE,EAAE;YACjD,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACvC,CAAC,CAAC;QANE,6BAA6B;QAC7B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,CAAC;IACrD,CAAC;CAKJ;AAXD,oEAWC"}