@napi-rs/cli 3.0.0-alpha.7 → 3.0.0-alpha.8

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.
@@ -13,6 +13,7 @@ import { instantiateNapiModule as __emnapiInstantiateNapiModule } from '@emnapi/
13
13
  import { getDefaultContext as __emnapiGetDefaultContext } from '@emnapi/runtime'
14
14
 
15
15
  const __wasi = new __nodeWASI({
16
+ version: 'preview1',
16
17
  env: process.env,
17
18
  preopens: {
18
19
  '/': __nodePath.join(__nodeURL.fileURLToPath(import.meta.url), '..'),
@@ -1 +1 @@
1
- {"version":3,"file":"load-wasi-template.js","sourceRoot":"","sources":["../../src/api/load-wasi-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,YAAoB,EACpB,qBAA+B,EAC/B,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iLA+B4K,YAAY;;;;;;;;;;;;;;;;;;;;;;;;EAwB3L,qBAAqB;KACpB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,6BAA6B,IAAI,MAAM,CAAC;KACtD,IAAI,CAAC,IAAI,CAAC;;;;CAIZ,CAAA"}
1
+ {"version":3,"file":"load-wasi-template.js","sourceRoot":"","sources":["../../src/api/load-wasi-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,YAAoB,EACpB,qBAA+B,EAC/B,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iLAgC4K,YAAY;;;;;;;;;;;;;;;;;;;;;;;;EAwB3L,qBAAqB;KACpB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,6BAA6B,IAAI,MAAM,CAAC;KACtD,IAAI,CAAC,IAAI,CAAC;;;;CAIZ,CAAA"}
@@ -543,6 +543,7 @@ jobs:
543
543
  with:
544
544
  node-version: 18
545
545
  cache: 'yarn'
546
+ registry-url: 'https://registry.npmjs.org'
546
547
 
547
548
  - name: 'Install dependencies'
548
549
  run: yarn install
@@ -561,20 +562,17 @@ jobs:
561
562
 
562
563
  - name: Publish
563
564
  run: |
564
- npm config set provenance true
565
565
  if git log -1 --pretty=%B | grep "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+$";
566
566
  then
567
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
568
- npm publish --access public
567
+ npm publish --access public --provenance
569
568
  elif git log -1 --pretty=%B | grep "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+";
570
569
  then
571
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
572
- npm publish --tag next --access public
570
+ npm publish --tag next --access public --provenance
573
571
  else
574
572
  echo "Not a release, skipping publish"
575
573
  fi
576
574
  env:
577
575
  GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
578
- NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
576
+ NODE_AUTH_TOKEN: \${{ secrets.NPM_TOKEN }}
579
577
  `;
580
578
  //# sourceMappingURL=ci-template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ci-template.js","sourceRoot":"","sources":["../../../src/api/templates/ci-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkkBzB,CAAA"}
1
+ {"version":3,"file":"ci-template.js","sourceRoot":"","sources":["../../../src/api/templates/ci-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgkBzB,CAAA"}
package/dist/index.cjs CHANGED
@@ -4538,7 +4538,7 @@ var require_dist_node5 = __commonJS({
4538
4538
  module2.exports = __toCommonJS2(dist_src_exports);
4539
4539
  var import_endpoint = require_dist_node2();
4540
4540
  var import_universal_user_agent = require_dist_node();
4541
- var VERSION = "8.1.4";
4541
+ var VERSION = "8.1.5";
4542
4542
  var import_is_plain_object = require_is_plain_object();
4543
4543
  var import_request_error = require_dist_node4();
4544
4544
  function getBufferResponse(response) {
@@ -4654,7 +4654,7 @@ var require_dist_node5 = __commonJS({
4654
4654
  async function getResponseData(response) {
4655
4655
  const contentType = response.headers.get("content-type");
4656
4656
  if (/application\/json/.test(contentType)) {
4657
- return response.json();
4657
+ return response.json().catch(() => response.text()).catch(() => "");
4658
4658
  }
4659
4659
  if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
4660
4660
  return response.text();
@@ -5150,7 +5150,7 @@ var require_dist_node10 = __commonJS({
5150
5150
  paginatingEndpoints: () => paginatingEndpoints
5151
5151
  });
5152
5152
  module2.exports = __toCommonJS2(dist_src_exports);
5153
- var VERSION = "9.1.2";
5153
+ var VERSION = "9.1.4";
5154
5154
  function normalizePaginatedListResponse(response) {
5155
5155
  if (!response.data) {
5156
5156
  return {
@@ -5525,7 +5525,7 @@ var require_dist_node11 = __commonJS({
5525
5525
  restEndpointMethods: () => restEndpointMethods
5526
5526
  });
5527
5527
  module2.exports = __toCommonJS2(dist_src_exports);
5528
- var VERSION = "10.1.2";
5528
+ var VERSION = "10.1.5";
5529
5529
  var Endpoints = {
5530
5530
  actions: {
5531
5531
  addCustomLabelsToSelfHostedRunnerForOrg: [
@@ -10695,6 +10695,7 @@ import { instantiateNapiModule as __emnapiInstantiateNapiModule } from '@emnapi/
10695
10695
  import { getDefaultContext as __emnapiGetDefaultContext } from '@emnapi/runtime'
10696
10696
 
10697
10697
  const __wasi = new __nodeWASI({
10698
+ version: 'preview1',
10698
10699
  env: process.env,
10699
10700
  preopens: {
10700
10701
  '/': __nodePath.join(__nodeURL.fileURLToPath(import.meta.url), '..'),
@@ -14201,6 +14202,7 @@ jobs:
14201
14202
  with:
14202
14203
  node-version: 18
14203
14204
  cache: 'yarn'
14205
+ registry-url: 'https://registry.npmjs.org'
14204
14206
 
14205
14207
  - name: 'Install dependencies'
14206
14208
  run: yarn install
@@ -14219,21 +14221,18 @@ jobs:
14219
14221
 
14220
14222
  - name: Publish
14221
14223
  run: |
14222
- npm config set provenance true
14223
14224
  if git log -1 --pretty=%B | grep "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+$";
14224
14225
  then
14225
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
14226
- npm publish --access public
14226
+ npm publish --access public --provenance
14227
14227
  elif git log -1 --pretty=%B | grep "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+";
14228
14228
  then
14229
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
14230
- npm publish --tag next --access public
14229
+ npm publish --tag next --access public --provenance
14231
14230
  else
14232
14231
  echo "Not a release, skipping publish"
14233
14232
  fi
14234
14233
  env:
14235
14234
  GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
14236
- NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
14235
+ NODE_AUTH_TOKEN: \${{ secrets.NPM_TOKEN }}
14237
14236
  `;
14238
14237
 
14239
14238
  // dist/api/templates/ci.yml.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/cli",
3
- "version": "3.0.0-alpha.7",
3
+ "version": "3.0.0-alpha.8",
4
4
  "description": "Cli tools for napi-rs",
5
5
  "author": "LongYinan <lynweklm@gmail.com>",
6
6
  "homepage": "https://github.com/napi-rs/napi-rs",
@@ -72,32 +72,32 @@
72
72
  "clipanion": "^3.2.1",
73
73
  "colorette": "^2.0.20",
74
74
  "debug": "^4.3.4",
75
- "emnapi": "0.43.1",
76
- "inquirer": "^9.2.11",
75
+ "emnapi": "0.44.0",
76
+ "inquirer": "^9.2.12",
77
77
  "js-yaml": "^4.1.0",
78
78
  "lodash-es": "^4.17.21",
79
79
  "toml": "^3.0.0",
80
80
  "typanion": "^3.14.0"
81
81
  },
82
82
  "devDependencies": {
83
- "@emnapi/core": "0.43.1",
84
- "@emnapi/runtime": "0.43.1",
85
- "@types/debug": "^4.1.10",
86
- "@types/inquirer": "^9.0.6",
87
- "@types/js-yaml": "^4.0.8",
88
- "@types/lodash-es": "^4.17.10",
83
+ "@emnapi/core": "0.44.0",
84
+ "@emnapi/runtime": "0.44.0",
85
+ "@types/debug": "^4.1.12",
86
+ "@types/inquirer": "^9.0.7",
87
+ "@types/js-yaml": "^4.0.9",
88
+ "@types/lodash-es": "^4.17.11",
89
89
  "ava": "^5.3.1",
90
90
  "env-paths": "^3.0.0",
91
91
  "esbuild": "^0.19.5",
92
- "prettier": "^3.0.3",
92
+ "prettier": "^3.1.0",
93
93
  "ts-node": "^10.9.1",
94
94
  "tslib": "^2.6.2",
95
95
  "typescript": "^5.2.2"
96
96
  },
97
97
  "peerDependencies": {
98
- "@emnapi/runtime": "0.43.1",
98
+ "@emnapi/runtime": "0.44.0",
99
99
  "@tybys/wasm-util": "0.8.0",
100
- "emnapi": "0.43.1"
100
+ "emnapi": "0.44.0"
101
101
  },
102
102
  "peerDependenciesMeta": {
103
103
  "@emnapi/runtime": {
@@ -128,5 +128,5 @@
128
128
  "**/__tests__/**/*.spec.ts"
129
129
  ]
130
130
  },
131
- "gitHead": "2963cc9a033d203449db22d77941221ff4773674"
131
+ "gitHead": "6a4f4f173db28cf6bab15f193927fe99d3505da8"
132
132
  }
@@ -16,6 +16,7 @@ import { instantiateNapiModule as __emnapiInstantiateNapiModule } from '@emnapi/
16
16
  import { getDefaultContext as __emnapiGetDefaultContext } from '@emnapi/runtime'
17
17
 
18
18
  const __wasi = new __nodeWASI({
19
+ version: 'preview1',
19
20
  env: process.env,
20
21
  preopens: {
21
22
  '/': __nodePath.join(__nodeURL.fileURLToPath(import.meta.url), '..'),
@@ -543,6 +543,7 @@ jobs:
543
543
  with:
544
544
  node-version: 18
545
545
  cache: 'yarn'
546
+ registry-url: 'https://registry.npmjs.org'
546
547
 
547
548
  - name: 'Install dependencies'
548
549
  run: yarn install
@@ -561,19 +562,16 @@ jobs:
561
562
 
562
563
  - name: Publish
563
564
  run: |
564
- npm config set provenance true
565
565
  if git log -1 --pretty=%B | grep "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+$";
566
566
  then
567
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
568
- npm publish --access public
567
+ npm publish --access public --provenance
569
568
  elif git log -1 --pretty=%B | grep "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+";
570
569
  then
571
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
572
- npm publish --tag next --access public
570
+ npm publish --tag next --access public --provenance
573
571
  else
574
572
  echo "Not a release, skipping publish"
575
573
  fi
576
574
  env:
577
575
  GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
578
- NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
576
+ NODE_AUTH_TOKEN: \${{ secrets.NPM_TOKEN }}
579
577
  `