first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

22
node_modules/@expo/local-build-cache-provider/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)
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.

View File

@@ -0,0 +1,14 @@
# @expo/local-build-cache-provider
A build cache provider plugin for the Expo CLI
To use the local build provider plugin, update your **app.json** to include the `buildCacheProvider` property and set it to `expo/local-build-cache-provider`:
```json
{
"expo": {
...
"buildCacheProvider": "expo/local-build-cache-provider"
}
}
```

View File

@@ -0,0 +1,4 @@
import { BuildCacheProviderPlugin } from '@expo/config';
declare const LocalBuildCacheProvider: BuildCacheProviderPlugin;
export default LocalBuildCacheProvider;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAIzB,MAAM,cAAc,CAAC;AAyFtB,QAAA,MAAM,uBAAuB,EAAE,wBAG9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}

View File

@@ -0,0 +1,69 @@
import chalk from 'chalk';
import fs from 'fs';
import path from 'path';
async function resolveBuildCacheAsync({ projectRoot, platform, fingerprintHash, runOptions }, options = {}) {
const cacheDir = resolveCacheDir(projectRoot, options);
if (!fs.existsSync(cacheDir)) {
console.debug('Local build cache directory does not exist, skipping check');
return null;
}
const files = await fs.promises.readdir(cacheDir);
const expectedFile = `${platform}-${fingerprintHash}-${getBuildVariant(runOptions)}`;
const file = files.find((file) => file.includes(expectedFile));
if (!file) {
console.debug('No matching builds found in local cache, starting build process');
return null;
}
return path.join(cacheDir, file);
}
async function uploadBuildCacheAsync({ projectRoot, platform, fingerprintHash, buildPath, runOptions }, options = {}) {
const cacheDir = resolveCacheDir(projectRoot, options);
if (!fs.existsSync(cacheDir)) {
console.debug('Build cache directory does not exist, creating build cache folder at:', cacheDir);
await fs.promises.mkdir(cacheDir, { recursive: true });
}
try {
console.log(chalk `{whiteBright \u203A} {bold Copying build to local cache}`);
const destFile = `${platform}-${fingerprintHash}-${getBuildVariant(runOptions)}${path.extname(buildPath)}`;
const destPath = path.join(cacheDir, destFile);
// Remove existing cache entry if it exists.
if (fs.existsSync(destPath)) {
await fs.promises.rm(destPath, { recursive: true, force: true });
}
const stats = await fs.promises.stat(buildPath);
// iOS builds are usually directories, Android builds are usually files.
if (stats.isDirectory()) {
await fs.promises.cp(buildPath, destPath, { recursive: true });
}
else if (stats.isFile()) {
await fs.promises.copyFile(buildPath, destPath);
}
else {
console.debug('Unsupported build artifact type for caching:', buildPath);
return null;
}
return destPath;
}
catch (error) {
console.debug(' error:', error);
}
return null;
}
function resolveCacheDir(projectRoot, options) {
return options?.cacheDir ?? path.join(projectRoot, '.expo', 'build-cache');
}
function getBuildVariant(runOptions) {
if ('variant' in runOptions && runOptions.variant !== undefined) {
return runOptions.variant;
}
if ('configuration' in runOptions && runOptions.configuration !== undefined) {
return runOptions.configuration;
}
return 'unknown';
}
const LocalBuildCacheProvider = {
resolveBuildCache: resolveBuildCacheAsync,
uploadBuildCache: uploadBuildCacheAsync,
};
export default LocalBuildCacheProvider;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,51 @@
{
"name": "@expo/local-build-cache-provider",
"version": "55.0.6",
"description": "Local build cache provider for Expo",
"main": "build/index.js",
"types": "build/index.d.ts",
"exports": {
".": {
"types": "./build/index.d.ts",
"default": "./build/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "expo-module build",
"clean": "expo-module clean",
"lint": "expo-module lint",
"test": "expo-module test",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"typecheck": "expo-module typecheck"
},
"repository": {
"type": "git",
"url": "https://github.com/expo/expo.git",
"directory": "packages/@expo/local-build-cache-provider"
},
"keywords": [
"expo",
"react-native",
"build-cache-provider",
"local-build-cache"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/expo/expo/issues"
},
"homepage": "https://github.com/expo/expo/tree/main/packages/@expo/local-build-cache-provider#readme",
"files": [
"build"
],
"dependencies": {
"@expo/config": "~55.0.8",
"chalk": "^4.1.2"
},
"devDependencies": {
"expo-module-scripts": "^55.0.2",
"memfs": "^3.2.0"
},
"gitHead": "b183e5cbd95eb6ee54a878291c7077d8d63e4850"
}