@napi-rs/cli 2.0.0-alpha.0 → 2.0.0-alpha.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.0.0-alpha.1](https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@1.3.3...@napi-rs/cli@2.0.0-alpha.1) (2021-10-01)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **cli:** missing main and types field in created package.json ([860a02a](https://github.com/napi-rs/napi-rs/commit/860a02a7cb575d8a33c2007ad38eda762e12ba79))
11
+
12
+ ### Features
13
+
14
+ - **cli:** dts flag for build command ([0e8de17](https://github.com/napi-rs/napi-rs/commit/0e8de173a4519c70ab9fcf9a4e0ec01aaca64d97))
15
+
16
+ # 2.0.0-alpha.0 (2021-09-22)
17
+
6
18
  ## [1.3.3](https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@1.3.2...@napi-rs/cli@1.3.3) (2021-09-19)
7
19
 
8
20
  ### Bug Fixes
package/package.json CHANGED
@@ -1,15 +1,23 @@
1
1
  {
2
2
  "name": "@napi-rs/cli",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "Cli tools for napi-rs",
5
- "keywords": ["cli", "rust", "napi", "n-api", "neon"],
5
+ "keywords": [
6
+ "cli",
7
+ "rust",
8
+ "napi",
9
+ "n-api",
10
+ "neon"
11
+ ],
6
12
  "author": "LongYinan <lynweklm@gmail.com>",
7
13
  "homepage": "https://github.com/napi-rs/napi-rs",
8
14
  "license": "MIT",
9
15
  "bin": {
10
16
  "napi": "./scripts/index.js"
11
17
  },
12
- "files": ["scripts"],
18
+ "files": [
19
+ "scripts"
20
+ ],
13
21
  "engines": {
14
22
  "node": ">= 10"
15
23
  },
@@ -35,11 +43,11 @@
35
43
  "inquirer": "^8.1.5"
36
44
  },
37
45
  "devDependencies": {
38
- "@octokit/rest": "^18.10.0",
39
- "@types/inquirer": "^8.1.1",
46
+ "@octokit/rest": "^18.11.2",
47
+ "@types/inquirer": "^8.1.2",
40
48
  "@types/js-yaml": "^4.0.3",
41
49
  "chalk": "^4.1.2",
42
- "clipanion": "^3.0.1",
50
+ "clipanion": "^3.1.0",
43
51
  "debug": "^4.3.2",
44
52
  "fdir": "^5.1.0",
45
53
  "js-yaml": "^4.1.0",
@@ -51,5 +59,6 @@
51
59
  "funding": {
52
60
  "type": "github",
53
61
  "url": "https://github.com/sponsors/Brooooooklyn"
54
- }
62
+ },
63
+ "gitHead": "16aacd8eec3110114ed45fa2311618160d9d5cfb"
55
64
  }
package/scripts/index.js CHANGED
@@ -23423,16 +23423,24 @@ var require_package = __commonJS({
23423
23423
  "cli/package.json"(exports2, module2) {
23424
23424
  module2.exports = {
23425
23425
  name: "@napi-rs/cli",
23426
- version: "2.0.0-alpha.0",
23426
+ version: "2.0.0-alpha.1",
23427
23427
  description: "Cli tools for napi-rs",
23428
- keywords: ["cli", "rust", "napi", "n-api", "neon"],
23428
+ keywords: [
23429
+ "cli",
23430
+ "rust",
23431
+ "napi",
23432
+ "n-api",
23433
+ "neon"
23434
+ ],
23429
23435
  author: "LongYinan <lynweklm@gmail.com>",
23430
23436
  homepage: "https://github.com/napi-rs/napi-rs",
23431
23437
  license: "MIT",
23432
23438
  bin: {
23433
23439
  napi: "./scripts/index.js"
23434
23440
  },
23435
- files: ["scripts"],
23441
+ files: [
23442
+ "scripts"
23443
+ ],
23436
23444
  engines: {
23437
23445
  node: ">= 10"
23438
23446
  },
@@ -23458,11 +23466,11 @@ var require_package = __commonJS({
23458
23466
  inquirer: "^8.1.5"
23459
23467
  },
23460
23468
  devDependencies: {
23461
- "@octokit/rest": "^18.10.0",
23462
- "@types/inquirer": "^8.1.1",
23469
+ "@octokit/rest": "^18.11.2",
23470
+ "@types/inquirer": "^8.1.2",
23463
23471
  "@types/js-yaml": "^4.0.3",
23464
23472
  chalk: "^4.1.2",
23465
- clipanion: "^3.0.1",
23473
+ clipanion: "^3.1.0",
23466
23474
  debug: "^4.3.2",
23467
23475
  fdir: "^5.1.0",
23468
23476
  "js-yaml": "^4.1.0",
@@ -23474,7 +23482,8 @@ var require_package = __commonJS({
23474
23482
  funding: {
23475
23483
  type: "github",
23476
23484
  url: "https://github.com/sponsors/Brooooooklyn"
23477
- }
23485
+ },
23486
+ gitHead: "16aacd8eec3110114ed45fa2311618160d9d5cfb"
23478
23487
  };
23479
23488
  }
23480
23489
  });
@@ -23669,6 +23678,7 @@ var BuildCommand = class extends import_clipanion2.Command {
23669
23678
  this.cargoName = import_clipanion2.Option.String("--cargo-name");
23670
23679
  this.targetTripleDir = import_clipanion2.Option.String("--target", (_a = process.env.RUST_TARGET) != null ? _a : "");
23671
23680
  this.features = import_clipanion2.Option.String("--features");
23681
+ this.dts = import_clipanion2.Option.String("--dts");
23672
23682
  this.cargoFlags = import_clipanion2.Option.String("--cargo-flags", "");
23673
23683
  this.cargoCwd = import_clipanion2.Option.String("--cargo-cwd");
23674
23684
  this.destDir = import_clipanion2.Option.String({
@@ -23677,7 +23687,7 @@ var BuildCommand = class extends import_clipanion2.Command {
23677
23687
  }
23678
23688
  execute() {
23679
23689
  return __async(this, null, function* () {
23680
- var _a2, _b, _c, _d, _e, _f;
23690
+ var _a2, _b, _c, _d, _e, _f, _g;
23681
23691
  const cwd = this.cargoCwd ? (0, import_path3.join)(process.cwd(), this.cargoCwd) : process.cwd();
23682
23692
  const releaseFlag = this.isRelease ? `--release` : "";
23683
23693
  const targetFlag = this.targetTripleDir ? `--target ${this.targetTripleDir}` : "";
@@ -23773,7 +23783,7 @@ var BuildCommand = class extends import_clipanion2.Command {
23773
23783
  }
23774
23784
  debug3(`Write binary content to [${import_chalk2.default.yellowBright(distModulePath)}]`);
23775
23785
  yield copyFileAsync(sourcePath, distModulePath);
23776
- yield processIntermediateTypeFile(intermediateTypeFile, (0, import_path3.join)((_f = this.destDir) != null ? _f : ".", "type.d.ts"));
23786
+ yield processIntermediateTypeFile(intermediateTypeFile, (0, import_path3.join)((_f = this.destDir) != null ? _f : ".", (_g = this.dts) != null ? _g : "index.d.ts"));
23777
23787
  });
23778
23788
  }
23779
23789
  };
@@ -27207,6 +27217,8 @@ var createPackageJson = (name, binaryName, targets) => {
27207
27217
  const pkgContent = {
27208
27218
  name,
27209
27219
  version: "0.0.0",
27220
+ main: "index.js",
27221
+ types: "index.d.ts",
27210
27222
  napi: {
27211
27223
  name: binaryName
27212
27224
  },