@educabot/educablocks-cosmos 0.1.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/README.md +2 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/src/cosmos.js +95 -0
- package/dist/src/cosmos.js.map +1 -0
- package/dist/src/customers.js +738 -0
- package/dist/src/customers.js.map +1 -0
- package/dist/src/routes.js +151 -0
- package/dist/src/routes.js.map +1 -0
- package/dist/src/types.js +22 -0
- package/dist/src/types.js.map +1 -0
- package/index.ts +2 -0
- package/package.json +20 -0
- package/src/cosmos.ts +117 -0
- package/src/customers.ts +736 -0
- package/src/routes.ts +164 -0
- package/src/types.ts +115 -0
- package/tsconfig.json +13 -0
package/README.md
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.getCosmos = void 0;
|
|
18
|
+
var cosmos_1 = require("./src/cosmos");
|
|
19
|
+
Object.defineProperty(exports, "getCosmos", { enumerable: true, get: function () { return cosmos_1.getCosmos; } });
|
|
20
|
+
__exportStar(require("./src/routes"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAAwC;AAA/B,mGAAA,SAAS,OAAA;AAClB,+CAA4B"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCosmos = void 0;
|
|
4
|
+
const customers_1 = require("./customers");
|
|
5
|
+
const env = process.env.NODE_ENV;
|
|
6
|
+
const getCosmos = (key, domain = '', newEnv = '') => {
|
|
7
|
+
const environment = (newEnv) ? newEnv : ((env) ? env : 'production');
|
|
8
|
+
const hostname = (domain) ? domain : ((typeof window !== 'undefined') ? window.location.hostname : '');
|
|
9
|
+
///////// EDUCABOT /////////
|
|
10
|
+
if (customers_1.customers.EDUCABOT[environment]
|
|
11
|
+
&& typeof customers_1.customers.EDUCABOT[environment][key] !== 'undefined'
|
|
12
|
+
&& (hostname === 'localhost'
|
|
13
|
+
|| hostname === customers_1.customers.EDUCABOT[environment].cosmosFrontUrl
|
|
14
|
+
|| hostname === customers_1.customers.EDUCABOT[environment].cosmosBackUrl
|
|
15
|
+
|| hostname === customers_1.customers.EDUCABOT[environment].cosmosFrontAnimationsUrl
|
|
16
|
+
|| hostname === customers_1.customers.EDUCABOT[environment].cosmosFrontGamesUrl
|
|
17
|
+
// hostname.includes(customers.EDUCABOT[environment].cosmosFrontUrl || hostname === 'localhost')
|
|
18
|
+
// || hostname.includes(customers.EDUCABOT[environment].cosmosBackUrl || hostname === 'localhost')
|
|
19
|
+
)) {
|
|
20
|
+
return customers_1.customers.EDUCABOT[environment][key];
|
|
21
|
+
///////// CODIT /////////
|
|
22
|
+
}
|
|
23
|
+
else if (customers_1.customers.CODIT[environment]
|
|
24
|
+
&& typeof customers_1.customers.CODIT[environment][key] !== 'undefined'
|
|
25
|
+
&& (hostname === customers_1.customers.CODIT[environment].cosmosFrontUrl
|
|
26
|
+
|| hostname === customers_1.customers.CODIT[environment].cosmosBackUrl
|
|
27
|
+
|| hostname === customers_1.customers.CODIT[environment].cosmosFrontAnimationsUrl)) {
|
|
28
|
+
return customers_1.customers.CODIT[environment][key];
|
|
29
|
+
///////// COPA_ROBOTICA /////////
|
|
30
|
+
}
|
|
31
|
+
else if (customers_1.customers.COPA_ROBOTICA[environment]
|
|
32
|
+
&& typeof customers_1.customers.COPA_ROBOTICA[environment][key] !== 'undefined'
|
|
33
|
+
&& (hostname === customers_1.customers.COPA_ROBOTICA[environment].cosmosFrontUrl
|
|
34
|
+
|| hostname === customers_1.customers.COPA_ROBOTICA[environment].cosmosBackUrl
|
|
35
|
+
|| hostname === customers_1.customers.COPA_ROBOTICA[environment].cosmosFrontAnimationsUrl)) {
|
|
36
|
+
return customers_1.customers.COPA_ROBOTICA[environment][key];
|
|
37
|
+
///////// REV_ROBOTICS /////////
|
|
38
|
+
}
|
|
39
|
+
else if (customers_1.customers.REV_ROBOTICS[environment]
|
|
40
|
+
&& typeof customers_1.customers.REV_ROBOTICS[environment][key] !== 'undefined'
|
|
41
|
+
&& (hostname === customers_1.customers.REV_ROBOTICS[environment].cosmosFrontUrl
|
|
42
|
+
|| hostname === customers_1.customers.REV_ROBOTICS[environment].cosmosBackUrl
|
|
43
|
+
|| hostname === customers_1.customers.REV_ROBOTICS[environment].cosmosFrontAnimationsUrl)) {
|
|
44
|
+
return customers_1.customers.REV_ROBOTICS[environment][key];
|
|
45
|
+
///////// CREATEC /////////
|
|
46
|
+
}
|
|
47
|
+
else if (customers_1.customers.CREATEC[environment]
|
|
48
|
+
&& typeof customers_1.customers.CREATEC[environment][key] !== 'undefined'
|
|
49
|
+
&& (hostname === customers_1.customers.CREATEC[environment].cosmosFrontUrl
|
|
50
|
+
|| hostname === customers_1.customers.CREATEC[environment].cosmosBackUrl
|
|
51
|
+
|| hostname === customers_1.customers.CREATEC[environment].cosmosFrontAnimationsUrl)) {
|
|
52
|
+
return customers_1.customers.CREATEC[environment][key];
|
|
53
|
+
///////// FIFA /////////
|
|
54
|
+
}
|
|
55
|
+
else if (customers_1.customers.FIFA[environment]
|
|
56
|
+
&& typeof customers_1.customers.FIFA[environment][key] !== 'undefined'
|
|
57
|
+
&& (hostname === customers_1.customers.FIFA[environment].cosmosFrontUrl
|
|
58
|
+
|| hostname === customers_1.customers.FIFA[environment].cosmosBackUrl
|
|
59
|
+
|| hostname === customers_1.customers.FIFA[environment].cosmosFrontAnimationsUrl)) {
|
|
60
|
+
return customers_1.customers.FIFA[environment][key];
|
|
61
|
+
///////// FIFA FOUNDATION /////////
|
|
62
|
+
}
|
|
63
|
+
else if (customers_1.customers.FIFA_FOUNDATION[environment]
|
|
64
|
+
&& typeof customers_1.customers.FIFA_FOUNDATION[environment][key] !== 'undefined'
|
|
65
|
+
&& (hostname === customers_1.customers.FIFA_FOUNDATION[environment].cosmosFrontUrl
|
|
66
|
+
|| hostname === customers_1.customers.FIFA_FOUNDATION[environment].cosmosBackUrl
|
|
67
|
+
|| hostname === customers_1.customers.FIFA_FOUNDATION[environment].cosmosFrontAnimationsUrl)) {
|
|
68
|
+
return customers_1.customers.FIFA_FOUNDATION[environment][key];
|
|
69
|
+
///////// CREABOTS /////////
|
|
70
|
+
}
|
|
71
|
+
else if (customers_1.customers.CREABOTS[environment]
|
|
72
|
+
&& typeof customers_1.customers.CREABOTS[environment][key] !== 'undefined'
|
|
73
|
+
&& (hostname === customers_1.customers.CREABOTS[environment].cosmosFrontUrl
|
|
74
|
+
|| hostname === customers_1.customers.CREABOTS[environment].cosmosBackUrl
|
|
75
|
+
|| hostname === customers_1.customers.CREABOTS[environment].cosmosFrontAnimationsUrl)) {
|
|
76
|
+
return customers_1.customers.CREABOTS[environment][key];
|
|
77
|
+
///////// CREABOTS_LANDING /////////
|
|
78
|
+
}
|
|
79
|
+
else if (customers_1.customers.CREABOTS_LANDING[environment]
|
|
80
|
+
&& typeof customers_1.customers.CREABOTS_LANDING[environment][key] !== 'undefined'
|
|
81
|
+
&& (hostname === customers_1.customers.CREABOTS_LANDING[environment].cosmosFrontUrl
|
|
82
|
+
|| hostname === customers_1.customers.CREABOTS_LANDING[environment].cosmosBackUrl
|
|
83
|
+
|| hostname === customers_1.customers.CREABOTS_LANDING[environment].cosmosFrontAnimationsUrl)) {
|
|
84
|
+
return customers_1.customers.CREABOTS_LANDING[environment][key];
|
|
85
|
+
///////// DEFAULT /////////
|
|
86
|
+
}
|
|
87
|
+
else if (customers_1.customers.DEFAULT.development && typeof customers_1.customers.DEFAULT.development[key] !== 'undefined') {
|
|
88
|
+
return customers_1.customers.DEFAULT.development[key];
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return '';
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.getCosmos = getCosmos;
|
|
95
|
+
//# sourceMappingURL=cosmos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cosmos.js","sourceRoot":"","sources":["../../src/cosmos.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAExC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;AAE1B,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,SAAiB,EAAE,EAAE,SAAiB,EAAE,EAAE,EAAE;IACjF,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CA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