This file contains 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
name: Fix Lock File and Create PR | |
on: | |
push: | |
branches: | |
- '**' # Run on every branch push | |
permissions: | |
contents: write | |
pull-requests: write |
This file contains 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
{ lib, stdenv, fetchurl, unzip }: | |
let | |
# https://docs.dagger.io/install | |
version = "0.12.5"; # Replace with the actual version you want to install | |
system = stdenv.hostPlatform.system; | |
# Map Nix system to Dagger's OS and architecture naming | |
systemMap = { | |
"x86_64-linux" = { os = "linux_amd64"; sha256 = ""; }; |
This file contains 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 { Schema } from '@effect/schema' | |
/** | |
* The encoded structure is alternating 4 bytes to represent the length of the following Uint8Array, | |
* followed by the Uint8Array itself, repeated. | |
*/ | |
export const Uint8ArrayList = Schema.transform(Schema.Uint8ArrayFromSelf, Schema.Array(Schema.Uint8ArrayFromSelf), { | |
decode: (encodedArrayList) => { | |
const arrayList: Uint8Array[] = [] |
This file contains 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
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; | |
nixpkgsOld.url = "github:NixOS/nixpkgs/release-23.05"; | |
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, nixpkgsOld, nixpkgsUnstable, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: |
This file contains 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 { describe, expect, it } from 'vitest' | |
import { Equal } from '../index.js' | |
import * as Schema from './index.js' | |
import { JsonWrapper, jsonWrapper } from './SchemaJsonWrapper.js' | |
describe('wrapper', () => { | |
it('wrapper', () => { | |
const wrapped = jsonWrapper(Schema.number) | |
const decoded = Schema.parseSync(wrapped)(10) |
This file contains 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
/* eslint-disable prefer-arrow/prefer-arrow-functions */ | |
/// <reference no-default-lib="true" /> | |
/// <reference lib="esnext" /> | |
/// <reference lib="dom" /> | |
import type { RuntimeFiber } from '@effect/io/Fiber' | |
import * as FiberRef from '@effect/io/FiberRef' | |
import * as Scheduler from '@effect/io/Scheduler' |
This file contains 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
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { |
This file contains 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 type { Otel, Scope } from '@overtone/utils/effect' | |
import { Duration, Effect, Either, pipe, Request, RequestResolver } from '@overtone/utils/effect' | |
export type MakeArgs<TTag extends string, C, E, A, E2, A2> = { | |
tag: TTag | |
fetchResources: (resourceIds: ReadonlyArray<string>) => Effect.Effect<C, E, A[]> | |
mapResult?: (fetchedResources: A) => Either.Either<E2, A2> | |
batchTimeoutMs?: number | |
batchCapacity: number | |
cache?: { |
This file contains 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 * as Context from '@effect/data/Context' | |
import * as Duration from '@effect/data/Duration' | |
import type * as Either from '@effect/data/Either' | |
import { pipe } from '@effect/data/Function' | |
import * as Deferred from '@effect/io/Deferred' | |
import * as FiberRefs from '@effect/io/FiberRefs' | |
import * as Queue from '@effect/io/Queue' | |
import * as Effect from './Effect.js' | |
import * as Otel from './Otel/index.js' |
This file contains 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 * as Data from '@effect/data/Data' | |
import { pipe } from '@effect/data/Function' | |
import * as Effect from '@effect/io/Effect' | |
import * as msgpack from 'msgpackr' | |
import * as Otel from './Otel/index.js' | |
export const fetchHead = ( | |
url: string | URL, | |
headers?: HeadersInit, |
NewerOlder