File tree Expand file tree Collapse file tree 3 files changed +84
-3
lines changed Expand file tree Collapse file tree 3 files changed +84
-3
lines changed Original file line number Diff line number Diff line change @@ -19851,6 +19851,46 @@ function getRegistryUrl() {
19851
19851
19852
19852
// src/utils.ts
19853
19853
var core2 = __toESM(require_core());
19854
+
19855
+ // package.json
19856
+ var package_default = {
19857
+ name: "crates-io-auth-action",
19858
+ version: "1.0.0",
19859
+ description: "Get a temporary access token that you can use to interact with crates.io.",
19860
+ private: true,
19861
+ scripts: {
19862
+ package: "tsup",
19863
+ format: "npx prettier --write .",
19864
+ lint: "npx eslint",
19865
+ test: "vitest"
19866
+ },
19867
+ engines: {
19868
+ node: ">=20"
19869
+ },
19870
+ repository: {
19871
+ type: "git",
19872
+ url: "git+https://github.com/rust-lang/crates-io-auth-action.git"
19873
+ },
19874
+ license: "MIT",
19875
+ bugs: {
19876
+ url: "https://github.com/rust-lang/crates-io-auth-action/issues"
19877
+ },
19878
+ homepage: "https://github.com/rust-lang/crates-io-auth-action#readme",
19879
+ devDependencies: {
19880
+ "@actions/core": "^1.11.1",
19881
+ "@types/node": "^20",
19882
+ eslint: "^9.28.0",
19883
+ msw: "^2.10.2",
19884
+ prettier: "^3.5.3",
19885
+ tslib: "^2.8.1",
19886
+ tsup: "^8.0.0",
19887
+ typescript: "^5.8.3",
19888
+ "typescript-eslint": "^8.34.0",
19889
+ vitest: "^3.2.4"
19890
+ }
19891
+ };
19892
+
19893
+ // src/utils.ts
19854
19894
var TOKEN_KEY = "token";
19855
19895
var REGISTRY_URL_KEY = "registryUrl";
19856
19896
function isErrorResponse(value) {
@@ -19893,7 +19933,7 @@ function getTokensEndpoint(registryUrl) {
19893
19933
return `${registryUrl}/api/v1/trusted_publishing/tokens`;
19894
19934
}
19895
19935
function userAgentValue() {
19896
- const packageVersion = "1.0.0" ;
19936
+ const packageVersion = package_default.version ;
19897
19937
return `crates-io-auth-action/${packageVersion}`;
19898
19938
}
19899
19939
function getUserAgent() {
Original file line number Diff line number Diff line change @@ -19832,6 +19832,46 @@ var core2 = __toESM(require_core());
19832
19832
19833
19833
// src/utils.ts
19834
19834
var core = __toESM(require_core());
19835
+
19836
+ // package.json
19837
+ var package_default = {
19838
+ name: "crates-io-auth-action",
19839
+ version: "1.0.0",
19840
+ description: "Get a temporary access token that you can use to interact with crates.io.",
19841
+ private: true,
19842
+ scripts: {
19843
+ package: "tsup",
19844
+ format: "npx prettier --write .",
19845
+ lint: "npx eslint",
19846
+ test: "vitest"
19847
+ },
19848
+ engines: {
19849
+ node: ">=20"
19850
+ },
19851
+ repository: {
19852
+ type: "git",
19853
+ url: "git+https://github.com/rust-lang/crates-io-auth-action.git"
19854
+ },
19855
+ license: "MIT",
19856
+ bugs: {
19857
+ url: "https://github.com/rust-lang/crates-io-auth-action/issues"
19858
+ },
19859
+ homepage: "https://github.com/rust-lang/crates-io-auth-action#readme",
19860
+ devDependencies: {
19861
+ "@actions/core": "^1.11.1",
19862
+ "@types/node": "^20",
19863
+ eslint: "^9.28.0",
19864
+ msw: "^2.10.2",
19865
+ prettier: "^3.5.3",
19866
+ tslib: "^2.8.1",
19867
+ tsup: "^8.0.0",
19868
+ typescript: "^5.8.3",
19869
+ "typescript-eslint": "^8.34.0",
19870
+ vitest: "^3.2.4"
19871
+ }
19872
+ };
19873
+
19874
+ // src/utils.ts
19835
19875
var TOKEN_KEY = "token";
19836
19876
var REGISTRY_URL_KEY = "registryUrl";
19837
19877
function isErrorResponse(value) {
@@ -19874,7 +19914,7 @@ function getTokensEndpoint(registryUrl) {
19874
19914
return `${registryUrl}/api/v1/trusted_publishing/tokens`;
19875
19915
}
19876
19916
function userAgentValue() {
19877
- const packageVersion = "1.0.0" ;
19917
+ const packageVersion = package_default.version ;
19878
19918
return `crates-io-auth-action/${packageVersion}`;
19879
19919
}
19880
19920
function getUserAgent() {
Original file line number Diff line number Diff line change 1
1
import * as core from "@actions/core" ;
2
+ import packageJson from "../package.json" ;
2
3
3
4
export const TOKEN_KEY = "token" ;
4
5
export const REGISTRY_URL_KEY = "registryUrl" ;
@@ -77,7 +78,7 @@ export function getTokensEndpoint(registryUrl: string): string {
77
78
}
78
79
79
80
function userAgentValue ( ) : string {
80
- const packageVersion = "1.0.0" ;
81
+ const packageVersion : string = packageJson . version ;
81
82
return `crates-io-auth-action/${ packageVersion } ` ;
82
83
}
83
84
You can’t perform that action at this time.
0 commit comments