diff --git a/app/ecolyo.1cb46efe6cbe32d91ef9.js b/app/ecolyo.c888cb3113058c4a30f9.js similarity index 99% rename from app/ecolyo.1cb46efe6cbe32d91ef9.js rename to app/ecolyo.c888cb3113058c4a30f9.js index f190566a15ed50b1b8fb6036027a4bd575d2c215..666383e25bd287f72110559a7414ae96cb370190 100644 --- a/app/ecolyo.1cb46efe6cbe32d91ef9.js +++ b/app/ecolyo.c888cb3113058c4a30f9.js @@ -30407,134 +30407,146 @@ function _migrate() { while (1) { switch (_context8.prev = _context8.next) { case 0: - _context8.next = 2; + if (!migration.isEmpty) { + _context8.next = 3; + break; + } + + updateSchemaVersion(_client, migration.targetSchemaVersion); + return _context8.abrupt("return", { + errors: [], + type: 'MigrationComplete' + }); + + case 3: + _context8.next = 5; return schemaExist(_client); - case 2: + case 5: if (_context8.sent) { - _context8.next = 5; + _context8.next = 8; break; } - _context8.next = 5; + _context8.next = 8; return initSchemaDoctype(_client); - case 5: - _context8.next = 7; + case 8: + _context8.next = 10; return currentSchemaVersion(_client); - case 7: + case 10: _context8.t0 = _context8.sent; _context8.t1 = migration.baseSchemaVersion; if (!(_context8.t0 !== _context8.t1)) { - _context8.next = 13; + _context8.next = 16; break; } return _context8.abrupt("return", migrationNoop()); - case 13: - _context8.prev = 13; - _context8.next = 16; + case 16: + _context8.prev = 16; + _context8.next = 19; return getDocs(_client, migration.docTypes, migration.queryOptions); - case 16: + case 19: docToUpdate = _context8.sent; if (!migration.isDeprecated) { - _context8.next = 21; + _context8.next = 24; break; } result = migrationNoop(); - _context8.next = 35; + _context8.next = 38; break; - case 21: + case 24: if (!(docToUpdate.length && !migration.isCreate)) { - _context8.next = 34; + _context8.next = 37; break; } - _context8.next = 24; + _context8.next = 27; return migration.run(_client, docToUpdate); - case 24: + case 27: migratedDocs = _context8.sent; if (!migratedDocs.length) { - _context8.next = 31; + _context8.next = 34; break; } - _context8.next = 28; + _context8.next = 31; return save(_client, migratedDocs); - case 28: + case 31: result = _context8.sent; - _context8.next = 32; + _context8.next = 35; break; - case 31: + case 34: result = migrationNoop(); - case 32: - _context8.next = 35; + case 35: + _context8.next = 38; break; - case 34: + case 37: result = migrationNoop(); - case 35: + case 38: if (!(migration.isCreate && !migration.isDeprecated)) { - _context8.next = 39; + _context8.next = 42; break; } - _context8.next = 38; + _context8.next = 41; return migration.run(_client, docToUpdate); - case 38: + case 41: result = { type: _migration.MIGRATION_RESULT_COMPLETE, errors: [] }; - case 39: + case 42: _context8.t2 = result.type; - _context8.next = _context8.t2 === _migration.MIGRATION_RESULT_NOOP ? 42 : _context8.t2 === _migration.MIGRATION_RESULT_COMPLETE ? 42 : 45; + _context8.next = _context8.t2 === _migration.MIGRATION_RESULT_NOOP ? 45 : _context8.t2 === _migration.MIGRATION_RESULT_COMPLETE ? 45 : 48; break; - case 42: - _context8.next = 44; + case 45: + _context8.next = 47; return updateSchemaVersion(_client, migration.targetSchemaVersion); - case 44: - return _context8.abrupt("break", 45); + case 47: + return _context8.abrupt("break", 48); - case 45: - _context8.next = 51; + case 48: + _context8.next = 54; break; - case 47: - _context8.prev = 47; - _context8.t3 = _context8["catch"](13); + case 50: + _context8.prev = 50; + _context8.t3 = _context8["catch"](16); console.error(_context8.t3); result = { type: _migration.MIGRATION_RESULT_FAILED, errors: [_context8.t3.toString()] }; - case 51: + case 54: return _context8.abrupt("return", result); - case 52: + case 55: case "end": return _context8.stop(); } } - }, _callee8, null, [[13, 47]]); + }, _callee8, null, [[16, 50]]); })); return _migrate.apply(this, arguments); } diff --git a/index.html b/index.html index 73c53b8b7f893ed32cb7df48fe2d064a8fc0fabd..58a5422cff9f11e01afd97dfb808afc1b8654d79 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=0,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.c1180bc5cd66dfd3234e.js"></script><script src="app/ecolyo.1cb46efe6cbe32d91ef9.js"></script></div></body></html> \ No newline at end of file +<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=0,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.c1180bc5cd66dfd3234e.js"></script><script src="app/ecolyo.c888cb3113058c4a30f9.js"></script></div></body></html> \ No newline at end of file