Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pbxproj-dom

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pbxproj-dom - npm Package Compare versions

Comparing version 1.0.11 to 1.1.0

24

ast.js

@@ -66,3 +66,3 @@ var __extends = (this && this.__extends) || (function () {

exports.isNull = isNull;
var Node = (function () {
var Node = /** @class */ (function () {
function Node() {

@@ -115,3 +115,3 @@ var children = [];

exports.Node = Node;
var Null = (function (_super) {
var Null = /** @class */ (function (_super) {
__extends(Null, _super);

@@ -121,7 +121,7 @@ function Null() {

}
Null.instance = new Null();
return Null;
}(Node));
Null.instance = new Null();
exports.Null = Null;
var Document = (function (_super) {
var Document = /** @class */ (function (_super) {
__extends(Document, _super);

@@ -154,3 +154,3 @@ function Document(root, _s1) {

Document.prototype.kind = "Document";
var Dictionary = (function (_super) {
var Dictionary = /** @class */ (function (_super) {
__extends(Dictionary, _super);

@@ -275,3 +275,3 @@ function Dictionary(_s1, _content, _s2) {

Dictionary.prototype.kind = "Dictionary";
var KeyValuePair = (function (_super) {
var KeyValuePair = /** @class */ (function (_super) {
__extends(KeyValuePair, _super);

@@ -301,3 +301,3 @@ function KeyValuePair(_key, _s2, value, _s3) {

KeyValuePair.prototype.kind = "KeyValuePair";
var StringBlock = (function (_super) {
var StringBlock = /** @class */ (function (_super) {
__extends(StringBlock, _super);

@@ -325,3 +325,3 @@ function StringBlock(_s1, text) {

StringBlock.prototype.kind = "StringBlock";
var CommentBlock = (function (_super) {
var CommentBlock = /** @class */ (function (_super) {
__extends(CommentBlock, _super);

@@ -345,3 +345,3 @@ function CommentBlock(_text) {

CommentBlock.prototype.kind = "CommentBlock";
var List = (function (_super) {
var List = /** @class */ (function (_super) {
__extends(List, _super);

@@ -390,3 +390,3 @@ function List(_s1, _content, _s2) {

List.prototype.kind = "List";
var Identifier = (function (_super) {
var Identifier = /** @class */ (function (_super) {
__extends(Identifier, _super);

@@ -409,3 +409,3 @@ function Identifier(_s1, text) {

Identifier.prototype.kind = "Identifier";
var WhiteSpace = (function (_super) {
var WhiteSpace = /** @class */ (function (_super) {
__extends(WhiteSpace, _super);

@@ -427,3 +427,3 @@ function WhiteSpace(text) {

WhiteSpace.prototype.kind = "WhiteSpace";
var Space = (function (_super) {
var Space = /** @class */ (function (_super) {
__extends(Space, _super);

@@ -430,0 +430,0 @@ function Space(_content) {

{
"name": "pbxproj-dom",
"version": "1.0.11",
"version": "1.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -25,2 +25,3 @@ import * as ast from "./ast";

readonly buildConfigurationsList: XCConfigurationList;
readonly productType: string;
}

@@ -36,3 +37,3 @@ export declare class XCBuildConfiguration extends DocumentObject {

[id: string]: DocumentObject | any;
private constructor(ast);
private constructor();
readonly objects: DocumentObject[];

@@ -39,0 +40,0 @@ readonly targets: PBXNativeTarget[];

@@ -32,3 +32,3 @@ var __extends = (this && this.__extends) || (function () {

}
var DocumentObject = (function () {
var DocumentObject = /** @class */ (function () {
function DocumentObject(document, ast) {

@@ -57,3 +57,3 @@ this.document = document;

exports.DocumentObject = DocumentObject;
var PBXProject = (function (_super) {
var PBXProject = /** @class */ (function (_super) {
__extends(PBXProject, _super);

@@ -78,9 +78,9 @@ function PBXProject() {

});
PBXProject = __decorate([
pbx
], PBXProject);
return PBXProject;
}(DocumentObject));
PBXProject = __decorate([
pbx
], PBXProject);
exports.PBXProject = PBXProject;
var PBXNativeTarget = (function (_super) {
var PBXNativeTarget = /** @class */ (function (_super) {
__extends(PBXNativeTarget, _super);

@@ -102,9 +102,14 @@ function PBXNativeTarget() {

});
Object.defineProperty(PBXNativeTarget.prototype, "productType", {
get: function () { return this.ast.value.get("productType").text; },
enumerable: true,
configurable: true
});
PBXNativeTarget = __decorate([
pbx
], PBXNativeTarget);
return PBXNativeTarget;
}(DocumentObject));
PBXNativeTarget = __decorate([
pbx
], PBXNativeTarget);
exports.PBXNativeTarget = PBXNativeTarget;
var XCBuildConfiguration = (function (_super) {
var XCBuildConfiguration = /** @class */ (function (_super) {
__extends(XCBuildConfiguration, _super);

@@ -121,9 +126,9 @@ function XCBuildConfiguration() {

});
XCBuildConfiguration = __decorate([
pbx
], XCBuildConfiguration);
return XCBuildConfiguration;
}(DocumentObject));
XCBuildConfiguration = __decorate([
pbx
], XCBuildConfiguration);
exports.XCBuildConfiguration = XCBuildConfiguration;
var XCConfigurationList = (function (_super) {
var XCConfigurationList = /** @class */ (function (_super) {
__extends(XCConfigurationList, _super);

@@ -141,9 +146,9 @@ function XCConfigurationList() {

});
XCConfigurationList = __decorate([
pbx
], XCConfigurationList);
return XCConfigurationList;
}(DocumentObject));
XCConfigurationList = __decorate([
pbx
], XCConfigurationList);
exports.XCConfigurationList = XCConfigurationList;
var Document = (function () {
var Document = /** @class */ (function () {
function Document(ast) {

@@ -150,0 +155,0 @@ this.ast = ast;

Parser and DOM over the xcode pbxproj
[![Build Status](https://travis-ci.org/PanayotCankov/pbxproj-dom.svg?branch=master)](https://travis-ci.org/PanayotCankov/pbxproj-dom)
[![Build Status](https://travis-ci.org/NativeScript/pbxproj-dom.svg?branch=master)](https://travis-ci.org/NativeScript/pbxproj-dom)

@@ -5,0 +5,0 @@ Sample usage:

@@ -34,3 +34,5 @@ import * as pbx from "./pbx";

*/
setManualSigningStyle(targetName: string, {team, uuid, name, identity}?: ManualSigning): void;
setManualSigningStyle(targetName: string, { team, uuid, name, identity }?: ManualSigning): void;
setManualSigningStyleByTargetProductType(targetProductType: string, { team, uuid, name, identity }?: ManualSigning): void;
setManualSigningStyleByTargetKey(targetKey: string, { team, uuid, name, identity }?: ManualSigning): void;
/**

@@ -41,2 +43,10 @@ * Sets Automatic signing style for a target in the pbx.Document.

/**
* Sets Automatic signing style for a target in the pbx.Document.
*/
setAutomaticSigningStyleByTargetProductType(targetProductType: string, developmentTeam: string): void;
/**
* Sets Automatic signing style for a target in the pbx.Document.
*/
setAutomaticSigningStyleByTargetKey(targetKey: string, developmentTeam: string): void;
/**
* Read the signing configuration for a target.

@@ -53,2 +63,4 @@ */

} | undefined;
private setTargetManualSigningStyle;
private setTargetAutomaticSigningStyle;
/**

@@ -55,0 +67,0 @@ * Serializes the project back to string format.

@@ -8,3 +8,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

*/
var Xcode = (function () {
var Xcode = /** @class */ (function () {
function Xcode() {

@@ -31,2 +31,3 @@ }

Xcode.prototype.setManualSigningStyle = function (targetName, _a) {
var _this = this;
var _b = _a === void 0 ? { team: undefined, uuid: undefined, name: undefined } : _a, team = _b.team, uuid = _b.uuid, name = _b.name, identity = _b.identity;

@@ -40,23 +41,3 @@ this.document.projects.forEach(function (project) {

targets.forEach(function (target) {
project.patch({
attributes: {
TargetAttributes: (_a = {},
_a[target.key] = {
DevelopmentTeam: team,
ProvisioningStyle: "Manual"
},
_a)
}
});
target.buildConfigurationsList.buildConfigurations.forEach(function (config) {
config.patch({
buildSettings: {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]": identity /* delete or set the CODE_SIGN_IDENTITY[sdk=iphoneos*] */,
DEVELOPMENT_TEAM: team,
PROVISIONING_PROFILE: uuid,
PROVISIONING_PROFILE_SPECIFIER: name
}
});
});
var _a;
_this.setTargetManualSigningStyle(target, { team: team, uuid: uuid, name: name, identity: identity });
});

@@ -66,2 +47,20 @@ }

};
Xcode.prototype.setManualSigningStyleByTargetProductType = function (targetProductType, _a) {
var _this = this;
var _b = _a === void 0 ? { team: undefined, uuid: undefined, name: undefined } : _a, team = _b.team, uuid = _b.uuid, name = _b.name, identity = _b.identity;
this.document.targets
.filter(function (target) { return target.productType === targetProductType; })
.forEach(function (target) {
_this.setTargetManualSigningStyle(target, { team: team, uuid: uuid, name: name, identity: identity });
});
};
Xcode.prototype.setManualSigningStyleByTargetKey = function (targetKey, _a) {
var _this = this;
var _b = _a === void 0 ? { team: undefined, uuid: undefined, name: undefined } : _a, team = _b.team, uuid = _b.uuid, name = _b.name, identity = _b.identity;
this.document.targets
.filter(function (target) { return target.key === targetKey; })
.forEach(function (target) {
_this.setTargetManualSigningStyle(target, { team: team, uuid: uuid, name: name, identity: identity });
});
};
/**

@@ -75,30 +74,28 @@ * Sets Automatic signing style for a target in the pbx.Document.

.forEach(function (target) {
_this.document.projects
.filter(function (project) { return project.targets.indexOf(target) >= 0; })
.forEach(function (project) {
project.patch({
attributes: {
TargetAttributes: (_a = {},
_a[target.key] = {
DevelopmentTeam: developmentTeam,
ProvisioningStyle: "Automatic"
},
_a)
}
});
var _a;
});
target.buildConfigurationsList.buildConfigurations.forEach(function (config) {
config.patch({
buildSettings: {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]": "iPhone Developer",
DEVELOPMENT_TEAM: developmentTeam,
PROVISIONING_PROFILE: undefined,
PROVISIONING_PROFILE_SPECIFIER: undefined
}
});
});
_this.setTargetAutomaticSigningStyle(target, developmentTeam);
});
};
/**
* Sets Automatic signing style for a target in the pbx.Document.
*/
Xcode.prototype.setAutomaticSigningStyleByTargetProductType = function (targetProductType, developmentTeam) {
var _this = this;
this.document.targets
.filter(function (target) { return target.productType === targetProductType; })
.forEach(function (target) {
_this.setTargetAutomaticSigningStyle(target, developmentTeam);
});
};
/**
* Sets Automatic signing style for a target in the pbx.Document.
*/
Xcode.prototype.setAutomaticSigningStyleByTargetKey = function (targetKey, developmentTeam) {
var _this = this;
this.document.targets
.filter(function (target) { return target.key === targetKey; })
.forEach(function (target) {
_this.setTargetAutomaticSigningStyle(target, developmentTeam);
});
};
/**
* Read the signing configuration for a target.

@@ -139,2 +136,57 @@ */

};
Xcode.prototype.setTargetManualSigningStyle = function (target, _a) {
var _b = _a === void 0 ? { team: undefined, uuid: undefined, name: undefined } : _a, team = _b.team, uuid = _b.uuid, name = _b.name, identity = _b.identity;
this.document.projects
.filter(function (project) { return project.targets.indexOf(target) >= 0; })
.forEach(function (project) {
var _a;
project.patch({
attributes: {
TargetAttributes: (_a = {},
_a[target.key] = {
DevelopmentTeam: team,
ProvisioningStyle: "Manual"
},
_a)
}
});
target.buildConfigurationsList.buildConfigurations.forEach(function (config) {
config.patch({
buildSettings: {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]": identity /* delete or set the CODE_SIGN_IDENTITY[sdk=iphoneos*] */,
DEVELOPMENT_TEAM: team,
PROVISIONING_PROFILE: uuid,
PROVISIONING_PROFILE_SPECIFIER: name
}
});
});
});
};
Xcode.prototype.setTargetAutomaticSigningStyle = function (target, developmentTeam) {
this.document.projects
.filter(function (project) { return project.targets.indexOf(target) >= 0; })
.forEach(function (project) {
var _a;
project.patch({
attributes: {
TargetAttributes: (_a = {},
_a[target.key] = {
DevelopmentTeam: developmentTeam,
ProvisioningStyle: "Automatic"
},
_a)
}
});
});
target.buildConfigurationsList.buildConfigurations.forEach(function (config) {
config.patch({
buildSettings: {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]": "iPhone Developer",
DEVELOPMENT_TEAM: developmentTeam,
PROVISIONING_PROFILE: undefined,
PROVISIONING_PROFILE_SPECIFIER: undefined
}
});
});
};
/**

@@ -141,0 +193,0 @@ * Serializes the project back to string format.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc