@rindo/core 1.17.4 → 2.5.2

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.
Files changed (164) hide show
  1. package/LICENSE.md +27 -27
  2. package/bin/cli.ts +20 -0
  3. package/bin/rindo +51 -56
  4. package/cli/index.cjs +1263 -0
  5. package/cli/index.d.ts +1 -1
  6. package/cli/index.js +1232 -495
  7. package/cli/package.json +9 -4
  8. package/compiler/lib.d.ts +24 -0
  9. package/compiler/lib.dom.d.ts +20230 -0
  10. package/compiler/lib.dom.iterable.d.ts +351 -0
  11. package/compiler/lib.es2015.collection.d.ts +89 -0
  12. package/compiler/lib.es2015.core.d.ts +517 -0
  13. package/compiler/lib.es2015.d.ts +30 -0
  14. package/compiler/lib.es2015.generator.d.ts +79 -0
  15. package/compiler/lib.es2015.iterable.d.ts +505 -0
  16. package/compiler/lib.es2015.promise.d.ts +150 -0
  17. package/compiler/lib.es2015.proxy.d.ts +41 -0
  18. package/compiler/lib.es2015.reflect.d.ts +123 -0
  19. package/compiler/lib.es2015.symbol.d.ts +48 -0
  20. package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
  21. package/compiler/lib.es2016.array.include.d.ts +118 -0
  22. package/compiler/lib.es2016.d.ts +22 -0
  23. package/compiler/lib.es2016.full.d.ts +25 -0
  24. package/compiler/lib.es2017.d.ts +26 -0
  25. package/compiler/lib.es2017.full.d.ts +25 -0
  26. package/compiler/lib.es2017.intl.d.ts +32 -0
  27. package/compiler/lib.es2017.object.d.ts +51 -0
  28. package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
  29. package/compiler/lib.es2017.string.d.ts +47 -0
  30. package/compiler/lib.es2017.typedarrays.d.ts +55 -0
  31. package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
  32. package/compiler/lib.es2018.asynciterable.d.ts +45 -0
  33. package/compiler/lib.es2018.d.ts +26 -0
  34. package/compiler/lib.es2018.full.d.ts +25 -0
  35. package/compiler/lib.es2018.intl.d.ts +61 -0
  36. package/compiler/lib.es2018.promise.d.ts +32 -0
  37. package/compiler/lib.es2018.regexp.d.ts +39 -0
  38. package/compiler/lib.es2019.array.d.ts +85 -0
  39. package/compiler/lib.es2019.d.ts +25 -0
  40. package/compiler/lib.es2019.full.d.ts +25 -0
  41. package/compiler/lib.es2019.object.d.ts +35 -0
  42. package/compiler/lib.es2019.string.d.ts +33 -0
  43. package/compiler/lib.es2019.symbol.d.ts +26 -0
  44. package/compiler/lib.es2020.bigint.d.ts +728 -0
  45. package/compiler/lib.es2020.d.ts +27 -0
  46. package/compiler/lib.es2020.full.d.ts +25 -0
  47. package/compiler/lib.es2020.intl.d.ts +310 -0
  48. package/compiler/lib.es2020.promise.d.ts +50 -0
  49. package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
  50. package/compiler/lib.es2020.string.d.ts +30 -0
  51. package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
  52. package/compiler/lib.es5.d.ts +4435 -0
  53. package/compiler/lib.es6.d.ts +25 -0
  54. package/compiler/lib.esnext.d.ts +25 -0
  55. package/compiler/lib.esnext.full.d.ts +25 -0
  56. package/compiler/lib.esnext.intl.d.ts +32 -0
  57. package/compiler/lib.esnext.promise.d.ts +43 -0
  58. package/compiler/lib.esnext.string.d.ts +35 -0
  59. package/compiler/lib.esnext.weakref.d.ts +75 -0
  60. package/compiler/lib.scripthost.d.ts +327 -0
  61. package/compiler/lib.webworker.d.ts +6042 -0
  62. package/compiler/lib.webworker.importscripts.d.ts +26 -0
  63. package/compiler/lib.webworker.iterable.d.ts +166 -0
  64. package/compiler/package.json +3 -3
  65. package/compiler/rindo.d.ts +0 -16
  66. package/compiler/rindo.js +42738 -40541
  67. package/compiler/rindo.min.js +2 -15
  68. package/dependencies.json +73 -50
  69. package/dev-server/client/index.js +33 -10
  70. package/dev-server/client/package.json +3 -3
  71. package/dev-server/connector.html +3 -3
  72. package/dev-server/index.d.ts +3 -6
  73. package/dev-server/index.js +256 -252
  74. package/dev-server/package.json +3 -3
  75. package/dev-server/server-process.js +1738 -0
  76. package/dev-server/server-worker-thread.js +39 -0
  77. package/dev-server/templates/initial-load.html +160 -160
  78. package/dev-server/ws.js +1 -1
  79. package/internal/app-data/{index.cjs.js → index.cjs} +7 -5
  80. package/internal/app-data/index.d.ts +1 -0
  81. package/internal/app-data/index.js +7 -6
  82. package/internal/app-data/package.json +11 -5
  83. package/internal/client/css-shim.js +2 -2
  84. package/internal/client/dom.js +1 -1
  85. package/internal/client/index.js +193 -119
  86. package/internal/client/package.json +4 -3
  87. package/internal/client/{patch.js → patch-browser.js} +8 -24
  88. package/internal/client/patch-esm.js +23 -0
  89. package/internal/client/polyfills/css-shim.js +1 -1
  90. package/internal/client/polyfills/index.js +34 -34
  91. package/internal/client/shadow-css.js +9 -3
  92. package/internal/hydrate/index.js +305 -281
  93. package/internal/hydrate/package.json +2 -2
  94. package/internal/hydrate/runner.d.ts +24 -12
  95. package/internal/hydrate/runner.js +153 -124
  96. package/internal/hydrate/shadow-css.js +24 -24
  97. package/internal/package.json +5 -4
  98. package/internal/rindo-core/index.cjs +1 -0
  99. package/internal/rindo-core/index.d.ts +51 -2
  100. package/internal/rindo-core/index.js +15 -1
  101. package/internal/rindo-ext-modules.d.ts +41 -39
  102. package/internal/rindo-private.d.ts +93 -148
  103. package/internal/rindo-public-compiler.d.ts +231 -155
  104. package/internal/rindo-public-runtime.d.ts +42 -39
  105. package/internal/testing/index.js +144 -121
  106. package/internal/testing/package.json +2 -2
  107. package/internal/testing/shadow-css.js +24 -24
  108. package/mock-doc/index.cjs +4610 -0
  109. package/mock-doc/index.d.ts +12 -1
  110. package/mock-doc/index.js +177 -67
  111. package/mock-doc/package.json +11 -5
  112. package/package.json +132 -133
  113. package/readme.md +21 -95
  114. package/screenshot/compare/build/app.js +33 -33
  115. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
  116. package/screenshot/connector-base.d.ts +1 -1
  117. package/screenshot/connector-local.d.ts +1 -1
  118. package/screenshot/index.js +63 -46
  119. package/screenshot/package.json +10 -3
  120. package/screenshot/pixel-match.js +54 -57
  121. package/screenshot/screenshot-compare.d.ts +1 -1
  122. package/screenshot/screenshot-fs.d.ts +1 -1
  123. package/sys/deno/index.js +1785 -0
  124. package/sys/deno/node-compat.js +2654 -0
  125. package/sys/deno/worker.js +44 -0
  126. package/sys/node/autoprefixer.js +8 -1
  127. package/sys/node/glob.js +1 -1
  128. package/sys/node/graceful-fs.js +1 -1
  129. package/sys/node/index.d.ts +1 -1
  130. package/sys/node/index.js +689 -705
  131. package/sys/node/node-fetch.js +1 -1
  132. package/sys/node/package.json +3 -3
  133. package/sys/node/prompts.js +1 -1
  134. package/sys/node/worker.js +38 -19
  135. package/testing/index.d.ts +3 -3
  136. package/testing/index.js +863 -749
  137. package/testing/jest/jest-config.d.ts +2 -89
  138. package/testing/jest/jest-environment.d.ts +1 -1
  139. package/testing/jest/jest-runner.d.ts +1 -1
  140. package/testing/jest/jest-screenshot.d.ts +1 -1
  141. package/testing/jest-preset.js +32 -32
  142. package/testing/matchers/events.d.ts +1 -1
  143. package/testing/matchers/screenshot.d.ts +1 -1
  144. package/testing/mock-fetch.d.ts +1 -1
  145. package/testing/mocks.d.ts +1 -1
  146. package/testing/package.json +3 -3
  147. package/testing/puppeteer/index.d.ts +1 -1
  148. package/testing/puppeteer/puppeteer-browser.d.ts +2 -2
  149. package/testing/puppeteer/puppeteer-declarations.d.ts +11 -11
  150. package/testing/puppeteer/puppeteer-element.d.ts +3 -3
  151. package/testing/puppeteer/puppeteer-emulate.d.ts +1 -1
  152. package/testing/puppeteer/puppeteer-events.d.ts +3 -3
  153. package/testing/puppeteer/puppeteer-page.d.ts +1 -1
  154. package/testing/puppeteer/puppeteer-screenshot.d.ts +2 -2
  155. package/testing/reset-build-conditionals.d.ts +1 -1
  156. package/testing/spec-page.d.ts +1 -1
  157. package/testing/test-transpile.d.ts +1 -1
  158. package/testing/testing-logger.d.ts +1 -1
  159. package/testing/testing-utils.d.ts +1 -1
  160. package/testing/testing.d.ts +1 -1
  161. package/cli/index.cjs.js +0 -524
  162. package/dev-server/content-type-db.json +0 -1
  163. package/dev-server/server-worker.js +0 -1570
  164. package/mock-doc/index.cjs.js +0 -4500
