@wavemaker/variables 11.7.0-patch.2 → 11.7.0-patch.4
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/app-config.plugin.d.ts +1 -0
- package/app-config.plugin.js +76 -0
- package/app-config.plugin.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function withMyCustomConfig(config: any): any;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var _this = this;
|
|
38
|
+
var _a = require('expo/config-plugins'), AndroidConfig = _a.AndroidConfig, withAndroidManifest = _a.withAndroidManifest;
|
|
39
|
+
// Using helpers keeps error messages unified and helps cut down on XML format changes.
|
|
40
|
+
var _b = AndroidConfig.Manifest, addMetaDataItemToMainApplication = _b.addMetaDataItemToMainApplication, getMainApplicationOrThrow = _b.getMainApplicationOrThrow;
|
|
41
|
+
// Splitting this function out of the mod makes it easier to test.
|
|
42
|
+
function setCustomConfigAsync(config, androidManifest) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
+
var mainApplication;
|
|
45
|
+
return __generator(this, function (_a) {
|
|
46
|
+
mainApplication = getMainApplicationOrThrow(androidManifest);
|
|
47
|
+
addMetaDataItemToMainApplication(mainApplication,
|
|
48
|
+
// value for `android:name`
|
|
49
|
+
'com.google.android.geo.API_KEY',
|
|
50
|
+
// value for `android:value`
|
|
51
|
+
"Your Google maps API Key Here");
|
|
52
|
+
console.log('Added Maps key - boyina');
|
|
53
|
+
return [2 /*return*/, androidManifest];
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
module.exports = {
|
|
58
|
+
withMyCustomConfig: function (config) {
|
|
59
|
+
return withAndroidManifest(config, function (config) { return __awaiter(_this, void 0, void 0, function () {
|
|
60
|
+
var _a;
|
|
61
|
+
return __generator(this, function (_b) {
|
|
62
|
+
switch (_b.label) {
|
|
63
|
+
case 0:
|
|
64
|
+
// Modifiers can be async, but try to keep them fast.
|
|
65
|
+
_a = config;
|
|
66
|
+
return [4 /*yield*/, setCustomConfigAsync(config, config.modResults)];
|
|
67
|
+
case 1:
|
|
68
|
+
// Modifiers can be async, but try to keep them fast.
|
|
69
|
+
_a.modResults = _b.sent();
|
|
70
|
+
return [2 /*return*/, config];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}); });
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=app-config.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-config.plugin.js","sourceRoot":"./","sources":["app-config.plugin.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAkCE;AAlCI,IAAA,KAA0C,OAAO,CAAC,qBAAqB,CAAC,EAAtE,aAAa,mBAAA,EAAE,mBAAmB,yBAAoC,CAAC;AAE/E,uFAAuF;AACjF,IAAA,KAAkE,aAAa,CAAC,QAAQ,EAAtF,gCAAgC,sCAAA,EAAE,yBAAyB,+BAA2B,CAAC;AAG/F,kEAAkE;AAClE,SAAe,oBAAoB,CACjC,MAAM,EACN,eAAe;;;;YAGT,eAAe,GAAG,yBAAyB,CAAC,eAAe,CAAC,CAAC;YAEnE,gCAAgC,CAC9B,eAAe;YACf,2BAA2B;YAC3B,gCAAgC;YAChC,4BAA4B;YAC5B,+BAA+B,CAChC,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,sBAAO,eAAe,EAAC;;;CACxB;AAGD,MAAM,CAAC,OAAO,GAAG;IACf,kBAAkB,EAAG,UAAA,MAAM;QACzB,OAAO,mBAAmB,CAAC,MAAM,EAAE,UAAM,MAAM;;;;;wBAC7C,qDAAqD;wBACrD,KAAA,MAAM,CAAA;wBAAc,qBAAM,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,EAAA;;wBADzE,qDAAqD;wBACrD,GAAO,UAAU,GAAG,SAAqD,CAAC;wBAC1E,sBAAO,MAAM,EAAC;;;aACf,CAAC,CAAC;IACL,CAAC;CACF,CAAC","sourcesContent":["const { AndroidConfig, withAndroidManifest } = require('expo/config-plugins');\n\n// Using helpers keeps error messages unified and helps cut down on XML format changes.\nconst { addMetaDataItemToMainApplication, getMainApplicationOrThrow } = AndroidConfig.Manifest;\n\n\n// Splitting this function out of the mod makes it easier to test.\nasync function setCustomConfigAsync(\n config,\n androidManifest\n) {\n // Get the <application /> tag and assert if it doesn't exist.\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n addMetaDataItemToMainApplication(\n mainApplication,\n // value for `android:name`\n 'com.google.android.geo.API_KEY',\n // value for `android:value`\n \"Your Google maps API Key Here\"\n );\n console.log('Added Maps key - boyina');\n return androidManifest;\n}\n\n\nmodule.exports = {\n withMyCustomConfig : config => {\n return withAndroidManifest(config, async config => {\n // Modifiers can be async, but try to keep them fast.\n config.modResults = await setCustomConfigAsync(config, config.modResults);\n return config;\n });\n }\n};"]}
|