flipper-frontend-core 0.212.0 → 1.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.
Potentially problematic release.
This version of flipper-frontend-core might be problematic. Click here for more details.
- package/index.js +47 -0
- package/package.json +7 -33
- package/README.md +0 -3
- package/lib/AbstractClient.d.ts +0 -75
- package/lib/AbstractClient.d.ts.map +0 -1
- package/lib/AbstractClient.js +0 -376
- package/lib/AbstractClient.js.map +0 -1
- package/lib/RenderHost.d.ts +0 -138
- package/lib/RenderHost.d.ts.map +0 -1
- package/lib/RenderHost.js +0 -19
- package/lib/RenderHost.js.map +0 -1
- package/lib/devices/ArchivedDevice.d.ts +0 -35
- package/lib/devices/ArchivedDevice.d.ts.map +0 -1
- package/lib/devices/ArchivedDevice.js +0 -65
- package/lib/devices/ArchivedDevice.js.map +0 -1
- package/lib/devices/BaseDevice.d.ts +0 -79
- package/lib/devices/BaseDevice.d.ts.map +0 -1
- package/lib/devices/BaseDevice.js +0 -267
- package/lib/devices/BaseDevice.js.map +0 -1
- package/lib/devices/TestDevice.d.ts +0 -16
- package/lib/devices/TestDevice.d.ts.map +0 -1
- package/lib/devices/TestDevice.js +0 -36
- package/lib/devices/TestDevice.js.map +0 -1
- package/lib/fb-stubs/constants.d.ts +0 -13
- package/lib/fb-stubs/constants.d.ts.map +0 -1
- package/lib/fb-stubs/constants.js +0 -14
- package/lib/fb-stubs/constants.js.map +0 -1
- package/lib/flipperLibImplementation/downloadFile.d.ts +0 -12
- package/lib/flipperLibImplementation/downloadFile.d.ts.map +0 -1
- package/lib/flipperLibImplementation/downloadFile.js +0 -49
- package/lib/flipperLibImplementation/downloadFile.js.map +0 -1
- package/lib/flipperLibImplementation/index.d.ts +0 -15
- package/lib/flipperLibImplementation/index.d.ts.map +0 -1
- package/lib/flipperLibImplementation/index.js +0 -72
- package/lib/flipperLibImplementation/index.js.map +0 -1
- package/lib/globalObject.d.ts +0 -24
- package/lib/globalObject.d.ts.map +0 -1
- package/lib/globalObject.js +0 -18
- package/lib/globalObject.js.map +0 -1
- package/lib/index.d.ts +0 -19
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -46
- package/lib/index.js.map +0 -1
- package/lib/plugins.d.ts +0 -39
- package/lib/plugins.d.ts.map +0 -1
- package/lib/plugins.js +0 -189
- package/lib/plugins.js.map +0 -1
- package/lib/utils/createServerAddOnControls.d.ts +0 -11
- package/lib/utils/createServerAddOnControls.d.ts.map +0 -1
- package/lib/utils/createServerAddOnControls.js +0 -69
- package/lib/utils/createServerAddOnControls.js.map +0 -1
- package/lib/utils/isPluginCompatible.d.ts +0 -12
- package/lib/utils/isPluginCompatible.d.ts.map +0 -1
- package/lib/utils/isPluginCompatible.js +0 -26
- package/lib/utils/isPluginCompatible.js.map +0 -1
- package/lib/utils/isPluginVersionMoreRecent.d.ts +0 -12
- package/lib/utils/isPluginVersionMoreRecent.d.ts.map +0 -1
- package/lib/utils/isPluginVersionMoreRecent.js +0 -39
- package/lib/utils/isPluginVersionMoreRecent.js.map +0 -1
- package/lib/utils/isProduction.d.ts +0 -10
- package/lib/utils/isProduction.d.ts.map +0 -1
- package/lib/utils/isProduction.js +0 -16
- package/lib/utils/isProduction.js.map +0 -1
- package/lib/utils/pluginKey.d.ts +0 -13
- package/lib/utils/pluginKey.d.ts.map +0 -1
- package/lib/utils/pluginKey.js +0 -27
- package/lib/utils/pluginKey.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"createServerAddOnControls.d.ts","sourceRoot":"","sources":["../../src/utils/createServerAddOnControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,aAAa,EACb,mBAAmB,EAEpB,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,yBAAyB,kBACrB,aAAa,KAC3B,mBA6EF,CAAC"}
|
@@ -1,69 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
4
|
-
*
|
5
|
-
* This source code is licensed under the MIT license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
7
|
-
*
|
8
|
-
* @format
|
9
|
-
*/
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
11
|
-
exports.createServerAddOnControls = void 0;
|
12
|
-
const flipper_common_1 = require("flipper-common");
|
13
|
-
const createServerAddOnControls = (flipperServer) => {
|
14
|
-
const methodHandlers = new Map();
|
15
|
-
const catchAllHandlers = new Map();
|
16
|
-
let subscribed = false;
|
17
|
-
const subscriptionCb = ({ params }) => {
|
18
|
-
var _a;
|
19
|
-
const pluginName = params.api;
|
20
|
-
const methodHandler = (_a = methodHandlers.get(pluginName)) === null || _a === void 0 ? void 0 : _a.get(params.method);
|
21
|
-
if (methodHandler) {
|
22
|
-
methodHandler(params.params);
|
23
|
-
return;
|
24
|
-
}
|
25
|
-
const catchAllHandler = catchAllHandlers.get(pluginName);
|
26
|
-
catchAllHandler === null || catchAllHandler === void 0 ? void 0 : catchAllHandler(params.method, params.params);
|
27
|
-
};
|
28
|
-
return {
|
29
|
-
start: (pluginName, details, owner) => flipperServer.exec('plugins-server-add-on-start', pluginName, details, owner),
|
30
|
-
stop: (pluginName, owner) => flipperServer.exec('plugins-server-add-on-stop', pluginName, owner),
|
31
|
-
sendMessage: async (pluginName, method, params) => {
|
32
|
-
const res = await flipperServer.exec('plugins-server-add-on-request-response', {
|
33
|
-
method: 'execute',
|
34
|
-
params: {
|
35
|
-
method,
|
36
|
-
api: pluginName,
|
37
|
-
params,
|
38
|
-
},
|
39
|
-
});
|
40
|
-
if (res.error) {
|
41
|
-
throw (0, flipper_common_1.deserializeRemoteError)(res.error);
|
42
|
-
}
|
43
|
-
return res.success;
|
44
|
-
},
|
45
|
-
receiveMessage: (pluginName, method, receiver) => {
|
46
|
-
if (!methodHandlers.has(pluginName)) {
|
47
|
-
methodHandlers.set(pluginName, new Map());
|
48
|
-
}
|
49
|
-
methodHandlers.get(pluginName).set(method, receiver);
|
50
|
-
// Subscribe client/device to messages from flipper server only when the first plugin subscribes to them
|
51
|
-
if (!subscribed) {
|
52
|
-
subscribed = true;
|
53
|
-
flipperServer.on('plugins-server-add-on-message', subscriptionCb);
|
54
|
-
}
|
55
|
-
},
|
56
|
-
receiveAnyMessage: (pluginName, receiver) => {
|
57
|
-
catchAllHandlers.set(pluginName, receiver);
|
58
|
-
},
|
59
|
-
unsubscribePlugin: (pluginName) => {
|
60
|
-
methodHandlers.delete(pluginName);
|
61
|
-
catchAllHandlers.delete(pluginName);
|
62
|
-
},
|
63
|
-
unsubscribe: () => {
|
64
|
-
flipperServer.off('plugins-server-add-on-message', subscriptionCb);
|
65
|
-
},
|
66
|
-
};
|
67
|
-
};
|
68
|
-
exports.createServerAddOnControls = createServerAddOnControls;
|
69
|
-
//# sourceMappingURL=createServerAddOnControls.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"createServerAddOnControls.js","sourceRoot":"","sources":["../../src/utils/createServerAddOnControls.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,mDAKwB;AAKjB,MAAM,yBAAyB,GAAG,CACvC,aAA4B,EACP,EAAE;IACvB,MAAM,cAAc,GAAG,IAAI,GAAG,EAG3B,CAAC;IACJ,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAG7B,CAAC;IAEJ,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,MAAM,cAAc,GAAG,CAAC,EAAC,MAAM,EAAiB,EAAE,EAAE;;QAClD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC;QAE9B,MAAM,aAAa,GAAG,MAAA,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,0CAAE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEzE,IAAI,aAAa,EAAE;YACjB,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC7B,OAAO;SACR;QAED,MAAM,eAAe,GAAG,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACzD,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,OAAO;QACL,KAAK,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CACpC,aAAa,CAAC,IAAI,CAChB,6BAA6B,EAC7B,UAAU,EACV,OAAO,EACP,KAAK,CACN;QACH,IAAI,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAC1B,aAAa,CAAC,IAAI,CAAC,4BAA4B,EAAE,UAAU,EAAE,KAAK,CAAC;QACrE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YAChD,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,IAAI,CAClC,wCAAwC,EACxC;gBACE,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE;oBACN,MAAM;oBACN,GAAG,EAAE,UAAU;oBACf,MAAM;iBACP;aACF,CACF,CAAC;YAEF,IAAI,GAAG,CAAC,KAAK,EAAE;gBACb,MAAM,IAAA,uCAAsB,EAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aACzC;YAED,OAAO,GAAG,CAAC,OAAO,CAAC;QACrB,CAAC;QACD,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;YAC/C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;gBACnC,cAAc,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;aAC3C;YACD,cAAc,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAEtD,wGAAwG;YACxG,IAAI,CAAC,UAAU,EAAE;gBACf,UAAU,GAAG,IAAI,CAAC;gBAClB,aAAa,CAAC,EAAE,CAAC,+BAA+B,EAAE,cAAc,CAAC,CAAC;aACnE;QACH,CAAC;QACD,iBAAiB,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE;YAC1C,gBAAgB,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC7C,CAAC;QACD,iBAAiB,EAAE,CAAC,UAAU,EAAE,EAAE;YAChC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAClC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,aAAa,CAAC,GAAG,CAAC,+BAA+B,EAAE,cAAc,CAAC,CAAC;QACrE,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AA/EW,QAAA,yBAAyB,6BA+EpC"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
|
-
*
|
4
|
-
* This source code is licensed under the MIT license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*
|
7
|
-
* @format
|
8
|
-
*/
|
9
|
-
import { PluginDetails } from 'flipper-common';
|
10
|
-
export declare function isPluginCompatible(plugin: PluginDetails, flipperVersion: string): boolean;
|
11
|
-
export default isPluginCompatible;
|
12
|
-
//# sourceMappingURL=isPluginCompatible.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isPluginCompatible.d.ts","sourceRoot":"","sources":["../../src/utils/isPluginCompatible.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAI7C,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,MAAM,WAQvB;AAED,eAAe,kBAAkB,CAAC"}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
4
|
-
*
|
5
|
-
* This source code is licensed under the MIT license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
7
|
-
*
|
8
|
-
* @format
|
9
|
-
*/
|
10
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
11
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
12
|
-
};
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
-
exports.isPluginCompatible = void 0;
|
15
|
-
const semver_1 = __importDefault(require("semver"));
|
16
|
-
const RenderHost_1 = require("../RenderHost");
|
17
|
-
function isPluginCompatible(plugin, flipperVersion) {
|
18
|
-
var _a, _b;
|
19
|
-
return ((0, RenderHost_1.getRenderHostInstance)().GK('flipper_disable_plugin_compatibility_checks') ||
|
20
|
-
flipperVersion === '0.0.0' ||
|
21
|
-
!((_a = plugin.engines) === null || _a === void 0 ? void 0 : _a.flipper) ||
|
22
|
-
semver_1.default.lte((_b = plugin.engines) === null || _b === void 0 ? void 0 : _b.flipper, flipperVersion));
|
23
|
-
}
|
24
|
-
exports.isPluginCompatible = isPluginCompatible;
|
25
|
-
exports.default = isPluginCompatible;
|
26
|
-
//# sourceMappingURL=isPluginCompatible.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isPluginCompatible.js","sourceRoot":"","sources":["../../src/utils/isPluginCompatible.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;AAGH,oDAA4B;AAC5B,8CAAoD;AAEpD,SAAgB,kBAAkB,CAChC,MAAqB,EACrB,cAAsB;;IAEtB,OAAO,CACL,IAAA,kCAAqB,GAAE,CAAC,EAAE,CAAC,6CAA6C,CAAC;QACzE,cAAc,KAAK,OAAO;QAC1B,CAAC,CAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,OAAO,CAAA;QACxB,gBAAM,CAAC,GAAG,CAAC,MAAA,MAAM,CAAC,OAAO,0CAAE,OAAO,EAAE,cAAc,CAAC,CACpD,CAAC;AACJ,CAAC;AAVD,gDAUC;AAED,kBAAe,kBAAkB,CAAC"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
|
-
*
|
4
|
-
* This source code is licensed under the MIT license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*
|
7
|
-
* @format
|
8
|
-
*/
|
9
|
-
import { ConcretePluginDetails } from 'flipper-common';
|
10
|
-
export declare function isPluginVersionMoreRecent(versionDetails: ConcretePluginDetails, otherVersionDetails: ConcretePluginDetails, flipperVersion: string): boolean;
|
11
|
-
export default isPluginVersionMoreRecent;
|
12
|
-
//# sourceMappingURL=isPluginVersionMoreRecent.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isPluginVersionMoreRecent.d.ts","sourceRoot":"","sources":["../../src/utils/isPluginVersionMoreRecent.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAC,qBAAqB,EAAC,MAAM,gBAAgB,CAAC;AAIrD,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,qBAAqB,EACrC,mBAAmB,EAAE,qBAAqB,EAC1C,cAAc,EAAE,MAAM,WA4BvB;AAED,eAAe,yBAAyB,CAAC"}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
4
|
-
*
|
5
|
-
* This source code is licensed under the MIT license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
7
|
-
*
|
8
|
-
* @format
|
9
|
-
*/
|
10
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
11
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
12
|
-
};
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
-
exports.isPluginVersionMoreRecent = void 0;
|
15
|
-
const semver_1 = __importDefault(require("semver"));
|
16
|
-
const isPluginCompatible_1 = __importDefault(require("./isPluginCompatible"));
|
17
|
-
function isPluginVersionMoreRecent(versionDetails, otherVersionDetails, flipperVersion) {
|
18
|
-
const isPlugin1Compatible = (0, isPluginCompatible_1.default)(versionDetails, flipperVersion);
|
19
|
-
const isPlugin2Compatible = (0, isPluginCompatible_1.default)(otherVersionDetails, flipperVersion);
|
20
|
-
// prefer compatible plugins
|
21
|
-
if (isPlugin1Compatible && !isPlugin2Compatible)
|
22
|
-
return true;
|
23
|
-
if (!isPlugin1Compatible && isPlugin2Compatible)
|
24
|
-
return false;
|
25
|
-
// prefer plugins with greater version
|
26
|
-
if (semver_1.default.gt(versionDetails.version, otherVersionDetails.version)) {
|
27
|
-
return true;
|
28
|
-
}
|
29
|
-
if (semver_1.default.eq(versionDetails.version, otherVersionDetails.version) &&
|
30
|
-
versionDetails.isActivatable &&
|
31
|
-
!otherVersionDetails.isActivatable) {
|
32
|
-
// prefer locally available versions to the versions available remotely on marketplace
|
33
|
-
return true;
|
34
|
-
}
|
35
|
-
return false;
|
36
|
-
}
|
37
|
-
exports.isPluginVersionMoreRecent = isPluginVersionMoreRecent;
|
38
|
-
exports.default = isPluginVersionMoreRecent;
|
39
|
-
//# sourceMappingURL=isPluginVersionMoreRecent.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isPluginVersionMoreRecent.js","sourceRoot":"","sources":["../../src/utils/isPluginVersionMoreRecent.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;AAGH,oDAA4B;AAC5B,8EAAsD;AAEtD,SAAgB,yBAAyB,CACvC,cAAqC,EACrC,mBAA0C,EAC1C,cAAsB;IAEtB,MAAM,mBAAmB,GAAG,IAAA,4BAAkB,EAC5C,cAAc,EACd,cAAc,CACf,CAAC;IACF,MAAM,mBAAmB,GAAG,IAAA,4BAAkB,EAC5C,mBAAmB,EACnB,cAAc,CACf,CAAC;IAEF,4BAA4B;IAC5B,IAAI,mBAAmB,IAAI,CAAC,mBAAmB;QAAE,OAAO,IAAI,CAAC;IAC7D,IAAI,CAAC,mBAAmB,IAAI,mBAAmB;QAAE,OAAO,KAAK,CAAC;IAE9D,sCAAsC;IACtC,IAAI,gBAAM,CAAC,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE;QAClE,OAAO,IAAI,CAAC;KACb;IACD,IACE,gBAAM,CAAC,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC;QAC9D,cAAc,CAAC,aAAa;QAC5B,CAAC,mBAAmB,CAAC,aAAa,EAClC;QACA,sFAAsF;QACtF,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AA/BD,8DA+BC;AAED,kBAAe,yBAAyB,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
|
-
*
|
4
|
-
* This source code is licensed under the MIT license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*
|
7
|
-
* @format
|
8
|
-
*/
|
9
|
-
export default function isProduction(): boolean;
|
10
|
-
//# sourceMappingURL=isProduction.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isProduction.d.ts","sourceRoot":"","sources":["../../src/utils/isProduction.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,OAAO,UAAU,YAAY,YAEnC"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
4
|
-
*
|
5
|
-
* This source code is licensed under the MIT license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
7
|
-
*
|
8
|
-
* @format
|
9
|
-
*/
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
11
|
-
const RenderHost_1 = require("../RenderHost");
|
12
|
-
function isProduction() {
|
13
|
-
return (0, RenderHost_1.getRenderHostInstance)().serverConfig.environmentInfo.isProduction;
|
14
|
-
}
|
15
|
-
exports.default = isProduction;
|
16
|
-
//# sourceMappingURL=isProduction.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isProduction.js","sourceRoot":"","sources":["../../src/utils/isProduction.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAEH,8CAAoD;AAEpD,SAAwB,YAAY;IAClC,OAAO,IAAA,kCAAqB,GAAE,CAAC,YAAY,CAAC,eAAe,CAAC,YAAY,CAAC;AAC3E,CAAC;AAFD,+BAEC"}
|
package/lib/utils/pluginKey.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
|
-
*
|
4
|
-
* This source code is licensed under the MIT license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*
|
7
|
-
* @format
|
8
|
-
*/
|
9
|
-
export declare function getPluginKey(selectedAppId: string | null | undefined, baseDevice: {
|
10
|
-
serial: string;
|
11
|
-
} | null | undefined, pluginID: string): string;
|
12
|
-
export declare const pluginKey: (serial: string, pluginName: string) => string;
|
13
|
-
//# sourceMappingURL=pluginKey.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pluginKey.d.ts","sourceRoot":"","sources":["../../src/utils/pluginKey.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wBAAgB,YAAY,CAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,UAAU,EAAE;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,GAAG,SAAS,EAC/C,QAAQ,EAAE,MAAM,GACf,MAAM,CASR;AAED,eAAO,MAAM,SAAS,WAAY,MAAM,cAAc,MAAM,KAAG,MAE9D,CAAC"}
|
package/lib/utils/pluginKey.js
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
4
|
-
*
|
5
|
-
* This source code is licensed under the MIT license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
7
|
-
*
|
8
|
-
* @format
|
9
|
-
*/
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
11
|
-
exports.pluginKey = exports.getPluginKey = void 0;
|
12
|
-
function getPluginKey(selectedAppId, baseDevice, pluginID) {
|
13
|
-
if (selectedAppId) {
|
14
|
-
return `${selectedAppId}#${pluginID}`;
|
15
|
-
}
|
16
|
-
if (baseDevice) {
|
17
|
-
// If selected App is not defined, then the plugin is a device plugin
|
18
|
-
return `${baseDevice.serial}#${pluginID}`;
|
19
|
-
}
|
20
|
-
return `unknown#${pluginID}`;
|
21
|
-
}
|
22
|
-
exports.getPluginKey = getPluginKey;
|
23
|
-
const pluginKey = (serial, pluginName) => {
|
24
|
-
return `${serial}#${pluginName}`;
|
25
|
-
};
|
26
|
-
exports.pluginKey = pluginKey;
|
27
|
-
//# sourceMappingURL=pluginKey.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pluginKey.js","sourceRoot":"","sources":["../../src/utils/pluginKey.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,SAAgB,YAAY,CAC1B,aAAwC,EACxC,UAA+C,EAC/C,QAAgB;IAEhB,IAAI,aAAa,EAAE;QACjB,OAAO,GAAG,aAAa,IAAI,QAAQ,EAAE,CAAC;KACvC;IACD,IAAI,UAAU,EAAE;QACd,qEAAqE;QACrE,OAAO,GAAG,UAAU,CAAC,MAAM,IAAI,QAAQ,EAAE,CAAC;KAC3C;IACD,OAAO,WAAW,QAAQ,EAAE,CAAC;AAC/B,CAAC;AAbD,oCAaC;AAEM,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,UAAkB,EAAU,EAAE;IACtE,OAAO,GAAG,MAAM,IAAI,UAAU,EAAE,CAAC;AACnC,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB"}
|