roboto-js 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +3 -1
- package/dist/cjs/rbt_object.cjs +2 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/rbt_object.js +2 -0
- package/package.json +1 -1
- package/src/index.js +3 -1
- package/src/rbt_object.js +2 -0
package/dist/cjs/index.cjs
CHANGED
|
@@ -39,7 +39,9 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
39
39
|
function Roboto() {
|
|
40
40
|
var proxyReq = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
41
41
|
_classCallCheck(this, Roboto);
|
|
42
|
-
if (Roboto.instance) {
|
|
42
|
+
if (Roboto.instance && !proxyReq) {
|
|
43
|
+
// if on client, there can only be one instance
|
|
44
|
+
// on server, with proxyReq, each request has its own instance
|
|
43
45
|
return Roboto.instance;
|
|
44
46
|
}
|
|
45
47
|
var isBrowser = typeof window !== "undefined";
|
package/dist/cjs/rbt_object.cjs
CHANGED
|
@@ -23,6 +23,8 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
|
|
|
23
23
|
_classCallCheck(this, RbtObject);
|
|
24
24
|
this._axios = axiosInstance;
|
|
25
25
|
this._internalData = record;
|
|
26
|
+
this.id = record.id;
|
|
27
|
+
this.id_revision = record.id_revision;
|
|
26
28
|
if (record.data) {
|
|
27
29
|
this._data = record.data;
|
|
28
30
|
} else {
|
package/dist/esm/index.js
CHANGED
|
@@ -39,7 +39,9 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
39
39
|
function Roboto() {
|
|
40
40
|
var proxyReq = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
41
41
|
_classCallCheck(this, Roboto);
|
|
42
|
-
if (Roboto.instance) {
|
|
42
|
+
if (Roboto.instance && !proxyReq) {
|
|
43
|
+
// if on client, there can only be one instance
|
|
44
|
+
// on server, with proxyReq, each request has its own instance
|
|
43
45
|
return Roboto.instance;
|
|
44
46
|
}
|
|
45
47
|
var isBrowser = typeof window !== "undefined";
|
package/dist/esm/rbt_object.js
CHANGED
|
@@ -23,6 +23,8 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
|
|
|
23
23
|
_classCallCheck(this, RbtObject);
|
|
24
24
|
this._axios = axiosInstance;
|
|
25
25
|
this._internalData = record;
|
|
26
|
+
this.id = record.id;
|
|
27
|
+
this.id_revision = record.id_revision;
|
|
26
28
|
if (record.data) {
|
|
27
29
|
this._data = record.data;
|
|
28
30
|
} else {
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -15,7 +15,9 @@ export default class Roboto{
|
|
|
15
15
|
|
|
16
16
|
constructor(proxyReq = null) {
|
|
17
17
|
|
|
18
|
-
if(Roboto.instance){
|
|
18
|
+
if(Roboto.instance && !proxyReq){
|
|
19
|
+
// if on client, there can only be one instance
|
|
20
|
+
// on server, with proxyReq, each request has its own instance
|
|
19
21
|
return Roboto.instance;
|
|
20
22
|
}
|
|
21
23
|
|
package/src/rbt_object.js
CHANGED