zile 0.0.0 → 0.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present weth, LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,358 @@
1
+ <p align="center">
2
+ <a href="https://wagmi.sh">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/zile/main/.github/lockup-dark.svg">
5
+ <img alt="zile logo" src="https://raw.githubusercontent.com/wevm/zile/main/.github/lockup-light.svg" width="auto" height="60">
6
+ </picture>
7
+ </a>
8
+ </p>
9
+
10
+ <p align="center">
11
+ Opinionated build tool for TypeScript libraries, powered by <code>tsc</code> (or <code>tsgo</code>!).
12
+ <p>
13
+
14
+ <p align="center">
15
+ <a href="https://github.com/wevm/zile/blob/main/LICENSE">
16
+ <picture>
17
+ <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/l/zile?colorA=21262d&colorB=21262d">
18
+ <img src="https://img.shields.io/npm/l/zile?colorA=f6f8fa&colorB=f6f8fa" alt="MIT License">
19
+ </picture>
20
+ </a>
21
+ <a href="https://www.npmjs.com/package/zile">
22
+ <picture>
23
+ <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/zile?colorA=21262d&colorB=21262d">
24
+ <img src="https://img.shields.io/npm/dm/zile?colorA=f6f8fa&colorB=f6f8fa" alt="Downloads per month">
25
+ </picture>
26
+ </a>
27
+ </p>
28
+
29
+ ---
30
+
31
+ ## Table of Contents
32
+
33
+ - [Overview](#overview)
34
+ - [Getting Started](#getting-started)
35
+ - [`package.json` Reference](#packagejson-reference)
36
+ - [`tsconfig.json` Reference](#tsconfigjson-reference)
37
+ - [CLI Reference](#cli-reference)
38
+ - [License](#license)
39
+
40
+ ## Overview
41
+
42
+ Zile is an opinionated zero-config tool for transpiling TypeScript libraries based on your `package.json` file, powered by `tsc`.
43
+
44
+ - **Zero-config**: No config files or specific config to get started – relies on standard `package.json` fields
45
+ - **ESM-only**: Builds libraries with pure-ESM output
46
+ - **Development mode**: `zile dev` creates symlinks for rapid development without full transpilation
47
+ - **Support for `tsgo`**: Use `tsgo` for faster transpilation
48
+ - **Binary/CLI Support**: Supports CLI tools with automatic handling of `package.json#bin`
49
+ - **Auto-generated `package.json`**: Zile will auto-generate a valid `package.json` file to distribute to package registries
50
+
51
+ ## Getting Started
52
+
53
+ ### 1. Install
54
+
55
+ Install Zile as a dev dependency on your project, and ensure that `typescript` is also installed.
56
+
57
+ ```sh
58
+ npm i zile typescript -D
59
+ ```
60
+
61
+ ### 2. Add Entrypoints
62
+
63
+ Zile does not require specific configuration. However, it does require a few fields in your `package.json` file to be present depending if you have a single or multiple entrypoints.
64
+
65
+ #### Single Entrypoint
66
+
67
+ A single entrypoint can be specified as the `main` field pointing to your source file.
68
+
69
+ ```diff
70
+ {
71
+ "name": "my-pkg",
72
+ "version": "0.0.0",
73
+ "type": "module",
74
+ + "main": "./src/index.ts"
75
+ }
76
+ ```
77
+
78
+ > The `main` entry will be remapped to the built file in your output when you run `zile`.
79
+
80
+ #### Multiple Entrypoints
81
+
82
+ Multiple entrypoints can be specified as the `exports` field pointing to your source files.
83
+
84
+ ```diff
85
+
86
+ {
87
+ "name": "my-pkg",
88
+ "version": "0.0.0",
89
+ "type": "module",
90
+ + "exports": {
91
+ + ".": "./src/index.ts",
92
+ + "./utils": "./src/utils.ts"
93
+ + }
94
+ }
95
+ ```
96
+
97
+ > The `exports` will be remapped to the built files in your output when you run `zile`.
98
+
99
+ #### Binary/CLI Entrypoint(s)
100
+
101
+ A binary entrypoint can be specified as the `bin` field pointing to your source file.
102
+
103
+ ```diff
104
+ {
105
+ "name": "my-pkg",
106
+ "version": "0.0.0",
107
+ "type": "module",
108
+ + "bin": "./src/cli.ts"
109
+ }
110
+ ```
111
+
112
+ Or if you want to specify a custom name for the binary, or multiple binary entrypoints, you can use the `bin` field as an object.
113
+
114
+ ```diff
115
+ {
116
+ "name": "my-pkg",
117
+ "version": "0.0.0",
118
+ "type": "module",
119
+ + "bin": {
120
+ + "foo.src": "./src/cli.ts"
121
+ + "bar.src": "./src/cli2.ts"
122
+ + }
123
+ }
124
+ ```
125
+
126
+ > Make sure you add a `.src` suffix and the value is pointing to your source file. The `bin` will be remapped to the built file in your output when you run `zile`.
127
+
128
+ ### 3. Run Zile
129
+
130
+ Add a `build` script to your `package.json` file, and run it with `npm run build`.
131
+
132
+ ```diff
133
+ {
134
+ "name": "my-pkg",
135
+ "version": "0.0.0",
136
+ "type": "module",
137
+ "main": "./src/index.ts"
138
+ + "scripts": {
139
+ + "build": "zile"
140
+ + },
141
+ ...
142
+ }
143
+ ```
144
+
145
+ ```sh
146
+ npm run build
147
+ ```
148
+
149
+ ## `package.json` Reference
150
+
151
+ This section describes how Zile transforms your `package.json` fields during the build process.
152
+
153
+ ### `main`
154
+
155
+ The `main` field specifies a single entrypoint for your package.
156
+
157
+ Point to your source file:
158
+
159
+ ```diff
160
+ {
161
+ "name": "my-pkg",
162
+ "version": "0.0.0",
163
+ "type": "module",
164
+ + "main": "./src/index.ts"
165
+ }
166
+ ```
167
+
168
+ > **↓↓↓ Output**
169
+ > >
170
+ > Zile transforms this to point to the built file and generates `exports`, `module` and `types` fields:
171
+ > ```json
172
+ > {
173
+ > "name": "my-pkg",
174
+ > "version": "0.0.0",
175
+ > "type": "module",
176
+ > "main": "./dist/index.js",
177
+ > "module": "./dist/index.js",
178
+ > "types": "./dist/index.d.ts",
179
+ > "exports": {
180
+ > ".": {
181
+ > "src": "./src/index.ts",
182
+ > "types": "./dist/index.d.ts",
183
+ > "default": "./dist/index.js"
184
+ > }
185
+ > }
186
+ > }
187
+ > ```
188
+
189
+ ### `exports`
190
+
191
+ The `exports` field enables you to specify multiple (or single) entrypoints for your package.
192
+
193
+ Point to your source files directly:
194
+
195
+ ```diff
196
+ {
197
+ "name": "my-pkg",
198
+ "version": "0.0.0",
199
+ "type": "module",
200
+ + "exports": {
201
+ + ".": "./src/index.ts",
202
+ + "./utils": "./src/utils.ts"
203
+ + }
204
+ }
205
+ ```
206
+
207
+ > **↓↓↓ Output**
208
+ >
209
+ >Zile expands each entrypoint to include types and built files:
210
+ >
211
+ > ```json
212
+ > {
213
+ > "name": "my-pkg",
214
+ > "version": "0.0.0",
215
+ > "type": "module",
216
+ > "main": "./dist/index.js",
217
+ > "module": "./dist/index.js",
218
+ > "types": "./dist/index.d.ts",
219
+ > "exports": {
220
+ > ".": {
221
+ > "src": "./src/index.ts",
222
+ > "types": "./dist/index.d.ts",
223
+ > "default": "./dist/index.js"
224
+ > },
225
+ > "./utils": {
226
+ > "src": "./src/utils.ts",
227
+ > "types": "./dist/utils.d.ts",
228
+ > "default": "./dist/utils.js"
229
+ > }
230
+ > }
231
+ > }
232
+ > ```
233
+
234
+ ### `bin`
235
+
236
+ The `bin` field specifies CLI entrypoints for your package.
237
+
238
+ #### String Format (Single Binary)
239
+
240
+ Point to your source file:
241
+
242
+ ```diff
243
+ {
244
+ "name": "my-cli",
245
+ "version": "0.0.0",
246
+ "type": "module",
247
+ + "bin": "./src/cli.ts"
248
+ }
249
+ ```
250
+
251
+ > **↓↓↓ Output**
252
+ >
253
+ > Zile creates both the built binary and preserves a `.src` reference:
254
+ >
255
+ > ```json
256
+ > {
257
+ > "name": "my-cli",
258
+ > "version": "0.0.0",
259
+ > "type": "module",
260
+ > "bin": {
261
+ > "my-cli": "./dist/cli.js",
262
+ > "my-cli.src": "./src/cli.ts"
263
+ > }
264
+ > }
265
+ > ```
266
+
267
+ #### Object Format (Multiple Binaries)
268
+
269
+ Use keys with `.src` suffix to indicate source files:
270
+
271
+ ```diff
272
+ {
273
+ "name": "my-cli",
274
+ "version": "0.0.0",
275
+ "type": "module",
276
+ + "bin": {
277
+ + "foo.src": "./src/cli-foo.ts",
278
+ + "bar.src": "./src/cli-bar.ts"
279
+ + }
280
+ }
281
+ ```
282
+
283
+ > **↓↓↓ Output**
284
+ >
285
+ > Zile creates built versions without the `.src` suffix:
286
+ >
287
+ > ```json
288
+ > {
289
+ > "name": "my-cli",
290
+ > "version": "0.0.0",
291
+ > "type": "module",
292
+ > "bin": {
293
+ > "foo": "./dist/cli-foo.js",
294
+ > "foo.src": "./src/cli-foo.ts",
295
+ > "bar": "./dist/cli-bar.js",
296
+ > "bar.src": "./src/cli-bar.ts"
297
+ > }
298
+ > }
299
+ > ```
300
+
301
+ ### Additional Fields
302
+
303
+ Zile also sets these fields if not already present:
304
+
305
+ - **`type`**: Set to `"module"` (ESM-only)
306
+ - **`sideEffects`**: Set to `false`
307
+
308
+ ## `tsconfig.json` Reference
309
+
310
+ Since `tsc` is used under the hood, Zile also uses fields in your `tsconfig.json` file to determine the output directory and particular settings for transpilation.
311
+
312
+ Any field in the `tsconfig.json` can be modified, and the following fields are worth noting:
313
+
314
+ - **`outDir`**: Output directory. Defaults to `./dist`
315
+ - **`target`**: Target ES version. Defaults to `es2021`
316
+
317
+ The following fields cannot be modified, and are overridden by Zile:
318
+
319
+ - **`composite`**: Set to `false` to disable project references and incremental compilation, and allow for purity.
320
+ - **`declaration`**: Set to `true` as we always want to emit declaration files.
321
+ - **`declarationMap`**: Set to `true` to emit source maps for declaration files.
322
+ - **`emitDeclarationOnly`**: Set to `false` to force emitting built files.
323
+ - **`esModuleInterop`**: Set to `true` to enable interoperability between CommonJS and ES modules.
324
+ - **`noEmit`**: Set to `false` to force emitting built files.
325
+ - **`skipLibCheck`**: Set to `true` to skip type checking of external libraries.
326
+ - **`sourceMap`**: Set to `true` to emit source maps.
327
+
328
+ ## CLI Reference
329
+
330
+ ```sh
331
+ zile/0.0.0
332
+
333
+ Usage:
334
+ $ zile [root]
335
+
336
+ Commands:
337
+ [root]
338
+ build Build package
339
+ dev Resolve package exports to source for development
340
+
341
+ For more info, run any command with the `--help` flag:
342
+ $ zile --help
343
+ $ zile build --help
344
+ $ zile dev --help
345
+
346
+ Options:
347
+ --cwd <directory> Working directory to build
348
+ --includes <patterns...> Glob patterns to include
349
+ --project <path> Path to tsconfig.json file, relative to the working directory.
350
+ --tsgo Use tsgo for transpilation
351
+ -v, --version Display version number
352
+ -h, --help Display this message
353
+ ```
354
+
355
+ ## License
356
+
357
+ [MIT](./LICENSE) License.
358
+
package/dist/Cli.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Runs the CLI with the given arguments.
4
+ *
5
+ * @param options - Options for running the CLI
6
+ * @returns Promise that resolves when the CLI completes
7
+ */
8
+ export declare function run(options: run.Options): Promise<void>;
9
+ export declare namespace run {
10
+ type Options = {
11
+ /** Command-line arguments to parse */
12
+ args: string[];
13
+ };
14
+ }
15
+ //# sourceMappingURL=Cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../src/Cli.ts"],"names":[],"mappings":";AAKA;;;;;GAKG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAc7D;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,KAAK,OAAO,GAAG;QACb,sCAAsC;QACtC,IAAI,EAAE,MAAM,EAAE,CAAA;KACf,CAAA;CACF"}
package/dist/Cli.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bun
2
+ import { cac } from 'cac';
3
+ import * as commands from './internal/cli/commands.js';
4
+ import pkgJson from './internal/package.json' with { type: 'json' };
5
+ /**
6
+ * Runs the CLI with the given arguments.
7
+ *
8
+ * @param options - Options for running the CLI
9
+ * @returns Promise that resolves when the CLI completes
10
+ */
11
+ export async function run(options) {
12
+ const { args } = options;
13
+ const cli = cac(pkgJson.name);
14
+ cli.version(pkgJson.version);
15
+ commands.build(cli.command('[root]', ''));
16
+ commands.build(cli.command('build', 'Build package'));
17
+ commands.build(cli.command('dev', 'Resolve package exports to source for development'), {
18
+ link: true,
19
+ });
20
+ cli.help();
21
+ cli.parse(args);
22
+ }
23
+ // Run the CLI if this module is executed directly
24
+ if (import.meta.url === `file://${process.argv[1]}`) {
25
+ run({ args: process.argv }).catch((error) => {
26
+ console.error(error);
27
+ process.exit(1);
28
+ });
29
+ }
30
+ //# sourceMappingURL=Cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cli.js","sourceRoot":"","sources":["../src/Cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzB,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAA;AACtD,OAAO,OAAO,MAAM,yBAAyB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAEnE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,OAAoB;IAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;IAExB,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAE5B,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAA;IACzC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAA;IACrD,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,mDAAmD,CAAC,EAAE;QACtF,IAAI,EAAE,IAAI;KACX,CAAC,CAAA;IAEF,GAAG,CAAC,IAAI,EAAE,CAAA;IACV,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACjB,CAAC;AASD,kDAAkD;AAClD,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,156 @@
1
+ import type { PackageJson, TsConfigJson } from 'type-fest';
2
+ export type { PackageJson, TsConfigJson };
3
+ /**
4
+ * Builds a package.
5
+ *
6
+ * @param options - Options for building a package
7
+ * @returns Build artifacts.
8
+ */
9
+ export declare function build(options: build.Options): Promise<build.ReturnType>;
10
+ export declare namespace build {
11
+ type Options = {
12
+ /** Working directory to start searching from. @default process.cwd() */
13
+ cwd?: string | undefined;
14
+ /** Whether to link output files to source files for development. @default false */
15
+ link?: boolean | undefined;
16
+ /** Path to tsconfig.json file, relative to the working directory. @default './tsconfig.json' */
17
+ project?: string | undefined;
18
+ /** Whether to use tsgo for transpilation. @default false */
19
+ tsgo?: boolean | undefined;
20
+ };
21
+ type ReturnType = {
22
+ /** Transformed package.json file. */
23
+ packageJson: PackageJson;
24
+ /** tsconfig.json used for transpilation. */
25
+ tsConfig: TsConfigJson;
26
+ };
27
+ }
28
+ /**
29
+ * Checks the inputs of the package.
30
+ *
31
+ * @param options - Options for checking the input.
32
+ * @returns Input check results.
33
+ */
34
+ export declare function checkInput(options: checkInput.Options): Promise<checkInput.ReturnType>;
35
+ export declare namespace checkInput {
36
+ type Options = {
37
+ /** Working directory to check. @default process.cwd() */
38
+ cwd?: string | undefined;
39
+ /** Output directory. @default path.resolve(cwd, 'dist') */
40
+ outDir?: string | undefined;
41
+ };
42
+ type ReturnType = undefined;
43
+ }
44
+ /**
45
+ * Determines if the package.json file is valid for transpiling.
46
+ *
47
+ * @param options - Options for checking the package.json file.
48
+ * @returns Whether the package.json file is valid for transpiling.
49
+ */
50
+ export declare function checkPackageJson(options: checkPackageJson.Options): Promise<checkPackageJson.ReturnType>;
51
+ export declare namespace checkPackageJson {
52
+ type Options = {
53
+ /** Working directory to check. @default process.cwd() */
54
+ cwd?: string | undefined;
55
+ /** Output directory. @default path.resolve(cwd, 'dist') */
56
+ outDir?: string | undefined;
57
+ };
58
+ type ReturnType = undefined;
59
+ }
60
+ /**
61
+ * Decorates the package.json file to include publish-specific fields.
62
+ *
63
+ * @param pkgJson - Package.json file to transform.
64
+ * @param options - Options.
65
+ * @returns Transformed package.json file as an object.
66
+ */
67
+ export declare function decoratePackageJson(pkgJson: PackageJson, options: decoratePackageJson.Options): Promise<PackageJson>;
68
+ export declare namespace decoratePackageJson {
69
+ type Options = {
70
+ /** Working directory. */
71
+ cwd: string;
72
+ /** Whether to link output files to source files for development. */
73
+ link: boolean;
74
+ /** Output directory. */
75
+ outDir: string;
76
+ /** Source directory. */
77
+ sourceDir: string;
78
+ };
79
+ }
80
+ /**
81
+ * Gets entry files from package.json exports field or main field.
82
+ *
83
+ * @param options - Options for getting entry files.
84
+ * @returns Array of absolute paths to entry files.
85
+ */
86
+ export declare function getEntries(options: getEntries.Options): string[];
87
+ export declare namespace getEntries {
88
+ type Options = {
89
+ /** Working directory. */
90
+ cwd: string;
91
+ /** Package.json file. */
92
+ pkgJson: PackageJson;
93
+ };
94
+ }
95
+ /**
96
+ * Gets the source directory from the entry files.
97
+ *
98
+ * @param options - Options for getting the source directory.
99
+ * @returns Source directory.
100
+ */
101
+ export declare function getSourceDir(options: getSourceDir.Options): string;
102
+ export declare namespace getSourceDir {
103
+ type Options = {
104
+ /** Working directory. */
105
+ cwd?: string | undefined;
106
+ /** Entry files. */
107
+ entries: string[];
108
+ };
109
+ }
110
+ export declare function readPackageJson(options: readPackageJson.Options): Promise<any>;
111
+ export declare namespace readPackageJson {
112
+ type Options = {
113
+ /** Working directory. */
114
+ cwd: string;
115
+ };
116
+ }
117
+ export declare function readTsconfigJson(options: readTsconfigJson.Options): Promise<TsConfigJson>;
118
+ export declare namespace readTsconfigJson {
119
+ type Options = {
120
+ /** Working directory. */
121
+ cwd: string;
122
+ /** Path to tsconfig.json file, relative to the working directory. @default './tsconfig.json' */
123
+ project?: string | undefined;
124
+ };
125
+ }
126
+ /**
127
+ * Transpiles a package.
128
+ *
129
+ * @param options - Options for transpiling a package.
130
+ * @returns Transpilation artifacts.
131
+ */
132
+ export declare function transpile(options: transpile.Options): Promise<transpile.ReturnType>;
133
+ export declare namespace transpile {
134
+ type Options = {
135
+ /** Working directory of the package to transpile. @default process.cwd() */
136
+ cwd?: string | undefined;
137
+ /** Entry files to include in the transpilation. */
138
+ entries: string[];
139
+ /** Path to tsconfig.json file, relative to the working directory. @default './tsconfig.json' */
140
+ project?: string | undefined;
141
+ /** Whether to use tsgo for transpilation. @default false */
142
+ tsgo?: boolean | undefined;
143
+ };
144
+ type ReturnType = {
145
+ /** Transformed tsconfig.json file. */
146
+ tsConfig: TsConfigJson;
147
+ };
148
+ }
149
+ /**
150
+ * Writes the package.json file to the given working directory.
151
+ *
152
+ * @param cwd - Working directory to write the package.json file to.
153
+ * @param pkgJson - Package.json file to write.
154
+ */
155
+ export declare function writePackageJson(cwd: string, pkgJson: PackageJson): Promise<void>;
156
+ //# sourceMappingURL=Package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Package.d.ts","sourceRoot":"","sources":["../src/Package.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE1D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA;AAEzC;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CA6B7E;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,KAAK,OAAO,GAAG;QACb,wEAAwE;QACxE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QACxB,mFAAmF;QACnF,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QAC1B,gGAAgG;QAChG,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC5B,4DAA4D;QAC5D,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAC3B,CAAA;IAED,KAAK,UAAU,GAAG;QAChB,qCAAqC;QACrC,WAAW,EAAE,WAAW,CAAA;QACxB,4CAA4C;QAC5C,QAAQ,EAAE,YAAY,CAAA;KACvB,CAAA;CACF;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAE5F;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,KAAK,OAAO,GAAG;QACb,yDAAyD;QACzD,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS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