Skip to content

Commit

Permalink
change biome formatter defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburniske committed Jun 10, 2024
1 parent 90fc512 commit 66ade47
Show file tree
Hide file tree
Showing 6 changed files with 538 additions and 604 deletions.
46 changes: 26 additions & 20 deletions lib/biome.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noUselessElse": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noShadowRestrictedNames": "off"
}
}
},
"files": {
"include": ["src/**/*"]
}
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noUselessElse": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noShadowRestrictedNames": "off"
}
}
},
"formatter": {
"enabled": true,
"lineWidth": 100,
"indentStyle": "space",
"indentWidth": 3
},
"files": {
"include": ["src/**/*"]
}
}
159 changes: 73 additions & 86 deletions lib/src/bindgen/bindgen.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

export function golemCreatePromise(): PromiseId;
export function golemAwaitPromise(promiseId: PromiseId): Uint8Array;
export function golemCompletePromise(
promiseId: PromiseId,
data: Uint8Array,
): boolean;
export function golemCompletePromise(promiseId: PromiseId, data: Uint8Array): boolean;
export function golemDeletePromise(promiseId: PromiseId): void;
export function getSelfUri(functionName: string): Uri;
export function getOplogIndex(): OplogIndex;
Expand All @@ -28,33 +25,27 @@ export function markEndOperation(begin: OplogIndex): void;
export function getRetryPolicy(): RetryPolicy;
export function setRetryPolicy(newRetryPolicy: RetryPolicy): void;
export function getOplogPersistenceLevel(): PersistenceLevel;
export function setOplogPersistenceLevel(
newPersistenceLevel: PersistenceLevel,
): void;
export function setOplogPersistenceLevel(newPersistenceLevel: PersistenceLevel): void;
export function getIdempotenceMode(): boolean;
export function setIdempotenceMode(idempotent: boolean): void;
export function generateIdempotencyKey(): Uuid;
export function updateWorker(
workerId: WorkerId,
targetVersion: ComponentVersion,
mode: UpdateMode,
workerId: WorkerId,
targetVersion: ComponentVersion,
mode: UpdateMode,
): void;

export class GetWorkers {
constructor(
componentId: ComponentId,
filter: WorkerAnyFilter | undefined,
precise: boolean,
);
getNext(): WorkerMetadata[] | undefined;
constructor(componentId: ComponentId, filter: WorkerAnyFilter | undefined, precise: boolean);
getNext(): WorkerMetadata[] | undefined;
}

export interface Uuid {
highBits: bigint;
lowBits: bigint;
highBits: bigint;
lowBits: bigint;
}
export interface ComponentId {
uuid: Uuid;
uuid: Uuid;
}
/**
* # Variants
Expand All @@ -67,14 +58,10 @@ export interface ComponentId {
*
* ## `"not-like"`
*/
export type StringFilterComparator =
| "equal"
| "not-equal"
| "like"
| "not-like";
export type StringFilterComparator = "equal" | "not-equal" | "like" | "not-like";
export interface WorkerNameFilter {
comparator: StringFilterComparator;
value: string;
comparator: StringFilterComparator;
value: string;
}
/**
* # Variants
Expand All @@ -92,12 +79,12 @@ export interface WorkerNameFilter {
* ## `"less"`
*/
export type FilterComparator =
| "equal"
| "not-equal"
| "greater-equal"
| "greater"
| "less-equal"
| "less";
| "equal"
| "not-equal"
| "greater-equal"
| "greater"
| "less-equal"
| "less";
/**
* # Variants
*
Expand All @@ -116,101 +103,101 @@ export type FilterComparator =
* ## `"exited"`
*/
export type WorkerStatus =
| "running"
| "idle"
| "suspended"
| "interrupted"
| "retrying"
| "failed"
| "exited";
| "running"
| "idle"
| "suspended"
| "interrupted"
| "retrying"
| "failed"
| "exited";
export interface WorkerStatusFilter {
comparator: FilterComparator;
value: WorkerStatus;
comparator: FilterComparator;
value: WorkerStatus;
}
export interface WorkerVersionFilter {
comparator: FilterComparator;
value: bigint;
comparator: FilterComparator;
value: bigint;
}
export interface WorkerCreatedAtFilter {
comparator: FilterComparator;
value: bigint;
comparator: FilterComparator;
value: bigint;
}
export interface WorkerEnvFilter {
name: string;
comparator: StringFilterComparator;
value: string;
name: string;
comparator: StringFilterComparator;
value: string;
}
export type WorkerPropertyFilter =
| WorkerPropertyFilterName
| WorkerPropertyFilterStatus
| WorkerPropertyFilterVersion
| WorkerPropertyFilterCreatedAt
| WorkerPropertyFilterEnv;
| WorkerPropertyFilterName
| WorkerPropertyFilterStatus
| WorkerPropertyFilterVersion
| WorkerPropertyFilterCreatedAt
| WorkerPropertyFilterEnv;
export interface WorkerPropertyFilterName {
tag: "name";
val: WorkerNameFilter;
tag: "name";
val: WorkerNameFilter;
}
export interface WorkerPropertyFilterStatus {
tag: "status";
val: WorkerStatusFilter;
tag: "status";
val: WorkerStatusFilter;
}
export interface WorkerPropertyFilterVersion {
tag: "version";
val: WorkerVersionFilter;
tag: "version";
val: WorkerVersionFilter;
}
export interface WorkerPropertyFilterCreatedAt {
tag: "created-at";
val: WorkerCreatedAtFilter;
tag: "created-at";
val: WorkerCreatedAtFilter;
}
export interface WorkerPropertyFilterEnv {
tag: "env";
val: WorkerEnvFilter;
tag: "env";
val: WorkerEnvFilter;
}
export interface WorkerAllFilter {
filters: WorkerPropertyFilter[];
filters: WorkerPropertyFilter[];
}
export interface WorkerAnyFilter {
filters: WorkerAllFilter[];
filters: WorkerAllFilter[];
}
export interface WorkerId {
componentId: ComponentId;
workerName: string;
componentId: ComponentId;
workerName: string;
}
export interface WorkerMetadata {
workerId: WorkerId;
args: string[];
env: [string, string][];
status: WorkerStatus;
componentVersion: bigint;
retryCount: bigint;
workerId: WorkerId;
args: string[];
env: [string, string][];
status: WorkerStatus;
componentVersion: bigint;
retryCount: bigint;
}
export type OplogIndex = bigint;
export interface PromiseId {
workerId: WorkerId;
oplogIdx: OplogIndex;
workerId: WorkerId;
oplogIdx: OplogIndex;
}
export interface Uri {
value: string;
value: string;
}
export type Duration = bigint;
export interface RetryPolicy {
maxAttempts: number;
minDelay: Duration;
maxDelay: Duration;
multiplier: number;
maxAttempts: number;
minDelay: Duration;
maxDelay: Duration;
multiplier: number;
}
export type PersistenceLevel =
| PersistenceLevelPersistNothing
| PersistenceLevelPersistRemoteSideEffects
| PersistenceLevelSmart;
| PersistenceLevelPersistNothing
| PersistenceLevelPersistRemoteSideEffects
| PersistenceLevelSmart;
export interface PersistenceLevelPersistNothing {
tag: "persist-nothing";
tag: "persist-nothing";
}
export interface PersistenceLevelPersistRemoteSideEffects {
tag: "persist-remote-side-effects";
tag: "persist-remote-side-effects";
}
export interface PersistenceLevelSmart {
tag: "smart";
tag: "smart";
}
export type ComponentVersion = bigint;
/**
Expand Down
Loading

0 comments on commit 66ade47

Please sign in to comment.