automovie 0.1.0 → 0.2.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/README.md +25 -13
- package/lib/AUTOMOVIE_CAPTURE_OPTIONS.d.ts +6 -0
- package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js +16 -0
- package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js.map +1 -0
- package/lib/AUTOMOVIE_INSPECT_OPTIONS.d.ts +6 -0
- package/lib/AUTOMOVIE_INSPECT_OPTIONS.js +14 -0
- package/lib/AUTOMOVIE_INSPECT_OPTIONS.js.map +1 -0
- package/lib/AUTOMOVIE_RENDER_OPTIONS.d.ts +6 -0
- package/lib/AUTOMOVIE_RENDER_OPTIONS.js +15 -0
- package/lib/AUTOMOVIE_RENDER_OPTIONS.js.map +1 -0
- package/lib/AUTOMOVIE_REVIEW_OPTIONS.d.ts +6 -0
- package/lib/AUTOMOVIE_REVIEW_OPTIONS.js +14 -0
- package/lib/AUTOMOVIE_REVIEW_OPTIONS.js.map +1 -0
- package/lib/AutoMovieCaptureBackend.d.ts +9 -0
- package/lib/{IAutoMoviePackageManager.js → AutoMovieCaptureBackend.js} +1 -1
- package/lib/AutoMovieCaptureBackend.js.map +1 -0
- package/lib/AutoMovieCaptureHost.d.ts +114 -0
- package/lib/AutoMovieCaptureHost.js +219 -0
- package/lib/AutoMovieCaptureHost.js.map +1 -0
- package/lib/AutoMovieCommand.d.ts +24 -13
- package/lib/IAutoMovieChromium.d.ts +75 -0
- package/lib/IAutoMovieChromium.js +3 -0
- package/lib/IAutoMovieChromium.js.map +1 -0
- package/lib/captureAutoMovie.d.ts +23 -0
- package/lib/captureAutoMovie.js +133 -0
- package/lib/captureAutoMovie.js.map +1 -0
- package/lib/deriveAutoMovieProjectName.d.ts +1 -1
- package/lib/deriveAutoMovieProjectName.js +1 -1
- package/lib/findAutoMovieFreePort.d.ts +14 -0
- package/lib/findAutoMovieFreePort.js +61 -0
- package/lib/findAutoMovieFreePort.js.map +1 -0
- package/lib/formatAutoMovieInspectUrl.d.ts +14 -0
- package/lib/formatAutoMovieInspectUrl.js +24 -0
- package/lib/formatAutoMovieInspectUrl.js.map +1 -0
- package/lib/index.d.ts +30 -2
- package/lib/index.js +30 -2
- package/lib/index.js.map +1 -1
- package/lib/inspectAutoMovie.d.ts +19 -0
- package/lib/inspectAutoMovie.js +97 -0
- package/lib/inspectAutoMovie.js.map +1 -0
- package/lib/launchAutoMovieChromium.d.ts +28 -0
- package/lib/launchAutoMovieChromium.js +42 -0
- package/lib/launchAutoMovieChromium.js.map +1 -0
- package/lib/loadAutoMovieProductionModule.d.ts +14 -0
- package/lib/loadAutoMovieProductionModule.js +61 -0
- package/lib/loadAutoMovieProductionModule.js.map +1 -0
- package/lib/planAutoMovieChromiumLaunch.d.ts +27 -0
- package/lib/planAutoMovieChromiumLaunch.js +34 -0
- package/lib/planAutoMovieChromiumLaunch.js.map +1 -0
- package/lib/planAutoMovieModulePageViteConfig.d.ts +37 -0
- package/lib/planAutoMovieModulePageViteConfig.js +27 -0
- package/lib/planAutoMovieModulePageViteConfig.js.map +1 -0
- package/lib/readAutoMovieAddArguments.d.ts +1 -1
- package/lib/readAutoMovieAddArguments.js +1 -1
- package/lib/readAutoMovieCaptureHostOptions.d.ts +36 -0
- package/lib/readAutoMovieCaptureHostOptions.js +57 -0
- package/lib/readAutoMovieCaptureHostOptions.js.map +1 -0
- package/lib/readAutoMovieCommandArguments.d.ts +1 -1
- package/lib/readAutoMovieCommandArguments.js +10 -5
- package/lib/readAutoMovieCommandArguments.js.map +1 -1
- package/lib/readAutoMovieCreateArguments.d.ts +1 -1
- package/lib/readAutoMovieCreateArguments.js +1 -1
- package/lib/readAutoMovieInspectHostOptions.d.ts +29 -0
- package/lib/readAutoMovieInspectHostOptions.js +48 -0
- package/lib/readAutoMovieInspectHostOptions.js.map +1 -0
- package/lib/readAutoMovieRenderOptions.d.ts +33 -0
- package/lib/readAutoMovieRenderOptions.js +51 -0
- package/lib/readAutoMovieRenderOptions.js.map +1 -0
- package/lib/readAutoMovieReviewOptions.d.ts +27 -0
- package/lib/readAutoMovieReviewOptions.js +54 -0
- package/lib/readAutoMovieReviewOptions.js.map +1 -0
- package/lib/readAutoMovieRevision.d.ts +12 -0
- package/lib/readAutoMovieRevision.js +32 -0
- package/lib/readAutoMovieRevision.js.map +1 -0
- package/lib/readAutoMovieVideoProbe.d.ts +23 -0
- package/lib/readAutoMovieVideoProbe.js +39 -0
- package/lib/readAutoMovieVideoProbe.js.map +1 -0
- package/lib/recordAutoMoviePlayback.d.ts +37 -0
- package/lib/recordAutoMoviePlayback.js +122 -0
- package/lib/recordAutoMoviePlayback.js.map +1 -0
- package/lib/renderAutoMovie.d.ts +21 -0
- package/lib/renderAutoMovie.js +95 -0
- package/lib/renderAutoMovie.js.map +1 -0
- package/lib/renderAutoMovieScaffoldNextSteps.d.ts +3 -5
- package/lib/renderAutoMovieScaffoldNextSteps.js +5 -14
- package/lib/renderAutoMovieScaffoldNextSteps.js.map +1 -1
- package/lib/renderAutoMovieVideo.d.ts +35 -0
- package/lib/renderAutoMovieVideo.js +110 -0
- package/lib/renderAutoMovieVideo.js.map +1 -0
- package/lib/resolveAutoMovieFfmpeg.d.ts +19 -0
- package/lib/resolveAutoMovieFfmpeg.js +32 -0
- package/lib/resolveAutoMovieFfmpeg.js.map +1 -0
- package/lib/reviewAutoMovie.d.ts +21 -0
- package/lib/reviewAutoMovie.js +71 -0
- package/lib/reviewAutoMovie.js.map +1 -0
- package/lib/run.d.ts +14 -11
- package/lib/run.js +103 -67
- package/lib/run.js.map +1 -1
- package/lib/runAutoMovieFfmpeg.d.ts +14 -0
- package/lib/runAutoMovieFfmpeg.js +40 -0
- package/lib/runAutoMovieFfmpeg.js.map +1 -0
- package/lib/serveAutoMovieDrawPage.d.ts +28 -0
- package/lib/serveAutoMovieDrawPage.js +108 -0
- package/lib/serveAutoMovieDrawPage.js.map +1 -0
- package/lib/serveAutoMovieInspectorPage.d.ts +32 -0
- package/lib/serveAutoMovieInspectorPage.js +52 -0
- package/lib/serveAutoMovieInspectorPage.js.map +1 -0
- package/lib/writeAutoMovieModulePage.d.ts +38 -0
- package/lib/writeAutoMovieModulePage.js +75 -0
- package/lib/writeAutoMovieModulePage.js.map +1 -0
- package/package.json +26 -5
- package/src/AUTOMOVIE_CAPTURE_OPTIONS.ts +12 -0
- package/src/AUTOMOVIE_INSPECT_OPTIONS.ts +10 -0
- package/src/AUTOMOVIE_RENDER_OPTIONS.ts +11 -0
- package/src/AUTOMOVIE_REVIEW_OPTIONS.ts +10 -0
- package/src/AutoMovieCaptureBackend.ts +9 -0
- package/src/AutoMovieCaptureHost.ts +245 -0
- package/src/AutoMovieCommand.ts +28 -13
- package/src/IAutoMovieChromium.ts +78 -0
- package/src/captureAutoMovie.ts +148 -0
- package/src/deriveAutoMovieProjectName.ts +1 -1
- package/src/findAutoMovieFreePort.ts +27 -0
- package/src/formatAutoMovieInspectUrl.ts +25 -0
- package/src/index.ts +30 -2
- package/src/inspectAutoMovie.ts +81 -0
- package/src/launchAutoMovieChromium.ts +61 -0
- package/src/loadAutoMovieProductionModule.ts +30 -0
- package/src/planAutoMovieChromiumLaunch.ts +45 -0
- package/src/planAutoMovieModulePageViteConfig.ts +53 -0
- package/src/readAutoMovieAddArguments.ts +1 -1
- package/src/readAutoMovieCaptureHostOptions.ts +76 -0
- package/src/readAutoMovieCommandArguments.ts +6 -4
- package/src/readAutoMovieCreateArguments.ts +1 -1
- package/src/readAutoMovieInspectHostOptions.ts +66 -0
- package/src/readAutoMovieRenderOptions.ts +67 -0
- package/src/readAutoMovieReviewOptions.ts +70 -0
- package/src/readAutoMovieRevision.ts +29 -0
- package/src/readAutoMovieVideoProbe.ts +55 -0
- package/src/recordAutoMoviePlayback.ts +168 -0
- package/src/renderAutoMovie.ts +86 -0
- package/src/renderAutoMovieScaffoldNextSteps.ts +4 -18
- package/src/renderAutoMovieVideo.ts +127 -0
- package/src/resolveAutoMovieFfmpeg.ts +33 -0
- package/src/reviewAutoMovie.ts +65 -0
- package/src/run.ts +116 -105
- package/src/runAutoMovieFfmpeg.ts +50 -0
- package/src/serveAutoMovieDrawPage.ts +105 -0
- package/src/serveAutoMovieInspectorPage.ts +82 -0
- package/src/writeAutoMovieModulePage.ts +83 -0
- package/lib/IAutoMoviePackageManager.d.ts +0 -14
- package/lib/IAutoMoviePackageManager.js.map +0 -1
- package/lib/readAutoMovieSyncArguments.d.ts +0 -13
- package/lib/readAutoMovieSyncArguments.js +0 -49
- package/lib/readAutoMovieSyncArguments.js.map +0 -1
- package/lib/selectAutoMoviePackageManager.d.ts +0 -23
- package/lib/selectAutoMoviePackageManager.js +0 -70
- package/lib/selectAutoMoviePackageManager.js.map +0 -1
- package/src/IAutoMoviePackageManager.ts +0 -15
- package/src/readAutoMovieSyncArguments.ts +0 -48
- package/src/selectAutoMoviePackageManager.ts +0 -45
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.inspectAutoMovie = inspectAutoMovie;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const formatAutoMovieInspectUrl_1 = require("./formatAutoMovieInspectUrl");
|
|
40
|
+
const loadAutoMovieProductionModule_1 = require("./loadAutoMovieProductionModule");
|
|
41
|
+
const readAutoMovieInspectHostOptions_1 = require("./readAutoMovieInspectHostOptions");
|
|
42
|
+
const serveAutoMovieInspectorPage_1 = require("./serveAutoMovieInspectorPage");
|
|
43
|
+
/**
|
|
44
|
+
* Run `automovie inspect` in a production or package: serve the inspector page over a subject module, print its address with the request as the query, and keep serving until the process is interrupted.
|
|
45
|
+
*
|
|
46
|
+
* Options are read by the production's `readAutoMovieCaptureArguments` and split by `readAutoMovieInspectHostOptions`; the rest is read by `parseAutoMovieCapturePlanRequest`, so a request the capture command would refuse is refused here before anything is served, as is a `--props` file that is not JSON, and an accepted one is written back by `formatAutoMovieCapturePlanRequest` as the address's query. `@automovie/render`, `vite`, and through the page `@automovie/viewer`, `react` and `react-dom`, come from the production. On SIGINT or SIGTERM the server stops, the page is deleted, and the status is 0; a refusal throws to `run`, which prints it.
|
|
47
|
+
*
|
|
48
|
+
* @evidence contracts/development/common.md#meaningful-documentation States how options are read and checked, what is served and printed, which packages come from the production, how the command ends and its status.
|
|
49
|
+
* @evidence contracts/development/implementation.md#principled-implementation Every rule of the request is the render package's and every rule of the page the viewer's; the command loads them from the production, serves, and reports, as `automovie capture` does.
|
|
50
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Read, serve, print, wait, close.
|
|
51
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A request is read before the server starts, so a mistyped key never opens a page that silently ignores it.
|
|
52
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One server for the command's life.
|
|
53
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work One page per command.
|
|
54
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The server and its page are closed when the process is interrupted; the signal listeners are removed with them.
|
|
55
|
+
*/
|
|
56
|
+
async function inspectAutoMovie(props) {
|
|
57
|
+
const { root } = props;
|
|
58
|
+
const render = (0, loadAutoMovieProductionModule_1.loadAutoMovieProductionModule)(root, "@automovie/render");
|
|
59
|
+
const options = (0, readAutoMovieInspectHostOptions_1.readAutoMovieInspectHostOptions)(render.readAutoMovieCaptureArguments(props.args));
|
|
60
|
+
const request = render.parseAutoMovieCapturePlanRequest(options.request);
|
|
61
|
+
// The module's props, read before anything is served.
|
|
62
|
+
let data = null;
|
|
63
|
+
if (options.props !== null) {
|
|
64
|
+
const file = path.resolve(root, options.props);
|
|
65
|
+
try {
|
|
66
|
+
data = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
throw new Error(`Inspect --props ${file} is not a readable JSON file`, {
|
|
70
|
+
cause: error,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Vite's CommonJS entry warns once per load; the command loads it on purpose.
|
|
75
|
+
process.env.VITE_CJS_IGNORE_WARNING = "true";
|
|
76
|
+
const page = await (0, serveAutoMovieInspectorPage_1.serveAutoMovieInspectorPage)({
|
|
77
|
+
root,
|
|
78
|
+
module: options.module,
|
|
79
|
+
vite: (0, loadAutoMovieProductionModule_1.loadAutoMovieProductionModule)(root, "vite"),
|
|
80
|
+
port: options.port,
|
|
81
|
+
props: data,
|
|
82
|
+
});
|
|
83
|
+
process.stdout.write(`inspect ${options.module}: ${(0, formatAutoMovieInspectUrl_1.formatAutoMovieInspectUrl)(page.url, render.formatAutoMovieCapturePlanRequest(request))}\nPress Ctrl+C to stop.\n`);
|
|
84
|
+
// Serve until interrupted.
|
|
85
|
+
await new Promise((resolve) => {
|
|
86
|
+
const stop = () => {
|
|
87
|
+
process.off("SIGINT", stop);
|
|
88
|
+
process.off("SIGTERM", stop);
|
|
89
|
+
resolve(undefined);
|
|
90
|
+
};
|
|
91
|
+
process.on("SIGINT", stop);
|
|
92
|
+
process.on("SIGTERM", stop);
|
|
93
|
+
});
|
|
94
|
+
await page.close();
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=inspectAutoMovie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspectAutoMovie.js","sourceRoot":"","sources":["../src/inspectAutoMovie.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,EAAE,oCAAgB;AAC9B,MAAY,IAAI,sCAAkB;AAElC,2EAAwE;AACxE,mFAAgF;AAChF,uFAAoF;AACpF,+EAA4E;AAE5E;;;;;;;;;;;;GAYG;AACI,KAAK,2BAA2B,KAMtC;IACC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,MAAM,GAAkB,IAAA,6DAA6B,EACzD,IAAI,EACJ,mBAAmB,CACH,CAAC;IACnB,MAAM,OAAO,GACX,IAAA,iEAA+B,EAC7B,MAAM,CAAC,6BAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,CACjD,CAAC;IACJ,MAAM,OAAO,GACX,MAAM,CAAC,gCAAgC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3D,sDAAsD;IACtD,IAAI,IAAI,GAAY,IAAI,CAAC;IACzB,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAW,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACvD,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY,CAAC;QAC9D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,8BAA8B,EAAE;gBACrE,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,8EAA8E;IAC9E,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC;IAC7C,MAAM,IAAI,GACR,MAAM,IAAA,yDAA2B,EAAC;QAChC,IAAI;QACJ,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,IAAA,6DAA6B,EAAC,IAAI,EAAE,MAAM,CAAC;QACjD,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;IACL,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,WAAW,OAAO,CAAC,MAAM,KAAK,IAAA,qDAAyB,EAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAC,2BAA2B,CAChJ,CAAC;IAEF,2BAA2B;IAC3B,MAAM,IAAI,OAAO,CAAY,CAAC,OAAmC,EAAQ,EAAE;QACzE,MAAM,IAAI,GAAe,GAAS,EAAE;YAClC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YAC7B,OAAO,CAAC,SAAS,CAAC,CAAC;QACrB,CAAC,CAAC;QACF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC3B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACnB,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AutoMovieCaptureBackend } from "./AutoMovieCaptureBackend";
|
|
2
|
+
import type { IAutoMovieChromium } from "./IAutoMovieChromium";
|
|
3
|
+
/**
|
|
4
|
+
* Launch headless Chromium for a capture backend, and describe the launch the way a record names it: the backend, then the Chromium version.
|
|
5
|
+
*
|
|
6
|
+
* A launch that fails because the browser executable is missing is rethrown as an error naming `npx playwright-core install chromium-headless-shell` and `CHROME_PATH`; any other failure is rethrown with the backend named.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/development/common.md#meaningful-documentation States what is launched, the description's form and both failures.
|
|
9
|
+
* @evidence contracts/development/implementation.md#principled-implementation Switches come from `planAutoMovieChromiumLaunch`; Playwright reports a missing browser as an executable that does not exist, which is the message matched, so only that case is turned into the install instruction.
|
|
10
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Plan, launch, describe.
|
|
11
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No other browser or backend is tried after a failure.
|
|
12
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One launch.
|
|
13
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each capture host launches its own browser.
|
|
14
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned browser is the caller's to close; a failed launch leaves none.
|
|
15
|
+
*/
|
|
16
|
+
export declare function launchAutoMovieChromium(props: {
|
|
17
|
+
/** Playwright's `chromium`, loaded from the production. */
|
|
18
|
+
chromium: IAutoMovieChromium;
|
|
19
|
+
/** How the browser draws. */
|
|
20
|
+
backend: AutoMovieCaptureBackend;
|
|
21
|
+
/** The environment, read for `CHROME_PATH`. */
|
|
22
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
/** The launched browser. */
|
|
25
|
+
browser: IAutoMovieChromium.IBrowser;
|
|
26
|
+
/** The backend and Chromium version, such as `swiftshader; Chromium 131.0.6778.33`. */
|
|
27
|
+
backend: string;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.launchAutoMovieChromium = launchAutoMovieChromium;
|
|
4
|
+
const planAutoMovieChromiumLaunch_1 = require("./planAutoMovieChromiumLaunch");
|
|
5
|
+
/** The command that installs the Chromium build the production's `playwright-core` pins for headless use; `playwright-core`'s own command, so the revision is the one the production launches. */
|
|
6
|
+
const INSTALL = "npx playwright-core install chromium-headless-shell";
|
|
7
|
+
/**
|
|
8
|
+
* Launch headless Chromium for a capture backend, and describe the launch the way a record names it: the backend, then the Chromium version.
|
|
9
|
+
*
|
|
10
|
+
* A launch that fails because the browser executable is missing is rethrown as an error naming `npx playwright-core install chromium-headless-shell` and `CHROME_PATH`; any other failure is rethrown with the backend named.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation States what is launched, the description's form and both failures.
|
|
13
|
+
* @evidence contracts/development/implementation.md#principled-implementation Switches come from `planAutoMovieChromiumLaunch`; Playwright reports a missing browser as an executable that does not exist, which is the message matched, so only that case is turned into the install instruction.
|
|
14
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Plan, launch, describe.
|
|
15
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No other browser or backend is tried after a failure.
|
|
16
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One launch.
|
|
17
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each capture host launches its own browser.
|
|
18
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned browser is the caller's to close; a failed launch leaves none.
|
|
19
|
+
*/
|
|
20
|
+
async function launchAutoMovieChromium(props) {
|
|
21
|
+
const plan = (0, planAutoMovieChromiumLaunch_1.planAutoMovieChromiumLaunch)(props.backend, props.env);
|
|
22
|
+
let browser;
|
|
23
|
+
try {
|
|
24
|
+
browser = await props.chromium.launch({
|
|
25
|
+
headless: true,
|
|
26
|
+
args: plan.args,
|
|
27
|
+
...(plan.executablePath === undefined
|
|
28
|
+
? {}
|
|
29
|
+
: { executablePath: plan.executablePath }),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
34
|
+
if (/executable doesn't exist|executable does not exist/iu.test(message))
|
|
35
|
+
throw new Error(`No Chromium is installed for capture; run ${INSTALL} in the production, or set CHROME_PATH to a Chromium executable`, { cause: error });
|
|
36
|
+
throw new Error(`Chromium did not start for the ${plan.name} backend`, {
|
|
37
|
+
cause: error,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return { browser, backend: `${plan.name}; Chromium ${browser.version()}` };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=launchAutoMovieChromium.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launchAutoMovieChromium.js","sourceRoot":"","sources":["../src/launchAutoMovieChromium.ts"],"names":[],"mappings":";;;AAEA,+EAA4E;AAE5E,kMAAkM;AAClM,MAAM,OAAO,GAAW,qDAAqD,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACI,KAAK,kCAAkC,KAS7C;IAOC,MAAM,IAAI,GACR,IAAA,yDAA2B,EAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,IAAI,OAAoC,CAAC;IACzC,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;YACpC,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS;gBACnC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC;SAC7C,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACzD,IAAI,sDAAsD,CAAC,IAAI,CAAC,OAAO,CAAC;YACtE,MAAM,IAAI,KAAK,CACb,6CAA6C,OAAO,iEAAiE,EACrH,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;QACJ,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,CAAC,IAAI,UAAU,EAAE;YACrE,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,cAAc,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load a package as the production at `root` resolves it, for the capture host's optional peers: `@automovie/render`, `vite`, `playwright-core` and `ffmpeg-static`.
|
|
3
|
+
*
|
|
4
|
+
* The command itself depends on none of them, so `npx automovie create` installs nothing a capture needs; a production that captures installs them, and this resolves the copies it installed. It throws naming the package and the production when it is not installed there.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/development/common.md#meaningful-documentation States which packages it serves, why they come from the production, and the refusal.
|
|
7
|
+
* @evidence contracts/development/implementation.md#principled-implementation `createRequire` anchored at the production's `package.json` applies Node's resolution from that folder, the same copy the production's own scripts import.
|
|
8
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One anchored require.
|
|
9
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No copy beside the command is tried, so a capture never draws with a renderer the production did not install.
|
|
10
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One resolution; Node caches the module.
|
|
11
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Node's module cache serves a second load of the same package.
|
|
12
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The module stays in Node's cache for the process, as any import does.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadAutoMovieProductionModule(root: string, id: string): unknown;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.loadAutoMovieProductionModule = loadAutoMovieProductionModule;
|
|
37
|
+
const node_module_1 = require("node:module");
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
/**
|
|
40
|
+
* Load a package as the production at `root` resolves it, for the capture host's optional peers: `@automovie/render`, `vite`, `playwright-core` and `ffmpeg-static`.
|
|
41
|
+
*
|
|
42
|
+
* The command itself depends on none of them, so `npx automovie create` installs nothing a capture needs; a production that captures installs them, and this resolves the copies it installed. It throws naming the package and the production when it is not installed there.
|
|
43
|
+
*
|
|
44
|
+
* @evidence contracts/development/common.md#meaningful-documentation States which packages it serves, why they come from the production, and the refusal.
|
|
45
|
+
* @evidence contracts/development/implementation.md#principled-implementation `createRequire` anchored at the production's `package.json` applies Node's resolution from that folder, the same copy the production's own scripts import.
|
|
46
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One anchored require.
|
|
47
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No copy beside the command is tried, so a capture never draws with a renderer the production did not install.
|
|
48
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One resolution; Node caches the module.
|
|
49
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Node's module cache serves a second load of the same package.
|
|
50
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The module stays in Node's cache for the process, as any import does.
|
|
51
|
+
*/
|
|
52
|
+
function loadAutoMovieProductionModule(root, id) {
|
|
53
|
+
const load = (0, node_module_1.createRequire)(path.join(root, "package.json"));
|
|
54
|
+
try {
|
|
55
|
+
return load(id);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
throw new Error(`${id} is not installed in ${root}; capture loads it from the production, so add it to the production's dependencies`, { cause: error });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=loadAutoMovieProductionModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadAutoMovieProductionModule.js","sourceRoot":"","sources":["../src/loadAutoMovieProductionModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,MAAY,IAAI,sCAAkB;AAElC;;;;;;;;;;;;GAYG;AACH,uCACE,IAAY,EACZ,EAAU;IAEV,MAAM,IAAI,GAAmB,IAAA,2BAAa,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;IAC5E,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,GAAG,EAAE,wBAAwB,IAAI,oFAAoF,EACrH,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AutoMovieCaptureBackend } from "./AutoMovieCaptureBackend";
|
|
2
|
+
/**
|
|
3
|
+
* The Chromium switches and executable for a capture backend.
|
|
4
|
+
*
|
|
5
|
+
* | Backend | Switches | Named |
|
|
6
|
+
* | --- | --- | --- |
|
|
7
|
+
* | `software` | `--use-gl=angle --use-angle=swiftshader` | `swiftshader` |
|
|
8
|
+
* | `gpu` | `--use-gl=angle --use-angle=default --ignore-gpu-blocklist` | `gpu` |
|
|
9
|
+
*
|
|
10
|
+
* The executable is `CHROME_PATH` when the environment sets it to a non-blank path, else the Chromium build Playwright pins, which `executablePath` leaves absent.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation Tabulates each backend's switches and name and states where the executable comes from.
|
|
13
|
+
* @evidence contracts/development/implementation.md#principled-implementation Chromium's SwiftShader documentation selects the software backend through ANGLE with exactly these two switches, and Playwright already adds `--enable-unsafe-swiftshader`; `--use-angle=default` lets ANGLE pick the platform's GPU backend, such as Direct3D 11 on Windows, and the blocklist switch keeps a headless browser from refusing it.
|
|
14
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One table lookup and one environment read.
|
|
15
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No backend is chosen from the machine; the caller states it, and the record names what the browser reported.
|
|
16
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant.
|
|
17
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure mapping.
|
|
18
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh arrays and keeps nothing.
|
|
19
|
+
*/
|
|
20
|
+
export declare function planAutoMovieChromiumLaunch(backend: AutoMovieCaptureBackend, env: Readonly<Record<string, string | undefined>>): {
|
|
21
|
+
/** Switches passed to Chromium. */
|
|
22
|
+
args: string[];
|
|
23
|
+
/** Executable to launch, or absent for Playwright's own build. */
|
|
24
|
+
executablePath?: string;
|
|
25
|
+
/** The backend's name as the record states it. */
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.planAutoMovieChromiumLaunch = planAutoMovieChromiumLaunch;
|
|
4
|
+
/**
|
|
5
|
+
* The Chromium switches and executable for a capture backend.
|
|
6
|
+
*
|
|
7
|
+
* | Backend | Switches | Named |
|
|
8
|
+
* | --- | --- | --- |
|
|
9
|
+
* | `software` | `--use-gl=angle --use-angle=swiftshader` | `swiftshader` |
|
|
10
|
+
* | `gpu` | `--use-gl=angle --use-angle=default --ignore-gpu-blocklist` | `gpu` |
|
|
11
|
+
*
|
|
12
|
+
* The executable is `CHROME_PATH` when the environment sets it to a non-blank path, else the Chromium build Playwright pins, which `executablePath` leaves absent.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation Tabulates each backend's switches and name and states where the executable comes from.
|
|
15
|
+
* @evidence contracts/development/implementation.md#principled-implementation Chromium's SwiftShader documentation selects the software backend through ANGLE with exactly these two switches, and Playwright already adds `--enable-unsafe-swiftshader`; `--use-angle=default` lets ANGLE pick the platform's GPU backend, such as Direct3D 11 on Windows, and the blocklist switch keeps a headless browser from refusing it.
|
|
16
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One table lookup and one environment read.
|
|
17
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No backend is chosen from the machine; the caller states it, and the record names what the browser reported.
|
|
18
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant.
|
|
19
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure mapping.
|
|
20
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh arrays and keeps nothing.
|
|
21
|
+
*/
|
|
22
|
+
function planAutoMovieChromiumLaunch(backend, env) {
|
|
23
|
+
const chrome = env.CHROME_PATH?.trim();
|
|
24
|
+
return {
|
|
25
|
+
args: backend === "software"
|
|
26
|
+
? ["--use-gl=angle", "--use-angle=swiftshader"]
|
|
27
|
+
: ["--use-gl=angle", "--use-angle=default", "--ignore-gpu-blocklist"],
|
|
28
|
+
...(chrome === undefined || chrome === ""
|
|
29
|
+
? {}
|
|
30
|
+
: { executablePath: chrome }),
|
|
31
|
+
name: backend === "software" ? "swiftshader" : "gpu",
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=planAutoMovieChromiumLaunch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planAutoMovieChromiumLaunch.js","sourceRoot":"","sources":["../src/planAutoMovieChromiumLaunch.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,qCACE,OAAgC,EAChC,GAAiD;IAWjD,MAAM,MAAM,GAAuB,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IAC3D,OAAO;QACL,IAAI,EACF,OAAO,KAAK,UAAU;YACpB,CAAC,CAAC,CAAC,gBAAgB,EAAE,yBAAyB,CAAC;YAC/C,CAAC,CAAC,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,wBAAwB,CAAC;QACzE,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,EAAE;YACvC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;QAC/B,IAAI,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK;KACrD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Vite configuration every page `writeAutoMovieModulePage` writes is served or built with: the page's folder as the root, the production's configuration file and public folder, quiet logging, and the page itself as the dependency scanner's entry.
|
|
3
|
+
*
|
|
4
|
+
* The page lives under `node_modules/.cache/automovie/`, and Vite's own entry search skips everything under `node_modules`, so without an entry it finds none, logs "Could not auto-determine entry point" and skips pre-bundling, which makes the first load of a development server slow. `optimizeDeps.entries` is `index.html`, a name without glob characters, which Vite resolves against the root as it is instead of globbing with that skip; it also wins over the production's own `build.rollupOptions.input`, so the scan starts from this page rather than the production's. A host adds its own `server`, `build` or `base` beside these members.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/development/common.md#meaningful-documentation States every member, why the entry is needed and why it is written as a plain name, its precedence over the production's input, and what a host adds.
|
|
7
|
+
* @evidence contracts/development/implementation.md#principled-implementation Vite's scanner takes explicit `optimizeDeps.entries` first, resolving a pattern without glob characters directly against `root`, and only globs with the `node_modules` skip otherwise; naming the page's own `index.html` makes the scan start where the page does, whatever folder holds it.
|
|
8
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One record from the written page, shared by the draw page's build and the inspector's development server.
|
|
9
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The production's configuration file is loaded, not replaced; only the root, the public folder and the scan entry are set for the page.
|
|
10
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant.
|
|
11
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one page.
|
|
12
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh record and keeps nothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare function planAutoMovieModulePageViteConfig(page: {
|
|
15
|
+
/** The page's folder, the root it is served from. */
|
|
16
|
+
folder: string;
|
|
17
|
+
/** The production's `vite.config.ts`, or `false` when it has none. */
|
|
18
|
+
configFile: string | false;
|
|
19
|
+
/** The production's `public` folder, or `false` when it has none. */
|
|
20
|
+
publicDir: string | false;
|
|
21
|
+
}): {
|
|
22
|
+
/** The page's folder. */
|
|
23
|
+
root: string;
|
|
24
|
+
/** The production's configuration file, or `false`. */
|
|
25
|
+
configFile: string | false;
|
|
26
|
+
/** The production's public folder, or `false`. */
|
|
27
|
+
publicDir: string | false;
|
|
28
|
+
/** Only warnings and errors. */
|
|
29
|
+
logLevel: "warn";
|
|
30
|
+
/** Keep earlier output on screen. */
|
|
31
|
+
clearScreen: false;
|
|
32
|
+
/** The dependency scanner's entry. */
|
|
33
|
+
optimizeDeps: {
|
|
34
|
+
/** The page's own `index.html`, relative to `root`. */
|
|
35
|
+
entries: string[];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.planAutoMovieModulePageViteConfig = planAutoMovieModulePageViteConfig;
|
|
4
|
+
/**
|
|
5
|
+
* The Vite configuration every page `writeAutoMovieModulePage` writes is served or built with: the page's folder as the root, the production's configuration file and public folder, quiet logging, and the page itself as the dependency scanner's entry.
|
|
6
|
+
*
|
|
7
|
+
* The page lives under `node_modules/.cache/automovie/`, and Vite's own entry search skips everything under `node_modules`, so without an entry it finds none, logs "Could not auto-determine entry point" and skips pre-bundling, which makes the first load of a development server slow. `optimizeDeps.entries` is `index.html`, a name without glob characters, which Vite resolves against the root as it is instead of globbing with that skip; it also wins over the production's own `build.rollupOptions.input`, so the scan starts from this page rather than the production's. A host adds its own `server`, `build` or `base` beside these members.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/common.md#meaningful-documentation States every member, why the entry is needed and why it is written as a plain name, its precedence over the production's input, and what a host adds.
|
|
10
|
+
* @evidence contracts/development/implementation.md#principled-implementation Vite's scanner takes explicit `optimizeDeps.entries` first, resolving a pattern without glob characters directly against `root`, and only globs with the `node_modules` skip otherwise; naming the page's own `index.html` makes the scan start where the page does, whatever folder holds it.
|
|
11
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One record from the written page, shared by the draw page's build and the inspector's development server.
|
|
12
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The production's configuration file is loaded, not replaced; only the root, the public folder and the scan entry are set for the page.
|
|
13
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant.
|
|
14
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one page.
|
|
15
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh record and keeps nothing.
|
|
16
|
+
*/
|
|
17
|
+
function planAutoMovieModulePageViteConfig(page) {
|
|
18
|
+
return {
|
|
19
|
+
root: page.folder,
|
|
20
|
+
configFile: page.configFile,
|
|
21
|
+
publicDir: page.publicDir,
|
|
22
|
+
logLevel: "warn",
|
|
23
|
+
clearScreen: false,
|
|
24
|
+
optimizeDeps: { entries: ["index.html"] },
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=planAutoMovieModulePageViteConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planAutoMovieModulePageViteConfig.js","sourceRoot":"","sources":["../src/planAutoMovieModulePageViteConfig.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,2CAAkD,IASjD;IAsBC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,QAAQ,EAAE,MAAM;QAChB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;KAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -9,7 +9,7 @@ import type { AutoMovieCommand } from "./AutoMovieCommand";
|
|
|
9
9
|
* @throws On an unknown or repeated option, a missing name value, a target count other than one, an unknown family, or a refused directory segment.
|
|
10
10
|
*
|
|
11
11
|
* @evidence contracts/development/implementation.md#principled-implementation The directory segment passes the same portable-segment rule as a project name and must equal its trimmed form, so no separator, `.`, `..` or padding reaches the joined path.
|
|
12
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The add grammar is separate from create
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The add grammar is separate from create; the template owns the segment rule and `run` owns the workspace path.
|
|
13
13
|
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No family is inferred from the name and no workspace is searched for; the family is typed explicitly.
|
|
14
14
|
* @evidence contracts/development/common.md#meaningful-documentation The comment states the grammar, the family pair, the segment rule and why it matters, and what throws.
|
|
15
15
|
* @evidence contracts/development/implementation.md#efficient-algorithms One scan over the tokens and one split of the target.
|
|
@@ -13,7 +13,7 @@ const readAutoMovieNameOption_1 = require("./readAutoMovieNameOption");
|
|
|
13
13
|
* @throws On an unknown or repeated option, a missing name value, a target count other than one, an unknown family, or a refused directory segment.
|
|
14
14
|
*
|
|
15
15
|
* @evidence contracts/development/implementation.md#principled-implementation The directory segment passes the same portable-segment rule as a project name and must equal its trimmed form, so no separator, `.`, `..` or padding reaches the joined path.
|
|
16
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The add grammar is separate from create
|
|
16
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The add grammar is separate from create; the template owns the segment rule and `run` owns the workspace path.
|
|
17
17
|
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No family is inferred from the name and no workspace is searched for; the family is typed explicitly.
|
|
18
18
|
* @evidence contracts/development/common.md#meaningful-documentation The comment states the grammar, the family pair, the segment rule and why it matters, and what throws.
|
|
19
19
|
* @evidence contracts/development/implementation.md#efficient-algorithms One scan over the tokens and one split of the target.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AutoMovieCaptureBackend } from "./AutoMovieCaptureBackend";
|
|
2
|
+
/**
|
|
3
|
+
* Split the options of `automovie capture` into the host's own, `AUTOMOVIE_CAPTURE_OPTIONS`, and the capture request's, which `parseAutoMovieCapturePlanRequest` reads.
|
|
4
|
+
*
|
|
5
|
+
* | Option | Meaning | Absent |
|
|
6
|
+
* | --- | --- | --- |
|
|
7
|
+
* | `--module <file>` | The subject module whose `subjects` the draw page offers | Required unless `--file` |
|
|
8
|
+
* | `--file <video>` | An encoded video file captured from its own frames instead of a drawn subject | A drawn subject |
|
|
9
|
+
* | `--props <file>` | A JSON file whose value the module's `subjects` is called with, for subjects built from data a host computes | `null` |
|
|
10
|
+
* | `--out <folder>` | The capture's root folder | `media/capture/<subject>` |
|
|
11
|
+
* | `--backend <software\|gpu>` | How the browser draws | `software` |
|
|
12
|
+
*
|
|
13
|
+
* Every other option is left for the request reader, which refuses one it does not know. It throws for `--module` beside `--file`, neither of them, an empty value of any host option, and a backend that is not `software` or `gpu`.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/development/common.md#meaningful-documentation Tabulates the host's options with their meaning and absent value, says where the rest go, and states every refusal.
|
|
16
|
+
* @evidence contracts/development/implementation.md#principled-implementation The host's keys are removed before the request is read, so the request grammar stays one grammar for the address, the command and props, and a host key cannot be mistaken for a request key.
|
|
17
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One pass over the listed options that takes the host's keys out, then the checks; the list is the one the README test reads.
|
|
18
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No subject module is guessed from the folder: a capture names what it draws.
|
|
19
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Linear in the options.
|
|
20
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Read once per command.
|
|
21
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh map and keeps nothing.
|
|
22
|
+
*/
|
|
23
|
+
export declare function readAutoMovieCaptureHostOptions(values: ReadonlyMap<string, string>): {
|
|
24
|
+
/** Subject module path, or null for a video file. */
|
|
25
|
+
module: string | null;
|
|
26
|
+
/** Video file path, or null for a drawn subject. */
|
|
27
|
+
file: string | null;
|
|
28
|
+
/** Path of the props JSON file, or null for none. */
|
|
29
|
+
props: string | null;
|
|
30
|
+
/** Root folder, or null for the default. */
|
|
31
|
+
out: string | null;
|
|
32
|
+
/** How the browser draws. */
|
|
33
|
+
backend: AutoMovieCaptureBackend;
|
|
34
|
+
/** The request's own options, for the request reader. */
|
|
35
|
+
request: Map<string, string>;
|
|
36
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readAutoMovieCaptureHostOptions = readAutoMovieCaptureHostOptions;
|
|
4
|
+
const AUTOMOVIE_CAPTURE_OPTIONS_1 = require("./AUTOMOVIE_CAPTURE_OPTIONS");
|
|
5
|
+
/**
|
|
6
|
+
* Split the options of `automovie capture` into the host's own, `AUTOMOVIE_CAPTURE_OPTIONS`, and the capture request's, which `parseAutoMovieCapturePlanRequest` reads.
|
|
7
|
+
*
|
|
8
|
+
* | Option | Meaning | Absent |
|
|
9
|
+
* | --- | --- | --- |
|
|
10
|
+
* | `--module <file>` | The subject module whose `subjects` the draw page offers | Required unless `--file` |
|
|
11
|
+
* | `--file <video>` | An encoded video file captured from its own frames instead of a drawn subject | A drawn subject |
|
|
12
|
+
* | `--props <file>` | A JSON file whose value the module's `subjects` is called with, for subjects built from data a host computes | `null` |
|
|
13
|
+
* | `--out <folder>` | The capture's root folder | `media/capture/<subject>` |
|
|
14
|
+
* | `--backend <software\|gpu>` | How the browser draws | `software` |
|
|
15
|
+
*
|
|
16
|
+
* Every other option is left for the request reader, which refuses one it does not know. It throws for `--module` beside `--file`, neither of them, an empty value of any host option, and a backend that is not `software` or `gpu`.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/development/common.md#meaningful-documentation Tabulates the host's options with their meaning and absent value, says where the rest go, and states every refusal.
|
|
19
|
+
* @evidence contracts/development/implementation.md#principled-implementation The host's keys are removed before the request is read, so the request grammar stays one grammar for the address, the command and props, and a host key cannot be mistaken for a request key.
|
|
20
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One pass over the listed options that takes the host's keys out, then the checks; the list is the one the README test reads.
|
|
21
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No subject module is guessed from the folder: a capture names what it draws.
|
|
22
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Linear in the options.
|
|
23
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Read once per command.
|
|
24
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh map and keeps nothing.
|
|
25
|
+
*/
|
|
26
|
+
function readAutoMovieCaptureHostOptions(values) {
|
|
27
|
+
const request = new Map(values);
|
|
28
|
+
const taken = new Map();
|
|
29
|
+
for (const key of AUTOMOVIE_CAPTURE_OPTIONS_1.AUTOMOVIE_CAPTURE_OPTIONS) {
|
|
30
|
+
const value = request.get(key);
|
|
31
|
+
request.delete(key);
|
|
32
|
+
if (value === undefined)
|
|
33
|
+
continue;
|
|
34
|
+
if (value.trim() === "")
|
|
35
|
+
throw new Error(`Capture option --${key} needs a value`);
|
|
36
|
+
taken.set(key, value);
|
|
37
|
+
}
|
|
38
|
+
const module = taken.get("module") ?? null;
|
|
39
|
+
const file = taken.get("file") ?? null;
|
|
40
|
+
const out = taken.get("out") ?? null;
|
|
41
|
+
const backend = taken.get("backend") ?? "software";
|
|
42
|
+
if (module !== null && file !== null)
|
|
43
|
+
throw new Error("Capture takes --module or --file, not both");
|
|
44
|
+
if (module === null && file === null)
|
|
45
|
+
throw new Error("Capture needs --module <subject module> to draw a subject, or --file <video> to capture a video file");
|
|
46
|
+
if (backend !== "software" && backend !== "gpu")
|
|
47
|
+
throw new Error(`Capture --backend "${backend}" is not software or gpu`);
|
|
48
|
+
return {
|
|
49
|
+
module,
|
|
50
|
+
file,
|
|
51
|
+
props: taken.get("props") ?? null,
|
|
52
|
+
out,
|
|
53
|
+
backend,
|
|
54
|
+
request,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=readAutoMovieCaptureHostOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readAutoMovieCaptureHostOptions.js","sourceRoot":"","sources":["../src/readAutoMovieCaptureHostOptions.ts"],"names":[],"mappings":";;;AAAA,2EAAwE;AAGxE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,yCACE,MAAmC;IAoBnC,MAAM,OAAO,GAAwB,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IACrD,MAAM,KAAK,GAAwB,IAAI,GAAG,EAAE,CAAC;IAC7C,KAAK,MAAM,GAAG,IAAI,qDAAyB,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAuB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,gBAAgB,CAAC,CAAC;QAC3D,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACxB,CAAC;IACD,MAAM,MAAM,GAAkB,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;IAC1D,MAAM,IAAI,GAAkB,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;IACtD,MAAM,GAAG,GAAkB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IACpD,MAAM,OAAO,GAAW,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC;IAC3D,IAAI,MAAM,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI;QAClC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,IAAI,MAAM,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI;QAClC,MAAM,IAAI,KAAK,CACb,sGAAsG,CACvG,CAAC;IACJ,IAAI,OAAO,KAAK,UAAU,IAAI,OAAO,KAAK,KAAK;QAC7C,MAAM,IAAI,KAAK,CAAC,sBAAsB,OAAO,0BAA0B,CAAC,CAAC;IAC3E,OAAO;QACL,MAAM;QACN,IAAI;QACJ,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI;QACjC,GAAG;QACH,OAAO;QACP,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { type AutoMovieCommand } from "./AutoMovieCommand";
|
|
|
2
2
|
/**
|
|
3
3
|
* Resolve one complete CLI request before any scaffold publication begins.
|
|
4
4
|
*
|
|
5
|
-
* `args` excludes the node executable and script positions. No arguments, or a lone `-h`/`--help`, means help; a lone `-v`/`--version` means version. `create
|
|
5
|
+
* `args` excludes the node executable and script positions. No arguments, or a lone `-h`/`--help`, means help; a lone `-v`/`--version` means version. `create` and `add` delegate their grammars to {@link readAutoMovieCreateArguments} and {@link readAutoMovieAddArguments}; `capture`, `inspect`, `render` and `review` keep their tokens for the production's option reader, which `run` loads. Every refusal throws an `Error` whose message names the correction.
|
|
6
6
|
*
|
|
7
7
|
* @param args The command-line tokens after the executable and script.
|
|
8
8
|
* @returns The admitted request.
|
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.readAutoMovieCommandArguments = readAutoMovieCommandArguments;
|
|
4
4
|
const readAutoMovieAddArguments_1 = require("./readAutoMovieAddArguments");
|
|
5
5
|
const readAutoMovieCreateArguments_1 = require("./readAutoMovieCreateArguments");
|
|
6
|
-
const readAutoMovieSyncArguments_1 = require("./readAutoMovieSyncArguments");
|
|
7
6
|
/**
|
|
8
7
|
* Resolve one complete CLI request before any scaffold publication begins.
|
|
9
8
|
*
|
|
10
|
-
* `args` excludes the node executable and script positions. No arguments, or a lone `-h`/`--help`, means help; a lone `-v`/`--version` means version. `create
|
|
9
|
+
* `args` excludes the node executable and script positions. No arguments, or a lone `-h`/`--help`, means help; a lone `-v`/`--version` means version. `create` and `add` delegate their grammars to {@link readAutoMovieCreateArguments} and {@link readAutoMovieAddArguments}; `capture`, `inspect`, `render` and `review` keep their tokens for the production's option reader, which `run` loads. Every refusal throws an `Error` whose message names the correction.
|
|
11
10
|
*
|
|
12
11
|
* @param args The command-line tokens after the executable and script.
|
|
13
12
|
* @returns The admitted request.
|
|
@@ -33,9 +32,15 @@ function readAutoMovieCommandArguments(args) {
|
|
|
33
32
|
return (0, readAutoMovieCreateArguments_1.readAutoMovieCreateArguments)(rest);
|
|
34
33
|
if (command === "add")
|
|
35
34
|
return (0, readAutoMovieAddArguments_1.readAutoMovieAddArguments)(rest);
|
|
36
|
-
if (command === "
|
|
37
|
-
return
|
|
38
|
-
|
|
35
|
+
if (command === "capture")
|
|
36
|
+
return { command: "capture", args: [...rest] };
|
|
37
|
+
if (command === "inspect")
|
|
38
|
+
return { command: "inspect", args: [...rest] };
|
|
39
|
+
if (command === "render")
|
|
40
|
+
return { command: "render", args: [...rest] };
|
|
41
|
+
if (command === "review")
|
|
42
|
+
return { command: "review", args: [...rest] };
|
|
43
|
+
throw new Error(`Unknown command ${JSON.stringify(command)}; the commands are create, add, capture, inspect, render and review (see --help).`);
|
|
39
44
|
}
|
|
40
45
|
/** Admit a standalone flag only when no other argument follows it. */
|
|
41
46
|
function standalone(flag, rest, request) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readAutoMovieCommandArguments.js","sourceRoot":"","sources":["../src/readAutoMovieCommandArguments.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AACxE,iFAA8E;
|
|
1
|
+
{"version":3,"file":"readAutoMovieCommandArguments.js","sourceRoot":"","sources":["../src/readAutoMovieCommandArguments.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AACxE,iFAA8E;AAE9E;;;;;;;;;;;;;;;;GAgBG;AACH,uCACE,IAAuB;IAEvB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAsB,IAAI,CAAC;IACnD,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,QAAQ;QAC1C,OAAO,UAAU,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACxD,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,WAAW;QAC7C,OAAO,UAAU,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3D,IAAI,OAAO,KAAK,QAAQ;QAAE,OAAO,IAAA,2DAA4B,EAAC,IAAI,CAAC,CAAC;IACpE,IAAI,OAAO,KAAK,KAAK;QAAE,OAAO,IAAA,qDAAyB,EAAC,IAAI,CAAC,CAAC;IAC9D,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;IAC1E,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;IAC1E,IAAI,OAAO,KAAK,QAAQ;QAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;IACxE,IAAI,OAAO,KAAK,QAAQ;QAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;IACxE,MAAM,IAAI,KAAK,CACb,mBAAmB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,mFAAmF,CAC9H,CAAC;AACJ,CAAC;AAED,sEAAsE;AACtE,SAAS,UAAU,CACjB,IAAY,EACZ,IAAuB,EACvB,OAAyB;IAEzB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,6BAA6B,CAAC,CAAC;IAC7E,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -9,7 +9,7 @@ import type { AutoMovieCommand } from "./AutoMovieCommand";
|
|
|
9
9
|
* @throws On an unknown or repeated option, a missing name value, or anything other than one non-blank directory.
|
|
10
10
|
*
|
|
11
11
|
* @evidence contracts/development/implementation.md#principled-implementation A complete left-to-right scan admits each flag once and consumes `--name`'s value, so every token is classified before any filesystem work.
|
|
12
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The create grammar is separate from add
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The create grammar is separate from add; `readAutoMovieNameOption` owns the shared value rule and `run` owns resolution.
|
|
13
13
|
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No default directory, inferred workspace mode or derived name is introduced here.
|
|
14
14
|
* @evidence contracts/development/common.md#meaningful-documentation The comment states the grammar, the dash-leading spelling and that refusals name their correction.
|
|
15
15
|
* @evidence contracts/development/implementation.md#efficient-algorithms One scan over the tokens.
|
|
@@ -12,7 +12,7 @@ const readAutoMovieNameOption_1 = require("./readAutoMovieNameOption");
|
|
|
12
12
|
* @throws On an unknown or repeated option, a missing name value, or anything other than one non-blank directory.
|
|
13
13
|
*
|
|
14
14
|
* @evidence contracts/development/implementation.md#principled-implementation A complete left-to-right scan admits each flag once and consumes `--name`'s value, so every token is classified before any filesystem work.
|
|
15
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The create grammar is separate from add
|
|
15
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The create grammar is separate from add; `readAutoMovieNameOption` owns the shared value rule and `run` owns resolution.
|
|
16
16
|
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No default directory, inferred workspace mode or derived name is introduced here.
|
|
17
17
|
* @evidence contracts/development/common.md#meaningful-documentation The comment states the grammar, the dash-leading spelling and that refusals name their correction.
|
|
18
18
|
* @evidence contracts/development/implementation.md#efficient-algorithms One scan over the tokens.
|