@golemio/microclimate 1.1.7 → 1.1.8-dev.898440307
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/db/migrations/postgresql/20230613125038-pp20230613.js +53 -0
- package/db/migrations/postgresql/sqls/20230613125038-pp20230613-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20230613125038-pp20230613-up.sql +2 -0
- package/dist/integration-engine/schema/RefreshMeasurementsByIdTaskSchema.js +1 -1
- package/dist/integration-engine/schema/RefreshMeasurementsByIdTaskSchema.js.map +1 -1
- package/dist/schema-definitions/Measurements.js +1 -1
- package/dist/schema-definitions/Measurements.js.map +1 -1
- package/package.json +11 -10
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var dbm;
|
|
4
|
+
var type;
|
|
5
|
+
var seed;
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var Promise;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
+
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
+
*/
|
|
14
|
+
exports.setup = function(options, seedLink) {
|
|
15
|
+
dbm = options.dbmigrate;
|
|
16
|
+
type = dbm.dataType;
|
|
17
|
+
seed = seedLink;
|
|
18
|
+
Promise = options.Promise;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.up = function(db) {
|
|
22
|
+
var filePath = path.join(__dirname, 'sqls', '20230613125038-pp20230613-up.sql');
|
|
23
|
+
return new Promise( function( resolve, reject ) {
|
|
24
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
+
if (err) return reject(err);
|
|
26
|
+
console.log('received data: ' + data);
|
|
27
|
+
|
|
28
|
+
resolve(data);
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
.then(function(data) {
|
|
32
|
+
return db.runSql(data);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.down = function(db) {
|
|
37
|
+
var filePath = path.join(__dirname, 'sqls', '20230613125038-pp20230613-down.sql');
|
|
38
|
+
return new Promise( function( resolve, reject ) {
|
|
39
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
+
if (err) return reject(err);
|
|
41
|
+
console.log('received data: ' + data);
|
|
42
|
+
|
|
43
|
+
resolve(data);
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.then(function(data) {
|
|
47
|
+
return db.runSql(data);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports._meta = {
|
|
52
|
+
"version": 1
|
|
53
|
+
};
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("@golemio/core/dist/shared/class-validator");
|
|
|
14
14
|
const Measurements_1 = require("../../schema-definitions/Measurements");
|
|
15
15
|
class RefreshMeasurementsByIdTaskSchema {
|
|
16
16
|
}
|
|
17
|
+
exports.RefreshMeasurementsByIdTaskSchema = RefreshMeasurementsByIdTaskSchema;
|
|
17
18
|
__decorate([
|
|
18
19
|
(0, class_validator_1.IsString)(),
|
|
19
20
|
__metadata("design:type", String)
|
|
@@ -22,5 +23,4 @@ __decorate([
|
|
|
22
23
|
(0, class_validator_1.IsEnum)(Measurements_1.DateRange),
|
|
23
24
|
__metadata("design:type", String)
|
|
24
25
|
], RefreshMeasurementsByIdTaskSchema.prototype, "dateRange", void 0);
|
|
25
|
-
exports.RefreshMeasurementsByIdTaskSchema = RefreshMeasurementsByIdTaskSchema;
|
|
26
26
|
//# sourceMappingURL=RefreshMeasurementsByIdTaskSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshMeasurementsByIdTaskSchema.js","sourceRoot":"","sources":["../../../src/integration-engine/schema/RefreshMeasurementsByIdTaskSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAA6E;AAC7E,wEAA4E;AAE5E,MAAa,iCAAiC;CAW7C;AATG;IADC,IAAA,0BAAQ,GAAE;;qEACS;AAGpB;IADC,IAAA,wBAAM,EAAC,wBAAS,CAAC;;oEACI
|
|
1
|
+
{"version":3,"file":"RefreshMeasurementsByIdTaskSchema.js","sourceRoot":"","sources":["../../../src/integration-engine/schema/RefreshMeasurementsByIdTaskSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAA6E;AAC7E,wEAA4E;AAE5E,MAAa,iCAAiC;CAW7C;AAXD,8EAWC;AATG;IADC,IAAA,0BAAQ,GAAE;;qEACS;AAGpB;IADC,IAAA,wBAAM,EAAC,wBAAS,CAAC;;oEACI"}
|
|
@@ -11,7 +11,7 @@ var DateRange;
|
|
|
11
11
|
DateRange["PREVIOUSMONTH"] = "previousMonth";
|
|
12
12
|
DateRange["CURRENTYEAR"] = "currentYear";
|
|
13
13
|
DateRange["PREVIOUSYEAR"] = "previousYear";
|
|
14
|
-
})(DateRange
|
|
14
|
+
})(DateRange || (exports.DateRange = DateRange = {}));
|
|
15
15
|
exports.measurements = {
|
|
16
16
|
name: "Measurements",
|
|
17
17
|
pgTableName: "measurements",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Measurements.js","sourceRoot":"","sources":["../../src/schema-definitions/Measurements.ts"],"names":[],"mappings":";;;AAiBA,IAAY,SASX;AATD,WAAY,SAAS;IACjB,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,wCAA2B,CAAA;IAC3B,0CAA6B,CAAA;IAC7B,0CAA6B,CAAA;IAC7B,4CAA+B,CAAA;IAC/B,wCAA2B,CAAA;IAC3B,0CAA6B,CAAA;AACjC,CAAC,EATW,SAAS,
|
|
1
|
+
{"version":3,"file":"Measurements.js","sourceRoot":"","sources":["../../src/schema-definitions/Measurements.ts"],"names":[],"mappings":";;;AAiBA,IAAY,SASX;AATD,WAAY,SAAS;IACjB,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,wCAA2B,CAAA;IAC3B,0CAA6B,CAAA;IAC7B,0CAA6B,CAAA;IAC7B,4CAA+B,CAAA;IAC/B,wCAA2B,CAAA;IAC3B,0CAA6B,CAAA;AACjC,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB;AAWY,QAAA,YAAY,GAAG;IACxB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;CAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/microclimate",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8-dev.898440307",
|
|
4
4
|
"description": "Golemio Microclimate Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "rimraf ./dist &&
|
|
8
|
+
"build": "rimraf ./dist && tspc -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
11
|
"migrate-db": "golemio migrate-db up --postgres",
|
|
12
12
|
"pretest": "golemio import-db-data --postgres",
|
|
13
|
-
"test": "cross-env NODE_ENV=test
|
|
13
|
+
"test": "cross-env NODE_ENV=test mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r tsconfig-paths/register -r dotenv/config --file 'test/setup.ts' 'test/**/*.test.ts'",
|
|
14
14
|
"test-debug": "run-s 'test -- --inspect-brk=9230'",
|
|
15
15
|
"code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
|
|
16
16
|
"generate-docs": "typedoc --out docs/typedoc src",
|
|
@@ -34,10 +34,9 @@
|
|
|
34
34
|
"@commitlint/cli": "^11.0.0",
|
|
35
35
|
"@commitlint/config-conventional": "^11.0.0",
|
|
36
36
|
"@golemio/cli": "1.4.2",
|
|
37
|
-
"@golemio/core": "1.7.
|
|
37
|
+
"@golemio/core": "1.7.5-dev.893702206",
|
|
38
38
|
"@golemio/db-common": "1.1.1",
|
|
39
39
|
"@golemio/eslint-config": "1.1.0",
|
|
40
|
-
"@ovos-media/ts-transform-paths": "^1.7.18-1",
|
|
41
40
|
"@types/chai": "4.2.3",
|
|
42
41
|
"@types/chai-as-promised": "7.1.2",
|
|
43
42
|
"@types/geojson": "^7946.0.10",
|
|
@@ -58,12 +57,14 @@
|
|
|
58
57
|
"pretty-quick": "^3.1.0",
|
|
59
58
|
"rimraf": "^3.0.2",
|
|
60
59
|
"sinon": "^9.2.3",
|
|
61
|
-
"source-map-support": "0.5.
|
|
60
|
+
"source-map-support": "0.5.21",
|
|
62
61
|
"supertest": "^6.0.1",
|
|
63
|
-
"ts-node": "^10.
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
62
|
+
"ts-node": "^10.9.1",
|
|
63
|
+
"ts-patch": "3.0.0-beta3",
|
|
64
|
+
"tsconfig-paths": "^4.2.0",
|
|
65
|
+
"typedoc": "^0.24.8",
|
|
66
|
+
"typescript": "5.1.3",
|
|
67
|
+
"typescript-transform-paths": "^3.4.6"
|
|
67
68
|
},
|
|
68
69
|
"peerDependencies": {
|
|
69
70
|
"@golemio/core": ">=1.7.0"
|