@@ -1,5 +1,5 @@
1
- import { JsonDocs } from './rindo-public-docs';
2
- import { PrerenderUrlResults } from '../internal';
1
+ import type { JsonDocs } from './rindo-public-docs';
2
+ import type { PrerenderUrlResults } from '../internal';
3
3
  export * from './rindo-public-docs';
4
4
  /**
5
5
  * https://rindojs.web.app/docs/config/
@@ -11,10 +11,11 @@ export interface RindoConfig {
11
11
  */
12
12
  allowInlineScripts?: boolean;
13
13
  /**
14
- * By default, Rindo will use the appropriate config to automatically prefix css. For example,
15
- * developers can write modern and standard css properties, such as "transform", and Rindo
16
- * will automatically add in the prefixed version, such as "-webkit-transform". To disable
17
- * autoprefixing css, set this value to `false`.
14
+ * By setting `autoprefixCss` to `true`, Rindo will use the appropriate config to automatically
15
+ * prefix css. For example, developers can write modern and standard css properties, such as
16
+ * "transform", and Rindo will automatically add in the prefixed version, such as "-webkit-transform".
17
+ * As of Rindo v2, autoprefixing CSS is no longer the default.
18
+ * Defaults to `false`
18
19
  */
19
20
  autoprefixCss?: boolean | any;
20
21
  /**
@@ -31,34 +32,11 @@ export interface RindoConfig {
31
32
  * This config is rarely needed as Rindo handles this automatically behind the scenes.
32
33
  */
33
34
  bundles?: ConfigBundle[];
34
- /**
35
- * The copy config is an array of objects that defines any files or folders that should
36
- * be copied over to the build directory.
37
- *
38
- * Each object in the array must include a src property which can be either an absolute path,
39
- * a relative path or a glob pattern. The config can also provide an optional dest property
40
- * which can be either an absolute path or a path relative to the build directory.
41
- * Also note that any files within src/assets are automatically copied to www/assets for convenience.
42
- *
43
- * In the copy config below, it will copy the entire directory from src/docs-content over to www/docs-content.
44
- *
45
- * @deprecated
46
- */
47
- copy?: CopyTask[];
48
35
  /**
49
36
  * Rindo will cache build results in order to speed up rebuilds.
50
37
  * To disable this feature, set enableCache to false.
51
38
  */
52
39
  enableCache?: boolean;
53
- /**
54
- * The excludeSrc config setting specifies a set of regular expressions that should be excluded
55
- * from the build process.
56
- *
57
- * The defaults are meant to exclude possible test files that you would not want to include in your final build.
58
- *
59
- * @deprecated Use the "exclude" option in "tsconfig.json"
60
- */
61
- excludeSrc?: string[];
62
40
  /**
63
41
  * Rindo is traditionally used to compile many components into an app,
64
42
  * and each component comes with its own compartmentalized styles.
@@ -87,7 +65,7 @@ export interface RindoConfig {
87
65
  * The namespace config is a string representing a namespace for the app.
88
66
  * For apps that are not meant to be a library of reusable components,
89
67
  * the default of App is just fine. However, if the app is meant to be consumed
90
- * as a third-party library, such as Navify, a unique namespace is required.
68
+ * as a third-party library, such as Family, a unique namespace is required.
91
69
  */
