Skip to content

Commit

Permalink
Fix client process token expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Jul 23, 2024
1 parent 50ae8da commit c5e399a
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To install Pup, make sure you run the latest version of your runtime environment
**Deno**:

```bash
deno run -Ar jsr:@pup/pup@1.0.0-rc.42 setup --channel prerelease
deno run -Ar jsr:@pup/pup@1.0.0-rc.43 setup --channel prerelease
```

This command downloads the latest version of Pup and installs it on your system. The `--channel prerelease` option is included as there is no stable version of Pup yet. Read more abour release
Expand Down
2 changes: 1 addition & 1 deletion application.meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const Application = {
name: "pup",
version: "1.0.0-rc.42",
version: "1.0.0-rc.43",
url: "jsr:@pup/pup@$VERSION",
description: "Powerful universal process manager, designed to keep your scripts, applications and services alive.",
canary_url: "https://raw.githubusercontent.com/Hexagon/pup/main/pup.ts",
Expand Down
18 changes: 9 additions & 9 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pup/pup",
"version": "1.0.0-rc.42",
"version": "1.0.0-rc.43",

"exports": {
".": "./pup.ts",
Expand Down Expand Up @@ -39,23 +39,23 @@
"@cross/deepmerge": "jsr:@cross/deepmerge@~1.0.0",
"@cross/env": "jsr:@cross/env@~1.0.2",
"@cross/fs": "jsr:@cross/fs@~0.1.11",
"@cross/jwt": "jsr:@cross/jwt@~0.4.7",
"@cross/kv": "jsr:@cross/kv@^0.16.3",
"@cross/jwt": "jsr:@cross/jwt@~0.5.0",
"@cross/kv": "jsr:@cross/kv@~0.16.3",
"@cross/runtime": "jsr:@cross/runtime@~1.0.0",
"@cross/service": "jsr:@cross/service@~1.0.3",
"@cross/test": "jsr:@cross/test@~0.0.9",
"@cross/utils": "jsr:@cross/utils@~0.13.0",
"@hexagon/croner": "jsr:@hexagon/croner@^8.0.2",
"@oak/oak": "jsr:@oak/oak@^16.1.0",
"@hexagon/croner": "jsr:@hexagon/croner@~8.1.0",
"@oak/oak": "jsr:@oak/oak@~16.1.0",
"@pup/api-client": "jsr:@pup/api-client@~2.0.0",
"@pup/api-definitions": "jsr:@pup/api-definitions@~2.0.0",
"@pup/common": "jsr:@pup/common@~1.0.3",
"@pup/plugin": "jsr:@pup/plugin@~1.0.1",
"@std/assert": "jsr:@std/assert@^0.226.0",
"@std/async": "jsr:@std/async@~0.224.0",
"@std/encoding": "jsr:@std/encoding@^1.0.0",
"@std/assert": "jsr:@std/assert@~1.0.0",
"@std/async": "jsr:@std/async@~1.0.0",
"@std/encoding": "jsr:@std/encoding@~1.0.0",
"@std/io": "jsr:@std/io@~0.224.0",
"@std/path": "jsr:@std/path@^0.225.1",
"@std/path": "jsr:@std/path@~1.0.1",
"@std/semver": "jsr:@std/semver@~0.224.0",
"dax-sh": "npm:dax-sh@~0.41.0",
"filesize": "npm:filesize@~10.1.1",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "Universal Process Manager"
},
"substitute": {
"$PUP_VERSION": "1.0.0-rc.42"
"$PUP_VERSION": "1.0.0-rc.43"
},
"top_links": [
{
Expand Down
4 changes: 4 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ nav_order: 13

All notable changes to this project will be documented in this section.

## [1.0.0-rc.43] - 2024-07-23

- fix(core): Fix child process API token expiration

## [1.0.0-rc.42] - 2024-07-03

- fix(core): Add allow-ffi permission for cbor-x
Expand Down
4 changes: 3 additions & 1 deletion lib/core/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ class Runner extends BaseRunner {
// - PUP_API_PORT
if (this.pup.port?.load()) env.PUP_API_PORT = this.pup.port.fromCache()!
// - PUP_API_TOKEN
if (this.pup.secret?.load()) env.PUP_API_TOKEN = await GenerateToken(await this.pup.secret?.load(), { consumer: "telemetry-" + this.processConfig.id }, new Date().getTime() + 365 * 24 * 60 * 60)
if (this.pup.secret?.load()) {
env.PUP_API_TOKEN = await GenerateToken(await this.pup.secret?.load(), { consumer: "telemetry-" + this.processConfig.id }, new Date().getTime() + (365 * 24 * 60 * 60 * 1000))
}

// Transfer path from process config if specified
if (this.processConfig.path) {
Expand Down
15 changes: 15 additions & 0 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
"canary_url": "https://raw.githubusercontent.com/Hexagon/pup/main/pup.ts",
"stable": [],
"prerelease": [
{
"version": "1.0.0-rc.43",
"url": "jsr:@pup/pup@1.0.0-rc.43",
"deno": "1.43.0",
"deno_unstable": "1.43.0",
"default_permissions": [
"--allow-env",
"--allow-read",
"--allow-write",
"--allow-sys=loadavg,systemMemoryInfo,osUptime,osRelease,uid,gid",
"--allow-net",
"--allow-run",
"--allow-ffi"
]
},
{
"version": "1.0.0-rc.42",
"url": "jsr:@pup/pup@1.0.0-rc.42",
Expand Down

0 comments on commit c5e399a

Please sign in to comment.