Add support for using Google Firebase with your game (#1694)
* Use Firebase Analytics * Store your game configuration in Firebase Remote Config * Authentification, by email (or using providers like Google, Facebook **for browser games only**) * Report measures to the Remote performance measurer * Launch Firebase Functions * Use the online Database (Firestore) and the Realtime Database * Store data in the Online Filesystem.
@@ -1 +1,2 @@
|
||||
* @4ian
|
||||
* @4ian
|
||||
Extensions/Firebase @arthuro555
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* Firebase Tools Collection
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* A special array where push tries to reuse old unused indices.
|
||||
* Why? This is for storing UIDs. You can see this as a sort of memory optimization:
|
||||
* Each time an object is removed, it is replaced with null in the array.
|
||||
* Then a new object can reuse that emplacement when pushing, instead of adding an element
|
||||
* to the array. Technically the push function is not really pushing anymore,
|
||||
* but the name is kept to make it easier for new devs to use (almost same API as classic array).
|
||||
* @class
|
||||
*/
|
||||
gdjs.UIDArray = function () {
|
||||
/**
|
||||
* The internal array of UIDs.
|
||||
* @type {Array<any>}
|
||||
* @private
|
||||
*/
|
||||
this._array = [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds an object to the UIDs array and returns it's UID.
|
||||
* @param {any} item - The item to assign a UID to.
|
||||
* @returns {number} - The new UID of the object.
|
||||
*/
|
||||
gdjs.UIDArray.prototype.push = function (item) {
|
||||
for (let i in this._array) {
|
||||
if (this._array[i] === null) {
|
||||
this._array[i] = item;
|
||||
return parseInt(i);
|
||||
}
|
||||
}
|
||||
return this._array.push(item) - 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes an element from the UIDs array by UID.
|
||||
* @param {number} uid - The UID of the object to remove.
|
||||
*/
|
||||
gdjs.UIDArray.prototype.remove = function (uid) {
|
||||
if (uid >= this._array.length) return; // Don't pollute the array with unecessary nulls.
|
||||
this._array[uid] = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get an element from the UIDs array by UID.
|
||||
* @param {number} uid - The UID of the object to get.
|
||||
*/
|
||||
gdjs.UIDArray.prototype.get = function (uid) {
|
||||
if (uid >= this._array.length) return null; // Prevent out of range getting.
|
||||
return this._array[uid];
|
||||
};
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,4 @@
|
||||
This is a modified version of the firebase js sdk. Original can be found on https://github.com/firebase/firebase-js-sdk .
|
||||
The version used is 7.20.0.
|
||||
Changelist:
|
||||
Removed links to sourcemaps.
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Firebase Tools Collection
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Event Tools
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase = {};
|
||||
|
||||
/**
|
||||
* An array of callbacks to call when the app gets initialized.
|
||||
*/
|
||||
gdjs.evtTools.firebase.onAppCreated = [];
|
||||
|
||||
gdjs.registerFirstRuntimeSceneLoadedCallback(function (runtimeScene) {
|
||||
let firebaseConfig;
|
||||
try {
|
||||
firebaseConfig = JSON.parse(
|
||||
runtimeScene.getGame().getExtensionProperty('Firebase', 'FirebaseConfig')
|
||||
);
|
||||
} catch (e) {
|
||||
console.error('The Firebase configuration is invalid! Error: ' + e);
|
||||
return;
|
||||
}
|
||||
firebase.initializeApp(firebaseConfig);
|
||||
for (let func of gdjs.evtTools.firebase.onAppCreated) func();
|
||||
});
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* Firebase Tools Collection
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Analytics Tools
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.analytics = {};
|
||||
|
||||
/**
|
||||
* Logs an event/conversion for that user on the analytics.
|
||||
* @param {string} eventName The event being triggered.
|
||||
* @param {string | Object} [eventData] Additional data for the event.
|
||||
*/
|
||||
gdjs.evtTools.firebase.analytics.log = function (eventName, eventData) {
|
||||
let analytics = gdjs.evtTools.firebase.analytics._analyticsInstance;
|
||||
let eventProperties;
|
||||
if (eventData) {
|
||||
try {
|
||||
eventProperties = JSON.parse(eventData);
|
||||
} catch {
|
||||
eventProperties = { eventData: eventData };
|
||||
}
|
||||
}
|
||||
analytics.logEvent(eventName, eventProperties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the User ID (the name under wich the user will appear on the analytics).
|
||||
* Should be unique if possible.
|
||||
* @param {string | number} newUID The new User ID.
|
||||
*/
|
||||
gdjs.evtTools.firebase.analytics.setUserID = function (newUID) {
|
||||
let analytics = gdjs.evtTools.firebase.analytics._analyticsInstance;
|
||||
analytics.setUserId(newUID);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set an user's property.
|
||||
* @param {string} propertyName The property's name.
|
||||
* @param {string | Object} [propertyData] The data associated to the property.
|
||||
*/
|
||||
gdjs.evtTools.firebase.analytics.setProperty = function (
|
||||
propertyName,
|
||||
propertyData
|
||||
) {
|
||||
let analytics = gdjs.evtTools.firebase.analytics._analyticsInstance;
|
||||
let properties = {};
|
||||
try {
|
||||
properties[propertyName] = JSON.parse(propertyData);
|
||||
} catch {
|
||||
properties[propertyName] = propertyData;
|
||||
}
|
||||
analytics.setUserProperties(properties);
|
||||
};
|
||||
|
||||
// Initialization step required by firebase analytics
|
||||
gdjs.registerFirstRuntimeSceneLoadedCallback(function () {
|
||||
gdjs.evtTools.firebase.analytics._analyticsInstance = firebase.analytics();
|
||||
});
|
||||
|
||||
// Callback for setting the analytics current view to the current scene.
|
||||
gdjs.registerRuntimeSceneLoadedCallback(function (runtimeScene) {
|
||||
if (gdjs.evtTools.firebase.analytics._analyticsInstance)
|
||||
gdjs.evtTools.firebase.analytics._analyticsInstance.setCurrentScreen(
|
||||
runtimeScene.getName()
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,463 @@
|
||||
/**
|
||||
* Firebase Tools Collection.
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Authentication Event Tools.
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth = {
|
||||
/**
|
||||
* Table of available external providers.
|
||||
*/
|
||||
providersList: {
|
||||
google: firebase.auth.GoogleAuthProvider,
|
||||
facebook: firebase.auth.FacebookAuthProvider,
|
||||
github: firebase.auth.GithubAuthProvider,
|
||||
twitter: firebase.auth.TwitterAuthProvider,
|
||||
},
|
||||
|
||||
/**
|
||||
* The current authentication status.
|
||||
* @type {boolean}
|
||||
*/
|
||||
authentified: false,
|
||||
|
||||
/**
|
||||
* The logged-in users data.
|
||||
* @type {firebase.User}
|
||||
*/
|
||||
currentUser: null,
|
||||
|
||||
/**
|
||||
* The actual current token.
|
||||
* @type {string}
|
||||
* @private
|
||||
*/
|
||||
_token: '',
|
||||
|
||||
/**
|
||||
* The current auth provider for reauthenticating.
|
||||
* @type {firebase.auth.AuthProvider}
|
||||
* @private
|
||||
*/
|
||||
_currentProvider: null,
|
||||
};
|
||||
|
||||
/**
|
||||
* A namespace containing tools for managing the current user.
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth.userManagement = {
|
||||
/**
|
||||
* Contains dangerous management functions. Requires reauthentication before usage.
|
||||
* @namespace
|
||||
*/
|
||||
dangerous: {
|
||||
/**
|
||||
* Changes the users email.
|
||||
* Use this when using basic auth.
|
||||
* @param {string} oldEmail - Old email for reauthentication.
|
||||
* @param {string} password - Old password for reauthentication.
|
||||
* @param {string} newEmail - New email for the user.
|
||||
* @param {boolean} [sendVerificationEmail] - Send a verification email to the old address before changing the email?
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
changeEmail(
|
||||
oldEmail,
|
||||
password,
|
||||
newEmail,
|
||||
sendVerificationEmail,
|
||||
callbackStateVariable
|
||||
) {
|
||||
sendVerificationEmail = sendVerificationEmail || true;
|
||||
|
||||
let credential = firebase.auth.EmailAuthProvider.credential(
|
||||
oldEmail,
|
||||
password
|
||||
);
|
||||
let updater = sendVerificationEmail
|
||||
? gdjs.evtTools.firebase.auth.currentUser.updateEmail
|
||||
: gdjs.evtTools.firebase.auth.currentUser.verifyBeforeUpdateEmail;
|
||||
|
||||
gdjs.evtTools.firebase.auth.currentUser
|
||||
.reauthenticateWithCredential(credential)
|
||||
.then(() => updater(newEmail))
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the users password.
|
||||
* Use this when using basic auth.
|
||||
* @param {string} email - Old email for reauthentication.
|
||||
* @param {string} oldPassword - Old password for reauthentication.
|
||||
* @param {string} newPassword - New password for the user.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
changePassword(email, oldPassword, newPassword, callbackStateVariable) {
|
||||
let credential = firebase.auth.EmailAuthProvider.credential(
|
||||
email,
|
||||
oldPassword
|
||||
);
|
||||
gdjs.evtTools.firebase.auth.currentUser
|
||||
.reauthenticateWithCredential(credential)
|
||||
.then(() =>
|
||||
gdjs.evtTools.firebase.auth.currentUser.updatePassword(newPassword)
|
||||
)
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Deletes the current user.
|
||||
* Use this when using basic auth.
|
||||
* @param {string} email - Old email for reauthentication.
|
||||
* @param {string} password - Old password for reauthentication.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
deleteUser(email, password, callbackStateVariable) {
|
||||
let credential = firebase.auth.EmailAuthProvider.credential(
|
||||
email,
|
||||
password
|
||||
);
|
||||
gdjs.evtTools.firebase.auth.currentUser
|
||||
.reauthenticateWithCredential(credential)
|
||||
.then(() => gdjs.evtTools.firebase.auth.currentUser.delete())
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the users email.
|
||||
* Use this when using an external provider.
|
||||
* @param {string} newEmail - New email for the user.
|
||||
* @param {boolean} sendVerificationEmail - Send a verification email to the old address before changing the email?
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
changeEmailProvider(
|
||||
newEmail,
|
||||
sendVerificationEmail,
|
||||
callbackStateVariable
|
||||
) {
|
||||
let updater = sendVerificationEmail
|
||||
? gdjs.evtTools.firebase.auth.currentUser.updateEmail
|
||||
: gdjs.evtTools.firebase.auth.currentUser.verifyBeforeUpdateEmail;
|
||||
|
||||
gdjs.evtTools.firebase.auth.currentUser
|
||||
.reauthenticateWithPopup(gdjs.evtTools.firebase.auth._currentProvider)
|
||||
.then(() => updater(newEmail))
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the users password.
|
||||
* Use this when using an external provider.
|
||||
* @param {string} newPassword - New password for the user.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
changePasswordProvider(newPassword, callbackStateVariable) {
|
||||
gdjs.evtTools.firebase.auth.currentUser
|
||||
.reauthenticateWithPopup(gdjs.evtTools.firebase.auth._currentProvider)
|
||||
.then(() =>
|
||||
gdjs.evtTools.firebase.auth.currentUser.updatePassword(newPassword)
|
||||
)
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Deletes the current user.
|
||||
* Use this when using an external provider.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
deleteUserProvider(callbackStateVariable) {
|
||||
gdjs.evtTools.firebase.auth.currentUser
|
||||
.reauthenticateWithPopup(gdjs.evtTools.firebase.auth._currentProvider)
|
||||
.then(() => gdjs.evtTools.firebase.auth.currentUser.delete())
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Verifies if the current users email is verified.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isEmailVerified() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.emailVerified;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the users email address.
|
||||
* @returns {string}
|
||||
*/
|
||||
getEmail() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.email || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the creation date of the logged in users account.
|
||||
* @returns {string}
|
||||
*/
|
||||
getCreationTime() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.metadata.creationTime || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the last login date of the logged in users account.
|
||||
* @returns {string}
|
||||
*/
|
||||
getLastLoginTime() {
|
||||
return (
|
||||
gdjs.evtTools.firebase.auth.currentUser.metadata.lastSignInTime || ''
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the display name of the current user.
|
||||
* @returns {string}
|
||||
*/
|
||||
getDisplayName() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.displayName || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the current users phone number.
|
||||
* @returns {string}
|
||||
*/
|
||||
getPhoneNumber() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.phoneNumber || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the current users Unique IDentifier.
|
||||
* @returns {string}
|
||||
*/
|
||||
getUID() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.uid || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the tenant ID.
|
||||
* For advanced usage only.
|
||||
* @returns {string}
|
||||
*/
|
||||
getTenantID() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.tenantId || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the refresh token.
|
||||
* For advanced usage only.
|
||||
* @returns {string}
|
||||
*/
|
||||
getRefreshToken() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.refreshToken || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the users profile picture URL.
|
||||
* @returns {string}
|
||||
*/
|
||||
getPhotoURL() {
|
||||
return gdjs.evtTools.firebase.auth.currentUser.photoURL || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the display name of an user.
|
||||
* @param {string} newDisplayName
|
||||
*/
|
||||
setDisplayName(newDisplayName) {
|
||||
gdjs.evtTools.firebase.auth.currentUser.updateProfile({
|
||||
displayName: newDisplayName,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the URL to the profile picture of the user.
|
||||
* @param {string} newDisplayName
|
||||
*/
|
||||
setPhotoURL(newPhotoURL) {
|
||||
gdjs.evtTools.firebase.auth.currentUser.updateProfile({
|
||||
photoURL: newPhotoURL,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Send an email to the users email adress to verify it.
|
||||
* @note Even though this function is redundant, we keep it for consistency.
|
||||
* @see gdjs.evtTools.firebase.auth.currentUser.sendEmailVerification
|
||||
*/
|
||||
sendVerificationEmail() {
|
||||
gdjs.evtTools.firebase.auth.currentUser.sendEmailVerification();
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the logged-in users authentication token.
|
||||
* Tries to refresh it everytime the function is called.
|
||||
* @returns {string}
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth.token = function () {
|
||||
this.currentUser
|
||||
.getIdToken()
|
||||
.then((token) => (gdjs.evtTools.firebase.auth._token = token));
|
||||
return this._token;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the user is currently authentified.
|
||||
* @returns {boolean}
|
||||
* @see gdjs.evtTools.firebase.auth.authentified
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth.isAuthentified = function () {
|
||||
return gdjs.evtTools.firebase.auth.authentified;
|
||||
};
|
||||
|
||||
/**
|
||||
* Signs the user in with basic email-password authentication.
|
||||
* @param {string} email - The users email.
|
||||
* @param {string} password - The users password.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth.signInWithEmail = function (
|
||||
email,
|
||||
password,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.auth()
|
||||
.signInWithEmailAndPassword(email, password)
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an account with basic email-password authentication.
|
||||
* @param {string} email - The users email.
|
||||
* @param {string} password - The users password.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth.createAccountWithEmail = function (
|
||||
email,
|
||||
password,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.auth()
|
||||
.createUserWithEmailAndPassword(email, password)
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Login with a temporary account.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth.anonymSignIn = function (callbackStateVariable) {
|
||||
firebase
|
||||
.auth()
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Signs the user in with an external provider.
|
||||
* Only works on the web, NOT on Electron/Cordova.
|
||||
* @param {"google" | "facebook" | "github" | "twitter"} providerName - The external provider to use.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.auth.signInWithProvider = function (
|
||||
providerName,
|
||||
callbackStateVariable
|
||||
) {
|
||||
let providerCtor = gdjs.evtTools.firebase.auth.providersList[providerName];
|
||||
gdjs.evtTools.firebase.auth._currentProvider = new providerCtor();
|
||||
|
||||
firebase
|
||||
.auth()
|
||||
.signInWithPopup(gdjs.evtTools.firebase.auth._currentProvider)
|
||||
.then(() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
// Listen to authentication state changes to regenerate tokens and keep the user and the authenticated state up to date
|
||||
gdjs.evtTools.firebase.onAppCreated.push(function () {
|
||||
firebase.auth().onAuthStateChanged(function (user) {
|
||||
if (user) {
|
||||
gdjs.evtTools.firebase.auth.authentified = true;
|
||||
gdjs.evtTools.firebase.auth.currentUser = user;
|
||||
user
|
||||
.getIdToken()
|
||||
.then((token) => (gdjs.evtTools.firebase.auth._token = token)); // Pregenerate the token
|
||||
} else {
|
||||
gdjs.evtTools.firebase.auth.authentified = false;
|
||||
gdjs.evtTools.firebase.auth.currentUser = null;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,352 @@
|
||||
/**
|
||||
* Firebase Tools Collection.
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Cloud Firestore Event Tools.
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore = {};
|
||||
|
||||
/**
|
||||
* Writes a variable in a collection as document.
|
||||
* @param {string} collectionName - The collection where to store the variable.
|
||||
* @param {string} variableName - The name under wich the variable will be saved (document name).
|
||||
* @param {gdjs.Variable} variable - The variable to write.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.writeDocument = function (
|
||||
collectionName,
|
||||
variableName,
|
||||
variable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(variableName)
|
||||
.set(JSON.parse(gdjs.evtTools.network.variableStructureToJSON(variable)))
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Writes a field of a document.
|
||||
* @param {string} collectionName - The collection where to store the document.
|
||||
* @param {string} documentName - The name of the document where to write a field.
|
||||
* @param {string} field - The field where to write.
|
||||
* @param {string | number} value - The value to write.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
* @param {boolean} [merge] - Should the new field replace the document or be merged with the document?
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.writeField = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
field,
|
||||
value,
|
||||
callbackStateVariable,
|
||||
merge
|
||||
) {
|
||||
merge = merge == undefined ? true : merge;
|
||||
const updateObject = {};
|
||||
updateObject[field] = value;
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.set(updateObject, { merge: merge })
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates a variable/document.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} variableName - The name under wich the variable will be saved (document name).
|
||||
* @param {gdjs.Variable} variable - The variable to update.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.updateDocument = function (
|
||||
collectionName,
|
||||
variableName,
|
||||
variable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(variableName)
|
||||
.update(JSON.parse(gdjs.evtTools.network.variableStructureToJSON(variable)))
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates a field of a document.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} documentName - The name of the document where to update a field.
|
||||
* @param {string} field - The field where to update.
|
||||
* @param {string | number} value - The value to write.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.updateField = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
field,
|
||||
value,
|
||||
callbackStateVariable
|
||||
) {
|
||||
const updateObject = {};
|
||||
updateObject[field] = value;
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.update(updateObject)
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Deletes a document.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} documentName - The name of the document to delete.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.deleteDocument = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.delete()
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Deletes a field of a document.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} documentName - The name of the document where to delete a field.
|
||||
* @param {string} field - The field to delete.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.deleteField = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
field,
|
||||
callbackStateVariable
|
||||
) {
|
||||
const updateObject = {};
|
||||
updateObject[field] = firebase.firestore.FieldValue.delete();
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.update(updateObject)
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets a document and store it in a variable.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} documentName - The name of the document to get.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.getDocument = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.get()
|
||||
.then(function (doc) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (callbackValueVariable)
|
||||
gdjs.evtTools.network._objectToVariable(
|
||||
doc.data(),
|
||||
callbackValueVariable
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets a field of a document and store it in a variable.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} documentName - The name of the document.
|
||||
* @param {string} field - The field to get.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.getField = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
field,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.get()
|
||||
.then(function (doc) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (callbackValueVariable)
|
||||
gdjs.evtTools.network._objectToVariable(
|
||||
doc.get(field),
|
||||
callbackValueVariable
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks for existence of a document.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} documentName - The name of the document to check.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.hasDocument = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.get()
|
||||
.then(function (doc) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (callbackValueVariable)
|
||||
callbackValueVariable.setString(doc.exists ? 'true' : 'false');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks for existence of a field.
|
||||
* @param {string} collectionName - The collection where the document is stored.
|
||||
* @param {string} documentName - The name of the document.
|
||||
* @param {string} field - The field to check.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.hasField = function (
|
||||
collectionName,
|
||||
documentName,
|
||||
field,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.doc(documentName)
|
||||
.get()
|
||||
.then(function (doc) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (callbackValueVariable)
|
||||
callbackValueVariable.setString(
|
||||
doc.get(field) === undefined ? 'false' : 'true'
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Lists all the documents in a collection.
|
||||
* @param {string} collectionName - The collection where to count documents.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.firestore.listDocuments = function (
|
||||
collectionName,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.firestore()
|
||||
.collection(collectionName)
|
||||
.get()
|
||||
.then(function (snapshot) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(snapshot.empty ? 'empty' : 'ok');
|
||||
if (callbackValueVariable)
|
||||
gdjs.evtTools.network._objectToVariable(
|
||||
snapshot.docs.map((doc) => doc.id),
|
||||
callbackValueVariable
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,294 @@
|
||||
/**
|
||||
* Firebase Tools Collection.
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Cloud database Event Tools.
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.database = {};
|
||||
|
||||
/**
|
||||
* (Over)writes a variable in a collection as database variable.
|
||||
* @param {string} path - The path where to store the variable.
|
||||
* @param {gdjs.Variable} variable - The variable to write.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.writeVariable = function (
|
||||
path,
|
||||
variable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.set(JSON.parse(gdjs.evtTools.network.variableStructureToJSON(variable)))
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* (Over)writes a field of a database variable.
|
||||
* @param {string} path - The path where to write the field.
|
||||
* @param {string} field - What field to write.
|
||||
* @param {string | number} value - The value to write.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
* @param {boolean} [merge] - Should the new field replace the document or be merged with the document?
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.writeField = function (
|
||||
path,
|
||||
field,
|
||||
value,
|
||||
callbackStateVariable
|
||||
) {
|
||||
const newObject = {};
|
||||
newObject[field] = value;
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.set(newObject)
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates a database variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {gdjs.Variable} variable - The variable to update.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.updateVariable = function (
|
||||
path,
|
||||
variable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.update(JSON.parse(gdjs.evtTools.network.variableStructureToJSON(variable)))
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates a field of a database variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {string} field - The field where to update.
|
||||
* @param {string | number} value - The value to write.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.updateField = function (
|
||||
path,
|
||||
field,
|
||||
value,
|
||||
callbackStateVariable
|
||||
) {
|
||||
const updateObject = {};
|
||||
updateObject[field] = value;
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.update(updateObject)
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Deletes a database variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.deleteVariable = function (
|
||||
path,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.remove()
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Deletes a field of a database variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {string} field - The field to delete.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store the result.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.deleteField = function (
|
||||
path,
|
||||
field,
|
||||
callbackStateVariable
|
||||
) {
|
||||
const updateObject = {};
|
||||
updateObject[field] = null;
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.update(updateObject)
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets a database variable and store it in a variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {gdjs.Variable} callbackValueVariable - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.getVariable = function (
|
||||
path,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.once('value')
|
||||
.then(function (snapshot) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (typeof callbackValueVariable !== 'undefined')
|
||||
gdjs.evtTools.network._objectToVariable(
|
||||
snapshot.val(),
|
||||
callbackValueVariable
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets a field of a database variable and store it in a variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {string} field - The field to get.
|
||||
* @param {gdjs.Variable} callbackValueVariable - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.getField = function (
|
||||
path,
|
||||
field,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.once('value')
|
||||
.then(function (snapshot) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (typeof callbackValueVariable !== 'undefined')
|
||||
gdjs.evtTools.network._objectToVariable(
|
||||
snapshot.val()[field],
|
||||
callbackValueVariable
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks for existence of a database variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {gdjs.Variable} callbackValueVariable - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.hasVariable = function (
|
||||
path,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.once('value')
|
||||
.then(function (snapshot) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (typeof callbackValueVariable !== 'undefined')
|
||||
callbackValueVariable.setString(
|
||||
snapshot.exists() && snapshot.val() !== null ? 'true' : 'false'
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks for existence of a database variable.
|
||||
* @param {string} path - The name under wich the variable will be saved (document name).
|
||||
* @param {string} field - The field to check.
|
||||
* @param {gdjs.Variable} callbackValueVariable - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.database.hasField = function (
|
||||
path,
|
||||
field,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.database()
|
||||
.ref(path)
|
||||
.once('value')
|
||||
.then(function (snapshot) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (typeof callbackValueVariable !== 'undefined')
|
||||
callbackValueVariable.setString(
|
||||
snapshot.val() == null || snapshot.val()[field] == null
|
||||
? 'false'
|
||||
: 'true'
|
||||
);
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* Firebase Tools Collection.
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Functions Event Tools.
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.functions = {
|
||||
/**
|
||||
* Call an http function.
|
||||
* @param {string} httpFunctionName - The name of the function to call
|
||||
* @param {string | Object} [parameters] - Parameters for the function either as a JS object or a string.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
call(
|
||||
httpFunctionName,
|
||||
parameters,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
let param;
|
||||
try {
|
||||
param = JSON.parse(parameters);
|
||||
} catch {
|
||||
param = parameters;
|
||||
}
|
||||
|
||||
firebase
|
||||
.functions()
|
||||
.httpsCallable(httpFunctionName)(param)
|
||||
.then((response) => response.data)
|
||||
.then((data) => {
|
||||
if (callbackValueVariable)
|
||||
gdjs.evtTools.network._objectToVariable(data, callbackValueVariable);
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch((error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Firebase Tools Collection.
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Performance Event Tools.
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.performance = {
|
||||
/** @type {Object.<string, firebase.performance.Trace>} */
|
||||
tracers: {},
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a tracer (custom event) by name, if it doesn't exists create it.
|
||||
* @param {string} tracerName - The name of the tracer.
|
||||
* @returns {firebase.performance.Trace} The tracer instance.
|
||||
*/
|
||||
gdjs.evtTools.firebase.performance.getTracer = function (tracerName) {
|
||||
if (!gdjs.evtTools.firebase.performance.tracers.hasOwnProperty(tracerName)) {
|
||||
gdjs.evtTools.firebase.performance.tracers[
|
||||
tracerName
|
||||
] = firebase.performance().trace(tracerName);
|
||||
}
|
||||
return gdjs.evtTools.firebase.performance.tracers[tracerName];
|
||||
};
|
||||
|
||||
/**
|
||||
* Start measuring performance for a custom event (tracer).
|
||||
* @param {string} tracerName - The name of the tracer.
|
||||
*/
|
||||
gdjs.evtTools.firebase.performance.startTracer = function (tracerName) {
|
||||
gdjs.evtTools.firebase.performance.getTracer(tracerName).start();
|
||||
};
|
||||
|
||||
/**
|
||||
* Stop measuring performance for a custom event (tracer).
|
||||
* @param {string} tracerName - The name of the tracer.
|
||||
*/
|
||||
gdjs.evtTools.firebase.performance.stopTracer = function (tracerName) {
|
||||
gdjs.evtTools.firebase.performance.getTracer(tracerName).stop();
|
||||
delete gdjs.evtTools.firebase.performance.tracers[tracerName];
|
||||
};
|
||||
|
||||
/**
|
||||
* Record performance for a specific time.
|
||||
* @param {string} tracerName - The name of the tracer.
|
||||
* @param {number} delay - The delay before starting measuring.
|
||||
* @param {number} duration - The duration of the measuring.
|
||||
*/
|
||||
gdjs.evtTools.firebase.performance.recordPerformance = function (
|
||||
tracerName,
|
||||
delay,
|
||||
duration
|
||||
) {
|
||||
let currentTimeSinceEpoch = Date.now();
|
||||
gdjs.evtTools.firebase.performance
|
||||
.getTracer(tracerName)
|
||||
.record(currentTimeSinceEpoch + delay, duration);
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Firebase Tools Collection
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Remote Config Tools
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.remoteConfig = {};
|
||||
|
||||
/**
|
||||
* Set the interval between auto-config updates.
|
||||
*/
|
||||
gdjs.evtTools.firebase.remoteConfig.setAutoUpdateInterval = function (
|
||||
interval
|
||||
) {
|
||||
firebase.remoteConfig().settings.minimumFetchIntervalMillis = interval;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the default configuration, for when starting the game offline.
|
||||
* @param {gdjs.Variable} variable - A structure defining the default variables.
|
||||
*/
|
||||
gdjs.evtTools.firebase.remoteConfig.setDefaultConfig = function (variable) {
|
||||
firebase.remoteConfig().defaultConfig = JSON.parse(
|
||||
gdjs.evtTools.network.variableStructureToJSON(variable)
|
||||
);
|
||||
};
|
||||
|
||||
gdjs.evtTools.firebase.onAppCreated.push(function () {
|
||||
// Synchronisation seems to be impossible when that value isn't preset.
|
||||
firebase.remoteConfig().settings.minimumFetchIntervalMillis = -1;
|
||||
});
|
||||
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* Firebase Tools Collection
|
||||
* @fileoverview
|
||||
* @author arthuro555
|
||||
*/
|
||||
|
||||
/**
|
||||
* Firebase Storage Event Tools
|
||||
* @namespace
|
||||
*/
|
||||
gdjs.evtTools.firebase.storage = {
|
||||
uploads: new gdjs.UIDArray(),
|
||||
};
|
||||
|
||||
/**
|
||||
* Uploads a file as string to the firebase storage bucket.
|
||||
* @param {string} file - The entire file as string.
|
||||
* @param {string} onlinePath - The path under wich the file will be accessible on the bucket.
|
||||
* @param {"none"|"base64"|"base64url"|"data_url"} [type] - The type/format of the string to upload.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result (url to the file).
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
* @param {gdjs.Variable} [callbackUIDVariable] - The variable where to store the upload ID.
|
||||
* @param {gdjs.Variable} [callbackProgressVariable] - The variable where to store the progress.
|
||||
*/
|
||||
gdjs.evtTools.firebase.storage.upload = function (
|
||||
file,
|
||||
onlinePath,
|
||||
type,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable,
|
||||
callbackUIDVariable,
|
||||
callbackProgressVariable
|
||||
) {
|
||||
type = type === 'none' ? undefined : type;
|
||||
|
||||
let uploadTask;
|
||||
try {
|
||||
uploadTask = firebase
|
||||
.storage()
|
||||
.ref()
|
||||
.child(onlinePath)
|
||||
.putString(file, type);
|
||||
} catch (e) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(e.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let uploadID;
|
||||
if (typeof callbackUIDVariable !== 'undefined') {
|
||||
// Only bother pushing if the ID will be stored.
|
||||
uploadID = gdjs.evtTools.firebase.storage.uploads.push(uploadTask);
|
||||
callbackUIDVariable.setNumber(uploadID);
|
||||
}
|
||||
|
||||
uploadTask.on(
|
||||
firebase.storage.TaskEvent.STATE_CHANGED,
|
||||
(uploadProgress) => {
|
||||
if (typeof callbackProgressVariable !== 'undefined')
|
||||
gdjs.evtTools.network._objectToVariable(
|
||||
uploadProgress,
|
||||
callbackProgressVariable,
|
||||
['tasks'] // Remove circular reference.
|
||||
);
|
||||
},
|
||||
(error) => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
},
|
||||
() => {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
if (typeof callbackUIDVariable !== 'undefined') {
|
||||
gdjs.evtTools.firebase.storage.uploads.remove(uploadID); // Free memory.
|
||||
}
|
||||
uploadTask.snapshot.ref.getDownloadURL().then(function (downloadURL) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(downloadURL);
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Generate a download URL for a file.
|
||||
* @param {string} filePath - The path in the remote storage bucket to the file to download.
|
||||
* @param {gdjs.Variable} [callbackValueVariable] - The variable where to store the result.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.storage.getDownloadURL = function (
|
||||
filePath,
|
||||
callbackValueVariable,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.storage()
|
||||
.ref()
|
||||
.child(filePath)
|
||||
.getDownloadURL()
|
||||
.then(function (downloadURL) {
|
||||
if (typeof callbackValueVariable !== 'undefined')
|
||||
callbackValueVariable.setString(downloadURL);
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Deletes a file on the remote storage bucket.
|
||||
* @param {string} filePath - The path in the remote storage bucket to the file to download.
|
||||
* @param {gdjs.Variable} [callbackStateVariable] - The variable where to store if the operation was successful.
|
||||
*/
|
||||
gdjs.evtTools.firebase.storage.delete = function (
|
||||
filePath,
|
||||
callbackStateVariable
|
||||
) {
|
||||
firebase
|
||||
.storage()
|
||||
.ref()
|
||||
.child(filePath)
|
||||
.delete()
|
||||
.then(function () {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString('ok');
|
||||
})
|
||||
.catch(function (error) {
|
||||
if (typeof callbackStateVariable !== 'undefined')
|
||||
callbackStateVariable.setString(error.message);
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
# Firebase Extension
|
||||
|
||||
This is the wrapper for the Firebase SDK for GDevelop.
|
||||
The files are prefixed with A_, B_, C_ and D_ to classify their import priority (where A has the highest and D the lowest).
|
||||
|
||||
firebasejs contains the Web SDK.
|
||||
firebasetools contains wrappers for GDevelop.
|
||||
@@ -149,11 +149,17 @@ gdjs.evtTools.network.objectVariableStructureToJSON = function (
|
||||
};
|
||||
|
||||
gdjs.evtTools.network._objectToVariable = function (obj, variable) {
|
||||
if (!isNaN(obj)) {
|
||||
//Number
|
||||
if (obj === null) {
|
||||
variable.setString("null");
|
||||
} else if ((typeof obj === "number" || typeof obj === "string") && !isNaN(obj)) {
|
||||
variable.setNumber(obj);
|
||||
} else if (typeof obj == 'string' || obj instanceof String) {
|
||||
} else if (typeof obj === 'string' || obj instanceof String) {
|
||||
variable.setString(obj);
|
||||
} else if (typeof obj === "undefined") {
|
||||
// Do not modify the variable, as there is no value to set it to.
|
||||
} else if (typeof obj === "boolean") {
|
||||
// Convert boolean to string.
|
||||
variable.setString("" + obj);
|
||||
} else if (Array.isArray(obj)) {
|
||||
for (var i = 0; i < obj.length; ++i) {
|
||||
gdjs.evtTools.network._objectToVariable(
|
||||
@@ -161,12 +167,25 @@ gdjs.evtTools.network._objectToVariable = function (obj, variable) {
|
||||
variable.getChild(i.toString())
|
||||
);
|
||||
}
|
||||
} else {
|
||||
} else if (typeof obj === "object") {
|
||||
for (var p in obj) {
|
||||
if (obj.hasOwnProperty(p)) {
|
||||
gdjs.evtTools.network._objectToVariable(obj[p], variable.getChild(p));
|
||||
}
|
||||
}
|
||||
} else if (typeof obj === "symbol") {
|
||||
variable.setString(obj.toString());
|
||||
} else if (typeof obj === "number" && isNaN(obj)) {
|
||||
console.warning("Variables cannot be set to NaN, setting it to 0.")
|
||||
variable.setNumber(0);
|
||||
} else if (typeof obj === "bigint") {
|
||||
if(obj > Number.MAX_SAFE_INTEGER)
|
||||
console.warn("Integers bigger than " + Number.MAX_SAFE_INTEGER + " aren't supported by variables, it will be reduced to that size.");
|
||||
variable.setNumber(parseInt(obj, 10));
|
||||
} else if (typeof obj === "function") {
|
||||
console.error("Error: Impossible to set variable value to a function.")
|
||||
} else {
|
||||
console.error("Cannot identify type of object:", obj);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
@@ -76,7 +76,7 @@
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=",
|
||||
"dev": true
|
||||
},
|
||||
"acorn": {
|
||||
@@ -138,7 +138,7 @@
|
||||
"anymatch": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
|
||||
"integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
|
||||
"integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"micromatch": "^3.1.4",
|
||||
@@ -160,7 +160,7 @@
|
||||
"braces": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
|
||||
"integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
|
||||
"integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-flatten": "^1.1.0",
|
||||
@@ -273,7 +273,7 @@
|
||||
"kind-of": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
|
||||
"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
|
||||
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -281,7 +281,7 @@
|
||||
"extglob": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
|
||||
"integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
|
||||
"integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-unique": "^0.3.2",
|
||||
@@ -340,7 +340,7 @@
|
||||
"is-accessor-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
|
||||
"integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -349,7 +349,7 @@
|
||||
"is-data-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
|
||||
"integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -358,7 +358,7 @@
|
||||
"is-descriptor": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
|
||||
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
|
||||
"integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-accessor-descriptor": "^1.0.0",
|
||||
@@ -401,7 +401,7 @@
|
||||
"micromatch": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
|
||||
"integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
|
||||
"integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-diff": "^4.0.0",
|
||||
@@ -433,7 +433,7 @@
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
@@ -525,7 +525,7 @@
|
||||
"arr-flatten": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
|
||||
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
|
||||
"integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=",
|
||||
"dev": true
|
||||
},
|
||||
"arr-union": {
|
||||
@@ -579,7 +579,7 @@
|
||||
"astral-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
|
||||
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
|
||||
"integrity": "sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=",
|
||||
"dev": true
|
||||
},
|
||||
"async": {
|
||||
@@ -603,7 +603,7 @@
|
||||
"atob": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
||||
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
|
||||
"integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=",
|
||||
"dev": true
|
||||
},
|
||||
"aws-sign2": {
|
||||
@@ -632,7 +632,7 @@
|
||||
"babel-core": {
|
||||
"version": "6.26.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
|
||||
"integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
|
||||
"integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.26.0",
|
||||
@@ -667,7 +667,7 @@
|
||||
"babel-generator": {
|
||||
"version": "6.26.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
|
||||
"integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
|
||||
"integrity": "sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-messages": "^6.23.0",
|
||||
@@ -864,7 +864,7 @@
|
||||
"babylon": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
|
||||
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
|
||||
"integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=",
|
||||
"dev": true
|
||||
},
|
||||
"balanced-match": {
|
||||
@@ -876,7 +876,7 @@
|
||||
"base": {
|
||||
"version": "0.11.2",
|
||||
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
|
||||
"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
|
||||
"integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cache-base": "^1.0.1",
|
||||
@@ -900,7 +900,7 @@
|
||||
"is-accessor-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
|
||||
"integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -909,7 +909,7 @@
|
||||
"is-data-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
|
||||
"integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -918,7 +918,7 @@
|
||||
"is-descriptor": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
|
||||
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
|
||||
"integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-accessor-descriptor": "^1.0.0",
|
||||
@@ -1014,7 +1014,7 @@
|
||||
"browser-resolve": {
|
||||
"version": "1.11.3",
|
||||
"resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz",
|
||||
"integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==",
|
||||
"integrity": "sha1-m3y7PQ9RDky4a9vXlhJNKLWJCvY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"resolve": "1.1.7"
|
||||
@@ -1047,7 +1047,7 @@
|
||||
"buffer-from": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||
"integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=",
|
||||
"dev": true
|
||||
},
|
||||
"builtin-modules": {
|
||||
@@ -1059,7 +1059,7 @@
|
||||
"cache-base": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
|
||||
"integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
|
||||
"integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"collection-visit": "^1.0.0",
|
||||
@@ -1258,7 +1258,7 @@
|
||||
"class-utils": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
|
||||
"integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
|
||||
"integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-union": "^3.1.0",
|
||||
@@ -1338,7 +1338,7 @@
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
@@ -1593,7 +1593,7 @@
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
@@ -1646,7 +1646,7 @@
|
||||
"define-property": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
|
||||
"integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
|
||||
"integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-descriptor": "^1.0.2",
|
||||
@@ -1656,7 +1656,7 @@
|
||||
"is-accessor-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
|
||||
"integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -1665,7 +1665,7 @@
|
||||
"is-data-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
|
||||
"integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -1674,7 +1674,7 @@
|
||||
"is-descriptor": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
|
||||
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
|
||||
"integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-accessor-descriptor": "^1.0.0",
|
||||
@@ -1756,7 +1756,7 @@
|
||||
"domexception": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
|
||||
"integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
|
||||
"integrity": "sha1-k3RCZEymoxJh7zbj7Gd/6AVYLJA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"webidl-conversions": "^4.0.2"
|
||||
@@ -1885,7 +1885,7 @@
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
@@ -1918,7 +1918,7 @@
|
||||
"exec-sh": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz",
|
||||
"integrity": "sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw==",
|
||||
"integrity": "sha1-Kl5//L19C6J1W97LFuWkJ9+97DY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"merge": "^1.2.0"
|
||||
@@ -2014,7 +2014,7 @@
|
||||
"is-extendable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
|
||||
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
|
||||
"integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-plain-object": "^2.0.4"
|
||||
@@ -2105,7 +2105,7 @@
|
||||
"fill-range": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
|
||||
"integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==",
|
||||
"integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-number": "^2.1.0",
|
||||
@@ -2779,7 +2779,7 @@
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=",
|
||||
"dev": true
|
||||
},
|
||||
"gauge": {
|
||||
@@ -2802,7 +2802,7 @@
|
||||
"get-caller-file": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
|
||||
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
|
||||
"integrity": "sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o=",
|
||||
"dev": true
|
||||
},
|
||||
"get-stdin": {
|
||||
@@ -2977,7 +2977,7 @@
|
||||
"globals": {
|
||||
"version": "9.18.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
|
||||
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
||||
"integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=",
|
||||
"dev": true
|
||||
},
|
||||
"graceful-fs": {
|
||||
@@ -3290,7 +3290,7 @@
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
|
||||
"dev": true
|
||||
},
|
||||
"uglify-js": {
|
||||
@@ -3325,7 +3325,7 @@
|
||||
"has": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
@@ -3511,7 +3511,7 @@
|
||||
"html-encoding-sniffer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
|
||||
"integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
|
||||
"integrity": "sha1-5w2EuU2lOqN14R/jo1G+ZkLKRvg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"whatwg-encoding": "^1.0.1"
|
||||
@@ -3595,7 +3595,7 @@
|
||||
"import-local": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz",
|
||||
"integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==",
|
||||
"integrity": "sha1-Xk/9wD9P5sAJxnKb6yljHC+CJ7w=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pkg-dir": "^2.0.0",
|
||||
@@ -3649,7 +3649,7 @@
|
||||
"invariant": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
|
||||
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
|
||||
"integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.0.0"
|
||||
@@ -3679,7 +3679,7 @@
|
||||
"is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
|
||||
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
|
||||
"dev": true
|
||||
},
|
||||
"is-builtin-module": {
|
||||
@@ -3700,7 +3700,7 @@
|
||||
"is-ci": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz",
|
||||
"integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==",
|
||||
"integrity": "sha1-43ecjuF/zPQoSI9uKBGH8uYyhBw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ci-info": "^1.5.0"
|
||||
@@ -3724,7 +3724,7 @@
|
||||
"is-descriptor": {
|
||||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
|
||||
"integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
|
||||
"integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-accessor-descriptor": "^0.1.6",
|
||||
@@ -3735,7 +3735,7 @@
|
||||
"kind-of": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
|
||||
"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
|
||||
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -3812,7 +3812,7 @@
|
||||
"is-plain-object": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
|
||||
"integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isobject": "^3.0.1"
|
||||
@@ -3880,7 +3880,7 @@
|
||||
"is-windows": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
|
||||
"integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
|
||||
"integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=",
|
||||
"dev": true
|
||||
},
|
||||
"isarray": {
|
||||
@@ -3913,7 +3913,7 @@
|
||||
"istanbul-api": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz",
|
||||
"integrity": "sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA==",
|
||||
"integrity": "sha1-qGx3DSsD4R4/d4zXrt2C0nIgkqo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^2.1.4",
|
||||
@@ -3965,13 +3965,13 @@
|
||||
"istanbul-lib-coverage": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz",
|
||||
"integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==",
|
||||
"integrity": "sha1-zPftzQoLubj3Kf7rCTBHD5r2ZPA=",
|
||||
"dev": true
|
||||
},
|
||||
"istanbul-lib-hook": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz",
|
||||
"integrity": "sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==",
|
||||
"integrity": "sha1-vGvwfxKmQfvxyFOR0Nqo8K6mv4Y=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"append-transform": "^0.4.0"
|
||||
@@ -3980,7 +3980,7 @@
|
||||
"istanbul-lib-instrument": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz",
|
||||
"integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==",
|
||||
"integrity": "sha1-H1XtEKw8R/K93dUweTUSZ1TQqco=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-generator": "^6.18.0",
|
||||
@@ -3995,7 +3995,7 @@
|
||||
"istanbul-lib-report": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz",
|
||||
"integrity": "sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==",
|
||||
"integrity": "sha1-8qZX/GKC+WFwqvKB6zCkWPf0Fww=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"istanbul-lib-coverage": "^1.2.1",
|
||||
@@ -4024,7 +4024,7 @@
|
||||
"istanbul-lib-source-maps": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz",
|
||||
"integrity": "sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==",
|
||||
"integrity": "sha1-N7n/ZhWA+PyhEjJ1LuQuCMZnXY8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^3.1.0",
|
||||
@@ -4057,7 +4057,7 @@
|
||||
"istanbul-reports": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz",
|
||||
"integrity": "sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==",
|
||||
"integrity": "sha1-l+Tb87UV6MSEyuoV1lJO69P/Tho=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"handlebars": "^4.0.3"
|
||||
@@ -4102,7 +4102,7 @@
|
||||
"cliui": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
|
||||
"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
|
||||
"integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^2.1.1",
|
||||
@@ -4201,7 +4201,7 @@
|
||||
"string-width": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
||||
"integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-fullwidth-code-point": "^2.0.0",
|
||||
@@ -4251,7 +4251,7 @@
|
||||
"jest-changed-files": {
|
||||
"version": "23.4.2",
|
||||
"resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz",
|
||||
"integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==",
|
||||
"integrity": "sha1-Hu1og3DNXuuv5K6T00uztklo/oM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"throat": "^4.0.0"
|
||||
@@ -4459,7 +4459,7 @@
|
||||
"jest-get-type": {
|
||||
"version": "22.4.3",
|
||||
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
|
||||
"integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
|
||||
"integrity": "sha1-46hQTYR5NC3UQgI2syKGnxiQDOQ=",
|
||||
"dev": true
|
||||
},
|
||||
"jest-haste-map": {
|
||||
@@ -4736,7 +4736,7 @@
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
@@ -4809,7 +4809,7 @@
|
||||
"cliui": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
|
||||
"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
|
||||
"integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^2.1.1",
|
||||
@@ -4841,7 +4841,7 @@
|
||||
"string-width": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
||||
"integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-fullwidth-code-point": "^2.0.0",
|
||||
@@ -5006,7 +5006,7 @@
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
@@ -5152,7 +5152,7 @@
|
||||
"jsdom": {
|
||||
"version": "11.12.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz",
|
||||
"integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==",
|
||||
"integrity": "sha1-GoDUDd03ih3lllbp5txaO6hle8g=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"abab": "^2.0.0",
|
||||
@@ -5364,7 +5364,7 @@
|
||||
"kleur": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz",
|
||||
"integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==",
|
||||
"integrity": "sha1-twT0lE2V4lXQOPDLBfuKYCxVowA=",
|
||||
"dev": true
|
||||
},
|
||||
"lazy-cache": {
|
||||
@@ -5394,7 +5394,7 @@
|
||||
"left-pad": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
|
||||
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
|
||||
"integrity": "sha1-W4o6d2Xf4AEmHd6RVYnngvjJTR4=",
|
||||
"dev": true
|
||||
},
|
||||
"leven": {
|
||||
@@ -5471,7 +5471,7 @@
|
||||
"loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"integrity": "sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
@@ -5640,7 +5640,7 @@
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
@@ -5665,7 +5665,7 @@
|
||||
"is-extendable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
|
||||
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
|
||||
"integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-plain-object": "^2.0.4"
|
||||
@@ -5706,7 +5706,7 @@
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||
"integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
|
||||
"integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-diff": "^4.0.0",
|
||||
@@ -5867,7 +5867,7 @@
|
||||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
@@ -6112,7 +6112,7 @@
|
||||
"p-limit": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
|
||||
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
|
||||
"integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^1.0.0"
|
||||
@@ -6163,7 +6163,7 @@
|
||||
"parse5": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
|
||||
"integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==",
|
||||
"integrity": "sha1-bXhlbj2o14tOwLkG98CO8d/j9gg=",
|
||||
"dev": true
|
||||
},
|
||||
"pascalcase": {
|
||||
@@ -6202,7 +6202,7 @@
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=",
|
||||
"dev": true
|
||||
},
|
||||
"path-type": {
|
||||
@@ -6266,7 +6266,7 @@
|
||||
"pn": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
|
||||
"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
|
||||
"integrity": "sha1-4vTO8OIZ9GPBeas3Rj5OHs3Muvs=",
|
||||
"dev": true
|
||||
},
|
||||
"posix-character-classes": {
|
||||
@@ -6346,7 +6346,7 @@
|
||||
"private": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
|
||||
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
|
||||
"integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=",
|
||||
"dev": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
@@ -6358,7 +6358,7 @@
|
||||
"prompts": {
|
||||
"version": "0.1.14",
|
||||
"resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz",
|
||||
"integrity": "sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w==",
|
||||
"integrity": "sha1-qOFcYSxcnsj4ERhH3zM3ycvUQ7I=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kleur": "^2.0.1",
|
||||
@@ -6414,7 +6414,7 @@
|
||||
"is-number": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
|
||||
"integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
|
||||
"integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=",
|
||||
"dev": true
|
||||
},
|
||||
"kind-of": {
|
||||
@@ -6505,13 +6505,13 @@
|
||||
"regenerator-runtime": {
|
||||
"version": "0.11.1",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
||||
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
|
||||
"integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=",
|
||||
"dev": true
|
||||
},
|
||||
"regex-cache": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
|
||||
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
|
||||
"integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-equal-shallow": "^0.1.3"
|
||||
@@ -6520,7 +6520,7 @@
|
||||
"regex-not": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
|
||||
"integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
|
||||
"integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"extend-shallow": "^3.0.2",
|
||||
@@ -6536,7 +6536,7 @@
|
||||
"repeat-element": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
|
||||
"integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
|
||||
"integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=",
|
||||
"dev": true
|
||||
},
|
||||
"repeat-string": {
|
||||
@@ -6668,7 +6668,7 @@
|
||||
"ret": {
|
||||
"version": "0.1.15",
|
||||
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
|
||||
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
|
||||
"integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=",
|
||||
"dev": true
|
||||
},
|
||||
"right-align": {
|
||||
@@ -6689,7 +6689,7 @@
|
||||
"rsvp": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz",
|
||||
"integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==",
|
||||
"integrity": "sha1-LpZJFZmpbN4bUV1WdKj3qRRSkmo=",
|
||||
"dev": true
|
||||
},
|
||||
"safe-buffer": {
|
||||
@@ -6710,7 +6710,7 @@
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=",
|
||||
"dev": true
|
||||
},
|
||||
"sane": {
|
||||
@@ -6745,7 +6745,7 @@
|
||||
"braces": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
|
||||
"integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
|
||||
"integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-flatten": "^1.1.0",
|
||||
@@ -6858,7 +6858,7 @@
|
||||
"kind-of": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
|
||||
"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
|
||||
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -6866,7 +6866,7 @@
|
||||
"extglob": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
|
||||
"integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
|
||||
"integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-unique": "^0.3.2",
|
||||
@@ -6925,7 +6925,7 @@
|
||||
"is-accessor-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
|
||||
"integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -6934,7 +6934,7 @@
|
||||
"is-data-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
|
||||
"integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -6943,7 +6943,7 @@
|
||||
"is-descriptor": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
|
||||
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
|
||||
"integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-accessor-descriptor": "^1.0.0",
|
||||
@@ -6986,7 +6986,7 @@
|
||||
"micromatch": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
|
||||
"integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
|
||||
"integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-diff": "^4.0.0",
|
||||
@@ -7009,7 +7009,7 @@
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
@@ -7076,7 +7076,7 @@
|
||||
"shellwords": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
|
||||
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
|
||||
"integrity": "sha1-1rkYHBpI05cyTISHHvvPxz/AZUs=",
|
||||
"dev": true
|
||||
},
|
||||
"sigmund": {
|
||||
@@ -7106,7 +7106,7 @@
|
||||
"sisteransi": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz",
|
||||
"integrity": "sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g==",
|
||||
"integrity": "sha1-VDFEfV99FnWqxmfM0LhlpJlMs84=",
|
||||
"dev": true
|
||||
},
|
||||
"slash": {
|
||||
@@ -7118,7 +7118,7 @@
|
||||
"snapdragon": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
|
||||
"integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
|
||||
"integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"base": "^0.11.1",
|
||||
@@ -7154,7 +7154,7 @@
|
||||
"snapdragon-node": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
|
||||
"integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
|
||||
"integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-property": "^1.0.0",
|
||||
@@ -7174,7 +7174,7 @@
|
||||
"is-accessor-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
|
||||
"integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -7183,7 +7183,7 @@
|
||||
"is-data-descriptor": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
|
||||
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
|
||||
"integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.0"
|
||||
@@ -7192,7 +7192,7 @@
|
||||
"is-descriptor": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
|
||||
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
|
||||
"integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-accessor-descriptor": "^1.0.0",
|
||||
@@ -7217,7 +7217,7 @@
|
||||
"snapdragon-util": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
|
||||
"integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
|
||||
"integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^3.2.0"
|
||||
@@ -7254,7 +7254,7 @@
|
||||
"source-map-support": {
|
||||
"version": "0.4.18",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
|
||||
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
|
||||
"integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"source-map": "^0.5.6"
|
||||
@@ -7290,7 +7290,7 @@
|
||||
"split-string": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
||||
"integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
|
||||
"integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"extend-shallow": "^3.0.0"
|
||||
@@ -7530,7 +7530,7 @@
|
||||
"test-exclude": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz",
|
||||
"integrity": "sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA==",
|
||||
"integrity": "sha1-qaXmRHTkOYM5JFoKdprXwvSpfCA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arrify": "^1.0.1",
|
||||
@@ -7642,7 +7642,7 @@
|
||||
"to-regex": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
|
||||
"integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
|
||||
"integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-property": "^2.0.2",
|
||||
@@ -7890,7 +7890,7 @@
|
||||
"use": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
|
||||
"integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
|
||||
"integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=",
|
||||
"dev": true
|
||||
},
|
||||
"util-deprecate": {
|
||||
@@ -8015,7 +8015,7 @@
|
||||
"webidl-conversions": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||
"integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==",
|
||||
"integrity": "sha1-qFWYCx8LazWbodXZ+zmulB+qY60=",
|
||||
"dev": true
|
||||
},
|
||||
"webidl-tools": {
|
||||
@@ -8070,7 +8070,7 @@
|
||||
"whatwg-url": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz",
|
||||
"integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==",
|
||||
"integrity": "sha1-8t8Cv/F2/WUHDfdK1cy7WhmZZag=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash.sortby": "^4.7.0",
|
||||
@@ -8192,7 +8192,7 @@
|
||||
"ws": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
|
||||
"integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==",
|
||||
"integrity": "sha1-3/7xSGa46NyRM1glFNG++vlumA8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async-limiter": "~1.0.0"
|
||||
@@ -8201,7 +8201,7 @@
|
||||
"xml-name-validator": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
|
||||
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
|
||||
"integrity": "sha1-auc+Bt5NjG5H+fsYH3jWSK1FfGo=",
|
||||
"dev": true
|
||||
},
|
||||
"xtend": {
|
||||
|
||||
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 525 B |
|
After Width: | Height: | Size: 369 B |
|
After Width: | Height: | Size: 358 B |
|
After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 288 B |
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 377 B |
|
After Width: | Height: | Size: 431 B |
|
After Width: | Height: | Size: 382 B |
@@ -0,0 +1 @@
|
||||
A twitter-like social network called "Not Twitter" using Firestore, and showcase of some other features of Firebase.
|
||||
@@ -0,0 +1,233 @@
|
||||
{
|
||||
"author": "Arthur Pacaud (arthuro555)",
|
||||
"description": "Have multiple expressions that remove unwanted characters from a string (non-alphanumerical characters, new Lines...)",
|
||||
"extensionNamespace": "",
|
||||
"fullName": "Sanitizer",
|
||||
"name": "Sanitizer",
|
||||
"shortDescription": "Removes unwanted text from strings",
|
||||
"tags": "sanitization, string, string manipulation",
|
||||
"version": "1.0.0",
|
||||
"eventsFunctions": [
|
||||
{
|
||||
"description": "Removes every non-alphanumerical characters of a string.",
|
||||
"fullName": "Sanitize Text",
|
||||
"functionType": "StringExpression",
|
||||
"name": "sanitize",
|
||||
"sentence": "",
|
||||
"events": [
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Comment",
|
||||
"color": {
|
||||
"b": 109,
|
||||
"g": 230,
|
||||
"r": 255,
|
||||
"textB": 0,
|
||||
"textG": 0,
|
||||
"textR": 0
|
||||
},
|
||||
"comment": "",
|
||||
"comment2": ""
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::JsCode",
|
||||
"inlineCode": "eventsFunctionContext.returnValue = eventsFunctionContext.getArgument(\"text\").replace(/\\W/g, '');",
|
||||
"parameterObjects": "",
|
||||
"useStrict": true
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"codeOnly": false,
|
||||
"defaultValue": "",
|
||||
"description": "The text to sanitize",
|
||||
"longDescription": "",
|
||||
"name": "text",
|
||||
"optional": false,
|
||||
"supplementaryInformation": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"objectGroups": []
|
||||
},
|
||||
{
|
||||
"description": "Cuts a string to be sure it doesn't exxceeds a maximum size",
|
||||
"fullName": "Trim a string",
|
||||
"functionType": "StringExpression",
|
||||
"name": "trim",
|
||||
"sentence": "",
|
||||
"events": [
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Comment",
|
||||
"color": {
|
||||
"b": 109,
|
||||
"g": 230,
|
||||
"r": 255,
|
||||
"textB": 0,
|
||||
"textG": 0,
|
||||
"textR": 0
|
||||
},
|
||||
"comment": "",
|
||||
"comment2": ""
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::JsCode",
|
||||
"inlineCode": "eventsFunctionContext.returnValue = eventsFunctionContext.getArgument(\"text\").substring(0, eventsFunctionContext.getArgument(\"size\"));",
|
||||
"parameterObjects": "",
|
||||
"useStrict": true
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"codeOnly": false,
|
||||
"defaultValue": "",
|
||||
"description": "The string to trim",
|
||||
"longDescription": "",
|
||||
"name": "text",
|
||||
"optional": false,
|
||||
"supplementaryInformation": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"codeOnly": false,
|
||||
"defaultValue": "",
|
||||
"description": "The size to limit the string to",
|
||||
"longDescription": "",
|
||||
"name": "size",
|
||||
"optional": false,
|
||||
"supplementaryInformation": "",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"objectGroups": []
|
||||
},
|
||||
{
|
||||
"description": "Replaces every new line character with a space",
|
||||
"fullName": "Remove new lines",
|
||||
"functionType": "StringExpression",
|
||||
"name": "removeNewLines",
|
||||
"sentence": "",
|
||||
"events": [
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Comment",
|
||||
"color": {
|
||||
"b": 109,
|
||||
"g": 230,
|
||||
"r": 255,
|
||||
"textB": 0,
|
||||
"textG": 0,
|
||||
"textR": 0
|
||||
},
|
||||
"comment": "",
|
||||
"comment2": ""
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::JsCode",
|
||||
"inlineCode": "eventsFunctionContext.returnValue = eventsFunctionContext.getArgument(\"text\").replace(/\\r?\\n|\\r/g, '');",
|
||||
"parameterObjects": "",
|
||||
"useStrict": true
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"codeOnly": false,
|
||||
"defaultValue": "",
|
||||
"description": "The text to remove new lines from",
|
||||
"longDescription": "",
|
||||
"name": "text",
|
||||
"optional": false,
|
||||
"supplementaryInformation": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"objectGroups": []
|
||||
},
|
||||
{
|
||||
"description": "Count the nmber of lines in a string",
|
||||
"fullName": "Count Lines",
|
||||
"functionType": "Expression",
|
||||
"name": "countNewLines",
|
||||
"sentence": "",
|
||||
"events": [
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::JsCode",
|
||||
"inlineCode": "eventsFunctionContext.returnValue = eventsFunctionContext.getArgument(\"text\").split(/\\r\\n|\\r|\\n/).length;",
|
||||
"parameterObjects": "",
|
||||
"useStrict": true
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"codeOnly": false,
|
||||
"defaultValue": "",
|
||||
"description": "The text to count lines from",
|
||||
"longDescription": "",
|
||||
"name": "text",
|
||||
"optional": false,
|
||||
"supplementaryInformation": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"objectGroups": []
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"fullName": "",
|
||||
"functionType": "StringExpression",
|
||||
"name": "removeFirstLine",
|
||||
"sentence": "",
|
||||
"events": [
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Comment",
|
||||
"color": {
|
||||
"b": 109,
|
||||
"g": 230,
|
||||
"r": 255,
|
||||
"textB": 0,
|
||||
"textG": 0,
|
||||
"textR": 0
|
||||
},
|
||||
"comment": "",
|
||||
"comment2": ""
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::JsCode",
|
||||
"inlineCode": "eventsFunctionContext.returnValue = eventsFunctionContext.getArgument(\"text\").substring(eventsFunctionContext.getArgument(\"text\").indexOf(\"\\n\") + 1);",
|
||||
"parameterObjects": "",
|
||||
"useStrict": true
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"codeOnly": false,
|
||||
"defaultValue": "",
|
||||
"description": "String to remove the first line from",
|
||||
"longDescription": "",
|
||||
"name": "text",
|
||||
"optional": false,
|
||||
"supplementaryInformation": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"objectGroups": []
|
||||
}
|
||||
],
|
||||
"eventsBasedBehaviors": []
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
{
|
||||
"firstLayout": "",
|
||||
"gdVersion": {
|
||||
"build": 98,
|
||||
"major": 4,
|
||||
"minor": 0,
|
||||
"revision": 0
|
||||
},
|
||||
"properties": {
|
||||
"adaptGameResolutionAtRuntime": true,
|
||||
"folderProject": true,
|
||||
"linuxExecutableFilename": "",
|
||||
"macExecutableFilename": "",
|
||||
"orientation": "landscape",
|
||||
"packageName": "com.gdexample.firebase",
|
||||
"projectFile": "D:\\Documents\\documents\\GDevelop projects\\firebaseExample\\game.json",
|
||||
"scaleMode": "linear",
|
||||
"sizeOnStartupMode": "",
|
||||
"useExternalSourceFiles": false,
|
||||
"version": "1.0.0",
|
||||
"winExecutableFilename": "",
|
||||
"winExecutableIconFile": "",
|
||||
"name": "Firebase Example",
|
||||
"author": "Arthur Pacaud (arthuro555)",
|
||||
"windowWidth": 800,
|
||||
"windowHeight": 600,
|
||||
"latestCompilationDirectory": "",
|
||||
"maxFPS": 60,
|
||||
"minFPS": 20,
|
||||
"verticalSync": false,
|
||||
"platformSpecificAssets": {},
|
||||
"loadingScreen": {
|
||||
"showGDevelopSplash": false
|
||||
},
|
||||
"extensionProperties": [
|
||||
{
|
||||
"extension": "Firebase",
|
||||
"property": "FirebaseConfig",
|
||||
"value": "{\n \"apiKey\": \"AIzaSyCbFhG_bCyAvnxlmVSgIgn7Em0XOYE9YXA\",\n \"authDomain\": \"tutorial-gdevelop.firebaseapp.com\",\n \"databaseURL\": \"https://tutorial-gdevelop.firebaseio.com\",\n \"projectId\": \"tutorial-gdevelop\",\n \"storageBucket\": \"tutorial-gdevelop.appspot.com\",\n \"messagingSenderId\": \"386980638073\",\n \"appId\": \"1:386980638073:web:b00afc0ecb3ed7ca4f53a8\",\n \"measurementId\": \"G-R0KBN0HPQ8\"\n }"
|
||||
}
|
||||
],
|
||||
"extensions": [
|
||||
{
|
||||
"name": "BuiltinObject"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinAudio"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinVariables"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinTime"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinMouse"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinKeyboard"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinJoystick"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinCamera"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinWindow"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinFile"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinNetwork"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinScene"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinAdvanced"
|
||||
},
|
||||
{
|
||||
"name": "Sprite"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinCommonInstructions"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinCommonConversions"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinStringInstructions"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinMathematicalTools"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinExternalLayouts"
|
||||
}
|
||||
],
|
||||
"platforms": [
|
||||
{
|
||||
"name": "GDevelop JS platform"
|
||||
}
|
||||
],
|
||||
"currentPlatform": "GDevelop JS platform"
|
||||
},
|
||||
"resources": {
|
||||
"resources": [
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/Modal.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\Modal.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/button_up.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\button_up.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/button_pressed.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\button_pressed.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/inputHighlight.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\inputHighlight.png",
|
||||
"smoothed": true,
|
||||
"userAdded": false
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/inputInnactive.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\inputInnactive.png",
|
||||
"smoothed": true,
|
||||
"userAdded": false
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/text_field.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\text_field.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/green_button_up.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\green_button_up.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/back_arrow.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\back_arrow.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/arrow_up.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\arrow_up.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
},
|
||||
{
|
||||
"alwaysLoaded": false,
|
||||
"file": "Assets/arrow_down.png",
|
||||
"kind": "image",
|
||||
"metadata": "",
|
||||
"name": "Assets\\arrow_down.png",
|
||||
"smoothed": true,
|
||||
"userAdded": true
|
||||
}
|
||||
],
|
||||
"resourceFolders": []
|
||||
},
|
||||
"objects": [],
|
||||
"objectsGroups": [],
|
||||
"variables": [],
|
||||
"layouts": [
|
||||
{
|
||||
"__REFERENCE_TO_SPLIT_OBJECT": true,
|
||||
"referenceTo": "/layouts/main"
|
||||
},
|
||||
{
|
||||
"__REFERENCE_TO_SPLIT_OBJECT": true,
|
||||
"referenceTo": "/layouts/remote-configuration"
|
||||
},
|
||||
{
|
||||
"__REFERENCE_TO_SPLIT_OBJECT": true,
|
||||
"referenceTo": "/layouts/performance-measuring"
|
||||
},
|
||||
{
|
||||
"__REFERENCE_TO_SPLIT_OBJECT": true,
|
||||
"referenceTo": "/layouts/authentification"
|
||||
},
|
||||
{
|
||||
"__REFERENCE_TO_SPLIT_OBJECT": true,
|
||||
"referenceTo": "/layouts/analytics"
|
||||
},
|
||||
{
|
||||
"__REFERENCE_TO_SPLIT_OBJECT": true,
|
||||
"referenceTo": "/layouts/firestore"
|
||||
}
|
||||
],
|
||||
"externalEvents": [],
|
||||
"eventsFunctionsExtensions": [
|
||||
{
|
||||
"__REFERENCE_TO_SPLIT_OBJECT": true,
|
||||
"referenceTo": "/eventsFunctionsExtensions/sanitizer"
|
||||
}
|
||||
],
|
||||
"externalLayouts": [],
|
||||
"externalSourceFiles": []
|
||||
}
|
||||
@@ -56,6 +56,11 @@ const jsExtensions = [
|
||||
extensionModule: require('GDJS-for-web-app-only/Runtime/Extensions/FileSystem/JsExtension.js'),
|
||||
objectsRenderingServiceModules: {},
|
||||
},
|
||||
{
|
||||
name: 'Firebase',
|
||||
extensionModule: require('GDJS-for-web-app-only/Runtime/Extensions/Firebase/JsExtension.js'),
|
||||
objectsRenderingServiceModules: {},
|
||||
},
|
||||
{
|
||||
name: 'DialogueTree',
|
||||
extensionModule: require('GDJS-for-web-app-only/Runtime/Extensions/DialogueTree/JsExtension.js'),
|
||||
|
||||
@@ -108,3 +108,12 @@ export const displayProjectErrorsBox = (
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
export const validateJSON = (jsonString: string): boolean => {
|
||||
try {
|
||||
JSON.parse(jsonString);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||