diff --git a/complex-todos-svelte/.meteor/packages b/complex-todos-svelte/.meteor/packages
index 4c81957..2a8cec1 100644
--- a/complex-todos-svelte/.meteor/packages
+++ b/complex-todos-svelte/.meteor/packages
@@ -4,31 +4,28 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
-meteor-base@1.5.1 # Packages every Meteor app needs to have
-mobile-experience@1.1.0 # Packages for a great mobile UX
-mongo@1.12.0 # The database Meteor supports right now
+meteor-base@1.5.2-rc300.0 # Packages every Meteor app needs to have
+mobile-experience@1.1.1-rc300.0 # Packages for a great mobile UX
+mongo@2.0.0-rc300.0 # The database Meteor supports right now
jquery # Wrapper package for npm-installed jquery
-reactive-var@1.0.11 # Reactive variable for tracker
-tracker@1.2.0 # Meteor's client-side reactive programming library
-
-standard-minifier-css@1.7.3 # CSS minifier run for production mode
-standard-minifier-js@2.6.1 # JS minifier run for production mode
-es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
-ecmascript@0.15.3 # Enable ECMAScript2015+ syntax in app code
-typescript@4.3.5 # Enable TypeScript syntax in .ts and .tsx modules
-shell-server@0.5.0 # Server-side component of the `meteor shell` command
-
-svelte:compiler
-rdb:svelte-meteor-data
-static-html
-svelte:blaze-integration
+reactive-var@1.0.13-rc300.0 # Reactive variable for tracker
+tracker@1.3.3-rc300.0 # Meteor's client-side reactive programming library
+
+standard-minifier-css@1.9.3-rc300.0 # CSS minifier run for production mode
+standard-minifier-js@3.0.0-rc300.0 # JS minifier run for production mode
+es5-shim@4.8.1-rc300.0 # ECMAScript 5 compatibility for older browsers
+ecmascript@0.16.8-rc300.0 # Enable ECMAScript2015+ syntax in app code
+typescript@5.4.3-rc300.0 # Enable TypeScript syntax in .ts and .tsx modules
+shell-server@0.6.0-rc300.0 # Server-side component of the `meteor shell` command
+
+static-html@1.3.3-rc300.0
meteortesting:mocha
#
# Accounts and roles
#
-accounts-ui@1.4.0
-accounts-password@2.0.0
+accounts-ui@1.4.3-rc300.0
+accounts-password@3.0.0-rc300.0
#
# Data layer
@@ -40,7 +37,7 @@ dburles:mongo-collection-instances
# Validated methods
#
mdg:validated-method
-ddp-rate-limiter@1.1.0
+ddp-rate-limiter@1.2.1-rc300.0
#
# Logging
@@ -51,9 +48,9 @@ ostrio:loggerconsole
#
# Scheduled jobs
#
-msavin:sjobs
#
# APM
#
montiapm:agent
+zodern:melte
diff --git a/complex-todos-svelte/.meteor/release b/complex-todos-svelte/.meteor/release
index 7760dfe..be5a4ca 100644
--- a/complex-todos-svelte/.meteor/release
+++ b/complex-todos-svelte/.meteor/release
@@ -1 +1 @@
-METEOR@2.3.5
+METEOR@3.0-rc.0
diff --git a/complex-todos-svelte/.meteor/versions b/complex-todos-svelte/.meteor/versions
index 58e4277..64a3e07 100644
--- a/complex-todos-svelte/.meteor/versions
+++ b/complex-todos-svelte/.meteor/versions
@@ -1,109 +1,109 @@
-accounts-base@2.0.1
-accounts-password@2.0.0
-accounts-ui@1.4.0
-accounts-ui-unstyled@1.5.0
-aldeed:collection2@3.4.1
-allow-deny@1.1.0
-autoupdate@1.7.0
-babel-compiler@7.7.0
-babel-runtime@1.5.0
-base64@1.0.12
-binary-heap@1.0.11
-blaze@2.5.0
-blaze-tools@1.1.2
-boilerplate-generator@1.7.1
-caching-compiler@1.2.2
-caching-html-compiler@1.2.1
-callback-hook@1.3.1
-check@1.3.1
-dburles:mongo-collection-instances@0.3.1
-ddp@1.4.0
-ddp-client@2.5.0
-ddp-common@1.4.0
-ddp-rate-limiter@1.1.0
-ddp-server@2.4.1
-diff-sequence@1.1.1
-dynamic-import@0.7.1
-ecmascript@0.15.3
-ecmascript-runtime@0.7.0
-ecmascript-runtime-client@0.11.1
-ecmascript-runtime-server@0.10.1
-ejson@1.1.1
-email@2.1.1
-es5-shim@4.8.0
-fetch@0.1.1
-geojson-utils@1.0.10
-hot-code-push@1.0.4
-html-tools@1.1.2
-htmljs@1.1.1
+accounts-base@3.0.0-rc300.0
+accounts-password@3.0.0-rc300.0
+accounts-ui@1.4.3-rc300.0
+accounts-ui-unstyled@1.7.1-rc300.0
+aldeed:collection2@4.0.1
+aldeed:simple-schema@1.13.1
+allow-deny@2.0.0-rc300.0
+autoupdate@2.0.0-rc300.0
+babel-compiler@7.11.0-rc300.0
+babel-runtime@1.5.2-rc300.0
+base64@1.0.13-rc300.0
+binary-heap@1.0.12-rc300.0
+blaze@3.0.0-alpha300.17
+blaze-tools@2.0.0-alpha300.17
+boilerplate-generator@2.0.0-rc300.0
+caching-compiler@2.0.0-rc300.0
+caching-html-compiler@2.0.0-alpha300.17
+callback-hook@1.6.0-rc300.0
+check@1.3.3-rc300.0
+core-runtime@1.0.0-rc300.0
+dburles:mongo-collection-instances@1.0.0-beta300.2
+ddp@1.4.2-rc300.0
+ddp-client@3.0.0-rc300.0
+ddp-common@1.4.1-rc300.0
+ddp-rate-limiter@1.2.1-rc300.0
+ddp-server@3.0.0-rc300.0
+diff-sequence@1.1.3-rc300.0
+dynamic-import@0.7.4-rc300.0
+ecmascript@0.16.8-rc300.0
+ecmascript-runtime@0.8.2-rc300.0
+ecmascript-runtime-client@0.12.2-rc300.0
+ecmascript-runtime-server@0.11.1-rc300.0
+ejson@1.1.4-rc300.0
+email@3.0.0-rc300.0
+es5-shim@4.8.1-rc300.0
+facts-base@1.0.2-rc300.0
+fetch@0.1.4-rc300.0
+geojson-utils@1.0.12-rc300.0
+hot-code-push@1.0.5-rc300.0
+html-tools@2.0.0-alpha300.17
+htmljs@2.0.0-alpha300.17
http@1.4.4
-id-map@1.1.1
-inter-process-messaging@0.1.1
+id-map@1.2.0-rc300.0
+inter-process-messaging@0.1.2-rc300.0
jquery@3.0.0
-launch-screen@1.3.0
-less@3.0.2
-livedata@1.0.18
-localstorage@1.2.0
-logging@1.2.0
+lai:collection-extensions@1.0.0-beta300.2
+launch-screen@1.3.1-rc300.0
+less@4.1.1-beta300.6
+localstorage@1.2.1-rc300.0
+logging@1.3.3-rc300.0
mdg:validated-method@1.2.0
-meteor@1.9.3
-meteor-base@1.5.1
+meteor@2.0.0-rc300.0
+meteor-base@1.5.2-rc300.0
meteortesting:browser-tests@1.3.4
meteortesting:mocha@2.0.2
meteortesting:mocha-core@8.1.2
-minifier-css@1.5.4
-minifier-js@2.6.1
-minimongo@1.7.0
-mobile-experience@1.1.0
-mobile-status-bar@1.1.0
-modern-browsers@0.1.5
-modules@0.16.0
-modules-runtime@0.12.0
-mongo@1.12.0
-mongo-decimal@0.1.2
-mongo-dev-server@1.1.0
-mongo-id@1.0.8
-mongo-livedata@1.0.12
-montiapm:agent@2.44.1
-montiapm:meteorx@2.2.0
-msavin:sjobs@4.1.0
-npm-mongo@3.9.1
-observe-sequence@1.0.19
-ordered-dict@1.1.0
+minifier-css@2.0.0-rc300.0
+minifier-js@3.0.0-rc300.0
+minimongo@2.0.0-rc300.0
+mobile-experience@1.1.1-rc300.0
+mobile-status-bar@1.1.1-rc300.0
+modern-browsers@0.1.10-rc300.0
+modules@0.19.1-rc300.0
+modules-runtime@0.13.2-rc300.0
+mongo@2.0.0-rc300.0
+mongo-decimal@0.1.4-beta300.7
+mongo-dev-server@1.1.1-rc300.0
+mongo-id@1.0.9-rc300.0
+montiapm:agent@3.0.0-beta.4
+montiapm:meteorx@2.3.1
+npm-mongo@4.16.1-rc300.0
+observe-sequence@2.0.0-alpha300.17
+ordered-dict@1.2.0-rc300.0
ostrio:logger@2.0.9
ostrio:loggerconsole@2.0.5
-promise@0.12.0
+promise@1.0.0-rc300.0
raix:eventemitter@1.0.0
-random@1.2.0
-rate-limit@1.0.9
-rdb:svelte-meteor-data@0.3.0
-react-fast-refresh@0.1.1
-reactive-dict@1.3.0
-reactive-var@1.0.11
-reload@1.3.1
-retry@1.1.0
-routepolicy@1.1.1
-service-configuration@1.1.0
-session@1.2.0
-sha@1.0.9
-shell-server@0.5.0
-socket-stream-client@0.4.0
-spacebars@1.2.0
-spacebars-compiler@1.3.0
-standard-minifier-css@1.7.3
-standard-minifier-js@2.6.1
-static-html@1.3.2
-svelte:blaze-integration@0.4.0
-svelte:compiler@3.31.2
-templating@1.4.1
-templating-compiler@1.4.1
-templating-runtime@1.5.0
-templating-tools@1.2.1
-tmeasday:check-npm-versions@1.0.2
-tracker@1.2.0
-typescript@4.3.5
-underscore@1.0.10
-url@1.3.2
-webapp@1.11.1
-webapp-hashing@1.1.0
+random@1.2.2-rc300.0
+rate-limit@1.1.2-rc300.0
+react-fast-refresh@0.2.8-rc300.0
+reactive-dict@1.3.2-rc300.0
+reactive-var@1.0.13-rc300.0
+reload@1.3.2-rc300.0
+retry@1.1.1-rc300.0
+routepolicy@1.1.2-rc300.0
+service-configuration@1.3.2-rc300.0
+session@1.2.2-rc300.0
+sha@1.0.10-rc300.0
+shell-server@0.6.0-rc300.0
+socket-stream-client@0.5.2-rc300.0
+spacebars@2.0.0-alpha300.17
+spacebars-compiler@2.0.0-alpha300.17
+standard-minifier-css@1.9.3-rc300.0
+standard-minifier-js@3.0.0-rc300.0
+static-html@1.3.3-rc300.0
+templating@1.4.4-alpha300.17
+templating-compiler@2.0.0-alpha300.17
+templating-runtime@2.0.0-alpha300.17
+templating-tools@2.0.0-alpha300.17
+tracker@1.3.3-rc300.0
+typescript@5.4.3-rc300.0
+underscore@1.0.14-rc300.0
+url@1.3.3-rc300.0
+webapp@2.0.0-rc300.0
+webapp-hashing@1.1.2-rc300.0
+zodern:melte@1.7.2
+zodern:melte-compiler@1.4.1
zodern:meteor-package-versions@0.2.1
+zodern:types@1.0.13
diff --git a/complex-todos-svelte/client/ui/App.svelte b/complex-todos-svelte/client/ui/App.svelte
index 9de3ef0..839c8d1 100755
--- a/complex-todos-svelte/client/ui/App.svelte
+++ b/complex-todos-svelte/client/ui/App.svelte
@@ -1,9 +1,8 @@
diff --git a/complex-todos-svelte/imports/modules/tasks/database/tasks.js b/complex-todos-svelte/imports/modules/tasks/database/tasks.js
index ae42f7e..d0226d6 100644
--- a/complex-todos-svelte/imports/modules/tasks/database/tasks.js
+++ b/complex-todos-svelte/imports/modules/tasks/database/tasks.js
@@ -1,33 +1,5 @@
-import {Mongo} from 'meteor/mongo';
-import SimpleSchema from 'simpl-schema';
+import { Mongo } from 'meteor/mongo';
const Tasks = new Mongo.Collection('tasks');
-Tasks.attachSchema(new SimpleSchema({
- text: {
- type: String
- },
- createdAt: {
- type: Date
- },
- owner: {
- type: String
- },
- username: {
- type: String
- },
- checked: {
- type: Boolean,
- optional: true
- },
- expired: {
- type: Boolean,
- optional: true
- },
- private: {
- type: Boolean,
- optional: true
- }
-}));
-
export {Tasks};
\ No newline at end of file
diff --git a/complex-todos-svelte/imports/shared/repository/baseRepository.js b/complex-todos-svelte/imports/shared/repository/baseRepository.js
index ce07058..bd75fbd 100644
--- a/complex-todos-svelte/imports/shared/repository/baseRepository.js
+++ b/complex-todos-svelte/imports/shared/repository/baseRepository.js
@@ -93,9 +93,9 @@ class BaseRepository
* @param selector {string|object}
* @param updateObject {object}
*/
- updateMany(selector, updateObject)
+ async updateMany(selector, updateObject)
{
- this._collection.update(selector, updateObject, {multi: true});
+ await this._collection.updateAsync(selector, updateObject, {multi: true});
}
/**
diff --git a/complex-todos-svelte/package-lock.json b/complex-todos-svelte/package-lock.json
index 02a61a8..cb4c638 100755
--- a/complex-todos-svelte/package-lock.json
+++ b/complex-todos-svelte/package-lock.json
@@ -632,11 +632,6 @@
"ms": "2.1.2"
}
},
- "dedent-js": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz",
- "integrity": "sha1-vuX7fJ5yfYXf+iRZDRDsGrElUwU="
- },
"deep-eql": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
@@ -1450,14 +1445,6 @@
}
}
},
- "lower-case": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
- "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
- "requires": {
- "tslib": "^2.0.3"
- }
- },
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -2123,15 +2110,6 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
- "no-case": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
- "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
- "requires": {
- "lower-case": "^2.0.2",
- "tslib": "^2.0.3"
- }
- },
"node-addon-api": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz",
@@ -2220,15 +2198,6 @@
"integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
"dev": true
},
- "pascal-case": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
- "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
- "requires": {
- "no-case": "^3.0.4",
- "tslib": "^2.0.3"
- }
- },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -2497,26 +2466,14 @@
}
},
"svelte": {
- "version": "3.31.2",
- "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.31.2.tgz",
- "integrity": "sha512-TxZGrXzX2ggFH3BIKY5fmbeMdJuZrMIMDYPMX6R9255bueuYIuVaBQSLUeY2oD7W4IdeqRZiAVGCjDw2POKBRA=="
+ "version": "3.59.2",
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz",
+ "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA=="
},
"svelte-routing": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/svelte-routing/-/svelte-routing-1.6.0.tgz",
- "integrity": "sha512-+DbrSGttLA6lan7oWFz1MjyGabdn3tPRqn8Osyc471ut2UgCrzM5x1qViNMc2gahOP6fKbKK1aNtZMJEQP2vHQ==",
- "requires": {
- "svelte2tsx": "^0.1.157"
- }
- },
- "svelte2tsx": {
- "version": "0.1.189",
- "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.1.189.tgz",
- "integrity": "sha512-Mo4Sei1tNYthzSZx6biGSK7pI6/vj7nGvvmSevmLIiws/o1hyj1UIHn+AwqogeA9L46fcvy6WU3t7HxDg+LbLg==",
- "requires": {
- "dedent-js": "^1.0.1",
- "pascal-case": "^3.1.1"
- }
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/svelte-routing/-/svelte-routing-1.11.0.tgz",
+ "integrity": "sha512-/JlBAB6KxgM+Xl+4J/vOy4i4uYAJpWWbjh7vtRwsuu0MPl5B+ml+N/jCRkfjRa9ulODcS/G6PL8opyhczmrV8Q=="
},
"symbol-observable": {
"version": "1.2.0",
@@ -2562,11 +2519,6 @@
"punycode": "^2.1.1"
}
},
- "tslib": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
- "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
- },
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
diff --git a/complex-todos-svelte/package.json b/complex-todos-svelte/package.json
index b42e96f..43d81e1 100755
--- a/complex-todos-svelte/package.json
+++ b/complex-todos-svelte/package.json
@@ -15,8 +15,8 @@
"meteor-node-stubs": "^1.0.0",
"node-cache": "^5.1.2",
"simpl-schema": "^1.10.2",
- "svelte": "^3.31.2",
- "svelte-routing": "^1.6.0"
+ "svelte": "^3.59.2",
+ "svelte-routing": "^1.11.0"
},
"meteor": {
"mainModule": {
diff --git a/complex-todos-svelte/server/init.js b/complex-todos-svelte/server/init.js
index d157da2..a39a7aa 100644
--- a/complex-todos-svelte/server/init.js
+++ b/complex-todos-svelte/server/init.js
@@ -1,6 +1,4 @@
-import {log} from '../imports/shared/logger/logger.js';
-import {Jobs} from 'meteor/msavin:sjobs';
-import {JOB} from './shared/enums/job.js';
+import { log } from '../imports/shared/logger/logger.js';
/**
* Initialize server at startup
@@ -23,12 +21,9 @@ class ServerInit
*/
initializeJobs()
{
- Jobs.run(JOB.TASKS.EXPIRE, {
- in: {
- days: 7
- }
- }
- );
+ setInterval(() => {
+ Meteor.call('tasks.expire');
+ }, 60000)
}
}
diff --git a/complex-todos-svelte/server/modules/jobs/server/tasks.expire.js b/complex-todos-svelte/server/modules/jobs/server/tasks.expire.js
index 9abf37c..8a8f602 100644
--- a/complex-todos-svelte/server/modules/jobs/server/tasks.expire.js
+++ b/complex-todos-svelte/server/modules/jobs/server/tasks.expire.js
@@ -1,13 +1,12 @@
-import {Jobs} from 'meteor/msavin:sjobs';
-import {DateUtility} from '../../../../imports/shared/utilities/dateUtility.js';
-import {eventEmitter} from '../../../../imports/modules/eventEmitter/eventEmitterService.js';
-import {EVENT} from '../../../../imports/shared/enums/events.js';
+import { DateUtility } from '../../../../imports/shared/utilities/dateUtility.js';
+import { eventEmitter } from '../../../../imports/modules/eventEmitter/eventEmitterService.js';
+import { EVENT } from '../../../../imports/shared/enums/events.js';
-Jobs.register({
+Meteor.methods({
'tasks.expire': function()
{
let date = DateUtility.beforeDays(1);
-
+
eventEmitter.emit(EVENT.TASKS.EXPIRE, {maxDate: date});
}
-});
+})
\ No newline at end of file
diff --git a/complex-todos-svelte/server/modules/migrations/database/migrations.js b/complex-todos-svelte/server/modules/migrations/database/migrations.js
index 7501220..8c52f24 100644
--- a/complex-todos-svelte/server/modules/migrations/database/migrations.js
+++ b/complex-todos-svelte/server/modules/migrations/database/migrations.js
@@ -1,14 +1,3 @@
-import SimpleSchema from 'simpl-schema';
-
const Migrations = new Mongo.Collection('_migrations');
-Migrations.attachSchema(
- new SimpleSchema({
- version: {
- type: String,
- defaultValue: 0
- }
- })
-);
-
export {Migrations};
\ No newline at end of file
diff --git a/cordova/imports/infra/addPlayerId.js b/cordova/imports/infra/addPlayerId.js
index 82a101c..2d9afed 100644
--- a/cordova/imports/infra/addPlayerId.js
+++ b/cordova/imports/infra/addPlayerId.js
@@ -1,10 +1,10 @@
import {Meteor} from 'meteor/meteor';
Meteor.methods({
- addPlayerId({playerId}) {
+ async addPlayerId({playerId}) {
this.unblock();
if (Meteor.isClient || !this.userId || !playerId) return null;
- Meteor.users.update(this.userId, {$addToSet: {playersIds: playerId}});
+ await Meteor.users.updateAsync(this.userId, {$addToSet: {playersIds: playerId}});
},
});