From 807b86661f20b0d50c074dd0030820ab3e8ff335 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 13 Mar 2023 22:45:42 +0100 Subject: [PATCH] src: use JSON configuration and blob content for SEA --- doc/api/cli.md | 12 ++ doc/api/single-executable-applications.md | 91 +++++--- ...g-single-executable-application-support.md | 2 +- node.gyp | 2 + src/json_parser.cc | 80 +++++++ src/json_parser.h | 39 ++++ src/node.cc | 5 + src/node_errors.cc | 28 ++- src/node_errors.h | 16 ++ src/node_options.cc | 5 + src/node_options.h | 1 + src/node_sea.cc | 92 +++++++- src/node_sea.h | 3 +- .../test-single-executable-application.js | 28 ++- ...st-single-executable-blob-config-errors.js | 204 ++++++++++++++++++ .../test-single-executable-blob-config.js | 50 +++++ 16 files changed, 613 insertions(+), 45 deletions(-) create mode 100644 src/json_parser.cc create mode 100644 src/json_parser.h create mode 100644 test/parallel/test-single-executable-blob-config-errors.js create mode 100644 test/parallel/test-single-executable-blob-config.js diff --git a/doc/api/cli.md b/doc/api/cli.md index cda8232ac91d9f..0b0e643e5d71d7 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -588,6 +588,16 @@ added: v16.6.0 Use this flag to disable top-level await in REPL. +### `--experimental-sea-config` + + + +Use this flag to generate a blob that can be injected in to the Node.js +binary to produce a [single executable application][]. See the documentation +about [this configuration][`--experimental-sea-config`] for details. + ### `--experimental-shadow-realm`