@expo/configure-splash-screen
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -1,2 +0,2 @@ | ||
import { XcodeProject, UUID, PBXNativeTarget } from 'xcode'; | ||
import { PBXNativeTarget, UUID, XcodeProject } from 'xcode'; | ||
export interface IosProject { | ||
@@ -3,0 +3,0 @@ projectName: string; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -6,5 +25,11 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cli_platform_ios_1 = require("@react-native-community/cli-platform-ios"); | ||
const path_1 = __importDefault(require("path")); | ||
const path = __importStar(require("path")); | ||
const xcode_1 = __importDefault(require("xcode")); | ||
const Paths_1 = require("./Paths"); | ||
function getProjectConfig(projectRoot) { | ||
return { | ||
projectPath: Paths_1.getAllXcodeProjectPaths(projectRoot)[0], | ||
pbxprojPath: Paths_1.getAllPBXProjectPaths(projectRoot)[0], | ||
}; | ||
} | ||
/** | ||
@@ -14,13 +39,6 @@ * Reads iOS project and locates `.pbxproj` file for further parsing and modifications. | ||
async function readPbxProject(projectRootPath) { | ||
const config = cli_platform_ios_1.projectConfig(projectRootPath, { plist: [] }); | ||
if (!config) { | ||
throw new Error(`Couldn't find iOS project. Cannot configure iOS.`); | ||
} | ||
const config = getProjectConfig(projectRootPath); | ||
const { projectPath: xcodeProjPath, pbxprojPath } = config; | ||
// xcodeProjPath contains path to .xcodeproj directory | ||
if (!xcodeProjPath.endsWith('.xcodeproj')) { | ||
throw new Error(`Couldn't find .xcodeproj directory.`); | ||
} | ||
const projectPath = xcodeProjPath.substring(0, xcodeProjPath.length - '.xcodeproj'.length); | ||
const projectName = path_1.default.basename(projectPath); | ||
const projectName = path.basename(projectPath); | ||
const pbxProject = xcode_1.default.project(pbxprojPath); | ||
@@ -33,9 +51,3 @@ await new Promise(resolve => pbxProject.parse(err => { | ||
})); | ||
const applicationNativeTarget = pbxProject.getTarget('com.apple.product-type.application'); | ||
if (!applicationNativeTarget) { | ||
throw new Error(`Couldn't locate application PBXNativeTarget in '.xcodeproj' file.`); | ||
} | ||
if (String(applicationNativeTarget.target.name) !== projectName) { | ||
throw new Error(`Application native target name mismatch. Expected ${projectName}, but found ${applicationNativeTarget.target.name}.`); | ||
} | ||
const applicationNativeTarget = Paths_1.getApplicationNativeTarget({ project: pbxProject, projectName }); | ||
return { | ||
@@ -42,0 +54,0 @@ projectName, |
{ | ||
"name": "@expo/configure-splash-screen", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Supplementary module for 'expo-splash-screen' providing cli configuration command", | ||
@@ -41,3 +41,2 @@ "bin": { | ||
"dependencies": { | ||
"@react-native-community/cli-platform-ios": "^4.10.0", | ||
"color-string": "^1.5.3", | ||
@@ -48,2 +47,3 @@ "commander": "^5.1.0", | ||
"fs-extra": "^9.0.0", | ||
"glob": "^7.1.6", | ||
"lodash": "^4.17.15", | ||
@@ -56,3 +56,2 @@ "pngjs": "^5.0.0", | ||
"@expo/babel-preset-cli": "0.2.18", | ||
"@react-native-community/cli-types": "^4.10.0", | ||
"@types/color-string": "^1.5.0", | ||
@@ -59,0 +58,0 @@ "@types/deep-equal": "^1.0.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
271815
14
92
2588
0
11
+ Addedglob@^7.1.6
- Removed@react-native-community/cli-platform-ios@4.13.0(transitive)
- Removed@react-native-community/cli-tools@4.13.0(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedargparse@1.0.10(transitive)
- Removedarray-filter@0.0.1(transitive)
- Removedarray-map@0.0.1(transitive)
- Removedarray-reduce@0.0.0(transitive)
- Removedchalk@3.0.0(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedesprima@4.0.1(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedis-wsl@1.1.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjsonify@0.0.1(transitive)
- Removedmime@2.6.0(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedopen@6.4.0(transitive)
- Removedshell-quote@1.6.1(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removeduuid@3.4.0(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
- Removedxcode@2.1.0(transitive)