mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-25 09:07:40 +00:00
Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml
This commit is contained in:
commit
64bcfc66e9
51 changed files with 666 additions and 414 deletions
20
HISTORY.md
20
HISTORY.md
|
|
@ -1,5 +1,25 @@
|
|||
# Keyman Version History
|
||||
|
||||
## 19.0.23 alpha 2025-04-07
|
||||
|
||||
* chore(web): remove dead methods regarding keyboard state (#13671)
|
||||
* chore(linux): Update debian changelog (#13675)
|
||||
|
||||
## 19.0.22 alpha 2025-04-04
|
||||
|
||||
* build(deps): bump tar-fs and puppeteer-core (#13661)
|
||||
|
||||
## 19.0.21 alpha 2025-04-03
|
||||
|
||||
* chore: use explicit `node:` prefix for node imports (#13650)
|
||||
* refactor(developer): rename developer/web/utils/common-messages.ts to developer-utils-messages.ts (#13653)
|
||||
* refactor(developer): move sentry and developer options into console apps (#13654)
|
||||
* refactor(developer): consolidate project loader (#13656)
|
||||
|
||||
## 19.0.20 alpha 2025-04-01
|
||||
|
||||
* fix(android): move responsibility for setting keyboard height preference into `applyKeyboardHeight()` (#13578)
|
||||
|
||||
## 19.0.19 alpha 2025-03-31
|
||||
|
||||
* chore: merge beta to master B18S4 (#13606)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
19.0.20
|
||||
19.0.24
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import * as fs from 'fs';
|
||||
import * as rd from 'readline';
|
||||
import * as fs from 'node:fs';
|
||||
import * as rd from 'node:readline';
|
||||
|
||||
export default async function hextobin(inputFilename: string, outputFilename?: string, options?: {silent?: boolean}): Promise<Uint8Array> {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as fs from 'fs';
|
||||
import path from 'path';
|
||||
import * as fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import convertSourceMap from 'convert-source-map'; // Transforms sourcemaps among various common formats.
|
||||
// Base64, stringified-JSON, end-of-file comment...
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
// TODO: support multiple infiles to generate from multiple headers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { CompilerEvent, CompilerCallbacks, CompilerPathCallbacks, CompilerFileSystemCallbacks,
|
||||
CompilerError, CompilerNetAsyncCallbacks, DefaultCompilerFileSystemAsyncCallbacks,
|
||||
CompilerFileSystemAsyncCallbacks, EventResolver, NullEventResolver,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"@keymanapp/common-types": "*",
|
||||
"@sentry/node": "^7.57.0",
|
||||
"eventemitter3": "^5.0.0",
|
||||
"fast-xml-parser": "github:NaturalIntelligence/fast-xml-parser#metadata",
|
||||
"path-browserify": "^1.0.1",
|
||||
|
|
|
|||
|
|
@ -243,9 +243,10 @@ export enum CompilerErrorNamespace {
|
|||
*/
|
||||
LdmlKeyboardCompiler = 0x0000,
|
||||
/**
|
||||
* common/web/types errors between 0x1000…0x1FFF
|
||||
* common/web/utils errors between 0x1000…0x1FFF
|
||||
* was previously called CommonTypes
|
||||
*/
|
||||
CommonTypes = 0x1000,
|
||||
DeveloperUtils = 0x1000,
|
||||
/**
|
||||
* kmc-kmn errors between 0x2000…0x2FFF; these map to
|
||||
* the base codes found in kmn_compiler_errors.h, exclusive severity flags
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageDef as def, CompilerMessageSpec as m } from './compiler-interfaces.js';
|
||||
import { constants } from '@keymanapp/ldml-keyboard-constants';
|
||||
|
||||
const CommonTypesErrMask = CompilerErrorNamespace.CommonTypes;
|
||||
// const SevInfo = CompilerErrorSeverity.Info | CommonTypesErrMask;
|
||||
// const SevHint = CompilerErrorSeverity.Hint | CommonTypesErrMask;
|
||||
// const SevWarn = CompilerErrorSeverity.Warn | CommonTypesErrMask;
|
||||
const SevError = CompilerErrorSeverity.Error | CommonTypesErrMask;
|
||||
// const SevFatal = CompilerErrorSeverity.Fatal | CommonTypesErrMask;
|
||||
const DeveloperUtilsErrMask = CompilerErrorNamespace.DeveloperUtils;
|
||||
// const SevInfo = CompilerErrorSeverity.Info | DeveloperUtilsErrMask;
|
||||
// const SevHint = CompilerErrorSeverity.Hint | DeveloperUtilsErrMask;
|
||||
// const SevWarn = CompilerErrorSeverity.Warn | DeveloperUtilsErrMask;
|
||||
const SevError = CompilerErrorSeverity.Error | DeveloperUtilsErrMask;
|
||||
// const SevFatal = CompilerErrorSeverity.Fatal | DeveloperUtilsErrMask;
|
||||
|
||||
export class CommonTypesMessages {
|
||||
export class DeveloperUtilsMessages {
|
||||
// structured Ajv validation error
|
||||
static ERROR_SchemaValidationError = SevError | 0x0001;
|
||||
static Error_SchemaValidationError = (o:{instancePath:string, keyword:string, message: string, params: string}) => m(this.ERROR_SchemaValidationError,
|
||||
|
|
@ -58,4 +58,22 @@ export class CommonTypesMessages {
|
|||
this.ERROR_InvalidPackageFile,
|
||||
`Package source file is invalid: ${(o.e ?? 'unknown error').toString()}`
|
||||
);
|
||||
|
||||
static ERROR_InvalidProjectFile = SevError | 0x000A;
|
||||
static Error_InvalidProjectFile = (o:{message:string}) => m(
|
||||
this.ERROR_InvalidProjectFile,
|
||||
`Project file is not valid: ${def(o.message)}`,
|
||||
);
|
||||
|
||||
static ERROR_UnsupportedProjectVersion = SevError | 0x000B;
|
||||
static Error_UnsupportedProjectVersion = (o:{version:string}) => m(
|
||||
this.ERROR_UnsupportedProjectVersion,
|
||||
`Project version ${def(o.version)} is not supported by this version of Keyman Developer.`,
|
||||
);
|
||||
|
||||
static ERROR_ProjectFileCouldNotBeRead = SevError | 0x000C;
|
||||
static Error_ProjectFileCouldNotBeRead = () => m(
|
||||
this.ERROR_ProjectFileCouldNotBeRead,
|
||||
`Project file could not be read`
|
||||
);
|
||||
};
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
export { validateMITLicense } from './utils/validate-mit-license.js';
|
||||
export { KeymanSentry, SentryNodeOptions } from './utils/KeymanSentry.js';
|
||||
export { getOption, loadOptions, clearOptions } from './utils/options.js';
|
||||
export { escapeMarkdownChar } from './utils/markdown.js';
|
||||
export { KeymanUrls } from './utils/keyman-urls.js';
|
||||
|
||||
|
|
@ -65,7 +63,7 @@ export { defaultCompilerOptions, CompilerBaseOptions, CompilerOptions, CompilerE
|
|||
|
||||
export { UrlSubpathCompilerCallback } from './utils/UrlSubpathCompilerCallback.js';
|
||||
|
||||
export { CommonTypesMessages } from './common-messages.js';
|
||||
export { DeveloperUtilsMessages } from './developer-utils-messages.js';
|
||||
export * as SourceFilenamePatterns from './source-filename-patterns.js';
|
||||
export { KeymanXMLType, KeymanXMLWriter, KeymanXMLReader, KeymanXMLMetadata, XML_FILENAME_SYMBOL } from './xml-utils.js';
|
||||
export { SymbolUtils } from './symbol-utils.js';
|
||||
|
|
@ -76,3 +74,5 @@ export * as CloudUrls from './cloud-urls.js';
|
|||
export { getFontFamily, getFontFamilySync } from './font-family.js';
|
||||
|
||||
export * as ValidIds from './valid-ids.js';
|
||||
|
||||
export * as ProjectLoader from './project-loader.js';
|
||||
34
developer/src/common/web/utils/src/project-loader.ts
Normal file
34
developer/src/common/web/utils/src/project-loader.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { KeymanDeveloperProject } from "./types/kpj/keyman-developer-project.js";
|
||||
import { KPJFileReader } from "./types/kpj/kpj-file-reader.js";
|
||||
import { CompilerAsyncCallbacks, CompilerCallbacks } from "./compiler-callbacks.js";
|
||||
import { DeveloperUtilsMessages } from "./developer-utils-messages.js";
|
||||
|
||||
// TODO-KMC-TEST: refactor asyncCallbacks, make it a first-class part of CompilerCallbacks
|
||||
export async function loadProjectFromFile(infile: string, callbacks: CompilerCallbacks, asyncCallbacks: CompilerAsyncCallbacks = null): Promise<KeymanDeveloperProject> {
|
||||
const kpjData = await (asyncCallbacks ?? callbacks).fsAsync.readFile(infile);
|
||||
if(!kpjData) {
|
||||
callbacks.reportMessage(DeveloperUtilsMessages.Error_ProjectFileCouldNotBeRead());
|
||||
return null;
|
||||
}
|
||||
const reader = new KPJFileReader(callbacks);
|
||||
let kpj = null;
|
||||
try {
|
||||
kpj = reader.read(kpjData);
|
||||
if(!kpj) {
|
||||
callbacks.reportMessage(DeveloperUtilsMessages.Error_ProjectFileCouldNotBeRead());
|
||||
return null;
|
||||
}
|
||||
|
||||
if(kpj.KeymanDeveloperProject?.Options?.Version && kpj.KeymanDeveloperProject.Options.Version != "1.0" && kpj.KeymanDeveloperProject.Options.Version != "2.0") {
|
||||
callbacks.reportMessage(DeveloperUtilsMessages.Error_UnsupportedProjectVersion({version: kpj.KeymanDeveloperProject.Options.Version}));
|
||||
return null;
|
||||
}
|
||||
reader.validate(kpj);
|
||||
} catch(e) {
|
||||
callbacks.reportMessage(DeveloperUtilsMessages.Error_InvalidProjectFile({message: (e??'').toString()}));
|
||||
return null;
|
||||
}
|
||||
const project = await reader.transform(infile, kpj);
|
||||
return project;
|
||||
}
|
||||
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
import { util } from '@keymanapp/common-types';
|
||||
import boxXmlArray = util.boxXmlArray;
|
||||
|
||||
import { CommonTypesMessages } from "../../common-messages.js";
|
||||
import { DeveloperUtilsMessages } from "../../developer-utils-messages.js";
|
||||
import { CompilerCallbacks } from "../../compiler-callbacks.js";
|
||||
import { KeymanXMLReader } from "../../xml-utils.js";
|
||||
import { KpsPackage } from "./kps-file.js";
|
||||
|
|
@ -29,7 +29,7 @@ export class KpsFileReader {
|
|||
a = new KeymanXMLReader('kps')
|
||||
.parse(data) as KpsPackage;
|
||||
} catch(e) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_InvalidPackageFile({e}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_InvalidPackageFile({e}));
|
||||
}
|
||||
return a;
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Reads a LDML XML keyboard file into JS object tree and resolves imports
|
||||
*/
|
||||
import { SchemaValidators, util } from '@keymanapp/common-types';
|
||||
import { CommonTypesMessages } from '../../common-messages.js';
|
||||
import { DeveloperUtilsMessages } from '../../developer-utils-messages.js';
|
||||
import { CompilerCallbacks } from "../../compiler-callbacks.js";
|
||||
import { LDMLKeyboardXMLSourceFile, LKImport, ImportStatus } from './ldml-keyboard-xml.js';
|
||||
import { constants } from '@keymanapp/ldml-keyboard-constants';
|
||||
|
|
@ -233,7 +233,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
const { base, path } = asImport;
|
||||
// If base is not an empty string (or null/undefined), then it must be 'cldr'
|
||||
if (base && base !== constants.cldr_import_base) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_ImportInvalidBase({base, path, subtag}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_ImportInvalidBase({base, path, subtag}));
|
||||
return false;
|
||||
}
|
||||
let importData: Uint8Array;
|
||||
|
|
@ -243,7 +243,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
// CLDR import
|
||||
const paths = path.split('/');
|
||||
if (paths[0] == '' || paths[1] == '' || paths.length !== 2) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_ImportInvalidPath({base, path, subtag}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_ImportInvalidPath({base, path, subtag}));
|
||||
return false;
|
||||
}
|
||||
if (constants.treatAsLatest(paths[0])) {
|
||||
|
|
@ -256,7 +256,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
[importData, importPath] = this.readLocalImportFile(path);
|
||||
}
|
||||
if (!importData || !importData.length) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_ImportReadFail({base, path, subtag}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_ImportReadFail({base, path, subtag}));
|
||||
return false;
|
||||
}
|
||||
const importXml: any = this.loadUnboxed(importData); // TODO-LDML: have to load as any because it is an arbitrary part
|
||||
|
|
@ -265,7 +265,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
|
||||
// importXml will have one property: the root element.
|
||||
if (!importRootNode) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_ImportWrongRoot({base, path, subtag}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_ImportWrongRoot({base, path, subtag}));
|
||||
return false;
|
||||
}
|
||||
// pull all children of importXml[subtag] into obj
|
||||
|
|
@ -275,7 +275,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
if (!Array.isArray(subsubval)) {
|
||||
// This is somewhat of an internal error, indicating that a non-mergeable XML file was imported
|
||||
// Not exercisable with the standard LDML imports.
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_ImportMergeFail({base, path, subtag, subsubtag}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_ImportMergeFail({base, path, subtag, subsubtag}));
|
||||
return false;
|
||||
}
|
||||
// Mark all children as an import
|
||||
|
|
@ -306,7 +306,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
public validate(source: LDMLKeyboardXMLSourceFile | LDMLKeyboardTestDataXMLSourceFile): boolean {
|
||||
if(!SchemaValidators.default.ldmlKeyboard3(source)) {
|
||||
for (const err of (<any>SchemaValidators.default.ldmlKeyboard3).errors) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_SchemaValidationError({
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_SchemaValidationError({
|
||||
instancePath: err.instancePath,
|
||||
keyword: err.keyword,
|
||||
message: err.message || 'Unknown AJV Error', // docs say 'message' is optional if 'messages:false' in options
|
||||
|
|
@ -338,7 +338,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
try {
|
||||
source = this.loadUnboxed(file);
|
||||
} catch(e) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_InvalidXml({e}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_InvalidXml({e}));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -379,7 +379,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
} else if (r.length === 1) {
|
||||
return r[0];
|
||||
} else {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_TestDataUnexpectedArray({subtag}));
|
||||
this.callbacks.reportMessage(DeveloperUtilsMessages.Error_TestDataUnexpectedArray({subtag}));
|
||||
return null; // ERROR
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* Helpers and utilities for the Mocha tests.
|
||||
*/
|
||||
import * as path from 'path';
|
||||
import * as fs from "fs";
|
||||
import { fileURLToPath } from 'url';
|
||||
import * as path from 'node:path';
|
||||
import * as fs from "node:fs";
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
/**
|
||||
* Builds a path to the fixture with the given path components.
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import { makePathToFixture } from '../helpers/index.js';
|
|||
|
||||
import { KpsFileReader } from "../../src/types/kps/kps-file-reader.js";
|
||||
import { KpsFileWriter } from '../../src/types/kps/kps-file-writer.js';
|
||||
import { CommonTypesMessages } from '../../src/common-messages.js';
|
||||
import { SymbolUtils } from '../../src/symbol-utils.js';
|
||||
import { DeveloperUtilsMessages } from '../../src/developer-utils-messages.js';
|
||||
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
|
||||
|
|
@ -81,6 +81,6 @@ describe('kps-file-reader', function () {
|
|||
|
||||
assert.isNull(kps);
|
||||
assert.lengthOf(callbacks.messages, 1);
|
||||
assert.isTrue(callbacks.hasMessage(CommonTypesMessages.ERROR_InvalidPackageFile));
|
||||
assert.isTrue(callbacks.hasMessage(DeveloperUtilsMessages.ERROR_InvalidPackageFile));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import 'mocha';
|
||||
import {assert} from 'chai';
|
||||
import { DeveloperUtilsMessages } from '../../src/developer-utils-messages.js';
|
||||
import { Constants } from '@keymanapp/common-types';
|
||||
import { CommonTypesMessages } from '../../src/common-messages.js';
|
||||
import { LKKey, ImportStatus } from '../../src/types/ldml-keyboard/ldml-keyboard-xml.js';
|
||||
import { testReaderCases } from '../helpers/reader-callback-test.js';
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
testReaderCases([
|
||||
{
|
||||
subpath: 'invalid-structure-per-dtd.xml',
|
||||
errors: [CommonTypesMessages.Error_SchemaValidationError({
|
||||
errors: [DeveloperUtilsMessages.Error_SchemaValidationError({
|
||||
instancePath: '/keyboard3',
|
||||
keyword: 'required',
|
||||
message: `must have required property 'info'`,
|
||||
|
|
@ -29,7 +29,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
},
|
||||
{
|
||||
subpath: 'invalid-conforms-to.xml',
|
||||
errors: [CommonTypesMessages.Error_SchemaValidationError({
|
||||
errors: [DeveloperUtilsMessages.Error_SchemaValidationError({
|
||||
instancePath: '/keyboard3/conformsTo',
|
||||
keyword: 'enum',
|
||||
message: `must be equal to one of the allowed values`,
|
||||
|
|
@ -159,7 +159,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
subpath: 'invalid-import-base.xml',
|
||||
loadfail: true,
|
||||
errors: [
|
||||
CommonTypesMessages.Error_ImportInvalidBase({
|
||||
DeveloperUtilsMessages.Error_ImportInvalidBase({
|
||||
base: 'SOME_INVALID_BASE',
|
||||
path: 'B',
|
||||
subtag: 'C'
|
||||
|
|
@ -170,7 +170,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
subpath: 'invalid-import-local.xml',
|
||||
loadfail: true,
|
||||
errors: [
|
||||
CommonTypesMessages.Error_ImportReadFail({
|
||||
DeveloperUtilsMessages.Error_ImportReadFail({
|
||||
base: undefined,
|
||||
path: 'keys-Zyyy-DOESNOTEXIST.xml',
|
||||
subtag: 'keys'
|
||||
|
|
@ -181,7 +181,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
subpath: 'invalid-import-path.xml',
|
||||
loadfail: true,
|
||||
errors: [
|
||||
CommonTypesMessages.Error_ImportInvalidPath({
|
||||
DeveloperUtilsMessages.Error_ImportInvalidPath({
|
||||
base: 'cldr',
|
||||
path: '45/too/many/slashes/leading/to/nothing-Zxxx-does-not-exist.xml',
|
||||
subtag: null,
|
||||
|
|
@ -192,7 +192,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
subpath: 'invalid-import-readfail.xml',
|
||||
loadfail: true,
|
||||
errors: [
|
||||
CommonTypesMessages.Error_ImportReadFail({
|
||||
DeveloperUtilsMessages.Error_ImportReadFail({
|
||||
base: 'cldr',
|
||||
path: '45/none-Zxxx-does-not-exist.xml',
|
||||
subtag: null,
|
||||
|
|
@ -203,7 +203,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
subpath: 'invalid-import-wrongroot.xml',
|
||||
loadfail: true,
|
||||
errors: [
|
||||
CommonTypesMessages.Error_ImportWrongRoot({
|
||||
DeveloperUtilsMessages.Error_ImportWrongRoot({
|
||||
base: null,
|
||||
path: '45/keys-Zyyy-punctuation.xml',
|
||||
subtag: 'flicks',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,23 @@
|
|||
* Copy a keyboard or lexical model project
|
||||
*/
|
||||
|
||||
import { CloudUrls, GitHubUrls, CompilerCallbacks, KeymanCompiler, KeymanCompilerArtifact, KeymanCompilerArtifacts, KeymanCompilerResult, KeymanDeveloperProject, KeymanDeveloperProjectOptions, KPJFileReader, KPJFileWriter, KpsFileReader, KpsFileWriter, ValidIds, CompilerBaseOptions } from "@keymanapp/developer-utils";
|
||||
import {
|
||||
CloudUrls,
|
||||
GitHubUrls,
|
||||
CompilerCallbacks,
|
||||
KeymanCompiler,
|
||||
KeymanCompilerArtifact,
|
||||
KeymanCompilerArtifacts,
|
||||
KeymanCompilerResult,
|
||||
KeymanDeveloperProject,
|
||||
KeymanDeveloperProjectOptions,
|
||||
ProjectLoader,
|
||||
KPJFileWriter,
|
||||
KpsFileReader,
|
||||
KpsFileWriter,
|
||||
ValidIds,
|
||||
CompilerBaseOptions,
|
||||
} from "@keymanapp/developer-utils";
|
||||
import { KeymanFileTypes } from "@keymanapp/common-types";
|
||||
|
||||
import { CopierMessages } from "./copier-messages.js";
|
||||
|
|
@ -124,7 +140,7 @@ export class KeymanProjectCopier implements KeymanCompiler {
|
|||
this.sourceId = this.callbacks.path.basename(projectSource, KeymanFileTypes.Source.Project);
|
||||
|
||||
// copy project file
|
||||
const project = await this.loadProjectFromFile(projectSource);
|
||||
const project = await ProjectLoader.loadProjectFromFile(projectSource, this.callbacks, this.asyncCallbacks);
|
||||
if(!project) {
|
||||
// loadProjectFromFile already reported errors
|
||||
return null;
|
||||
|
|
@ -637,31 +653,6 @@ export class KeymanProjectCopier implements KeymanCompiler {
|
|||
return this.callbacks.path.join(this.outPath, 'source');
|
||||
}
|
||||
|
||||
private async loadProjectFromFile(filename: string): Promise<KeymanDeveloperProject> {
|
||||
const kpjData = await this.asyncCallbacks.fsAsync.readFile(filename);
|
||||
const reader = new KPJFileReader(this.asyncCallbacks);
|
||||
let kpj = null;
|
||||
try {
|
||||
kpj = reader.read(kpjData);
|
||||
if(!kpj) {
|
||||
this.callbacks.reportMessage(CopierMessages.Error_ProjectFileCouldNotBeRead({filename}));
|
||||
return null;
|
||||
}
|
||||
|
||||
if(kpj.KeymanDeveloperProject?.Options?.Version && kpj.KeymanDeveloperProject.Options.Version != "1.0" && kpj.KeymanDeveloperProject.Options.Version != "2.0") {
|
||||
this.callbacks.reportMessage(CopierMessages.Error_UnsupportedProjectVersion({filename, version: kpj.KeymanDeveloperProject.Options.Version}));
|
||||
return null;
|
||||
}
|
||||
reader.validate(kpj);
|
||||
} catch(e) {
|
||||
this.callbacks.reportMessage(CopierMessages.Error_InvalidProjectFile({filename, message: (e ?? '').toString()}));
|
||||
return null;
|
||||
}
|
||||
const project = await reader.transform(filename, kpj);
|
||||
|
||||
return project;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write artifacts from a successful compile to disk, via callbacks methods.
|
||||
* The artifacts written will include all files from the project, across
|
||||
|
|
|
|||
|
|
@ -92,22 +92,9 @@ export class CopierMessages {
|
|||
`The package source file '${def(o.filename)}' could not be loaded. The file may have an invalid format`
|
||||
);
|
||||
|
||||
static ERROR_UnsupportedProjectVersion = SevError | 0x000D;
|
||||
static Error_UnsupportedProjectVersion = (o:{filename: string, version: string}) => m(this.ERROR_UnsupportedProjectVersion,
|
||||
`Project version ${def(o.version)} for '${def(o.filename)}' is not supported by this version of Keyman Developer`
|
||||
);
|
||||
|
||||
static ERROR_InvalidProjectFile = SevError | 0x000E;
|
||||
static Error_InvalidProjectFile = (o:{filename: string, message: string}) => m(
|
||||
this.ERROR_InvalidProjectFile,
|
||||
`Project file '${def(o.filename)}' is not valid: ${def(o.message)}`
|
||||
);
|
||||
|
||||
static ERROR_ProjectFileCouldNotBeRead = SevError | 0x000F;
|
||||
static Error_ProjectFileCouldNotBeRead = (o:{filename: string}) => m(
|
||||
this.ERROR_ProjectFileCouldNotBeRead,
|
||||
`Project file '${def(o.filename)}' could not be read`
|
||||
);
|
||||
// 0x000D ERROR_UnsupportedProjectVersion: moved to developer-utils-messages
|
||||
// 0x000E ERROR_InvalidProjectFile: moved to developer-utils-messages
|
||||
// 0x000F ERROR_ProjectFileCouldNotBeRead: moved to developer-utils-messages
|
||||
|
||||
static INFO_DryRun = SevInfo | 0x0010;
|
||||
static Info_DryRun = (o:{outPath: string}) => m(
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
"paths": {
|
||||
"@keymanapp/keyman-version": ["../../../common/web/keyman-version/keyman-version.mts"],
|
||||
"@keymanapp/common-types": ["../../../common/web/types/src/main"],
|
||||
"@keymanapp/developer-utils": ["../common/web/utils"],
|
||||
},
|
||||
|
||||
},
|
||||
|
|
@ -21,5 +22,6 @@
|
|||
"references": [
|
||||
{ "path": "../../../common/web/keyman-version" },
|
||||
{ "path": "../../../common/web/types/" },
|
||||
{ "path": "../common/web/utils/" },
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
* If you need to add more Unicode blocks, customize SPACELESS_SCRIPT_BLOCKS.
|
||||
*/
|
||||
|
||||
import {readFileSync} from "fs";
|
||||
import * as path from "path";
|
||||
import {readFileSync} from "node:fs";
|
||||
import * as path from "node:path";
|
||||
|
||||
// Where to find UnicodeData.txt and Blocks.txt
|
||||
const UCD_DIR = path.join("..", "..", "..", "..", "resources", "standards-data", "unicode-character-database");
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ export class PackageCompilerMessages {
|
|||
`The source file '${def(o.filename)}' should not be included in the package; instead include the compiled result.`
|
||||
);
|
||||
|
||||
// 0x001E was ERROR_InvalidPackageFile, now CommonTypesMessages.Error_InvalidPackageFile
|
||||
// 0x001E was ERROR_InvalidPackageFile, now DeveloperUtilsMessages.Error_InvalidPackageFile
|
||||
|
||||
static ERROR_FileRecordIsMissingName = SevError | 0x001F;
|
||||
static Error_FileRecordIsMissingName = (o:{description:string}) => m(this.ERROR_FileRecordIsMissingName,
|
||||
|
|
@ -191,7 +191,7 @@ export class PackageCompilerMessages {
|
|||
`The format for version numbers should be number[.number[.number]]. Each
|
||||
number component should be an integer, without leading zeroes.`
|
||||
);
|
||||
|
||||
|
||||
static ERROR_PackageMustNotContainItself = SevError | 0x0028;
|
||||
static Error_PackageMustNotContainItself = (o:{outputFilename: string}) => m(
|
||||
this.ERROR_PackageMustNotContainItself, `The package may not include a .kmp file of the same name '${def(o.outputFilename)}'.`, `
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { buildActivities, buildKeyboardInfoActivity, buildModelInfoActivity } fr
|
|||
import { InfrastructureMessages } from '../../messages/infrastructureMessages.js';
|
||||
import { loadProject } from '../../util/projectLoader.js';
|
||||
import { ExtendedCompilerOptions } from '../../util/extendedCompilerOptions.js';
|
||||
import { getOption } from '@keymanapp/developer-utils';
|
||||
import { getOption } from '../../util/options.js';
|
||||
|
||||
export class BuildProject extends BuildActivity {
|
||||
public get name(): string { return 'Project'; }
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
import { Command, Option } from 'commander';
|
||||
import { declareBuild } from './commands/build.js';
|
||||
import { declareAnalyze } from './commands/analyze.js';
|
||||
import { KeymanSentry, loadOptions } from '@keymanapp/developer-utils';
|
||||
import { loadOptions } from './util/options.js';
|
||||
import { KeymanSentry } from './util/KeymanSentry.js';
|
||||
import KEYMAN_VERSION from "@keymanapp/keyman-version";
|
||||
import { TestKeymanSentry } from './util/TestKeymanSentry.js';
|
||||
import { exitProcess } from './util/sysexits.js';
|
||||
|
|
|
|||
|
|
@ -38,9 +38,7 @@ export class InfrastructureMessages {
|
|||
static Info_FileNotBuiltSuccessfully = (o:{filename:string,relativeFilename:string}) => ({filename:o.filename, ...m(this.INFO_FileNotBuiltSuccessfully,
|
||||
`${def(o.relativeFilename)} failed to build.`)});
|
||||
|
||||
static ERROR_InvalidProjectFile = SevError | 0x0008;
|
||||
static Error_InvalidProjectFile = (o:{message:string}) => m(this.ERROR_InvalidProjectFile,
|
||||
`Project file is not valid: ${def(o.message)}`);
|
||||
// 0x0008: ERROR_InvalidProjectFile moved to DeveloperUtilsMessages
|
||||
|
||||
static HINT_FilenameHasDifferingCase = SevHint | 0x0009;
|
||||
static Hint_FilenameHasDifferingCase = (o:{reference:string, filename:string}) => m(this.HINT_FilenameHasDifferingCase,
|
||||
|
|
@ -84,9 +82,7 @@ export class InfrastructureMessages {
|
|||
static Error_InvalidProjectFolder = (o:{folderName:string}) => m(this.ERROR_InvalidProjectFolder,
|
||||
`The folder ${def(o.folderName)} does not appear to be a Keyman Developer project.`);
|
||||
|
||||
static ERROR_UnsupportedProjectVersion = SevError | 0x0013;
|
||||
static Error_UnsupportedProjectVersion = (o:{version:string}) => m(this.ERROR_UnsupportedProjectVersion,
|
||||
`Project version ${def(o.version)} is not supported by this version of Keyman Developer.`);
|
||||
// 0x0013: ERROR_UnsupportedProjectVersion moved to developer-utils-messages
|
||||
|
||||
static HINT_ProjectIsVersion10 = SevHint | 0x0014;
|
||||
static Hint_ProjectIsVersion10 = () => m(this.HINT_ProjectIsVersion10,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { CommonTypesMessages, CompilerErrorNamespace } from '@keymanapp/developer-utils';
|
||||
import { DeveloperUtilsMessages, CompilerErrorNamespace } from '@keymanapp/developer-utils';
|
||||
import { AnalyzerMessages } from '@keymanapp/kmc-analyze';
|
||||
import { CopierMessages } from '@keymanapp/kmc-copy';
|
||||
import { GeneratorMessages } from '@keymanapp/kmc-generate';
|
||||
|
|
@ -13,7 +13,7 @@ import { InfrastructureMessages } from './infrastructureMessages.js';
|
|||
// Maps every compiler error namespace to the corresponding implementation
|
||||
const messageNamespaces: Record<CompilerErrorNamespace, any> = {
|
||||
[CompilerErrorNamespace.LdmlKeyboardCompiler]: LdmlCompilerMessages,
|
||||
[CompilerErrorNamespace.CommonTypes]: CommonTypesMessages,
|
||||
[CompilerErrorNamespace.DeveloperUtils]: DeveloperUtilsMessages,
|
||||
[CompilerErrorNamespace.KmnCompiler]: KmnCompilerMessages,
|
||||
[CompilerErrorNamespace.ModelCompiler]: ModelCompilerMessages,
|
||||
[CompilerErrorNamespace.PackageCompiler]: PackageCompilerMessages,
|
||||
|
|
@ -38,7 +38,7 @@ export type CompilerMessageSource = {
|
|||
// TODO: consolidate with messageNamespaces above
|
||||
export const messageSources: Record<CompilerErrorNamespace, CompilerMessageSource> = {
|
||||
[CompilerErrorNamespace.LdmlKeyboardCompiler]: { module: 'kmc-ldml', class: LdmlCompilerMessages },
|
||||
[CompilerErrorNamespace.CommonTypes]: { module: 'common-types', class: CommonTypesMessages },
|
||||
[CompilerErrorNamespace.DeveloperUtils]: { module: 'developer-utils', class: DeveloperUtilsMessages },
|
||||
[CompilerErrorNamespace.KmnCompiler]: { module: 'kmc-kmn', class: KmnCompilerMessages },
|
||||
[CompilerErrorNamespace.ModelCompiler]: { module: 'kmc-model', class: ModelCompilerMessages },
|
||||
[CompilerErrorNamespace.PackageCompiler]: { module: 'kmc-package', class: PackageCompilerMessages },
|
||||
|
|
|
|||
104
developer/src/kmc/src/util/KeymanSentry.ts
Normal file
104
developer/src/kmc/src/util/KeymanSentry.ts
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
// TODO: this is duplicated in server.js
|
||||
import Sentry from "@sentry/node";
|
||||
import KEYMAN_VERSION from "@keymanapp/keyman-version";
|
||||
import { getOption } from "./options.js";
|
||||
|
||||
export type SentryNodeOptions = Sentry.NodeOptions;
|
||||
|
||||
/**
|
||||
* Maximum delay on shutdown of process to send pending events
|
||||
* to Sentry, in msec
|
||||
*/
|
||||
const CLOSE_TIMEOUT = 2000;
|
||||
|
||||
let isInit = false;
|
||||
|
||||
export class KeymanSentry {
|
||||
|
||||
static isEnabled() {
|
||||
if(process.argv.includes('--no-error-reporting')) {
|
||||
return false;
|
||||
}
|
||||
if(process.argv.includes('--error-reporting')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return getOption('automatically report errors', true);
|
||||
}
|
||||
|
||||
static init(options?: SentryNodeOptions) {
|
||||
options = options ?? {};
|
||||
Sentry.init({
|
||||
...options,
|
||||
dsn: 'https://39b25a09410349a58fe12aaf721565af@o1005580.ingest.sentry.io/5983519', // Keyman Developer
|
||||
environment: KEYMAN_VERSION.VERSION_ENVIRONMENT,
|
||||
release: KEYMAN_VERSION.VERSION_GIT_TAG,
|
||||
});
|
||||
isInit = true;
|
||||
}
|
||||
|
||||
private static writeSentryMessage(eventId: string) {
|
||||
process.stderr.write(`
|
||||
This error has been automatically reported to the Keyman team.
|
||||
Identifier: ${eventId}
|
||||
Application: Keyman Developer
|
||||
Reported at: https://sentry.io/organizations/keyman/projects/keyman-developer/events/${eventId}/
|
||||
`);
|
||||
}
|
||||
|
||||
static async reportException(e: any, silent: boolean = true) {
|
||||
if(isInit) {
|
||||
const eventId = await Sentry.captureException(e);
|
||||
if(!silent) {
|
||||
this.writeSentryMessage(eventId);
|
||||
}
|
||||
return eventId;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static captureMessage(message: string) {
|
||||
if(isInit) {
|
||||
return Sentry.captureMessage(message);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* capture an exception for Sentry; note that in local environments, this will normally
|
||||
* throw the exception rather than sending to Sentry
|
||||
* @param e
|
||||
* @param force if true, reports to Sentry even in local environments
|
||||
*/
|
||||
static async captureException(e: any, force?: boolean): Promise<never> {
|
||||
if(isInit) {
|
||||
// For local development, we don't want to bury the trace; we need the cast to avoid
|
||||
// TS2367 (comparison appears to be unintentional)
|
||||
if(!force && (KEYMAN_VERSION.VERSION_ENVIRONMENT as string) == 'local') {
|
||||
throw e;
|
||||
}
|
||||
|
||||
const eventId = Sentry.captureException(e);
|
||||
process.stderr.write(`
|
||||
Fatal error: ${(e??'').toString()}
|
||||
`);
|
||||
this.writeSentryMessage(eventId);
|
||||
await this.close();
|
||||
|
||||
process.exit(1);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
static async close() {
|
||||
if(isInit) {
|
||||
try {
|
||||
await Sentry.close(CLOSE_TIMEOUT);
|
||||
} catch(e) {
|
||||
// ignore any errors here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ import { CompilerCallbacks, CompilerEvent, EventResolver, NullEventResolver,
|
|||
import { InfrastructureMessages } from '../messages/infrastructureMessages.js';
|
||||
import chalk from 'chalk';
|
||||
import supportsColor from 'supports-color';
|
||||
import { KeymanSentry } from '@keymanapp/developer-utils';
|
||||
import { KeymanSentry } from './KeymanSentry.js';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const color = chalk.default;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { KmnCompiler } from "@keymanapp/kmc-kmn";
|
||||
import { NodeCompilerCallbacks } from "./NodeCompilerCallbacks.js";
|
||||
import { KeymanSentry, SentryNodeOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanSentry, SentryNodeOptions } from './KeymanSentry.js';
|
||||
|
||||
const cli = process.argv.join(' ');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Sentry from "@sentry/node";
|
||||
import * as process from "node:process";
|
||||
import { SentryNodeOptions } from "@keymanapp/developer-utils";
|
||||
import { SentryNodeOptions } from "./KeymanSentry.js";
|
||||
|
||||
Sentry.setContext('Command Line', {
|
||||
// obfusate parameters with longer paths e.g. from 'c:/users/name/a/b' to
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { KeymanFileTypes } from "@keymanapp/common-types";
|
||||
import { CompilerCallbacks, KeymanDeveloperProject, KPJFileReader } from "@keymanapp/developer-utils";
|
||||
import { CompilerCallbacks, KeymanDeveloperProject, ProjectLoader } from "@keymanapp/developer-utils";
|
||||
import { InfrastructureMessages } from "../messages/infrastructureMessages.js";
|
||||
|
||||
export const isProject = (filename: string): boolean =>
|
||||
|
|
@ -26,7 +26,7 @@ export async function loadProject(infile: string, callbacks: CompilerCallbacks)
|
|||
}
|
||||
|
||||
const project = callbacks.fs.existsSync(infile) ?
|
||||
await loadProjectFromFile(infile, callbacks) :
|
||||
await ProjectLoader.loadProjectFromFile(infile, callbacks) :
|
||||
await loadDefaultProjectFromFolder(infile, callbacks);
|
||||
|
||||
return project;
|
||||
|
|
@ -42,21 +42,3 @@ async function loadDefaultProjectFromFolder(infile: string, callbacks: CompilerC
|
|||
return project;
|
||||
}
|
||||
|
||||
async function loadProjectFromFile(infile: string, callbacks: CompilerCallbacks): Promise<KeymanDeveloperProject> {
|
||||
const kpjData = await callbacks.fsAsync.readFile(infile);
|
||||
const reader = new KPJFileReader(callbacks);
|
||||
let kpj = null;
|
||||
try {
|
||||
kpj = reader.read(kpjData);
|
||||
if(kpj.KeymanDeveloperProject?.Options?.Version && kpj.KeymanDeveloperProject.Options.Version != "1.0" && kpj.KeymanDeveloperProject.Options.Version != "2.0") {
|
||||
callbacks.reportMessage(InfrastructureMessages.Error_UnsupportedProjectVersion({version: kpj.KeymanDeveloperProject.Options.Version}));
|
||||
return null;
|
||||
}
|
||||
reader.validate(kpj);
|
||||
} catch(e) {
|
||||
callbacks.reportMessage(InfrastructureMessages.Error_InvalidProjectFile({message: (e??'').toString()}));
|
||||
return null;
|
||||
}
|
||||
const project = await reader.transform(infile, kpj);
|
||||
return project;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { KeymanSentry } from "@keymanapp/developer-utils";
|
||||
import { KeymanSentry } from './KeymanSentry.js';
|
||||
|
||||
/**
|
||||
* Exit codes defined in <sysexits.h>:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { TestCompilerCallbacks } from '@keymanapp/developer-test-helpers';
|
||||
import { clearOptions } from '@keymanapp/developer-utils';
|
||||
import { clearOptions } from '../src/util/options.js';
|
||||
import { assert } from 'chai';
|
||||
import 'mocha';
|
||||
import { BuildProject } from '../src/commands/buildClasses/BuildProject.js';
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { NodeCompilerCallbacks } from '../src/util/NodeCompilerCallbacks.js';
|
|||
import { KeymanFileTypes } from '@keymanapp/common-types';
|
||||
import { unitTestEndpoints } from '../src/commands/build.js';
|
||||
import { KmnCompilerMessages } from '@keymanapp/kmc-kmn';
|
||||
import { clearOptions } from '@keymanapp/developer-utils';
|
||||
import { clearOptions } from '../src/util/options.js';
|
||||
import { loadProject } from '../src/util/projectLoader.js';
|
||||
import { CompilerErrorNamespace, CompilerEvent, defaultCompilerOptions, CompilerOptions} from '@keymanapp/developer-utils';
|
||||
import { CompilerErrorNamespace, CompilerEvent, defaultCompilerOptions, CompilerOptions, DeveloperUtilsMessages} from '@keymanapp/developer-utils';
|
||||
import { analyzeUnitTestEndpoints } from '../src/commands/analyze.js';
|
||||
import { BuildKeyboardInfo } from '../src/commands/buildClasses/BuildKeyboardInfo.js';
|
||||
import { BuildModelInfo } from '../src/commands/buildClasses/BuildModelInfo.js';
|
||||
|
|
@ -71,12 +71,12 @@ describe('InfrastructureMessages', function () {
|
|||
'ERROR_OutFileNotValidForProjects not generated, instead got: '+JSON.stringify(ncb.messages,null,2));
|
||||
});
|
||||
|
||||
// ERROR_InvalidProjectFile
|
||||
// ERROR_InvalidProjectFile - test stays here for now though referencing developer-messages
|
||||
|
||||
it('should generate ERROR_InvalidProjectFile if a project file is invalid', async function() {
|
||||
const ncb = new NodeCompilerCallbacks({logLevel: 'silent'});
|
||||
await unitTestEndpoints.build(makePathToFixture('invalid-projects', 'error_invalid_project_file.kpj'), null, ncb, {});
|
||||
assert.isTrue(ncb.hasMessage(InfrastructureMessages.ERROR_InvalidProjectFile),
|
||||
assert.isTrue(ncb.hasMessage(DeveloperUtilsMessages.ERROR_InvalidProjectFile),
|
||||
'ERROR_InvalidProjectFile not generated, instead got: '+JSON.stringify(ncb.messages,null,2));
|
||||
});
|
||||
|
||||
|
|
@ -202,14 +202,14 @@ describe('InfrastructureMessages', function () {
|
|||
assertMessagesEqual(ncb.messages, expectedMessages);
|
||||
});
|
||||
|
||||
// ERROR_UnsupportedProjectVersion
|
||||
// ERROR_UnsupportedProjectVersion (test stays here for now though referencing developer-utils)
|
||||
|
||||
it('should generate ERROR_UnsupportedProjectVersion if a project file with an unsupported version is loaded', async function() {
|
||||
const ncb = new NodeCompilerCallbacks({logLevel: 'silent'});
|
||||
const filename = makePathToFixture('invalid-projects', 'error_unsupported_project_version.kpj');
|
||||
const expectedMessages = [
|
||||
InfrastructureMessages.INFO_BuildingFile,
|
||||
InfrastructureMessages.ERROR_UnsupportedProjectVersion,
|
||||
DeveloperUtilsMessages.ERROR_UnsupportedProjectVersion,
|
||||
InfrastructureMessages.INFO_ProjectNotBuiltSuccessfully
|
||||
];
|
||||
await unitTestEndpoints.build(filename, null, ncb, {compilerWarningsAsErrors: true});
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import 'mocha';
|
|||
import { BuildProject } from '../src/commands/buildClasses/BuildProject.js';
|
||||
import { makePathToFixture } from './helpers/index.js';
|
||||
import { InfrastructureMessages } from '../src/messages/infrastructureMessages.js';
|
||||
import { clearOptions } from '@keymanapp/developer-utils';
|
||||
import { clearOptions } from '../src/util/options.js';
|
||||
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// TODO: this is duplicated in kmc!
|
||||
import Sentry from "@sentry/node";
|
||||
import KEYMAN_VERSION from "@keymanapp/keyman-version";
|
||||
import { getOption } from "./options.js";
|
||||
|
|
@ -5,12 +5,13 @@ import chalk from 'chalk';
|
|||
import express from 'express';
|
||||
import multer from 'multer';
|
||||
import * as ws from 'ws';
|
||||
import { KeymanSentry, loadOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanSentry } from './KeymanSentry.js';
|
||||
import { configuration } from './config.js';
|
||||
import { environment } from './environment.js';
|
||||
import setupRoutes from './routes.js';
|
||||
import { shutdown } from './shutdown.js';
|
||||
import { initTray } from './tray.js';
|
||||
import { loadOptions } from './options.js';
|
||||
|
||||
const options = {
|
||||
ngrokLog: false, // Set this to true if you need to see ngrok logs in the console
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { KeymanSentry } from '@keymanapp/developer-utils';
|
||||
import { KeymanSentry } from './KeymanSentry.js';
|
||||
import { readFileSync, existsSync } from 'fs';
|
||||
|
||||
export function loadJsonFile(filename: string): any {
|
||||
|
|
|
|||
96
developer/src/server/src/options.ts
Normal file
96
developer/src/server/src/options.ts
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
// TODO: this is duplicated in kmc
|
||||
import * as os from 'node:os';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
export interface KeymanDeveloperOptions {
|
||||
"use tab char"?: boolean;
|
||||
"link font sizes"?: boolean;
|
||||
"indent size"?: number;
|
||||
"use old debugger"?: boolean;
|
||||
"editor theme"?: string;
|
||||
"debugger break when exiting line"?: boolean;
|
||||
"debugger single step after break"?: boolean;
|
||||
"debugger show store offset"?: boolean;
|
||||
"debugger recompile with debug info"?: boolean;
|
||||
"debugger auto reset before compilng"?: boolean;
|
||||
"auto save before compiling"?: boolean;
|
||||
"osk auto save before importing"?: boolean;
|
||||
"web host port"?: number;
|
||||
"server keep alive"?: boolean;
|
||||
"server use local addresses"?: boolean;
|
||||
"server ngrok token"?: string;
|
||||
"server ngrok region"?: string;
|
||||
"server use ngrok"?: boolean;
|
||||
"server show console window"?: boolean;
|
||||
"char map disable database lookups"?: boolean;
|
||||
"char map auto lookup"?: boolean;
|
||||
"open keyboard files in source view"?: boolean;
|
||||
"display theme"?: string;
|
||||
"external editor path"?: string;
|
||||
"smtp server"?: string;
|
||||
"test email addresses"?: string;
|
||||
"web ladder length"?: number;
|
||||
"default project path"?: string;
|
||||
"automatically report errors"?: boolean;
|
||||
"automatically report usage"?: boolean;
|
||||
"toolbar visible"?: boolean;
|
||||
"active project"?: string;
|
||||
"prompt to upgrade projects"?: boolean;
|
||||
};
|
||||
|
||||
type KeymanDeveloperOption = keyof KeymanDeveloperOptions;
|
||||
|
||||
// Default has no options set, and unit tests will use the defaults (won't call
|
||||
// `loadOptions()`)
|
||||
let options: KeymanDeveloperOptions = {};
|
||||
|
||||
// We only load the options from disk once on first use
|
||||
let optionsLoaded = false;
|
||||
|
||||
export async function loadOptions(): Promise<KeymanDeveloperOptions> {
|
||||
if(optionsLoaded) {
|
||||
return options;
|
||||
}
|
||||
|
||||
options = {};
|
||||
try {
|
||||
const optionsFile = path.join(os.homedir(), '.keymandeveloper', 'options.json');
|
||||
if(fs.existsSync(optionsFile)) {
|
||||
for(let i = 0; i < 5; i++) {
|
||||
try {
|
||||
const data = JSON.parse(fs.readFileSync(optionsFile, 'utf-8'));
|
||||
if(typeof data == 'object') {
|
||||
options = data;
|
||||
}
|
||||
break;
|
||||
} catch(e) {
|
||||
if(e?.code == 'EBUSY') {
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
} else {
|
||||
// give up, nothing to report here
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
// Nothing to report here, sadly -- because we cannot rely on Sentry at this
|
||||
// low level.
|
||||
options = {};
|
||||
}
|
||||
optionsLoaded = true;
|
||||
return options;
|
||||
}
|
||||
|
||||
export function getOption<T extends KeymanDeveloperOption>(valueName: T, defaultValue: KeymanDeveloperOptions[T]): KeymanDeveloperOptions[T] {
|
||||
return options[valueName] ?? defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* unit tests will clear options before running, for consistency
|
||||
*/
|
||||
export function clearOptions() {
|
||||
options = {};
|
||||
optionsLoaded = true;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { KeymanSentry } from '@keymanapp/developer-utils';
|
||||
import { KeymanSentry } from './KeymanSentry.js';
|
||||
|
||||
export async function shutdown(code?: number): Promise<never> {
|
||||
await KeymanSentry.close();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
keyman (18.0.227-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Eberhard Beilharz <eb1@sil.org> Fri, 04 Apr 2025 15:12:41 +0200
|
||||
|
||||
keyman (18.0.199-2) unstable; urgency=medium
|
||||
|
||||
* Team upload.
|
||||
|
|
|
|||
510
package-lock.json
generated
510
package-lock.json
generated
|
|
@ -340,7 +340,6 @@
|
|||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@keymanapp/common-types": "*",
|
||||
"@sentry/node": "^7.57.0",
|
||||
"eventemitter3": "^5.0.0",
|
||||
"fast-xml-parser": "github:NaturalIntelligence/fast-xml-parser#metadata",
|
||||
"path-browserify": "^1.0.1",
|
||||
|
|
@ -3712,19 +3711,20 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@puppeteer/browsers": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.2.tgz",
|
||||
"integrity": "sha512-hZ/JhxPIceWaGSEzUZp83/8M49CoxlkuThfTR7t4AoCu5+ZvJ3vktLm60Otww2TXeROB5igiZ8D9oPQh6ckBVg==",
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.0.tgz",
|
||||
"integrity": "sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"debug": "4.3.4",
|
||||
"extract-zip": "2.0.1",
|
||||
"progress": "2.0.3",
|
||||
"proxy-agent": "6.4.0",
|
||||
"semver": "7.6.0",
|
||||
"tar-fs": "3.0.5",
|
||||
"unbzip2-stream": "1.4.3",
|
||||
"yargs": "17.7.2"
|
||||
"debug": "^4.3.5",
|
||||
"extract-zip": "^2.0.1",
|
||||
"progress": "^2.0.3",
|
||||
"proxy-agent": "^6.4.0",
|
||||
"semver": "^7.6.3",
|
||||
"tar-fs": "^3.0.6",
|
||||
"unbzip2-stream": "^1.4.3",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"bin": {
|
||||
"browsers": "lib/cjs/main-cli.js"
|
||||
|
|
@ -3738,6 +3738,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -3747,6 +3748,7 @@
|
|||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
||||
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"string-width": "^4.2.0",
|
||||
"strip-ansi": "^6.0.1",
|
||||
|
|
@ -3757,12 +3759,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@puppeteer/browsers/node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
|
|
@ -3778,18 +3781,24 @@
|
|||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@puppeteer/browsers/node_modules/semver": {
|
||||
"version": "7.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
|
||||
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
|
||||
"node_modules/@puppeteer/browsers/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@puppeteer/browsers/node_modules/semver": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
|
|
@ -3802,6 +3811,7 @@
|
|||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
|
|
@ -3816,6 +3826,7 @@
|
|||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
|
|
@ -3828,6 +3839,7 @@
|
|||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
||||
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cliui": "^8.0.1",
|
||||
"escalade": "^3.1.1",
|
||||
|
|
@ -3846,6 +3858,7 @@
|
|||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
|
|
@ -4569,7 +4582,8 @@
|
|||
"version": "0.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
|
||||
"integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node10": {
|
||||
"version": "1.0.8",
|
||||
|
|
@ -6175,6 +6189,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
|
||||
"integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.1"
|
||||
},
|
||||
|
|
@ -6232,10 +6247,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/b4a": {
|
||||
"version": "1.6.6",
|
||||
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz",
|
||||
"integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==",
|
||||
"dev": true
|
||||
"version": "1.6.7",
|
||||
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz",
|
||||
"integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
|
|
@ -6243,49 +6259,80 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bare-events": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.2.tgz",
|
||||
"integrity": "sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==",
|
||||
"version": "2.5.4",
|
||||
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz",
|
||||
"integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/bare-fs": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.0.tgz",
|
||||
"integrity": "sha512-TNFqa1B4N99pds2a5NYHR15o0ZpdNKbAeKTE/+G6ED/UeOavv8RY3dr/Fu99HW3zU3pXpo2kDNO8Sjsm2esfOw==",
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.1.2.tgz",
|
||||
"integrity": "sha512-8wSeOia5B7LwD4+h465y73KOdj5QHsbbuoUfPBi+pXgFJIPuG7SsiOdJuijWMyfid49eD+WivpfY7KT8gbAzBA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"bare-events": "^2.0.0",
|
||||
"bare-path": "^2.0.0",
|
||||
"bare-stream": "^1.0.0"
|
||||
"bare-events": "^2.5.4",
|
||||
"bare-path": "^3.0.0",
|
||||
"bare-stream": "^2.6.4"
|
||||
},
|
||||
"engines": {
|
||||
"bare": ">=1.16.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bare-buffer": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bare-buffer": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-os": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.3.0.tgz",
|
||||
"integrity": "sha512-oPb8oMM1xZbhRQBngTgpcQ5gXw6kjOaRsSWsIeNyRxGed2w/ARyP7ScBYpWR1qfX2E5rS3gBw6OWcSQo+s+kUg==",
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.1.tgz",
|
||||
"integrity": "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"bare": ">=1.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-path": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.1.tgz",
|
||||
"integrity": "sha512-OHM+iwRDRMDBsSW7kl3dO62JyHdBKO3B25FB9vNQBPcGHMo4+eA8Yj41Lfbk3pS/seDY+siNge0LdRTulAau/A==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",
|
||||
"integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"bare-os": "^2.1.0"
|
||||
"bare-os": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-KhNUoDL40iP4gFaLSsoGE479t0jHijfYdIcxRn/XtezA2BaUD0NRf/JGRpsMq6dMNM+SrCrB0YSSo/5wBY4rOQ==",
|
||||
"version": "2.6.5",
|
||||
"resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.5.tgz",
|
||||
"integrity": "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"streamx": "^2.16.1"
|
||||
"streamx": "^2.21.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bare-buffer": "*",
|
||||
"bare-events": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bare-buffer": {
|
||||
"optional": true
|
||||
},
|
||||
"bare-events": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
|
|
@ -6306,13 +6353,15 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/basic-ftp": {
|
||||
"version": "5.0.5",
|
||||
"resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz",
|
||||
"integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
|
|
@ -6436,6 +6485,7 @@
|
|||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.1.13"
|
||||
|
|
@ -6836,14 +6886,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/chromium-bidi": {
|
||||
"version": "0.5.17",
|
||||
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.17.tgz",
|
||||
"integrity": "sha512-BqOuIWUgTPj8ayuBFJUYCCuwIcwjBsb3/614P7tt1bEPJ4i1M0kCdIl0Wi9xhtswBXnfO2bTpTMkHD71H8rJMg==",
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.3.tgz",
|
||||
"integrity": "sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"mitt": "3.0.1",
|
||||
"urlpattern-polyfill": "10.0.0",
|
||||
"zod": "3.22.4"
|
||||
"zod": "3.23.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"devtools-protocol": "*"
|
||||
|
|
@ -7244,6 +7295,7 @@
|
|||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz",
|
||||
"integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
|
|
@ -7417,6 +7469,7 @@
|
|||
"resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz",
|
||||
"integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ast-types": "^0.13.4",
|
||||
"escodegen": "^2.1.0",
|
||||
|
|
@ -7471,10 +7524,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/devtools-protocol": {
|
||||
"version": "0.0.1273771",
|
||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1273771.tgz",
|
||||
"integrity": "sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og==",
|
||||
"dev": true
|
||||
"version": "0.0.1312386",
|
||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz",
|
||||
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "5.0.0",
|
||||
|
|
@ -8182,6 +8236,7 @@
|
|||
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
|
||||
"integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"esprima": "^4.0.1",
|
||||
"estraverse": "^5.2.0",
|
||||
|
|
@ -8198,15 +8253,6 @@
|
|||
"source-map": "~0.6.1"
|
||||
}
|
||||
},
|
||||
"node_modules/escodegen/node_modules/estraverse": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
|
||||
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.57.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
|
||||
|
|
@ -8669,15 +8715,6 @@
|
|||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/estraverse": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
|
||||
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/glob-parent": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
|
||||
|
|
@ -8750,15 +8787,6 @@
|
|||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/esquery/node_modules/estraverse": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
|
||||
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/esrecurse": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
|
||||
|
|
@ -8771,11 +8799,12 @@
|
|||
"node": ">=4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/esrecurse/node_modules/estraverse": {
|
||||
"node_modules/estraverse": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
|
||||
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
|
|
@ -9045,7 +9074,8 @@
|
|||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
|
||||
"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.2.12",
|
||||
|
|
@ -9430,27 +9460,28 @@
|
|||
}
|
||||
},
|
||||
"node_modules/get-uri": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz",
|
||||
"integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==",
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz",
|
||||
"integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"basic-ftp": "^5.0.2",
|
||||
"data-uri-to-buffer": "^6.0.2",
|
||||
"debug": "^4.3.4",
|
||||
"fs-extra": "^11.2.0"
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/get-uri/node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
|
|
@ -9461,19 +9492,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/get-uri/node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"node_modules/get-uri/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/git-diff": {
|
||||
"version": "2.0.6",
|
||||
|
|
@ -9974,7 +9998,8 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/ignore": {
|
||||
"version": "5.3.1",
|
||||
|
|
@ -10733,17 +10758,6 @@
|
|||
"json5": "lib/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/jszip": {
|
||||
"version": "3.9.1",
|
||||
"license": "(MIT OR GPL-3.0-or-later)",
|
||||
|
|
@ -11490,7 +11504,8 @@
|
|||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
|
||||
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/mkdirp": {
|
||||
"version": "0.5.6",
|
||||
|
|
@ -11768,6 +11783,7 @@
|
|||
"resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
|
||||
"integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
|
|
@ -12294,43 +12310,43 @@
|
|||
}
|
||||
},
|
||||
"node_modules/pac-proxy-agent": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz",
|
||||
"integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==",
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz",
|
||||
"integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tootallnate/quickjs-emscripten": "^0.23.0",
|
||||
"agent-base": "^7.0.2",
|
||||
"agent-base": "^7.1.2",
|
||||
"debug": "^4.3.4",
|
||||
"get-uri": "^6.0.1",
|
||||
"http-proxy-agent": "^7.0.0",
|
||||
"https-proxy-agent": "^7.0.2",
|
||||
"pac-resolver": "^7.0.0",
|
||||
"socks-proxy-agent": "^8.0.2"
|
||||
"https-proxy-agent": "^7.0.6",
|
||||
"pac-resolver": "^7.0.1",
|
||||
"socks-proxy-agent": "^8.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/pac-proxy-agent/node_modules/agent-base": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
|
||||
"integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
|
||||
"integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/pac-proxy-agent/node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
|
|
@ -12342,23 +12358,32 @@
|
|||
}
|
||||
},
|
||||
"node_modules/pac-proxy-agent/node_modules/https-proxy-agent": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz",
|
||||
"integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
|
||||
"integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"agent-base": "^7.0.2",
|
||||
"agent-base": "^7.1.2",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/pac-proxy-agent/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/pac-resolver": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz",
|
||||
"integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"degenerator": "^5.0.0",
|
||||
"netmask": "^2.0.2"
|
||||
|
|
@ -12667,43 +12692,43 @@
|
|||
}
|
||||
},
|
||||
"node_modules/proxy-agent": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz",
|
||||
"integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz",
|
||||
"integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"agent-base": "^7.0.2",
|
||||
"agent-base": "^7.1.2",
|
||||
"debug": "^4.3.4",
|
||||
"http-proxy-agent": "^7.0.1",
|
||||
"https-proxy-agent": "^7.0.3",
|
||||
"https-proxy-agent": "^7.0.6",
|
||||
"lru-cache": "^7.14.1",
|
||||
"pac-proxy-agent": "^7.0.1",
|
||||
"pac-proxy-agent": "^7.1.0",
|
||||
"proxy-from-env": "^1.1.0",
|
||||
"socks-proxy-agent": "^8.0.2"
|
||||
"socks-proxy-agent": "^8.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-agent/node_modules/agent-base": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
|
||||
"integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
|
||||
"integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-agent/node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
|
|
@ -12715,12 +12740,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/proxy-agent/node_modules/https-proxy-agent": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz",
|
||||
"integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
|
||||
"integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"agent-base": "^7.0.2",
|
||||
"agent-base": "^7.1.2",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -12732,10 +12758,18 @@
|
|||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
|
||||
"integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-agent/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"dev": true,
|
||||
|
|
@ -12779,28 +12813,30 @@
|
|||
}
|
||||
},
|
||||
"node_modules/puppeteer-core": {
|
||||
"version": "22.7.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.7.0.tgz",
|
||||
"integrity": "sha512-9Q+L3VD7cfhXnxv6AqwTHsVb/+/uXENByhPrgvwQ49wvzQwtf1d6b7v6gpoG3tpRdwYjxoV1eHTD8tFahww09g==",
|
||||
"version": "22.15.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.15.0.tgz",
|
||||
"integrity": "sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@puppeteer/browsers": "2.2.2",
|
||||
"chromium-bidi": "0.5.17",
|
||||
"debug": "4.3.4",
|
||||
"devtools-protocol": "0.0.1273771",
|
||||
"ws": "8.16.0"
|
||||
"@puppeteer/browsers": "2.3.0",
|
||||
"chromium-bidi": "0.6.3",
|
||||
"debug": "^4.3.6",
|
||||
"devtools-protocol": "0.0.1312386",
|
||||
"ws": "^8.18.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/puppeteer-core/node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
|
|
@ -12811,26 +12847,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/puppeteer-core/node_modules/ws": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"node_modules/puppeteer-core/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": ">=5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.11.0",
|
||||
|
|
@ -12872,12 +12894,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"node_modules/queue-tick": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
|
||||
"integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/quick-lru": {
|
||||
"version": "5.1.1",
|
||||
"license": "MIT",
|
||||
|
|
@ -13636,12 +13652,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/socks-proxy-agent": {
|
||||
"version": "8.0.4",
|
||||
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz",
|
||||
"integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==",
|
||||
"version": "8.0.5",
|
||||
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz",
|
||||
"integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"agent-base": "^7.1.1",
|
||||
"agent-base": "^7.1.2",
|
||||
"debug": "^4.3.4",
|
||||
"socks": "^2.8.3"
|
||||
},
|
||||
|
|
@ -13650,24 +13667,23 @@
|
|||
}
|
||||
},
|
||||
"node_modules/socks-proxy-agent/node_modules/agent-base": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
|
||||
"integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
|
||||
"integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/socks-proxy-agent/node_modules/debug": {
|
||||
"version": "4.3.6",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
|
||||
"integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
|
|
@ -13678,6 +13694,13 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/socks-proxy-agent/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"dev": true,
|
||||
|
|
@ -13760,13 +13783,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/streamx": {
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz",
|
||||
"integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==",
|
||||
"version": "2.22.0",
|
||||
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz",
|
||||
"integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-fifo": "^1.1.0",
|
||||
"queue-tick": "^1.0.1"
|
||||
"fast-fifo": "^1.3.2",
|
||||
"text-decoder": "^1.1.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bare-events": "^2.2.0"
|
||||
|
|
@ -14070,17 +14094,18 @@
|
|||
}
|
||||
},
|
||||
"node_modules/tar-fs": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz",
|
||||
"integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==",
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz",
|
||||
"integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"pump": "^3.0.0",
|
||||
"tar-stream": "^3.1.5"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bare-fs": "^2.1.1",
|
||||
"bare-path": "^2.1.0"
|
||||
"bare-fs": "^4.0.1",
|
||||
"bare-path": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tar-stream": {
|
||||
|
|
@ -14088,6 +14113,7 @@
|
|||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz",
|
||||
"integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"b4a": "^1.6.4",
|
||||
"fast-fifo": "^1.2.0",
|
||||
|
|
@ -14152,6 +14178,16 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/text-decoder": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz",
|
||||
"integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"b4a": "^1.6.4"
|
||||
}
|
||||
},
|
||||
"node_modules/text-table": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
||||
|
|
@ -14944,6 +14980,7 @@
|
|||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
||||
"integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer": "^5.2.1",
|
||||
"through": "^2.3.8"
|
||||
|
|
@ -14982,14 +15019,6 @@
|
|||
"version": "6.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/unpipe": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
|
|
@ -15027,7 +15056,8 @@
|
|||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz",
|
||||
"integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
|
|
@ -15361,9 +15391,10 @@
|
|||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||
"version": "8.18.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz",
|
||||
"integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
|
@ -15595,10 +15626,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.22.4",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz",
|
||||
"integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==",
|
||||
"version": "3.23.8",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
|
||||
"integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
} from '@actions/core';
|
||||
|
||||
import { GitHub } from '@actions/github';
|
||||
import { readFileSync, writeFileSync } from 'fs';
|
||||
import { readFileSync, writeFileSync } from 'node:fs';
|
||||
import { gt } from 'semver';
|
||||
import { reportHistory } from './reportHistory.js';
|
||||
import { spawnChild } from './util/spawnAwait.js';
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { readFileSync, writeFileSync } from 'fs';
|
||||
import { readFileSync, writeFileSync } from 'node:fs';
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
// incrementVersion
|
||||
// ------------------------------------------------------------------------------------
|
||||
|
||||
export const incrementVersion = () => {
|
||||
// 1.
|
||||
// 1.
|
||||
const version = readFileSync('./VERSION.md', 'utf8');
|
||||
const triplet = version.split('.');
|
||||
const patch = parseInt(triplet[2], 10) + 1;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { sendCommentToPullRequestAndRelatedIssues, fixupHistory } from './fixupH
|
|||
import { incrementVersion } from './incrementVersion.js';
|
||||
import yargs from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
import { readFileSync } from 'fs';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { reportHistory } from './reportHistory.js';
|
||||
|
||||
const argv = await yargs(hideBin(process.argv))
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import {
|
|||
default as CloudQueryEngine
|
||||
} from './cloud/queryEngine.js';
|
||||
|
||||
import fs from 'fs';
|
||||
import https from 'https';
|
||||
import vm from 'vm';
|
||||
import fs from 'node:fs';
|
||||
import https from 'node:https';
|
||||
import vm from 'node:vm';
|
||||
|
||||
export default class NodeCloudRequester implements CloudRequesterInterface {
|
||||
private static QUERY_SEED = 1;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ class CacheTag {
|
|||
|
||||
export enum LayoutState {
|
||||
NOT_LOADED = undefined,
|
||||
POLYFILLED = 1,
|
||||
CALIBRATED = 2
|
||||
POLYFILLED = 1
|
||||
}
|
||||
|
||||
export interface VariableStoreDictionary {
|
||||
|
|
@ -454,23 +453,10 @@ export default class Keyboard {
|
|||
let _this = this;
|
||||
|
||||
formFactors.forEach(function(form) {
|
||||
// Currently doesn't work if we reset it to POLYFILLED, likely due to how 'calibration'
|
||||
// currently works.
|
||||
_this.layoutStates[form] = LayoutState.NOT_LOADED;
|
||||
});
|
||||
}
|
||||
|
||||
public markLayoutCalibrated(formFactor: DeviceSpec.FormFactor) {
|
||||
if(this.layoutStates[formFactor] != LayoutState.NOT_LOADED) {
|
||||
this.layoutStates[formFactor] = LayoutState.CALIBRATED;
|
||||
}
|
||||
}
|
||||
|
||||
public getLayoutState(formFactor: DeviceSpec.FormFactor) {
|
||||
return this.layoutStates[formFactor];
|
||||
}
|
||||
|
||||
|
||||
constructNullKeyEvent(device: DeviceSpec, stateKeys?: StateKeyMap): KeyEvent {
|
||||
stateKeys = stateKeys || {
|
||||
K_CAPS: false,
|
||||
|
|
|
|||
|
|
@ -354,11 +354,6 @@ export default class VisualKeyboard extends EventEmitter<EventMap> implements Ke
|
|||
|
||||
this.layerGroup = new OSKLayerGroup(this, this.layoutKeyboard, formFactor);
|
||||
|
||||
// Now that we've properly processed the keyboard's layout, mark it as calibrated.
|
||||
// TODO: drop the whole 'calibration' thing. The newer layout system supersedes the
|
||||
// need for it. (Is no longer really used, so the drop ought be clean.)
|
||||
this.layoutKeyboard.markLayoutCalibrated(formFactor);
|
||||
|
||||
// Append the OSK layer group container element to the containing element
|
||||
//osk.keyMap = divLayerContainer;
|
||||
Lkbd.appendChild(this.layerGroup.element);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
// Original version found at: https://github.com/eddieantonio/unicode-default-word-boundary/blob/master/libexec/compile-word-break.js
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
import { createRequire } from 'module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@
|
|||
/// <reference path="../worker-interface.d.ts" />
|
||||
|
||||
// Defines types related to Node workers.
|
||||
import * as worker from 'worker_threads';
|
||||
import { Buffer } from 'buffer';
|
||||
import { URL } from 'url';
|
||||
import * as worker from 'node:worker_threads';
|
||||
import { Buffer } from 'node:buffer';
|
||||
import { URL } from 'node:url';
|
||||
|
||||
/**
|
||||
* Defines mappings from Node Worker signatures to WebWorker signatures
|
||||
*/
|
||||
const nodeWorkerToWebWorkerMappingSource = `
|
||||
import { parentPort } from 'worker_threads';
|
||||
import fs from 'fs';
|
||||
import vm from 'vm';
|
||||
import { parentPort } from 'node:worker_threads';
|
||||
import fs from 'node:fs';
|
||||
import vm from 'node:vm';
|
||||
|
||||
function postMessage(...args) {
|
||||
parentPort.postMessage.call(parentPort, args);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import SourcemapRemapper from "@keymanapp/sourcemap-path-remapper"
|
||||
import convertSourceMap from 'convert-source-map'; // Transforms sourcemaps among various common formats.
|
||||
// Base64, stringified-JSON, end-of-file comment...
|
||||
import fs from 'fs';
|
||||
import fs from 'node:fs';
|
||||
|
||||
function displayHelp() {
|
||||
console.log("KeymanWeb's sourcemap-cleansing tool. This tool is designed to produce clean filepaths");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue