forked from cult-of-coders/grapher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,650 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [StorytellerCZ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### Issues include as much detail as possible: | ||
- [ ] A descriptive title | ||
- [ ] A description of the problem you're trying to solve, including *why* you think this is a problem | ||
- [ ] An overview of the suggested solution (if you have an idea) | ||
- [ ] If the feature changes current behavior, reasons why your solution is better | ||
- [ ] Provide with an example of the publication and the mutation that you do | ||
- [ ] Enabled "debug" inside the package and show us some meaningful logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
meteor: [1.12.2, 2.6.1, 2.7.3, 2.9.1] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Meteor | ||
uses: meteorengineer/setup-meteor@v1 | ||
with: | ||
meteor-release: ${{ matrix.meteor }} | ||
- name: Setup tests | ||
run: | | ||
meteor create --release ${{ matrix.meteor }} --bare test | ||
cd test | ||
meteor npm i --save selenium-webdriver@3.6.0 chromedriver@2.36.0 simpl-schema@1.13.1 chai | ||
- name: Test | ||
working-directory: ./test | ||
run: METEOR_PACKAGE_DIRS="../" TEST_BROWSER_DRIVER=chrome meteor test-packages --once --driver-package meteortesting:mocha ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.DS_Store | ||
.DS_Store | ||
|
||
.idea/ | ||
node_modules/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
allow-deny@1.1.1 | ||
babel-compiler@7.10.1 | ||
babel-runtime@1.5.1 | ||
base64@1.0.12 | ||
binary-heap@1.0.11 | ||
boilerplate-generator@1.7.1 | ||
caching-compiler@1.2.2 | ||
callback-hook@1.4.0 | ||
check@1.3.2 | ||
coffeescript@2.4.1 | ||
coffeescript-compiler@2.4.1 | ||
cultofcoders:grapher@1.4.1 | ||
dburles:mongo-collection-instances@0.3.5 | ||
ddp@1.4.1 | ||
ddp-client@2.6.1 | ||
ddp-common@1.4.0 | ||
ddp-server@2.6.0 | ||
diff-sequence@1.1.2 | ||
dynamic-import@0.7.2 | ||
ecmascript@0.16.4 | ||
ecmascript-runtime@0.8.0 | ||
ecmascript-runtime-client@0.12.1 | ||
ecmascript-runtime-server@0.11.0 | ||
ejson@1.1.3 | ||
fetch@0.1.2 | ||
geojson-utils@1.0.11 | ||
herteby:denormalize@0.6.6 | ||
id-map@1.1.1 | ||
inter-process-messaging@0.1.1 | ||
lai:collection-extensions@0.2.1_1 | ||
local-test:cultofcoders:grapher@1.4.1 | ||
logging@1.3.1 | ||
matb33:collection-hooks@1.1.2 | ||
meteor@1.10.3 | ||
meteortesting:browser-tests@0.1.2 | ||
meteortesting:mocha@0.4.4 | ||
minimongo@1.9.1 | ||
modern-browsers@0.1.9 | ||
modules@0.19.0 | ||
modules-runtime@0.13.1 | ||
mongo@1.16.3 | ||
mongo-decimal@0.1.3 | ||
mongo-dev-server@1.1.0 | ||
mongo-id@1.0.8 | ||
npm-mongo@4.12.1 | ||
ordered-dict@1.1.0 | ||
peerlibrary:extend-publish@0.6.0 | ||
peerlibrary:subscription-scope@0.5.0 | ||
practicalmeteor:mocha-core@1.0.1 | ||
promise@0.12.2 | ||
random@1.2.1 | ||
react-fast-refresh@0.2.3 | ||
reactive-var@1.0.12 | ||
reload@1.3.1 | ||
retry@1.1.0 | ||
reywood:publish-composite@1.7.3 | ||
routepolicy@1.1.1 | ||
socket-stream-client@0.5.0 | ||
tracker@1.2.1 | ||
underscore@1.0.11 | ||
webapp@1.13.2 | ||
webapp-hashing@1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
import { Promise } from 'meteor/promise'; | ||
import { Meteor } from 'meteor/meteor'; | ||
import { Mongo, MongoInternals } from 'meteor/mongo'; | ||
|
||
Mongo.Collection.prototype.aggregate = function(pipelines, options = {}) { | ||
const coll = this.rawCollection(); | ||
if (!Mongo.Collection.prototype.aggregate) { | ||
Mongo.Collection.prototype.aggregate = function (pipelines, options) { | ||
const Collection = this.rawCollection(); | ||
|
||
let result = Meteor.wrapAsync(coll.aggregate, coll)(pipelines, options); | ||
if (MongoInternals.NpmModules.mongodb.version[0] === '3') { | ||
const cursor = Meteor.wrapAsync(Collection.aggregate, Collection)(pipelines, options); | ||
return Meteor.wrapAsync(cursor.toArray, cursor)(); | ||
} else if (MongoInternals.NpmModules.mongodb.version[0] === '4') { | ||
const cursor = Collection.aggregate(pipelines, options); | ||
return Meteor.wrapAsync(cursor.toArray, cursor)(); | ||
} | ||
|
||
// We need to check If it's an AggregationCursor | ||
// The reason we do this was because of the upgrade to 1.7 which involved a mongodb driver update | ||
if (Array.isArray(result)) { | ||
return result; | ||
} else { | ||
return Promise.await(result.toArray()); | ||
} | ||
}; | ||
return Meteor.wrapAsync(Collection.aggregate.bind(Collection))(pipelines, options); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.