92
70
  namespace?: string;
93
71
  /**
@@ -124,16 +102,13 @@ export interface RindoConfig {
124
102
  */
125
103
  rollupConfig?: RollupConfig;
126
104
  /**
127
- * Sets if the ES5 build should be generated or not. It defaults to `false` in dev mode, and `true` in
128
- * production mode. Notice that Rindo always generates a modern build too, whereas this setting
129
- * will either disable es5 builds entirely with `false`, or always create es5 builds (even in dev mode)
130
- * when set to `true`. Basically if the app does not need to run on legacy browsers
131
- * (IE11 and Edge 18 and below), it's safe to set `buildEs5` to `false`, which will also speed up
132
- * production build times. In addition to not creating es5 builds, apps may also be interested in
133
- * disabling any unnecessary runtime when support legacy browsers. See
134
- * [https://rindojs.web.app/docs/config-extras](/docs/config-extras) for more information.
105
+ * Sets if the ES5 build should be generated or not. Rindo generates a modern build without ES5,
106
+ * whereas this setting to `true` will also create es5 builds for both dev and prod modes. Setting
107
+ * `buildEs5` to `prod` will only build ES5 in prod mode. Basically if the app does not need to run
108
+ * on legacy browsers (IE11 and Edge 18 and below), it's safe to not build ES5, which will also speed
109
+ * up build times. Defaults to `false`.
135
110
  */
136
- buildEs5?: boolean;
111
+ buildEs5?: boolean | 'prod';
137
112
  /**
138
113
  * Sets if the JS browser files are minified or not. Rindo uses `terser` under the hood.
139
114
  * Defaults to `false` in dev mode and `true` in production mode.
@@ -174,12 +149,18 @@ export interface RindoConfig {
174
149
  hydratedFlag?: HydratedFlag;
175
150
  /**
176
151
  * Sets the task queue used by rindo's runtime. The task queue schedules DOM read and writes
177
- * across the frames to efficiently render and reduce layout thrashing. By default, the
178
- * `congestionAsync` is used. It's recommended to also try each setting to decide which works
152
+ * across the frames to efficiently render and reduce layout thrashing. By default,
153
+ * `async` is used. It's recommended to also try each setting to decide which works
179
154
  * best for your use-case. In all cases, if your app has many CPU intensive tasks causing the
180
155
  * main thread to periodically lock-up, it's always recommended to try
181
156
  * [Web Workers](https://rindojs.web.app/docs/web-workers) for those tasks.
182
157
  *
158
+ * - `async`: DOM read and writes are scheduled in the next frame to prevent layout thrashing.
159
+ * During intensive CPU tasks it will not reschedule rendering to happen in the next frame.
160
+ * `async` is ideal for most apps, and if the app has many intensive tasks causing the main
161
+ * thread to lock-up, it's recommended to try [Web Workers](https://rindojs.web.app/docs/web-workers)
162
+ * rather than the congestion async queue.
163
+ *
183
164
  * - `congestionAsync`: DOM reads and writes are scheduled in the next frame to prevent layout
184
165
  * thrashing. When the app is heavily tasked and the queue becomes congested it will then
185
166
  * split the work across multiple frames to prevent blocking the main thread. However, it can
@@ -187,12 +168,6 @@ export interface RindoConfig {
187
168
  * is ideal for apps running animations while also simultaniously executing intesive tasks
188
169
  * which may lock-up the main thread.
189
170
  *
190
- * - `async`: DOM read and writes are scheduled in the next frame to prevent layout thrashing.
191
- * During intensive CPU tasks it will not reschedule rendering to happen in the next frame.
192
- * `async` is ideal for most apps, and if the app has many intensive tasks causing the main
193
- * thread to lock-up, it's recommended to try [Web Workers](https://rindojs.web.app/docs/web-workers)
194
- * rather than the congestion async queue.
195
- *
196
171
  * - `immediate`: Makes writeTask() and readTask() callbacks to be executed syncronously. Tasks
197
172
  * are not scheduled to run in the next frame, but do note there is at least one microtask.
198
173
  * The `immediate` setting is ideal for apps that do not provide long running and smooth
@@ -200,16 +175,18 @@ export interface RindoConfig {
200
175
  * to lock-up, it's recommended to try [Web Workers](https://rindojs.web.app/docs/web-workers).
201
176
  */
202
177
  taskQueue?: 'async' | 'immediate' | 'congestionAsync';
178
+ /**
179
+ * Provide a object of key/values accessible within the app, using the `Env` object.
180
+ */
181
+ env?: {
182
+ [prop: string]: string | undefined;
183
+ };
203
184
  globalScript?: string;
204
185
  srcIndexHtml?: string;
205
186
  watch?: boolean;
206
187
  testing?: TestingConfig;
207
188
  maxConcurrentWorkers?: number;
208
189
  preamble?: string;
