first-commit
Some checks failed
CI Pipeline / build (push) Failing after 3m23s

This commit is contained in:
2025-08-27 14:05:33 +08:00
commit 9e1b8bdc9d
5159 changed files with 1081326 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
/**
* @param {Record<string, string>} attributes
* Attributes.
* @param {string} property
* Property.
* @returns {string}
* Transformed property.
*/
export function caseInsensitiveTransform(attributes: Record<string, string>, property: string): string;
//# sourceMappingURL=case-insensitive-transform.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"case-insensitive-transform.d.ts","sourceRoot":"","sources":["case-insensitive-transform.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qDAPW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAEtB,MAAM,GAEJ,MAAM,CAKlB"}

View File

@@ -0,0 +1,13 @@
import {caseSensitiveTransform} from './case-sensitive-transform.js'
/**
* @param {Record<string, string>} attributes
* Attributes.
* @param {string} property
* Property.
* @returns {string}
* Transformed property.
*/
export function caseInsensitiveTransform(attributes, property) {
return caseSensitiveTransform(attributes, property.toLowerCase())
}

View File

@@ -0,0 +1,10 @@
/**
* @param {Record<string, string>} attributes
* Attributes.
* @param {string} attribute
* Attribute.
* @returns {string}
* Transformed attribute.
*/
export function caseSensitiveTransform(attributes: Record<string, string>, attribute: string): string;
//# sourceMappingURL=case-sensitive-transform.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"case-sensitive-transform.d.ts","sourceRoot":"","sources":["case-sensitive-transform.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,mDAPW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,aAEtB,MAAM,GAEJ,MAAM,CAKlB"}

View File

@@ -0,0 +1,11 @@
/**
* @param {Record<string, string>} attributes
* Attributes.
* @param {string} attribute
* Attribute.
* @returns {string}
* Transformed attribute.
*/
export function caseSensitiveTransform(attributes, attribute) {
return attribute in attributes ? attributes[attribute] : attribute
}

39
node_modules/property-information/lib/util/create.d.ts generated vendored Normal file
View File

@@ -0,0 +1,39 @@
/**
* @param {Definition} definition
* Definition.
* @returns {Schema}
* Schema.
*/
export function create(definition: Definition): Schema;
/**
* Definition of a schema.
*/
export type Definition = {
/**
* Normalzed names to special attribute case.
*/
attributes?: Record<string, string> | undefined;
/**
* Normalized names that must be set as properties.
*/
mustUseProperty?: ReadonlyArray<string> | undefined;
/**
* Property names to their types.
*/
properties: Record<string, number | null>;
/**
* Space.
*/
space?: Space | undefined;
/**
* Transform a property name.
*/
transform: Transform;
};
/**
* Transform.
*/
export type Transform = (attributes: Record<string, string>, property: string) => string;
import { Schema } from './schema.js';
import type { Space } from 'property-information';
//# sourceMappingURL=create.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["create.js"],"names":[],"mappings":"AAkCA;;;;;GAKG;AACH,mCALW,UAAU,GAER,MAAM,CA+BlB;;;;;;;;iBA7Da,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;;;;sBAElC,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS;;;;gBAEjC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;;;;YAE7B,KAAK,GAAG,SAAS;;;;eAEjB,SAAS;;;;;qCAOZ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAEtB,MAAM,KAEJ,MAAM;uBAME,aAAa;2BA/BJ,sBAAsB"}

69
node_modules/property-information/lib/util/create.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
/**
* @import {Info, Space} from 'property-information'
*/
/**
* @typedef Definition
* Definition of a schema.
* @property {Record<string, string> | undefined} [attributes]
* Normalzed names to special attribute case.
* @property {ReadonlyArray<string> | undefined} [mustUseProperty]
* Normalized names that must be set as properties.
* @property {Record<string, number | null>} properties
* Property names to their types.
* @property {Space | undefined} [space]
* Space.
* @property {Transform} transform
* Transform a property name.
*/
/**
* @callback Transform
* Transform.
* @param {Record<string, string>} attributes
* Attributes.
* @param {string} property
* Property.
* @returns {string}
* Attribute.
*/
import {normalize} from '../normalize.js'
import {DefinedInfo} from './defined-info.js'
import {Schema} from './schema.js'
/**
* @param {Definition} definition
* Definition.
* @returns {Schema}
* Schema.
*/
export function create(definition) {
/** @type {Record<string, Info>} */
const properties = {}
/** @type {Record<string, string>} */
const normals = {}
for (const [property, value] of Object.entries(definition.properties)) {
const info = new DefinedInfo(
property,
definition.transform(definition.attributes || {}, property),
value,
definition.space
)
if (
definition.mustUseProperty &&
definition.mustUseProperty.includes(property)
) {
info.mustUseProperty = true
}
properties[property] = info
normals[normalize(property)] = property
normals[normalize(info.attribute)] = property
}
return new Schema(properties, normals, definition.space)
}

