Skip to content

Pin node modules & save the iOS Team ID #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@
"license": "SEE LICENSE IN LICENSE.txt",
"dependencies": {
"vscode-chrome-debug-core": "3.9.1",
"node-ipc": "^8.9.2",
"source-map": "^0.5.3",
"node-ipc": "8.10.3",
"source-map": "0.5.6",
"xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master",
"universal-analytics": "^0.4.6",
"vscode-debugadapter": "^1.14.0",
"vscode-debugprotocol": "^1.14.0"
"universal-analytics": "0.4.13",
"vscode-debugadapter": "1.19.0",
"vscode-debugprotocol": "1.19.0"
},
"devDependencies": {
"@types/es6-collections": "^0.5.29",
"@types/es6-promise": "^0.0.32",
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.46",
"@types/source-map": "^0.1.29",
"@types/es6-collections": "0.5.30",
"@types/es6-promise": "0.0.32",
"@types/mocha": "2.2.41",
"@types/node": "6.0.46",
"@types/source-map": "~0.1.0",
"chrome-remote-debug-protocol": "git://github.com/roblourens/chrome-remote-debug-protocol.git",
"mocha": "^2.4.5",
"typescript": "^2.4.0",
"vsce": "^1.18.0",
"vscode": "^1.0.3",
"vscode-debugadapter-testsupport": "^1.7.0"
"mocha": "2.5.3",
"typescript": "~2.4.0",
"vsce": "1.22.0",
"vscode": "1.1.0",
"vscode-debugadapter-testsupport": "1.19.0"
},
"scripts": {
"clean": "git clean -fdx",
Expand Down Expand Up @@ -75,6 +75,10 @@
"type": "string",
"default": "tns",
"description": "Path to the NativeScript CLI executable."
},
"nativescript.iosTeamId": {
"type": "string",
"description": "The iOS development Team ID."
}
}
},
Expand Down
1 change: 1 addition & 0 deletions src/debug-adapter/webKitDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
if(selectedTeam) {
// add the selected by the user Team Id
tnsArgs = (tnsArgs || []).concat(['--teamId', selectedTeam.id]);
Services.logger().log(`[NSDebugAdapter] Using iOS Team ID '${selectedTeam.id}', you can change this in the workspace settings.\n`, Tags.FrontendMessage);
}
}
}
Expand Down
29 changes: 23 additions & 6 deletions src/ipc/extensionServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as crypto from 'crypto';
import * as vscode from 'vscode';
import * as extProtocol from './extensionProtocol';
import {Services} from '../services/extensionHostServices';
import {QuickPickItem} from "vscode";
let ipc = require('node-ipc');

export class ExtensionServer {
Expand Down Expand Up @@ -70,21 +71,37 @@ export class ExtensionServer {
return Services.analyticsService().runRunCommand(args.platform);
}

public selectTeam() : Promise<{ id: string, name: string }> {
public selectTeam(): Promise<{ id: string, name: string }> {
return new Promise((resolve, reject) => {
const workspaceTeamId = vscode.workspace.getConfiguration().get<string>("nativescript.iosTeamId");

if (workspaceTeamId) {
resolve({
id: workspaceTeamId,
name: undefined // irrelevant
});
return;
}

let developmentTeams = this.getDevelopmentTeams();
if(developmentTeams.length > 1) {
let quickPickItems = developmentTeams.map((team) => {
if (developmentTeams.length > 1) {
let quickPickItems: Array<QuickPickItem> = developmentTeams.map((team) => {
return {
label: team.name,
description: team.id
};
});
vscode.window.showQuickPick(quickPickItems)
.then(val => resolve({
vscode.window.showQuickPick(
quickPickItems, {
placeHolder: "Select your development team"
})
.then((val: QuickPickItem) => {
vscode.workspace.getConfiguration().update("nativescript.iosTeamId", val.description);
resolve({
id: val.description,
name: val.label
}));
})
});
} else {
resolve();
}
Expand Down