@socialgouv/matomo-postgres 2.2.0-beta.2 → 2.2.0-beta.3

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/bin/index.js CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  import { db } from '../dist/db.js'
4
4
  import run from '../dist/index.js'
5
- import migrate from '../dist/migrate-latest.js'
5
+ import { startMigration } from '../dist/migrate-latest.js'
6
6
 
7
7
  async function start(date) {
8
8
  console.log(`\nRunning migrations\n`)
9
- await migrate()
9
+ await startMigration()
10
10
  console.log(`\nStarting import\n`)
11
11
  await run(date)
12
12
  db.destroy()
@@ -50,10 +50,9 @@ function migrateToLatest() {
50
50
  });
51
51
  }
52
52
  export default migrateToLatest;
53
- function start() {
53
+ export function startMigration() {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
55
  yield migrateToLatest();
56
56
  yield db.destroy();
57
57
  });
58
58
  }
59
- start();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@socialgouv/matomo-postgres",
3
3
  "description": "Extract visitor events from Matomo API and push to Postgres",
4
- "version": "2.2.0-beta.2",
4
+ "version": "2.2.0-beta.3",
5
5
  "types": "types/index.d.ts",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/index.js",