View File

@@ -0,0 +1,19 @@
export class DefinedInfo extends Info {
/**
* @constructor
* @param {string} property
* Property.
* @param {string} attribute
* Attribute.
* @param {number | null | undefined} [mask]
* Mask.
* @param {Space | undefined} [space]
* Space.
* @returns
* Info.
*/
constructor(property: string, attribute: string, mask?: number | null | undefined, space?: Space | undefined);
}
import { Info } from './info.js';
import type { Space } from 'property-information';
//# sourceMappingURL=defined-info.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"defined-info.d.ts","sourceRoot":"","sources":["defined-info.js"],"names":[],"mappings":"AAWA;IACE;;;;;;;;;;;;OAYG;IACH,sBAXW,MAAM,aAEN,MAAM,SAEN,MAAM,GAAG,IAAI,GAAG,SAAS,UAEzB,KAAK,GAAG,SAAS,EAkB3B;CACF;qBAnCkB,WAAW;2BAHN,sBAAsB"}

View File

@@ -0,0 +1,60 @@
/**
* @import {Space} from 'property-information'
*/
import {Info} from './info.js'
import * as types from './types.js'
const checks = /** @type {ReadonlyArray<keyof typeof types>} */ (
Object.keys(types)
)
export class DefinedInfo extends Info {
/**
* @constructor
* @param {string} property
* Property.
* @param {string} attribute
* Attribute.
* @param {number | null | undefined} [mask]
* Mask.
* @param {Space | undefined} [space]
* Space.
* @returns
* Info.
*/
constructor(property, attribute, mask, space) {
let index = -1
super(property, attribute)
mark(this, 'space', space)
if (typeof mask === 'number') {
while (++index < checks.length) {
const check = checks[index]
mark(this, checks[index], (mask & types[check]) === types[check])
}
}
}
}
DefinedInfo.prototype.defined = true
/**
* @template {keyof DefinedInfo} Key
* Key type.
* @param {DefinedInfo} values
* Info.
* @param {Key} key
* Key.
* @param {DefinedInfo[Key]} value
* Value.
* @returns {undefined}
* Nothing.
*/
function mark(values, key, value) {
if (value) {
values[key] = value
}
}

28
node_modules/property-information/lib/util/info.d.ts generated vendored Normal file
View File

@@ -0,0 +1,28 @@
/**
* @import {Info as InfoType} from 'property-information'
*/
/** @type {InfoType} */
export class Info {
/**
* @param {string} property
* Property.
* @param {string} attribute
* Attribute.
* @returns
* Info.
*/
constructor(property: string, attribute: string);
attribute: string;
property: string;
booleanish: boolean;
boolean: boolean;
commaOrSpaceSeparated: boolean;
commaSeparated: boolean;
defined: boolean;
mustUseProperty: boolean;
number: boolean;
overloadedBoolean: boolean;
spaceSeparated: boolean;
space: import("property-information").Space | undefined;
}
//# sourceMappingURL=info.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["info.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uBAAuB;AACvB;IACE;;;;;;;OAOG;IACH,sBAPW,MAAM,aAEN,MAAM,EAQhB;IAFC,kBAA0B;IAC1B,iBAAwB;IAK5B,oBAAyB;IACzB,iBAAsB;IACtB,+BAAoC;IACpC,wBAA6B;IAC7B,iBAAsB;IACtB,yBAA8B;IAC9B,gBAAqB;IACrB,2BAAgC;IAEhC,wBAA6B;IAC7B,wDAAoB;CAbnB"}

