Compare commits
71 Commits
photos-v0.
...
fdroid-v0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3962c55140 | ||
|
|
82e478bb12 | ||
|
|
63c8e98492 | ||
|
|
0cbf7db745 | ||
|
|
247db36c3b | ||
|
|
79d9eba099 | ||
|
|
19980559f4 | ||
|
|
b365e03acd | ||
|
|
d067673dca | ||
|
|
9deefeb019 | ||
|
|
861b4d9228 | ||
|
|
1d5f936ced | ||
|
|
e8a3b3b299 | ||
|
|
62f3e6d47b | ||
|
|
0e9a4911b5 | ||
|
|
7c3a137723 | ||
|
|
c9c582cbcc | ||
|
|
d924ee636d | ||
|
|
176289d0a8 | ||
|
|
f663c436cb | ||
|
|
3f3a63d8da | ||
|
|
1360378aaa | ||
|
|
14e4c3a133 | ||
|
|
a6b8bfcf90 | ||
|
|
bf2a97f4a1 | ||
|
|
ebab8568b9 | ||
|
|
55ee9a5d29 | ||
|
|
27b7532ca4 | ||
|
|
d38ea56492 | ||
|
|
37f09c0dc3 | ||
|
|
22b9bc7804 | ||
|
|
aad4d62f05 | ||
|
|
f716f3bed7 | ||
|
|
c2bf99531a | ||
|
|
0d3db30cac | ||
|
|
d9477891bb | ||
|
|
429caf5f6c | ||
|
|
39a17bc0b8 | ||
|
|
2310758810 | ||
|
|
781a99aa42 | ||
|
|
3ff5b2f18f | ||
|
|
38c88c9aa8 | ||
|
|
b6cb264cbb | ||
|
|
74ff0e4abe | ||
|
|
cab8660446 | ||
|
|
e4e47ab3d4 | ||
|
|
b8911d8303 | ||
|
|
87f53177c0 | ||
|
|
8b35cfd802 | ||
|
|
010ff29b16 | ||
|
|
ae92d2f759 | ||
|
|
761c3e6ac2 | ||
|
|
f9a3009c60 | ||
|
|
ca0474faca | ||
|
|
b469985277 | ||
|
|
2a5dacb460 | ||
|
|
d16f98cf07 | ||
|
|
8677cbb4f8 | ||
|
|
0e33299863 | ||
|
|
93ba4e011a | ||
|
|
7977bebcaa | ||
|
|
f28f49d724 | ||
|
|
d9a93ddad6 | ||
|
|
07808d6139 | ||
|
|
1e1633bb45 | ||
|
|
c0f33de0c8 | ||
|
|
417621b17c | ||
|
|
8322540732 | ||
|
|
2d61be37bb | ||
|
|
2a10aa7d61 | ||
|
|
004eb310b3 |
3
.gitmodules
vendored
@@ -20,3 +20,6 @@
|
||||
path = web/apps/photos/thirdparty/photoswipe
|
||||
url = https://github.com/ente-io/PhotoSwipe.git
|
||||
branch = single-thread
|
||||
[submodule "mobile/thirdparty/flutter"]
|
||||
path = mobile/thirdparty/flutter
|
||||
url = https://github.com/flutter/flutter
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/* eslint-env node */
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/strict-type-checked",
|
||||
"plugin:@typescript-eslint/stylistic-type-checked",
|
||||
],
|
||||
plugins: ["@typescript-eslint"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
project: true,
|
||||
},
|
||||
ignorePatterns: [".eslintrc.js", "app", "out", "dist"],
|
||||
env: {
|
||||
es2022: true,
|
||||
node: true,
|
||||
},
|
||||
rules: {
|
||||
/* Allow numbers to be used in template literals */
|
||||
"@typescript-eslint/restrict-template-expressions": [
|
||||
"error",
|
||||
{
|
||||
allowNumber: true,
|
||||
},
|
||||
],
|
||||
/* Allow void expressions as the entire body of an arrow function */
|
||||
"@typescript-eslint/no-confusing-void-expression": [
|
||||
"error",
|
||||
{
|
||||
ignoreArrowShorthand: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -1,5 +1,9 @@
|
||||
# CHANGELOG
|
||||
|
||||
## v1.7.1 (Unreleased)
|
||||
|
||||
- Remember the window size across app restarts.
|
||||
|
||||
## v1.7.0
|
||||
|
||||
v1.7 is a major rewrite to improve the security of our app. In particular, the
|
||||
|
||||
BIN
desktop/build/icons/512-512.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
43
desktop/eslint.config.mjs
Normal file
@@ -0,0 +1,43 @@
|
||||
// @ts-check
|
||||
|
||||
import js from "@eslint/js";
|
||||
import ts from "typescript-eslint";
|
||||
|
||||
export default ts.config(
|
||||
js.configs.recommended,
|
||||
...ts.configs.strictTypeChecked,
|
||||
...ts.configs.stylisticTypeChecked,
|
||||
{
|
||||
// typescript-eslint needs this enabling type checked rules.
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
project: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// The list of (minimatch) globs to ignore. This needs to be the only
|
||||
// key in this configuration object.
|
||||
ignores: ["eslint.config.mjs", "app/", "out/", "dist/"],
|
||||
},
|
||||
{
|
||||
// Rule customizations.
|
||||
rules: {
|
||||
// Allow numbers to be used in template literals.
|
||||
"@typescript-eslint/restrict-template-expressions": [
|
||||
"error",
|
||||
{
|
||||
allowNumber: true,
|
||||
},
|
||||
],
|
||||
// Allow void expressions as the entire body of an arrow function.
|
||||
"@typescript-eslint/no-confusing-void-expression": [
|
||||
"error",
|
||||
{
|
||||
ignoreArrowShorthand: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -17,8 +17,8 @@
|
||||
"dev-main": "tsc && electron .",
|
||||
"dev-renderer": "cd ../web && yarn install && yarn dev:photos",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"lint": "yarn prettier --check --log-level warn . && eslint --ext .ts src && yarn tsc",
|
||||
"lint-fix": "yarn prettier --write --log-level warn . && eslint --fix --ext .ts src && yarn tsc"
|
||||
"lint": "yarn prettier --check --log-level warn . && yarn eslint && yarn tsc",
|
||||
"lint-fix": "yarn prettier --write --log-level warn . && yarn eslint && yarn tsc"
|
||||
},
|
||||
"resolutions": {
|
||||
"jackspeak": "2.1.1"
|
||||
@@ -36,23 +36,24 @@
|
||||
"jpeg-js": "^0.4",
|
||||
"next-electron-server": "^1",
|
||||
"node-stream-zip": "^1.15",
|
||||
"onnxruntime-node": "^1.17"
|
||||
"onnxruntime-node": "^1.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.4.0",
|
||||
"@tsconfig/node20": "^20.1.4",
|
||||
"@types/auto-launch": "^5.0",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"@types/ffmpeg-static": "^3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7",
|
||||
"@typescript-eslint/parser": "^7",
|
||||
"concurrently": "^8",
|
||||
"electron": "^30",
|
||||
"electron-builder": "25.0.0-alpha.6",
|
||||
"eslint": "^8",
|
||||
"electron-builder": "25.0.0-alpha.8",
|
||||
"eslint": "^9.4.0",
|
||||
"prettier": "^3",
|
||||
"prettier-plugin-organize-imports": "^3",
|
||||
"prettier-plugin-packagejson": "^2",
|
||||
"shx": "^0.3",
|
||||
"typescript": "^5"
|
||||
"typescript": "^5",
|
||||
"typescript-eslint": "8.0.0-alpha.10"
|
||||
},
|
||||
"packageManager": "yarn@1.22.21",
|
||||
"productName": "ente"
|
||||
|
||||
@@ -143,12 +143,20 @@ const registerPrivilegedSchemes = () => {
|
||||
* This window will show the HTML served from {@link rendererURL}.
|
||||
*/
|
||||
const createMainWindow = () => {
|
||||
const bounds = windowBounds();
|
||||
|
||||
// Create the main window. This'll show our web content.
|
||||
const window = new BrowserWindow({
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, "preload.js"),
|
||||
sandbox: true,
|
||||
},
|
||||
// Set the window's position and size (if we have one saved).
|
||||
...(bounds ?? {}),
|
||||
// Enforce a minimum size
|
||||
...minimumWindowSize(),
|
||||
// (Maybe) fix the dock icon on Linux.
|
||||
...windowIconOptions(),
|
||||
// The color to show in the window until the web content gets loaded.
|
||||
// See: https://www.electronjs.org/docs/latest/api/browser-window#setting-the-backgroundcolor-property
|
||||
backgroundColor: "black",
|
||||
@@ -162,8 +170,10 @@ const createMainWindow = () => {
|
||||
// On macOS, also hide the dock icon on macOS.
|
||||
if (process.platform == "darwin") app.dock.hide();
|
||||
} else {
|
||||
// Show our window (maximizing it) otherwise.
|
||||
window.maximize();
|
||||
// Show our window otherwise.
|
||||
//
|
||||
// If we did not give it an explicit size, maximize it
|
||||
bounds ? window.show() : window.maximize();
|
||||
}
|
||||
|
||||
// Open the DevTools automatically when running in dev mode
|
||||
@@ -209,11 +219,90 @@ const createMainWindow = () => {
|
||||
return window;
|
||||
};
|
||||
|
||||
/**
|
||||
* The position and size of the window the last time it was closed.
|
||||
*
|
||||
* The return value of `undefined` is taken to mean that the app's main window
|
||||
* should be maximized.
|
||||
*/
|
||||
const windowBounds = () => userPreferences.get("windowBounds");
|
||||
|
||||
/**
|
||||
* If for some reason {@link windowBounds} is outside the screen's bounds (e.g.
|
||||
* if the user's screen resolution has changed), then the previously saved
|
||||
* bounds might not be appropriate.
|
||||
*
|
||||
* Luckily, if we try to set an x/y position that is outside the screen's
|
||||
* bounds, then Electron automatically clamps them to the screen's available
|
||||
* space, and we do not need to tackle it specifically.
|
||||
*
|
||||
* However, there is no minimum window size the Electron enforces by default. As
|
||||
* a safety valve, provide an (arbitrary) minimum size so that the user can
|
||||
* resize it back to sanity if something I cannot currently anticipate happens.
|
||||
*/
|
||||
const minimumWindowSize = () => ({ minWidth: 200, minHeight: 200 });
|
||||
|
||||
/**
|
||||
* Sibling of {@link windowBounds}, see that function's documentation for more
|
||||
* details.
|
||||
*/
|
||||
const saveWindowBounds = (window: BrowserWindow) => {
|
||||
if (window.isMaximized()) userPreferences.delete("windowBounds");
|
||||
else userPreferences.set("windowBounds", window.getBounds());
|
||||
};
|
||||
|
||||
/**
|
||||
* On Linux the app does not show a dock icon by default, attempt to fix this by
|
||||
* returning the path to an icon as the "icon" property that can be passed to
|
||||
* the BrowserWindow during creation.
|
||||
*/
|
||||
const windowIconOptions = () => {
|
||||
if (process.platform != "linux") return {};
|
||||
|
||||
// There are two, possibly three, different issues with icons on Linux.
|
||||
//
|
||||
// Firstly, the AppImage itself doesn't show an icon. There does not seem to
|
||||
// be a reasonable workaround either currently. See:
|
||||
// https://github.com/AppImage/AppImageKit/issues/346
|
||||
//
|
||||
// Secondly, and this is the problem we're trying to fix here, when the app
|
||||
// is started it does not show a dock icon (Ubuntu 22) or shows the generic
|
||||
// gear icon (Ubuntu 24). The issue possibly exists on other distributions
|
||||
// too.
|
||||
//
|
||||
// Electron provides a `BrowserWindow.setIcon` function which should solve
|
||||
// our issue, we could call it selectively on Linux. There is also an
|
||||
// apparently undocumented "icon" option that can be passed when creating a
|
||||
// new BrowserWindow, and that is what most of the other code I saw on
|
||||
// GitHub seems to be doing.
|
||||
//
|
||||
// However, try what I may, I can't get either of these to work. Which leads
|
||||
// me to believe there is a third issue: I can't get it to work because I'm
|
||||
// testing on an Ubuntu 24 VM, where this might just not be working:
|
||||
// https://askubuntu.com/questions/1511534/ubuntu-24-04-skype-logo-on-the-dock-not-showing-skype-logo
|
||||
//
|
||||
// 24 isn't likely the year of the Linux desktop either.
|
||||
//
|
||||
// For now, I'm adding a very specific incantation taken from
|
||||
// https://github.com/arduino/arduino-ide/blob/main/arduino-ide-extension/src/electron-main/fix-app-image-icon.ts
|
||||
//
|
||||
// Possibly all this specific naming of the file etc is superstition, and
|
||||
// just any name would do as long as the path is correct, but let me try it
|
||||
// this way and see if this gets the icon to appear on Ubuntu 22 etc.
|
||||
|
||||
const icon = path.join(
|
||||
isDev ? "build" : process.resourcesPath,
|
||||
"icons/512x512.png",
|
||||
);
|
||||
|
||||
return { icon };
|
||||
};
|
||||
|
||||
/**
|
||||
* Automatically set the save path for user initiated downloads to the system's
|
||||
* "downloads" directory instead of asking the user to select a save location.
|
||||
*/
|
||||
export const setDownloadPath = (webContents: WebContents) => {
|
||||
const setDownloadPath = (webContents: WebContents) => {
|
||||
webContents.session.on("will-download", (_, item) => {
|
||||
item.setSavePath(
|
||||
uniqueSavePath(app.getPath("downloads"), item.getFilename()),
|
||||
@@ -241,7 +330,7 @@ const uniqueSavePath = (dirPath: string, fileName: string) => {
|
||||
*
|
||||
* @param webContents The renderer to configure.
|
||||
*/
|
||||
export const allowExternalLinks = (webContents: WebContents) =>
|
||||
const allowExternalLinks = (webContents: WebContents) =>
|
||||
// By default, if the user were open a link, say
|
||||
// https://github.com/ente-io/ente/discussions, then it would open a _new_
|
||||
// BrowserWindow within our app.
|
||||
@@ -273,7 +362,7 @@ export const allowExternalLinks = (webContents: WebContents) =>
|
||||
* "Access-Control-Allow-Origin: *" or do a echo-back of `Origin`, we add a
|
||||
* workaround here instead, intercepting the ACAO header and allowing `*`.
|
||||
*/
|
||||
export const allowAllCORSOrigins = (webContents: WebContents) =>
|
||||
const allowAllCORSOrigins = (webContents: WebContents) =>
|
||||
webContents.session.webRequest.onHeadersReceived(
|
||||
({ responseHeaders }, callback) => {
|
||||
const headers: NonNullable<typeof responseHeaders> = {};
|
||||
@@ -444,7 +533,10 @@ const main = () => {
|
||||
// app, e.g. by clicking on its dock icon.
|
||||
app.on("activate", () => mainWindow?.show());
|
||||
|
||||
app.on("before-quit", allowWindowClose);
|
||||
app.on("before-quit", () => {
|
||||
if (mainWindow) saveWindowBounds(mainWindow);
|
||||
allowWindowClose();
|
||||
});
|
||||
};
|
||||
|
||||
main();
|
||||
|
||||
@@ -1,20 +1,43 @@
|
||||
import Store, { Schema } from "electron-store";
|
||||
|
||||
interface UserPreferences {
|
||||
/**
|
||||
* If true, then the user has set a preference to also hide the dock icon on
|
||||
* macOS whenever the app is hidden. The tray icon is always visible and can
|
||||
* then be used to reopen the app when needed.
|
||||
*/
|
||||
hideDockIcon?: boolean;
|
||||
skipAppVersion?: string;
|
||||
muteUpdateNotificationVersion?: string;
|
||||
/**
|
||||
* The last position and size of our app's window.
|
||||
*
|
||||
* This value is saved when the app is about to quit, and is used to restore
|
||||
* the window to the previous state when it restarts.
|
||||
*
|
||||
* If the user maximizes the window then this value is cleared and instead
|
||||
* we just re-maximize the window on restart. This is also the behaviour if
|
||||
* no previously saved `windowRect` is found.
|
||||
*/
|
||||
windowBounds?: {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
|
||||
const userPreferencesSchema: Schema<UserPreferences> = {
|
||||
hideDockIcon: {
|
||||
type: "boolean",
|
||||
},
|
||||
skipAppVersion: {
|
||||
type: "string",
|
||||
},
|
||||
muteUpdateNotificationVersion: {
|
||||
type: "string",
|
||||
hideDockIcon: { type: "boolean" },
|
||||
skipAppVersion: { type: "string" },
|
||||
muteUpdateNotificationVersion: { type: "string" },
|
||||
windowBounds: {
|
||||
properties: {
|
||||
x: { type: "number" },
|
||||
y: { type: "number" },
|
||||
width: { type: "number" },
|
||||
height: { type: "number" },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
1
desktop/src/main/types/any-shell-escape.d.ts
vendored
@@ -19,7 +19,6 @@
|
||||
* curl -v -H "Location;" -H "User-Agent: FooBar's so-called ""Browser""" "http://www.daveeddy.com/?name=dave&age=24"
|
||||
Which is suitable for being executed by the shell.
|
||||
*/
|
||||
/* eslint-disable no-unused-vars */
|
||||
declare module "any-shell-escape" {
|
||||
declare const shellescape: (args: readonly string | string[]) => string;
|
||||
export default shellescape;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/**
|
||||
* @file The preload script
|
||||
*
|
||||
|
||||
1
desktop/src/thirdparty/clip-bpe-ts/mod.ts
vendored
@@ -373,7 +373,6 @@ export default class {
|
||||
return token + "</w>";
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (1) {
|
||||
let bigram: [string, string] | null = null;
|
||||
let minRank = Infinity;
|
||||
|
||||
@@ -32,6 +32,6 @@
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": true
|
||||
},
|
||||
/* Transpile all `.ts` files in `src/` */
|
||||
"include": ["src/**/*.ts"]
|
||||
/* Include all `.ts` files in `src/` */
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@
|
||||
fs-extra "^9.0.1"
|
||||
promise-retry "^2.0.1"
|
||||
|
||||
"@electron/osx-sign@1.0.5":
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@electron/osx-sign/-/osx-sign-1.0.5.tgz#0af7149f2fce44d1a8215660fd25a9fb610454d8"
|
||||
integrity sha512-k9ZzUQtamSoweGQDV2jILiRIHUu7lYlJ3c6IEmjv1hC17rclE+eb9U+f6UFlOOETo0JzY1HNlXy4YOlCvl+Lww==
|
||||
"@electron/osx-sign@1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron/osx-sign/-/osx-sign-1.3.0.tgz#bd6fb60c519b76ca8a000e5801f5685690e8adad"
|
||||
integrity sha512-TEXhxlYSDRr9JWK5nWdOv5MtuUdaZ412uxIIEQ0hLt80o0HYWtQJBlW5QmrQDMtebzATaOjKG9UfCzLyA90zWQ==
|
||||
dependencies:
|
||||
compare-version "^0.1.2"
|
||||
debug "^4.3.4"
|
||||
@@ -122,49 +122,54 @@
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63"
|
||||
integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==
|
||||
|
||||
"@eslint/eslintrc@^2.1.4":
|
||||
version "2.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad"
|
||||
integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==
|
||||
"@eslint/config-array@^0.15.1":
|
||||
version "0.15.1"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.15.1.tgz#1fa78b422d98f4e7979f2211a1fde137e26c7d61"
|
||||
integrity sha512-K4gzNq+yymn/EVsXYmf+SBcBro8MTf+aXJZUphM96CdzUEr+ClGDvAbpmaEK+cGVigVXIgs9gNmvHAlrzzY5JQ==
|
||||
dependencies:
|
||||
"@eslint/object-schema" "^2.1.3"
|
||||
debug "^4.3.1"
|
||||
minimatch "^3.0.5"
|
||||
|
||||
"@eslint/eslintrc@^3.1.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6"
|
||||
integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==
|
||||
dependencies:
|
||||
ajv "^6.12.4"
|
||||
debug "^4.3.2"
|
||||
espree "^9.6.0"
|
||||
globals "^13.19.0"
|
||||
espree "^10.0.1"
|
||||
globals "^14.0.0"
|
||||
ignore "^5.2.0"
|
||||
import-fresh "^3.2.1"
|
||||
js-yaml "^4.1.0"
|
||||
minimatch "^3.1.2"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
"@eslint/js@8.57.0":
|
||||
version "8.57.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
|
||||
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==
|
||||
"@eslint/js@9.4.0", "@eslint/js@^9.4.0":
|
||||
version "9.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.4.0.tgz#96a2edd37ec0551ce5f9540705be23951c008a0c"
|
||||
integrity sha512-fdI7VJjP3Rvc70lC4xkFXHB0fiPeojiL1PxVG6t1ZvXQrarj893PweuBTujxDUFk0Fxj4R7PIIAZ/aiiyZPZcg==
|
||||
|
||||
"@eslint/object-schema@^2.1.3":
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.3.tgz#e65ae80ee2927b4fd8c5c26b15ecacc2b2a6cc2a"
|
||||
integrity sha512-HAbhAYKfsAC2EkTqve00ibWIZlaU74Z1EHwAjYr4PXF0YU2VEA1zSIKSSpKszRLRWwHzzRZXvK632u+uXzvsvw==
|
||||
|
||||
"@gar/promisify@^1.1.3":
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6"
|
||||
integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==
|
||||
|
||||
"@humanwhocodes/config-array@^0.11.14":
|
||||
version "0.11.14"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
|
||||
integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==
|
||||
dependencies:
|
||||
"@humanwhocodes/object-schema" "^2.0.2"
|
||||
debug "^4.3.1"
|
||||
minimatch "^3.0.5"
|
||||
|
||||
"@humanwhocodes/module-importer@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
|
||||
integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
|
||||
|
||||
"@humanwhocodes/object-schema@^2.0.2":
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3"
|
||||
integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==
|
||||
"@humanwhocodes/retry@^0.3.0":
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570"
|
||||
integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==
|
||||
|
||||
"@isaacs/fs-minipass@^4.0.0":
|
||||
version "4.0.1"
|
||||
@@ -281,6 +286,26 @@
|
||||
dependencies:
|
||||
"@types/ms" "*"
|
||||
|
||||
"@types/eslint@*":
|
||||
version "8.56.10"
|
||||
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d"
|
||||
integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==
|
||||
dependencies:
|
||||
"@types/estree" "*"
|
||||
"@types/json-schema" "*"
|
||||
|
||||
"@types/eslint__js@^8.42.3":
|
||||
version "8.42.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/eslint__js/-/eslint__js-8.42.3.tgz#d1fa13e5c1be63a10b4e3afe992779f81c1179a0"
|
||||
integrity sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==
|
||||
dependencies:
|
||||
"@types/eslint" "*"
|
||||
|
||||
"@types/estree@*":
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
|
||||
integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==
|
||||
|
||||
"@types/ffmpeg-static@^3.0":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/ffmpeg-static/-/ffmpeg-static-3.0.3.tgz#605358ac6304507a75c2fd5fd861534837b19e2f"
|
||||
@@ -298,7 +323,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4"
|
||||
integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==
|
||||
|
||||
"@types/json-schema@^7.0.15":
|
||||
"@types/json-schema@*", "@types/json-schema@^7.0.15":
|
||||
version "7.0.15"
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
|
||||
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
|
||||
@@ -316,9 +341,9 @@
|
||||
integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==
|
||||
|
||||
"@types/node@*", "@types/node@^20.9.0":
|
||||
version "20.12.12"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050"
|
||||
integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==
|
||||
version "20.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.13.0.tgz#011a76bc1e71ae9a026dddcfd7039084f752c4b6"
|
||||
integrity sha512-FM6AOb3khNkNIXPnHFDYaHerSv8uN22C91z098AnGccVu+Pcdhi+pNUFDi0iLmPIsVE0JBD0KVS7mzUYt4nRzQ==
|
||||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
|
||||
@@ -359,16 +384,16 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^7":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz#c78e309fe967cb4de05b85cdc876fb95f8e01b6f"
|
||||
integrity sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==
|
||||
"@typescript-eslint/eslint-plugin@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.0-alpha.10.tgz#a102e40da7b72a2981cb2da43064d9b3c865ca58"
|
||||
integrity sha512-jsNKqn41nIS8jz5Li5xsueGEBBmRYLaflUKlclEkj8cWrO1tMK1/7xITeiVz7ZlNFZF2nop2NlXrbLtRpLEzhg==
|
||||
dependencies:
|
||||
"@eslint-community/regexpp" "^4.10.0"
|
||||
"@typescript-eslint/scope-manager" "7.8.0"
|
||||
"@typescript-eslint/type-utils" "7.8.0"
|
||||
"@typescript-eslint/utils" "7.8.0"
|
||||
"@typescript-eslint/visitor-keys" "7.8.0"
|
||||
"@typescript-eslint/scope-manager" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/type-utils" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/utils" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/visitor-keys" "8.0.0-alpha.10"
|
||||
debug "^4.3.4"
|
||||
graphemer "^1.4.0"
|
||||
ignore "^5.3.1"
|
||||
@@ -376,47 +401,47 @@
|
||||
semver "^7.6.0"
|
||||
ts-api-utils "^1.3.0"
|
||||
|
||||
"@typescript-eslint/parser@^7":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.8.0.tgz#1e1db30c8ab832caffee5f37e677dbcb9357ddc8"
|
||||
integrity sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==
|
||||
"@typescript-eslint/parser@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.0.0-alpha.10.tgz#fbefd39da010d65407b985f2b5c6e0a79bc8a6f4"
|
||||
integrity sha512-4EerPviLfBKgExHARehJgWrCtX2a7+PXBc0LBPlH93ypSgj0LU1ejMgjrB0gcfd6bJ7LN/UGNAAy3B7/Y785sA==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "7.8.0"
|
||||
"@typescript-eslint/types" "7.8.0"
|
||||
"@typescript-eslint/typescript-estree" "7.8.0"
|
||||
"@typescript-eslint/visitor-keys" "7.8.0"
|
||||
"@typescript-eslint/scope-manager" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/types" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/typescript-estree" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/visitor-keys" "8.0.0-alpha.10"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/scope-manager@7.8.0":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz#bb19096d11ec6b87fb6640d921df19b813e02047"
|
||||
integrity sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==
|
||||
"@typescript-eslint/scope-manager@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.0.0-alpha.10.tgz#25506ce51ab64e99f2bc0b7d3f0f82656e14a794"
|
||||
integrity sha512-SUU0yhqehjuWilWRJWfhcxf6eMKVrZ3bpV2w6NF6GmBHR3FJo6oWZYLVXP04s6//INxpC2ynvKSglo4LRzWVTw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "7.8.0"
|
||||
"@typescript-eslint/visitor-keys" "7.8.0"
|
||||
"@typescript-eslint/types" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/visitor-keys" "8.0.0-alpha.10"
|
||||
|
||||
"@typescript-eslint/type-utils@7.8.0":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz#9de166f182a6e4d1c5da76e94880e91831e3e26f"
|
||||
integrity sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==
|
||||
"@typescript-eslint/type-utils@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.0.0-alpha.10.tgz#d27f0fdd81450380887b3a07297440ba3588a70e"
|
||||
integrity sha512-6aTcbnDZWKgKr3gquECJSFyvXWLSKtUHrk2ZXDP4DEzmzTDjrkY7tIQpqv4SczPQJ+3/aky3ArPhtnQYJbAMzg==
|
||||
dependencies:
|
||||
"@typescript-eslint/typescript-estree" "7.8.0"
|
||||
"@typescript-eslint/utils" "7.8.0"
|
||||
"@typescript-eslint/typescript-estree" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/utils" "8.0.0-alpha.10"
|
||||
debug "^4.3.4"
|
||||
ts-api-utils "^1.3.0"
|
||||
|
||||
"@typescript-eslint/types@7.8.0":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.8.0.tgz#1fd2577b3ad883b769546e2d1ef379f929a7091d"
|
||||
integrity sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==
|
||||
"@typescript-eslint/types@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.0.0-alpha.10.tgz#89be400c6a1751fe86f5917ed8087ec100e002da"
|
||||
integrity sha512-prbN+b/I4yH6H43WmyenMz8K5e34Hs73BQuWXR4wwij3Cg2xNGLPcpjr2cKWKlH4dZQPTz6R6oBeC+LfaoKi8g==
|
||||
|
||||
"@typescript-eslint/typescript-estree@7.8.0":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz#b028a9226860b66e623c1ee55cc2464b95d2987c"
|
||||
integrity sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==
|
||||
"@typescript-eslint/typescript-estree@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.0-alpha.10.tgz#e850056d2a5029688269a60206dec3bbd7beb953"
|
||||
integrity sha512-8wBUIhu6IRa440hv5/0ZEnb5JLp/UsfzIXYKRwICUOMTVj2ss1n+w3m1CtT5ghVWy5Z05qkscsbhlKFmZguU8w==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "7.8.0"
|
||||
"@typescript-eslint/visitor-keys" "7.8.0"
|
||||
"@typescript-eslint/types" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/visitor-keys" "8.0.0-alpha.10"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
@@ -424,32 +449,27 @@
|
||||
semver "^7.6.0"
|
||||
ts-api-utils "^1.3.0"
|
||||
|
||||
"@typescript-eslint/utils@7.8.0":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.8.0.tgz#57a79f9c0c0740ead2f622e444cfaeeb9fd047cd"
|
||||
integrity sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==
|
||||
"@typescript-eslint/utils@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.0.0-alpha.10.tgz#b77f743227353bfa493e95409c0e079044c9258e"
|
||||
integrity sha512-WZyNf49CuvaW/whz/B8XjYwXE/wm/EQAXq+Vqgp6BrJb8SC3bMCwGuUxReNDN1o+dNdOC96ofVSvqa8NUQ65Jg==
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils" "^4.4.0"
|
||||
"@types/json-schema" "^7.0.15"
|
||||
"@types/semver" "^7.5.8"
|
||||
"@typescript-eslint/scope-manager" "7.8.0"
|
||||
"@typescript-eslint/types" "7.8.0"
|
||||
"@typescript-eslint/typescript-estree" "7.8.0"
|
||||
"@typescript-eslint/scope-manager" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/types" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/typescript-estree" "8.0.0-alpha.10"
|
||||
semver "^7.6.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@7.8.0":
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz#7285aab991da8bee411a42edbd5db760d22fdd91"
|
||||
integrity sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==
|
||||
"@typescript-eslint/visitor-keys@8.0.0-alpha.10":
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.0-alpha.10.tgz#d0a9250c69cc2f73c7f423c36183d222a329e260"
|
||||
integrity sha512-UohTNnT7S29uQgXsGZY489nWmoBBSJucNdRvog62R1QX9pQQb2pKVV1kHepUxoY2vd+M4tb9SQwZQ3gPNgqQ6w==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "7.8.0"
|
||||
"@typescript-eslint/types" "8.0.0-alpha.10"
|
||||
eslint-visitor-keys "^3.4.3"
|
||||
|
||||
"@ungap/structured-clone@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
|
||||
integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==
|
||||
|
||||
"@xmldom/xmldom@^0.8.8":
|
||||
version "0.8.10"
|
||||
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz#a1337ca426aa61cef9fe15b5b28e340a72f6fa99"
|
||||
@@ -465,7 +485,7 @@ acorn-jsx@^5.3.2:
|
||||
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
|
||||
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
|
||||
|
||||
acorn@^8.9.0:
|
||||
acorn@^8.11.3:
|
||||
version "8.11.3"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
|
||||
integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==
|
||||
@@ -554,14 +574,14 @@ app-builder-bin@4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
|
||||
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==
|
||||
|
||||
app-builder-lib@25.0.0-alpha.6:
|
||||
version "25.0.0-alpha.6"
|
||||
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-25.0.0-alpha.6.tgz#3edb49843b249a1dd52b32a80f9787677bc5a32b"
|
||||
integrity sha512-kXveR7MFTJXBwb2xB2geKWeWP+YGcJ3IzWRgTEV96zwyo4IxzE5xRXcndSQQglmlzw/VoM5Mx322E9ErYbMCVg==
|
||||
app-builder-lib@25.0.0-alpha.8:
|
||||
version "25.0.0-alpha.8"
|
||||
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-25.0.0-alpha.8.tgz#e8065005b0b5d43f22153ac72101f71bf4e1022b"
|
||||
integrity sha512-d/pcaTcDv3gfdl9AGGP/DKvc+A+TdJmG15f+vqPeEGKOoqLE0ukReaEevXAtH3wOOs5CqgX6QgNPdszeeqFn3Q==
|
||||
dependencies:
|
||||
"@develar/schema-utils" "~2.6.5"
|
||||
"@electron/notarize" "2.3.0"
|
||||
"@electron/osx-sign" "1.0.5"
|
||||
"@electron/osx-sign" "1.3.0"
|
||||
"@electron/rebuild" "3.6.0"
|
||||
"@electron/universal" "2.0.1"
|
||||
"@malept/flatpak-bundler" "^0.4.0"
|
||||
@@ -573,7 +593,7 @@ app-builder-lib@25.0.0-alpha.6:
|
||||
chromium-pickle-js "^0.2.0"
|
||||
debug "^4.3.4"
|
||||
ejs "^3.1.8"
|
||||
electron-publish "25.0.0-alpha.6"
|
||||
electron-publish "25.0.0-alpha.7"
|
||||
form-data "^4.0.0"
|
||||
fs-extra "^10.1.0"
|
||||
hosted-git-info "^4.1.0"
|
||||
@@ -582,7 +602,7 @@ app-builder-lib@25.0.0-alpha.6:
|
||||
js-yaml "^4.1.0"
|
||||
lazy-val "^1.0.5"
|
||||
minimatch "^5.1.1"
|
||||
read-config-file "6.3.2"
|
||||
read-config-file "6.4.0"
|
||||
sanitize-filename "^1.6.3"
|
||||
semver "^7.3.8"
|
||||
tar "^6.1.12"
|
||||
@@ -718,7 +738,14 @@ brace-expansion@^2.0.1:
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
|
||||
braces@^3.0.2, braces@~3.0.2:
|
||||
braces@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
|
||||
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
|
||||
dependencies:
|
||||
fill-range "^7.1.1"
|
||||
|
||||
braces@~3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
||||
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
||||
@@ -1007,6 +1034,14 @@ conf@^10.2.0:
|
||||
pkg-up "^3.1.0"
|
||||
semver "^7.3.5"
|
||||
|
||||
config-file-ts@0.2.8-rc1:
|
||||
version "0.2.8-rc1"
|
||||
resolved "https://registry.yarnpkg.com/config-file-ts/-/config-file-ts-0.2.8-rc1.tgz#fb7fc6ccb2e313f69dbeb78f1db0b00038049de0"
|
||||
integrity sha512-GtNECbVI82bT4RiDIzBSVuTKoSHufnU7Ce7/42bkWZJZFLjmDF2WBpVsvRkhKCfKBnTBb3qZrBwPpFBU/Myvhg==
|
||||
dependencies:
|
||||
glob "^10.3.12"
|
||||
typescript "^5.4.3"
|
||||
|
||||
config-file-ts@^0.2.4:
|
||||
version "0.2.6"
|
||||
resolved "https://registry.yarnpkg.com/config-file-ts/-/config-file-ts-0.2.6.tgz#b424ff74612fb37f626d6528f08f92ddf5d22027"
|
||||
@@ -1055,13 +1090,20 @@ debounce-fn@^4.0.0:
|
||||
dependencies:
|
||||
mimic-fn "^3.0.0"
|
||||
|
||||
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
|
||||
debug@4, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debug@^4.1.0, debug@^4.1.1, debug@^4.3.4:
|
||||
version "4.3.5"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e"
|
||||
integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
decompress-response@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
|
||||
@@ -1149,12 +1191,12 @@ dir-glob@^3.0.1:
|
||||
dependencies:
|
||||
path-type "^4.0.0"
|
||||
|
||||
dmg-builder@25.0.0-alpha.6:
|
||||
version "25.0.0-alpha.6"
|
||||
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-25.0.0-alpha.6.tgz#1a13008de0543c3080595534ab294cde2a5e57e8"
|
||||
integrity sha512-GStVExwsuumGN6rPGJksA5bLN5n5QEQd5iQrGKyBSxuwR1+LWidFkM+anroXnANIyTwbppk2S7+808vHjT/Eyw==
|
||||
dmg-builder@25.0.0-alpha.8:
|
||||
version "25.0.0-alpha.8"
|
||||
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-25.0.0-alpha.8.tgz#fe887023ffc9ce72dfd2472303a76ec008a156d2"
|
||||
integrity sha512-1/Sfl1sQugHkHEobFafyx1HcmgkFj8pV7HFEK0NQ8bH5K2qsGvknjAeHjtYhV2sBoSNGod4P0SfbScS6p6h4eg==
|
||||
dependencies:
|
||||
app-builder-lib "25.0.0-alpha.6"
|
||||
app-builder-lib "25.0.0-alpha.8"
|
||||
builder-util "25.0.0-alpha.6"
|
||||
builder-util-runtime "9.2.5-alpha.2"
|
||||
fs-extra "^10.1.0"
|
||||
@@ -1177,13 +1219,6 @@ dmg-license@^1.0.11:
|
||||
smart-buffer "^4.0.2"
|
||||
verror "^1.10.0"
|
||||
|
||||
doctrine@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
|
||||
integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
|
||||
dependencies:
|
||||
esutils "^2.0.2"
|
||||
|
||||
dot-prop@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083"
|
||||
@@ -1191,11 +1226,23 @@ dot-prop@^6.0.1:
|
||||
dependencies:
|
||||
is-obj "^2.0.0"
|
||||
|
||||
dotenv-expand@^11.0.6:
|
||||
version "11.0.6"
|
||||
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-11.0.6.tgz#f2c840fd924d7c77a94eff98f153331d876882d3"
|
||||
integrity sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==
|
||||
dependencies:
|
||||
dotenv "^16.4.4"
|
||||
|
||||
dotenv-expand@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0"
|
||||
integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==
|
||||
|
||||
dotenv@^16.4.4, dotenv@^16.4.5:
|
||||
version "16.4.5"
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
|
||||
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==
|
||||
|
||||
dotenv@^9.0.2:
|
||||
version "9.0.2"
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05"
|
||||
@@ -1208,16 +1255,16 @@ ejs@^3.1.8:
|
||||
dependencies:
|
||||
jake "^10.8.5"
|
||||
|
||||
electron-builder@25.0.0-alpha.6:
|
||||
version "25.0.0-alpha.6"
|
||||
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-25.0.0-alpha.6.tgz#a72f96f7029539ac28f92ce5c83f872ba3b6e7c1"
|
||||
integrity sha512-qXzzdID2W9hhx3TXddwXv1C5HsqjF6bKnftUtywAB/gtDwu+neifPZvnXDNHI4ZamRrZpJJH59esfkqkc2KNSQ==
|
||||
electron-builder@25.0.0-alpha.8:
|
||||
version "25.0.0-alpha.8"
|
||||
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-25.0.0-alpha.8.tgz#7238623cf7a753d0da31f16daea8767d0ef6d572"
|
||||
integrity sha512-nfrtTljEZackbhJE1BcK+RFXrPvrkrBo0TgR0gH2GxNhPiRTwj/S24K3zHbYj6vBaDVtnqlS6Mqm8tMUrRU4tA==
|
||||
dependencies:
|
||||
app-builder-lib "25.0.0-alpha.6"
|
||||
app-builder-lib "25.0.0-alpha.8"
|
||||
builder-util "25.0.0-alpha.6"
|
||||
builder-util-runtime "9.2.5-alpha.2"
|
||||
chalk "^4.1.2"
|
||||
dmg-builder "25.0.0-alpha.6"
|
||||
dmg-builder "25.0.0-alpha.8"
|
||||
fs-extra "^10.1.0"
|
||||
is-ci "^3.0.0"
|
||||
lazy-val "^1.0.5"
|
||||
@@ -1226,14 +1273,14 @@ electron-builder@25.0.0-alpha.6:
|
||||
yargs "^17.6.2"
|
||||
|
||||
electron-log@^5.1:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-5.1.2.tgz#fb40ad7f4ae694dd0e4c02c662d1a65c03e1243e"
|
||||
integrity sha512-Cpg4hAZ27yM9wzE77c4TvgzxzavZ+dVltCczParXN+Vb3jocojCSAuSMCVOI9fhFuuOR+iuu3tZLX1cu0y0kgQ==
|
||||
version "5.1.5"
|
||||
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-5.1.5.tgz#70d5051fc5ab7669b2592f53f72034867269c96e"
|
||||
integrity sha512-vuq10faUAxRbILgQx7yHoMObKZDEfj7hMSZrJPsVrDNeCpV/HN11dU7QuY4UDUe055pzBxhSCB3m0+6D3Aktjw==
|
||||
|
||||
electron-publish@25.0.0-alpha.6:
|
||||
version "25.0.0-alpha.6"
|
||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-25.0.0-alpha.6.tgz#8af3cb6e2435c00b8c71de43c330483808df5924"
|
||||
integrity sha512-Hin+6j+jiXBc5g6Wlv9JB5Xu7MADBHxZAndt4WE7luCw7b3+OJdQeDvD/uYiCLpiG8cc2NLxu4MyBSVu86MrJA==
|
||||
electron-publish@25.0.0-alpha.7:
|
||||
version "25.0.0-alpha.7"
|
||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-25.0.0-alpha.7.tgz#3c1944c8890b22d5f674772bf16c5382da248861"
|
||||
integrity sha512-d9R6Jnds3PjzBM4Wt3nRn9ramkbM3kBzt9a6WHQL4/09ByyZGZ1Cu9GS9atRCkH3tBJlOIotUYVhVO36lk3sAA==
|
||||
dependencies:
|
||||
"@types/fs-extra" "^9.0.11"
|
||||
builder-util "25.0.0-alpha.6"
|
||||
@@ -1266,9 +1313,9 @@ electron-updater@^6.2:
|
||||
tiny-typed-emitter "^2.1.0"
|
||||
|
||||
electron@^30:
|
||||
version "30.0.6"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-30.0.6.tgz#9ddea5f68396ecca88ad7c2c466a30fc9c16144b"
|
||||
integrity sha512-PkhEPFdpYcTzjAO3gMHZ+map7g2+xCrMDedo/L1i0ir2BRXvAB93IkTJX497U6Srb/09r2cFt+k20VPNVCdw3Q==
|
||||
version "30.0.9"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-30.0.9.tgz#b11400e4642a4b635e79244ba365f1d401ee60b5"
|
||||
integrity sha512-ArxgdGHVu3o5uaP+Tqj8cJDvU03R6vrGrOqiMs7JXLnvQHMqXJIIxmFKQAIdJW8VoT3ac3hD21tA7cPO10RLow==
|
||||
dependencies:
|
||||
"@electron/get" "^2.0.0"
|
||||
"@types/node" "^20.9.0"
|
||||
@@ -1330,54 +1377,55 @@ escape-string-regexp@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||
|
||||
eslint-scope@^7.2.2:
|
||||
version "7.2.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"
|
||||
integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==
|
||||
eslint-scope@^8.0.1:
|
||||
version "8.0.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc"
|
||||
integrity sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==
|
||||
dependencies:
|
||||
esrecurse "^4.3.0"
|
||||
estraverse "^5.2.0"
|
||||
|
||||
eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3:
|
||||
eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3:
|
||||
version "3.4.3"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
|
||||
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
|
||||
|
||||
eslint@^8:
|
||||
version "8.57.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668"
|
||||
integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==
|
||||
eslint-visitor-keys@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb"
|
||||
integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==
|
||||
|
||||
eslint@^9.4.0:
|
||||
version "9.4.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.4.0.tgz#79150c3610ae606eb131f1d648d5f43b3d45f3cd"
|
||||
integrity sha512-sjc7Y8cUD1IlwYcTS9qPSvGjAC8Ne9LctpxKKu3x/1IC9bnOg98Zy6GxEJUfr1NojMgVPlyANXYns8oE2c1TAA==
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils" "^4.2.0"
|
||||
"@eslint-community/regexpp" "^4.6.1"
|
||||
"@eslint/eslintrc" "^2.1.4"
|
||||
"@eslint/js" "8.57.0"
|
||||
"@humanwhocodes/config-array" "^0.11.14"
|
||||
"@eslint/config-array" "^0.15.1"
|
||||
"@eslint/eslintrc" "^3.1.0"
|
||||
"@eslint/js" "9.4.0"
|
||||
"@humanwhocodes/module-importer" "^1.0.1"
|
||||
"@humanwhocodes/retry" "^0.3.0"
|
||||
"@nodelib/fs.walk" "^1.2.8"
|
||||
"@ungap/structured-clone" "^1.2.0"
|
||||
ajv "^6.12.4"
|
||||
chalk "^4.0.0"
|
||||
cross-spawn "^7.0.2"
|
||||
debug "^4.3.2"
|
||||
doctrine "^3.0.0"
|
||||
escape-string-regexp "^4.0.0"
|
||||
eslint-scope "^7.2.2"
|
||||
eslint-visitor-keys "^3.4.3"
|
||||
espree "^9.6.1"
|
||||
eslint-scope "^8.0.1"
|
||||
eslint-visitor-keys "^4.0.0"
|
||||
espree "^10.0.1"
|
||||
esquery "^1.4.2"
|
||||
esutils "^2.0.2"
|
||||
fast-deep-equal "^3.1.3"
|
||||
file-entry-cache "^6.0.1"
|
||||
file-entry-cache "^8.0.0"
|
||||
find-up "^5.0.0"
|
||||
glob-parent "^6.0.2"
|
||||
globals "^13.19.0"
|
||||
graphemer "^1.4.0"
|
||||
ignore "^5.2.0"
|
||||
imurmurhash "^0.1.4"
|
||||
is-glob "^4.0.0"
|
||||
is-path-inside "^3.0.3"
|
||||
js-yaml "^4.1.0"
|
||||
json-stable-stringify-without-jsonify "^1.0.1"
|
||||
levn "^0.4.1"
|
||||
lodash.merge "^4.6.2"
|
||||
@@ -1387,14 +1435,14 @@ eslint@^8:
|
||||
strip-ansi "^6.0.1"
|
||||
text-table "^0.2.0"
|
||||
|
||||
espree@^9.6.0, espree@^9.6.1:
|
||||
version "9.6.1"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||
integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==
|
||||
espree@^10.0.1:
|
||||
version "10.0.1"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f"
|
||||
integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==
|
||||
dependencies:
|
||||
acorn "^8.9.0"
|
||||
acorn "^8.11.3"
|
||||
acorn-jsx "^5.3.2"
|
||||
eslint-visitor-keys "^3.4.1"
|
||||
eslint-visitor-keys "^4.0.0"
|
||||
|
||||
esquery@^1.4.2:
|
||||
version "1.5.0"
|
||||
@@ -1491,12 +1539,12 @@ ffmpeg-static@^5.2:
|
||||
https-proxy-agent "^5.0.0"
|
||||
progress "^2.0.3"
|
||||
|
||||
file-entry-cache@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
|
||||
integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==
|
||||
file-entry-cache@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f"
|
||||
integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==
|
||||
dependencies:
|
||||
flat-cache "^3.0.4"
|
||||
flat-cache "^4.0.0"
|
||||
|
||||
filelist@^1.0.4:
|
||||
version "1.0.4"
|
||||
@@ -1505,10 +1553,10 @@ filelist@^1.0.4:
|
||||
dependencies:
|
||||
minimatch "^5.0.1"
|
||||
|
||||
fill-range@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
||||
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
||||
fill-range@^7.0.1, fill-range@^7.1.1:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
|
||||
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
@@ -1527,14 +1575,13 @@ find-up@^5.0.0:
|
||||
locate-path "^6.0.0"
|
||||
path-exists "^4.0.0"
|
||||
|
||||
flat-cache@^3.0.4:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee"
|
||||
integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==
|
||||
flat-cache@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c"
|
||||
integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==
|
||||
dependencies:
|
||||
flatted "^3.2.9"
|
||||
keyv "^4.5.3"
|
||||
rimraf "^3.0.2"
|
||||
keyv "^4.5.4"
|
||||
|
||||
flatted@^3.2.9:
|
||||
version "3.3.1"
|
||||
@@ -1678,7 +1725,7 @@ glob-parent@^6.0.2:
|
||||
dependencies:
|
||||
is-glob "^4.0.3"
|
||||
|
||||
glob@^10.3.10, glob@^10.3.7:
|
||||
glob@^10.3.10:
|
||||
version "10.3.12"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b"
|
||||
integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==
|
||||
@@ -1689,6 +1736,17 @@ glob@^10.3.10, glob@^10.3.7:
|
||||
minipass "^7.0.4"
|
||||
path-scurry "^1.10.2"
|
||||
|
||||
glob@^10.3.12, glob@^10.3.7:
|
||||
version "10.4.1"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2"
|
||||
integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==
|
||||
dependencies:
|
||||
foreground-child "^3.1.0"
|
||||
jackspeak "^3.1.2"
|
||||
minimatch "^9.0.4"
|
||||
minipass "^7.1.2"
|
||||
path-scurry "^1.11.1"
|
||||
|
||||
glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
@@ -1724,12 +1782,10 @@ global-agent@^3.0.0:
|
||||
semver "^7.3.2"
|
||||
serialize-error "^7.0.1"
|
||||
|
||||
globals@^13.19.0:
|
||||
version "13.24.0"
|
||||
resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171"
|
||||
integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==
|
||||
dependencies:
|
||||
type-fest "^0.20.2"
|
||||
globals@^14.0.0:
|
||||
version "14.0.0"
|
||||
resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
|
||||
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==
|
||||
|
||||
globalthis@^1.0.1:
|
||||
version "1.0.4"
|
||||
@@ -2048,7 +2104,7 @@ isexe@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
|
||||
|
||||
jackspeak@2.1.1, jackspeak@^2.3.6:
|
||||
jackspeak@2.1.1, jackspeak@^2.3.6, jackspeak@^3.1.2:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.1.1.tgz#2a42db4cfbb7e55433c28b6f75d8b796af9669cd"
|
||||
integrity sha512-juf9stUEwUaILepraGOWIJTLwg48bUnBmRqd2ln2Os1sW987zeoj/hzhbvRB95oMuS2ZTpjULmdwHNX4rzZIZw==
|
||||
@@ -2114,7 +2170,7 @@ json-stringify-safe@^5.0.1:
|
||||
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
|
||||
|
||||
json5@^2.2.0:
|
||||
json5@^2.2.0, json5@^2.2.3:
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
|
||||
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
|
||||
@@ -2135,7 +2191,7 @@ jsonfile@^6.0.1:
|
||||
optionalDependencies:
|
||||
graceful-fs "^4.1.6"
|
||||
|
||||
keyv@^4.0.0, keyv@^4.5.3:
|
||||
keyv@^4.0.0, keyv@^4.5.4:
|
||||
version "4.5.4"
|
||||
resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
|
||||
integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==
|
||||
@@ -2255,11 +2311,11 @@ merge2@^1.3.0, merge2@^1.4.1:
|
||||
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
|
||||
|
||||
micromatch@^4.0.4:
|
||||
version "4.0.5"
|
||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
|
||||
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
|
||||
version "4.0.7"
|
||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5"
|
||||
integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==
|
||||
dependencies:
|
||||
braces "^3.0.2"
|
||||
braces "^3.0.3"
|
||||
picomatch "^2.3.1"
|
||||
|
||||
mime-db@1.52.0:
|
||||
@@ -2376,10 +2432,10 @@ minipass@^5.0.0:
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
|
||||
integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==
|
||||
|
||||
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c"
|
||||
integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==
|
||||
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4, minipass@^7.1.0, minipass@^7.1.2:
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
|
||||
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
|
||||
|
||||
minizlib@^2.1.1, minizlib@^2.1.2:
|
||||
version "2.1.2"
|
||||
@@ -2526,17 +2582,17 @@ onetime@^5.1.0, onetime@^5.1.2:
|
||||
dependencies:
|
||||
mimic-fn "^2.1.0"
|
||||
|
||||
onnxruntime-common@1.17.3:
|
||||
version "1.17.3"
|
||||
resolved "https://registry.yarnpkg.com/onnxruntime-common/-/onnxruntime-common-1.17.3.tgz#aadc456477873a540ee3d611ae9cd4f3de7c43e5"
|
||||
integrity sha512-IkbaDelNVX8cBfHFgsNADRIq2TlXMFWW+nG55mwWvQT4i0NZb32Jf35Pf6h9yjrnK78RjcnlNYaI37w394ovMw==
|
||||
onnxruntime-common@1.18.0:
|
||||
version "1.18.0"
|
||||
resolved "https://registry.yarnpkg.com/onnxruntime-common/-/onnxruntime-common-1.18.0.tgz#b904dc6ff134e7f21a3eab702fac17538f59e116"
|
||||
integrity sha512-lufrSzX6QdKrktAELG5x5VkBpapbCeS3dQwrXbN0eD9rHvU0yAWl7Ztju9FvgAKWvwd/teEKJNj3OwM6eTZh3Q==
|
||||
|
||||
onnxruntime-node@^1.17:
|
||||
version "1.17.3"
|
||||
resolved "https://registry.yarnpkg.com/onnxruntime-node/-/onnxruntime-node-1.17.3.tgz#53b8b7ef68bf3834bba9d7be592e4c2d718d2018"
|
||||
integrity sha512-NtbN1pfApTSEjVq46LrJ396aPP2Gjhy+oYZi5Bu1leDXAEvVap/BQ8CZELiLs7z0UnXy3xjJW23HiB4P3//FIw==
|
||||
onnxruntime-node@^1.18:
|
||||
version "1.18.0"
|
||||
resolved "https://registry.yarnpkg.com/onnxruntime-node/-/onnxruntime-node-1.18.0.tgz#ad3947365ca038ec3a16fa4c48972708ccd294e9"
|
||||
integrity sha512-iTnFcxKpmywCatx8ov4GTbECe3tJk2Bp1OA2mWRJde78q+7tpPYBhKMnwhlaoKy9oKQcy4UoEuuhoy2PSD13ww==
|
||||
dependencies:
|
||||
onnxruntime-common "1.17.3"
|
||||
onnxruntime-common "1.18.0"
|
||||
tar "^7.0.1"
|
||||
|
||||
optionator@^0.9.3:
|
||||
@@ -2648,10 +2704,10 @@ path-parse@^1.0.7:
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
|
||||
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
|
||||
|
||||
path-scurry@^1.10.2:
|
||||
version "1.10.2"
|
||||
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7"
|
||||
integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==
|
||||
path-scurry@^1.10.2, path-scurry@^1.11.1:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2"
|
||||
integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==
|
||||
dependencies:
|
||||
lru-cache "^10.2.0"
|
||||
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||
@@ -2706,9 +2762,9 @@ prettier-plugin-packagejson@^2:
|
||||
synckit "0.9.0"
|
||||
|
||||
prettier@^3:
|
||||
version "3.2.5"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
|
||||
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.0.tgz#d173ea0524a691d4c0b1181752f2b46724328cdf"
|
||||
integrity sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==
|
||||
|
||||
progress@^2.0.3:
|
||||
version "2.0.3"
|
||||
@@ -2770,6 +2826,18 @@ read-config-file@6.3.2:
|
||||
json5 "^2.2.0"
|
||||
lazy-val "^1.0.4"
|
||||
|
||||
read-config-file@6.4.0:
|
||||
version "6.4.0"
|
||||
resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-6.4.0.tgz#970542833216cccff6b1d83320495003dcf85a45"
|
||||
integrity sha512-uB5QOBeF84PT61GlV11OTV4jUGHAO3iDEOP6v9ygxhG6Bs9PLg7WsjNT6mtIX2G+x8lJTr4ZWNeG6LDTKkNf2Q==
|
||||
dependencies:
|
||||
config-file-ts "0.2.8-rc1"
|
||||
dotenv "^16.4.5"
|
||||
dotenv-expand "^11.0.6"
|
||||
js-yaml "^4.1.0"
|
||||
json5 "^2.2.3"
|
||||
lazy-val "^1.0.5"
|
||||
|
||||
readable-stream@^3.0.2, readable-stream@^3.4.0, readable-stream@^3.6.0:
|
||||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
|
||||
@@ -2860,9 +2928,9 @@ rimraf@^3.0.2:
|
||||
glob "^7.1.3"
|
||||
|
||||
rimraf@^5.0.5:
|
||||
version "5.0.5"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.5.tgz#9be65d2d6e683447d2e9013da2bf451139a61ccf"
|
||||
integrity sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==
|
||||
version "5.0.7"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.7.tgz#27bddf202e7d89cb2e0381656380d1734a854a74"
|
||||
integrity sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==
|
||||
dependencies:
|
||||
glob "^10.3.7"
|
||||
|
||||
@@ -2924,12 +2992,12 @@ semver@^6.2.0:
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
|
||||
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
|
||||
|
||||
semver@^7.3.2:
|
||||
semver@^7.3.2, semver@^7.6.0:
|
||||
version "7.6.2"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
|
||||
integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==
|
||||
|
||||
semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.6.0:
|
||||
semver@^7.3.5, semver@^7.3.8, semver@^7.5.3:
|
||||
version "7.6.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d"
|
||||
integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==
|
||||
@@ -3169,13 +3237,13 @@ tar@^6.0.5, tar@^6.1.11, tar@^6.1.12, tar@^6.1.2:
|
||||
yallist "^4.0.0"
|
||||
|
||||
tar@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-7.0.1.tgz#8f6ccebcd91b69e9767a6fc4892799e8b0e606d5"
|
||||
integrity sha512-IjMhdQMZFpKsHEQT3woZVxBtCQY+0wk3CVxdRkGXEgyGa0dNS/ehPvOMr2nmfC7x5Zj2N+l6yZUpmICjLGS35w==
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-7.2.0.tgz#f03ae6ecd2e2bab880f2ef33450f502e761d7548"
|
||||
integrity sha512-hctwP0Nb4AB60bj8WQgRYaMOuJYRAPMGiQUAotms5igN8ppfQM+IvjQ5HcKu1MaZh2Wy2KWVTe563Yj8dfc14w==
|
||||
dependencies:
|
||||
"@isaacs/fs-minipass" "^4.0.0"
|
||||
chownr "^3.0.0"
|
||||
minipass "^5.0.0"
|
||||
minipass "^7.1.0"
|
||||
minizlib "^3.0.1"
|
||||
mkdirp "^3.0.1"
|
||||
yallist "^5.0.0"
|
||||
@@ -3251,11 +3319,6 @@ type-fest@^0.13.1:
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
|
||||
integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
|
||||
|
||||
type-fest@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
|
||||
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
|
||||
|
||||
type-fest@^2.17.0:
|
||||
version "2.19.0"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b"
|
||||
@@ -3266,7 +3329,16 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==
|
||||
|
||||
typescript@^5, typescript@^5.3.3:
|
||||
typescript-eslint@8.0.0-alpha.10:
|
||||
version "8.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.0.0-alpha.10.tgz#2172d41ab30c8447927c3823c5a549b9c09be89f"
|
||||
integrity sha512-iMbN7boDtUmcSDor/J022+H4G018W3r3RSUUr7yoghMTmFuKVIkI89xJHDg82DBGYkA0xOoDNPBr7XfRFbEXKQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/eslint-plugin" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/parser" "8.0.0-alpha.10"
|
||||
"@typescript-eslint/utils" "8.0.0-alpha.10"
|
||||
|
||||
typescript@^5, typescript@^5.3.3, typescript@^5.4.3:
|
||||
version "5.4.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
|
||||
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
|
||||
|
||||
@@ -5,8 +5,6 @@ description: Guide for importing from Steam Authenticator to Ente Auth
|
||||
|
||||
# Migrating from Steam Authenticator
|
||||
|
||||
A guide written by an ente.io lover
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Steam Authenticator code is only supported after auth-v3.0.3, check the app's
|
||||
|
||||
@@ -41,7 +41,7 @@ NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 yarn dev
|
||||
That's about it. If you open http://localhost:3000, you will be able to create
|
||||
an account on a Ente Photos web app running on your machine, and this web app
|
||||
will be connecting to the server running on your local machine at
|
||||
localhost:8080.
|
||||
`localhost:8080`.
|
||||
|
||||
For the mobile apps, you don't even need to build, and can install normal Ente
|
||||
apps and configure them to use your
|
||||
|
||||
@@ -7,17 +7,14 @@ allprojects {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
// mavenLocal() // for FDroid
|
||||
maven {
|
||||
url "${project(':background_fetch').projectDir}/libs"
|
||||
}
|
||||
mavenLocal() /merge/ for FDroid
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.buildDir = "${mobile/lib/main.dartrootProject.buildDir}/${project.name}"
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.jvmargs=-Xmx4608m
|
||||
org.gradle.jvmargs=-Xmx6144m
|
||||
android.enableR8=true
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
@@ -5,7 +5,6 @@ import "dart:isolate";
|
||||
import "package:adaptive_theme/adaptive_theme.dart";
|
||||
import 'package:background_fetch/background_fetch.dart';
|
||||
import "package:computer/computer.dart";
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import "package:flutter/rendering.dart";
|
||||
@@ -39,7 +38,6 @@ import 'package:photos/services/machine_learning/file_ml/remote_fileml_service.d
|
||||
import "package:photos/services/machine_learning/machine_learning_controller.dart";
|
||||
import 'package:photos/services/machine_learning/semantic_search/semantic_search_service.dart';
|
||||
import 'package:photos/services/memories_service.dart';
|
||||
import 'package:photos/services/push_service.dart';
|
||||
import 'package:photos/services/remote_sync_service.dart';
|
||||
import 'package:photos/services/search_service.dart';
|
||||
import "package:photos/services/storage_bonus_service.dart";
|
||||
@@ -238,11 +236,11 @@ Future<void> _init(bool isBackground, {String via = ''}) async {
|
||||
|
||||
if (Platform.isIOS) {
|
||||
// ignore: unawaited_futures
|
||||
PushService.instance.init().then((_) {
|
||||
FirebaseMessaging.onBackgroundMessage(
|
||||
_firebaseMessagingBackgroundHandler,
|
||||
);
|
||||
});
|
||||
// PushService.instance.init().then((_) {
|
||||
// FirebaseMessaging.onBackgroundMessage(
|
||||
// _firebaseMessagingBackgroundHandler,
|
||||
// );
|
||||
// });
|
||||
}
|
||||
|
||||
unawaited(SemanticSearchService.instance.init());
|
||||
@@ -370,35 +368,6 @@ Future<void> _killBGTask([String? taskId]) async {
|
||||
Isolate.current.kill();
|
||||
}
|
||||
|
||||
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
||||
final bool isRunningInFG = await _isRunningInForeground(); // hb
|
||||
final bool isInForeground = AppLifecycleService.instance.isForeground;
|
||||
if (_isProcessRunning) {
|
||||
_logger.info(
|
||||
"Background push received when app is alive and runningInFS: $isRunningInFG inForeground: $isInForeground",
|
||||
);
|
||||
if (PushService.shouldSync(message)) {
|
||||
await _sync('firebaseBgSyncActiveProcess');
|
||||
}
|
||||
} else {
|
||||
// App is dead
|
||||
// ignore: unawaited_futures
|
||||
_runWithLogs(
|
||||
() async {
|
||||
_logger.info("Background push received");
|
||||
if (Platform.isIOS) {
|
||||
_scheduleSuicide(kBGPushTimeout); // To prevent OS from punishing us
|
||||
}
|
||||
await _init(true, via: 'firebasePush');
|
||||
if (PushService.shouldSync(message)) {
|
||||
await _sync('firebaseBgSyncNoActiveProcess');
|
||||
}
|
||||
},
|
||||
prefix: "[fbg]",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _logFGHeartBeatInfo() async {
|
||||
final bool isRunningInFG = await _isRunningInForeground();
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
// import 'package:flutter/foundation.dart';
|
||||
// import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart';
|
||||
import 'package:in_app_purchase/in_app_purchase.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:photos/core/errors.dart';
|
||||
import 'package:photos/core/network/network.dart';
|
||||
@@ -39,6 +38,7 @@ class BillingService {
|
||||
final _logger = Logger("BillingService");
|
||||
final _enteDio = NetworkClient.instance.enteDio;
|
||||
|
||||
// ignore: unused_field
|
||||
bool _isOnSubscriptionPage = false;
|
||||
|
||||
Future<BillingPlans>? _future;
|
||||
@@ -48,23 +48,6 @@ class BillingService {
|
||||
// await FlutterInappPurchase.instance.initConnection;
|
||||
// FlutterInappPurchase.instance.clearTransactionIOS();
|
||||
// }
|
||||
InAppPurchase.instance.purchaseStream.listen((purchases) {
|
||||
if (_isOnSubscriptionPage) {
|
||||
return;
|
||||
}
|
||||
for (final purchase in purchases) {
|
||||
if (purchase.status == PurchaseStatus.purchased) {
|
||||
verifySubscription(
|
||||
purchase.productID,
|
||||
purchase.verificationData.serverVerificationData,
|
||||
).then((response) {
|
||||
InAppPurchase.instance.completePurchase(purchase);
|
||||
});
|
||||
} else if (Platform.isIOS && purchase.pendingCompletePurchase) {
|
||||
InAppPurchase.instance.completePurchase(purchase);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void clearCache() {
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:photos/core/configuration.dart';
|
||||
import 'package:photos/core/constants.dart';
|
||||
import 'package:photos/core/event_bus.dart';
|
||||
import 'package:photos/core/network/network.dart';
|
||||
import 'package:photos/events/signed_in_event.dart';
|
||||
import 'package:photos/services/sync_service.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class PushService {
|
||||
static const kFCMPushToken = "fcm_push_token";
|
||||
static const kLastFCMTokenUpdationTime = "fcm_push_token_updation_time";
|
||||
static const kFCMTokenUpdationIntervalInMicroSeconds = 30 * microSecondsInDay;
|
||||
static const kPushAction = "action";
|
||||
static const kSync = "sync";
|
||||
|
||||
static final PushService instance = PushService._privateConstructor();
|
||||
static final _logger = Logger("PushService");
|
||||
|
||||
late SharedPreferences _prefs;
|
||||
|
||||
PushService._privateConstructor();
|
||||
|
||||
Future<void> init() async {
|
||||
_prefs = await SharedPreferences.getInstance();
|
||||
await Firebase.initializeApp();
|
||||
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
|
||||
_logger.info("Got a message whilst in the foreground!");
|
||||
_handleForegroundPushMessage(message);
|
||||
});
|
||||
try {
|
||||
if (Configuration.instance.hasConfiguredAccount()) {
|
||||
await _configurePushToken();
|
||||
} else {
|
||||
Bus.instance.on<SignedInEvent>().listen((_) async {
|
||||
// ignore: unawaited_futures
|
||||
_configurePushToken();
|
||||
});
|
||||
}
|
||||
} catch (e, s) {
|
||||
_logger.severe("Could not configure push token", e, s);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _configurePushToken() async {
|
||||
final String? fcmToken = await FirebaseMessaging.instance.getToken();
|
||||
final shouldForceRefreshServerToken =
|
||||
DateTime.now().microsecondsSinceEpoch -
|
||||
(_prefs.getInt(kLastFCMTokenUpdationTime) ?? 0) >
|
||||
kFCMTokenUpdationIntervalInMicroSeconds;
|
||||
if (fcmToken != null &&
|
||||
(_prefs.getString(kFCMPushToken) != fcmToken ||
|
||||
shouldForceRefreshServerToken)) {
|
||||
final String? apnsToken = await FirebaseMessaging.instance.getAPNSToken();
|
||||
try {
|
||||
_logger.info("Updating token on server");
|
||||
await _setPushTokenOnServer(fcmToken, apnsToken);
|
||||
await _prefs.setString(kFCMPushToken, fcmToken);
|
||||
await _prefs.setInt(
|
||||
kLastFCMTokenUpdationTime,
|
||||
DateTime.now().microsecondsSinceEpoch,
|
||||
);
|
||||
_logger.info("Push token updated on server");
|
||||
} catch (e) {
|
||||
_logger.severe("Could not set push token", e, StackTrace.current);
|
||||
}
|
||||
} else {
|
||||
_logger.info("Skipping token update");
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _setPushTokenOnServer(
|
||||
String fcmToken,
|
||||
String? apnsToken,
|
||||
) async {
|
||||
await NetworkClient.instance.enteDio.post(
|
||||
"/push/token",
|
||||
data: {
|
||||
"fcmToken": fcmToken,
|
||||
"apnsToken": apnsToken,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _handleForegroundPushMessage(RemoteMessage message) {
|
||||
_logger.info("Message data: ${message.data}");
|
||||
if (message.notification != null) {
|
||||
_logger.info(
|
||||
"Message also contained a notification: ${message.notification}",
|
||||
);
|
||||
}
|
||||
if (shouldSync(message)) {
|
||||
SyncService.instance.sync();
|
||||
}
|
||||
}
|
||||
|
||||
static bool shouldSync(RemoteMessage message) {
|
||||
return message.data.containsKey(kPushAction) &&
|
||||
message.data[kPushAction] == kSync;
|
||||
}
|
||||
}
|
||||
@@ -1,610 +0,0 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import "package:flutter/cupertino.dart";
|
||||
import "package:flutter/foundation.dart";
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:in_app_purchase/in_app_purchase.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:photos/core/errors.dart';
|
||||
import 'package:photos/core/event_bus.dart';
|
||||
import 'package:photos/events/subscription_purchased_event.dart';
|
||||
import "package:photos/generated/l10n.dart";
|
||||
import 'package:photos/models/billing_plan.dart';
|
||||
import 'package:photos/models/subscription.dart';
|
||||
import 'package:photos/models/user_details.dart';
|
||||
import 'package:photos/services/billing_service.dart';
|
||||
import "package:photos/services/update_service.dart";
|
||||
import 'package:photos/services/user_service.dart';
|
||||
import "package:photos/theme/colors.dart";
|
||||
import "package:photos/theme/ente_theme.dart";
|
||||
import 'package:photos/ui/common/loading_widget.dart';
|
||||
import 'package:photos/ui/common/progress_dialog.dart';
|
||||
import "package:photos/ui/components/captioned_text_widget.dart";
|
||||
import "package:photos/ui/components/menu_item_widget/menu_item_widget.dart";
|
||||
import 'package:photos/ui/payment/child_subscription_widget.dart';
|
||||
import 'package:photos/ui/payment/skip_subscription_widget.dart';
|
||||
import 'package:photos/ui/payment/subscription_common_widgets.dart';
|
||||
import 'package:photos/ui/payment/subscription_plan_widget.dart';
|
||||
import "package:photos/ui/payment/view_add_on_widget.dart";
|
||||
import "package:photos/utils/data_util.dart";
|
||||
import 'package:photos/utils/dialog_util.dart';
|
||||
import 'package:photos/utils/toast_util.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
class StoreSubscriptionPage extends StatefulWidget {
|
||||
final bool isOnboarding;
|
||||
|
||||
const StoreSubscriptionPage({
|
||||
this.isOnboarding = false,
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StoreSubscriptionPage> createState() => _StoreSubscriptionPageState();
|
||||
}
|
||||
|
||||
class _StoreSubscriptionPageState extends State<StoreSubscriptionPage> {
|
||||
final _logger = Logger("SubscriptionPage");
|
||||
final _billingService = BillingService.instance;
|
||||
final _userService = UserService.instance;
|
||||
Subscription? _currentSubscription;
|
||||
late StreamSubscription _purchaseUpdateSubscription;
|
||||
late ProgressDialog _dialog;
|
||||
late UserDetails _userDetails;
|
||||
late bool _hasActiveSubscription;
|
||||
bool _hideCurrentPlanSelection = false;
|
||||
late FreePlan _freePlan;
|
||||
late List<BillingPlan> _plans;
|
||||
bool _hasLoadedData = false;
|
||||
bool _isLoading = false;
|
||||
late bool _isActiveStripeSubscriber;
|
||||
EnteColorScheme colorScheme = darkScheme;
|
||||
|
||||
// hasYearlyPlans is used to check if there are yearly plans for given store
|
||||
bool hasYearlyPlans = false;
|
||||
|
||||
// _showYearlyPlan is used to determine if we should show the yearly plans
|
||||
bool showYearlyPlan = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_billingService.setIsOnSubscriptionPage(true);
|
||||
_setupPurchaseUpdateStreamListener();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void _setupPurchaseUpdateStreamListener() {
|
||||
_purchaseUpdateSubscription =
|
||||
InAppPurchase.instance.purchaseStream.listen((purchases) async {
|
||||
if (!_dialog.isShowing()) {
|
||||
await _dialog.show();
|
||||
}
|
||||
for (final purchase in purchases) {
|
||||
_logger.info("Purchase status " + purchase.status.toString());
|
||||
if (purchase.status == PurchaseStatus.purchased) {
|
||||
try {
|
||||
final newSubscription = await _billingService.verifySubscription(
|
||||
purchase.productID,
|
||||
purchase.verificationData.serverVerificationData,
|
||||
);
|
||||
await InAppPurchase.instance.completePurchase(purchase);
|
||||
String text = S.of(context).thankYouForSubscribing;
|
||||
if (!widget.isOnboarding) {
|
||||
final isUpgrade = _hasActiveSubscription &&
|
||||
newSubscription.storage > _currentSubscription!.storage;
|
||||
final isDowngrade = _hasActiveSubscription &&
|
||||
newSubscription.storage < _currentSubscription!.storage;
|
||||
if (isUpgrade) {
|
||||
text = S.of(context).yourPlanWasSuccessfullyUpgraded;
|
||||
} else if (isDowngrade) {
|
||||
text = S.of(context).yourPlanWasSuccessfullyDowngraded;
|
||||
}
|
||||
}
|
||||
showShortToast(context, text);
|
||||
_currentSubscription = newSubscription;
|
||||
_hasActiveSubscription = _currentSubscription!.isValid();
|
||||
setState(() {});
|
||||
await _dialog.hide();
|
||||
Bus.instance.fire(SubscriptionPurchasedEvent());
|
||||
if (widget.isOnboarding) {
|
||||
Navigator.of(context).popUntil((route) => route.isFirst);
|
||||
}
|
||||
} on SubscriptionAlreadyClaimedError catch (e) {
|
||||
_logger.warning("subscription is already claimed ", e);
|
||||
await _dialog.hide();
|
||||
final String title = Platform.isAndroid
|
||||
? S.of(context).playstoreSubscription
|
||||
: S.of(context).appstoreSubscription;
|
||||
final String id = Platform.isAndroid
|
||||
? S.of(context).googlePlayId
|
||||
: S.of(context).appleId;
|
||||
final String message = S.of(context).subAlreadyLinkedErrMessage(id);
|
||||
// ignore: unawaited_futures
|
||||
showErrorDialog(context, title, message);
|
||||
return;
|
||||
} catch (e) {
|
||||
_logger.warning("Could not complete payment ", e);
|
||||
await _dialog.hide();
|
||||
// ignore: unawaited_futures
|
||||
showErrorDialog(
|
||||
context,
|
||||
S.of(context).paymentFailed,
|
||||
S.of(context).paymentFailedTalkToProvider(
|
||||
Platform.isAndroid ? "PlayStore" : "AppStore",
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
} else if (Platform.isIOS && purchase.pendingCompletePurchase) {
|
||||
await InAppPurchase.instance.completePurchase(purchase);
|
||||
await _dialog.hide();
|
||||
} else if (purchase.status == PurchaseStatus.error) {
|
||||
await _dialog.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_purchaseUpdateSubscription.cancel();
|
||||
_billingService.setIsOnSubscriptionPage(false);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
colorScheme = getEnteColorScheme(context);
|
||||
if (!_isLoading) {
|
||||
_isLoading = true;
|
||||
_fetchSubData();
|
||||
}
|
||||
_dialog = createProgressDialog(context, S.of(context).pleaseWait);
|
||||
final appBar = AppBar(
|
||||
title: widget.isOnboarding
|
||||
? null
|
||||
: Text("${S.of(context).subscription}${kDebugMode ? ' Store' : ''}"),
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: appBar,
|
||||
body: _getBody(),
|
||||
);
|
||||
}
|
||||
|
||||
bool _isFreePlanUser() {
|
||||
return _currentSubscription != null &&
|
||||
freeProductID == _currentSubscription!.productID;
|
||||
}
|
||||
|
||||
Future<void> _fetchSubData() async {
|
||||
// ignore: unawaited_futures
|
||||
_userService.getUserDetailsV2(memoryCount: false).then((userDetails) async {
|
||||
_userDetails = userDetails;
|
||||
_currentSubscription = userDetails.subscription;
|
||||
|
||||
_hasActiveSubscription = _currentSubscription!.isValid();
|
||||
_hideCurrentPlanSelection =
|
||||
_currentSubscription?.attributes?.isCancelled ?? false;
|
||||
showYearlyPlan = _currentSubscription!.isYearlyPlan();
|
||||
final billingPlans = await _billingService.getBillingPlans();
|
||||
_isActiveStripeSubscriber =
|
||||
_currentSubscription!.paymentProvider == stripe &&
|
||||
_currentSubscription!.isValid();
|
||||
_plans = billingPlans.plans.where((plan) {
|
||||
final productID = _isActiveStripeSubscriber
|
||||
? plan.stripeID
|
||||
: Platform.isAndroid
|
||||
? plan.androidID
|
||||
: plan.iosID;
|
||||
return productID.isNotEmpty;
|
||||
}).toList();
|
||||
hasYearlyPlans = _plans.any((plan) => plan.period == 'year');
|
||||
if (showYearlyPlan && hasYearlyPlans) {
|
||||
_plans = _plans.where((plan) => plan.period == 'year').toList();
|
||||
} else {
|
||||
_plans = _plans.where((plan) => plan.period != 'year').toList();
|
||||
}
|
||||
_freePlan = billingPlans.freePlan;
|
||||
_hasLoadedData = true;
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Widget _getBody() {
|
||||
if (_hasLoadedData) {
|
||||
if (_userDetails.isPartOfFamily() && !_userDetails.isFamilyAdmin()) {
|
||||
return ChildSubscriptionWidget(userDetails: _userDetails);
|
||||
} else {
|
||||
return _buildPlans();
|
||||
}
|
||||
}
|
||||
return const EnteLoadingWidget();
|
||||
}
|
||||
|
||||
Widget _buildPlans() {
|
||||
final widgets = <Widget>[];
|
||||
widgets.add(
|
||||
SubscriptionHeaderWidget(
|
||||
isOnboarding: widget.isOnboarding,
|
||||
currentUsage: _userDetails.getFamilyOrPersonalUsage(),
|
||||
),
|
||||
);
|
||||
|
||||
widgets.addAll([
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: _isActiveStripeSubscriber
|
||||
? _getStripePlanWidgets()
|
||||
: _getMobilePlanWidgets(),
|
||||
),
|
||||
const Padding(padding: EdgeInsets.all(8)),
|
||||
]);
|
||||
|
||||
if (hasYearlyPlans) {
|
||||
widgets.add(_showSubscriptionToggle());
|
||||
}
|
||||
|
||||
if (_currentSubscription != null) {
|
||||
widgets.add(
|
||||
ValidityWidget(
|
||||
currentSubscription: _currentSubscription,
|
||||
bonusData: _userDetails.bonusData,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (_currentSubscription!.productID == freeProductID) {
|
||||
if (widget.isOnboarding) {
|
||||
widgets.add(SkipSubscriptionWidget(freePlan: _freePlan));
|
||||
}
|
||||
widgets.add(
|
||||
SubFaqWidget(isOnboarding: widget.isOnboarding),
|
||||
);
|
||||
}
|
||||
|
||||
if (_hasActiveSubscription &&
|
||||
_currentSubscription!.productID != freeProductID) {
|
||||
if (_isActiveStripeSubscriber) {
|
||||
widgets.add(
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
|
||||
child: Text(
|
||||
S.of(context).visitWebToManage,
|
||||
style: getEnteTextTheme(context).small.copyWith(
|
||||
color: colorScheme.textMuted,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
widgets.add(
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 40, 16, 4),
|
||||
child: MenuItemWidget(
|
||||
captionedTextWidget: CaptionedTextWidget(
|
||||
title: S.of(context).paymentDetails,
|
||||
),
|
||||
menuItemColor: colorScheme.fillFaint,
|
||||
trailingWidget: Icon(
|
||||
Icons.chevron_right_outlined,
|
||||
color: colorScheme.strokeBase,
|
||||
),
|
||||
singleBorderRadius: 4,
|
||||
alignCaptionedTextToLeft: true,
|
||||
onTap: () async {
|
||||
_onPlatformRestrictedPaymentDetailsClick();
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!widget.isOnboarding) {
|
||||
widgets.add(
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 0),
|
||||
child: MenuItemWidget(
|
||||
captionedTextWidget: CaptionedTextWidget(
|
||||
title: _isFreePlanUser()
|
||||
? S.of(context).familyPlans
|
||||
: S.of(context).manageFamily,
|
||||
),
|
||||
menuItemColor: colorScheme.fillFaint,
|
||||
trailingWidget: Icon(
|
||||
Icons.chevron_right_outlined,
|
||||
color: colorScheme.strokeBase,
|
||||
),
|
||||
singleBorderRadius: 4,
|
||||
alignCaptionedTextToLeft: true,
|
||||
onTap: () async {
|
||||
unawaited(
|
||||
_billingService.launchFamilyPortal(context, _userDetails),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
widgets.add(ViewAddOnButton(_userDetails.bonusData));
|
||||
widgets.add(const SizedBox(height: 80));
|
||||
}
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: widgets,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _onPlatformRestrictedPaymentDetailsClick() {
|
||||
final String paymentProvider = _currentSubscription!.paymentProvider;
|
||||
if (paymentProvider == appStore && !Platform.isAndroid) {
|
||||
launchUrlString("https://apps.apple.com/account/billing");
|
||||
} else if (paymentProvider == playStore && Platform.isAndroid) {
|
||||
launchUrlString(
|
||||
"https://play.google.com/store/account/subscriptions?sku=" +
|
||||
_currentSubscription!.productID +
|
||||
"&package=io.ente.photos",
|
||||
);
|
||||
} else if (paymentProvider == stripe) {
|
||||
showErrorDialog(
|
||||
context,
|
||||
S.of(context).sorry,
|
||||
S.of(context).visitWebToManage,
|
||||
);
|
||||
} else {
|
||||
final String capitalizedWord = paymentProvider.isNotEmpty
|
||||
? '${paymentProvider[0].toUpperCase()}${paymentProvider.substring(1).toLowerCase()}'
|
||||
: '';
|
||||
showErrorDialog(
|
||||
context,
|
||||
S.of(context).sorry,
|
||||
S.of(context).contactToManageSubscription(capitalizedWord),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _filterStorePlansForUi() async {
|
||||
final billingPlans = await _billingService.getBillingPlans();
|
||||
_plans = billingPlans.plans.where((plan) {
|
||||
final productID = _isActiveStripeSubscriber
|
||||
? plan.stripeID
|
||||
: Platform.isAndroid
|
||||
? plan.androidID
|
||||
: plan.iosID;
|
||||
return productID.isNotEmpty;
|
||||
}).toList();
|
||||
hasYearlyPlans = _plans.any((plan) => plan.period == 'year');
|
||||
if (showYearlyPlan) {
|
||||
_plans = _plans.where((plan) => plan.period == 'year').toList();
|
||||
} else {
|
||||
_plans = _plans.where((plan) => plan.period != 'year').toList();
|
||||
}
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
Widget _showSubscriptionToggle() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(left: 8, right: 8, top: 2, bottom: 2),
|
||||
margin: const EdgeInsets.only(bottom: 6),
|
||||
child: Column(
|
||||
children: [
|
||||
RepaintBoundary(
|
||||
child: SizedBox(
|
||||
width: 250,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: SegmentedButton(
|
||||
style: SegmentedButton.styleFrom(
|
||||
selectedBackgroundColor:
|
||||
getEnteColorScheme(context).fillMuted,
|
||||
selectedForegroundColor:
|
||||
getEnteColorScheme(context).textBase,
|
||||
side: BorderSide(
|
||||
color: getEnteColorScheme(context).strokeMuted,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
segments: <ButtonSegment<bool>>[
|
||||
ButtonSegment(
|
||||
label: Text(S.of(context).monthly),
|
||||
value: false,
|
||||
),
|
||||
ButtonSegment(
|
||||
label: Text(S.of(context).yearly),
|
||||
value: true,
|
||||
),
|
||||
],
|
||||
selected: {showYearlyPlan},
|
||||
onSelectionChanged: (p0) {
|
||||
showYearlyPlan = p0.first;
|
||||
_filterStorePlansForUi();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
_isFreePlanUser() && !UpdateService.instance.isPlayStoreFlavor()
|
||||
? Text(
|
||||
S.of(context).twoMonthsFreeOnYearlyPlans,
|
||||
style: getEnteTextTheme(context).miniMuted,
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
const Padding(padding: EdgeInsets.all(8)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> _getStripePlanWidgets() {
|
||||
final List<Widget> planWidgets = [];
|
||||
bool foundActivePlan = false;
|
||||
for (final plan in _plans) {
|
||||
final productID = plan.stripeID;
|
||||
if (productID.isEmpty) {
|
||||
continue;
|
||||
}
|
||||
final isActive = _hasActiveSubscription &&
|
||||
_currentSubscription!.productID == productID;
|
||||
if (isActive) {
|
||||
foundActivePlan = true;
|
||||
}
|
||||
planWidgets.add(
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
if (isActive) {
|
||||
return;
|
||||
}
|
||||
// ignore: unawaited_futures
|
||||
showErrorDialog(
|
||||
context,
|
||||
S.of(context).sorry,
|
||||
S.of(context).visitWebToManage,
|
||||
);
|
||||
},
|
||||
child: SubscriptionPlanWidget(
|
||||
storage: plan.storage,
|
||||
price: plan.price,
|
||||
period: plan.period,
|
||||
isActive: isActive && !_hideCurrentPlanSelection,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (!foundActivePlan && _hasActiveSubscription) {
|
||||
_addCurrentPlanWidget(planWidgets);
|
||||
}
|
||||
return planWidgets;
|
||||
}
|
||||
|
||||
List<Widget> _getMobilePlanWidgets() {
|
||||
bool foundActivePlan = false;
|
||||
final List<Widget> planWidgets = [];
|
||||
if (_hasActiveSubscription &&
|
||||
_currentSubscription!.productID == freeProductID) {
|
||||
foundActivePlan = true;
|
||||
planWidgets.add(
|
||||
SubscriptionPlanWidget(
|
||||
storage: _freePlan.storage,
|
||||
price: S.of(context).freeTrial,
|
||||
period: "",
|
||||
isActive: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
for (final plan in _plans) {
|
||||
final productID = Platform.isAndroid ? plan.androidID : plan.iosID;
|
||||
final isActive = _hasActiveSubscription &&
|
||||
_currentSubscription!.productID == productID;
|
||||
if (isActive) {
|
||||
foundActivePlan = true;
|
||||
}
|
||||
planWidgets.add(
|
||||
Material(
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
if (isActive) {
|
||||
return;
|
||||
}
|
||||
final int addOnBonus =
|
||||
_userDetails.bonusData?.totalAddOnBonus() ?? 0;
|
||||
if (_userDetails.getFamilyOrPersonalUsage() >
|
||||
(plan.storage + addOnBonus)) {
|
||||
_logger.warning(
|
||||
" familyUsage ${convertBytesToReadableFormat(_userDetails.getFamilyOrPersonalUsage())}"
|
||||
" plan storage ${convertBytesToReadableFormat(plan.storage)} "
|
||||
"addOnBonus ${convertBytesToReadableFormat(addOnBonus)},"
|
||||
"overshooting by ${convertBytesToReadableFormat(_userDetails.getFamilyOrPersonalUsage() - (plan.storage + addOnBonus))}",
|
||||
);
|
||||
// ignore: unawaited_futures
|
||||
showErrorDialog(
|
||||
context,
|
||||
S.of(context).sorry,
|
||||
S.of(context).youCannotDowngradeToThisPlan,
|
||||
);
|
||||
return;
|
||||
}
|
||||
await _dialog.show();
|
||||
final ProductDetailsResponse response =
|
||||
await InAppPurchase.instance.queryProductDetails({productID});
|
||||
if (response.notFoundIDs.isNotEmpty) {
|
||||
final errMsg = "Could not find products: " +
|
||||
response.notFoundIDs.toString();
|
||||
_logger.severe(errMsg);
|
||||
await _dialog.hide();
|
||||
await showGenericErrorDialog(
|
||||
context: context,
|
||||
error: Exception(errMsg),
|
||||
);
|
||||
return;
|
||||
}
|
||||
final isCrossGradingOnAndroid = Platform.isAndroid &&
|
||||
_hasActiveSubscription &&
|
||||
_currentSubscription!.productID != freeProductID &&
|
||||
_currentSubscription!.productID != plan.androidID;
|
||||
if (isCrossGradingOnAndroid) {
|
||||
await _dialog.hide();
|
||||
// ignore: unawaited_futures
|
||||
showErrorDialog(
|
||||
context,
|
||||
S.of(context).couldNotUpdateSubscription,
|
||||
S.of(context).pleaseContactSupportAndWeWillBeHappyToHelp,
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
await InAppPurchase.instance.buyNonConsumable(
|
||||
purchaseParam: PurchaseParam(
|
||||
productDetails: response.productDetails[0],
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: SubscriptionPlanWidget(
|
||||
storage: plan.storage,
|
||||
price: plan.price,
|
||||
period: plan.period,
|
||||
isActive: isActive,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (!foundActivePlan && _hasActiveSubscription) {
|
||||
_addCurrentPlanWidget(planWidgets);
|
||||
}
|
||||
return planWidgets;
|
||||
}
|
||||
|
||||
void _addCurrentPlanWidget(List<Widget> planWidgets) {
|
||||
int activePlanIndex = 0;
|
||||
for (; activePlanIndex < _plans.length; activePlanIndex++) {
|
||||
if (_plans[activePlanIndex].storage > _currentSubscription!.storage) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
planWidgets.insert(
|
||||
activePlanIndex,
|
||||
Material(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: SubscriptionPlanWidget(
|
||||
storage: _currentSubscription!.storage,
|
||||
price: _currentSubscription!.price,
|
||||
period: _currentSubscription!.period,
|
||||
isActive: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:photos/core/configuration.dart';
|
||||
import "package:photos/service_locator.dart";
|
||||
import 'package:photos/services/update_service.dart';
|
||||
import "package:photos/ui/payment/store_subscription_page.dart";
|
||||
import 'package:photos/ui/payment/stripe_subscription_page.dart';
|
||||
|
||||
StatefulWidget getSubscriptionPage({bool isOnBoarding = false}) {
|
||||
if (UpdateService.instance.isIndependentFlavor()) {
|
||||
return StripeSubscriptionPage(isOnboarding: isOnBoarding);
|
||||
}
|
||||
if (flagService.enableStripe && _isUserCreatedPostStripeSupport()) {
|
||||
return StripeSubscriptionPage(isOnboarding: isOnBoarding);
|
||||
} else {
|
||||
return StoreSubscriptionPage(isOnboarding: isOnBoarding);
|
||||
}
|
||||
}
|
||||
|
||||
// return true if the user was created after we added support for stripe payment
|
||||
// on frame. We do this check to avoid showing Stripe payment option for earlier
|
||||
// users who might have paid via playStore. This method should be removed once
|
||||
// we have better handling for active play/app store subscription & stripe plans.
|
||||
bool _isUserCreatedPostStripeSupport() {
|
||||
return Configuration.instance.getUserID()! > 1580559962386460;
|
||||
return StripeSubscriptionPage(isOnboarding: isOnBoarding);
|
||||
}
|
||||
|
||||
277
mobile/plugins/ente_cast/pubspec.lock
Normal file
@@ -0,0 +1,277 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
collection:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: collection
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.6"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_linux
|
||||
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_platform_interface
|
||||
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
path_provider_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.4"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.3"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.1"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.5.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
sdks:
|
||||
dart: ">=3.3.0 <4.0.0"
|
||||
flutter: ">=3.19.0"
|
||||
284
mobile/plugins/ente_cast_none/pubspec.lock
Normal file
@@ -0,0 +1,284 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
dio:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dio
|
||||
sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.6"
|
||||
ente_cast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../ente_cast"
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.0.1"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_linux
|
||||
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_platform_interface
|
||||
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
path_provider_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.4"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
shared_preferences:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.3"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.1"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.5.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
sdks:
|
||||
dart: ">=3.3.0 <4.0.0"
|
||||
flutter: ">=3.19.0"
|
||||
@@ -9,14 +9,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "61.0.0"
|
||||
_flutterfire_internals:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _flutterfire_internals
|
||||
sha256: "0cb43f83f36ba8cb20502dee0c205e3f3aafb751732d724aeac3f2e044212cc2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.29"
|
||||
adaptive_theme:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -577,54 +569,6 @@ packages:
|
||||
url: "https://github.com/jesims/file_saver.git"
|
||||
source: git
|
||||
version: "0.2.9"
|
||||
firebase_core:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_core
|
||||
sha256: "6b1152a5af3b1cfe7e45309e96fc1aa14873f410f7aadb3878aa7812acfa7531"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.30.0"
|
||||
firebase_core_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_core_platform_interface
|
||||
sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
firebase_core_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_core_web
|
||||
sha256: c8b02226e548f35aace298e2bb2e6c24e34e8a203d614e742bb1146e5a4ad3c8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.15.0"
|
||||
firebase_messaging:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_messaging
|
||||
sha256: "87e3eda0ecdfeadb5fd1cf0dc5153aea5307a0cfca751c4b1ac97bfdd805660e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.8.1"
|
||||
firebase_messaging_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_platform_interface
|
||||
sha256: "80b4ccf20066b0579ebc88d4678230a5f53ab282fe040e31671af745db1588f9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.5.31"
|
||||
firebase_messaging_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_web
|
||||
sha256: "9224aa4db1ce6f08d96a82978453d37e9980204a20e410a11d9b774b24c6841c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.8.1"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1063,38 +1007,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
in_app_purchase:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: in_app_purchase
|
||||
sha256: def70fbaa2a274f4d835677459f6f7afc5469de912438f86076e51cbd4cbd5b4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.13"
|
||||
in_app_purchase_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: in_app_purchase_android
|
||||
sha256: b9d4ecf70c51ab46222502c050b1535f6249caf9d768c4abd856ea16a18a882d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.3+1"
|
||||
in_app_purchase_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: in_app_purchase_platform_interface
|
||||
sha256: "412efce2b9238c5ace4f057acad43f793ed06880e366d26ae322e796cadb051a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.7"
|
||||
in_app_purchase_storekit:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: in_app_purchase_storekit
|
||||
sha256: e0f860e760488dbd666e0f27e239d128cba744607fc62434dc76c19d1c292439
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.13+1"
|
||||
integration_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
||||
@@ -12,7 +12,7 @@ description: ente photos application
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
|
||||
version: 0.8.128+648
|
||||
version: 0.8.129+649
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
@@ -66,8 +66,6 @@ dependencies:
|
||||
file_saver:
|
||||
# Use forked version till this PR is merged: https://github.com/incrediblezayed/file_saver/pull/87
|
||||
git: https://github.com/jesims/file_saver.git
|
||||
firebase_core: ^2.30.0
|
||||
firebase_messaging: ^14.8.0
|
||||
fk_user_agent: ^2.0.1
|
||||
flutter:
|
||||
sdk: flutter
|
||||
@@ -98,7 +96,6 @@ dependencies:
|
||||
http: ^1.1.0
|
||||
image: ^4.0.17
|
||||
image_editor: ^1.3.0
|
||||
in_app_purchase: ^3.0.7
|
||||
intl: ^0.19.0
|
||||
json_annotation: ^4.8.0
|
||||
latlong2: ^0.9.0
|
||||
@@ -203,7 +200,7 @@ flutter_icons:
|
||||
android: "launcher_icon"
|
||||
adaptive_icon_foreground: "assets/launcher_icon/ente-icon-foreground.png"
|
||||
adaptive_icon_background: "#ffffff"
|
||||
ios: true
|
||||
ios: false # F-Droid
|
||||
image_path: "assets/icon-light.png"
|
||||
|
||||
flutter_native_splash:
|
||||
|
||||
1
mobile/thirdparty/flutter
vendored
Submodule
19
mobile/thirdparty/transistor-background-fetch/LICENSE
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2017 Transistor Software <info@transistorsoft.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
22
mobile/thirdparty/transistor-background-fetch/README.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Transistor Background Fetch
|
||||
===========================================================================
|
||||
|
||||
Copyright (c) 2017 Transistor Software <info@transistorsoft.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
28
mobile/thirdparty/transistor-background-fetch/TSBackgroundFetch.podspec
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Be sure to run `pod lib lint TSBackgroundFetch.podspec' to ensure this is a
|
||||
# valid spec before submitting.
|
||||
#
|
||||
# Any lines starting with a # are optional, but their use is encouraged
|
||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'TSBackgroundFetch'
|
||||
s.version = '0.0.1'
|
||||
s.summary = 'iOS Background Fetch API Manager'
|
||||
|
||||
s.description = <<-DESC
|
||||
iOS Background Fetch API Manager with ability to handle multiple listeners.
|
||||
DESC
|
||||
|
||||
s.homepage = 'http://www.transistorsoft.com'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { 'christocracy' => 'christocracy@gmail.com' }
|
||||
s.source = { :git => 'https://github.com/transistorsoft/transistor-background-fetch.git', :tag => s.version.to_s }
|
||||
s.social_media_url = 'https://twitter.com/christocracy'
|
||||
|
||||
s.ios.deployment_target = '8.0'
|
||||
|
||||
s.source_files = 'ios/TSBackgroundFetch/TSBackgroundFetch/*.{h,m}'
|
||||
s.vendored_frameworks = 'ios/TSBackgroundFetch/TSBackgroundFetch.framework'
|
||||
end
|
||||
9
mobile/thirdparty/transistor-background-fetch/android/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/workspace.xml
|
||||
/.idea/libraries
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
1
mobile/thirdparty/transistor-background-fetch/android/app/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
28
mobile/thirdparty/transistor-background-fetch/android/app/build.gradle
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
defaultConfig {
|
||||
applicationId "com.transistorsoft.backgroundfetch"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
}
|
||||
21
mobile/thirdparty/transistor-background-fetch/android/app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.transistorsoft.backgroundfetch;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.transistorsoft.backgroundfetch", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
11
mobile/thirdparty/transistor-background-fetch/android/app/src/main/AndroidManifest.xml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.transistorsoft.backgroundfetch">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme" />
|
||||
</manifest>
|
||||
@@ -0,0 +1,34 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillColor="#26A69A"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
mobile/thirdparty/transistor-background-fetch/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
vendored
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
BIN
mobile/thirdparty/transistor-background-fetch/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
vendored
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
BIN
mobile/thirdparty/transistor-background-fetch/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
vendored
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
BIN
mobile/thirdparty/transistor-background-fetch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
vendored
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 15 KiB |
6
mobile/thirdparty/transistor-background-fetch/android/app/src/main/res/values/colors.xml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
||||
3
mobile/thirdparty/transistor-background-fetch/android/app/src/main/res/values/strings.xml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">BackgroundFetch</string>
|
||||
</resources>
|
||||
11
mobile/thirdparty/transistor-background-fetch/android/app/src/main/res/values/styles.xml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.transistorsoft.backgroundfetch;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
34
mobile/thirdparty/transistor-background-fetch/android/build.gradle
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
ext {
|
||||
compileSdkVersion = 32
|
||||
targetSdkVersion = 31
|
||||
buildToolsVersion = "29.0.6"
|
||||
appCompatVersion = "1.4.1"
|
||||
}
|
||||
23
mobile/thirdparty/transistor-background-fetch/android/gradle.properties
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
|
||||
VERSION_NAME=0.5.6
|
||||
VERSION_CODE=21
|
||||
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
BIN
mobile/thirdparty/transistor-background-fetch/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Thu Jul 15 09:21:17 EDT 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
160
mobile/thirdparty/transistor-background-fetch/android/gradlew
vendored
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
90
mobile/thirdparty/transistor-background-fetch/android/gradlew.bat
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
1
mobile/thirdparty/transistor-background-fetch/android/settings.gradle
vendored
Normal file
@@ -0,0 +1 @@
|
||||
include ':app', ':tsbackgroundfetch'
|
||||
1
mobile/thirdparty/transistor-background-fetch/android/tsbackgroundfetch/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
152
mobile/thirdparty/transistor-background-fetch/android/tsbackgroundfetch/build.gradle
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.compileSdkVersion
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion rootProject.targetSdkVersion
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
tslocationmanager(MavenPublication) {
|
||||
groupId 'com.transistorsoft'
|
||||
artifactId 'tsbackgroundfetch'
|
||||
version VERSION_NAME
|
||||
artifact("$buildDir/outputs/aar/tsbackgroundfetch-release.aar")
|
||||
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation "androidx.lifecycle:lifecycle-runtime:2.5.1"
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
|
||||
//implementation "androidx.appcompat:appcompat:$rootProject.appCompatVersion"
|
||||
|
||||
}
|
||||
|
||||
// Build Release
|
||||
task buildRelease { task ->
|
||||
task.dependsOn 'flutterRelease'
|
||||
}
|
||||
|
||||
// Publish Release.
|
||||
task publishRelease { task ->
|
||||
task.dependsOn 'assembleRelease'
|
||||
}
|
||||
tasks["publishRelease"].mustRunAfter("assembleRelease")
|
||||
tasks["publishRelease"].finalizedBy("publish")
|
||||
|
||||
def WORKSPACE_PATH = "/Users/chris/workspace"
|
||||
|
||||
// Build local maven repo.
|
||||
def LIBRARY_PATH = "com/transistorsoft/tsbackgroundfetch"
|
||||
task buildLocalRepository { task ->
|
||||
task.dependsOn 'publishRelease'
|
||||
doLast {
|
||||
delete "$buildDir/repo-local"
|
||||
copy {
|
||||
from "$buildDir/repo/$LIBRARY_PATH/$VERSION_NAME"
|
||||
into "$buildDir/repo-local/$LIBRARY_PATH/$VERSION_NAME"
|
||||
}
|
||||
copy {
|
||||
from("$buildDir/repo/$LIBRARY_PATH/maven-metadata.xml")
|
||||
into("$buildDir/repo-local/$LIBRARY_PATH")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def cordovaDir = "$WORKSPACE_PATH/background-geolocation/cordova/cordova-plugin-background-fetch"
|
||||
task cordovaRelease { task ->
|
||||
task.dependsOn 'buildLocalRepository'
|
||||
doLast {
|
||||
delete "$cordovaDir/src/android/libs"
|
||||
copy {
|
||||
// Maven repo format.
|
||||
from("$buildDir/repo-local")
|
||||
into("$cordovaDir/src/android/libs")
|
||||
// OLD FORMAT
|
||||
//from("$buildDir/outputs/aar/tsbackgroundfetch-release.aar")
|
||||
//into("$cordovaDir/src/android/libs/tsbackgroundfetch")
|
||||
//rename(/(.*)-release/, '$1-' + VERSION_NAME)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def reactNativeDir = "$WORKSPACE_PATH/background-geolocation/react/react-native-background-fetch"
|
||||
task reactNativeRelease { task ->
|
||||
task.dependsOn 'buildLocalRepository'
|
||||
doLast {
|
||||
delete "$reactNativeDir/android/libs"
|
||||
copy {
|
||||
// Maven repo format.
|
||||
from("$buildDir/repo-local")
|
||||
into("$reactNativeDir/android/libs")
|
||||
// OLD format.
|
||||
//from("$buildDir/outputs/aar/tsbackgroundfetch-release.aar")
|
||||
//into("$reactNativeDir/android/libs")
|
||||
//rename(/(.*)-release/, '$1-' + VERSION_NAME)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def flutterDir = "$WORKSPACE_PATH/background-geolocation/flutter/flutter_background_fetch"
|
||||
task flutterRelease { task ->
|
||||
task.dependsOn 'buildLocalRepository'
|
||||
doLast {
|
||||
delete "$flutterDir/android/libs"
|
||||
copy {
|
||||
// Maven repo format.
|
||||
from("$buildDir/repo-local")
|
||||
into("$flutterDir/android/libs")
|
||||
// OLD format.
|
||||
//from("$buildDir/outputs/aar/tsbackgroundfetch-release.aar")
|
||||
//into("$flutterDir/android/libs")
|
||||
//rename(/(.*)-release/, '$1-' + VERSION_NAME)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def capacitorDir = "$WORKSPACE_PATH/background-geolocation/capacitor/capacitor-background-fetch"
|
||||
task capacitorRelease { task ->
|
||||
task.dependsOn 'buildLocalRepository'
|
||||
doLast {
|
||||
delete "$capacitorDir/android/libs"
|
||||
copy {
|
||||
// Maven repo format.
|
||||
from("$buildDir/repo-local")
|
||||
into("$capacitorDir/android/libs")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task nativeScriptRelease(type: Copy) {
|
||||
from('./build/outputs/aar/tsbackgroundfetch-release.aar')
|
||||
into("$WORKSPACE_PATH/NativeScript/background-geolocation/nativescript-background-fetch/src/platforms/android/libs")
|
||||
rename('tsbackgroundfetch-release.aar', 'tsbackgroundfetch.aar')
|
||||
}
|
||||
21
mobile/thirdparty/transistor-background-fetch/android/tsbackgroundfetch/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.transistorsoft.tsbackgroundfetch.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.transistorsoft.tsbackgroundfetch">
|
||||
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
|
||||
<application>
|
||||
<receiver android:name="com.transistorsoft.tsbackgroundfetch.FetchAlarmReceiver" />
|
||||
<service android:name="com.transistorsoft.tsbackgroundfetch.FetchJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true" />
|
||||
<receiver android:name="com.transistorsoft.tsbackgroundfetch.BootReceiver" android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,291 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.job.JobInfo;
|
||||
import android.app.job.JobScheduler;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.PersistableBundle;
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class BGTask {
|
||||
static int MAX_TIME = 60000;
|
||||
|
||||
private static final List<BGTask> mTasks = new ArrayList<>();
|
||||
|
||||
static BGTask getTask(String taskId) {
|
||||
synchronized (mTasks) {
|
||||
for (BGTask task : mTasks) {
|
||||
if (task.hasTaskId(taskId)) return task;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static void addTask(BGTask task) {
|
||||
synchronized (mTasks) {
|
||||
mTasks.add(task);
|
||||
}
|
||||
}
|
||||
|
||||
static void removeTask(String taskId) {
|
||||
synchronized (mTasks) {
|
||||
BGTask found = null;
|
||||
for (BGTask task : mTasks) {
|
||||
if (task.hasTaskId(taskId)) {
|
||||
found = task;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found != null) {
|
||||
mTasks.remove(found);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void clear() {
|
||||
synchronized (mTasks) {
|
||||
mTasks.clear();
|
||||
}
|
||||
}
|
||||
|
||||
private FetchJobService.CompletionHandler mCompletionHandler;
|
||||
private String mTaskId;
|
||||
private int mJobId;
|
||||
private Runnable mTimeoutTask;
|
||||
private boolean mTimedout = false;
|
||||
|
||||
BGTask(final Context context, String taskId, FetchJobService.CompletionHandler handler, int jobId) {
|
||||
mTaskId = taskId;
|
||||
mCompletionHandler = handler;
|
||||
mJobId = jobId;
|
||||
|
||||
mTimeoutTask = new Runnable() {
|
||||
@Override public void run() {
|
||||
onTimeout(context);
|
||||
}
|
||||
};
|
||||
BackgroundFetch.getUiHandler().postDelayed(mTimeoutTask, MAX_TIME);
|
||||
}
|
||||
|
||||
public boolean getTimedOut() {
|
||||
return mTimedout;
|
||||
}
|
||||
|
||||
public String getTaskId() { return mTaskId; }
|
||||
|
||||
int getJobId() { return mJobId; }
|
||||
|
||||
boolean hasTaskId(String taskId) {
|
||||
return ((mTaskId != null) && mTaskId.equalsIgnoreCase(taskId));
|
||||
}
|
||||
|
||||
void setCompletionHandler(FetchJobService.CompletionHandler handler) {
|
||||
mCompletionHandler = handler;
|
||||
}
|
||||
|
||||
void finish() {
|
||||
if (mCompletionHandler != null) {
|
||||
mCompletionHandler.finish();
|
||||
}
|
||||
if (mTimeoutTask != null) {
|
||||
BackgroundFetch.getUiHandler().removeCallbacks(mTimeoutTask);
|
||||
}
|
||||
mCompletionHandler = null;
|
||||
removeTask(mTaskId);
|
||||
}
|
||||
|
||||
static void reschedule(Context context, BackgroundFetchConfig existing, BackgroundFetchConfig config) {
|
||||
BGTask existingTask = BGTask.getTask(existing.getTaskId());
|
||||
if (existingTask != null) {
|
||||
existingTask.finish();
|
||||
}
|
||||
cancel(context, existing.getTaskId(), existing.getJobId());
|
||||
|
||||
schedule(context, config);
|
||||
}
|
||||
|
||||
static void schedule(Context context, BackgroundFetchConfig config) {
|
||||
Log.d(BackgroundFetch.TAG, config.toString());
|
||||
|
||||
long interval = (config.isFetchTask()) ? (TimeUnit.MINUTES.toMillis(config.getMinimumFetchInterval())) : config.getDelay();
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !config.getForceAlarmManager()) {
|
||||
// API 21+ uses new JobScheduler API
|
||||
|
||||
JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
|
||||
JobInfo.Builder builder = new JobInfo.Builder(config.getJobId(), new ComponentName(context, FetchJobService.class))
|
||||
.setRequiredNetworkType(config.getRequiredNetworkType())
|
||||
.setRequiresDeviceIdle(config.getRequiresDeviceIdle())
|
||||
.setRequiresCharging(config.getRequiresCharging())
|
||||
.setPersisted(config.getStartOnBoot() && !config.getStopOnTerminate());
|
||||
|
||||
if (config.getPeriodic()) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= 24) {
|
||||
builder.setPeriodic(interval, interval);
|
||||
} else {
|
||||
builder.setPeriodic(interval);
|
||||
}
|
||||
} else {
|
||||
builder.setMinimumLatency(interval);
|
||||
}
|
||||
PersistableBundle extras = new PersistableBundle();
|
||||
extras.putString(BackgroundFetchConfig.FIELD_TASK_ID, config.getTaskId());
|
||||
extras.putLong("scheduled_at", System.currentTimeMillis());
|
||||
|
||||
builder.setExtras(extras);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= 26) {
|
||||
builder.setRequiresStorageNotLow(config.getRequiresStorageNotLow());
|
||||
builder.setRequiresBatteryNotLow(config.getRequiresBatteryNotLow());
|
||||
}
|
||||
if (jobScheduler != null) {
|
||||
jobScheduler.schedule(builder.build());
|
||||
}
|
||||
} else {
|
||||
// Everyone else get AlarmManager
|
||||
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||
if (alarmManager != null) {
|
||||
PendingIntent pi = getAlarmPI(context, config.getTaskId());
|
||||
long delay = System.currentTimeMillis() + interval;
|
||||
if (config.getPeriodic()) {
|
||||
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, delay, interval, pi);
|
||||
} else {
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, delay, pi);
|
||||
} else if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
alarmManager.setExact(AlarmManager.RTC_WAKEUP, delay, pi);
|
||||
} else {
|
||||
alarmManager.set(AlarmManager.RTC_WAKEUP, delay, pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onTimeout(Context context) {
|
||||
mTimedout = true;
|
||||
Log.d(BackgroundFetch.TAG, "[BGTask] timeout: " + mTaskId);
|
||||
|
||||
BackgroundFetch adapter = BackgroundFetch.getInstance(context);
|
||||
|
||||
if (!LifecycleManager.getInstance().isHeadless()) {
|
||||
BackgroundFetch.Callback callback = adapter.getFetchCallback();
|
||||
if (callback != null) {
|
||||
callback.onTimeout(mTaskId);
|
||||
}
|
||||
} else {
|
||||
BackgroundFetchConfig config = adapter.getConfig(mTaskId);
|
||||
if (config != null) {
|
||||
if (config.getJobService() != null) {
|
||||
fireHeadlessEvent(context, config);
|
||||
} else {
|
||||
adapter.finish(mTaskId);
|
||||
}
|
||||
} else {
|
||||
Log.e(BackgroundFetch.TAG, "[BGTask] failed to load config for taskId: " + mTaskId);
|
||||
adapter.finish(mTaskId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fire a headless background-fetch event by reflecting an instance of Config.jobServiceClass.
|
||||
// Will attempt to reflect upon two different forms of Headless class:
|
||||
// 1: new HeadlessTask(context, taskId)
|
||||
// or
|
||||
// 2: new HeadlessTask().onFetch(context, taskId);
|
||||
//
|
||||
void fireHeadlessEvent(Context context, BackgroundFetchConfig config) throws Error {
|
||||
try {
|
||||
// Get class via reflection.
|
||||
Class<?> HeadlessClass = Class.forName(config.getJobService());
|
||||
Class[] types = { Context.class, BGTask.class };
|
||||
Object[] params = { context, this};
|
||||
try {
|
||||
// 1: new HeadlessTask(context, taskId);
|
||||
Constructor<?> constructor = HeadlessClass.getDeclaredConstructor(types);
|
||||
constructor.newInstance(params);
|
||||
} catch (NoSuchMethodException e) {
|
||||
// 2: new HeadlessTask().onFetch(context, taskId);
|
||||
Constructor<?> constructor = HeadlessClass.getConstructor();
|
||||
Object instance = constructor.newInstance();
|
||||
Method onFetch = instance.getClass().getDeclaredMethod("onFetch", types);
|
||||
onFetch.invoke(instance, params);
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new Error(e.getMessage());
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new Error(e.getMessage());
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new Error(e.getMessage());
|
||||
} catch (InstantiationException e) {
|
||||
throw new Error(e.getMessage());
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new Error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
static void cancel(Context context, String taskId, int jobId) {
|
||||
Log.i(BackgroundFetch.TAG, "- cancel taskId=" + taskId + ", jobId=" + jobId);
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && (jobId != 0)) {
|
||||
JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
|
||||
if (jobScheduler != null) {
|
||||
jobScheduler.cancel(jobId);
|
||||
}
|
||||
} else {
|
||||
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||
if (alarmManager != null) {
|
||||
alarmManager.cancel(BGTask.getAlarmPI(context, taskId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static PendingIntent getAlarmPI(Context context, String taskId) {
|
||||
Intent intent = new Intent(context, FetchAlarmReceiver.class);
|
||||
intent.setAction(taskId);
|
||||
return PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_IMMUTABLE);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "[BGTask taskId=" + mTaskId + "]";
|
||||
}
|
||||
|
||||
public Map<String, Object> toMap() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("taskId", mTaskId);
|
||||
map.put("timeout", mTimedout);
|
||||
return map;
|
||||
}
|
||||
|
||||
public JSONObject toJson() {
|
||||
JSONObject json = new JSONObject();
|
||||
try {
|
||||
json.put("taskId", mTaskId);
|
||||
json.put("timeout", mTimedout);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
static class Error extends RuntimeException {
|
||||
public Error(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.ActivityManager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
/**
|
||||
* Created by chris on 2018-01-11.
|
||||
*/
|
||||
|
||||
public class BackgroundFetch {
|
||||
public static final String TAG = "TSBackgroundFetch";
|
||||
|
||||
public static final String ACTION_CONFIGURE = "configure";
|
||||
public static final String ACTION_START = "start";
|
||||
public static final String ACTION_STOP = "stop";
|
||||
public static final String ACTION_FINISH = "finish";
|
||||
public static final String ACTION_STATUS = "status";
|
||||
public static final String ACTION_FORCE_RELOAD = TAG + "-forceReload";
|
||||
|
||||
public static final String EVENT_FETCH = ".event.BACKGROUND_FETCH";
|
||||
|
||||
public static final int STATUS_AVAILABLE = 2;
|
||||
|
||||
private static BackgroundFetch mInstance = null;
|
||||
|
||||
private static ExecutorService sThreadPool;
|
||||
|
||||
private static Handler uiHandler;
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
public static Handler getUiHandler() {
|
||||
if (uiHandler == null) {
|
||||
uiHandler = new Handler(Looper.getMainLooper());
|
||||
}
|
||||
return uiHandler;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
public static ExecutorService getThreadPool() {
|
||||
if (sThreadPool == null) {
|
||||
sThreadPool = Executors.newCachedThreadPool();
|
||||
}
|
||||
return sThreadPool;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
public static BackgroundFetch getInstance(Context context) {
|
||||
if (mInstance == null) {
|
||||
mInstance = getInstanceSynchronized(context.getApplicationContext());
|
||||
}
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
private static synchronized BackgroundFetch getInstanceSynchronized(Context context) {
|
||||
if (mInstance == null) mInstance = new BackgroundFetch(context.getApplicationContext());
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
private Context mContext;
|
||||
private BackgroundFetch.Callback mFetchCallback;
|
||||
|
||||
private final Map<String, BackgroundFetchConfig> mConfig = new HashMap<>();
|
||||
|
||||
private BackgroundFetch(Context context) {
|
||||
mContext = context;
|
||||
// Start Lifecycle Observer to be notified when app enters background.
|
||||
getUiHandler().post(LifecycleManager.getInstance());
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unused"})
|
||||
public void configure(BackgroundFetchConfig config, BackgroundFetch.Callback callback) {
|
||||
Log.d(TAG, "- " + ACTION_CONFIGURE);
|
||||
mFetchCallback = callback;
|
||||
|
||||
synchronized (mConfig) {
|
||||
if (mConfig.containsKey(config.getTaskId())) {
|
||||
// Developer called `.configure` again. Re-configure the plugin by re-scheduling the fetch task.
|
||||
BackgroundFetchConfig existing = mConfig.get(config.getTaskId());
|
||||
Log.d(TAG, "Re-configured existing task");
|
||||
BGTask.reschedule(mContext, existing, config);
|
||||
mConfig.put(config.getTaskId(), config);
|
||||
return;
|
||||
} else {
|
||||
mConfig.put(config.getTaskId(), config);
|
||||
}
|
||||
}
|
||||
start(config.getTaskId());
|
||||
}
|
||||
|
||||
void onBoot() {
|
||||
BackgroundFetchConfig.load(mContext, new BackgroundFetchConfig.OnLoadCallback() {
|
||||
@Override public void onLoad(List<BackgroundFetchConfig> result) {
|
||||
for (BackgroundFetchConfig config : result) {
|
||||
if (!config.getStartOnBoot() || config.getStopOnTerminate()) {
|
||||
config.destroy(mContext);
|
||||
continue;
|
||||
}
|
||||
synchronized (mConfig) {
|
||||
mConfig.put(config.getTaskId(), config);
|
||||
}
|
||||
if ((android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) || config.getForceAlarmManager()) {
|
||||
if (config.isFetchTask()) {
|
||||
start(config.getTaskId());
|
||||
} else {
|
||||
scheduleTask(config);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
@TargetApi(21)
|
||||
public void start(String fetchTaskId) {
|
||||
Log.d(TAG, "- " + ACTION_START);
|
||||
|
||||
BGTask task = BGTask.getTask(fetchTaskId);
|
||||
if (task != null) {
|
||||
Log.e(TAG, "[" + TAG + " start] Task " + fetchTaskId + " already registered");
|
||||
return;
|
||||
}
|
||||
registerTask(fetchTaskId);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
public void stop(String taskId) {
|
||||
String msg = "- " + ACTION_STOP;
|
||||
if (taskId != null) {
|
||||
msg += ": " + taskId;
|
||||
}
|
||||
Log.d(TAG, msg);
|
||||
|
||||
if (taskId == null) {
|
||||
synchronized (mConfig) {
|
||||
for (BackgroundFetchConfig config : mConfig.values()) {
|
||||
BGTask task = BGTask.getTask(config.getTaskId());
|
||||
if (task != null) {
|
||||
task.finish();
|
||||
BGTask.removeTask(config.getTaskId());
|
||||
}
|
||||
BGTask.cancel(mContext, config.getTaskId(), config.getJobId());
|
||||
config.destroy(mContext);
|
||||
}
|
||||
BGTask.clear();
|
||||
}
|
||||
} else {
|
||||
BGTask task = BGTask.getTask(taskId);
|
||||
if (task != null) {
|
||||
task.finish();
|
||||
BGTask.removeTask(task.getTaskId());
|
||||
}
|
||||
BackgroundFetchConfig config = getConfig(taskId);
|
||||
if (config != null) {
|
||||
config.destroy(mContext);
|
||||
BGTask.cancel(mContext, config.getTaskId(), config.getJobId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
public void scheduleTask(BackgroundFetchConfig config) {
|
||||
synchronized (mConfig) {
|
||||
if (mConfig.containsKey(config.getTaskId())) {
|
||||
// This BackgroundFetchConfig already exists? Should we halt any existing Job/Alarm here?
|
||||
}
|
||||
config.save(mContext);
|
||||
mConfig.put(config.getTaskId(), config);
|
||||
}
|
||||
String taskId = config.getTaskId();
|
||||
registerTask(taskId);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
public void finish(String taskId) {
|
||||
Log.d(TAG, "- " + ACTION_FINISH + ": " + taskId);
|
||||
|
||||
BGTask task = BGTask.getTask(taskId);
|
||||
if (task != null) {
|
||||
task.finish();
|
||||
}
|
||||
|
||||
BackgroundFetchConfig config = getConfig(taskId);
|
||||
|
||||
if ((config != null) && !config.getPeriodic()) {
|
||||
config.destroy(mContext);
|
||||
synchronized (mConfig) {
|
||||
mConfig.remove(taskId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int status() {
|
||||
return STATUS_AVAILABLE;
|
||||
}
|
||||
|
||||
BackgroundFetch.Callback getFetchCallback() {
|
||||
return mFetchCallback;
|
||||
}
|
||||
|
||||
void onFetch(final BGTask task) {
|
||||
BGTask.addTask(task);
|
||||
Log.d(TAG, "- Background Fetch event received: " + task.getTaskId());
|
||||
synchronized (mConfig) {
|
||||
if (mConfig.isEmpty()) {
|
||||
BackgroundFetchConfig.load(mContext, new BackgroundFetchConfig.OnLoadCallback() {
|
||||
@Override
|
||||
public void onLoad(List<BackgroundFetchConfig> result) {
|
||||
synchronized (mConfig) {
|
||||
for (BackgroundFetchConfig config : result) {
|
||||
mConfig.put(config.getTaskId(), config);
|
||||
}
|
||||
}
|
||||
doFetch(task);
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
doFetch(task);
|
||||
}
|
||||
|
||||
private void registerTask(String taskId) {
|
||||
BackgroundFetchConfig config = getConfig(taskId);
|
||||
|
||||
if (config == null) {
|
||||
Log.e(TAG, "- registerTask failed to find BackgroundFetchConfig for taskId " + taskId);
|
||||
return;
|
||||
}
|
||||
config.save(mContext);
|
||||
|
||||
String msg = "- registerTask: " + taskId;
|
||||
if (!config.getForceAlarmManager()) {
|
||||
msg += " (jobId: " + config.getJobId() + ")";
|
||||
}
|
||||
Log.d(TAG, msg);
|
||||
|
||||
BGTask.schedule(mContext, config);
|
||||
}
|
||||
|
||||
private void doFetch(BGTask task) {
|
||||
BackgroundFetchConfig config = getConfig(task.getTaskId());
|
||||
|
||||
if (config == null) {
|
||||
BGTask.cancel(mContext, task.getTaskId(), task.getJobId());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!LifecycleManager.getInstance().isHeadless()) {
|
||||
if (mFetchCallback != null) {
|
||||
mFetchCallback.onFetch(task.getTaskId());
|
||||
}
|
||||
} else if (config.getStopOnTerminate()) {
|
||||
Log.d(TAG, "- Stopping on terminate");
|
||||
stop(task.getTaskId());
|
||||
} else if (config.getJobService() != null) {
|
||||
try {
|
||||
task.fireHeadlessEvent(mContext, config);
|
||||
} catch (BGTask.Error e) {
|
||||
Log.e(TAG, "Headless task error: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
// {stopOnTerminate: false, forceReload: false} with no Headless JobService?? Don't know what else to do here but stop
|
||||
Log.w(TAG, "- BackgroundFetch event has occurred while app is terminated but there's no jobService configured to handle the event. BackgroundFetch will terminate.");
|
||||
finish(task.getTaskId());
|
||||
stop(task.getTaskId());
|
||||
}
|
||||
}
|
||||
|
||||
BackgroundFetchConfig getConfig(String taskId) {
|
||||
synchronized (mConfig) {
|
||||
return (mConfig.containsKey(taskId)) ? mConfig.get(taskId) : null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @interface BackgroundFetch.Callback
|
||||
*/
|
||||
public interface Callback {
|
||||
void onFetch(String taskId);
|
||||
void onTimeout(String taskId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,362 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.app.job.JobInfo;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Created by chris on 2018-01-11.
|
||||
*/
|
||||
|
||||
public class BackgroundFetchConfig {
|
||||
private Builder config;
|
||||
|
||||
private static final int MINIMUM_FETCH_INTERVAL = 1;
|
||||
private static final int DEFAULT_FETCH_INTERVAL = 15;
|
||||
|
||||
public static final String FIELD_TASK_ID = "taskId";
|
||||
public static final String FIELD_MINIMUM_FETCH_INTERVAL = "minimumFetchInterval";
|
||||
public static final String FIELD_START_ON_BOOT = "startOnBoot";
|
||||
public static final String FIELD_REQUIRED_NETWORK_TYPE = "requiredNetworkType";
|
||||
public static final String FIELD_REQUIRES_BATTERY_NOT_LOW = "requiresBatteryNotLow";
|
||||
public static final String FIELD_REQUIRES_CHARGING = "requiresCharging";
|
||||
public static final String FIELD_REQUIRES_DEVICE_IDLE = "requiresDeviceIdle";
|
||||
public static final String FIELD_REQUIRES_STORAGE_NOT_LOW = "requiresStorageNotLow";
|
||||
public static final String FIELD_STOP_ON_TERMINATE = "stopOnTerminate";
|
||||
public static final String FIELD_JOB_SERVICE = "jobService";
|
||||
public static final String FIELD_FORCE_ALARM_MANAGER = "forceAlarmManager";
|
||||
public static final String FIELD_PERIODIC = "periodic";
|
||||
public static final String FIELD_DELAY = "delay";
|
||||
public static final String FIELD_IS_FETCH_TASK = "isFetchTask";
|
||||
|
||||
public static class Builder {
|
||||
private String taskId;
|
||||
private int minimumFetchInterval = DEFAULT_FETCH_INTERVAL;
|
||||
private long delay = -1;
|
||||
private boolean periodic = false;
|
||||
private boolean forceAlarmManager = false;
|
||||
private boolean stopOnTerminate = true;
|
||||
private boolean startOnBoot = false;
|
||||
private int requiredNetworkType = 0;
|
||||
private boolean requiresBatteryNotLow = false;
|
||||
private boolean requiresCharging = false;
|
||||
private boolean requiresDeviceIdle = false;
|
||||
private boolean requiresStorageNotLow = false;
|
||||
private boolean isFetchTask = false;
|
||||
|
||||
private String jobService = null;
|
||||
|
||||
public Builder setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setIsFetchTask(boolean value) {
|
||||
this.isFetchTask = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMinimumFetchInterval(int fetchInterval) {
|
||||
if (fetchInterval >= MINIMUM_FETCH_INTERVAL) {
|
||||
this.minimumFetchInterval = fetchInterval;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStopOnTerminate(boolean stopOnTerminate) {
|
||||
this.stopOnTerminate = stopOnTerminate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStartOnBoot(boolean startOnBoot) {
|
||||
this.startOnBoot = startOnBoot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRequiredNetworkType(int networkType) {
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||
if (
|
||||
(networkType != JobInfo.NETWORK_TYPE_ANY) &&
|
||||
(networkType != JobInfo.NETWORK_TYPE_CELLULAR) &&
|
||||
(networkType != JobInfo.NETWORK_TYPE_NONE) &&
|
||||
(networkType != JobInfo.NETWORK_TYPE_NOT_ROAMING) &&
|
||||
(networkType != JobInfo.NETWORK_TYPE_UNMETERED)
|
||||
) {
|
||||
Log.e(BackgroundFetch.TAG, "[ERROR] Invalid " + FIELD_REQUIRED_NETWORK_TYPE + ": " + networkType + "; Defaulting to NETWORK_TYPE_NONE");
|
||||
networkType = JobInfo.NETWORK_TYPE_NONE;
|
||||
}
|
||||
this.requiredNetworkType = networkType;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRequiresBatteryNotLow(boolean value) {
|
||||
this.requiresBatteryNotLow = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRequiresCharging(boolean value) {
|
||||
this.requiresCharging = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRequiresDeviceIdle(boolean value) {
|
||||
this.requiresDeviceIdle = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRequiresStorageNotLow(boolean value) {
|
||||
this.requiresStorageNotLow = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setJobService(String className) {
|
||||
this.jobService = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setForceAlarmManager(boolean value) {
|
||||
this.forceAlarmManager = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPeriodic(boolean value) {
|
||||
this.periodic = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDelay(long value) {
|
||||
this.delay = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BackgroundFetchConfig build() {
|
||||
return new BackgroundFetchConfig(this);
|
||||
}
|
||||
|
||||
public BackgroundFetchConfig load(Context context, String taskId) {
|
||||
SharedPreferences preferences = context.getSharedPreferences(BackgroundFetch.TAG + ":" + taskId, 0);
|
||||
if (preferences.contains(FIELD_TASK_ID)) {
|
||||
setTaskId(preferences.getString(FIELD_TASK_ID, taskId));
|
||||
}
|
||||
if (preferences.contains(FIELD_IS_FETCH_TASK)) {
|
||||
setIsFetchTask(preferences.getBoolean(FIELD_IS_FETCH_TASK, isFetchTask));
|
||||
}
|
||||
if (preferences.contains(FIELD_MINIMUM_FETCH_INTERVAL)) {
|
||||
setMinimumFetchInterval(preferences.getInt(FIELD_MINIMUM_FETCH_INTERVAL, minimumFetchInterval));
|
||||
}
|
||||
if (preferences.contains(FIELD_STOP_ON_TERMINATE)) {
|
||||
setStopOnTerminate(preferences.getBoolean(FIELD_STOP_ON_TERMINATE, stopOnTerminate));
|
||||
}
|
||||
if (preferences.contains(FIELD_REQUIRED_NETWORK_TYPE)) {
|
||||
setRequiredNetworkType(preferences.getInt(FIELD_REQUIRED_NETWORK_TYPE, requiredNetworkType));
|
||||
}
|
||||
if (preferences.contains(FIELD_REQUIRES_BATTERY_NOT_LOW)) {
|
||||
setRequiresBatteryNotLow(preferences.getBoolean(FIELD_REQUIRES_BATTERY_NOT_LOW, requiresBatteryNotLow));
|
||||
}
|
||||
if (preferences.contains(FIELD_REQUIRES_CHARGING)) {
|
||||
setRequiresCharging(preferences.getBoolean(FIELD_REQUIRES_CHARGING, requiresCharging));
|
||||
}
|
||||
if (preferences.contains(FIELD_REQUIRES_DEVICE_IDLE)) {
|
||||
setRequiresDeviceIdle(preferences.getBoolean(FIELD_REQUIRES_DEVICE_IDLE, requiresDeviceIdle));
|
||||
}
|
||||
if (preferences.contains(FIELD_REQUIRES_STORAGE_NOT_LOW)) {
|
||||
setRequiresStorageNotLow(preferences.getBoolean(FIELD_REQUIRES_STORAGE_NOT_LOW, requiresStorageNotLow));
|
||||
}
|
||||
if (preferences.contains(FIELD_START_ON_BOOT)) {
|
||||
setStartOnBoot(preferences.getBoolean(FIELD_START_ON_BOOT, startOnBoot));
|
||||
}
|
||||
if (preferences.contains(FIELD_JOB_SERVICE)) {
|
||||
setJobService(preferences.getString(FIELD_JOB_SERVICE, null));
|
||||
}
|
||||
if (preferences.contains(FIELD_FORCE_ALARM_MANAGER)) {
|
||||
setForceAlarmManager(preferences.getBoolean(FIELD_FORCE_ALARM_MANAGER, forceAlarmManager));
|
||||
}
|
||||
if (preferences.contains(FIELD_PERIODIC)) {
|
||||
setPeriodic(preferences.getBoolean(FIELD_PERIODIC, periodic));
|
||||
}
|
||||
if (preferences.contains(FIELD_DELAY)) {
|
||||
setDelay(preferences.getLong(FIELD_DELAY, delay));
|
||||
}
|
||||
return new BackgroundFetchConfig(this);
|
||||
}
|
||||
}
|
||||
|
||||
private BackgroundFetchConfig(Builder builder) {
|
||||
config = builder;
|
||||
// Validate config
|
||||
if (config.jobService == null) {
|
||||
if (!config.stopOnTerminate) {
|
||||
Log.w(BackgroundFetch.TAG, "- Configuration error: In order to use stopOnTerminate: false, you must set enableHeadless: true");
|
||||
config.setStopOnTerminate(true);
|
||||
}
|
||||
if (config.startOnBoot) {
|
||||
Log.w(BackgroundFetch.TAG, "- Configuration error: In order to use startOnBoot: true, you must enableHeadless: true");
|
||||
config.setStartOnBoot(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void save(Context context) {
|
||||
SharedPreferences preferences = context.getSharedPreferences(BackgroundFetch.TAG, 0);
|
||||
Set<String> taskIds = preferences.getStringSet("tasks", new HashSet<String>());
|
||||
if (taskIds == null) {
|
||||
taskIds = new HashSet<>();
|
||||
}
|
||||
if (!taskIds.contains(config.taskId)) {
|
||||
Set<String> newIds = new HashSet<>(taskIds);
|
||||
newIds.add(config.taskId);
|
||||
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putStringSet("tasks", newIds);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
SharedPreferences.Editor editor = context.getSharedPreferences(BackgroundFetch.TAG + ":" + config.taskId, 0).edit();
|
||||
|
||||
editor.putString(FIELD_TASK_ID, config.taskId);
|
||||
editor.putBoolean(FIELD_IS_FETCH_TASK, config.isFetchTask);
|
||||
editor.putInt(FIELD_MINIMUM_FETCH_INTERVAL, config.minimumFetchInterval);
|
||||
editor.putBoolean(FIELD_STOP_ON_TERMINATE, config.stopOnTerminate);
|
||||
editor.putBoolean(FIELD_START_ON_BOOT, config.startOnBoot);
|
||||
editor.putInt(FIELD_REQUIRED_NETWORK_TYPE, config.requiredNetworkType);
|
||||
editor.putBoolean(FIELD_REQUIRES_BATTERY_NOT_LOW, config.requiresBatteryNotLow);
|
||||
editor.putBoolean(FIELD_REQUIRES_CHARGING, config.requiresCharging);
|
||||
editor.putBoolean(FIELD_REQUIRES_DEVICE_IDLE, config.requiresDeviceIdle);
|
||||
editor.putBoolean(FIELD_REQUIRES_STORAGE_NOT_LOW, config.requiresStorageNotLow);
|
||||
editor.putString(FIELD_JOB_SERVICE, config.jobService);
|
||||
editor.putBoolean(FIELD_FORCE_ALARM_MANAGER, config.forceAlarmManager);
|
||||
editor.putBoolean(FIELD_PERIODIC, config.periodic);
|
||||
editor.putLong(FIELD_DELAY, config.delay);
|
||||
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
void destroy(Context context) {
|
||||
SharedPreferences preferences = context.getSharedPreferences(BackgroundFetch.TAG, 0);
|
||||
Set<String> taskIds = preferences.getStringSet("tasks", new HashSet<String>());
|
||||
if (taskIds == null) {
|
||||
taskIds = new HashSet<>();
|
||||
}
|
||||
if (taskIds.contains(config.taskId)) {
|
||||
Set<String> newIds = new HashSet<>(taskIds);
|
||||
newIds.remove(config.taskId);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putStringSet("tasks", newIds);
|
||||
editor.apply();
|
||||
}
|
||||
if (!config.isFetchTask) {
|
||||
SharedPreferences.Editor editor = context.getSharedPreferences(BackgroundFetch.TAG + ":" + config.taskId, 0).edit();
|
||||
editor.clear();
|
||||
editor.apply();
|
||||
}
|
||||
}
|
||||
|
||||
static int FETCH_JOB_ID = 999;
|
||||
|
||||
boolean isFetchTask() {
|
||||
return config.isFetchTask;
|
||||
}
|
||||
|
||||
public String getTaskId() { return config.taskId; }
|
||||
public int getMinimumFetchInterval() {
|
||||
return config.minimumFetchInterval;
|
||||
}
|
||||
|
||||
public int getRequiredNetworkType() { return config.requiredNetworkType; }
|
||||
public boolean getRequiresBatteryNotLow() { return config.requiresBatteryNotLow; }
|
||||
public boolean getRequiresCharging() { return config.requiresCharging; }
|
||||
public boolean getRequiresDeviceIdle() { return config.requiresDeviceIdle; }
|
||||
public boolean getRequiresStorageNotLow() { return config.requiresStorageNotLow; }
|
||||
public boolean getStopOnTerminate() {
|
||||
return config.stopOnTerminate;
|
||||
}
|
||||
public boolean getStartOnBoot() {
|
||||
return config.startOnBoot;
|
||||
}
|
||||
|
||||
public String getJobService() { return config.jobService; }
|
||||
|
||||
public boolean getForceAlarmManager() {
|
||||
return config.forceAlarmManager;
|
||||
}
|
||||
|
||||
public boolean getPeriodic() {
|
||||
return config.periodic || isFetchTask();
|
||||
}
|
||||
|
||||
public long getDelay() {
|
||||
return config.delay;
|
||||
}
|
||||
|
||||
int getJobId() {
|
||||
if (config.forceAlarmManager) {
|
||||
return 0;
|
||||
} else {
|
||||
return (isFetchTask()) ? FETCH_JOB_ID : config.taskId.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
JSONObject output = new JSONObject();
|
||||
try {
|
||||
output.put(FIELD_TASK_ID, config.taskId);
|
||||
output.put(FIELD_IS_FETCH_TASK, config.isFetchTask);
|
||||
output.put(FIELD_MINIMUM_FETCH_INTERVAL, config.minimumFetchInterval);
|
||||
output.put(FIELD_STOP_ON_TERMINATE, config.stopOnTerminate);
|
||||
output.put(FIELD_REQUIRED_NETWORK_TYPE, config.requiredNetworkType);
|
||||
output.put(FIELD_REQUIRES_BATTERY_NOT_LOW, config.requiresBatteryNotLow);
|
||||
output.put(FIELD_REQUIRES_CHARGING, config.requiresCharging);
|
||||
output.put(FIELD_REQUIRES_DEVICE_IDLE, config.requiresDeviceIdle);
|
||||
output.put(FIELD_REQUIRES_STORAGE_NOT_LOW, config.requiresStorageNotLow);
|
||||
output.put(FIELD_START_ON_BOOT, config.startOnBoot);
|
||||
output.put(FIELD_JOB_SERVICE, config.jobService);
|
||||
output.put(FIELD_FORCE_ALARM_MANAGER, config.forceAlarmManager);
|
||||
output.put(FIELD_PERIODIC, getPeriodic());
|
||||
output.put(FIELD_DELAY, config.delay);
|
||||
|
||||
return output.toString(2);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
return output.toString();
|
||||
}
|
||||
}
|
||||
|
||||
static void load(final Context context, final OnLoadCallback callback) {
|
||||
BackgroundFetch.getThreadPool().execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final List<BackgroundFetchConfig> result = new ArrayList<>();
|
||||
|
||||
SharedPreferences preferences = context.getSharedPreferences(BackgroundFetch.TAG, 0);
|
||||
Set<String> taskIds = preferences.getStringSet("tasks", new HashSet<String>());
|
||||
|
||||
if (taskIds != null) {
|
||||
for (String taskId : taskIds) {
|
||||
result.add(new BackgroundFetchConfig.Builder().load(context, taskId));
|
||||
}
|
||||
}
|
||||
BackgroundFetch.getUiHandler().post(new Runnable() {
|
||||
@Override public void run() {
|
||||
callback.onLoad(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
interface OnLoadCallback {
|
||||
void onLoad(List<BackgroundFetchConfig>config);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Created by chris on 2018-01-15.
|
||||
*/
|
||||
|
||||
public class BootReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(final Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
Log.d(BackgroundFetch.TAG, "BootReceiver: " + action);
|
||||
BackgroundFetch.getThreadPool().execute(new Runnable() {
|
||||
@Override public void run() {
|
||||
BackgroundFetch.getInstance(context.getApplicationContext()).onBoot();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.PowerManager;
|
||||
import android.util.Log;
|
||||
|
||||
import static android.content.Context.POWER_SERVICE;
|
||||
|
||||
/**
|
||||
* Created by chris on 2018-01-11.
|
||||
*/
|
||||
|
||||
public class FetchAlarmReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(final Context context, Intent intent) {
|
||||
PowerManager powerManager = (PowerManager) context.getSystemService(POWER_SERVICE);
|
||||
final PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, BackgroundFetch.TAG + "::" + intent.getAction());
|
||||
// WakeLock expires in MAX_TIME + 4s buffer.
|
||||
wakeLock.acquire((BGTask.MAX_TIME + 4000));
|
||||
|
||||
final String taskId = intent.getAction();
|
||||
|
||||
final FetchJobService.CompletionHandler completionHandler = new FetchJobService.CompletionHandler() {
|
||||
@Override
|
||||
public void finish() {
|
||||
if (wakeLock.isHeld()) {
|
||||
wakeLock.release();
|
||||
Log.d(BackgroundFetch.TAG, "- FetchAlarmReceiver finish");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
BGTask task = new BGTask(context, taskId, completionHandler, 0);
|
||||
|
||||
BackgroundFetch.getInstance(context.getApplicationContext()).onFetch(task);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.job.JobParameters;
|
||||
import android.app.job.JobService;
|
||||
import android.os.PersistableBundle;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Created by chris on 2018-01-11.
|
||||
*/
|
||||
@TargetApi(21)
|
||||
public class FetchJobService extends JobService {
|
||||
@Override
|
||||
public boolean onStartJob(final JobParameters params) {
|
||||
PersistableBundle extras = params.getExtras();
|
||||
long scheduleAt = extras.getLong("scheduled_at");
|
||||
long dt = System.currentTimeMillis() - scheduleAt;
|
||||
// Scheduled < 1s ago? Ignore.
|
||||
if (dt < 1000) {
|
||||
// JobScheduler always immediately fires an initial event on Periodic jobs -- We IGNORE these.
|
||||
jobFinished(params, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
final String taskId = extras.getString(BackgroundFetchConfig.FIELD_TASK_ID);
|
||||
|
||||
CompletionHandler completionHandler = new CompletionHandler() {
|
||||
@Override
|
||||
public void finish() {
|
||||
Log.d(BackgroundFetch.TAG, "- jobFinished");
|
||||
jobFinished(params, false);
|
||||
}
|
||||
};
|
||||
BGTask task = new BGTask(this, taskId, completionHandler, params.getJobId());
|
||||
BackgroundFetch.getInstance(getApplicationContext()).onFetch(task);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onStopJob(final JobParameters params) {
|
||||
Log.d(BackgroundFetch.TAG, "- onStopJob");
|
||||
|
||||
PersistableBundle extras = params.getExtras();
|
||||
final String taskId = extras.getString(BackgroundFetchConfig.FIELD_TASK_ID);
|
||||
|
||||
BGTask task = BGTask.getTask(taskId);
|
||||
if (task != null) {
|
||||
task.onTimeout(getApplicationContext());
|
||||
}
|
||||
jobFinished(params, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
public interface CompletionHandler {
|
||||
void finish();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.DefaultLifecycleObserver;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/**
|
||||
* Component for managing app life-cycle changes, including headless-mode.
|
||||
*/
|
||||
public class LifecycleManager implements DefaultLifecycleObserver, Runnable {
|
||||
private static LifecycleManager sInstance;
|
||||
|
||||
public static LifecycleManager getInstance() {
|
||||
if (sInstance == null) {
|
||||
sInstance = getInstanceSynchronized();
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
private static synchronized LifecycleManager getInstanceSynchronized() {
|
||||
if (sInstance == null) sInstance = new LifecycleManager();
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
private final List<OnHeadlessChangeCallback> mHeadlessChangeCallbacks = new ArrayList<>();
|
||||
private final List<OnStateChangeCallback> mStateChangeCallbacks = new ArrayList<>();
|
||||
private final Handler mHandler;
|
||||
private Runnable mHeadlessChangeEvent;
|
||||
|
||||
private final AtomicBoolean mIsBackground = new AtomicBoolean(true);
|
||||
private final AtomicBoolean mIsHeadless = new AtomicBoolean(true);
|
||||
private final AtomicBoolean mStarted = new AtomicBoolean(false);
|
||||
private final AtomicBoolean mPaused = new AtomicBoolean(false);
|
||||
|
||||
private LifecycleManager() {
|
||||
mHandler = new Handler(Looper.getMainLooper());
|
||||
onHeadlessChange(isHeadless -> {
|
||||
if (isHeadless) {
|
||||
Log.d(BackgroundFetch.TAG, "☯️ HeadlessMode? " + isHeadless);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily disable responding to pause/resume events. This was placed here for handling TSLocationManagerActivity events
|
||||
* whose presentation causes onPause / onResume events that we don't want to react to.
|
||||
*/
|
||||
public void pause() {
|
||||
mPaused.set(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-engage responding to pause/resume events.
|
||||
*/
|
||||
public void resume() {
|
||||
mPaused.set(false);
|
||||
}
|
||||
/**
|
||||
* Are we in the background?
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isBackground() {
|
||||
return mIsBackground.get();
|
||||
}
|
||||
/**
|
||||
* Are we headless
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isHeadless() {
|
||||
return mIsHeadless.get();
|
||||
}
|
||||
/**
|
||||
* Explicitly state that we are headless. Probably called when MainActivity is known to have been destroyed.
|
||||
* @param value boolean
|
||||
*/
|
||||
public void setHeadless(boolean value) {
|
||||
mIsHeadless.set(value);
|
||||
if (mIsHeadless.get()) {
|
||||
Log.d(BackgroundFetch.TAG,"☯️ HeadlessMode? " + mIsHeadless);
|
||||
}
|
||||
if (mHeadlessChangeEvent != null) {
|
||||
mHandler.removeCallbacks(mHeadlessChangeEvent);
|
||||
mStarted.set(true);
|
||||
fireHeadlessChangeListeners();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Register Headless-mode change listener.
|
||||
*/
|
||||
public void onHeadlessChange(OnHeadlessChangeCallback callback) {
|
||||
if (mStarted.get()) {
|
||||
callback.onChange(mIsHeadless.get());
|
||||
return;
|
||||
}
|
||||
synchronized (mHeadlessChangeCallbacks) {
|
||||
mHeadlessChangeCallbacks.add(callback);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Register pause/resume listener.
|
||||
*/
|
||||
public void onStateChange(OnStateChangeCallback callback) {
|
||||
synchronized (mStateChangeCallbacks) {
|
||||
mStateChangeCallbacks.add(callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Regiser the LifecycleObserver
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@NonNull LifecycleOwner owner) {
|
||||
Log.d(BackgroundFetch.TAG,"☯️ onCreate");
|
||||
// If this 50ms Timer fires before onStart, we are headless
|
||||
mHeadlessChangeEvent = new Runnable() {
|
||||
@Override public void run() {
|
||||
mStarted.set(true);
|
||||
fireHeadlessChangeListeners();
|
||||
}
|
||||
};
|
||||
|
||||
mHandler.postDelayed(mHeadlessChangeEvent, 50);
|
||||
mIsHeadless.set(true);
|
||||
mIsBackground.set(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(@NonNull LifecycleOwner owner) {
|
||||
Log.d(BackgroundFetch.TAG, "☯️ onStart");
|
||||
// Cancel StateChange Timer.
|
||||
if (mPaused.get()) {
|
||||
return;
|
||||
}
|
||||
if (mHeadlessChangeEvent != null) {
|
||||
mHandler.removeCallbacks(mHeadlessChangeEvent);
|
||||
}
|
||||
|
||||
mStarted.set(true);
|
||||
mIsHeadless.set(false);
|
||||
mIsBackground.set(false);
|
||||
|
||||
// Fire listeners.
|
||||
fireHeadlessChangeListeners();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(@NonNull LifecycleOwner owner) {
|
||||
Log.d(BackgroundFetch.TAG, "☯️ onDestroy");
|
||||
mIsBackground.set(true);
|
||||
mIsHeadless.set(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop(@NonNull LifecycleOwner owner) {
|
||||
Log.d(BackgroundFetch.TAG, "☯️ onStop");
|
||||
if (mPaused.compareAndSet(true, false)) {
|
||||
return;
|
||||
}
|
||||
mIsBackground.set(true);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(@NonNull LifecycleOwner owner) {
|
||||
Log.d(BackgroundFetch.TAG, "☯️ onPause");
|
||||
mIsBackground.set(true);
|
||||
fireStateChangeListeners(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(@NonNull LifecycleOwner owner) {
|
||||
Log.d(BackgroundFetch.TAG, "☯️ onResume");
|
||||
if (mPaused.get()) {
|
||||
return;
|
||||
}
|
||||
mIsBackground.set(false);
|
||||
mIsHeadless.set(false);
|
||||
fireStateChangeListeners(true);
|
||||
}
|
||||
|
||||
/// Fire pause/resume change listeners
|
||||
private void fireStateChangeListeners(boolean isForeground) {
|
||||
synchronized (mStateChangeCallbacks) {
|
||||
for (OnStateChangeCallback callback : mStateChangeCallbacks) {
|
||||
callback.onChange(isForeground);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Fire headless mode change listeners.
|
||||
private void fireHeadlessChangeListeners() {
|
||||
if (mHeadlessChangeEvent != null) {
|
||||
mHandler.removeCallbacks(mHeadlessChangeEvent);
|
||||
mHeadlessChangeEvent = null;
|
||||
}
|
||||
synchronized (mHeadlessChangeCallbacks) {
|
||||
for (OnHeadlessChangeCallback callback : mHeadlessChangeCallbacks) {
|
||||
callback.onChange(mIsHeadless.get());
|
||||
}
|
||||
mHeadlessChangeCallbacks.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnHeadlessChangeCallback {
|
||||
void onChange(boolean isHeadless);
|
||||
}
|
||||
|
||||
public interface OnStateChangeCallback {
|
||||
void onChange(boolean isForeground);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">TSBackgroundFetch</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.transistorsoft.tsbackgroundfetch;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
@@ -9,5 +9,5 @@ module.exports = {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: "./tsconfig.json",
|
||||
},
|
||||
ignorePatterns: [".eslintrc.js", "out"],
|
||||
ignorePatterns: [".eslintrc.js", "out", "next.config.js"],
|
||||
};
|
||||
|
||||
@@ -9,5 +9,5 @@ module.exports = {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: "./tsconfig.json",
|
||||
},
|
||||
ignorePatterns: [".eslintrc.js", "out"],
|
||||
ignorePatterns: [".eslintrc.js", "out", "next.config.js"],
|
||||
};
|
||||
|
||||
@@ -9,5 +9,11 @@ module.exports = {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: "./tsconfig.json",
|
||||
},
|
||||
ignorePatterns: [".eslintrc.js", "out", "thirdparty", "public"],
|
||||
ignorePatterns: [
|
||||
".eslintrc.js",
|
||||
"out",
|
||||
"thirdparty",
|
||||
"public",
|
||||
"next.config.js",
|
||||
],
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@/media": "*",
|
||||
"@/new": "*",
|
||||
"@/next": "*",
|
||||
"@date-io/date-fns": "^2.14.0",
|
||||
"@ente/accounts": "*",
|
||||
|
||||
@@ -83,7 +83,6 @@ import {
|
||||
} from "utils/billing";
|
||||
import { openLink } from "utils/common";
|
||||
import { getDownloadAppMessage } from "utils/ui";
|
||||
import { isInternalUser } from "utils/user";
|
||||
import { isFamilyAdmin, isPartOfFamily } from "utils/user/family";
|
||||
import { testUpload } from "../../../tests/upload.test";
|
||||
import { MemberSubscriptionManage } from "../MemberSubscriptionManage";
|
||||
@@ -553,7 +552,7 @@ const UtilitySection: React.FC<UtilitySectionProps> = ({ closeSidebar }) => {
|
||||
onClick={openRecoveryKeyModal}
|
||||
label={t("RECOVERY_KEY")}
|
||||
/>
|
||||
{isInternalUser() && (
|
||||
{isInternalUserViaEmailCheck() && (
|
||||
<EnteMenuItem
|
||||
onClick={toggleTheme}
|
||||
variant="secondary"
|
||||
@@ -572,7 +571,7 @@ const UtilitySection: React.FC<UtilitySectionProps> = ({ closeSidebar }) => {
|
||||
label={t("TWO_FACTOR")}
|
||||
/>
|
||||
|
||||
{isInternalUser() && (
|
||||
{isInternalUserViaEmailCheck() && (
|
||||
<EnteMenuItem
|
||||
variant="secondary"
|
||||
onClick={redirectToAccountsPage}
|
||||
@@ -768,7 +767,7 @@ const DebugSection: React.FC = () => {
|
||||
{appVersion}
|
||||
</Typography>
|
||||
)}
|
||||
{isInternalUser() && (
|
||||
{isInternalUserViaEmailCheck() && (
|
||||
<EnteMenuItem
|
||||
variant="secondary"
|
||||
onClick={testUpload}
|
||||
@@ -778,3 +777,11 @@ const DebugSection: React.FC = () => {
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
// TODO: Legacy synchronous check, use the one for feature-flags.ts instead.
|
||||
const isInternalUserViaEmailCheck = () => {
|
||||
const userEmail = getData(LS_KEYS.USER)?.email;
|
||||
if (!userEmail) return false;
|
||||
|
||||
return userEmail.endsWith("@ente.io");
|
||||
};
|
||||
|
||||
@@ -54,8 +54,8 @@ import {
|
||||
isFaceIndexingEnabled,
|
||||
setIsFaceIndexingEnabled,
|
||||
} from "services/face/indexer";
|
||||
import mlWorkManager from "services/face/mlWorkManager";
|
||||
import { photosLogout } from "services/logout";
|
||||
import mlWorkManager from "services/machineLearning/mlWorkManager";
|
||||
import {
|
||||
getFamilyPortalRedirectURL,
|
||||
getRoadmapRedirectURL,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { fetchAndSaveFeatureFlagsIfNeeded } from "@/new/photos/services/feature-flags";
|
||||
import log from "@/next/log";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { CenteredFlex } from "@ente/shared/components/Container";
|
||||
@@ -87,7 +88,6 @@ import {
|
||||
import downloadManager from "services/download";
|
||||
import { syncCLIPEmbeddings } from "services/embeddingService";
|
||||
import { syncEntities } from "services/entityService";
|
||||
import { fetchAndSaveFeatureFlagsIfNeeded } from "services/feature-flag";
|
||||
import { getLocalFiles, syncFiles } from "services/fileService";
|
||||
import locationSearchService from "services/locationSearchService";
|
||||
import { getLocalTrashedFiles, syncTrash } from "services/trashService";
|
||||
@@ -720,7 +720,7 @@ export default function Gallery() {
|
||||
await syncCLIPEmbeddings();
|
||||
// TODO-ML(MR): Disable fetch until we start storing it in the
|
||||
// same place as the local ones.
|
||||
// if (isInternalUserForML()) await syncFaceEmbeddings();
|
||||
// if (isFaceIndexingEnabled()) await syncFaceEmbeddings();
|
||||
}
|
||||
if (clipService.isPlatformSupported()) {
|
||||
void clipService.scheduleImageEmbeddingExtraction();
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import { ComlinkWorker } from "@/next/worker/comlink-worker";
|
||||
import type { DedicatedMLWorker } from "services/face/face.worker";
|
||||
|
||||
const createFaceWebWorker = () =>
|
||||
new Worker(new URL("face.worker.ts", import.meta.url));
|
||||
|
||||
export const createFaceComlinkWorker = (name: string) =>
|
||||
new ComlinkWorker<typeof DedicatedMLWorker>(name, createFaceWebWorker());
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import {
|
||||
isBetaUser,
|
||||
isInternalUser,
|
||||
} from "@/new/photos/services/feature-flags";
|
||||
import { ComlinkWorker } from "@/next/worker/comlink-worker";
|
||||
import { ensure } from "@/utils/ensure";
|
||||
import { wait } from "@/utils/promise";
|
||||
import { type Remote } from "comlink";
|
||||
import { isBetaUser, isInternalUser } from "services/feature-flag";
|
||||
import type { Remote } from "comlink";
|
||||
import { getAllLocalFiles } from "services/fileService";
|
||||
import mlWorkManager from "services/machineLearning/mlWorkManager";
|
||||
import type { EnteFile } from "types/file";
|
||||
import { isInternalUserForML } from "utils/user";
|
||||
import {
|
||||
faceIndex,
|
||||
indexableFileIDs,
|
||||
indexedAndIndexableCounts,
|
||||
syncWithLocalFiles,
|
||||
} from "./db";
|
||||
import { FaceIndexerWorker } from "./indexer.worker";
|
||||
import type { FaceIndexerWorker } from "./indexer.worker";
|
||||
|
||||
/**
|
||||
* Face indexing orchestrator.
|
||||
@@ -41,33 +41,33 @@ class FaceIndexer {
|
||||
/** Timeout for when the next time we will wake up. */
|
||||
private wakeTimeout: ReturnType<typeof setTimeout> | undefined;
|
||||
|
||||
/**
|
||||
* Add a file to the live indexing queue.
|
||||
*
|
||||
* @param enteFile An {@link EnteFile} that should be indexed.
|
||||
*
|
||||
* @param file The contents of {@link enteFile} as a web {@link File}
|
||||
* object, if available.
|
||||
*/
|
||||
enqueueFile(enteFile: EnteFile, file: File | undefined) {
|
||||
// If face indexing is not enabled, don't enqueue anything. Later on if
|
||||
// the user turns on face indexing these files will get indexed as part
|
||||
// of the backfilling anyway, the live indexing is just an optimization.
|
||||
if (!mlWorkManager.isMlSearchEnabled) return;
|
||||
// /**
|
||||
// * Add a file to the live indexing queue.
|
||||
// *
|
||||
// * @param enteFile An {@link EnteFile} that should be indexed.
|
||||
// *
|
||||
// * @param file The contents of {@link enteFile} as a web {@link File}
|
||||
// * object, if available.
|
||||
// */
|
||||
// enqueueFile(enteFile: EnteFile, file: File | undefined) {
|
||||
// // If face indexing is not enabled, don't enqueue anything. Later on if
|
||||
// // the user turns on face indexing these files will get indexed as part
|
||||
// // of the backfilling anyway, the live indexing is just an optimization.
|
||||
// if (!mlWorkManager.isMlSearchEnabled) return;
|
||||
|
||||
this.liveItems.push({ enteFile, file });
|
||||
this.wakeUpIfNeeded();
|
||||
}
|
||||
// this.liveItems.push({ enteFile, file });
|
||||
// this.wakeUpIfNeeded();
|
||||
// }
|
||||
|
||||
private wakeUpIfNeeded() {
|
||||
// Already awake.
|
||||
if (!this.wakeTimeout) return;
|
||||
// Cancel the alarm, wake up now.
|
||||
clearTimeout(this.wakeTimeout);
|
||||
this.wakeTimeout = undefined;
|
||||
// Get to work.
|
||||
this.tick();
|
||||
}
|
||||
// private wakeUpIfNeeded() {
|
||||
// // Already awake.
|
||||
// if (!this.wakeTimeout) return;
|
||||
// // Cancel the alarm, wake up now.
|
||||
// clearTimeout(this.wakeTimeout);
|
||||
// this.wakeTimeout = undefined;
|
||||
// // Get to work.
|
||||
// this.tick();
|
||||
// }
|
||||
|
||||
/* TODO-ML(MR): This code is not currently in use */
|
||||
|
||||
@@ -85,34 +85,34 @@ class FaceIndexer {
|
||||
faceIndexer = (): Promise<Remote<FaceIndexerWorker>> =>
|
||||
(this._faceIndexer ??= createFaceIndexerComlinkWorker().remote);
|
||||
|
||||
private async tick() {
|
||||
console.log("tick");
|
||||
// private async tick() {
|
||||
// console.log("tick");
|
||||
|
||||
const item = this.liveItems.pop();
|
||||
if (!item) {
|
||||
// TODO-ML: backfill instead if needed here.
|
||||
this.wakeTimeout = setTimeout(() => {
|
||||
this.wakeTimeout = undefined;
|
||||
this.wakeUpIfNeeded();
|
||||
}, 30 * 1000);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
const fileID = item.enteFile.id;
|
||||
try {
|
||||
const faceIndex = await indexFaces(item.enteFile, item.file, userAgent);
|
||||
log.info(`faces in file ${fileID}`, faceIndex);
|
||||
} catch (e) {
|
||||
log.error(`Failed to index faces in file ${fileID}`, e);
|
||||
markIndexingFailed(item.enteFile.id);
|
||||
}
|
||||
*/
|
||||
// Let the runloop drain.
|
||||
await wait(0);
|
||||
// Run again.
|
||||
// TODO
|
||||
// this.tick();
|
||||
}
|
||||
// const item = this.liveItems.pop();
|
||||
// if (!item) {
|
||||
// // TODO-ML: backfill instead if needed here.
|
||||
// this.wakeTimeout = setTimeout(() => {
|
||||
// this.wakeTimeout = undefined;
|
||||
// this.wakeUpIfNeeded();
|
||||
// }, 30 * 1000);
|
||||
// return;
|
||||
// }
|
||||
// /*
|
||||
// const fileID = item.enteFile.id;
|
||||
// try {
|
||||
// const faceIndex = await indexFaces(item.enteFile, item.file, userAgent);
|
||||
// log.info(`faces in file ${fileID}`, faceIndex);
|
||||
// } catch (e) {
|
||||
// log.error(`Failed to index faces in file ${fileID}`, e);
|
||||
// markIndexingFailed(item.enteFile.id);
|
||||
// }
|
||||
// */
|
||||
// // Let the runloop drain.
|
||||
// await wait(0);
|
||||
// // Run again.
|
||||
// // TODO
|
||||
// // this.tick();
|
||||
// }
|
||||
|
||||
/**
|
||||
* Add a newly uploaded file to the face indexing queue.
|
||||
@@ -162,8 +162,9 @@ export interface FaceIndexingStatus {
|
||||
nTotalFiles: number;
|
||||
}
|
||||
|
||||
export const faceIndexingStatus = async (): Promise<FaceIndexingStatus> => {
|
||||
const isSyncing = mlWorkManager.isSyncing;
|
||||
export const faceIndexingStatus = async (
|
||||
isSyncing: boolean,
|
||||
): Promise<FaceIndexingStatus> => {
|
||||
const { indexedCount, indexableCount } = await indexedAndIndexableCounts();
|
||||
|
||||
let phase: FaceIndexingStatus["phase"];
|
||||
@@ -200,7 +201,7 @@ export const unidentifiedFaceIDs = async (
|
||||
* face search in the UI.
|
||||
*/
|
||||
export const canEnableFaceIndexing = async () =>
|
||||
isInternalUserForML() || (await isInternalUser()) || (await isBetaUser());
|
||||
(await isInternalUser()) || (await isBetaUser());
|
||||
|
||||
/**
|
||||
* Return true if the user has enabled face indexing in the app's settings.
|
||||
|
||||
@@ -7,12 +7,17 @@ import { eventBus, Events } from "@ente/shared/events";
|
||||
import { getToken, getUserID } from "@ente/shared/storage/localStorage/helpers";
|
||||
import debounce from "debounce";
|
||||
import PQueue from "p-queue";
|
||||
import { createFaceComlinkWorker } from "services/face";
|
||||
import type { DedicatedMLWorker } from "services/face/face.worker";
|
||||
import { EnteFile } from "types/file";
|
||||
|
||||
export type JobState = "Scheduled" | "Running" | "NotScheduled";
|
||||
|
||||
const createFaceWebWorker = () =>
|
||||
new Worker(new URL("face.worker.ts", import.meta.url));
|
||||
|
||||
const createFaceComlinkWorker = (name: string) =>
|
||||
new ComlinkWorker<typeof DedicatedMLWorker>(name, createFaceWebWorker());
|
||||
|
||||
export class MLSyncJob {
|
||||
private runCallback: () => Promise<boolean>;
|
||||
private state: JobState;
|
||||
@@ -1,11 +1,11 @@
|
||||
import { clearFeatureFlagSessionState } from "@/new/photos/services/feature-flags";
|
||||
import log from "@/next/log";
|
||||
import { accountLogout } from "@ente/accounts/services/logout";
|
||||
import { clipService } from "services/clip-service";
|
||||
import DownloadManager from "./download";
|
||||
import exportService from "./export";
|
||||
import { clearFaceData } from "./face/db";
|
||||
import { clearFeatureFlagSessionState } from "./feature-flag";
|
||||
import mlWorkManager from "./machineLearning/mlWorkManager";
|
||||
import mlWorkManager from "./face/mlWorkManager";
|
||||
|
||||
/**
|
||||
* Logout sequence for the photos app.
|
||||
|
||||
@@ -21,6 +21,7 @@ import { clipService, computeClipMatchScore } from "./clip-service";
|
||||
import { localCLIPEmbeddings } from "./embeddingService";
|
||||
import { getLatestEntities } from "./entityService";
|
||||
import { faceIndexingStatus, isFaceIndexingEnabled } from "./face/indexer";
|
||||
import mlWorkManager from "./face/mlWorkManager";
|
||||
import locationSearchService, { City } from "./locationSearchService";
|
||||
|
||||
const DIGITS = new Set(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]);
|
||||
@@ -178,7 +179,8 @@ export async function getAllPeopleSuggestion(): Promise<Array<Suggestion>> {
|
||||
|
||||
export async function getIndexStatusSuggestion(): Promise<Suggestion> {
|
||||
try {
|
||||
const indexStatus = await faceIndexingStatus();
|
||||
const isSyncing = mlWorkManager.isSyncing;
|
||||
const indexStatus = await faceIndexingStatus(isSyncing);
|
||||
|
||||
let label: string;
|
||||
switch (indexStatus.phase) {
|
||||
|
||||
@@ -1,21 +1,6 @@
|
||||
import { getData, LS_KEYS } from "@ente/shared/storage/localStorage";
|
||||
import type { User } from "@ente/shared/user/types";
|
||||
import { UserDetails } from "types/user";
|
||||
|
||||
export function getLocalUserDetails(): UserDetails {
|
||||
return getData(LS_KEYS.USER_DETAILS)?.value;
|
||||
}
|
||||
|
||||
export const isInternalUser = () => {
|
||||
const userEmail = getData(LS_KEYS.USER)?.email;
|
||||
if (!userEmail) return false;
|
||||
|
||||
return userEmail.endsWith("@ente.io");
|
||||
};
|
||||
|
||||
export const isInternalUserForML = () => {
|
||||
const userID = (getData(LS_KEYS.USER) as User)?.id;
|
||||
if (userID == 1 || userID == 2) return true;
|
||||
|
||||
return isInternalUser();
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"yup": "^1.4"
|
||||
"zod": "^3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@/build-config": "*",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { object, type InferType } from "yup";
|
||||
import { z } from "zod";
|
||||
|
||||
const apiOrigin = import.meta.env.VITE_ENTE_ENDPOINT ?? "https://api.ente.io";
|
||||
|
||||
const userDetailsSchema = object({});
|
||||
const UserDetails = z.object({}).passthrough();
|
||||
|
||||
export type UserDetails = InferType<typeof userDetailsSchema>;
|
||||
export type UserDetails = z.infer<typeof UserDetails>;
|
||||
|
||||
/** Fetch details of the user associated with the given {@link authToken}. */
|
||||
export const getUserDetails = async (
|
||||
@@ -17,5 +17,5 @@ export const getUserDetails = async (
|
||||
},
|
||||
});
|
||||
if (!res.ok) throw new Error(`Failed to fetch ${url}: HTTP ${res.status}`);
|
||||
return await userDetailsSchema.validate(await res.json());
|
||||
return UserDetails.parse(await res.json());
|
||||
};
|
||||
|
||||
@@ -14,11 +14,17 @@ baseline for how our code be in all the workspaces in this (yarn) monorepo.
|
||||
They also need some support packages, which come from the leaf `@/build-config`
|
||||
package:
|
||||
|
||||
- [@typescript-eslint/parser](https://typescript-eslint.io/packages/eslint-plugin/)
|
||||
\- Tells ESLint how to read TypeScript syntax.
|
||||
- [@eslint/js](https://eslint.org/) provides JavaScript ESLint functionality,
|
||||
and provides the configuration recommended the by ESLint team.
|
||||
|
||||
- [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin/)
|
||||
\- Provides TypeScript rules and presets
|
||||
- [typescript-eslint](https://typescript-eslint.io/packages/typescript-eslint/)
|
||||
\- provides TypeScript ESLint functionality and provides a set of
|
||||
recommended configurations (`typescript-eslint` is the new entry point, our
|
||||
yet-unmigrated packages use the older method of separately including
|
||||
[@typescript-eslint/parser](https://typescript-eslint.io/packages/eslint-plugin/)
|
||||
\- which tells ESLint how to read TypeScript syntax - and
|
||||
[@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin/)
|
||||
\- which provides the TypeScript rules and presets).
|
||||
|
||||
- [eslint-plugin-react-hooks](https://github.com/jsx-eslint/eslint-plugin-react),
|
||||
[eslint-plugin-react-hooks](https://reactjs.org/) \- Some React specific
|
||||
@@ -148,6 +154,19 @@ It is more lower level than Next, but the bells and whistles it doesn't have are
|
||||
the bells and whistles (and the accompanying complexity) that we don't need in
|
||||
some cases.
|
||||
|
||||
## General
|
||||
|
||||
- [comlink](https://github.com/GoogleChromeLabs/comlink) provides a minimal
|
||||
layer on top of Web Workers to make them more easier to use.
|
||||
|
||||
- [idb](https://github.com/jakearchibald/idb) provides a promise API over the
|
||||
browser-native IndexedDB APIs.
|
||||
|
||||
> For more details about IDB and its role, see [storage.md](storage.md).
|
||||
|
||||
- [zod](https://github.com/colinhacks/zod) is used for runtime typechecking
|
||||
(e.g. verifying that API responses match the expected TypeScript shape).
|
||||
|
||||
## Media
|
||||
|
||||
- [jszip](https://github.com/Stuk/jszip) is used for reading zip files in
|
||||
@@ -161,16 +180,6 @@ some cases.
|
||||
- [heic-convert](https://github.com/catdad-experiments/heic-convert) is used
|
||||
for converting HEIC files (which browsers don't natively support) into JPEG.
|
||||
|
||||
## General
|
||||
|
||||
- [comlink](https://github.com/GoogleChromeLabs/comlink) provides a minimal
|
||||
layer on top of Web Workers to make them more easier to use.
|
||||
|
||||
- [idb](https://github.com/jakearchibald/idb) provides a promise API over the
|
||||
browser-native IndexedDB APIs.
|
||||
|
||||
> For more details about IDB and its role, see [storage.md](storage.md).
|
||||
|
||||
## Photos app specific
|
||||
|
||||
- [react-dropzone](https://github.com/react-dropzone/react-dropzone/) is a
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
/* A base TSConfig for typechecking our Next.js apps and packages. */
|
||||
"extends": "@/build-config/tsconfig-typecheck.json",
|
||||
"compilerOptions": {
|
||||
/* Also indicate expectation of a WebWorker runtime */
|
||||
"lib": ["ESnext", "DOM", "DOM.Iterable", "WebWorker"],
|
||||
|
||||
/* Next.js insists on adding these. Sigh. */
|
||||
"allowJs": true,
|
||||
"incremental": true
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* runtime will have.
|
||||
*
|
||||
* In our case, we tell it that the code will run in a modern browser,
|
||||
* and will have access to a latest JS (esnext) and the DOM (dom). Our
|
||||
* transpiler (Next.js) will ensure that these things hold.
|
||||
* and will have access to a latest JS ("ESNext") and the DOM ("DOM")
|
||||
* and web workers ("WebWorker").
|
||||
*
|
||||
* Unlike the other individual library components (say how "esnext"
|
||||
* implies "ESNext.*"), "DOM.Iterable" (the ability to iterate over DOM
|
||||
@@ -21,7 +21,7 @@
|
||||
* Note that we don't need to specify the `target` compilerOption, since
|
||||
* tsc isn't actually generating (emitting) the JavaScript.
|
||||
*/
|
||||
"lib": ["ESnext", "DOM", "DOM.Iterable"],
|
||||
"lib": ["ESnext", "DOM", "DOM.Iterable", "WebWorker"],
|
||||
|
||||
/*
|
||||
* The module system to assume the generated JavaScript will use.
|
||||
|
||||
@@ -5,5 +5,5 @@ module.exports = {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: "./tsconfig.json",
|
||||
},
|
||||
ignorePatterns: [".eslintrc.js"],
|
||||
ignorePatterns: [".eslintrc.js", "index.js"],
|
||||
};
|
||||
|
||||
0
web/packages/eslint-config/empty.js
Normal file
@@ -1,10 +1,8 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
"next/core-web-vitals",
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"prettier",
|
||||
],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
@@ -34,12 +32,6 @@ module.exports = {
|
||||
"after",
|
||||
{ overrides: { "?": "before", ":": "before" } },
|
||||
],
|
||||
"import/no-anonymous-default-export": [
|
||||
"error",
|
||||
{
|
||||
allowNew: true,
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/no-unsafe-return": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
|
||||
3
web/packages/new/.eslintrc.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
extends: ["@/build-config/eslintrc-react"],
|
||||
};
|
||||
11
web/packages/new/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## @/new
|
||||
|
||||
This package only exists so that we can write code that works with TypeScript
|
||||
strict mode. This provides a gradual way of migrating the existing code in the
|
||||
old packages to strict mode. Once there is sufficient gravity here, we can flip
|
||||
the switch on the original packages and move these back to where they came from.
|
||||
|
||||
### Packaging
|
||||
|
||||
This (internal) package exports a vanilla TypeScript library. We rely on the
|
||||
importing project to transpile and bundle it.
|
||||
12
web/packages/new/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "@/new",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@/next": "*",
|
||||
"@/utils": "*",
|
||||
"@ente/shared": "*",
|
||||
"zod": "^3"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
2
web/packages/new/photos/hello.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Dummy function to get the package to behave. */
|
||||
export const hello = (ms: number) => ms;
|
||||