209
- /**
210
- * @deprecated Use the "include" option in "tsconfig.json"
211
- */
212
- includeSrc?: string[];
213
190
  rollupPlugins?: {
214
191
  before?: any[];
215
192
  after?: any[];
@@ -224,34 +201,40 @@ export interface RindoConfig {
224
201
  sys?: CompilerSystem;
225
202
  tsconfig?: string;
226
203
  validateTypes?: boolean;
227
- watchIgnoredRegex?: RegExp;
204
+ /**
205
+ * An array of RegExp patterns that are matched against all source files before adding
206
+ * to the watch list in watch mode. If the file path matches any of the patterns, when it
207
+ * is updated, it will not trigger a re-run of tests.
208
+ */
209
+ watchIgnoredRegex?: RegExp | RegExp[];
228
210
  excludeUnusedDependencies?: boolean;
229
- typescriptPath?: string;
230
211
  rindoCoreResolvedId?: string;
231
212
  }
232
213
  export interface ConfigExtras {
233
214
  /**
234
215
  * By default, the slot polyfill does not update `appendChild()` so that it appends
235
216
  * new child nodes into the correct child slot like how shadow dom works. This is an opt-in
236
- * polyfill for those who need it. Defaults to `false`.
217
+ * polyfill for those who need it when using `element.appendChild(node)` and expecting the
218
+ * child to be appended in the same location shadom dom would. This is not required for
219
+ * IE11 or Edge 18, but can be enabled if the app is using `appendChild()`. Defaults to `false`.
237
220
  */
238
221
  appendChildSlotFix?: boolean;
239
222
  /**
240
223
  * By default, the runtime does not polyfill `cloneNode()` when cloning a component
241
224
  * that uses the slot polyfill. This is an opt-in polyfill for those who need it.
242
- * Defaults to `false`.
225
+ * This is not required for IE11 or Edge 18, but can be enabled if the app is using
226
+ * `cloneNode()` and unexpected node are being cloned due to the slot polyfill
227
+ * simulating shadow dom. Defaults to `false`.
243
228
  */
244
229
  cloneNodeFix?: boolean;
245
230
  /**
246
- * Include the CSS Custom Property polyfill/shim for legacy browsers. Defaults to `true`
247
- * for legacy builds only. ESM builds will not include the css vars shim.
231
+ * Include the CSS Custom Property polyfill/shim for legacy browsers. ESM builds will
232
+ * not include the css vars shim. Defaults to `false`
248
233
  */
249
234
  cssVarsShim?: boolean;
250
235
  /**
251
236
  * Dynamic `import()` shim. This is only needed for Edge 18 and below, and Firefox 67
252
- * and below. If you do not need to support Edge 18 and below (Edge before it moved
253
- * to Chromium) then it's recommended to set `dynamicImportShim` to `false`.
254
- * Defaults to `true`.
237
+ * and below. Defaults to `false`.
255
238
  */
256
239
  dynamicImportShim?: boolean;
257
240
  /**
@@ -260,29 +243,29 @@ export interface ConfigExtras {
260
243
  lifecycleDOMEvents?: boolean;
261
244
  /**
262
245
  * Safari 10 supports ES modules with `<script type="module">`, however, it did not implement
263
- * `<script nomodule>`. When set to `false`, the runtime will not patch support for Safari 10.
264
- * Defaults to `true`.
246
+ * `<script nomodule>`. When set to `true`, the runtime will patch support for Safari 10
247
+ * due to its lack of `nomodule` support.
248
+ * Defaults to `false`.
265
249
  */
266
250
  safari10?: boolean;
267
251
  /**
268
252
  * It is possible to assign data to the actual `<script>` element's `data-opts` property,
269
253
  * which then gets passed to Rindo's initial bootstrap. This feature is only required
270
- * for very special cases and rarely needed. When set to `false` it will not read
271
- * this data. Defaults to `true`.
254
+ * for very special cases and rarely needed. Defaults to `false`.
272
255
  */
273
256
  scriptDataOpts?: boolean;
274
257
  /**
275
258
  * If enabled `true`, the runtime will check if the shadow dom shim is required. However,
276
259
  * if it's determined that shadow dom is already natively supported by the browser then
277
- * it does not request the shim. Setting to `false` will avoid all shadow dom tests.
278
- * If the app does not need to support IE11 or Edge 18 it's recommended to set `shadowDomShim` to
279
- * `false`. Defaults to `true`.
260
+ * it does not request the shim. When set to `false` it will avoid all shadow dom tests.
261
+ * Defaults to `false`.
280
262
  */
281
263
  shadowDomShim?: boolean;
282
264
  /**
283
- * When a component is first attached to the DOM, wait a single tick before rendering.
284
- * This worksaround an angular issue, where it attaches the elements before settings their initial state,
285
- * leading to double renders and unnecesary event dispatchs.
265
+ * When a component is first attached to the DOM, this setting will wait a single tick before
266
+ * rendering. This worksaround an Angular issue, where Angular attaches the elements before
267
+ * settings their initial state, leading to double renders and unnecesary event dispatchs.
268
+ * Defaults to `false`.
286
269
  */
287
270
  initializeNextTick?: boolean;
288
271
  /**
@@ -293,7 +276,8 @@ export interface ConfigExtras {
293
276
  */
294
277
  slotChildNodesFix?: boolean;
295
278
  /**
296
- * Enables the tagNameTransform option of `defineCustomElements()`, so the component tagName can be customized at runtime.
279
+ * Enables the tagNameTransform option of `defineCustomElements()`, so the component tagName
280
+ * can be customized at runtime. Defaults to `false`.
297
281
  */
298
282
  tagNameTransform?: boolean;
299
283
  }
@@ -344,7 +328,8 @@ export interface HydratedFlag {
344
328
  }
345
329
  export interface RindoDevServerConfig {
346
330
  /**
347
- * IP address used by the dev server. The default is `0.0.0.0`, which points to all IPv4 addresses on the local machine, such as `localhost`.
331
+ * IP address used by the dev server. The default is `0.0.0.0`, which points to all IPv4 addresses
332
+ * on the local machine, such as `localhost`.
348
333
  */
349
334
  address?: string;
350
335
  /**
@@ -364,7 +349,8 @@ export interface RindoDevServerConfig {
364
349
  */
365
350
  gzip?: boolean;
366
351
  /**
367
- * When set, the dev server will run via https using the SSL certificate and key you provide (use `fs` if you want to read them from files).
352
+ * When set, the dev server will run via https using the SSL certificate and key you provide
353
+ * (use `fs` if you want to read them from files).
368
354
  */
369
355
  https?: Credentials;
370
356
  /**
@@ -372,11 +358,13 @@ export interface RindoDevServerConfig {
372
358
  */
373
359
  initialLoadUrl?: string;
374
360
  /**
375
- * When `true`, every request to the server will be logged within the terminal. Defaults to `false`.
361
+ * When `true`, every request to the server will be logged within the terminal.
362
+ * Defaults to `false`.
376
363
  */
377
364
  logRequests?: boolean;
378
365
  /**
379
- * By default, when dev server is started the local dev URL is opened in your default browser. However, to prevent this URL to be opened change this value to `false`. Defaults to `true`.
366
+ * By default, when dev server is started the local dev URL is opened in your default browser.
367
+ * However, to prevent this URL to be opened change this value to `false`. Defaults to `true`.
380
368
  */
381
369
  openBrowser?: boolean;
382
370
  /**
@@ -384,23 +372,71 @@ export interface RindoDevServerConfig {
384
372
  */
385
373
  port?: number;
386
374
  /**
387
- * When files are watched and updated, by default the dev server will use `hmr` (Hot Module Replacement) to update the page without a full page refresh. To have the page do a full refresh use `pageReload`. To disable any reloading, use `null`. Defaults to `hmr`.
375
+ * When files are watched and updated, by default the dev server will use `hmr` (Hot Module Replacement)
376
+ * to update the page without a full page refresh. To have the page do a full refresh use `pageReload`.
377
+ * To disable any reloading, use `null`. Defaults to `hmr`.
388
378
  */
389
379
  reloadStrategy?: PageReloadStrategy;
380
+ /**
381
+ * Local path to a NodeJs file with a dev server request listener as the default export.
382
+ * The user's request listener is given the first chance to handle every request the dev server
383
+ * receives, and can choose to handle it or instead pass it on to the default dev server
384
+ * by calling `next()`.
385
+ *
386
+ * Below is an example of a NodeJs file the `requestListenerPath` config is using.
387
+ * The request and response arguments are the same as Node's `http` module and `RequestListener`
388
+ * callback. https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener
389
+ *
390
+ * ```js
391
+ * module.exports = function (req, res, next) {
392
+ * if (req.url === '/ping') {
393
+ * // custom response overriding the dev server
394
+ * res.setHeader('Content-Type', 'text/plain');
395
+ * res.writeHead(200);
396
+ * res.end('pong');
397
+ * } else {
398
+ * // pass request on to the default dev server
399
+ * next();
400
+ * }
401
+ * };
402
+ * ```
403
+ */
404
+ requestListenerPath?: string;
405
+ /**
406
+ * The root directory to serve the files from.
407
+ */
390
408
  root?: string;
409
+ /**
410
+ * If the dev server should Server-Side Render (SSR) each page, meaning it'll dynamically generate
411
+ * server-side rendered html on each page load. The `--ssr` flag will most commonly be used with
412
+ * the`--dev --watch --serve` flags during development. Note that this is for development purposes
413
+ * only, and the built-in dev server should not be used for production. Defaults to `false`.
414
+ */
415
+ ssr?: boolean;
416
+ /**
417
+ * If the dev server fails to start up within the given timout (in milliseconds), the startup will
418
+ * be canceled. Set to zero to disable the timeout. Defaults to `15000`.
419
+ */
420
+ startupTimeout?: number;
421
+ /**
422
+ * Whether to use the dev server's websocket client or not. Defaults to `true`.
423
+ */
391
424
  websocket?: boolean;
425
+ /**
426
+ * If the dev server should fork a worker for the server process or not. A singled-threaded dev server
427
+ * is slower, however it is useful for debugging http requests and responses. Defaults to `true`.
428
+ */
429
+ worker?: boolean;
392
430
  }
393
431
  export interface DevServerConfig extends RindoDevServerConfig {
394
432
  browserUrl?: string;
395
- contentTypes?: {
396
- [ext: string]: string;
397
- };
398
433
  devServerDir?: string;
399
- editors?: DevServerEditor[];
400
434
  excludeHmr?: string[];
401
435
  historyApiFallback?: HistoryApiFallback;
402
436
  openBrowser?: boolean;
437
+ prerenderConfig?: string;
403
438
  protocol?: 'http' | 'https';
439
+ srcIndexHtml?: string;
404
440
  }
405
441
  export interface HistoryApiFallback {
406
442
  index?: string;
@@ -449,6 +485,7 @@ export interface ConfigFlags {
449
485
  serve?: boolean;
450
486
  serviceWorker?: boolean;
451
487
  spec?: boolean;
488
+ ssr?: boolean;
452
489
  stats?: boolean;
453
490
  updateScreenshot?: boolean;
454
491
  version?: boolean;
@@ -468,7 +505,7 @@ export declare type PageReloadStrategy = 'hmr' | 'pageReload' | null;
468
505
  * outputTargets: [
469
506
  * {
470
507
  * type: 'www',
471
- * baseUrl: 'https://rindojs.com/',
508
+ * baseUrl: 'https://rindojs.web.app/',
472
509
  * prerenderConfig: './prerender.config.ts',
473
510
  * }
474
511
  * ]
@@ -485,7 +522,7 @@ export declare type PageReloadStrategy = 'hmr' | 'pageReload' | null;
485
522
  * };
486
523
  * ```
487
524
  *
488
- * For more info: https://rindojs.com/docs/static-site-generation
525
+ * For more info: https://rindojs.web.app/docs/static-site-generation
489
526
  */
490
527
  export interface PrerenderConfig {
491
528
  /**
@@ -567,24 +604,29 @@ export interface PrerenderConfig {
567
604
  trailingSlash?: boolean;
568
605
  }
569
606
  export interface HydrateDocumentOptions {
607
+ /**
608
+ * Build ID that will be added to `<html data-rindo-build="BUILD_ID">`. By default
609
+ * a random ID will be generated
610
+ */
611
+ buildId?: string;
570
612
  /**
571
613
  * Sets the `href` attribute on the `<link rel="canonical">`
572
614
  * tag within the `<head>`. If the value is not defined it will
573
615
  * ensure a canonical link tag is no included in the `<head>`.
574
616
  */
575
617
  canonicalUrl?: string;
576
- /**
577
- * Constrain `setTimeout()` to 1ms, but still async. Also
578
- * only allows `setInterval()` to fire once, also constrained to 1ms.
579
- * Defaults to `true`.
580
- */
581
- constrainTimeouts?: boolean;
582
618
  /**
583
619
  * Include the HTML comments and attributes used by the clientside
584
620
  * JavaScript to read the structure of the HTML and rebuild each
585
621
  * component. Defaults to `true`.
586
622
  */
587
623
  clientHydrateAnnotations?: boolean;
624
+ /**
625
+ * Constrain `setTimeout()` to 1ms, but still async. Also
626
+ * only allows `setInterval()` to fire once, also constrained to 1ms.
627
+ * Defaults to `true`.
628
+ */
629
+ constrainTimeouts?: boolean;
588
630
  /**
589
631
  * Sets `document.cookie`
590
632
  */
@@ -706,9 +748,17 @@ export interface PrerenderHydrateOptions extends SerializeDocumentOptions {
706
748
  * Defaults to `true`.
707
749
  */
708
750
  addModulePreloads?: boolean;
751
+ /**
752
+ * Hash the content of assets, such as images, fonts and css files,
753
+ * and add the hashed value as `v` querystring. For example,
754
+ * `/assets/image.png?v=abcd1234`. This allows for assets to be
755
+ * heavily cached by setting the server's response header with
756
+ * `Cache-Control: max-age=31536000, immutable`.
757
+ */
758
+ hashAssets?: 'querystring';
709
759
  /**
710
760
  * External stylesheets from `<link rel="stylesheet">` are instead inlined
711
- * into `<style>` elements. Defaults to `true`.
761
+ * into `<style>` elements. Defaults to `false`.
712
762
  */
713
763
  inlineExternalStyleSheets?: boolean;
714
764
  /**
@@ -758,7 +808,7 @@ export interface SitemapXmpResults {
758
808
  * of the actual platform it's being ran ontop of.
759
809
  */
760
810
  export interface CompilerSystem {
761
- name: 'node' | 'in-memory';
811
+ name: 'deno' | 'node' | 'in-memory';
762
812
  version: string;
763
813
  events?: BuildEvents;
764
814
  details?: SystemDetails;
@@ -790,6 +840,17 @@ export interface CompilerSystem {
790
840
  * Used to destroy any listeners, file watchers or child processes.
791
841
  */
792
842
  destroy(): Promise<void>;
843
+ /**
844
+ * Does not throw.
845
+ */
846
+ createDir(p: string, opts?: CompilerSystemCreateDirectoryOptions): Promise<CompilerSystemCreateDirectoryResults>;
847
+ /**
848
+ * SYNC! Does not throw.
849
+ */
850
+ createDirSync(p: string, opts?: CompilerSystemCreateDirectoryOptions): CompilerSystemCreateDirectoryResults;
851
+ /**
852
+ * Each plaform as a different way to dynamically import modules.
853
+ */
793
854
  dynamicImport?(p: string): Promise<any>;
794
855
  /**
795
856
  * Creates the worker controller for the current system.
@@ -802,7 +863,6 @@ export interface CompilerSystem {
802
863
  dependencies: CompilerDependency[];
803
864
  }): Promise<{
804
865
  rindoPath: string;
805
- typescriptPath: string;
806
866
  diagnostics: Diagnostic[];
807
867
  }>;
808
868
  ensureResources?(opts: {
@@ -813,7 +873,7 @@ export interface CompilerSystem {
813
873
  /**
814
874
  * process.exit()
815
875
  */
816
- exit(exitCode: number): void;
876
+ exit(exitCode: number): Promise<void>;
817
877
  /**
818
878
  * Optionally provide a fetch() function rather than using the built-in fetch().
819
879
  * First arg is a url string or Request object (RequestInfo).
@@ -821,9 +881,13 @@ export interface CompilerSystem {
821
881
  */
822
882
  fetch?(input: string | any, init?: any): Promise<any>;
823
883
  /**
824
- * Generates a MD5 digest encoded as HEX
884
+ * Generates a sha1 digest encoded as HEX
825
885
  */
826
- generateContentHash?(content: string, length?: number): Promise<string>;
886
+ generateContentHash?(content: string | any, length?: number): Promise<string>;
887
+ /**
888
+ * Generates a sha1 digest encoded as HEX from a file path
889
+ */
890
+ generateFileHash?(filePath: string | any, length?: number): Promise<string>;
827
891
  /**
828
892
  * Get the current directory.
829
893
  */
@@ -870,14 +934,6 @@ export interface CompilerSystem {
870
934
  */
871
935
  isSymbolicLink(p: string): Promise<boolean>;
872
936
  lazyRequire?: LazyRequire;
873
- /**
874
- * Does not throw.
875
- */
876
- mkdir(p: string, opts?: CompilerSystemMakeDirectoryOptions): Promise<CompilerSystemMakeDirectoryResults>;
877
- /**
878
- * SYNC! Does not throw.
879
- */
880
- mkdirSync(p: string, opts?: CompilerSystemMakeDirectoryOptions): CompilerSystemMakeDirectoryResults;
881
937
  nextTick(cb: () => void): void;
882
938
  /**
883
939
  * Normalize file system path.
@@ -886,17 +942,19 @@ export interface CompilerSystem {
886
942
  onProcessInterrupt?(cb: () => void): void;
887
943
  platformPath: PlatformPath;
888
944
  /**
889
- * All return paths are full normalized paths, not just the file names. Always returns an array, does not throw.
945
+ * All return paths are full normalized paths, not just the basenames. Always returns an array, does not throw.
890
946
  */
891
- readdir(p: string): Promise<string[]>;
947
+ readDir(p: string): Promise<string[]>;
892
948
  /**
893
- * SYNC! All return paths are full normalized paths, not just the file names. Always returns an array, does not throw.
949
+ * SYNC! All return paths are full normalized paths, not just the basenames. Always returns an array, does not throw.
894
950
  */
895
- readdirSync(p: string): string[];
951
+ readDirSync(p: string): string[];
896
952
  /**
897
953
  * Returns undefined if file is not found. Does not throw.
898
954
  */
899
- readFile(p: string, encoding?: string): Promise<string>;
955
+ readFile(p: string): Promise<string>;
956
+ readFile(p: string, encoding: 'utf8'): Promise<string>;
957
+ readFile(p: string, encoding: 'binary'): Promise<any>;
900
958
  /**
901
959
  * SYNC! Returns undefined if file is not found. Does not throw.
902
960
  */
@@ -922,28 +980,31 @@ export interface CompilerSystem {
922
980
  /**
923
981
  * Does not throw.
924
982
  */
925
- rmdir(p: string, opts?: CompilerSystemRemoveDirectoryOptions): Promise<CompilerSystemRemoveDirectoryResults>;
983
+ removeDir(p: string, opts?: CompilerSystemRemoveDirectoryOptions): Promise<CompilerSystemRemoveDirectoryResults>;
926
984
  /**
927
985
  * SYNC! Does not throw.
928
986
  */
929
- rmdirSync(p: string, opts?: CompilerSystemRemoveDirectoryOptions): CompilerSystemRemoveDirectoryResults;
987
+ removeDirSync(p: string, opts?: CompilerSystemRemoveDirectoryOptions): CompilerSystemRemoveDirectoryResults;
930
988
  /**
931
- * Returns undefined if stat not found. Does not throw.
989
+ * Does not throw.
932
990
  */
933
- stat(p: string): Promise<CompilerFsStats>;
991
+ removeFile(p: string): Promise<CompilerSystemRemoveFileResults>;
934
992
  /**
935
- * SYNC! Returns undefined if stat not found. Does not throw.
993
+ * SYNC! Does not throw.
936
994
  */
937
- statSync(p: string): CompilerFsStats;
938
- tmpdir(): string;
995
+ removeFileSync(p: string): CompilerSystemRemoveFileResults;
996
+ setupCompiler?: (c: {
997
+ ts: any;
998
+ }) => void;
939
999
  /**
940
- * Does not throw.
1000
+ * Always returns an object. Does not throw. Check for "error" property if there's an error.
941
1001
  */
942
- unlink(p: string): Promise<CompilerSystemUnlinkResults>;
1002
+ stat(p: string): Promise<CompilerFsStats>;
943
1003
  /**
944
- * SYNC! Does not throw.
1004
+ * SYNC! Always returns an object. Does not throw. Check for "error" property if there's an error.
945
1005
  */
946
- unlinkSync(p: string): CompilerSystemUnlinkResults;
1006
+ statSync(p: string): CompilerFsStats;
1007
+ tmpDirSync(): string;
947
1008
  watchDirectory?(p: string, callback: CompilerFileWatcherCallback, recursive?: boolean): CompilerFileWatcher;
948
1009
  watchFile?(p: string, callback: CompilerFileWatcherCallback): CompilerFileWatcher;
949
1010
  /**
@@ -1138,15 +1199,32 @@ export interface CompilerFileWatcher {
1138
1199
  close(): void | Promise<void>;
1139
1200
  }
1140
1201
  export interface CompilerFsStats {
1141
- isFile(): boolean;
1142
- isDirectory(): boolean;
1143
- isSymbolicLink(): boolean;
1202
+ /**
1203
+ * If it's a directory. `false` if there was an error.
1204
+ */
1205
+ isDirectory: boolean;
1206
+ /**
1207
+ * If it's a file. `false` if there was an error.
1208
+ */
1209
+ isFile: boolean;
1210
+ /**
1211
+ * If it's a symlink. `false` if there was an error.
1212
+ */
1213
+ isSymbolicLink: boolean;
1214
+ /**
1215
+ * The size of the file in bytes. `0` for directories or if there was an error.
1216
+ */
1144
1217
  size: number;
1145
- mtime?: {
1146
- getTime(): number;
1147
- };
1218
+ /**
1219
+ * The timestamp indicating the last time this file was modified expressed in milliseconds since the POSIX Epoch.
1220
+ */
1221
+ mtimeMs?: number;
1222
+ /**
1223
+ * Error if there was one, otherwise `null`. `stat` and `statSync` do not throw errors but always returns this interface.
1224
+ */
1225
+ error: any;
1148
1226
  }
1149
- export interface CompilerSystemMakeDirectoryOptions {
1227
+ export interface CompilerSystemCreateDirectoryOptions {
1150
1228
  /**
1151
1229
  * Indicates whether parent directories should be created.
1152
1230
  * @default false
@@ -1158,7 +1236,7 @@ export interface CompilerSystemMakeDirectoryOptions {
1158
1236
  */
1159
1237
  mode?: number;
1160
1238
  }
1161
- export interface CompilerSystemMakeDirectoryResults {
1239
+ export interface CompilerSystemCreateDirectoryResults {
1162
1240
  basename: string;
1163
1241
  dirname: string;
1164
1242
  path: string;
@@ -1198,7 +1276,7 @@ export interface CompilerSystemRealpathResults {
1198
1276
  path: string;
1199
1277
  error: any;
1200
1278
  }
1201
- export interface CompilerSystemUnlinkResults {
1279
+ export interface CompilerSystemRemoveFileResults {
1202
1280
  basename: string;
1203
1281
  dirname: string;
1204
1282
  path: string;
@@ -1375,10 +1453,6 @@ export interface JestConfig {
1375
1453
  */
1376
1454
  setupFiles?: string[];
1377
1455
  setupFilesAfterEnv?: string[];
1378
- /**
1379
- * @deprecated Use setupFilesAfterEnv instead.
1380
- */
1381
- setupTestFrameworkScriptFile?: string;
1382
1456
  snapshotSerializers?: any[];
1383
1457
  testEnvironment?: string;
1384
1458
  testEnvironmentOptions?: any;
@@ -1584,7 +1658,6 @@ export interface OutputTargetDistLazy extends OutputTargetBase {
1584
1658
  esmIndexFile?: string;
1585
1659
  cjsIndexFile?: string;
1586
1660
  systemLoaderFile?: string;
1587
- legacyLoaderFile?: string;
1588
1661
  empty?: boolean;
1589
1662
  }
1590
1663
  export interface OutputTargetDistGlobalStyles extends OutputTargetBase {
@@ -1600,15 +1673,15 @@ export interface OutputTargetDistLazyLoader extends OutputTargetBase {
1600
1673
  componentDts: string;
1601
1674
  empty: boolean;
1602
1675
  }
1603
- export interface OutputTargetDistSelfContained extends OutputTargetBase {
1604
- type: 'dist-self-contained';
1605
- dir?: string;
1606
- buildDir?: string;
1607
- empty?: boolean;
1608
- }
1609
1676
  export interface OutputTargetHydrate extends OutputTargetBase {
1610
1677
  type: 'dist-hydrate-script';
1611
1678
  dir?: string;
1679
+ /**
1680
+ * Module IDs that should not be bundled into the script.
1681
+ * By default, all node builtin's, such as `fs` or `path`
1682
+ * will be considered "external" and not bundled.
1683
+ */
1684
+ external?: string[];
1612
1685
  empty?: boolean;
1613
1686
  }
1614
1687
  export interface OutputTargetCustom extends OutputTargetBase {
@@ -1624,7 +1697,7 @@ export interface OutputTargetDocsVscode extends OutputTargetBase {
1624
1697
  sourceCodeBaseUrl?: string;
1625
1698
  }
1626
1699
  export interface OutputTargetDocsReadme extends OutputTargetBase {
1627
- type: 'docs-readme' | 'docs';
1700
+ type: 'docs-readme';
1628
1701
  dir?: string;
1629
1702
  dependencies?: boolean;
1630
1703
  footer?: string;
@@ -1638,7 +1711,7 @@ export interface OutputTargetDocsJson extends OutputTargetBase {
1638
1711
  }
1639
1712
  export interface OutputTargetDocsCustom extends OutputTargetBase {
1640
1713
  type: 'docs-custom';
1641
- generator: (docs: JsonDocs) => void | Promise<void>;
1714
+ generator: (docs: JsonDocs, config: Config) => void | Promise<void>;
1642
1715
  strict?: boolean;
1643
1716
  }
1644
1717
  export interface OutputTargetStats extends OutputTargetBase {
@@ -1652,14 +1725,20 @@ export interface OutputTargetBaseNext {
1652
1725
  export interface OutputTargetDistCustomElements extends OutputTargetBaseNext {
1653
1726
  type: 'dist-custom-elements';
1654
1727
  empty?: boolean;
1728
+ externalRuntime?: boolean;
1655
1729
  copy?: CopyTask[];
1730
+ inlineDynamicImports?: boolean;
1731
+ includeGlobalScripts?: boolean;
1732
+ minify?: boolean;
1656
1733
  }
1657
1734
  export interface OutputTargetDistCustomElementsBundle extends OutputTargetBaseNext {
1658
- type: 'dist-custom-elements-bundle' | 'experimental-dist-module';
1735
+ type: 'dist-custom-elements-bundle';
1659
1736
  empty?: boolean;
1660
1737
  externalRuntime?: boolean;
1661
1738
  copy?: CopyTask[];
1662
1739
  inlineDynamicImports?: boolean;
1740
+ includeGlobalScripts?: boolean;
1741
+ minify?: boolean;
1663
1742
  }
1664
1743
  export interface OutputTargetBase {
1665
1744
  type: string;
@@ -1752,7 +1831,7 @@ export interface OutputTargetWww extends OutputTargetBase {
1752
1831
  serviceWorker?: ServiceWorkerConfig | null | false;
1753
1832
  appDir?: string;
1754
1833
  }
1755
- export declare type OutputTarget = OutputTargetAngular | OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements | OutputTargetDistCustomElementsBundle | OutputTargetDistLazy | OutputTargetDistGlobalStyles | OutputTargetDistLazyLoader | OutputTargetDistSelfContained | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetWww | OutputTargetHydrate | OutputTargetStats | OutputTargetDistTypes;
1834
+ export declare type OutputTarget = OutputTargetAngular | OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements | OutputTargetDistCustomElementsBundle | OutputTargetDistLazy | OutputTargetDistGlobalStyles | OutputTargetDistLazyLoader | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetWww | OutputTargetHydrate | OutputTargetStats | OutputTargetDistTypes;
1756
1835
  export interface ServiceWorkerConfig {
1757
1836
  unregister?: boolean;
1758
1837
  swDest?: string;
@@ -1795,7 +1874,6 @@ export interface LoadConfigInit {
1795
1874
  * within the root directory.
1796
1875
  */
1797
1876
  initTsConfig?: boolean;
1798
- typescriptPath?: string;
1799
1877
  }
1800
1878
  export interface LoadConfigResults {
1801
1879
  config: Config;
@@ -1854,11 +1932,13 @@ export interface ResolveModuleOptions {
1854
1932
  packageJson?: boolean;
1855
1933
  }
1856
1934
  export interface PrerenderStartOptions {
1935
+ buildId?: string;
1857
1936
  hydrateAppFilePath: string;
1858
1937
  componentGraph: BuildResultsComponentGraph;
1859
1938
  srcIndexHtmlPath: string;
1860
1939
  }
1861
1940
  export interface PrerenderResults {
1941
+ buildId: string;
1862
1942
  diagnostics: Diagnostic[];
1863
1943
  urls: number;
1864
1944
  duration: number;
@@ -1870,6 +1950,7 @@ export interface OptimizeCssInput {
1870
1950
  autoprefixer?: any;
1871
1951
  minify?: boolean;
1872
1952
  sourceMap?: boolean;
1953
+ resolveUrl?: (url: string) => Promise<string> | string;
1873
1954
  }
1874
1955
  export interface OptimizeCssOutput {
1875
1956
  output: string;
@@ -1888,14 +1969,9 @@ export interface OptimizeJsOutput {
1888
1969
  diagnostics: Diagnostic[];
1889
1970
  }
1890
1971
  export interface LazyRequire {
1891
- ensure(logger: Logger, fromDir: string, moduleIds: string[]): Promise<void>;
1892
- require(moduleId: string): any;
1893
- getModulePath(moduleId: string): string;
1894
- }
1895
- export interface FsWatcher {
1896
- addFile(path: string): Promise<boolean>;
1897
- addDirectory(path: string): Promise<boolean>;
1898
- close(): void;
1972
+ ensure(fromDir: string, moduleIds: string[]): Promise<Diagnostic[]>;
1973
+ require(fromDir: string, moduleId: string): any;
1974
+ getModulePath(fromDir: string, moduleId: string): string;
1899
1975
  }
1900
1976
  export interface FsWatcherItem {
1901
1977
  close(): void;
@@ -1949,9 +2025,9 @@ export interface Compiler {
1949
2025
  sys: CompilerSystem;
1950
2026
  }
1951
2027
  export interface CompilerWatcher extends BuildOnEvents {
1952
- start(): Promise<WatcherCloseResults>;
1953
- close(): Promise<WatcherCloseResults>;
1954
- request(data: CompilerRequest): Promise<CompilerRequestResponse>;
2028
+ start: () => Promise<WatcherCloseResults>;
2029
+ close: () => Promise<WatcherCloseResults>;
2030
+ request: (data: CompilerRequest) => Promise<CompilerRequestResponse>;
1955
2031
  }
1956
2032
  export interface CompilerRequest {
1957
2033
  path?: string;
@@ -1960,6 +2036,7 @@ export interface WatcherCloseResults {
1960
2036
  exitCode: number;
1961
2037
  }
1962
2038
  export interface CompilerRequestResponse {
2039
+ path: string;
1963
2040
  nodeModuleId: string;
1964
2041
  nodeModuleVersion: string;
1965
2042
  nodeResolvedPath: string;
@@ -2023,7 +2100,6 @@ export interface TranspileOptions {
2023
2100
  * `latest`, `esnext`, `es2017`, `es2015`, or `es5`. Defaults to `latest`.
2024
2101
  */
2025
2102
  target?: CompileTarget;
2026
- typescriptPath?: string;
2027
2103
  /**
2028
2104
  * Create a source map. Using `inline` will inline the source map into the
2029
2105
  * code, otherwise the source map will be in the returned `map` property.