forked from mirrors/gecko-dev
Bug 1838440 - Migrate kinto-http-client to ES module r=Standard8,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181066
This commit is contained in:
parent
69a1947f9f
commit
712ef17f9e
10 changed files with 3073 additions and 2889 deletions
|
|
@ -200,7 +200,7 @@ remote/shared/messagehandler/test/browser/resources/modules/root/invalid.sys.mjs
|
||||||
# services/ exclusions
|
# services/ exclusions
|
||||||
|
|
||||||
# Third party services
|
# Third party services
|
||||||
services/common/kinto-http-client.js
|
services/common/kinto-http-client.sys.mjs
|
||||||
services/common/kinto-offline-client.js
|
services/common/kinto-offline-client.js
|
||||||
|
|
||||||
# Webpack-bundled library
|
# Webpack-bundled library
|
||||||
|
|
|
||||||
|
|
@ -1174,10 +1174,6 @@ remote/shared/messagehandler/test/browser/resources/modules/root/invalid.sys.mjs
|
||||||
|
|
||||||
# services/ exclusions
|
# services/ exclusions
|
||||||
|
|
||||||
# Third party services
|
|
||||||
services/common/kinto-http-client.js
|
|
||||||
services/common/kinto-offline-client.js
|
|
||||||
|
|
||||||
# Webpack-bundled library
|
# Webpack-bundled library
|
||||||
services/fxaccounts/FxAccountsPairingChannel.sys.mjs
|
services/fxaccounts/FxAccountsPairingChannel.sys.mjs
|
||||||
|
|
||||||
|
|
@ -1405,6 +1401,8 @@ security/manager/tools/log_list.json
|
||||||
security/nss/
|
security/nss/
|
||||||
security/sandbox/chromium/
|
security/sandbox/chromium/
|
||||||
security/sandbox/chromium-shim/
|
security/sandbox/chromium-shim/
|
||||||
|
services/common/kinto-http-client.sys.mjs
|
||||||
|
services/common/kinto-offline-client.js
|
||||||
testing/gtest/gmock/
|
testing/gtest/gmock/
|
||||||
testing/gtest/gtest/
|
testing/gtest/gtest/
|
||||||
testing/mochitest/MochiKit/
|
testing/mochitest/MochiKit/
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ const lazy = {};
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
Downloader: "resource://services-settings/Attachments.sys.mjs",
|
Downloader: "resource://services-settings/Attachments.sys.mjs",
|
||||||
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
|
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||||
|
KintoHttpClient: "resource://services-common/kinto-http-client.sys.mjs",
|
||||||
MacAttribution: "resource:///modules/MacAttribution.sys.mjs",
|
MacAttribution: "resource:///modules/MacAttribution.sys.mjs",
|
||||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||||
PanelTestProvider: "resource://activity-stream/lib/PanelTestProvider.sys.mjs",
|
PanelTestProvider: "resource://activity-stream/lib/PanelTestProvider.sys.mjs",
|
||||||
|
|
@ -41,7 +42,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
"resource://activity-stream/lib/ASRouterPreferences.jsm",
|
"resource://activity-stream/lib/ASRouterPreferences.jsm",
|
||||||
ASRouterTriggerListeners:
|
ASRouterTriggerListeners:
|
||||||
"resource://activity-stream/lib/ASRouterTriggerListeners.jsm",
|
"resource://activity-stream/lib/ASRouterTriggerListeners.jsm",
|
||||||
KintoHttpClient: "resource://services-common/kinto-http-client.js",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
3061
services/common/kinto-http-client.sys.mjs
Normal file
3061
services/common/kinto-http-client.sys.mjs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -2596,10 +2596,10 @@ var EXPORTED_SYMBOLS = ["Kinto"];
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
const { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||||
XPCOMUtils.defineLazyGlobalGetters(global, ["fetch", "indexedDB"]);
|
XPCOMUtils.defineLazyGlobalGetters(global, ["fetch", "indexedDB"]);
|
||||||
ChromeUtils.defineESModuleGetters(global, {
|
ChromeUtils.defineESModuleGetters(global, {
|
||||||
EventEmitter: "resource://gre/modules/EventEmitter.sys.mjs"
|
EventEmitter: "resource://gre/modules/EventEmitter.sys.mjs",
|
||||||
|
// Use standalone kinto-http module landed in FFx.
|
||||||
|
KintoHttpClient: "resource://services-common/kinto-http-client.sys.mjs"
|
||||||
});
|
});
|
||||||
// Use standalone kinto-http module landed in FFx.
|
|
||||||
ChromeUtils.defineModuleGetter(global, "KintoHttpClient", "resource://services-common/kinto-http-client.js");
|
|
||||||
XPCOMUtils.defineLazyGetter(global, "generateUUID", () => {
|
XPCOMUtils.defineLazyGetter(global, "generateUUID", () => {
|
||||||
const { generateUUID } = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
|
const { generateUUID } = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
|
||||||
return generateUUID;
|
return generateUUID;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ EXTRA_COMPONENTS += [
|
||||||
|
|
||||||
EXTRA_JS_MODULES["services-common"] += [
|
EXTRA_JS_MODULES["services-common"] += [
|
||||||
"async.sys.mjs",
|
"async.sys.mjs",
|
||||||
"kinto-http-client.js",
|
"kinto-http-client.sys.mjs",
|
||||||
"kinto-offline-client.js",
|
"kinto-offline-client.js",
|
||||||
"kinto-storage-adapter.sys.mjs",
|
"kinto-storage-adapter.sys.mjs",
|
||||||
"logmanager.sys.mjs",
|
"logmanager.sys.mjs",
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
"resource://gre/modules/components-utils/ClientEnvironment.sys.mjs",
|
"resource://gre/modules/components-utils/ClientEnvironment.sys.mjs",
|
||||||
Database: "resource://services-settings/Database.sys.mjs",
|
Database: "resource://services-settings/Database.sys.mjs",
|
||||||
IDBHelpers: "resource://services-settings/IDBHelpers.sys.mjs",
|
IDBHelpers: "resource://services-settings/IDBHelpers.sys.mjs",
|
||||||
|
KintoHttpClient: "resource://services-common/kinto-http-client.sys.mjs",
|
||||||
RemoteSettingsWorker:
|
RemoteSettingsWorker:
|
||||||
"resource://services-settings/RemoteSettingsWorker.sys.mjs",
|
"resource://services-settings/RemoteSettingsWorker.sys.mjs",
|
||||||
SharedUtils: "resource://services-settings/SharedUtils.sys.mjs",
|
SharedUtils: "resource://services-settings/SharedUtils.sys.mjs",
|
||||||
|
|
@ -22,7 +23,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
KintoHttpClient: "resource://services-common/kinto-http-client.js",
|
|
||||||
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
|
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,12 +42,12 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
CryptoUtils: "resource://services-crypto/utils.sys.mjs",
|
CryptoUtils: "resource://services-crypto/utils.sys.mjs",
|
||||||
ExtensionCommon: "resource://gre/modules/ExtensionCommon.sys.mjs",
|
ExtensionCommon: "resource://gre/modules/ExtensionCommon.sys.mjs",
|
||||||
FirefoxAdapter: "resource://services-common/kinto-storage-adapter.sys.mjs",
|
FirefoxAdapter: "resource://services-common/kinto-storage-adapter.sys.mjs",
|
||||||
|
KintoHttpClient: "resource://services-common/kinto-http-client.sys.mjs",
|
||||||
Observers: "resource://services-common/observers.sys.mjs",
|
Observers: "resource://services-common/observers.sys.mjs",
|
||||||
Utils: "resource://services-sync/util.sys.mjs",
|
Utils: "resource://services-sync/util.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
KintoHttpClient: "resource://services-common/kinto-http-client.js",
|
|
||||||
Kinto: "resource://services-common/kinto-offline-client.js",
|
Kinto: "resource://services-common/kinto-offline-client.js",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,8 @@ security/manager/tools/log_list.json
|
||||||
security/nss/
|
security/nss/
|
||||||
security/sandbox/chromium/
|
security/sandbox/chromium/
|
||||||
security/sandbox/chromium-shim/
|
security/sandbox/chromium-shim/
|
||||||
|
services/common/kinto-http-client.sys.mjs
|
||||||
|
services/common/kinto-offline-client.js
|
||||||
testing/gtest/gmock/
|
testing/gtest/gmock/
|
||||||
testing/gtest/gtest/
|
testing/gtest/gtest/
|
||||||
testing/mochitest/MochiKit/
|
testing/mochitest/MochiKit/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue