@tahminator/pipeline 1.0.15 → 1.0.16
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/dist/npm/client.d.ts +2 -5
- package/dist/npm/client.js +7 -17
- package/package.json +1 -1
package/dist/npm/client.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export declare class NPMClient {
|
|
2
|
-
private readonly npmToken?;
|
|
3
2
|
private constructor();
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* __It is recommended that you use [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) now.__ Using tokens
|
|
4
|
+
* __You must use [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) now.__ Using tokens
|
|
8
5
|
* now are extremely flaky and should be avoided.
|
|
9
6
|
*
|
|
10
7
|
* __NOTE: Base yaml must have this property__
|
|
@@ -15,7 +12,7 @@ export declare class NPMClient {
|
|
|
15
12
|
* id-token: write # Required for OIDC
|
|
16
13
|
* ```
|
|
17
14
|
*/
|
|
18
|
-
static create(
|
|
15
|
+
static create(): Promise<NPMClient>;
|
|
19
16
|
/**
|
|
20
17
|
* @note You must ensure that the current root directory `package.json`
|
|
21
18
|
* is filled out with the name of the package and the version you would like to
|
package/dist/npm/client.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { $ } from "bun";
|
|
2
2
|
import { Utils } from "../utils";
|
|
3
3
|
export class NPMClient {
|
|
4
|
-
|
|
5
|
-
constructor(npmToken) {
|
|
6
|
-
this.npmToken = npmToken;
|
|
7
|
-
}
|
|
4
|
+
constructor() { }
|
|
8
5
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* __It is recommended that you use [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) now.__ Using tokens
|
|
6
|
+
* __You must use [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) now.__ Using tokens
|
|
12
7
|
* now are extremely flaky and should be avoided.
|
|
13
8
|
*
|
|
14
9
|
* __NOTE: Base yaml must have this property__
|
|
@@ -19,11 +14,9 @@ export class NPMClient {
|
|
|
19
14
|
* id-token: write # Required for OIDC
|
|
20
15
|
* ```
|
|
21
16
|
*/
|
|
22
|
-
static async create(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
return new this(npmToken);
|
|
17
|
+
static async create() {
|
|
18
|
+
// await $`npm config set //registry.npmjs.org/:_authToken=${npmToken}`;
|
|
19
|
+
return new this();
|
|
27
20
|
}
|
|
28
21
|
/**
|
|
29
22
|
* @note You must ensure that the current root directory `package.json`
|
|
@@ -38,16 +31,13 @@ export class NPMClient {
|
|
|
38
31
|
console.log(await $ `pwd`.text());
|
|
39
32
|
console.log(await $ `cat ./package.json`.text());
|
|
40
33
|
}
|
|
41
|
-
|
|
42
|
-
await $ `npm publish --access public ${provenanceFlag} ${dryRunFlag} ./`;
|
|
34
|
+
await $ `npm publish --access public --provenance ${dryRunFlag} ./`;
|
|
43
35
|
console.log("Package has been successfully published");
|
|
44
36
|
}
|
|
45
37
|
async [Symbol.asyncDispose]() {
|
|
46
38
|
await this.cleanup();
|
|
47
39
|
}
|
|
48
40
|
async cleanup() {
|
|
49
|
-
|
|
50
|
-
await $ `npm logout`;
|
|
51
|
-
}
|
|
41
|
+
// await $`npm logout`;
|
|
52
42
|
}
|
|
53
43
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Tahmid Ahmed",
|
|
5
5
|
"description": "A collection of Bun shell scripts that can be re-used in various CICD pipelines.",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.16",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "git+https://github.com/tahminator/pipeline.git"
|
|
9
9
|
},
|