repo_name
stringlengths 5
122
| path
stringlengths 3
232
| text
stringlengths 6
1.05M
|
|---|---|---|
gzigzigzeo/protobuf-as
|
tests/structs/weight_map.test.ts
|
import { test } from 'uvu';
import * as assert from 'uvu/assert';
import { WeightMap } from '../../src/structs/index.js';
test('WeightMap.increase(), WeightMap.decrease()', () => {
const map = new WeightMap<string>();
map.increase('test', 5);
assert.equal(map.get('test'), 5);
map.decrease('test', 3);
assert.equal(map.get('test'), 2);
map.decrease('test', 2);
assert.equal(map.get('test'), 0);
});
test('WeightMap.setWeight(), WeightMap.getWeight()', () => {
const map = new WeightMap<string>();
map.setWeight('test', 99);
assert.equal(map.getWeight('test'), 99);
});
test.run()
|
gzigzigzeo/protobuf-as
|
src/structs/index.ts
|
<reponame>gzigzigzeo/protobuf-as
export { WeightMap } from "./weight_map.js";
export { ImmutableFlatTree } from "./immutable_flat_tree.js";
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/assembly/elementaries.ts
|
import { Elementaries } from '../as_proto/elementaries/elementaries';
export function encode(obj: Elementaries): ArrayBuffer {
return obj.encode()
}
export function decode(buffer: ArrayBuffer): Elementaries {
return Elementaries.decode(buffer)
}
export function size(obj: Elementaries): u32 {
return obj.size()
}
|
gzigzigzeo/protobuf-as
|
src/proto/index.ts
|
export * as named from './named_descriptor.js';
export * as decorated from './decorated_descriptor.js';
export * from './named_descriptor_index.js';
export * from './named_descriptor_index_reducer.js';
export * from './decorated_descriptor_index.js';
// Represents abstract descriptor collection interface
export interface AbstractDescriptorCollection<T> {
values(): ReadonlyArray<T>;
get(key: string): T | undefined;
}
|
gzigzigzeo/protobuf-as
|
tests/assembly/nested.test.ts
|
<reponame>gzigzigzeo/protobuf-as<filename>tests/assembly/nested.test.ts<gh_stars>1-10
import { test } from 'uvu';
import * as assert from 'uvu/assert';
import { Person } from '../__fixtures__/ts_proto/nested/main.js';
import { encode, decode, size } from '../__fixtures__/build/nested.js';
const subject: Person = {
Name: 'John',
Surname: 'Doe',
Age: 0,
Weight: 0,
Id: {
Serial: '4004',
Number: '123456',
},
};
const data = Person.encode(subject).finish()
const buf = data.buffer.slice(data.byteOffset, data.byteOffset+data.byteLength)
const decoded = decode(buf)
const encoded = encode(decoded)
test('decode()', () => {
assert.equal(decoded.Name, 'John')
assert.equal(decoded.Surname, 'Doe')
assert.equal(decoded.Id?.Serial, '4004')
assert.equal(decoded.Id?.Number, '123456')
assert.equal(size(decoded), data.length);
})
test('encode()', () => {
assert.equal(encoded.byteLength, data.byteLength)
assert.equal(encoded.byteLength, size(decoded))
assert.equal(encoded.byteLength, buf.byteLength)
assert.equal(encoded, buf)
})
test.run()
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/ts_proto/oneof/main.ts
|
<reponame>gzigzigzeo/protobuf-as<filename>tests/__fixtures__/ts_proto/oneof/main.ts
/* eslint-disable */
import Long from 'long';
import _m0 from 'protobufjs/minimal.js';
export const protobufPackage = '';
export interface Branch1 {
String: string;
}
export interface Branch2 {
UInt32: number;
}
export interface OneOf {
Messages?:
| { $case: 'Branch1'; Branch1: Branch1 }
| { $case: 'Branch2'; Branch2: Branch2 };
NonOneOf1: string;
SecondMessage?:
| { $case: 'Branch3'; Branch3: string }
| { $case: 'Branch4'; Branch4: number };
NonOneOf2: string;
}
function createBaseBranch1(): Branch1 {
return { String: '' };
}
export const Branch1 = {
encode(
message: Branch1,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.String !== '') {
writer.uint32(10).string(message.String);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Branch1 {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseBranch1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.String = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Branch1 {
return {
String: isSet(object.String) ? String(object.String) : '',
};
},
toJSON(message: Branch1): unknown {
const obj: any = {};
message.String !== undefined && (obj.String = message.String);
return obj;
},
fromPartial<I extends Exact<DeepPartial<Branch1>, I>>(object: I): Branch1 {
const message = createBaseBranch1();
message.String = object.String ?? '';
return message;
},
};
function createBaseBranch2(): Branch2 {
return { UInt32: 0 };
}
export const Branch2 = {
encode(
message: Branch2,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.UInt32 !== 0) {
writer.uint32(8).uint32(message.UInt32);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Branch2 {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseBranch2();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.UInt32 = reader.uint32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Branch2 {
return {
UInt32: isSet(object.UInt32) ? Number(object.UInt32) : 0,
};
},
toJSON(message: Branch2): unknown {
const obj: any = {};
message.UInt32 !== undefined &&
(obj.UInt32 = Math.round(message.UInt32));
return obj;
},
fromPartial<I extends Exact<DeepPartial<Branch2>, I>>(object: I): Branch2 {
const message = createBaseBranch2();
message.UInt32 = object.UInt32 ?? 0;
return message;
},
};
function createBaseOneOf(): OneOf {
return {
Messages: undefined,
NonOneOf1: '',
SecondMessage: undefined,
NonOneOf2: '',
};
}
export const OneOf = {
encode(
message: OneOf,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.Messages?.$case === 'Branch1') {
Branch1.encode(
message.Messages.Branch1,
writer.uint32(10).fork(),
).ldelim();
}
if (message.Messages?.$case === 'Branch2') {
Branch2.encode(
message.Messages.Branch2,
writer.uint32(18).fork(),
).ldelim();
}
if (message.NonOneOf1 !== '') {
writer.uint32(26).string(message.NonOneOf1);
}
if (message.SecondMessage?.$case === 'Branch3') {
writer.uint32(34).string(message.SecondMessage.Branch3);
}
if (message.SecondMessage?.$case === 'Branch4') {
writer.uint32(40).int32(message.SecondMessage.Branch4);
}
if (message.NonOneOf2 !== '') {
writer.uint32(50).string(message.NonOneOf2);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): OneOf {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseOneOf();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.Messages = {
$case: 'Branch1',
Branch1: Branch1.decode(reader, reader.uint32()),
};
break;
case 2:
message.Messages = {
$case: 'Branch2',
Branch2: Branch2.decode(reader, reader.uint32()),
};
break;
case 3:
message.NonOneOf1 = reader.string();
break;
case 4:
message.SecondMessage = {
$case: 'Branch3',
Branch3: reader.string(),
};
break;
case 5:
message.SecondMessage = {
$case: 'Branch4',
Branch4: reader.int32(),
};
break;
case 6:
message.NonOneOf2 = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): OneOf {
return {
Messages: isSet(object.Branch1)
? {
$case: 'Branch1',
Branch1: Branch1.fromJSON(object.Branch1),
}
: isSet(object.Branch2)
? {
$case: 'Branch2',
Branch2: Branch2.fromJSON(object.Branch2),
}
: undefined,
NonOneOf1: isSet(object.NonOneOf1) ? String(object.NonOneOf1) : '',
SecondMessage: isSet(object.Branch3)
? { $case: 'Branch3', Branch3: String(object.Branch3) }
: isSet(object.Branch4)
? { $case: 'Branch4', Branch4: Number(object.Branch4) }
: undefined,
NonOneOf2: isSet(object.NonOneOf2) ? String(object.NonOneOf2) : '',
};
},
toJSON(message: OneOf): unknown {
const obj: any = {};
message.Messages?.$case === 'Branch1' &&
(obj.Branch1 = message.Messages?.Branch1
? Branch1.toJSON(message.Messages?.Branch1)
: undefined);
message.Messages?.$case === 'Branch2' &&
(obj.Branch2 = message.Messages?.Branch2
? Branch2.toJSON(message.Messages?.Branch2)
: undefined);
message.NonOneOf1 !== undefined && (obj.NonOneOf1 = message.NonOneOf1);
message.SecondMessage?.$case === 'Branch3' &&
(obj.Branch3 = message.SecondMessage?.Branch3);
message.SecondMessage?.$case === 'Branch4' &&
(obj.Branch4 = Math.round(message.SecondMessage?.Branch4));
message.NonOneOf2 !== undefined && (obj.NonOneOf2 = message.NonOneOf2);
return obj;
},
fromPartial<I extends Exact<DeepPartial<OneOf>, I>>(object: I): OneOf {
const message = createBaseOneOf();
if (
object.Messages?.$case === 'Branch1' &&
object.Messages?.Branch1 !== undefined &&
object.Messages?.Branch1 !== null
) {
message.Messages = {
$case: 'Branch1',
Branch1: Branch1.fromPartial(object.Messages.Branch1),
};
}
if (
object.Messages?.$case === 'Branch2' &&
object.Messages?.Branch2 !== undefined &&
object.Messages?.Branch2 !== null
) {
message.Messages = {
$case: 'Branch2',
Branch2: Branch2.fromPartial(object.Messages.Branch2),
};
}
message.NonOneOf1 = object.NonOneOf1 ?? '';
if (
object.SecondMessage?.$case === 'Branch3' &&
object.SecondMessage?.Branch3 !== undefined &&
object.SecondMessage?.Branch3 !== null
) {
message.SecondMessage = {
$case: 'Branch3',
Branch3: object.SecondMessage.Branch3,
};
}
if (
object.SecondMessage?.$case === 'Branch4' &&
object.SecondMessage?.Branch4 !== undefined &&
object.SecondMessage?.Branch4 !== null
) {
message.SecondMessage = {
$case: 'Branch4',
Branch4: object.SecondMessage.Branch4,
};
}
message.NonOneOf2 = object.NonOneOf2 ?? '';
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends { $case: string }
? { [K in keyof Omit<T, '$case'>]?: DeepPartial<T[K]> } & {
$case: T['$case'];
}
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & Record<
Exclude<keyof I, KeysOfUnion<P>>,
never
>;
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
|
gzigzigzeo/protobuf-as
|
tests/assembly/oneof.test.ts
|
import { test } from 'uvu';
import * as assert from 'uvu/assert';
import { OneOf } from '../__fixtures__/ts_proto/oneof/main.js';
import { encode, decode, size } from '../__fixtures__/build/oneof.js';
const subject: OneOf = {
Messages: {$case: "Branch2", Branch2: { UInt32: 99 } },
NonOneOf1: "foo",
NonOneOf2: "bar",
SecondMessage: {$case: "Branch3", Branch3: "foo" }
};
const data = OneOf.encode(subject).finish()
const buf = data.buffer.slice(data.byteOffset, data.byteOffset+data.byteLength)
const decoded = decode(buf)
const encoded = encode(decoded)
test('decode()', () => {
assert.equal(decoded.Branch2?.UInt32, 99)
assert.equal(decoded.NonOneOf1, 'foo')
assert.equal(decoded.NonOneOf2, 'bar')
assert.equal(decoded.Branch3, 'foo')
assert.equal(decoded.messageType, "Branch2")
assert.equal(decoded.messageType_index, 2)
assert.equal(size(decoded), data.length);
})
test('encode()', () => {
assert.equal(encoded.byteLength, data.byteLength)
assert.equal(encoded.byteLength, size(decoded))
assert.equal(encoded.byteLength, buf.byteLength)
assert.equal(encoded, buf)
})
test.run()
|
gzigzigzeo/protobuf-as
|
src/walker_as/blocks_single_file.ts
|
import { Writer } from "./index.js";
import { readFileSync } from 'fs';
import { staticFiles, embedNamespace } from './internal.js';
/**
* Before and after code blocks
*/
export class BlocksSingleFile {
constructor(private p:Writer) {}
beforeAll() {
this.p(`namespace ${embedNamespace} {`);
staticFiles.forEach(f => this.p(readFileSync(f).toString()), this)
this.p(`};`);
}
afterAll(globals: Map<string, string>) {
globals.forEach((value, key) => {
this.p(`
// ${key}
${value}
`)
});
}
}
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/assembly/oneof.ts
|
import { OneOf } from '../as_proto/oneof/oneof';
export function encode(obj: OneOf): ArrayBuffer {
return obj.encode()
}
export function decode(buffer: ArrayBuffer): OneOf {
return OneOf.decode(buffer)
}
export function size(obj: OneOf): u32 {
return obj.size()
}
|
gzigzigzeo/protobuf-as
|
src/proto/decorated_descriptor.ts
|
<gh_stars>1-10
import { FieldDescriptorProto_Type } from 'ts-proto-descriptors';
import { AbstractDescriptorCollection } from './index.js';
// Protobuf wire type
export enum WireType {
VARINT = 0,
FIXED64 = 1,
LENGTH_DELIMITED = 2,
FIXED32 = 5,
}
// Has wire type
export type WireTypeable = {
wireType: WireType;
};
// Has deprecated flag
export type Depricable = {
deprecated: boolean;
};
// Has field index
export type Numbered = {
number: number;
};
// Has comment
export type Commented = {
comment: string;
};
// Has oneOf
export type WithOneOf = {
oneOf?: string;
}
// Has name
export type Named = {
id: string; // ID (including namespace, absolute)
parentID: string; // Parent ID (including namespace, absolute)
name: string; // Name
namespace: string; // Namespace
relativeName: string; // Name relative to current namespace
};
// Namespace
export type Namespace = Named & {
kind: 'namespace';
};
// Enum
export type Enum = Depricable &
Named & Commented & {
kind: 'enum';
};
// EnumValue
export type EnumValue = Depricable &
Named & Commented & {
kind: 'enum_value';
number: number;
};
// Message
export type Message = Depricable &
Named & Commented & {
kind: 'message';
mapHelper: boolean; // This message represents an artificial type of map entry [key, value]
oneOf: string[]; // oneOf groups of a message
};
// Elementary field
export type FieldElementary = Depricable &
Named &
Numbered &
Commented &
WithOneOf &
WireTypeable & {
kind: 'field_elementary';
type: FieldDescriptorProto_Type;
isCollection: boolean;
};
// Repeated elementary field
export type FieldElementaryRepeated = Depricable &
Named &
Numbered &
Commented &
WireTypeable & {
kind: 'field_elementary_repeated';
type: FieldDescriptorProto_Type;
packed: boolean;
isCollection: boolean;
};
// Message field
export type FieldMessage = Depricable &
Named &
Numbered &
Commented &
WithOneOf &
WireTypeable & {
kind: 'field_message';
typeName: Named;
};
// Repeated message field
export type FieldMessageRepeated = Depricable &
Named &
Numbered &
Commented &
WireTypeable & {
kind: 'field_message_repeated';
typeName: Named;
};
// Map field
export type FieldMap = Depricable &
Named &
Numbered &
Commented &
WithOneOf &
WireTypeable & {
kind: 'field_map';
key: FieldElementary;
value: FieldElementary;
mapHelperMessage: Named;
};
// Message map field
export type FieldMapMessage = Depricable &
Named &
Numbered &
Commented &
WithOneOf &
WireTypeable & {
kind: 'field_map_message';
key: FieldElementary;
value: FieldMessage;
mapHelperMessage: Named;
};
// Any field
export type Field =
| FieldElementary
| FieldElementaryRepeated
| FieldMessage
| FieldMessageRepeated
| FieldMap
| FieldMapMessage;
// Decorated descriptor is a descriptor with global id and basic field type information which has no implementation
// details of a target language.
export type Descriptor = Namespace | Enum | EnumValue | Message | Field;
// Decorated descriptor collection
export type DescriptorCollection = AbstractDescriptorCollection<Descriptor>;
// Descriptor is any field
export function isField(field: Descriptor): field is Field {
return field.kind.startsWith('field_');
}
// Descriptor is elementary field
export function isElementary(field: Field): field is FieldElementary {
return field.kind == 'field_elementary';
}
// Descriptor is message field
export function isMessage(field: Field): field is FieldMessage {
return field.kind == 'field_message';
}
// Descriptor is any map field
export function isAnyMap(field: Field): field is (FieldMap | FieldMapMessage) {
return field.kind == 'field_map' || field.kind == 'field_map_message';
}
// Descriptor has oneOf field
export function isOneOf(field: Field): field is (FieldElementary | FieldMessage | FieldMap | FieldMapMessage) {
return isElementary(field) || isMessage(field) || isAnyMap(field)
}
|
gzigzigzeo/protobuf-as
|
tests/structs/immutable_flat_tree.test.ts
|
import { test } from 'uvu';
import * as assert from 'uvu/assert';
import { ImmutableFlatTree } from '../../src/structs/index.js';
const fixture: [string, string][] = [
['root', 'root'],
['root.1', 'root.1'],
['root.1.1', 'root.1.1'],
['root.1.2', 'root.1.2'],
['root.2', 'root.2'],
['root.2.1', 'root.2.1'],
['root.2.2', 'root.2.2'],
['other_root', 'other_root'],
['other_root.1', 'other_root.1'],
];
const tree = new ImmutableFlatTree<string>(fixture);
test('ImmutableFlatTree.descendants(parent,)', () => {
assert.equal(tree.descendants('root.1.1').size, 0);
assert.equal(tree.descendants('root.1').size, 2);
assert.equal(tree.descendants('other_root').size, 1);
});
test('ImmutableFlatTree.descendants(,depth)', () => {
assert.equal(tree.descendants('root', 1).size, 2);
assert.equal(tree.descendants('root', 1).entries, [
['root.1', 'root.1', 2],
['root.2', 'root.2', 2],
]);
assert.equal(tree.descendants('root.2').size, 2);
assert.equal(tree.descendants('root.2', 1).entries, [
['root.2.1', 'root.2.1', 3],
['root.2.2', 'root.2.2', 3],
]);
});
test('ImmutableFlatTree.descendants()', () => {
assert.equal(tree.descendants().size, fixture.length);
});
test.run()
|
gzigzigzeo/protobuf-as
|
src/internal.ts
|
import ReadStream = NodeJS.ReadStream;
export function readToBuffer(stream: ReadStream): Promise<Buffer> {
return new Promise((resolve) => {
const ret: Array<Buffer> = [];
let len = 0;
stream.on('readable', () => {
let chunk;
while ((chunk = stream.read())) {
ret.push(chunk);
len += chunk.length;
}
});
stream.on('end', () => {
resolve(Buffer.concat(ret, len));
});
});
}
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/ts_proto/complex_struct/main.ts
|
/* eslint-disable */
import Long from 'long';
import _m0 from 'protobufjs/minimal.js';
import { Timestamp } from './google/protobuf/timestamp.js';
import { Properties } from './external.js';
import { Properties as Properties1 } from './external.external.js';
export const protobufPackage = '';
/** Status represents object status */
export enum Status {
Draft = 0,
Active = 1,
Deleted = 2,
UNRECOGNIZED = -1,
}
export function statusFromJSON(object: any): Status {
switch (object) {
case 0:
case 'Draft':
return Status.Draft;
case 1:
case 'Active':
return Status.Active;
case 2:
case 'Deleted':
return Status.Deleted;
case -1:
case 'UNRECOGNIZED':
default:
return Status.UNRECOGNIZED;
}
}
export function statusToJSON(object: Status): string {
switch (object) {
case Status.Draft:
return 'Draft';
case Status.Active:
return 'Active';
case Status.Deleted:
return 'Deleted';
default:
return 'UNKNOWN';
}
}
/** Labels represents object labels */
export interface Labels {
/** Labels represents array of labels */
Labels: string[];
}
/** Message is the base message structure */
export interface Message {
String: string;
Labels: Labels | undefined;
Status1: Status;
Status2: Status;
Network: Message_Service;
Strings: string[];
MapString: { [key: string]: string };
MapMessages: { [key: string]: Message_Message };
Properties1: Properties | undefined;
Properties2: Properties1 | undefined;
Services: Message_Service[];
}
/** Enum is nested enum */
export enum Message_Service {
/** None - None */
None = 0,
/** Facebook - Facebook profile */
Facebook = 1,
/** Google - Google profile */
Google = 2,
UNRECOGNIZED = -1,
}
export function message_ServiceFromJSON(object: any): Message_Service {
switch (object) {
case 0:
case 'None':
return Message_Service.None;
case 1:
case 'Facebook':
return Message_Service.Facebook;
case 2:
case 'Google':
return Message_Service.Google;
case -1:
case 'UNRECOGNIZED':
default:
return Message_Service.UNRECOGNIZED;
}
}
export function message_ServiceToJSON(object: Message_Service): string {
switch (object) {
case Message_Service.None:
return 'None';
case Message_Service.Facebook:
return 'Facebook';
case Message_Service.Google:
return 'Google';
default:
return 'UNKNOWN';
}
}
/** Message.Message is the nested Message structure */
export interface Message_Message {
String: string;
Messages: { [key: string]: Message_Message };
}
/** Message.Message.Message is the Message structure nested into nested structure */
export interface Message_Message_Message {
/** Example strings */
Strings: string[];
/** Protobuf timestamp */
Timestamp: Date | undefined;
}
export interface Message_Message_MessagesEntry {
key: string;
value: Message_Message | undefined;
}
export interface Message_MapStringEntry {
key: string;
value: string;
}
export interface Message_MapMessagesEntry {
key: string;
value: Message_Message | undefined;
}
function createBaseLabels(): Labels {
return { Labels: [] };
}
export const Labels = {
encode(
message: Labels,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
for (const v of message.Labels) {
writer.uint32(10).string(v!);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Labels {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseLabels();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.Labels.push(reader.string());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Labels {
return {
Labels: Array.isArray(object?.Labels)
? object.Labels.map((e: any) => String(e))
: [],
};
},
toJSON(message: Labels): unknown {
const obj: any = {};
if (message.Labels) {
obj.Labels = message.Labels.map((e) => e);
} else {
obj.Labels = [];
}
return obj;
},
fromPartial<I extends Exact<DeepPartial<Labels>, I>>(object: I): Labels {
const message = createBaseLabels();
message.Labels = object.Labels?.map((e) => e) || [];
return message;
},
};
function createBaseMessage(): Message {
return {
String: '',
Labels: undefined,
Status1: 0,
Status2: 0,
Network: 0,
Strings: [],
MapString: {},
MapMessages: {},
Properties1: undefined,
Properties2: undefined,
Services: [],
};
}
export const Message = {
encode(
message: Message,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.String !== '') {
writer.uint32(10).string(message.String);
}
if (message.Labels !== undefined) {
Labels.encode(message.Labels, writer.uint32(18).fork()).ldelim();
}
if (message.Status1 !== 0) {
writer.uint32(24).int32(message.Status1);
}
if (message.Status2 !== 0) {
writer.uint32(32).int32(message.Status2);
}
if (message.Network !== 0) {
writer.uint32(40).int32(message.Network);
}
for (const v of message.Strings) {
writer.uint32(50).string(v!);
}
Object.entries(message.MapString).forEach(([key, value]) => {
Message_MapStringEntry.encode(
{ key: key as any, value },
writer.uint32(58).fork(),
).ldelim();
});
Object.entries(message.MapMessages).forEach(([key, value]) => {
Message_MapMessagesEntry.encode(
{ key: key as any, value },
writer.uint32(66).fork(),
).ldelim();
});
if (message.Properties1 !== undefined) {
Properties.encode(
message.Properties1,
writer.uint32(90).fork(),
).ldelim();
}
if (message.Properties2 !== undefined) {
Properties1.encode(
message.Properties2,
writer.uint32(98).fork(),
).ldelim();
}
writer.uint32(106).fork();
for (const v of message.Services) {
writer.int32(v);
}
writer.ldelim();
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Message {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMessage();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.String = reader.string();
break;
case 2:
message.Labels = Labels.decode(reader, reader.uint32());
break;
case 3:
message.Status1 = reader.int32() as any;
break;
case 4:
message.Status2 = reader.int32() as any;
break;
case 5:
message.Network = reader.int32() as any;
break;
case 6:
message.Strings.push(reader.string());
break;
case 7:
const entry7 = Message_MapStringEntry.decode(
reader,
reader.uint32(),
);
if (entry7.value !== undefined) {
message.MapString[entry7.key] = entry7.value;
}
break;
case 8:
const entry8 = Message_MapMessagesEntry.decode(
reader,
reader.uint32(),
);
if (entry8.value !== undefined) {
message.MapMessages[entry8.key] = entry8.value;
}
break;
case 11:
message.Properties1 = Properties.decode(
reader,
reader.uint32(),
);
break;
case 12:
message.Properties2 = Properties1.decode(
reader,
reader.uint32(),
);
break;
case 13:
if ((tag & 7) === 2) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.Services.push(reader.int32() as any);
}
} else {
message.Services.push(reader.int32() as any);
}
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Message {
return {
String: isSet(object.String) ? String(object.String) : '',
Labels: isSet(object.Labels)
? Labels.fromJSON(object.Labels)
: undefined,
Status1: isSet(object.Status1) ? statusFromJSON(object.Status1) : 0,
Status2: isSet(object.Status2) ? statusFromJSON(object.Status2) : 0,
Network: isSet(object.Network)
? message_ServiceFromJSON(object.Network)
: 0,
Strings: Array.isArray(object?.Strings)
? object.Strings.map((e: any) => String(e))
: [],
MapString: isObject(object.MapString)
? Object.entries(object.MapString).reduce<{
[key: string]: string;
}>((acc, [key, value]) => {
acc[key] = String(value);
return acc;
}, {})
: {},
MapMessages: isObject(object.MapMessages)
? Object.entries(object.MapMessages).reduce<{
[key: string]: Message_Message;
}>((acc, [key, value]) => {
acc[key] = Message_Message.fromJSON(value);
return acc;
}, {})
: {},
Properties1: isSet(object.Properties1)
? Properties.fromJSON(object.Properties1)
: undefined,
Properties2: isSet(object.Properties2)
? Properties1.fromJSON(object.Properties2)
: undefined,
Services: Array.isArray(object?.Services)
? object.Services.map((e: any) => message_ServiceFromJSON(e))
: [],
};
},
toJSON(message: Message): unknown {
const obj: any = {};
message.String !== undefined && (obj.String = message.String);
message.Labels !== undefined &&
(obj.Labels = message.Labels
? Labels.toJSON(message.Labels)
: undefined);
message.Status1 !== undefined &&
(obj.Status1 = statusToJSON(message.Status1));
message.Status2 !== undefined &&
(obj.Status2 = statusToJSON(message.Status2));
message.Network !== undefined &&
(obj.Network = message_ServiceToJSON(message.Network));
if (message.Strings) {
obj.Strings = message.Strings.map((e) => e);
} else {
obj.Strings = [];
}
obj.MapString = {};
if (message.MapString) {
Object.entries(message.MapString).forEach(([k, v]) => {
obj.MapString[k] = v;
});
}
obj.MapMessages = {};
if (message.MapMessages) {
Object.entries(message.MapMessages).forEach(([k, v]) => {
obj.MapMessages[k] = Message_Message.toJSON(v);
});
}
message.Properties1 !== undefined &&
(obj.Properties1 = message.Properties1
? Properties.toJSON(message.Properties1)
: undefined);
message.Properties2 !== undefined &&
(obj.Properties2 = message.Properties2
? Properties1.toJSON(message.Properties2)
: undefined);
if (message.Services) {
obj.Services = message.Services.map((e) =>
message_ServiceToJSON(e),
);
} else {
obj.Services = [];
}
return obj;
},
fromPartial<I extends Exact<DeepPartial<Message>, I>>(object: I): Message {
const message = createBaseMessage();
message.String = object.String ?? '';
message.Labels =
object.Labels !== undefined && object.Labels !== null
? Labels.fromPartial(object.Labels)
: undefined;
message.Status1 = object.Status1 ?? 0;
message.Status2 = object.Status2 ?? 0;
message.Network = object.Network ?? 0;
message.Strings = object.Strings?.map((e) => e) || [];
message.MapString = Object.entries(object.MapString ?? {}).reduce<{
[key: string]: string;
}>((acc, [key, value]) => {
if (value !== undefined) {
acc[key] = String(value);
}
return acc;
}, {});
message.MapMessages = Object.entries(object.MapMessages ?? {}).reduce<{
[key: string]: Message_Message;
}>((acc, [key, value]) => {
if (value !== undefined) {
acc[key] = Message_Message.fromPartial(value);
}
return acc;
}, {});
message.Properties1 =
object.Properties1 !== undefined && object.Properties1 !== null
? Properties.fromPartial(object.Properties1)
: undefined;
message.Properties2 =
object.Properties2 !== undefined && object.Properties2 !== null
? Properties1.fromPartial(object.Properties2)
: undefined;
message.Services = object.Services?.map((e) => e) || [];
return message;
},
};
function createBaseMessage_Message(): Message_Message {
return { String: '', Messages: {} };
}
export const Message_Message = {
encode(
message: Message_Message,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.String !== '') {
writer.uint32(10).string(message.String);
}
Object.entries(message.Messages).forEach(([key, value]) => {
Message_Message_MessagesEntry.encode(
{ key: key as any, value },
writer.uint32(18).fork(),
).ldelim();
});
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Message_Message {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMessage_Message();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.String = reader.string();
break;
case 2:
const entry2 = Message_Message_MessagesEntry.decode(
reader,
reader.uint32(),
);
if (entry2.value !== undefined) {
message.Messages[entry2.key] = entry2.value;
}
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Message_Message {
return {
String: isSet(object.String) ? String(object.String) : '',
Messages: isObject(object.Messages)
? Object.entries(object.Messages).reduce<{
[key: string]: Message_Message;
}>((acc, [key, value]) => {
acc[key] = Message_Message.fromJSON(value);
return acc;
}, {})
: {},
};
},
toJSON(message: Message_Message): unknown {
const obj: any = {};
message.String !== undefined && (obj.String = message.String);
obj.Messages = {};
if (message.Messages) {
Object.entries(message.Messages).forEach(([k, v]) => {
obj.Messages[k] = Message_Message.toJSON(v);
});
}
return obj;
},
fromPartial<I extends Exact<DeepPartial<Message_Message>, I>>(
object: I,
): Message_Message {
const message = createBaseMessage_Message();
message.String = object.String ?? '';
message.Messages = Object.entries(object.Messages ?? {}).reduce<{
[key: string]: Message_Message;
}>((acc, [key, value]) => {
if (value !== undefined) {
acc[key] = Message_Message.fromPartial(value);
}
return acc;
}, {});
return message;
},
};
function createBaseMessage_Message_Message(): Message_Message_Message {
return { Strings: [], Timestamp: undefined };
}
export const Message_Message_Message = {
encode(
message: Message_Message_Message,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
for (const v of message.Strings) {
writer.uint32(10).string(v!);
}
if (message.Timestamp !== undefined) {
Timestamp.encode(
toTimestamp(message.Timestamp),
writer.uint32(18).fork(),
).ldelim();
}
return writer;
},
decode(
input: _m0.Reader | Uint8Array,
length?: number,
): Message_Message_Message {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMessage_Message_Message();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.Strings.push(reader.string());
break;
case 2:
message.Timestamp = fromTimestamp(
Timestamp.decode(reader, reader.uint32()),
);
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Message_Message_Message {
return {
Strings: Array.isArray(object?.Strings)
? object.Strings.map((e: any) => String(e))
: [],
Timestamp: isSet(object.Timestamp)
? fromJsonTimestamp(object.Timestamp)
: undefined,
};
},
toJSON(message: Message_Message_Message): unknown {
const obj: any = {};
if (message.Strings) {
obj.Strings = message.Strings.map((e) => e);
} else {
obj.Strings = [];
}
message.Timestamp !== undefined &&
(obj.Timestamp = message.Timestamp.toISOString());
return obj;
},
fromPartial<I extends Exact<DeepPartial<Message_Message_Message>, I>>(
object: I,
): Message_Message_Message {
const message = createBaseMessage_Message_Message();
message.Strings = object.Strings?.map((e) => e) || [];
message.Timestamp = object.Timestamp ?? undefined;
return message;
},
};
function createBaseMessage_Message_MessagesEntry(): Message_Message_MessagesEntry {
return { key: '', value: undefined };
}
export const Message_Message_MessagesEntry = {
encode(
message: Message_Message_MessagesEntry,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.key !== '') {
writer.uint32(10).string(message.key);
}
if (message.value !== undefined) {
Message_Message.encode(
message.value,
writer.uint32(18).fork(),
).ldelim();
}
return writer;
},
decode(
input: _m0.Reader | Uint8Array,
length?: number,
): Message_Message_MessagesEntry {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMessage_Message_MessagesEntry();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.key = reader.string();
break;
case 2:
message.value = Message_Message.decode(
reader,
reader.uint32(),
);
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Message_Message_MessagesEntry {
return {
key: isSet(object.key) ? String(object.key) : '',
value: isSet(object.value)
? Message_Message.fromJSON(object.value)
: undefined,
};
},
toJSON(message: Message_Message_MessagesEntry): unknown {
const obj: any = {};
message.key !== undefined && (obj.key = message.key);
message.value !== undefined &&
(obj.value = message.value
? Message_Message.toJSON(message.value)
: undefined);
return obj;
},
fromPartial<I extends Exact<DeepPartial<Message_Message_MessagesEntry>, I>>(
object: I,
): Message_Message_MessagesEntry {
const message = createBaseMessage_Message_MessagesEntry();
message.key = object.key ?? '';
message.value =
object.value !== undefined && object.value !== null
? Message_Message.fromPartial(object.value)
: undefined;
return message;
},
};
function createBaseMessage_MapStringEntry(): Message_MapStringEntry {
return { key: '', value: '' };
}
export const Message_MapStringEntry = {
encode(
message: Message_MapStringEntry,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.key !== '') {
writer.uint32(10).string(message.key);
}
if (message.value !== '') {
writer.uint32(18).string(message.value);
}
return writer;
},
decode(
input: _m0.Reader | Uint8Array,
length?: number,
): Message_MapStringEntry {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMessage_MapStringEntry();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.key = reader.string();
break;
case 2:
message.value = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Message_MapStringEntry {
return {
key: isSet(object.key) ? String(object.key) : '',
value: isSet(object.value) ? String(object.value) : '',
};
},
toJSON(message: Message_MapStringEntry): unknown {
const obj: any = {};
message.key !== undefined && (obj.key = message.key);
message.value !== undefined && (obj.value = message.value);
return obj;
},
fromPartial<I extends Exact<DeepPartial<Message_MapStringEntry>, I>>(
object: I,
): Message_MapStringEntry {
const message = createBaseMessage_MapStringEntry();
message.key = object.key ?? '';
message.value = object.value ?? '';
return message;
},
};
function createBaseMessage_MapMessagesEntry(): Message_MapMessagesEntry {
return { key: '', value: undefined };
}
export const Message_MapMessagesEntry = {
encode(
message: Message_MapMessagesEntry,
writer: _m0.Writer = _m0.Writer.create(),
): _m0.Writer {
if (message.key !== '') {
writer.uint32(10).string(message.key);
}
if (message.value !== undefined) {
Message_Message.encode(
message.value,
writer.uint32(18).fork(),
).ldelim();
}
return writer;
},
decode(
input: _m0.Reader | Uint8Array,
length?: number,
): Message_MapMessagesEntry {
const reader =
input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMessage_MapMessagesEntry();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.key = reader.string();
break;
case 2:
message.value = Message_Message.decode(
reader,
reader.uint32(),
);
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Message_MapMessagesEntry {
return {
key: isSet(object.key) ? String(object.key) : '',
value: isSet(object.value)
? Message_Message.fromJSON(object.value)
: undefined,
};
},
toJSON(message: Message_MapMessagesEntry): unknown {
const obj: any = {};
message.key !== undefined && (obj.key = message.key);
message.value !== undefined &&
(obj.value = message.value
? Message_Message.toJSON(message.value)
: undefined);
return obj;
},
fromPartial<I extends Exact<DeepPartial<Message_MapMessagesEntry>, I>>(
object: I,
): Message_MapMessagesEntry {
const message = createBaseMessage_MapMessagesEntry();
message.key = object.key ?? '';
message.value =
object.value !== undefined && object.value !== null
? Message_Message.fromPartial(object.value)
: undefined;
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends { $case: string }
? { [K in keyof Omit<T, '$case'>]?: DeepPartial<T[K]> } & {
$case: T['$case'];
}
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & Record<
Exclude<keyof I, KeysOfUnion<P>>,
never
>;
function toTimestamp(date: Date): Timestamp {
const seconds = date.getTime() / 1_000;
const nanos = (date.getTime() % 1_000) * 1_000_000;
return { seconds, nanos };
}
function fromTimestamp(t: Timestamp): Date {
let millis = t.seconds * 1_000;
millis += t.nanos / 1_000_000;
return new Date(millis);
}
function fromJsonTimestamp(o: any): Date {
if (o instanceof Date) {
return o;
} else if (typeof o === 'string') {
return new Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
}
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isObject(value: any): boolean {
return typeof value === 'object' && value !== null;
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/assembly/complex_struct.ts
|
<reponame>gzigzigzeo/protobuf-as<gh_stars>1-10
import { Message } from '../as_proto/complex_struct/complex_struct';
export function encode(obj: Message): ArrayBuffer {
return obj.encode()
}
export function decode(buffer: ArrayBuffer): Message {
return Message.decode(buffer)
}
export function size(obj: Message): u32 {
return obj.size()
}
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/build/elementaries.d.ts
|
<reponame>gzigzigzeo/protobuf-as
/**
* tests/__fixtures__/assembly/elementaries/encode
* @param obj `tests/__fixtures__/as_proto/elementaries/elementaries/Elementaries`
* @returns `~lib/arraybuffer/ArrayBuffer`
*/
export declare function encode(obj: __Record3<undefined>): ArrayBuffer;
/**
* tests/__fixtures__/assembly/elementaries/decode
* @param buffer `~lib/arraybuffer/ArrayBuffer`
* @returns `tests/__fixtures__/as_proto/elementaries/elementaries/Elementaries`
*/
export declare function decode(buffer: ArrayBuffer): __Record3<never>;
/**
* tests/__fixtures__/assembly/elementaries/size
* @param obj `tests/__fixtures__/as_proto/elementaries/elementaries/Elementaries`
* @returns `u32`
*/
export declare function size(obj: __Record3<undefined>): number;
/** tests/__fixtures__/as_proto/elementaries/elementaries/Elementaries */
declare interface __Record3<TOmittable> {
/** @type `f64` */
Double: number | TOmittable;
/** @type `f32` */
Float: number | TOmittable;
/** @type `i32` */
Int32: number | TOmittable;
/** @type `u32` */
UInt32: number | TOmittable;
/** @type `i32` */
SInt32: number | TOmittable;
/** @type `u32` */
Fixed32: number | TOmittable;
/** @type `i32` */
SFixed32: number | TOmittable;
/** @type `i64` */
Int64: bigint | TOmittable;
/** @type `u64` */
UInt64: bigint | TOmittable;
/** @type `i64` */
SInt64: bigint | TOmittable;
/** @type `u64` */
Fixed64: bigint | TOmittable;
/** @type `i64` */
SFixed64: bigint | TOmittable;
/** @type `bool` */
Bool: boolean | TOmittable;
/** @type `u32` */
Enum: number | TOmittable;
/** @type `~lib/array/Array<u8>` */
Bytes: Array<number>;
/** @type `~lib/string/String` */
String: string;
/** @type `~lib/array/Array<u8>` */
EmptyBytes: Array<number>;
/** @type `~lib/string/String` */
EmptyString: string;
/** @type `i64` */
EmptyInt64: bigint | TOmittable;
/** @type `i64` */
EmptyInt32: bigint | TOmittable;
/** @type `bool` */
EmptyBool: boolean | TOmittable;
}
|
gzigzigzeo/protobuf-as
|
src/main.ts
|
<filename>src/main.ts<gh_stars>1-10
import {
CodeGeneratorRequest,
CodeGeneratorResponse,
CodeGeneratorResponse_Feature,
} from 'ts-proto-descriptors';
import { promisify } from 'util';
import { FlatWalker, FlatWalkerStrategy } from './walker/flat_walker_strategy.js';
import { WalkerASSingleFile, WalkerASMultiFile } from './walker_as/index.js';
import {
NamedDescriptorIndex,
DecoratedDescriptorIndex,
NamedDescriptorIndexReducer,
} from './proto/index.js';
import { parseOptions } from './options.js';
import { readToBuffer } from './internal.js';
async function main() {
const stdin = await readToBuffer(process.stdin);
const request = CodeGeneratorRequest.decode(stdin);
const options = parseOptions(request.parameter);
request.protoFile.forEach((f) => {
if ((f.syntax != 'proto3') && (f.syntax != '')) {
throw new Error(
`Only proto3 syntax is supported. ${f.name} has ${f.syntax} syntax!`,
);
}
});
const types = new NamedDescriptorIndex(request);
const roots: Set<string> = types.rootIDs() as Set<string>;
options.include.forEach((n:string) => roots.add(n));
const requiredIDs = new NamedDescriptorIndexReducer(
types,
roots,
new Set<string>(options.exclude),
);
const brokenReferences = requiredIDs.brokenReferences();
if (brokenReferences.length > 0) {
throw new Error(
`Broken references found: ${brokenReferences
.map((value:[string, string]) => `${value[0]} references ${value[1]}`)
.join(
', ',
)}, please either exclude a type and all it's references`,
);
}
const descriptors = new DecoratedDescriptorIndex(requiredIDs);
const strategy = new FlatWalkerStrategy(descriptors);
let walker:FlatWalker = new WalkerASSingleFile(options);
if (options.mode == 'multi') {
walker = new WalkerASMultiFile(options);
}
strategy.walk(walker);
const files = walker.files()
const response = CodeGeneratorResponse.fromPartial({
// There is an issue with type declaration in ts-proto-descriptors, ignoring it for now
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore
file: files,
supportedFeatures: CodeGeneratorResponse_Feature.FEATURE_PROTO3_OPTIONAL,
});
const buffer = CodeGeneratorResponse.encode(response).finish();
const write = promisify(
process.stdout.write as (buffer: Buffer) => boolean,
).bind(process.stdout);
await write(Buffer.from(buffer));
}
main()
.then(() => {
process.exit(0);
})
.catch((e) => {
process.stderr.write('FAILED!');
process.stderr.write(e.message);
process.stderr.write(e.stack);
process.exit(1);
});
|
gzigzigzeo/protobuf-as
|
src/walker/index.ts
|
<filename>src/walker/index.ts
export * from './flat_walker_strategy.js';
|
gzigzigzeo/protobuf-as
|
src/walker_as/field.ts
|
import { decorated } from '../proto/index.js';
import { Writer } from './index.js';
import { getTypeInfo, TypeInfo } from './type_info.js';
import { Options } from '../options.js';
import { comment } from './internal.js';
/**
* Field code blocks
*/
export class Field {
constructor(private p: Writer, private options: Options) { }
// Returns field type with default if required
static typeDecl(field: decorated.Field, type: TypeInfo, options: Options): string {
switch (field.kind) {
case "field_elementary":
return `${type.typeName}${type.default ? ` = ${type.default}` : ''}`;
case "field_message": {
const expr = options.nullable == true ?
'| null' : (field.oneOf != undefined ? '| null' : `= new ${type.typeName}()`);
return `${type.typeName}${expr}`;
}
case "field_message_repeated":
case "field_elementary_repeated":
case "field_map":
case "field_map_message":
return `${type.collectionTypeName} = new ${type.collectionTypeName}();`
}
}
decl(field: decorated.Field) {
const type = getTypeInfo(field);
this.p(comment(field))
switch (field.kind) {
case "field_elementary":
this.p(`public ${field.name}:${Field.typeDecl(field, type, this.options)};`);
break;
case "field_message":
this.p(`public ${field.name}:${Field.typeDecl(field, type, this.options)};`);
break;
case "field_message_repeated":
case "field_elementary_repeated":
case "field_map":
case "field_map_message":
this.p(`public ${field.name}:${Field.typeDecl(field, type, this.options)};`);
break;
}
}
}
|
gzigzigzeo/protobuf-as
|
assembly/ext/google.protobuf.Value.ts
|
// Sets field value
set<T>(value: T): Value {
this.setNull();
this.null_value = 0;
if (isBoolean<T>(value)) {
this.bool_value = value;
} else if (isInteger<T>(value) || isFloat<T>(value)) {
this.number_value = value;
} else if (isString<T>(value)) {
this.string_value = value;
} else if (value instanceof Struct) {
this.struct_value = value;
} else if (value instanceof Value) {
this.null_value = value.null_value
this.number_value = value.number_value
this.string_value = value.string_value
this.struct_value = value.struct_value
this.list_value = value.list_value
} else if (isArray(value)) {
const v = new ListValue()
for (let i: i32 = 0; i < value.length; i++) {
v.values.push(new Value().set(value[i]))
}
this.list_value = v
}
return this
}
// Sets field value to null
setNull(): void {
this.null_value = 1;
this.bool_value = false;
this.string_value = "";
this.struct_value = null;
this.list_value = null;
}
|
gzigzigzeo/protobuf-as
|
tests/options.test.ts
|
<filename>tests/options.test.ts
import { test } from 'uvu';
import * as assert from 'uvu/assert';
import { parseOptions } from '../src/options.js';
test('parseOptions() returns targetFileName', () => {
const options = parseOptions('');
assert.equal(options.targetFileName, 'assembly.ts');
});
test('parseOptions() returns false nullable', () => {
const options = parseOptions("nullable=false")
assert.equal(options.nullable, false)
});
test('parseOptions() returns true nullable', () => {
const options = parseOptions("nullable=TRuE")
assert.equal(options.nullable, true)
});
test('parseOptions() returns targetFileName and exclude', () => {
const options = parseOptions(
'exclude=types.Options:targetFileName=new_assembly.ts',
);
assert.equal(options.exclude, ['types.Options']);
assert.equal(options.targetFileName, 'new_assembly.ts');
});
test('parseOptions() returns typeAliases', () => {
const options = parseOptions(
'exclude=types.Options:oneOf=Foo+Bar',
);
assert.equal(options.exclude, ['types.Options']);
assert.equal(options.oneOf, new Map<string, string>([["Foo", "Bar"]]));
});
test('parseOptions() returns configuration from a file', () => {
const options = parseOptions("config=tests/__fixtures__/config.json")
assert.equal(options.exclude, ["Foo", "Bar"])
assert.equal(options.nullable, true)
assert.equal(options.mode, "single")
assert.equal(options.oneOf, new Map<string, string>([["Foo", "Bar"]]))
});
test.run()
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/build/maps.d.ts
|
<filename>tests/__fixtures__/build/maps.d.ts
/**
* tests/__fixtures__/assembly/maps/encode
* @param obj `tests/__fixtures__/as_proto/maps/maps/Maps`
* @returns `~lib/arraybuffer/ArrayBuffer`
*/
export declare function encode(obj: __Record3<undefined>): ArrayBuffer;
/**
* tests/__fixtures__/assembly/maps/decode
* @param buffer `~lib/arraybuffer/ArrayBuffer`
* @returns `tests/__fixtures__/as_proto/maps/maps/Maps`
*/
export declare function decode(buffer: ArrayBuffer): __Record3<never>;
/**
* tests/__fixtures__/assembly/maps/size
* @param obj `tests/__fixtures__/as_proto/maps/maps/Maps`
* @returns `u32`
*/
export declare function size(obj: __Record3<undefined>): number;
/** ~lib/map/Map<~lib/string/String,~lib/string/String> */
declare class __Internref4 extends Number {
private __nominal4: symbol;
}
/** ~lib/map/Map<~lib/string/String,i32> */
declare class __Internref5 extends Number {
private __nominal5: symbol;
}
/** ~lib/map/Map<i32,~lib/string/String> */
declare class __Internref6 extends Number {
private __nominal6: symbol;
}
/** ~lib/map/Map<~lib/string/String,tests/__fixtures__/as_proto/maps/maps/Value> */
declare class __Internref9 extends Number {
private __nominal9: symbol;
}
/** ~lib/map/Map<~lib/string/String,tests/__fixtures__/as_proto/maps/maps/external.MapValue> */
declare class __Internref11 extends Number {
private __nominal11: symbol;
}
/** tests/__fixtures__/as_proto/maps/maps/Maps */
declare interface __Record3<TOmittable> {
/** @type `~lib/map/Map<~lib/string/String,~lib/string/String>` */
StringStringMap: __Internref4;
/** @type `~lib/map/Map<~lib/string/String,i32>` */
StringInt32Map: __Internref5;
/** @type `~lib/map/Map<i32,~lib/string/String>` */
Int32StringMap: __Internref6;
/** @type `~lib/map/Map<~lib/string/String,tests/__fixtures__/as_proto/maps/maps/Value>` */
StringValueMap: __Internref9;
/** @type `~lib/map/Map<~lib/string/String,tests/__fixtures__/as_proto/maps/maps/external.MapValue>` */
StringExternalMapValue: __Internref11;
}
|
gzigzigzeo/protobuf-as
|
tests/helpers/index.ts
|
<reponame>gzigzigzeo/protobuf-as<gh_stars>1-10
import { CodeGeneratorRequest } from 'ts-proto-descriptors';
import { readFileSync } from 'fs';
import { normalize, join, dirname } from 'path';
import { fileURLToPath } from 'url';
/**
* Returns CodeGeneratorRequest of a specified proto definition
* @param name Request name
* @returns CodeGeneratoRequest
*/
export function getRequest(name: string): CodeGeneratorRequest {
const fileName = normalize(join(dirname(fileURLToPath(import.meta.url)), `../__fixtures__/ts_proto/${name}/main.codegenreq`));
return CodeGeneratorRequest.decode(readFileSync(fileName));
}
|
gzigzigzeo/protobuf-as
|
scripts/gen-fixtures.ts
|
import { execSync } from "child_process";
import { readdirSync } from "fs";
import { join, normalize, dirname, basename } from 'path';
import { mkdir } from 'mk-dirs/sync/index.js'
import { fileURLToPath } from 'url';
// Fixture represents fixture paths
type Fixture = {
name: string; // Name
proto: string; // .proto path
tsProto: string; // ts-proto main.ts path
asProto: string; // as-proto outFile path
asStub: string; // AssemblyScript stub file (exports encode/decode/size) path
asTarget: string; // AssemblyScript target path with file name prefix
}
const basePath = normalize(join(dirname(fileURLToPath(import.meta.url)), "../tests/__fixtures__"))
const protoPath = join(basePath, "proto")
const protos = readdirSync(protoPath)
// Map proto dir names to the array of Fixtures
const fixtures = protos.map<Fixture>((value:string):Fixture => {
return {
name: value,
proto: join(basePath, "proto", value),
tsProto: join(basePath, "ts_proto", value),
asProto: join(basePath, "as_proto", value),
asStub: join(basePath, "assembly", value),
asTarget: join(basePath, "build", value)
}
})
console.log(`Generating fixtures for ${protos.join(", ")}...`)
// Run protoc
fixtures.forEach((fixture: Fixture) => {
const protocCmd = [
`yarn protoc -I${fixture.proto}`,
`--plugin node_modules/.bin/protoc-gen-dump --dump_opt ${fixture.tsProto}/main.codegenreq --dump_out ${fixture.tsProto}`,
`--plugin node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=oneof=unions,esModuleInterop=true --ts_proto_out ${fixture.tsProto}`,
`--plugin ./bin/protoc-gen-as --as_opt=targetFileName=${fixture.name}.ts:mode=single:oneOf=OneOf.Messages+messageType --as_out ${fixture.asProto}`,
`main.proto`
].join(" ")
mkdir(fixture.tsProto)
mkdir(fixture.asProto)
execSync(protocCmd)
console.log(`protoc ${fixture.name} done!`)
})
// Run asc
fixtures.forEach((fixture: Fixture) => {
const ascCmd =`yarn run asc ${fixture.asStub}.ts -o ${fixture.asTarget}.wasm -t ${fixture.asTarget}.wat --bindings esm --debug --exportRuntime`
execSync(ascCmd)
console.log(`asc ${fixture.name} done!`)
})
// fix-esm-import-path
fixtures.forEach((fixture: Fixture) => {
const fixEsmImportPathCmd = `yarn exec fix-esm-import-path ${join(fixture.tsProto, 'main.ts')}`
execSync(fixEsmImportPathCmd)
console.log(`fix-esm-import-path ${fixture.name} done!`)
})
console.log("Done!")
|
gzigzigzeo/protobuf-as
|
src/walker_as/one_of.ts
|
import { decorated } from "../proto/index.js";
import { Writer } from "./index.js";
import { Options } from '../options.js';
import changeCase from "change-case";
/**
* OneOf code blocks
*/
export class OneOf {
constructor(private p:Writer, private options:Options) {}
public discriminatorDecl(desc: decorated.Message, group: string): void {
const varName = OneOf.varName(this.options, desc.id, group);
const indexVarName = OneOf.indexVarName(this.options, desc.id, group);
this.p(`
public ${varName}:string = "";
public ${indexVarName}:u8 = 0;
`)
}
public discriminatorConst(field: decorated.Field): void {
if (!decorated.isOneOf(field)) {
return
}
if (field.oneOf == undefined) {
return
}
const name = changeCase.snakeCase(
field.oneOf+" "+field.name.replace(/[.]+/g, "_") + " index"
).toUpperCase()
this.p(`static readonly ${name}:u8 = ${field.number};`)
}
public static varName(options: Options, id: string, f: string): string {
if (options.oneOf) {
const path = id + "." + f
const varName = options.oneOf.get(path)
if (varName) {
return varName
}
}
return `__${f}`;
}
public static indexVarName(options: Options, id: string, f: string): string {
return OneOf.varName(options, id, f) + "_index";
}
}
|
gzigzigzeo/protobuf-as
|
tests/__fixtures__/build/oneof.d.ts
|
<filename>tests/__fixtures__/build/oneof.d.ts
/**
* tests/__fixtures__/assembly/oneof/encode
* @param obj `tests/__fixtures__/as_proto/oneof/oneof/OneOf`
* @returns `~lib/arraybuffer/ArrayBuffer`
*/
export declare function encode(obj: __Record3<undefined>): ArrayBuffer;
/**
* tests/__fixtures__/assembly/oneof/decode
* @param buffer `~lib/arraybuffer/ArrayBuffer`
* @returns `tests/__fixtures__/as_proto/oneof/oneof/OneOf`
*/
export declare function decode(buffer: ArrayBuffer): __Record3<never>;
/**
* tests/__fixtures__/assembly/oneof/size
* @param obj `tests/__fixtures__/as_proto/oneof/oneof/OneOf`
* @returns `u32`
*/
export declare function size(obj: __Record3<undefined>): number;
/** tests/__fixtures__/as_proto/oneof/oneof/Branch1 */
declare interface __Record4<TOmittable> {
/** @type `~lib/string/String` */
String: string;
}
/** tests/__fixtures__/as_proto/oneof/oneof/Branch2 */
declare interface __Record5<TOmittable> {
/** @type `u32` */
UInt32: number | TOmittable;
}
/** tests/__fixtures__/as_proto/oneof/oneof/OneOf */
declare interface __Record3<TOmittable> {
/** @type `tests/__fixtures__/as_proto/oneof/oneof/Branch1 | null` */
Branch1: __Record4<undefined> | null | TOmittable;
/** @type `tests/__fixtures__/as_proto/oneof/oneof/Branch2 | null` */
Branch2: __Record5<undefined> | null | TOmittable;
/** @type `~lib/string/String` */
NonOneOf1: string;
/** @type `~lib/string/String` */
Branch3: string;
/** @type `i32` */
Branch4: number | TOmittable;
/** @type `~lib/string/String` */
NonOneOf2: string;
/** @type `~lib/string/String` */
messageType: string;
/** @type `u8` */
messageType_index: number | TOmittable;
/** @type `~lib/string/String` */
__SecondMessage: string;
/** @type `u8` */
__SecondMessage_index: number | TOmittable;
}
|
gzigzigzeo/protobuf-as
|
src/walker_as/message.ts
|
import { decorated } from '../proto/index.js';
import { Writer } from './index.js';
import { relativeName, comment } from './internal.js';
import { Options } from '../options.js';
import { normalize, join, dirname, parse } from 'path';
import { fileURLToPath } from 'url';
import { readdirSync, readFileSync } from 'fs';
/**
* Message code blocks
*/
export class Message {
private ext:Map<string, string> = new Map<string, string>();
constructor(private p: Writer, private options: Options) {
if (!options.stdext) {
return
}
const extPath = normalize(join(dirname(fileURLToPath(import.meta.url)), "../../assembly/ext"))
const exts = readdirSync(extPath)
this.addExt(extPath, exts)
if (options.customext) {
const customExts = readdirSync(options.customext)
this.addExt(options.customext, customExts)
}
}
private addExt(base: string, exts: Array<string>) {
exts.forEach(f => this.ext.set(parse(f).name, readFileSync(join(base, f)).toString()))
}
start(message: decorated.Message) {
this.p(comment(message))
this.p(`export class ${relativeName(message.relativeName)} {`);
}
finish(message: decorated.Message) {
if (this.ext.has(message.id)) {
this.p(this.ext.get(message.id) as string)
}
this.p(`
} // ${relativeName(message.relativeName)}
`);
}
}
|
StephenFluin/elgato-key-light-control-interface
|
src/app/core/services/electron/electron.service.ts
|
import { Injectable } from '@angular/core';
// If you import a module but never use any of the imported values other than as TypeScript types,
// the resulting javascript file will look as if you never imported the module at all.
import { ipcRenderer, webFrame, remote } from 'electron';
import * as childProcess from 'child_process';
import * as fs from 'fs';
import * as http from 'http';
@Injectable({
providedIn: 'root'
})
export class ElectronService {
ipcRenderer: typeof ipcRenderer;
webFrame: typeof webFrame;
remote: typeof remote;
childProcess: typeof childProcess;
fs: typeof fs;
http: typeof http;
get isElectron(): boolean {
return !!(window && window.process && window.process.type);
}
constructor() {
// Conditional imports
if (this.isElectron) {
this.ipcRenderer = window.require('electron').ipcRenderer;
this.webFrame = window.require('electron').webFrame;
// If you wan to use remote object, pleanse set enableRemoteModule to true in main.ts
// this.remote = window.require('electron').remote;
this.childProcess = window.require('child_process');
this.fs = window.require('fs');
this.http = window.require('http');
}
}
send(value: number): void {
const command = JSON.stringify({numberOfLights:1,lights:[{on:value}]});
const options = {
hostname: '10.0.0.184',
port: 9123,
path: '/elgato/lights',
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Content-Length': command.length,
}
}
const req = this.http.request(options, res => {
res.on('data',console.log);
})
req.on('error', console.error);
req.write(command);
req.end();
}
}
|
chilam1234/VotingSystem
|
src/utils/serializeValidationError.ts
|
import { ValidationError } from 'yup';
interface Error {
path: string;
message: string;
}
export const serializeValidationError = (err: ValidationError) => {
const invalid: Error[] = [];
err.inner.map(value => {
invalid.push({
path: value.path,
message: value.message,
});
});
return invalid;
};
|
chilam1234/VotingSystem
|
src/main.ts
|
import { NestFactory } from '@nestjs/core';
import * as Store from 'connect-redis';
import * as dotenv from 'dotenv';
import * as session from 'express-session';
import { AppModule } from './app.module';
import { SESSION_SECRET } from './constants';
import { redis } from './redis';
dotenv.config();
async function bootstrap() {
const RedisStore = Store(session);
const app = await NestFactory.create(AppModule);
app.use(
session({
store: new RedisStore({
client: redis as any,
}),
name: 'voting-system',
secret: SESSION_SECRET,
resave: false,
saveUninitialized: false,
cookie: {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
maxAge: 1000 * 60 * 60 * 24 * 365,
},
}),
);
await app.listen(3000);
}
bootstrap();
|
chilam1234/VotingSystem
|
src/constants.ts
|
export const SESSION_SECRET = 'asfl;kasfoaihfasdfknafin';
export const POLL_OPTION_ID_PREFIX = 'pollOptionId:';
|
chilam1234/VotingSystem
|
src/poll/pollOption.entity.ts
|
import { Field, ObjectType } from 'type-graphql';
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
import { Poll } from './poll.entity';
import { Vote } from './vote.entity';
@ObjectType()
@Entity()
export class PollOption {
@Field()
@PrimaryGeneratedColumn()
id: number;
@Field()
@Column('text')
text: string;
@Field(() => [Vote])
@OneToMany(() => Vote, vote => vote.pollOption)
votes: Vote[];
@Field()
@Column()
pollId: number;
@ManyToOne(() => Poll, poll => poll.pollOption, { onDelete: 'CASCADE' })
poll: Promise<Poll>;
}
|
chilam1234/VotingSystem
|
src/app.module.ts
|
<filename>src/app.module.ts
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { TypeOrmModule } from '@nestjs/typeorm';
import { typeOrmConfig } from './config/typeOrmConfig';
import { pollOptionLoader } from './loaders/pollOptionLoader';
import { PollModule } from './poll/poll.module';
import { UserModule } from './user/user.module';
@Module({
imports: [
TypeOrmModule.forRoot(typeOrmConfig),
GraphQLModule.forRoot({
autoSchemaFile: 'schema.gql',
context: ({ req, res }) => ({
req,
res,
pollOptionLoader: pollOptionLoader(),
}),
}),
UserModule,
PollModule,
],
})
export class AppModule {}
|
chilam1234/VotingSystem
|
src/poll/args/allPollsArgs.ts
|
<gh_stars>0
import { ArgsType, Field } from 'type-graphql';
@ArgsType()
export class AllPollsArgs {
@Field()
take: number;
@Field()
skip: number;
}
|
chilam1234/VotingSystem
|
src/user/user.entity.ts
|
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { Poll } from '../poll/poll.entity';
@Entity('users')
export class User {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
userName: string;
@Column()
hkId: string;
@Column()
password: string;
@OneToMany(() => Poll, poll => poll.user)
poll: Promise<Poll[]>;
}
|
chilam1234/VotingSystem
|
src/pipes/yupValidationPipe.ts
|
<gh_stars>0
import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common';
import { Schema } from 'yup';
import { serializeValidationError } from '../utils/serializeValidationError';
@Injectable()
export class YupValidationPipe implements PipeTransform {
constructor(private readonly schema: Schema<{}>) {}
async transform(value: any, metadata: ArgumentMetadata) {
try {
await this.schema.validate(value, { abortEarly: false });
} catch (err) {
console.log(err);
throw serializeValidationError(err);
}
return value;
}
}
|
chilam1234/VotingSystem
|
src/user/user.service.ts
|
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import * as bcrypt from 'bcryptjs';
import { Request } from 'express';
import { MyContext } from '../types/myContext';
import { LoginInput } from './input/user.loginInput';
import { SignupInput } from './input/user.singupInput';
import { errorMessage } from './shared/errorMessage';
import { ErrorResponse } from './shared/errorResponse';
import { UserRepository } from './user.repository';
@Injectable()
export class UserService {
constructor(
@InjectRepository(UserRepository)
private readonly userRepo: UserRepository,
) {}
async signup(signupInput: SignupInput): Promise<ErrorResponse[] | null> {
const exist = await this.userRepo.findOne({
where: { hkId: signupInput.hkId },
});
const exist2 = await this.userRepo.findOne({
where: { userName: signupInput.userName },
});
if (exist || exist2) {
return errorMessage('hkId', 'duplicated username or HKID');
}
await this.userRepo.save({ ...signupInput });
return null;
}
async login(
loginInput: LoginInput,
req: Request,
): Promise<ErrorResponse[] | null> {
const user = await this.userRepo.findOne({
where: { userName: loginInput.username },
});
if (!user) {
return errorMessage('username', 'invalid username or password');
}
const checkPassword = await bcrypt.compare(
loginInput.password,
user.password,
);
if (!checkPassword) {
return errorMessage('username', 'invalid username or password');
}
req.session.userId = user.id;
return null;
}
async logout(ctx: MyContext) {
await ctx.req.session.destroy(err => {
console.log(err);
return false;
});
await ctx.res.clearCookie('voting-system');
return true;
}
}
|
chilam1234/VotingSystem
|
src/poll/auth.guard.ts
|
<filename>src/poll/auth.guard.ts
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { Request } from 'express';
@Injectable()
export class AuthGuard implements CanActivate {
canActivate(context: ExecutionContext): boolean {
const ctx = GqlExecutionContext.create(context);
const req: Request = ctx.getContext().req;
if (req.session && req.session.userId) {
console.log(req.session.userId);
return true;
}
return false;
}
}
|
chilam1234/VotingSystem
|
src/poll/poll.repository.ts
|
<filename>src/poll/poll.repository.ts
import { EntityRepository, Repository } from 'typeorm';
import { Poll } from './poll.entity';
import { PollOption } from './pollOption.entity';
import { Vote } from './vote.entity';
@EntityRepository(Poll)
export class PollRepository extends Repository<Poll> {}
@EntityRepository(PollOption)
export class PollOptionRepository extends Repository<PollOption> {}
@EntityRepository(Vote)
export class VoteRepository extends Repository<Vote> {}
|
chilam1234/VotingSystem
|
src/types/myContext.ts
|
<reponame>chilam1234/VotingSystem<filename>src/types/myContext.ts
import * as DataLoader from 'dataloader';
import { Request, Response } from 'express';
import { PollOption } from '../poll/pollOption.entity';
export interface MyContext {
req: Request;
res: Response;
pollOptionLoader: DataLoader<number, PollOption[]>;
}
|
chilam1234/VotingSystem
|
src/poll/poll.entity.ts
|
import { Field, ObjectType } from 'type-graphql';
import {
Column,
Entity,
ManyToOne,
OneToMany,
PrimaryGeneratedColumn,
} from 'typeorm';
import { User } from '../user/user.entity';
import { PollOption } from './pollOption.entity';
@ObjectType()
@Entity()
export class Poll {
@Field()
@PrimaryGeneratedColumn()
id: number;
@Field()
@Column('text')
name: string;
@Field()
@Column()
userId: string;
@Field()
@Column('date')
startDate: Date;
@Field()
@Column('date')
endDate: Date;
@ManyToOne(() => User, user => user.poll)
user: Promise<User>;
@Field(() => [PollOption])
@OneToMany(() => PollOption, pollOption => pollOption.poll)
pollOption: Promise<PollOption[]>;
}
|
chilam1234/VotingSystem
|
src/user/user.resolver.ts
|
import { UsePipes } from '@nestjs/common';
import { Args, Context, Mutation, Query, Resolver } from '@nestjs/graphql';
import { MyContext } from 'src/types/myContext';
import * as yup from 'yup';
import { YupValidationPipe } from '../pipes/yupValidationPipe';
import { LoginInput } from './input/user.loginInput';
import { SignupInput } from './input/user.singupInput';
import { ErrorResponse } from './shared/errorResponse';
import { User } from './user.entity';
import { UserService } from './user.service';
const schema = yup.object().shape({
userName: yup
.string()
.min(3)
.max(30)
.required(),
hkId: yup
.string()
.min(8)
.max(8)
.required(),
password: yup
.string()
.min(6, 'password must at least have 6 characters')
.max(30)
.required(),
});
@Resolver(User)
export class UserResolver {
constructor(private readonly userService: UserService) {}
@Mutation(() => [ErrorResponse], { nullable: true })
@UsePipes(new YupValidationPipe(schema))
async signup(
@Args('signupInput') signupInput: SignupInput,
): Promise<ErrorResponse[] | null> {
return this.userService.signup(signupInput);
}
@Mutation(() => [ErrorResponse], { nullable: true })
async login(
@Args('loginInput') loginInput: LoginInput,
@Context() ctx: MyContext,
): Promise<ErrorResponse[] | null> {
return this.userService.login(loginInput, ctx.req);
}
@Mutation(() => Boolean)
async logout(@Context() ctx: MyContext) {
return this.userService.logout(ctx);
}
}
|
chilam1234/VotingSystem
|
src/user/input/user.singupInput.ts
|
import { Field, InputType } from 'type-graphql';
import { User } from '../user.entity';
@InputType({ description: 'Signup Input' })
export class SignupInput implements Partial<User> {
@Field()
userName: string;
@Field()
hkId: string;
@Field()
password: string;
}
|
chilam1234/VotingSystem
|
src/poll/poll.service.ts
|
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { POLL_OPTION_ID_PREFIX } from '../constants';
import { redis } from '../redis';
import { MyContext } from '../types/myContext';
import { Poll } from './poll.entity';
import { PollOptionRepository, PollRepository, VoteRepository } from './poll.repository';
import { ErrorResponse } from 'src/user/shared/errorResponse';
import { errorMessage } from 'src/user/shared/errorMessage';
import { Vote } from './vote.entity';
@Injectable()
export class PollService {
constructor(
@InjectRepository(PollRepository)
private readonly pollRepo: PollRepository,
@InjectRepository(PollOptionRepository)
private readonly pollOptionRepo: PollOptionRepository,
@InjectRepository(Vote)
private readonly voteRepo: VoteRepository,
) {}
async createPoll(
userId: string,
name: string,
options: string[],
startDate: Date,
endDate: Date,
): Promise<Boolean | ErrorResponse[]> {
if (startDate.getTime() >= endDate.getTime()) {
return errorMessage('email', 'startDate should greater than endDate');
}
const poll = await this.pollRepo.insert({
name,
userId,
startDate,
endDate,
});
options.map(async text => {
await this.pollOptionRepo.insert({
text,
votes: [],
pollId: poll.raw[0].id,
});
});
return true;
}
async vote(
pollOptionId: number,
userId: string,
): Promise<Boolean | ErrorResponse[]> {
const pollOption = await this.pollOptionRepo.findOne({
relations: ['poll'],
where: { id: pollOptionId },
});
if (
(await pollOption.poll).startDate.getTime() > new Date().getTime() ||
(await pollOption.poll).endDate.getTime() < new Date().getTime()
) {
return errorMessage('poll', 'this poll is closed');
}
const voted = await redis.sismember(
`${POLL_OPTION_ID_PREFIX}${pollOption.pollId}`,
userId,
);
if (voted) {
return false;
}
await this.voteRepo.insert(
{
user: () => userId,
pollOption: pollOption
}
);
await redis.sadd(`${POLL_OPTION_ID_PREFIX}${pollOption.pollId}`, userId);
return true;
}
async poll(id: number): Promise<Poll> {
return await this.pollRepo.findOne({
where: { id },
relations: ['pollOption'],
});
}
async allPolls(take: number, skip: number): Promise<Poll[]> {
return this.pollRepo
.createQueryBuilder('poll')
.innerJoinAndSelect('poll.pollOption', 'pollOption')
.orderBy('poll.name', 'ASC')
.take(take)
.skip(skip)
.getMany();
}
async deletePoll(userId: string, id: number): Promise<Boolean> {
try {
await this.pollRepo.delete({ id });
await redis.srem(`${POLL_OPTION_ID_PREFIX}${id}`, userId);
} catch (err) {
return false;
}
return true;
}
async myPoll(userId: string): Promise<Poll[]> {
return await this.pollRepo.find({ where: { userId } });
}
}
|
chilam1234/VotingSystem
|
src/subscribers/user.subscriber.ts
|
import * as <PASSWORD> from '<PASSWORD>';
import {
EntitySubscriberInterface,
EventSubscriber,
InsertEvent,
} from 'typeorm';
import { User } from '../user/user.entity';
@EventSubscriber()
export class PostSubscriber implements EntitySubscriberInterface<User> {
/**
* Indicates that this subscriber only listen to Post events.
*/
listenTo() {
return User;
}
/**
* Called before post insertion.
*/
async beforeInsert(event: InsertEvent<User>) {
console.log(`BEFORE USER INSERTED: `, event.entity);
event.entity.password = await bcrypt.hash(event.entity.password, 12);
}
}
|
chilam1234/VotingSystem
|
src/poll/vote.entity.ts
|
import { Field, ObjectType } from 'type-graphql';
import { Entity, PrimaryGeneratedColumn, OneToOne, ManyToOne } from 'typeorm';
import { PollOption } from './pollOption.entity';
import { User } from 'src/user/user.entity';
@ObjectType()
@Entity()
export class Vote {
@Field()
@PrimaryGeneratedColumn()
id: number;
@Field(()=> PollOption)
@ManyToOne(() => PollOption, PollOption => PollOption.votes)
pollOption: PollOption;
@Field(()=>User)
@OneToOne(() => User)
user: User;
}
|
runerback/iso-3166-reader-2
|
src/matches.ts
|
import { MatchGroups } from "./module";
export default function* iterator(pattern: string | RegExp, flags: string[], content: string): IterableIterator<MatchGroups> {
const exp = new RegExp(pattern, flags.join(''));
let match = exp.exec(content);
while (match && match.groups) {
yield match.groups;
match = exp.exec(content);
}
}
|
runerback/iso-3166-reader-2
|
src/request.ts
|
<filename>src/request.ts
import http, { ClientRequest, IncomingMessage } from 'http';
import https from 'https';
import { URL } from 'url';
import { Config } from './module';
import crypto from 'crypto';
import fs from 'fs';
import path from 'path';
interface RequestResult {
readonly data: string;
readonly isBinary?: boolean;
readonly failed?: boolean;
}
const get = (url: URL, callback: (response: IncomingMessage) => void): ClientRequest => {
switch (url.protocol) {
case 'http:':
return http.get(url, {}, callback);
case 'https:':
return https.get(url, {}, callback);
default:
const request = new ClientRequest(url);
request.abort();
return request;
}
};
const requestOnce = async (url: URL): Promise<RequestResult> => {
return await new Promise(resolve => {
get(url, async res => {
const isBinaryType = /image/.test(res.headers['content-type'] ?? '');
if (isBinaryType) {
const binaryData = Array<Uint8Array>();
res.on('data', (trunk: Uint8Array) => {
binaryData.push(trunk);
})
res.on('end', () => {
const buffer = Buffer.concat(binaryData);
resolve({
data: buffer.toString('base64'),
isBinary: isBinaryType
});
});
} else {
let data = '';
res.on('data', (trunk: String) => {
data += trunk;
})
res.on('end', () => {
resolve({
data: data,
isBinary: isBinaryType
});
});
}
}).on('error', (error: Error) => {
console.error(error);
resolve({
data: '',
failed: true
});
})
});
};
const tryRequest = async (url: URL, retryCount: number): Promise<RequestResult> => {
for (let i = 0; i < retryCount;) {
try {
return await requestOnce(url);
} catch {
if (++i < retryCount) {
continue;
}
}
}
return {
data: '',
failed: true
};
}
const getCacheKey = (url: URL): string => {
const md5 = crypto.createHash('md5');
md5.update(url.toString());
const digest = md5.digest('hex');
return `cache_${digest}.dat`;
};
const getCache = (url: URL, config: Config): string => {
const key = getCacheKey(url);
const cacheFile = path.join(config.cachePath, key);
if (!fs.existsSync(cacheFile)) {
return '';
}
return fs.readFileSync(cacheFile, 'utf-8');
};
const setCache = (url: URL, content: string, config: Config) => {
const key = getCacheKey(url);
const cacheFile = path.join(config.cachePath, key);
fs.writeFileSync(cacheFile, content);
};
export default async function request(uri: string, config: Config, retry: number = 3): Promise<string> {
let url: URL;
try {
url = new URL(uri);
} catch (error) {
console.error(error);
return '';
}
console.log(`requesting [${url.toString()}] . . .`);
const cached = getCache(url, config);
if (cached) {
console.log('loaded from cache');
return cached;
}
const wait = Math.floor(Math.random() * Math.floor(3) + 1); // wait for 1 to 3 seconds
console.log(`waiting for ${wait} seconds . . .`)
await new Promise(resolve => {
global.setTimeout(
() => resolve(),
wait * 1000
);
});
const response = await tryRequest(url, retry);
if (response.failed) {
return '';
}
const data = response.data;
setCache(url, response.data, config);
console.log('cached');
return data;
}
|
runerback/iso-3166-reader-2
|
src/index.ts
|
<filename>src/index.ts
import { Config, CountryData, CountryModel, LinkedData } from './module';
import request from './request';
import matches from './matches';
import fs from 'fs';
import path from 'path';
import { URL } from 'url';
import { Pattern } from './patterns';
const _config = readConfig();
read(_config)
.then((data: CountryModel[]) => {
fs.writeFileSync(
_config.output,
JSON.stringify(data, null, ' ')
);
console.log('done');
})
.catch((error: Error) => console.error(error));
function readConfig(): Config {
const { rootURL, cachePath, output } = (<Config>JSON.parse(fs.readFileSync(
path.resolve('./config.json'),
'utf-8')));
const safeCachePath = path.resolve(cachePath);
if (!fs.existsSync(safeCachePath)) {
fs.mkdirSync(safeCachePath);
}
return {
rootURL: rootURL,
cachePath: safeCachePath,
output: path.resolve(output)
};
}
async function read(config: Config): Promise<CountryModel[]> {
const countries = Array<CountryModel>();
const rootHtml = await request(config.rootURL, config);
for (const linkedData of iterator(rootHtml, config)) {
countries.push({
name: linkedData.name,
code2: linkedData.data!.code2,
code3: linkedData.data!.code3,
code: linkedData.data!.code,
flag: await request(linkedData.data!.flag, config)
});
}
return countries;
}
function* iterator(html: string, config: Config): IterableIterator<LinkedData<CountryData>> {
for (const group of matches(Pattern, ['g', 'i', 's'], html)) {
yield {
name: group['name'].valueOf(),
url: '',
data: {
code2: group['code2'].valueOf(),
code3: group['code3'].valueOf(),
code: group['code'].valueOf(),
flag: new URL(config.rootURL).protocol + group['flag'].valueOf()
}
};
}
}
|
runerback/iso-3166-reader-2
|
src/module.d.ts
|
export interface Config {
readonly rootURL: string;
readonly cachePath: string; // cache folder
readonly output: string; // output file name
}
export interface MatchGroups {
readonly [key: string]: string;
}
export interface LinkedData<T = any> {
readonly name: string;
readonly url: string;
readonly data?: T;
}
export interface CountryData {
readonly code2: string; // alpha-2 code
readonly code3: string; // alpha-3 code
readonly code: string; // numeric code
readonly flag: string; // link of flag image or base64 data of flag image
}
export interface CountryModel {
readonly name: string;
readonly code2: string;
readonly code3: string;
readonly code: string;
readonly flag: string; //base64
}
|
at-fe-support/ng2-file-upload
|
ng2-file-upload.d.ts
|
<reponame>at-fe-support/ng2-file-upload
export * from './components/file-upload/file-select.directive';
export * from './components/file-upload/file-drop.directive';
export * from './components/file-upload/file-uploader.class';
export declare const FILE_UPLOAD_DIRECTIVES: [any];
declare var _default: {
directives: [any][];
};
export default _default;
|
at-fe-support/ng2-file-upload
|
demo/components/file-upload/zs-file-demo/demo.ts
|
import {Component, ElementRef, Renderer, Input, HostListener, HostBinding, OnInit} from '@angular/core';
import {FileUploader, FileUploaderOptions} from '../../../../ng2-file-upload';
@Component({
selector: 'demo-file-upload',
providers: [FileUploader],
template: require('./demo.html'),
styles: [':host {border:1px solid black; padding:59px;display: block;}' +
'.hover {border: 3px solid green; backgroud: black;}']
})
export class DemoFileUploadComponent implements OnInit {
@Input() public url:string;
@Input() public queueLimit:number;
@Input() public maxFileSize:number;
@Input() public autoUpload:boolean;
@Input() public allowedMimeType:Array<string>;
@Input() public allowedFileType:Array<string>;
@Input() public headers:Array<any>;
@HostBinding('class.hover') private isHover:boolean = false;
private inputs:string[] = ['allowedMimeType',
'allowedFileType',
'autoUpload',
'isHTML5',
'headers',
'maxFileSize',
'queueLimit',
'removeAfterUpload',
'url'
];
private uploaderOptions:FileUploaderOptions = {};
private multiple:boolean = true;
private element:ElementRef;
private fileUploadService:FileUploader;
private renderer:Renderer;
public constructor(element:ElementRef, fileUploadService:FileUploader, renderer:Renderer) {
this.element = element;
this.fileUploadService = fileUploadService;
this.renderer = renderer;
}
public ngOnInit():any {
for (let input of this.inputs) {
if (this[input]) {
this.uploaderOptions[input] = this[input];
}
}
this.fileUploadService.setOptions(this.uploaderOptions);
this.multiple = (!this.queueLimit || this.queueLimit > 1);
}
@HostListener('drop', ['$event'])
public onDrop(event:any):void {
this._preventAndStop(event);
this.isHover = false;
let transfer = this._getTransfer(event);
if (!transfer) {
return;
}
this.fileUploadService.addToQueue(transfer.files);
}
@HostListener('dragover', ['$event'])
public onDragOver(event:any):void {
this._preventAndStop(event);
if (this.isHover) {
return;
}
let transfer = this._getTransfer(event);
if (!this._haveFiles(transfer.types)) {
return;
}
this.isHover = true;
}
@HostListener('dragleave', ['$event'])
public onDragLeave(event:any):void {
this._preventAndStop(event);
if (event.currentTarget === (this as any).element[0]) {
return;
}
this.isHover = false;
}
public onChange($event:any):void {
this.fileUploadService.addToQueue($event.srcElement.files);
}
private _getTransfer(event:any):any {
return event.dataTransfer ? event.dataTransfer : event.originalEvent.dataTransfer;
}
private _preventAndStop(event:any):any {
event.preventDefault();
event.stopPropagation();
}
private _haveFiles(types:any):any {
if (!types) {
return false;
}
if (types.indexOf) {
return types.indexOf('Files') !== -1;
} else if (types.contains) {
return types.contains('Files');
} else {
return false;
}
}
}
|
at-fe-support/ng2-file-upload
|
components/file-upload/file-like-object.class.ts
|
function isElement(node:any):boolean {
return !!(node && (node.nodeName || node.prop && node.attr && node.find));
}
export class FileLikeObject {
public lastModifiedDate:any;
public size:any;
public type:string;
public name:string;
public constructor(fileOrInput:any) {
let isInput = isElement(fileOrInput);
let fakePathOrObject = isInput ? fileOrInput.value : fileOrInput;
let postfix = typeof fakePathOrObject === 'string' ? 'FakePath' : 'Object';
let method = '_createFrom' + postfix;
(this as any)[method](fakePathOrObject);
}
public _createFromFakePath(path:string):void {
this.lastModifiedDate = void 0;
this.size = void 0;
this.type = 'like/' + path.slice(path.lastIndexOf('.') + 1).toLowerCase();
this.name = path.slice(path.lastIndexOf('/') + path.lastIndexOf('\\') + 2);
}
public _createFromObject(object:{size: number, type: string, name: string}):void {
// this.lastModifiedDate = copy(object.lastModifiedDate);
this.size = object.size;
this.type = object.type;
this.name = object.name;
}
}
|
at-fe-support/ng2-file-upload
|
components/file-upload/file-drop.directive.spec.ts
|
import {Component} from '@angular/core';
import {it, inject, beforeEachProviders} from '@angular/core/testing';
import {ComponentFixture} from '@angular/compiler/testing';
import {FileUploader} from './file-uploader.class';
import {FileSelectDirective} from './file-select.directive';
@Component({
selector: 'container',
template: `<input type="file" ng2FileSelect [uploader]="uploader" />`,
directives: [FileSelectDirective]
})
export class ContainerComponent {
public uploader:FileUploader = new FileUploader({url: 'localhost:3000'});
}
describe('Directive: FileSelectDirective', () => {
beforeEachProviders(() => [
ContainerComponent
]);
it('should be fine', inject([ContainerComponent], (fixture:ComponentFixture<ContainerComponent>) => {
expect(fixture).not.toBeNull();
}));
});
|
at-fe-support/ng2-file-upload
|
demo/components/file-upload-section.ts
|
<filename>demo/components/file-upload-section.ts
import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import {TAB_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap';
import {SimpleDemoComponent} from './file-upload/simple-demo';
let name = 'File Upload';
let doc = require('../../components/file-upload/readme.md');
let tabDesc:Array<any> = [
{
heading: 'Simple',
ts: require('!!prismjs?lang=typescript!./file-upload/simple-demo.ts'),
html: require('!!prismjs?lang=markup!./file-upload/simple-demo.html'),
js: require('!!prismjs?lang=javascript!./file-upload/file-catcher.js')
}
];
let tabsContent:string = ``;
tabDesc.forEach((desc:any) => {
tabsContent += `
<tab heading="${desc.heading}" (select)="select($event)">
<div class="card card-block panel panel-default panel-body">
<${desc.heading.toLowerCase()}-demo *ngIf="currentHeading === '${desc.heading}'"></${desc.heading.toLowerCase()}-demo>
<br>
<div class="row" style="margin: 0px;">
<tabset>
<tab heading="Markup">
<div class="card card-block panel panel-default panel-body">
<pre class="language-html"><code class="language-html" ng-non-bindable>${desc.html}</code></pre>
</div>
</tab>
<tab heading="TypeScript">
<div class="card card-block panel panel-default panel-body">
<pre class="language-typescript"><code class="language-typescript" ng-non-bindable>${desc.ts}</code></pre>
</div>
</tab>
<tab heading="Backend Demo">
<div class="card card-block panel panel-default panel-body">
<pre class="language-javascript"><code class="language-javascript" ng-non-bindable>${desc.js}</code></pre>
</div>
</tab>
</tabset>
</div>
</div>
</tab>
`;
});
@Component({
selector: 'file-upload-section',
template: `
<section id="${name.toLowerCase()}">
<div class="row">
<tabset>
${tabsContent}
</tabset>
</div>
<div class="row">
<h2>API</h2>
<div class="card card-block panel panel-default panel-body">${doc}</div>
</div>
</section>
`,
directives: [SimpleDemoComponent, TAB_DIRECTIVES, CORE_DIRECTIVES]
})
export class FileUploadSectionComponent {
public currentHeading:string = 'Simple';
public select(e:any):void {
if (e.heading) {
this.currentHeading = e.heading;
}
}
}
|
dreamweiver/money-waster-app
|
src/environments/firebase.env.ts
|
export const config = {
apiKey: "<KEY>",
authDomain: "gcal-app-246607.firebaseapp.com",
databaseURL: "https://gcal-app-246607.firebaseio.com",
projectId: "gcal-app-246607",
storageBucket: "",
messagingSenderId: "422142782931",
appId: "1:422142782931:web:a51807657295188f"
};
|
dreamweiver/money-waster-app
|
src/app/app.module.ts
|
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { config } from './../environments/firebase.env';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { EventDetailComponent } from './event-detail/event-detail.component';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
import { AppRoutingModule } from './app-routing.module';
import { AngularFireModule } from '@angular/fire';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppMaterialModule } from './app.material.module';
@NgModule({
imports: [
BrowserModule,
AngularFireModule.initializeApp(config),
AngularFireAuthModule,
BrowserAnimationsModule,
AppMaterialModule,
AppRoutingModule
],
declarations: [
AppComponent,
HomeComponent,
EventDetailComponent,
PageNotFoundComponent
],
bootstrap: [ AppComponent ]
})
export class AppModule { }
|
dreamweiver/money-waster-app
|
src/app/services/auth.service.ts
|
import {Injectable, NgZone} from '@angular/core';
import {Observable, from, of, forkJoin} from 'rxjs';
import {AngularFireAuth} from '@angular/fire/auth';
import { delay} from 'rxjs/operators'
import {auth} from 'firebase/app';
import {config} from './../../environments/gapi-config';
import {BehaviorSubject} from 'rxjs';
declare var gapi: any;
@Injectable({
providedIn: 'root'
})
export class AuthService {
constructor(public afAuth: AngularFireAuth) {
this.loadClient();
this.user$ = this.afAuth.authState;
}
private _gapiSource = new BehaviorSubject<any>(false);
user$: Observable<firebase.User>;
calendarItems: any[];
gapiClient$ = this._gapiSource.asObservable();
// Initialize the Google API client with desired scopes
private initClient() {
let {apiKey, clientId, discoveryDocs, scope} = config;
gapi.client.init({
apiKey,
clientId,
discoveryDocs,
scope
}).then(() => {
gapi.client.load('calendar', 'v3').then(() => {
this._gapiSource.next(true);
}).
catch(error => {
console.log("Gapi calendar load error");
});
}).catch(error => {
console.log("Gapi Initialisation error");
});
}
// load gapi client
loadClient() {
gapi.load('client', () => {
// pushing "gapi.client.init" call to event queue
// to align with client load, which happens asyncronously
setTimeout(()=>{
this.initClient();
}, 0);
});
}
// service call to login to Google account
async login() {
const googleAuth = gapi.auth2.getAuthInstance()
const googleUser = await googleAuth.signIn();
const token = googleUser.getAuthResponse().id_token;
const credential = auth.GoogleAuthProvider.credential(token);
console.log(googleUser)
await this.afAuth.auth.signInWithCredential(credential);
}
// service call to logout
logout() {
this.afAuth.auth.signOut();
}
// service call to fetch events using gapi
getCalendarEvents(): Observable<any> {
let events = [];
if(!!gapi.client.calendar) {
events = gapi.client.calendar.events.list({
calendarId: 'primary',
timeMin: new Date().toISOString(),
showDeleted: false,
singleEvents: true,
maxResults: 1,
orderBy: 'startTime'
});
}
return from(events);
}
}
|
dreamweiver/money-waster-app
|
src/app/event-detail/event-detail.component.ts
|
import { Component, Input , OnDestroy} from '@angular/core';
import { NotificationService } from './../services/notification.service';
import {MatSnackBar} from '@angular/material';
// Custom Daily Rates type
class DailyRates {
avgDailyCostRate:number;
avgDailyRevenueRate:number;
}
const totalHrsInDay:number = 8; // total productive hours per day
const totalHrsInMillseconds:number = totalHrsInDay * 60000 * 60; // total hours per millsecond
const notificationLimit:number = 100; // cost limit when crossed show notification
const dailyRatePreLimit:number = 0;
const revenueRatePreLimit:number = 0;
const delay:number = 1000;
@Component({
selector: 'event-detail',
templateUrl: './event-detail.component.html',
styleUrls: [ './event-detail.component.scss' ]
})
export class EventDetailComponent implements OnDestroy {
@Input()
set event(event: any) {
if(!!event && Object.keys(event).length > 0){
this.attendeesCount = event.attendees.length;
this.meetingDesc = event.description;
this.meetingTitle = event.summary;
this.avgDailyRates = this.getDailyAvgRates(event.attendees, totalHrsInMillseconds);
// track limits & notify user as meeting progresses
this.initializeLimits(event.id);
// show live status on screen
this.showLiveStats(event);
}
}
private timer:number;
private dailyRatePreLimit = 0;
private revenueRatePreLimit = 0;
attendeesCount:number;
avgDailyRates:DailyRates;
meetingSince:string;
liveDailyRates:DailyRates;
meetingDesc:string;
meetingTitle:string;
constructor(private notify:NotificationService,
private snackBar: MatSnackBar){}
ngOnDestroy() {
// Destroy the timer if its still running
if (this.timer) {
clearTimeout(this.timer);
}
}
private initializeLimits(id) {
let eventId = this.notify.getEventId();
if(eventId !== id){
this.dailyRatePreLimit = 0;
this.revenueRatePreLimit = 0;
this.notify.setEventId(id);
}
}
// show Notifications on screen when Cost Rate or Revenue Rate
// crosses 'notificationLimit'
private _showNoticationsOnLimit(dailyRates) {
let multiplier = Math.floor(dailyRates.avgDailyCostRate / notificationLimit);
if(multiplier > this.dailyRatePreLimit) {
this.notify.showNotification("Cost Rate Loss",
`The Incurred Loss on this meeting has crossed ${multiplier*100} dollars now`,
"special");
this.dailyRatePreLimit = multiplier;
}
multiplier = Math.floor(dailyRates.avgDailyRevenueRate / notificationLimit);
if(multiplier > this.revenueRatePreLimit) {
this.notify.showNotification("Potential Revenue Loss",
`The Incurred Loss on this meeting has crossed ${multiplier*100} dollars now`,
"special");
this.revenueRatePreLimit = multiplier;
}
}
// reset the event status on screen
private runCleanSlate() {
this.attendeesCount = 0;
this.meetingDesc = '';
this.meetingTitle = '';
this.avgDailyRates = undefined;
this.dailyRatePreLimit = 0;
this.revenueRatePreLimit = 0;
this.meetingSince = 'NA';
this.liveDailyRates = undefined;
}
private clearData() {
let snackBarRef;
!!this.timer && clearTimeout(this.timer); // stop timer when meeting ends
// notify user about meeting has ended
snackBarRef = this.snackBar.open('Meeting has ended', 'Download report', {
duration: 10000
});
// prepare Meeting status report for download (pdf/image)
snackBarRef.onAction().subscribe(() => {
});
// clear the event details after meeting has ended
snackBarRef.afterDismissed().subscribe(() => {
this.runCleanSlate();
});
}
// Show Live Status of meeting time, cost rate, revenue rate
private showLiveStats(event){
let {
start: {dateTime:eventStTime},
end: {dateTime:eventEndTime},
attendees
} = event;
// set up a timer to show live status after every second
this.timer = setTimeout(_=>{
let now = new Date();
let timeDiff = now.getTime() - new Date(eventStTime).getTime();
let seconds = Math.floor((timeDiff / 1000) % 60);
let minutes = Math.floor(((timeDiff / (1000*60)) % 60));
let hours = Math.floor(((timeDiff / (1000*60*60)) % 24));
let dailyRates:DailyRates = this.getDailyAvgRates(attendees, timeDiff);
this.meetingSince = `${hours} H ${minutes} M ${seconds} S`;
this.liveDailyRates = dailyRates;
// show notifications when cost rate or revenue rate crossed 100$ mark
this._showNoticationsOnLimit(dailyRates);
// show live status only when meeting is IN-PROGRESS, else
// prepare meeting data for download
if(now.getTime() <= new Date(eventEndTime).getTime()) {
this.showLiveStats(event);
} else {
this.clearData();
}
}, delay);
}
// calulate Daily Avg Rates for all attendees
private getDailyAvgRates(attendees, effortInMS ):DailyRates{
const costRateUnit = 1; // assumed cost rate
const revenueRateUnit = 2; // assumed revenue rate
let avgDailyRevenueRate = 0;
let avgDailyCostRate = 0;
for(let attendee of attendees) {
let nameCount = attendee.email.length;
let costRateUnitInMS = (costRateUnit * nameCount) / ( 60000 * 60); // cost rate per millisecond
let revenueRateUnitInMS = (revenueRateUnit * nameCount) / (60000 * 60); // revenue rate per millsecond
avgDailyCostRate += costRateUnitInMS * effortInMS;
avgDailyRevenueRate += revenueRateUnitInMS * effortInMS;
}
return {
avgDailyCostRate:Number(avgDailyCostRate.toFixed(3)),
avgDailyRevenueRate:Number(avgDailyRevenueRate.toFixed(3))
}
}
}
|
dreamweiver/money-waster-app
|
src/app/home/home.component.ts
|
import { Component, OnDestroy, NgZone} from '@angular/core';
import { AuthService } from './../services/auth.service';
import { NotificationService } from './../services/notification.service';
const delay:number = 60 * 1000;
@Component({
selector: 'home',
templateUrl: './home.component.html',
styleUrls: [ './home.component.scss' ]
})
export class HomeComponent implements OnDestroy {
constructor(public auth: AuthService,
private ngZone: NgZone,
private notify:NotificationService
) {
// wait until user has logged in, to fetch events
this.auth.user$.subscribe((userData)=>{
if(!!userData) {
this.isLoggedIn = true;
// after gapi is loaded successfully, fetch events
this.auth.gapiClient$.subscribe((status)=> {
!!status && this.checkEvents();
});
} else {
this.isLoggedIn = false;
}
});
}
ngOnDestroy() {
// destroy timer , if running
if (this.timer) {
clearTimeout(this.timer);
}
}
private timer:number;
activeEvent:any;
isLoggedIn:boolean = false;
// Constantly check for active events
checkEvents() {
this.auth.getCalendarEvents().subscribe(events => {
let calendarEvents = events.result.items;
this.activeEvent = '';
for(let event of calendarEvents) {
let eventStTime: Date;
let now:Date;
let eventId = this.notify.getEventId();
// convert Date object
eventStTime = new Date(event.start.dateTime);
now = new Date();
// check whether event/meeting has started or not
if(now.getTime() >= eventStTime.getTime()) {
if(eventId !== event.id){
this.notify.showNotification(event.summary,
"Meeting has started",
"normal");
}
// clear 'checkEvents' timer , if running
clearTimeout(this.timer);
this.ngZone.run( () => {
this.activeEvent = event;
});
}
}
// do a routine check every 1 minute
this.timer = setTimeout(_ => {
this.checkEvents();
}, delay); // calendar refresh time is set to 1 minute, as its a costly operation
});
}
}
|
dreamweiver/money-waster-app
|
src/app/services/notification.service.ts
|
<reponame>dreamweiver/money-waster-app<filename>src/app/services/notification.service.ts
import {Injectable} from '@angular/core';
import {MatSnackBar} from '@angular/material';
declare var webNotification: any;
const icons = {
normal: 'assets/images/office-calendar.ico',
special: 'assets/images/office-alert.ico'
};
@Injectable({
providedIn: 'root'
})
export class NotificationService {
private permissionGranted: boolean = false;
eventId:string;
constructor( private snackBar: MatSnackBar) {
//manually ask for notification permissions
// (invoked automatically if needed and allowRequest=true)
webNotification.requestPermission(granted => {
if (granted) {
this.permissionGranted = true;
} else {
this.permissionGranted = false;
}
});
}
// service all to show web notification (if supported) or
// normal notifications(IE browser)
showNotification(title, msg, type){
if(this.permissionGranted){
webNotification.showNotification(title, {
body: msg,
icon: icons[type],
autoClose: 5000 //auto close the notification after 4 seconds (you can manually close it via hide function)
}, function onShow(error, hide) {
if (error) {
window.alert('Unable to show notification: ' + error.message);
}
});
} else {
// if Browser doesnt support Web Notificaton, then show normal messages
let snackBarRef;
let fullMsg = `${title} : ${msg}`;
snackBarRef = this.snackBar.open(fullMsg ,'' , {
duration: 5000
});
}
}
getEventId():string {
return this.eventId || undefined;
}
setEventId(id) {
this.eventId = id;
}
}
|
dreamweiver/money-waster-app
|
src/environments/gapi-config.ts
|
<filename>src/environments/gapi-config.ts
export const config = {
apiKey: "<KEY>",
clientId:'422142782931-gb1lg84ipjucknmkil7qevkmrep0c1i7.apps.googleusercontent.com',
discoveryDocs: ['https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest'],
scope: 'https://www.googleapis.com/auth/calendar.readonly'
};
|
PabloLION/usehooks-ts
|
scripts/copyHooks.ts
|
<reponame>PabloLION/usehooks-ts
import fs from 'fs'
import path from 'path'
import { isHookFile, toQueryParams } from './utils'
const hooksDir = path.resolve('./lib/src')
const demosDir = path.resolve('./site/src/hooks-doc')
const outputDir = path.resolve('./site/generated')
const sandboxTemplatePath = path.resolve('./templates/codesandbox')
////////////////////////////////////////////////////////////////////////
// 1. Imperative script that copy hooks from code to markdown files
////////////////////////////////////////////////////////////////////////
createDirIfNeeded(outputDir)
createDirIfNeeded(`${outputDir}/hooks/`)
createDirIfNeeded(`${outputDir}/hookDemos/`)
// Copy hooks as markdown file
fs.readdir(hooksDir, (err, files) => {
if (err) throw err
files.forEach(file => {
if (isHookFile(file))
copyHook({
sourceFile: path.resolve(`${hooksDir}/${file}/${file}.ts`),
destFile: path.resolve(`${outputDir}/hooks/${file}.hook.md`),
})
})
})
// Copy hooks's demo as markdown file
fs.readdir(demosDir, (err, files) => {
if (err) throw err
files.forEach(file => {
if (isHookFile(file)) {
copyHook({
sourceFile: path.resolve(`${demosDir}/${file}/${file}.demo.tsx`),
destFile: path.resolve(`${outputDir}/hookDemos/${file}.demo.md`),
useSandbox: true,
})
}
})
})
////////////////////////////////////////////////////////////////////////
// 2. Utility functions
////////////////////////////////////////////////////////////////////////
function getFileName(pathname: string): string {
return pathname.split('/').reverse()[0]
}
function createDirIfNeeded(dir: string): void {
if (!fs.existsSync(path.resolve(dir))) {
fs.mkdirSync(dir)
}
}
function copyHook({
sourceFile,
destFile,
useSandbox,
}: {
sourceFile: string
destFile: string
useSandbox?: boolean
}) {
// Check source file
if (!fs.existsSync(sourceFile)) {
console.warn(`${getFileName(sourceFile)} doesn't exist`)
return
}
// If destination file exists, remove it
let existingFile = false
if (fs.existsSync(destFile)) {
fs.unlinkSync(destFile)
existingFile = true
}
// Read source then create markdown hook file
fs.readFile(sourceFile, 'utf8', (err, data) => {
if (err) {
console.error(`Cannot read ${sourceFile}`)
return
}
const extension = sourceFile.split('.').reverse()[0]
const writeStream = fs.createWriteStream(destFile)
let preCode = '```' + extension
// TODO: Theses hooks don't work on CodeSandbox, make it work.
const excludedHook = [
'useFetch.demo.md',
'useCopyToClipboard.demo.md',
].includes(getFileName(destFile))
if (useSandbox && !excludedHook) {
const templateOptions = toQueryParams({ entry: 'src/App.tsx' })
preCode += ' codesandbox=file:' + sandboxTemplatePath + templateOptions
}
writeStream.write(preCode + '\r')
writeStream.write(data)
writeStream.write('```\r')
writeStream.end()
console.log(
`${getFileName(destFile)} ${existingFile ? 'updated' : 'created'}`,
)
})
}
|
Distil62/ynovNosql_teal
|
server/api/quarters/getByName.ts
|
<filename>server/api/quarters/getByName.ts
import { Router, Request, Response} from "express";
import Quarter from '../../model/Quarter';
const router = Router();
interface IQuarterNameRequest {
name: string
}
export default router.get('/name', async function (req: Request, res: Response) {
const request: IQuarterNameRequest = req.body;
res.json(await Quarter.findOne({nom: request.name}));
});
|
Distil62/ynovNosql_teal
|
server/api/index.ts
|
import { Router } from 'express';
import velov from './velov/index';
import quarter from './quarters/index';
import interest from './interest/index';
const router = Router();
router.use('/velov', velov);
router.use('/quarter', quarter);
router.use('/interest', interest);
export default router;
|
Distil62/ynovNosql_teal
|
server/server.ts
|
import express = require('express');
import next = require('next');
import bodyparser = require('body-parser');
import database from './database/database';
import routes from './routes';
const dev = process.env.NODE_ENV !== 'production';
const port = dev ? 3000 : 8000;
const app = next({ dev });
const handle = app.getRequestHandler();
database();
app
.prepare()
.then(() => {
const server = express();
server.use(express.json());
server.use(bodyparser.urlencoded({extended: false}));
server.use(bodyparser.json());
server.use(routes);
server.get('*', (req, res) => {
return handle(req, res)
});
server.listen(port, err => {
if (err) throw err;
console.log('> Ready on http://localhost:3000')
})
})
.catch(ex => {
console.error(ex.stack);
process.exit(1)
});
|
Distil62/ynovNosql_teal
|
server/model/Quarter.ts
|
<filename>server/model/Quarter.ts
import { model, Schema } from "mongoose";
const quarter = model('quartier', new Schema({
type: String,
features: {
nom: String,
theme: String,
soustheme: String,
identifiant: String,
idexterne: String,
siret: String,
datecreation: String,
gid: String,
},
geometry: {
type: String,
coordinates: [[[Number]]]
}
}, {
typeKey: "$type",
collection: 'quartier'
}));
quarter.createIndexes();
export default quarter;
|
Distil62/ynovNosql_teal
|
server/api/interest/index.ts
|
import { Router } from 'express';
import all from './all';
import getByName from './getByName';
const router = Router();
router.use(all);
router.use(getByName);
export default router;
|
Distil62/ynovNosql_teal
|
server/api/interest/getByName.ts
|
<reponame>Distil62/ynovNosql_teal
import { Router, Request, Response} from "express";
import Interest from '../../model/Interest';
const router = Router();
interface IInterestNameRequest {
name: string
}
export default router.get('/name', async function (req: Request, res: Response) {
const request: IInterestNameRequest = req.body;
res.json(await Interest.findOne({nom: request.name}));
});
|
Distil62/ynovNosql_teal
|
server/model/Velov.ts
|
import { model, Schema } from "mongoose";
const velov = model('velov', new Schema({
type: String,
properties: {
number: Number,
name: String,
address: String,
address2: String,
commune: String,
nmarrond: Number,
bonus: String,
pole: String,
lat: Number,
lng: Number,
bike_stands: Number,
status: String,
available_bike_stands: Number,
available_bikes: Number,
availabilitycode: Number,
availability: String,
banking: Number,
gid: Number,
last_update: String,
last_update_fme: String,
code_insee: String,
langue: String,
etat: String,
nature: String,
titre: String,
description: String,
},
geometry: {
type: String,
coordinates: [Number]
}
}, {
typeKey: '$type',
collection: 'velov'
}).index({
geometry: "2dsphere"
}));
velov.createIndexes().then((err: any) => {if (err) console.error("Erreur pendant la création des indexes de Velov ==>", err)});
export default velov;
|
Distil62/ynovNosql_teal
|
server/api/velov/all.ts
|
<gh_stars>1-10
import { Request, Response, Router } from "express";
import Velov from '../../model/Velov';
const router = Router();
export default router.get('/', async function (req: Request, res: Response) {
res.json(await Velov.find());
});
|
Distil62/ynovNosql_teal
|
server/api/quarters/all.ts
|
<gh_stars>1-10
import { Router, Request, Response} from "express";
import Quarter from '../../model/Quarter';
const router = Router();
export default router.get('/', async function (req: Request, res: Response) {
res.json(await Quarter.find());
});
|
Distil62/ynovNosql_teal
|
server/model/Interest.ts
|
<gh_stars>1-10
import { model, Schema } from "mongoose";
const interest = model('pointCle', new Schema({
type: String,
properties: {
id: String,
id_sitra1: String,
type: String,
type_detail: String,
nom: String,
adresse: String,
codepostal: String,
commune: String,
telephone: String,
fax: String,
telephonefax: String,
email: String,
siteweb: String,
facebook: String,
classement: String,
ouverture: String,
tarifsenclair: String,
tarifsmin: String,
tarifsmax: String,
producteur: String,
gid: String,
date_creation: String,
last_update: String,
last_update_fme: String,
},
geometry: {
type: String,
coordinates: [Number]
}
}, {
typeKey: '$type',
collection: 'pointCle'
}).index({
geometry: "2dsphere"
}));
export default interest;
|
Distil62/ynovNosql_teal
|
server/api/velov/nearAvailablePlace.ts
|
<reponame>Distil62/ynovNosql_teal
import {Request, Response, Router} from "express";
import Velov from '../../model/Velov';
const router = Router();
interface INearAvailablePlaceRequest {
lat: string;
lon: string;
distance: string
}
export default router.get('/nearAvailablePlace', async function (req: Request, res: Response) {
const request: INearAvailablePlaceRequest = req.body;
res.json(
await Velov.find({
status: "OPEN",
available_bike_stands: {
$gte: 1
},
geometry: {
$near: {
$maxDistance: parseFloat(request.distance),
$geometry: {
type: "Point",
coordinates: [parseFloat(request.lon), parseFloat(request.lat)]
}
}
}
})
);
});
|
Distil62/ynovNosql_teal
|
server/types/velov.d.ts
|
<reponame>Distil62/ynovNosql_teal
export interface IVelov {
type: string,
properties: {
number: number,
name: string,
address: string,
address2: string,
commune: string,
nmarrond: number,
bonus: string,
pole: string,
lat: number,
lng: number,
bike_stands: number,
status: string,
available_bike_stands: number,
available_bikes: number,
availabilitycode: number,
availability: string,
banking: number,
gid: number,
last_update: string,
last_update_fme: string,
code_insee: string,
langue: string,
etat: string,
nature: string,
titre: string,
description: string,
},
geometry: {
type: string,
coordinates: Array<number>
}
}
|
Distil62/ynovNosql_teal
|
server/api/velov/index.ts
|
import { Router } from 'express';
import all from './all';
import nearAvailablePlace from './nearAvailablePlace';
import nearAvailableBike from './nearAvailableBike';
const router = Router();
router.use(all);
router.use(nearAvailablePlace);
router.use(nearAvailableBike);
export default router;
|
Distil62/ynovNosql_teal
|
server/database/database.ts
|
<filename>server/database/database.ts
import mongoose = require('mongoose');
export default function () {
// mongoose.connect('mongodb+srv://mern:mern@<EMAIL>.mongodb.<EMAIL>/test?retryWrites=true',
mongoose.connect('mongodb://YnovNoSql:YnovNoSql@172.16.31.10/ProjetNoSql?retryWrites=true',
{
authSource: 'admin',
useNewUrlParser: true,
useCreateIndex: true
})
.then(() => {console.log("La connexion à la base de donnée Mongo à été établie !")})
.catch((err) => {console.error("Erreur connexion Mongo ==> ", err)});
}
|
dduportal/cds
|
ui/src/app/views/project/add/project.add.component.spec.ts
|
<filename>ui/src/app/views/project/add/project.add.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA, Injector } from '@angular/core';
import { getTestBed, TestBed } from '@angular/core/testing';
import { Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateLoader, TranslateModule, TranslateParser, TranslateService } from '@ngx-translate/core';
import { Store } from '@ngxs/store';
import { ToasterService } from 'angular2-toaster-sgu';
import { ApplicationService } from 'app/service/application/application.service';
import { AuthenticationService } from 'app/service/authentication/authentication.service';
import { MonitoringService } from 'app/service/monitoring/monitoring.service';
import { RouterService } from 'app/service/router/router.service';
import { HelpService } from 'app/service/services.module';
import { UserService } from 'app/service/user/user.service';
import { WorkflowRunService } from 'app/service/workflow/run/workflow.run.service';
import { WorkflowService } from 'app/service/workflow/workflow.service';
import { AddProject } from 'app/store/project.action';
import { NgxsStoreModule } from 'app/store/store.module';
import { of } from 'rxjs';
import 'rxjs/add/observable/of';
import { Group, GroupPermission } from '../../../model/group.model';
import { Project } from '../../../model/project.model';
import { EnvironmentService } from '../../../service/environment/environment.service';
import { GroupService } from '../../../service/group/group.service';
import { NavbarService } from '../../../service/navbar/navbar.service';
import { PipelineService } from '../../../service/pipeline/pipeline.service';
import { ProjectService } from '../../../service/project/project.service';
import { ProjectStore } from '../../../service/project/project.store';
import { RepoManagerService } from '../../../service/repomanager/project.repomanager.service';
import { VariableService } from '../../../service/variable/variable.service';
import { SharedModule } from '../../../shared/shared.module';
import { ToastService } from '../../../shared/toast/ToastService';
import { ProjectModule } from '../project.module';
import { ProjectAddComponent } from './project.add.component';
describe('CDS: Project Show Component', () => {
let injector: Injector;
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [],
providers: [
TranslateLoader,
RepoManagerService,
ProjectStore,
WorkflowRunService,
AuthenticationService,
NavbarService,
ProjectService,
PipelineService,
MonitoringService,
ApplicationService,
EnvironmentService,
VariableService,
ToasterService,
HelpService,
TranslateService,
TranslateParser,
GroupService,
UserService,
RouterService,
WorkflowService,
{ provide: ToastService, useClass: MockToast }
],
imports: [
ProjectModule,
SharedModule,
NgxsStoreModule,
TranslateModule.forRoot(),
RouterTestingModule.withRoutes([]),
HttpClientTestingModule
],
schemas: [
CUSTOM_ELEMENTS_SCHEMA
]
});
injector = getTestBed();
});
afterEach(() => {
injector = undefined;
});
it('it should create a project', () => {
let store: Store = injector.get(Store);
let router: Router = injector.get(Router);
spyOn(store, 'dispatch').and.callFake(() => {
return of(null);
});
spyOn(router, 'navigate').and.callFake(() => {
return;
});
// Create Project RepoManager Form Component
let fixture = TestBed.createComponent(ProjectAddComponent);
let component = fixture.debugElement.componentInstance;
expect(component).toBeTruthy();
fixture.componentInstance.project.name = 'FooProject';
fixture.componentInstance.project.key = 'BAR';
fixture.componentInstance.project.groups = new Array<GroupPermission>();
fixture.componentInstance.group = new Group();
fixture.componentInstance.group.name = 'foo';
fixture.componentInstance.createProject();
let project = new Project();
project.name = 'FooProject';
project.key = 'BAR';
project.groups = new Array<GroupPermission>();
project.groups.push(new GroupPermission());
project.groups[0].group = new Group();
project.groups[0].group.name = 'foo';
project.groups[0].permission = 7;
expect(store.dispatch).toHaveBeenCalledWith(new AddProject(project));
expect(router.navigate).toHaveBeenCalled();
});
it('it should generate errors', () => {
let fixture = TestBed.createComponent(ProjectAddComponent);
fixture.componentInstance.createProject();
expect(fixture.componentInstance.nameError).toBeTruthy();
// pattern error
fixture.componentInstance.createProject();
});
});
class MockToast {
success(title: string, msg: string) {
}
}
|
dduportal/cds
|
ui/src/app/views/workflow/run/node/pipeline/service/service.log.component.ts
|
<filename>ui/src/app/views/workflow/run/node/pipeline/service/service.log.component.ts
import { HttpClient, HttpHeaders } from '@angular/common/http';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ElementRef,
Input,
NgZone,
OnDestroy,
OnInit,
ViewChild
} from '@angular/core';
import { Select, Store } from '@ngxs/store';
import * as AU from 'ansi_up';
import { CDNLogAccess, PipelineStatus, ServiceLog } from 'app/model/pipeline.model';
import { WorkflowNodeJobRun } from 'app/model/workflow.run.model';
import { WorkflowService } from 'app/service/workflow/workflow.service';
import { AutoUnsubscribe } from 'app/shared/decorator/autoUnsubscribe';
import { FeatureState } from 'app/store/feature.state';
import { ProjectState } from 'app/store/project.state';
import { WorkflowState, WorkflowStateModel } from 'app/store/workflow.state';
import { Observable, Subscription } from 'rxjs';
@Component({
selector: 'app-workflow-service-log',
templateUrl: './service.log.html',
styleUrls: ['service.log.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
@AutoUnsubscribe()
export class WorkflowServiceLogComponent implements OnInit, OnDestroy {
@Select(WorkflowState.getSelectedWorkflowNodeJobRun()) nodeJobRun$: Observable<WorkflowNodeJobRun>;
nodeJobRunSubs: Subscription;
@ViewChild('logsContent') logsElt: ElementRef;
@Input() serviceName: string;
logsSplitted: Array<string> = [];
serviceLog: ServiceLog;
pollingSubscription: Subscription;
currentRunJobID: number;
currentRunJobStatus: string;
showLog = {};
loading = true;
zone: NgZone;
ansi_up = new AU.default;
constructor(
private _store: Store,
private _cd: ChangeDetectorRef,
private _ngZone: NgZone,
private _workflowService: WorkflowService,
private _http: HttpClient
) {
this.zone = new NgZone({ enableLongStackTrace: false });
}
ngOnDestroy(): void { } // Should be set to use @AutoUnsubscribe with AOT
ngOnInit(): void {
this.nodeJobRunSubs = this.nodeJobRun$.subscribe(njr => {
if (!njr) {
this.stopPolling();
return
}
if (this.currentRunJobID && njr.id === this.currentRunJobID && this.currentRunJobStatus === njr.status) {
return;
}
let invalidServiceName = !njr.job.action.requirements.find(r => r.type === 'service' && r.name === this.serviceName);
if (invalidServiceName) {
return;
}
this.currentRunJobID = njr.id;
this.currentRunJobStatus = njr.status;
if (!this.pollingSubscription) {
this.initWorker();
}
this._cd.markForCheck();
});
}
getLogs(serviceLog: ServiceLog) {
if (serviceLog && serviceLog.val) {
return this.ansi_up.ansi_to_html(serviceLog.val);
}
return '';
}
async initWorker() {
if (!this.serviceLog) {
this.loading = true;
}
let projectKey = this._store.selectSnapshot(ProjectState.projectSnapshot).key;
let workflowName = this._store.selectSnapshot(WorkflowState.workflowSnapshot).name;
let runNumber = (<WorkflowStateModel>this._store.selectSnapshot(WorkflowState)).workflowNodeRun.num;
let nodeRunId = (<WorkflowStateModel>this._store.selectSnapshot(WorkflowState)).workflowNodeRun.id;
let runJobId = this.currentRunJobID;
const cdnEnabled = !!this._store.selectSnapshot(FeatureState.feature('cdn-job-logs')).find(f => {
return !!f.results.find(r => r.enabled && r.paramString === JSON.stringify({ 'project_key': projectKey }));
});
let logAccess: CDNLogAccess;
if (cdnEnabled) {
logAccess = await this._workflowService.getServiceAccess(projectKey, workflowName, nodeRunId, runJobId,
this.serviceName).toPromise();
}
let callback = (serviceLog: ServiceLog) => {
this.serviceLog = serviceLog;
this.logsSplitted = this.getLogs(serviceLog).split('\n');
if (this.loading) {
this.loading = false;
}
this._cd.markForCheck();
};
if (!cdnEnabled || !logAccess.exists) {
const serviceLog = await this._workflowService.getServiceLog(projectKey, workflowName,
nodeRunId, runJobId, this.serviceName).toPromise();
callback(serviceLog);
} else {
const data = await this._http.get('./cdscdn' + logAccess.download_path, {
responseType: 'text',
headers: new HttpHeaders({ 'Authorization': `Bearer ${logAccess.token}` })
}).toPromise();
callback(<ServiceLog>{ val: data });
}
if (this.currentRunJobStatus === PipelineStatus.SUCCESS
|| this.currentRunJobStatus === PipelineStatus.FAIL
|| this.currentRunJobStatus === PipelineStatus.STOPPED) {
return;
}
this.stopPolling();
this._ngZone.runOutsideAngular(() => {
this.pollingSubscription = Observable.interval(2000)
.mergeMap(_ => {
if (!cdnEnabled || !logAccess.exists) {
return this._workflowService.getServiceLog(projectKey, workflowName, nodeRunId,
runJobId, this.serviceName);
}
return this._http.get('./cdscdn' + logAccess.download_path, {
responseType: 'text',
headers: new HttpHeaders({ 'Authorization': `Bearer ${logAccess.token}` })
}).map(data => <ServiceLog>{ val: data });
})
.subscribe(serviceLogs => {
this.zone.run(() => {
callback(serviceLogs);
if (this.currentRunJobStatus === PipelineStatus.SUCCESS
|| this.currentRunJobStatus === PipelineStatus.FAIL
|| this.currentRunJobStatus === PipelineStatus.STOPPED) {
this.stopPolling();
}
});
});
});
}
stopPolling() {
if (this.pollingSubscription) {
this.pollingSubscription.unsubscribe();
}
}
copyRawLog(serviceLog) {
this.logsElt.nativeElement.value = serviceLog.val;
this.logsElt.nativeElement.select();
document.execCommand('copy');
}
}
|
dduportal/cds
|
ui/src/app/store/applications.state.ts
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Action, createSelector, State, StateContext } from '@ngxs/store';
import { Application, Overview } from 'app/model/application.model';
import { IntegrationModel, ProjectIntegration } from 'app/model/integration.model';
import { Key } from 'app/model/keys.model';
import { Variable } from 'app/model/variable.model';
import { ApplicationService } from 'app/service/application/application.service';
import { cloneDeep } from 'lodash-es';
import { tap } from 'rxjs/operators';
import * as ActionApplication from './applications.action';
import { ClearCacheApplication } from './applications.action';
import * as ActionProject from './project.action';
export class ApplicationStateModel {
public application: Application;
public editApplication: Application;
public overview: Overview;
public currentProjectKey: string;
public loading: boolean;
public editMode: boolean;
}
export function getInitialApplicationsState(): ApplicationStateModel {
return {
application: null,
editApplication: null,
overview: null,
currentProjectKey: null,
loading: true,
editMode: false
};
}
@State<ApplicationStateModel>({
name: 'application',
defaults: getInitialApplicationsState()
})
@Injectable()
export class ApplicationsState {
constructor(private _http: HttpClient, private _appService: ApplicationService) { }
static currentState() {
return createSelector(
[ApplicationsState],
(state: ApplicationStateModel) => state
);
}
static selectOverview() {
return createSelector(
[ApplicationsState],
(state: ApplicationStateModel) => state.overview
);
}
@Action(ActionApplication.AddApplication)
add(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.AddApplication) {
return this._http.post<Application>(
`/project/${action.payload.projectKey}/applications`,
action.payload.application
).pipe(tap((app) => {
const state = ctx.getState();
ctx.setState({
...state,
currentProjectKey: action.payload.projectKey,
editMode: false,
editApplication: null,
application: app,
loading: false
});
ctx.dispatch(new ActionProject.AddApplicationInProject(app));
}));
}
@Action(ActionApplication.CloneApplication)
clone(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.CloneApplication) {
return this._http.post<Application>(
`/project/${action.payload.projectKey}/application/${action.payload.clonedAppName}/clone`,
action.payload.newApplication
).pipe(tap((app) => {
const state = ctx.getState();
ctx.setState({
...state,
currentProjectKey: action.payload.projectKey,
application: app,
loading: false,
});
ctx.dispatch(new ActionProject.AddApplicationInProject(app));
}));
}
@Action(ActionApplication.LoadApplication)
load(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.LoadApplication) {
const state = ctx.getState();
let editMode = false;
if (action.payload.from_repository) {
editMode = true;
}
ctx.setState({
...state,
currentProjectKey: action.payload.project_key,
application: action.payload,
editApplication: cloneDeep(action.payload),
editMode: editMode,
loading: false,
});
}
@Action(ActionApplication.FetchApplication)
fetch(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.FetchApplication) {
const state = ctx.getState();
if (state.application && state.application.name === action.payload.applicationName
&& state.currentProjectKey === action.payload.projectKey) {
return ctx.dispatch(new ActionApplication.LoadApplication(state.application));
}
return ctx.dispatch(new ActionApplication.ResyncApplication({ ...action.payload }));
}
@Action(ActionApplication.UpdateApplication)
update(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.UpdateApplication) {
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToUpdate = cloneDeep(stateEditMode.editApplication);
appToUpdate.name = action.payload.changes.name;
appToUpdate.description = action.payload.changes.description;
appToUpdate.deployment_strategies = action.payload.changes.deployment_strategies;
appToUpdate.vcs_strategy = action.payload.changes.vcs_strategy;
appToUpdate.editModeChanged = true;
return ctx.setState({
...stateEditMode,
editApplication: appToUpdate,
});
return;
}
return this._http.put<Application>(
`/project/${action.payload.projectKey}/application/${action.payload.applicationName}`,
action.payload.changes
).pipe(tap((app) => {
if (app.vcs_strategy) {
app.vcs_strategy.password = '**********';
}
const state = ctx.getState();
if (app.name !== action.payload.applicationName) {
let application = app;
ctx.setState({
...state,
application,
});
ctx.dispatch(new ActionProject.UpdateApplicationInProject({
previousAppName: action.payload.applicationName,
changes: app
}));
} else {
let applicationUpdated = {
...state.application,
...app
};
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}
}));
}
@Action(ActionApplication.DeleteApplication)
delete(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.DeleteApplication) {
return this._http.delete(
`/project/${action.payload.projectKey}/application/${action.payload.applicationName}`
).pipe(tap(() => {
ctx.dispatch(new ClearCacheApplication());
ctx.dispatch(new ActionProject.DeleteApplicationInProject({ applicationName: action.payload.applicationName }));
}));
}
@Action(ActionApplication.FetchApplicationOverview)
fetchOverview(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.FetchApplicationOverview) {
const state = ctx.getState();
return this._http.get<Overview>(
`/ui/project/${action.payload.projectKey}/application/${action.payload.applicationName}/overview`
).pipe(tap((overview) => {
ctx.setState({
...state,
overview: overview
});
}));
}
// ------- Variables --------- //
@Action(ActionApplication.AddApplicationVariable)
addVariable(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.AddApplicationVariable) {
let variable = action.payload.variable;
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
if (!appToupdate.variables) {
appToupdate.variables = new Array<Variable>();
}
action.payload.variable.hasChanged = false;
action.payload.variable.updating = false;
appToupdate.variables.push(cloneDeep(action.payload.variable));
appToupdate.editModeChanged = true;
return ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
}
let url = '/project/' + action.payload.projectKey + '/application/' + action.payload.applicationName + '/variable/' + variable.name;
return this._http.post<Variable>(url, variable)
.pipe(tap((v) => {
const state = ctx.getState();
let applicationUpdated = cloneDeep(state.application);
if (!applicationUpdated.variables) {
applicationUpdated.variables = new Array<Variable>();
}
applicationUpdated.variables.push(v);
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
@Action(ActionApplication.UpdateApplicationVariable)
updateVariable(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.UpdateApplicationVariable) {
let variable = action.payload.variable;
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
let varIndex = appToupdate.variables.findIndex(app => action.payload.variableName === app.name);
action.payload.variable.hasChanged = false;
action.payload.variable.updating = false;
appToupdate.variables[varIndex] = action.payload.variable;
appToupdate.editModeChanged = true;
ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
return
}
let url = '/project/' + action.payload.projectKey +
'/application/' + action.payload.applicationName +
'/variable/' + action.payload.variableName;
return this._http.put<Variable>(url, variable)
.pipe(tap((updatedVar) => {
const state = ctx.getState();
let applicationUpdated = cloneDeep(state.application);
applicationUpdated.variables = applicationUpdated.variables.map(v => {
if (v.name !== action.payload.variableName) {
return v;
}
return updatedVar;
});
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
@Action(ActionApplication.DeleteApplicationVariable)
deleteVariable(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.DeleteApplicationVariable) {
let variable = action.payload.variable;
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
action.payload.variable.hasChanged = false;
action.payload.variable.updating = false;
appToupdate.variables = appToupdate.variables.filter(app => app.name !== action.payload.variable.name);
appToupdate.editModeChanged = true;
ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
return
}
let url = `/project/${action.payload.projectKey}/application/${action.payload.applicationName}/variable/${variable.name}`;
return this._http.delete<any>(url)
.pipe(tap(() => {
const state = ctx.getState();
let applicationUpdated = state.application;
applicationUpdated.variables = applicationUpdated.variables.filter(v => v.name !== action.payload.variable.name);
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
// ------- Keys --------- //
@Action(ActionApplication.AddApplicationKey)
addKey(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.AddApplicationKey) {
let key = action.payload.key;
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
if (!appToupdate.keys) {
appToupdate.keys = new Array<Key>();
}
appToupdate.keys.push(action.payload.key);
appToupdate.editModeChanged = true;
ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
return
}
let url = '/project/' + action.payload.projectKey + '/application/' + action.payload.applicationName + '/keys';
return this._http.post<Key>(url, key)
.pipe(tap((newKey) => {
const state = ctx.getState();
let keys = state.application.keys != null ? state.application.keys.concat([newKey]) : [newKey];
let applicationUpdated = Object.assign({}, state.application, { keys });
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
@Action(ActionApplication.DeleteApplicationKey)
deleteKey(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.DeleteApplicationKey) {
let key = action.payload.key;
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
appToupdate.keys = appToupdate.keys.filter(k => action.payload.key.name !== k.name);
appToupdate.editModeChanged = true;
ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
return
}
let url = `/project/${action.payload.projectKey}/application/${action.payload.applicationName}/keys/${key.name}`;
return this._http.delete(url)
.pipe(tap(() => {
const state = ctx.getState();
let keys = state.application.keys.filter((currKey) => currKey.name !== key.name);
let applicationUpdated = Object.assign({}, state.application, { keys });
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
// ------- Deployment strategies --------- //
@Action(ActionApplication.AddApplicationDeployment)
addDeployment(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.AddApplicationDeployment) {
let integration = action.payload.integration;
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
if (!appToupdate.deployment_strategies) {
appToupdate.deployment_strategies = {};
}
appToupdate.deployment_strategies[integration.name] = cloneDeep(integration.model.deployment_default_config);
appToupdate.editModeChanged = true;
ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
return
}
let url = '/project/' + action.payload.projectKey +
'/application/' + action.payload.applicationName + '/deployment/config/' + integration.name;
return this._http.post<Application>(url, integration.model.deployment_default_config)
.pipe(tap((app) => {
const state = ctx.getState();
let applicationUpdated = Object.assign({}, state.application, {
deployment_strategies: app.deployment_strategies
});
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
@Action(ActionApplication.UpdateApplicationDeployment)
updateDeployment(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.UpdateApplicationDeployment) {
let integration = new ProjectIntegration();
integration.name = action.payload.deploymentName;
integration.model = new IntegrationModel();
integration.model.deployment_default_config = action.payload.config;
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
appToupdate.deployment_strategies[integration.name] = integration.model.deployment_default_config;
appToupdate.editModeChanged = true;
ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
return
}
return ctx.dispatch(new ActionApplication.AddApplicationDeployment({
projectKey: action.payload.projectKey,
applicationName: action.payload.applicationName,
integration
}));
}
@Action(ActionApplication.DeleteApplicationDeployment)
deleteDeployment(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.DeleteApplicationDeployment) {
const stateEditMode = ctx.getState();
if (stateEditMode.editMode) {
let appToupdate = cloneDeep(stateEditMode.editApplication);
delete appToupdate.deployment_strategies[action.payload.integrationName];
appToupdate.editModeChanged = true;
ctx.setState({
...stateEditMode,
editApplication: appToupdate,
});
return
}
let url = '/project/' + action.payload.projectKey +
'/application/' + action.payload.applicationName + '/deployment/config/' + action.payload.integrationName;
return this._http.delete<Application>(url)
.pipe(tap((app) => {
const state = ctx.getState();
let applicationUpdated = Object.assign({}, state.application, {
deployment_strategies: app.deployment_strategies
});
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
// ------- VCS strategies --------- //
@Action(ActionApplication.ConnectVcsRepoOnApplication)
connectRepo(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.ConnectVcsRepoOnApplication) {
let repoManager = action.payload.repoManager;
let repoFullname = action.payload.repoFullName;
let url = '/project/' + action.payload.projectKey + '/repositories_manager/' +
repoManager + '/application/' + action.payload.applicationName + '/attach';
let headers = new HttpHeaders();
headers.append('Content-Type', 'application/x-www-form-urlencoded');
let params = new HttpParams();
params = params.append('fullname', repoFullname);
return this._http.post<Application>(url, params.toString(), { headers, params })
.pipe(tap((app) => {
const state = ctx.getState();
let applicationUpdated = Object.assign({}, state.application, {
vcs_server: app.vcs_server,
repository_fullname: app.repository_fullname,
vcs_strategy: app.vcs_strategy
});
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
@Action(ActionApplication.DeleteVcsRepoOnApplication)
deleteRepo(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.DeleteVcsRepoOnApplication) {
let repoManager = action.payload.repoManager;
let url = '/project/' + action.payload.projectKey + '/repositories_manager/' +
repoManager + '/application/' + action.payload.applicationName + '/detach';
return this._http.post<Application>(url, null)
.pipe(tap((app) => {
const state = ctx.getState();
let applicationUpdated = Object.assign({}, state.application, <Application>{
vcs_server: app.vcs_server,
repository_fullname: app.repository_fullname,
vcs_strategy: app.vcs_strategy
});
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}));
}
// ------- Misc --------- //
@Action(ActionApplication.ExternalChangeApplication)
externalChange(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.ExternalChangeApplication) {
const state = ctx.getState();
const applicationUpdated = Object.assign({}, state.application, { externalChange: true });
ctx.setState({
...state,
application: Object.assign({}, state.application, applicationUpdated),
});
}
@Action(ActionApplication.ResyncApplication)
resync(ctx: StateContext<ApplicationStateModel>, action: ActionApplication.ResyncApplication) {
return this._appService.getApplication(action.payload.projectKey, action.payload.applicationName)
.pipe(tap((app) => {
if (app.vcs_strategy) {
app.vcs_strategy.password = '**********';
}
ctx.dispatch(new ActionApplication.LoadApplication(app));
}));
}
@Action(ActionApplication.ClearCacheApplication)
clearCache(ctx: StateContext<ApplicationStateModel>, _: ActionApplication.ClearCacheApplication) {
ctx.setState(getInitialApplicationsState());
}
@Action(ActionApplication.CancelApplicationEdition)
cancelApplicationEdition(ctx: StateContext<ApplicationStateModel>, _: ActionApplication.CancelApplicationEdition) {
const state = ctx.getState();
let editMode = state.editMode;
if (state.application.from_repository) {
editMode = true;
}
let editApplication = cloneDeep(state.application);
ctx.setState({
...state,
editApplication: editApplication,
editMode: editMode,
});
}
}
|
PgBiel/nodeargs
|
types.d.ts
|
<gh_stars>0
declare module "nodeargs" {
export let args: string[];
export let rawArgs: string[];
export let latestParsed: parsedArg[];
export function setArgs(...args: arg[]): void;
export function setOptions(...options: string[]): boolean;
export function parseArgs(): parsedArg[];
interface parsedArg {
[name: string]: any
}
interface arg {
name: string,
description?: string,
type?: argType,
optional?: boolean,
shortcut?: string,
example?: string,
multiple?: boolean,
allowEmpty?: boolean
}
type argType = "string" | "number" | "boolean" | "path" | "array"
}
|
igorilic/portfolio
|
typings/tsd.d.ts
|
<reponame>igorilic/portfolio
/// <reference path="express/express.d.ts" />
/// <reference path="jquery/jquery.d.ts" />
/// <reference path="mime/mime.d.ts" />
/// <reference path="node/node.d.ts" />
/// <reference path="serve-static/serve-static.d.ts" />
/// <reference path="angularjs/angular.d.ts" />
/// <reference path="angular-ui-router/angular-ui-router.d.ts" />
/// <reference path="mocha/mocha.d.ts" />
|
rdeak/dockerize-express
|
src/server.ts
|
<gh_stars>0
import express, {Request, Response} from "express";
const app = express();
app.get("/", (req:Request, res:Response) => {
res.send("Hello world");
});
app.get("/time", (req: Request, res:Response) => {
res.send(`current time is ${new Date()}`);
});
const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
console.log(`App listening to ${PORT}....`);
console.log("Press Ctrl+C to quit.");
});
|
sgtobin/HowMuch
|
ts_js/HowMuch/App.ts
|
window.onload = () => {
var inputNumber: any = document.getElementById('number');
var howmuch: any = document.getElementById('howmuch');
inputNumber.addEventListener('input', () => {
howmuch.innerText = new HowMuch().isThat(inputNumber.value);
});
};
|
sgtobin/HowMuch
|
ts_js/HowMuch/HowMuchShould.ts
|
/// <reference path="scripts/typings/jasmine/jasmine.d.ts" />
/// <reference path="howmuch.ts" />
/// <reference path="digitgroup.ts" />
describe('HowMuchShould', () => {
it('GetNumbersUnder20Correct', () => {
expect(new HowMuch().isThat(0)).toBe("zero");
expect(new HowMuch().isThat(1)).toBe("one");
expect(new HowMuch().isThat(2)).toBe("two");
expect(new HowMuch().isThat(3)).toBe("three");
expect(new HowMuch().isThat(4)).toBe("four");
expect(new HowMuch().isThat(5)).toBe("five");
expect(new HowMuch().isThat(6)).toBe("six");
expect(new HowMuch().isThat(7)).toBe("seven");
expect(new HowMuch().isThat(8)).toBe("eight");
expect(new HowMuch().isThat(9)).toBe("nine");
expect(new HowMuch().isThat(10)).toBe("ten");
expect(new HowMuch().isThat(11)).toBe("eleven");
expect(new HowMuch().isThat(12)).toBe("twelve");
expect(new HowMuch().isThat(13)).toBe("thirteen");
expect(new HowMuch().isThat(14)).toBe("fourteen");
expect(new HowMuch().isThat(15)).toBe("fifteen");
expect(new HowMuch().isThat(16)).toBe("sixteen");
expect(new HowMuch().isThat(17)).toBe("seventeen");
expect(new HowMuch().isThat(18)).toBe("eighteen");
expect(new HowMuch().isThat(19)).toBe("nineteen");
});
it('GetNumbersUnderOneHundredDivisibleBy10Correct', () => {
expect(new HowMuch().isThat(10)).toBe("ten");
expect(new HowMuch().isThat(20)).toBe("twenty");
expect(new HowMuch().isThat(30)).toBe("thirty");
expect(new HowMuch().isThat(40)).toBe("fourty");
expect(new HowMuch().isThat(50)).toBe("fifty");
expect(new HowMuch().isThat(60)).toBe("sixty");
expect(new HowMuch().isThat(70)).toBe("seventy");
expect(new HowMuch().isThat(80)).toBe("eighty");
expect(new HowMuch().isThat(90)).toBe("ninety");
});
it('GetNumbers100AndOver', () => {
expect(new HowMuch().isThat(100)).toBe("one hundred");
expect(new HowMuch().isThat(101)).toBe("one hundred and one");
expect(new HowMuch().isThat(110)).toBe("one hundred and ten");
expect(new HowMuch().isThat(119)).toBe("one hundred and nineteen");
expect(new HowMuch().isThat(120)).toBe("one hundred and twenty");
expect(new HowMuch().isThat(121)).toBe("one hundred and twenty one");
expect(new HowMuch().isThat(200)).toBe("two hundred");
expect(new HowMuch().isThat(999)).toBe("nine hundred and ninety nine");
});
it('GetNumbers1000AndOver', () => {
expect(new HowMuch().isThat(1000)).toBe("one thousand");
expect(new HowMuch().isThat(1001)).toBe("one thousand and one");
expect(new HowMuch().isThat(1000000)).toBe("one million");
expect(new HowMuch().isThat(1000001)).toBe("one million and one");
expect(new HowMuch().isThat(1001001)).toBe("one million, one thousand and one");
expect(new HowMuch().isThat(1000000000)).toBe("one billion");
expect(new HowMuch().isThat(1000000001)).toBe("one billion and one");
expect(new HowMuch().isThat(1001000001)).toBe("one billion, one million and one");
expect(new HowMuch().isThat(1001001001)).toBe("one billion, one million, one thousand and one");
expect(new HowMuch().isThat(1111)).toBe("one thousand, one hundred and eleven");
expect(new HowMuch().isThat(11111)).toBe("eleven thousand, one hundred and eleven");
expect(new HowMuch().isThat(111111)).toBe("one hundred and eleven thousand, one hundred and eleven");
expect(new HowMuch().isThat(1111111)).toBe("one million, one hundred and eleven thousand, one hundred and eleven");
});
it('ReallyBigNumbers', () => {
expect(new HowMuch().isThat(1000000000000)).toBe("one trillion");
expect(new HowMuch().isThat(1000000000001)).toBe("one trillion and one");
expect(new HowMuch().isThat(1000000000000000)).toBe("one quadrillion");
expect(new HowMuch().isThat(1000000000000001)).toBe("one quadrillion and one");
expect(new HowMuch().isThat(1000000000000000000)).toBe("one quintillion");
});
});
|
sgtobin/HowMuch
|
ts_js/HowMuch/HowMuch.ts
|
<filename>ts_js/HowMuch/HowMuch.ts
class HowMuch {
public isThat(number: number): string {
if (number === 0) return "zero";
var digitGroups = DigitGroup.splitIntoDigitGroups(number);
var digitGroupsInWords = this.processDigitGroups(digitGroups);
return this.assembleDigitGroups(digitGroupsInWords);
}
private processDigitGroups(digitGroup: DigitGroup[]): string[] {
var multiples = ["", "thousand", "million", "billion", "trillion", "quadrillion", "quintillion"];
var result: string[] = [];
for (var i = 0; i < digitGroup.length; i++) {
var digitGroupAsWords = digitGroup[i].asWords;
if (this.isNullOrWhiteSpace(digitGroupAsWords)) {
result.push("");
continue;
}
result.push(digitGroupAsWords + " " + multiples[digitGroup.length - (i + 1)]);
}
return result;
}
private isNullOrWhiteSpace(str: string): boolean {
return str === null || str.match(/^ *$/) !== null;
}
public assembleDigitGroups(digitGroupsInWords: string[]): string {
digitGroupsInWords = digitGroupsInWords.filter(e => { return !this.isNullOrWhiteSpace(e); });
if (digitGroupsInWords.length === 1)
return digitGroupsInWords.join("").trim();
if (digitGroupsInWords[digitGroupsInWords.length - 1].indexOf("and") > -1)
return digitGroupsInWords.join(", ").trim();
for (var i = 0; i < digitGroupsInWords.length; i++) {
digitGroupsInWords[i] = i < digitGroupsInWords.length - 2 ? digitGroupsInWords[i] + ", " : digitGroupsInWords[i];
}
digitGroupsInWords.splice(digitGroupsInWords.length - 1, 0, " and ");
return digitGroupsInWords.join("").trim();
}
}
|
sgtobin/HowMuch
|
ts_js/HowMuch/DigitGroup.ts
|
<filename>ts_js/HowMuch/DigitGroup.ts
class DigitGroup {
private digitGroupAsNumber: number;
public get asWords(): string {
return this.processDigitGroup();
}
constructor(private digitGroup: string) {
this.digitGroupAsNumber = Number(digitGroup);
}
private processDigitGroup(): string {
var under20 = ["", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"];
var under100AndDivisibleBy10 = ["ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", "eighty", "ninety"];
if (this.digitGroupAsNumber === 0) return "";
var bits: string[] = [];
if (DigitGroup.asInteger(this.digitGroup, 0, 1) > 0)
bits.push(under20[DigitGroup.asInteger(this.digitGroup, 0, 1)] + " hundred" + (this.digitGroupAsNumber % 100 === 0 ? "" : " and"));
if (DigitGroup.asInteger(this.digitGroup, 1, 1) > 1)
bits.push(under100AndDivisibleBy10[Math.floor(DigitGroup.asInteger(this.digitGroup, 1, 2) / 10) - 1]);
if (DigitGroup.asInteger(this.digitGroup, 1, 2) < 20)
bits.push(under20[DigitGroup.asInteger(this.digitGroup, 1, 2)]);
if (DigitGroup.asInteger(this.digitGroup, 1, 1) > 1)
bits.push(under20[DigitGroup.asInteger(this.digitGroup, 2, 1)]);
return bits.join(" ").trim();
}
public static splitIntoDigitGroups(number: number): DigitGroup[] {
var asString = this.asString(number);
var groups = asString.match(/.{1,3}/g);
var result: DigitGroup[] = [];
for (var i = 0; i < groups.length; i++) {
result.push(new DigitGroup(groups[i]));
}
return result;
}
private static asString(number: number): string {
var snumber = number.toString();
if (snumber.length % 3 > 0) {
snumber = "00".substring(0, 3 - snumber.length % 3) + snumber;
}
return snumber;
}
private static asInteger(number: string, start: number, length: number): number {
return Number(number.substring(start, start + length));
}
}
|
carlosrodrigues94/desafio_07_fundamentos_react_js
|
src/utils/formatValue.ts
|
const formatValue = (value: number): string => {
return Intl.NumberFormat([], {
style: 'currency',
currency: 'BRL',
}).format(value); // TODO
};
export default formatValue;
|
ssttevee/streamsearch
|
testing/fuzz.ts
|
import fs from 'fs';
import path from 'path';
import { ReadableStreamSearch } from '../src';
import { makeStream, cmp, BAD_INPUT_DIR } from './util';
function randomString(min: number, max: number): string {
return Array.from(
{ length: min + Math.floor(Math.random() * (max - min)) },
() => String.fromCharCode(Math.floor(Math.random() * 256)),
).join('');
}
function randomlySplit(input: string): string[] {
const cuts = [...new Set(Array.from(
{ length: Math.floor(Math.random() * input.length) },
() => Math.floor(Math.random() * input.length),
).filter((n) => n > 0))].sort((a, b) => a - b);
if (!cuts.length) {
return [input];
}
const output: string[] = [input.slice(0, cuts[0])];
for (let i = 0; i < cuts.length - 1; i++) {
const a = cuts[i];
const b = cuts[i + 1];
output.push(input.slice(a, b));
}
output.push(input.slice(cuts[cuts.length - 1]));
return output;
}
function randomlySplice(haystack: string, needle: string): string {
const split = randomlySplit(haystack);
return Array.from(
{ length: (split.length * 2) - 1 },
(_, i) => i % 2 === 0 ? split[i / 2] : needle,
).join('');
}
(async function () {
while (true) {
const needle = randomString(1, 1 << 8);
const haystack = randomlySplice(randomString(0, 1 << 8), needle);
const chunks = randomlySplit(haystack);
const expected = haystack.split(needle);
const search = new ReadableStreamSearch(needle, makeStream(chunks));
const result = await search.allStrings();
if (result.length !== expected.length || result.some((v, i) => !cmp(v, expected[i]))) {
fs.mkdirSync(BAD_INPUT_DIR, { recursive: true });
fs.writeFileSync(path.join(BAD_INPUT_DIR, `${Date.now()}.json`), JSON.stringify({ needle, chunks }));
process.stdout.write('!');
} else {
process.stdout.write('.');
}
}
})().catch(console.error);
|
ssttevee/streamsearch
|
testing/util.ts
|
<filename>testing/util.ts
import { stringToArray } from '@ssttevee/u8-utils';
export const BAD_INPUT_DIR = 'erroneous_input';
export function makeStream(strs: string[]): ReadableStream {
let i = 0;
return {
getReader() {
return {
async read() {
if (i < strs.length) {
const s = strs[i++];
return {
done: false,
value: stringToArray(s),
};
} else {
return { done: true };
}
},
releaseLock() { },
}
}
} as any;
}
export function cmp(s1: string, s2: string) {
if (s1.length !== s2.length) {
return false;
}
for (let i = 0; i < s1.length; i++) {
if (s1.charCodeAt(i) !== s2.charCodeAt(i)) {
return false;
}
}
return true;
}
|
ssttevee/streamsearch
|
src/search.ts
|
/*
Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation
by <NAME> at: https://github.com/FooBarWidget/boyer-moore-horspool
*/
import { stringToArray } from '@ssttevee/u8-utils';
type CharFunc = (index: number) => number;
function coerce(a: Uint8Array | CharFunc): CharFunc {
if (a instanceof Uint8Array) {
return (index: number) => a[index];
}
return a;
}
function jsmemcmp(
buf1: Uint8Array | CharFunc,
pos1: number,
buf2: Uint8Array | CharFunc,
pos2: number,
len: number,
) {
const fn1 = coerce(buf1);
const fn2 = coerce(buf2);
for (var i = 0; i < len; ++i) {
if (fn1(pos1 + i) !== fn2(pos2 + i)) {
return false;
}
}
return true;
}
function createOccurenceTable(s: Uint8Array): number[] {
// Populate occurrence table with analysis of the needle,
// ignoring last letter.
const table = new Array(256).fill(s.length);
if (s.length > 1) {
for (let i = 0; i < s.length - 1; i++) {
table[s[i]] = s.length - 1 - i;
}
}
return table;
}
export const MATCH = Symbol('Match');
export type Token = Uint8Array | typeof MATCH;
export class StreamSearch {
private _needle: Uint8Array;
private _lastChar: number;
private _occ: number[];
private _lookbehind = new Uint8Array();
public constructor(needle: Uint8Array | string) {
if (typeof needle === 'string') {
this._needle = needle = stringToArray(needle);
} else {
this._needle = needle;
}
this._lastChar = needle[needle.length - 1];
this._occ = createOccurenceTable(needle);
}
public feed(chunk: Uint8Array): Token[] {
let pos = 0;
let tokens: Token[];
const allTokens: Token[] = [];
while (pos !== chunk.length) {
[pos, ...tokens] = this._feed(chunk, pos);
allTokens.push(...tokens);
}
return allTokens;
}
public end(): Uint8Array {
const tail = this._lookbehind;
this._lookbehind = new Uint8Array();
return tail;
}
private _feed(data: Uint8Array, buf_pos: number): [number, ...Token[]] {
const tokens: Token[] = [];
// Positive: points to a position in `data`
// pos == 3 points to data[3]
// Negative: points to a position in the lookbehind buffer
// pos == -2 points to lookbehind[lookbehind_size - 2]
let pos = -this._lookbehind.length;
if (pos < 0) {
// Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool
// search with character lookup code that considers both the
// lookbehind buffer and the current round's haystack data.
//
// Loop until (condition 1)
// there is a match.
// or until
// we've moved past the position that requires the
// lookbehind buffer. In this case we switch to the
// optimized loop.
// or until (condition 3)
// the character to look at lies outside the haystack.
while (pos < 0 && pos <= data.length - this._needle.length) {
const ch = this._charAt(data, pos + this._needle.length - 1);
if (ch === this._lastChar && this._memcmp(data, pos, this._needle.length - 1)) {
if (pos > -this._lookbehind.length) {
tokens.push(this._lookbehind.slice(0, this._lookbehind.length + pos));
}
tokens.push(MATCH);
this._lookbehind = new Uint8Array();
return [pos + this._needle.length, ...tokens];
} else {
pos += this._occ[ch];
}
}
// No match.
if (pos < 0) {
// There's too little data for Boyer-Moore-Horspool to run,
// so we'll use a different algorithm to skip as much as
// we can.
// Forward pos until
// the trailing part of lookbehind + data
// looks like the beginning of the needle
// or until
// pos == 0
while (pos < 0 && !this._memcmp(data, pos, data.length - pos)) {
pos++;
}
}
if (pos >= 0) {
// Discard lookbehind buffer.
tokens.push(this._lookbehind);
this._lookbehind = new Uint8Array();
} else {
// Cut off part of the lookbehind buffer that has
// been processed and append the entire haystack
// into it.
const bytesToCutOff = this._lookbehind.length + pos;
if (bytesToCutOff > 0) {
// The cut off data is guaranteed not to contain the needle.
tokens.push(this._lookbehind.slice(0, bytesToCutOff));
this._lookbehind = this._lookbehind.slice(bytesToCutOff);
}
this._lookbehind = Uint8Array.from(new Array(this._lookbehind.length + data.length), (_, i) => this._charAt(data, i - this._lookbehind.length));
return [data.length, ...tokens];
}
}
pos += buf_pos;
// Lookbehind buffer is now empty. Perform Boyer-Moore-Horspool
// search with optimized character lookup code that only considers
// the current round's haystack data.
while (pos <= data.length - this._needle.length) {
const ch = data[pos + this._needle.length - 1];
if (ch === this._lastChar
&& data[pos] === this._needle[0]
&& jsmemcmp(this._needle, 0, data, pos, this._needle.length - 1)) {
if (pos > buf_pos) {
tokens.push(data.slice(buf_pos, pos));
}
tokens.push(MATCH);
return [pos + this._needle.length, ...tokens];
} else {
pos += this._occ[ch];
}
}
// There was no match. If there's trailing haystack data that we cannot
// match yet using the Boyer-Moore-Horspool algorithm (because the trailing
// data is less than the needle size) then match using a modified
// algorithm that starts matching from the beginning instead of the end.
// Whatever trailing data is left after running this algorithm is added to
// the lookbehind buffer.
if (pos < data.length) {
while (pos < data.length && (data[pos] !== this._needle[0]
|| !jsmemcmp(data, pos, this._needle, 0, data.length - pos))) {
++pos;
}
if (pos < data.length) {
this._lookbehind = data.slice(pos);
}
}
// Everything until pos is guaranteed not to contain needle data.
if (pos > 0) {
tokens.push(data.slice(buf_pos, pos < data.length ? pos : data.length));
}
return [data.length, ...tokens];
}
private _charAt(data: Uint8Array, pos: number): number {
if (pos < 0) {
return this._lookbehind[this._lookbehind.length + pos];
}
return data[pos];
};
private _memcmp(data: Uint8Array, pos: number, len: number): boolean {
return jsmemcmp(this._charAt.bind(this, data), pos, this._needle, 0, len);
};
}
|
ssttevee/streamsearch
|
src/index.ts
|
import { mergeArrays } from '@ssttevee/u8-utils';
import { StreamSearch, MATCH } from './search';
export function splitChunks(chunks: Uint8Array[], needle: Uint8Array | string): Uint8Array[] {
const search = new StreamSearch(needle);
const outchunks: Uint8Array[][] = [[]];
for (const chunk of chunks) {
for (const token of search.feed(chunk)) {
if (token === MATCH) {
outchunks.push([]);
} else {
outchunks[outchunks.length-1].push(token);
}
}
}
const end = search.end();
outchunks[outchunks.length-1].push(end);
return outchunks.map((chunks) => mergeArrays(...chunks));
}
export function split(buf: Uint8Array, needle: Uint8Array | string): Uint8Array[] {
return splitChunks([buf], needle);
}
export * from './search';
export * from './readable';
|
ssttevee/streamsearch
|
src/readable.test.ts
|
<filename>src/readable.test.ts
import tape from 'tape-promise/tape';
import { makeStream } from '../testing/util';
import { ReadableStreamSearch } from './readable';
import { arrayToString } from '@ssttevee/u8-utils';
tape('readable', async function (t: tape.Test): Promise<void> {
t.test('iterators', async function(t: tape.Test): Promise<void> {
async function testSuite(t: tape.Test, needle: string, payload: string, expected: string[]): Promise<void> {
t.deepEqual(
await new ReadableStreamSearch(needle, makeStream([payload])).allStrings(),
expected,
);
const iter = new ReadableStreamSearch(needle, makeStream([payload])).arrays();
for (let i = 0; i < expected.length; i++) {
const { done, value } = await iter.next();
t.notOk(done);
t.equal(arrayToString(value), expected[i]);
}
const { done, value } = await iter.next();
t.ok(done);
t.notOk(value);
}
await testSuite(t, 'z', '12345z67890', ['12345', '67890']);
await testSuite(t, 'ab', '12a45678a', ['12a45678a']);
t.end();
});
});
|
ssttevee/streamsearch
|
src/index.test.ts
|
import tape from 'tape';
import { split } from './index';
import { stringToArray, arrayToString } from '@ssttevee/u8-utils';
const text = 'hello world foo bar';
tape('split', function(t: tape.Test): void {
t.deepEqual(
split(stringToArray(text), ' ').map(arrayToString),
text.split(' '),
);
t.end();
});
|
ssttevee/streamsearch
|
src/readable.ts
|
import { arrayToString, mergeArrays } from '@ssttevee/u8-utils';
import { StreamSearch, MATCH, Token } from './search';
export class ReadableStreamSearch {
private _search: StreamSearch;
public constructor(needle: Uint8Array | string, private _readableStream: ReadableStream<Uint8Array>) {
this._search = new StreamSearch(needle);
}
public async *chunks(): AsyncIterableIterator<Uint8Array[]> {
let chunks: Uint8Array[] = [];
for await (const value of this) {
if (value === MATCH) {
yield chunks;
chunks = [];
} else {
chunks.push(value);
}
}
yield chunks;
}
public async allStrings(): Promise<string[]> {
const segments: string[] = [];
for await (const value of this.strings()) {
segments.push(value);
}
return segments;
}
public async *strings(): AsyncIterableIterator<string> {
for await (const chunk of this.chunks()) {
yield chunk.map(arrayToString).join('');
}
}
public async *arrays(): AsyncIterableIterator<Uint8Array> {
for await (const chunk of this.chunks()) {
yield mergeArrays(...chunk);
}
}
public async *[Symbol.asyncIterator](): AsyncIterableIterator<Token> {
const reader = this._readableStream.getReader();
try {
while (true) {
const result = await reader.read();
if (result.done) {
break;
}
yield *this._search.feed(result.value);
}
const tail = this._search.end();
if (tail.length) {
yield tail;
}
} finally {
reader.releaseLock();
}
}
}
|
ssttevee/streamsearch
|
src/search.test.ts
|
<filename>src/search.test.ts
import tape from 'tape';
import { arrayToString, stringToArray } from '@ssttevee/u8-utils';
import { StreamSearch, MATCH } from './search';
function test(t: tape.Test, needle: string, chunks: string[], expected: string[], lookbehind: string): void {
const search = new StreamSearch(needle);
const outchunks: Uint8Array[][] = [[]];
for (const chunk of chunks) {
for (const token of search.feed(stringToArray(chunk))) {
if (token === MATCH) {
outchunks.push([]);
} else {
outchunks[outchunks.length-1].push(token);
}
}
}
const end = search.end();
outchunks[outchunks.length-1].push(end);
t.deepEqual(outchunks.map((chunks) => chunks.map(arrayToString).join('')), expected);
t.equal(arrayToString(end), lookbehind);
}
function suite(t: tape.Test, split: (s: string) => string[]): void {
t.test('1 character needle', function (t: tape.Test): void {
t.test('should return the original payload if the needle cannot be found', function (t: tape.Test) {
test(t, '0', split('123456789'), ['123456789'], '');
test(t, 'x', split('hello world'), ['hello world'], '');
t.end();
});
t.test('should return the payload split by the needle', function (t: tape.Test): void {
test(t, '1', split('1234567891'), ['', '23456789', ''], '');
test(t, '2', split('1234567892'), ['1', '3456789', ''], '');
test(t, '8', split('1234567898'), ['1234567', '9', ''], '');
test(t, '9', split('1234567899'), ['12345678', '', ''], '');
t.end();
});
t.end();
});
t.test('2 (different) character needle', function (t: tape.Test): void {
t.test('should return the original payload if the needle cannot be found', function (t: tape.Test): void {
test(t, 'ab', split('123456789'), ['123456789'], '');
test(t, 'ab', split('a23456789'), ['a23456789'], '');
test(t, 'ab', split('1a3456789'), ['1a3456789'], '');
test(t, 'ab', split('1b3456789'), ['1b3456789'], '');
test(t, 'ab', split('123b56789'), ['123b56789'], '');
test(t, 'ab', split('12a456789'), ['12a456789'], '');
test(t, 'ab', split('12a45678a'), ['12a45678a'], 'a');
test(t, 'ab', split('12a45678aa'), ['12a45678aa'], 'a');
test(t, 'ab', split('12a45678x'), ['12a45678x'], '');
test(t, 'ab', split('12a45678b'), ['12a45678b'], '');
t.end();
});
t.test('should return the payload split by the needle', function (t: tape.Test): void {
test(t, 'ab', split('ab3456789ab'), ['', '3456789', ''], '');
test(t, 'ab', split('1ab456789ab'), ['1', '456789', ''], '');
test(t, 'ab', split('12ab56789ab'), ['12', '56789', ''], '');
test(t, 'ab', split('123ab6789ab'), ['123', '6789', ''], '');
test(t, 'ab', split('bbab3456789ab'), ['bb', '3456789', ''], '');
test(t, 'ab', split('bb1ab456789ab'), ['bb1', '456789', ''], '');
test(t, 'ab', split('bb12ab56789ab'), ['bb12', '56789', ''], '');
test(t, 'ab', split('bb123ab6789ab'), ['bb123', '6789', ''], '');
test(t, 'ab', split('baab3456789ab'), ['ba', '3456789', ''], '');
test(t, 'ab', split('ba1ab456789ab'), ['ba1', '456789', ''], '');
test(t, 'ab', split('ba12ab56789ab'), ['ba12', '56789', ''], '');
test(t, 'ab', split('ba123ab6789ab'), ['ba123', '6789', ''], '');
test(t, 'ab', split('003456789ab'), ['003456789', ''], '');
test(t, 'ab', split('100456789aabab'), ['100456789a', '', ''], '');
test(t, 'ab', split('120056789abbab'), ['120056789', 'b', ''], '');
t.end();
});
t.end();
});
t.test('2 (identical) character needle', function (t: tape.Test): void {
t.test('should return the original payload if the needle cannot be found', function (t: tape.Test): void {
test(t, 'aa', split('123456789'), ['123456789'], '');
test(t, 'aa', split('a23456789'), ['a23456789'], '');
test(t, 'aa', split('1a3456789'), ['1a3456789'], '');
test(t, 'aa', split('12a4a6789'), ['12a4a6789'], '');
test(t, 'aa', split('12a45678a'), ['12a45678a'], 'a');
test(t, 'aa', split('12a4a678ba'), ['12a4a678ba'], 'a');
t.end();
});
t.test('should return the payload split by the needle', function (t: tape.Test): void {
test(t, '\n\n', split('\n\nhello world\n\n'), ['', 'hello world', ''], '');
test(t, '\n\n', split('h\n\nello world'), ['h', 'ello world'], '');
test(t, '\n\n', split('he\n\nllo world'), ['he', 'llo world'], '');
test(t, '\n\n', split('hel\n\nlo world'), ['hel', 'lo world'], '');
test(t, '\n\n', split('hello\n\nworld\n\n'), ['hello', 'world', ''], '');
test(t, '\n\n', split('\nhello\n\nworld\n\n'), ['\nhello', 'world', ''], '');
test(t, '\n\n', split('h\nello\n\nworld\n\n'), ['h\nello', 'world', ''], '');
t.end();
});
t.end();
});
t.test('empty payload', function (t: tape.Test): void {
t.test('should return nothing', function (t: tape.Test): void {
test(t, '1', split(''), [''], '');
test(t, 'abc', split(''), [''], '');
test(t, 'hello world', split(''), [''], '');
t.end();
});
t.end();
});
t.test('needles larger than the payload', function (t: tape.Test): void {
t.test('should return the original payload', function (t: tape.Test): void {
test(t, 'ab', split('a'), ['a'], 'a');
test(t, 'hello', split('hm'), ['hm'], '');
test(t, 'hello my world!', split('this is small'), ['this is small'], '');
t.end();
});
t.end();
});
t.test('misc', function (t: tape.Test): void {
t.test('should work', function (t: tape.Test): void {
test(t, 'hello', split('hello world'), ['', ' world'], '');
test(t, 'hello', split('helo world'), ['helo world'], '');
test(t, 'hello world!', split('oh my, hello world'), ['oh my, hello world'], 'hello world');
test(t, 'hello world!', split('oh my, hello world!! again, hello world!!'), ['oh my, ', '! again, ', '!'], '');
test(t, 'abcb', split('ababcb'), ['ab', ''], '');
test(t, '\r\n--boundary\r\n', split('some binary data\r\n--boundary\rnot really\r\nmore binary data\r\n--boundary\r\n'), ['some binary data\r\n--boundary\rnot really\r\nmore binary data', ''], '');
test(t, 'I have control\n', split('[sbmh] inconclusive\nHorspoolTest: .........\nI hive control\nI have control\nx'), ['[sbmh] inconclusive\nHorspoolTest: .........\nI hive control\n', 'x'], '');
test(t, 'aabcde', split('wehrjkaaabcdegrea'), ['wehrjka', 'grea'], 'a');
test(t, 'aab', split('xwehrjkaaabcdegrea'), ['xwehrjka', 'cdegrea'], 'a');
t.end();
});
t.end();
});
}
tape('StreamSearch', function (t: tape.Test): void {
t.test('constructor', function (t: tape.Test): void {
const token = 'hello';
t.test('should work with string', function (t: tape.Test): void {
t.doesNotThrow(() => new StreamSearch(token));
t.end();
});
t.test('should work with Uint8Array', function (t: tape.Test): void {
t.doesNotThrow(() => new StreamSearch(stringToArray(token)));
t.end();
});
});
t.test('feeding all data in one pass', function (t: tape.Test): void {
suite(t, (s: string) => [s]);
t.end();
});
t.test('feeding data byte by byte', function (t: tape.Test): void {
suite(t, (s: string) => s.split(''));
t.end();
});
t.test('feeding data in chunks of 3 bytes', function (t: tape.Test): void {
suite(t, (s: string) => Array.from({ length: Math.ceil(s.length / 3) }, (_, i) => s.substr(i * 3, 3)));
t.end();
});
t.end();
});
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data
|
src/Lib/Vanilla/ResourcePack/entities.ts
|
<gh_stars>0
import { Entity } from '../../Types/ResourcePack/Entity';
export const Entities: Entity[] =
[
{
"id": "minecraft:armor_stand",
"animations": [
"default_pose",
"no_pose",
"solemn_pose",
"athena_pose",
"brandish_pose",
"honor_pose",
"entertain_pose",
"salute_pose",
"riposte_pose",
"zombie_pose",
"cancan_a_pose",
"cancan_b_pose",
"hero_pose",
"wiggle"
]
},
{
"id": "minecraft:arrow",
"animations": [
"move"
]
},
{
"id": "minecraft:axolotl",
"animations": [
"idle_float",
"idle_floor",
"idle_floor_water",
"swim",
"walk_floor",
"walk_floor_water",
"play_dead",
"swim_angle",
"look_at_target"
]
},
{
"id": "minecraft:bat",
"animations": [
"resting",
"flying"
]
},
{
"id": "minecraft:bed",
"animations": []
},
{
"id": "minecraft:bee",
"animations": [
"flying",
"drip",
"controller_bee_sting",
"bee_sting",
"bee_no_stinger",
"bee_fly_bobbing",
"bee_root_controller"
]
},
{
"id": "minecraft:blaze",
"animations": [
"look_at_target",
"move"
]
},
{
"id": "minecraft:boat",
"animations": []
},
{
"id": "minecraft:cat",
"animations": [
"sneak",
"walk",
"sprint",
"sit",
"look_at_target",
"baby_transform",
"lie_down"
]
},
{
"id": "minecraft:cave_spider",
"animations": [
"default_leg_pose",
"look_at_target",
"walk"
]
},
{
"id": "minecraft:chest_minecart",
"animations": [
"move"
]
},
{
"id": "minecraft:chicken",
"animations": [
"move",
"general",
"look_at_target",
"baby_transform"
]
},
{
"id": "minecraft:cod",
"animations": [
"flop",
"swim"
]
},
{
"id": "minecraft:command_block_minecart",
"animations": [
"move"
]
},
{
"id": "minecraft:cow",
"animations": [
"setup",
"walk",
"look_at_target",
"baby_transform"
]
},
{
"id": "minecraft:creeper",
"animations": [
"creeper_head",
"creeper_legs",
"creeper_swelling"
]
},
{
"id": "minecraft:dolphin",
"animations": [
"move"
]
},
{
"id": "minecraft:donkey",
"animations": [
"baby_transform",
"walk",
"eat",
"rear",
"tail",
"look_at_player"
]
},
{
"id": "minecraft:dragon_fireball",
"animations": [
"face_player"
]
},
{
"id": "minecraft:drowned",
"animations": [
"humanoid_big_head",
"humanoid_base_pose",
"look_at_target",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"bob",
"damage_nearby_mobs",
"use_item_progress",
"attack_controller",
"zombie_attack_bare_hand",
"attack_rotations",
"swimming"
]
},
{
"id": "minecraft:egg",
"animations": [
"flying"
]
},
{
"id": "minecraft:elder_guardian",
"animations": [
"setup",
"spikes",
"swim",
"look_at_target",
"move_eye"
]
},
{
"id": "minecraft:ender_crystal",
"animations": [
"move"
]
},
{
"id": "minecraft:ender_dragon",
"animations": [
"setup",
"jaw_movement",
"neck_head_movement",
"wings_limbs_movement",
"tail_movement"
]
},
{
"id": "minecraft:ender_pearl",
"animations": [
"flying"
]
},
{
"id": "minecraft:enderman",
"animations": [
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"attack.rotations",
"bob",
"base_pose",
"arms_legs",
"carrying",
"scary_face"
]
},
{
"id": "minecraft:endermite",
"animations": [
"move"
]
},
{
"id": "minecraft:evocation_fang",
"animations": [
"bite"
]
},
{
"id": "minecraft:evocation_illager",
"animations": [
"general",
"casting",
"look_at_target",
"move"
]
},
{
"id": "minecraft:eye_of_ender_signal",
"animations": [
"flying"
]
},
{
"id": "minecraft:fireball",
"animations": [
"face_player"
]
},
{
"id": "minecraft:fireworks_rocket",
"animations": [
"move"
]
},
{
"id": "minecraft:fishing_hook",
"animations": []
},
{
"id": "minecraft:fox",
"animations": [
"walk",
"look_at_target",
"baby_transform",
"crouch",
"sleep",
"setup",
"sit",
"wiggle",
"stuck",
"pounce",
"move"
]
},
{
"id": "minecraft:ghast",
"animations": [
"move",
"scale"
]
},
{
"id": "minecraft:glow_squid",
"animations": [
"move",
"squid_rotate"
]
},
{
"id": "minecraft:goat",
"animations": [
"walk",
"look_at_target",
"attack",
"ram_attack"
]
},
{
"id": "minecraft:guardian",
"animations": [
"setup",
"spikes",
"swim",
"look_at_target",
"move_eye"
]
},
{
"id": "minecraft:hoglin",
"animations": [
"walk",
"look_at_target",
"attack",
"hoglin_baby_scaling"
]
},
{
"id": "minecraft:hopper_minecart",
"animations": [
"move"
]
},
{
"id": "minecraft:horse",
"animations": [
"baby_transform",
"walk",
"eat",
"rear",
"tail",
"look_at_player"
]
},
{
"id": "minecraft:husk",
"animations": [
"humanoid_big_head",
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"zombie_attack_bare_hand",
"zombie_swimming"
]
},
{
"id": "minecraft:iron_golem",
"animations": [
"walk",
"move",
"walk_to_target",
"move_to_target",
"attack",
"flower",
"look_at_target",
"move_controller",
"arm_controller"
]
},
{
"id": "minecraft:leash_knot",
"animations": []
},
{
"id": "minecraft:lingering_potion",
"animations": [
"flying"
]
},
{
"id": "minecraft:llama",
"animations": [
"setup",
"walk",
"look_at_target",
"baby_transform"
]
},
{
"id": "minecraft:llama_spit",
"animations": [
"setup"
]
},
{
"id": "minecraft:magma_cube",
"animations": [
"move"
]
},
{
"id": "minecraft:minecart",
"animations": [
"move"
]
},
{
"id": "minecraft:mooshroom",
"animations": [
"setup",
"walk",
"look_at_target",
"baby_transform"
]
},
{
"id": "minecraft:mule",
"animations": [
"baby_transform",
"walk",
"eat",
"rear",
"tail",
"look_at_player"
]
},
{
"id": "minecraft:ocelot",
"animations": [
"baby_transform",
"look_at_target",
"setup",
"sit",
"sneak",
"sprint",
"walk"
]
},
{
"id": "minecraft:panda",
"animations": [
"unhappy",
"sneezing",
"walk",
"look_at_target",
"baby_transform",
"sitting",
"rolling",
"lying"
]
},
{
"id": "minecraft:parrot",
"animations": [
"moving",
"base",
"dance",
"sitting",
"flying",
"standing",
"look_at_target"
]
},
{
"id": "minecraft:phantom",
"animations": [
"phantom_base_pose",
"phantom_base_pose_controller",
"move"
]
},
{
"id": "minecraft:pig",
"animations": [
"setup",
"walk",
"look_at_target",
"baby_transform"
]
},
{
"id": "minecraft:piglin",
"animations": [
"move",
"bob",
"humanoid_big_head",
"admire",
"celebrate_hunt",
"celebrate_hunt_special",
"look_at_target_controller",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"piglin_attack_controller",
"crossbow_hold",
"crossbow_charge",
"melee_attack",
"hand_attack",
"riding_controller",
"riding.arms",
"riding.legs"
]
},
{
"id": "minecraft:piglin_brute",
"animations": [
"move",
"bob",
"humanoid_big_head",
"look_at_target_controller",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"piglin_attack_controller",
"crossbow_hold",
"crossbow_charge",
"melee_attack",
"hand_attack",
"riding_controller",
"riding.arms",
"riding.legs"
]
},
{
"id": "minecraft:pillager",
"animations": [
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"attack.rotations",
"bob",
"crossbow_hold",
"crossbow_charge",
"celebrating",
"controller_humanoid_base_pose",
"controller_look_at_target",
"controller_move",
"controller_riding",
"controller_attack",
"controller_bob",
"controller_pillager_attack",
"pillager_root_controller"
]
},
{
"id": "minecraft:player",
"animations": [
"root",
"base_controller",
"hudplayer",
"humanoid_base_pose",
"look_at_target",
"look_at_target_ui",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"look_at_target_inverted",
"cape",
"move.arms",
"move.legs",
"swimming",
"swimming.legs",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"holding_spyglass",
"charging",
"attack.positions",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"use_item_progress",
"skeleton_attack",
"sleeping",
"first_person_base_pose",
"first_person_empty_hand",
"first_person_swap_item",
"first_person_attack_controller",
"first_person_attack_rotation",
"first_person_vr_attack_rotation",
"first_person_walk",
"first_person_map_controller",
"first_person_map_hold",
"first_person_map_hold_attack",
"first_person_map_hold_off_hand",
"first_person_map_hold_main_hand",
"first_person_crossbow_equipped",
"third_person_crossbow_equipped",
"third_person_bow_equipped",
"crossbow_hold",
"crossbow_controller",
"shield_block_main_hand",
"shield_block_off_hand",
"blink"
]
},
{
"id": "minecraft:polar_bear",
"animations": [
"walk",
"move",
"look_at_target",
"baby_transform"
]
},
{
"id": "minecraft:pufferfish",
"animations": [
"flop",
"swim",
"general"
]
},
{
"id": "minecraft:rabbit",
"animations": [
"move",
"baby_transform",
"look_at_target"
]
},
{
"id": "minecraft:ravager",
"animations": [
"walk",
"look_at_target",
"idle_mouth",
"stunned",
"roaring",
"move",
"head",
"biting"
]
},
{
"id": "minecraft:salmon",
"animations": [
"flop",
"swim"
]
},
{
"id": "minecraft:sheep",
"animations": [
"setup",
"grazing",
"walk",
"look_at_target",
"baby_transform",
"move"
]
},
{
"id": "minecraft:shulker",
"animations": [
"facing",
"move",
"look_at_target"
]
},
{
"id": "minecraft:shulker_bullet",
"animations": [
"move"
]
},
{
"id": "minecraft:silverfish",
"animations": [
"move"
]
},
{
"id": "minecraft:skeleton",
"animations": [
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"skeleton_attack"
]
},
{
"id": "minecraft:skeleton_horse",
"animations": [
"baby_transform",
"walk",
"eat",
"rear",
"tail",
"look_at_player"
]
},
{
"id": "minecraft:skull",
"animations": []
},
{
"id": "minecraft:slime",
"animations": []
},
{
"id": "minecraft:small_fireball",
"animations": [
"face_player"
]
},
{
"id": "minecraft:snow_golem",
"animations": [
"move",
"arms",
"look_at_target"
]
},
{
"id": "minecraft:snowball",
"animations": [
"flying"
]
},
{
"id": "minecraft:spider",
"animations": [
"default_leg_pose",
"look_at_target",
"walk"
]
},
{
"id": "minecraft:splash_potion",
"animations": [
"flying"
]
},
{
"id": "minecraft:squid",
"animations": [
"move",
"squid_rotate"
]
},
{
"id": "minecraft:stray",
"animations": [
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"skeleton_attack"
]
},
{
"id": "minecraft:strider",
"animations": [
"look_at_target",
"walk",
"bristle_flow"
]
},
{
"id": "minecraft:thrown_trident",
"animations": []
},
{
"id": "minecraft:tnt_minecart",
"animations": [
"move"
]
},
{
"id": "minecraft:tropicalfish",
"animations": [
"flop",
"swim"
]
},
{
"id": "minecraft:turtle",
"animations": [
"general",
"move",
"ground_move",
"look_at_target"
]
},
{
"id": "minecraft:vex",
"animations": [
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"vex_move"
]
},
{
"id": "minecraft:villager",
"animations": [
"general",
"look_at_target",
"move",
"baby_transform"
]
},
{
"id": "minecraft:villager_v2",
"animations": [
"general",
"look_at_target",
"move",
"raise_arms",
"baby_transform",
"get_in_bed"
]
},
{
"id": "minecraft:vindicator",
"animations": [
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"vindicator_base",
"vindicator_attack",
"vindicator_walk"
]
},
{
"id": "minecraft:wandering_trader",
"animations": [
"general",
"look_at_target",
"raise_arms",
"move"
]
},
{
"id": "minecraft:witch",
"animations": [
"villager_general",
"look_at_target",
"move",
"general"
]
},
{
"id": "minecraft:wither",
"animations": [
"scale",
"move",
"look_at_target"
]
},
{
"id": "minecraft:wither_skeleton",
"animations": [
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"wither_skeleton_attack"
]
},
{
"id": "minecraft:wither_skull",
"animations": [
"move"
]
},
{
"id": "minecraft:wither_skull_dangerous",
"animations": [
"move"
]
},
{
"id": "minecraft:wolf",
"animations": [
"wolf_setup",
"wolf_baby_scaling",
"wolf_look_at",
"wolf_head_rot_z",
"wolf_tail_default",
"wolf_angry",
"wolf_sitting",
"wolf_shaking",
"wolf_leg_default"
]
},
{
"id": "minecraft:xp_bottle",
"animations": [
"flying"
]
},
{
"id": "minecraft:xp_orb",
"animations": [
"face_player"
]
},
{
"id": "minecraft:zoglin",
"animations": [
"walk",
"look_at_target",
"attack",
"hoglin_baby_scaling"
]
},
{
"id": "minecraft:zombie",
"animations": [
"humanoid_big_head",
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"zombie_attack_bare_hand",
"zombie_swimming"
]
},
{
"id": "minecraft:zombie_horse",
"animations": [
"baby_transform",
"walk",
"eat",
"rear",
"tail",
"look_at_player"
]
},
{
"id": "minecraft:zombie_pigman",
"animations": [
"humanoid_big_head",
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"zombie_attack_bare_hand"
]
},
{
"id": "minecraft:zombie_villager",
"animations": [
"humanoid_big_head",
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"swimming",
"use_item_progress",
"zombie_attack_bare_hand"
]
},
{
"id": "minecraft:zombie_villager_v2",
"animations": [
"humanoid_big_head",
"humanoid_base_pose",
"look_at_target_default",
"look_at_target_gliding",
"look_at_target_swimming",
"move",
"riding.arms",
"riding.legs",
"holding",
"brandish_spear",
"charging",
"attack.rotations",
"sneaking",
"bob",
"damage_nearby_mobs",
"bow_and_arrow",
"use_item_progress",
"zombie_attack_bare_hand",
"swimming"
]
}
]
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data
|
src/Lib/Types/BehaviorPack/BehaviorPack.ts
|
<filename>src/Lib/Types/BehaviorPack/BehaviorPack.ts
import { Block } from "./Block";
import { Entity } from "./Entity";
import { Item } from "./Item";
import { LootTable } from "./LootTable";
import { Trading } from "./Trading";
/**The interface that stores vanilla behavior pack data*/
export interface BehaviorPack {
/**The collection of blocks*/
readonly blocks: Block[];
/**The collection of entities*/
readonly entities: Entity[];
/**The collection of items*/
readonly items: Item[];
/**The collection of loot tables*/
readonly loot_tables: LootTable[];
/**The collection of trading*/
readonly trading: Trading[];
}
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data
|
src/Lib/Vanilla/ResourcePack/textures.ts
|
<filename>src/Lib/Vanilla/ResourcePack/textures.ts<gh_stars>0
export const Textures: string[] =
[
"textures/blocks/acacia_trapdoor",
"textures/blocks/amethyst_block",
"textures/blocks/amethyst_cluster",
"textures/blocks/ancient_debris_side",
"textures/blocks/ancient_debris_top",
"textures/blocks/anvil_base",
"textures/blocks/anvil_top_damaged_0",
"textures/blocks/anvil_top_damaged_1",
"textures/blocks/anvil_top_damaged_2",
"textures/blocks/azalea_leaves",
"textures/blocks/azalea_leaves_flowers",
"textures/blocks/azalea_leaves_flowers_opaque",
"textures/blocks/azalea_leaves_opaque",
"textures/blocks/azalea_plant",
"textures/blocks/azalea_side",
"textures/blocks/azalea_top",
"textures/blocks/bamboo_leaf",
"textures/blocks/bamboo_sapling",
"textures/blocks/bamboo_singleleaf",
"textures/blocks/bamboo_small_leaf",
"textures/blocks/bamboo_stem",
"textures/blocks/barrel_bottom",
"textures/blocks/barrel_side",
"textures/blocks/barrel_top",
"textures/blocks/barrel_top_open",
"textures/blocks/barrier",
"textures/blocks/basalt_side",
"textures/blocks/basalt_top",
"textures/blocks/beacon",
"textures/blocks/bed_feet_end",
"textures/blocks/bed_feet_side",
"textures/blocks/bed_feet_top",
"textures/blocks/bed_head_end",
"textures/blocks/bed_head_side",
"textures/blocks/bed_head_top",
"textures/blocks/bedrock",
"textures/blocks/bee_nest_bottom",
"textures/blocks/bee_nest_front",
"textures/blocks/bee_nest_front_honey",
"textures/blocks/bee_nest_side",
"textures/blocks/bee_nest_top",
"textures/blocks/beehive_front",
"textures/blocks/beehive_front_honey",
"textures/blocks/beehive_side",
"textures/blocks/beehive_top",
"textures/blocks/beetroots_stage_0",
"textures/blocks/beetroots_stage_1",
"textures/blocks/beetroots_stage_2",
"textures/blocks/beetroots_stage_3",
"textures/blocks/bell_bottom",
"textures/blocks/bell_side",
"textures/blocks/bell_top",
"textures/blocks/big_dripleaf_side1",
"textures/blocks/big_dripleaf_side2",
"textures/blocks/big_dripleaf_stem",
"textures/blocks/big_dripleaf_top",
"textures/blocks/birch_trapdoor",
"textures/blocks/blackstone",
"textures/blocks/blackstone_top",
"textures/blocks/blast_furnace_front_off",
"textures/blocks/blast_furnace_front_on",
"textures/blocks/blast_furnace_side",
"textures/blocks/blast_furnace_top",
"textures/blocks/blue_ice",
"textures/blocks/bone_block_side",
"textures/blocks/bone_block_top",
"textures/blocks/bookshelf",
"textures/blocks/border",
"textures/blocks/brewing_stand",
"textures/blocks/brewing_stand_base",
"textures/blocks/brick",
"textures/blocks/bubble_column_down_top_a",
"textures/blocks/bubble_column_down_top_b",
"textures/blocks/bubble_column_down_top_c",
"textures/blocks/bubble_column_down_top_d",
"textures/blocks/bubble_column_inner_a",
"textures/blocks/bubble_column_inner_b",
"textures/blocks/bubble_column_outer_a",
"textures/blocks/bubble_column_outer_b",
"textures/blocks/bubble_column_outer_c",
"textures/blocks/bubble_column_outer_d",
"textures/blocks/bubble_column_outer_e",
"textures/blocks/bubble_column_outer_f",
"textures/blocks/bubble_column_outer_g",
"textures/blocks/bubble_column_outer_h",
"textures/blocks/bubble_column_up_top_a",
"textures/blocks/bubble_column_up_top_b",
"textures/blocks/bubble_column_up_top_c",
"textures/blocks/bubble_column_up_top_d",
"textures/blocks/budding_amethyst",
"textures/blocks/build_allow",
"textures/blocks/build_deny",
"textures/blocks/cactus_bottom",
"textures/blocks/cactus_side",
"textures/blocks/cactus_top",
"textures/blocks/cake_bottom",
"textures/blocks/cake_inner",
"textures/blocks/cake_side",
"textures/blocks/cake_top",
"textures/blocks/calcite",
"textures/blocks/camera_back",
"textures/blocks/camera_front",
"textures/blocks/camera_side",
"textures/blocks/camera_top",
"textures/blocks/campfire",
"textures/blocks/campfire_log",
"textures/blocks/campfire_log_lit",
"textures/blocks/candles/black_candle",
"textures/blocks/candles/black_candle_lit",
"textures/blocks/candles/blue_candle",
"textures/blocks/candles/blue_candle_lit",
"textures/blocks/candles/brown_candle",
"textures/blocks/candles/brown_candle_lit",
"textures/blocks/candles/candle",
"textures/blocks/candles/candle_lit",
"textures/blocks/candles/cyan_candle",
"textures/blocks/candles/cyan_candle_lit",
"textures/blocks/candles/gray_candle",
"textures/blocks/candles/gray_candle_lit",
"textures/blocks/candles/green_candle",
"textures/blocks/candles/green_candle_lit",
"textures/blocks/candles/light_blue_candle",
"textures/blocks/candles/light_blue_candle_lit",
"textures/blocks/candles/light_gray_candle",
"textures/blocks/candles/light_gray_candle_lit",
"textures/blocks/candles/lime_candle",
"textures/blocks/candles/lime_candle_lit",
"textures/blocks/candles/magenta_candle",
"textures/blocks/candles/magenta_candle_lit",
"textures/blocks/candles/orange_candle",
"textures/blocks/candles/orange_candle_lit",
"textures/blocks/candles/pink_candle",
"textures/blocks/candles/pink_candle_lit",
"textures/blocks/candles/purple_candle",
"textures/blocks/candles/purple_candle_lit",
"textures/blocks/candles/red_candle",
"textures/blocks/candles/red_candle_lit",
"textures/blocks/candles/white_candle",
"textures/blocks/candles/white_candle_lit",
"textures/blocks/candles/yellow_candle",
"textures/blocks/candles/yellow_candle_lit",
"textures/blocks/carried_waterlily",
"textures/blocks/carrots_stage_0",
"textures/blocks/carrots_stage_1",
"textures/blocks/carrots_stage_2",
"textures/blocks/carrots_stage_3",
"textures/blocks/cartography_table_side1",
"textures/blocks/cartography_table_side2",
"textures/blocks/cartography_table_side3",
"textures/blocks/cartography_table_top",
"textures/blocks/cauldron_bottom",
"textures/blocks/cauldron_inner",
"textures/blocks/cauldron_side",
"textures/blocks/cauldron_top",
"textures/blocks/cauldron_water",
"textures/blocks/cauldron_water_placeholder",
"textures/blocks/cave_vines_body",
"textures/blocks/cave_vines_body_berries",
"textures/blocks/cave_vines_head",
"textures/blocks/cave_vines_head_berries",
"textures/blocks/chain_command_block_back",
"textures/blocks/chain_command_block_back_mipmap",
"textures/blocks/chain_command_block_conditional",
"textures/blocks/chain_command_block_conditional_mipmap",
"textures/blocks/chain_command_block_front",
"textures/blocks/chain_command_block_front_mipmap",
"textures/blocks/chain_command_block_side",
"textures/blocks/chain_command_block_side_mipmap",
"textures/blocks/chain1",
"textures/blocks/chain2",
"textures/blocks/chest_front",
"textures/blocks/chest_side",
"textures/blocks/chest_top",
"textures/blocks/chiseled_nether_bricks",
"textures/blocks/chiseled_polished_blackstone",
"textures/blocks/chorus_flower",
"textures/blocks/chorus_flower_dead",
"textures/blocks/chorus_plant",
"textures/blocks/clay",
"textures/blocks/coal_block",
"textures/blocks/coal_ore",
"textures/blocks/coarse_dirt",
"textures/blocks/cobblestone",
"textures/blocks/cobblestone_mossy",
"textures/blocks/cocoa_stage_0",
"textures/blocks/cocoa_stage_1",
"textures/blocks/cocoa_stage_2",
"textures/blocks/command_block",
"textures/blocks/command_block_back",
"textures/blocks/command_block_back_mipmap",
"textures/blocks/command_block_conditional",
"textures/blocks/command_block_conditional_mipmap",
"textures/blocks/command_block_front",
"textures/blocks/command_block_front_mipmap",
"textures/blocks/command_block_side",
"textures/blocks/command_block_side_mipmap",
"textures/blocks/comparator_off",
"textures/blocks/comparator_on",
"textures/blocks/compost",
"textures/blocks/compost_ready",
"textures/blocks/composter_bottom",
"textures/blocks/composter_side",
"textures/blocks/composter_top",
"textures/blocks/concrete_black",
"textures/blocks/concrete_blue",
"textures/blocks/concrete_brown",
"textures/blocks/concrete_cyan",
"textures/blocks/concrete_gray",
"textures/blocks/concrete_green",
"textures/blocks/concrete_light_blue",
"textures/blocks/concrete_lime",
"textures/blocks/concrete_magenta",
"textures/blocks/concrete_orange",
"textures/blocks/concrete_pink",
"textures/blocks/concrete_powder_black",
"textures/blocks/concrete_powder_blue",
"textures/blocks/concrete_powder_brown",
"textures/blocks/concrete_powder_cyan",
"textures/blocks/concrete_powder_gray",
"textures/blocks/concrete_powder_green",
"textures/blocks/concrete_powder_light_blue",
"textures/blocks/concrete_powder_lime",
"textures/blocks/concrete_powder_magenta",
"textures/blocks/concrete_powder_orange",
"textures/blocks/concrete_powder_pink",
"textures/blocks/concrete_powder_purple",
"textures/blocks/concrete_powder_red",
"textures/blocks/concrete_powder_silver",
"textures/blocks/concrete_powder_white",
"textures/blocks/concrete_powder_yellow",
"textures/blocks/concrete_purple",
"textures/blocks/concrete_red",
"textures/blocks/concrete_silver",
"textures/blocks/concrete_white",
"textures/blocks/concrete_yellow",
"textures/blocks/conduit_base",
"textures/blocks/conduit_cage",
"textures/blocks/conduit_closed",
"textures/blocks/conduit_open",
"textures/blocks/conduit_wind_horizontal",
"textures/blocks/conduit_wind_vertical",
"textures/blocks/copper_block",
"textures/blocks/copper_ore",
"textures/blocks/coral_blue",
"textures/blocks/coral_blue_dead",
"textures/blocks/coral_fan_blue",
"textures/blocks/coral_fan_blue_dead",
"textures/blocks/coral_fan_pink",
"textures/blocks/coral_fan_pink_dead",
"textures/blocks/coral_fan_purple",
"textures/blocks/coral_fan_purple_dead",
"textures/blocks/coral_fan_red",
"textures/blocks/coral_fan_red_dead",
"textures/blocks/coral_fan_yellow",
"textures/blocks/coral_fan_yellow_dead",
"textures/blocks/coral_pink",
"textures/blocks/coral_pink_dead",
"textures/blocks/coral_plant_blue",
"textures/blocks/coral_plant_blue_dead",
"textures/blocks/coral_plant_pink",
"textures/blocks/coral_plant_pink_dead",
"textures/blocks/coral_plant_purple",
"textures/blocks/coral_plant_purple_dead",
"textures/blocks/coral_plant_red",
"textures/blocks/coral_plant_red_dead",
"textures/blocks/coral_plant_yellow",
"textures/blocks/coral_plant_yellow_dead",
"textures/blocks/coral_purple",
"textures/blocks/coral_purple_dead",
"textures/blocks/coral_red",
"textures/blocks/coral_red_dead",
"textures/blocks/coral_yellow",
"textures/blocks/coral_yellow_dead",
"textures/blocks/cracked_nether_bricks",
"textures/blocks/cracked_polished_blackstone_bricks",
"textures/blocks/crafting_table_front",
"textures/blocks/crafting_table_side",
"textures/blocks/crafting_table_top",
"textures/blocks/crimson_fungus",
"textures/blocks/crimson_nylium_side",
"textures/blocks/crimson_nylium_top",
"textures/blocks/crimson_roots",
"textures/blocks/crimson_roots_pot",
"textures/blocks/crying_obsidian",
"textures/blocks/cut_copper",
"textures/blocks/dark_oak_trapdoor",
"textures/blocks/daylight_detector_inverted_top",
"textures/blocks/daylight_detector_side",
"textures/blocks/daylight_detector_top",
"textures/blocks/deadbush",
"textures/blocks/deepslate/chiseled_deepslate",
"textures/blocks/deepslate/cobbled_deepslate",
"textures/blocks/deepslate/cracked_deepslate_bricks",
"textures/blocks/deepslate/cracked_deepslate_tiles",
"textures/blocks/deepslate/deepslate",
"textures/blocks/deepslate/deepslate_bricks",
"textures/blocks/deepslate/deepslate_coal_ore",
"textures/blocks/deepslate/deepslate_copper_ore",
"textures/blocks/deepslate/deepslate_diamond_ore",
"textures/blocks/deepslate/deepslate_emerald_ore",
"textures/blocks/deepslate/deepslate_gold_ore",
"textures/blocks/deepslate/deepslate_iron_ore",
"textures/blocks/deepslate/deepslate_lapis_ore",
"textures/blocks/deepslate/deepslate_redstone_ore",
"textures/blocks/deepslate/deepslate_tiles",
"textures/blocks/deepslate/deepslate_top",
"textures/blocks/deepslate/polished_deepslate",
"textures/blocks/diamond_block",
"textures/blocks/diamond_ore",
"textures/blocks/dirt",
"textures/blocks/dirt_podzol_side",
"textures/blocks/dirt_podzol_top",
"textures/blocks/dirt_with_roots",
"textures/blocks/dispenser_front_horizontal",
"textures/blocks/dispenser_front_vertical",
"textures/blocks/door_acacia_lower",
"textures/blocks/door_acacia_upper",
"textures/blocks/door_birch_lower",
"textures/blocks/door_birch_upper",
"textures/blocks/door_dark_oak_lower",
"textures/blocks/door_dark_oak_upper",
"textures/blocks/door_iron_lower",
"textures/blocks/door_iron_upper",
"textures/blocks/door_jungle_lower",
"textures/blocks/door_jungle_upper",
"textures/blocks/door_spruce_lower",
"textures/blocks/door_spruce_upper",
"textures/blocks/door_wood_lower",
"textures/blocks/door_wood_upper",
"textures/blocks/double_plant_fern_bottom",
"textures/blocks/double_plant_fern_carried",
"textures/blocks/double_plant_fern_top",
"textures/blocks/double_plant_grass_bottom",
"textures/blocks/double_plant_grass_carried",
"textures/blocks/double_plant_grass_top",
"textures/blocks/double_plant_paeonia_bottom",
"textures/blocks/double_plant_paeonia_top",
"textures/blocks/double_plant_rose_bottom",
"textures/blocks/double_plant_rose_top",
"textures/blocks/double_plant_sunflower_back",
"textures/blocks/double_plant_sunflower_bottom",
"textures/blocks/double_plant_sunflower_front",
"textures/blocks/double_plant_sunflower_top",
"textures/blocks/double_plant_syringa_bottom",
"textures/blocks/double_plant_syringa_top",
"textures/blocks/dragon_egg",
"textures/blocks/dried_kelp_side_a",
"textures/blocks/dried_kelp_side_b",
"textures/blocks/dried_kelp_top",
"textures/blocks/dripstone_block",
"textures/blocks/dropper_front_horizontal",
"textures/blocks/dropper_front_vertical",
"textures/blocks/emerald_block",
"textures/blocks/emerald_ore",
"textures/blocks/enchanting_table_bottom",
"textures/blocks/enchanting_table_side",
"textures/blocks/enchanting_table_top",
"textures/blocks/end_bricks",
"textures/blocks/end_gateway",
"textures/blocks/end_portal",
"textures/blocks/end_rod",
"textures/blocks/end_stone",
"textures/blocks/ender_chest_front",
"textures/blocks/ender_chest_side",
"textures/blocks/ender_chest_top",
"textures/blocks/endframe_eye",
"textures/blocks/endframe_side",
"textures/blocks/endframe_top",
"textures/blocks/exposed_copper",
"textures/blocks/exposed_cut_copper",
"textures/blocks/farmland_dry",
"textures/blocks/farmland_wet",
"textures/blocks/fern",
"textures/blocks/fern_carried",
"textures/blocks/fire_0",
"textures/blocks/fire_0_placeholder",
"textures/blocks/fire_1",
"textures/blocks/fire_1_placeholder",
"textures/blocks/fletcher_table_side1",
"textures/blocks/fletcher_table_side2",
"textures/blocks/fletcher_table_top",
"textures/blocks/flower_allium",
"textures/blocks/flower_blue_orchid",
"textures/blocks/flower_cornflower",
"textures/blocks/flower_dandelion",
"textures/blocks/flower_houstonia",
"textures/blocks/flower_lily_of_the_valley",
"textures/blocks/flower_oxeye_daisy",
"textures/blocks/flower_paeonia",
"textures/blocks/flower_pot",
"textures/blocks/flower_rose",
"textures/blocks/flower_rose_blue",
"textures/blocks/flower_tulip_orange",
"textures/blocks/flower_tulip_pink",
"textures/blocks/flower_tulip_red",
"textures/blocks/flower_tulip_white",
"textures/blocks/flower_wither_rose",
"textures/blocks/flowering_azalea_side",
"textures/blocks/flowering_azalea_top",
"textures/blocks/frosted_ice_0",
"textures/blocks/frosted_ice_1",
"textures/blocks/frosted_ice_2",
"textures/blocks/frosted_ice_3",
"textures/blocks/furnace_front_off",
"textures/blocks/furnace_front_on",
"textures/blocks/furnace_side",
"textures/blocks/furnace_top",
"textures/blocks/gilded_blackstone",
"textures/blocks/glass",
"textures/blocks/glass_black",
"textures/blocks/glass_blue",
"textures/blocks/glass_brown",
"textures/blocks/glass_cyan",
"textures/blocks/glass_gray",
"textures/blocks/glass_green",
"textures/blocks/glass_light_blue",
"textures/blocks/glass_lime",
"textures/blocks/glass_magenta",
"textures/blocks/glass_orange",
"textures/blocks/glass_pane_top",
"textures/blocks/glass_pane_top_black",
"textures/blocks/glass_pane_top_blue",
"textures/blocks/glass_pane_top_brown",
"textures/blocks/glass_pane_top_cyan",
"textures/blocks/glass_pane_top_gray",
"textures/blocks/glass_pane_top_green",
"textures/blocks/glass_pane_top_light_blue",
"textures/blocks/glass_pane_top_lime",
"textures/blocks/glass_pane_top_magenta",
"textures/blocks/glass_pane_top_orange",
"textures/blocks/glass_pane_top_pink",
"textures/blocks/glass_pane_top_purple",
"textures/blocks/glass_pane_top_red",
"textures/blocks/glass_pane_top_silver",
"textures/blocks/glass_pane_top_white",
"textures/blocks/glass_pane_top_yellow",
"textures/blocks/glass_pink",
"textures/blocks/glass_purple",
"textures/blocks/glass_red",
"textures/blocks/glass_silver",
"textures/blocks/glass_white",
"textures/blocks/glass_yellow",
"textures/blocks/glazed_terracotta_black",
"textures/blocks/glazed_terracotta_blue",
"textures/blocks/glazed_terracotta_brown",
"textures/blocks/glazed_terracotta_cyan",
"textures/blocks/glazed_terracotta_gray",
"textures/blocks/glazed_terracotta_green",
"textures/blocks/glazed_terracotta_light_blue",
"textures/blocks/glazed_terracotta_lime",
"textures/blocks/glazed_terracotta_magenta",
"textures/blocks/glazed_terracotta_orange",
"textures/blocks/glazed_terracotta_pink",
"textures/blocks/glazed_terracotta_purple",
"textures/blocks/glazed_terracotta_red",
"textures/blocks/glazed_terracotta_silver",
"textures/blocks/glazed_terracotta_white",
"textures/blocks/glazed_terracotta_yellow",
"textures/blocks/glow_item_frame",
"textures/blocks/glow_lichen",
"textures/blocks/glowing_obsidian",
"textures/blocks/glowstone",
"textures/blocks/gold_block",
"textures/blocks/gold_ore",
"textures/blocks/grass_block_snow",
"textures/blocks/grass_carried",
"textures/blocks/grass_path_side",
"textures/blocks/grass_path_top",
"textures/blocks/grass_side",
"textures/blocks/grass_side_carried",
"textures/blocks/grass_side_snowed",
"textures/blocks/grass_top",
"textures/blocks/gravel",
"textures/blocks/grindstone_pivot",
"textures/blocks/grindstone_round",
"textures/blocks/grindstone_side",
"textures/blocks/hanging_roots",
"textures/blocks/hardened_clay",
"textures/blocks/hardened_clay_stained_black",
"textures/blocks/hardened_clay_stained_blue",
"textures/blocks/hardened_clay_stained_brown",
"textures/blocks/hardened_clay_stained_cyan",
"textures/blocks/hardened_clay_stained_gray",
"textures/blocks/hardened_clay_stained_green",
"textures/blocks/hardened_clay_stained_light_blue",
"textures/blocks/hardened_clay_stained_lime",
"textures/blocks/hardened_clay_stained_magenta",
"textures/blocks/hardened_clay_stained_orange",
"textures/blocks/hardened_clay_stained_pink",
"textures/blocks/hardened_clay_stained_purple",
"textures/blocks/hardened_clay_stained_red",
"textures/blocks/hardened_clay_stained_silver",
"textures/blocks/hardened_clay_stained_white",
"textures/blocks/hardened_clay_stained_yellow",
"textures/blocks/hay_block_side",
"textures/blocks/hay_block_top",
"textures/blocks/honey_bottom",
"textures/blocks/honey_side",
"textures/blocks/honey_top",
"textures/blocks/honeycomb",
"textures/blocks/hopper_inside",
"textures/blocks/hopper_outside",
"textures/blocks/hopper_top",
"textures/blocks/huge_fungus/crimson_door_lower",
"textures/blocks/huge_fungus/crimson_door_top",
"textures/blocks/huge_fungus/crimson_log_side",
"textures/blocks/huge_fungus/crimson_log_top",
"textures/blocks/huge_fungus/crimson_planks",
"textures/blocks/huge_fungus/crimson_trapdoor",
"textures/blocks/huge_fungus/stripped_crimson_stem_side",
"textures/blocks/huge_fungus/stripped_crimson_stem_top",
"textures/blocks/huge_fungus/stripped_warped_stem_side",
"textures/blocks/huge_fungus/stripped_warped_stem_top",
"textures/blocks/huge_fungus/warped_door_lower",
"textures/blocks/huge_fungus/warped_door_top",
"textures/blocks/huge_fungus/warped_planks",
"textures/blocks/huge_fungus/warped_stem_side",
"textures/blocks/huge_fungus/warped_stem_top",
"textures/blocks/huge_fungus/warped_trapdoor",
"textures/blocks/ice",
"textures/blocks/ice_packed",
"textures/blocks/iron_bars",
"textures/blocks/iron_block",
"textures/blocks/iron_ore",
"textures/blocks/iron_trapdoor",
"textures/blocks/itemframe_background",
"textures/blocks/jigsaw_back",
"textures/blocks/jigsaw_front",
"textures/blocks/jigsaw_lock",
"textures/blocks/jigsaw_side",
"textures/blocks/jukebox_side",
"textures/blocks/jukebox_top",
"textures/blocks/jungle_trapdoor",
"textures/blocks/kelp_a",
"textures/blocks/kelp_b",
"textures/blocks/kelp_c",
"textures/blocks/kelp_d",
"textures/blocks/kelp_top",
"textures/blocks/kelp_top_bulb",
"textures/blocks/ladder",
"textures/blocks/lantern",
"textures/blocks/lapis_block",
"textures/blocks/lapis_ore",
"textures/blocks/large_amethyst_bud",
"textures/blocks/lava_flow",
"textures/blocks/lava_placeholder",
"textures/blocks/lava_still",
"textures/blocks/leaves_acacia",
"textures/blocks/leaves_acacia_carried",
"textures/blocks/leaves_acacia_opaque",
"textures/blocks/leaves_big_oak",
"textures/blocks/leaves_big_oak_carried",
"textures/blocks/leaves_big_oak_opaque",
"textures/blocks/leaves_birch",
"textures/blocks/leaves_birch_carried",
"textures/blocks/leaves_birch_opaque",
"textures/blocks/leaves_jungle",
"textures/blocks/leaves_jungle_carried",
"textures/blocks/leaves_jungle_opaque",
"textures/blocks/leaves_oak",
"textures/blocks/leaves_oak_carried",
"textures/blocks/leaves_oak_opaque",
"textures/blocks/leaves_spruce",
"textures/blocks/leaves_spruce_carried",
"textures/blocks/leaves_spruce_opaque",
"textures/blocks/lectern_base",
"textures/blocks/lectern_front",
"textures/blocks/lectern_sides",
"textures/blocks/lectern_top",
"textures/blocks/lever",
"textures/blocks/lightning_rod",
"textures/blocks/lodestone_side",
"textures/blocks/lodestone_top",
"textures/blocks/log_acacia",
"textures/blocks/log_acacia_top",
"textures/blocks/log_big_oak",
"textures/blocks/log_big_oak_top",
"textures/blocks/log_birch",
"textures/blocks/log_birch_top",
"textures/blocks/log_jungle",
"textures/blocks/log_jungle_top",
"textures/blocks/log_oak",
"textures/blocks/log_oak_top",
"textures/blocks/log_spruce",
"textures/blocks/log_spruce_top",
"textures/blocks/loom_bottom",
"textures/blocks/loom_front",
"textures/blocks/loom_side",
"textures/blocks/loom_top",
"textures/blocks/magma",
"textures/blocks/medium_amethyst_bud",
"textures/blocks/melon_side",
"textures/blocks/melon_stem_connected",
"textures/blocks/melon_stem_disconnected",
"textures/blocks/melon_top",
"textures/blocks/missing_tile",
"textures/blocks/mob_spawner",
"textures/blocks/moss_block",
"textures/blocks/mushroom_block_inside",
"textures/blocks/mushroom_block_skin_brown",
"textures/blocks/mushroom_block_skin_red",
"textures/blocks/mushroom_block_skin_stem",
"textures/blocks/mushroom_brown",
"textures/blocks/mushroom_red",
"textures/blocks/mycelium_side",
"textures/blocks/mycelium_top",
"textures/blocks/nether_brick",
"textures/blocks/nether_gold_ore",
"textures/blocks/nether_sprouts",
"textures/blocks/nether_wart_block",
"textures/blocks/nether_wart_stage_0",
"textures/blocks/nether_wart_stage_1",
"textures/blocks/nether_wart_stage_2",
"textures/blocks/netherite_block",
"textures/blocks/netherrack",
"textures/blocks/noteblock",
"textures/blocks/observer_back",
"textures/blocks/observer_back_lit",
"textures/blocks/observer_front",
"textures/blocks/observer_side",
"textures/blocks/observer_top",
"textures/blocks/obsidian",
"textures/blocks/oxidized_copper",
"textures/blocks/oxidized_cut_copper",
"textures/blocks/piston_bottom",
"textures/blocks/piston_inner",
"textures/blocks/piston_side",
"textures/blocks/piston_top_normal",
"textures/blocks/piston_top_sticky",
"textures/blocks/planks_acacia",
"textures/blocks/planks_big_oak",
"textures/blocks/planks_birch",
"textures/blocks/planks_jungle",
"textures/blocks/planks_oak",
"textures/blocks/planks_spruce",
"textures/blocks/pointed_dripstone_down_base",
"textures/blocks/pointed_dripstone_down_frustum",
"textures/blocks/pointed_dripstone_down_merge",
"textures/blocks/pointed_dripstone_down_middle",
"textures/blocks/pointed_dripstone_down_tip",
"textures/blocks/pointed_dripstone_up_base",
"textures/blocks/pointed_dripstone_up_frustum",
"textures/blocks/pointed_dripstone_up_merge",
"textures/blocks/pointed_dripstone_up_middle",
"textures/blocks/pointed_dripstone_up_tip",
"textures/blocks/polished_basalt_side",
"textures/blocks/polished_basalt_top",
"textures/blocks/polished_blackstone",
"textures/blocks/polished_blackstone_bricks",
"textures/blocks/portal",
"textures/blocks/portal_placeholder",
"textures/blocks/potatoes_stage_0",
"textures/blocks/potatoes_stage_1",
"textures/blocks/potatoes_stage_2",
"textures/blocks/potatoes_stage_3",
"textures/blocks/potted_azalea_bush_plant",
"textures/blocks/potted_azalea_bush_side",
"textures/blocks/potted_azalea_bush_top",
"textures/blocks/potted_flowering_azalea_bush_plant",
"textures/blocks/potted_flowering_azalea_bush_side",
"textures/blocks/potted_flowering_azalea_bush_top",
"textures/blocks/powder_snow",
"textures/blocks/prismarine_bricks",
"textures/blocks/prismarine_dark",
"textures/blocks/prismarine_rough",
"textures/blocks/pumpkin_face_off",
"textures/blocks/pumpkin_face_on",
"textures/blocks/pumpkin_side",
"textures/blocks/pumpkin_stem_connected",
"textures/blocks/pumpkin_stem_disconnected",
"textures/blocks/pumpkin_top",
"textures/blocks/purpur_block",
"textures/blocks/purpur_pillar",
"textures/blocks/purpur_pillar_top",
"textures/blocks/quartz_block_bottom",
"textures/blocks/quartz_block_chiseled",
"textures/blocks/quartz_block_chiseled_top",
"textures/blocks/quartz_block_lines",
"textures/blocks/quartz_block_lines_top",
"textures/blocks/quartz_block_side",
"textures/blocks/quartz_block_top",
"textures/blocks/quartz_bricks",
"textures/blocks/quartz_ore",
"textures/blocks/rail_activator",
"textures/blocks/rail_activator_powered",
"textures/blocks/rail_detector",
"textures/blocks/rail_detector_powered",
"textures/blocks/rail_golden",
"textures/blocks/rail_golden_powered",
"textures/blocks/rail_normal",
"textures/blocks/rail_normal_turned",
"textures/blocks/raw_copper_block",
"textures/blocks/raw_gold_block",
"textures/blocks/raw_iron_block",
"textures/blocks/reactor_core_stage_0",
"textures/blocks/reactor_core_stage_1",
"textures/blocks/reactor_core_stage_2",
"textures/blocks/red_nether_brick",
"textures/blocks/red_sand",
"textures/blocks/red_sandstone_bottom",
"textures/blocks/red_sandstone_carved",
"textures/blocks/red_sandstone_normal",
"textures/blocks/red_sandstone_smooth",
"textures/blocks/red_sandstone_top",
"textures/blocks/redstone_block",
"textures/blocks/redstone_dust_cross",
"textures/blocks/redstone_dust_line",
"textures/blocks/redstone_lamp_off",
"textures/blocks/redstone_lamp_on",
"textures/blocks/redstone_ore",
"textures/blocks/redstone_torch_off",
"textures/blocks/redstone_torch_on",
"textures/blocks/reeds",
"textures/blocks/repeater_off",
"textures/blocks/repeater_on",
"textures/blocks/repeating_command_block_back",
"textures/blocks/repeating_command_block_back_mipmap",
"textures/blocks/repeating_command_block_conditional",
"textures/blocks/repeating_command_block_conditional_mipmap",
"textures/blocks/repeating_command_block_front",
"textures/blocks/repeating_command_block_front_mipmap",
"textures/blocks/repeating_command_block_side",
"textures/blocks/repeating_command_block_side_mipmap",
"textures/blocks/respawn_anchor_bottom",
"textures/blocks/respawn_anchor_side0",
"textures/blocks/respawn_anchor_side1",
"textures/blocks/respawn_anchor_side2",
"textures/blocks/respawn_anchor_side3",
"textures/blocks/respawn_anchor_side4",
"textures/blocks/respawn_anchor_top",
"textures/blocks/respawn_anchor_top_off",
"textures/blocks/sand",
"textures/blocks/sandstone_bottom",
"textures/blocks/sandstone_carved",
"textures/blocks/sandstone_normal",
"textures/blocks/sandstone_smooth",
"textures/blocks/sandstone_top",
"textures/blocks/sapling_acacia",
"textures/blocks/sapling_birch",
"textures/blocks/sapling_jungle",
"textures/blocks/sapling_oak",
"textures/blocks/sapling_roofed_oak",
"textures/blocks/sapling_spruce",
"textures/blocks/scaffolding_bottom",
"textures/blocks/scaffolding_side",
"textures/blocks/scaffolding_top",
"textures/blocks/sea_lantern",
"textures/blocks/sea_pickle",
"textures/blocks/seagrass",
"textures/blocks/seagrass_carried",
"textures/blocks/seagrass_doubletall_bottom_a",
"textures/blocks/seagrass_doubletall_bottom_b",
"textures/blocks/seagrass_doubletall_top_a",
"textures/blocks/seagrass_doubletall_top_b",
"textures/blocks/shroomlight",
"textures/blocks/shulker_top_black",
"textures/blocks/shulker_top_blue",
"textures/blocks/shulker_top_brown",
"textures/blocks/shulker_top_cyan",
"textures/blocks/shulker_top_gray",
"textures/blocks/shulker_top_green",
"textures/blocks/shulker_top_light_blue",
"textures/blocks/shulker_top_lime",
"textures/blocks/shulker_top_magenta",
"textures/blocks/shulker_top_orange",
"textures/blocks/shulker_top_pink",
"textures/blocks/shulker_top_purple",
"textures/blocks/shulker_top_red",
"textures/blocks/shulker_top_silver",
"textures/blocks/shulker_top_undyed",
"textures/blocks/shulker_top_white",
"textures/blocks/shulker_top_yellow",
"textures/blocks/slime",
"textures/blocks/small_amethyst_bud",
"textures/blocks/small_dripleaf_side",
"textures/blocks/small_dripleaf_stem_bottom",
"textures/blocks/small_dripleaf_stem_top",
"textures/blocks/small_dripleaf_top",
"textures/blocks/smithing_table_bottom",
"textures/blocks/smithing_table_front",
"textures/blocks/smithing_table_side",
"textures/blocks/smithing_table_top",
"textures/blocks/smoker_bottom",
"textures/blocks/smoker_front_off",
"textures/blocks/smoker_front_on",
"textures/blocks/smoker_side",
"textures/blocks/smoker_top",
"textures/blocks/smooth_basalt",
"textures/blocks/snow",
"textures/blocks/soul_campfire",
"textures/blocks/soul_campfire_log_lit",
"textures/blocks/soul_fire_0",
"textures/blocks/soul_fire_1",
"textures/blocks/soul_lantern",
"textures/blocks/soul_sand",
"textures/blocks/soul_soil",
"textures/blocks/soul_torch",
"textures/blocks/sponge",
"textures/blocks/sponge_wet",
"textures/blocks/spore_blossom",
"textures/blocks/spore_blossom_base",
"textures/blocks/spruce_trapdoor",
"textures/blocks/stone",
"textures/blocks/stone_andesite",
"textures/blocks/stone_andesite_smooth",
"textures/blocks/stone_diorite",
"textures/blocks/stone_diorite_smooth",
"textures/blocks/stone_granite",
"textures/blocks/stone_granite_smooth",
"textures/blocks/stone_slab_side",
"textures/blocks/stone_slab_top",
"textures/blocks/stonebrick",
"textures/blocks/stonebrick_carved",
"textures/blocks/stonebrick_cracked",
"textures/blocks/stonebrick_mossy",
"textures/blocks/stonecutter_bottom",
"textures/blocks/stonecutter_other_side",
"textures/blocks/stonecutter_side",
"textures/blocks/stonecutter_top",
"textures/blocks/stonecutter2_bottom",
"textures/blocks/stonecutter2_saw",
"textures/blocks/stonecutter2_side",
"textures/blocks/stonecutter2_top",
"textures/blocks/stripped_acacia_log",
"textures/blocks/stripped_acacia_log_top",
"textures/blocks/stripped_birch_log",
"textures/blocks/stripped_birch_log_top",
"textures/blocks/stripped_dark_oak_log",
"textures/blocks/stripped_dark_oak_log_top",
"textures/blocks/stripped_jungle_log",
"textures/blocks/stripped_jungle_log_top",
"textures/blocks/stripped_oak_log",
"textures/blocks/stripped_oak_log_top",
"textures/blocks/stripped_spruce_log",
"textures/blocks/stripped_spruce_log_top",
"textures/blocks/structure_air",
"textures/blocks/structure_block",
"textures/blocks/structure_block_corner",
"textures/blocks/structure_block_data",
"textures/blocks/structure_block_export",
"textures/blocks/structure_block_load",
"textures/blocks/structure_block_save",
"textures/blocks/structure_void",
"textures/blocks/sweet_berry_bush_stage0",
"textures/blocks/sweet_berry_bush_stage1",
"textures/blocks/sweet_berry_bush_stage2",
"textures/blocks/sweet_berry_bush_stage3",
"textures/blocks/tallgrass",
"textures/blocks/tallgrass_carried",
"textures/blocks/target_side",
"textures/blocks/target_top",
"textures/blocks/tinted_glass",
"textures/blocks/tnt_bottom",
"textures/blocks/tnt_side",
"textures/blocks/tnt_top",
"textures/blocks/torch_on",
"textures/blocks/trapdoor",
"textures/blocks/trapped_chest_front",
"textures/blocks/trip_wire",
"textures/blocks/trip_wire_source",
"textures/blocks/tuff",
"textures/blocks/turtle_egg_not_cracked",
"textures/blocks/turtle_egg_slightly_cracked",
"textures/blocks/turtle_egg_very_cracked",
"textures/blocks/twisting_vines_base",
"textures/blocks/twisting_vines_bottom",
"textures/blocks/vine",
"textures/blocks/vine_carried",
"textures/blocks/warped_fungus",
"textures/blocks/warped_nylium_side",
"textures/blocks/warped_nylium_top",
"textures/blocks/warped_roots",
"textures/blocks/warped_roots_pot",
"textures/blocks/warped_wart_block",
"textures/blocks/water_flow",
"textures/blocks/water_flow_grey",
"textures/blocks/water_placeholder",
"textures/blocks/water_still",
"textures/blocks/water_still_grey",
"textures/blocks/waterlily",
"textures/blocks/weathered_copper",
"textures/blocks/weathered_cut_copper",
"textures/blocks/web",
"textures/blocks/weeping_vines",
"textures/blocks/weeping_vines_base",
"textures/blocks/weeping_vines_bottom",
"textures/blocks/weeping_vines_plant",
"textures/blocks/wheat_stage_0",
"textures/blocks/wheat_stage_1",
"textures/blocks/wheat_stage_2",
"textures/blocks/wheat_stage_3",
"textures/blocks/wheat_stage_4",
"textures/blocks/wheat_stage_5",
"textures/blocks/wheat_stage_6",
"textures/blocks/wheat_stage_7",
"textures/blocks/wool_colored_black",
"textures/blocks/wool_colored_blue",
"textures/blocks/wool_colored_brown",
"textures/blocks/wool_colored_cyan",
"textures/blocks/wool_colored_gray",
"textures/blocks/wool_colored_green",
"textures/blocks/wool_colored_light_blue",
"textures/blocks/wool_colored_lime",
"textures/blocks/wool_colored_magenta",
"textures/blocks/wool_colored_orange",
"textures/blocks/wool_colored_pink",
"textures/blocks/wool_colored_purple",
"textures/blocks/wool_colored_red",
"textures/blocks/wool_colored_silver",
"textures/blocks/wool_colored_white",
"textures/blocks/wool_colored_yellow",
"textures/colormap/birch",
"textures/colormap/evergreen",
"textures/colormap/foliage",
"textures/colormap/grass",
"textures/colormap/swamp_foliage",
"textures/colormap/swamp_grass",
"textures/entity/agent",
"textures/entity/alex",
"textures/entity/armor_stand",
"textures/entity/arrows",
"textures/entity/axolotl/axolotl_blue",
"textures/entity/axolotl/axolotl_cyan",
"textures/entity/axolotl/axolotl_gold",
"textures/entity/axolotl/axolotl_lucy",
"textures/entity/axolotl/axolotl_wild",
"textures/entity/banner/banner",
"textures/entity/banner/banner_base",
"textures/entity/banner/banner_border",
"textures/entity/banner/banner_bricks",
"textures/entity/banner/banner_circle",
"textures/entity/banner/banner_creeper",
"textures/entity/banner/banner_cross",
"textures/entity/banner/banner_curly_border",
"textures/entity/banner/banner_diagonal_left",
"textures/entity/banner/banner_diagonal_right",
"textures/entity/banner/banner_diagonal_up_left",
"textures/entity/banner/banner_diagonal_up_right",
"textures/entity/banner/banner_flower",
"textures/entity/banner/banner_gradient",
"textures/entity/banner/banner_gradient_up",
"textures/entity/banner/banner_half_horizontal",
"textures/entity/banner/banner_half_horizontal_bottom",
"textures/entity/banner/banner_half_vertical",
"textures/entity/banner/banner_half_vertical_right",
"textures/entity/banner/banner_illager",
"textures/entity/banner/banner_mojang",
"textures/entity/banner/banner_pattern_illager",
"textures/entity/banner/banner_piglin",
"textures/entity/banner/banner_rhombus",
"textures/entity/banner/banner_skull",
"textures/entity/banner/banner_small_stripes",
"textures/entity/banner/banner_square_bottom_left",
"textures/entity/banner/banner_square_bottom_right",
"textures/entity/banner/banner_square_top_left",
"textures/entity/banner/banner_square_top_right",
"textures/entity/banner/banner_straight_cross",
"textures/entity/banner/banner_stripe_bottom",
"textures/entity/banner/banner_stripe_center",
"textures/entity/banner/banner_stripe_downleft",
"textures/entity/banner/banner_stripe_downright",
"textures/entity/banner/banner_stripe_left",
"textures/entity/banner/banner_stripe_middle",
"textures/entity/banner/banner_stripe_right",
"textures/entity/banner/banner_stripe_top",
"textures/entity/banner/banner_triangle_bottom",
"textures/entity/banner/banner_triangle_top",
"textures/entity/banner/banner_triangles_bottom",
"textures/entity/banner/banner_triangles_top",
"textures/entity/bat",
"textures/entity/beacon_beam",
"textures/entity/bed/black",
"textures/entity/bed/blue",
"textures/entity/bed/brown",
"textures/entity/bed/cyan",
"textures/entity/bed/gray",
"textures/entity/bed/green",
"textures/entity/bed/light_blue",
"textures/entity/bed/lime",
"textures/entity/bed/magenta",
"textures/entity/bed/orange",
"textures/entity/bed/pink",
"textures/entity/bed/purple",
"textures/entity/bed/red",
"textures/entity/bed/silver",
"textures/entity/bed/white",
"textures/entity/bed/yellow",
"textures/entity/bee/bee",
"textures/entity/bee/bee_angry",
"textures/entity/bee/bee_angry_nectar",
"textures/entity/bee/bee_nectar",
"textures/entity/bell/bell",
"textures/entity/blaze",
"textures/entity/boat/boat_acacia",
"textures/entity/boat/boat_birch",
"textures/entity/boat/boat_darkoak",
"textures/entity/boat/boat_jungle",
"textures/entity/boat/boat_oak",
"textures/entity/boat/boat_spruce",
"textures/entity/camera_tripod",
"textures/entity/cape_invisible",
"textures/entity/cat/allblackcat",
"textures/entity/cat/allblackcat_tame",
"textures/entity/cat/blackcat",
"textures/entity/cat/britishshorthair",
"textures/entity/cat/britishshorthair_tame",
"textures/entity/cat/calico",
"textures/entity/cat/calico_tame",
"textures/entity/cat/graytabby_tame",
"textures/entity/cat/jellie",
"textures/entity/cat/jellie_tame",
"textures/entity/cat/ocelot",
"textures/entity/cat/ocelot_tame",
"textures/entity/cat/persian",
"textures/entity/cat/persian_tame",
"textures/entity/cat/ragdoll",
"textures/entity/cat/ragdoll_tame",
"textures/entity/cat/red",
"textures/entity/cat/redtabby",
"textures/entity/cat/redtabby_tame",
"textures/entity/cat/siamese",
"textures/entity/cat/siamesecat",
"textures/entity/cat/siamesecat_tame",
"textures/entity/cat/tabby",
"textures/entity/cat/tabby_tame",
"textures/entity/cat/tuxedo",
"textures/entity/cat/tuxedo_tame",
"textures/entity/cat/white",
"textures/entity/cat/white_tame",
"textures/entity/char",
"textures/entity/chest/double_normal",
"textures/entity/chest/ender",
"textures/entity/chest/normal",
"textures/entity/chest/trapped",
"textures/entity/chest/trapped_double",
"textures/entity/chicken",
"textures/entity/cow/brown_mooshroom",
"textures/entity/cow/cow",
"textures/entity/cow/mooshroom",
"textures/entity/creeper/creeper",
"textures/entity/creeper/creeper_armor",
"textures/entity/dolphin",
"textures/entity/dragon/dragon",
"textures/entity/dragon/dragon_exploding",
"textures/entity/dragon/dragon_eyes",
"textures/entity/dummy",
"textures/entity/enchanting_table_book",
"textures/entity/enchanting_table_book_shadow",
"textures/entity/end_portal",
"textures/entity/endercrystal/endercrystal",
"textures/entity/endercrystal/endercrystal_beam",
"textures/entity/enderman/enderman",
"textures/entity/endermite",
"textures/entity/experience_orb",
"textures/entity/fireworks",
"textures/entity/fish/clownfish",
"textures/entity/fish/cod",
"textures/entity/fish/fish",
"textures/entity/fish/pufferfish",
"textures/entity/fish/salmon",
"textures/entity/fish/tropical_a",
"textures/entity/fish/tropical_a_pattern_1",
"textures/entity/fish/tropical_a_pattern_2",
"textures/entity/fish/tropical_a_pattern_3",
"textures/entity/fish/tropical_a_pattern_4",
"textures/entity/fish/tropical_a_pattern_5",
"textures/entity/fish/tropical_a_pattern_6",
"textures/entity/fish/tropical_b",
"textures/entity/fish/tropical_b_pattern_1",
"textures/entity/fish/tropical_b_pattern_2",
"textures/entity/fish/tropical_b_pattern_3",
"textures/entity/fish/tropical_b_pattern_4",
"textures/entity/fish/tropical_b_pattern_5",
"textures/entity/fish/tropical_b_pattern_6",
"textures/entity/fishhook",
"textures/entity/fox/arctic_fox",
"textures/entity/fox/fox",
"textures/entity/ghast/ghast",
"textures/entity/ghast/ghast_shooting",
"textures/entity/glow_squid/glow_squid",
"textures/entity/goat/goat",
"textures/entity/guardian",
"textures/entity/guardian_beam",
"textures/entity/guardian_elder",
"textures/entity/hoglin/hoglin",
"textures/entity/horse/armor/horse_armor_diamond",
"textures/entity/horse/armor/horse_armor_gold",
"textures/entity/horse/armor/horse_armor_iron",
"textures/entity/horse/armor/horse_armor_leather",
"textures/entity/horse/armor/horse_armor_none",
"textures/entity/horse/donkey",
"textures/entity/horse/horse_black",
"textures/entity/horse/horse_brown",
"textures/entity/horse/horse_chestnut",
"textures/entity/horse/horse_creamy",
"textures/entity/horse/horse_darkbrown",
"textures/entity/horse/horse_gray",
"textures/entity/horse/horse_markings_blackdots",
"textures/entity/horse/horse_markings_none",
"textures/entity/horse/horse_markings_white",
"textures/entity/horse/horse_markings_whitedots",
"textures/entity/horse/horse_markings_whitefield",
"textures/entity/horse/horse_skeleton",
"textures/entity/horse/horse_white",
"textures/entity/horse/horse_zombie",
"textures/entity/horse/mule",
"textures/entity/horse2/armor/horse_armor_diamond",
"textures/entity/horse2/armor/horse_armor_gold",
"textures/entity/horse2/armor/horse_armor_iron",
"textures/entity/horse2/armor/horse_armor_leather",
"textures/entity/horse2/armor/horse_armor_none",
"textures/entity/horse2/donkey",
"textures/entity/horse2/horse_black",
"textures/entity/horse2/horse_brown",
"textures/entity/horse2/horse_chestnut",
"textures/entity/horse2/horse_creamy",
"textures/entity/horse2/horse_darkbrown",
"textures/entity/horse2/horse_gray",
"textures/entity/horse2/horse_markings_blackdots",
"textures/entity/horse2/horse_markings_none",
"textures/entity/horse2/horse_markings_white",
"textures/entity/horse2/horse_markings_whitedots",
"textures/entity/horse2/horse_markings_whitefield",
"textures/entity/horse2/horse_skeleton",
"textures/entity/horse2/horse_white",
"textures/entity/horse2/horse_zombie",
"textures/entity/horse2/mule",
"textures/entity/illager/evoker",
"textures/entity/illager/fangs",
"textures/entity/illager/ravager",
"textures/entity/iron_golem",
"textures/entity/lead_knot",
"textures/entity/lead_rope",
"textures/entity/llama/decor/decor_black",
"textures/entity/llama/decor/decor_blue",
"textures/entity/llama/decor/decor_brown",
"textures/entity/llama/decor/decor_cyan",
"textures/entity/llama/decor/decor_gray",
"textures/entity/llama/decor/decor_green",
"textures/entity/llama/decor/decor_light_blue",
"textures/entity/llama/decor/decor_lime",
"textures/entity/llama/decor/decor_magenta",
"textures/entity/llama/decor/decor_none",
"textures/entity/llama/decor/decor_orange",
"textures/entity/llama/decor/decor_pink",
"textures/entity/llama/decor/decor_purple",
"textures/entity/llama/decor/decor_red",
"textures/entity/llama/decor/decor_silver",
"textures/entity/llama/decor/decor_white",
"textures/entity/llama/decor/decor_yellow",
"textures/entity/llama/decor/trader_llama_decor",
"textures/entity/llama/llama",
"textures/entity/llama/llama_brown",
"textures/entity/llama/llama_creamy",
"textures/entity/llama/llama_gray",
"textures/entity/llama/llama_white",
"textures/entity/llama/spit",
"textures/entity/loyalty_rope",
"textures/entity/minecart",
"textures/entity/npc/npc_1",
"textures/entity/npc/npc_10",
"textures/entity/npc/npc_2",
"textures/entity/npc/npc_3",
"textures/entity/npc/npc_4",
"textures/entity/npc/npc_5",
"textures/entity/npc/npc_6",
"textures/entity/npc/npc_7",
"textures/entity/npc/npc_8",
"textures/entity/npc/npc_9",
"textures/entity/npc/npc_scientist_1",
"textures/entity/npc/npc_scientist_10",
"textures/entity/npc/npc_scientist_2",
"textures/entity/npc/npc_scientist_3",
"textures/entity/npc/npc_scientist_4",
"textures/entity/npc/npc_scientist_5",
"textures/entity/npc/npc_scientist_6",
"textures/entity/npc/npc_scientist_7",
"textures/entity/npc/npc_scientist_8",
"textures/entity/npc/npc_scientist_9",
"textures/entity/panda/panda",
"textures/entity/panda/panda_aggressive",
"textures/entity/panda/panda_brown",
"textures/entity/panda/panda_lazy",
"textures/entity/panda/panda_playful",
"textures/entity/panda/panda_sneezy",
"textures/entity/panda/panda_worried",
"textures/entity/parrot/parrot_blue",
"textures/entity/parrot/parrot_green",
"textures/entity/parrot/parrot_grey",
"textures/entity/parrot/parrot_red_blue",
"textures/entity/parrot/parrot_yellow_blue",
"textures/entity/phantom",
"textures/entity/pig/pig",
"textures/entity/pig/pig_saddle",
"textures/entity/pig/pigzombie",
"textures/entity/piglin/piglin",
"textures/entity/piglin/piglin_brute",
"textures/entity/piglin/zombie_piglin",
"textures/entity/pillager",
"textures/entity/pistonarm/pistonArm",
"textures/entity/pistonarm/pistonArmSticky",
"textures/entity/polarbear",
"textures/entity/rabbit/blackrabbit",
"textures/entity/rabbit/brown",
"textures/entity/rabbit/gold",
"textures/entity/rabbit/salt",
"textures/entity/rabbit/toast",
"textures/entity/rabbit/white",
"textures/entity/rabbit/white_splotched",
"textures/entity/saddle",
"textures/entity/sea_turtle",
"textures/entity/sheep/sheep",
"textures/entity/shield",
"textures/entity/shulker/shulker_black",
"textures/entity/shulker/shulker_blue",
"textures/entity/shulker/shulker_brown",
"textures/entity/shulker/shulker_cyan",
"textures/entity/shulker/shulker_gray",
"textures/entity/shulker/shulker_green",
"textures/entity/shulker/shulker_light_blue",
"textures/entity/shulker/shulker_lime",
"textures/entity/shulker/shulker_magenta",
"textures/entity/shulker/shulker_orange",
"textures/entity/shulker/shulker_pink",
"textures/entity/shulker/shulker_purple",
"textures/entity/shulker/shulker_red",
"textures/entity/shulker/shulker_silver",
"textures/entity/shulker/shulker_undyed",
"textures/entity/shulker/shulker_white",
"textures/entity/shulker/shulker_yellow",
"textures/entity/shulker/spark",
"textures/entity/sign",
"textures/entity/sign_acacia",
"textures/entity/sign_birch",
"textures/entity/sign_crimson",
"textures/entity/sign_darkoak",
"textures/entity/sign_jungle",
"textures/entity/sign_spruce",
"textures/entity/sign_warped",
"textures/entity/silverfish",
"textures/entity/skeleton/skeleton",
"textures/entity/skeleton/stray",
"textures/entity/skeleton/stray_overlay",
"textures/entity/skeleton/wither_skeleton",
"textures/entity/skulls/creeper",
"textures/entity/skulls/skeleton",
"textures/entity/skulls/wither_skeleton",
"textures/entity/skulls/zombie",
"textures/entity/slime/magmacube",
"textures/entity/slime/slime",
"textures/entity/snow_golem",
"textures/entity/spider/cave_spider",
"textures/entity/spider/spider",
"textures/entity/spyglass",
"textures/entity/squid",
"textures/entity/steve",
"textures/entity/strider/strider",
"textures/entity/strider/strider_saddled",
"textures/entity/strider/strider_suffocated",
"textures/entity/strider/strider_suffocated_saddled",
"textures/entity/trident",
"textures/entity/trident_riptide",
"textures/entity/vex/vex",
"textures/entity/vex/vex_charging",
"textures/entity/villager/butcher",
"textures/entity/villager/farmer",
"textures/entity/villager/librarian",
"textures/entity/villager/priest",
"textures/entity/villager/smith",
"textures/entity/villager/villager",
"textures/entity/villager2/biomes/biome_desert",
"textures/entity/villager2/biomes/biome_jungle",
"textures/entity/villager2/biomes/biome_plains",
"textures/entity/villager2/biomes/biome_savanna",
"textures/entity/villager2/biomes/biome_snow",
"textures/entity/villager2/biomes/biome_swamp",
"textures/entity/villager2/biomes/biome_taiga",
"textures/entity/villager2/levels/level_diamond",
"textures/entity/villager2/levels/level_emerald",
"textures/entity/villager2/levels/level_gold",
"textures/entity/villager2/levels/level_iron",
"textures/entity/villager2/levels/level_stone",
"textures/entity/villager2/professions/armorer",
"textures/entity/villager2/professions/butcher",
"textures/entity/villager2/professions/cartographer",
"textures/entity/villager2/professions/cleric",
"textures/entity/villager2/professions/farmer",
"textures/entity/villager2/professions/fisherman",
"textures/entity/villager2/professions/fletcher",
"textures/entity/villager2/professions/leatherworker",
"textures/entity/villager2/professions/librarian",
"textures/entity/villager2/professions/nitwit",
"textures/entity/villager2/professions/shepherd",
"textures/entity/villager2/professions/stonemason",
"textures/entity/villager2/professions/toolsmith",
"textures/entity/villager2/professions/unskilled",
"textures/entity/villager2/professions/weaponsmith",
"textures/entity/villager2/villager",
"textures/entity/vindicator",
"textures/entity/wandering_trader",
"textures/entity/witch",
"textures/entity/wither_boss/wither",
"textures/entity/wither_boss/wither_armor_blue",
"textures/entity/wither_boss/wither_armor_white",
"textures/entity/wither_boss/wither_invulnerable",
"textures/entity/wolf/wolf",
"textures/entity/wolf/wolf_angry",
"textures/entity/wolf/wolf_tame",
"textures/entity/zoglin/zoglin",
"textures/entity/zombie/drowned",
"textures/entity/zombie/husk",
"textures/entity/zombie/zombie",
"textures/entity/zombie_villager/zombie_butcher",
"textures/entity/zombie_villager/zombie_farmer",
"textures/entity/zombie_villager/zombie_librarian",
"textures/entity/zombie_villager/zombie_priest",
"textures/entity/zombie_villager/zombie_smith",
"textures/entity/zombie_villager/zombie_villager",
"textures/entity/zombie_villager2/biomes/biome-desert-zombie",
"textures/entity/zombie_villager2/biomes/biome-jungle-zombie",
"textures/entity/zombie_villager2/biomes/biome-plains-zombie",
"textures/entity/zombie_villager2/biomes/biome-savanna-zombie",
"textures/entity/zombie_villager2/biomes/biome-snow-zombie",
"textures/entity/zombie_villager2/biomes/biome-swamp-zombie",
"textures/entity/zombie_villager2/biomes/biome-taiga-zombie",
"textures/entity/zombie_villager2/professions/armorer",
"textures/entity/zombie_villager2/professions/butcher",
"textures/entity/zombie_villager2/professions/cartographer",
"textures/entity/zombie_villager2/professions/cleric",
"textures/entity/zombie_villager2/professions/farmer",
"textures/entity/zombie_villager2/professions/fisherman",
"textures/entity/zombie_villager2/professions/fletcher",
"textures/entity/zombie_villager2/professions/leatherworker",
"textures/entity/zombie_villager2/professions/librarian",
"textures/entity/zombie_villager2/professions/nitwit",
"textures/entity/zombie_villager2/professions/shepherd",
"textures/entity/zombie_villager2/professions/stonemason",
"textures/entity/zombie_villager2/professions/toolsmith",
"textures/entity/zombie_villager2/professions/weaponsmith",
"textures/entity/zombie_villager2/zombie-villager",
"textures/environment/clouds",
"textures/environment/destroy_stage_0",
"textures/environment/destroy_stage_1",
"textures/environment/destroy_stage_2",
"textures/environment/destroy_stage_3",
"textures/environment/destroy_stage_4",
"textures/environment/destroy_stage_5",
"textures/environment/destroy_stage_6",
"textures/environment/destroy_stage_7",
"textures/environment/destroy_stage_8",
"textures/environment/destroy_stage_9",
"textures/environment/end_portal_colors",
"textures/environment/end_sky",
"textures/environment/moon_phases",
"textures/environment/sun",
"textures/environment/weather",
"textures/flame_atlas",
"textures/forcefield_atlas",
"textures/gui/achievements/fillalpha",
"textures/gui/achievements/g",
"textures/gui/achievements/hotdogempty",
"textures/gui/achievements/hotdogfull",
"textures/gui/achievements/lock",
"textures/gui/achievements/mainbanners",
"textures/gui/achievements/nub",
"textures/gui/achievements/scrollhandle",
"textures/gui/achievements/scrollrail",
"textures/gui/enchanting_table",
"textures/gui/gui",
"textures/gui/gui2",
"textures/gui/icons",
"textures/gui/newgui/anvil-arrow",
"textures/gui/newgui/anvil-crossout",
"textures/gui/newgui/anvil-hammer",
"textures/gui/newgui/arrow_large",
"textures/gui/newgui/arrowLeft",
"textures/gui/newgui/auto_save",
"textures/gui/newgui/Bundle/PaintBrush",
"textures/gui/newgui/buttonNew",
"textures/gui/newgui/buttons/border/base",
"textures/gui/newgui/buttons/border/basePress",
"textures/gui/newgui/buttons/border/hover",
"textures/gui/newgui/buttons/border/hoverPress",
"textures/gui/newgui/buttons/borderless/dark",
"textures/gui/newgui/buttons/borderless/darkhover",
"textures/gui/newgui/buttons/borderless/darkpressed",
"textures/gui/newgui/buttons/borderless/darkpressednohover",
"textures/gui/newgui/buttons/borderless/imagelesshoverbg",
"textures/gui/newgui/buttons/borderless/light",
"textures/gui/newgui/buttons/borderless/lighthover",
"textures/gui/newgui/buttons/borderless/lightpressed",
"textures/gui/newgui/buttons/borderless/lightpressednohover",
"textures/gui/newgui/buttons/checkbox/Check",
"textures/gui/newgui/buttons/checkbox/checkbox_checked",
"textures/gui/newgui/buttons/checkbox/checkbox_checked_disabled",
"textures/gui/newgui/buttons/checkbox/checkbox_checked_hover",
"textures/gui/newgui/buttons/checkbox/checkbox_checked_WhiteBorder",
"textures/gui/newgui/buttons/checkbox/checkbox_checked_WhiteBorder_disabled",
"textures/gui/newgui/buttons/checkbox/checkbox_filled",
"textures/gui/newgui/buttons/checkbox/checkbox_filled_WhiteBorder",
"textures/gui/newgui/buttons/checkbox/checkbox_filled_WhiteBorder_disabled",
"textures/gui/newgui/buttons/checkbox/checkbox_unchecked",
"textures/gui/newgui/buttons/checkbox/checkbox_unchecked_disabled",
"textures/gui/newgui/buttons/checkbox/checkbox_unchecked_hover",
"textures/gui/newgui/buttons/checkbox/checkbox_unchecked_WhiteBorder",
"textures/gui/newgui/buttons/checkbox/checkbox_unchecked_WhiteBorder_disabled",
"textures/gui/newgui/buttons/checkbox/checkboxFilled",
"textures/gui/newgui/buttons/checkbox/checkboxFilled_hover",
"textures/gui/newgui/buttons/checkbox/checkboxFilledWhiteBorder",
"textures/gui/newgui/buttons/checkbox/checkboxFilledYellow_WhiteBorder",
"textures/gui/newgui/buttons/checkbox/checkboxUnFilled_hover",
"textures/gui/newgui/buttons/checkbox/checkboxUnFilled_WhiteBorder",
"textures/gui/newgui/buttons/new_checkbox/check",
"textures/gui/newgui/buttons/new_checkbox/checkDisabled",
"textures/gui/newgui/buttons/new_checkbox/checkHover",
"textures/gui/newgui/buttons/new_checkbox/space",
"textures/gui/newgui/buttons/new_checkbox/spaceDisabled",
"textures/gui/newgui/buttons/new_checkbox/spaceHover",
"textures/gui/newgui/ButtonWithBorder",
"textures/gui/newgui/ButtonWithBorderHover",
"textures/gui/newgui/ButtonWithBorderPressed",
"textures/gui/newgui/ButtonWithBorderPressedNoHover",
"textures/gui/newgui/check1",
"textures/gui/newgui/check2",
"textures/gui/newgui/clouds",
"textures/gui/newgui/DarkButtonNoStroke",
"textures/gui/newgui/DarkButtonStroke",
"textures/gui/newgui/DarkButtonThin",
"textures/gui/newgui/dialog-background-atlas",
"textures/gui/newgui/Dot1",
"textures/gui/newgui/Dot2",
"textures/gui/newgui/Dot3",
"textures/gui/newgui/double_side_transparent",
"textures/gui/newgui/DownArrow",
"textures/gui/newgui/EventBars",
"textures/gui/newgui/focusBorder",
"textures/gui/newgui/Friends",
"textures/gui/newgui/GreenBG",
"textures/gui/newgui/Indent",
"textures/gui/newgui/Language16",
"textures/gui/newgui/Language18",
"textures/gui/newgui/LeftArrow",
"textures/gui/newgui/LeftTabFront",
"textures/gui/newgui/Local",
"textures/gui/newgui/MainBanners",
"textures/gui/newgui/MiddleTabFront",
"textures/gui/newgui/mob_effects/bad_omen_effect",
"textures/gui/newgui/mob_effects/blindness_effect",
"textures/gui/newgui/mob_effects/fire_resistance_effect",
"textures/gui/newgui/mob_effects/haste_effect",
"textures/gui/newgui/mob_effects/hunger_effect",
"textures/gui/newgui/mob_effects/invisibility_effect",
"textures/gui/newgui/mob_effects/jump_boost_effect",
"textures/gui/newgui/mob_effects/levitation_effect",
"textures/gui/newgui/mob_effects/mining_fatigue_effect",
"textures/gui/newgui/mob_effects/nausea_effect",
"textures/gui/newgui/mob_effects/night_vision_effect",
"textures/gui/newgui/mob_effects/poison_effect",
"textures/gui/newgui/mob_effects/regeneration_effect",
"textures/gui/newgui/mob_effects/resistance_effect",
"textures/gui/newgui/mob_effects/slowness_effect",
"textures/gui/newgui/mob_effects/speed_effect",
"textures/gui/newgui/mob_effects/strength_effect",
"textures/gui/newgui/mob_effects/village_hero_effect",
"textures/gui/newgui/mob_effects/water_breathing_effect",
"textures/gui/newgui/mob_effects/weakness_effect",
"textures/gui/newgui/mob_effects/wither_effect",
"textures/gui/newgui/offlineLight",
"textures/gui/newgui/play_screen/DarkButtonThinStroke1",
"textures/gui/newgui/play_screen/HoverButtonThinNewBevel",
"textures/gui/newgui/play_screen/HoverButtonThinNewBevel2",
"textures/gui/newgui/play_screen/HoverButtonThinNewBevel3",
"textures/gui/newgui/play_screen/HoverButtonThinNewBevel4",
"textures/gui/newgui/play_screen/HoverButtonThinStroke",
"textures/gui/newgui/play_screen/Indent2",
"textures/gui/newgui/play_screen/LeftTabFront",
"textures/gui/newgui/play_screen/MiddleTabFront",
"textures/gui/newgui/play_screen/NormalButtonThinNewBevel",
"textures/gui/newgui/play_screen/PressedButtonThinStroke",
"textures/gui/newgui/play_screen/RightTabFront",
"textures/gui/newgui/play_screen/TabBackDarker",
"textures/gui/newgui/play_screen/TabFront",
"textures/gui/newgui/portfolio/grey_button_default",
"textures/gui/newgui/portfolio/grey_button_hover",
"textures/gui/newgui/portfolio/grey_button_pressed",
"textures/gui/newgui/Propeller2",
"textures/gui/newgui/Realms",
"textures/gui/newgui/realms_toggle_off",
"textures/gui/newgui/realms_toggle_on",
"textures/gui/newgui/RealmsArt",
"textures/gui/newgui/RightArrow",
"textures/gui/newgui/RightTabFront",
"textures/gui/newgui/ScrollGutter",
"textures/gui/newgui/settings/glyph_atlas",
"textures/gui/newgui/settings/glyph_color_atlas",
"textures/gui/newgui/settings/radio_checked",
"textures/gui/newgui/settings/radio_checked_hover",
"textures/gui/newgui/settings/radio_off",
"textures/gui/newgui/settings/radio_off_hover",
"textures/gui/newgui/share",
"textures/gui/newgui/TabBack",
"textures/gui/newgui/TabBackInGame",
"textures/gui/newgui/TabBackInGameLeftMost",
"textures/gui/newgui/TabFront",
"textures/gui/newgui/TabFrontInGame",
"textures/gui/newgui/TabFrontInGameLeftMost",
"textures/gui/newgui/TopBar",
"textures/gui/newgui/trash",
"textures/gui/newgui/undo",
"textures/gui/newgui/UpArrow",
"textures/gui/newgui/viewCollapsed",
"textures/gui/newgui/viewExpanded",
"textures/gui/newgui/WhiteBorder",
"textures/gui/newgui/Wrenches2",
"textures/gui/newgui/X",
"textures/gui/newgui/XHover",
"textures/gui/newgui/XPress",
"textures/gui/newgui/yellowStrikethru",
"textures/gui/spritesheet",
"textures/gui/spritesheet2",
"textures/gui/touchgui",
"textures/gui/touchgui2",
"textures/items/amethyst_shard",
"textures/items/apple",
"textures/items/apple_golden",
"textures/items/armor_stand",
"textures/items/arrow",
"textures/items/bamboo",
"textures/items/banner_pattern",
"textures/items/bed_black",
"textures/items/bed_blue",
"textures/items/bed_brown",
"textures/items/bed_cyan",
"textures/items/bed_gray",
"textures/items/bed_green",
"textures/items/bed_light_blue",
"textures/items/bed_lime",
"textures/items/bed_magenta",
"textures/items/bed_orange",
"textures/items/bed_pink",
"textures/items/bed_purple",
"textures/items/bed_red",
"textures/items/bed_silver",
"textures/items/bed_white",
"textures/items/bed_yellow",
"textures/items/beef_cooked",
"textures/items/beef_raw",
"textures/items/beetroot",
"textures/items/beetroot_soup",
"textures/items/blaze_powder",
"textures/items/blaze_rod",
"textures/items/boat",
"textures/items/boat_acacia",
"textures/items/boat_birch",
"textures/items/boat_darkoak",
"textures/items/boat_jungle",
"textures/items/boat_oak",
"textures/items/boat_spruce",
"textures/items/bone",
"textures/items/book_enchanted",
"textures/items/book_normal",
"textures/items/book_portfolio",
"textures/items/book_writable",
"textures/items/book_written",
"textures/items/bow_pulling_0",
"textures/items/bow_pulling_1",
"textures/items/bow_pulling_2",
"textures/items/bow_standby",
"textures/items/bowl",
"textures/items/bread",
"textures/items/brewing_stand",
"textures/items/brick",
"textures/items/broken_elytra",
"textures/items/bucket_axolotl",
"textures/items/bucket_cod",
"textures/items/bucket_empty",
"textures/items/bucket_lava",
"textures/items/bucket_milk",
"textures/items/bucket_powder_snow",
"textures/items/bucket_pufferfish",
"textures/items/bucket_salmon",
"textures/items/bucket_tropical",
"textures/items/bucket_water",
"textures/items/cake",
"textures/items/campfire",
"textures/items/candles/black_candle",
"textures/items/candles/blue_candle",
"textures/items/candles/brown_candle",
"textures/items/candles/candle",
"textures/items/candles/cyan_candle",
"textures/items/candles/gray_candle",
"textures/items/candles/green_candle",
"textures/items/candles/light_blue_candle",
"textures/items/candles/light_gray_candle",
"textures/items/candles/lime_candle",
"textures/items/candles/magenta_candle",
"textures/items/candles/orange_candle",
"textures/items/candles/pink_candle",
"textures/items/candles/purple_candle",
"textures/items/candles/red_candle",
"textures/items/candles/white_candle",
"textures/items/candles/yellow_candle",
"textures/items/carrot",
"textures/items/carrot_golden",
"textures/items/carrot_on_a_stick",
"textures/items/cauldron",
"textures/items/chain",
"textures/items/chainmail_boots",
"textures/items/chainmail_chestplate",
"textures/items/chainmail_helmet",
"textures/items/chainmail_leggings",
"textures/items/chalkboard_large",
"textures/items/chalkboard_medium",
"textures/items/chalkboard_small",
"textures/items/charcoal",
"textures/items/chicken_cooked",
"textures/items/chicken_raw",
"textures/items/chorus_fruit",
"textures/items/chorus_fruit_popped",
"textures/items/clay_ball",
"textures/items/clock_item",
"textures/items/coal",
"textures/items/comparator",
"textures/items/compass_atlas",
"textures/items/compass_item",
"textures/items/cookie",
"textures/items/copper_ingot",
"textures/items/crimson_door",
"textures/items/crossbow_arrow",
"textures/items/crossbow_firework",
"textures/items/crossbow_pulling_0",
"textures/items/crossbow_pulling_1",
"textures/items/crossbow_pulling_2",
"textures/items/crossbow_standby",
"textures/items/diamond",
"textures/items/diamond_axe",
"textures/items/diamond_boots",
"textures/items/diamond_chestplate",
"textures/items/diamond_helmet",
"textures/items/diamond_hoe",
"textures/items/diamond_horse_armor",
"textures/items/diamond_leggings",
"textures/items/diamond_pickaxe",
"textures/items/diamond_shovel",
"textures/items/diamond_sword",
"textures/items/door_acacia",
"textures/items/door_birch",
"textures/items/door_dark_oak",
"textures/items/door_iron",
"textures/items/door_jungle",
"textures/items/door_spruce",
"textures/items/door_wood",
"textures/items/dragon_fireball",
"textures/items/dragons_breath",
"textures/items/dried_kelp",
"textures/items/dye_powder_black",
"textures/items/dye_powder_black_new",
"textures/items/dye_powder_blue",
"textures/items/dye_powder_blue_new",
"textures/items/dye_powder_brown",
"textures/items/dye_powder_brown_new",
"textures/items/dye_powder_cyan",
"textures/items/dye_powder_glow",
"textures/items/dye_powder_gray",
"textures/items/dye_powder_green",
"textures/items/dye_powder_light_blue",
"textures/items/dye_powder_lime",
"textures/items/dye_powder_magenta",
"textures/items/dye_powder_orange",
"textures/items/dye_powder_pink",
"textures/items/dye_powder_purple",
"textures/items/dye_powder_red",
"textures/items/dye_powder_silver",
"textures/items/dye_powder_white",
"textures/items/dye_powder_white_new",
"textures/items/dye_powder_yellow",
"textures/items/egg",
"textures/items/egg_agent",
"textures/items/egg_bat",
"textures/items/egg_bee",
"textures/items/egg_blaze",
"textures/items/egg_cat",
"textures/items/egg_cave_spider",
"textures/items/egg_chicken",
"textures/items/egg_clownfish",
"textures/items/egg_cod",
"textures/items/egg_cow",
"textures/items/egg_creeper",
"textures/items/egg_dolphin",
"textures/items/egg_donkey",
"textures/items/egg_drowned",
"textures/items/egg_elderguardian",
"textures/items/egg_enderman",
"textures/items/egg_endermite",
"textures/items/egg_evoker",
"textures/items/egg_fish",
"textures/items/egg_fox",
"textures/items/egg_ghast",
"textures/items/egg_glow_squid",
"textures/items/egg_guardian",
"textures/items/egg_horse",
"textures/items/egg_husk",
"textures/items/egg_lava_slime",
"textures/items/egg_llama",
"textures/items/egg_mask",
"textures/items/egg_mule",
"textures/items/egg_mushroomcow",
"textures/items/egg_npc",
"textures/items/egg_null",
"textures/items/egg_ocelot",
"textures/items/egg_panda",
"textures/items/egg_parrot",
"textures/items/egg_phantom",
"textures/items/egg_pig",
"textures/items/egg_pigzombie",
"textures/items/egg_pillager",
"textures/items/egg_polarbear",
"textures/items/egg_pufferfish",
"textures/items/egg_rabbit",
"textures/items/egg_ravager",
"textures/items/egg_salmon",
"textures/items/egg_sheep",
"textures/items/egg_shulker",
"textures/items/egg_silverfish",
"textures/items/egg_skeleton",
"textures/items/egg_skeletonhorse",
"textures/items/egg_slime",
"textures/items/egg_spider",
"textures/items/egg_squid",
"textures/items/egg_stray",
"textures/items/egg_turtle",
"textures/items/egg_vex",
"textures/items/egg_villager",
"textures/items/egg_vindicator",
"textures/items/egg_wanderingtrader",
"textures/items/egg_witch",
"textures/items/egg_wither",
"textures/items/egg_wolf",
"textures/items/egg_zombie",
"textures/items/egg_zombiehorse",
"textures/items/egg_zombievillager",
"textures/items/elytra",
"textures/items/emerald",
"textures/items/empty_armor_slot_boots",
"textures/items/empty_armor_slot_chestplate",
"textures/items/empty_armor_slot_helmet",
"textures/items/empty_armor_slot_leggings",
"textures/items/empty_armor_slot_shield",
"textures/items/end_crystal",
"textures/items/ender_eye",
"textures/items/ender_pearl",
"textures/items/experience_bottle",
"textures/items/feather",
"textures/items/fireball",
"textures/items/fireworks",
"textures/items/fireworks_charge",
"textures/items/fish_clownfish_raw",
"textures/items/fish_cooked",
"textures/items/fish_pufferfish_raw",
"textures/items/fish_raw",
"textures/items/fish_salmon_cooked",
"textures/items/fish_salmon_raw",
"textures/items/fishing_rod_cast",
"textures/items/fishing_rod_uncast",
"textures/items/flint",
"textures/items/flint_and_steel",
"textures/items/flower_pot",
"textures/items/ghast_tear",
"textures/items/glow_berries",
"textures/items/glow_item_frame",
"textures/items/glowstone_dust",
"textures/items/gold_axe",
"textures/items/gold_boots",
"textures/items/gold_chestplate",
"textures/items/gold_helmet",
"textures/items/gold_hoe",
"textures/items/gold_horse_armor",
"textures/items/gold_ingot",
"textures/items/gold_leggings",
"textures/items/gold_nugget",
"textures/items/gold_pickaxe",
"textures/items/gold_shovel",
"textures/items/gold_sword",
"textures/items/gunpowder",
"textures/items/hanging_roots",
"textures/items/heartofthesea_closed",
"textures/items/hoglin_meat_cooked",
"textures/items/hoglin_meat_raw",
"textures/items/honey_bottle",
"textures/items/honeycomb",
"textures/items/hopper",
"textures/items/iron_axe",
"textures/items/iron_boots",
"textures/items/iron_chestplate",
"textures/items/iron_helmet",
"textures/items/iron_hoe",
"textures/items/iron_horse_armor",
"textures/items/iron_ingot",
"textures/items/iron_leggings",
"textures/items/iron_nugget",
"textures/items/iron_pickaxe",
"textures/items/iron_shovel",
"textures/items/iron_sword",
"textures/items/item_frame",
"textures/items/kelp",
"textures/items/lantern",
"textures/items/lead",
"textures/items/leather",
"textures/items/leather_boots",
"textures/items/leather_chestplate",
"textures/items/leather_helmet",
"textures/items/leather_horse_armor",
"textures/items/leather_leggings",
"textures/items/lever",
"textures/items/light_block_0",
"textures/items/light_block_1",
"textures/items/light_block_10",
"textures/items/light_block_11",
"textures/items/light_block_12",
"textures/items/light_block_13",
"textures/items/light_block_14",
"textures/items/light_block_15",
"textures/items/light_block_2",
"textures/items/light_block_3",
"textures/items/light_block_4",
"textures/items/light_block_5",
"textures/items/light_block_6",
"textures/items/light_block_7",
"textures/items/light_block_8",
"textures/items/light_block_9",
"textures/items/lodestonecompass_atlas",
"textures/items/lodestonecompass_item",
"textures/items/magma_cream",
"textures/items/map_empty",
"textures/items/map_filled",
"textures/items/map_locked",
"textures/items/map_mansion",
"textures/items/map_monument",
"textures/items/map_nautilus",
"textures/items/melon",
"textures/items/melon_speckled",
"textures/items/minecart_chest",
"textures/items/minecart_command_block",
"textures/items/minecart_furnace",
"textures/items/minecart_hopper",
"textures/items/minecart_normal",
"textures/items/minecart_tnt",
"textures/items/mushroom_stew",
"textures/items/mutton_cooked",
"textures/items/mutton_raw",
"textures/items/name_tag",
"textures/items/nautilus",
"textures/items/nether_sprouts",
"textures/items/nether_star",
"textures/items/nether_wart",
"textures/items/netherbrick",
"textures/items/netherite_axe",
"textures/items/netherite_boots",
"textures/items/netherite_chestplate",
"textures/items/netherite_helmet",
"textures/items/netherite_hoe",
"textures/items/netherite_ingot",
"textures/items/netherite_leggings",
"textures/items/netherite_pickaxe",
"textures/items/netherite_scrap",
"textures/items/netherite_shovel",
"textures/items/netherite_sword",
"textures/items/painting",
"textures/items/paper",
"textures/items/phantom_membrane",
"textures/items/porkchop_cooked",
"textures/items/porkchop_raw",
"textures/items/potato",
"textures/items/potato_baked",
"textures/items/potato_poisonous",
"textures/items/potion_bottle_absorption",
"textures/items/potion_bottle_blindness",
"textures/items/potion_bottle_confusion",
"textures/items/potion_bottle_damageBoost",
"textures/items/potion_bottle_digSlowdown",
"textures/items/potion_bottle_digSpeed",
"textures/items/potion_bottle_drinkable",
"textures/items/potion_bottle_empty",
"textures/items/potion_bottle_fireResistance",
"textures/items/potion_bottle_harm",
"textures/items/potion_bottle_heal",
"textures/items/potion_bottle_healthBoost",
"textures/items/potion_bottle_hunger",
"textures/items/potion_bottle_invisibility",
"textures/items/potion_bottle_jump",
"textures/items/potion_bottle_levitation",
"textures/items/potion_bottle_lingering",
"textures/items/potion_bottle_lingering_damageBoost",
"textures/items/potion_bottle_lingering_empty",
"textures/items/potion_bottle_lingering_fireResistance",
"textures/items/potion_bottle_lingering_harm",
"textures/items/potion_bottle_lingering_heal",
"textures/items/potion_bottle_lingering_invisibility",
"textures/items/potion_bottle_lingering_jump",
"textures/items/potion_bottle_lingering_luck",
"textures/items/potion_bottle_lingering_moveSlowdown",
"textures/items/potion_bottle_lingering_moveSpeed",
"textures/items/potion_bottle_lingering_nightVision",
"textures/items/potion_bottle_lingering_poison",
"textures/items/potion_bottle_lingering_regeneration",
"textures/items/potion_bottle_lingering_slowFall",
"textures/items/potion_bottle_lingering_turtleMaster",
"textures/items/potion_bottle_lingering_waterBreathing",
"textures/items/potion_bottle_lingering_weakness",
"textures/items/potion_bottle_lingering_wither",
"textures/items/potion_bottle_moveSlowdown",
"textures/items/potion_bottle_moveSpeed",
"textures/items/potion_bottle_nightVision",
"textures/items/potion_bottle_poison",
"textures/items/potion_bottle_regeneration",
"textures/items/potion_bottle_resistance",
"textures/items/potion_bottle_saturation",
"textures/items/potion_bottle_slowFall",
"textures/items/potion_bottle_splash",
"textures/items/potion_bottle_splash_absorption",
"textures/items/potion_bottle_splash_blindness",
"textures/items/potion_bottle_splash_confusion",
"textures/items/potion_bottle_splash_damageBoost",
"textures/items/potion_bottle_splash_digSlowdown",
"textures/items/potion_bottle_splash_digSpeed",
"textures/items/potion_bottle_splash_fireResistance",
"textures/items/potion_bottle_splash_harm",
"textures/items/potion_bottle_splash_heal",
"textures/items/potion_bottle_splash_healthBoost",
"textures/items/potion_bottle_splash_hunger",
"textures/items/potion_bottle_splash_invisibility",
"textures/items/potion_bottle_splash_jump",
"textures/items/potion_bottle_splash_levitation",
"textures/items/potion_bottle_splash_moveSlowdown",
"textures/items/potion_bottle_splash_moveSpeed",
"textures/items/potion_bottle_splash_nightVision",
"textures/items/potion_bottle_splash_poison",
"textures/items/potion_bottle_splash_regeneration",
"textures/items/potion_bottle_splash_resistance",
"textures/items/potion_bottle_splash_saturation",
"textures/items/potion_bottle_splash_slowFall",
"textures/items/potion_bottle_splash_turtleMaster",
"textures/items/potion_bottle_splash_waterBreathing",
"textures/items/potion_bottle_splash_weakness",
"textures/items/potion_bottle_splash_wither",
"textures/items/potion_bottle_turtleMaster",
"textures/items/potion_bottle_waterBreathing",
"textures/items/potion_bottle_weakness",
"textures/items/potion_bottle_wither",
"textures/items/potion_overlay",
"textures/items/prismarine_crystals",
"textures/items/prismarine_shard",
"textures/items/pumpkin_pie",
"textures/items/quartz",
"textures/items/quiver",
"textures/items/rabbit_cooked",
"textures/items/rabbit_foot",
"textures/items/rabbit_hide",
"textures/items/rabbit_raw",
"textures/items/rabbit_stew",
"textures/items/raw_copper",
"textures/items/raw_gold",
"textures/items/raw_iron",
"textures/items/record_11",
"textures/items/record_13",
"textures/items/record_blocks",
"textures/items/record_cat",
"textures/items/record_chirp",
"textures/items/record_far",
"textures/items/record_mall",
"textures/items/record_mellohi",
"textures/items/record_otherside",
"textures/items/record_pigstep",
"textures/items/record_stal",
"textures/items/record_strad",
"textures/items/record_wait",
"textures/items/record_ward",
"textures/items/redstone_dust",
"textures/items/reeds",
"textures/items/repeater",
"textures/items/rotten_flesh",
"textures/items/ruby",
"textures/items/saddle",
"textures/items/sea_pickle",
"textures/items/seeds_beetroot",
"textures/items/seeds_melon",
"textures/items/seeds_pumpkin",
"textures/items/seeds_wheat",
"textures/items/shears",
"textures/items/shulker_shell",
"textures/items/sign",
"textures/items/sign_acacia",
"textures/items/sign_birch",
"textures/items/sign_crimson",
"textures/items/sign_darkoak",
"textures/items/sign_jungle",
"textures/items/sign_spruce",
"textures/items/sign_warped",
"textures/items/slimeball",
"textures/items/snowball",
"textures/items/soul_campfire",
"textures/items/soul_lantern",
"textures/items/spawn_egg",
"textures/items/spawn_egg_overlay",
"textures/items/spider_eye",
"textures/items/spider_eye_fermented",
"textures/items/spyglass",
"textures/items/stick",
"textures/items/stone_axe",
"textures/items/stone_hoe",
"textures/items/stone_pickaxe",
"textures/items/stone_shovel",
"textures/items/stone_sword",
"textures/items/string",
"textures/items/sugar",
"textures/items/suspicious_stew",
"textures/items/sweet_berries",
"textures/items/tipped_arrow",
"textures/items/tipped_arrow_base",
"textures/items/tipped_arrow_fireres",
"textures/items/tipped_arrow_harm",
"textures/items/tipped_arrow_head",
"textures/items/tipped_arrow_healing",
"textures/items/tipped_arrow_invisibility",
"textures/items/tipped_arrow_leaping",
"textures/items/tipped_arrow_luck",
"textures/items/tipped_arrow_nightvision",
"textures/items/tipped_arrow_poison",
"textures/items/tipped_arrow_regen",
"textures/items/tipped_arrow_slow",
"textures/items/tipped_arrow_slowfalling",
"textures/items/tipped_arrow_strength",
"textures/items/tipped_arrow_swift",
"textures/items/tipped_arrow_turtlemaster",
"textures/items/tipped_arrow_waterbreathing",
"textures/items/tipped_arrow_weakness",
"textures/items/tipped_arrow_wither",
"textures/items/totem",
"textures/items/trident",
"textures/items/turtle_egg",
"textures/items/turtle_helmet",
"textures/items/turtle_shell_piece",
"textures/items/villagebell",
"textures/items/warped_door",
"textures/items/warped_fungus_on_a_stick",
"textures/items/watch_atlas",
"textures/items/wheat",
"textures/items/wood_axe",
"textures/items/wood_hoe",
"textures/items/wood_pickaxe",
"textures/items/wood_shovel",
"textures/items/wood_sword",
"textures/map/map_background",
"textures/map/map_icons",
"textures/map/player_icon_background",
"textures/misc/enchanted_item_glint",
"textures/misc/missing_texture",
"textures/misc/pumpkinblur",
"textures/models/armor/chain_1",
"textures/models/armor/chain_2",
"textures/models/armor/cloth_1",
"textures/models/armor/cloth_2",
"textures/models/armor/diamond_1",
"textures/models/armor/diamond_2",
"textures/models/armor/elytra",
"textures/models/armor/gold_1",
"textures/models/armor/gold_2",
"textures/models/armor/iron_1",
"textures/models/armor/iron_2",
"textures/models/armor/leather_1",
"textures/models/armor/leather_2",
"textures/models/armor/netherite_1",
"textures/models/armor/netherite_2",
"textures/models/armor/turtle_1",
"textures/painting/kz",
"textures/particle/campfire_smoke",
"textures/particle/particles",
"textures/particle/soul",
"textures/persona_thumbnails/alex_hair_thumbnail_0",
"textures/persona_thumbnails/alex_pants_thumbnail_0",
"textures/persona_thumbnails/alex_shirt_thumbnail_0",
"textures/persona_thumbnails/alex_shoes_thumbnail_0",
"textures/persona_thumbnails/plain_eyes_thumbnail_0",
"textures/persona_thumbnails/plain_mouth_thumbnail_0",
"textures/persona_thumbnails/skin_alex_thumbnail_0",
"textures/persona_thumbnails/skin_steve_thumbnail_0",
"textures/persona_thumbnails/steve_hair_thumbnail_0",
"textures/persona_thumbnails/steve_pants_thumbnail_0",
"textures/persona_thumbnails/steve_shirt_thumbnail_0",
"textures/persona_thumbnails/steve_shoes_thumbnail_0",
"textures/persona_thumbnails/straight_thumbnail_0",
"textures/ui/5stars_empty",
"textures/ui/5stars_empty_new",
"textures/ui/5stars_empty_white",
"textures/ui/5stars_full",
"textures/ui/5stars_full_new",
"textures/ui/absorption_effect",
"textures/ui/absorption_heart",
"textures/ui/absorption_heart_half",
"textures/ui/accessibility_glyph",
"textures/ui/accessibility_glyph_color",
"textures/ui/achievement_locked_icon",
"textures/ui/achievements",
"textures/ui/achievements_dialog",
"textures/ui/achievements_g",
"textures/ui/addServer",
"textures/ui/anvil_icon",
"textures/ui/anvil-plus",
"textures/ui/armor_empty",
"textures/ui/armor_full",
"textures/ui/armor_half",
"textures/ui/arrow",
"textures/ui/arrow_active",
"textures/ui/arrow_dark_left_stretch",
"textures/ui/arrow_dark_right",
"textures/ui/arrow_dark_right_stretch",
"textures/ui/arrow_down",
"textures/ui/arrow_down_large",
"textures/ui/arrow_down_small",
"textures/ui/arrow_icon",
"textures/ui/arrow_inactive",
"textures/ui/arrow_l_default",
"textures/ui/arrow_l_hover",
"textures/ui/arrow_l_pressed",
"textures/ui/arrow_large",
"textures/ui/arrow_left",
"textures/ui/arrow_left_white",
"textures/ui/arrow_r_default",
"textures/ui/arrow_r_hover",
"textures/ui/arrow_r_pressed",
"textures/ui/arrow_right",
"textures/ui/arrow_right_white",
"textures/ui/arrowDown",
"textures/ui/arrowLeft",
"textures/ui/arrowRight",
"textures/ui/auto_save",
"textures/ui/automation_glyph",
"textures/ui/automation_glyph_color",
"textures/ui/back_button_default",
"textures/ui/back_button_hover",
"textures/ui/back_button_pressed",
"textures/ui/background",
"textures/ui/background_image",
"textures/ui/background_indent_no_top",
"textures/ui/background_panel",
"textures/ui/background_with_border",
"textures/ui/backup_noline",
"textures/ui/backup_outline",
"textures/ui/backup_replace",
"textures/ui/bad_omen_effect",
"textures/ui/bang_icon",
"textures/ui/Banners",
"textures/ui/banners_dark",
"textures/ui/banners_no_border",
"textures/ui/banners_no_border_dark_hover",
"textures/ui/BannersLight",
"textures/ui/BannersTransparent",
"textures/ui/barely_visible_creeper",
"textures/ui/beacon_button_default",
"textures/ui/beacon_button_hover",
"textures/ui/beacon_button_locked",
"textures/ui/beacon_button_pressed",
"textures/ui/beacon_default_button_pocket",
"textures/ui/beacon_item_seperator_pocket",
"textures/ui/beacon_selected_button_pocket",
"textures/ui/bg32",
"textures/ui/Black",
"textures/ui/black_border",
"textures/ui/black-arrow",
"textures/ui/blackline",
"textures/ui/blindness_effect",
"textures/ui/bonus_banner",
"textures/ui/book_addpicture_default",
"textures/ui/book_addpicture_hover",
"textures/ui/book_addpicture_pressed",
"textures/ui/book_addtextpage_default",
"textures/ui/book_addtextpage_hover",
"textures/ui/book_addtextpage_pressed",
"textures/ui/book_arrowleft_default",
"textures/ui/book_arrowleft_hover",
"textures/ui/book_arrowleft_pressed",
"textures/ui/book_arrowright_default",
"textures/ui/book_arrowright_hover",
"textures/ui/book_arrowright_pressed",
"textures/ui/book_back",
"textures/ui/book_binding",
"textures/ui/book_cover",
"textures/ui/book_edit_default",
"textures/ui/book_edit_hover",
"textures/ui/book_edit_pressed",
"textures/ui/book_frame",
"textures/ui/book_metatag_default",
"textures/ui/book_metatag_hover",
"textures/ui/book_metatag_pressed",
"textures/ui/book_pagecrease_left",
"textures/ui/book_pagecrease_right",
"textures/ui/book_pageedge_left",
"textures/ui/book_pageedge_right",
"textures/ui/book_shiftleft_default",
"textures/ui/book_shiftleft_hover",
"textures/ui/book_shiftleft_pressed",
"textures/ui/book_shiftright_default",
"textures/ui/book_shiftright_hover",
"textures/ui/book_shiftright_pressed",
"textures/ui/book_spine",
"textures/ui/book_texteditbox_hover",
"textures/ui/book_trash_default",
"textures/ui/bookshelf_flat",
"textures/ui/bookshelf_flat_border",
"textures/ui/bottle_empty",
"textures/ui/box_number_grey",
"textures/ui/break",
"textures/ui/brewing_arrow_empty",
"textures/ui/brewing_arrow_full",
"textures/ui/brewing_arrow_large_empty",
"textures/ui/brewing_arrow_large_full",
"textures/ui/brewing_fuel_bar_empty",
"textures/ui/brewing_fuel_bar_full",
"textures/ui/brewing_fuel_empty",
"textures/ui/brewing_fuel_pipes",
"textures/ui/brewing_pipes",
"textures/ui/brewing_pipes_large",
"textures/ui/broadcast_glyph",
"textures/ui/broadcast_glyph_color",
"textures/ui/bubble",
"textures/ui/bubble_pop",
"textures/ui/bubbles_empty",
"textures/ui/bubbles_full",
"textures/ui/bubbles_left_corner",
"textures/ui/bubbles_right_corner",
"textures/ui/button_border_dark",
"textures/ui/button_border_light",
"textures/ui/button_borderless_dark",
"textures/ui/button_borderless_darkhover",
"textures/ui/button_borderless_darkpressed",
"textures/ui/button_borderless_darkpressednohover",
"textures/ui/button_borderless_imagelesshoverbg",
"textures/ui/button_borderless_light",
"textures/ui/button_borderless_lighthover",
"textures/ui/button_borderless_lightpressed",
"textures/ui/button_borderless_lightpressednohover",
"textures/ui/button_dark_color",
"textures/ui/button_inside_dark",
"textures/ui/button_purple",
"textures/ui/button_red",
"textures/ui/button_red_pressed",
"textures/ui/button_trade_red",
"textures/ui/button_trade_red_pressed",
"textures/ui/buy_now_hover",
"textures/ui/buy_now_normal",
"textures/ui/buy_now_pressed",
"textures/ui/camera-small",
"textures/ui/camera-yo",
"textures/ui/cancel",
"textures/ui/cartography_table_copy",
"textures/ui/cartography_table_empty",
"textures/ui/cartography_table_glass",
"textures/ui/cartography_table_map",
"textures/ui/cartography_table_zoom",
"textures/ui/Caution",
"textures/ui/cell_image",
"textures/ui/cell_image_darkgrey",
"textures/ui/cell_image_invert",
"textures/ui/cell_image_lock",
"textures/ui/cell_image_normal",
"textures/ui/cell_image_red",
"textures/ui/ChainSquare",
"textures/ui/chat_down_arrow",
"textures/ui/chat_keyboard",
"textures/ui/chat_send",
"textures/ui/check",
"textures/ui/check_green_white",
"textures/ui/checkbox_check",
"textures/ui/checkbox_check_locked",
"textures/ui/checkbox_checkDisabled",
"textures/ui/checkbox_checkHover",
"textures/ui/checkbox_filled",
"textures/ui/checkbox_filled_disabled",
"textures/ui/checkbox_filled_hover",
"textures/ui/checkbox_space",
"textures/ui/checkbox_space_locked",
"textures/ui/checkbox_spaceDisabled",
"textures/ui/checkbox_spaceHover",
"textures/ui/checkboxFilledYellow",
"textures/ui/checkboxUnFilled",
"textures/ui/chevron_grey_left",
"textures/ui/chevron_grey_right",
"textures/ui/chevron_left",
"textures/ui/chevron_new_grey_right",
"textures/ui/chevron_new_white_right",
"textures/ui/chevron_right",
"textures/ui/chevron_white_down",
"textures/ui/chevron_white_up",
"textures/ui/classic-button",
"textures/ui/classic-button-hover",
"textures/ui/classic-button-pressed",
"textures/ui/classrooms_icon",
"textures/ui/clickable_overlay",
"textures/ui/clickable_overlay_inverse",
"textures/ui/clock",
"textures/ui/close_button_default",
"textures/ui/close_button_default_compact",
"textures/ui/close_button_default_light",
"textures/ui/close_button_hover",
"textures/ui/close_button_hover_compact",
"textures/ui/close_button_hover_light",
"textures/ui/close_button_pressed",
"textures/ui/close_button_pressed_compact",
"textures/ui/close_button_pressed_light",
"textures/ui/cloud_only_storage",
"textures/ui/coin_button_borderless",
"textures/ui/coin_button_borderless_pressed",
"textures/ui/color_picker",
"textures/ui/color_plus",
"textures/ui/comment",
"textures/ui/common-classic_hover",
"textures/ui/common-classic_hover_1",
"textures/ui/common-classic_toggle_checked_state",
"textures/ui/common-classic_toggle_unchecked_state",
"textures/ui/conduit_power_effect",
"textures/ui/confirm",
"textures/ui/control",
"textures/ui/control_white",
"textures/ui/controller_glyph",
"textures/ui/controller_glyph_color",
"textures/ui/controller_glyph_color_switch",
"textures/ui/controller_glyph_switch",
"textures/ui/copy",
"textures/ui/craft_toggle_off",
"textures/ui/craft_toggle_off_hover",
"textures/ui/craft_toggle_on",
"textures/ui/craft_toggle_on_hover",
"textures/ui/CreateNewWorld",
"textures/ui/creative_icon",
"textures/ui/creator_glyph",
"textures/ui/creator_glyph_color",
"textures/ui/crossout",
"textures/ui/cursor",
"textures/ui/cursor_pc",
"textures/ui/dark",
"textures/ui/dark_bg",
"textures/ui/dark_minus",
"textures/ui/dark_plus",
"textures/ui/DarkBannerNoBorder",
"textures/ui/debug_glyph",
"textures/ui/debug_glyph_color",
"textures/ui/default_indent",
"textures/ui/default_world",
"textures/ui/deop",
"textures/ui/dev_glyph",
"textures/ui/dev_glyph_color",
"textures/ui/dialog_background_hollow_1",
"textures/ui/dialog_background_hollow_2",
"textures/ui/dialog_background_hollow_3",
"textures/ui/dialog_background_hollow_4",
"textures/ui/dialog_background_hollow_4_thin",
"textures/ui/dialog_background_hollow_5",
"textures/ui/dialog_background_hollow_6",
"textures/ui/dialog_background_hollow_7",
"textures/ui/dialog_background_hollow_8",
"textures/ui/dialog_background_opaque",
"textures/ui/dialog_background_opaque_overlap_bottom",
"textures/ui/dialog_bubble",
"textures/ui/dialog_bubble_point",
"textures/ui/dialog_divider",
"textures/ui/disabledButton",
"textures/ui/disabledButtonNoBorder",
"textures/ui/divider",
"textures/ui/divider2",
"textures/ui/divider3",
"textures/ui/down_arrow",
"textures/ui/down_tip_Chevron",
"textures/ui/download_backup",
"textures/ui/dressing_room_animation",
"textures/ui/dressing_room_banner",
"textures/ui/dressing_room_capes",
"textures/ui/dressing_room_customization",
"textures/ui/dressing_room_skins",
"textures/ui/dropdown_background",
"textures/ui/dropdown_chevron",
"textures/ui/dropDownHoverBG",
"textures/ui/dropDownSelectBG",
"textures/ui/dust_selectable_1",
"textures/ui/dust_selectable_2",
"textures/ui/dust_selectable_3",
"textures/ui/dust_unselectable_1",
"textures/ui/dust_unselectable_2",
"textures/ui/dust_unselectable_3",
"textures/ui/easily_visible_creeper",
"textures/ui/edit_box_indent",
"textures/ui/edit_box_indent_hover",
"textures/ui/editIcon",
"textures/ui/effect_background",
"textures/ui/elipses",
"textures/ui/emote_empty_0",
"textures/ui/emote_empty_1",
"textures/ui/emote_empty_2",
"textures/ui/emote_empty_3",
"textures/ui/emote_empty_4",
"textures/ui/emote_empty_5",
"textures/ui/emote_wheel_base",
"textures/ui/emote_wheel_select_0",
"textures/ui/emote_wheel_select_1",
"textures/ui/emote_wheel_select_2",
"textures/ui/emote_wheel_select_3",
"textures/ui/emote_wheel_select_4",
"textures/ui/emote_wheel_select_5",
"textures/ui/empty_armor_slot_boots",
"textures/ui/empty_armor_slot_chestplate",
"textures/ui/empty_armor_slot_helmet",
"textures/ui/empty_armor_slot_leggings",
"textures/ui/empty_armor_slot_shield",
"textures/ui/empty_horse_slot_armor",
"textures/ui/empty_horse_slot_saddle",
"textures/ui/empty_llama_slot_carpet",
"textures/ui/empty_progress_bar",
"textures/ui/emptyBar",
"textures/ui/emptyStar",
"textures/ui/emptyStarFocus",
"textures/ui/enable_toolbox",
"textures/ui/enchanting_active_background",
"textures/ui/enchanting_active_background_with_hover_text",
"textures/ui/enchanting_dark_background",
"textures/ui/equipped_item_border",
"textures/ui/ErrorGlyph",
"textures/ui/ErrorGlyph_small",
"textures/ui/ErrorGlyph_small_hover",
"textures/ui/experience_bar_empty_blue",
"textures/ui/experience_bar_full_blue",
"textures/ui/experience_bar_full_white",
"textures/ui/experience_bar_nub_blue",
"textures/ui/experiencebarempty",
"textures/ui/experiencebarfull",
"textures/ui/experiencenub",
"textures/ui/feed_background",
"textures/ui/Feedback",
"textures/ui/feedIcon",
"textures/ui/filled_progress_bar",
"textures/ui/filledBar",
"textures/ui/filledStar",
"textures/ui/filledStarFocus",
"textures/ui/fire_resistance_effect",
"textures/ui/first_of_three",
"textures/ui/first_of_two",
"textures/ui/flame_empty_image",
"textures/ui/flame_full_image",
"textures/ui/focus_border_selected",
"textures/ui/focus_border_white",
"textures/ui/free_download",
"textures/ui/free_download_symbol",
"textures/ui/freeze_heart",
"textures/ui/freeze_heart_flash",
"textures/ui/freeze_heart_flash_half",
"textures/ui/freeze_heart_half",
"textures/ui/friend_glyph",
"textures/ui/friend_glyph_desaturated",
"textures/ui/Friend1",
"textures/ui/friend1_black_outline",
"textures/ui/friend1_black_outline_2x",
"textures/ui/Friend2",
"textures/ui/FriendsDiversity",
"textures/ui/FriendsIcon",
"textures/ui/frozen_effect",
"textures/ui/gamepad_icon_button",
"textures/ui/gamepad_icon_dpad",
"textures/ui/gamepad_icon_left_bumper",
"textures/ui/gamepad_icon_left_trigger",
"textures/ui/gamepad_icon_right_bumper",
"textures/ui/gamepad_icon_right_trigger",
"textures/ui/gamepad_icon_thumbstick",
"textures/ui/gamerpic",
"textures/ui/gamerpic_bevel",
"textures/ui/gamerpic_bevel_hover",
"textures/ui/gamerscore",
"textures/ui/gear",
"textures/ui/generic_bumper_left",
"textures/ui/generic_bumper_right",
"textures/ui/generic_dpad",
"textures/ui/generic_dpad_down",
"textures/ui/generic_dpad_left",
"textures/ui/generic_dpad_right",
"textures/ui/generic_dpad_up",
"textures/ui/generic_face_button_down",
"textures/ui/generic_face_button_left",
"textures/ui/generic_face_button_right",
"textures/ui/generic_face_button_up",
"textures/ui/generic_left_trigger",
"textures/ui/generic_right_trigger",
"textures/ui/generic_select_button",
"textures/ui/generic_start_button",
"textures/ui/generic_stick_left",
"textures/ui/generic_stick_right",
"textures/ui/generic_touchpad",
"textures/ui/gift_featured",
"textures/ui/gift_square",
"textures/ui/glyph_inventory",
"textures/ui/glyph_mashup_pack",
"textures/ui/glyph_realms",
"textures/ui/glyph_resource_pack",
"textures/ui/glyph_resource_pack_small",
"textures/ui/glyph_skin_pack",
"textures/ui/glyph_skin_pack_small",
"textures/ui/glyph_skin_world_small",
"textures/ui/glyph_world_template",
"textures/ui/Gray",
"textures/ui/green",
"textures/ui/greenCorner",
"textures/ui/Grey",
"textures/ui/grey_gamepad_icon_button",
"textures/ui/greyBorder",
"textures/ui/hammer_l",
"textures/ui/hammer_l_disabled",
"textures/ui/hammer_r",
"textures/ui/hammer_r_disabled",
"textures/ui/hammersmashedits",
"textures/ui/hangar",
"textures/ui/haste_effect",
"textures/ui/header_bar",
"textures/ui/health_boost_effect",
"textures/ui/heart",
"textures/ui/heart_background",
"textures/ui/heart_blink",
"textures/ui/heart_flash",
"textures/ui/heart_flash_half",
"textures/ui/heart_half",
"textures/ui/heart_new",
"textures/ui/highlight_slot",
"textures/ui/hint_burst",
"textures/ui/hint_burst_small",
"textures/ui/hollowbanner",
"textures/ui/horizontal_divider",
"textures/ui/horizontalbreak",
"textures/ui/horse_heart",
"textures/ui/horse_heart_flash",
"textures/ui/horse_heart_flash_half",
"textures/ui/horse_heart_half",
"textures/ui/horse_jump_empty",
"textures/ui/horse_jump_full",
"textures/ui/hotbar_0",
"textures/ui/hotbar_1",
"textures/ui/hotbar_2",
"textures/ui/hotbar_3",
"textures/ui/hotbar_4",
"textures/ui/hotbar_5",
"textures/ui/hotbar_6",
"textures/ui/hotbar_7",
"textures/ui/hotbar_8",
"textures/ui/hotbar_end_cap",
"textures/ui/hotbar_start_cap",
"textures/ui/how_to_play_button_default",
"textures/ui/how_to_play_button_default_light",
"textures/ui/how_to_play_button_hover",
"textures/ui/how_to_play_button_hover_light",
"textures/ui/how_to_play_button_pressed",
"textures/ui/how_to_play_button_pressed_light",
"textures/ui/HowToPlayDivider",
"textures/ui/hud_mob_effect_background",
"textures/ui/hud_tip_text_background",
"textures/ui/hunger_background",
"textures/ui/hunger_blink",
"textures/ui/hunger_effect",
"textures/ui/hunger_effect_background",
"textures/ui/hunger_effect_flash_full",
"textures/ui/hunger_effect_flash_half",
"textures/ui/hunger_effect_full",
"textures/ui/hunger_effect_half",
"textures/ui/hunger_flash_full",
"textures/ui/hunger_flash_half",
"textures/ui/hunger_full",
"textures/ui/hunger_half",
"textures/ui/ic_send_white_48dp",
"textures/ui/icon_agent",
"textures/ui/icon_alex",
"textures/ui/icon_apple",
"textures/ui/icon_armor",
"textures/ui/icon_balloon",
"textures/ui/icon_best3",
"textures/ui/icon_blackfriday",
"textures/ui/icon_book_writable",
"textures/ui/icon_bookshelf",
"textures/ui/icon_cake",
"textures/ui/icon_carrot",
"textures/ui/icon_cookie",
"textures/ui/icon_crafting",
"textures/ui/icon_deals",
"textures/ui/icon_expand",
"textures/ui/icon_fall",
"textures/ui/icon_fish_clownfish_raw",
"textures/ui/icon_hangar",
"textures/ui/icon_import",
"textures/ui/icon_iron_pickaxe",
"textures/ui/icon_llama",
"textures/ui/icon_lock",
"textures/ui/icon_map",
"textures/ui/icon_minecoin_9x9",
"textures/ui/icon_multiplayer",
"textures/ui/icon_new",
"textures/ui/icon_new_item",
"textures/ui/icon_none",
"textures/ui/icon_panda",
"textures/ui/icon_potion",
"textures/ui/icon_preview",
"textures/ui/icon_rail_normal",
"textures/ui/icon_random",
"textures/ui/icon_recipe_construction",
"textures/ui/icon_recipe_equipment",
"textures/ui/icon_recipe_item",
"textures/ui/icon_recipe_nature",
"textures/ui/icon_saleribbon",
"textures/ui/icon_setting",
"textures/ui/icon_sign",
"textures/ui/icon_spring",
"textures/ui/icon_staffpicks",
"textures/ui/icon_steve",
"textures/ui/icon_summer",
"textures/ui/icon_timer",
"textures/ui/icon_trailer",
"textures/ui/icon_trash",
"textures/ui/icon_trending",
"textures/ui/icon_unlocked",
"textures/ui/icon_water_bucket",
"textures/ui/icon_winter",
"textures/ui/imagetaggedcorner",
"textures/ui/imagetaggedcornergreen",
"textures/ui/imagetaggedcornergreenhover",
"textures/ui/imagetaggedcornergreenpressed",
"textures/ui/immersive_reader",
"textures/ui/import",
"textures/ui/ImpulseSquare",
"textures/ui/infobulb",
"textures/ui/infobulb_darkborder_small",
"textures/ui/ingot_image",
"textures/ui/InvalidWorldDemoScreen",
"textures/ui/inventory_icon",
"textures/ui/inventory_warning_xbox",
"textures/ui/invertedmultiselecticon",
"textures/ui/invisibility_effect",
"textures/ui/invite_base",
"textures/ui/invite_number_background",
"textures/ui/item_cell",
"textures/ui/item_lock_red",
"textures/ui/item_lock_yellow",
"textures/ui/item_seperator",
"textures/ui/jump_boost_effect",
"textures/ui/keyboard_and_mouse_glyph",
"textures/ui/keyboard_and_mouse_glyph_color",
"textures/ui/keyboard_tooltip_background",
"textures/ui/keyboard_tooltip_icon",
"textures/ui/lan_icon",
"textures/ui/language_glyph",
"textures/ui/language_glyph_color",
"textures/ui/lapis",
"textures/ui/lapis_image",
"textures/ui/large_fish_bevel",
"textures/ui/legacy_pocket_close_button_default",
"textures/ui/legacy_pocket_close_button_pressed",
"textures/ui/legacybanner",
"textures/ui/levitation_effect",
"textures/ui/light",
"textures/ui/lightgreybars",
"textures/ui/like_default",
"textures/ui/list_item_divider_line_light",
"textures/ui/listcheck",
"textures/ui/listcheck_smaller",
"textures/ui/listx",
"textures/ui/loading_bar",
"textures/ui/loading_spin",
"textures/ui/LoadingWorldDemoScreen",
"textures/ui/Local",
"textures/ui/local_and_cloud_storage",
"textures/ui/local_only_storage",
"textures/ui/lock",
"textures/ui/lock_color",
"textures/ui/loom_banner_empty",
"textures/ui/loom_dye_empty",
"textures/ui/loom_pattern_item_empty",
"textures/ui/magnifyingGlass",
"textures/ui/mail_icon",
"textures/ui/mainbanners",
"textures/ui/mainbanners_transparency",
"textures/ui/MainBannersHover",
"textures/ui/mashup_hangar",
"textures/ui/mashup_PaintBrush",
"textures/ui/mashup_world",
"textures/ui/MashupIcon",
"textures/ui/massive_servers",
"textures/ui/MCoin",
"textures/ui/menubackground",
"textures/ui/message",
"textures/ui/middle_strip",
"textures/ui/mine_chop_dig_animation",
"textures/ui/minimize",
"textures/ui/minimizeHover",
"textures/ui/minimizePress",
"textures/ui/mining_fatigue_effect",
"textures/ui/minus",
"textures/ui/missing_item",
"textures/ui/missing_pack_icon",
"textures/ui/mob_effect_background",
"textures/ui/more_dots",
"textures/ui/more-dots",
"textures/ui/move",
"textures/ui/multiplayer_glyph",
"textures/ui/multiplayer_glyph_color",
"textures/ui/multiselection",
"textures/ui/mute_off",
"textures/ui/mute_on",
"textures/ui/nausea_effect",
"textures/ui/NetherPortal",
"textures/ui/NetherPortalMirror",
"textures/ui/New_confirm_Hover",
"textures/ui/new_offer_symbol",
"textures/ui/newOffersIcon",
"textures/ui/newTouchScrollBox",
"textures/ui/night_vision_effect",
"textures/ui/normal_hover",
"textures/ui/normal_normal",
"textures/ui/normal_pressed",
"textures/ui/normal_stroke_button",
"textures/ui/normalArm",
"textures/ui/NormalButtonNoStroke",
"textures/ui/NormalButtonStroke",
"textures/ui/NormalButtonThin",
"textures/ui/NormalButtonThinStroke",
"textures/ui/normalHeight",
"textures/ui/not_visible_creeper",
"textures/ui/numberBGBack",
"textures/ui/numberBGFront",
"textures/ui/offline",
"textures/ui/online",
"textures/ui/onlineLight",
"textures/ui/op",
"textures/ui/packs_border",
"textures/ui/packs_middle",
"textures/ui/panel_outline",
"textures/ui/panorama_0",
"textures/ui/panorama_1",
"textures/ui/panorama_2",
"textures/ui/panorama_3",
"textures/ui/panorama_4",
"textures/ui/panorama_5",
"textures/ui/panorama_overlay",
"textures/ui/particles",
"textures/ui/particles2",
"textures/ui/particles3",
"textures/ui/pause_screen_border",
"textures/ui/pencil_edit_icon",
"textures/ui/permissions_custom_dots",
"textures/ui/permissions_custom_dots_hover",
"textures/ui/permissions_member_star",
"textures/ui/permissions_member_star_hover",
"textures/ui/permissions_op_crown",
"textures/ui/permissions_op_crown_hover",
"textures/ui/permissions_player_fade_overlay",
"textures/ui/permissions_visitor_hand",
"textures/ui/permissions_visitor_hand_hover",
"textures/ui/photo_corner_bl",
"textures/ui/photo_corner_br",
"textures/ui/photo_corner_tl",
"textures/ui/photo_corner_tr",
"textures/ui/Ping_Green",
"textures/ui/Ping_Green_Dark",
"textures/ui/Ping_Offline_Red",
"textures/ui/Ping_Offline_Red_Dark",
"textures/ui/Ping_Red",
"textures/ui/Ping_Red_Dark",
"textures/ui/Ping_Yellow",
"textures/ui/Ping_Yellow_Dark",
"textures/ui/pink_button_borderless_default",
"textures/ui/pink_button_borderless_hover",
"textures/ui/pink_button_borderless_hover_pressed",
"textures/ui/pink_button_borderless_lighthoverflag",
"textures/ui/pink_button_borderless_lightpressedflag",
"textures/ui/pink_button_borderless_no_hover_pressed",
"textures/ui/pinksquare",
"textures/ui/pinktriangle",
"textures/ui/PlaceholderStore",
"textures/ui/player_offline_icon",
"textures/ui/player_online_icon",
"textures/ui/player_preview_border",
"textures/ui/plus",
"textures/ui/pocket_button_default",
"textures/ui/pocket_button_hover",
"textures/ui/pocket_button_pressed",
"textures/ui/pocket_tab_left_side",
"textures/ui/pocket_tab_right_side",
"textures/ui/pocket_ui_highlight_selected_slot",
"textures/ui/pocket_ui_highlight_slot",
"textures/ui/pointer",
"textures/ui/poison_effect",
"textures/ui/poison_heart",
"textures/ui/poison_heart_flash",
"textures/ui/poison_heart_flash_half",
"textures/ui/poison_heart_half",
"textures/ui/portalBg",
"textures/ui/postGradientSolid",
"textures/ui/profile_bg",
"textures/ui/profile_glyph",
"textures/ui/profile_glyph_color",
"textures/ui/profile_new_look",
"textures/ui/profile_new_look_small",
"textures/ui/progress_bar_simple",
"textures/ui/promo_background",
"textures/ui/promo_bee",
"textures/ui/promo_chicken",
"textures/ui/promo_corner_left",
"textures/ui/promo_corner_right",
"textures/ui/promo_creeper",
"textures/ui/promo_gift_big",
"textures/ui/promo_gift_small_blue",
"textures/ui/promo_gift_small_green",
"textures/ui/promo_gift_small_pink",
"textures/ui/promo_gift_small_yellow",
"textures/ui/promo_holiday_gift_long",
"textures/ui/promo_holiday_gift_small",
"textures/ui/promo_pig_sheep",
"textures/ui/promo_spider",
"textures/ui/promo_wolf",
"textures/ui/promotion_slot",
"textures/ui/ps4_bumper_left",
"textures/ui/ps4_bumper_right",
"textures/ui/ps4_dpad_down",
"textures/ui/ps4_dpad_left",
"textures/ui/ps4_dpad_right",
"textures/ui/ps4_dpad_up",
"textures/ui/ps4_face_button_down",
"textures/ui/ps4_face_button_left",
"textures/ui/ps4_face_button_right",
"textures/ui/ps4_face_button_up",
"textures/ui/ps4_left_trigger",
"textures/ui/ps4_right_trigger",
"textures/ui/ps4_stick_left",
"textures/ui/ps4_stick_right",
"textures/ui/ps4_touchpad",
"textures/ui/purple",
"textures/ui/purple_gradient",
"textures/ui/purpleBorder",
"textures/ui/purtle",
"textures/ui/pyramid_level_1",
"textures/ui/pyramid_level_2",
"textures/ui/pyramid_level_3",
"textures/ui/pyramid_level_4",
"textures/ui/radio_checked",
"textures/ui/radio_checked_hover",
"textures/ui/radio_off",
"textures/ui/radio_off_hover",
"textures/ui/radio_on",
"textures/ui/radio_on_hover",
"textures/ui/random_dice",
"textures/ui/rarity_common",
"textures/ui/rarity_common_short",
"textures/ui/rarity_epic",
"textures/ui/rarity_epic_short",
"textures/ui/rarity_legendary",
"textures/ui/rarity_legendary_short",
"textures/ui/rarity_rare",
"textures/ui/rarity_rare_short",
"textures/ui/rarity_uncommon",
"textures/ui/rarity_uncommon_short",
"textures/ui/rating_screen",
"textures/ui/ratings_fullstar",
"textures/ui/ratings_nostar",
"textures/ui/realm_banner_big",
"textures/ui/realm_banner_small",
"textures/ui/realm_icon_small",
"textures/ui/RealmDemoScreen",
"textures/ui/realmflagSmooth",
"textures/ui/realmflagtriangleSmooth",
"textures/ui/realmPortalSmall",
"textures/ui/realms_art_icon",
"textures/ui/realms_chevron_play",
"textures/ui/realms_green_check",
"textures/ui/realms_key_art",
"textures/ui/realms_particles",
"textures/ui/realms_plus_hover",
"textures/ui/realms_plus_normal",
"textures/ui/realms_red_x",
"textures/ui/realms_slot_check",
"textures/ui/realms_text_background",
"textures/ui/realmsContent",
"textures/ui/realmsContentHover",
"textures/ui/realmsContentPressed",
"textures/ui/realmsIcon",
"textures/ui/realmsparkle",
"textures/ui/realmsparkle1",
"textures/ui/recap_glyph_2x",
"textures/ui/recap_glyph_color_2x",
"textures/ui/recap_glyph_desaturated",
"textures/ui/recipe_back_panel",
"textures/ui/recipe_book_button_borderless_light",
"textures/ui/recipe_book_button_borderless_lighthover",
"textures/ui/recipe_book_button_borderless_lightpressed",
"textures/ui/recipe_book_button_borderless_lightpressednohover",
"textures/ui/recipe_book_collapse_icon",
"textures/ui/recipe_book_dark_button",
"textures/ui/recipe_book_dark_button_pressed",
"textures/ui/recipe_book_expand_dots_in",
"textures/ui/recipe_book_expand_dots_in_hover",
"textures/ui/recipe_book_expand_dots_out",
"textures/ui/recipe_book_expand_dots_out_hover",
"textures/ui/recipe_book_expand_icon",
"textures/ui/recipe_book_group_bg",
"textures/ui/recipe_book_group_collapsed",
"textures/ui/recipe_book_group_expanded",
"textures/ui/recipe_book_icon",
"textures/ui/recipe_book_item_bg",
"textures/ui/recipe_book_light_button",
"textures/ui/recipe_book_light_button_pressed",
"textures/ui/recipe_book_pane_bg",
"textures/ui/recipe_book_red",
"textures/ui/recipe_book_red_button",
"textures/ui/recipe_book_red_button_pressed",
"textures/ui/recipe_book_side_toggle_dark",
"textures/ui/recipe_book_side_toggle_dark_hover",
"textures/ui/recipe_book_touch_cell_selected",
"textures/ui/red_slash",
"textures/ui/redX1",
"textures/ui/refresh",
"textures/ui/refresh_hover",
"textures/ui/refresh_light",
"textures/ui/regeneration_effect",
"textures/ui/RepeatSquare",
"textures/ui/resistance_effect",
"textures/ui/ribbon_bar_text_background_hover",
"textures/ui/Rotate",
"textures/ui/RTX_Label",
"textures/ui/RTX_Sparkle",
"textures/ui/sale_button_borderless_lighthover",
"textures/ui/sale_button_borderless_lighthoverflag",
"textures/ui/sale_button_borderless_lightpressed",
"textures/ui/sale_button_borderless_lightpressedflag",
"textures/ui/saleflag",
"textures/ui/saleflagtriangle",
"textures/ui/saleflagtrianglebeveldefault",
"textures/ui/saleflagtrianglebeveldefault_large",
"textures/ui/saleflagtrianglebevelpress",
"textures/ui/saleflagtrianglebevelpress_large",
"textures/ui/saleribbon",
"textures/ui/Scaffolding",
"textures/ui/scoreboard_list_background",
"textures/ui/screen_background",
"textures/ui/screen_realms_plus_background",
"textures/ui/screenshot_frame",
"textures/ui/ScrollBox",
"textures/ui/ScrollGutterWithBG",
"textures/ui/ScrollHandle",
"textures/ui/ScrollRail",
"textures/ui/second_of_three",
"textures/ui/second_of_two",
"textures/ui/seeds",
"textures/ui/selected_hotbar_slot",
"textures/ui/send_icon",
"textures/ui/servers",
"textures/ui/settings_glyph_2x",
"textures/ui/settings_glyph_color_2x",
"textures/ui/shadow",
"textures/ui/share_apple",
"textures/ui/share_google",
"textures/ui/share_microsoft",
"textures/ui/sidebar_icons/button_panel",
"textures/ui/sidebar_icons/capes",
"textures/ui/sidebar_icons/categories",
"textures/ui/sidebar_icons/character_creator",
"textures/ui/sidebar_icons/classic_skins",
"textures/ui/sidebar_icons/dr_body",
"textures/ui/sidebar_icons/dr_style",
"textures/ui/sidebar_icons/dressing_room_animation",
"textures/ui/sidebar_icons/dressing_room_capes",
"textures/ui/sidebar_icons/dressing_room_customization",
"textures/ui/sidebar_icons/dressing_room_skins",
"textures/ui/sidebar_icons/emotes",
"textures/ui/sidebar_icons/featured",
"textures/ui/sidebar_icons/genre",
"textures/ui/sidebar_icons/marketplace",
"textures/ui/sidebar_icons/menu_threebars",
"textures/ui/sidebar_icons/my_characters",
"textures/ui/sidebar_icons/my_content",
"textures/ui/sidebar_icons/owned_skins_icon",
"textures/ui/sidebar_icons/profile_screen_icon",
"textures/ui/sidebar_icons/realms",
"textures/ui/sidebar_icons/realms_plus_skins_icon",
"textures/ui/sidebar_icons/side_drawer_button_hover_focused",
"textures/ui/sidebar_icons/side_drawer_button_selected",
"textures/ui/sidebar_icons/side_drawer_left_panel",
"textures/ui/sidebar_icons/side_panel_button_hover_focused",
"textures/ui/sidebar_icons/side_panel_button_selected",
"textures/ui/sidebar_icons/side_panel_divider",
"textures/ui/sidebar_icons/unowned_skins_icon",
"textures/ui/sign",
"textures/ui/sign_acacia",
"textures/ui/sign_birch",
"textures/ui/sign_crimson",
"textures/ui/sign_darkoak",
"textures/ui/sign_jungle",
"textures/ui/sign_spruce",
"textures/ui/sign_warped",
"textures/ui/slider_background",
"textures/ui/slider_background_hover",
"textures/ui/slider_border",
"textures/ui/slider_button_default",
"textures/ui/slider_button_hover",
"textures/ui/slider_button_indent",
"textures/ui/slider_button_locked",
"textures/ui/slider_locked_transparent_fade",
"textures/ui/slider_progress",
"textures/ui/slider_progress_hover",
"textures/ui/slider_step_background",
"textures/ui/slider_step_background_hover",
"textures/ui/slider_step_progress",
"textures/ui/slider_step_progress_hover",
"textures/ui/slot_sale",
"textures/ui/slots_bg",
"textures/ui/slow_falling_effect",
"textures/ui/slowness_effect",
"textures/ui/small_fish_bevel",
"textures/ui/smallerHeight",
"textures/ui/smallHeight",
"textures/ui/smithing_icon",
"textures/ui/smithing-table-plus",
"textures/ui/solidtransparency",
"textures/ui/sound_glyph",
"textures/ui/sound_glyph_2x",
"textures/ui/sound_glyph_color",
"textures/ui/sound_glyph_color_2x",
"textures/ui/speed_effect",
"textures/ui/spyglass_flat",
"textures/ui/spyglass_scope",
"textures/ui/square_image_border_white",
"textures/ui/storageIcon",
"textures/ui/storageIconColor",
"textures/ui/store_background",
"textures/ui/store_banner_no_border",
"textures/ui/store_filter_icon",
"textures/ui/store_home_icon",
"textures/ui/store_play_button",
"textures/ui/store_play_button_mask",
"textures/ui/store_sort_icon",
"textures/ui/StoreTopBar",
"textures/ui/StoreTopBarFiller",
"textures/ui/storexblsignin",
"textures/ui/strength_effect",
"textures/ui/strikethru",
"textures/ui/structure_block",
"textures/ui/structure_block_corner",
"textures/ui/structure_block_data",
"textures/ui/structure_block_export",
"textures/ui/structure_block_load",
"textures/ui/structure_block_save",
"textures/ui/subcategory_icons/arms",
"textures/ui/subcategory_icons/back_accessory",
"textures/ui/subcategory_icons/body_size",
"textures/ui/subcategory_icons/bottoms",
"textures/ui/subcategory_icons/capes",
"textures/ui/subcategory_icons/emotes",
"textures/ui/subcategory_icons/eyes",
"textures/ui/subcategory_icons/face_accessory",
"textures/ui/subcategory_icons/facial_hair",
"textures/ui/subcategory_icons/feet",
"textures/ui/subcategory_icons/hair",
"textures/ui/subcategory_icons/hands",
"textures/ui/subcategory_icons/head",
"textures/ui/subcategory_icons/legs",
"textures/ui/subcategory_icons/mouth",
"textures/ui/subcategory_icons/outerwear",
"textures/ui/subcategory_icons/skin_texture",
"textures/ui/subcategory_icons/tops",
"textures/ui/subscription_glyph",
"textures/ui/subscription_glyph_color",
"textures/ui/sunset_keyart",
"textures/ui/sunset_pending_keyart",
"textures/ui/switch_accounts",
"textures/ui/switch_bumper_left",
"textures/ui/switch_bumper_right",
"textures/ui/switch_circle_button",
"textures/ui/switch_dpad_down",
"textures/ui/switch_dpad_left",
"textures/ui/switch_dpad_right",
"textures/ui/switch_dpad_up",
"textures/ui/switch_face_button_down",
"textures/ui/switch_face_button_left",
"textures/ui/switch_face_button_right",
"textures/ui/switch_face_button_up",
"textures/ui/switch_home_button",
"textures/ui/switch_left_trigger",
"textures/ui/switch_right_trigger",
"textures/ui/switch_select_button",
"textures/ui/switch_sl_button",
"textures/ui/switch_sr_button",
"textures/ui/switch_start_button",
"textures/ui/switch_stick_left",
"textures/ui/switch_stick_right",
"textures/ui/switch_touchpad",
"textures/ui/sword",
"textures/ui/TabLeftBack",
"textures/ui/TabLeftBackBottomMost",
"textures/ui/TabLeftBackBottomMostHover",
"textures/ui/TabLeftBackHover",
"textures/ui/TabLeftBackTopMost",
"textures/ui/TabLeftBackTopMostHover",
"textures/ui/TabLeftFront",
"textures/ui/TabLeftFrontBottomMost",
"textures/ui/TabLeftFrontBottomMostHover",
"textures/ui/TabLeftFrontHover",
"textures/ui/TabLeftFrontTopMost",
"textures/ui/TabLeftFrontTopMostHover",
"textures/ui/TabRightBack",
"textures/ui/TabRightBackBottomMost",
"textures/ui/TabRightBackBottomMostHover",
"textures/ui/TabRightBackHover",
"textures/ui/TabRightBackTopMost",
"textures/ui/TabRightBackTopMostHover",
"textures/ui/TabRightFront",
"textures/ui/TabRightFrontBottomMost",
"textures/ui/TabRightFrontBottomMostHover",
"textures/ui/TabRightFrontHover",
"textures/ui/TabRightFrontTopMost",
"textures/ui/TabRightFrontTopMostHover",
"textures/ui/TabTopBack",
"textures/ui/TabTopBackHover",
"textures/ui/TabTopBackLeftMost",
"textures/ui/TabTopBackLeftMostHover",
"textures/ui/TabTopBackRightMost",
"textures/ui/TabTopBackRightMostDark",
"textures/ui/TabTopBackRightMostDarkHover",
"textures/ui/TabTopBackRightMostHover",
"textures/ui/TabTopFront",
"textures/ui/TabTopFrontHover",
"textures/ui/TabTopFrontLeftMost",
"textures/ui/TabTopFrontLeftMostHover",
"textures/ui/TabTopFrontRightMost",
"textures/ui/TabTopFrontRightMostHover",
"textures/ui/tallHeight",
"textures/ui/teams_icon",
"textures/ui/text_color_paintbrush",
"textures/ui/text_color_paintbrush_overlay",
"textures/ui/text_edit_base",
"textures/ui/text_edit_hover",
"textures/ui/text_label_box",
"textures/ui/thin_dialog",
"textures/ui/thinArm",
"textures/ui/ThinPlus",
"textures/ui/third_of_three",
"textures/ui/time_1sunrise",
"textures/ui/time_2day",
"textures/ui/time_3noon",
"textures/ui/time_4sunset",
"textures/ui/time_5night",
"textures/ui/time_6midnight",
"textures/ui/timer",
"textures/ui/tip_arrows_left",
"textures/ui/tip_arrows_right",
"textures/ui/tip_Chevron",
"textures/ui/tip_panel",
"textures/ui/title",
"textures/ui/tnt_animated",
"textures/ui/toggle_off",
"textures/ui/toggle_off_hover",
"textures/ui/toggle_on",
"textures/ui/toggle_on_hover",
"textures/ui/toolbar_background",
"textures/ui/tooltip_default_background",
"textures/ui/tooltip_default_chevron",
"textures/ui/tooltip_default_chevron_rotated",
"textures/ui/tooltip_inverted_chevron",
"textures/ui/tooltip_notification_default_background",
"textures/ui/topbar_off_left",
"textures/ui/topbar_off_middle",
"textures/ui/topbar_off_point",
"textures/ui/topbar_off_right",
"textures/ui/topbar_on_left",
"textures/ui/topbar_on_middle",
"textures/ui/topbar_on_point",
"textures/ui/topbar_on_right",
"textures/ui/touch_glyph",
"textures/ui/touch_glyph_color",
"textures/ui/touchScrollBox",
"textures/ui/trade_icon",
"textures/ui/trash",
"textures/ui/trash_default",
"textures/ui/trash_hover",
"textures/ui/trash_light",
"textures/ui/trash_pressed",
"textures/ui/trophy",
"textures/ui/trophy_banner_icon",
"textures/ui/ui_debug_glyph",
"textures/ui/ui_debug_glyph_color",
"textures/ui/underline",
"textures/ui/underline_focus",
"textures/ui/undoArrow",
"textures/ui/unLock",
"textures/ui/unsynced_bevel",
"textures/ui/unsynced_bevel_hover",
"textures/ui/unsynced_bevel_pressed",
"textures/ui/unsynced_bg_hover",
"textures/ui/up_arrow",
"textures/ui/up_chevron",
"textures/ui/update",
"textures/ui/update_bevel",
"textures/ui/update_bevel_hover",
"textures/ui/update_bevel_pressed",
"textures/ui/update_world_chunks",
"textures/ui/UpdateGlyph",
"textures/ui/UpdateGlyph_small",
"textures/ui/upload_glyph",
"textures/ui/user_icon",
"textures/ui/user_icon_small",
"textures/ui/user_icon_white",
"textures/ui/vertical_divider",
"textures/ui/verticalgradient",
"textures/ui/video_glyph",
"textures/ui/video_glyph_2x",
"textures/ui/video_glyph_color",
"textures/ui/video_glyph_color_2x",
"textures/ui/village_hero_effect",
"textures/ui/vr_glyph",
"textures/ui/vr_glyph_color",
"textures/ui/warning_alex",
"textures/ui/WarningGlyph",
"textures/ui/WarningGlyph_small",
"textures/ui/WarningGlyph_small_hover",
"textures/ui/water_breathing_effect",
"textures/ui/weakness_effect",
"textures/ui/weather_clear",
"textures/ui/weather_rain",
"textures/ui/weather_thunderstorm",
"textures/ui/white",
"textures/ui/white_background",
"textures/ui/white_pixel_chevron_down",
"textures/ui/white_pixel_chevron_right",
"textures/ui/whiteArrow",
"textures/ui/whiteArrow2",
"textures/ui/whiteline",
"textures/ui/wither_effect",
"textures/ui/wither_heart",
"textures/ui/wither_heart_flash",
"textures/ui/wither_heart_flash_half",
"textures/ui/wither_heart_half",
"textures/ui/World",
"textures/ui/world_glyph",
"textures/ui/world_glyph_color",
"textures/ui/world_glyph_color_2x",
"textures/ui/world_glyph_color_2x_black_outline",
"textures/ui/world_glyph_desaturated",
"textures/ui/world_screenshot_focus_border",
"textures/ui/world_upgrade",
"textures/ui/WorldDemoScreen",
"textures/ui/WorldDemoScreen_Big",
"textures/ui/WorldDemoScreen_Big_Grayscale",
"textures/ui/worldsIcon",
"textures/ui/Wrenches1",
"textures/ui/x_default",
"textures/ui/x_dropdown_default",
"textures/ui/x_dropdown_hover",
"textures/ui/x_hover",
"textures/ui/x_pressed",
"textures/ui/xbox_bumper_left",
"textures/ui/xbox_bumper_right",
"textures/ui/xbox_dpad",
"textures/ui/xbox_dpad_down",
"textures/ui/xbox_dpad_left",
"textures/ui/xbox_dpad_right",
"textures/ui/xbox_dpad_up",
"textures/ui/xbox_face_button_down",
"textures/ui/xbox_face_button_left",
"textures/ui/xbox_face_button_right",
"textures/ui/xbox_face_button_up",
"textures/ui/xbox_left_trigger",
"textures/ui/xbox_right_trigger",
"textures/ui/xbox_select_button",
"textures/ui/xbox_start_button",
"textures/ui/xbox_stick_left",
"textures/ui/xbox_stick_right",
"textures/ui/xbox_touchpad",
"textures/ui/xbox4",
"textures/ui/xboxconversionkeyart",
"textures/ui/XTab",
"textures/ui/xyz_axis",
"textures/ui/yellow_banner",
"textures/ui/yellowExclamation"
]
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data
|
src/Lib/Edu/ResourcePack/animations.ts
|
export const Animations: string[] =
[]
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data
|
src/Lib/Vanilla/ResourcePack/animation_controllers.ts
|
export const AnimationControllers: string[] =
[
"controller.animation.agent.move",
"controller.animation.armor_stand.pose",
"controller.animation.armor_stand.wiggle",
"controller.animation.axolotl.general",
"controller.animation.axolotl.move",
"controller.animation.bat.move",
"controller.animation.bee.drip",
"controller.animation.bee.root",
"controller.animation.bee.sting",
"controller.animation.blaze.flame",
"controller.animation.blaze.move",
"controller.animation.cat.baby",
"controller.animation.cat.look_at_target",
"controller.animation.cat.move",
"controller.animation.creeper.head",
"controller.animation.creeper.legs",
"controller.animation.creeper.swelling",
"controller.animation.dolphin.general",
"controller.animation.drowned.attack.rotations",
"controller.animation.elytra.default",
"controller.animation.enderman.base_pose",
"controller.animation.enderman.carrying",
"controller.animation.enderman.scary_face",
"controller.animation.endermite.move",
"controller.animation.evoker.general",
"controller.animation.evoker.general.v1.0",
"controller.animation.fish.general",
"controller.animation.fox.move",
"controller.animation.ghast.move",
"controller.animation.ghast.scale",
"controller.animation.goat.move",
"controller.animation.hoglin.attack",
"controller.animation.hoglin.baby_scaling",
"controller.animation.hoglin.look_at_target",
"controller.animation.hoglin.walk",
"controller.animation.humanoid.attack",
"controller.animation.humanoid.baby_big_head",
"controller.animation.humanoid.base_pose",
"controller.animation.humanoid.bob",
"controller.animation.humanoid.bow_and_arrow",
"controller.animation.humanoid.brandish_spear",
"controller.animation.humanoid.charging",
"controller.animation.humanoid.damage_nearby_mobs",
"controller.animation.humanoid.holding",
"controller.animation.humanoid.holding_spyglass",
"controller.animation.humanoid.look_at_target",
"controller.animation.humanoid.move",
"controller.animation.humanoid.riding",
"controller.animation.humanoid.sneaking",
"controller.animation.humanoid.swimming",
"controller.animation.humanoid.use_item_progress",
"controller.animation.iron_golem.arm_movement",
"controller.animation.iron_golem.move",
"controller.animation.llama.baby",
"controller.animation.llama.move",
"controller.animation.magma_cube.general",
"controller.animation.mooshroom.baby",
"controller.animation.mooshroom.move",
"controller.animation.mooshroom.setup",
"controller.animation.ocelot.baby",
"controller.animation.ocelot.look_at_target",
"controller.animation.ocelot.move",
"controller.animation.ocelot_v1.0.baby",
"controller.animation.ocelot_v1.0.look_at_target",
"controller.animation.ocelot_v1.0.move",
"controller.animation.ocelot_v1.0.setup",
"controller.animation.panda.baby",
"controller.animation.panda.move",
"controller.animation.panda.sneezing",
"controller.animation.panda.unhappy",
"controller.animation.parrot.move",
"controller.animation.parrot.setup",
"controller.animation.persona.blink",
"controller.animation.phantom.base_pose",
"controller.animation.phantom.move",
"controller.animation.piglin.attack",
"controller.animation.pillager.attack",
"controller.animation.pillager.root",
"controller.animation.player.crossbow",
"controller.animation.player.first_person_attack",
"controller.animation.player.first_person_map",
"controller.animation.player.root",
"controller.animation.polarbear.baby",
"controller.animation.polarbear.move",
"controller.animation.rabbit.baby",
"controller.animation.rabbit.general",
"controller.animation.ravager.head_movement",
"controller.animation.ravager.move",
"controller.animation.sheep.move",
"controller.animation.shield.wield",
"controller.animation.shulker.facing",
"controller.animation.shulker.move",
"controller.animation.silverfish.move",
"controller.animation.skeleton.attack",
"controller.animation.snowgolem.move",
"controller.animation.snowgolem.move.v1.8",
"controller.animation.spider.move",
"controller.animation.trident.wield",
"controller.animation.tripod_camera.base_pose",
"controller.animation.turtle.general",
"controller.animation.turtle.move",
"controller.animation.vex.move",
"controller.animation.villager.baby",
"controller.animation.villager.general",
"controller.animation.villager.move",
"controller.animation.villager_v2.baby",
"controller.animation.villager_v2.general",
"controller.animation.villager_v2.move",
"controller.animation.villager_v2.raise_arms",
"controller.animation.vindicator.base",
"controller.animation.vindicator.base.v1.0",
"controller.animation.witch.general",
"controller.animation.wither_boss.move",
"controller.animation.wither_skeleton.attack",
"controller.animation.wolf.angry",
"controller.animation.wolf.baby_scaling",
"controller.animation.wolf.head_rot_z",
"controller.animation.wolf.look_at",
"controller.animation.wolf.setup",
"controller.animation.wolf.shaking",
"controller.animation.wolf.sitting",
"controller.animation.wolf.tail_default",
"controller.animation.zombie.attack_bare_hand",
"controller.animation.zombie.swimming"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.