@sanity/pkg-utils 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browserslist.js +15 -0
- package/dist/_chunks/{build-f39a3550.js → build-bcb33ba5.js} +19 -19
- package/dist/_chunks/build-bcb33ba5.js.map +1 -0
- package/dist/_chunks/{buildAction-8f449d1d.js → buildAction-f240dab8.js} +6 -6
- package/dist/_chunks/buildAction-f240dab8.js.map +1 -0
- package/dist/_chunks/{check-87cbb6cc.js → check-1ea361f5.js} +26 -26
- package/dist/_chunks/check-1ea361f5.js.map +1 -0
- package/dist/_chunks/{checkAction-e7e455d4.js → checkAction-16be1201.js} +5 -5
- package/dist/_chunks/checkAction-16be1201.js.map +1 -0
- package/dist/_chunks/{_handleError-869dec25.js → handleError-65cf3242.js} +3 -3
- package/dist/_chunks/handleError-65cf3242.js.map +1 -0
- package/dist/_chunks/{index-7a851efa.js → index-79fdb33f.js} +63 -63
- package/dist/_chunks/index-79fdb33f.js.map +1 -0
- package/dist/_chunks/{_resolveBuildContext-7ca7e64e.js → resolveBuildContext-f2feec19.js} +60 -62
- package/dist/_chunks/resolveBuildContext-f2feec19.js.map +1 -0
- package/dist/_chunks/{watch-f6cf9246.js → watch-02c85f8a.js} +25 -25
- package/dist/_chunks/watch-02c85f8a.js.map +1 -0
- package/dist/_chunks/{watchAction-4cf253a0.js → watchAction-9cb9681b.js} +6 -6
- package/dist/_chunks/watchAction-9cb9681b.js.map +1 -0
- package/dist/cli.js +4 -4
- package/dist/index.d.ts +44 -46
- package/dist/index.esm.js +165 -167
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +22 -22
- package/dist/index.js.map +1 -1
- package/package.json +49 -1
- package/src/cli/buildAction.ts +2 -2
- package/src/cli/checkAction.ts +2 -2
- package/src/cli/{_handleError.ts → handleError.ts} +1 -1
- package/src/cli/watchAction.ts +2 -2
- package/src/node/build.ts +11 -11
- package/src/node/check.ts +11 -11
- package/src/node/{_core → core}/config/defineConfig.ts +0 -0
- package/src/node/{_core/config/_findConfigFile.ts → core/config/findConfigFile.ts} +3 -3
- package/src/node/core/config/index.ts +4 -0
- package/src/node/{_core/config/_loadConfig.ts → core/config/loadConfig.ts} +3 -3
- package/src/node/{_core/config/_resolveConfigProperty.ts → core/config/resolveConfigProperty.ts} +1 -1
- package/src/node/{_core → core}/config/types.ts +0 -0
- package/src/node/{_core/_constants.ts → core/constants.ts} +1 -1
- package/src/node/{_core → core}/contexts/buildContext.ts +5 -5
- package/src/node/{_core → core}/contexts/index.ts +0 -0
- package/src/node/core/defaults.ts +7 -0
- package/src/node/core/findCommonPath.test.ts +9 -0
- package/src/node/{_core/_findCommonPath.ts → core/findCommonPath.ts} +3 -3
- package/src/node/{_core → core}/index.ts +3 -3
- package/src/node/{_core/_isRecord.ts → core/isRecord.ts} +1 -1
- package/src/node/core/pkg/index.ts +4 -0
- package/src/node/{_core/pkg/_loadPkg.ts → core/pkg/loadPkg.ts} +4 -4
- package/src/node/{_core/pkg/_loadPkgWithReporting.ts → core/pkg/loadPkgWithReporting.ts} +6 -6
- package/src/node/{_core/pkg/_parseExports.ts → core/pkg/parseExports.ts} +7 -7
- package/src/node/{_core/pkg/_types.ts → core/pkg/types.ts} +1 -1
- package/src/node/{_core/pkg/_validateExports.ts → core/pkg/validateExports.ts} +5 -5
- package/src/node/{_core/pkg/_validatePkg.ts → core/pkg/validatePkg.ts} +2 -2
- package/src/node/core/ts/index.ts +1 -0
- package/src/node/{_core/ts/_loadTSConfig.ts → core/ts/loadTSConfig.ts} +1 -1
- package/src/node/{_getFilesize.ts → getFilesize.ts} +1 -1
- package/src/node/globFiles.ts +5 -0
- package/src/node/index.ts +3 -3
- package/src/node/{_printExtractMessages.ts → printExtractMessages.ts} +2 -2
- package/src/node/{_printPackageTree.ts → printPackageTree.ts} +17 -17
- package/src/node/{_resolveBrowserTarget.ts → resolveBrowserTarget.ts} +2 -2
- package/src/node/{_resolveBrowserslistVersions.ts → resolveBrowserslistVersions.ts} +11 -11
- package/src/node/{_resolveBuildContext.ts → resolveBuildContext.ts} +28 -28
- package/src/node/{_resolveBuildTasks.ts → resolveBuildTasks.ts} +13 -13
- package/src/node/{_resolveNodeTarget.ts → resolveNodeTarget.ts} +2 -2
- package/src/node/{_resolveWatchTasks.ts → resolveWatchTasks.ts} +11 -11
- package/src/node/{_spinner.ts → spinner.ts} +1 -1
- package/src/node/{_tasks/dts/_DtsError.ts → tasks/dts/DtsError.ts} +1 -1
- package/src/node/{_tasks/dts/_buildTypes.ts → tasks/dts/buildTypes.ts} +1 -1
- package/src/node/{_tasks/dts/_createApiExtractorConfig.ts → tasks/dts/createApiExtractorConfig.ts} +1 -1
- package/src/node/{_tasks/dts/_createTSDocConfig.ts → tasks/dts/createTSDocConfig.ts} +1 -1
- package/src/node/{_tasks/dts/_doExtract.ts → tasks/dts/doExtract.ts} +12 -12
- package/src/node/{_tasks/dts/_dtsTask.ts → tasks/dts/dtsTask.ts} +10 -10
- package/src/node/{_tasks/dts/_dtsWatchTask.ts → tasks/dts/dtsWatchTask.ts} +10 -10
- package/src/node/{_tasks/dts/_extractModuleBlocks.ts → tasks/dts/extractModuleBlocks.ts} +3 -3
- package/src/node/{_tasks/dts/_extractTypes.ts → tasks/dts/extractTypes.ts} +11 -11
- package/src/node/{_tasks/dts/_getExtractMessagesConfig.ts → tasks/dts/getExtractMessagesConfig.ts} +12 -12
- package/src/node/tasks/dts/index.ts +4 -0
- package/src/node/{_tasks/dts/_types.ts → tasks/dts/types.ts} +3 -3
- package/src/node/tasks/index.ts +19 -0
- package/src/node/tasks/rollup/index.ts +2 -0
- package/src/node/{_tasks/rollup/_resolveRollupConfig.ts → tasks/rollup/resolveRollupConfig.ts} +16 -11
- package/src/node/{_tasks/rollup/_rollupTask.ts → tasks/rollup/rollupTask.ts} +7 -7
- package/src/node/{_tasks/rollup/_rollupWatchTask.ts → tasks/rollup/rollupWatchTask.ts} +4 -4
- package/src/node/tasks/types.ts +57 -0
- package/src/node/watch.ts +13 -13
- package/src/node/{_watchConfigFiles.ts → watchConfigFiles.ts} +5 -5
- package/src/node/{_watchFiles.ts → watchFiles.ts} +5 -5
- package/dist/_chunks/_handleError-869dec25.js.map +0 -1
- package/dist/_chunks/_resolveBuildContext-7ca7e64e.js.map +0 -1
- package/dist/_chunks/build-f39a3550.js.map +0 -1
- package/dist/_chunks/buildAction-8f449d1d.js.map +0 -1
- package/dist/_chunks/check-87cbb6cc.js.map +0 -1
- package/dist/_chunks/checkAction-e7e455d4.js.map +0 -1
- package/dist/_chunks/index-7a851efa.js.map +0 -1
- package/dist/_chunks/watch-f6cf9246.js.map +0 -1
- package/dist/_chunks/watchAction-4cf253a0.js.map +0 -1
- package/src/node/_core/_defaults.ts +0 -9
- package/src/node/_core/_findCommonPath.test.ts +0 -9
- package/src/node/_core/config/index.ts +0 -4
- package/src/node/_core/pkg/index.ts +0 -4
- package/src/node/_core/ts/index.ts +0 -1
- package/src/node/_globFiles.ts +0 -5
- package/src/node/_tasks/_types.ts +0 -57
- package/src/node/_tasks/dts/index.ts +0 -4
- package/src/node/_tasks/index.ts +0 -19
- package/src/node/_tasks/rollup/index.ts +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var watch = require('./watch-
|
|
4
|
-
var
|
|
3
|
+
var watch = require('./watch-02c85f8a.js');
|
|
4
|
+
var handleError = require('./handleError-65cf3242.js');
|
|
5
5
|
require('path');
|
|
6
6
|
require('rxjs');
|
|
7
|
-
require('./
|
|
7
|
+
require('./resolveBuildContext-f2feec19.js');
|
|
8
8
|
require('esbuild-register/dist/node');
|
|
9
9
|
require('pkg-up');
|
|
10
10
|
require('fs/promises');
|
|
@@ -14,7 +14,7 @@ require('zod');
|
|
|
14
14
|
require('typescript');
|
|
15
15
|
require('browserslist');
|
|
16
16
|
require('fs');
|
|
17
|
-
require('./index-
|
|
17
|
+
require('./index-79fdb33f.js');
|
|
18
18
|
require('util');
|
|
19
19
|
require('rimraf');
|
|
20
20
|
require('@microsoft/api-extractor');
|
|
@@ -44,8 +44,8 @@ async function watchAction(options) {
|
|
|
44
44
|
tsconfig: options.tsconfig
|
|
45
45
|
});
|
|
46
46
|
} catch (err) {
|
|
47
|
-
|
|
47
|
+
handleError.handleError(err);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
exports.watchAction = watchAction;
|
|
51
|
-
//# sourceMappingURL=watchAction-
|
|
51
|
+
//# sourceMappingURL=watchAction-9cb9681b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watchAction-9cb9681b.js","sources":["../../src/cli/watchAction.ts"],"sourcesContent":["import {watch} from '../node/watch'\nimport {handleError} from './handleError'\n\nexport async function watchAction(options: {strict?: boolean; tsconfig?: string}): Promise<void> {\n try {\n await watch({\n cwd: process.cwd(),\n strict: options.strict,\n tsconfig: options.tsconfig,\n })\n } catch (err) {\n handleError(err)\n }\n}\n"],"names":["watchAction","options","watch","cwd","process","strict","tsconfig","err","handleError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,eAAeA,WAAW,CAACC,OAAO,EAAE;EACzC,IAAI;IACF,MAAMC,WAAK,CAAC;MACVC,GAAG,EAAEC,OAAO,CAACD,GAAG,EAAE;MAClBE,MAAM,EAAEJ,OAAO,CAACI,MAAM;MACtBC,QAAQ,EAAEL,OAAO,CAACK;IACxB,CAAK,CAAC;EACH,CAAA,CAAC,OAAOC,GAAG,EAAE;IACZC,WAAW,CAAAA,WAAA,CAACD,GAAG,CAAC;EACjB;AACH;"}
|
package/dist/cli.js
CHANGED
|
@@ -7,13 +7,13 @@ function _interopDefaultLegacy(e) {
|
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
var cac__default = /*#__PURE__*/_interopDefaultLegacy(cac);
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.20.0";
|
|
11
11
|
const cli = cac__default["default"]();
|
|
12
12
|
cli.command("", "Check").option("--strict", "Strict mode").option("--tsconfig [tsconfig]", "[string] tsconfig.json").action(async options => {
|
|
13
13
|
const {
|
|
14
14
|
checkAction: statusAction
|
|
15
15
|
} = await Promise.resolve().then(function () {
|
|
16
|
-
return require('./_chunks/checkAction-
|
|
16
|
+
return require('./_chunks/checkAction-16be1201.js');
|
|
17
17
|
});
|
|
18
18
|
return statusAction(options);
|
|
19
19
|
});
|
|
@@ -21,7 +21,7 @@ cli.command("build", "Build package").option("--emitDeclarationOnly", "Emit d.ts
|
|
|
21
21
|
const {
|
|
22
22
|
buildAction
|
|
23
23
|
} = await Promise.resolve().then(function () {
|
|
24
|
-
return require('./_chunks/buildAction-
|
|
24
|
+
return require('./_chunks/buildAction-f240dab8.js');
|
|
25
25
|
});
|
|
26
26
|
return buildAction(options);
|
|
27
27
|
});
|
|
@@ -29,7 +29,7 @@ cli.command("watch", "Watch package").option("--strict", "Strict mode").option("
|
|
|
29
29
|
const {
|
|
30
30
|
watchAction
|
|
31
31
|
} = await Promise.resolve().then(function () {
|
|
32
|
-
return require('./_chunks/watchAction-
|
|
32
|
+
return require('./_chunks/watchAction-9cb9681b.js');
|
|
33
33
|
});
|
|
34
34
|
return watchAction(options);
|
|
35
35
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -32,14 +32,14 @@ export declare function build(options: {
|
|
|
32
32
|
}): Promise<void>
|
|
33
33
|
|
|
34
34
|
/** @internal */
|
|
35
|
-
export declare interface
|
|
35
|
+
export declare interface BuildContext {
|
|
36
36
|
config?: PkgConfigOptions
|
|
37
37
|
cwd: string
|
|
38
38
|
distPath: string
|
|
39
39
|
emitDeclarationOnly: boolean
|
|
40
40
|
exports: PkgExports | undefined
|
|
41
41
|
external: string[]
|
|
42
|
-
files:
|
|
42
|
+
files: BuildFile[]
|
|
43
43
|
logger: {
|
|
44
44
|
log: (...args: unknown[]) => void
|
|
45
45
|
info: (...args: unknown[]) => void
|
|
@@ -47,7 +47,7 @@ export declare interface _BuildContext {
|
|
|
47
47
|
error: (...args: unknown[]) => void
|
|
48
48
|
success: (...args: unknown[]) => void
|
|
49
49
|
}
|
|
50
|
-
pkg:
|
|
50
|
+
pkg: PackageJSON
|
|
51
51
|
runtime: PkgRuntime
|
|
52
52
|
strict: boolean
|
|
53
53
|
target: Record<PkgRuntime, string[]>
|
|
@@ -58,22 +58,22 @@ export declare interface _BuildContext {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/** @internal */
|
|
61
|
-
export declare interface
|
|
61
|
+
export declare interface BuildFile {
|
|
62
62
|
type: 'asset' | 'chunk' | 'types'
|
|
63
63
|
path: string
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/** @internal */
|
|
67
|
-
export declare type
|
|
67
|
+
export declare type BuildTask = DtsTask | RollupTask
|
|
68
68
|
|
|
69
69
|
/** @internal */
|
|
70
|
-
export declare interface
|
|
71
|
-
'build:dts':
|
|
72
|
-
'build:js':
|
|
70
|
+
export declare interface BuildTaskHandlers {
|
|
71
|
+
'build:dts': TaskHandler<DtsTask, DtsResult>
|
|
72
|
+
'build:js': TaskHandler<RollupTask>
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/** @internal */
|
|
76
|
-
export declare const
|
|
76
|
+
export declare const buildTaskHandlers: BuildTaskHandlers
|
|
77
77
|
|
|
78
78
|
/** @public */
|
|
79
79
|
export declare function check(options: {
|
|
@@ -82,16 +82,14 @@ export declare function check(options: {
|
|
|
82
82
|
tsconfig?: string
|
|
83
83
|
}): Promise<void>
|
|
84
84
|
|
|
85
|
-
/** @
|
|
86
|
-
export declare const
|
|
87
|
-
browserslist: string[]
|
|
88
|
-
}
|
|
85
|
+
/** @public */
|
|
86
|
+
export declare const DEFAULT_BROWSERSLIST_QUERY: string[]
|
|
89
87
|
|
|
90
88
|
/** @public */
|
|
91
89
|
export declare function defineConfig(configOptions: PkgConfigOptions): PkgConfigOptions
|
|
92
90
|
|
|
93
91
|
/** @internal */
|
|
94
|
-
export declare interface
|
|
92
|
+
export declare interface DtsResult {
|
|
95
93
|
type: 'dts'
|
|
96
94
|
messages: ExtractorMessage[]
|
|
97
95
|
results: {
|
|
@@ -101,7 +99,7 @@ export declare interface _DtsResult {
|
|
|
101
99
|
}
|
|
102
100
|
|
|
103
101
|
/** @internal */
|
|
104
|
-
export declare interface
|
|
102
|
+
export declare interface DtsTask {
|
|
105
103
|
type: 'build:dts'
|
|
106
104
|
entries: {
|
|
107
105
|
exportPath: string
|
|
@@ -112,10 +110,10 @@ export declare interface _DtsTask {
|
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
/** @internal */
|
|
115
|
-
export declare const
|
|
113
|
+
export declare const dtsTask: TaskHandler<DtsTask, DtsResult>
|
|
116
114
|
|
|
117
115
|
/** @internal */
|
|
118
|
-
export declare interface
|
|
116
|
+
export declare interface DtsWatchTask {
|
|
119
117
|
type: 'watch:dts'
|
|
120
118
|
entries: {
|
|
121
119
|
exportPath: string
|
|
@@ -126,33 +124,33 @@ export declare interface _DtsWatchTask {
|
|
|
126
124
|
}
|
|
127
125
|
|
|
128
126
|
/** @internal */
|
|
129
|
-
export declare const
|
|
127
|
+
export declare const dtsWatchTask: TaskHandler<DtsWatchTask, DtsResult>
|
|
130
128
|
|
|
131
129
|
/** @internal */
|
|
132
|
-
export declare function
|
|
130
|
+
export declare function getExtractMessagesConfig(options: {
|
|
133
131
|
rules: NonNullable<PkgConfigOptions['extract']>['rules']
|
|
134
132
|
}): IExtractorMessagesConfig
|
|
135
133
|
|
|
136
134
|
/** @internal */
|
|
137
|
-
export declare function
|
|
135
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>
|
|
138
136
|
|
|
139
137
|
/** @internal */
|
|
140
|
-
export declare function
|
|
138
|
+
export declare function loadConfig(options: {cwd: string}): Promise<PkgConfigOptions | undefined>
|
|
141
139
|
|
|
142
140
|
/** @internal */
|
|
143
|
-
export declare function
|
|
141
|
+
export declare function loadPkg(options: {cwd: string}): Promise<PackageJSON>
|
|
144
142
|
|
|
145
143
|
/** @internal */
|
|
146
|
-
export declare function
|
|
144
|
+
export declare function loadPkgWithReporting(options: {cwd: string}): Promise<PackageJSON>
|
|
147
145
|
|
|
148
146
|
/** @internal */
|
|
149
|
-
export declare function
|
|
147
|
+
export declare function loadTSConfig(options: {
|
|
150
148
|
cwd: string
|
|
151
149
|
tsconfigPath: string
|
|
152
150
|
}): Promise<ts.ParsedCommandLine>
|
|
153
151
|
|
|
154
152
|
/** @internal */
|
|
155
|
-
export declare const
|
|
153
|
+
export declare const MODULE_EXT: Record<
|
|
156
154
|
'commonjs' | 'module',
|
|
157
155
|
{
|
|
158
156
|
commonjs: string
|
|
@@ -161,7 +159,7 @@ export declare const _MODULE_EXT: Record<
|
|
|
161
159
|
>
|
|
162
160
|
|
|
163
161
|
/** @internal */
|
|
164
|
-
export declare interface
|
|
162
|
+
export declare interface PackageJSON {
|
|
165
163
|
type: 'commonjs' | 'module'
|
|
166
164
|
version: string
|
|
167
165
|
private?: boolean
|
|
@@ -200,7 +198,7 @@ export declare interface _PackageJSON {
|
|
|
200
198
|
}
|
|
201
199
|
|
|
202
200
|
/** @internal */
|
|
203
|
-
export declare function
|
|
201
|
+
export declare function parseExports(options: {pkg: PackageJSON; strict: boolean}): (PkgExport & {
|
|
204
202
|
_path: string
|
|
205
203
|
})[]
|
|
206
204
|
|
|
@@ -317,10 +315,10 @@ export declare type PkgRuleLevel = 'error' | 'warn' | 'info' | 'off'
|
|
|
317
315
|
export declare type PkgRuntime = '*' | 'browser' | 'node'
|
|
318
316
|
|
|
319
317
|
/** @internal */
|
|
320
|
-
export declare function
|
|
318
|
+
export declare function resolveBuildTasks(ctx: BuildContext): BuildTask[]
|
|
321
319
|
|
|
322
320
|
/** @internal */
|
|
323
|
-
export declare function
|
|
321
|
+
export declare function resolveConfigProperty<T>(
|
|
324
322
|
prop: PkgConfigProperty<T> | undefined,
|
|
325
323
|
initialValue: T
|
|
326
324
|
): T
|
|
@@ -328,44 +326,44 @@ export declare function _resolveConfigProperty<T>(
|
|
|
328
326
|
export {RollupPlugin}
|
|
329
327
|
|
|
330
328
|
/** @internal */
|
|
331
|
-
export declare interface
|
|
329
|
+
export declare interface RollupTask {
|
|
332
330
|
type: 'build:js'
|
|
333
331
|
buildId: string
|
|
334
|
-
entries:
|
|
332
|
+
entries: RollupTaskEntry[]
|
|
335
333
|
runtime: PkgRuntime
|
|
336
334
|
format: 'commonjs' | 'esm'
|
|
337
335
|
target: string[]
|
|
338
336
|
}
|
|
339
337
|
|
|
340
338
|
/** @internal */
|
|
341
|
-
export declare const
|
|
339
|
+
export declare const rollupTask: TaskHandler<RollupTask>
|
|
342
340
|
|
|
343
341
|
/** @internal */
|
|
344
|
-
export declare interface
|
|
342
|
+
export declare interface RollupTaskEntry {
|
|
345
343
|
path: string
|
|
346
344
|
source: string
|
|
347
345
|
output: string
|
|
348
346
|
}
|
|
349
347
|
|
|
350
348
|
/** @internal */
|
|
351
|
-
export declare interface
|
|
349
|
+
export declare interface RollupWatchTask {
|
|
352
350
|
type: 'watch:js'
|
|
353
351
|
buildId: string
|
|
354
|
-
entries:
|
|
352
|
+
entries: RollupTaskEntry[]
|
|
355
353
|
runtime: PkgRuntime
|
|
356
354
|
format: 'commonjs' | 'esm'
|
|
357
355
|
target: string[]
|
|
358
356
|
}
|
|
359
357
|
|
|
360
358
|
/** @internal */
|
|
361
|
-
export declare const
|
|
359
|
+
export declare const rollupWatchTask: TaskHandler<RollupWatchTask, RollupWatcherEvent>
|
|
362
360
|
|
|
363
361
|
/** @internal */
|
|
364
|
-
export declare type
|
|
365
|
-
name: (ctx:
|
|
366
|
-
exec: (ctx:
|
|
367
|
-
complete: (ctx:
|
|
368
|
-
error: (ctx:
|
|
362
|
+
export declare type TaskHandler<Task, Result = void> = {
|
|
363
|
+
name: (ctx: BuildContext, task: Task) => string
|
|
364
|
+
exec: (ctx: BuildContext, task: Task) => Observable<Result>
|
|
365
|
+
complete: (ctx: BuildContext, task: Task, result: Result) => void
|
|
366
|
+
error: (ctx: BuildContext, task: Task, error: unknown) => void
|
|
369
367
|
}
|
|
370
368
|
|
|
371
369
|
/** @public */
|
|
@@ -383,15 +381,15 @@ export declare function watch(options: {
|
|
|
383
381
|
}): Promise<void>
|
|
384
382
|
|
|
385
383
|
/** @internal */
|
|
386
|
-
export declare type
|
|
384
|
+
export declare type WatchTask = DtsWatchTask | RollupWatchTask
|
|
387
385
|
|
|
388
386
|
/** @internal */
|
|
389
|
-
export declare interface
|
|
390
|
-
'watch:dts':
|
|
391
|
-
'watch:js':
|
|
387
|
+
export declare interface WatchTaskHandlers {
|
|
388
|
+
'watch:dts': TaskHandler<DtsWatchTask, DtsResult>
|
|
389
|
+
'watch:js': TaskHandler<RollupWatchTask, RollupWatcherEvent>
|
|
392
390
|
}
|
|
393
391
|
|
|
394
392
|
/** @internal */
|
|
395
|
-
export declare const
|
|
393
|
+
export declare const watchTaskHandlers: WatchTaskHandlers
|
|
396
394
|
|
|
397
395
|
export {}
|