2023-07-05 08:43:57 +00:00
|
|
|
// (C) Copyright 2015 Moodle Pty Ltd.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
|
2024-02-09 09:11:51 +00:00
|
|
|
import { Diagnostic } from './plugins/Diagnostic';
|
2023-09-08 13:19:01 +00:00
|
|
|
import { InstallReferrer } from './plugins/InstallReferrer';
|
2023-08-03 06:34:14 +00:00
|
|
|
import { SecureStorage } from './plugins/SecureStorage';
|
2023-07-05 08:43:57 +00:00
|
|
|
|
|
|
|
const api: MoodleAppPlugins = {
|
2023-08-03 06:34:14 +00:00
|
|
|
secureStorage: new SecureStorage(),
|
2023-09-08 13:19:01 +00:00
|
|
|
installReferrer: new InstallReferrer(),
|
2024-02-09 09:11:51 +00:00
|
|
|
diagnostic: new Diagnostic(),
|
2023-07-05 08:43:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// This is necessary to work around the default transpilation behavior,
|
|
|
|
// which would wrap exported modules into UMD methods. Check out the
|
|
|
|
// fixBundle method in the /scripts/build.js file for more details.
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
(window as any).cordovaModule = api;
|