api: Pass on the script name to the API. (#3845)

This commit is contained in:
Peter Hedenskog 2023-05-16 15:23:07 +02:00 committed by GitHub
parent cfebd6626e
commit 45cce6c381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@
import { writeFileSync } from 'node:fs';
import { execSync } from 'node:child_process';
import { platform } from 'node:os';
import { resolve } from 'node:path';
import { resolve, basename } from 'node:path';
import { readFileSync } from 'node:fs';
import merge from 'lodash.merge';
@ -36,6 +36,7 @@ async function api(options) {
new URL(resolve(process.cwd(), options._[0]), import.meta.url)
);
apiOptions.api.scripting = scripting.toString();
apiOptions.api.scriptingName = basename(options._[0]);
}
if (apiOptions.mobile) {