This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use futures_core::{future::BoxFuture, stream::BoxStream}; | |
use sqlx::{ | |
postgres::{PgQueryResult, PgRow, PgStatement, PgTypeInfo}, | |
Describe, Either, Error, Execute, Executor, PgConnection, PgPool, PgTransaction, Postgres, | |
}; | |
#[derive(Debug)] | |
enum XStore<'a> { | |
Connection(&'a mut PgConnection), | |
Pool(&'a PgPool), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Lineage, | |
Node, | |
getSubtreeByLineage, | |
treeFromLineageArray, | |
walkTreeDepthFirst, | |
} from "../node"; | |
describe("Node", () => { | |
const LINEAGE_ARRAY_FIXTURE: ReadonlyArray<Lineage> = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import startServer from "verdaccio"; | |
const PORT = 4873 | |
const STORAGE = "./storage"; | |
const CONFIG = { | |
storage: STORAGE, | |
uplinks: { | |
"npmjs": { | |
"url": "https://registry.npmjs.org/" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import startServer from "verdaccio"; | |
const PORT = 4873 | |
const STORAGE = "./storage"; | |
const CONFIG = { | |
storage: STORAGE, | |
uplinks: { | |
"npmjs": { | |
"url": "https://registry.npmjs.org/" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface TaskToTaskLink { | |
id: ID! | |
left: Task! | |
right: Task! | |
} | |
enum TaskToTaskDependencyLinkKind { | |
DEPENDENCY | |
DEPENDENT | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <root>/.storybook/main.js | |
const cssRe = /\.css$/; | |
const removeCssRule = (config) => | |
(config.module.rules = config.module.rules.filter( | |
(rule) => String(rule.test) !== String(cssRe), | |
)); | |
module.exports = { | |
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type IsolationOptions = { | |
entityManager?: EntityManager<IDatabaseDriver<Connection>>; | |
flush?: boolean; | |
}; | |
@Injectable() | |
export class UsersService { | |
constructor( | |
private readonly _entityManager: EntityManager<IDatabaseDriver<Connection>>, | |
) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Connection, | |
EntityManager, | |
IDatabaseDriver, | |
MikroORM, | |
} from "@mikro-orm/core"; | |
import { PostgreSqlDriver } from "@mikro-orm/postgresql"; | |
import { getConfig } from "../config"; | |
import { UserEntity } from "../entities"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AnyEntity, Property, PropertyOptions } from "@mikro-orm/core"; | |
import { TimestampType } from "./types"; | |
export type DecoratorType = ( | |
target: AnyEntity<unknown>, | |
propertyName: string, | |
) => void; | |
export type ConcretePropertyOptions<T> = Omit<PropertyOptions<T>, "columnType">; |
NewerOlder