32
node_modules/property-information/lib/util/info.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
/**
* @import {Info as InfoType} from 'property-information'
*/
/** @type {InfoType} */
export class Info {
/**
* @param {string} property
* Property.
* @param {string} attribute
* Attribute.
* @returns
* Info.
*/
constructor(property, attribute) {
this.attribute = attribute
this.property = property
}
}
Info.prototype.attribute = ''
Info.prototype.booleanish = false
Info.prototype.boolean = false
Info.prototype.commaOrSpaceSeparated = false
Info.prototype.commaSeparated = false
Info.prototype.defined = false
Info.prototype.mustUseProperty = false
Info.prototype.number = false
Info.prototype.overloadedBoolean = false
Info.prototype.property = ''
Info.prototype.spaceSeparated = false
Info.prototype.space = undefined

12
node_modules/property-information/lib/util/merge.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/**
* @param {ReadonlyArray<Schema>} definitions
* Definitions.
* @param {Space | undefined} [space]
* Space.
* @returns {Schema}
* Schema.
*/
export function merge(definitions: ReadonlyArray<Schema>, space?: Space | undefined): Schema;
import { Schema } from './schema.js';
import type { Space } from 'property-information';
//# sourceMappingURL=merge.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["merge.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,mCAPW,aAAa,CAAC,MAAM,CAAC,UAErB,KAAK,GAAG,SAAS,GAEf,MAAM,CAelB;uBAtBoB,aAAa;2BAHJ,sBAAsB"}

27
node_modules/property-information/lib/util/merge.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/**
* @import {Info, Space} from 'property-information'
*/
import {Schema} from './schema.js'
/**
* @param {ReadonlyArray<Schema>} definitions
* Definitions.
* @param {Space | undefined} [space]
* Space.
* @returns {Schema}
* Schema.
*/
export function merge(definitions, space) {
/** @type {Record<string, Info>} */
const property = {}
/** @type {Record<string, string>} */
const normal = {}
for (const definition of definitions) {
Object.assign(property, definition.property)
Object.assign(normal, definition.normal)
}
return new Schema(property, normal, space)
}

23
node_modules/property-information/lib/util/schema.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
/**
* @import {Schema as SchemaType, Space} from 'property-information'
*/
/** @type {SchemaType} */
export class Schema {
/**
* @param {SchemaType['property']} property
* Property.
* @param {SchemaType['normal']} normal
* Normal.
* @param {Space | undefined} [space]
* Space.
* @returns
* Schema.
*/
constructor(property: SchemaType["property"], normal: SchemaType["normal"], space?: Space | undefined);
normal: Record<string, string>;
property: Record<string, import("property-information").Info>;
space: Space | undefined;
}
import type { Space } from 'property-information';
import type { Schema as SchemaType } from 'property-information';
//# sourceMappingURL=schema.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["schema.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH,yBAAyB;AACzB;IACE;;;;;;;;;OASG;IACH,sBATW,UAAU,CAAC,UAAU,CAAC,UAEtB,UAAU,CAAC,QAAQ,CAAC,UAEpB,KAAK,GAAG,SAAS,EAY3B;IANC,+BAAoB;IACpB,8DAAwB;IAGtB,yBAAkB;CAGvB;2BAvB6C,sBAAsB;0CAAtB,sBAAsB"}

29
node_modules/property-information/lib/util/schema.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
/**
* @import {Schema as SchemaType, Space} from 'property-information'
*/
/** @type {SchemaType} */
export class Schema {
/**
* @param {SchemaType['property']} property
* Property.
* @param {SchemaType['normal']} normal
* Normal.
* @param {Space | undefined} [space]
* Space.
* @returns
* Schema.
*/
constructor(property, normal, space) {
this.normal = normal
this.property = property
if (space) {
this.space = space
}
}
}
Schema.prototype.normal = {}
Schema.prototype.property = {}
Schema.prototype.space = undefined

View File

@@ -0,0 +1,8 @@
export const boolean: number;
export const booleanish: number;
export const overloadedBoolean: number;
export const number: number;
export const spaceSeparated: number;
export const commaSeparated: number;
export const commaOrSpaceSeparated: number;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"AAEA,6BAAkC;AAClC,gCAAqC;AACrC,uCAA4C;AAC5C,4BAAiC;AACjC,oCAAyC;AACzC,oCAAyC;AACzC,2CAAgD"}

13
node_modules/property-information/lib/util/types.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
let powers = 0
export const boolean = increment()
export const booleanish = increment()
export const overloadedBoolean = increment()
export const number = increment()
export const spaceSeparated = increment()
export const commaSeparated = increment()
export const commaOrSpaceSeparated = increment()
function increment() {
return 2 ** ++powers
}