expo-updates 58.0.21 → 58.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/updates/statemachine/UpdatesStateMachine.kt +7 -1
- package/cli/build/cli.js +8 -8
- package/cli/build/cli.js.map +1 -1
- package/cli/src/cli.ts +1 -1
- package/expo-updates-gradle-plugin/src/main/kotlin/expo/modules/updates/ExpoUpdatesPlugin.kt +2 -0
- package/ios/EXUpdates/UpdatesStateMachine.swift +6 -1
- package/package.json +5 -7
- package/utils/build/vcs.js +20 -4
- package/utils/build/vcs.js.map +1 -1
- package/utils/src/vcs.ts +18 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.0.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [Android] Create the embedded fingerprint and manifest on every build, so a repeat release build does not embed a stale runtime version after a native change. ([#53906](https://github.com/expo/expo/pull/53906) by [@sivefunc](https://github.com/sivefunc))
|
|
8
|
+
|
|
9
|
+
## 58.0.22
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix gitignore discovery on older supported Node versions. ([#52960](https://github.com/expo/expo/pull/52960) by [@kitten](https://github.com/kitten))
|
|
14
|
+
- Use @expo/env instead of getenv to read environment variables. ([#52934](https://github.com/expo/expo/pull/52934) by [@kitten](https://github.com/kitten))
|
|
15
|
+
- Send download progress to JavaScript in 1% steps, so updates with many assets no longer use a large amount of memory while they download. ([#53250](https://github.com/expo/expo/pull/53250) by [@alanjhughes](https://github.com/alanjhughes))
|
|
16
|
+
- Updated dependencies. ([#52929](https://github.com/expo/expo/pull/52929), [#52934](https://github.com/expo/expo/pull/52934))
|
|
17
|
+
- @expo/plist@0.10.2
|
|
18
|
+
- @expo/env@2.6.0
|
|
19
|
+
|
|
3
20
|
## 58.0.21
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/android/build.gradle
CHANGED
|
@@ -42,7 +42,7 @@ expoModule {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
group = 'host.exp.exponent'
|
|
45
|
-
version = '58.0.
|
|
45
|
+
version = '58.0.23'
|
|
46
46
|
|
|
47
47
|
// Utility method to derive boolean values from the environment or from Java properties,
|
|
48
48
|
// and return them as strings to be used in BuildConfig fields
|
|
@@ -103,7 +103,7 @@ android {
|
|
|
103
103
|
namespace "expo.modules.updates"
|
|
104
104
|
defaultConfig {
|
|
105
105
|
versionCode 31
|
|
106
|
-
versionName '58.0.
|
|
106
|
+
versionName '58.0.23'
|
|
107
107
|
consumerProguardFiles("proguard-rules.pro")
|
|
108
108
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
109
109
|
|
|
@@ -11,6 +11,7 @@ import expo.modules.updatesinterface.UpdatesControllerRegistry
|
|
|
11
11
|
import kotlinx.coroutines.CoroutineScope
|
|
12
12
|
import kotlinx.coroutines.Dispatchers
|
|
13
13
|
import java.util.Date
|
|
14
|
+
import kotlin.math.floor
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* The Updates state machine class. There should be only one instance of this class
|
|
@@ -93,6 +94,7 @@ class UpdatesStateMachine(
|
|
|
93
94
|
*/
|
|
94
95
|
private fun processEvent(event: UpdatesStateEvent) {
|
|
95
96
|
if (transition(event)) {
|
|
97
|
+
val previousProgress = context.downloadProgress
|
|
96
98
|
context = reduceContext(context, event)
|
|
97
99
|
if (event !is UpdatesStateEvent.DownloadProgress) {
|
|
98
100
|
logger.info("Updates state change: ${event.type}, context = ${context.json}")
|
|
@@ -105,7 +107,9 @@ class UpdatesStateMachine(
|
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
|
|
110
|
+
if (event !is UpdatesStateEvent.DownloadProgress || floor(context.downloadProgress * 100) != floor(previousProgress * 100)) {
|
|
111
|
+
sendContextToJS()
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
}
|
|
111
115
|
|
|
@@ -255,12 +259,14 @@ class UpdatesStateMachine(
|
|
|
255
259
|
isDownloading = false,
|
|
256
260
|
downloadError = null,
|
|
257
261
|
isUpdatePending = true,
|
|
262
|
+
downloadProgress = 1.0,
|
|
258
263
|
downloadStartTime = null,
|
|
259
264
|
downloadFinishTime = null
|
|
260
265
|
)
|
|
261
266
|
is UpdatesStateEvent.DownloadCompleteWithUpdate -> context.copyAndIncrementSequenceNumber(
|
|
262
267
|
isDownloading = false,
|
|
263
268
|
downloadError = null,
|
|
269
|
+
downloadProgress = 1.0,
|
|
264
270
|
latestManifest = event.manifest,
|
|
265
271
|
downloadedManifest = event.manifest,
|
|
266
272
|
rollback = null,
|
package/cli/build/cli.js
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
function _env() {
|
|
7
|
+
const data = require("@expo/env");
|
|
8
|
+
_env = function() {
|
|
9
|
+
return data;
|
|
10
|
+
};
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
6
13
|
function _arg() {
|
|
7
14
|
const data = /*#__PURE__*/ _interop_require_default(require("arg"));
|
|
8
15
|
_arg = function() {
|
|
@@ -24,13 +31,6 @@ function _debug() {
|
|
|
24
31
|
};
|
|
25
32
|
return data;
|
|
26
33
|
}
|
|
27
|
-
function _getenv() {
|
|
28
|
-
const data = require("getenv");
|
|
29
|
-
_getenv = function() {
|
|
30
|
-
return data;
|
|
31
|
-
};
|
|
32
|
-
return data;
|
|
33
|
-
}
|
|
34
34
|
const _errors = require("./utils/errors");
|
|
35
35
|
const _log = /*#__PURE__*/ _interop_require_wildcard(require("./utils/log"));
|
|
36
36
|
function _interop_require_default(obj) {
|
|
@@ -80,7 +80,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
80
80
|
return newObj;
|
|
81
81
|
}
|
|
82
82
|
// Setup before requiring `debug`.
|
|
83
|
-
if ((0,
|
|
83
|
+
if ((0, _env().boolish)('EXPO_DEBUG', false)) {
|
|
84
84
|
_debug().default.enable('expo-updates:*');
|
|
85
85
|
} else if (_debug().default.enabled('expo-updates:')) {
|
|
86
86
|
process.env.EXPO_DEBUG = '1';
|
package/cli/build/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["cli.ts"],"sourcesContent":[null],"names":["boolish","Debug","enable","enabled","process","env","EXPO_DEBUG","commands","then","i","generateCodeSigning","configureCodeSigning","expoAssetsVerify","generateFingerprint","resolveRuntimeVersion","syncConfigurationToNative","args","arg","Boolean","permissive","packageJSON","require","console","log","version","exit","command","_","commandArgs","slice","Log","chalk","Object","keys","sort","join","push","on","error","exec","catch","logCmdError"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"sources":["cli.ts"],"sourcesContent":[null],"names":["boolish","Debug","enable","enabled","process","env","EXPO_DEBUG","commands","then","i","generateCodeSigning","configureCodeSigning","expoAssetsVerify","generateFingerprint","resolveRuntimeVersion","syncConfigurationToNative","args","arg","Boolean","permissive","packageJSON","require","console","log","version","exit","command","_","commandArgs","slice","Log","chalk","Object","keys","sort","join","push","on","error","exec","catch","logCmdError"],"mappings":";;;;;;yBACwB;;;;;;;gEACR;;;;;;;gEACE;;;;;;;gEACA;;;;;;wBAEU;6DACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErB,kCAAkC;AAClC,IAAIA,IAAAA,cAAO,EAAC,cAAc,QAAQ;IAChCC,gBAAK,CAACC,MAAM,CAAC;AACf,OAAO,IAAID,gBAAK,CAACE,OAAO,CAAC,kBAAkB;IACzCC,QAAQC,GAAG,CAACC,UAAU,GAAG;AAC3B;AAIA,MAAMC,WAA0D;IAC9D,yBAAyB;IACzB,wBAAwB,IACtB,MAAM,CAAC,4B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U,IAAMjC,QAAQqB,IAAI,CAAC;AACxCrB,QAAQiC,EAAE,CAAC,WAAW,IAAMjC,QAAQqB,IAAI,CAAC;AAEzC,IAAI,CAAClB,QAAQ,CAACmB,QAAQ,EAAE;IACtBJ,QAAQgB,KAAK,CAAC,CAAC,iBAAiB,EAAEZ,SAAS;IAC3CtB,QAAQqB,IAAI,CAAC;AACf;AAEAlB,QAAQ,CAACmB,QAAQ,GACdlB,IAAI,CAAC,CAAC+B,OAASA,KAAKX,cACpBY,KAAK,CAACC,mBAAW"}
|
package/cli/src/cli.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { boolish } from '@expo/env';
|
|
2
3
|
import arg from 'arg';
|
|
3
4
|
import chalk from 'chalk';
|
|
4
5
|
import Debug from 'debug';
|
|
5
|
-
import { boolish } from 'getenv';
|
|
6
6
|
|
|
7
7
|
import { logCmdError } from './utils/errors';
|
|
8
8
|
import * as Log from './utils/log';
|
package/expo-updates-gradle-plugin/src/main/kotlin/expo/modules/updates/ExpoUpdatesPlugin.kt
CHANGED
|
@@ -45,6 +45,8 @@ abstract class ExpoUpdatesPlugin : Plugin<Project> {
|
|
|
45
45
|
it.nodeExecutableAndArgs.set(reactExtension.nodeExecutableAndArgs.get())
|
|
46
46
|
it.debuggableVariant.set(isDebuggableVariant)
|
|
47
47
|
it.entryFile.set(entryFile.toPath().toString())
|
|
48
|
+
// The fingerprint depends on native files, patches, and config that are not inputs of this task.
|
|
49
|
+
it.outputs.upToDateWhen { false }
|
|
48
50
|
}
|
|
49
51
|
variant.sources.assets?.addGeneratedSourceDirectory(createUpdatesResourcesTask, CreateUpdatesResourcesTask::assetDir)
|
|
50
52
|
}
|
|
@@ -409,6 +409,7 @@ internal class UpdatesStateMachine {
|
|
|
409
409
|
private func processEvent(_ event: UpdatesStateEvent) {
|
|
410
410
|
// Execute state transition
|
|
411
411
|
if transition(event) {
|
|
412
|
+
let previousProgress = context.downloadProgress
|
|
412
413
|
// Only change context if transition succeeds
|
|
413
414
|
context = reducedContext(context, event)
|
|
414
415
|
if event.type != .downloadProgress {
|
|
@@ -420,7 +421,9 @@ internal class UpdatesStateMachine {
|
|
|
420
421
|
listener.updatesStateDidChange(event.toMap)
|
|
421
422
|
}
|
|
422
423
|
}
|
|
423
|
-
|
|
424
|
+
if event.type != .downloadProgress || (context.downloadProgress * 100).rounded(.down) != (previousProgress * 100).rounded(.down) {
|
|
425
|
+
sendContextToJS()
|
|
426
|
+
}
|
|
424
427
|
}
|
|
425
428
|
}
|
|
426
429
|
internal func processEventForTesting(_ event: UpdatesStateEvent) {
|
|
@@ -547,6 +550,7 @@ internal class UpdatesStateMachine {
|
|
|
547
550
|
$0.isDownloading = false
|
|
548
551
|
$0.downloadError = nil
|
|
549
552
|
$0.isUpdatePending = true
|
|
553
|
+
$0.downloadProgress = 1.0
|
|
550
554
|
$0.downloadStartTime = nil
|
|
551
555
|
$0.downloadFinishTime = nil
|
|
552
556
|
}
|
|
@@ -554,6 +558,7 @@ internal class UpdatesStateMachine {
|
|
|
554
558
|
return context.copyAndIncrementSequenceNumber {
|
|
555
559
|
$0.isDownloading = false
|
|
556
560
|
$0.downloadError = nil
|
|
561
|
+
$0.downloadProgress = 1.0
|
|
557
562
|
$0.latestManifest = manifest
|
|
558
563
|
$0.downloadedManifest = manifest
|
|
559
564
|
$0.rollback = nil
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates",
|
|
3
|
-
"version": "58.0.
|
|
3
|
+
"version": "58.0.23",
|
|
4
4
|
"description": "Fetches and manages remotely-hosted assets and updates to your app's JS bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"expo",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@expo/code-signing-certificates": "^0.0.7",
|
|
49
|
-
"@expo/env": "^2.
|
|
50
|
-
"@expo/plist": "^0.10.
|
|
49
|
+
"@expo/env": "^2.6.0",
|
|
50
|
+
"@expo/plist": "^0.10.2",
|
|
51
51
|
"@expo/spawn-async": "^1.8.0",
|
|
52
52
|
"@react-native/asset-utils": "0.88.1",
|
|
53
53
|
"arg": "^4.1.0",
|
|
@@ -57,24 +57,22 @@
|
|
|
57
57
|
"expo-manifests": "~58.0.1",
|
|
58
58
|
"expo-structured-headers": "~58.0.1",
|
|
59
59
|
"expo-updates-interface": "~58.0.1",
|
|
60
|
-
"getenv": "^2.0.0",
|
|
61
60
|
"ignore": "^5.3.1",
|
|
62
61
|
"nullthrows": "^1.1.1",
|
|
63
62
|
"resolve-from": "^5.0.0"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
66
65
|
"@expo/internal-scripts": "58.0.6",
|
|
67
|
-
"@expo/metro-config": "58.0.
|
|
66
|
+
"@expo/metro-config": "58.0.24",
|
|
68
67
|
"@testing-library/react-native": "^14.0.1",
|
|
69
68
|
"@types/debug": "^4.1.7",
|
|
70
|
-
"@types/getenv": "^1.0.3",
|
|
71
69
|
"@types/jest": "^30.0.0",
|
|
72
70
|
"@types/node": "^22.14.0",
|
|
73
71
|
"@types/node-forge": "^1.0.0",
|
|
74
72
|
"@types/picomatch": "^4.0.0",
|
|
75
73
|
"@types/react": "~19.3.0",
|
|
76
74
|
"@vercel/ncc": "^0.38.4",
|
|
77
|
-
"expo-dev-client": "58.0.
|
|
75
|
+
"expo-dev-client": "58.0.22",
|
|
78
76
|
"express": "^5.1.0",
|
|
79
77
|
"form-data": "^4.0.4",
|
|
80
78
|
"memfs": "^3.6.0",
|
package/utils/build/vcs.js
CHANGED
|
@@ -154,10 +154,26 @@ node_modules
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
async function findIgnoreFilesAsync(root) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
const files = [];
|
|
158
|
+
const directories = [
|
|
159
|
+
''
|
|
160
|
+
];
|
|
161
|
+
for (const directory of directories){
|
|
162
|
+
const entries = await _promises().default.readdir(_path().default.join(root, directory), {
|
|
163
|
+
withFileTypes: true
|
|
164
|
+
}).catch(()=>[]);
|
|
165
|
+
for (const entry of entries){
|
|
166
|
+
const file = _path().default.join(directory, entry.name);
|
|
167
|
+
if (entry.isDirectory()) {
|
|
168
|
+
if (entry.name !== 'node_modules' && !entry.name.startsWith('.')) {
|
|
169
|
+
directories.push(file);
|
|
170
|
+
}
|
|
171
|
+
} else if (entry.name === GITIGNORE_FILENAME) {
|
|
172
|
+
files.push(file);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return files;
|
|
161
177
|
}
|
|
162
178
|
|
|
163
179
|
//# sourceMappingURL=vcs.js.map
|
package/utils/build/vcs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vcs.ts"],"sourcesContent":[null],"names":["getVCSClientAsync","projectDir","isGitInstalledAndConfiguredAsync","GitClient","NoVCSClient","getRootPathAsync","spawnAsync","stdout","trim","isFileIgnoredAsync","filePath","cwd","path","normalize","ignore","Ignore","initIgnoreAsync","ignores","error","code","GITIGNORE_FILENAME","DEFAULT_IGNORE","ignoreMapping","rootDir","ignoreFilePaths","findIgnoreFilesAsync","sort","a","b","length","localeCompare","Promise","all","map","slice","createIgnore","add","fs","readFile","join","relativePath","prefix","startsWith","root","
|
|
1
|
+
{"version":3,"sources":["vcs.ts"],"sourcesContent":[null],"names":["getVCSClientAsync","projectDir","isGitInstalledAndConfiguredAsync","GitClient","NoVCSClient","getRootPathAsync","spawnAsync","stdout","trim","isFileIgnoredAsync","filePath","cwd","path","normalize","ignore","Ignore","initIgnoreAsync","ignores","error","code","GITIGNORE_FILENAME","DEFAULT_IGNORE","ignoreMapping","rootDir","ignoreFilePaths","findIgnoreFilesAsync","sort","a","b","length","localeCompare","Promise","all","map","slice","createIgnore","add","fs","readFile","join","relativePath","prefix","startsWith","root","files","directories","directory","entries","readdir","withFileTypes","catch","entry","file","name","isDirectory","push"],"mappings":";;;;+BAUA;;;eAA8BA;;;;gEAVP;;;;;;;gEACR;;;;;;;gEAC0C;;;;;;;gEACxC;;;;;;;;;;;AAOF,eAAeA,kBAAkBC,UAAkB;IAChE,IAAI,MAAMC,oCAAoC;QAC5C,OAAO,IAAIC;IACb,OAAO;QACL,OAAO,IAAIC,YAAYH;IACzB;AACF;AAEA,MAAME;IACJ,MAAaE,mBAAoC;QAC/C,OAAO,AAAC,CAAA,MAAMC,IAAAA,qBAAU,EAAC,OAAO;YAAC;YAAa;SAAkB,CAAA,EAAGC,MAAM,CAACC,IAAI;IAChF;IAEA,MAAMC,mBAAmBC,QAAgB,EAAoB;QAC3D,IAAI;YACF,MAAMJ,IAAAA,qBAAU,EAAC,OAAO;gBAAC;gBAAgB;gBAAMI;aAAS,EAAE;gBACxDC,KAAKC,eAAI,CAACC,SAAS,CAAC,MAAM,IAAI,CAACR,gBAAgB;YACjD;YACA,OAAO;QACT,EAAE,OAAM;YACN,OAAO;QACT;IACF;AACF;AAEA,MAAMD;;IACJ,YAAY,AAAiBH,UAAkB,CAAE;aAApBA,aAAAA;IAAqB;IAElD,MAAMI,mBAAoC;QACxC,OAAO,IAAI,CAACJ,UAAU;IACxB;IAEA,MAAMQ,mBAAmBC,QAAgB,EAAoB;QAC3D,MAAMI,SAAS,IAAIC,OAAO,IAAI,CAACd,UAAU;QACzC,MAAMa,OAAOE,eAAe;QAC5B,OAAOF,OAAOG,OAAO,CAACP;IACxB;AACF;AAEA,eAAeR;IACb,IAAI;QACF,MAAMI,IAAAA,qBAAU,EAAC,OAAO;YAAC;SAAS;IACpC,EAAE,OAAOY,OAAY;QACnB,IAAIA,MAAMC,IAAI,KAAK,UAAU;YAC3B,OAAO;QACT;QACA,MAAMD;IACR;IAEA,IAAI;QACF,MAAMZ,IAAAA,qBAAU,EAAC,OAAO;YAAC;YAAa;SAAkB;IAC1D,EAAE,OAAM;QACN,OAAO;IAC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AAMV,mBAAE,CACrBW,OAAO,CAACpC,eAAI,CAAC2B,IAAI,CAACI,MAAMG,YAAY;YAAEG,eAAe;QAAK,GAC1DC,KAAK,CAAC,IAAM,EAAE;QACjB,KAAK,MAAMC,SAASJ,QAAS;YAC3B,MAAMK,OAAOxC,eAAI,CAAC2B,IAAI,CAACO,WAAWK,MAAME,IAAI;YAC5C,IAAIF,MAAMG,WAAW,IAAI;gBACvB,IAAIH,MAAME,IAAI,KAAK,kBAAkB,CAACF,MAAME,IAAI,CAACX,UAAU,CAAC,MAAM;oBAChEG,YAAYU,IAAI,CAACH;gBACnB;YACF,OAAO,IAAID,MAAME,IAAI,KAAKjC,oBAAoB;gBAC5CwB,MAAMW,IAAI,CAACH;YACb;QACF;IACF;IACA,OAAOR;AACT"}
|
package/utils/src/vcs.ts
CHANGED
|
@@ -116,10 +116,22 @@ class Ignore {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
async function findIgnoreFilesAsync(root: string): Promise<string[]> {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
const files: string[] = [];
|
|
120
|
+
const directories = [''];
|
|
121
|
+
for (const directory of directories) {
|
|
122
|
+
const entries = await fs
|
|
123
|
+
.readdir(path.join(root, directory), { withFileTypes: true })
|
|
124
|
+
.catch(() => []);
|
|
125
|
+
for (const entry of entries) {
|
|
126
|
+
const file = path.join(directory, entry.name);
|
|
127
|
+
if (entry.isDirectory()) {
|
|
128
|
+
if (entry.name !== 'node_modules' && !entry.name.startsWith('.')) {
|
|
129
|
+
directories.push(file);
|
|
130
|
+
}
|
|
131
|
+
} else if (entry.name === GITIGNORE_FILENAME) {
|
|
132
|
+
files.push(file);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return files;
|
|
125
137
|
}
|