Merge branch 'main' into pre-prod
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
../expo/bin/fingerprint
|
||||
../@expo/fingerprint/bin/cli.js
|
||||
+658
-1793
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -110,8 +110,9 @@ Options:
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-n <0|1>
|
||||
This is the base to be used for the prerelease identifier.
|
||||
-n <0|1|false>
|
||||
Base number for prerelease identifier (default: 0).
|
||||
Use false to omit the number altogether.
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ const main = () => {
|
||||
versions = versions.map((v) => {
|
||||
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
||||
}).filter((v) => {
|
||||
return semver.valid(v)
|
||||
return semver.valid(v, options)
|
||||
})
|
||||
if (!versions.length) {
|
||||
return fail()
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -53,7 +53,7 @@ const diff = (version1, version2) => {
|
||||
return prefix + 'patch'
|
||||
}
|
||||
|
||||
// high and low are preleases
|
||||
// high and low are prereleases
|
||||
return 'prerelease'
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -78,8 +78,8 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
||||
|
||||
// ## Pre-release Version Identifier
|
||||
// A numeric identifier, or a non-numeric identifier.
|
||||
// Non-numberic identifiers include numberic identifiers but can be longer.
|
||||
// Therefore non-numberic identifiers must go first.
|
||||
// Non-numeric identifiers include numeric identifiers but can be longer.
|
||||
// Therefore non-numeric identifiers must go first.
|
||||
|
||||
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
||||
}|${src[t.NUMERICIDENTIFIER]})`)
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "semver",
|
||||
"version": "7.7.3",
|
||||
"version": "7.7.4",
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -14,8 +14,8 @@
|
||||
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@npmcli/eslint-config": "^5.0.0",
|
||||
"@npmcli/template-oss": "4.25.1",
|
||||
"@npmcli/eslint-config": "^6.0.0",
|
||||
"@npmcli/template-oss": "4.29.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"tap": "^16.0.0"
|
||||
},
|
||||
@@ -52,7 +52,7 @@
|
||||
"author": "GitHub Inc.",
|
||||
"templateOSS": {
|
||||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
||||
"version": "4.25.1",
|
||||
"version": "4.29.0",
|
||||
"engines": ">=10",
|
||||
"distPaths": [
|
||||
"classes/",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -38,7 +38,7 @@ const compare = require('../functions/compare.js')
|
||||
// - If LT
|
||||
// - If LT.semver is greater than any < or <= comp in C, return false
|
||||
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
||||
// - If GT.semver has a prerelease, and not in prerelease mode
|
||||
// - If LT.semver has a prerelease, and not in prerelease mode
|
||||
// - If no C has a prerelease and the LT.semver tuple, return false
|
||||
// - Else return true
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/fingerprint",
|
||||
"version": "0.15.4",
|
||||
"version": "0.15.5",
|
||||
"description": "A library to generate a fingerprint from a React Native project",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -50,7 +50,7 @@
|
||||
"getenv": "^2.0.0",
|
||||
"glob": "^13.0.0",
|
||||
"ignore": "^5.3.1",
|
||||
"minimatch": "^9.0.0",
|
||||
"minimatch": "^10.2.2",
|
||||
"p-limit": "^3.1.0",
|
||||
"resolve-from": "^5.0.0",
|
||||
"semver": "^7.6.0"
|
||||
@@ -60,5 +60,5 @@
|
||||
"require-from-string": "^2.0.2",
|
||||
"temp-dir": "^2.0.0"
|
||||
},
|
||||
"gitHead": "e8b838828e5e985379c07294dc932dba66c89562"
|
||||
"gitHead": "dd4e87727c4ef32ac5d8a7b5a42fd80da254140f"
|
||||
}
|
||||
|
||||
+2
-2
@@ -36,7 +36,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const code_frame_1 = require("@babel/code-frame");
|
||||
const json5_1 = __importDefault(require("json5"));
|
||||
const node_fs_1 = __importDefault(require("node:fs"));
|
||||
const node_path_1 = __importDefault(require("node:path"));
|
||||
@@ -191,7 +190,8 @@ function parseJsonString(json, options, fileName) {
|
||||
if (defaultValue === undefined) {
|
||||
const location = locationFromSyntaxError(e, json);
|
||||
if (location) {
|
||||
const codeFrame = (0, code_frame_1.codeFrameColumns)(json, { start: location });
|
||||
const { codeFrameColumns, } = require('@babel/code-frame');
|
||||
const codeFrame = codeFrameColumns(json, { start: location });
|
||||
e.codeFrame = codeFrame;
|
||||
e.message += `\n${codeFrame}`;
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Generated
Vendored
-22
@@ -1,22 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
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.
|
||||
Generated
Vendored
-19
@@ -1,19 +0,0 @@
|
||||
# @babel/code-frame
|
||||
|
||||
> Generate errors that contain a code frame that point to source locations.
|
||||
|
||||
See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/code-frame
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/code-frame --dev
|
||||
```
|
||||
Generated
Vendored
-167
@@ -1,167 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.codeFrameColumns = codeFrameColumns;
|
||||
exports.default = _default;
|
||||
|
||||
var _highlight = _interopRequireWildcard(require("@babel/highlight"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
let deprecationWarningShown = false;
|
||||
|
||||
function getDefs(chalk) {
|
||||
return {
|
||||
gutter: chalk.grey,
|
||||
marker: chalk.red.bold,
|
||||
message: chalk.red.bold
|
||||
};
|
||||
}
|
||||
|
||||
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
||||
|
||||
function getMarkerLines(loc, source, opts) {
|
||||
const startLoc = Object.assign({
|
||||
column: 0,
|
||||
line: -1
|
||||
}, loc.start);
|
||||
const endLoc = Object.assign({}, startLoc, loc.end);
|
||||
const {
|
||||
linesAbove = 2,
|
||||
linesBelow = 3
|
||||
} = opts || {};
|
||||
const startLine = startLoc.line;
|
||||
const startColumn = startLoc.column;
|
||||
const endLine = endLoc.line;
|
||||
const endColumn = endLoc.column;
|
||||
let start = Math.max(startLine - (linesAbove + 1), 0);
|
||||
let end = Math.min(source.length, endLine + linesBelow);
|
||||
|
||||
if (startLine === -1) {
|
||||
start = 0;
|
||||
}
|
||||
|
||||
if (endLine === -1) {
|
||||
end = source.length;
|
||||
}
|
||||
|
||||
const lineDiff = endLine - startLine;
|
||||
const markerLines = {};
|
||||
|
||||
if (lineDiff) {
|
||||
for (let i = 0; i <= lineDiff; i++) {
|
||||
const lineNumber = i + startLine;
|
||||
|
||||
if (!startColumn) {
|
||||
markerLines[lineNumber] = true;
|
||||
} else if (i === 0) {
|
||||
const sourceLength = source[lineNumber - 1].length;
|
||||
markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
|
||||
} else if (i === lineDiff) {
|
||||
markerLines[lineNumber] = [0, endColumn];
|
||||
} else {
|
||||
const sourceLength = source[lineNumber - i].length;
|
||||
markerLines[lineNumber] = [0, sourceLength];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (startColumn === endColumn) {
|
||||
if (startColumn) {
|
||||
markerLines[startLine] = [startColumn, 0];
|
||||
} else {
|
||||
markerLines[startLine] = true;
|
||||
}
|
||||
} else {
|
||||
markerLines[startLine] = [startColumn, endColumn - startColumn];
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
start,
|
||||
end,
|
||||
markerLines
|
||||
};
|
||||
}
|
||||
|
||||
function codeFrameColumns(rawLines, loc, opts = {}) {
|
||||
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
|
||||
const chalk = (0, _highlight.getChalk)(opts);
|
||||
const defs = getDefs(chalk);
|
||||
|
||||
const maybeHighlight = (chalkFn, string) => {
|
||||
return highlighted ? chalkFn(string) : string;
|
||||
};
|
||||
|
||||
const lines = rawLines.split(NEWLINE);
|
||||
const {
|
||||
start,
|
||||
end,
|
||||
markerLines
|
||||
} = getMarkerLines(loc, lines, opts);
|
||||
const hasColumns = loc.start && typeof loc.start.column === "number";
|
||||
const numberMaxWidth = String(end).length;
|
||||
const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
|
||||
let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => {
|
||||
const number = start + 1 + index;
|
||||
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
||||
const gutter = ` ${paddedNumber} | `;
|
||||
const hasMarker = markerLines[number];
|
||||
const lastMarkerLine = !markerLines[number + 1];
|
||||
|
||||
if (hasMarker) {
|
||||
let markerLine = "";
|
||||
|
||||
if (Array.isArray(hasMarker)) {
|
||||
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
|
||||
const numberOfMarkers = hasMarker[1] || 1;
|
||||
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
|
||||
|
||||
if (lastMarkerLine && opts.message) {
|
||||
markerLine += " " + maybeHighlight(defs.message, opts.message);
|
||||
}
|
||||
}
|
||||
|
||||
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
|
||||
} else {
|
||||
return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;
|
||||
}
|
||||
}).join("\n");
|
||||
|
||||
if (opts.message && !hasColumns) {
|
||||
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
|
||||
}
|
||||
|
||||
if (highlighted) {
|
||||
return chalk.reset(frame);
|
||||
} else {
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
|
||||
function _default(rawLines, lineNumber, colNumber, opts = {}) {
|
||||
if (!deprecationWarningShown) {
|
||||
deprecationWarningShown = true;
|
||||
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
||||
|
||||
if (process.emitWarning) {
|
||||
process.emitWarning(message, "DeprecationWarning");
|
||||
} else {
|
||||
const deprecationError = new Error(message);
|
||||
deprecationError.name = "DeprecationWarning";
|
||||
console.warn(new Error(message));
|
||||
}
|
||||
}
|
||||
|
||||
colNumber = Math.max(colNumber, 0);
|
||||
const location = {
|
||||
start: {
|
||||
column: colNumber,
|
||||
line: lineNumber
|
||||
}
|
||||
};
|
||||
return codeFrameColumns(rawLines, location, opts);
|
||||
}
|
||||
Generated
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "@babel/code-frame",
|
||||
"version": "7.10.4",
|
||||
"description": "Generate errors that contain a code frame that point to source locations.",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-code-frame"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/highlight": "^7.10.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chalk": "^2.0.0",
|
||||
"strip-ansi": "^4.0.0"
|
||||
},
|
||||
"gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
|
||||
}
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/json-file",
|
||||
"version": "10.0.8",
|
||||
"version": "10.0.13",
|
||||
"description": "A module for reading, writing, and manipulating JSON files",
|
||||
"main": "build/JsonFile.js",
|
||||
"scripts": {
|
||||
@@ -30,17 +30,17 @@
|
||||
"build"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "~7.10.4",
|
||||
"@babel/code-frame": "^7.20.0",
|
||||
"json5": "^2.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__code-frame": "^7.0.1",
|
||||
"@types/babel__code-frame": "^7.27.0",
|
||||
"@types/json5": "^2.2.0",
|
||||
"expo-module-scripts": "^5.0.8",
|
||||
"expo-module-scripts": "^55.0.2",
|
||||
"memfs": "^3.2.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "172a69f5f70c1d0e043e1532f924de97210cabc3"
|
||||
"gitHead": "20029879d2f953a428d70197fc7e25e4d791848a"
|
||||
}
|
||||
|
||||
+19
-15
@@ -8,8 +8,8 @@ exports._createSideEffectMatcher = _createSideEffectMatcher;
|
||||
exports.isVirtualModule = isVirtualModule;
|
||||
const isResolvedDependency_1 = require("@expo/metro/metro/lib/isResolvedDependency");
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const minimatch_1 = require("minimatch");
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const picomatch_1 = __importDefault(require("picomatch"));
|
||||
const findUpPackageJsonPath_1 = require("./findUpPackageJsonPath");
|
||||
const debug = require('debug')('expo:side-effects');
|
||||
function hasSideEffectWithDebugTrace(options, graph, value, parentTrace = [value.path], checked = new Set()) {
|
||||
@@ -61,27 +61,31 @@ const getPackageJsonMatcher = (options, dir) => {
|
||||
return isSideEffect;
|
||||
};
|
||||
function _createSideEffectMatcher(dirRoot, packageJson, packageJsonPath = '') {
|
||||
let sideEffectMatcher;
|
||||
if (Array.isArray(packageJson.sideEffects)) {
|
||||
const sideEffects = packageJson.sideEffects
|
||||
.filter((sideEffect) => typeof sideEffect === 'string')
|
||||
.map((sideEffect) => sideEffect.replace(/^\.\//, ''));
|
||||
sideEffectMatcher = (0, picomatch_1.default)(sideEffects, { matchBase: true });
|
||||
}
|
||||
else if (typeof packageJson.sideEffects === 'boolean' || !packageJson.sideEffects) {
|
||||
sideEffectMatcher = packageJson.sideEffects;
|
||||
}
|
||||
else {
|
||||
debug('Invalid sideEffects field in package.json:', packageJsonPath, packageJson.sideEffects);
|
||||
}
|
||||
return (fp) => {
|
||||
// Default is that everything is a side-effect unless explicitly marked as not.
|
||||
if (packageJson.sideEffects == null) {
|
||||
if (sideEffectMatcher == null) {
|
||||
return null;
|
||||
}
|
||||
if (typeof packageJson.sideEffects === 'boolean') {
|
||||
return packageJson.sideEffects;
|
||||
else if (typeof sideEffectMatcher === 'boolean') {
|
||||
return sideEffectMatcher;
|
||||
}
|
||||
else if (Array.isArray(packageJson.sideEffects)) {
|
||||
else {
|
||||
const relativeName = path_1.default.relative(dirRoot, fp);
|
||||
return packageJson.sideEffects.some((sideEffect) => {
|
||||
if (typeof sideEffect === 'string') {
|
||||
return (0, minimatch_1.minimatch)(relativeName, sideEffect.replace(/^\.\//, ''), {
|
||||
matchBase: true,
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return sideEffectMatcher(relativeName);
|
||||
}
|
||||
debug('Invalid sideEffects field in package.json:', packageJsonPath, packageJson.sideEffects);
|
||||
return null;
|
||||
};
|
||||
}
|
||||
function getShallowSideEffect(options, value) {
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"sideEffects.js","sourceRoot":"","sources":["../../src/serializer/sideEffects.ts"],"names":[],"m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IAAI,IAAI,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"}
|
||||
+4
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/metro-config",
|
||||
"version": "54.0.14",
|
||||
"version": "54.0.15",
|
||||
"description": "A Metro config for running React Native projects with the Metro bundler",
|
||||
"main": "build/ExpoMetroConfig.js",
|
||||
"types": "build/ExpoMetroConfig.d.ts",
|
||||
@@ -52,7 +52,7 @@
|
||||
"hermes-parser": "^0.29.1",
|
||||
"jsc-safe-url": "^0.2.4",
|
||||
"lightningcss": "^1.30.1",
|
||||
"minimatch": "^9.0.0",
|
||||
"picomatch": "^4.0.3",
|
||||
"postcss": "~8.4.32",
|
||||
"resolve-from": "^5.0.0"
|
||||
},
|
||||
@@ -67,6 +67,7 @@
|
||||
"devDependencies": {
|
||||
"@jridgewell/trace-mapping": "^0.3.20",
|
||||
"@types/babel__core": "^7.20.5",
|
||||
"@types/picomatch": "^4.0.2",
|
||||
"dedent": "^1.5.3",
|
||||
"expo-module-scripts": "^5.0.8",
|
||||
"sass": "^1.60.0"
|
||||
@@ -74,5 +75,5 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "a68247841f460700a3066c7bc7954a72591b26bc"
|
||||
"gitHead": "dd4e87727c4ef32ac5d8a7b5a42fd80da254140f"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,4 @@
|
||||
import { SpawnOptions, SpawnResult } from '@expo/spawn-async';
|
||||
import { ExecAsyncOptions } from 'exec-async';
|
||||
declare function osascriptExecAsync(script: string | string[], opts?: ExecAsyncOptions): Promise<string>;
|
||||
declare function osascriptSpawnAsync(script: string | string[], opts?: SpawnOptions): Promise<SpawnResult>;
|
||||
declare function isAppRunningAsync(appName: string): Promise<boolean>;
|
||||
declare function safeIdOfAppAsync(appName: string): Promise<string | null>;
|
||||
@@ -13,4 +11,6 @@ declare function openInEditorAsync(pth: string, preferredEditor?: string): Promi
|
||||
declare function openItermToSpecificFolderAsync(dir: string): Promise<SpawnResult>;
|
||||
declare function openTerminalToSpecificFolderAsync(dir: string, inTab?: boolean): Promise<SpawnResult>;
|
||||
declare function openFolderInTerminalAppAsync(dir: string, inTab?: boolean): Promise<SpawnResult>;
|
||||
/** @deprecated */
|
||||
declare function osascriptExecAsync(script: string | string[], opts?: SpawnOptions): Promise<string>;
|
||||
export { chooseAppAsync, chooseEditorAppAsync, chooseTerminalAppAsync, osascriptExecAsync as execAsync, isAppRunningAsync, openFinderToFolderAsync, openFolderInTerminalAppAsync, openInAppAsync, openInEditorAsync, openItermToSpecificFolderAsync, openTerminalToSpecificFolderAsync, safeIdOfAppAsync, osascriptSpawnAsync as spawnAsync, };
|
||||
|
||||
+8
-8
@@ -17,7 +17,6 @@ exports.openTerminalToSpecificFolderAsync = openTerminalToSpecificFolderAsync;
|
||||
exports.safeIdOfAppAsync = safeIdOfAppAsync;
|
||||
exports.spawnAsync = osascriptSpawnAsync;
|
||||
const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
|
||||
const exec_async_1 = __importDefault(require("exec-async"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const util_1 = __importDefault(require("util"));
|
||||
function osascriptArgs(script) {
|
||||
@@ -31,20 +30,17 @@ function osascriptArgs(script) {
|
||||
}
|
||||
return args;
|
||||
}
|
||||
async function osascriptExecAsync(script, opts) {
|
||||
const result = await (0, exec_async_1.default)('osascript', osascriptArgs(script), Object.assign({ stdio: 'inherit' }, opts));
|
||||
return result?.toString() || '';
|
||||
}
|
||||
async function osascriptSpawnAsync(script, opts) {
|
||||
return await (0, spawn_async_1.default)('osascript', osascriptArgs(script), opts);
|
||||
}
|
||||
async function isAppRunningAsync(appName) {
|
||||
const zeroMeansNo = (await osascriptExecAsync('tell app "System Events" to count processes whose name is ' + JSON.stringify(appName))).trim();
|
||||
return zeroMeansNo !== '0';
|
||||
const { stdout } = await osascriptSpawnAsync(`tell app "System Events" to count processes whose name is ${JSON.stringify(appName)}`);
|
||||
return stdout.trim() !== '0';
|
||||
}
|
||||
async function safeIdOfAppAsync(appName) {
|
||||
try {
|
||||
return (await osascriptExecAsync('id of app ' + JSON.stringify(appName))).trim();
|
||||
const { stdout } = await osascriptSpawnAsync(`id of app ${JSON.stringify(appName)}`);
|
||||
return stdout.trim();
|
||||
}
|
||||
catch {
|
||||
return null;
|
||||
@@ -181,4 +177,8 @@ async function openFolderInTerminalAppAsync(dir, inTab = false) {
|
||||
return await openTerminalToSpecificFolderAsync(dir, inTab);
|
||||
}
|
||||
}
|
||||
/** @deprecated */
|
||||
async function osascriptExecAsync(script, opts) {
|
||||
return (await osascriptSpawnAsync(script, opts)).stdout.trim();
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AA2ME,wCAAc;AACd,oDAAoB;AACpB,wDAAsB;AACA,uCAAS;AAC/B,8CAAiB;AACjB,0DAAuB;AACvB,oEAA4B;AAC5B,wCAAc;AACd,8CAAiB;AACjB,wEAA8B;AAC9B,8EAAiC;AACjC,4CAAgB;AACO,yCAAU;AAvNnC,oEAA0E;AAC1E,4DAAyD;AACzD,gDAAwB;AACxB,gDAAwB;AAExB,SAAS,aAAa,CAAC,MAAyB;IAC9C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,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AAC;AAED,kBAAkB;AAClB,KAAK,UAAU,kBAAkB,CAAC,MAAyB,EAAE,IAAmB;IAC9E,OAAO,CAAC,MAAM,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACjE,CAAC"}
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/osascript",
|
||||
"version": "2.3.8",
|
||||
"version": "2.4.2",
|
||||
"description": "Tools for running an osascripts in Node",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -37,14 +37,14 @@
|
||||
"node": ">=12"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/spawn-async": "^1.7.2",
|
||||
"exec-async": "^2.2.0"
|
||||
"@expo/spawn-async": "^1.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"expo-module-scripts": "^5.0.8"
|
||||
"@types/node": "^22.14.0",
|
||||
"expo-module-scripts": "^55.0.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "172a69f5f70c1d0e043e1532f924de97210cabc3"
|
||||
"gitHead": "7d7f6762fc6907c27a329953c682134a84410dea"
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/package-manager",
|
||||
"version": "1.9.10",
|
||||
"version": "1.10.4",
|
||||
"description": "A library for installing and finding packages in a project",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -37,7 +37,7 @@
|
||||
"build"
|
||||
],
|
||||
"dependencies": {
|
||||
"@expo/json-file": "^10.0.8",
|
||||
"@expo/json-file": "^10.0.13",
|
||||
"@expo/spawn-async": "^1.7.2",
|
||||
"chalk": "^4.0.0",
|
||||
"npm-package-arg": "^11.0.0",
|
||||
@@ -47,10 +47,10 @@
|
||||
"devDependencies": {
|
||||
"@types/micromatch": "^4.0.2",
|
||||
"@types/npm-package-arg": "^6.1.0",
|
||||
"expo-module-scripts": "^5.0.8"
|
||||
"expo-module-scripts": "^55.0.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "f8d5c76f87a35baa4f9144d848d377727817873d"
|
||||
"gitHead": "f35977db4ffc6bbc2b295d65a8d74e9fd4f24ecb"
|
||||
}
|
||||
|
||||
+4
-6
@@ -17,8 +17,7 @@ const symbols_1 = require("./utils/symbols");
|
||||
*/
|
||||
class ExpoRunFormatter extends Formatter_1.Formatter {
|
||||
static create(projectRoot, { xcodeProject, isDebug, } = {}) {
|
||||
var _a;
|
||||
const appName = ((_a = xcodeProject === null || xcodeProject === void 0 ? void 0 : xcodeProject.name.match(/.*\/(.*)\.\w+/)) === null || _a === void 0 ? void 0 : _a[1]) || '';
|
||||
const appName = xcodeProject?.name.match(/.*\/(.*)\.\w+/)?.[1] || '';
|
||||
const formatter = new ExpoRunFormatter({
|
||||
projectRoot,
|
||||
appName,
|
||||
@@ -34,14 +33,13 @@ class ExpoRunFormatter extends Formatter_1.Formatter {
|
||||
return this._parser;
|
||||
}
|
||||
constructor(props) {
|
||||
var _a;
|
||||
super(props);
|
||||
this.props = props;
|
||||
let podfile = {};
|
||||
const podfileLock = path_1.default.join(props.projectRoot, 'ios', 'Podfile.lock');
|
||||
try {
|
||||
const podfileContents = fs_1.default.readFileSync(podfileLock, 'utf8');
|
||||
podfile = (_a = (0, parsePodfileLock_1.parsePodfileLock)(podfileContents)) !== null && _a !== void 0 ? _a : {};
|
||||
podfile = (0, parsePodfileLock_1.parsePodfileLock)(podfileContents) ?? {};
|
||||
}
|
||||
catch { }
|
||||
this.podfileTracer = new PodfileTracer_1.PodfileTracer({
|
||||
@@ -74,7 +72,7 @@ class ExpoRunFormatter extends Formatter_1.Formatter {
|
||||
// Don't show warnings from cocoapods that come from non-root target pods.
|
||||
!collisions.some(({ filePath }) => {
|
||||
const nodeModule = this.podfileTracer.getNodeModuleNameForTarget(path_1.default.dirname(filePath));
|
||||
return !(nodeModule === null || nodeModule === void 0 ? void 0 : nodeModule.isRootTarget);
|
||||
return !nodeModule?.isRootTarget;
|
||||
}));
|
||||
}
|
||||
shouldShowWarningInTarget({ target }) {
|
||||
@@ -86,7 +84,7 @@ class ExpoRunFormatter extends Formatter_1.Formatter {
|
||||
}
|
||||
getNodeModuleName(filePath, target) {
|
||||
const results = this.podfileTracer.getNodeModuleName(filePath, target);
|
||||
return (results === null || results === void 0 ? void 0 : results.name) ? chalk_1.default.cyan(results.name) : null;
|
||||
return results?.name ? chalk_1.default.cyan(results.name) : null;
|
||||
}
|
||||
formatFileOperation(props) {
|
||||
const title = this.getFileOperationTitle(props.type);
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+9
-10
@@ -106,6 +106,11 @@ function getAppRoot(filePath) {
|
||||
return isBuildFolder(appRoot) ? appRoot : '';
|
||||
}
|
||||
class Formatter {
|
||||
static { this.format = format; }
|
||||
static { this.formatBreadCrumb = formatBreadCrumb; }
|
||||
static { this.getAppRoot = getAppRoot; }
|
||||
static { this.highlightLastPathComponent = highlightLastPathComponent; }
|
||||
static { this.relativePath = relativePath; }
|
||||
get parser() {
|
||||
if (this._parser) {
|
||||
return this._parser;
|
||||
@@ -537,7 +542,7 @@ class Formatter {
|
||||
[
|
||||
Matchers_1.Matchers.Warnings.MISSING_ARCHITECTURE,
|
||||
([, $1, $2, $3]) => {
|
||||
return this.formatMissingArchitectureWarning($1, $2 === null || $2 === void 0 ? void 0 : $2.split(' ').map(value => value.trim()), $3 === null || $3 === void 0 ? void 0 : $3.split(' ').map(value => value.trim()));
|
||||
return this.formatMissingArchitectureWarning($1, $2?.split(' ').map(value => value.trim()), $3?.split(' ').map(value => value.trim()));
|
||||
},
|
||||
],
|
||||
[
|
||||
@@ -693,11 +698,6 @@ class Formatter {
|
||||
}
|
||||
}
|
||||
exports.Formatter = Formatter;
|
||||
Formatter.format = format;
|
||||
Formatter.formatBreadCrumb = formatBreadCrumb;
|
||||
Formatter.getAppRoot = getAppRoot;
|
||||
Formatter.highlightLastPathComponent = highlightLastPathComponent;
|
||||
Formatter.relativePath = relativePath;
|
||||
function findLastIndex(arr) {
|
||||
for (let i = arr.length - 1; i >= 0; i--) {
|
||||
if (arr[i].startsWith('Error:')) {
|
||||
@@ -737,7 +737,6 @@ function parseOptionalInt(text) {
|
||||
}
|
||||
}
|
||||
function formatWarningOrError({ projectRoot, filePath, reason, cursor, lineText, lineNumber, columnNumber, isError, maxWarningLineLength = 200, }) {
|
||||
var _a;
|
||||
const line = parseOptionalInt(lineNumber) || 0;
|
||||
const column = parseOptionalInt(columnNumber);
|
||||
const color = isError ? chalk_1.default.red : chalk_1.default.yellow;
|
||||
@@ -769,7 +768,7 @@ function formatWarningOrError({ projectRoot, filePath, reason, cursor, lineText,
|
||||
// `...transition:'fade'},k._updatePropsStack=function(){clearImmediate(k._updateImmediate),k._updateImmediate...`
|
||||
// If there is no text preview or column number, we can't do anything.
|
||||
if (lineText && column != null) {
|
||||
const rangeWindow = Math.round(Math.max((_a = displayFilePath === null || displayFilePath === void 0 ? void 0 : displayFilePath.length) !== null && _a !== void 0 ? _a : 0, 80) / 2);
|
||||
const rangeWindow = Math.round(Math.max(displayFilePath?.length ?? 0, 80) / 2);
|
||||
let minBounds = Math.max(0, column - rangeWindow);
|
||||
const maxBounds = Math.min(minBounds + rangeWindow * 2, lineText.length);
|
||||
previewLine = lineText.slice(minBounds, maxBounds);
|
||||
@@ -812,7 +811,7 @@ function formatWarningOrError({ projectRoot, filePath, reason, cursor, lineText,
|
||||
}
|
||||
}
|
||||
function fill(width) {
|
||||
return Array(width).join(' ');
|
||||
return width >= 0 ? Array(width).join(' ') : '';
|
||||
}
|
||||
// Dim values like `[-Wnullability-completeness]`
|
||||
function grayOutMatch(text, reg) {
|
||||
@@ -820,7 +819,7 @@ function grayOutMatch(text, reg) {
|
||||
}
|
||||
function replaceMatch(text, reg, callback) {
|
||||
const match = text.match(reg);
|
||||
if (match === null || match === void 0 ? void 0 : match.length) {
|
||||
if (match?.length) {
|
||||
return text.replace(reg, callback(match[0]));
|
||||
}
|
||||
return text;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+22
@@ -297,6 +297,17 @@ export declare const Matchers: {
|
||||
* `$2` target
|
||||
* `$3` project
|
||||
*/
|
||||
/**
|
||||
* Matches a Xcode project / workspace level warning like:
|
||||
* `/path/to/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 26.2.99. (in target 'SDWebImage-SDWebImage' from project 'Pods')`
|
||||
*
|
||||
* @regex Captured groups
|
||||
* `$1` = project file path
|
||||
* `$2` = warning reason (without the trailing "(in target ... from project ...)" suffix)
|
||||
* `$3` = native target
|
||||
* `$4` = native project
|
||||
*/
|
||||
XCODEPROJ_WARNING_MATCHER: RegExp;
|
||||
AMBIGUOUS_RUN_SCRIPT: RegExp;
|
||||
/**
|
||||
* @regex Captured groups
|
||||
@@ -335,6 +346,17 @@ export declare const Matchers: {
|
||||
* `$5` = native project
|
||||
*/
|
||||
UNSUPPORTED_ENTITLEMENT_MATCHER: RegExp;
|
||||
/**
|
||||
* Matches a Xcode project / workspace level error like:
|
||||
* `/path/to/MyApp.xcodeproj: error: Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the App Groups capability. (in target 'MyApp' from project 'MyApp')`
|
||||
*
|
||||
* @regex Captured groups
|
||||
* `$1` = project file path
|
||||
* `$2` = error reason (without the trailing "(in target ... from project ...)" suffix)
|
||||
* `$3` = native target
|
||||
* `$4` = native project
|
||||
*/
|
||||
XCODEPROJ_ERROR_MATCHER: RegExp;
|
||||
/**
|
||||
* @regex Captured groups
|
||||
* `$1` = whole error
|
||||
|
||||
+24
-2
@@ -300,7 +300,18 @@ exports.Matchers = {
|
||||
* `$2` target
|
||||
* `$3` project
|
||||
*/
|
||||
AMBIGUOUS_RUN_SCRIPT: /^Run script build phase '(.+)' will be run during every build because it does not specify any outputs\. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase\. \(in\s.*target '([^']*)'.*project '([^']*)'/m,
|
||||
/**
|
||||
* Matches a Xcode project / workspace level warning like:
|
||||
* `/path/to/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 26.2.99. (in target 'SDWebImage-SDWebImage' from project 'Pods')`
|
||||
*
|
||||
* @regex Captured groups
|
||||
* `$1` = project file path
|
||||
* `$2` = warning reason (without the trailing "(in target ... from project ...)" suffix)
|
||||
* `$3` = native target
|
||||
* `$4` = native project
|
||||
*/
|
||||
XCODEPROJ_WARNING_MATCHER: /^(\/.+\.(?:xcodeproj|xcworkspace)):\s*warning:\s*(.+)$/m,
|
||||
AMBIGUOUS_RUN_SCRIPT: /^Run script build phase '(.+)' will be run during every build because it does not specify any outputs\. To address this (?:warning|issue), either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase\. \(in\s.*target '([^']*)'.*project '([^']*)'/m,
|
||||
/**
|
||||
* @regex Captured groups
|
||||
* `$1` = whole warning
|
||||
@@ -337,7 +348,18 @@ exports.Matchers = {
|
||||
* `$4` = native target
|
||||
* `$5` = native project
|
||||
*/
|
||||
UNSUPPORTED_ENTITLEMENT_MATCHER: /^error: Provisioning profile (.*) doesn't (?:support|include) the (.*) (capability|entitlement)\.(?:\s\(in\s.*target '([^']*)'.*project '([^']*)'\)$)?/m,
|
||||
UNSUPPORTED_ENTITLEMENT_MATCHER: /^(?:error:\s)?Provisioning profile (.*) doesn't (?:support|include) the (.*) (capability|entitlement)\.(?:\s\(in\s.*target '([^']*)'.*project '([^']*)'\)$)?/m,
|
||||
/**
|
||||
* Matches a Xcode project / workspace level error like:
|
||||
* `/path/to/MyApp.xcodeproj: error: Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the App Groups capability. (in target 'MyApp' from project 'MyApp')`
|
||||
*
|
||||
* @regex Captured groups
|
||||
* `$1` = project file path
|
||||
* `$2` = error reason (without the trailing "(in target ... from project ...)" suffix)
|
||||
* `$3` = native target
|
||||
* `$4` = native project
|
||||
*/
|
||||
XCODEPROJ_ERROR_MATCHER: /^(\/.+\.(?:xcodeproj|xcworkspace)):\s*error:\s*(.+)$/m,
|
||||
/**
|
||||
* @regex Captured groups
|
||||
* `$1` = whole error
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+8
-10
@@ -123,6 +123,8 @@ class Parser {
|
||||
project: $4,
|
||||
}),
|
||||
],
|
||||
[Matchers_1.Matchers.Errors.XCODEPROJ_ERROR_MATCHER, ([, , $2]) => formatter.formatError($2)],
|
||||
[Matchers_1.Matchers.Warnings.XCODEPROJ_WARNING_MATCHER, ([, , $2]) => formatter.formatWarning($2)],
|
||||
[Matchers_1.Matchers.Errors.CHECK_DEPENDENCIES_ERRORS_MATCHER, ([, $1]) => formatter.formatError($1)],
|
||||
[
|
||||
Matchers_1.Matchers.Errors.PROVISIONING_PROFILE_REQUIRED_MATCHER,
|
||||
@@ -384,7 +386,7 @@ class Parser {
|
||||
Matchers_1.Matchers.Errors.COMPILE_ERROR_MATCHER,
|
||||
matches => {
|
||||
// Prevent matching a one-liner error.
|
||||
if (matches === null || matches === void 0 ? void 0 : matches[4]) {
|
||||
if (matches?.[4]) {
|
||||
return 'unmatched';
|
||||
}
|
||||
this.formattingError = true;
|
||||
@@ -396,7 +398,7 @@ class Parser {
|
||||
Matchers_1.Matchers.Warnings.COMPILE_WARNING_MATCHER,
|
||||
matches => {
|
||||
// Prevent matching a one-liner warning.
|
||||
if (matches === null || matches === void 0 ? void 0 : matches[4]) {
|
||||
if (matches?.[4]) {
|
||||
return 'unmatched';
|
||||
}
|
||||
this.formattingWarning = true;
|
||||
@@ -414,12 +416,11 @@ class Parser {
|
||||
[
|
||||
null,
|
||||
() => {
|
||||
var _a, _b;
|
||||
if (this.formattingError || this.formattingWarning) {
|
||||
// Framework compile errors can have formatting like babel now:
|
||||
// ' 305 | std::__construct_at(__p, std::forward<_Args>(__args)...);'
|
||||
// So we need to strip the prefix (' 305 |') portion.
|
||||
this.currentIssue.line = (_b = (_a = text.match(/^(?:[\s]+\d+ \|\s)?(.*)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : text;
|
||||
this.currentIssue.line = text.match(/^(?:[\s]+\d+ \|\s)?(.*)/)?.[1] ?? text;
|
||||
}
|
||||
return 'unmatched';
|
||||
},
|
||||
@@ -484,16 +485,13 @@ class Parser {
|
||||
return this.formattingWarning && this.errorOrWarningIsPresent();
|
||||
}
|
||||
errorOrWarningIsPresent() {
|
||||
var _a, _b, _c;
|
||||
return !!((_a = this.currentIssue) === null || _a === void 0 ? void 0 : _a.reason) && !!((_b = this.currentIssue) === null || _b === void 0 ? void 0 : _b.cursor) && !!((_c = this.currentIssue) === null || _c === void 0 ? void 0 : _c.line);
|
||||
return !!this.currentIssue?.reason && !!this.currentIssue?.cursor && !!this.currentIssue?.line;
|
||||
}
|
||||
shouldFormatUndefinedSymbols() {
|
||||
var _a, _b, _c;
|
||||
return (((_a = this.linkerFailure) === null || _a === void 0 ? void 0 : _a.message) && ((_b = this.linkerFailure) === null || _b === void 0 ? void 0 : _b.symbol) && ((_c = this.linkerFailure) === null || _c === void 0 ? void 0 : _c.reference));
|
||||
return (this.linkerFailure?.message && this.linkerFailure?.symbol && this.linkerFailure?.reference);
|
||||
}
|
||||
shouldFormatDuplicateSymbols() {
|
||||
var _a, _b, _c;
|
||||
return ((_a = this.linkerFailure) === null || _a === void 0 ? void 0 : _a.message) && ((_c = (_b = this.linkerFailure) === null || _b === void 0 ? void 0 : _b.files) === null || _c === void 0 ? void 0 : _c.length) > 1;
|
||||
return this.linkerFailure?.message && this.linkerFailure?.files?.length > 1;
|
||||
}
|
||||
formatCompileError() {
|
||||
const error = { ...this.currentIssue };
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+4
-6
@@ -15,14 +15,13 @@ const parsePodfileLock_1 = require("./parsePodfileLock");
|
||||
*/
|
||||
class PodfileTracer {
|
||||
static create(projectRoot, { xcodeProject } = {}) {
|
||||
var _a, _b;
|
||||
const podfileLock = path_1.default.join(projectRoot, 'ios', 'Podfile.lock');
|
||||
const podfileContents = fs_1.default.readFileSync(podfileLock, 'utf8');
|
||||
const rootTargetName = ((_a = xcodeProject === null || xcodeProject === void 0 ? void 0 : xcodeProject.name.match(/.*\/(.*)\.\w+/)) === null || _a === void 0 ? void 0 : _a[1]) || '';
|
||||
const rootTargetName = xcodeProject?.name.match(/.*\/(.*)\.\w+/)?.[1] || '';
|
||||
const formatter = new PodfileTracer({
|
||||
projectRoot,
|
||||
rootTargetName,
|
||||
podfile: (_b = (0, parsePodfileLock_1.parsePodfileLock)(podfileContents)) !== null && _b !== void 0 ? _b : {},
|
||||
podfile: (0, parsePodfileLock_1.parsePodfileLock)(podfileContents) ?? {},
|
||||
});
|
||||
return formatter;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ class PodfileTracer {
|
||||
source = this.getExternalSourceForPod(parts[0]);
|
||||
}
|
||||
}
|
||||
if (source === null || source === void 0 ? void 0 : source.source) {
|
||||
if (source?.source) {
|
||||
// Finally attempt to trace the podspec file.
|
||||
const pkg = this.getPackageJsonAnyFilePathInModule({
|
||||
target: source.pod,
|
||||
@@ -90,13 +89,12 @@ class PodfileTracer {
|
||||
return this.getNodeModuleNameForTarget(target);
|
||||
}
|
||||
getExternalSourceForPodWithoutCache(pod) {
|
||||
var _a, _b;
|
||||
if (!pod) {
|
||||
return null;
|
||||
}
|
||||
const results = (0, getFirstExternalSourceForPod_1.getFirstExternalSourceForPod)(this.podfile, { name: pod });
|
||||
// Keep tracing until we get to a development pod with a local file reference.
|
||||
const filePath = (_b = (_a = results === null || results === void 0 ? void 0 : results.source[':podspec']) !== null && _a !== void 0 ? _a : results === null || results === void 0 ? void 0 : results.source[':path']) !== null && _b !== void 0 ? _b : null;
|
||||
const filePath = results?.source[':podspec'] ?? results?.source[':path'] ?? null;
|
||||
if (results && filePath) {
|
||||
return { pod: results.pod, source: filePath };
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -12,7 +12,7 @@ function moduleNameFromPath(modulePath) {
|
||||
const [packageName] = modulePath.split('/');
|
||||
return packageName ? packageName : modulePath;
|
||||
}
|
||||
const NODE_MODULE_PATTERN = /node_modules(\/\.(pnpm|store)\/.*\/node_modules)?\//i;
|
||||
const NODE_MODULE_PATTERN = /node_modules(\/\.(bun|pnpm|store)\/.*\/node_modules)?\//i;
|
||||
function getNodeModuleName(filePath) {
|
||||
// '/<project>/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'
|
||||
// '/<project>/node_modules/.pnpm/react-native@0.73.1_@babel+core@7.20.2_react@18.2.0/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"getNodeModuleName.js","sourceRoot":"","sources":["../../src/utils/getNodeModuleName.ts"],"names":[],"mappings":";;AAcA,8CASC;AAvBD,SAAS,kBAAkB,CAAC,UAAkB;IAC5C,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjD,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,OAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC;AAChD,CAAC;AAED,MAAM,mBAAmB,GAAG,sDAAsD,CAAC;AAEnF,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,wGAAwG;IACxG,+KAA+K;IAC/K,uKAAuK;IACvK,MAAM,CAAC,EAAE,AAAD,EAAG,AAAD,EAAG,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC/D,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["function moduleNameFromPath(modulePath: string) {\n if (modulePath.startsWith('@')) {\n const [org, packageName] = modulePath.split('/');\n if (org && packageName) {\n return [org, packageName].join('/');\n }\n return modulePath;\n }\n const [packageName] = modulePath.split('/');\n return packageName ? packageName : modulePath;\n}\n\nconst NODE_MODULE_PATTERN = /node_modules(\\/\\.(pnpm|store)\\/.*\\/node_modules)?\\//i;\n\nexport function getNodeModuleName(filePath: string): string | null {\n // '/<project>/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'\n // '/<project>/node_modules/.pnpm/react-native@0.73.1_@babel+core@7.20.2_react@18.2.0/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'\n // '/<project>/node_modules/.store/react-native@0.73.1-OKL2xQk6utgOIuOl3VvO_g/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'\n const [, , , modulePath] = filePath.split(NODE_MODULE_PATTERN);\n if (modulePath) {\n return moduleNameFromPath(modulePath);\n }\n return null;\n}\n"]}
|
||||
{"version":3,"file":"getNodeModuleName.js","sourceRoot":"","sources":["../../src/utils/getNodeModuleName.ts"],"names":[],"mappings":";;AAcA,8CASC;AAvBD,SAAS,kBAAkB,CAAC,UAAkB;IAC5C,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjD,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,OAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC;AAChD,CAAC;AAED,MAAM,mBAAmB,GAAG,0DAA0D,CAAC;AAEvF,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,wGAAwG;IACxG,+KAA+K;IAC/K,uKAAuK;IACvK,MAAM,CAAC,EAAE,AAAD,EAAG,AAAD,EAAG,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC/D,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["function moduleNameFromPath(modulePath: string) {\n if (modulePath.startsWith('@')) {\n const [org, packageName] = modulePath.split('/');\n if (org && packageName) {\n return [org, packageName].join('/');\n }\n return modulePath;\n }\n const [packageName] = modulePath.split('/');\n return packageName ? packageName : modulePath;\n}\n\nconst NODE_MODULE_PATTERN = /node_modules(\\/\\.(bun|pnpm|store)\\/.*\\/node_modules)?\\//i;\n\nexport function getNodeModuleName(filePath: string): string | null {\n // '/<project>/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'\n // '/<project>/node_modules/.pnpm/react-native@0.73.1_@babel+core@7.20.2_react@18.2.0/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'\n // '/<project>/node_modules/.store/react-native@0.73.1-OKL2xQk6utgOIuOl3VvO_g/node_modules/react-native/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp'\n const [, , , modulePath] = filePath.split(NODE_MODULE_PATTERN);\n if (modulePath) {\n return moduleNameFromPath(modulePath);\n }\n return null;\n}\n"]}
|
||||
+6
-8
@@ -24,7 +24,7 @@ const parsePodDependency = (pod) => {
|
||||
// js-yaml fails to parse an array with a single item and instead formats it as a string divided by a `-` (hyphen).
|
||||
// Here we match if a hyphen comes after a space. We use fake-nested-Podfile to test this hack.
|
||||
const singleItemArrayBug = pod.match(/(.*)\s-\s(.*)/);
|
||||
if (singleItemArrayBug === null || singleItemArrayBug === void 0 ? void 0 : singleItemArrayBug[2]) {
|
||||
if (singleItemArrayBug?.[2]) {
|
||||
return (0, exports.parsePodDependency)({ [singleItemArrayBug[1]]: singleItemArrayBug[2] });
|
||||
}
|
||||
return [splitPodNameVersion(pod)];
|
||||
@@ -48,8 +48,8 @@ const parsePodDependency = (pod) => {
|
||||
};
|
||||
exports.parsePodDependency = parsePodDependency;
|
||||
function parsePodfileLock(fileContent) {
|
||||
var _a;
|
||||
const contents = (_a = loadPodfileLock(fileContent)) !== null && _a !== void 0 ? _a : loadPodfileLock(EXTERNAL_SOURCES_KEY + fileContent.split(EXTERNAL_SOURCES_KEY).slice(1));
|
||||
const contents = loadPodfileLock(fileContent) ??
|
||||
loadPodfileLock(EXTERNAL_SOURCES_KEY + fileContent.split(EXTERNAL_SOURCES_KEY).slice(1));
|
||||
if (!contents) {
|
||||
return null;
|
||||
}
|
||||
@@ -66,9 +66,8 @@ function parsePodfileLock(fileContent) {
|
||||
return parsed;
|
||||
}
|
||||
function splitPodNameVersion(pod) {
|
||||
var _a;
|
||||
const [name] = pod.split(' ');
|
||||
return { name, version: (_a = pod.match(/\((.*)\)/)) === null || _a === void 0 ? void 0 : _a[1] };
|
||||
return { name, version: pod.match(/\((.*)\)/)?.[1] };
|
||||
}
|
||||
function rubyCaseToKebab(str) {
|
||||
return str.toLowerCase().split(' ').join('-');
|
||||
@@ -77,8 +76,7 @@ function kebabCaseToCamelCase(str) {
|
||||
return str.replace(/-([a-z])/g, g => g[1].toUpperCase());
|
||||
}
|
||||
function getFilePathForExternalSource(podLock, pod) {
|
||||
var _a, _b, _c;
|
||||
const source = (_a = podLock.externalSources) === null || _a === void 0 ? void 0 : _a[pod];
|
||||
return (_c = (_b = source === null || source === void 0 ? void 0 : source[':podspec']) !== null && _b !== void 0 ? _b : source === null || source === void 0 ? void 0 : source[':path']) !== null && _c !== void 0 ? _c : null;
|
||||
const source = podLock.externalSources?.[pod];
|
||||
return source?.[':podspec'] ?? source?.[':path'] ?? null;
|
||||
}
|
||||
//# sourceMappingURL=parsePodfileLock.js.map
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+4
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@expo/xcpretty",
|
||||
"description": "Parse and format xcodebuild logs",
|
||||
"version": "4.4.0",
|
||||
"version": "4.4.3",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
"author": "Evan Bacon <bacon@expo.io> (https://github.com/evanbacon)",
|
||||
@@ -17,7 +17,7 @@
|
||||
"scripts": {
|
||||
"watch": "tsc --watch",
|
||||
"build": "tsc",
|
||||
"prepare": "yarn run clean && yarn build",
|
||||
"prepare": "bun run clean && bun run build",
|
||||
"clean": "rimraf build ./tsconfig.tsbuildinfo",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"test": "jest"
|
||||
@@ -37,6 +37,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__code-frame": "^7.27.0",
|
||||
"@types/js-yaml": "^4.0.1"
|
||||
"@types/js-yaml": "^4.0.1",
|
||||
"@types/node": "^20.16.13"
|
||||
}
|
||||
}
|
||||
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
(MIT)
|
||||
|
||||
Original code Copyright Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
|
||||
|
||||
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.
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
# @isaacs/balanced-match
|
||||
|
||||
A hybrid CJS/ESM TypeScript fork of
|
||||
[balanced-match](http://npm.im/balanced-match).
|
||||
|
||||
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
||||
|
||||
[](https://github.com/juliangruber/balanced-match/actions/workflows/ci.yml)
|
||||
[](https://www.npmjs.org/package/balanced-match)
|
||||
|
||||
## Example
|
||||
|
||||
Get the first matching pair of braces:
|
||||
|
||||
```js
|
||||
import { balanced } from '@isaacs/balanced-match'
|
||||
|
||||
console.log(balanced('{', '}', 'pre{in{nested}}post'))
|
||||
console.log(balanced('{', '}', 'pre{first}between{second}post'))
|
||||
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'))
|
||||
```
|
||||
|
||||
The matches are:
|
||||
|
||||
```bash
|
||||
$ node example.js
|
||||
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
||||
{ start: 3,
|
||||
end: 9,
|
||||
pre: 'pre',
|
||||
body: 'first',
|
||||
post: 'between{second}post' }
|
||||
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### const m = balanced(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
object with those keys:
|
||||
|
||||
- **start** the index of the first match of `a`
|
||||
- **end** the index of the matching `b`
|
||||
- **pre** the preamble, `a` and `b` not included
|
||||
- **body** the match, `a` and `b` not included
|
||||
- **post** the postscript, `a` and `b` not included
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
||||
|
||||
### const r = balanced.range(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
array with indexes: `[ <a index>, <b index> ]`.
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
export declare const balanced: (a: string | RegExp, b: string | RegExp, str: string) => false | {
|
||||
start: number;
|
||||
end: number;
|
||||
pre: string;
|
||||
body: string;
|
||||
post: string;
|
||||
} | undefined;
|
||||
export declare const range: (a: string, b: string, str: string) => undefined | [number, number];
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,GAAG,MAAM,EAClB,GAAG,MAAM,GAAG,MAAM,EAClB,KAAK,MAAM;;;;;;aAgBZ,CAAA;AAOD,eAAO,MAAM,KAAK,GAChB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,KAAK,MAAM,KACV,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CA2C7B,CAAA"}
|
||||
-59
@@ -1,59 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.range = exports.balanced = void 0;
|
||||
const balanced = (a, b, str) => {
|
||||
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
|
||||
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
|
||||
const r = ma !== null && mb != null && (0, exports.range)(ma, mb, str);
|
||||
return (r && {
|
||||
start: r[0],
|
||||
end: r[1],
|
||||
pre: str.slice(0, r[0]),
|
||||
body: str.slice(r[0] + ma.length, r[1]),
|
||||
post: str.slice(r[1] + mb.length),
|
||||
});
|
||||
};
|
||||
exports.balanced = balanced;
|
||||
const maybeMatch = (reg, str) => {
|
||||
const m = str.match(reg);
|
||||
return m ? m[0] : null;
|
||||
};
|
||||
const range = (a, b, str) => {
|
||||
let begs, beg, left, right = undefined, result;
|
||||
let ai = str.indexOf(a);
|
||||
let bi = str.indexOf(b, ai + 1);
|
||||
let i = ai;
|
||||
if (ai >= 0 && bi > 0) {
|
||||
if (a === b) {
|
||||
return [ai, bi];
|
||||
}
|
||||
begs = [];
|
||||
left = str.length;
|
||||
while (i >= 0 && !result) {
|
||||
if (i === ai) {
|
||||
begs.push(i);
|
||||
ai = str.indexOf(a, i + 1);
|
||||
}
|
||||
else if (begs.length === 1) {
|
||||
const r = begs.pop();
|
||||
if (r !== undefined)
|
||||
result = [r, bi];
|
||||
}
|
||||
else {
|
||||
beg = begs.pop();
|
||||
if (beg !== undefined && beg < left) {
|
||||
left = beg;
|
||||
right = bi;
|
||||
}
|
||||
bi = str.indexOf(b, i + 1);
|
||||
}
|
||||
i = ai < bi && ai >= 0 ? ai : bi;
|
||||
}
|
||||
if (begs.length && right !== undefined) {
|
||||
result = [left, right];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
exports.range = range;
|
||||
//# sourceMappingURL=index.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CACtB,CAAkB,EAClB,CAAkB,EAClB,GAAW,EACX,EAAE;IACF,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEvD,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,IAAA,aAAK,EAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IAEzD,OAAO,CACL,CAAC,IAAI;QACH,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QACX,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACT,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;KAClC,CACF,CAAA;AACH,CAAC,CAAA;AAnBY,QAAA,QAAQ,YAmBpB;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAC9C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CA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AE,CAAA;gBAChB,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,GAAG,IAAI,EAAE,CAAC;oBACpC,IAAI,GAAG,GAAG,CAAA;oBACV,KAAK,GAAG,EAAE,CAAA;gBACZ,CAAC;gBAED,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;YAED,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AA/CY,QAAA,KAAK,SA+CjB","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
export declare const balanced: (a: string | RegExp, b: string | RegExp, str: string) => false | {
|
||||
start: number;
|
||||
end: number;
|
||||
pre: string;
|
||||
body: string;
|
||||
post: string;
|
||||
} | undefined;
|
||||
export declare const range: (a: string, b: string, str: string) => undefined | [number, number];
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,GAAG,MAAM,EAClB,GAAG,MAAM,GAAG,MAAM,EAClB,KAAK,MAAM;;;;;;aAgBZ,CAAA;AAOD,eAAO,MAAM,KAAK,GAChB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,KAAK,MAAM,KACV,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CA2C7B,CAAA"}
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
export const balanced = (a, b, str) => {
|
||||
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
|
||||
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
|
||||
const r = ma !== null && mb != null && range(ma, mb, str);
|
||||
return (r && {
|
||||
start: r[0],
|
||||
end: r[1],
|
||||
pre: str.slice(0, r[0]),
|
||||
body: str.slice(r[0] + ma.length, r[1]),
|
||||
post: str.slice(r[1] + mb.length),
|
||||
});
|
||||
};
|
||||
const maybeMatch = (reg, str) => {
|
||||
const m = str.match(reg);
|
||||
return m ? m[0] : null;
|
||||
};
|
||||
export const range = (a, b, str) => {
|
||||
let begs, beg, left, right = undefined, result;
|
||||
let ai = str.indexOf(a);
|
||||
let bi = str.indexOf(b, ai + 1);
|
||||
let i = ai;
|
||||
if (ai >= 0 && bi > 0) {
|
||||
if (a === b) {
|
||||
return [ai, bi];
|
||||
}
|
||||
begs = [];
|
||||
left = str.length;
|
||||
while (i >= 0 && !result) {
|
||||
if (i === ai) {
|
||||
begs.push(i);
|
||||
ai = str.indexOf(a, i + 1);
|
||||
}
|
||||
else if (begs.length === 1) {
|
||||
const r = begs.pop();
|
||||
if (r !== undefined)
|
||||
result = [r, bi];
|
||||
}
|
||||
else {
|
||||
beg = begs.pop();
|
||||
if (beg !== undefined && beg < left) {
|
||||
left = beg;
|
||||
right = bi;
|
||||
}
|
||||
bi = str.indexOf(b, i + 1);
|
||||
}
|
||||
i = ai < bi && ai >= 0 ? ai : bi;
|
||||
}
|
||||
if (begs.length && right !== undefined) {
|
||||
result = [left, right];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAkB,EAClB,CAAkB,EAClB,GAAW,EACX,EAAE;IACF,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEvD,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,EAA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AAC;QACD,IAAI,GAAG,EAAE,CAAA;QACT,IAAI,GAAG,GAAG,CAAC,MAAM,CAAA;QAEjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;gBACb,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBACZ,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;iBAAM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBACpB,IAAI,CAAC,KAAK,SAAS;oBAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBAChB,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,GAAG,IAAI,EAAE,CAAC;oBACpC,IAAI,GAAG,GAAG,CAAA;oBACV,KAAK,GAAG,EAAE,CAAA;gBACZ,CAAC;gBAED,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;YAED,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
-79
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"name": "@isaacs/balanced-match",
|
||||
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
||||
"version": "4.0.1",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/balanced-match.git"
|
||||
},
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"default": "./dist/esm/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"default": "./dist/commonjs/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"prepublishOnly": "git push origin --follow-tags",
|
||||
"prepare": "tshy",
|
||||
"pretest": "npm run prepare",
|
||||
"presnap": "npm run prepare",
|
||||
"test": "tap",
|
||||
"snap": "tap",
|
||||
"format": "prettier --write . --loglevel warn",
|
||||
"benchmark": "node benchmark/index.js",
|
||||
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
|
||||
},
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": false,
|
||||
"bracketSameLine": true,
|
||||
"arrowParens": "avoid",
|
||||
"endOfLine": "lf"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/brace-expansion": "^1.1.2",
|
||||
"@types/node": "^24.0.0",
|
||||
"mkdirp": "^3.0.1",
|
||||
"prettier": "^3.3.2",
|
||||
"tap": "^21.1.0",
|
||||
"tshy": "^3.0.2",
|
||||
"typedoc": "^0.28.5"
|
||||
},
|
||||
"keywords": [
|
||||
"match",
|
||||
"regexp",
|
||||
"test",
|
||||
"balanced",
|
||||
"parse"
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"tshy": {
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"main": "./dist/commonjs/index.js",
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"module": "./dist/esm/index.js"
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
|
||||
|
||||
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.
|
||||
-86
@@ -1,86 +0,0 @@
|
||||
# @isaacs/brace-expansion
|
||||
|
||||
A hybrid CJS/ESM TypeScript fork of
|
||||
[brace-expansion](http://npm.im/brace-expansion).
|
||||
|
||||
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
||||
as known from sh/bash, in JavaScript.
|
||||
|
||||
[](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml)
|
||||
[](https://www.npmjs.org/package/brace-expansion)
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
import { expand } from '@isaacs/brace-expansion'
|
||||
|
||||
expand('file-{a,b,c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('-v{,,}')
|
||||
// => ['-v', '-v', '-v']
|
||||
|
||||
expand('file{0..2}.jpg')
|
||||
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
||||
|
||||
expand('file-{a..c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('file{2..0}.jpg')
|
||||
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
||||
|
||||
expand('file{0..4..2}.jpg')
|
||||
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
||||
|
||||
expand('file-{a..e..2}.jpg')
|
||||
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
||||
|
||||
expand('file{00..10..5}.jpg')
|
||||
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
||||
|
||||
expand('{{A..C},{a..c}}')
|
||||
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
||||
|
||||
expand('ppp{,config,oe{,conf}}')
|
||||
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
import { expand } from '@isaacs/brace-expansion'
|
||||
```
|
||||
|
||||
### const expanded = expand(str)
|
||||
|
||||
Return an array of all possible and valid expansions of `str`. If none are
|
||||
found, `[str]` is returned.
|
||||
|
||||
Valid expansions are:
|
||||
|
||||
```js
|
||||
/^(.*,)+(.+)?$/
|
||||
// {a,b,...}
|
||||
```
|
||||
|
||||
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
||||
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
||||
to have equal length. Negative numbers and backwards iteration work too.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
||||
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
||||
number.
|
||||
|
||||
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
export declare function expand(str: string): string[];
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAwEA,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,YAgBjC"}
|
||||
-196
@@ -1,196 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.expand = expand;
|
||||
const balanced_match_1 = require("@isaacs/balanced-match");
|
||||
const escSlash = '\0SLASH' + Math.random() + '\0';
|
||||
const escOpen = '\0OPEN' + Math.random() + '\0';
|
||||
const escClose = '\0CLOSE' + Math.random() + '\0';
|
||||
const escComma = '\0COMMA' + Math.random() + '\0';
|
||||
const escPeriod = '\0PERIOD' + Math.random() + '\0';
|
||||
const escSlashPattern = new RegExp(escSlash, 'g');
|
||||
const escOpenPattern = new RegExp(escOpen, 'g');
|
||||
const escClosePattern = new RegExp(escClose, 'g');
|
||||
const escCommaPattern = new RegExp(escComma, 'g');
|
||||
const escPeriodPattern = new RegExp(escPeriod, 'g');
|
||||
const slashPattern = /\\\\/g;
|
||||
const openPattern = /\\{/g;
|
||||
const closePattern = /\\}/g;
|
||||
const commaPattern = /\\,/g;
|
||||
const periodPattern = /\\./g;
|
||||
function numeric(str) {
|
||||
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
||||
}
|
||||
function escapeBraces(str) {
|
||||
return str
|
||||
.replace(slashPattern, escSlash)
|
||||
.replace(openPattern, escOpen)
|
||||
.replace(closePattern, escClose)
|
||||
.replace(commaPattern, escComma)
|
||||
.replace(periodPattern, escPeriod);
|
||||
}
|
||||
function unescapeBraces(str) {
|
||||
return str
|
||||
.replace(escSlashPattern, '\\')
|
||||
.replace(escOpenPattern, '{')
|
||||
.replace(escClosePattern, '}')
|
||||
.replace(escCommaPattern, ',')
|
||||
.replace(escPeriodPattern, '.');
|
||||
}
|
||||
/**
|
||||
* Basically just str.split(","), but handling cases
|
||||
* where we have nested braced sections, which should be
|
||||
* treated as individual members, like {a,{b,c},d}
|
||||
*/
|
||||
function parseCommaParts(str) {
|
||||
if (!str) {
|
||||
return [''];
|
||||
}
|
||||
const parts = [];
|
||||
const m = (0, balanced_match_1.balanced)('{', '}', str);
|
||||
if (!m) {
|
||||
return str.split(',');
|
||||
}
|
||||
const { pre, body, post } = m;
|
||||
const p = pre.split(',');
|
||||
p[p.length - 1] += '{' + body + '}';
|
||||
const postParts = parseCommaParts(post);
|
||||
if (post.length) {
|
||||
;
|
||||
p[p.length - 1] += postParts.shift();
|
||||
p.push.apply(p, postParts);
|
||||
}
|
||||
parts.push.apply(parts, p);
|
||||
return parts;
|
||||
}
|
||||
function expand(str) {
|
||||
if (!str) {
|
||||
return [];
|
||||
}
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.slice(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.slice(2);
|
||||
}
|
||||
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
function embrace(str) {
|
||||
return '{' + str + '}';
|
||||
}
|
||||
function isPadded(el) {
|
||||
return /^-?0\d/.test(el);
|
||||
}
|
||||
function lte(i, y) {
|
||||
return i <= y;
|
||||
}
|
||||
function gte(i, y) {
|
||||
return i >= y;
|
||||
}
|
||||
function expand_(str, isTop) {
|
||||
/** @type {string[]} */
|
||||
const expansions = [];
|
||||
const m = (0, balanced_match_1.balanced)('{', '}', str);
|
||||
if (!m)
|
||||
return [str];
|
||||
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
const pre = m.pre;
|
||||
const post = m.post.length ? expand_(m.post, false) : [''];
|
||||
if (/\$$/.test(m.pre)) {
|
||||
for (let k = 0; k < post.length; k++) {
|
||||
const expansion = pre + '{' + m.body + '}' + post[k];
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isSequence = isNumericSequence || isAlphaSequence;
|
||||
const isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand_(str);
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
let n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
}
|
||||
else {
|
||||
n = parseCommaParts(m.body);
|
||||
if (n.length === 1 && n[0] !== undefined) {
|
||||
// x{{a,b}}y ==> x{a}y x{b}y
|
||||
n = expand_(n[0], false).map(embrace);
|
||||
//XXX is this necessary? Can't seem to hit it in tests.
|
||||
/* c8 ignore start */
|
||||
if (n.length === 1) {
|
||||
return post.map(p => m.pre + n[0] + p);
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
}
|
||||
}
|
||||
// at this point, n is the parts, and we know it's not a comma set
|
||||
// with a single entry.
|
||||
let N;
|
||||
if (isSequence && n[0] !== undefined && n[1] !== undefined) {
|
||||
const x = numeric(n[0]);
|
||||
const y = numeric(n[1]);
|
||||
const width = Math.max(n[0].length, n[1].length);
|
||||
let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1;
|
||||
let test = lte;
|
||||
const reverse = y < x;
|
||||
if (reverse) {
|
||||
incr *= -1;
|
||||
test = gte;
|
||||
}
|
||||
const pad = n.some(isPadded);
|
||||
N = [];
|
||||
for (let i = x; test(i, y); i += incr) {
|
||||
let c;
|
||||
if (isAlphaSequence) {
|
||||
c = String.fromCharCode(i);
|
||||
if (c === '\\') {
|
||||
c = '';
|
||||
}
|
||||
}
|
||||
else {
|
||||
c = String(i);
|
||||
if (pad) {
|
||||
const need = width - c.length;
|
||||
if (need > 0) {
|
||||
const z = new Array(need + 1).join('0');
|
||||
if (i < 0) {
|
||||
c = '-' + z + c.slice(1);
|
||||
}
|
||||
else {
|
||||
c = z + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
N.push(c);
|
||||
}
|
||||
}
|
||||
else {
|
||||
N = [];
|
||||
for (let j = 0; j < n.length; j++) {
|
||||
N.push.apply(N, expand_(n[j], false));
|
||||
}
|
||||
}
|
||||
for (let j = 0; j < N.length; j++) {
|
||||
for (let k = 0; k < post.length; k++) {
|
||||
const expansion = pre + N[j] + post[k];
|
||||
if (!isTop || isSequence || expansion) {
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return expansions;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
-1
File diff suppressed because one or more lines are too long
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
export declare function expand(str: string): string[];
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAwEA,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,YAgBjC"}
|
||||
-193
@@ -1,193 +0,0 @@
|
||||
import { balanced } from '@isaacs/balanced-match';
|
||||
const escSlash = '\0SLASH' + Math.random() + '\0';
|
||||
const escOpen = '\0OPEN' + Math.random() + '\0';
|
||||
const escClose = '\0CLOSE' + Math.random() + '\0';
|
||||
const escComma = '\0COMMA' + Math.random() + '\0';
|
||||
const escPeriod = '\0PERIOD' + Math.random() + '\0';
|
||||
const escSlashPattern = new RegExp(escSlash, 'g');
|
||||
const escOpenPattern = new RegExp(escOpen, 'g');
|
||||
const escClosePattern = new RegExp(escClose, 'g');
|
||||
const escCommaPattern = new RegExp(escComma, 'g');
|
||||
const escPeriodPattern = new RegExp(escPeriod, 'g');
|
||||
const slashPattern = /\\\\/g;
|
||||
const openPattern = /\\{/g;
|
||||
const closePattern = /\\}/g;
|
||||
const commaPattern = /\\,/g;
|
||||
const periodPattern = /\\./g;
|
||||
function numeric(str) {
|
||||
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
||||
}
|
||||
function escapeBraces(str) {
|
||||
return str
|
||||
.replace(slashPattern, escSlash)
|
||||
.replace(openPattern, escOpen)
|
||||
.replace(closePattern, escClose)
|
||||
.replace(commaPattern, escComma)
|
||||
.replace(periodPattern, escPeriod);
|
||||
}
|
||||
function unescapeBraces(str) {
|
||||
return str
|
||||
.replace(escSlashPattern, '\\')
|
||||
.replace(escOpenPattern, '{')
|
||||
.replace(escClosePattern, '}')
|
||||
.replace(escCommaPattern, ',')
|
||||
.replace(escPeriodPattern, '.');
|
||||
}
|
||||
/**
|
||||
* Basically just str.split(","), but handling cases
|
||||
* where we have nested braced sections, which should be
|
||||
* treated as individual members, like {a,{b,c},d}
|
||||
*/
|
||||
function parseCommaParts(str) {
|
||||
if (!str) {
|
||||
return [''];
|
||||
}
|
||||
const parts = [];
|
||||
const m = balanced('{', '}', str);
|
||||
if (!m) {
|
||||
return str.split(',');
|
||||
}
|
||||
const { pre, body, post } = m;
|
||||
const p = pre.split(',');
|
||||
p[p.length - 1] += '{' + body + '}';
|
||||
const postParts = parseCommaParts(post);
|
||||
if (post.length) {
|
||||
;
|
||||
p[p.length - 1] += postParts.shift();
|
||||
p.push.apply(p, postParts);
|
||||
}
|
||||
parts.push.apply(parts, p);
|
||||
return parts;
|
||||
}
|
||||
export function expand(str) {
|
||||
if (!str) {
|
||||
return [];
|
||||
}
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.slice(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.slice(2);
|
||||
}
|
||||
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
function embrace(str) {
|
||||
return '{' + str + '}';
|
||||
}
|
||||
function isPadded(el) {
|
||||
return /^-?0\d/.test(el);
|
||||
}
|
||||
function lte(i, y) {
|
||||
return i <= y;
|
||||
}
|
||||
function gte(i, y) {
|
||||
return i >= y;
|
||||
}
|
||||
function expand_(str, isTop) {
|
||||
/** @type {string[]} */
|
||||
const expansions = [];
|
||||
const m = balanced('{', '}', str);
|
||||
if (!m)
|
||||
return [str];
|
||||
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
const pre = m.pre;
|
||||
const post = m.post.length ? expand_(m.post, false) : [''];
|
||||
if (/\$$/.test(m.pre)) {
|
||||
for (let k = 0; k < post.length; k++) {
|
||||
const expansion = pre + '{' + m.body + '}' + post[k];
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
const isSequence = isNumericSequence || isAlphaSequence;
|
||||
const isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand_(str);
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
let n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
}
|
||||
else {
|
||||
n = parseCommaParts(m.body);
|
||||
if (n.length === 1 && n[0] !== undefined) {
|
||||
// x{{a,b}}y ==> x{a}y x{b}y
|
||||
n = expand_(n[0], false).map(embrace);
|
||||
//XXX is this necessary? Can't seem to hit it in tests.
|
||||
/* c8 ignore start */
|
||||
if (n.length === 1) {
|
||||
return post.map(p => m.pre + n[0] + p);
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
}
|
||||
}
|
||||
// at this point, n is the parts, and we know it's not a comma set
|
||||
// with a single entry.
|
||||
let N;
|
||||
if (isSequence && n[0] !== undefined && n[1] !== undefined) {
|
||||
const x = numeric(n[0]);
|
||||
const y = numeric(n[1]);
|
||||
const width = Math.max(n[0].length, n[1].length);
|
||||
let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1;
|
||||
let test = lte;
|
||||
const reverse = y < x;
|
||||
if (reverse) {
|
||||
incr *= -1;
|
||||
test = gte;
|
||||
}
|
||||
const pad = n.some(isPadded);
|
||||
N = [];
|
||||
for (let i = x; test(i, y); i += incr) {
|
||||
let c;
|
||||
if (isAlphaSequence) {
|
||||
c = String.fromCharCode(i);
|
||||
if (c === '\\') {
|
||||
c = '';
|
||||
}
|
||||
}
|
||||
else {
|
||||
c = String(i);
|
||||
if (pad) {
|
||||
const need = width - c.length;
|
||||
if (need > 0) {
|
||||
const z = new Array(need + 1).join('0');
|
||||
if (i < 0) {
|
||||
c = '-' + z + c.slice(1);
|
||||
}
|
||||
else {
|
||||
c = z + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
N.push(c);
|
||||
}
|
||||
}
|
||||
else {
|
||||
N = [];
|
||||
for (let j = 0; j < n.length; j++) {
|
||||
N.push.apply(N, expand_(n[j], false));
|
||||
}
|
||||
}
|
||||
for (let j = 0; j < N.length; j++) {
|
||||
for (let k = 0; k < post.length; k++) {
|
||||
const expansion = pre + N[j] + post[k];
|
||||
if (!isTop || isSequence || expansion) {
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return expansions;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
-1
File diff suppressed because one or more lines are too long
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
{
|
||||
"name": "@isaacs/brace-expansion",
|
||||
"description": "Brace expansion as known from sh/bash",
|
||||
"version": "5.0.0",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"default": "./dist/esm/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"default": "./dist/commonjs/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"prepublishOnly": "git push origin --follow-tags",
|
||||
"prepare": "tshy",
|
||||
"pretest": "npm run prepare",
|
||||
"presnap": "npm run prepare",
|
||||
"test": "tap",
|
||||
"snap": "tap",
|
||||
"format": "prettier --write . --loglevel warn",
|
||||
"benchmark": "node benchmark/index.js",
|
||||
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
|
||||
},
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": false,
|
||||
"bracketSameLine": true,
|
||||
"arrowParens": "avoid",
|
||||
"endOfLine": "lf"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/brace-expansion": "^1.1.2",
|
||||
"@types/node": "^24.0.0",
|
||||
"mkdirp": "^3.0.1",
|
||||
"prettier": "^3.3.2",
|
||||
"tap": "^21.1.0",
|
||||
"tshy": "^3.0.2",
|
||||
"typedoc": "^0.28.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@isaacs/balanced-match": "^4.0.1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"tshy": {
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"main": "./dist/commonjs/index.js",
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"module": "./dist/esm/index.js"
|
||||
}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
tidelift: "npm/brace-expansion"
|
||||
patreon: juliangruber
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
Copyright Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+21
-62
@@ -1,18 +1,15 @@
|
||||
# brace-expansion
|
||||
|
||||
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
||||
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
||||
as known from sh/bash, in JavaScript.
|
||||
|
||||
[](http://travis-ci.org/juliangruber/brace-expansion)
|
||||
[](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml)
|
||||
[](https://www.npmjs.org/package/brace-expansion)
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
[](https://ci.testling.com/juliangruber/brace-expansion)
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
import { expand } from 'brace-expansion'
|
||||
|
||||
expand('file-{a,b,c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
@@ -48,25 +45,36 @@ expand('ppp{,config,oe{,conf}}')
|
||||
## API
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
import { expand } from 'brace-expansion'
|
||||
```
|
||||
|
||||
### var expanded = expand(str)
|
||||
### const expanded = expand(str, [options])
|
||||
|
||||
Return an array of all possible and valid expansions of `str`. If none are
|
||||
found, `[str]` is returned.
|
||||
Return an array of all possible and valid expansions of `str`. If
|
||||
none are found, `[str]` is returned.
|
||||
|
||||
The `options` object can provide a `max` value to cap the number
|
||||
of expansions allowed. This is limited to `100_000` by default,
|
||||
to prevent DoS attacks.
|
||||
|
||||
```js
|
||||
const expansions = expand('{1..100}'.repeat(5), {
|
||||
max: 100,
|
||||
})
|
||||
// expansions.length will be 100, not 100^5
|
||||
```
|
||||
|
||||
Valid expansions are:
|
||||
|
||||
```js
|
||||
/^(.*,)+(.+)?$/
|
||||
;/^(.*,)+(.+)?$/
|
||||
// {a,b,...}
|
||||
```
|
||||
|
||||
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
@@ -75,7 +83,7 @@ If `x` or `y` start with a leading `0`, all the numbers will be padded
|
||||
to have equal length. Negative numbers and backwards iteration work too.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
@@ -84,52 +92,3 @@ An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
||||
number.
|
||||
|
||||
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install brace-expansion
|
||||
```
|
||||
|
||||
## Contributors
|
||||
|
||||
- [Julian Gruber](https://github.com/juliangruber)
|
||||
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
||||
|
||||
## Sponsors
|
||||
|
||||
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
||||
|
||||
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
|
||||
|
||||
## Security contact information
|
||||
|
||||
To report a security vulnerability, please use the
|
||||
[Tidelift security contact](https://tidelift.com/security).
|
||||
Tidelift will coordinate the fix and disclosure.
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
||||
|
||||
-203
@@ -1,203 +0,0 @@
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
module.exports = expandTop;
|
||||
|
||||
var escSlash = '\0SLASH'+Math.random()+'\0';
|
||||
var escOpen = '\0OPEN'+Math.random()+'\0';
|
||||
var escClose = '\0CLOSE'+Math.random()+'\0';
|
||||
var escComma = '\0COMMA'+Math.random()+'\0';
|
||||
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
||||
|
||||
function numeric(str) {
|
||||
return parseInt(str, 10) == str
|
||||
? parseInt(str, 10)
|
||||
: str.charCodeAt(0);
|
||||
}
|
||||
|
||||
function escapeBraces(str) {
|
||||
return str.split('\\\\').join(escSlash)
|
||||
.split('\\{').join(escOpen)
|
||||
.split('\\}').join(escClose)
|
||||
.split('\\,').join(escComma)
|
||||
.split('\\.').join(escPeriod);
|
||||
}
|
||||
|
||||
function unescapeBraces(str) {
|
||||
return str.split(escSlash).join('\\')
|
||||
.split(escOpen).join('{')
|
||||
.split(escClose).join('}')
|
||||
.split(escComma).join(',')
|
||||
.split(escPeriod).join('.');
|
||||
}
|
||||
|
||||
|
||||
// Basically just str.split(","), but handling cases
|
||||
// where we have nested braced sections, which should be
|
||||
// treated as individual members, like {a,{b,c},d}
|
||||
function parseCommaParts(str) {
|
||||
if (!str)
|
||||
return [''];
|
||||
|
||||
var parts = [];
|
||||
var m = balanced('{', '}', str);
|
||||
|
||||
if (!m)
|
||||
return str.split(',');
|
||||
|
||||
var pre = m.pre;
|
||||
var body = m.body;
|
||||
var post = m.post;
|
||||
var p = pre.split(',');
|
||||
|
||||
p[p.length-1] += '{' + body + '}';
|
||||
var postParts = parseCommaParts(post);
|
||||
if (post.length) {
|
||||
p[p.length-1] += postParts.shift();
|
||||
p.push.apply(p, postParts);
|
||||
}
|
||||
|
||||
parts.push.apply(parts, p);
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
function expandTop(str) {
|
||||
if (!str)
|
||||
return [];
|
||||
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.substr(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.substr(2);
|
||||
}
|
||||
|
||||
return expand(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
|
||||
function embrace(str) {
|
||||
return '{' + str + '}';
|
||||
}
|
||||
function isPadded(el) {
|
||||
return /^-?0\d/.test(el);
|
||||
}
|
||||
|
||||
function lte(i, y) {
|
||||
return i <= y;
|
||||
}
|
||||
function gte(i, y) {
|
||||
return i >= y;
|
||||
}
|
||||
|
||||
function expand(str, isTop) {
|
||||
var expansions = [];
|
||||
|
||||
var m = balanced('{', '}', str);
|
||||
if (!m) return [str];
|
||||
|
||||
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
var pre = m.pre;
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
|
||||
if (/\$$/.test(m.pre)) {
|
||||
for (var k = 0; k < post.length; k++) {
|
||||
var expansion = pre+ '{' + m.body + '}' + post[k];
|
||||
expansions.push(expansion);
|
||||
}
|
||||
} else {
|
||||
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isSequence = isNumericSequence || isAlphaSequence;
|
||||
var isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,(?!,).*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand(str);
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
|
||||
var n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
} else {
|
||||
n = parseCommaParts(m.body);
|
||||
if (n.length === 1) {
|
||||
// x{{a,b}}y ==> x{a}y x{b}y
|
||||
n = expand(n[0], false).map(embrace);
|
||||
if (n.length === 1) {
|
||||
return post.map(function(p) {
|
||||
return m.pre + n[0] + p;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// at this point, n is the parts, and we know it's not a comma set
|
||||
// with a single entry.
|
||||
var N;
|
||||
|
||||
if (isSequence) {
|
||||
var x = numeric(n[0]);
|
||||
var y = numeric(n[1]);
|
||||
var width = Math.max(n[0].length, n[1].length)
|
||||
var incr = n.length == 3
|
||||
? Math.abs(numeric(n[2]))
|
||||
: 1;
|
||||
var test = lte;
|
||||
var reverse = y < x;
|
||||
if (reverse) {
|
||||
incr *= -1;
|
||||
test = gte;
|
||||
}
|
||||
var pad = n.some(isPadded);
|
||||
|
||||
N = [];
|
||||
|
||||
for (var i = x; test(i, y); i += incr) {
|
||||
var c;
|
||||
if (isAlphaSequence) {
|
||||
c = String.fromCharCode(i);
|
||||
if (c === '\\')
|
||||
c = '';
|
||||
} else {
|
||||
c = String(i);
|
||||
if (pad) {
|
||||
var need = width - c.length;
|
||||
if (need > 0) {
|
||||
var z = new Array(need + 1).join('0');
|
||||
if (i < 0)
|
||||
c = '-' + z + c.slice(1);
|
||||
else
|
||||
c = z + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
N.push(c);
|
||||
}
|
||||
} else {
|
||||
N = [];
|
||||
|
||||
for (var j = 0; j < n.length; j++) {
|
||||
N.push.apply(N, expand(n[j], false));
|
||||
}
|
||||
}
|
||||
|
||||
for (var j = 0; j < N.length; j++) {
|
||||
for (var k = 0; k < post.length; k++) {
|
||||
var expansion = pre + N[j] + post[k];
|
||||
if (!isTop || isSequence || expansion)
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return expansions;
|
||||
}
|
||||
|
||||
+51
-36
@@ -1,49 +1,64 @@
|
||||
{
|
||||
"name": "brace-expansion",
|
||||
"description": "Brace expansion as known from sh/bash",
|
||||
"version": "2.0.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/brace-expansion.git"
|
||||
"version": "5.0.5",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"default": "./dist/esm/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"default": "./dist/commonjs/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/brace-expansion",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "tape test/*.js",
|
||||
"gentest": "bash test/generate.sh",
|
||||
"bench": "matcha test/perf/bench.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"prepublishOnly": "git push origin --follow-tags",
|
||||
"prepare": "tshy",
|
||||
"pretest": "npm run prepare",
|
||||
"presnap": "npm run prepare",
|
||||
"test": "tap",
|
||||
"snap": "tap",
|
||||
"format": "prettier --write .",
|
||||
"benchmark": "node benchmark/index.js",
|
||||
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@c4312/matcha": "^1.3.1",
|
||||
"tape": "^4.6.0"
|
||||
"@types/brace-expansion": "^1.1.2",
|
||||
"@types/node": "^25.2.1",
|
||||
"mkdirp": "^3.0.1",
|
||||
"prettier": "^3.3.2",
|
||||
"tap": "^21.6.2",
|
||||
"tshy": "^3.0.2",
|
||||
"typedoc": "^0.28.5"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
"dependencies": {
|
||||
"balanced-match": "^4.0.2"
|
||||
},
|
||||
"license": "MIT",
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
},
|
||||
"publishConfig": {
|
||||
"tag": "2.x"
|
||||
"tshy": {
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"main": "./dist/commonjs/index.js",
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"module": "./dist/esm/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/juliangruber/brace-expansion.git"
|
||||
}
|
||||
}
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Charlie Cheever
|
||||
|
||||
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.
|
||||
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
# exec-async
|
||||
Returns a promise with the results of a shell command
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
var child_process = require('child_process');
|
||||
|
||||
function escapeArg(s) {
|
||||
if (s === '') {
|
||||
return "''";
|
||||
}
|
||||
if (/[^A-Za-z0-9_\/:=-]/.test(s)) {
|
||||
s = "'"+s.replace(/'/g,"'\\''")+"'";
|
||||
s = s.replace(/^(?:'')+/g, '') // unduplicate single-quote at the beginning
|
||||
.replace(/\\'''/g, "\\'" ); // remove non-escaped single-quote if there are enclosed between 2 escaped
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
function argsFromKeyVal(key, val, opts) {
|
||||
opts = opts || {};
|
||||
var prefix = '--';
|
||||
if (key.length === 1) {
|
||||
prefix = '-';
|
||||
}
|
||||
|
||||
if ((val === true) || (val == null)) {
|
||||
return prefix + key;
|
||||
} else if (val === false) {
|
||||
return [prefix + 'no' + key];
|
||||
} else if (Array.isArray(val)) {
|
||||
var a = [];
|
||||
for (var j = 0; j < val.length; j++) {
|
||||
a = a.concat(argsFromKeyVal(key, val[j], opts));
|
||||
}
|
||||
return a;
|
||||
} else {
|
||||
if ((key.length === 1) || opts.spaceForLongArgs) {
|
||||
return [prefix + key, val];
|
||||
} else {
|
||||
return [prefix + key + '=' + escapeArg(val)];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function argsListFromObject(args, opts) {
|
||||
if (!args) {
|
||||
return [];
|
||||
}
|
||||
if (Array.isArray(args)) {
|
||||
return argsListFromObject({_:args});
|
||||
}
|
||||
var a = [];
|
||||
var keys = Object.keys(args);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (key[0] === '_') {
|
||||
continue;
|
||||
}
|
||||
var val = args[key];
|
||||
a = a.concat(argsFromKeyVal(key, val, opts));
|
||||
}
|
||||
|
||||
if (args._) {
|
||||
for (var i = 0; i < args._.length; i++) {
|
||||
// Don't escape here since `execFile` will escape the args for us
|
||||
a.push('' + args._[i]);
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
function execAsync(cmd, args, opts) {
|
||||
return new Promise(function (fulfill, reject) {
|
||||
child_process.execFile(cmd, argsListFromObject(args, opts), opts, function (err, result) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
fulfill(result);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = execAsync;
|
||||
module.exports.argsListFromObject = argsListFromObject;
|
||||
module.exports.argsFromKeyVal = argsFromKeyVal;
|
||||
module.exports.escapeArg = escapeArg;
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "exec-async",
|
||||
"version": "2.2.0",
|
||||
"description": "Returns a promise with the results of a shell command",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ccheever/exec-async.git"
|
||||
},
|
||||
"keywords": [
|
||||
"shell",
|
||||
"exec",
|
||||
"promise"
|
||||
],
|
||||
"author": "Charlie Cheever <ccheever@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ccheever/exec-async/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ccheever/exec-async#readme"
|
||||
}
|
||||
+6
@@ -10,6 +10,12 @@
|
||||
|
||||
### 💡 Others
|
||||
|
||||
## 12.0.13 — 2026-04-27
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Fixed incorrect MD5 checksum on Android. ([#43909](https://github.com/expo/expo/pull/43909) by [@kudo](https://github.com/kudo))
|
||||
|
||||
## 12.0.12 — 2025-12-18
|
||||
|
||||
_This version does not introduce any user-facing changes._
|
||||
|
||||
+2
-2
@@ -4,13 +4,13 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'expo.modules.asset'
|
||||
version = '12.0.12'
|
||||
version = '12.0.13'
|
||||
|
||||
android {
|
||||
namespace "expo.modules.asset"
|
||||
defaultConfig {
|
||||
versionCode 1
|
||||
versionName "12.0.12"
|
||||
versionName "12.0.13"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Generated
Vendored
-18
@@ -12,9 +12,7 @@ import expo.modules.kotlin.modules.Module
|
||||
import expo.modules.kotlin.modules.ModuleDefinition
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.net.URI
|
||||
import java.security.DigestInputStream
|
||||
import java.security.MessageDigest
|
||||
|
||||
internal class UnableToDownloadAssetException(url: String) :
|
||||
@@ -29,22 +27,6 @@ class AssetModule : Module() {
|
||||
return md.digest(uri.toString().toByteArray()).joinToString("") { "%02x".format(it) }
|
||||
}
|
||||
|
||||
private fun getMD5HashOfFileContent(file: File): String? {
|
||||
return try {
|
||||
FileInputStream(file).use { inputStream ->
|
||||
DigestInputStream(
|
||||
inputStream,
|
||||
MessageDigest.getInstance("MD5")
|
||||
).use { digestInputStream ->
|
||||
digestInputStream.messageDigest.digest().joinToString(separator = "") { "%02x".format(it) }
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun downloadAsset(appContext: AppContext, uri: URI, localUrl: File): Uri {
|
||||
if (localUrl.parentFile?.exists() != true) {
|
||||
localUrl.mkdirs()
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
"publication": {
|
||||
"groupId": "expo.modules.asset",
|
||||
"artifactId": "expo.modules.asset",
|
||||
"version": "12.0.12",
|
||||
"version": "12.0.13",
|
||||
"repository": "local-maven-repo"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
Vendored
BIN
Binary file not shown.
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
1ab99b0c156707d6eb0c255e128a9223
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
02bddaa5646c5100aa2a37250d7a47be77e4f2ed
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
f56f56b4e1c0a28b7e0c51b8e7485930eef0e0fb709eae41fe0a656a9540c261
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
2c473bac2a1292c15a232c5c238cd518913556efa769a2c8e3de3634687f24aaa66a3bd5b08faf653867fd512e167f1cb9bb202896ebc84f7fbff1d2200d0383
|
||||
Generated
Vendored
BIN
Binary file not shown.
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
c99d23add8ddd346e4972a902f0f70e8
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
70e5f0621e721ee1d57bb96a38f6f3620f7062df
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
5e907ec2263e0c21f8ee3c26c4986352e5d841c58e145dc3d9ef46e2f6cdfb5c
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
7f7e400352692fa6ca5b360f0e668fec8f90b6086ccfa7f8be900879e19dd09e159534f4483d99c6097eb014ddfa19f18b433aa53d1173c3cb3e47a614fe4d4e
|
||||
Generated
Vendored
-87
@@ -1,87 +0,0 @@
|
||||
{
|
||||
"formatVersion": "1.1",
|
||||
"component": {
|
||||
"group": "expo.modules.asset",
|
||||
"module": "expo.modules.asset",
|
||||
"version": "12.0.12",
|
||||
"attributes": {
|
||||
"org.gradle.status": "release"
|
||||
}
|
||||
},
|
||||
"createdBy": {
|
||||
"gradle": {
|
||||
"version": "8.14.3"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"name": "releaseVariantReleaseApiPublication",
|
||||
"attributes": {
|
||||
"org.gradle.category": "library",
|
||||
"org.gradle.dependency.bundling": "external",
|
||||
"org.gradle.libraryelements": "aar",
|
||||
"org.gradle.usage": "java-api"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"name": "expo.modules.asset-12.0.12.aar",
|
||||
"url": "expo.modules.asset-12.0.12.aar",
|
||||
"size": 19492,
|
||||
"sha512": "7f7e400352692fa6ca5b360f0e668fec8f90b6086ccfa7f8be900879e19dd09e159534f4483d99c6097eb014ddfa19f18b433aa53d1173c3cb3e47a614fe4d4e",
|
||||
"sha256": "5e907ec2263e0c21f8ee3c26c4986352e5d841c58e145dc3d9ef46e2f6cdfb5c",
|
||||
"sha1": "70e5f0621e721ee1d57bb96a38f6f3620f7062df",
|
||||
"md5": "c99d23add8ddd346e4972a902f0f70e8"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "releaseVariantReleaseRuntimePublication",
|
||||
"attributes": {
|
||||
"org.gradle.category": "library",
|
||||
"org.gradle.dependency.bundling": "external",
|
||||
"org.gradle.libraryelements": "aar",
|
||||
"org.gradle.usage": "java-runtime"
|
||||
},
|
||||
"dependencies": [
|
||||
{
|
||||
"group": "org.jetbrains.kotlin",
|
||||
"module": "kotlin-stdlib-jdk7",
|
||||
"version": {
|
||||
"requires": "2.1.20"
|
||||
}
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"name": "expo.modules.asset-12.0.12.aar",
|
||||
"url": "expo.modules.asset-12.0.12.aar",
|
||||
"size": 19492,
|
||||
"sha512": "7f7e400352692fa6ca5b360f0e668fec8f90b6086ccfa7f8be900879e19dd09e159534f4483d99c6097eb014ddfa19f18b433aa53d1173c3cb3e47a614fe4d4e",
|
||||
"sha256": "5e907ec2263e0c21f8ee3c26c4986352e5d841c58e145dc3d9ef46e2f6cdfb5c",
|
||||
"sha1": "70e5f0621e721ee1d57bb96a38f6f3620f7062df",
|
||||
"md5": "c99d23add8ddd346e4972a902f0f70e8"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "releaseVariantReleaseSourcePublication",
|
||||
"attributes": {
|
||||
"org.gradle.category": "documentation",
|
||||
"org.gradle.dependency.bundling": "external",
|
||||
"org.gradle.docstype": "sources",
|
||||
"org.gradle.usage": "java-runtime"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"name": "expo.modules.asset-12.0.12-sources.jar",
|
||||
"url": "expo.modules.asset-12.0.12-sources.jar",
|
||||
"size": 3222,
|
||||
"sha512": "2c473bac2a1292c15a232c5c238cd518913556efa769a2c8e3de3634687f24aaa66a3bd5b08faf653867fd512e167f1cb9bb202896ebc84f7fbff1d2200d0383",
|
||||
"sha256": "f56f56b4e1c0a28b7e0c51b8e7485930eef0e0fb709eae41fe0a656a9540c261",
|
||||
"sha1": "02bddaa5646c5100aa2a37250d7a47be77e4f2ed",
|
||||
"md5": "1ab99b0c156707d6eb0c255e128a9223"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
edebab57a1afb9a03917bfd998dbf627
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
4bfa02a48ead482bb108cfa62c00a04cc42acc16
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
84e24e8471b76e9ea10ecb77142b24d0566d50d4e4c2eabbbd8a6c0c4b75f4ea
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
246f56105b56b0316bbfd2c987e4cb2780aeedaf7603527fa1f891e15abe94e0a1b3a2a121fdaaffe0ba14e26f7c008768e8529fb4ec0b32aff8bf51160ff83d
|
||||
Generated
Vendored
-35
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>expo.modules.asset</groupId>
|
||||
<artifactId>expo.modules.asset</artifactId>
|
||||
<version>12.0.12</version>
|
||||
<packaging>aar</packaging>
|
||||
<name>expo.modules.asset</name>
|
||||
<url>https://github.com/expo/expo</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>MIT License</name>
|
||||
<url>https://github.com/expo/expo/blob/main/LICENSE</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<connection>https://github.com/expo/expo.git</connection>
|
||||
<developerConnection>https://github.com/expo/expo.git</developerConnection>
|
||||
<url>https://github.com/expo/expo</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
||||
<version>2.1.20</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
9a243acc5795fa880b7cc3a00530c315
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
cac965b69d3270f1ccda1328ffb642f641f5bae0
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
c7b45abd024dfee815d68dae84adacf5aaf1ab996d67ad231b45651d563fce83
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
ecb134732a941b8aa41a972f0d461a7c15da381bcb1d4301561345df071555fae230deec56037f3bc9435301d95b0156c16de0ea45c5f5acf70677732a0d58f7
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user