@reboot-dev/reboot 0.25.7 → 0.26.0

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/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export declare class Reboot {
19
19
  stop(): Promise<void>;
20
20
  up(application: Application, options?: {
21
21
  localEnvoy?: boolean;
22
+ localEnvoyPort?: number;
22
23
  }): Promise<ApplicationRevision>;
23
24
  down(): Promise<void>;
24
25
  url(): string;
package/index.js CHANGED
@@ -91,7 +91,7 @@ export class Reboot {
91
91
  async up(application, options) {
92
92
  // TODO(benh): determine module and file name so that we can
93
93
  // namespace if we have more than one implementation of servicers.
94
- return await reboot_native.Reboot_up(__classPrivateFieldGet(this, _Reboot_external, "f"), application.__external, options?.localEnvoy);
94
+ return await reboot_native.Reboot_up(__classPrivateFieldGet(this, _Reboot_external, "f"), application.__external, options?.localEnvoy, options?.localEnvoyPort);
95
95
  }
96
96
  async down() {
97
97
  await reboot_native.Reboot_down(__classPrivateFieldGet(this, _Reboot_external, "f"));
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "@bufbuild/protobuf": "1.3.2",
4
4
  "@bufbuild/protoplugin": "1.3.2",
5
5
  "@bufbuild/protoc-gen-es": "1.3.2",
6
- "@reboot-dev/reboot-api": "0.25.7",
6
+ "@reboot-dev/reboot-api": "0.26.0",
7
7
  "chalk": "^4.1.2",
8
8
  "node-addon-api": "^7.0.0",
9
9
  "node-gyp": ">=10.2.0",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "type": "module",
18
18
  "name": "@reboot-dev/reboot",
19
- "version": "0.25.7",
19
+ "version": "0.26.0",
20
20
  "description": "npm package for Reboot",
21
21
  "scripts": {
22
22
  "postinstall": "rbt || exit 0",
package/reboot_native.cc CHANGED
@@ -1666,6 +1666,11 @@ Napi::Value Reboot_up(const Napi::CallbackInfo& info) {
1666
1666
  local_envoy = info[2].As<Napi::Boolean>();
1667
1667
  }
1668
1668
 
1669
+ int local_envoy_port = 0;
1670
+ if (!info[3].IsUndefined()) {
1671
+ local_envoy_port = info[3].As<Napi::Number>().Int32Value();
1672
+ }
1673
+
1669
1674
  return NodePromiseFromPythonTask(
1670
1675
  info.Env(),
1671
1676
  "Reboot.up(...) in nodejs",
@@ -1674,7 +1679,8 @@ Napi::Value Reboot_up(const Napi::CallbackInfo& info) {
1674
1679
  py_reboot,
1675
1680
  js_external_application, // Ensures `py_application` remains valid.
1676
1681
  py_application,
1677
- local_envoy]() {
1682
+ local_envoy,
1683
+ local_envoy_port]() {
1678
1684
  return py_reboot->attr("up")(
1679
1685
  py_application,
1680
1686
  // NOTE: while we support subprocess consensuses
@@ -1683,7 +1689,8 @@ Napi::Value Reboot_up(const Napi::CallbackInfo& info) {
1683
1689
  // clone a process like we do with multiprocessing
1684
1690
  // in Python.
1685
1691
  "in_process"_a = true,
1686
- "local_envoy"_a = local_envoy);
1692
+ "local_envoy"_a = local_envoy,
1693
+ "local_envoy_port"_a = local_envoy_port);
1687
1694
  },
1688
1695
  [](py::object py_revision) {
1689
1696
  py::str py_application_id =
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const REBOOT_VERSION = "0.25.7";
1
+ export declare const REBOOT_VERSION = "0.26.0";
package/version.js CHANGED
@@ -1 +1 @@
1
- export const REBOOT_VERSION = "0.25.7";
1
+ export const REBOOT_VERSION = "0.26.0";