@open-wa/wa-automate 4.38.0 → 4.40.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/bin/oas-type-schemas.json +1 -1
- package/dist/api/Client.d.ts +16 -15
- package/dist/api/Client.js +43 -16
- package/dist/api/model/button.d.ts +6 -0
- package/dist/api/model/config.d.ts +2 -1
- package/dist/api/model/config.js +1 -0
- package/dist/cli/file-utils.js +11 -3
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.js +37 -10
- package/dist/controllers/init_patch.js +1 -1
- package/dist/controllers/patch_manager.js +9 -0
- package/package.json +1 -1
@@ -149,6 +149,15 @@ function getLicense(config, me, debugInfo, spinner) {
|
|
149
149
|
const hasSpin = !!spinner;
|
150
150
|
if (!spinner)
|
151
151
|
spinner = new events_1.Spin(config.sessionId || "session", "FETCH_LICENSE", config.disableSpins, true);
|
152
|
+
if (typeof config.licenseKey === "function") {
|
153
|
+
//run the funciton to get the key
|
154
|
+
config.licenseKey = yield config.licenseKey(config.sessionId, me._serialized);
|
155
|
+
}
|
156
|
+
if (typeof config.licenseKey === "object") {
|
157
|
+
//attempt to get the key from the object
|
158
|
+
config.licenseKey = config.licenseKey[me._serialized] || config.licenseKey[config.sessionId];
|
159
|
+
}
|
160
|
+
//asume by now the key is a string
|
152
161
|
spinner === null || spinner === void 0 ? void 0 : spinner.start(`Fetching License: ${Array.isArray(config.licenseKey) ? config.licenseKey : typeof config.licenseKey === "string" ? config.licenseKey.indexOf("-") == -1 ? config.licenseKey.slice(-4) : config.licenseKey.split("-").slice(-1)[0] : config.licenseKey}`, hasSpin ? undefined : 2);
|
153
162
|
try {
|
154
163
|
const START = Date.now();
|
package/package.json
CHANGED