Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add default.version support #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ class Yoke extends EventEmitter {
for (let i = 0; i < size; i++) {
const provider = url.parse(decodeURIComponent(children[i]));
const queryObj = qs.parse(provider.query);
if (!queryObj.version && queryObj['default.version']) {
queryObj.version = queryObj['default.version']
}
if (
queryObj.version === depVal.version &&
queryObj.group === depVal.group &&
Expand Down
4 changes: 2 additions & 2 deletions libs/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class Service {
if (this.mdsig[method]) {
args = this.mdsig[method](...args);
}
return new Promise((resolve, reject) => this.execute(method, args, resolve, reject));
return new Promise((resolve, reject) => this._execute(method, args, resolve, reject));
};
}
}

execute(method, args, resolve, reject) {
_execute(method, args, resolve, reject) {
const attach = Object.assign({}, this.encodeParam, {
_method: method,
_args: args
Expand Down