From 2bde0059ca7d0264ef38dbe5af7ada2580a23748 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sun, 9 Apr 2023 20:31:15 +0200 Subject: [PATCH] sea: use JSON configuration and blob content for SEA PR-URL: https://github.com/nodejs/node/pull/47125 Refs: https://github.com/nodejs/single-executable/discussions/58 Reviewed-By: Darshan Sen --- doc/api/cli.md | 14 ++ doc/api/single-executable-applications.md | 93 +++++--- ...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 | 114 +++++++++- 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, 639 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 a866f73de17ac0..04086661ea8048 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -594,6 +594,18 @@ added: v16.6.0 Use this flag to disable top-level await in REPL. +### `--experimental-sea-config` + + + +> Stability: 1 - Experimental + +Use this flag to generate a blob that can be injected into the Node.js +binary to produce a [single executable application][]. See the documentation +about [this configuration][`--experimental-sea-config`] for details. + ### `--experimental-shadow-realm`