2018-01-03 04:05:53 +00:00
|
|
|
// Copyright IBM Corp. 2016,2018. All Rights Reserved.
|
2016-07-28 14:36:23 +00:00
|
|
|
// Node module: loopback
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
2016-11-15 21:46:23 +00:00
|
|
|
'use strict';
|
2016-09-16 19:31:48 +00:00
|
|
|
var g = require('./globalize');
|
2016-07-28 14:36:23 +00:00
|
|
|
var juggler = require('loopback-datasource-juggler');
|
|
|
|
var remoting = require('strong-remoting');
|
|
|
|
|
|
|
|
module.exports = function(loopback) {
|
|
|
|
juggler.getCurrentContext =
|
|
|
|
remoting.getCurrentContext =
|
|
|
|
loopback.getCurrentContext = function() {
|
2016-08-10 11:37:25 +00:00
|
|
|
throw new Error(g.f(
|
|
|
|
'%s was removed in version 3.0. See %s for more details.',
|
|
|
|
'loopback.getCurrentContext()',
|
2016-11-04 20:47:12 +00:00
|
|
|
'http://loopback.io/doc/en/lb2/Using-current-context.html'));
|
2016-07-28 14:36:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
loopback.runInContext = function(fn) {
|
2016-08-10 11:37:25 +00:00
|
|
|
throw new Error(g.f(
|
|
|
|
'%s was removed in version 3.0. See %s for more details.',
|
|
|
|
'loopback.runInContext()',
|
2016-11-04 20:47:12 +00:00
|
|
|
'http://loopback.io/doc/en/lb2/Using-current-context.html'));
|
2016-07-28 14:36:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
loopback.createContext = function(scopeName) {
|
2016-08-10 11:37:25 +00:00
|
|
|
throw new Error(g.f(
|
|
|
|
'%s was removed in version 3.0. See %s for more details.',
|
|
|
|
'loopback.createContext()',
|
2016-11-04 20:47:12 +00:00
|
|
|
'http://loopback.io/doc/en/lb2/Using-current-context.html'));
|
2016-07-28 14:36:23 +00:00
|
|
|
};
|
|
|
|
};
|