m2m-components 2.3.1-alpha-445485d.0 → 3.0.0
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/cjs/initM2mComponents.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.initM2mComponents = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _client = require("./storage/client");
|
|
9
9
|
|
|
10
|
-
const initM2mComponents =
|
|
10
|
+
const initM2mComponents = args => {
|
|
11
11
|
_client.m2mStorageClient.init({
|
|
12
12
|
env: args.env === "production" ? "production" : "development"
|
|
13
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initM2mComponents.js","names":["initM2mComponents","args","m2mStorageClient","init","env","globalThis","M2M_COMPONENTS_ENV","undefined"],"sources":["../src/initM2mComponents.ts"],"sourcesContent":["import { m2mStorageClient } from \"./storage/client\";\n\ntype Env = \"development\" | \"production\" | \"local\" | \"localDev\";\n\ninterface InitM2mComponentsArgs {\n env: Env;\n}\n\ndeclare global {\n // To define global variables in a module, we need to use the global keyword\n // eslint-disable-next-line no-var\n var M2M_COMPONENTS_ENV: Env;\n}\n\nexport const initM2mComponents =
|
|
1
|
+
{"version":3,"file":"initM2mComponents.js","names":["initM2mComponents","args","m2mStorageClient","init","env","globalThis","M2M_COMPONENTS_ENV","undefined"],"sources":["../src/initM2mComponents.ts"],"sourcesContent":["import { m2mStorageClient } from \"./storage/client\";\n\ntype Env = \"development\" | \"production\" | \"local\" | \"localDev\";\n\ninterface InitM2mComponentsArgs {\n env: Env;\n}\n\ndeclare global {\n // To define global variables in a module, we need to use the global keyword\n // eslint-disable-next-line no-var\n var M2M_COMPONENTS_ENV: Env;\n}\n\nexport const initM2mComponents = (args: InitM2mComponentsArgs) => {\n m2mStorageClient.init({\n env: args.env === \"production\" ? \"production\" : \"development\",\n });\n if (globalThis.M2M_COMPONENTS_ENV === undefined) {\n globalThis.M2M_COMPONENTS_ENV = args.env;\n }\n};\n"],"mappings":";;;;;;;AAAA;;AAcO,MAAMA,iBAAiB,GAAIC,IAAD,IAAiC;EAChEC,wBAAA,CAAiBC,IAAjB,CAAsB;IACpBC,GAAG,EAAEH,IAAI,CAACG,GAAL,KAAa,YAAb,GAA4B,YAA5B,GAA2C;EAD5B,CAAtB;;EAGA,IAAIC,UAAU,CAACC,kBAAX,KAAkCC,SAAtC,EAAiD;IAC/CF,UAAU,CAACC,kBAAX,GAAgCL,IAAI,CAACG,GAArC;EACD;AACF,CAPM"}
|
package/initM2mComponents.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ interface InitM2mComponentsArgs {
|
|
|
5
5
|
declare global {
|
|
6
6
|
var M2M_COMPONENTS_ENV: Env;
|
|
7
7
|
}
|
|
8
|
-
export declare const initM2mComponents: (args: InitM2mComponentsArgs) =>
|
|
8
|
+
export declare const initM2mComponents: (args: InitM2mComponentsArgs) => void;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=initM2mComponents.d.ts.map
|
package/initM2mComponents.js
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
-
|
|
3
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
|
-
|
|
5
1
|
import { m2mStorageClient } from "./storage/client";
|
|
6
|
-
export var initM2mComponents =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
env: args.env === "production" ? "production" : "development"
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
if (globalThis.M2M_COMPONENTS_ENV === undefined) {
|
|
13
|
-
globalThis.M2M_COMPONENTS_ENV = args.env;
|
|
14
|
-
}
|
|
2
|
+
export var initM2mComponents = args => {
|
|
3
|
+
m2mStorageClient.init({
|
|
4
|
+
env: args.env === "production" ? "production" : "development"
|
|
15
5
|
});
|
|
16
6
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
}
|
|
7
|
+
if (globalThis.M2M_COMPONENTS_ENV === undefined) {
|
|
8
|
+
globalThis.M2M_COMPONENTS_ENV = args.env;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
21
11
|
//# sourceMappingURL=initM2mComponents.js.map
|
package/initM2mComponents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initM2mComponents.js","names":["m2mStorageClient","initM2mComponents","args","init","env","globalThis","M2M_COMPONENTS_ENV","undefined"],"sources":["src/initM2mComponents.ts"],"sourcesContent":["import { m2mStorageClient } from \"./storage/client\";\n\ntype Env = \"development\" | \"production\" | \"local\" | \"localDev\";\n\ninterface InitM2mComponentsArgs {\n env: Env;\n}\n\ndeclare global {\n // To define global variables in a module, we need to use the global keyword\n // eslint-disable-next-line no-var\n var M2M_COMPONENTS_ENV: Env;\n}\n\nexport const initM2mComponents =
|
|
1
|
+
{"version":3,"file":"initM2mComponents.js","names":["m2mStorageClient","initM2mComponents","args","init","env","globalThis","M2M_COMPONENTS_ENV","undefined"],"sources":["src/initM2mComponents.ts"],"sourcesContent":["import { m2mStorageClient } from \"./storage/client\";\n\ntype Env = \"development\" | \"production\" | \"local\" | \"localDev\";\n\ninterface InitM2mComponentsArgs {\n env: Env;\n}\n\ndeclare global {\n // To define global variables in a module, we need to use the global keyword\n // eslint-disable-next-line no-var\n var M2M_COMPONENTS_ENV: Env;\n}\n\nexport const initM2mComponents = (args: InitM2mComponentsArgs) => {\n m2mStorageClient.init({\n env: args.env === \"production\" ? \"production\" : \"development\",\n });\n if (globalThis.M2M_COMPONENTS_ENV === undefined) {\n globalThis.M2M_COMPONENTS_ENV = args.env;\n }\n};\n"],"mappings":"AAAA,SAASA,gBAAT,QAAiC,kBAAjC;AAcA,OAAO,IAAMC,iBAAiB,GAAIC,IAAD,IAAiC;EAChEF,gBAAgB,CAACG,IAAjB,CAAsB;IACpBC,GAAG,EAAEF,IAAI,CAACE,GAAL,KAAa,YAAb,GAA4B,YAA5B,GAA2C;EAD5B,CAAtB;;EAGA,IAAIC,UAAU,CAACC,kBAAX,KAAkCC,SAAtC,EAAiD;IAC/CF,UAAU,CAACC,kBAAX,GAAgCJ,IAAI,CAACE,GAArC;EACD;AACF,CAPM"}
|