F# Logs
logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pids *.pid *.seed *.pid.lock lib-cov coverage .nyc_output (http://gruntjs.com/creating-plugins#storing-task-files) .grunt bower_components .lock-wscript build/Release node_modules/ jspm_packages/ typings/ .npm .eslintcache .node_repl_history *.tgz .yarn-integrity .env package-lock.json out *.vsix .vscode-tesix title and add icon
This commit is contained in:
Родитель
d1b59025df
Коммит
864abdab06
|
@ -1,289 +1,66 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Typescript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
*.js.map
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
# package-lock file since it just causes merge conflicts
|
||||
package-lock.json
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
# Output
|
||||
out
|
||||
*.vsix
|
||||
.vscode-test
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 14 KiB |
|
@ -1,8 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const yo_1 = require("../yo");
|
||||
function addSFService() {
|
||||
yo_1.generatorProject(true);
|
||||
}
|
||||
exports.addSFService = addSFService;
|
||||
//# sourceMappingURL=add-sf-service.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"add-sf-service.js","sourceRoot":"","sources":["../../../src/commands/add-sf-service.ts"],"names":[],"mappings":";;AACA,8BAAyC;AAEzC;IACI,qBAAgB,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAFD,oCAEC"}
|
|
@ -1,95 +0,0 @@
|
|||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode = require("vscode");
|
||||
const config_utils_1 = require("../configureWorkspace/config-utils");
|
||||
function buildApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const languageType = yield config_utils_1.quickPickLanguage();
|
||||
const uris = yield vscode.workspace.findFiles('**/Cloud.json');
|
||||
if (uris.length < 1) {
|
||||
createPublishProfile();
|
||||
}
|
||||
if (languageType === 'Java') {
|
||||
buildGradleApplication();
|
||||
}
|
||||
else if (languageType === 'C#') {
|
||||
buildCSharpApplication();
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.buildApplication = buildApplication;
|
||||
function buildGradleApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const uris = yield vscode.workspace.findFiles('**/build.gradle');
|
||||
if (uris.length < 1) {
|
||||
vscode.window.showErrorMessage("A build.gradle file was not found in the workspace");
|
||||
return;
|
||||
}
|
||||
const projectPath = uris[0].path.replace('build.gradle', '');
|
||||
let projectUri = vscode.Uri.parse(projectPath);
|
||||
const terminal = vscode.window.createTerminal('ServiceFabric');
|
||||
terminal.sendText('gradle build ');
|
||||
terminal.show();
|
||||
});
|
||||
}
|
||||
function buildCSharpApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const uris = yield vscode.workspace.findFiles('**/build.sh');
|
||||
if (uris.length < 1) {
|
||||
vscode.window.showErrorMessage("A build file was not found in the workspace");
|
||||
return;
|
||||
}
|
||||
const buildPath = uris[0].path.replace('/c:', '');
|
||||
replaceBuildPath(buildPath);
|
||||
const relativeBuildPath = vscode.workspace.asRelativePath(uris[0].path);
|
||||
const terminal = vscode.window.createTerminal('ServiceFabric');
|
||||
terminal.sendText('./' + 'build.sh');
|
||||
terminal.show();
|
||||
});
|
||||
}
|
||||
function replaceBuildPath(filePath) {
|
||||
var fs = require('fs');
|
||||
fs.readFile(filePath, 'utf8', function (err, data) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
var result = data.replace(/\\/g, "/");
|
||||
fs.writeFile(filePath, result, 'utf8', function (err) {
|
||||
if (err)
|
||||
return console.log(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
function createPublishProfile() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var publishParams = {
|
||||
ConnectionIPOrURL: '',
|
||||
ConnectionPort: '19080',
|
||||
ClientKey: '',
|
||||
ClientCert: ''
|
||||
};
|
||||
var publishParamsJson = JSON.stringify(publishParams, null, 4);
|
||||
const uri = yield vscode.workspace.findFiles('**/install.sh');
|
||||
if (uri.length < 1) {
|
||||
vscode.window.showErrorMessage("An install.sh file was not found in the workspace");
|
||||
return;
|
||||
}
|
||||
const buildPath = uri[0].path.replace('/c:', '').replace('install.sh', '');
|
||||
console.log('Build Path: ' + buildPath);
|
||||
var fs = require('fs');
|
||||
fs.writeFile(buildPath + 'Cloud.json', publishParamsJson, 'utf8', function (err) {
|
||||
if (err)
|
||||
throw err;
|
||||
console.log('Completed!');
|
||||
});
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=build-application.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"build-application.js","sourceRoot":"","sources":["../../../src/commands/build-application.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC,qEAAuE;AAEvE;;QAEI,MAAM,YAAY,GAAG,MAAM,gCAAiB,EAAE,CAAC;QAE/C,MAAM,IAAI,GAAiB,MAAM,MAAM,CAAC,SAA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AE,CAAC;QACrB,IAAI,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/D,MAAM,GAAG,GAAiB,MAAM,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAC5E,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,mDAAmD,CAAC,CAAC;YACpF,MAAM,CAAC;QACX,CAAC;QACD,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,EAAC,EAAE,CAAC,CAAC;QAE1E,OAAO,CAAC,GAAG,CAAC,cAAc,GAAC,SAAS,CAAC,CAAC;QAEtC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,EAAE,CAAC,SAAS,CAAC,SAAS,GAAG,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAS,GAAG;YAC1E,EAAE,CAAA,CAAC,GAAG,CAAC;gBAAC,MAAM,GAAG,CAAC;YAClB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACP,CAAC;CAAA"}
|
|
@ -1,25 +0,0 @@
|
|||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode = require("vscode");
|
||||
function cleanJavaApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const uri = yield vscode.workspace.findFiles('build.gradle');
|
||||
if (uri.length < 1) {
|
||||
vscode.window.showErrorMessage("Task clean was not found in root project");
|
||||
return;
|
||||
}
|
||||
const terminal = vscode.window.createTerminal('Service Fabric');
|
||||
terminal.sendText('gradle clean ');
|
||||
terminal.show();
|
||||
});
|
||||
}
|
||||
exports.cleanJavaApplication = cleanJavaApplication;
|
||||
//# sourceMappingURL=clean-application-java.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"clean-application-java.js","sourceRoot":"","sources":["../../../src/commands/clean-application-java.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AAEjC;;QACI,MAAM,GAAG,GAAiB,MAAM,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC3E,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,0CAA0C,CAAC,CAAC;YAC3E,MAAM,CAAC;QACX,CAAC;QAED,MAAM,QAAQ,GAAoB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACjF,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QACnC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CAAA;AAVD,oDAUC"}
|
|
@ -1,18 +0,0 @@
|
|||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const yo_1 = require("../yo");
|
||||
function createApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield yo_1.generatorProject(false);
|
||||
});
|
||||
}
|
||||
exports.createApplication = createApplication;
|
||||
//# sourceMappingURL=create-application.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"create-application.js","sourceRoot":"","sources":["../../../src/commands/create-application.ts"],"names":[],"mappings":";;;;;;;;;;AACA,8BAAyC;AAIzC;;QACI,MAAM,qBAAgB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;CAAA;AAFD,8CAEC"}
|
|
@ -1,39 +0,0 @@
|
|||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode = require("vscode");
|
||||
const exec = require('child_process').exec;
|
||||
function deployApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
exec('sfctl cluster select --endpoint http://localhost:19080', function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
vscode.window.showErrorMessage("Could not connect to cluster.");
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
installApplication();
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.deployApplication = deployApplication;
|
||||
function installApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const uri = yield vscode.workspace.findFiles('**/install.sh');
|
||||
if (uri.length < 1) {
|
||||
vscode.window.showErrorMessage("An install.sh file was not found in the workspace");
|
||||
return;
|
||||
}
|
||||
const relativeInstallPath = vscode.workspace.asRelativePath(uri[0].path);
|
||||
const terminal = vscode.window.createTerminal('ServiceFabric');
|
||||
terminal.sendText('./' + relativeInstallPath);
|
||||
terminal.show();
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=deploy-application.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"deploy-application.js","sourceRoot":"","sources":["../../../src/commands/deploy-application.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC;AAE3C;;QAEI,IAAI,CAAC,wDAAwD,EAAE,UAAU,GAAG,EAAE,MAAM,EAAE,MAAM;YACxF,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACN,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,+BAA+B,CAAC,CAAC;gBAChE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACjB,MAAM,CAAC;YACX,CAAC;YACD,kBAAkB,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AAVD,8CAUC;AAED;;QACI,MAAM,GAAG,GAAiB,MAAM,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAC5E,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,mDAAmD,CAAC,CAAC;YACpF,MAAM,CAAC;QACX,CAAC;QAED,MAAM,mBAAmB,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAoB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QAChF,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,mBAAmB,CAAC,CAAC;QAC9C,QAAQ,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CAAA"}
|
|
@ -1,76 +0,0 @@
|
|||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode = require("vscode");
|
||||
const exec = require('child_process').exec;
|
||||
function publishApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield readCloudProfile();
|
||||
});
|
||||
}
|
||||
exports.publishApplication = publishApplication;
|
||||
function deployToUnsecureCluster(clusterInfo) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
exec('sfctl cluster select --endpoint ' + clusterInfo.ConnectionIPOrURL + clusterInfo.ConnectionPort, function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
vscode.window.showErrorMessage("Could not connect to cluster.");
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
installApplication();
|
||||
});
|
||||
});
|
||||
}
|
||||
function deployToSecureClusterCert(clusterInfo) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
exec('sfctl cluster select --endpoint ' + clusterInfo.ConnectionIPOrURL + ':' + clusterInfo.ConnectionPort + ' --cert ' + clusterInfo.ClientCert + ' --key ' + clusterInfo.ClientKey + ' --no-verify', function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
vscode.window.showErrorMessage("Could not connect to cluster.");
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
installApplication();
|
||||
});
|
||||
});
|
||||
}
|
||||
function installApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
console.log("Install Application");
|
||||
const uri = yield vscode.workspace.findFiles('**/install.sh');
|
||||
if (uri.length < 1) {
|
||||
vscode.window.showErrorMessage("An install.sh file was not found in the workspace");
|
||||
return;
|
||||
}
|
||||
const relativeInstallPath = vscode.workspace.asRelativePath(uri[0].path);
|
||||
const terminal = vscode.window.createTerminal('ServiceFabric');
|
||||
terminal.sendText('./' + relativeInstallPath);
|
||||
terminal.show();
|
||||
});
|
||||
}
|
||||
function readCloudProfile() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var fs = require('fs');
|
||||
const cloudProfile = yield vscode.workspace.findFiles('**/Cloud.json');
|
||||
const pathToCloudProfile = cloudProfile[0].path.replace('/c:', '');
|
||||
yield fs.readFile(pathToCloudProfile, 'utf8', function (err, data) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
var clusterInfo = JSON.parse(data);
|
||||
if (clusterInfo.ClientCert.length > 0) {
|
||||
deployToSecureClusterCert(clusterInfo);
|
||||
}
|
||||
else {
|
||||
deployToUnsecureCluster(clusterInfo);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=publish-application.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"publish-application.js","sourceRoot":"","sources":["../../../src/commands/publish-application.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC;AAE3C;;QACI,MAAM,gBAAgB,EAAE,CAAC;IAC7B,CAAC;CAAA;AAFD,gDAEC;AAED,iCAAuC,WAAW;;QAC9C,IAAI,CAAC,kCAAkC,GAAG,WAAW,CAAC,iBAAiB,GAAG,WAAW,CAAC,cAAc,EAAE,UAAU,GAAG,EAAE,MAAM,EAA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AAc,CAAC,eAAe,CAAC,CAAC;QAChF,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,mBAAmB,CAAC,CAAC;QAC9C,QAAQ,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CAAA;AAED;;QACI,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,MAAM,YAAY,GAAiB,MAAM,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACrF,MAAM,kBAAkB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEnE,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE,UAAU,GAAG,EAAE,IAAI;YAC7D,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACN,MAAM,GAAG,CAAC;YACd,CAAC;YACD,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACnC,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBACpC,yBAAyB,CAAC,WAAW,CAAC,CAAC;YAC3C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,uBAAuB,CAAC,WAAW,CAAC,CAAC;YACzC,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CAAA"}
|
|
@ -1,74 +0,0 @@
|
|||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode = require("vscode");
|
||||
const exec = require('child_process').exec;
|
||||
function removeApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
connectToCluster();
|
||||
});
|
||||
}
|
||||
exports.removeApplication = removeApplication;
|
||||
function connectToCluster() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var fs = require('fs');
|
||||
var clusterInfo;
|
||||
const cloudProfile = yield vscode.workspace.findFiles('**/Cloud.json');
|
||||
const pathToCloudProfile = cloudProfile[0].path.replace('/c:', '');
|
||||
;
|
||||
yield fs.readFile(pathToCloudProfile, 'utf8', function (err, data) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
clusterInfo = JSON.parse(data);
|
||||
if (clusterInfo.ClientCert.length > 0) {
|
||||
connectToSecureCluster(clusterInfo);
|
||||
}
|
||||
else {
|
||||
connectToUnsecureCluster(clusterInfo);
|
||||
}
|
||||
});
|
||||
return clusterInfo;
|
||||
});
|
||||
}
|
||||
function connectToSecureCluster(clusterInfo) {
|
||||
exec('sfctl cluster select --endpoint ' + clusterInfo.ConnectionIPOrURL + ':' + clusterInfo.ConnectionPort + ' --cert ' + clusterInfo.ClientCert + ' --key ' + clusterInfo.ClientKey + ' --no-verify', function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
vscode.window.showErrorMessage("Could not connect to cluster.");
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
uninstallApplication();
|
||||
});
|
||||
}
|
||||
function connectToUnsecureCluster(clusterInfo) {
|
||||
exec('sfctl cluster select --endpoint ' + clusterInfo.ConnectionIPOrURL + ':' + clusterInfo.ConnectionPort, function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
vscode.window.showErrorMessage("Could not connect to cluster.");
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
uninstallApplication();
|
||||
});
|
||||
}
|
||||
function uninstallApplication() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const uri = yield vscode.workspace.findFiles('**/uninstall.sh');
|
||||
if (uri.length < 1) {
|
||||
vscode.window.showErrorMessage("An uninstall.sh file was not found in the workspace");
|
||||
return;
|
||||
}
|
||||
const relativeInstallPath = vscode.workspace.asRelativePath(uri[0].path);
|
||||
const terminal = vscode.window.createTerminal('ServiceFabric');
|
||||
terminal.sendText('./' + relativeInstallPath);
|
||||
terminal.show();
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=remove-application.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"remove-application.js","sourceRoot":"","sources":["../../../src/commands/remove-application.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC;AAE3C;;QACI,gBAAgB,EAAE,CAAC;IACvB,CAAC;CAAA;AAFD,8CAEC;AAED;;QACI,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,WAAW,CAAC;QAEhB,MAAM,YAAY,GAAiB,MAAM,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACrF,MAAM,kBAAkB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAAA,CAAC;QAEpE,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE,UAAU,GAAG,EAAE,IAAI;YAC7D,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACN,MAAM,GAAG,CAAC;YACd,CAAC;YACD,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/B,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBACpC,sBAAsB,CAAC,WAAW,CAAC,CAAC;YACxC,CAAC;YAAC,I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AAC,qDAAqD,CAAC,CAAC;YACtF,MAAM,CAAC;QACX,CAAC;QAED,MAAM,mBAAmB,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAoB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QAChF,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,mBAAmB,CAAC,CAAC;QAC9C,QAAQ,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CAAA"}
|
|
@ -1,41 +0,0 @@
|
|||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode = require("vscode");
|
||||
function quickPickLanguage() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var opt = {
|
||||
matchOnDescription: true,
|
||||
matchOnDetail: true,
|
||||
placeHolder: 'Select Project Language'
|
||||
};
|
||||
const items = [];
|
||||
items.push('Java');
|
||||
items.push('C#');
|
||||
return vscode.window.showQuickPick(items, opt);
|
||||
});
|
||||
}
|
||||
exports.quickPickLanguage = quickPickLanguage;
|
||||
function quickPickServiceType() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var opt = {
|
||||
matchOnDescription: true,
|
||||
matchOnDetail: true,
|
||||
placeHolder: 'Choose a framework for your service'
|
||||
};
|
||||
const items = [];
|
||||
items.push('Reliable Actor Service');
|
||||
items.push('Reliable Stateless Service');
|
||||
items.push('Reliable Stateful Service');
|
||||
return vscode.window.showQuickPick(items, opt);
|
||||
});
|
||||
}
|
||||
exports.quickPickServiceType = quickPickServiceType;
|
||||
//# sourceMappingURL=config-utils.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"config-utils.js","sourceRoot":"","sources":["../../../src/configureWorkspace/config-utils.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAkC;AAElC;;QACI,IAAI,GAAG,GAA4B;YAC/B,kBAAkB,EAAE,IAAI;YACxB,aAAa,EAAE,IAAI;YACnB,WAAW,EAAE,yBAAyB;SACzC,CAAA;QAED,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEjB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC;CAAA;AAZD,8CAYC;AAED;;QACI,IAAI,GAAG,GAA4B;YAC/B,kBAAkB,EAAE,IAAI;YACxB,aAAa,EAAE,IAAI;YACnB,WAAW,EAAE,qCAAqC;SACrD,CAAA;QAED,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAExC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC;CAAA;AAbD,oDAaC"}
|
|
@ -1,29 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// The module 'vscode' contains the VS Code extensibility API
|
||||
// Import the necessary extensibility types to use in your code below
|
||||
const vscode_1 = require("vscode");
|
||||
const add_sf_service_1 = require("./commands/add-sf-service");
|
||||
const build_application_1 = require("./commands/build-application");
|
||||
const clean_application_java_1 = require("./commands/clean-application-java");
|
||||
const create_application_1 = require("./commands/create-application");
|
||||
const deploy_application_1 = require("./commands/deploy-application");
|
||||
const publish_application_1 = require("./commands/publish-application");
|
||||
const remove_application_1 = require("./commands/remove-application");
|
||||
// This method is called when your extension is activated. Activation is
|
||||
// controlled by the activation events defined in package.json.
|
||||
function activate(context) {
|
||||
// Use the console to output diagnostic information (console.log) and errors (console.error).
|
||||
// This line of code will only be executed once when your extension is activated.
|
||||
console.log('Congratulations, your extension "Service Fabric" is now active!');
|
||||
// Registering all of the possible commands for interacting with a Service Fabric Project
|
||||
context.subscriptions.push(vscode_1.commands.registerCommand('vscode-sf.addSFService', add_sf_service_1.addSFService));
|
||||
context.subscriptions.push(vscode_1.commands.registerCommand('vscode-sf.buildApplication', build_application_1.buildApplication));
|
||||
context.subscriptions.push(vscode_1.commands.registerCommand('vscode-sf.cleanJavaApplication', clean_application_java_1.cleanJavaApplication));
|
||||
context.subscriptions.push(vscode_1.commands.registerCommand('vscode-sf.createApplication', create_application_1.createApplication));
|
||||
context.subscriptions.push(vscode_1.commands.registerCommand('vscode-sf.deployApplication', deploy_application_1.deployApplication));
|
||||
context.subscriptions.push(vscode_1.commands.registerCommand('vscode-sf.publishApplication', publish_application_1.publishApplication));
|
||||
context.subscriptions.push(vscode_1.commands.registerCommand('vscode-sf.removeApplication', remove_application_1.removeApplication));
|
||||
}
|
||||
exports.activate = activate;
|
||||
//# sourceMappingURL=extension.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../../src/extension.ts"],"names":[],"mappings":";;AAAA,6DAA6D;AAC7D,qEAAqE;AACrE,mCAAmI;AACnI,8DAAyD;AACzD,oEAAgE;AAChE,8EAAyE;AACzE,sEAAkE;AAClE,sEAAkE;AAClE,wEAAoE;AACpE,sEAAkE;AAElE,wEAAwE;AACxE,+DAA+D;AAC/D,kBAAyB,OAAyB;IAE9C,6FAA6F;IAC7F,iFAAiF;IACjF,OAAO,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC;IAE/E,yFAAyF;IACzF,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAQ,CAAC,eAAe,CAAC,wBAAwB,EAAE,6BAAY,CAAC,CAAC,CAAC;IAC7F,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,oCAAgB,CAAC,CAAC,CAAC;IACrG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAQ,CAAC,eAAe,CAAC,gCAAgC,EAAE,6CAAoB,CAAC,CAAC,CAAC;IAC7G,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAQ,CAAC,eAAe,CAAC,6BAA6B,EAAE,sCAAiB,CAAC,CAAC,CAAC;IACvG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAQ,CAAC,eAAe,CAAC,6BAA6B,EAAE,sCAAiB,CAAC,CAAC,CAAC;IACvG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAQ,CAAC,eAAe,CAAC,8BAA8B,EAAE,wCAAkB,CAAC,CAAC,CAAC;IACzG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAQ,CAAC,eAAe,CAAC,6BAA6B,EAAE,sCAAiB,CAAC,CAAC,CAAC;AAC3G,CAAC;AAdD,4BAcC"}
|
|
@ -1,125 +0,0 @@
|
|||
'use strict';
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode_1 = require("vscode");
|
||||
const yo_1 = require("./yo/yo");
|
||||
const fs = require('fs');
|
||||
const figures = require('figures');
|
||||
const opn = require('opn');
|
||||
function getWorkingFolder() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!Array.isArray(vscode_1.workspace.workspaceFolders) || vscode_1.workspace.workspaceFolders.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
if (vscode_1.workspace.workspaceFolders.length === 1) {
|
||||
return vscode_1.workspace.workspaceFolders[0].uri.fsPath;
|
||||
}
|
||||
const selectedWkFolder = vscode_1.window.showWorkspaceFolderPick();
|
||||
return selectedWkFolder ? selectedWkFolder.uri.fspath : undefined;
|
||||
});
|
||||
}
|
||||
function generatorProject(addService) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const cwd = yield getWorkingFolder();
|
||||
if (!cwd) {
|
||||
vscode_1.window.showErrorMessage('Please open a workspace directory first.');
|
||||
return;
|
||||
}
|
||||
const yo = new yo_1.default({ cwd });
|
||||
let main;
|
||||
let sub;
|
||||
const generator = yield vscode_1.window.showQuickPick(list(yo));
|
||||
if (generator === undefined) {
|
||||
return;
|
||||
}
|
||||
main = generator.label;
|
||||
let subGenerator;
|
||||
if (generator.subGenerators.length > 1 && addService) {
|
||||
subGenerator = yield runSubGenerators(generator.subGenerators);
|
||||
}
|
||||
else {
|
||||
subGenerator = 'app';
|
||||
}
|
||||
if (subGenerator === undefined) {
|
||||
return;
|
||||
}
|
||||
sub = subGenerator;
|
||||
try {
|
||||
const question = yield yo.run(`${main}:${sub}`, cwd);
|
||||
if (!question) {
|
||||
return;
|
||||
}
|
||||
const input = vscode_1.window.showInputBox({ prompt: question });
|
||||
if (!input) {
|
||||
return;
|
||||
}
|
||||
const argument = input;
|
||||
yield yo.run(`${main}:${sub} ${argument}`, cwd);
|
||||
}
|
||||
catch (err) {
|
||||
const regexp = new RegExp('Did not provide required argument (.*?)!', 'i');
|
||||
if (err) {
|
||||
const match = err.message.match(regexp);
|
||||
if (match) {
|
||||
return `${sub} ${match[1]}?`;
|
||||
}
|
||||
}
|
||||
vscode_1.window.showErrorMessage(err.message || err);
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.generatorProject = generatorProject;
|
||||
function runSubGenerators(subGenerators) {
|
||||
const app = `${figures.star} app`;
|
||||
const index = subGenerators.indexOf('app');
|
||||
if (index !== -1) {
|
||||
subGenerators.splice(index, 1);
|
||||
}
|
||||
return vscode_1.window.showQuickPick(subGenerators)
|
||||
.then(choice => {
|
||||
if (choice === app) {
|
||||
return 'app';
|
||||
}
|
||||
return choice;
|
||||
});
|
||||
}
|
||||
function list(yo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
setImmediate(() => {
|
||||
yo.getEnvironment().lookup(() => {
|
||||
const generators = yo.getGenerators().map(generator => {
|
||||
return {
|
||||
label: generator.name.replace(/(^|\/)generator\-/i, '$1'),
|
||||
description: generator.description,
|
||||
subGenerators: generator.subGenerators
|
||||
};
|
||||
});
|
||||
if (generators.length === 0) {
|
||||
reject();
|
||||
vscode_1.window.showInformationMessage('Make sure to install some generators first.', 'more info')
|
||||
.then(choice => {
|
||||
if (choice === 'more info') {
|
||||
opn('http://yeoman.io/learning/');
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
const azureGenerators = generators.filter(generator => {
|
||||
return generator.label === 'azuresfcsharp'
|
||||
|| generator.label === 'azuresfjava'
|
||||
|| generator.label === 'azuresfcontainer'
|
||||
|| generator.label === 'azuresfguest';
|
||||
});
|
||||
resolve(azureGenerators);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/yo/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,mCAAuG;AAGvG,g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,CAAC,aAAa;qBACtC,CAAC;gBACH,CAAC,CAAC,CAAC;gBAEH,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC7B,MAAM,EAAE,CAAC;oBAET,eAAM,CAAC,sBAAsB,CAAC,6CAA6C,EAAE,WAAW,CAAC;yBACvF,IAAI,CAAC,MAAM,CAAC,EAAE;wBACd,EAAE,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC;4BAC5B,GAAG,CAAC,4BAA4B,CAAC,CAAC;wBACnC,CAAC;oBACF,CAAC,CAAC,CAAC;oBAEJ,MAAM,CAAC;gBACR,CAAC;gBACD,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;oBACrD,MAAM,CAAC,SAAS,CAAC,KAAK,KAAK,eAAe;2BACvC,SAAS,CAAC,KAAK,KAAK,aAAa;2BACjC,SAAS,CAAC,KAAK,KAAK,kBAAkB;2BACtC,SAAS,CAAC,KAAK,KAAK,cAAc,CAAA;gBACtC,CAAC,CAAC,CAAA;gBACF,OAAO,CAAC,eAAe,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@ -1,49 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode_1 = require("vscode");
|
||||
const prompt_1 = require("./prompt");
|
||||
const EscapeException_1 = require("../utils/EscapeException");
|
||||
const figures = require('figures');
|
||||
class CheckboxPrompt extends prompt_1.default {
|
||||
constructor(question) {
|
||||
question.choices = question.choices.map(choice => {
|
||||
if (typeof choice === 'string') {
|
||||
return {
|
||||
name: choice,
|
||||
value: choice
|
||||
};
|
||||
}
|
||||
return choice;
|
||||
});
|
||||
super(question);
|
||||
}
|
||||
render() {
|
||||
let choices = this._question.choices.reduce((result, choice) => {
|
||||
result[`${choice.checked === true ? figures.radioOn : figures.radioOff} ${choice.name}`] = choice;
|
||||
return result;
|
||||
}, {});
|
||||
const options = {
|
||||
placeHolder: this._question.message
|
||||
};
|
||||
let quickPickOptions = Object.keys(choices);
|
||||
quickPickOptions.push(figures.tick);
|
||||
return vscode_1.window.showQuickPick(quickPickOptions, options)
|
||||
.then(result => {
|
||||
if (result === undefined) {
|
||||
throw new EscapeException_1.default();
|
||||
}
|
||||
if (result !== figures.tick) {
|
||||
choices[result].checked = !choices[result].checked;
|
||||
return this.render();
|
||||
}
|
||||
return this._question.choices.reduce((result, choice) => {
|
||||
if (choice.checked === true) {
|
||||
result.push(choice.value);
|
||||
}
|
||||
return result;
|
||||
}, []);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = CheckboxPrompt;
|
||||
//# sourceMappingURL=checkbox.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/yo/prompts/checkbox.ts"],"names":[],"mappings":";;AAAA,mCAAiE;AACjE,qCAA8B;AAC9B,8DAAuD;AACvD,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAEnC,oBAAoC,SAAQ,gBAAM;IAEjD,YAAY,QAAa;QACxB,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YAChD,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAChC,MAAM,CAAC;oBACN,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,MAAM;iBACb,CAAC;YACH,CAAC;YAED,MAAM,CAAC,MAAM,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM;QACZ,IAAI,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;YAC9D,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AC,CAAC,CAAC;IACL,CAAC;CACD;AAnDD,iCAmDC"}
|
|
@ -1,28 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode_1 = require("vscode");
|
||||
const prompt_1 = require("./prompt");
|
||||
const EscapeException_1 = require("../utils/EscapeException");
|
||||
class ConfirmPrompt extends prompt_1.default {
|
||||
constructor(question) {
|
||||
super(question);
|
||||
}
|
||||
render() {
|
||||
const choices = {
|
||||
Yes: true,
|
||||
No: false
|
||||
};
|
||||
const options = {
|
||||
placeHolder: this._question.message
|
||||
};
|
||||
return vscode_1.window.showQuickPick(Object.keys(choices), options)
|
||||
.then(result => {
|
||||
if (result === undefined) {
|
||||
throw new EscapeException_1.default();
|
||||
}
|
||||
return choices[result] || false;
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = ConfirmPrompt;
|
||||
//# sourceMappingURL=confirm.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"confirm.js","sourceRoot":"","sources":["../../../../src/yo/prompts/confirm.ts"],"names":[],"mappings":";;AAAA,mCAAiE;AACjE,qCAA8B;AAC9B,8DAAuD;AAEvD,mBAAmC,SAAQ,gBAAM;IAEhD,YAAY,QAAa;QACxB,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM;QACZ,MAAM,OAAO,GAAG;YACf,GAAG,EAAE,IAAI;YACT,EAAE,EAAE,KAAK;SACT,CAAC;QAEF,MAAM,OAAO,GAAqB;YACjC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO;SACnC,CAAC;QAEF,MAAM,CAAC,eAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;aACxD,IAAI,CAAC,MAAM,CAAC,EAAE;YACd,EAAE,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;gBAC1B,MAAM,IAAI,yBAAe,EAAE,CAAC;YAC7B,CAAC;YAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AAzBD,gCAyBC"}
|
|
@ -1,28 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode_1 = require("vscode");
|
||||
const prompt_1 = require("./prompt");
|
||||
const EscapeException_1 = require("../utils/EscapeException");
|
||||
class ExpandPrompt extends prompt_1.default {
|
||||
constructor(question) {
|
||||
super(question);
|
||||
}
|
||||
render() {
|
||||
const choices = this._question.choices.reduce((result, choice) => {
|
||||
result[choice.name] = choice.value;
|
||||
return result;
|
||||
}, {});
|
||||
const options = {
|
||||
placeHolder: this._question.message
|
||||
};
|
||||
return vscode_1.window.showQuickPick(Object.keys(choices), options)
|
||||
.then(result => {
|
||||
if (result === undefined) {
|
||||
throw new EscapeException_1.default();
|
||||
}
|
||||
return choices[result] || false;
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = ExpandPrompt;
|
||||
//# sourceMappingURL=expand.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/yo/prompts/expand.ts"],"names":[],"mappings":";;AAAA,mCAAkD;AAClD,qCAA8B;AAC9B,8DAAuD;AAEvD,kBAAkC,SAAQ,gBAAM;IAE/C,YAAY,QAAa;QACxB,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM;QACZ,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;YAChE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC;QACf,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,MAAM,OAAO,GAAqB;YACjC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO;SACnC,CAAC;QAEF,MAAM,CAAC,eAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;aACxD,IAAI,CAAC,MAAM,CAAC,EAAE;YACd,EAAE,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;gBAC1B,MAAM,IAAI,yBAAe,EAAE,CAAC;YAC7B,CAAC;YAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AAzBD,+BAyBC"}
|
|
@ -1,35 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const input_1 = require("./input");
|
||||
const password_1 = require("./password");
|
||||
const list_1 = require("./list");
|
||||
const confirm_1 = require("./confirm");
|
||||
const checkbox_1 = require("./checkbox");
|
||||
const expand_1 = require("./expand");
|
||||
class PromptFactory {
|
||||
static createPrompt(question, answers) {
|
||||
/**
|
||||
* TODO:
|
||||
* - folder
|
||||
*/
|
||||
switch (question.type || 'input') {
|
||||
case 'string':
|
||||
case 'input':
|
||||
return new input_1.default(question, answers);
|
||||
case 'password':
|
||||
return new password_1.default(question, answers);
|
||||
case 'list':
|
||||
return new list_1.default(question);
|
||||
case 'confirm':
|
||||
return new confirm_1.default(question);
|
||||
case 'checkbox':
|
||||
return new checkbox_1.default(question);
|
||||
case 'expand':
|
||||
return new expand_1.default(question);
|
||||
default:
|
||||
throw new Error(`Could not find a prompt for question type ${question.type}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.default = PromptFactory;
|
||||
//# sourceMappingURL=factory.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../src/yo/prompts/factory.ts"],"names":[],"mappings":";;AACA,mCAAkC;AAClC,yCAAwC;AACxC,iCAAgC;AAChC,uCAAsC;AACtC,yCAAwC;AACxC,qCAAoC;AAEpC;IAEQ,MAAM,CAAC,YAAY,CAAC,QAAa,EAAE,OAAY;QACrD;;;WAGG;QACH,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC;YAClC,KAAK,QAAQ,CAAC;YACd,KAAK,OAAO;gBACX,MAAM,CAAC,IAAI,eAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC3C,KAAK,UAAU;gBACd,MAAM,CAAC,IAAI,kBAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC9C,KAAK,MAAM;gBACV,MAAM,CAAC,IAAI,cAAU,CAAC,QAAQ,CAAC,CAAC;YACjC,KAAK,SAAS;gBACb,MAAM,CAAC,IAAI,iBAAa,CAAC,QAAQ,CAAC,CAAC;YACpC,KAAK,UAAU;gBACd,MAAM,CAAC,IAAI,kBAAc,CAAC,QAAQ,CAAC,CAAC;YACrC,KAAK,QAAQ;gBACZ,MAAM,CAAC,IAAI,gBAAY,CAAC,QAAQ,CAAC,CAAC;YACnC;gBACC,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAChF,CAAC;IACF,CAAC;CACD;AAzBD,gCAyBC"}
|
|
@ -1,44 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode_1 = require("vscode");
|
||||
const prompt_1 = require("./prompt");
|
||||
const EscapeException_1 = require("../utils/EscapeException");
|
||||
const run_async_1 = require("../utils/run-async");
|
||||
const figures = require('figures');
|
||||
class InputPrompt extends prompt_1.default {
|
||||
constructor(question, answers) {
|
||||
super(question, answers);
|
||||
this._options = {
|
||||
prompt: this._question.message
|
||||
};
|
||||
}
|
||||
render() {
|
||||
return run_async_1.default(this._question.default)(this._answers)
|
||||
.then(placeHolder => {
|
||||
if (placeHolder instanceof Error) {
|
||||
placeHolder = placeHolder.message;
|
||||
this._question.default = undefined;
|
||||
}
|
||||
this._options.placeHolder = placeHolder;
|
||||
return vscode_1.window.showInputBox(this._options);
|
||||
})
|
||||
.then(result => {
|
||||
if (result === undefined) {
|
||||
throw new EscapeException_1.default();
|
||||
}
|
||||
if (result === '') {
|
||||
result = this._options.placeHolder || '';
|
||||
}
|
||||
return run_async_1.default(this._question.validate)(result || '')
|
||||
.then(valid => {
|
||||
if (valid !== undefined && valid !== true) {
|
||||
this._question.default = new Error(`${figures.warning} ${valid}`);
|
||||
return this.render();
|
||||
}
|
||||
return result;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = InputPrompt;
|
||||
//# sourceMappingURL=input.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../src/yo/prompts/input.ts"],"names":[],"mappings":";;AAAA,mCAAiD;AACjD,qCAA8B;AAC9B,8DAAuD;AACvD,kDAA0C;AAE1C,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAEnC,iBAAiC,SAAQ,gBAAM;IAI9C,YAAY,QAAa,EAAE,OAAY;QACtC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAEzB,IAAI,CAAC,QAAQ,GAAG;YACf,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO;SAC9B,CAAC;IACH,CAAC;IAEM,MAAM;QACZ,MAAM,CAAC,mBAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;aACpD,IAAI,CAAC,WAAW,CAAC,EAAE;YACnB,EAAE,CAAC,CAAC,WAAW,YAAY,KAAK,CAAC,CAAC,CAAC;gBAClC,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC;gBAClC,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC;YACpC,CAAC;YAED,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;YAExC,MAAM,CAAC,eAAM,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC,CAAC;aACD,IAAI,CAAC,MAAM,CAAC,EAAE;YACd,EAAE,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;gBAC1B,MAAM,IAAI,yBAAe,EAAE,CAAC;YAC7B,CAAC;YAED,EAAE,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC;gBACnB,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,EAAE,CAAC;YAC1C,CAAC;YAED,MAAM,CAAC,mBAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC;iBACpD,IAAI,CAAC,KAAK,CAAC,EAAE;gBACb,EAAE,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;oBAC3C,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC;oBAElE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACtB,CAAC;gBAED,MAAM,CAAC,MAAM,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AA7CD,8BA6CC"}
|
|
@ -1,37 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode_1 = require("vscode");
|
||||
const prompt_1 = require("./prompt");
|
||||
const EscapeException_1 = require("../utils/EscapeException");
|
||||
class ListPrompt extends prompt_1.default {
|
||||
constructor(question) {
|
||||
super(question);
|
||||
}
|
||||
render() {
|
||||
let choices;
|
||||
if (this._question.choices instanceof Array) {
|
||||
choices = this._question.choices.reduce((result, choice) => {
|
||||
result[choice] = choice;
|
||||
return result;
|
||||
}, {});
|
||||
}
|
||||
else {
|
||||
choices = this._question.choices.reduce((result, choice) => {
|
||||
result[choice.name] = choice.value;
|
||||
return result;
|
||||
}, {});
|
||||
}
|
||||
const options = {
|
||||
placeHolder: this._question.message
|
||||
};
|
||||
return vscode_1.window.showQuickPick(Object.keys(choices), options)
|
||||
.then(result => {
|
||||
if (result === undefined) {
|
||||
throw new EscapeException_1.default();
|
||||
}
|
||||
return choices[result];
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = ListPrompt;
|
||||
//# sourceMappingURL=list.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/yo/prompts/list.ts"],"names":[],"mappings":";;AAAA,mCAAiE;AACjE,qCAA8B;AAC9B,8DAAuD;AAEvD,gBAAgC,SAAQ,gBAAM;IAE7C,YAAY,QAAa;QACxB,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM;QACZ,IAAI,OAAO,CAAC;QACZ,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC;YAC7C,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;gBAC1D,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;gBACxB,MAAM,CAAC,MAAM,CAAC;YACf,CAAC,EAAE,EAAE,CAAC,CAAC;QACR,CAAC;QACD,IAAI,CAAC,CAAC;YACL,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;gBAC1D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;gBACnC,MAAM,CAAC,MAAM,CAAC;YACf,CAAC,EAAE,EAAE,CAAC,CAAC;QACR,CAAC;QAED,MAAM,OAAO,GAAqB;YACjC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO;SACnC,CAAC;QAEF,MAAM,CAAC,eAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;aACxD,IAAI,CAAC,MAAM,CAAC,EAAE;YACd,EAAE,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;gBAC1B,MAAM,IAAI,yBAAe,EAAE,CAAC;YAC7B,CAAC;YAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AAlCD,6BAkCC"}
|
|
@ -1,11 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const input_1 = require("./input");
|
||||
class PasswordPrompt extends input_1.default {
|
||||
constructor(question, answers) {
|
||||
super(question, answers);
|
||||
this._options.password = true;
|
||||
}
|
||||
}
|
||||
exports.default = PasswordPrompt;
|
||||
//# sourceMappingURL=password.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../../../src/yo/prompts/password.ts"],"names":[],"mappings":";;AAAA,mCAAkC;AAElC,oBAAoC,SAAQ,eAAW;IAEtD,YAAY,QAAa,EAAE,OAAY;QACtC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAEzB,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC/B,CAAC;CACD;AAPD,iCAOC"}
|
|
@ -1,10 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class Prompt {
|
||||
constructor(question, answers) {
|
||||
this._question = question;
|
||||
this._answers = answers;
|
||||
}
|
||||
}
|
||||
exports.default = Prompt;
|
||||
//# sourceMappingURL=prompt.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../src/yo/prompts/prompt.ts"],"names":[],"mappings":";;AAAA;IAKC,YAAY,QAAa,EAAE,OAAa;QACvC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC;CAGD;AAED,kBAAe,MAAM,CAAC"}
|
|
@ -1,4 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = require('error-ex')('EscapeException');
|
||||
//# sourceMappingURL=EscapeException.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"EscapeException.js","sourceRoot":"","sources":["../../../../src/yo/utils/EscapeException.ts"],"names":[],"mappings":";;AAAA,kBAAe,OAAO,CAAC,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@ -1,34 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const vscode_1 = require("vscode");
|
||||
const runAsync = require('run-async');
|
||||
const isFn = require('is-fn');
|
||||
// Helper function that will show a progress bar while running a function async
|
||||
function default_1(func) {
|
||||
if (!isFn(func)) {
|
||||
return function () {
|
||||
return Promise.resolve(func);
|
||||
};
|
||||
}
|
||||
const fn = runAsync(func);
|
||||
return function () {
|
||||
const args = Array.prototype.slice.call(arguments);
|
||||
return new Promise((resolve, reject) => {
|
||||
Promise.resolve(vscode_1.window.showQuickPick(new Promise((res, rej) => {
|
||||
fn.apply(fn, args)
|
||||
.then(result => {
|
||||
rej();
|
||||
resolve(result);
|
||||
})
|
||||
.catch(err => {
|
||||
rej();
|
||||
reject(err);
|
||||
});
|
||||
}))).catch(err => {
|
||||
// do nothing because the input is always rejected
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
exports.default = default_1;
|
||||
//# sourceMappingURL=run-async.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"run-async.js","sourceRoot":"","sources":["../../../../src/yo/utils/run-async.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE9B,+EAA+E;AAC/E,mBAAwB,IAAI;IAC3B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,MAAM,CAAC;YACN,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAA;IACF,CAAC;IAED,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE1B,MAAM,CAAC;QACN,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEnD,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,OAAO,CAAC,OAAO,CAAC,eAAM,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;gBAC7D,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC;qBAChB,IAAI,CAAC,MAAM,CAAC,EAAE;oBACd,GAAG,EAAE,CAAC;oBAEN,OAAO,CAAC,MAAM,CAAC,CAAC;gBACjB,CAAC,CAAC;qBACD,KAAK,CAAC,GAAG,CAAC,EAAE;oBACZ,GAAG,EAAE,CAAC;oBAEN,MAAM,CAAC,GAAG,CAAC,CAAC;gBACb,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;gBAChB,kDAAkD;YACnD,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AA9BD,4BA8BC"}
|
|
@ -1,83 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const util = require("util");
|
||||
const vscode_1 = require("vscode");
|
||||
const factory_1 = require("../prompts/factory");
|
||||
const run_async_1 = require("../utils/run-async");
|
||||
const logger = require('yeoman-environment/lib/util/log');
|
||||
const diff = require('diff');
|
||||
const isFn = require('is-fn');
|
||||
class CodeAdapter {
|
||||
constructor() {
|
||||
this.log = logger();
|
||||
this.outBuffer = '';
|
||||
let self = this;
|
||||
this.outChannel = vscode_1.window.createOutputChannel('Yeoman');
|
||||
this.outChannel.clear();
|
||||
this.outChannel.show();
|
||||
// TODO Do not overwrite these methods
|
||||
console.error = console.log = function () {
|
||||
const line = util.format.apply(util, arguments);
|
||||
self.outBuffer += `${line}\n`;
|
||||
self.outChannel.appendLine(line);
|
||||
return this;
|
||||
};
|
||||
this.log.write = function () {
|
||||
const line = util.format.apply(util, arguments);
|
||||
self.outBuffer += line;
|
||||
self.outChannel.append(line);
|
||||
return this;
|
||||
};
|
||||
}
|
||||
prompt(questions, callback) {
|
||||
let answers = {};
|
||||
callback = callback || function () { };
|
||||
const promise = questions.reduce((promise, question) => {
|
||||
return promise
|
||||
.then(() => {
|
||||
if (question.when === undefined) {
|
||||
return true;
|
||||
}
|
||||
else if (isFn(question.when)) {
|
||||
return run_async_1.default(question.when)(answers);
|
||||
}
|
||||
return question.when;
|
||||
})
|
||||
.then(askQuestion => {
|
||||
if (askQuestion) {
|
||||
const prompt = factory_1.default.createPrompt(question, answers);
|
||||
return prompt.render().then(result => answers[question.name] = question.filter ? question.filter(result) : result);
|
||||
}
|
||||
});
|
||||
}, Promise.resolve());
|
||||
return promise
|
||||
.then(() => {
|
||||
this.outChannel.clear();
|
||||
this.outChannel.append(this.outBuffer);
|
||||
callback(answers);
|
||||
return answers;
|
||||
});
|
||||
}
|
||||
diff(actual, expected) {
|
||||
this.outChannel.clear();
|
||||
let result = diff.diffLines(actual, expected);
|
||||
result.map(part => {
|
||||
let prefix = ' ';
|
||||
if (part.added === true) {
|
||||
prefix = '+';
|
||||
}
|
||||
else if (part.removed === true) {
|
||||
prefix = '-';
|
||||
}
|
||||
part.value = part.value.split('\n').map(line => {
|
||||
if (line.trim().length === 0) {
|
||||
return line;
|
||||
}
|
||||
return `${prefix}${line}`;
|
||||
}).join('\n');
|
||||
this.outChannel.append(part.value);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = CodeAdapter;
|
||||
//# sourceMappingURL=adapter.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../src/yo/yo/adapter.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,mCAA2D;AAC3D,gDAA+C;AAC/C,kDAA0C;AAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;AAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE9B;IAMC;QAJO,QAAG,GAAG,MAAM,EAAE,CAAC;QAEd,cAAS,GAAW,EAAE,CAAC;QAG9B,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,IAAI,CAAC,UAAU,GAAG,eAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAEvB,sCAAsC;QACtC,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,GAAG;YAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YAEhD,IAAI,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,CAAC;YAC9B,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC;QACb,CAAC,CAAC;QAEF,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG;YAChB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK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,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AA1FD,8BA0FC"}
|
|
@ -1,51 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const childProcess = require("child_process");
|
||||
const os_1 = require("os");
|
||||
const adapter_1 = require("./adapter");
|
||||
const yeoman = require('yeoman-environment');
|
||||
const uniq = require('array-uniq');
|
||||
const win32 = process.platform === 'win32';
|
||||
const getNpmPaths = function () {
|
||||
if (process.env.NODE_PATH) {
|
||||
return process.env.NODE_PATH.split(path.delimiter);
|
||||
}
|
||||
require('fix-path')();
|
||||
// Get the npm path from the user env variables.
|
||||
const paths = process.env.PATH.split(path.delimiter).map(item => path.join(item, '..', 'lib', 'node_modules'));
|
||||
// Default paths for each system
|
||||
if (win32) {
|
||||
paths.push(path.join(process.env.APPDATA, 'npm', 'node_modules'));
|
||||
}
|
||||
else {
|
||||
paths.push('/usr/lib/node_modules');
|
||||
}
|
||||
try {
|
||||
// Somehow `npm get prefix` does not return the correct value
|
||||
const userconfig = childProcess.execSync('npm get userconfig', { encoding: 'utf8' }).toString().trim();
|
||||
const content = fs.readFileSync(userconfig).toString('utf8');
|
||||
const match = content.match(new RegExp(`prefix=(.*?)${os_1.EOL}`));
|
||||
if (match) {
|
||||
if (win32) {
|
||||
paths.push(path.join(match[1], 'node_modules'));
|
||||
}
|
||||
else {
|
||||
paths.push(path.join(match[1], 'lib', 'node_modules'));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
}
|
||||
return uniq(paths.reverse());
|
||||
};
|
||||
function default_1(args, opts) {
|
||||
args = args || [];
|
||||
opts = opts || {};
|
||||
let env = yeoman.createEnv(args, opts, new adapter_1.default());
|
||||
env.getNpmPaths = getNpmPaths;
|
||||
return env;
|
||||
}
|
||||
exports.default = default_1;
|
||||
//# sourceMappingURL=environment.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/yo/yo/environment.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,yBAAyB;AACzB,8CAA8C;AAC9C,2BAAuB;AACvB,uCAAoC;AACpC,MAAM,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAC7C,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAEnC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AAE3C,MAAM,WAAW,GAAG;IACnB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAEtB,gDAAgD;IAChD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;IAE/G,gCAAgC;IAChC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACX,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;IACnE,CAAC;IAAC,IAAI,CAAC,CAAC;QACP,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,CAAC;QACJ,6DAA6D;QAC7D,MAAM,UAAU,GAAG,YAAY,CAAC,QAAQ,CAAC,oBA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scode_1 = require("vscode");
|
||||
const os_1 = require("os");
|
||||
const _ = require("lodash");
|
||||
const environment_1 = require("./environment");
|
||||
const EscapeException_1 = require("../utils/EscapeException");
|
||||
const readPkgUp = require('read-pkg-up');
|
||||
const semver = require('semver');
|
||||
const elegantSpinner = require('elegant-spinner');
|
||||
const figures = require('figures');
|
||||
const frame = elegantSpinner();
|
||||
class Yeoman {
|
||||
constructor(options) {
|
||||
this._options = options;
|
||||
this._env = environment_1.default(undefined, options);
|
||||
this._status = vscode_1.window.createStatusBarItem(vscode_1.StatusBarAlignment.Left);
|
||||
this._interval;
|
||||
}
|
||||
getEnvironment() {
|
||||
return this._env;
|
||||
}
|
||||
getGenerators() {
|
||||
const generatorsMeta = this._env.store.getGeneratorsMeta();
|
||||
// Remove sub generators from list
|
||||
let list = Object.keys(generatorsMeta).filter((key) => key.split(':')[1] === 'app');
|
||||
list = list.map(key => {
|
||||
const item = generatorsMeta[key];
|
||||
const name = key.split(':')[0];
|
||||
const pkgPath = readPkgUp.sync({ cwd: item.resolved });
|
||||
if (!pkgPath.pkg) {
|
||||
return null;
|
||||
}
|
||||
const pkg = pkgPath.pkg;
|
||||
const generatorVersion = pkg.dependencies['yeoman-generator'];
|
||||
const generatorMeta = _.pick(pkg, 'name', 'version', 'description');
|
||||
// Ignore the generator if does not depend on `yeoman-generator`
|
||||
if (!generatorVersion) {
|
||||
return null;
|
||||
}
|
||||
// Flag generator to indecate if the generator version is fully supported or not.
|
||||
// https://github.com/yeoman/yeoman-app/issues/16#issuecomment-121054821
|
||||
generatorMeta.isCompatible = semver.ltr('0.17.6', generatorVersion);
|
||||
// Indicator to verify official generators
|
||||
generatorMeta.officialGenerator = false;
|
||||
if (generatorMeta.repository && generatorMeta.repository.url) {
|
||||
generatorMeta.officialGenerator = generatorMeta.repository.url.indexOf('github.com/yeoman/') > -1;
|
||||
}
|
||||
// Add subgenerators
|
||||
generatorMeta.subGenerators = Object.keys(generatorsMeta).reduce((result, key) => {
|
||||
const split = key.split(':');
|
||||
if (split[0] === name) {
|
||||
result.push(split[1]);
|
||||
}
|
||||
return result;
|
||||
}, []);
|
||||
return generatorMeta;
|
||||
});
|
||||
return _.compact(list);
|
||||
}
|
||||
run(generator, cwd) {
|
||||
if (!cwd) {
|
||||
throw new Error('Please open a workspace directory first.');
|
||||
}
|
||||
process.chdir(cwd);
|
||||
const prefix = 'generator-';
|
||||
if (generator.indexOf(prefix) === 0) {
|
||||
generator = generator.slice(prefix.length);
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
Promise.resolve(vscode_1.window.showQuickPick(new Promise((res, rej) => {
|
||||
setImmediate(() => {
|
||||
try {
|
||||
this._env.run(generator, this.done)
|
||||
.on('npmInstall', () => {
|
||||
this.setState('install node dependencies');
|
||||
})
|
||||
.on('bowerInstall', () => {
|
||||
this.setState('install bower dependencies');
|
||||
})
|
||||
.on('error', err => {
|
||||
if (!(err instanceof EscapeException_1.default)) {
|
||||
vscode_1.window.showErrorMessage(err.message);
|
||||
throw err;
|
||||
}
|
||||
})
|
||||
.on('end', () => {
|
||||
this.clearState();
|
||||
console.log(`${os_1.EOL}${figures.tick} done`);
|
||||
});
|
||||
resolve();
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
rej();
|
||||
});
|
||||
}))).catch(err => {
|
||||
// do nothing because the input is always rejected
|
||||
});
|
||||
});
|
||||
}
|
||||
setState(state) {
|
||||
console.log(state);
|
||||
this._status.show();
|
||||
this._status.tooltip = state;
|
||||
this._interval = setInterval(() => {
|
||||
this._status.text = `${frame()} yo`;
|
||||
}, 50);
|
||||
}
|
||||
clearState() {
|
||||
clearInterval(this._interval);
|
||||
this._status.dispose();
|
||||
}
|
||||
done(err) {
|
||||
if (err) {
|
||||
// handle error
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.default = Yeoman;
|
||||
//# sourceMappingURL=yo.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"yo.js","sourceRoot":"","sources":["../../../../src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CAAC,GAAG;QACf,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACT,eAAe;QAChB,CAAC;IACF,CAAC;CACD;AAzID,yBAyIC"}
|
|
@ -1,17 +0,0 @@
|
|||
"use strict";
|
||||
//
|
||||
// Note: This example test is leveraging the Mocha test framework.
|
||||
// Please refer to their documentation on https://mochajs.org/ for help.
|
||||
//
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// The module 'assert' provides assertion methods from node
|
||||
const assert = require("assert");
|
||||
// Defines a Mocha test suite to group tests of similar kind together
|
||||
suite("Extension Tests", () => {
|
||||
// Defines a Mocha unit test
|
||||
test("Something 1", () => {
|
||||
assert.equal(-1, [1, 2, 3].indexOf(5));
|
||||
assert.equal(-1, [1, 2, 3].indexOf(0));
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=extension.test.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"extension.test.js","sourceRoot":"","sources":["../../test/extension.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,kEAAkE;AAClE,wEAAwE;AACxE,EAAE;;AAEF,2DAA2D;AAC3D,iCAAiC;AAOjC,qEAAqE;AACrE,KAAK,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAE1B,4BAA4B;IAC5B,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE;QACrB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@ -1,20 +0,0 @@
|
|||
//
|
||||
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
|
||||
//
|
||||
// This file is providing the test runner to use when running extension tests.
|
||||
// By default the test runner in use is Mocha based.
|
||||
//
|
||||
// You can provide your own test runner if you want to override it by exporting
|
||||
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
|
||||
// host can call to run the tests. The test runner is expected to use console.log
|
||||
// to report the results back to the caller. When the tests are finished, return
|
||||
// a possible error to the callback or null if none.
|
||||
var testRunner = require('vscode/lib/testrunner');
|
||||
// You can directly control Mocha options by uncommenting the following lines
|
||||
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
|
||||
testRunner.configure({
|
||||
ui: 'tdd',
|
||||
useColors: true // colored output from test results
|
||||
});
|
||||
module.exports = testRunner;
|
||||
//# sourceMappingURL=index.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../test/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,mEAAmE;AACnE,EAAE;AACF,8EAA8E;AAC9E,oDAAoD;AACpD,EAAE;AACF,+EAA+E;AAC/E,kFAAkF;AAClF,iFAAiF;AACjF,gFAAgF;AAChF,oDAAoD;AAEpD,IAAI,UAAU,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAElD,6EAA6E;AAC7E,mGAAmG;AACnG,UAAU,CAAC,SAAS,CAAC;IACjB,EAAE,EAAE,KAAK;IACT,SAAS,EAAE,IAAI,CAAC,mCAAmC;CACtD,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC"}
|
20
package.json
20
package.json
|
@ -1,15 +1,29 @@
|
|||
{
|
||||
"name": "vscode-service-fabric-reliable-services",
|
||||
"displayName": "vscode-service-fabric-reliable-services",
|
||||
"description": "",
|
||||
"displayName": "Service Fabric Reliable Services",
|
||||
"description": "Service Fabric Reliable Services extension for VSCode",
|
||||
"version": "0.1.0",
|
||||
"publisher": "ms-azuretools",
|
||||
"icon": "media/service-fabric.png",
|
||||
"engines": {
|
||||
"vscode": "^1.16.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/vscode-service-fabric-reliable-services"
|
||||
},
|
||||
"galleryBanner": {
|
||||
"color": "#3c3c3c",
|
||||
"theme": "dark"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
"Azure"
|
||||
],
|
||||
"keywords": [
|
||||
"Azure",
|
||||
"ServiceFabric"
|
||||
],
|
||||
"preview": true,
|
||||
"activationEvents": [
|
||||
"onCommand:vscode-sf.addSFService",
|
||||
"onCommand:vscode-sf.buildApplication",
|
||||
|
|
Загрузка…
Ссылка в новой задаче