Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
ac737307
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ac737307
编写于
10月 02, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable noImplicitAny in build
上级
a54e5f54
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
135 addition
and
129 deletion
+135
-129
build/lib/asar.js
build/lib/asar.js
+2
-2
build/lib/asar.ts
build/lib/asar.ts
+2
-2
build/lib/bundle.ts
build/lib/bundle.ts
+4
-4
build/lib/extensions.js
build/lib/extensions.js
+3
-3
build/lib/extensions.ts
build/lib/extensions.ts
+6
-6
build/lib/i18n.js
build/lib/i18n.js
+1
-1
build/lib/i18n.ts
build/lib/i18n.ts
+6
-6
build/lib/optimize.js
build/lib/optimize.js
+1
-1
build/lib/optimize.ts
build/lib/optimize.ts
+4
-4
build/lib/stats.ts
build/lib/stats.ts
+2
-2
build/lib/tslint/translationRemindRule.ts
build/lib/tslint/translationRemindRule.ts
+1
-1
build/lib/typings/event-stream.d.ts
build/lib/typings/event-stream.d.ts
+3
-4
build/lib/typings/github-releases.d.ts
build/lib/typings/github-releases.d.ts
+3
-0
build/lib/typings/minimatch.d.ts
build/lib/typings/minimatch.d.ts
+0
-64
build/lib/typings/rimraf.d.ts
build/lib/typings/rimraf.d.ts
+0
-17
build/lib/util.ts
build/lib/util.ts
+2
-2
build/package.json
build/package.json
+10
-4
build/tfs/common/symbols.ts
build/tfs/common/symbols.ts
+5
-5
build/tsconfig.json
build/tsconfig.json
+1
-1
build/yarn.lock
build/yarn.lock
+79
-0
未找到文件。
build/lib/asar.js
浏览文件 @
ac737307
...
...
@@ -6,8 +6,8 @@
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
var
path
=
require
(
"
path
"
);
var
es
=
require
(
"
event-stream
"
);
var
pickle
=
require
(
"
chromium-pickle-js
"
);
var
Filesystem
=
require
(
"
asar/lib/filesystem
"
);
var
pickle
=
require
(
'
chromium-pickle-js
'
);
var
Filesystem
=
require
(
'
asar/lib/filesystem
'
);
var
VinylFile
=
require
(
"
vinyl
"
);
var
minimatch
=
require
(
"
minimatch
"
);
function
createAsar
(
folderPath
,
unpackGlobs
,
destFilename
)
{
...
...
build/lib/asar.ts
浏览文件 @
ac737307
...
...
@@ -7,8 +7,8 @@
import
*
as
path
from
'
path
'
;
import
*
as
es
from
'
event-stream
'
;
import
*
as
pickle
from
'
chromium-pickle-js
'
;
import
*
as
Filesystem
from
'
asar/lib/filesystem
'
;
const
pickle
=
require
(
'
chromium-pickle-js
'
)
;
const
Filesystem
=
require
(
'
asar/lib/filesystem
'
)
;
import
*
as
VinylFile
from
'
vinyl
'
;
import
*
as
minimatch
from
'
minimatch
'
;
...
...
build/lib/bundle.ts
浏览文件 @
ac737307
...
...
@@ -127,7 +127,7 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba
config
.
paths
[
'
vs/css
'
]
=
'
out-build/vs/css.build
'
;
loader
.
config
(
config
);
loader
([
'
require
'
],
(
localRequire
)
=>
{
loader
([
'
require
'
],
(
localRequire
:
any
)
=>
{
let
resolvePath
=
(
path
:
string
)
=>
{
let
r
=
localRequire
.
toUrl
(
path
);
if
(
!
/
\.
js/
.
test
(
r
))
{
...
...
@@ -155,7 +155,7 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba
cssInlinedResources
:
cssInlinedResources
,
bundleData
:
partialResult
.
bundleData
});
},
(
err
)
=>
callback
(
err
,
null
));
},
(
err
:
any
)
=>
callback
(
err
,
null
));
}
function
emitEntryPoints
(
modules
:
IBuildModuleInfo
[],
entryPoints
:
IEntryPointMap
):
IPartialBundleResult
{
...
...
@@ -463,7 +463,7 @@ function emitEntryPoint(
}
});
let
toIFile
=
(
path
):
IFile
=>
{
let
toIFile
=
(
path
:
string
):
IFile
=>
{
let
contents
=
readFileAndRemoveBOM
(
path
);
return
{
path
:
path
,
...
...
@@ -495,7 +495,7 @@ function readFileAndRemoveBOM(path: string): string {
function
emitPlugin
(
entryPoint
:
string
,
plugin
:
ILoaderPlugin
,
pluginName
:
string
,
moduleName
:
string
):
IFile
{
let
result
=
''
;
if
(
typeof
plugin
.
write
===
'
function
'
)
{
let
write
:
ILoaderPluginWriteFunc
=
<
any
>
((
what
)
=>
{
let
write
:
ILoaderPluginWriteFunc
=
<
any
>
((
what
:
string
)
=>
{
result
+=
what
;
});
write
.
getEntryPoint
=
()
=>
{
...
...
build/lib/extensions.js
浏览文件 @
ac737307
...
...
@@ -26,11 +26,11 @@ var stats_1 = require("./stats");
var
util2
=
require
(
"
./util
"
);
var
remote
=
require
(
"
gulp-remote-src
"
);
var
vzip
=
require
(
'
gulp-vinyl-zip
'
);
var
filter
=
require
(
'
gulp-filter
'
);
var
rename
=
require
(
'
gulp-rename
'
);
var
filter
=
require
(
"
gulp-filter
"
);
var
rename
=
require
(
"
gulp-rename
"
);
var
util
=
require
(
'
gulp-util
'
);
var
buffer
=
require
(
'
gulp-buffer
'
);
var
json
=
require
(
'
gulp-json-editor
'
);
var
json
=
require
(
"
gulp-json-editor
"
);
var
webpack
=
require
(
'
webpack
'
);
var
webpackGulp
=
require
(
'
webpack-stream
'
);
var
root
=
path
.
resolve
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
));
...
...
build/lib/extensions.ts
浏览文件 @
ac737307
...
...
@@ -15,11 +15,11 @@ import { createStatsStream } from './stats';
import
*
as
util2
from
'
./util
'
;
import
remote
=
require
(
'
gulp-remote-src
'
);
const
vzip
=
require
(
'
gulp-vinyl-zip
'
);
cons
t
filter
=
require
(
'
gulp-filter
'
);
cons
t
rename
=
require
(
'
gulp-rename
'
);
impor
t
filter
=
require
(
'
gulp-filter
'
);
impor
t
rename
=
require
(
'
gulp-rename
'
);
const
util
=
require
(
'
gulp-util
'
);
const
buffer
=
require
(
'
gulp-buffer
'
);
cons
t
json
=
require
(
'
gulp-json-editor
'
);
impor
t
json
=
require
(
'
gulp-json-editor
'
);
const
webpack
=
require
(
'
webpack
'
);
const
webpackGulp
=
require
(
'
webpack-stream
'
);
...
...
@@ -79,7 +79,7 @@ function fromLocalWebpack(extensionPath: string, sourceMappingURLBase: string |
const
patchFilesStream
=
filesStream
.
pipe
(
packageJsonFilter
)
.
pipe
(
buffer
())
.
pipe
(
json
(
data
=>
{
.
pipe
(
json
(
(
data
:
any
)
=>
{
// hardcoded entry point directory!
data
.
main
=
data
.
main
.
replace
(
'
/out/
'
,
/dist/
);
return
data
;
...
...
@@ -89,7 +89,7 @@ function fromLocalWebpack(extensionPath: string, sourceMappingURLBase: string |
const
webpackStreams
=
webpackConfigLocations
.
map
(
webpackConfigPath
=>
{
const
webpackDone
=
(
err
,
stats
)
=>
{
const
webpackDone
=
(
err
:
any
,
stats
:
any
)
=>
{
util
.
log
(
`Bundled extension:
${
util
.
colors
.
yellow
(
path
.
join
(
path
.
basename
(
extensionPath
),
path
.
relative
(
extensionPath
,
webpackConfigPath
)))}
...`
);
if
(
err
)
{
result
.
emit
(
'
error
'
,
err
);
...
...
@@ -205,7 +205,7 @@ export function fromMarketplace(extensionName: string, version: string, metadata
return
remote
(
''
,
options
)
.
pipe
(
vzip
.
src
())
.
pipe
(
filter
(
'
extension/**
'
))
.
pipe
(
rename
(
p
=>
p
.
dirname
=
p
.
dirname
.
replace
(
/^extension
\/?
/
,
''
)))
.
pipe
(
rename
(
p
=>
p
.
dirname
=
p
.
dirname
!
.
replace
(
/^extension
\/?
/
,
''
)))
.
pipe
(
packageJsonFilter
)
.
pipe
(
buffer
())
.
pipe
(
json
({
__metadata
:
metadata
}))
...
...
build/lib/i18n.js
浏览文件 @
ac737307
...
...
@@ -957,7 +957,7 @@ function pullXlfFiles(apiHostname, username, password, language, resources) {
var
credentials
=
username
+
"
:
"
+
password
;
var
expectedTranslationsCount
=
resources
.
length
;
var
translationsRetrieved
=
0
,
called
=
false
;
return
event_stream_1
.
readable
(
function
(
count
,
callback
)
{
return
event_stream_1
.
readable
(
function
(
_
count
,
callback
)
{
// Mark end of stream when all resources were retrieved
if
(
translationsRetrieved
===
expectedTranslationsCount
)
{
return
this
.
emit
(
'
end
'
);
...
...
build/lib/i18n.ts
浏览文件 @
ac737307
...
...
@@ -289,14 +289,14 @@ export class XLF {
return
new
Promise
((
resolve
,
reject
)
=>
{
let
parser
=
new
xml2js
.
Parser
();
let
files
:
{
messages
:
Map
<
string
>
,
originalFilePath
:
string
,
language
:
string
}[]
=
[];
parser
.
parseString
(
xlfString
,
function
(
err
,
result
)
{
parser
.
parseString
(
xlfString
,
function
(
err
:
any
,
result
:
any
)
{
const
fileNodes
:
any
[]
=
result
[
'
xliff
'
][
'
file
'
];
fileNodes
.
forEach
(
file
=>
{
const
originalFilePath
=
file
.
$
.
original
;
const
messages
:
Map
<
string
>
=
{};
const
transUnits
=
file
.
body
[
0
][
'
trans-unit
'
];
if
(
transUnits
)
{
transUnits
.
forEach
(
unit
=>
{
transUnits
.
forEach
(
(
unit
:
any
)
=>
{
const
key
=
unit
.
$
.
id
;
const
val
=
pseudify
(
unit
.
source
[
0
][
'
_
'
].
toString
());
if
(
key
&&
val
)
{
...
...
@@ -317,7 +317,7 @@ export class XLF {
let
files
:
{
messages
:
Map
<
string
>
,
originalFilePath
:
string
,
language
:
string
}[]
=
[];
parser
.
parseString
(
xlfString
,
function
(
err
,
result
)
{
parser
.
parseString
(
xlfString
,
function
(
err
:
any
,
result
:
any
)
{
if
(
err
)
{
reject
(
new
Error
(
`XLF parsing error: Failed to parse XLIFF string.
${
err
}
`
));
}
...
...
@@ -340,7 +340,7 @@ export class XLF {
const
transUnits
=
file
.
body
[
0
][
'
trans-unit
'
];
if
(
transUnits
)
{
transUnits
.
forEach
(
unit
=>
{
transUnits
.
forEach
(
(
unit
:
any
)
=>
{
const
key
=
unit
.
$
.
id
;
if
(
!
unit
.
target
)
{
return
;
// No translation available
...
...
@@ -1077,7 +1077,7 @@ function pullXlfFiles(apiHostname: string, username: string, password: string, l
let
expectedTranslationsCount
=
resources
.
length
;
let
translationsRetrieved
=
0
,
called
=
false
;
return
readable
(
function
(
count
,
callback
)
{
return
readable
(
function
(
_count
:
any
,
callback
:
any
)
{
// Mark end of stream when all resources were retrieved
if
(
translationsRetrieved
===
expectedTranslationsCount
)
{
return
this
.
emit
(
'
end
'
);
...
...
@@ -1101,7 +1101,7 @@ function pullXlfFiles(apiHostname: string, username: string, password: string, l
}
const
limiter
=
new
Limiter
<
File
|
null
>
(
NUMBER_OF_CONCURRENT_DOWNLOADS
);
function
retrieveResource
(
language
:
Language
,
resource
:
Resource
,
apiHostname
,
credentials
):
Promise
<
File
|
null
>
{
function
retrieveResource
(
language
:
Language
,
resource
:
Resource
,
apiHostname
:
string
,
credentials
:
string
):
Promise
<
File
|
null
>
{
return
limiter
.
queue
(()
=>
new
Promise
<
File
|
null
>
((
resolve
,
reject
)
=>
{
const
slug
=
resource
.
name
.
replace
(
/
\/
/g
,
'
_
'
);
const
project
=
resource
.
project
;
...
...
build/lib/optimize.js
浏览文件 @
ac737307
...
...
@@ -181,7 +181,7 @@ exports.optimizeTask = optimizeTask;
*/
function
uglifyWithCopyrights
()
{
var
preserveComments
=
function
(
f
)
{
return
function
(
node
,
comment
)
{
return
function
(
_
node
,
comment
)
{
var
text
=
comment
.
value
;
var
type
=
comment
.
type
;
if
(
/@minifier_do_not_preserve/
.
test
(
text
))
{
...
...
build/lib/optimize.ts
浏览文件 @
ac737307
...
...
@@ -32,7 +32,7 @@ function log(prefix: string, message: string): void {
}
export
function
loaderConfig
(
emptyPaths
?:
string
[])
{
const
result
=
{
const
result
:
any
=
{
paths
:
{
'
vs
'
:
'
out-build/vs
'
,
'
vscode
'
:
'
empty:
'
...
...
@@ -258,7 +258,7 @@ declare class FileWithCopyright extends VinylFile {
*/
function
uglifyWithCopyrights
():
NodeJS
.
ReadWriteStream
{
const
preserveComments
=
(
f
:
FileWithCopyright
)
=>
{
return
(
node
,
comment
:
{
value
:
string
;
type
:
string
;
})
=>
{
return
(
_node
:
any
,
comment
:
{
value
:
string
;
type
:
string
;
})
=>
{
const
text
=
comment
.
value
;
const
type
=
comment
.
type
;
...
...
@@ -286,7 +286,7 @@ function uglifyWithCopyrights(): NodeJS.ReadWriteStream {
};
};
const
minify
=
composer
(
uglifyes
);
const
minify
=
(
composer
as
any
)
(
uglifyes
);
const
input
=
es
.
through
();
const
output
=
input
.
pipe
(
flatmap
((
stream
,
f
)
=>
{
...
...
@@ -325,7 +325,7 @@ export function minifyTask(src: string, sourceMapBaseUrl?: string): (cb: any) =>
}),
gulp
.
dest
(
src
+
'
-min
'
)
,
(
err
:
any
)
=>
{
if
(
err
instanceof
uglify
.
GulpUglifyError
)
{
if
(
err
instanceof
(
uglify
as
any
)
.
GulpUglifyError
)
{
console
.
error
(
`Uglify error in '
${
err
.
cause
&&
err
.
cause
.
filename
}
'`
);
}
...
...
build/lib/stats.ts
浏览文件 @
ac737307
...
...
@@ -99,8 +99,8 @@ export function submitAllStats(productJson: any, commit: string): Promise<boolea
return
new
Promise
(
resolve
=>
{
try
{
const
sizes
=
{};
const
counts
=
{};
const
sizes
:
any
=
{};
const
counts
:
any
=
{};
for
(
const
entry
of
sorted
)
{
sizes
[
entry
.
name
]
=
entry
.
totalSize
;
counts
[
entry
.
name
]
=
entry
.
totalCount
;
...
...
build/lib/tslint/translationRemindRule.ts
浏览文件 @
ac737307
...
...
@@ -59,7 +59,7 @@ class TranslationRemindRuleWalker extends Lint.RuleWalker {
}
const
workbenchResources
=
JSON
.
parse
(
json
).
workbench
;
workbenchResources
.
forEach
(
existingResource
=>
{
workbenchResources
.
forEach
(
(
existingResource
:
any
)
=>
{
if
(
existingResource
.
name
===
resource
)
{
resourceDefined
=
true
;
return
;
...
...
build/lib/typings/event-stream.d.ts
浏览文件 @
ac737307
declare
module
"
event-stream
"
{
import
{
Stream
}
from
'
stream
'
;
import
{
ThroughStream
as
_ThroughStream
}
from
'
through
'
;
import
{
MapStream
}
from
'
map-stream
'
;
import
*
as
File
from
'
vinyl
'
;
export
interface
ThroughStream
extends
_ThroughStream
{
queue
(
data
:
File
|
null
);
push
(
data
:
File
|
null
);
queue
(
data
:
File
|
null
)
:
any
;
push
(
data
:
File
|
null
)
:
any
;
paused
:
boolean
;
}
...
...
@@ -24,5 +23,5 @@ declare module "event-stream" {
function
mapSync
<
I
,
O
>
(
cb
:
(
data
:
I
)
=>
O
):
ThroughStream
;
function
map
<
I
,
O
>
(
cb
:
(
data
:
I
,
cb
:(
err
?:
Error
,
data
?:
O
)
=>
void
)
=>
O
):
ThroughStream
;
function
readable
(
asyncFunction
:
Function
):
MapStream
;
function
readable
(
asyncFunction
:
Function
):
any
;
}
\ No newline at end of file
build/lib/typings/github-releases.d.ts
0 → 100644
浏览文件 @
ac737307
declare
module
'
github-releases
'
{
}
\ No newline at end of file
build/lib/typings/minimatch.d.ts
已删除
100644 → 0
浏览文件 @
a54e5f54
// Type definitions for Minimatch 2.0.8
// Project: https://github.com/isaacs/minimatch
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare
module
"
minimatch
"
{
function
M
(
target
:
string
,
pattern
:
string
,
options
?:
M
.
IOptions
):
boolean
;
namespace
M
{
function
match
(
list
:
string
[],
pattern
:
string
,
options
?:
IOptions
):
string
[];
function
filter
(
pattern
:
string
,
options
?:
IOptions
):
(
element
:
string
,
indexed
:
number
,
array
:
string
[])
=>
boolean
;
function
makeRe
(
pattern
:
string
,
options
?:
IOptions
):
RegExp
;
var
Minimatch
:
IMinimatchStatic
;
interface
IOptions
{
debug
?:
boolean
;
nobrace
?:
boolean
;
noglobstar
?:
boolean
;
dot
?:
boolean
;
noext
?:
boolean
;
nocase
?:
boolean
;
nonull
?:
boolean
;
matchBase
?:
boolean
;
nocomment
?:
boolean
;
nonegate
?:
boolean
;
flipNegate
?:
boolean
;
}
interface
IMinimatchStatic
{
new
(
pattern
:
string
,
options
?:
IOptions
):
IMinimatch
;
prototype
:
IMinimatch
;
}
interface
IMinimatch
{
pattern
:
string
;
options
:
IOptions
;
/** 2-dimensional array of regexp or string expressions. */
set
:
any
[][];
// (RegExp | string)[][]
regexp
:
RegExp
;
negate
:
boolean
;
comment
:
boolean
;
empty
:
boolean
;
makeRe
():
RegExp
;
// regexp or boolean
match
(
fname
:
string
):
boolean
;
matchOne
(
files
:
string
[],
pattern
:
string
[],
partial
:
boolean
):
boolean
;
/** Deprecated. For internal use. */
debug
():
void
;
/** Deprecated. For internal use. */
make
():
void
;
/** Deprecated. For internal use. */
parseNegate
():
void
;
/** Deprecated. For internal use. */
braceExpand
(
pattern
:
string
,
options
:
IOptions
):
void
;
/** Deprecated. For internal use. */
parse
(
pattern
:
string
,
isSub
?:
boolean
):
void
;
}
}
export
=
M
;
}
\ No newline at end of file
build/lib/typings/rimraf.d.ts
已删除
100644 → 0
浏览文件 @
a54e5f54
// Type definitions for rimraf
// Project: https://github.com/isaacs/rimraf
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Imported from: https://github.com/soywiz/typescript-node-definitions/rimraf.d.ts
declare
module
"
rimraf
"
{
function
rimraf
(
path
:
string
,
callback
:
(
error
:
Error
)
=>
void
):
void
;
function
rimraf
(
path
:
string
,
opts
:{},
callback
:
(
error
:
Error
)
=>
void
):
void
;
namespace
rimraf
{
export
function
sync
(
path
:
string
):
void
;
export
var
EMFILE_MAX
:
number
;
export
var
BUSYTRIES_MAX
:
number
;
}
export
=
rimraf
;
}
\ No newline at end of file
build/lib/util.ts
浏览文件 @
ac737307
...
...
@@ -36,7 +36,7 @@ export function incremental(streamProvider: IStreamProvider, initial: NodeJS.Rea
const
token
:
ICancellationToken
|
undefined
=
!
supportsCancellation
?
undefined
:
{
isCancellationRequested
:
()
=>
Object
.
keys
(
buffer
).
length
>
0
};
const
run
=
(
input
,
isCancellable
)
=>
{
const
run
=
(
input
:
NodeJS
.
ReadWriteStream
,
isCancellable
:
boolean
)
=>
{
state
=
'
running
'
;
const
stream
=
!
supportsCancellation
?
streamProvider
()
:
streamProvider
(
isCancellable
?
token
:
NoCancellationToken
);
...
...
@@ -220,7 +220,7 @@ export function stripSourceMappingURL(): NodeJS.ReadWriteStream {
export
function
rimraf
(
dir
:
string
):
(
cb
:
any
)
=>
void
{
let
retries
=
0
;
const
retry
=
cb
=>
{
const
retry
=
(
cb
:
(
err
?:
any
)
=>
void
)
=>
{
_rimraf
(
dir
,
{
maxBusyTries
:
1
},
(
err
:
any
)
=>
{
if
(
!
err
)
{
return
cb
();
...
...
build/package.json
浏览文件 @
ac737307
...
...
@@ -6,18 +6,24 @@
"@types/documentdb"
:
"1.10.2"
,
"@types/es6-collections"
:
"0.5.31"
,
"@types/es6-promise"
:
"0.0.33"
,
"@types/glob"
:
"^7.1.1"
,
"@types/gulp-json-editor"
:
"^2.2.31"
,
"@types/gulp-uglify"
:
"^3.0.5"
,
"@types/mime"
:
"0.0.29"
,
"@types/minimatch"
:
"^2.0.29"
,
"@types/node"
:
"8.0.33"
,
"@types/xml2js"
:
"0.0.33"
,
"@types/request"
:
"^2.47.0"
,
"@types/rimraf"
:
"^2.0.2"
,
"@types/uglify-es"
:
"^3.0.0"
,
"@types/xml2js"
:
"0.0.33"
,
"azure-storage"
:
"^2.1.0"
,
"documentdb"
:
"1.13.0"
,
"github-releases"
:
"^0.4.1"
,
"mime"
:
"^1.3.4"
,
"minimist"
:
"^1.2.0"
,
"request"
:
"^2.85.0"
,
"typescript"
:
"3.1.1"
,
"xml2js"
:
"^0.4.17"
,
"github-releases"
:
"^0.4.1"
,
"request"
:
"^2.85.0"
"xml2js"
:
"^0.4.17"
},
"scripts"
:
{
"compile"
:
"tsc -p tsconfig.build.json"
,
...
...
build/tfs/common/symbols.ts
浏览文件 @
ac737307
...
...
@@ -107,17 +107,17 @@ function asyncRequest<T>(options: request.UrlOptions & request.CoreOptions): Pro
});
}
function
downloadAsset
(
repository
,
assetName
:
string
,
targetPath
:
string
,
electronVersion
:
string
)
{
function
downloadAsset
(
repository
:
any
,
assetName
:
string
,
targetPath
:
string
,
electronVersion
:
string
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
repository
.
getReleases
({
tag_name
:
`v
${
electronVersion
}
`
},
(
err
,
releases
)
=>
{
repository
.
getReleases
({
tag_name
:
`v
${
electronVersion
}
`
},
(
err
:
any
,
releases
:
any
)
=>
{
if
(
err
)
{
reject
(
err
);
}
else
{
const
asset
=
releases
[
0
].
assets
.
filter
(
asset
=>
asset
.
name
===
assetName
)[
0
];
const
asset
=
releases
[
0
].
assets
.
filter
(
(
asset
:
any
)
=>
asset
.
name
===
assetName
)[
0
];
if
(
!
asset
)
{
reject
(
new
Error
(
`Asset with name
${
assetName
}
not found`
));
}
else
{
repository
.
downloadAsset
(
asset
,
(
err
,
reader
)
=>
{
repository
.
downloadAsset
(
asset
,
(
err
:
any
,
reader
:
any
)
=>
{
if
(
err
)
{
reject
(
err
);
}
else
{
...
...
@@ -156,7 +156,7 @@ async function ensureVersionAndSymbols(options: IOptions) {
const
symbolsName
=
symbolsZipName
(
options
.
platform
,
options
.
versions
.
electron
,
options
.
versions
.
insiders
);
const
symbolsPath
=
await
tmpFile
(
'
symbols.zip
'
);
console
.
log
(
`HockeyApp: downloading symbols
${
symbolsName
}
for electron
${
options
.
versions
.
electron
}
(
${
options
.
platform
}
) into
${
symbolsPath
}
`
);
await
downloadAsset
(
new
github
({
repo
:
options
.
repository
,
token
:
options
.
access
.
githubToken
}),
symbolsName
,
symbolsPath
,
options
.
versions
.
electron
);
await
downloadAsset
(
new
(
github
as
any
)
({
repo
:
options
.
repository
,
token
:
options
.
access
.
githubToken
}),
symbolsName
,
symbolsPath
,
options
.
versions
.
electron
);
// Create version
console
.
log
(
`HockeyApp: creating new version
${
options
.
versions
.
code
}
(
${
options
.
platform
}
)`
);
...
...
build/tsconfig.json
浏览文件 @
ac737307
...
...
@@ -2,7 +2,7 @@
"compilerOptions"
:
{
"target"
:
"es5"
,
"module"
:
"commonjs"
,
"noImplicitAny"
:
fals
e
,
"noImplicitAny"
:
tru
e
,
"removeComments"
:
false
,
"preserveConstEnums"
:
true
,
"sourceMap"
:
false
,
...
...
build/yarn.lock
浏览文件 @
ac737307
...
...
@@ -31,6 +31,11 @@
resolved "https://registry.yarnpkg.com/@types/es6-promise/-/es6-promise-0.0.33.tgz#280a707e62b1b6bef1a86cc0861ec63cd06c7ff3"
integrity sha512-HKJFVLCGrWQ/1unEw8JdaTxu6n3EUxmwTxJ6D0O1x0gD8joCsgoTWxEgevb7fp2XIogNjof3KEd+3bJoGne/nw==
"@types/events@*":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86"
integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==
"@types/form-data@*":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e"
...
...
@@ -38,11 +43,51 @@
dependencies:
"@types/node" "*"
"@types/glob@*", "@types/glob@^7.1.1":
version "7.1.1"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575"
integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==
dependencies:
"@types/events" "*"
"@types/minimatch" "*"
"@types/node" "*"
"@types/gulp-json-editor@^2.2.31":
version "2.2.31"
resolved "https://registry.yarnpkg.com/@types/gulp-json-editor/-/gulp-json-editor-2.2.31.tgz#3c1a8950556c109a0e2d0ab11d5f2a2443665ed2"
integrity sha512-piis0ImYAy0dt18R4EtTbAY+RV8jwTq5VisnUV6OfP8kD4743aHGkAdAd08No4NY3rFa5mD6ytIu8L0YU7nL9w==
dependencies:
"@types/js-beautify" "*"
"@types/node" "*"
"@types/gulp-uglify@^3.0.5":
version "3.0.5"
resolved "https://registry.yarnpkg.com/@types/gulp-uglify/-/gulp-uglify-3.0.5.tgz#ddcbbb6bd15a84b8a6c5e2218c2efba98102d135"
integrity sha512-LD2b6gCPugrKI1W188nIp0gm+cAnGGwaTFpPdeZYVXwPHdoCQloy3du0JR62MeMjAwUwlcOb+SKYT6Qgw7yBiA==
dependencies:
"@types/node" "*"
"@types/uglify-js" "^2"
"@types/js-beautify@*":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@types/js-beautify/-/js-beautify-1.8.0.tgz#0369d3d0e1f35a6aec07cb4da2ee2bcda111367c"
integrity sha512-/siF86XrwDKLuHe8l7h6NhrAWgLdgqbxmjZv9NvGWmgYRZoTipkjKiWb0SQHy/jcR+ee0GvbG6uGd+LEBMGNvA==
"@types/mime@0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-0.0.29.tgz#fbcfd330573b912ef59eeee14602bface630754b"
integrity sha1-+8/TMFc7kS71nu7hRgK/rOYwdUs=
"@types/minimatch@*":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
"@types/minimatch@^2.0.29":
version "2.0.29"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
integrity sha1-UALhT3Xi1x5WQoHfBDHIwbSio2o=
"@types/node@*":
version "8.0.51"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb"
...
...
@@ -63,11 +108,40 @@
"@types/node" "*"
"@types/tough-cookie" "*"
"@types/rimraf@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e"
integrity sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ==
dependencies:
"@types/glob" "*"
"@types/node" "*"
"@types/tough-cookie@*":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.2.tgz#e0d481d8bb282ad8a8c9e100ceb72c995fb5e709"
integrity sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA==
"@types/uglify-es@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/uglify-es/-/uglify-es-3.0.0.tgz#2c5e70b43c0e86643ac1c223f61df15fa0b87bc2"
integrity sha512-Oc/c7pGIQL0MVhC6g+VftWiDQethKsT4c3fQKYm6nOprkvkx9s1MLrnJprDTKlZL3ZJulMpCF9Qn7s6u3uCNxQ==
dependencies:
"@types/uglify-js" "*"
"@types/uglify-js@*":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.3.tgz#801a5ca1dc642861f47c46d14b700ed2d610840b"
integrity sha512-MAT0BW2ruO0LhQKjvlipLGCF/Yx0y/cj+tT67tK3QIQDrM2+9R78HgJ54VlrE8AbfjYJJBCQCEPM5ZblPVTuww==
dependencies:
source-map "^0.6.1"
"@types/uglify-js@^2":
version "2.6.31"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-2.6.31.tgz#c694755eeb6a1bb9f8f321f3ec37cc22ca4c4f6b"
integrity sha512-LjcyGt6CHsgZ0AoofnMwhyxo9hUqz2mgl6IcF+S8B1zdSTxHAvTO/1RPvBAHG3C1ZeAc+AoWA5mb3lDJKtM9Zg==
dependencies:
source-map "^0.6.1"
"@types/xml2js@0.0.33":
version "0.0.33"
resolved "https://registry.yarnpkg.com/@types/xml2js/-/xml2js-0.0.33.tgz#20c5dd6460245284d64a55690015b95e409fb7de"
...
...
@@ -714,6 +788,11 @@ sntp@2.x.x:
dependencies:
hoek "4.x.x"
source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
sshpk@^1.7.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录