diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..f26daf1 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0ad4c6a..37be39a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,10 +31,10 @@ jobs: restore-keys: | ${{ runner.os }}-turbo- - - name: Setup Node.js 18.x + - name: Setup Node.js 20.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.x cache: 'yarn' - name: Auth with npm registry @@ -43,7 +43,7 @@ jobs: diachronic: npmAlwaysAuth: true npmRegistryServer: "https://registry.npmjs.org" - npmAuthToken: ${{ secrets.NPM_TOKEN }}' >> ~/.yarnrc.yml + npmAuthToken: ${{ secrets.DIACHRONIC_NPM_TOKEN }}' >> ~/.yarnrc.yml - name: Install 📦 run: yarn --immutable @@ -62,5 +62,5 @@ jobs: publish: yarn release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.DIACHRONIC_NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.DIACHRONIC_NPM_TOKEN }} diff --git a/examples/toaster/src/index.ts b/examples/toaster/src/index.ts index c1bafad..d4d26a9 100644 --- a/examples/toaster/src/index.ts +++ b/examples/toaster/src/index.ts @@ -4,34 +4,34 @@ import * as S from '@effect/schema/Schema' import { makeWorkflow } from '@diachronic/migrate' export const ToasterContext = S.partial( - S.struct({ - numberOfToasts: S.number.pipe(S.int(), S.positive()), - pluggedIn: S.boolean, - toastTimeDuration: S.number, + S.Struct({ + numberOfToasts: S.Number.pipe(S.int(), S.positive()), + pluggedIn: S.Boolean, + toastTimeDuration: S.Number, }) ) -export type ToasterContext = S.Schema.To +export type ToasterContext = S.Schema.Type const Signals = { - 'set-toast-time': S.struct({ - type: S.literal('set-toast-time'), - payload: S.struct({ duration: S.number }), + 'set-toast-time': S.Struct({ + type: S.Literal('set-toast-time'), + payload: S.Struct({ duration: S.Number }), }), - 'plug-it-in': S.struct({ - type: S.literal('plug-it-in'), - payload: S.undefined, + 'plug-it-in': S.Struct({ + type: S.Literal('plug-it-in'), + payload: S.Undefined, }), - 'unplug-it': S.struct({ - type: S.literal('unplug-it'), - payload: S.undefined, + 'unplug-it': S.Struct({ + type: S.Literal('unplug-it'), + payload: S.Undefined, }), } type ToasterEvents = { [K in keyof typeof Signals]: { type: K - payload: S.Schema.To<(typeof Signals)[K]>['payload'] + payload: S.Schema.Type<(typeof Signals)[K]>['payload'] } }[keyof typeof Signals] diff --git a/examples/toaster/src/v2.ts b/examples/toaster/src/v2.ts index 074bd70..419d96c 100644 --- a/examples/toaster/src/v2.ts +++ b/examples/toaster/src/v2.ts @@ -5,37 +5,37 @@ import * as S from '@effect/schema/Schema' import { makeWorkflow, MigrationFnV1 } from '@diachronic/migrate' import * as V1 from '.' -const PosInt = S.number.pipe(S.int(), S.positive()) +const PosInt = S.Number.pipe(S.int(), S.positive()) export const ToasterContext = S.partial( - S.struct({ + S.Struct({ numberOfToasts: PosInt, - powered: S.boolean, - toastTimeDuration: S.number, + powered: S.Boolean, + toastTimeDuration: S.Number, }) ) -export type ToasterContext = S.Schema.To +export type ToasterContext = S.Schema.Type const Signals = { - 'set-toast-time': S.struct({ - type: S.literal('set-toast-time'), - payload: S.struct({ duration: S.number }), + 'set-toast-time': S.Struct({ + type: S.Literal('set-toast-time'), + payload: S.Struct({ duration: S.Number }), }), - 'power-on': S.struct({ - type: S.literal('power-on'), - payload: S.struct({ volts: PosInt }), + 'power-on': S.Struct({ + type: S.Literal('power-on'), + payload: S.Struct({ volts: PosInt }), }), - 'power-off': S.struct({ - type: S.literal('power-off'), - payload: S.undefined, + 'power-off': S.Struct({ + type: S.Literal('power-off'), + payload: S.Undefined, }), } type ToasterEvents = { [K in keyof typeof Signals]: { type: K - payload: S.Schema.To<(typeof Signals)[K]>['payload'] + payload: S.Schema.Type<(typeof Signals)[K]>['payload'] } }[keyof typeof Signals] diff --git a/package.json b/package.json index 896f292..d4b5c9e 100644 --- a/package.json +++ b/package.json @@ -22,33 +22,34 @@ "release": "yarn workspaces foreach --from '@diachronic/*' --no-private npm publish --tolerate-republish && yarn changeset tag" }, "devDependencies": { + "@changesets/cli": "2.26.1", "@types/node": "20", - "changeset": "^0.2.6", "rimraf": "^5.0.1", "ts-node": "10.9.1", "turbo": "1.10.13", - "typescript": "5.2.2" + "typescript": "5.4.5" }, "resolutions": { - "effect": "2.2.3", - "@effect/schema": "0.61.5", - "@effect-use/gcp-logging": "4.0.0", - "@effect-use/temporal-config": "3.0.0", - "@effect-use/temporal-client": "3.0.0", + "effect": "3.2.5", + "@effect/schema": "0.67.14", + "@effect-use/gcp-gcs": "4.0.0", + "@effect-use/gcp-logging": "5.0.0", + "@effect-use/http-client": "4.0.0", + "@effect-use/temporal-config": "4.0.0", + "@effect-use/temporal-client": "4.0.0", "@temporalio/activity": "1.8.6", "@temporalio/workflow": "1.8.6", "@temporalio/worker": "1.8.6", "@temporalio/client": "1.8.6", "@temporalio/testing": "1.8.6", + "typescript": "5.4.5", + "fast-check": "^3.19", "mqtt": "5.0.5", "xstate": "5.0.0-beta.27" }, "engines": { "node": ">=20" }, - "publishConfig": { - "access": "restricted" - }, "repository": { "directory": ".", "type": "git", diff --git a/packages/activity/src/activity.ts b/packages/activity/src/activity.ts index 637367d..0206025 100644 --- a/packages/activity/src/activity.ts +++ b/packages/activity/src/activity.ts @@ -79,8 +79,8 @@ export const addActivityDef = createExtension(key) export class ActivityInputSchemaError extends S.TaggedError()( 'ActivityInputSchemaError', { - activityName: S.string, - message: S.optional(S.string, { + activityName: S.String, + message: S.optional(S.String, { default: () => `Activity called with wrong arguments`, }), error: S.instanceOf(ParseResult.ParseError), @@ -92,8 +92,8 @@ export class ActivityInputSchemaError extends S.TaggedError()( 'ActivityOutputSchemaError', { - activityName: S.string, - message: S.optional(S.string, { + activityName: S.String, + message: S.optional(S.String, { default: () => `Activity returned unexpected output`, }), error: S.instanceOf(ParseResult.ParseError), @@ -117,7 +117,7 @@ export const toInvokeActivity = ( activityInput: InputType, runtimeOptions?: ActivityOptions - ): Effect.Effect, OutputType> => + ): Effect.Effect, ErrorType> => pipe( Effect.tryPromise(() => scheduleActivityFn( @@ -148,7 +148,7 @@ export const toInvokeActivity = return e // orig } }) - ) as Effect.Effect, OutputType> + ) as Effect.Effect, ErrorType> export const implement = asEffect @@ -165,12 +165,12 @@ export type MakeActivitiesAsync = < Schema extends Record, API extends { [K in keyof Schema]: ( - args: S.Schema.To + args: S.Schema.Type // should any be unknown or something? ) => Effect.Effect< - any, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + any > } >( @@ -180,7 +180,7 @@ export type MakeActivitiesAsync = < runtime: Runtime.Runtime< Effect.Effect.Context<{ [K in keyof API]: ReturnType }[keyof API]> > - close: Effect.Effect + close: Effect.Effect }> ) => Promise<{ [K in keyof API]: ( @@ -192,11 +192,11 @@ export type MakeActivities = < Schema extends Record, API extends { [K in keyof Schema]: ( - args: S.Schema.To + args: S.Schema.Type ) => Effect.Effect< - any, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + any > } >( @@ -301,11 +301,11 @@ export const makeActivitiesAsync: MakeActivitiesAsync = async ( } export const makeActivitiesRuntime = ( - layer: Layer.Layer | Layer.Layer, - logLayer: Layer.Layer = TemporalLogLayer('Info') + layer: Layer.Layer | Layer.Layer, + logLayer: Layer.Layer = TemporalLogLayer('Info') ): Promise<{ runtime: Runtime.Runtime - close: Effect.Effect + close: Effect.Effect }> => pipe( Effect.Do, @@ -315,7 +315,7 @@ export const makeActivitiesRuntime = ( ), Effect.map(({ runtime, scope }) => ({ runtime, - close: Scope.close(scope, Exit.unit), + close: Scope.close(scope, Exit.void), })), Effect.tapErrorCause(Effect.logError), Effect.runPromise diff --git a/packages/activity/src/basics.ts b/packages/activity/src/basics.ts index 3166dd5..331a458 100644 --- a/packages/activity/src/basics.ts +++ b/packages/activity/src/basics.ts @@ -1,6 +1,6 @@ import * as S from '@effect/schema/Schema' import { Effect, Runtime } from 'effect' -import { map } from 'effect/ReadonlyRecord' +import { map } from 'effect/Record' import * as PR from '@effect/schema/ParseResult' import { isTagged } from 'effect/Predicate' import { dual, pipe } from 'effect/Function' @@ -205,11 +205,10 @@ export type Deps> = { // wa.notifyDevelopers.activities.notifyDevelopers.name type Effects = { - [K in keyof T]: (args: S.Schema.To) => Effect.Effect< - any, - // unknown, - S.Schema.To, - S.Schema.To + [K in keyof T]: (args: S.Schema.Type) => Effect.Effect< + S.Schema.Type, // unknown, + S.Schema.Type, + any > } @@ -312,11 +311,11 @@ const schemaMiddleware = >( // }) as typeof impl }) as { [K in keyof typeof impl]: ( - args: Parameters<(typeof impl)[K]>[0] //S.Schema.To + args: Parameters<(typeof impl)[K]>[0] //S.Schema.Type ) => Effect.Effect< - Effect.Effect.Context>, + Effect.Effect.Success>, Effect.Effect.Error> | PR.ParseError, - Effect.Effect.Success> + Effect.Effect.Context> > } } @@ -345,37 +344,37 @@ export const handle: { ( k: K, fn: ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > ): ( self: Schema ) => ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > ( self: Schema, k: K, fn: ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > ): ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > } = dual( 3, @@ -383,25 +382,25 @@ export const handle: { self: Schema, k: K, fn: ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > ): (( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R >) => { return fn as ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > } ) diff --git a/packages/activity/src/cli.ts b/packages/activity/src/cli.ts index 22eb062..eaf7fea 100644 --- a/packages/activity/src/cli.ts +++ b/packages/activity/src/cli.ts @@ -17,11 +17,9 @@ export type CLIDef = EffectDefWith<{ }> export type CLIGroupDef = Record export type CLIGroup = { - [K in keyof T]: (args: S.Schema.To) => Effect.Effect< - never, - // unknown, - S.Schema.To, - S.Schema.To + [K in keyof T]: (args: S.Schema.Type) => Effect.Effect< + S.Schema.Type, // unknown, + S.Schema.Type > } diff --git a/packages/activity/src/effect.ts b/packages/activity/src/effect.ts index d94f93c..e95c235 100644 --- a/packages/activity/src/effect.ts +++ b/packages/activity/src/effect.ts @@ -1,25 +1,26 @@ import { Effect, Runtime } from 'effect' import { EffectDef, EffectImpl, InputType } from './single' import * as S from '@effect/schema/Schema' -import { EffectsDef } from './basics' import { pipe } from 'effect/Function' import { ArrayFormatter, ParseResult } from '@effect/schema' import * as TF from '@effect/schema/TreeFormatter' import { ParseOptions } from '@effect/schema/AST' +import { EffectsDef } from './basics' -const ParseError = S.struct({ - _tag: S.literal('ParseError'), - errors: S.nonEmptyArray(S.any), +const ParseError = S.Struct({ + _tag: S.Literal('ParseError'), + errors: S.NonEmptyArray(S.Any), }) //as S.Schema type SchemaError = { _tag: ParseResult.ParseError['_tag'] - errors: readonly [ParseResult.ParseIssue, ...ParseResult.ParseIssue[]] + errors: ParseResult.ParseIssue } export const isSchemaError = (x: unknown): x is SchemaError => S.is(ParseError)(x) -export const formatSchemaErrors = (a: SchemaError) => TF.formatIssues(a.errors) +export const formatSchemaErrors = (a: SchemaError) => + TF.formatIssueSync(a.errors) export const asEffect = ( _sch: A, @@ -59,32 +60,32 @@ export const asEffectGroup = < * as a calling interface with no dependencies required * Examples: rpc/http clients, scheduleActivity */ -export type CallableGroup = { - [K in keyof T]: (args: S.Schema.To) => Effect.Effect< - never, - // unknown, - S.Schema.To, - S.Schema.To +export type CallableGroup = { + [K in keyof T]: (args: S.Schema.Type) => Effect.Effect< + S.Schema.Type, // unknown, + S.Schema.Type | ExtraErrors > } -const Issue = S.struct({ - _tag: S.string, - path: S.array(S.union(S.string, S.number, S.symbol)), - message: S.string, +const Issue = S.Struct({ + _tag: S.String, + path: S.Array(S.Union(S.String, S.Number, S.Symbol)), + message: S.String, }) export class BadInput extends S.TaggedError()('BadInput', { - functionName: S.string, - errors: S.array(Issue), + functionName: S.String, + value: S.Any, + errors: S.Array(Issue), }) { public message = 'Bad input' public nonRetryable = true } export class BadOutput extends S.TaggedError()('BadOutput', { - functionName: S.string, - errors: S.array(Issue), + functionName: S.String, + value: S.Any, + errors: S.Array(Issue), }) { public message = 'Bad output' public nonRetryable = true @@ -119,7 +120,8 @@ export const addGroupDecoder = < Effect.fail( new BadInput({ functionName, - errors: ArrayFormatter.formatError(error), + value: a, + errors: ArrayFormatter.formatErrorSync(error), }) ) ), @@ -130,7 +132,7 @@ export const addGroupDecoder = < pipe( S.decode(sch[functionName].output)(output, opts), Effect.catchTag('ParseError', (e) => { - const errors = ArrayFormatter.formatError(e) + const errors = ArrayFormatter.formatErrorSync(e) return pipe( Effect.logWarning( `${functionName} output failed schema validation` @@ -140,6 +142,7 @@ export const addGroupDecoder = < Effect.fail( new BadOutput({ functionName, + value: output, errors, }) ) diff --git a/packages/activity/src/fnobj.ts b/packages/activity/src/fnobj.ts index 1ed083a..9bbefcb 100644 --- a/packages/activity/src/fnobj.ts +++ b/packages/activity/src/fnobj.ts @@ -16,55 +16,55 @@ export const asAnnotatedEffect = ( export const implement: { ( fn: ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > ): ( self: Schema ) => { 'diachronic.meta': Schema } & (( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R >) ( self: Schema, fn: ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > ): { 'diachronic.meta': Schema } & (( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R >) } = dual( 2, ( self: Schema, fn: ( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R > ): { 'diachronic.meta': Schema } & (( - input: S.Schema.To + input: S.Schema.Type ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type, + R >) => { ;(fn as any)['diachronic.meta'] = self as any return fn as EffectImpl & diff --git a/packages/activity/src/kleisli.ts b/packages/activity/src/kleisli.ts index 304f3eb..763a84f 100644 --- a/packages/activity/src/kleisli.ts +++ b/packages/activity/src/kleisli.ts @@ -4,7 +4,7 @@ import * as S from '@effect/schema/Schema' import { pipe } from 'effect/Function' interface Kleisli { - (a: A): Effect.Effect + (a: A): Effect.Effect } const map = @@ -48,20 +48,20 @@ const businessFn = (_input: { a: string }) => const validation = map( (f: any) => (x: any) => Effect.flatMap(f(x), (result) => - S.decode(S.struct({ output: S.string }))(result as any) + S.decode(S.Struct({ output: S.String }))(result as any) ) ) const validation2 = map2( (f) => (x: any) => Effect.flatMap(f(x), (result) => - S.decode(S.struct({ output: S.string }))(result as any) + S.decode(S.Struct({ output: S.String }))(result as any) ) ) const validation3 = map3( (f) => (x) => Effect.flatMap(f(x), (result) => - S.decode(S.struct({ output: S.string }))(result as any) + S.decode(S.Struct({ output: S.String }))(result as any) ) ) const test = @@ -79,9 +79,9 @@ const testEff = f(y) as Effect.Effect, (a) => a as any ) as Effect.Effect< - D | (B extends Effect.Effect ? C : never), + D | (B extends Effect.Effect ? O : never), D | (B extends Effect.Effect ? E : never), - D | (B extends Effect.Effect ? O : never) + D | (B extends Effect.Effect ? C : never) > const tt2 = pipe( @@ -99,11 +99,7 @@ const createTestEff2 = Effect.flatMap( f(y) as Effect.Effect, (a) => a as any - ) as Effect.Effect< - B extends Effect.Effect ? C : never, - B extends Effect.Effect ? E : never, - (B extends Effect.Effect ? O : never) | true - > + ) as Effect.Effect<(B extends Effect.Effect ? O : never) | true, B extends Effect.Effect ? E : never, B extends Effect.Effect ? C : never> const inst = pipe(createTestEff2({ cr: true }), (a) => (b: any) => a(b)) const tt3 = pipe( diff --git a/packages/activity/src/multi.ts b/packages/activity/src/multi.ts index dbaceae..afc00e3 100644 --- a/packages/activity/src/multi.ts +++ b/packages/activity/src/multi.ts @@ -63,10 +63,10 @@ export const toMapOfPromiseEither = < a: Parameters[0] ) => Promise< Either< - Effect.Effect.Error>, - Effect.Effect.Success> + Effect.Effect.Success>, + Effect.Effect.Error> > > } - ) + ); } diff --git a/packages/activity/src/single.ts b/packages/activity/src/single.ts index 4039d86..43e3cd9 100644 --- a/packages/activity/src/single.ts +++ b/packages/activity/src/single.ts @@ -6,14 +6,14 @@ import { Effect } from 'effect' */ export type EffectDef = { name: string - input: S.Schema - output: S.Schema - error: S.Schema + input: S.Schema + output: S.Schema + error: S.Schema } -export type InputType = S.Schema.To -export type OutputType = S.Schema.To -export type ErrorType = S.Schema.To +export type InputType = S.Schema.Type +export type OutputType = S.Schema.Type +export type ErrorType = S.Schema.Type /** * Adds to a base definition @@ -47,14 +47,18 @@ export const annotateMethods = < }, {} as { [K in keyof T]: ReturnType }) export type EffectImpl = ( - args: S.Schema.To -) => Effect.Effect, S.Schema.To> + args: S.Schema.Type +) => Effect.Effect, S.Schema.Type, R> export type AnnotatedFn = { 'diachronic.meta': Sch } & (( - args: S.Schema.To -) => Effect.Effect, S.Schema.To>) + args: S.Schema.Type +) => Effect.Effect< + S.Schema.Type, + S.Schema.Type, + R +>) export const extend = ( a: A, diff --git a/packages/activity/src/validate.ts b/packages/activity/src/validate.ts index 70293cb..40e994b 100644 --- a/packages/activity/src/validate.ts +++ b/packages/activity/src/validate.ts @@ -68,16 +68,16 @@ export const validate = (options: ValidateOptions = defaults) => // Effect.runSync(wrapped({ b: 'ok' })) const composeK0 = - (g: (b: B) => Effect.Effect) => + (g: (b: B) => Effect.Effect) => ( - f: (a: A) => Effect.Effect - ): ((a: A) => Effect.Effect) => + f: (a: A) => Effect.Effect + ): ((a: A) => Effect.Effect) => (a) => Effect.flatMap(f(a), g) /// interface Kleisli { - (a: A): Effect.Effect + (a: A): Effect.Effect } const composeK = @@ -101,7 +101,7 @@ const composerK = // (self) => // f(self) -const validateInput = S.decode(S.struct({ a: S.string })) // validation +const validateInput = S.decode(S.Struct({ a: S.String })) // validation // target const makeValidateOutput = @@ -123,7 +123,7 @@ const businessFn = (_input: { a: string }) => const validation = map( (f: any) => (x: any) => Effect.flatMap(f(x), (result) => - S.decode(S.struct({ output: S.string }))(result as any) + S.decode(S.Struct({ output: S.String }))(result as any) ) ) const wrapped = pipe( diff --git a/packages/activity/src/validation.ts b/packages/activity/src/validation.ts index 7af70e5..a6d7d82 100644 --- a/packages/activity/src/validation.ts +++ b/packages/activity/src/validation.ts @@ -23,7 +23,7 @@ export const withInputValidation = >( export const withOutputValidation = >( fn: Fn ) => { - let next = (input: S.Schema.To) => + let next = (input: S.Schema.Type) => pipe(input, fn, Effect.flatMap(S.decode(fn['diachronic.meta'].output))) return Object.assign(next, { 'diachronic.meta': fn['diachronic.meta'], @@ -39,12 +39,12 @@ export const withh = ): (( input: Parameters[0] ) => Effect.Effect< - | Effect.Effect.Context> - | Effect.Effect.Context>, + | Effect.Effect.Success> + | Effect.Effect.Success>, | Effect.Effect.Error> | Effect.Effect.Error>, - | Effect.Effect.Success> - | Effect.Effect.Success> + | Effect.Effect.Context> + | Effect.Effect.Context> >) & { 'diachronic.meta': Base['diachronic.meta'] } => Object.assign(modifier(base), { 'diachronic.meta': base['diachronic.meta'], @@ -68,12 +68,12 @@ export const wrap = ): (( input: Parameters[0] ) => Effect.Effect< - | Effect.Effect.Context> - | Effect.Effect.Context>>, + | Effect.Effect.Success> + | Effect.Effect.Success>>, | Effect.Effect.Error> | Effect.Effect.Error>>, - | Effect.Effect.Success> - | Effect.Effect.Success>> + | Effect.Effect.Context> + | Effect.Effect.Context>> >) & { 'diachronic.meta': Base['diachronic.meta'] } => Object.assign(modifier(base), { 'diachronic.meta': base['diachronic.meta'], @@ -94,7 +94,7 @@ export const makeWrapOther = base: Base ) => ( input: Parameters[0] - ) => Effect.Effect>, any, any> + ) => Effect.Effect>> >( modifier: Ret ) => @@ -104,12 +104,12 @@ export const makeWrapOther = ): (( input: Parameters[0] ) => Effect.Effect< - | Effect.Effect.Context> - | Effect.Effect.Context>>, + | Effect.Effect.Success> + | Effect.Effect.Success>>, | Effect.Effect.Error> | Effect.Effect.Error>>, - | Effect.Effect.Success> - | Effect.Effect.Success>> + | Effect.Effect.Context> + | Effect.Effect.Context>> >) & { 'diachronic.meta': Base['diachronic.meta'] } => Object.assign(modifier(base), { 'diachronic.meta': base['diachronic.meta'], @@ -132,12 +132,12 @@ export const wrapOther = ( base: Next //Next extends infer U extends Base ? U : Next ): ((input: Parameters[0]) => Effect.Effect< - | Effect.Effect.Context> - | Effect.Effect.Context>>, - Effect.Effect.Error>, // | Effect.Effect.Error>>, - Effect.Effect.Success> // | Effect.Effect.Success>> + Effect.Effect.Success>, + Effect.Effect.Error>, + | Effect.Effect.Context> + | Effect.Effect.Context>> >) & { 'diachronic.meta': Base['diachronic.meta'] } => Object.assign(modifier(base), { 'diachronic.meta': base['diachronic.meta'], @@ -157,12 +157,12 @@ export type MakeWrap = (args: Options) => < ) => (( input: Parameters[0] ) => Effect.Effect< - | Effect.Effect.Context> - | Effect.Effect.Context>>, + | Effect.Effect.Success> + | Effect.Effect.Success>>, | Effect.Effect.Error> | Effect.Effect.Error>>, - | Effect.Effect.Success> - | Effect.Effect.Success>> + | Effect.Effect.Context> + | Effect.Effect.Context>> >) & { 'diachronic.meta': Base['diachronic.meta'] } type FnObj = { @@ -205,12 +205,12 @@ const other = ): (( input: Parameters[0] ) => Effect.Effect< - | Effect.Effect.Context> - | Effect.Effect.Context>, + | Effect.Effect.Success> + | Effect.Effect.Success>, | Effect.Effect.Error> | Effect.Effect.Error>, - | Effect.Effect.Success> - | Effect.Effect.Success> + | Effect.Effect.Context> + | Effect.Effect.Context> >) & { 'diachronic.meta': Base['diachronic.meta'] } => Object.assign(modifier(base), { 'diachronic.meta': base['diachronic.meta'], @@ -222,9 +222,9 @@ const other = const ef = asAnnotatedEffect( { name: 'hi', - input: S.struct({ a: S.string }), - output: S.literal('output'), - error: S.literal('error'), + input: S.Struct({ a: S.String }), + output: S.Literal('output'), + error: S.Literal('error'), }, (a) => Effect.flatMap(MyDep1, (dep) => @@ -236,13 +236,13 @@ interface MyDep2 { mydep2: string } -const MyDep2 = Context.Tag() +const MyDep2 = Context.GenericTag('@services/MyDep2') interface MyDep1 { mydep1: string } -const MyDep1 = Context.Tag() +const MyDep1 = Context.GenericTag('@services/MyDep1') const ok3 = pipe(ef, (a) => withh(a)((f) => { @@ -331,7 +331,7 @@ const isParseError = (x: unknown): x is PR.ParseError => // // }) as typeof impl // }) as { // [K in keyof typeof impl]: ( -// args: Parameters<(typeof impl)[K]>[0] //S.Schema.To +// args: Parameters<(typeof impl)[K]>[0] //S.Schema.Type // ) => Effect.Effect< // Effect.Effect.Context>, // Effect.Effect.Error> | PR.ParseError, diff --git a/packages/activity/test/activity.ts b/packages/activity/test/activity.ts index 067131d..8ef9049 100644 --- a/packages/activity/test/activity.ts +++ b/packages/activity/test/activity.ts @@ -8,9 +8,9 @@ import * as Activity from '../src/activity' const sampleDef = Activity.activityDef({ name: 'hello', - input: S.struct({ someInput: S.string }), - output: S.number, - error: S.string, + input: S.Struct({ someInput: S.String }), + output: S.Number, + error: S.String, 'temporal.activity': { defaultOptions: { activityId: 'foo' }, }, @@ -23,7 +23,7 @@ const sampleGroupDef = Activity.defGroup({ interface MyDep {} -const MyDep = Context.Tag('MyDep') +const MyDep = Context.GenericTag('MyDep') describe('implement an activity', () => { test('with no dependencies', () => { diff --git a/packages/activity/test/annotated-fn.ts b/packages/activity/test/annotated-fn.ts index f3b4424..5fc2e54 100644 --- a/packages/activity/test/annotated-fn.ts +++ b/packages/activity/test/annotated-fn.ts @@ -9,20 +9,20 @@ interface MyDep1 { mydep1: string } -const MyDep1 = Context.Tag() +const MyDep1 = Context.GenericTag("@services/MyDep1") interface MyDep2 { mydep2: string } -const MyDep2 = Context.Tag() +const MyDep2 = Context.GenericTag("@services/MyDep2") test('should work', () => { const someFn = def({ name: 'hi', - input: S.struct({ a: S.string }), - output: S.literal('output'), - error: S.literal('error'), + input: S.Struct({ a: S.String }), + output: S.Literal('output'), + error: S.Literal('error'), }) const ef = asAnnotatedEffect(someFn, (a) => @@ -54,9 +54,9 @@ test('should work', () => { test('implement / dual', () => { const schema = def({ name: 'hi', - input: S.struct({ a: S.string }), - output: S.literal('output'), - error: S.literal('error'), + input: S.Struct({ a: S.String }), + output: S.Literal('output'), + error: S.Literal('error'), }) const myimpl = pipe( schema, diff --git a/packages/activity/test/fns.ts b/packages/activity/test/fns.ts index 4293ab7..c60300c 100644 --- a/packages/activity/test/fns.ts +++ b/packages/activity/test/fns.ts @@ -10,20 +10,20 @@ interface MyDep1 { prop: true } -const MyDep1 = Context.Tag('MyDep1') +const MyDep1 = Context.GenericTag('MyDep1') interface MyDep2 { prop2: true } -const MyDep2 = Context.Tag('MyDep2') +const MyDep2 = Context.GenericTag('MyDep2') const makeBuildWorkflowBundle = () => { const base = def({ name: 'buildWorkflowBundle', - input: S.struct({ workflowName: S.string }), - output: S.struct({ workflowBundle: S.string }), - error: S.literal('i am a type 2'), + input: S.Struct({ workflowName: S.String }), + output: S.Struct({ workflowBundle: S.String }), + error: S.Literal('i am a type 2'), }) const withAct = pipe( base, @@ -90,9 +90,9 @@ const deriveDefaults = < const base = def({ name: 'buildWorkflowBundle', - input: S.struct({ workflowName: S.string }), - output: S.struct({ workflowBundle: S.string }), - error: S.literal('i am a type 2'), + input: S.Struct({ workflowName: S.String }), + output: S.Struct({ workflowBundle: S.String }), + error: S.Literal('i am a type 2'), }) const impl = pipe( base, diff --git a/packages/activity/test/index.ts b/packages/activity/test/index.ts index fea0154..889055f 100644 --- a/packages/activity/test/index.ts +++ b/packages/activity/test/index.ts @@ -17,9 +17,9 @@ test('annotateMethods', () => { name: 'hello', http: { method: 'GET', path: '/hello' }, 'temporal.activity': { defaultOptions: undefined, name: 'hi' }, - error: S.any, - input: S.any, - output: S.any, + error: S.Any, + input: S.Any, + output: S.Any, }) const defMyDef = defSchema() @@ -28,12 +28,12 @@ test('annotateMethods', () => { hello: one, foo: { name: 'notifyDevelopers', - input: S.struct({ message: S.string }), - output: S.struct({ - sharedProp: S.string, - notifyDevelopersOutputGoesHere: S.boolean, + input: S.Struct({ message: S.String }), + output: S.Struct({ + sharedProp: S.String, + notifyDevelopersOutputGoesHere: S.Boolean, }), - error: S.literal('i am a type 2'), + error: S.Literal('i am a type 2'), http: { method: 'POST', path: '/notifyDevelopers', diff --git a/packages/activity/test/validate.ts b/packages/activity/test/validate.ts index ca57635..22b59f6 100644 --- a/packages/activity/test/validate.ts +++ b/packages/activity/test/validate.ts @@ -12,21 +12,21 @@ interface MyDep1 { mydep1: string } -const MyDep1 = Context.Tag() +const MyDep1 = Context.GenericTag("@services/MyDep1") interface MyDep2 { mydep2: string } -const MyDep2 = Context.Tag() +const MyDep2 = Context.GenericTag("@services/MyDep2") describe('validate', () => { test('works with inline wrap', () => { const schema = def({ name: 'hi', - input: S.struct({ a: S.string }), - output: S.literal('output'), - error: S.literal('error'), + input: S.Struct({ a: S.String }), + output: S.Literal('output'), + error: S.Literal('error'), }) const justimpl = pipe( @@ -100,9 +100,9 @@ describe('validate', () => { const schema = def({ name: 'hi', - input: S.struct({ a: S.string }), - output: S.literal('output'), - error: S.literal('error'), + input: S.Struct({ a: S.String }), + output: S.Literal('output'), + error: S.Literal('error'), }) const base = pipe( @@ -134,7 +134,7 @@ describe('validate', () => { const wrapped = pipe( (input: { a: string }) => Effect.succeed('output'), (fn) => { - const validate = S.decode(S.struct({ a: S.string })) + const validate = S.decode(S.Struct({ a: S.String })) return (input: { a: string }) => pipe(validate(input), Effect.flatMap(fn)) } @@ -165,7 +165,7 @@ describe('validate', () => { >( a: A extends { 'diachronic.meta': any } & (( ...x: infer I - ) => Effect.Effect) + ) => Effect.Effect) ? true : false ) => { @@ -183,8 +183,8 @@ describe('validate', () => { // R1,E1,A1 >( f: ( - a: (i: I) => Effect.Effect - ) => (i: I) => Effect.Effect + a: (i: I) => Effect.Effect + ) => (i: I) => Effect.Effect ) => { return f // let fn = (input: Parameters[0]) => @@ -197,12 +197,12 @@ describe('validate', () => { }) }) -type EffectFn = (i: I) => Effect.Effect +type EffectFn = (i: I) => Effect.Effect type EffectFnMap = >( self: Self, - f: (self: Self) => (i: I) => Effect.Effect -) => (i: I) => Effect.Effect + f: (self: Self) => (i: I) => Effect.Effect +) => (i: I) => Effect.Effect // const effectFnMap = @@ -272,7 +272,7 @@ Effect.flatMap((a) => a) // type EffectFn = ( // f: (i: I) => Effect.Effect // ) => (i: I) => Effect.Effect -const effectFn = (f: (i: I) => Effect.Effect) => f +const effectFn = (f: (i: I) => Effect.Effect) => f const myfn = (input: { a: string }) => Effect.succeed('output') const myfn2 = effectFn((a: { s: string }) => Effect.succeed('output')) const myMap = (f: (a: Fn) => Fn) => {} @@ -287,7 +287,7 @@ const mymiddleware = < // E | Effect.Effect.Error, // A | Effect.Effect.Success // > - Impl extends (x: Input) => Effect.Effect, + Impl extends (x: Input) => Effect.Effect, // Impl extends (x: Input) => Effect.Effect, RetEffect extends ReturnType >( @@ -298,7 +298,7 @@ const mymiddleware = < // E|Effect.Effect.Error> | Effect.Effect.Error, // A|Effect.Effect.Success> | Effect.Effect.Success // > - const validate = S.decode(S.struct({ a: S.string })) + const validate = S.decode(S.Struct({ a: S.String })) return (input) => pipe(validate(input), Effect.flatMap(fn)) as any } const wrapped = pipe(myfn, mymiddleware) diff --git a/packages/ci/scripts/commands.ts b/packages/ci/scripts/commands.ts index 0c543d7..385cbb6 100644 --- a/packages/ci/scripts/commands.ts +++ b/packages/ci/scripts/commands.ts @@ -17,9 +17,9 @@ const commands = defGroup({ 'diachronic.cli': { description: `Simulates a successful example workflow deployment event.`, }, - input: S.undefined, - output: S.any, - error: S.any, + input: S.Undefined, + output: S.Any, + error: S.Any, }, }) const signalExampleWorkflowSuccess = implement( diff --git a/packages/ci/src/activities/definitions.ts b/packages/ci/src/activities/definitions.ts index 2030a8a..783de3c 100644 --- a/packages/ci/src/activities/definitions.ts +++ b/packages/ci/src/activities/definitions.ts @@ -14,174 +14,174 @@ import { NoDeploymentsFound, KubectlOpts } from './kubectl/types' import { WorkflowDeploymentSuccessEvent } from '../types' // todo. -const K8SDeployment = S.unknown -const FlagStrategy = S.struct({ - id: S.string, - name: S.string, - title: S.string, - disabled: S.boolean, +const K8SDeployment = S.Unknown +const FlagStrategy = S.Struct({ + id: S.String, + name: S.String, + title: S.String, + disabled: S.Boolean, parameters: S.optional( - S.struct({ - rollout: S.string, - stickiness: S.string, - groupId: S.string, + S.Struct({ + rollout: S.String, + stickiness: S.String, + groupId: S.String, }) ), }) -export const SignalMigrationBatchOutput = S.struct({ - successes: S.array(S.string), - failures: S.array(S.string), +export const SignalMigrationBatchOutput = S.Struct({ + successes: S.Array(S.String), + failures: S.Array(S.String), }) export const activityDefinitions = { ...simulationActivityDefinitions, getAllWorkflowVersionFlags: activityDef({ name: 'getAllWorkflowVersionFlags', - input: S.struct({ + input: S.Struct({ environment: S.optional(FeatureFlagEnvironment), - workflowName: S.string, + workflowName: S.String, }), - output: S.array(WorkflowVersionInfo), - error: S.unknown, + output: S.Array(WorkflowVersionInfo), + error: S.Unknown, }), getAllDeployedWorkflowVersions: activityDef({ name: 'getAllDeployedWorkflowVersions', description: 'Returns all deployed workflow versions, unique by their version id, using the diachronic/version-id Kubernetes label', - input: S.struct({ - workflowName: S.string, + input: S.Struct({ + workflowName: S.String, }), - output: S.array(S.string), - error: S.unknown, + output: S.Array(S.String), + error: S.Unknown, }), getWorkflowIdsToMigrateToTaskQueueByFeatureFlag: activityDef({ name: 'getWorkflowIdsToMigrateToTaskQueueByFeatureFlag', - input: S.struct({ - workflowName: S.string, - fromTaskQueue: S.string, - toTaskQueue: S.string, + input: S.Struct({ + workflowName: S.String, + fromTaskQueue: S.String, + toTaskQueue: S.String, }), - output: S.struct({ - toMigrate: S.array(S.string), - numberRemaining: S.number, + output: S.Struct({ + toMigrate: S.Array(S.String), + numberRemaining: S.Number, }), - error: S.unknown, + error: S.Unknown, }), applyWorkflowVersionFlag: activityDef({ name: 'applyWorkflowVersionFlag', - input: S.struct({ + input: S.Struct({ environment: S.optional(FeatureFlagEnvironment), - workflowName: S.string, - versionId: S.string, + workflowName: S.String, + versionId: S.String, }), output: WorkflowVersionInfo, - error: S.unknown, + error: S.Unknown, }), applyWorkflowTrafficRouting: activityDef({ name: 'applyWorkflowTrafficRouting', - input: S.struct({ + input: S.Struct({ environment: S.optional(FeatureFlagEnvironment), - workflowFlagName: S.string, - percent: S.string, + workflowFlagName: S.String, + percent: S.String, }), - output: S.struct({ flagName: S.string }), - error: S.unknown, + output: S.Struct({ flagName: S.String }), + error: S.Unknown, }), getRunningWorkflowIds: activityDef({ name: 'getRunningWorkflowIds', - input: S.struct({ - workflowName: S.optional(S.string), - taskQueue: S.string, + input: S.Struct({ + workflowName: S.optional(S.String), + taskQueue: S.String, }), - output: S.array( + output: S.Array( // workflowId - S.string + S.String ), - error: S.unknown, + error: S.Unknown, }), getRunningWorkflowIdsCount: activityDef({ name: 'getRunningWorkflowIdsCount', - input: S.struct({ - workflowName: S.optional(S.string), - taskQueue: S.string, + input: S.Struct({ + workflowName: S.optional(S.String), + taskQueue: S.String, }), - output: S.number, - error: S.unknown, + output: S.Number, + error: S.Unknown, }), signalMigration: activityDef({ name: 'signalMigration', - input: S.struct({ - workflowId: S.string, - taskQueue: S.string, + input: S.Struct({ + workflowId: S.String, + taskQueue: S.String, }), - output: S.unknown, - error: S.unknown, + output: S.Unknown, + error: S.Unknown, }), signalMigrationBatch: activityDef({ name: 'signalMigrationBatch', - input: S.struct({ - workflowIds: S.array(S.string), - taskQueue: S.string, + input: S.Struct({ + workflowIds: S.Array(S.String), + taskQueue: S.String, }), output: SignalMigrationBatchOutput, - error: S.unknown, + error: S.Unknown, }), getWorkflowDeployments: activityDef({ name: 'getWorkflowDeployments', - input: S.struct({ - workflowName: S.string, - versionId: S.string, + input: S.Struct({ + workflowName: S.String, + versionId: S.String, }), - output: S.array( + output: S.Array( // todo. k8s deployment effect schema - S.unknown + S.Unknown ), - error: S.union(NoDeploymentsFound, S.any), + error: S.Union(NoDeploymentsFound, S.Any), }), deleteKubernetesDeployment: activityDef({ name: 'deleteKubernetesDeployment', input: S.extend( - S.struct({ name: S.string, namespace: S.string }), + S.Struct({ name: S.String, namespace: S.String }), KubectlOpts.pipe(S.omit('name', 'namespace')) ), - output: S.string, - error: S.any, + output: S.String, + error: S.Any, }), findKubernetesDeployments: activityDef({ name: 'findKubernetesDeployments', input: KubectlOpts, - output: S.array(K8SDeployment), - error: S.unknown, + output: S.Array(K8SDeployment), + error: S.Unknown, }), deleteWorkflowVersionFlag: activityDef({ name: 'deleteWorkflowVersionFlag', - input: S.struct({ + input: S.Struct({ environment: S.optional(FeatureFlagEnvironment), - workflowName: S.string, - versionId: S.string, + workflowName: S.String, + versionId: S.String, }), - output: S.unknown, - error: S.unknown, + output: S.Unknown, + error: S.Unknown, }), getFlagStrategies: activityDef({ name: 'getFlagStrategies', - input: S.struct({ - flagName: S.string, + input: S.Struct({ + flagName: S.String, environment: S.optional(FeatureFlagEnvironment), - projectId: S.optional(S.string), + projectId: S.optional(S.String), }), - output: S.array(FlagStrategy), - error: S.unknown, + output: S.Array(FlagStrategy), + error: S.Unknown, }), } -const RolloutWorkflowInput = S.struct({ - workflowName: S.string, +const RolloutWorkflowInput = S.Struct({ + workflowName: S.String, toVersion: WorkflowVersionInfo, - initialRolloutPercent: S.optional(S.number), - stepPercent: S.optional(S.number), - stepIntervalSeconds: S.optional(S.number), - maxRolloutPercent: S.optional(S.number), + initialRolloutPercent: S.optional(S.Number), + stepPercent: S.optional(S.Number), + stepIntervalSeconds: S.optional(S.Number), + maxRolloutPercent: S.optional(S.Number), }) const rollout = workflowDef({ @@ -200,17 +200,17 @@ const rollout = workflowDef({ }, childWorkflows: {}, }, - output: S.unknown, - error: S.unknown, + output: S.Unknown, + error: S.Unknown, }) const migration = workflowDef({ name: 'migration', description: '', - input: S.struct({ - workflowName: S.string, - fromTaskQueue: S.string, - toTaskQueue: S.string, + input: S.Struct({ + workflowName: S.String, + fromTaskQueue: S.String, + toTaskQueue: S.String, }), 'temporal.workflow': { signals: {}, @@ -230,14 +230,14 @@ const migration = workflowDef({ parentClosePolicy: ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON, }, }, - output: S.unknown, - error: S.unknown, + output: S.Unknown, + error: S.Unknown, }) const cleanup = workflowDef({ name: 'cleanup', description: '', - input: S.struct({ + input: S.Struct({ versionInfo: WorkflowVersionInfo, }), 'temporal.workflow': { @@ -255,14 +255,14 @@ const cleanup = workflowDef({ parentClosePolicy: ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON, }, }, - output: S.unknown, - error: S.unknown, + output: S.Unknown, + error: S.Unknown, }) const workflowCI = workflowDef({ name: 'workflowCI', description: '', - input: S.unknown, + input: S.Unknown, 'temporal.workflow': { signals: { 'diachronic.ci.workflow.deploy.success': WorkflowDeploymentSuccessEvent, @@ -284,8 +284,8 @@ const workflowCI = workflowDef({ cleanup, }, }, - output: S.unknown, - error: S.unknown, + output: S.Unknown, + error: S.Unknown, }) export const workflowDefinitions = { diff --git a/packages/ci/src/activities/index.ts b/packages/ci/src/activities/index.ts index 31fb1cb..22466b9 100644 --- a/packages/ci/src/activities/index.ts +++ b/packages/ci/src/activities/index.ts @@ -28,13 +28,13 @@ import { activities as simulationActivities } from './simulation' import { activityDefinitions } from './definitions' import { Kubectl, makeKubectl } from './kubectl' -const ActivitiesEnv = S.struct({ - FEATURE_FLAG_SERVER_URL: S.string, - FEATURE_FLAG_CLIENT_API_KEY: S.string, - FEATURE_FLAG_ADMIN_API_KEY: S.string, - SIGNALER_BASE_URL: S.string, - TEMPORAL_NAMESPACE: S.string, - TEMPORAL_ADDRESS: S.string, +const ActivitiesEnv = S.Struct({ + FEATURE_FLAG_SERVER_URL: S.String, + FEATURE_FLAG_CLIENT_API_KEY: S.String, + FEATURE_FLAG_ADMIN_API_KEY: S.String, + SIGNALER_BASE_URL: S.String, + TEMPORAL_NAMESPACE: S.String, + TEMPORAL_ADDRESS: S.String, }) const env = S.decodeSync(ActivitiesEnv)(process.env as any, { errors: 'all' }) diff --git a/packages/ci/src/activities/kubectl/index.ts b/packages/ci/src/activities/kubectl/index.ts index 1c9c767..da83b12 100644 --- a/packages/ci/src/activities/kubectl/index.ts +++ b/packages/ci/src/activities/kubectl/index.ts @@ -1,6 +1,6 @@ import { exec, ExecError } from '@diachronic/toolbox/infra/util' import { Context, Effect, pipe } from 'effect' -import { NonEmptyArray } from 'effect/ReadonlyArray' +import { NonEmptyArray } from "effect/Array" import { UnknownException } from 'effect/Cause' import { KubectlOpts, NoDeploymentsFound } from './types' // import type { Deployment } from '@ei-tech/k8s-api/v1/Deployment' @@ -34,7 +34,7 @@ export const makeKubectl = () => ({ delete: { deployment: ( opts?: KubectlOpts - ): Effect.Effect => { + ): Effect.Effect => { const { namespaceFilter, labelsFilter, @@ -71,11 +71,7 @@ export const makeKubectl = () => ({ get: { deployment: ( opts?: KubectlOpts - ): Effect.Effect< - never, - NoDeploymentsFound | ExecError | UnknownException, - NonEmptyArray - > => { + ): Effect.Effect, NoDeploymentsFound | ExecError | UnknownException> => { const { namespaceFilter, labelsFilter, @@ -131,4 +127,4 @@ export const makeKubectl = () => ({ export type Kubectl = ReturnType -export const Kubectl = Context.Tag() +export const Kubectl = Context.GenericTag("@services/Kubectl") diff --git a/packages/ci/src/activities/kubectl/types.ts b/packages/ci/src/activities/kubectl/types.ts index 42a1cd0..a2076db 100644 --- a/packages/ci/src/activities/kubectl/types.ts +++ b/packages/ci/src/activities/kubectl/types.ts @@ -1,20 +1,20 @@ import * as S from '@effect/schema/Schema' export const KubectlOpts = S.partial( - S.struct({ - name: S.string, - namespace: S.string, - labels: S.partial(S.record(S.string, S.string)), - extraFlags: S.string, - allNamespaces: S.literal(true), + S.Struct({ + name: S.String, + namespace: S.String, + labels: S.partial(S.Record(S.String, S.String)), + extraFlags: S.String, + allNamespaces: S.Literal(true), }) ) -export type KubectlOpts = S.Schema.To +export type KubectlOpts = S.Schema.Type export class NoDeploymentsFound extends S.TaggedError()( 'NoDeploymentsFound', { - message: S.string, - data: S.record(S.string, S.any), + message: S.String, + data: S.Record(S.String, S.Any), } ) {} diff --git a/packages/ci/src/activities/simulation/index.ts b/packages/ci/src/activities/simulation/index.ts index f6674ff..75a48bf 100644 --- a/packages/ci/src/activities/simulation/index.ts +++ b/packages/ci/src/activities/simulation/index.ts @@ -49,14 +49,15 @@ const getWorkflowSimulationEffect = ( Effect.if( args.environment !== 'production' && args.scenarioName === 'default', { - onTrue: defaultWorkflowSimulationEffect(args), - onFalse: Effect.fail( - new UnsupportedSimulation({ - scenarioName: args.scenarioName, - environment: args.environment, - message: `Only non-production simulations for the 'default' scenario are implemented.`, - }) - ), + onTrue: () => defaultWorkflowSimulationEffect(args), + onFalse: () => + Effect.fail( + new UnsupportedSimulation({ + scenarioName: args.scenarioName, + environment: args.environment, + message: `Only non-production simulations for the 'default' scenario are implemented.`, + }) + ), } ) diff --git a/packages/ci/src/activities/simulation/types.ts b/packages/ci/src/activities/simulation/types.ts index 73006e1..0d20159 100644 --- a/packages/ci/src/activities/simulation/types.ts +++ b/packages/ci/src/activities/simulation/types.ts @@ -5,36 +5,36 @@ import { activityDef } from '@diachronic/activity/activity' export class UnsupportedSimulation extends S.TaggedError()( 'UnsupportedSimulation', { - scenarioName: S.optional(S.string), - environment: S.optional(S.string), - message: S.string, + scenarioName: S.optional(S.String), + environment: S.optional(S.String), + message: S.String, } ) { public nonRetryable = true as true } -const SimulationEnvironment = S.literal('development', 'production') +const SimulationEnvironment = S.Literal('development', 'production') export const StartWorkflowSimulationInput = S.extend( - S.struct({ - workflowName: S.string, - versionId: S.string, + S.Struct({ + workflowName: S.String, + versionId: S.String, environment: SimulationEnvironment, - taskQueue: S.string, - scenarioName: S.string, + taskQueue: S.String, + scenarioName: S.String, }), - S.partial(S.struct({ numberOfSimulations: S.number })) + S.partial(S.Struct({ numberOfSimulations: S.Number })) ) -export type StartWorkflowSimulationInput = S.Schema.To< +export type StartWorkflowSimulationInput = S.Schema.Type< typeof StartWorkflowSimulationInput > -export const StartWorkflowSimulationOutput = S.struct({ - workflowName: S.string, - versionId: S.string, +export const StartWorkflowSimulationOutput = S.Struct({ + workflowName: S.String, + versionId: S.String, environment: SimulationEnvironment, - scenarioName: S.string, - successes: S.array(S.unknown), - failures: S.array(S.unknown), + scenarioName: S.String, + successes: S.Array(S.Unknown), + failures: S.Array(S.Unknown), timeStarted: ISODateString, }) @@ -43,6 +43,6 @@ export const activityDefinitions = { name: 'startWorkflowSimulation', input: StartWorkflowSimulationInput, output: StartWorkflowSimulationOutput, - error: UnsupportedSimulation.struct, + error: S.Struct(UnsupportedSimulation.fields), }), } diff --git a/packages/ci/src/lib/dbfx.ts b/packages/ci/src/lib/dbfx.ts index df9b1d8..07a9040 100644 --- a/packages/ci/src/lib/dbfx.ts +++ b/packages/ci/src/lib/dbfx.ts @@ -1,16 +1,16 @@ import { Effect, pipe, Ref } from 'effect' export type DbFx = { - reset: (v: Db) => Effect.Effect - swap: (f: (a: Db) => Db) => Effect.Effect - assoc: (k: K, v: Db[K]) => Effect.Effect - dissoc: (k: K) => Effect.Effect + reset: (v: Db) => Effect.Effect + swap: (f: (a: Db) => Db) => Effect.Effect + assoc: (k: K, v: Db[K]) => Effect.Effect + dissoc: (k: K) => Effect.Effect updateIn: ( k: K, f: (x: Db[K]) => Db[K] - ) => Effect.Effect - get: (k: K) => Effect.Effect - deref: () => Effect.Effect + ) => Effect.Effect + get: (k: K) => Effect.Effect + deref: () => Effect.Effect } export const DbFx = >(a: Ref.Ref) => ({ @@ -41,7 +41,7 @@ export const DbFx = >(a: Ref.Ref) => ({ */ const withExternalPersistence = >( a: Ref.Ref, - persist: (a: T) => Effect.Effect, + persist: (a: T) => Effect.Effect, config?: { debounceTimeout?: number } ) => ({ swap: (f: (a: T) => T) => @@ -60,7 +60,7 @@ const withExternalPersistence = >( */ const fromPredicate = (f: (x: T) => boolean | [boolean, string]) => - (x: any): Effect.Effect => { + (x: any): Effect.Effect => { const ret = f(x) if (Array.isArray(ret)) { const [b, reason] = ret diff --git a/packages/ci/src/lib/self.ts b/packages/ci/src/lib/self.ts index 18b9f54..437a947 100644 --- a/packages/ci/src/lib/self.ts +++ b/packages/ci/src/lib/self.ts @@ -16,17 +16,13 @@ import { WorkflowNotFoundError as TemporalWorkflowNotFoundError } from '@tempora export type Self = { close: (exit: Exit.Exit) => Effect.Effect - isContinueAsNewSuggested: () => Effect.Effect - continueAsNew: (state: Db) => Effect.Effect + isContinueAsNewSuggested: () => Effect.Effect + continueAsNew: (state: Db) => Effect.Effect signalWorkflow: ( workflowId: string, signalName: K, data: Signals[K] - ) => Effect.Effect< - never, - SignalExternalWorkflowError, - SignalExternalWorkflowOutput - > + ) => Effect.Effect } export const make = < @@ -41,11 +37,7 @@ export const make = < workflowId: string, signalName: K, data: Signals[K] - ): Effect.Effect< - never, - SignalExternalWorkflowError, - SignalExternalWorkflowOutput - > => + ): Effect.Effect => pipe( Effect.Do, Effect.bind('handle', () => @@ -104,7 +96,7 @@ export const make = < isContinueAsNewSuggested: () => Effect.succeed(wf.workflowInfo().continueAsNewSuggested), - } + }; } export const of = (self: Self) => self diff --git a/packages/ci/src/lib/signals.ts b/packages/ci/src/lib/signals.ts index bf55c7b..b5e9af9 100644 --- a/packages/ci/src/lib/signals.ts +++ b/packages/ci/src/lib/signals.ts @@ -7,7 +7,7 @@ import * as AST from '@effect/schema/AST' * @param x * @param tagKey */ -export const extractStringTagsFromUnion = >( +export const extractStringTagsFromUnion = >( x: T, tagKey = 'type' ) => { diff --git a/packages/ci/src/signals.ts b/packages/ci/src/signals.ts index c80f040..e181394 100644 --- a/packages/ci/src/signals.ts +++ b/packages/ci/src/signals.ts @@ -1,25 +1,25 @@ import * as S from '@effect/schema/Schema' -export const StartRolloutSignal = S.struct({ - type: S.literal('diachronic.ci.workflow.rollout.start'), - payload: S.struct({ - workflowName: S.string, - environment: S.literal('development', 'production'), +export const StartRolloutSignal = S.Struct({ + type: S.Literal('diachronic.ci.workflow.rollout.start'), + payload: S.Struct({ + workflowName: S.String, + environment: S.Literal('development', 'production'), }), }) -export const StartMigrationSignal = S.struct({ - type: S.literal('diachronic.ci.workflow.migration.start'), - payload: S.struct({ - workflowName: S.string, - environment: S.literal('development', 'production'), +export const StartMigrationSignal = S.Struct({ + type: S.Literal('diachronic.ci.workflow.migration.start'), + payload: S.Struct({ + workflowName: S.String, + environment: S.Literal('development', 'production'), }), }) -export const CancelRolloutSignal = S.struct({ - type: S.literal('diachronic.ci.cancel-rollout'), - payload: S.struct({ - workflowName: S.string, - environment: S.literal('development', 'production'), +export const CancelRolloutSignal = S.Struct({ + type: S.Literal('diachronic.ci.cancel-rollout'), + payload: S.Struct({ + workflowName: S.String, + environment: S.Literal('development', 'production'), }), }) diff --git a/packages/ci/src/types.ts b/packages/ci/src/types.ts index 288f3b7..63b43f4 100644 --- a/packages/ci/src/types.ts +++ b/packages/ci/src/types.ts @@ -11,14 +11,14 @@ export type WorkflowDeployEventPayload = { isDarkDeploy?: boolean } -const WorkflowDeployEventPayload = S.struct({ - workflowName: S.string, - versionId: S.string, - sha: S.string, - environment: S.union(S.literal('development'), S.literal('production')), +const WorkflowDeployEventPayload = S.Struct({ + workflowName: S.String, + versionId: S.String, + sha: S.String, + environment: S.Union(S.Literal('development'), S.Literal('production')), eventTime: ISODateString, - isNonMigratory: S.optional(S.boolean, { default: () => false }), - isDarkDeploy: S.optional(S.boolean, { default: () => false }), + isNonMigratory: S.optional(S.Boolean, { default: () => false }), + isDarkDeploy: S.optional(S.Boolean, { default: () => false }), }) /** @@ -55,35 +55,35 @@ export type WorkflowDeployEvent = payload: WorkflowDeployEventPayload } -export const WorkflowDeploymentSuccessEvent = S.struct({ - type: S.literal('diachronic.ci.workflow.deploy.success'), +export const WorkflowDeploymentSuccessEvent = S.Struct({ + type: S.Literal('diachronic.ci.workflow.deploy.success'), payload: WorkflowDeployEventPayload, }) -export const WorkflowDeployEvent = S.union( +export const WorkflowDeployEvent = S.Union( WorkflowDeploymentSuccessEvent, - S.struct({ - type: S.literal('diachronic.ci.workflow.deploy.pending'), + S.Struct({ + type: S.Literal('diachronic.ci.workflow.deploy.pending'), payload: WorkflowDeployEventPayload, }), - S.struct({ - type: S.literal('diachronic.ci.workflow.deploy.queued'), + S.Struct({ + type: S.Literal('diachronic.ci.workflow.deploy.queued'), payload: WorkflowDeployEventPayload, }), - S.struct({ - type: S.literal('diachronic.ci.workflow.deploy.waiting'), + S.Struct({ + type: S.Literal('diachronic.ci.workflow.deploy.waiting'), payload: WorkflowDeployEventPayload, }), - S.struct({ - type: S.literal('diachronic.ci.workflow.deploy.in_progress'), + S.Struct({ + type: S.Literal('diachronic.ci.workflow.deploy.in_progress'), payload: WorkflowDeployEventPayload, }), - S.struct({ - type: S.literal('diachronic.ci.workflow.deploy.error'), + S.Struct({ + type: S.Literal('diachronic.ci.workflow.deploy.error'), payload: WorkflowDeployEventPayload, }), - S.struct({ - type: S.literal('diachronic.ci.workflow.deploy.failure'), + S.Struct({ + type: S.Literal('diachronic.ci.workflow.deploy.failure'), payload: WorkflowDeployEventPayload, }) ) diff --git a/packages/ci/src/workflow-ci.ts b/packages/ci/src/workflow-ci.ts index 835008d..3670220 100644 --- a/packages/ci/src/workflow-ci.ts +++ b/packages/ci/src/workflow-ci.ts @@ -1,4 +1,14 @@ -import { Context, Effect, Exit, Fiber, Layer, pipe, Ref, Runtime } from 'effect' +import { + Context, + Effect, + Exit, + Fiber, + Layer, + pipe, + Ref, + Runtime, + Unify, +} from 'effect' import * as R from 'ramda' import * as wf from '@temporalio/workflow' import { WorkflowDeployEventPayload } from './types' @@ -19,39 +29,39 @@ import { WorkflowVersionInfo } from '@diachronic/toolbox/infra/versioning-types' import { WorkflowDef } from '@diachronic/workflow/workflow' import { Self } from './lib/self' -type Signaling>> = { +type Signaling>> = { emitter: EventEmitter emit: ( evt: SignalName, - payload: S.Schema.To['payload'] - ) => Effect.Effect + payload: S.Schema.Type['payload'] + ) => Effect.Effect handle: ( evt: SignalName, fn: ( - e: S.Schema.To['payload'] + e: S.Schema.Type['payload'] ) => Effect.Effect ) => void route: < Signal extends { - [K in keyof SignalMap]: S.Schema.To + [K in keyof SignalMap]: S.Schema.Type }[keyof SignalMap] >( signal: Signal - ) => Effect.Effect + ) => Effect.Effect } // const SelfRuntime = Context.Tag>('self-runtime') class NoRouteError extends S.TaggedError()('NoRoute', { - message: S.string, - input: S.struct({ - type: S.string, - payload: S.unknown, + message: S.String, + input: S.Struct({ + type: S.String, + payload: S.Unknown, }), }) {} const makeSignalRouter = < - SignalMap extends Record>, + SignalMap extends Record>, SignalingTag extends Context.Tag, Signaling> >( signalMap: SignalMap, @@ -62,7 +72,7 @@ const makeSignalRouter = < const emit = ( evt: SignalName, - payload: S.Schema.To['payload'] + payload: S.Schema.Type['payload'] ) => pipe( Effect.logDebug('Emitting signal'), @@ -73,7 +83,7 @@ const makeSignalRouter = < const handle = ( evt: SignalName, fn: ( - e: S.Schema.To['payload'] + e: S.Schema.Type['payload'] ) => Effect.Effect ): void => void emitter.on(evt, (x) => @@ -93,7 +103,7 @@ const makeSignalRouter = < const route = < Signal extends { - [K in keyof SignalMap]: S.Schema.To + [K in keyof SignalMap]: S.Schema.Type }[keyof SignalMap] >( signal: Signal @@ -139,7 +149,7 @@ const makeSignalRouter = < } } -export const Signaling = Context.Tag>( +export const Signaling = Context.GenericTag>( 'diachronic.workflow-ci.signaling' ) @@ -148,39 +158,33 @@ const Signals = workflowDefinitions.workflowCI['temporal.workflow'].signals type ChildWorkflowDefinitions = T['temporal.workflow']['childWorkflows'] -type MigrationError = S.Schema.To< +type MigrationError = S.Schema.Type< ChildWorkflowDefinitions< typeof workflowDefinitions.workflowCI >['migration']['error'] > -type MigrationSuccess = S.Schema.To< +type MigrationSuccess = S.Schema.Type< ChildWorkflowDefinitions< typeof workflowDefinitions.workflowCI >['migration']['output'] > const InternalSignals = { - 'migration.done': S.any as S.Schema< - never, - { - type: 'migration.done' - payload: Exit.Exit - } - >, - 'rollout.done': S.any as S.Schema< - never, - { - type: 'rollout.done' - payload: Exit.Exit - } - >, + 'migration.done': S.Any as S.Schema<{ + type: 'migration.done' + payload: Exit.Exit + }>, + 'rollout.done': S.Any as S.Schema<{ + type: 'rollout.done' + payload: Exit.Exit + }>, } -type InternalSignals = S.Schema.To< +type InternalSignals = S.Schema.Type< (typeof InternalSignals)[keyof typeof InternalSignals] > type SignalMap = typeof InternalSignals & typeof Signals -type Signals = S.Schema.To<(typeof Signals)[keyof typeof Signals]> & +type Signals = S.Schema.Type<(typeof Signals)[keyof typeof Signals]> & InternalSignals type Db = { @@ -214,7 +218,7 @@ type Ctx = { fx: typeof activities & typeof workflows self: Self } -export const Ctx = Context.Tag() +export const Ctx = Context.GenericTag('@services/Ctx') const getFromVersion = ( versionId: string, @@ -329,7 +333,7 @@ export const onWorkflowDeploymentSuccess = ({ ) ) ), - Effect.tap(() => Effect.succeed(Effect.unit)) + Effect.tap(() => Effect.succeed(Effect.void)) ), }) ) @@ -366,7 +370,7 @@ export const onWorkflowDeploymentSuccess = ({ R.assocPath(['simulations', e.scenarioName || ''], e, a) ) ), - Effect.tap(() => Effect.succeed(Effect.unit)) + Effect.tap(() => Effect.succeed(Effect.void)) ) ) ) @@ -376,17 +380,21 @@ export const onWorkflowDeploymentSuccess = ({ // Spawn rollout process if not a dark deploy, otherwise wait for the signal Effect.bind('rollout', ({ signaling }) => Effect.if(!!isDarkDeploy, { - onTrue: pipe( - Effect.logInfo('Is dark deploy. Waiting for start rollout signal'), - Effect.flatMap(() => Effect.die(Effect.succeed('waiting'))) - ), - onFalse: signaling.route({ - type: 'diachronic.ci.workflow.rollout.start', - payload: { - workflowName, - environment, - }, - }), + onTrue: () => + pipe( + Effect.logInfo( + 'Is dark deploy. Waiting for start rollout signal' + ), + Effect.flatMap(() => Effect.die(Effect.succeed('waiting'))) + ), + onFalse: () => + signaling.route({ + type: 'diachronic.ci.workflow.rollout.start', + payload: { + workflowName, + environment, + }, + }), }) ) ) @@ -398,25 +406,26 @@ const handleCleanup = (args: any) => db.deref(), Effect.flatMap(({ fromVersion, config: { isNonMigratory } }) => Effect.if(!!fromVersion && isNonMigratory === true, { - onTrue: pipe( - Effect.logInfo('Spawning cleanup workflow'), - Effect.flatMap(() => - fx.cleanup.startChild( - { versionInfo: fromVersion }, - { - temporalOptions: { - workflowId: `cleanup.${fromVersion.taskQueue}`, - parentClosePolicy: - ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON, - }, - } + onTrue: () => + pipe( + Effect.logInfo('Spawning cleanup workflow'), + Effect.flatMap(() => + fx.cleanup.startChild( + { versionInfo: fromVersion }, + { + temporalOptions: { + workflowId: `cleanup.${fromVersion.taskQueue}`, + parentClosePolicy: + ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON, + }, + } + ) + ), + Effect.tap((handle) => + db.swap(R.assocPath(['workflows', 'cleanup', 'handle'], handle)) ) ), - Effect.tap((handle) => - db.swap(R.assocPath(['workflows', 'cleanup', 'handle'], handle)) - ) - ), - onFalse: Effect.succeed(Effect.unit), + onFalse: () => Effect.succeed(Effect.void), }) ), Effect.withLogSpan('handleCleanup') @@ -434,86 +443,87 @@ const handleMigration = (_args: any) => config: { workflowName, isNonMigratory }, }) => Effect.if(!!isNonMigratory, { - onTrue: Effect.succeed('Workflow is non-migratory'), - onFalse: Effect.if(!fromVersion, { - onTrue: Effect.succeed( - 'No previous version. Nothing to migrate.' - ), - onFalse: pipe( - Effect.log('Queuing migration workflow...'), - Effect.flatMap(() => + onTrue: () => Effect.succeed('Workflow is non-migratory'), + onFalse: () => + Effect.if(!fromVersion, { + onTrue: () => + Effect.succeed('No previous version. Nothing to migrate.'), + onFalse: () => pipe( - fx.migration.startChild( - { - workflowName, - fromTaskQueue: fromVersion!.taskQueue, - toTaskQueue: toVersion.taskQueue, - }, - { - temporalOptions: { - workflowId: `migration.${workflowName}`, //_from_${fromTaskQueue}_to_${toTaskQueue}`, - parentClosePolicy: - ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON, - }, - } - ), - Effect.tap((wf) => - db.swap((state) => - R.assocPath( - ['workflows', 'migration', 'handle'], - wf, - state - ) - ) - ), - Effect.tap(() => Effect.logInfo('Migration started')), - Effect.flatMap((wf) => + Effect.log('Queuing migration workflow...'), + Effect.flatMap(() => pipe( - wf.result(), - Effect.matchEffect({ - onSuccess: (a) => - pipe( - Effect.logInfo( - 'Migration workflow completed successfully' - ), - Effect.flatMap(() => - Effect.flatMap(Signaling, (signaling) => - signaling.emit('migration.done', a as any) - ) - ) - ), - onFailure: (e) => - pipe( - Effect.logInfo('Migration workflow failed'), - Effect.flatMap(() => - Effect.flatMap(Signaling, (signaling) => - signaling.emit('migration.done', e as any) - ) - ) - ), + fx.migration.startChild( + { + workflowName, + fromTaskQueue: fromVersion!.taskQueue, + toTaskQueue: toVersion.taskQueue, + }, + { + temporalOptions: { + workflowId: `migration.${workflowName}`, //_from_${fromTaskQueue}_to_${toTaskQueue}`, + parentClosePolicy: + ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON, + }, + } + ), + Effect.tap((wf) => + db.swap((state) => + R.assocPath( + ['workflows', 'migration', 'handle'], + wf, + state + ) + ) + ), + Effect.tap(() => Effect.logInfo('Migration started')), + Effect.flatMap((wf) => + pipe( + wf.result(), + Effect.matchEffect({ + onSuccess: (a) => + pipe( + Effect.logInfo( + 'Migration workflow completed successfully' + ), + Effect.flatMap(() => + Effect.flatMap(Signaling, (signaling) => + signaling.emit('migration.done', a as any) + ) + ) + ), + onFailure: (e) => + pipe( + Effect.logInfo('Migration workflow failed'), + Effect.flatMap(() => + Effect.flatMap(Signaling, (signaling) => + signaling.emit('migration.done', e as any) + ) + ) + ), + }), + Effect.withLogSpan('migration-process') + ) + ), + Effect.catchAllCause((e) => { + if (S.is(WorkflowExecutionAlreadyStartedError)(e)) { + return pipe( + Effect.logWarning('Migration already running', e), + Effect.annotateLogs({ + workflowName, + fromVersion, + toVersion, + }), + Effect.flatMap(() => Effect.succeed(e)) + ) + } + return Effect.fail(e) }), - Effect.withLogSpan('migration-process') + Effect.withLogSpan('start-migration') ) - ), - Effect.catchAllCause((e) => { - if (S.is(WorkflowExecutionAlreadyStartedError)(e)) { - return pipe( - Effect.logWarning('Migration already running', e), - Effect.annotateLogs({ - workflowName, - fromVersion, - toVersion, - }), - Effect.flatMap(() => Effect.succeed(e)) - ) - } - return Effect.fail(e) - }), - Effect.withLogSpan('start-migration') - ) - ) - ), - }), + ) + ), + }), }) ), Effect.withLogSpan('handleMigration') @@ -527,96 +537,100 @@ const handleRollout = ({ workflowName }: { workflowName: string }) => db.deref(), Effect.flatMap(({ fromVersion, toVersion }) => Effect.if(!fromVersion, { - onTrue: fx.applyWorkflowTrafficRouting({ - percent: '100', - workflowFlagName: toVersion.flagName, - }), - onFalse: pipe( - Effect.logInfo('Queuing rollout workflow...'), - Effect.flatMap(() => - fx.rollout.startChild( - { - workflowName, - toVersion, - }, - { - temporalOptions: { - workflowId: `rollout.${workflowName}`, - parentClosePolicy: - ParentClosePolicy.PARENT_CLOSE_POLICY_TERMINATE, + onTrue: () => + fx.applyWorkflowTrafficRouting({ + percent: '100', + workflowFlagName: toVersion.flagName, + }), + onFalse: () => + pipe( + Effect.logInfo('Queuing rollout workflow...'), + Effect.flatMap(() => + fx.rollout.startChild( + { + workflowName, + toVersion, }, - } - ) - ), - Effect.tap((wf) => - db.swap((state) => - R.assocPath(['workflows', 'rollout', 'handle'], wf, state) - ) - ), - Effect.tap(() => Effect.logInfo('Rollout started')), - Effect.tap(() => - pipe( - db.deref(), - Effect.flatMap((state) => { - if ( - // state.config.isDarkDeploy && - !state.config.isNonMigratory - ) { + { + temporalOptions: { + workflowId: `rollout.${workflowName}`, + parentClosePolicy: + ParentClosePolicy.PARENT_CLOSE_POLICY_TERMINATE, + }, + } + ) + ), + Effect.tap((wf) => + db.swap((state) => + R.assocPath(['workflows', 'rollout', 'handle'], wf, state) + ) + ), + Effect.tap(() => Effect.logInfo('Rollout started')), + Effect.tap(() => + pipe( + db.deref(), + Effect.flatMap((state) => { + if ( + // state.config.isDarkDeploy && + !state.config.isNonMigratory + ) { + return pipe( + Effect.logInfo( + 'Workflow is migratory. Starting migration process' + ), + Effect.flatMap(() => + Effect.flatMap(Signaling, (signaling) => + signaling.route({ + type: 'diachronic.ci.workflow.migration.start', + payload: { + workflowName: state.config.workflowName, + environment: state.config.environment, + }, + }) + ) + ) + ) + } return pipe( Effect.logInfo( - 'Workflow is migratory. Starting migration process' + 'Workflow is non-migratory. Skipping migration process' ), - Effect.flatMap(() => - Effect.flatMap(Signaling, (signaling) => - signaling.route({ - type: 'diachronic.ci.workflow.migration.start', - payload: { - workflowName: state.config.workflowName, - environment: state.config.environment, - }, - }) - ) - ) + Effect.tap(() => Effect.void) ) - } - return pipe( - Effect.logInfo( - 'Workflow is non-migratory. Skipping migration process' - ), - Effect.tap(() => Effect.unit) - ) - }) - ) - ), - Effect.flatMap((wf) => - pipe( - wf.result(), - Effect.matchEffect({ - onSuccess: (a) => - pipe( - Effect.logInfo('Rollout workflow completed successfully'), - Effect.flatMap(() => - Effect.flatMap(Signaling, (signaling) => - signaling.emit('rollout.done', a as any) + }) + ) + ), + Effect.flatMap((wf) => + pipe( + wf.result(), + Effect.matchEffect({ + onSuccess: (a) => + pipe( + Effect.logInfo( + 'Rollout workflow completed successfully' + ), + Effect.flatMap(() => + Effect.flatMap(Signaling, (signaling) => + signaling.emit('rollout.done', a as any) + ) ) - ) - ), - onFailure: (e) => - pipe( - Effect.logInfo('Rollout workflow failed'), - Effect.flatMap(() => - Effect.flatMap(Signaling, (signaling) => - signaling.emit('rollout.done', e as any) + ), + onFailure: (e) => + pipe( + Effect.logInfo('Rollout workflow failed'), + Effect.flatMap(() => + Effect.flatMap(Signaling, (signaling) => + signaling.emit('rollout.done', e as any) + ) ) - ) - ), - }), - Effect.withLogSpan('rollout-process') - // Effect.fork, - // Effect.flatMap((x) => x.await) + ), + }), + Effect.withLogSpan('rollout-process') + // Effect.fork, + // Effect.flatMap((x) => x.await) + ) ) - ) - ), + ), }) ) ) @@ -651,7 +665,7 @@ export const registerSignalHandlers = (runtime: Runtime.Runtime) => { } return pipe( Effect.logInfo(`No rollout workflow found. Can't cancel.`), - Effect.flatMap(() => Effect.succeed(Effect.unit)) + Effect.flatMap(() => Effect.succeed(Effect.void)) ) }) ) @@ -668,7 +682,7 @@ export const registerSignalHandlers = (runtime: Runtime.Runtime) => { db.swap(R.assocPath(['workflows', 'rollout', 'exit'], args)), Effect.flatMap(() => db.deref()), Effect.flatMap( - Effect.unifiedFn((state) => { + Unify.unify((state) => { if (state.config.isNonMigratory && state.workflows.rollout?.exit) { if (state.workflows.rollout?.exit) { return pipe( @@ -693,7 +707,7 @@ export const registerSignalHandlers = (runtime: Runtime.Runtime) => { } return pipe( Effect.logInfo(`Rollout done, migration still running.`), - Effect.flatMap(() => Effect.succeed(Effect.unit)) + Effect.flatMap(() => Effect.succeed(Effect.void)) ) }) ) @@ -708,7 +722,7 @@ export const registerSignalHandlers = (runtime: Runtime.Runtime) => { ), Effect.flatMap(() => db.get('workflows')), Effect.flatMap( - Effect.unifiedFn((workflows) => { + Unify.unify((workflows) => { if (workflows.rollout?.exit) { return pipe( Effect.logInfo( @@ -721,7 +735,7 @@ export const registerSignalHandlers = (runtime: Runtime.Runtime) => { Effect.logInfo( `Migration finished but rollout workflow still pending.` ), - Effect.flatMap(() => Effect.succeed(Effect.unit)) + Effect.flatMap(() => Effect.succeed(Effect.void)) ) }) ) diff --git a/packages/ci/src/workflow-cleanup.ts b/packages/ci/src/workflow-cleanup.ts index ddffb74..6e6a891 100644 --- a/packages/ci/src/workflow-cleanup.ts +++ b/packages/ci/src/workflow-cleanup.ts @@ -23,7 +23,7 @@ const schedule = mapGroupToScheduleActivities( workflowDefinitions.cleanup['temporal.workflow'].activities ) -export type CleanupWorkflowArgs = S.Schema.To< +export type CleanupWorkflowArgs = S.Schema.Type< (typeof workflowDefinitions.cleanup)['input'] > @@ -38,11 +38,11 @@ export type CleanupDb = { } } -export const CleanupCtx = Context.Tag<{ +export const CleanupCtx = Context.GenericTag<{ db: DbFx fx: typeof schedule self: Self -}>() +}>('@services/CleanupCtx') export const program = (args: CleanupWorkflowConfig) => Effect.flatMap(CleanupCtx, ({ fx, db, self }) => { @@ -99,15 +99,16 @@ export const program = (args: CleanupWorkflowConfig) => self.isContinueAsNewSuggested(), Effect.flatMap((shouldContinueAsNew) => Effect.if(shouldContinueAsNew, { - onTrue: pipe( - db.deref(), - Effect.flatMap((state) => self.continueAsNew(state)), - Effect.matchEffect({ - onSuccess: () => Effect.succeed(true), - onFailure: () => Effect.succeed(false), - }) - ), - onFalse: Effect.succeed(false), + onTrue: () => + pipe( + db.deref(), + Effect.flatMap((state) => self.continueAsNew(state)), + Effect.matchEffect({ + onSuccess: () => Effect.succeed(true), + onFailure: () => Effect.succeed(false), + }) + ), + onFalse: () => Effect.succeed(false), }) ) ) diff --git a/packages/ci/src/workflow-migration.ts b/packages/ci/src/workflow-migration.ts index 4fef9b9..a0ff675 100644 --- a/packages/ci/src/workflow-migration.ts +++ b/packages/ci/src/workflow-migration.ts @@ -65,11 +65,11 @@ export type MigrateDb = { } } -export const MigrateCtx = Context.Tag<{ +export const MigrateCtx = Context.GenericTag<{ db: DbFx fx: typeof schedule self: Self -}>() +}>('@services/MigrateCtx') export const program = (args: MigrationWorkflowConfig) => Effect.flatMap(MigrateCtx, ({ fx, db, self }) => { @@ -94,26 +94,27 @@ export const program = (args: MigrationWorkflowConfig) => ), Effect.bind('migrationResult', ({ currentBatchToSignal: toSignal }) => Effect.if(toSignal.length > 0, { - onTrue: pipe( - Effect.logInfo( - `Sending migration signal to ${toSignal.length} workflows` - ), - Effect.flatMap(() => - pipe( - fx.signalMigrationBatch({ - workflowIds: toSignal, - taskQueue: args.toTaskQueue, - }), - Effect.flatMap((result) => - db.updateIn('signaledWorkflows', (xs = []) => [ - ...xs, - ...result.successes, - ]) + onTrue: () => + pipe( + Effect.logInfo( + `Sending migration signal to ${toSignal.length} workflows` + ), + Effect.flatMap(() => + pipe( + fx.signalMigrationBatch({ + workflowIds: toSignal, + taskQueue: args.toTaskQueue, + }), + Effect.flatMap((result) => + db.updateIn('signaledWorkflows', (xs = []) => [ + ...xs, + ...result.successes, + ]) + ) ) ) - ) - ), - onFalse: Effect.logInfo('Nothing new to signal'), + ), + onFalse: () => Effect.logInfo('Nothing new to signal'), }) ), Effect.bind('unmigratedWorkflowIds', () => @@ -168,15 +169,16 @@ export const program = (args: MigrationWorkflowConfig) => self.isContinueAsNewSuggested(), Effect.flatMap((shouldContinueAsNew) => Effect.if(shouldContinueAsNew, { - onTrue: pipe( - db.deref(), - Effect.flatMap((state) => self.continueAsNew(state)), - Effect.matchEffect({ - onSuccess: () => Effect.succeed(true), - onFailure: () => Effect.succeed(false), - }) - ), - onFalse: Effect.succeed(false), + onTrue: () => + pipe( + db.deref(), + Effect.flatMap((state) => self.continueAsNew(state)), + Effect.matchEffect({ + onSuccess: () => Effect.succeed(true), + onFailure: () => Effect.succeed(false), + }) + ), + onFalse: () => Effect.succeed(false), }) ) ) diff --git a/packages/ci/src/workflow-rollout.ts b/packages/ci/src/workflow-rollout.ts index b1103d4..082780a 100644 --- a/packages/ci/src/workflow-rollout.ts +++ b/packages/ci/src/workflow-rollout.ts @@ -73,10 +73,10 @@ const activities = mapGroupToScheduleActivities( workflowDefinitions.rollout['temporal.workflow'].activities ) -export const RolloutCtx = Context.Tag<{ +export const RolloutCtx = Context.GenericTag<{ db: DbFx fx: typeof activities -}>() +}>("@services/RolloutCtx") export const isGeneralTrafficStrategy = (x: FlagStrategy) => x.name === 'flexibleRollout' && x.title === 'All other traffic' @@ -140,8 +140,8 @@ const isAutomatedGeneralTrafficRolloutEnabled = ( expected: expectedPercent, strategy, }), - Effect.flatMap(() => Effect.unit) - ) + Effect.flatMap(() => Effect.void) + ); } // Written for a single flag that controls both workflow start diff --git a/packages/ci/test/ci.ts b/packages/ci/test/ci.ts index d37a76d..e2717e5 100644 --- a/packages/ci/test/ci.ts +++ b/packages/ci/test/ci.ts @@ -76,7 +76,7 @@ test('workflow run completed with success', async () => { migration: { startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -94,7 +94,7 @@ test('workflow run completed with success', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -111,7 +111,7 @@ test('workflow run completed with success', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -165,7 +165,7 @@ test('workflow run completed with success', async () => { const migrationDone = jest.fn((args) => { console.log('it was called with', args) expect(Exit.isExit(args)).toEqual(true) - return Effect.unit + return Effect.void; }) signaling.handle('migration.done', migrationDone) @@ -337,7 +337,7 @@ test('production deployment + unsupported simulation', async () => { migration: { startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -355,7 +355,7 @@ test('production deployment + unsupported simulation', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -372,7 +372,7 @@ test('production deployment + unsupported simulation', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -426,7 +426,7 @@ test('production deployment + unsupported simulation', async () => { const migrationDone = jest.fn((args) => { console.log('it was called with', args) expect(Exit.isExit(args)).toEqual(true) - return Effect.unit + return Effect.void; }) signaling.handle('migration.done', migrationDone) @@ -583,7 +583,7 @@ test('dark deploy + migration', async () => { migration: { startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -601,7 +601,7 @@ test('dark deploy + migration', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -618,7 +618,7 @@ test('dark deploy + migration', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -673,7 +673,7 @@ test('dark deploy + migration', async () => { const migrationDoneHandler = jest.fn((args) => { expect(Exit.isExit(args)).toEqual(true) - return Effect.unit + return Effect.void; }) signaling.handle('migration.done', migrationDoneHandler) @@ -828,7 +828,7 @@ test('non-migratory', async () => { migration: { startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -846,7 +846,7 @@ test('non-migratory', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -863,7 +863,7 @@ test('non-migratory', async () => { executeChild: (args) => Effect.succeed('OK'), startChild: (args) => Effect.succeed({ - cancel: () => Effect.succeed(Effect.unit), + cancel: () => Effect.succeed(Effect.void), signal: () => Effect.succeed('OK'), result: () => pipe( @@ -918,7 +918,7 @@ test('non-migratory', async () => { const migrationDoneHandler = jest.fn((args) => { expect(Exit.isExit(args)).toEqual(true) - return Effect.unit + return Effect.void; }) signaling.handle('migration.done', migrationDoneHandler) diff --git a/packages/ci/test/cleanup.ts b/packages/ci/test/cleanup.ts index 294126f..1cdcf00 100644 --- a/packages/ci/test/cleanup.ts +++ b/packages/ci/test/cleanup.ts @@ -27,7 +27,7 @@ const fakeFx = ( getRunningWorkflowIdsCount: function (args: { readonly workflowName?: string | undefined readonly taskQueue: string - }): Effect.Effect { + }): Effect.Effect { const idx = fc.sample( fc.integer({ min: 0, max: state.oldRunningWorkflowIds.length }), 1 @@ -44,7 +44,7 @@ const fakeFx = ( getWorkflowDeployments: function (args: { readonly workflowName?: string readonly versionId?: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed([ { apiVersion: 'apps/v1', @@ -63,14 +63,14 @@ const fakeFx = ( deleteKubernetesDeployment: function (args: { readonly name: string readonly namespace: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed('OK') }, deleteWorkflowVersionFlag: function (args: { readonly environment?: string | undefined readonly workflowName: string readonly versionId: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed('OK') }, }) diff --git a/packages/ci/test/migration.ts b/packages/ci/test/migration.ts index 3c9b387..d887998 100644 --- a/packages/ci/test/migration.ts +++ b/packages/ci/test/migration.ts @@ -45,23 +45,19 @@ const fakeFx = ( getRunningWorkflowIds: function (args: { readonly workflowName?: string | undefined readonly taskQueue: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed(state.oldRunningWorkflowIds) }, signalMigration: function (args: { readonly taskQueue: string readonly workflowId: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed('OK') }, signalMigrationBatch: function (args: { readonly taskQueue: string readonly workflowIds: readonly string[] - }): Effect.Effect< - never, - unknown, - { successes: string[]; failures: string[] } - > { + }): Effect.Effect<{ successes: string[]; failures: string[] }, unknown> { return Effect.succeed({ successes: args.workflowIds as string[], failures: [], @@ -70,7 +66,7 @@ const fakeFx = ( getWorkflowDeployments: function (args: { readonly workflowName?: string readonly versionId?: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed([ { apiVersion: 'apps/v1', @@ -89,14 +85,14 @@ const fakeFx = ( deleteKubernetesDeployment: function (args: { readonly name: string readonly namespace: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed('OK') }, deleteWorkflowVersionFlag: function (args: { readonly environment?: string | undefined readonly workflowName: string readonly versionId: string - }): Effect.Effect { + }): Effect.Effect { return Effect.succeed('OK') }, }) diff --git a/packages/ci/test/rollout.ts b/packages/ci/test/rollout.ts index ec9fb02..9ec3269 100644 --- a/packages/ci/test/rollout.ts +++ b/packages/ci/test/rollout.ts @@ -35,7 +35,7 @@ test('workflow rollout - no interrupt, flag rollout percent always matches what readonly environment?: string | undefined readonly workflowFlagName: string readonly percent: string - }): Effect.Effect { + }): Effect.Effect<{ readonly flagName: string }, unknown> { return Effect.succeed({ flagName: args.workflowFlagName }) }, getFlagStrategies: () => { @@ -140,7 +140,7 @@ test('workflow rollout - with interrupt', async () => { readonly environment?: string | undefined readonly workflowFlagName: string readonly percent: string - }): Effect.Effect { + }): Effect.Effect<{ readonly flagName: string }, unknown> { return Effect.succeed({ flagName: args.workflowFlagName }) }, getFlagStrategies: () => { diff --git a/packages/feature-flag-client/src/index.ts b/packages/feature-flag-client/src/index.ts index b643f8d..c99ec8f 100644 --- a/packages/feature-flag-client/src/index.ts +++ b/packages/feature-flag-client/src/index.ts @@ -135,7 +135,7 @@ export const makeFeatureFlagClient = async (args: { export type FeatureFlagClient = Awaited< ReturnType > -export const FeatureFlagClient = Context.Tag( +export const FeatureFlagClient = Context.GenericTag( 'diachronic.feature-flag-client' ) /** diff --git a/packages/http/src/client.ts b/packages/http/src/client.ts index 706106e..3452ead 100644 --- a/packages/http/src/client.ts +++ b/packages/http/src/client.ts @@ -13,9 +13,7 @@ import { GroupDef } from './types' export const isSchemaError = (e: any): e is ParseError => isRecord(e) && e._tag === 'ParseError' -export const validateURL = ( - input: string -): Effect.Effect => +export const validateURL = (input: string): Effect.Effect => pipe( Effect.try(() => new URL(input)), Effect.mapError( @@ -44,11 +42,11 @@ export const client = ( return [ name, ( - args: S.Schema.To, + args: S.Schema.Type, headers?: (typeof def)['diachronic.http']['request'] extends { - headers: S.Schema + headers: S.Schema } - ? S.Schema.To< + ? S.Schema.Type< (typeof def)['diachronic.http']['request']['headers'] > : never @@ -97,16 +95,15 @@ export const client = ( }) ) as { [K in keyof Def]: ( - args: S.Schema.To, + args: S.Schema.Type, headers?: Def[K]['diachronic.http']['request'] extends { - headers: S.Schema + headers: S.Schema } - ? S.Schema.To + ? S.Schema.Type : never ) => Effect.Effect< - never, - InvalidURL | ParseError | S.Schema.To, - S.Schema.To + S.Schema.Type, + InvalidURL | ParseError | S.Schema.Type > } ) diff --git a/packages/http/src/index.ts b/packages/http/src/index.ts index c45bf84..19166a6 100644 --- a/packages/http/src/index.ts +++ b/packages/http/src/index.ts @@ -81,7 +81,7 @@ export const isHTTPErrorResponse = ( export const makeRequestParser = (def: A) => pipe(def['diachronic.http'].request, (spec) => { const { type, ...ks } = spec - return S.struct(ks) as unknown as HTTPInputSchema + return S.Struct(ks) as unknown as HTTPInputSchema; }) /** @@ -95,7 +95,7 @@ export const implement = ( args: HTTPInput, req: FastifyRequest, res: FastifyReply - ) => Effect.Effect> + ) => Effect.Effect, HTTPErrorResponse, R> ): RouteImpl => { const reqSpec = makeRequestParser(def) const method = def['diachronic.http'].method @@ -129,7 +129,7 @@ export const implementGroup = < args: HTTPInput, req: FastifyRequest, res: FastifyReply - ) => Effect.Effect> + ) => Effect.Effect, HTTPErrorResponse, R> } >( _sch: Sch, @@ -181,7 +181,7 @@ export const createServer = < f: ( req: FastifyRequest, res: FastifyReply - ) => Effect.Effect + ) => Effect.Effect ) => { server[method](path, (req, res) => pipe( @@ -209,7 +209,7 @@ export const createServer = < ) ) }, - } + }; } export const createServer2 = < @@ -237,9 +237,9 @@ export const createServer2 = < req: FastifyRequest, res: FastifyReply ) => Effect.Effect< - RuntimeDeps, + HTTPSuccessResponse, HTTPErrorResponse, - HTTPSuccessResponse + RuntimeDeps > ) => { app[method](path, (req, res) => @@ -267,5 +267,5 @@ export const createServer2 = < ) ) }, - } + }; } diff --git a/packages/http/src/types.ts b/packages/http/src/types.ts index 5a78133..4d48eb0 100644 --- a/packages/http/src/types.ts +++ b/packages/http/src/types.ts @@ -28,10 +28,10 @@ export type HTTPConfig = { method: HTTPMethod request: { type: 'json' - headers?: S.Schema - query?: S.Schema - params?: S.Schema - body?: S.Schema + headers?: S.Schema + query?: S.Schema + params?: S.Schema + body?: S.Schema } response?: { json?: ReadonlyArray @@ -63,8 +63,8 @@ export const fromDef = ( export const defGroup = defSchema() export type JSONResponseSpec = { - status: S.Schema - body: S.Schema + status: S.Schema + body: S.Schema } // I don't know how typescript wants us to express this... export type JSONResponseType = @@ -81,41 +81,41 @@ export type JSONResponseType = | (T1 extends JSONResponseSpec ? { _tag: 'diachronic.http.response' - status: S.Schema.To + status: S.Schema.Type headers?: Record - body: S.Schema.To + body: S.Schema.Type } : never) | (T2 extends JSONResponseSpec ? { _tag: 'diachronic.http.response' - status: S.Schema.To + status: S.Schema.Type headers?: Record - body: S.Schema.To + body: S.Schema.Type } : never) | (T3 extends JSONResponseSpec ? { _tag: 'diachronic.http.response' - status: S.Schema.To + status: S.Schema.Type headers?: Record - body: S.Schema.To + body: S.Schema.Type } : never) | (T4 extends JSONResponseSpec ? { _tag: 'diachronic.http.response' - status: S.Schema.To + status: S.Schema.Type headers?: Record - body: S.Schema.To + body: S.Schema.Type } : never) | (T5 extends JSONResponseSpec ? { _tag: 'diachronic.http.response' - status: S.Schema.To + status: S.Schema.Type headers?: Record - body: S.Schema.To + body: S.Schema.Type } : never) : never @@ -144,17 +144,19 @@ export type HTTPSuccessResponse = { headers?: Record } -export const ServerConfig = Context.Tag() +export const ServerConfig = Context.GenericTag( + '@services/ServerConfig' +) export type Handler = ( args: HTTPInput, req: FastifyRequest, res: FastifyReply -) => Effect.Effect> +) => Effect.Effect, HTTPErrorResponse, R> export type HTTPHandler = ( req: FastifyRequest, res: FastifyReply -) => Effect.Effect> +) => Effect.Effect, HTTPErrorResponse, R> export type RouteImpl = { def: A @@ -166,31 +168,22 @@ export type RouteImpl = { export type HTTPInput = A['request']['type'] extends 'json' ? { - [K in Exclude]: S.Schema.To + [K in Exclude]: S.Schema.Type< + A['request'][K] + > } : never export type HTTPInputSchema = A['request']['type'] extends 'json' - ? S.Schema< - never, - S.FromStruct<{ - [K in Exclude< - keyof A['request'], - 'type' - >]: A['request'][K] extends S.Schema - ? A['request'][K] - : never - }>, - S.ToStruct<{ - [K in Exclude< - keyof A['request'], - 'type' - >]: A['request'][K] extends S.Schema - ? A['request'][K] - : never - }> - > + ? S.Struct<{ + [K in Exclude< + keyof A['request'], + 'type' + >]: A['request'][K] extends S.Schema + ? A['request'][K] + : never + }> : never export type GroupDef = Record< @@ -202,13 +195,13 @@ export type GroupDef = Record< export type GroupImpl = { [K in keyof Sch]: ( - args: S.Schema.To, + args: S.Schema.Type, req: FastifyRequest, res: FastifyReply ) => Effect.Effect< - R, - S.Schema.To, - S.Schema.To | JSONResponseType + S.Schema.Type | JSONResponseType, + S.Schema.Type, + R > } /** diff --git a/packages/http/test/index.ts b/packages/http/test/index.ts index 4c88c26..ab57952 100644 --- a/packages/http/test/index.ts +++ b/packages/http/test/index.ts @@ -9,9 +9,9 @@ import { Success, } from '../src' -const Postgres = Context.Tag<{ - getData: (args: any) => Effect.Effect -}>() +const Postgres = Context.GenericTag<{ + getData: (args: any) => Effect.Effect +}>("@services/Postgres") const TestFail = Layer.succeed( Postgres, @@ -25,21 +25,21 @@ test('simple 2', async () => { const defs = { getData: { name: 'getData', - input: S.any, - output: S.any, - error: S.any, + input: S.Any, + output: S.Any, + error: S.Any, 'diachronic.http': { method: 'GET', path: '/data/:id', request: { type: 'json', - params: S.struct({ id: S.string }), + params: S.Struct({ id: S.String }), }, response: { json: [ { - status: S.literal(200), - body: S.struct({ helloWorld: S.boolean }), + status: S.Literal(200), + body: S.Struct({ helloWorld: S.Boolean }), }, ], }, @@ -113,21 +113,21 @@ test('handling success', async () => { const defs = { getData: { name: 'getData', - input: S.any, - output: S.any, - error: S.any, + input: S.Any, + output: S.Any, + error: S.Any, 'diachronic.http': { method: 'GET', path: '/data/:id', request: { type: 'json', - params: S.struct({ id: S.string }), + params: S.Struct({ id: S.String }), }, response: { json: [ { - status: S.literal(200), - body: S.struct({ helloWorld: S.boolean }), + status: S.Literal(200), + body: S.Struct({ helloWorld: S.Boolean }), }, ], }, diff --git a/packages/k8s-health-check/src/index.ts b/packages/k8s-health-check/src/index.ts index 4cc2dbc..5b78d40 100644 --- a/packages/k8s-health-check/src/index.ts +++ b/packages/k8s-health-check/src/index.ts @@ -1,10 +1,10 @@ import * as S from '@effect/schema/Schema' import Fastify, { FastifyInstance } from 'fastify' -export const HTTPProbeConfig = S.struct({ path: S.string }) +export const HTTPProbeConfig = S.Struct({ path: S.String }) -export const HealthCheckServerConfig = S.struct({ - port: S.optional(S.number, { default: () => 8080 }), +export const HealthCheckServerConfig = S.Struct({ + port: S.optional(S.Number, { default: () => 8080 }), livenessProbe: S.optional(HTTPProbeConfig, { default: () => ({ path: '/liveness', @@ -22,7 +22,7 @@ export const HealthCheckServerConfig = S.struct({ }), }) -export type HealthCheckServerConfig = S.Schema.To< +export type HealthCheckServerConfig = S.Schema.Type< typeof HealthCheckServerConfig > diff --git a/packages/migrate/src/analysis.ts b/packages/migrate/src/analysis.ts index 90eb171..9ba8875 100644 --- a/packages/migrate/src/analysis.ts +++ b/packages/migrate/src/analysis.ts @@ -20,7 +20,7 @@ export const normalizeTransitionTarget = (target: string | string[]) => export type StateId = `#${string}` export const StateId = pipe( - S.string, + S.String, S.startsWith('#'), S.identifier('StateId'), S.brand('StateId'), @@ -30,7 +30,7 @@ export const StateId = pipe( export type ChildStateReference = `${typeof stateHierarchyDelimiter}${string}` export const ChildStateReference = pipe( - S.string, + S.String, S.startsWith(stateHierarchyDelimiter), S.identifier('ChildStateReference'), S.description('Reference to a state below another.'), @@ -38,7 +38,7 @@ export const ChildStateReference = pipe( ) export type PeerStateReference = string export const PeerStateReference = pipe( - S.string, + S.String, S.identifier('PeerStateReference'), S.description('Reference to a state in the same level as another.'), S.brand('PeerStateReference') @@ -67,14 +67,14 @@ export const makeStateId = (parentId: StateId, key: string): StateId => { * 'xstate.after(quote/expiration-duration)#get-insurance.quoted' */ // export const XStateTimerId = pipe(S.string, S.pattern(/xstate\.after\(.+\)#.+/)) -export const XStateTimerId = S.templateLiteral( - S.literal('xstate.after('), - S.string, - S.literal(')'), - S.literal('#'), - S.string +export const XStateTimerId = S.TemplateLiteral( + S.Literal('xstate.after('), + S.String, + S.Literal(')'), + S.Literal('#'), + S.String ) -export type XStateTimerId = S.Schema.To +export type XStateTimerId = S.Schema.Type // TODO. test this. it's expected to return a string for all XStateTimerId export const getDelayFunctionName = (s: XStateTimerId): string => { @@ -85,10 +85,10 @@ export const getDelayFunctionName = (s: XStateTimerId): string => { return match[1] as string } -export const XStateTimerData = S.struct({ - type: S.literal('xstate.after'), - name: S.string, - stateId: S.string, +export const XStateTimerData = S.Struct({ + type: S.Literal('xstate.after'), + name: S.String, + stateId: S.String, delayId: pipe( XStateTimerId, S.description( @@ -97,28 +97,31 @@ export const XStateTimerData = S.struct({ S.examples(['xstate.after(quote/expiration-duration)#get-insurance.quoted']) ), }) -export type XStateTimerData = S.Schema.To +export type XStateTimerData = S.Schema.Type export const XStateAfterIdDataConverter = S.transform( XStateTimerId, XStateTimerData, - (s) => { - const [delayName, statePath] = s - .replace('xstate.after(', '') - .replace(')', '') - .split('#') - return { - type: 'xstate.after' as const, - name: delayName, - stateId: '#' + statePath, - delayId: s, - } - }, - (m) => m.delayId + { + decode: (s) => { + const [delayName, statePath] = s + .replace('xstate.after(', '') + .replace(')', '') + .split('#') + return { + type: 'xstate.after' as const, + name: delayName, + stateId: '#' + statePath, + delayId: s, + } + }, + + encode: (m) => m.delayId, + } ) -export const XStateStateValue = S.union(S.string, S.record(S.string, S.unknown)) -export type XStateStateValue = S.Schema.To +export const XStateStateValue = S.Union(S.String, S.Record(S.String, S.Unknown)) +export type XStateStateValue = S.Schema.Type export const datafyXStateAfterId = (s: string) => S.decodeUnknownSync(XStateAfterIdDataConverter)(s) diff --git a/packages/migrate/src/clock.ts b/packages/migrate/src/clock.ts index d806200..701030b 100644 --- a/packages/migrate/src/clock.ts +++ b/packages/migrate/src/clock.ts @@ -63,11 +63,11 @@ export class CustomClock implements XStateClockInterface, Clock.Clock { this.timeouts.delete(id) } - get currentTimeMillis(): Effect.Effect { + get currentTimeMillis(): Effect.Effect { return Effect.succeed(this.now()) } - sleep(duration: Duration.Duration): Effect.Effect { + sleep(duration: Duration.Duration): Effect.Effect { const simulatedClockTimeout = this.setTimeout.bind(this) return Effect.async((resume) => { simulatedClockTimeout(() => { @@ -76,7 +76,7 @@ export class CustomClock implements XStateClockInterface, Clock.Clock { }) } - get currentTimeNanos(): Effect.Effect { + get currentTimeNanos(): Effect.Effect { return Effect.succeed(this.unsafeCurrentTimeNanos()) } @@ -121,11 +121,11 @@ export class TestClock extends SimulatedClock implements Clock.Clock { return super.clearTimeout(id) } - get currentTimeMillis(): Effect.Effect { + get currentTimeMillis(): Effect.Effect { return Effect.succeed(this.now()) } - sleep(duration: Duration.Duration): Effect.Effect { + sleep(duration: Duration.Duration): Effect.Effect { const simulatedClockTimeout = this.setTimeout.bind(this) return Effect.async((resume) => { simulatedClockTimeout(() => { @@ -134,7 +134,7 @@ export class TestClock extends SimulatedClock implements Clock.Clock { }) } - get currentTimeNanos(): Effect.Effect { + get currentTimeNanos(): Effect.Effect { return Effect.succeed(this.unsafeCurrentTimeNanos()) } diff --git a/packages/migrate/src/index.ts b/packages/migrate/src/index.ts index 607b4e9..661f2b7 100644 --- a/packages/migrate/src/index.ts +++ b/packages/migrate/src/index.ts @@ -39,7 +39,7 @@ import { dissoc } from 'ramda' * @param interpreter */ export const forwardSignalsToXState = < - EventNameToEventDecoderMap extends Record> + EventNameToEventDecoderMap extends Record> >( eventMap: EventNameToEventDecoderMap, interpreter: Actor @@ -47,7 +47,7 @@ export const forwardSignalsToXState = < Object.entries(eventMap).forEach(([eventName, decoder]) => { const signal = defineSignal< - S.Schema.To< + S.Schema.Type< EventNameToEventDecoderMap[keyof EventNameToEventDecoderMap] > >(eventName) @@ -142,10 +142,10 @@ const getContinuationXStateNode = ( /** * Arguments passed to a workflow that is continuing from a previous run */ -const Continuation = S.struct({ +const Continuation = S.Struct({ state: XStateStateValue, - context: S.unknown, - timers: S.unknown, + context: S.Unknown, + timers: S.Unknown, }) type Continuation = { state: StateValue @@ -176,10 +176,10 @@ const isValidContinuation = (x: unknown): x is Continuation => S.is(Continuation)(x) type WorkflowDefinition = { - context: S.Schema - state: S.Schema - signals: Record> - timers: Record> + context: S.Schema + state: S.Schema + signals: Record> + timers: Record> } /** @@ -203,15 +203,11 @@ export type MigrationFnV1< state: Prev['migrationStates'] context: Prev['context'] timers: Prev['delays'] -}) => Effect.Effect< - never, - never, - { - state: Next['migrationStates'] // extends MetaMachine ? States : never - context: Next['context'] - timers: Next['delays'] - } -> +}) => Effect.Effect<{ + state: Next['migrationStates'] // extends MetaMachine ? States : never + context: Next['context'] + timers: Next['delays'] +}> /** * Defines a machine that can be migrated from or to * Requires MigrationStateIds which can be generated from @@ -314,7 +310,7 @@ export const makeWorkflow = < }: { name: string machine: Next['machine'] - signals: Record> + signals: Record> receive?: Prev extends any ? MigrationFnV1 : never db?: DbFns logger?: { diff --git a/packages/migrate/src/visit.ts b/packages/migrate/src/visit.ts index 4e78853..3bb33cb 100644 --- a/packages/migrate/src/visit.ts +++ b/packages/migrate/src/visit.ts @@ -1,7 +1,7 @@ import { AnyStateNode, StateNode, StateValue } from 'xstate' import { pipe } from 'effect/Function' import * as R from 'ramda' -import { cartesianWith } from 'effect/ReadonlyArray' +import { cartesianWith } from "effect/Array" // @ts-expect-error import type { AnyStateMachine } from 'xstate/dist/declarations/src/types' diff --git a/packages/migrate/test/index.ts b/packages/migrate/test/index.ts index 9fbe28a..cb35ba8 100644 --- a/packages/migrate/test/index.ts +++ b/packages/migrate/test/index.ts @@ -1242,8 +1242,8 @@ test('signals drained when signal storm', async () => { (snapshot) => { return ( // @ts-expect-error - snapshot?.context.events?.length === signaler.getNumberSent() - ) + (snapshot?.context.events?.length === signaler.getNumberSent()) + ); } ) diff --git a/packages/migrate/test/lib/activity-execute-on-resume.ts b/packages/migrate/test/lib/activity-execute-on-resume.ts index 1e8707f..834389e 100644 --- a/packages/migrate/test/lib/activity-execute-on-resume.ts +++ b/packages/migrate/test/lib/activity-execute-on-resume.ts @@ -46,7 +46,7 @@ const machine = createMachine( ) const signals = { - hey: S.struct({ type: S.literal('hey'), payload: S.string }), + hey: S.Struct({ type: S.Literal('hey'), payload: S.String }), } export const theWorkflow = makeWorkflow({ diff --git a/packages/migrate/test/lib/activity-migrate-when-executing-and-interruptible.ts b/packages/migrate/test/lib/activity-migrate-when-executing-and-interruptible.ts index d3babed..ad484b8 100644 --- a/packages/migrate/test/lib/activity-migrate-when-executing-and-interruptible.ts +++ b/packages/migrate/test/lib/activity-migrate-when-executing-and-interruptible.ts @@ -48,7 +48,7 @@ const machine = createMachine( ) const signals = { - hey: S.struct({ type: S.literal('hey'), payload: S.string }), + hey: S.Struct({ type: S.Literal('hey'), payload: S.String }), } export const theWorkflow = makeWorkflow({ diff --git a/packages/migrate/test/lib/signals-drain-before.ts b/packages/migrate/test/lib/signals-drain-before.ts index ebe8b09..349c65d 100644 --- a/packages/migrate/test/lib/signals-drain-before.ts +++ b/packages/migrate/test/lib/signals-drain-before.ts @@ -75,7 +75,7 @@ const machine = createMachine( ) const signals = { - hey: S.struct({ type: S.literal('hey'), payload: S.any }), + hey: S.Struct({ type: S.Literal('hey'), payload: S.Any }), } log('hey') diff --git a/packages/migrate/test/lib/workflow1info.ts b/packages/migrate/test/lib/workflow1info.ts index 13db298..33838fd 100644 --- a/packages/migrate/test/lib/workflow1info.ts +++ b/packages/migrate/test/lib/workflow1info.ts @@ -38,5 +38,5 @@ export const machine = createMachine( ) export const signals = { - hey: S.struct({ type: S.literal('hey'), payload: S.string }), + hey: S.Struct({ type: S.Literal('hey'), payload: S.String }), } diff --git a/packages/signaler/src/client.ts b/packages/signaler/src/client.ts index bf56373..88fab9f 100644 --- a/packages/signaler/src/client.ts +++ b/packages/signaler/src/client.ts @@ -15,7 +15,7 @@ export type WorkflowSignalerClient = ReturnType< typeof makeWorkflowSignalerClient > -export const WorkflowSignalerClient = Context.Tag() +export const WorkflowSignalerClient = Context.GenericTag("@services/WorkflowSignalerClient") export const WorkflowSignalerClientLayer = (options: { baseURL?: string }) => Layer.succeed(WorkflowSignalerClient, makeWorkflowSignalerClient(options)) diff --git a/packages/signaler/src/handlers.ts b/packages/signaler/src/handlers.ts index 07bbb35..d4c599f 100644 --- a/packages/signaler/src/handlers.ts +++ b/packages/signaler/src/handlers.ts @@ -32,11 +32,7 @@ export const sendInstruction = ({ }) => isUpdateInstruction(instruction) ? workflowUpdate(instruction, defaultWorkflowUpdateRequestTimeout) - : (fns[instruction.action](instruction.args as any) as Effect.Effect< - TemporalClient, - any, - any - >) + : (fns[instruction.action](instruction.args as any) as Effect.Effect) export const handler = implement(instruction, ({ body }) => pipe( diff --git a/packages/signaler/src/instruction/types.ts b/packages/signaler/src/instruction/types.ts index db2dcf8..3413008 100644 --- a/packages/signaler/src/instruction/types.ts +++ b/packages/signaler/src/instruction/types.ts @@ -12,14 +12,14 @@ export const instruction = def({ }, response: { json: [ - { status: S.literal(200), body: S.any }, - { status: S.literal(400), body: S.any }, - { status: S.literal(500), body: S.any }, + { status: S.Literal(200), body: S.Any }, + { status: S.Literal(400), body: S.Any }, + { status: S.Literal(500), body: S.Any }, ], }, }, name: 'instruction', - error: S.unknown, - input: S.unknown, - output: S.any, + error: S.Unknown, + input: S.Unknown, + output: S.Any, }) diff --git a/packages/signaler/src/task-queue.ts b/packages/signaler/src/task-queue.ts index c4198dd..583fbbb 100644 --- a/packages/signaler/src/task-queue.ts +++ b/packages/signaler/src/task-queue.ts @@ -6,9 +6,9 @@ import * as S from '@effect/schema/Schema' export class TaskQueueNotFound extends S.TaggedError()( 'TaskQueueNotFound', { - message: S.string, - workflowName: S.string, - context: S.any, + message: S.String, + workflowName: S.String, + context: S.Any, } ) {} @@ -66,24 +66,26 @@ export const getTaskQueue = ( export const taskQueueFromBodyOrFeatureFlag = (body: any) => Effect.if(typeof body.taskQueue === 'string', { - onTrue: pipe( - Effect.logDebug('Using provided taskQueue'), - Effect.annotateLogs({ taskQueue: body.taskQueue }), - Effect.flatMap(() => Effect.succeed(body)) - ), - onFalse: pipe( - Effect.logDebug('Getting taskQueue from feature flag'), - Effect.flatMap(() => - getTaskQueueOrFail(body.workflowType, { - userId: body.workflowId, - // @ts-expect-error - isTest: body.searchAttributes?.isTest, - }) + onTrue: () => + pipe( + Effect.logDebug('Using provided taskQueue'), + Effect.annotateLogs({ taskQueue: body.taskQueue }), + Effect.flatMap(() => Effect.succeed(body)) + ), + onFalse: () => + pipe( + Effect.logDebug('Getting taskQueue from feature flag'), + Effect.flatMap(() => + getTaskQueueOrFail(body.workflowType, { + userId: body.workflowId, + // @ts-expect-error + isTest: body.searchAttributes?.isTest, + }) + ), + Effect.map((x) => ({ + ...body, + taskQueue: x, + })), + Effect.tapError(Effect.logError) ), - Effect.map((x) => ({ - ...body, - taskQueue: x, - })), - Effect.tapError(Effect.logError) - ), }) diff --git a/packages/signaler/src/types.ts b/packages/signaler/src/types.ts index d1c6fe8..191887c 100644 --- a/packages/signaler/src/types.ts +++ b/packages/signaler/src/types.ts @@ -11,17 +11,17 @@ import { pipe } from 'effect/Function' export const SignalerConfig = pipe( TemporalEnv, - S.extend(S.struct({ PORT: S.NumberFromString })), + S.extend(S.Struct({ PORT: S.NumberFromString })), S.extend( - S.struct({ - FEATURE_FLAG_SERVER_URL: S.string, - FEATURE_FLAG_API_KEY: S.string, - ENABLE_FEATURE_FLAGS: S.optional(S.literal('true', 'false')), + S.Struct({ + FEATURE_FLAG_SERVER_URL: S.String, + FEATURE_FLAG_API_KEY: S.String, + ENABLE_FEATURE_FLAGS: S.optional(S.Literal('true', 'false')), }) ) ) -export type SignalerConfig = S.Schema.To +export type SignalerConfig = S.Schema.Type export type UpdateInstruction = | { @@ -56,58 +56,60 @@ export type Instruction = } | UpdateInstruction -export const SignalWorkflowInstruction = S.struct({ - action: S.literal('signal'), +export const SignalWorkflowInstruction = S.Struct({ + action: S.Literal('signal'), args: SignalWorkflowInput, }) -export type SignalWorkflowInstruction = S.Schema.To< +export type SignalWorkflowInstruction = S.Schema.Type< typeof SignalWorkflowInstruction > -export const StartWorkflowInstruction = S.struct({ - action: S.literal('start'), +export const StartWorkflowInstruction = S.Struct({ + action: S.Literal('start'), args: StartWorkflowInput, }) -export type StartWorkflowInstruction = S.Schema.To< +export type StartWorkflowInstruction = S.Schema.Type< typeof StartWorkflowInstruction > -export const SignalBatchInstruction = S.struct({ - action: S.literal('signalBatch'), +export const SignalBatchInstruction = S.Struct({ + action: S.Literal('signalBatch'), args: SignalBatchInput, }) -export type SignalBatchInstruction = S.Schema.To +export type SignalBatchInstruction = S.Schema.Type< + typeof SignalBatchInstruction +> -export const SignalWithStartBatchInstruction = S.struct({ - action: S.literal('signalWithStartBatch'), +export const SignalWithStartBatchInstruction = S.Struct({ + action: S.Literal('signalWithStartBatch'), args: SignalWithStartBatchInput, }) -export type SignalWithStartBatchInstruction = S.Schema.To< +export type SignalWithStartBatchInstruction = S.Schema.Type< typeof SignalWithStartBatchInstruction > -export const SignalWithStartInstruction = S.struct({ - action: S.literal('signalWithStart'), +export const SignalWithStartInstruction = S.Struct({ + action: S.Literal('signalWithStart'), args: SignalWithStartInput, }) -export type SignalWithStartInstruction = S.Schema.To< +export type SignalWithStartInstruction = S.Schema.Type< typeof SignalWithStartInstruction > -export const UpdateInstruction = S.struct({ - action: S.literal('update'), +export const UpdateInstruction = S.Struct({ + action: S.Literal('update'), args: SignalWorkflowInput, }) -// export type UpdateInstruction = S.Schema.To +// export type UpdateInstruction = S.Schema.Type -export const UpdateOrStartInstruction = S.struct({ - action: S.literal('updateOrStart'), +export const UpdateOrStartInstruction = S.Struct({ + action: S.Literal('updateOrStart'), args: SignalWithStartInput, }) -export type UpdateOrStartInstruction = S.Schema.To< +export type UpdateOrStartInstruction = S.Schema.Type< typeof UpdateOrStartInstruction > -export const Instruction = S.union( +export const Instruction = S.Union( SignalWorkflowInstruction, StartWorkflowInstruction, SignalBatchInstruction, @@ -120,8 +122,8 @@ export const Instruction = S.union( export const isUpdateInstruction = (x: Instruction): x is UpdateInstruction => x.action === 'update' || x.action === 'updateOrStart' -export type UnknownEvent = S.Schema.To -export const UnknownEvent = S.struct({ - _tag: S.literal('UnknownWorkflowEvent'), - error: S.string, +export type UnknownEvent = S.Schema.Type +export const UnknownEvent = S.Struct({ + _tag: S.Literal('UnknownWorkflowEvent'), + error: S.String, }) diff --git a/packages/toolbox/scripts/batch_migrate.ts b/packages/toolbox/scripts/batch_migrate.ts index ff81ec4..1d37a77 100755 --- a/packages/toolbox/scripts/batch_migrate.ts +++ b/packages/toolbox/scripts/batch_migrate.ts @@ -14,12 +14,12 @@ import { WorkflowExecutionInfo, } from '@temporalio/client' -const EnvSchema = S.struct({ - TEMPORAL_ADDRESS: S.string, - TEMPORAL_NAMESPACE: S.string, +const EnvSchema = S.Struct({ + TEMPORAL_ADDRESS: S.String, + TEMPORAL_NAMESPACE: S.String, }) -type EnvSchema = S.Schema.To +type EnvSchema = S.Schema.Type const signalMigrate = (workflowId: string, newQueue: string) => { const signalArgs = { diff --git a/packages/toolbox/src/infra/build.ts b/packages/toolbox/src/infra/build.ts index 67ad94d..a34449e 100644 --- a/packages/toolbox/src/infra/build.ts +++ b/packages/toolbox/src/infra/build.ts @@ -48,9 +48,9 @@ type BuildStepSuccess = any type BuildFn = (args: { versionId: string }) => Effect.Effect< - Environment, + Either.Either, unknown, - Either.Either + Environment > export const compile = (args: { diff --git a/packages/toolbox/src/infra/docker.ts b/packages/toolbox/src/infra/docker.ts index 1212371..a464f4b 100644 --- a/packages/toolbox/src/infra/docker.ts +++ b/packages/toolbox/src/infra/docker.ts @@ -46,7 +46,7 @@ const getSHA256FromBuildOutput = (s: string) => { export const doesDockerImageExist = ( imageIdent: string -): Effect.Effect => { +): Effect.Effect => { const dockerImageExistsCmd = `docker manifest inspect ${imageIdent}` return pipe( diff --git a/packages/toolbox/src/infra/environment.ts b/packages/toolbox/src/infra/environment.ts index a563afb..56ad0fa 100644 --- a/packages/toolbox/src/infra/environment.ts +++ b/packages/toolbox/src/infra/environment.ts @@ -1,16 +1,16 @@ import * as S from '@effect/schema/Schema' import { Context, Layer } from 'effect' -export const EnvironmentName = S.literal('development', 'production', 'local') -export type Environment = S.Schema.To -export const Environment = Context.Tag( +export const EnvironmentName = S.Literal('development', 'production', 'local') +export type Environment = S.Schema.Type +export const Environment = Context.GenericTag( 'diachronic.infra/Environment' ) export const EnvironmentLayer = (a: Environment) => Layer.succeed(Environment, Environment.of(a)) -export const DiachronicCloudEnvironment = S.literal('development', 'production') -export type DiachronicCloudEnvironment = S.Schema.To< +export const DiachronicCloudEnvironment = S.Literal('development', 'production') +export type DiachronicCloudEnvironment = S.Schema.Type< typeof DiachronicCloudEnvironment > diff --git a/packages/toolbox/src/infra/feature-flag-config.ts b/packages/toolbox/src/infra/feature-flag-config.ts index c027c53..23df4fe 100644 --- a/packages/toolbox/src/infra/feature-flag-config.ts +++ b/packages/toolbox/src/infra/feature-flag-config.ts @@ -8,8 +8,10 @@ import { WorkflowVersionInfo } from './versioning-types' // assumes 1 unleash server per cloud env // Each instance uses the unleash "production" environment -export const FeatureFlagEnvironment = S.union(S.literal('production'), S.string) -export type FeatureFlagEnvironment = S.Schema.To +export const FeatureFlagEnvironment = S.Union(S.Literal('production'), S.String) +export type FeatureFlagEnvironment = S.Schema.Type< + typeof FeatureFlagEnvironment +> export const incrementSeqId = (seqId: string) => { const nextSeqId = (parseInt(seqId) + 1).toString().padStart(3, '0') @@ -312,9 +314,8 @@ export const makeFeatureFlagConfigClient = ( export type FeatureFlagConfigClient = ReturnType< typeof makeFeatureFlagConfigClient > -export const FeatureFlagConfigClient = Context.Tag( - 'diachronic.flags.config' -) +export const FeatureFlagConfigClient = + Context.GenericTag('diachronic.flags.config') export const makeFeatureFlagConfigClientLayer = ( args: FeatureFlagConfigClientArgs @@ -508,7 +509,7 @@ export const applyWorkflowVersionFlag = (args: { environment: args.environment, }), Effect.flatMap( - (flags): Effect.Effect => { + (flags): Effect.Effect => { const workflowFlagData = flags.map((x) => getWorkflowFlagParts(x.name) ) @@ -541,51 +542,53 @@ export const applyWorkflowVersionFlag = (args: { ...getWorkflowFlagParts(flagName), } return Effect.if(!!existingFlagForVersionId, { - onTrue: Effect.succeed(versionInfo), - onFalse: pipe( - client.createFlag({ - type: 'release', - projectId: 'default', - environment: args.environment, - name: flagName, - description: - 'Determines whether users get this version of workflow.', - impressionData: true, - }), - Effect.catchTags({ - ErrorResponse: (e) => - Effect.if(e.statusCode === 409, { - onFalse: Effect.fail(e), - onTrue: pipe( - Effect.logWarning(`Flag already exists.`), - Effect.tap(() => + onTrue: () => Effect.succeed(versionInfo), + onFalse: () => + pipe( + client.createFlag({ + type: 'release', + projectId: 'default', + environment: args.environment, + name: flagName, + description: + 'Determines whether users get this version of workflow.', + impressionData: true, + }), + Effect.catchTags({ + ErrorResponse: (e) => + Effect.if(e.statusCode === 409, { + onFalse: () => Effect.fail(e), + onTrue: () => pipe( - Effect.logInfo(`Attempting to unarchive flag.`), - Effect.flatMap(() => + Effect.logWarning(`Flag already exists.`), + Effect.tap(() => pipe( - // todo. consider whether all strategies - // should be deleted. if flag was created only - // by this api it shouldn't make a difference since they'll be - // applied below - client.restoreArchivedFlag({ flagName }), - Effect.tap(() => - Effect.logInfo(`Flag restored.`).pipe( - Effect.annotateLogs(versionInfo) + Effect.logInfo(`Attempting to unarchive flag.`), + Effect.flatMap(() => + pipe( + // todo. consider whether all strategies + // should be deleted. if flag was created only + // by this api it shouldn't make a difference since they'll be + // applied below + client.restoreArchivedFlag({ flagName }), + Effect.tap(() => + Effect.logInfo(`Flag restored.`).pipe( + Effect.annotateLogs(versionInfo) + ) + ), + Effect.tapErrorCause((e) => + Effect.logError('Failed to restore flag', e) + ) ) - ), - Effect.tapErrorCause((e) => - Effect.logError('Failed to restore flag', e) ) ) ) - ) - ) - ), - }), - }), - Effect.map(() => versionInfo), - Effect.withLogSpan('createFlag') - ), + ), + }), + }), + Effect.map(() => versionInfo), + Effect.withLogSpan('createFlag') + ), }) } ), diff --git a/packages/toolbox/src/infra/file.ts b/packages/toolbox/src/infra/file.ts index 816b0d0..4e3a8cb 100644 --- a/packages/toolbox/src/infra/file.ts +++ b/packages/toolbox/src/infra/file.ts @@ -12,9 +12,9 @@ export const resolveFilepath = (s: string, cwd: string = '.') => { } export const ensureDir = (dir: string) => - Effect.async((resume) => + Effect.async((resume) => fs.mkdir(dir, { recursive: true }, (e) => - resume(e ? Effect.fail(e) : Effect.succeed(Effect.unit)) + resume(e ? Effect.fail(e) : Effect.succeed(Effect.void)) ) ) @@ -23,11 +23,11 @@ export const writeFile = ( data: string | NodeJS.ArrayBufferView, options?: fs.WriteFileOptions ) => - Effect.async((respond) => + Effect.async((respond) => fs.writeFile(path, data, options || {}, (e) => { if (e) { return respond(Effect.fail(e)) } - return respond(Effect.succeed(Effect.unit)) + return respond(Effect.succeed(Effect.void)); }) ) diff --git a/packages/toolbox/src/infra/git.ts b/packages/toolbox/src/infra/git.ts index b0793b2..896b012 100644 --- a/packages/toolbox/src/infra/git.ts +++ b/packages/toolbox/src/infra/git.ts @@ -21,7 +21,7 @@ export const getGitShaShort = () => export const getGitShaShortSync = () => execSync(`git rev-parse --short HEAD`).toString().trim() -export const getGitRepoRoot = (): Effect.Effect => +export const getGitRepoRoot = (): Effect.Effect => pipe( exec(`git rev-parse --show-toplevel`), Effect.map((x) => x.stdout.trim()) diff --git a/packages/toolbox/src/infra/kubernetes.ts b/packages/toolbox/src/infra/kubernetes.ts index a7588a8..7047664 100644 --- a/packages/toolbox/src/infra/kubernetes.ts +++ b/packages/toolbox/src/infra/kubernetes.ts @@ -67,7 +67,7 @@ export const saveManifests = (args: { filepath: commonFilepath, manifests: notVersioned, }) - : Effect.unit + : Effect.void ), Effect.flatMap(() => versionedFilepath @@ -75,7 +75,7 @@ export const saveManifests = (args: { filepath: versionedFilepath, manifests: versioned, }) - : Effect.unit + : Effect.void ), Effect.map(() => ({ filepaths: [ @@ -85,7 +85,7 @@ export const saveManifests = (args: { : null, ].filter(Boolean) as Array<{ label: string; path: string }>, })) - ) + ); } /** diff --git a/packages/toolbox/src/infra/pipeline.ts b/packages/toolbox/src/infra/pipeline.ts index 8b357af..c743117 100644 --- a/packages/toolbox/src/infra/pipeline.ts +++ b/packages/toolbox/src/infra/pipeline.ts @@ -57,7 +57,7 @@ export type GetManifestsInput = { } export type GetManifestsFunction = ( args: GetManifestsInput -) => Effect.Effect +) => Effect.Effect export type DeployPipelineInput = { buildSpec: BuildSpec[] @@ -201,28 +201,32 @@ export const deployPipeline = (args: DeployPipelineInput) => { Effect.tap((exists) => Effect.logInfo('Image exists: ' + exists)), Effect.flatMap((exists) => Effect.if(exists, { - onTrue: pipe( - Effect.logInfo('Image already exists. Skipping build and push.'), - Effect.flatMap(() => Effect.succeed(dockerArgs)) - ), - onFalse: pipe( - dockerBuild(dockerArgs), - Effect.withLogSpan('docker-build'), - Effect.flatMap(() => dockerPush(dockerArgs.imageIdent)), - Effect.catchIf( - (e) => - e.stderr.includes( - 'The repository has enabled tag immutability' - ), - (e) => - pipe( - Effect.logInfo('Ignoring tag exists'), - Effect.tap(() => Effect.succeed(e)) - ) + onTrue: () => + pipe( + Effect.logInfo( + 'Image already exists. Skipping build and push.' + ), + Effect.flatMap(() => Effect.succeed(dockerArgs)) + ), + onFalse: () => + pipe( + dockerBuild(dockerArgs), + Effect.withLogSpan('docker-build'), + Effect.flatMap(() => dockerPush(dockerArgs.imageIdent)), + Effect.catchIf( + (e) => + e.stderr.includes( + 'The repository has enabled tag immutability' + ), + (e) => + pipe( + Effect.logInfo('Ignoring tag exists'), + Effect.tap(() => Effect.succeed(e)) + ) + ), + Effect.withLogSpan('docker-push'), + Effect.flatMap(() => Effect.succeed(dockerArgs)) ), - Effect.withLogSpan('docker-push'), - Effect.flatMap(() => Effect.succeed(dockerArgs)) - ), }) ), Effect.withLogSpan('docker') diff --git a/packages/toolbox/src/infra/reload-pipeline.ts b/packages/toolbox/src/infra/reload-pipeline.ts index a066722..3da3c3b 100644 --- a/packages/toolbox/src/infra/reload-pipeline.ts +++ b/packages/toolbox/src/infra/reload-pipeline.ts @@ -60,9 +60,9 @@ const environmentToClusterName = { export class WrongClusterContextError extends S.TaggedError()( 'WrongClusterContextError', { - actual: S.string, + actual: S.String, environment: DiachronicCloudEnvironment, - expected: S.optional(S.array(S.string)), + expected: S.optional(S.Array(S.String)), } ) {} @@ -100,15 +100,13 @@ const pfspecs = { type Svc = 'mqtt' | 'signaler' | 'temporal' const isPortForwarding = (service: Svc) => { const spec = pfspecs[service] - return Effect.succeed(false) return pipe( exec(`kubectl get svc/${spec.name} -n ${spec.namespace} -o json`), Effect.map((s) => JSON.parse(s.stdout) as Service), Effect.map( (svc) => !!svc.spec?.ports?.some( - // @ts-expect-error add k8s types - (x) => + (x: any) => x.port === spec.port && String(x?.targetPort) === String(spec.targetPort) ) @@ -122,48 +120,50 @@ const portForward = (environment: DiachronicCloudEnvironment, service: Svc) => Effect.flatMap(() => isPortForwarding(service)), Effect.flatMap((alreadyPortforwarding) => Effect.if(alreadyPortforwarding, { - onTrue: pipe( - Effect.logDebug(`Already port-forwarding to ${service} service`), - Effect.tap(() => Effect.succeed(Effect.unit)) - ), - onFalse: pipe( - Match.value(service), - Match.when('mqtt', () => - pipe( - Effect.logInfo( - `Starting port forward to ${environment} MQTT service on port 1883` - ), - Effect.flatMap(() => - exec(`kubectl port-forward svc/broker 1883:1883 -n mqtt`) - ) - ) + onTrue: () => + pipe( + Effect.logDebug(`Already port-forwarding to ${service} service`), + Effect.tap(() => Effect.succeed(Effect.void)) ), - Match.when('signaler', () => - pipe( - Effect.logInfo( - `Starting port forward to ${environment} signaler service on port 8080` - ), - Effect.flatMap(() => - exec( - `kubectl port-forward svc/workflow-signaler 8080:8080 -n workflow-signaler` + onFalse: () => + pipe( + Match.value(service), + Match.when('mqtt', () => + pipe( + Effect.logInfo( + `Starting port forward to ${environment} MQTT service on port 1883` + ), + Effect.flatMap(() => + exec(`kubectl port-forward svc/broker 1883:1883 -n mqtt`) ) ) - ) - ), - Match.when('temporal', () => - pipe( - Effect.logInfo( - `Starting port forward to ${environment} temporal service on port 7233` - ), - Effect.flatMap(() => - exec( - `kubectl port-forward svc/temporal-frontend 7233:7233 -n temporal` + ), + Match.when('signaler', () => + pipe( + Effect.logInfo( + `Starting port forward to ${environment} signaler service on port 8080` + ), + Effect.flatMap(() => + exec( + `kubectl port-forward svc/workflow-signaler 8080:8080 -n workflow-signaler` + ) ) ) - ) + ), + Match.when('temporal', () => + pipe( + Effect.logInfo( + `Starting port forward to ${environment} temporal service on port 7233` + ), + Effect.flatMap(() => + exec( + `kubectl port-forward svc/temporal-frontend 7233:7233 -n temporal` + ) + ) + ) + ), + Match.exhaustive ), - Match.exhaustive - ), }) ) ) @@ -303,14 +303,14 @@ const build = ({ getBuildStep({ buildSpec, versionId, buildDirectory, packageRoot }), // Fail on one or more errors Effect.flatMap((results) => { - const errors = results.filter((x) => x._tag === 'Left') - const successes = results.filter((x) => x._tag === 'Right') + const errors = results.filter((x) => x._tag === 'Right') + const successes = results.filter((x) => x._tag === 'Left') if (errors.length) { return pipe( Effect.logError('🛑 Build failed'), Effect.tap(() => // @ts-expect-error - Effect.forEach(errors, (x) => Effect.logError(x.left)) + Effect.forEach(errors, (x) => Effect.logError(x.right)) ), Effect.flatMap(() => Effect.fail({ errors, successes })) ) @@ -421,23 +421,24 @@ export const createReloadableWorkerPipeline = (args: ReloadPipelineArgs) => { ) const inbox = Effect.runSync(Queue.sliding(2 ** 4)) const createReceive = (box: Queue.Queue) => - Effect.asyncEffect((resume) => - Effect.flatMap(MQTTClient, (mqtt) => { - const handler = (topic: string, message: InboundMessageType) => { - if (topic !== selfAddress) { - console.warn('Unexpected topic', { topic, message }) - return + Effect.asyncEffect( + (resume) => + Effect.flatMap(MQTTClient, (mqtt) => { + const handler = (topic: string, message: InboundMessageType) => { + if (topic !== selfAddress) { + console.warn('Unexpected topic', { topic, message }) + return + } + const msg = JSON.parse(message.toString()) + // TODO. do something other than print + console.log('Received:', { topic, message: msg }) + box.unsafeOffer(msg) } - const msg = JSON.parse(message.toString()) - // TODO. do something other than print - console.log('Received:', { topic, message: msg }) - box.unsafeOffer(msg) - } - mqtt.on('message', handler as any) - mqtt.subscribe(selfAddress) - return Effect.unit - }) + mqtt.on('message', handler as any) + mqtt.subscribe(selfAddress) + return Effect.void + }) ) const createSend = @@ -458,7 +459,7 @@ export const createReloadableWorkerPipeline = (args: ReloadPipelineArgs) => { const send = createSend(containerAddress) - let receiver: RuntimeFiber + let receiver: RuntimeFiber const applyReceiver = () => { if (receiver) return Effect.succeed(receiver) @@ -510,7 +511,7 @@ export const createReloadableWorkerPipeline = (args: ReloadPipelineArgs) => { (x) => x.kind === 'Deployment' && x.apiVersion === 'apps/v1' && - !!x.metadata.labels?.['diachronic/workflow-name'], + !!x.metadata.labels?.['ei.tech/workflow-name'], xs ) const updated = workflowDeployments.map((x) => @@ -522,13 +523,10 @@ export const createReloadableWorkerPipeline = (args: ReloadPipelineArgs) => { env: [ ...(x.env || []), { - name: 'DIACHRONIC_CI_MQTT_BROKER_URL', + name: 'EI_CI_MQTT_BROKER_URL', value: containerMQTTBrokerURL, }, - { - name: 'DIACHRONIC_CI_MQTT_TOPIC', - value: containerAddress, - }, + { name: 'EI_CI_MQTT_TOPIC', value: containerAddress }, ], })), x as Deployment diff --git a/packages/toolbox/src/infra/sa.ts b/packages/toolbox/src/infra/sa.ts index 7947e42..9968e68 100644 --- a/packages/toolbox/src/infra/sa.ts +++ b/packages/toolbox/src/infra/sa.ts @@ -45,7 +45,7 @@ const sanitizeRoleName = (role: GCPIAMRole) => role.toLowerCase().replace(/[\/.]/g, '-') export const GCPProviderConfig = - Context.Tag('GCPProviderConfig') + Context.GenericTag('GCPProviderConfig') /** * Constructs a GCP service account @@ -111,7 +111,7 @@ export const gcpSAServiceAccountRoleBindings = ( gcpSA: GCPServiceAccount, k8sSA: K8sServiceAccount, roles: GCPIAMRole[] -): Effect.Effect => +): Effect.Effect => Effect.map( GCPProviderConfig, ({ @@ -156,7 +156,7 @@ export const gcpSAServiceAccountRoleBindings = ( export const gcpSAProjectRoleBindings = ( gcpSA: GCPServiceAccount, roles: GCPIAMRole[] -): Effect.Effect => +): Effect.Effect => Effect.map(GCPProviderConfig, (config) => roles.map((role) => ({ apiVersion: 'cloudplatform.gcp.upbound.io/v1beta1', diff --git a/packages/toolbox/src/infra/secrets.ts b/packages/toolbox/src/infra/secrets.ts index 4c0802e..7556981 100644 --- a/packages/toolbox/src/infra/secrets.ts +++ b/packages/toolbox/src/infra/secrets.ts @@ -51,45 +51,47 @@ export const secret = (args: { }) => Effect.flatMap(Environment, (a) => Effect.if(a === 'local', { - onTrue: Effect.succeed({ - apiVersion: 'v1', - kind: 'Secret', - metadata: { - name: args.name, - namespace: args.namespace, - }, - data: Object.entries( - args.localClusterOnlyKeyValuesPreBase64 || {} - ).reduce( - (a, [k, v]) => ({ - ...a, - [k]: Buffer.from(v).toString('base64'), - }), - {} - ), - } as Secret), - onFalse: Effect.succeed({ - apiVersion: 'external-secrets.io/v1beta1' as const, - kind: 'ExternalSecret' as const, - metadata: { - name: args.name, - namespace: args.namespace, - }, - spec: { - refreshInterval: '1h', - secretStoreRef: { - name: 'gcp-backend', - kind: 'ClusterSecretStore', + onTrue: () => + Effect.succeed({ + apiVersion: 'v1', + kind: 'Secret', + metadata: { + name: args.name, + namespace: args.namespace, }, - target: { name: args.name }, - data: args.mappings.map((x) => ({ - secretKey: x.kubernetesSecretKey, - remoteRef: { - key: x.googleSecretManagerSecretName, - property: x.googleSecretManagerJSONKey, + data: Object.entries( + args.localClusterOnlyKeyValuesPreBase64 || {} + ).reduce( + (a, [k, v]) => ({ + ...a, + [k]: Buffer.from(v).toString('base64'), + }), + {} + ), + } as Secret), + onFalse: () => + Effect.succeed({ + apiVersion: 'external-secrets.io/v1beta1' as const, + kind: 'ExternalSecret' as const, + metadata: { + name: args.name, + namespace: args.namespace, + }, + spec: { + refreshInterval: '1h', + secretStoreRef: { + name: 'gcp-backend', + kind: 'ClusterSecretStore', }, - })), - }, - }), + target: { name: args.name }, + data: args.mappings.map((x) => ({ + secretKey: x.kubernetesSecretKey, + remoteRef: { + key: x.googleSecretManagerSecretName, + property: x.googleSecretManagerJSONKey, + }, + })), + }, + }), }) ) diff --git a/packages/toolbox/src/infra/shared.ts b/packages/toolbox/src/infra/shared.ts index c582d46..2383dd4 100755 --- a/packages/toolbox/src/infra/shared.ts +++ b/packages/toolbox/src/infra/shared.ts @@ -5,10 +5,10 @@ import { EnvironmentName } from './environment' const rfc1123Subdomain = S.pattern( /[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/ ) -export const VERSION_ID = S.string.pipe(rfc1123Subdomain) +export const VERSION_ID = S.String.pipe(rfc1123Subdomain) export const getEnv = () => S.decodeSync( - S.struct({ + S.Struct({ VERSION_ID, DIACHRONIC_CLOUD_ENVIRONMENT: EnvironmentName, }) diff --git a/packages/toolbox/src/infra/util.ts b/packages/toolbox/src/infra/util.ts index 7d771ee..054865b 100644 --- a/packages/toolbox/src/infra/util.ts +++ b/packages/toolbox/src/infra/util.ts @@ -14,9 +14,9 @@ export const camelToKebabCase = (str: S) => // It signifies the runtime conext has a way to run commands // and provides a way to run commands export type Shell = { - exec: (cmd: string) => Effect.Effect + exec: (cmd: string) => Effect.Effect } -const Shell = Context.Tag('diachronic.Shell') +const Shell = Context.GenericTag('diachronic.Shell') export type ExecError = { error: ExecException @@ -39,7 +39,7 @@ export const spawn = ( cmd: string, options?: ChildProcess.ExecOptions, stdio?: { stdout?: boolean; stderr?: boolean } -): Effect.Effect => +): Effect.Effect => pipe( Effect.logDebug(`Streaming shell command:${cmd}`), Effect.map(() => @@ -64,12 +64,12 @@ export const exec = ( cmd: string, options?: ChildProcess.ExecOptions, stdio?: { stdout?: boolean; stderr?: boolean } -): Effect.Effect => +): Effect.Effect => pipe( Effect.logDebug(`Executing shell command`), Effect.annotateLogs({ $: cmd }), Effect.flatMap(() => - Effect.async((resume) => { + Effect.async((resume) => { const cp = ChildProcess.exec( cmd, options || {}, @@ -96,7 +96,7 @@ export const exec = ( * @param path */ export const readFile = (path: string) => - Effect.async((resume) => { + Effect.async((resume) => { void fs.readFile(path, (err, data) => { if (err) { resume(Effect.fail(err)) @@ -114,7 +114,7 @@ export const ShellLayer = { }), } -export const getRepoRoot = (): Effect.Effect => +export const getRepoRoot = (): Effect.Effect => pipe( exec(`git rev-parse --show-toplevel`), Effect.map((x) => x.stdout.trim()) @@ -124,7 +124,7 @@ export const getRepoRoot = (): Effect.Effect => * Get the description of a schema * @param x */ -export const getDescription = (x: S.Schema): string | null => +export const getDescription = (x: S.Schema): string | null => pipe(AST.getAnnotation(AST.DescriptionAnnotationId)(x.ast), (a) => a._tag === 'None' ? null : (a.value as string) ) diff --git a/packages/toolbox/src/infra/versioning-types.ts b/packages/toolbox/src/infra/versioning-types.ts index 95e1e97..ac65265 100644 --- a/packages/toolbox/src/infra/versioning-types.ts +++ b/packages/toolbox/src/infra/versioning-types.ts @@ -1,13 +1,13 @@ import * as S from '@effect/schema/Schema' export const WorkflowVersionInfo = S.extend( - S.struct({ - workflowName: S.string, - versionId: S.string, - flagName: S.string, - seqId: S.string, - taskQueue: S.string, + S.Struct({ + workflowName: S.String, + versionId: S.String, + flagName: S.String, + seqId: S.String, + taskQueue: S.String, }), - S.partial(S.struct({ environment: S.string })) + S.partial(S.Struct({ environment: S.String })) ) -export type WorkflowVersionInfo = S.Schema.To +export type WorkflowVersionInfo = S.Schema.Type diff --git a/packages/toolbox/src/infra/versioning.ts b/packages/toolbox/src/infra/versioning.ts index f49cf19..c49f5ab 100644 --- a/packages/toolbox/src/infra/versioning.ts +++ b/packages/toolbox/src/infra/versioning.ts @@ -5,9 +5,9 @@ import { getGitBranchSync, getGitShaShortSync } from './git' export const makeTimestampVersionId = () => new Date().toISOString().toLowerCase().replace(/:/g, '-').replace(/\./g, '-') -export const WorkflowTaskQueueParts = S.tuple( - S.string.pipe(S.identifier('workflowName')), - S.string.pipe(S.identifier('versionId')) +export const WorkflowTaskQueueParts = S.Tuple( + S.String.pipe(S.identifier('workflowName')), + S.String.pipe(S.identifier('versionId')) ) /** diff --git a/packages/toolbox/src/migrate.ts b/packages/toolbox/src/migrate.ts index e5d2e59..09cfae0 100644 --- a/packages/toolbox/src/migrate.ts +++ b/packages/toolbox/src/migrate.ts @@ -42,14 +42,14 @@ export const getIds = async ( return result } -const TemporalQueryParams = S.struct({ - taskQueue: S.optional(S.string), - workflowName: S.optional(S.string), - startTime: S.optional(S.string), - endTime: S.optional(S.string), - executionStatus: S.optional(S.union(S.literal('Running'), S.string)), +const TemporalQueryParams = S.Struct({ + taskQueue: S.optional(S.String), + workflowName: S.optional(S.String), + startTime: S.optional(S.String), + endTime: S.optional(S.String), + executionStatus: S.optional(S.Union(S.Literal('Running'), S.String)), }) -export type TemporalQueryParams = S.Schema.To +export type TemporalQueryParams = S.Schema.Type const capitalize = (s: string) => s[0].toUpperCase() + s.slice(1) diff --git a/packages/toolbox/src/repo-metadata.ts b/packages/toolbox/src/repo-metadata.ts index ba0cba7..963cbad 100644 --- a/packages/toolbox/src/repo-metadata.ts +++ b/packages/toolbox/src/repo-metadata.ts @@ -66,13 +66,14 @@ export const getWorkflowDeploymentNameFromWorkflowType = ( const appName = workflowTypesToAppName[workflowType] return Effect.if(appName !== undefined, { - onTrue: Effect.succeed(appName), - onFalse: pipe( - Effect.logWarning( - `No mapping for workflow type ${workflowType}. Using default value.` + onTrue: () => Effect.succeed(appName), + onFalse: () => + pipe( + Effect.logWarning( + `No mapping for workflow type ${workflowType}. Using default value.` + ), + Effect.tap(() => Effect.succeed(defaultValue)) ), - Effect.tap(() => Effect.succeed(defaultValue)) - ), }) } catch (e) { console.error('getWorkflowDeploymentNameFromWorkflowType error', e) diff --git a/packages/toolbox/src/workspace.ts b/packages/toolbox/src/workspace.ts index 992bbb0..7cc7c3a 100644 --- a/packages/toolbox/src/workspace.ts +++ b/packages/toolbox/src/workspace.ts @@ -10,18 +10,18 @@ import { exec, getRepoRoot, readFile } from './infra/util' /** * Represents a (yarn) workspace / monorepo package */ -export const Workspace = S.struct({ location: S.string, name: S.string }) -export type Workspace = S.Schema.To +export const Workspace = S.Struct({ location: S.String, name: S.String }) +export type Workspace = S.Schema.Type -export const Workspaces = S.array(Workspace) -export type Workspaces = S.Schema.To +export const Workspaces = S.Array(Workspace) +export type Workspaces = S.Schema.Type export const listAllWorkspaces = asAnnotatedEffect( def({ name: 'listAllWorkspaces', - input: S.undefined, + input: S.Undefined, output: Workspaces, - error: S.unknown, + error: S.Unknown, 'diachronic.cli': { name: 'listAllWorkspaces', }, @@ -48,17 +48,17 @@ export const listWorkspaceDependents = asAnnotatedEffect( def({ name: 'listWorkspaceDependents', input: pipe( - S.union(S.struct({ workspaces: S.array(S.string) }), S.undefined), + S.Union(S.Struct({ workspaces: S.Array(S.String) }), S.Undefined), S.description('The workspaces to list dependents for') ), - output: S.array( - S.struct({ - type: S.literal('dependency', 'devDependency'), + output: S.Array( + S.Struct({ + type: S.Literal('dependency', 'devDependency'), source: Workspace, target: Workspace, }) ), - error: S.unknown, + error: S.Unknown, 'diachronic.cli': { path: ['workspace', 'deps'], }, diff --git a/packages/util/src/arbitrary.ts b/packages/util/src/arbitrary.ts index da1896a..2923de8 100644 --- a/packages/util/src/arbitrary.ts +++ b/packages/util/src/arbitrary.ts @@ -14,8 +14,8 @@ import * as fc from 'fast-check' * * @param type */ -export const getArbitrary = (type: S.Schema): fc.Arbitrary => - Arbitrary.make(type)(fc) +export const getArbitrary = (type: S.Schema): fc.Arbitrary => + Arbitrary.makeLazy(type)(fc) /** * Returns a sample value for a type diff --git a/packages/util/src/isoDate.ts b/packages/util/src/isoDate.ts index 5186255..6bc4f80 100644 --- a/packages/util/src/isoDate.ts +++ b/packages/util/src/isoDate.ts @@ -2,7 +2,7 @@ import { pipe } from 'effect' import * as S from '@effect/schema/Schema' export const ISODateString = pipe( - S.string, + S.String, S.filter((s) => !Number.isNaN(new Date(s).getTime()) && s.endsWith('Z'), { jsonSchema: { format: 'date-time' }, identifier: 'ISODateString', @@ -11,4 +11,4 @@ export const ISODateString = pipe( arbitrary: () => (fc) => fc.date().map((x) => x.toISOString()), }) ) -export type ISODateString = S.Schema.To +export type ISODateString = S.Schema.Type diff --git a/packages/util/src/uuid.ts b/packages/util/src/uuid.ts index cfb55c5..2d1b052 100644 --- a/packages/util/src/uuid.ts +++ b/packages/util/src/uuid.ts @@ -10,7 +10,7 @@ export type UUIDGenerator = () => string * @example * Effect.flatMap(UUIDGenerator, (uuid) => Effect.log('hey ' + uuid())) */ -export const UUIDGenerator = Context.Tag('@diachronic.util/uuid') +export const UUIDGenerator = Context.GenericTag('@diachronic.util/uuid') /** * Default UUID generator using node-uuid v4 diff --git a/packages/util/src/yaml.ts b/packages/util/src/yaml.ts index d2aa9ad..2a1f5eb 100644 --- a/packages/util/src/yaml.ts +++ b/packages/util/src/yaml.ts @@ -7,7 +7,7 @@ import * as Data from 'effect/Data' /** * Represents an error in YAML serialization */ -export interface YAMLSerializationError extends Data.Case { +export interface YAMLSerializationError extends Data.Case.Constructor { readonly _tag: '@diachronic.util/YAMLSerializationError' name: string reason: string @@ -32,7 +32,7 @@ const mapException = (e: YAMLException): YAMLSerializationError => */ export const yamlPrint = ( x: any -): Effect.Effect => +): Effect.Effect => Effect.try({ try: () => yaml.dump(x, { noRefs: true }), catch: (e) => mapException(e as YAMLException), @@ -44,7 +44,7 @@ export const yamlPrint = ( */ export const yamlCat = ( xs: any[] -): Effect.Effect => +): Effect.Effect => pipe( xs.map((x) => yamlPrint(x)), Effect.all, diff --git a/packages/workflow-request-response/src/index.ts b/packages/workflow-request-response/src/index.ts index faca96a..656e1b8 100644 --- a/packages/workflow-request-response/src/index.ts +++ b/packages/workflow-request-response/src/index.ts @@ -24,19 +24,15 @@ const DEFAULT_TIMEOUT = Duration.millis(5000) export const workflowUpdate = ( instr: UpdateInstruction, requestTimeout: Duration.Duration = DEFAULT_TIMEOUT -): Effect.Effect => +): Effect.Effect => pipe( Effect.Do, Effect.bind( 'reply', - (): Effect.Effect< - MQTTClient | UUIDGenerator, - unknown, - { - topic: string - listener: Effect.Effect - } - > => + (): Effect.Effect<{ + topic: string + listener: Effect.Effect + }, unknown, MQTTClient | UUIDGenerator> => Effect.map(Effect.all([MQTTClient, UUIDGenerator]), ([mqtt, uuid]) => { const requestId = uuid() const topic = `v1/request-response/${requestId}` @@ -72,11 +68,11 @@ export const workflowUpdate = ( mqtt.on('message', callback) mqtt.subscribe(topic) - }) as Effect.Effect, - } + }) as Effect.Effect, + }; }) ), - Effect.flatMap(({ reply }): Effect.Effect => { + Effect.flatMap(({ reply }): Effect.Effect => { if (instr.action === 'update') { const input = instr.args const signalEffect = signal({ diff --git a/packages/workflow-request-response/src/mqtt.ts b/packages/workflow-request-response/src/mqtt.ts index b039592..87dbc51 100644 --- a/packages/workflow-request-response/src/mqtt.ts +++ b/packages/workflow-request-response/src/mqtt.ts @@ -7,15 +7,15 @@ import * as S from '@effect/schema/Schema' import { UnknownException } from 'effect/Cause' export type MQTTClient = mqtt.MqttClient -export const MQTTClient = Context.Tag('mqtt/MqttClient') +export const MQTTClient = Context.GenericTag('mqtt/MqttClient') // todo. return effectified methods type Client = { publish: ( topic: string, message: string | Buffer - ) => Effect.Effect - subscribe: (topic: string) => Effect.Effect + ) => Effect.Effect + subscribe: (topic: string) => Effect.Effect } // FIXME. this blows up on generate .dts...???? @@ -67,9 +67,9 @@ export const MQTTTest = (args: { brokerURL: string }, impl = MQTTTestImpl()) => export class MQTTConnectionRefusedError extends S.TaggedError()( 'MQTTConnectionRefusedError', { - url: S.string, - message: S.string, - stack: S.optional(S.any), + url: S.String, + message: S.String, + stack: S.optional(S.Any), } ) { public nonRetryable = false diff --git a/packages/workflow-request-response/src/types.ts b/packages/workflow-request-response/src/types.ts index 1c87715..2f6cbe4 100644 --- a/packages/workflow-request-response/src/types.ts +++ b/packages/workflow-request-response/src/types.ts @@ -3,9 +3,9 @@ import { Simplify } from 'effect/Types' export type RequestResponseSchema< Id extends string, - Input extends S.Schema, - Output extends S.Schema, - Error extends S.Schema + Input extends S.Schema, + Output extends S.Schema, + Error extends S.Schema > = { type: Id input: Input @@ -18,9 +18,9 @@ export type WorkflowRequestMetaKey = typeof WorkflowRequestMetaKey export const RequestResponseSchema = < const Id extends string, - Input extends S.Schema, - Output extends S.Schema, - Error extends S.Schema + Input extends S.Schema, + Output extends S.Schema, + Error extends S.Schema >({ type, input, @@ -33,13 +33,13 @@ export const RequestResponseSchema = < error: Error }) => ({ type, - input: S.struct({ - type: S.literal(type), + input: S.Struct({ + type: S.Literal(type), payload: input, }), - workflowInput: S.struct({ - type: S.literal(type), - meta: S.struct({ topic: S.string }), + workflowInput: S.Struct({ + type: S.Literal(type), + meta: S.Struct({ topic: S.String }), payload: input, }), // maybe just define this since TS is having a hard time with inference @@ -55,28 +55,28 @@ export const RequestResponseSchema = < // payload: error, // }) // ), - output: S.struct({ - type: S.literal(`${type}/success`), + output: S.Struct({ + type: S.Literal(`${type}/success`), payload: output, }), - error: S.struct({ - type: S.literal(`${type}/failure`), + error: S.Struct({ + type: S.Literal(`${type}/failure`), payload: error, }), }) export const WorkflowOutput = < const A extends string, - B extends S.Schema, - C extends S.Schema, - D extends S.Schema + B extends S.Schema, + C extends S.Schema, + D extends S.Schema >( a: RequestResponseSchema ): | S.Schema< never, Simplify< - S.Schema.To & { + S.Schema.Type & { readonly meta: { readonly topic: string } } > @@ -84,12 +84,12 @@ export const WorkflowOutput = < | S.Schema< never, Simplify< - S.Schema.To & { + S.Schema.Type & { readonly meta: { readonly topic: string } } > > => - S.union( - S.extend(a.output, S.struct({ meta: S.struct({ topic: S.string }) })), - S.extend(a.error, S.struct({ meta: S.struct({ topic: S.string }) })) + S.Union( + S.extend(a.output, S.Struct({ meta: S.Struct({ topic: S.String }) })), + S.extend(a.error, S.Struct({ meta: S.Struct({ topic: S.String }) })) ) as any diff --git a/packages/workflow/src/actions.ts b/packages/workflow/src/actions.ts index 9279d3a..f54daaf 100644 --- a/packages/workflow/src/actions.ts +++ b/packages/workflow/src/actions.ts @@ -30,7 +30,7 @@ export const assignEffect = < >( fn: ( args: ActionArgs - ) => Effect.Effect + ) => Effect.Effect ): EffectAction => { // @ts-expect-error fn[AssignEffectSymbol] = AssignEffectSymbol @@ -41,11 +41,7 @@ export type CreateEffectActions = ( api: API, runtime: Runtime.Runtime< { - [K in keyof API]: ReturnType extends Effect.Effect< - infer R, - any, - any - > + [K in keyof API]: ReturnType extends Effect.Effect ? R : never }[keyof API] diff --git a/packages/workflow/src/activities.ts b/packages/workflow/src/activities.ts index 2b3138f..5aa37ee 100644 --- a/packages/workflow/src/activities.ts +++ b/packages/workflow/src/activities.ts @@ -40,12 +40,11 @@ export const mapGroupToScheduleActivities = ( ) ) as { [Fn in keyof Group]: ( - args: S.Schema.To, + args: S.Schema.Type, runtimeOptions?: ActivityOptions ) => Effect.Effect< - never, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type > } @@ -82,11 +81,10 @@ export const intoScheduleActivities = ( ) ) as { [Fn in keyof Group]: ( - args: S.Schema.From + args: S.Schema.Encoded ) => Effect.Effect< - never, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type > } @@ -114,18 +112,19 @@ export const makeWorkflowActivities = < {} as { [Namespace in keyof Schemas]: { [Fn in keyof Schemas[Namespace]]: ( - args: S.Schema.From + args: S.Schema.Encoded ) => Effect.Effect< - never, - S.Schema.To extends { _tag: string } + S.Schema.Type, + S.Schema.Type extends { + _tag: string + } ? - | S.Schema.To + | S.Schema.Type | PR.ParseError | BadInput | BadOutput | UnknownException - : BadInput | BadOutput | PR.ParseError | UnknownException, - S.Schema.To + : BadInput | BadOutput | PR.ParseError | UnknownException > } } diff --git a/packages/workflow/src/build-activities.ts b/packages/workflow/src/build-activities.ts index 3a17c15..82b6d1c 100644 --- a/packages/workflow/src/build-activities.ts +++ b/packages/workflow/src/build-activities.ts @@ -11,7 +11,7 @@ export const compileActivities = (args: { inputFilePath: string outputFilePath: string }) => - Effect.async((resume) => { + Effect.async<[], unknown>((resume) => { let compiledActivityNames: string[] = [] let filenameWithoutExtension = path.basename(args.outputFilePath) const fileExtention = path.extname(args.outputFilePath) diff --git a/packages/workflow/src/child.ts b/packages/workflow/src/child.ts index e14d6d6..b834942 100644 --- a/packages/workflow/src/child.ts +++ b/packages/workflow/src/child.ts @@ -16,9 +16,9 @@ export const makeChildWorkflows = < string, { name: string - input: S.Schema - output: S.Schema - error: S.Schema + input: S.Schema + output: S.Schema + error: S.Schema defaultOptions: ChildWorkflowOptions } > @@ -29,7 +29,7 @@ export const makeChildWorkflows = < Object.entries(schema).map(([k, v]) => [ k, ( - args: S.Schema.To<(typeof v)['input']>, + args: S.Schema.Type<(typeof v)['input']>, options?: ChildWorkflowOptions ) => Effect.tryPromise(() => @@ -42,12 +42,11 @@ export const makeChildWorkflows = < ]) ) as { [K in keyof Schema]: ( - args: S.Schema.To, + args: S.Schema.Type, options?: ChildWorkflowOptions ) => Effect.Effect< - never, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type > } @@ -56,12 +55,12 @@ export const makeChildWorkflows2 = < string, { name: string - input: S.Schema - output: S.Schema - error: S.Schema + input: S.Schema + output: S.Schema + error: S.Schema ['temporal.workflow']: { defaultTemporalOptions: ChildWorkflowOptions - signals?: Record> + signals?: Record> } } > @@ -73,7 +72,7 @@ export const makeChildWorkflows2 = < k, { executeChild: ( - args: S.Schema.To<(typeof v)['input']>, + args: S.Schema.Type<(typeof v)['input']>, options?: { temporalOptions?: ChildWorkflowOptions } ) => pipe( @@ -109,7 +108,7 @@ export const makeChildWorkflows2 = < // ) // ), startChild: ( - args: S.Schema.To<(typeof v)['input']>, + args: S.Schema.Type<(typeof v)['input']>, options?: { temporalOptions?: ChildWorkflowOptions } ) => pipe( @@ -129,13 +128,15 @@ export const makeChildWorkflows2 = < signal: K, args: (typeof v)['temporal.workflow']['signals'] extends undefined ? never - : S.Schema.To<(typeof v)['temporal.workflow']['signals'][K]> + : S.Schema.Type< + (typeof v)['temporal.workflow']['signals'][K] + > ) => Effect.tryPromise(() => x.signal(signal, args)), result: () => Effect.tryPromise( () => - x.result() as Promise> + x.result() as Promise> ), // This binds the function to the execution that was started // vs a generic cancel that would cancel any workflow, not necessarily a child of this one. @@ -173,76 +174,70 @@ export const makeChildWorkflows2 = < ) as { [K in keyof Schema]: { executeChild: ( - args: S.Schema.To, + args: S.Schema.Type, options?: { temporalOptions?: ChildWorkflowOptions } ) => Effect.Effect< - never, - WorkflowExecutionAlreadyStartedError | S.Schema.To, - S.Schema.To + S.Schema.Type, + WorkflowExecutionAlreadyStartedError | S.Schema.Type > startChild: ( - args: S.Schema.To, + args: S.Schema.Type, options?: { temporalOptions?: ChildWorkflowOptions } ) => Effect.Effect< - never, - WorkflowExecutionAlreadyStartedError | unknown, { workflowId: string firstExecutionRunId?: string result: () => Effect.Effect< - never, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type > signal: ( signal: K2, args: Schema[K]['temporal.workflow']['signals'] extends Record< string, - S.Schema + S.Schema > - ? S.Schema.To + ? S.Schema.Type : never - ) => Effect.Effect - cancel: () => Effect.Effect - } + ) => Effect.Effect + cancel: () => Effect.Effect + }, + WorkflowExecutionAlreadyStartedError | unknown > } } // export type ChildWorkflowHandle = { export type EffectWorkflowAPI = { executeChild: ( - args: S.Schema.To, + args: S.Schema.Type, options?: { temporalOptions?: ChildWorkflowOptions } ) => Effect.Effect< - never, - WorkflowExecutionAlreadyStartedError | S.Schema.To, - S.Schema.To + S.Schema.Type, + WorkflowExecutionAlreadyStartedError | S.Schema.Type > startChild: ( - args: S.Schema.To, + args: S.Schema.Type, options?: { temporalOptions?: ChildWorkflowOptions } ) => Effect.Effect< - never, - WorkflowExecutionAlreadyStartedError | unknown, { workflowId: string firstExecutionRunId?: string result: () => Effect.Effect< - never, - S.Schema.To, - S.Schema.To + S.Schema.Type, + S.Schema.Type > signal: ( signal: K2, args: T['temporal.workflow']['signals'] extends Record< string, - S.Schema + S.Schema > - ? S.Schema.To + ? S.Schema.Type : never - ) => Effect.Effect - cancel: () => Effect.Effect - } + ) => Effect.Effect + cancel: () => Effect.Effect + }, + WorkflowExecutionAlreadyStartedError | unknown > } @@ -253,15 +248,15 @@ export type EffectWorkflowAPIs> = { export type EffectWorkflowHandle = { workflowId: string firstExecutionRunId?: string - result: () => Effect.Effect + result: () => Effect.Effect signal: ( signal: K2, args: T['temporal.workflow']['signals'] extends Record< string, - S.Schema + S.Schema > - ? S.Schema.To + ? S.Schema.Type : never - ) => Effect.Effect - cancel: () => Effect.Effect + ) => Effect.Effect + cancel: () => Effect.Effect } diff --git a/packages/workflow/src/dbfx.ts b/packages/workflow/src/dbfx.ts index 10dfd92..c5889ee 100644 --- a/packages/workflow/src/dbfx.ts +++ b/packages/workflow/src/dbfx.ts @@ -1,16 +1,16 @@ import { Effect, pipe, Ref } from 'effect' export type DbFx = { - reset: (v: Db) => Effect.Effect - swap: (f: (a: Db) => Db) => Effect.Effect - assoc: (k: K, v: Db[K]) => Effect.Effect - dissoc: (k: K) => Effect.Effect + reset: (v: Db) => Effect.Effect + swap: (f: (a: Db) => Db) => Effect.Effect + assoc: (k: K, v: Db[K]) => Effect.Effect + dissoc: (k: K) => Effect.Effect updateIn: ( k: K, f: (x: Db[K]) => Db[K] - ) => Effect.Effect - get: (k: K) => Effect.Effect - deref: () => Effect.Effect + ) => Effect.Effect + get: (k: K) => Effect.Effect + deref: () => Effect.Effect } export const DbFx = >(a: Ref.Ref) => ({ @@ -41,7 +41,7 @@ export const DbFx = >(a: Ref.Ref) => ({ */ const withExternalPersistence = >( a: Ref.Ref, - persist: (a: T) => Effect.Effect, + persist: (a: T) => Effect.Effect, config?: { debounceTimeout?: number } ) => ({ swap: (f: (a: T) => T) => diff --git a/packages/workflow/src/exit-handler.ts b/packages/workflow/src/exit-handler.ts index 6e4be83..2a05b5a 100644 --- a/packages/workflow/src/exit-handler.ts +++ b/packages/workflow/src/exit-handler.ts @@ -2,9 +2,9 @@ import './workflow-runtime' import { Cause, Exit } from 'effect' import * as S from '@effect/schema/Schema' -const ParseError = S.struct({ - _tag: S.literal('ParseError'), - errors: S.nonEmptyArray(S.any), +const ParseError = S.Struct({ + _tag: S.Literal('ParseError'), + errors: S.NonEmptyArray(S.Any), }) export const handleExitFailure = (result: Exit.Exit) => { diff --git a/packages/workflow/src/guards.ts b/packages/workflow/src/guards.ts index e5fbb2d..12d34a8 100644 --- a/packages/workflow/src/guards.ts +++ b/packages/workflow/src/guards.ts @@ -7,17 +7,13 @@ export type AnyXStateGuard = Guard export type EffectGuard = ( args: AnyXStateGuard -) => Effect.Effect +) => Effect.Effect export type CreateEffectGuards = ( api: API, runtime: Runtime.Runtime< { - [K in keyof API]: ReturnType extends Effect.Effect< - infer R, - any, - any - > + [K in keyof API]: ReturnType extends Effect.Effect ? R : never }[keyof API] @@ -37,7 +33,7 @@ export const createEffectGuards: CreateEffectGuards = (api, runtime) => { for (const key in api) { const fn = api[key] as ( ...args: any[] - ) => Effect.Effect + ) => Effect.Effect const guard: AnyXStateGuard = (args: GuardArgs) => { // TODO. see if we can access the full state diff --git a/packages/workflow/src/reload-worker/api.ts b/packages/workflow/src/reload-worker/api.ts index 070a4ca..38f24f6 100644 --- a/packages/workflow/src/reload-worker/api.ts +++ b/packages/workflow/src/reload-worker/api.ts @@ -4,12 +4,12 @@ import { Effect } from 'effect' import { MQTTClient } from '@diachronic/workflow-request-response/mqtt' export const Reload = pipe( - S.struct({ - type: S.literal('reload'), - payload: S.struct({ - url: S.string, + S.Struct({ + type: S.Literal('reload'), + payload: S.Struct({ + url: S.String, from: pipe( - S.string, + S.String, S.description( 'The address of the sender, to which this process will reply. For MQTT this is a topic the sender creates and subscribes to.' ) @@ -20,7 +20,7 @@ export const Reload = pipe( 'An instruction to reload the workflow and activity bundle with the code at the provided URL.' ) ) -export type Reload = S.Schema.To +export type Reload = S.Schema.Type export type MessageType = Reload diff --git a/packages/workflow/src/reload-worker/config.ts b/packages/workflow/src/reload-worker/config.ts index c8d064b..9f2f4db 100644 --- a/packages/workflow/src/reload-worker/config.ts +++ b/packages/workflow/src/reload-worker/config.ts @@ -1,19 +1,19 @@ import * as S from '@effect/schema/Schema' const RequiredConfig = S.extend( - S.struct({ - TEMPORAL_ADDRESS: S.string, - TEMPORAL_NAMESPACE: S.string, - TEMPORAL_TASK_QUEUE: S.string, - DIACHRONIC_CI_MQTT_BROKER_URL: S.string, - DIACHRONIC_CI_MQTT_TOPIC: S.string, + S.Struct({ + TEMPORAL_ADDRESS: S.String, + TEMPORAL_NAMESPACE: S.String, + TEMPORAL_TASK_QUEUE: S.String, + DIACHRONIC_CI_MQTT_BROKER_URL: S.String, + DIACHRONIC_CI_MQTT_TOPIC: S.String, }), - S.union( - S.struct({ - WORKFLOWS_PATH: S.string, + S.Union( + S.Struct({ + WORKFLOWS_PATH: S.String, }), - S.struct({ - ACTIVITIES_PATH: S.string, + S.Struct({ + ACTIVITIES_PATH: S.String, }) ) ) diff --git a/packages/workflow/src/reload-worker/primary.ts b/packages/workflow/src/reload-worker/primary.ts index 2d04b8f..efd9e34 100644 --- a/packages/workflow/src/reload-worker/primary.ts +++ b/packages/workflow/src/reload-worker/primary.ts @@ -1,6 +1,6 @@ import cluster, { Worker as ClusterWorker } from 'cluster' import * as Effect from 'effect/Effect' -import { Layer, Logger, LogLevel, Queue, Scope } from 'effect' +import { Layer, Logger, LogLevel, Queue, Scope, Unify } from 'effect' import { pipe } from 'effect/Function' import * as S from '@effect/schema/Schema' import { @@ -94,7 +94,7 @@ const processReload = (a: Reload) => { Effect.flatMap(() => resetWorker(paths)), Effect.withLogSpan('reset-worker'), Effect.flatMap(() => - prevDir ? removeDirectory(prevDir) : Effect.succeed(Effect.unit) + prevDir ? removeDirectory(prevDir) : Effect.succeed(Effect.void) ), Effect.flatMap(() => pipe( @@ -119,13 +119,13 @@ const program = () => pipe(Effect.logDebug('Received message'), Effect.annotateLogs(a)) ), Effect.flatMap( - Effect.unifiedFn((a) => { + Unify.unify((a) => { switch (a.type) { case 'reload': { return processReload(a) } default: - return Effect.unit + return Effect.void } }) ), @@ -156,21 +156,22 @@ export const main = async () => { // Receive messages over MQTT` pipe( - Effect.asyncEffect((resume) => - Effect.flatMap(MQTTClient, (mqtt) => { - const cb = (_address: string, message: MessageType) => { - try { - const data = JSON.parse(message.toString()) - q.unsafeOffer(data) - } catch (e) { - console.error(e) + Effect.asyncEffect( + (resume) => + Effect.flatMap(MQTTClient, (mqtt) => { + const cb = (_address: string, message: MessageType) => { + try { + const data = JSON.parse(message.toString()) + q.unsafeOffer(data) + } catch (e) { + console.error(e) + } } - } - mqtt.on('message', cb as any) - mqtt.subscribe(address) + mqtt.on('message', cb as any) + mqtt.subscribe(address) - return Effect.unit - }) + return Effect.void + }) ), Effect.catchAll(Effect.succeed), Effect.provide(mqttLayer), diff --git a/packages/workflow/src/reload-worker/util.ts b/packages/workflow/src/reload-worker/util.ts index c0577d8..0ec9c58 100644 --- a/packages/workflow/src/reload-worker/util.ts +++ b/packages/workflow/src/reload-worker/util.ts @@ -29,12 +29,12 @@ export const exec = ( cmd: string, options?: ChildProcess.ExecOptions, stdio?: { stdout?: boolean; stderr?: boolean } -): Effect.Effect => +): Effect.Effect => pipe( Effect.logDebug(`Executing shell command`), Effect.annotateLogs({ $: cmd }), Effect.flatMap(() => - Effect.async((resume) => { + Effect.async((resume) => { const cp = ChildProcess.exec( cmd, options || {}, @@ -60,9 +60,9 @@ export const untar = (from: string, to: string) => exec(`tar -xzf ${from} -C ${to}`) export const ensureDir = (dir: string) => - Effect.async((resume) => + Effect.async((resume) => fs.mkdir(dir, { recursive: true }, (e) => - resume(e ? Effect.fail(e) : Effect.succeed(Effect.unit)) + resume(e ? Effect.fail(e) : Effect.succeed(Effect.void)) ) ) diff --git a/packages/workflow/src/self.ts b/packages/workflow/src/self.ts index 289e288..18bdf66 100644 --- a/packages/workflow/src/self.ts +++ b/packages/workflow/src/self.ts @@ -19,17 +19,13 @@ import { toApplicationFailure } from './errors' export type Self = { id: string close: (exit: Exit.Exit) => Effect.Effect - isContinueAsNewSuggested: () => Effect.Effect - continueAsNew: (state: Db) => Effect.Effect + isContinueAsNewSuggested: () => Effect.Effect + continueAsNew: (state: Db) => Effect.Effect signalWorkflow: ( workflowId: string, signalName: K, - data: S.Schema.To - ) => Effect.Effect< - never, - SignalExternalWorkflowError, - SignalExternalWorkflowOutput - > + data: S.Schema.Type + ) => Effect.Effect } export const make = < @@ -46,11 +42,10 @@ export const make = < signalWorkflow: ( workflowId: string, signalName: K, - data: S.Schema.To + data: S.Schema.Type ): Effect.Effect< - never, - SignalExternalWorkflowError, - SignalExternalWorkflowOutput + SignalExternalWorkflowOutput, + SignalExternalWorkflowError > => pipe( Effect.Do, diff --git a/packages/workflow/src/signal-external-workflow.ts b/packages/workflow/src/signal-external-workflow.ts index 1f22886..3c29cd4 100644 --- a/packages/workflow/src/signal-external-workflow.ts +++ b/packages/workflow/src/signal-external-workflow.ts @@ -6,19 +6,19 @@ export class ExternalWorkflowNotFoundError extends S.TaggedError> */ export type PromiseInterface> = { [K in keyof API & string]: ( - input: S.Schema.To - ) => Promise> + input: S.Schema.Type + ) => Promise> } export type ActivityFn = ( diff --git a/packages/workflow/src/worker-entrypoint.ts b/packages/workflow/src/worker-entrypoint.ts index 1312485..8af9ff6 100644 --- a/packages/workflow/src/worker-entrypoint.ts +++ b/packages/workflow/src/worker-entrypoint.ts @@ -1,15 +1,15 @@ import * as S from '@effect/schema/Schema' import { createWorker } from './worker' -const RequiredConfig = S.struct({ - TEMPORAL_ADDRESS: S.string, - TEMPORAL_NAMESPACE: S.string, - TEMPORAL_TASK_QUEUE: S.string, +const RequiredConfig = S.Struct({ + TEMPORAL_ADDRESS: S.String, + TEMPORAL_NAMESPACE: S.String, + TEMPORAL_TASK_QUEUE: S.String, }) const OptionalConfig = S.partial( - S.struct({ - WORKFLOWS_PATH: S.string, - ACTIVITIES_PATH: S.string, + S.Struct({ + WORKFLOWS_PATH: S.String, + ACTIVITIES_PATH: S.String, }) ) const Config = S.extend(RequiredConfig, OptionalConfig) diff --git a/packages/workflow/src/worker.ts b/packages/workflow/src/worker.ts index 95a84ef..1e59552 100644 --- a/packages/workflow/src/worker.ts +++ b/packages/workflow/src/worker.ts @@ -27,41 +27,41 @@ import { } from '@diachronic/k8s-health-check' import { loggerSink } from './workflow-logging' -export const ActivityCode = S.union( - S.struct({ - type: S.literal('source:filepath'), - path: S.string, +export const ActivityCode = S.Union( + S.Struct({ + type: S.Literal('source:filepath'), + path: S.String, }), - S.struct({ - type: S.literal('source:object'), - activities: S.object, + S.Struct({ + type: S.Literal('source:object'), + activities: S.Object, }), - S.struct({ - type: S.literal('compiled:filepath'), - path: S.string, + S.Struct({ + type: S.Literal('compiled:filepath'), + path: S.String, }) ) -export type ActivityCode = S.Schema.To +export type ActivityCode = S.Schema.Type -export const WorkflowCode = S.union( - S.struct({ - type: S.literal('source:filepath'), - path: S.string, +export const WorkflowCode = S.Union( + S.Struct({ + type: S.Literal('source:filepath'), + path: S.String, }), - S.struct({ - type: S.literal('compiled:string'), - code: S.string, + S.Struct({ + type: S.Literal('compiled:string'), + code: S.String, }), - S.struct({ - type: S.literal('compiled:filepath'), - path: S.string, + S.Struct({ + type: S.Literal('compiled:filepath'), + path: S.String, }) ) -export type WorkflowCode = S.Schema.To +export type WorkflowCode = S.Schema.Type export const resolveFilepathOrFail = ( path: string -): Effect.Effect => +): Effect.Effect => pipe( Effect.try(() => require.resolve(path)), Effect.mapError((e) => @@ -74,7 +74,7 @@ export const resolveFilepathOrFail = ( export const resolveActivityCode = ( code: ActivityCode -): Effect.Effect => { +): Effect.Effect<{ activities: object }, unknown> => { switch (code.type) { case 'compiled:filepath': case 'source:filepath': @@ -90,7 +90,7 @@ export const resolveActivityCode = ( } } -export interface FileNotFound extends Data.Case { +export interface FileNotFound extends Data.Case.Constructor { readonly _tag: 'FileNotFound' attemptedPath?: string error: unknown @@ -98,7 +98,7 @@ export interface FileNotFound extends Data.Case { export const FileNotFound = Data.tagged('FileNotFound') -export interface WorkflowCodeNotFound extends Data.Case { +export interface WorkflowCodeNotFound extends Data.Case.Constructor { readonly _tag: 'WorkflowCodeNotFound' attemptedPath?: string error: unknown @@ -117,9 +117,8 @@ export const WorkflowCodeNotFound = Data.tagged( export const resolveWorkflowCode = ( code: WorkflowCode ): Effect.Effect< - never, - WorkflowCodeNotFound, - { workflowsPath: string } | { workflowBundle: WorkflowBundleOption } + { workflowsPath: string } | { workflowBundle: WorkflowBundleOption }, + WorkflowCodeNotFound > => { switch (code.type) { case 'source:filepath': @@ -150,7 +149,7 @@ export const resolveWorkflowCode = ( } // TODO. this needs to be in util or something -const LogLevelSchema = S.literal< +const LogLevelSchema = S.Literal< [ LogLevel.All['_tag'], LogLevel.Fatal['_tag'], @@ -162,16 +161,16 @@ const LogLevelSchema = S.literal< LogLevel.None['_tag'] ] >('All', 'Fatal', 'Error', 'Warning', 'Info', 'Debug', 'Trace', 'None') -export type LogLevels = S.Schema.To +export type LogLevels = S.Schema.Type -export const TemporalWorkerConfig = S.struct({ - namespace: S.string, - taskQueue: S.string, +export const TemporalWorkerConfig = S.Struct({ + namespace: S.String, + taskQueue: S.String, connection: TemporalConfig.pipe(S.pick('clientCert', 'clientKey', 'address')), workflows: S.optional(WorkflowCode), activities: S.optional(ActivityCode), logLevel: S.optional(LogLevelSchema), - k8sHTTPHealthCheckDisabled: S.optional(S.boolean), + k8sHTTPHealthCheckDisabled: S.optional(S.Boolean), healthCheckConfig: S.optional(HealthCheckServerConfig, { default: () => ({ port: 8080, @@ -181,14 +180,10 @@ export const TemporalWorkerConfig = S.struct({ }), }), workerOptions: S.optional( - S.record(S.string, S.unknown) as unknown as S.Schema< - never, - Partial, - Partial - > + S.Record(S.String, S.Unknown) as unknown as S.Schema> ), }) -export type TemporalWorkerConfig = S.Schema.From< +export type TemporalWorkerConfig = S.Schema.Encoded< typeof TemporalWorkerConfig > & { workerOptions?: Partial } diff --git a/packages/workflow/src/workflow-from-activity.ts b/packages/workflow/src/workflow-from-activity.ts index 0b89340..1cde75c 100644 --- a/packages/workflow/src/workflow-from-activity.ts +++ b/packages/workflow/src/workflow-from-activity.ts @@ -5,16 +5,16 @@ import * as Effect from 'effect/Effect' export const workflowFromActivity = < Spec extends { - input: S.Schema - output: S.Schema - error: S.Schema + input: S.Schema + output: S.Schema + error: S.Schema activity: { name: string; options?: ActivityOptions } } >( spec: Spec, workflowName?: string ) => { - let wf = (args: S.Schema.To) => { + let wf = (args: S.Schema.Type) => { return pipe( Effect.tryPromise(() => scheduleActivity( diff --git a/packages/workflow/src/workflow-info.ts b/packages/workflow/src/workflow-info.ts index 97174d7..d679172 100644 --- a/packages/workflow/src/workflow-info.ts +++ b/packages/workflow/src/workflow-info.ts @@ -5,7 +5,7 @@ import { } from '@temporalio/workflow' export type WorkflowInfo = () => TemporalWorkflowInfo -export const WorkflowInfo = Context.Tag() +export const WorkflowInfo = Context.GenericTag("@services/WorkflowInfo") export const WorkflowInfoLayer = ( workflowInfo: () => TemporalWorkflowInfo = temporalWorkflowInfo diff --git a/yarn.lock b/yarn.lock index a81ce2d..8eeee6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -361,6 +361,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.5.5": + version: 7.24.6 + resolution: "@babel/runtime@npm:7.24.6" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 44d95ca743898fed31b4cefef31de6fd3cf7906e94493368e9d6538289cc52c6c46185205d9c01d38466a5b3f673550f80892d30b1ed02a2c13e704863a8cc48 + languageName: node + linkType: hard + "@babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": version: 7.22.15 resolution: "@babel/template@npm:7.22.15" @@ -408,6 +417,242 @@ __metadata: languageName: node linkType: hard +"@changesets/apply-release-plan@npm:^6.1.3": + version: 6.1.4 + resolution: "@changesets/apply-release-plan@npm:6.1.4" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/config": ^2.3.1 + "@changesets/get-version-range-type": ^0.3.2 + "@changesets/git": ^2.0.0 + "@changesets/types": ^5.2.1 + "@manypkg/get-packages": ^1.1.3 + detect-indent: ^6.0.0 + fs-extra: ^7.0.1 + lodash.startcase: ^4.4.0 + outdent: ^0.5.0 + prettier: ^2.7.1 + resolve-from: ^5.0.0 + semver: ^7.5.3 + checksum: d386aee70c5483c97d964c6fa1191878005b7050d34b2e1e4a1ad66d9ad44f8f20d1c884e01e770b954bd2d4364f935510e53ae896212669f67e5c37b2a610c7 + languageName: node + linkType: hard + +"@changesets/assemble-release-plan@npm:^5.2.3, @changesets/assemble-release-plan@npm:^5.2.4": + version: 5.2.4 + resolution: "@changesets/assemble-release-plan@npm:5.2.4" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/errors": ^0.1.4 + "@changesets/get-dependents-graph": ^1.3.6 + "@changesets/types": ^5.2.1 + "@manypkg/get-packages": ^1.1.3 + semver: ^7.5.3 + checksum: 32f443a0afec3d5a4afc68c8de32e8ff88531ea24976b50583b1d6870d71cec2729f27952af82854eb54e2ad0a619872d211d654c596ee0eb42c83ab54ad15ae + languageName: node + linkType: hard + +"@changesets/changelog-git@npm:^0.1.14": + version: 0.1.14 + resolution: "@changesets/changelog-git@npm:0.1.14" + dependencies: + "@changesets/types": ^5.2.1 + checksum: 60b45bb899e66cec669ab3884d5d18550cd30bf5a8b06f335eb72aa6c9e018dd3e0187e4df61c91a22076153e346b735b792f0e9c6186e6245b1b7aec2fc42d4 + languageName: node + linkType: hard + +"@changesets/cli@npm:2.26.1": + version: 2.26.1 + resolution: "@changesets/cli@npm:2.26.1" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/apply-release-plan": ^6.1.3 + "@changesets/assemble-release-plan": ^5.2.3 + "@changesets/changelog-git": ^0.1.14 + "@changesets/config": ^2.3.0 + "@changesets/errors": ^0.1.4 + "@changesets/get-dependents-graph": ^1.3.5 + "@changesets/get-release-plan": ^3.0.16 + "@changesets/git": ^2.0.0 + "@changesets/logger": ^0.0.5 + "@changesets/pre": ^1.0.14 + "@changesets/read": ^0.5.9 + "@changesets/types": ^5.2.1 + "@changesets/write": ^0.2.3 + "@manypkg/get-packages": ^1.1.3 + "@types/is-ci": ^3.0.0 + "@types/semver": ^6.0.0 + ansi-colors: ^4.1.3 + chalk: ^2.1.0 + enquirer: ^2.3.0 + external-editor: ^3.1.0 + fs-extra: ^7.0.1 + human-id: ^1.0.2 + is-ci: ^3.0.1 + meow: ^6.0.0 + outdent: ^0.5.0 + p-limit: ^2.2.0 + preferred-pm: ^3.0.0 + resolve-from: ^5.0.0 + semver: ^5.4.1 + spawndamnit: ^2.0.0 + term-size: ^2.1.0 + tty-table: ^4.1.5 + bin: + changeset: bin.js + checksum: d7d6445ebbc1b2718d97852a2275f59af32020e8a1e1efe666767819dd862c7794ce50627ad52f1f97ba4bc57c81bfc4750e92265757cc94ab2d44198d2afb10 + languageName: node + linkType: hard + +"@changesets/config@npm:^2.3.0, @changesets/config@npm:^2.3.1": + version: 2.3.1 + resolution: "@changesets/config@npm:2.3.1" + dependencies: + "@changesets/errors": ^0.1.4 + "@changesets/get-dependents-graph": ^1.3.6 + "@changesets/logger": ^0.0.5 + "@changesets/types": ^5.2.1 + "@manypkg/get-packages": ^1.1.3 + fs-extra: ^7.0.1 + micromatch: ^4.0.2 + checksum: 8af58e3add4751ac8ce2c01f026ac8843b8d1c07c9a3df6518496eaef67f56458a84cad310763c588f7eccbf6831afbf280df7e05e78b294027b6b847be3d0cc + languageName: node + linkType: hard + +"@changesets/errors@npm:^0.1.4": + version: 0.1.4 + resolution: "@changesets/errors@npm:0.1.4" + dependencies: + extendable-error: ^0.1.5 + checksum: 10734f1379715bf5a70b566dd42b50a75964d76f382bb67332776614454deda6d04a43dd7e727cd7cba56d7f2f7c95a07c7c0a19dd5d64fb1980b28322840733 + languageName: node + linkType: hard + +"@changesets/get-dependents-graph@npm:^1.3.5, @changesets/get-dependents-graph@npm:^1.3.6": + version: 1.3.6 + resolution: "@changesets/get-dependents-graph@npm:1.3.6" + dependencies: + "@changesets/types": ^5.2.1 + "@manypkg/get-packages": ^1.1.3 + chalk: ^2.1.0 + fs-extra: ^7.0.1 + semver: ^7.5.3 + checksum: d2cbbc5041063b939899502d1b264a0d9edb655acefd7f6197883229156bb7cfd1ace642ae4a1f7f7b432f2c51429f5dc9851ff5a9ed47f1c0159916e66627a9 + languageName: node + linkType: hard + +"@changesets/get-release-plan@npm:^3.0.16": + version: 3.0.17 + resolution: "@changesets/get-release-plan@npm:3.0.17" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/assemble-release-plan": ^5.2.4 + "@changesets/config": ^2.3.1 + "@changesets/pre": ^1.0.14 + "@changesets/read": ^0.5.9 + "@changesets/types": ^5.2.1 + "@manypkg/get-packages": ^1.1.3 + checksum: 8a0e3794d0f1e6220d173dbec96352ad69b585d013c3183888ca598dfdfcaa8a5ac3f7f36d5c511575cdc3559c2ad6f8cecfaa16ba9c24380899a81daa7af924 + languageName: node + linkType: hard + +"@changesets/get-version-range-type@npm:^0.3.2": + version: 0.3.2 + resolution: "@changesets/get-version-range-type@npm:0.3.2" + checksum: b7ee7127c472a3886906ca6db336ac11233a5e75abc882084bfb4794e79a8936e3faceec3c04bf61c26453cd7f74278d9bf22aea4cdca8c1cd992591925b3c9b + languageName: node + linkType: hard + +"@changesets/git@npm:^2.0.0": + version: 2.0.0 + resolution: "@changesets/git@npm:2.0.0" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/errors": ^0.1.4 + "@changesets/types": ^5.2.1 + "@manypkg/get-packages": ^1.1.3 + is-subdir: ^1.1.1 + micromatch: ^4.0.2 + spawndamnit: ^2.0.0 + checksum: 3820b7b689bbe8dfb93222c766bee214e68a45f07b2b5c8056891f9ffe6f1e369c0f84388246a9eea5317b496ae80ffd1508319190f79c359f060ebf8ccb7b13 + languageName: node + linkType: hard + +"@changesets/logger@npm:^0.0.5": + version: 0.0.5 + resolution: "@changesets/logger@npm:0.0.5" + dependencies: + chalk: ^2.1.0 + checksum: bfec3cd9122b00c0ec25e96730f771ffd662ef3906d571bad1e4e9993f9d54d357d3eaf074b3dfaa4e23af759ce68efa2a97d8b845b0d8c951df5d21c6dfdff5 + languageName: node + linkType: hard + +"@changesets/parse@npm:^0.3.16": + version: 0.3.16 + resolution: "@changesets/parse@npm:0.3.16" + dependencies: + "@changesets/types": ^5.2.1 + js-yaml: ^3.13.1 + checksum: 475f808ac8d33ec90af3914d55af1da8eeb9336d6cab7dd9e5be74af844f0ec04f4a67d5237a1d3284a468e0c9198e2be01d0e5870a1b28e63bc240f5f1ffea9 + languageName: node + linkType: hard + +"@changesets/pre@npm:^1.0.14": + version: 1.0.14 + resolution: "@changesets/pre@npm:1.0.14" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/errors": ^0.1.4 + "@changesets/types": ^5.2.1 + "@manypkg/get-packages": ^1.1.3 + fs-extra: ^7.0.1 + checksum: 6b849bd6f916476a5b5664bc4286020bee506985c82f723a757fa4e681b0b7129db81751f16072ac55a980ffd83a4b234d6b8d0f8b6bc889aa0c0fd5377431e8 + languageName: node + linkType: hard + +"@changesets/read@npm:^0.5.9": + version: 0.5.9 + resolution: "@changesets/read@npm:0.5.9" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/git": ^2.0.0 + "@changesets/logger": ^0.0.5 + "@changesets/parse": ^0.3.16 + "@changesets/types": ^5.2.1 + chalk: ^2.1.0 + fs-extra: ^7.0.1 + p-filter: ^2.1.0 + checksum: 0875a80829186de2da55bc0347601cc31b269d54fb6967a5093abacbbd9f949e352907b8340b61348a304228fdade670ded151327f16eea3424b5b4b2bb9888c + languageName: node + linkType: hard + +"@changesets/types@npm:^4.0.1": + version: 4.1.0 + resolution: "@changesets/types@npm:4.1.0" + checksum: 72c1f58044178ca867dd9349ecc4b7c233ce3781bb03b5b72a70c3166fbbab54a2f2cb19a81f96b4649ba004442c8734569fba238be4dd737fb4624a135c6098 + languageName: node + linkType: hard + +"@changesets/types@npm:^5.2.1": + version: 5.2.1 + resolution: "@changesets/types@npm:5.2.1" + checksum: 527dc1aa41b040fe35bcd55f7d07bec710320b179b000c429723e25b87aac18be487daf5047d4fecf2781aad78f73abff111e76e411b652f7a2e812a464c69f2 + languageName: node + linkType: hard + +"@changesets/write@npm:^0.2.3": + version: 0.2.3 + resolution: "@changesets/write@npm:0.2.3" + dependencies: + "@babel/runtime": ^7.20.1 + "@changesets/types": ^5.2.1 + fs-extra: ^7.0.1 + human-id: ^1.0.2 + prettier: ^2.7.1 + checksum: 40ad8069f9adc565b78a5f25992e31b41a12e551d94c29e1b4def49ce98871a1e358feda6536be8b363a6dba18b1226a22ecfc60fdd7bc1e74bfcf46b07f91be + languageName: node + linkType: hard + "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -640,103 +885,69 @@ __metadata: languageName: unknown linkType: soft -"@effect-use/gcp-gcs@npm:1.1.4, @effect-use/gcp-gcs@npm:^1.1.4": - version: 1.1.4 - resolution: "@effect-use/gcp-gcs@npm:1.1.4" +"@effect-use/gcp-gcs@npm:4.0.0": + version: 4.0.0 + resolution: "@effect-use/gcp-gcs@npm:4.0.0" dependencies: - "@effect/schema": 0.42.0 + "@effect/schema": 0.61.5 "@google-cloud/storage": ^6.10.1 - effect: 2.0.0-next.47 + effect: 2.2.3 tmp: ^0.2.1 - checksum: af5c4aea1a8f6f711a48caa32534205772d0f3e74bc057df961358f7f7e363c6215c6ea809e696dac0ac42c07470487188a29cef7bd52270350b432292c58678 + checksum: 888d7cc5d7b4df943e9e765d4e644bbd1d5d29da60e59fc6a0033ae33a8922f935b5dbfe3649c4ca0af58ae788db94815c619da6839f5d1bf91704eaf9ab398e languageName: node linkType: hard -"@effect-use/gcp-gcs@npm:3.0.0": - version: 3.0.0 - resolution: "@effect-use/gcp-gcs@npm:3.0.0" +"@effect-use/gcp-logging@npm:5.0.0": + version: 5.0.0 + resolution: "@effect-use/gcp-logging@npm:5.0.0" dependencies: "@effect/schema": 0.61.5 - "@google-cloud/storage": ^6.10.1 effect: 2.2.3 - tmp: ^0.2.1 - checksum: 605b7143d058e42a4d9e9ab887d84bc82270667d94f3c12633c7baaf6c97d6d6ac57d947a7fa359f7e2ccf9171d67091c8bb8c23373e18a008fb3589e391e4e8 + checksum: de4a3b929687a203d7d1300670047879be2a5cb10ec6162c1235645fe84cf311e766273f39e76d3f4d15bcc720a13369e2d6f77955f4f19471c739a34e4d8f41 languageName: node linkType: hard -"@effect-use/gcp-logging@npm:4.0.0": +"@effect-use/http-client@npm:4.0.0": version: 4.0.0 - resolution: "@effect-use/gcp-logging@npm:4.0.0" + resolution: "@effect-use/http-client@npm:4.0.0" dependencies: "@effect/schema": 0.61.5 effect: 2.2.3 - checksum: acea1cdd1b649919fa92c2f9bc4da129ec631a068b1864a96141068caeafa3558c8f8e57f1e71796ab1057de1e65350887f17c487b7d142d94818151bbfbbf6a - languageName: node - linkType: hard - -"@effect-use/http-client@npm:1.0.0": - version: 1.0.0 - resolution: "@effect-use/http-client@npm:1.0.0" - dependencies: - "@effect/schema": 0.42.0 - "@types/node": 18 - effect: 2.0.0-next.47 - checksum: 5c1824434bec507c45166214e7974d4554022cfc70078b274a3dca96b00aa383f430944ce089c8dd2a76603f215daaca63361992bcd217965e69b01c7d1ba792 - languageName: node - linkType: hard - -"@effect-use/http-client@npm:2.0.0": - version: 2.0.0 - resolution: "@effect-use/http-client@npm:2.0.0" - dependencies: - "@effect/schema": 0.42.0 - "@types/node": 18 - effect: 2.0.0-next.47 - checksum: ada100ed13fc9409fb20b49f3cb5b004ee08ed129b641ee05c9cbb3cb0f312a758619bbbc0b0194dad600324dd9e33ce65904547c95eb54bbee5b558e30adaef - languageName: node - linkType: hard - -"@effect-use/http-client@npm:^1.0.1": - version: 1.0.1 - resolution: "@effect-use/http-client@npm:1.0.1" - dependencies: - "@effect/schema": 0.42.0 - "@types/node": 18 - effect: 2.0.0-next.47 - checksum: 0a73a1d23b26b4c2a62e6e7db35af11ad92978e2969255b9078fec10d07f2670900ec1d19a9d37ff57ec505294e41f22aea732c331571b06aa2401bbb3b973df + checksum: 2c53c01fca42e5936617c59abebc539bb61b4231091a657c410b81a7261663b883cc4cffd6cd6362cc6461ed62810ef9f036fd0045e8aea817b827a9e781fb0a languageName: node linkType: hard -"@effect-use/temporal-client@npm:3.0.0": - version: 3.0.0 - resolution: "@effect-use/temporal-client@npm:3.0.0" +"@effect-use/temporal-client@npm:4.0.0": + version: 4.0.0 + resolution: "@effect-use/temporal-client@npm:4.0.0" dependencies: - "@effect-use/temporal-config": ^3.0.0 + "@effect-use/temporal-config": ^4.0.0 "@effect/schema": 0.61.5 "@temporalio/client": 1.8.6 "@temporalio/workflow": 1.8.6 effect: 2.2.3 - checksum: be474511274ee3046bbb74db2f2faf3de7fda3c70fd52cf99112b69a7cc9e779665c42d29fdd095ddc58d311533562d444fa61f2d9b192f70e43bb79523b1345 + checksum: 08efe0e19fc7bd2e53329a73b087a1d08b497870e99e7e27038974d9f5052dbf4395b50bb508b62f396e82c025174db0fb15a5aecd2e8508b1002b1ef3be99f3 languageName: node linkType: hard -"@effect-use/temporal-config@npm:3.0.0": - version: 3.0.0 - resolution: "@effect-use/temporal-config@npm:3.0.0" +"@effect-use/temporal-config@npm:4.0.0": + version: 4.0.0 + resolution: "@effect-use/temporal-config@npm:4.0.0" dependencies: "@effect/schema": 0.61.5 effect: 2.2.3 - checksum: 1bef8eaee41fa67332cdcccb9b2bc28119a68b0b45dcc07a7f8371abec1a497f2bc9f6e652870d2377edcfdaf270128d9b365256fa473a4755a02f719a1ab5e6 + checksum: 51878599862c0dc7a032bf94e640e0c8572d55288f7152c3ba21c306383c241f7b62444d2dae21a077d8c9b8c0466119f7e502afe56d18e6c39820b198d38734 languageName: node linkType: hard -"@effect/schema@npm:0.61.5": - version: 0.61.5 - resolution: "@effect/schema@npm:0.61.5" +"@effect/schema@npm:0.67.14": + version: 0.67.14 + resolution: "@effect/schema@npm:0.67.14" + dependencies: + fast-check: ^3.17.2 peerDependencies: - effect: ^2.2.3 - fast-check: ^3.13.2 - checksum: 6943420df2580a74b73fcd7efa3dc34e00c725a1ad1080af23128f93b5a9161bd8cea6efeb52ab265b9da11087e248ecae3265771fe5db6b7e1c2bfd839c02de + effect: ^3.2.5 + checksum: 929603e9aff64c041078748f64eeb62f859a7beb21ba5055480d62604b5f0246099496fb964691a37f56c58ee78660bde7b6a539cbd9af7eeda0386e654b1a69 languageName: node linkType: hard @@ -1328,6 +1539,32 @@ __metadata: languageName: node linkType: hard +"@manypkg/find-root@npm:^1.1.0": + version: 1.1.0 + resolution: "@manypkg/find-root@npm:1.1.0" + dependencies: + "@babel/runtime": ^7.5.5 + "@types/node": ^12.7.1 + find-up: ^4.1.0 + fs-extra: ^8.1.0 + checksum: f0fd881a5a81a351cb6561cd24117e8ee9481bbf3b6d1c7d9d10bef1f4744ca2ba3d064713e83c0a0574416d1e5b4a4c6c414aad91913c4a1c6040d87283ac50 + languageName: node + linkType: hard + +"@manypkg/get-packages@npm:^1.1.3": + version: 1.1.3 + resolution: "@manypkg/get-packages@npm:1.1.3" + dependencies: + "@babel/runtime": ^7.5.5 + "@changesets/types": ^4.0.1 + "@manypkg/find-root": ^1.1.0 + fs-extra: ^8.1.0 + globby: ^11.0.0 + read-yaml-file: ^1.1.0 + checksum: f5a756e5a659e0e1c33f48852d56826d170d5b10a3cdea89ce4fcaa77678d8799aa4004b30e1985c87b73dbc390b95bb6411b78336dd1e0db87c08c74b5c0e74 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -1842,6 +2079,15 @@ __metadata: languageName: node linkType: hard +"@types/is-ci@npm:^3.0.0": + version: 3.0.4 + resolution: "@types/is-ci@npm:3.0.4" + dependencies: + ci-info: ^3.1.0 + checksum: 5cb58dd3b64830bf2ce577017f554139cd35e3250a3feb3c2d5e5a2cb261cca909cf68faab6f31dde0c054719c7b360dd0f46d3a83a05b1e78453a9872d056c5 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.4 resolution: "@types/istanbul-lib-coverage@npm:2.0.4" @@ -1918,6 +2164,13 @@ __metadata: languageName: node linkType: hard +"@types/minimist@npm:^1.2.0": + version: 1.2.5 + resolution: "@types/minimist@npm:1.2.5" + checksum: 477047b606005058ab0263c4f58097136268007f320003c348794f74adedc3166ffc47c80ec3e94687787f2ab7f4e72c468223946e79892cf0fd9e25e9970a90 + languageName: node + linkType: hard + "@types/ms@npm:^0.7.31": version: 0.7.34 resolution: "@types/ms@npm:0.7.34" @@ -1943,6 +2196,20 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^12.7.1": + version: 12.20.55 + resolution: "@types/node@npm:12.20.55" + checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 + languageName: node + linkType: hard + +"@types/normalize-package-data@npm:^2.4.0": + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: 65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 + languageName: node + linkType: hard + "@types/ramda@npm:^0.29.2, @types/ramda@npm:^0.29.9": version: 0.29.10 resolution: "@types/ramda@npm:0.29.10" @@ -1971,6 +2238,13 @@ __metadata: languageName: node linkType: hard +"@types/semver@npm:^6.0.0": + version: 6.2.7 + resolution: "@types/semver@npm:6.2.7" + checksum: 341e701d9bf07a9f26ddbf15f9c9ec4243f4e2d3f59d4b9a4d551999eea28bd4f81a37160505044c2a6292fa50226a8df493e06f44f966b0a881fbb0b1725ea0 + languageName: node + linkType: hard + "@types/stack-utils@npm:^2.0.0": version: 2.0.1 resolution: "@types/stack-utils@npm:2.0.1" @@ -2305,6 +2579,13 @@ __metadata: languageName: node linkType: hard +"ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": + version: 4.1.3 + resolution: "ansi-colors@npm:4.1.3" + checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e + languageName: node + linkType: hard + "ansi-escapes@npm:^4.2.1": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" @@ -2431,6 +2712,16 @@ __metadata: languageName: node linkType: hard +"array-buffer-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "array-buffer-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.5 + is-array-buffer: ^3.0.4 + checksum: 53524e08f40867f6a9f35318fafe467c32e45e9c682ba67b11943e167344d2febc0f6977a17e699b05699e805c3e8f073d876f8bbf1b559ed494ad2cd0fae09e + languageName: node + linkType: hard + "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -2438,6 +2729,41 @@ __metadata: languageName: node linkType: hard +"array.prototype.flat@npm:^1.2.3": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: 5d6b4bf102065fb3f43764bfff6feb3295d372ce89591e6005df3d0ce388527a9f03c909af6f2a973969a4d178ab232ffc9236654149173e0e187ec3a1a6b87b + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "arraybuffer.prototype.slice@npm:1.0.3" + dependencies: + array-buffer-byte-length: ^1.0.1 + call-bind: ^1.0.5 + define-properties: ^1.2.1 + es-abstract: ^1.22.3 + es-errors: ^1.2.1 + get-intrinsic: ^1.2.3 + is-array-buffer: ^3.0.4 + is-shared-array-buffer: ^1.0.2 + checksum: 352259cba534dcdd969c92ab002efd2ba5025b2e3b9bead3973150edbdf0696c629d7f4b3f061c5931511e8207bdc2306da614703c820b45dabce39e3daf7e3e + languageName: node + linkType: hard + +"arrify@npm:^1.0.1": + version: 1.0.1 + resolution: "arrify@npm:1.0.1" + checksum: 745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 + languageName: node + linkType: hard + "arrify@npm:^2.0.0": version: 2.0.1 resolution: "arrify@npm:2.0.1" @@ -2461,6 +2787,15 @@ __metadata: languageName: node linkType: hard +"available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" + dependencies: + possible-typed-array-names: ^1.0.0 + checksum: 1aa3ffbfe6578276996de660848b6e95669d9a95ad149e3dd0c0cda77db6ee1dbd9d1dd723b65b6d277b882dd0c4b91a654ae9d3cf9e1254b7e93e4908d78fd3 + languageName: node + linkType: hard + "avvio@npm:^8.2.1": version: 8.2.1 resolution: "avvio@npm:8.2.1" @@ -2562,6 +2897,15 @@ __metadata: languageName: node linkType: hard +"better-path-resolve@npm:1.0.0": + version: 1.0.0 + resolution: "better-path-resolve@npm:1.0.0" + dependencies: + is-windows: ^1.0.0 + checksum: 5392dbe04e7fe68b944eb37961d9dfa147aaac3ee9ee3f6e13d42e2c9fbe949e68d16e896c14ee9016fa5f8e6e53ec7fd8b5f01b50a32067a7d94ac9cfb9a050 + languageName: node + linkType: hard + "bignumber.js@npm:^9.0.0": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" @@ -2615,6 +2959,24 @@ __metadata: languageName: node linkType: hard +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: ^7.1.1 + checksum: b95aa0b3bd909f6cd1720ffcf031aeaf46154dd88b4da01f9a1d3f7ea866a79eba76a6d01cbc3c422b2ee5cdc39a4f02491058d5df0d7bf6e6a162a832df1f69 + languageName: node + linkType: hard + +"breakword@npm:^1.0.5": + version: 1.0.6 + resolution: "breakword@npm:1.0.6" + dependencies: + wcwidth: ^1.0.1 + checksum: e8a3f308c0214986e1b768ca4460a798ffe4bbe08c375576de526431a01a9738318710cc05e309486ac5809d77d9f33d957f80939a890e07be5e89baad9816f8 + languageName: node + linkType: hard + "browserslist@npm:^4.14.5, browserslist@npm:^4.21.9": version: 4.22.1 resolution: "browserslist@npm:4.22.1" @@ -2709,6 +3071,19 @@ __metadata: languageName: node linkType: hard +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" + dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.4 + set-function-length: ^1.2.1 + checksum: 295c0c62b90dd6522e6db3b0ab1ce26bdf9e7404215bda13cfee25b626b5ff1a7761324d58d38b1ef1607fc65aca2d06e44d2e18d0dfc6c14b465b00d8660029 + languageName: node + linkType: hard + "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -2716,7 +3091,18 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^5.3.1": +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" + dependencies: + camelcase: ^5.3.1 + map-obj: ^4.0.0 + quick-lru: ^4.0.1 + checksum: 43c9af1adf840471e54c68ab3e5fe8a62719a6b7dbf4e2e86886b7b0ff96112c945736342b837bd2529ec9d1c7d1934e5653318478d98e0cf22c475c04658e2a + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b @@ -2746,7 +3132,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.4.2": +"chalk@npm:^2.1.0, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -2757,7 +3143,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0": +"chalk@npm:^4.0.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -2767,16 +3153,6 @@ __metadata: languageName: node linkType: hard -"changeset@npm:^0.2.6": - version: 0.2.6 - resolution: "changeset@npm:0.2.6" - dependencies: - udc: ^1.0.0 - underscore: ^1.8.3 - checksum: bb916eff7dc8d281f91762a4e0d324cc3a527535263fd4d0345be9def20e1b112184c29e4312bec4de34814574b33c271ca5d759c4466acd5dc9b9f1733b434f - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -2784,6 +3160,13 @@ __metadata: languageName: node linkType: hard +"chardet@npm:^0.7.0": + version: 0.7.0 + resolution: "chardet@npm:0.7.0" + checksum: 6fd5da1f5d18ff5712c1e0aed41da200d7c51c28f11b36ee3c7b483f3696dabc08927fc6b227735eb8f0e1215c9a8abd8154637f3eff8cada5959df7f58b024d + languageName: node + linkType: hard + "chokidar@npm:^3.5.1": version: 3.5.3 resolution: "chokidar@npm:3.5.3" @@ -2817,7 +3200,7 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^3.2.0": +"ci-info@npm:^3.1.0, ci-info@npm:^3.2.0": version: 3.9.0 resolution: "ci-info@npm:3.9.0" checksum: 6b19dc9b2966d1f8c2041a838217299718f15d6c4b63ae36e4674edd2bee48f780e94761286a56aa59eb305a85fbea4ddffb7630ec063e7ec7e7e5ad42549a87 @@ -2838,6 +3221,17 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^6.2.0 + checksum: 4fcfd26d292c9f00238117f39fc797608292ae36bac2168cfee4c85923817d0607fe21b3329a8621e01aedf512c99b7eaa60e363a671ffd378df6649fb48ae42 + languageName: node + linkType: hard + "cliui@npm:^8.0.1": version: 8.0.1 resolution: "cliui@npm:8.0.1" @@ -2849,6 +3243,13 @@ __metadata: languageName: node linkType: hard +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd + languageName: node + linkType: hard + "co@npm:^4.6.0": version: 4.6.0 resolution: "co@npm:4.6.0" @@ -2998,6 +3399,17 @@ __metadata: languageName: node linkType: hard +"cross-spawn@npm:^5.1.0": + version: 5.1.0 + resolution: "cross-spawn@npm:5.1.0" + dependencies: + lru-cache: ^4.0.1 + shebang-command: ^1.2.0 + which: ^1.2.9 + checksum: 726939c9954fc70c20e538923feaaa33bebc253247d13021737c3c7f68cdc3e0a57f720c0fe75057c0387995349f3f12e20e9bfdbf12274db28019c7ea4ec166 + languageName: node + linkType: hard + "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -3009,6 +3421,72 @@ __metadata: languageName: node linkType: hard +"csv-generate@npm:^3.4.3": + version: 3.4.3 + resolution: "csv-generate@npm:3.4.3" + checksum: 868dc630e8bcabf42d3d1ef22c09fb783de72d7e5929854aad0323f44059b1747edf8a2724e32fdc5008396e2ea38d5c45df0b0e3a1b506e3ab34f76f3e2fb3a + languageName: node + linkType: hard + +"csv-parse@npm:^4.16.3": + version: 4.16.3 + resolution: "csv-parse@npm:4.16.3" + checksum: 5ad7790fc31c32ca1623bad1a54906134ba44fa109e8dd2dfda440bf7e9fd93610d9076a78f45c872701bfafdf7f93c9b75500c09d7efd6611d863f1d45ec69f + languageName: node + linkType: hard + +"csv-stringify@npm:^5.6.5": + version: 5.6.5 + resolution: "csv-stringify@npm:5.6.5" + checksum: f93e1444857416081de3d86765b62e4c4f7c110974ad6bbcb0031d7db39b6624847ac9ee5705726e7011346f32f3696f27299b74b23a6c2b083adff0dd2755fe + languageName: node + linkType: hard + +"csv@npm:^5.5.3": + version: 5.5.3 + resolution: "csv@npm:5.5.3" + dependencies: + csv-generate: ^3.4.3 + csv-parse: ^4.16.3 + csv-stringify: ^5.6.5 + stream-transform: ^2.1.3 + checksum: 0decc2d0d7a0abf127f4556d6f3cef5a54015b78d348608b5e8f42256c2bd0a021f34f1efc9723b2cd162680917de4c0b3967bfb65a07305eca0827654ca727e + languageName: node + linkType: hard + +"data-view-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-buffer@npm:1.0.1" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: ce24348f3c6231223b216da92e7e6a57a12b4af81a23f27eff8feabdf06acfb16c00639c8b705ca4d167f761cfc756e27e5f065d0a1f840c10b907fdaf8b988c + languageName: node + linkType: hard + +"data-view-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: dbb3200edcb7c1ef0d68979834f81d64fd8cab2f7691b3a4c6b97e67f22182f3ec2c8602efd7b76997b55af6ff8bce485829c1feda4fa2165a6b71fb7baa4269 + languageName: node + linkType: hard + +"data-view-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "data-view-byte-offset@npm:1.0.0" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: 7f0bf8720b7414ca719eedf1846aeec392f2054d7af707c5dc9a753cc77eb8625f067fa901e0b5127e831f9da9056138d894b9c2be79c27a21f6db5824f009c2 + languageName: node + linkType: hard + "debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" @@ -3021,6 +3499,23 @@ __metadata: languageName: node linkType: hard +"decamelize-keys@npm:^1.1.0": + version: 1.1.1 + resolution: "decamelize-keys@npm:1.1.1" + dependencies: + decamelize: ^1.1.0 + map-obj: ^1.0.0 + checksum: fc645fe20b7bda2680bbf9481a3477257a7f9304b1691036092b97ab04c0ab53e3bf9fcc2d2ae382536568e402ec41fb11e1d4c3836a9abe2d813dd9ef4311e0 + languageName: node + linkType: hard + +"decamelize@npm:^1.1.0, decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + "dedent@npm:^1.0.0": version: 1.5.1 resolution: "dedent@npm:1.5.1" @@ -3040,10 +3535,48 @@ __metadata: languageName: node linkType: hard -"delegates@npm:^1.0.0": - version: 1.0.0 - resolution: "delegates@npm:1.0.0" - checksum: a51744d9b53c164ba9c0492471a1a2ffa0b6727451bdc89e31627fdf4adda9d51277cfcbfb20f0a6f08ccb3c436f341df3e92631a3440226d93a8971724771fd +"defaults@npm:^1.0.3": + version: 1.0.4 + resolution: "defaults@npm:1.0.4" + dependencies: + clone: ^1.0.2 + checksum: 3a88b7a587fc076b84e60affad8b85245c01f60f38fc1d259e7ac1d89eb9ce6abb19e27215de46b98568dd5bc48471730b327637e6f20b0f1bc85cf00440c80a + languageName: node + linkType: hard + +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + gopd: ^1.0.1 + checksum: 8068ee6cab694d409ac25936eb861eea704b7763f7f342adbdfe337fc27c78d7ae0eff2364b2917b58c508d723c7a074326d068eef2e45c4edcd85cf94d0313b + languageName: node + linkType: hard + +"define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: ^1.0.1 + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 + languageName: node + linkType: hard + +"delegates@npm:^1.0.0": + version: 1.0.0 + resolution: "delegates@npm:1.0.0" + checksum: a51744d9b53c164ba9c0492471a1a2ffa0b6727451bdc89e31627fdf4adda9d51277cfcbfb20f0a6f08ccb3c436f341df3e92631a3440226d93a8971724771fd + languageName: node + linkType: hard + +"detect-indent@npm:^6.0.0": + version: 6.1.0 + resolution: "detect-indent@npm:6.1.0" + checksum: ab953a73c72dbd4e8fc68e4ed4bfd92c97eb6c43734af3900add963fd3a9316f3bc0578b018b24198d4c31a358571eff5f0656e81a1f3b9ad5c547d58b2d093d languageName: node linkType: hard @@ -3058,12 +3591,12 @@ __metadata: version: 0.0.0-use.local resolution: "diachronic@workspace:." dependencies: + "@changesets/cli": 2.26.1 "@types/node": 20 - changeset: ^0.2.6 rimraf: ^5.0.1 ts-node: 10.9.1 turbo: 1.10.13 - typescript: 5.2.2 + typescript: 5.4.5 languageName: unknown linkType: soft @@ -3118,10 +3651,10 @@ __metadata: languageName: node linkType: hard -"effect@npm:2.2.3": - version: 2.2.3 - resolution: "effect@npm:2.2.3" - checksum: 055c6bce498bcaef8b9998c9123045bcd5e9468b96292dd7ff336e2ea4f0c5ad4c9830fbcbc4c7c0c0a7e88286e731c0e624dfa47e86fce364ce3290d68035fe +"effect@npm:3.2.5": + version: 3.2.5 + resolution: "effect@npm:3.2.5" + checksum: 0f8e0a8849d25d6882d0e2f7a5d602723ff17725f972cf860b2b36f6b35108b4dbfa9a63ec0871cd188377c57054b3947d38abcb8e42ebdbf04548fce9290d6b languageName: node linkType: hard @@ -3181,6 +3714,16 @@ __metadata: languageName: node linkType: hard +"enquirer@npm:^2.3.0": + version: 2.4.1 + resolution: "enquirer@npm:2.4.1" + dependencies: + ansi-colors: ^4.1.1 + strip-ansi: ^6.0.1 + checksum: f080f11a74209647dbf347a7c6a83c8a47ae1ebf1e75073a808bc1088eb780aa54075bfecd1bcdb3e3c724520edb8e6ee05da031529436b421b71066fcc48cb5 + languageName: node + linkType: hard + "ent@npm:^2.2.0": version: 2.2.0 resolution: "ent@npm:2.2.0" @@ -3211,6 +3754,76 @@ __metadata: languageName: node linkType: hard +"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0": + version: 1.23.3 + resolution: "es-abstract@npm:1.23.3" + dependencies: + array-buffer-byte-length: ^1.0.1 + arraybuffer.prototype.slice: ^1.0.3 + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 + data-view-buffer: ^1.0.1 + data-view-byte-length: ^1.0.1 + data-view-byte-offset: ^1.0.0 + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + es-set-tostringtag: ^2.0.3 + es-to-primitive: ^1.2.1 + function.prototype.name: ^1.1.6 + get-intrinsic: ^1.2.4 + get-symbol-description: ^1.0.2 + globalthis: ^1.0.3 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.2 + has-proto: ^1.0.3 + has-symbols: ^1.0.3 + hasown: ^2.0.2 + internal-slot: ^1.0.7 + is-array-buffer: ^3.0.4 + is-callable: ^1.2.7 + is-data-view: ^1.0.1 + is-negative-zero: ^2.0.3 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.3 + is-string: ^1.0.7 + is-typed-array: ^1.1.13 + is-weakref: ^1.0.2 + object-inspect: ^1.13.1 + object-keys: ^1.1.1 + object.assign: ^4.1.5 + regexp.prototype.flags: ^1.5.2 + safe-array-concat: ^1.1.2 + safe-regex-test: ^1.0.3 + string.prototype.trim: ^1.2.9 + string.prototype.trimend: ^1.0.8 + string.prototype.trimstart: ^1.0.8 + typed-array-buffer: ^1.0.2 + typed-array-byte-length: ^1.0.1 + typed-array-byte-offset: ^1.0.2 + typed-array-length: ^1.0.6 + unbox-primitive: ^1.0.2 + which-typed-array: ^1.1.15 + checksum: f840cf161224252512f9527306b57117192696571e07920f777cb893454e32999206198b4f075516112af6459daca282826d1735c450528470356d09eff3a9ae + languageName: node + linkType: hard + +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: ^1.2.4 + checksum: f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 + languageName: node + linkType: hard + +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: ec1414527a0ccacd7f15f4a3bc66e215f04f595ba23ca75cdae0927af099b5ec865f9f4d33e9d7e86f512f252876ac77d4281a7871531a50678132429b1271b5 + languageName: node + linkType: hard + "es-module-lexer@npm:^1.2.1": version: 1.3.1 resolution: "es-module-lexer@npm:1.3.1" @@ -3218,6 +3831,46 @@ __metadata: languageName: node linkType: hard +"es-object-atoms@npm:^1.0.0": + version: 1.0.0 + resolution: "es-object-atoms@npm:1.0.0" + dependencies: + es-errors: ^1.3.0 + checksum: 26f0ff78ab93b63394e8403c353842b2272836968de4eafe97656adfb8a7c84b9099bf0fe96ed58f4a4cddc860f6e34c77f91649a58a5daa4a9c40b902744e3c + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.3": + version: 2.0.3 + resolution: "es-set-tostringtag@npm:2.0.3" + dependencies: + get-intrinsic: ^1.2.4 + has-tostringtag: ^1.0.2 + hasown: ^2.0.1 + checksum: 7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 + languageName: node + linkType: hard + +"es-shim-unscopables@npm:^1.0.0": + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" + dependencies: + hasown: ^2.0.0 + checksum: 432bd527c62065da09ed1d37a3f8e623c423683285e6188108286f4a1e8e164a5bcbfbc0051557c7d14633cd2a41ce24c7048e6bbb66a985413fd32f1be72626 + languageName: node + linkType: hard + +"es-to-primitive@npm:^1.2.1": + version: 1.2.1 + resolution: "es-to-primitive@npm:1.2.1" + dependencies: + is-callable: ^1.1.4 + is-date-object: ^1.0.1 + is-symbol: ^1.0.2 + checksum: 4ead6671a2c1402619bdd77f3503991232ca15e17e46222b0a41a5d81aebc8740a77822f5b3c965008e631153e9ef0580540007744521e72de8e33599fca2eed + languageName: node + linkType: hard + "esbuild@npm:^0.18.2": version: 0.18.20 resolution: "esbuild@npm:0.18.20" @@ -3431,12 +4084,30 @@ __metadata: languageName: node linkType: hard -"fast-check@npm:^3.8.1": - version: 3.13.1 - resolution: "fast-check@npm:3.13.1" +"extendable-error@npm:^0.1.5": + version: 0.1.7 + resolution: "extendable-error@npm:0.1.7" + checksum: 80478be7429a1675d2085f701239796bab3230ed6f2fb1b138fbabec24bea6516b7c5ceb6e9c209efcc9c089948d93715703845653535f8e8a49655066a9255e + languageName: node + linkType: hard + +"external-editor@npm:^3.1.0": + version: 3.1.0 + resolution: "external-editor@npm:3.1.0" dependencies: - pure-rand: ^6.0.0 - checksum: b8aa5ab50a447238cdb5c2f07db74dddebec35bc911a41ec21865c688d58323995733f02c80621fc42193dd78c86a626f6cfd273dcdf04e965c85f1e5c4d31c0 + chardet: ^0.7.0 + iconv-lite: ^0.4.24 + tmp: ^0.0.33 + checksum: 1c2a616a73f1b3435ce04030261bed0e22d4737e14b090bb48e58865da92529c9f2b05b893de650738d55e692d071819b45e1669259b2b354bc3154d27a698c7 + languageName: node + linkType: hard + +"fast-check@npm:^3.19": + version: 3.19.0 + resolution: "fast-check@npm:3.19.0" + dependencies: + pure-rand: ^6.1.0 + checksum: 7863849b45e66c2ea121510d99cb949ec55533822114421dde1d485c50f96850241d2119d212749b56871e06a0e034bcb6cc8fb5eb2f7d21d19e862ecaa19030 languageName: node linkType: hard @@ -3588,6 +4259,15 @@ __metadata: languageName: node linkType: hard +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: ^5.0.1 + checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798 + languageName: node + linkType: hard + "find-my-way@npm:^7.7.0": version: 7.7.0 resolution: "find-my-way@npm:7.7.0" @@ -3609,6 +4289,35 @@ __metadata: languageName: node linkType: hard +"find-up@npm:^5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"find-yarn-workspace-root2@npm:1.2.16": + version: 1.2.16 + resolution: "find-yarn-workspace-root2@npm:1.2.16" + dependencies: + micromatch: ^4.0.2 + pkg-dir: ^4.2.0 + checksum: b4abdd37ab87c2172e2abab69ecbfed365d63232742cd1f0a165020fba1b200478e944ec2035c6aaf0ae142ac4c523cbf08670f45e59b242bcc295731b017825 + languageName: node + linkType: hard + +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -3626,6 +4335,28 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^7.0.1": + version: 7.0.1 + resolution: "fs-extra@npm:7.0.1" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: 141b9dccb23b66a66cefdd81f4cda959ff89282b1d721b98cea19ba08db3dcbe6f862f28841f3cf24bb299e0b7e6c42303908f65093cb7e201708e86ea5a8dcf + languageName: node + linkType: hard + +"fs-extra@npm:^8.1.0": + version: 8.1.0 + resolution: "fs-extra@npm:8.1.0" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: bf44f0e6cea59d5ce071bba4c43ca76d216f89e402dc6285c128abc0902e9b8525135aa808adad72c9d5d218e9f4bcc63962815529ff2f684ad532172a284880 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -3677,6 +4408,32 @@ __metadata: languageName: node linkType: hard +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 2b0ff4ce708d99715ad14a6d1f894e2a83242e4a52ccfcefaee5e40050562e5f6dafc1adbb4ce2d4ab47279a45dc736ab91ea5042d843c3c092820dfe032efb1 + languageName: node + linkType: hard + +"function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + functions-have-names: ^1.2.3 + checksum: 7a3f9bd98adab09a07f6e1f03da03d3f7c26abbdeaeee15223f6c04a9fb5674792bdf5e689dac19b97ac71de6aad2027ba3048a9b883aa1b3173eed6ab07f479 + languageName: node + linkType: hard + +"functions-have-names@npm:^1.2.3": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 + languageName: node + linkType: hard + "gauge@npm:^4.0.3": version: 4.0.4 resolution: "gauge@npm:4.0.4" @@ -3722,13 +4479,26 @@ __metadata: languageName: node linkType: hard -"get-caller-file@npm:^2.0.5": +"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 languageName: node linkType: hard +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" + dependencies: + es-errors: ^1.3.0 + function-bind: ^1.1.2 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + checksum: 414e3cdf2c203d1b9d7d33111df746a4512a1aa622770b361dadddf8ed0b5aeb26c560f49ca077e24bfafb0acb55ca908d1f709216ccba33ffc548ec8a79a951 + languageName: node + linkType: hard + "get-package-type@npm:^0.1.0": version: 0.1.0 resolution: "get-package-type@npm:0.1.0" @@ -3743,6 +4513,17 @@ __metadata: languageName: node linkType: hard +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" + dependencies: + call-bind: ^1.0.5 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + checksum: e1cb53bc211f9dbe9691a4f97a46837a553c4e7caadd0488dc24ac694db8a390b93edd412b48dcdd0b4bbb4c595de1709effc75fc87c0839deedc6968f5bd973 + languageName: node + linkType: hard + "glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" @@ -3808,7 +4589,17 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.3": +"globalthis@npm:^1.0.3": + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" + dependencies: + define-properties: ^1.2.1 + gopd: ^1.0.1 + checksum: 39ad667ad9f01476474633a1834a70842041f70a55571e8dcef5fb957980a92da5022db5430fca8aecc5d47704ae30618c0bc877a579c70710c904e9ef06108a + languageName: node + linkType: hard + +"globby@npm:^11.0.0, globby@npm:^11.0.3": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -3850,13 +4641,29 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.5, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 languageName: node linkType: hard +"grapheme-splitter@npm:^1.0.4": + version: 1.0.4 + resolution: "grapheme-splitter@npm:1.0.4" + checksum: 0c22ec54dee1b05cd480f78cf14f732cb5b108edc073572c4ec205df4cd63f30f8db8025afc5debc8835a8ddeacf648a1c7992fe3dcd6ad38f9a476d84906620 + languageName: node + linkType: hard + "gtoken@npm:^6.1.0": version: 6.1.2 resolution: "gtoken@npm:6.1.2" @@ -3868,6 +4675,20 @@ __metadata: languageName: node linkType: hard +"hard-rejection@npm:^2.1.0": + version: 2.1.0 + resolution: "hard-rejection@npm:2.1.0" + checksum: 7baaf80a0c7fff4ca79687b4060113f1529589852152fa935e6787a2bc96211e784ad4588fb3048136ff8ffc9dfcf3ae385314a5b24db32de20bea0d1597f9dc + languageName: node + linkType: hard + +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": + version: 1.0.2 + resolution: "has-bigints@npm:1.0.2" + checksum: 390e31e7be7e5c6fe68b81babb73dfc35d413604d7ee5f56da101417027a4b4ce6a27e46eff97ad040c835b5d228676eae99a9b5c3bc0e23c8e81a49241ff45b + languageName: node + linkType: hard + "has-flag@npm:^3.0.0": version: 3.0.0 resolution: "has-flag@npm:3.0.0" @@ -3882,6 +4703,38 @@ __metadata: languageName: node linkType: hard +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" + dependencies: + es-define-property: ^1.0.0 + checksum: fcbb246ea2838058be39887935231c6d5788babed499d0e9d0cc5737494c48aba4fe17ba1449e0d0fbbb1e36175442faa37f9c427ae357d6ccb1d895fbcd3de3 + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": + version: 1.0.3 + resolution: "has-proto@npm:1.0.3" + checksum: fe7c3d50b33f50f3933a04413ed1f69441d21d2d2944f81036276d30635cad9279f6b43bc8f32036c31ebdfcf6e731150f46c1907ad90c669ffe9b066c3ba5c4 + languageName: node + linkType: hard + +"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: a054c40c631c0d5741a8285010a0777ea0c068f99ed43e5d6eb12972da223f8af553a455132fdb0801bdcfa0e0f443c0c03a68d8555aa529b3144b446c3f2410 + languageName: node + linkType: hard + +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" + dependencies: + has-symbols: ^1.0.3 + checksum: 999d60bb753ad714356b2c6c87b7fb74f32463b8426e159397da4bde5bca7e598ab1073f4d8d4deafac297f2eb311484cd177af242776bf05f0d11565680468d + languageName: node + linkType: hard + "has-unicode@npm:^2.0.1": version: 2.0.1 resolution: "has-unicode@npm:2.0.1" @@ -3896,6 +4749,15 @@ __metadata: languageName: node linkType: hard +"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: ^1.1.2 + checksum: e8516f776a15149ca6c6ed2ae3110c417a00b62260e222590e54aa367cbcd6ed99122020b37b7fbdf05748df57b265e70095d7bf35a47660587619b15ffb93db + languageName: node + linkType: hard + "heap-js@npm:^2.2.0": version: 2.3.0 resolution: "heap-js@npm:2.3.0" @@ -3913,6 +4775,13 @@ __metadata: languageName: node linkType: hard +"hosted-git-info@npm:^2.1.4": + version: 2.8.9 + resolution: "hosted-git-info@npm:2.8.9" + checksum: c955394bdab888a1e9bb10eb33029e0f7ce5a2ac7b3f158099dc8c486c99e73809dca609f5694b223920ca2174db33d32b12f9a2a47141dc59607c29da5a62dd + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -3948,6 +4817,13 @@ __metadata: languageName: node linkType: hard +"human-id@npm:^1.0.2": + version: 1.0.2 + resolution: "human-id@npm:1.0.2" + checksum: 95ee57ffae849f008e2ef3fe6e437be8c999861b4256f18c3b194c8928670a8a149e0576917105d5fd77e5edbb621c5a4736fade20bb7bf130113c1ebc95cb74 + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -3964,6 +4840,15 @@ __metadata: languageName: node linkType: hard +"iconv-lite@npm:^0.4.24": + version: 0.4.24 + resolution: "iconv-lite@npm:0.4.24" + dependencies: + safer-buffer: ">= 2.1.2 < 3" + checksum: bd9f120f5a5b306f0bc0b9ae1edeb1577161503f5f8252a20f1a9e56ef8775c9959fd01c55f2d3a39d9a8abaf3e30c1abeb1895f367dcbbe0a8fd1c9ca01c4f6 + languageName: node + linkType: hard + "iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" @@ -4030,6 +4915,17 @@ __metadata: languageName: node linkType: hard +"internal-slot@npm:^1.0.7": + version: 1.0.7 + resolution: "internal-slot@npm:1.0.7" + dependencies: + es-errors: ^1.3.0 + hasown: ^2.0.0 + side-channel: ^1.0.4 + checksum: cadc5eea5d7d9bc2342e93aae9f31f04c196afebb11bde97448327049f492cd7081e18623ae71388aac9cd237b692ca3a105be9c68ac39c1dec679d7409e33eb + languageName: node + linkType: hard + "ip-address@npm:^9.0.5": version: 9.0.5 resolution: "ip-address@npm:9.0.5" @@ -4054,6 +4950,16 @@ __metadata: languageName: node linkType: hard +"is-array-buffer@npm:^3.0.4": + version: 3.0.4 + resolution: "is-array-buffer@npm:3.0.4" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + checksum: e4e3e6ef0ff2239e75371d221f74bc3c26a03564a22efb39f6bb02609b598917ddeecef4e8c877df2a25888f247a98198959842a5e73236bc7f22cabdf6351a7 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -4061,6 +4967,15 @@ __metadata: languageName: node linkType: hard +"is-bigint@npm:^1.0.1": + version: 1.0.4 + resolution: "is-bigint@npm:1.0.4" + dependencies: + has-bigints: ^1.0.1 + checksum: c56edfe09b1154f8668e53ebe8252b6f185ee852a50f9b41e8d921cb2bed425652049fbe438723f6cb48a63ca1aa051e948e7e401e093477c99c84eba244f666 + languageName: node + linkType: hard + "is-binary-path@npm:~2.1.0": version: 2.1.0 resolution: "is-binary-path@npm:2.1.0" @@ -4070,6 +4985,34 @@ __metadata: languageName: node linkType: hard +"is-boolean-object@npm:^1.1.0": + version: 1.1.2 + resolution: "is-boolean-object@npm:1.1.2" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: c03b23dbaacadc18940defb12c1c0e3aaece7553ef58b162a0f6bba0c2a7e1551b59f365b91e00d2dbac0522392d576ef322628cb1d036a0fe51eb466db67222 + languageName: node + linkType: hard + +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac + languageName: node + linkType: hard + +"is-ci@npm:^3.0.1": + version: 3.0.1 + resolution: "is-ci@npm:3.0.1" + dependencies: + ci-info: ^3.2.0 + bin: + is-ci: bin.js + checksum: 192c66dc7826d58f803ecae624860dccf1899fc1f3ac5505284c0a5cf5f889046ffeb958fa651e5725d5705c5bcb14f055b79150ea5fcad7456a9569de60260e + languageName: node + linkType: hard + "is-core-module@npm:^2.13.0": version: 2.13.0 resolution: "is-core-module@npm:2.13.0" @@ -4079,6 +5022,24 @@ __metadata: languageName: node linkType: hard +"is-data-view@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-view@npm:1.0.1" + dependencies: + is-typed-array: ^1.1.13 + checksum: 4ba4562ac2b2ec005fefe48269d6bd0152785458cd253c746154ffb8a8ab506a29d0cfb3b74af87513843776a88e4981ae25c89457bf640a33748eab1a7216b5 + languageName: node + linkType: hard + +"is-date-object@npm:^1.0.1": + version: 1.0.5 + resolution: "is-date-object@npm:1.0.5" + dependencies: + has-tostringtag: ^1.0.0 + checksum: baa9077cdf15eb7b58c79398604ca57379b2fc4cf9aa7a9b9e295278648f628c9b201400c01c5e0f7afae56507d741185730307cbe7cad3b9f90a77e5ee342fc + languageName: node + linkType: hard + "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -4116,6 +5077,22 @@ __metadata: languageName: node linkType: hard +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: c1e6b23d2070c0539d7b36022d5a94407132411d01aba39ec549af824231f3804b1aea90b5e4e58e807a65d23ceb538ed6e355ce76b267bdd86edb757ffcbdcd + languageName: node + linkType: hard + +"is-number-object@npm:^1.0.4": + version: 1.0.7 + resolution: "is-number-object@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d1e8d01bb0a7134c74649c4e62da0c6118a0bfc6771ea3c560914d52a627873e6920dd0fd0ebc0e12ad2ff4687eac4c308f7e80320b973b2c8a2c8f97a7524f7 + languageName: node + linkType: hard + "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" @@ -4123,6 +5100,32 @@ __metadata: languageName: node linkType: hard +"is-plain-obj@npm:^1.1.0": + version: 1.1.0 + resolution: "is-plain-obj@npm:1.1.0" + checksum: 0ee04807797aad50859652a7467481816cbb57e5cc97d813a7dcd8915da8195dc68c436010bf39d195226cde6a2d352f4b815f16f26b7bf486a5754290629931 + languageName: node + linkType: hard + +"is-regex@npm:^1.1.4": + version: 1.1.4 + resolution: "is-regex@npm:1.1.4" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 362399b33535bc8f386d96c45c9feb04cf7f8b41c182f54174c1a45c9abbbe5e31290bbad09a458583ff6bf3b2048672cdb1881b13289569a7c548370856a652 + languageName: node + linkType: hard + +"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": + version: 1.0.3 + resolution: "is-shared-array-buffer@npm:1.0.3" + dependencies: + call-bind: ^1.0.7 + checksum: a4fff602c309e64ccaa83b859255a43bb011145a42d3f56f67d9268b55bc7e6d98a5981a1d834186ad3105d6739d21547083fe7259c76c0468483fc538e716d8 + languageName: node + linkType: hard + "is-stream@npm:^2.0.0": version: 2.0.1 resolution: "is-stream@npm:2.0.1" @@ -4130,6 +5133,65 @@ __metadata: languageName: node linkType: hard +"is-string@npm:^1.0.5, is-string@npm:^1.0.7": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: 323b3d04622f78d45077cf89aab783b2f49d24dc641aa89b5ad1a72114cfeff2585efc8c12ef42466dff32bde93d839ad321b26884cf75e5a7892a938b089989 + languageName: node + linkType: hard + +"is-subdir@npm:^1.1.1": + version: 1.2.0 + resolution: "is-subdir@npm:1.2.0" + dependencies: + better-path-resolve: 1.0.0 + checksum: 31029a383972bff4cc4f1bd1463fd04dde017e0a04ae3a6f6e08124a90c6c4656312d593101b0f38805fa3f3c8f6bc4583524bbf72c50784fa5ca0d3e5a76279 + languageName: node + linkType: hard + +"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": + version: 1.0.4 + resolution: "is-symbol@npm:1.0.4" + dependencies: + has-symbols: ^1.0.2 + checksum: 92805812ef590738d9de49d677cd17dfd486794773fb6fa0032d16452af46e9b91bb43ffe82c983570f015b37136f4b53b28b8523bfb10b0ece7a66c31a54510 + languageName: node + linkType: hard + +"is-typed-array@npm:^1.1.13": + version: 1.1.13 + resolution: "is-typed-array@npm:1.1.13" + dependencies: + which-typed-array: ^1.1.14 + checksum: 150f9ada183a61554c91e1c4290086d2c100b0dff45f60b028519be72a8db964da403c48760723bf5253979b8dffe7b544246e0e5351dcd05c5fdb1dcc1dc0f0 + languageName: node + linkType: hard + +"is-weakref@npm:^1.0.2": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 95bd9a57cdcb58c63b1c401c60a474b0f45b94719c30f548c891860f051bc2231575c290a6b420c6bc6e7ed99459d424c652bd5bf9a1d5259505dc35b4bf83de + languageName: node + linkType: hard + +"is-windows@npm:^1.0.0": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: bd5bbe4104438c4196ba58a54650116007fa0262eccef13a4c55b2e09a5b36b59f1e75b9fcc49883dd9d4953892e6fc007eef9e9155648ceea036e184b0f930a + languageName: node + linkType: hard + "isexe@npm:^2.0.0": version: 2.0.0 resolution: "isexe@npm:2.0.0" @@ -4716,7 +5778,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^3.13.1": +"js-yaml@npm:^3.13.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.6.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -4792,6 +5854,18 @@ __metadata: languageName: node linkType: hard +"jsonfile@npm:^4.0.0": + version: 4.0.0 + resolution: "jsonfile@npm:4.0.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 6447d6224f0d31623eef9b51185af03ac328a7553efcee30fa423d98a9e276ca08db87d71e17f2310b0263fd3ffa6c2a90a6308367f661dc21580f9469897c9e + languageName: node + linkType: hard + "jwa@npm:^2.0.0": version: 2.0.0 resolution: "jwa@npm:2.0.0" @@ -4813,6 +5887,13 @@ __metadata: languageName: node linkType: hard +"kind-of@npm:^6.0.3": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 3ab01e7b1d440b22fe4c31f23d8d38b4d9b91d9f291df683476576493d5dfd2e03848a8b05813dd0c3f0e835bc63f433007ddeceb71f05cb25c45ae1b19c6d3b + languageName: node + linkType: hard + "kleur@npm:^3.0.3": version: 3.0.3 resolution: "kleur@npm:3.0.3" @@ -4820,6 +5901,13 @@ __metadata: languageName: node linkType: hard +"kleur@npm:^4.1.5": + version: 4.1.5 + resolution: "kleur@npm:4.1.5" + checksum: 1dc476e32741acf0b1b5b0627ffd0d722e342c1b0da14de3e8ae97821327ca08f9fb944542fb3c126d90ac5f27f9d804edbe7c585bf7d12ef495d115e0f22c12 + languageName: node + linkType: hard + "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" @@ -4859,6 +5947,18 @@ __metadata: languageName: node linkType: hard +"load-yaml-file@npm:^0.2.0": + version: 0.2.0 + resolution: "load-yaml-file@npm:0.2.0" + dependencies: + graceful-fs: ^4.1.5 + js-yaml: ^3.13.0 + pify: ^4.0.1 + strip-bom: ^3.0.0 + checksum: d86d7ec7b15a1c35b40fb0d8abe710a7de83e0c1186c1d35a7eaaf8581611828089a3e706f64560c2939762bc73f18a7b85aed9335058c640e033933cf317f11 + languageName: node + linkType: hard + "loader-runner@npm:^4.2.0": version: 4.3.0 resolution: "loader-runner@npm:4.3.0" @@ -4875,6 +5975,15 @@ __metadata: languageName: node linkType: hard +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: ^5.0.0 + checksum: 72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + "lodash.camelcase@npm:^4.3.0": version: 4.3.0 resolution: "lodash.camelcase@npm:4.3.0" @@ -4896,6 +6005,13 @@ __metadata: languageName: node linkType: hard +"lodash.startcase@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.startcase@npm:4.4.0" + checksum: c03a4a784aca653845fe09d0ef67c902b6e49288dc45f542a4ab345a9c406a6dc194c774423fa313ee7b06283950301c1221dd2a1d8ecb2dac8dfbb9ed5606b5 + languageName: node + linkType: hard + "long@npm:^5.0.0, long@npm:^5.2.0": version: 5.2.3 resolution: "long@npm:5.2.3" @@ -4903,6 +6019,16 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^4.0.1": + version: 4.1.5 + resolution: "lru-cache@npm:4.1.5" + dependencies: + pseudomap: ^1.0.2 + yallist: ^2.1.2 + checksum: 4bb4b58a36cd7dc4dcec74cbe6a8f766a38b7426f1ff59d4cf7d82a2aa9b9565cd1cb98f6ff60ce5cd174524868d7bc9b7b1c294371851356066ca9ac4cf135a + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -5009,6 +6135,20 @@ __metadata: languageName: node linkType: hard +"map-obj@npm:^1.0.0": + version: 1.0.1 + resolution: "map-obj@npm:1.0.1" + checksum: 9949e7baec2a336e63b8d4dc71018c117c3ce6e39d2451ccbfd3b8350c547c4f6af331a4cbe1c83193d7c6b786082b6256bde843db90cb7da2a21e8fcc28afed + languageName: node + linkType: hard + +"map-obj@npm:^4.0.0": + version: 4.3.0 + resolution: "map-obj@npm:4.3.0" + checksum: fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e + languageName: node + linkType: hard + "memfs@npm:^3.4.6": version: 3.5.3 resolution: "memfs@npm:3.5.3" @@ -5018,6 +6158,25 @@ __metadata: languageName: node linkType: hard +"meow@npm:^6.0.0": + version: 6.1.1 + resolution: "meow@npm:6.1.1" + dependencies: + "@types/minimist": ^1.2.0 + camelcase-keys: ^6.2.2 + decamelize-keys: ^1.1.0 + hard-rejection: ^2.1.0 + minimist-options: ^4.0.2 + normalize-package-data: ^2.5.0 + read-pkg-up: ^7.0.1 + redent: ^3.0.0 + trim-newlines: ^3.0.0 + type-fest: ^0.13.1 + yargs-parser: ^18.1.3 + checksum: 77b569781145ad030be77130623d9f74d6eef0af5e0a349419d3df39bcf6d88cc25be046a7757062162a88160fb5d8604e540b5177b371d2bbc2aaf73ec01479 + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -5032,6 +6191,16 @@ __metadata: languageName: node linkType: hard +"micromatch@npm:^4.0.2": + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" + dependencies: + braces: ^3.0.3 + picomatch: ^2.3.1 + checksum: 3cde047d70ad80cf60c787b77198d680db3b8c25b23feb01de5e2652205d9c19f43bd81882f69a0fd1f0cde6a7a122d774998aad3271ddb1b8accf8a0f480cf7 + languageName: node + linkType: hard + "micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -5074,6 +6243,13 @@ __metadata: languageName: node linkType: hard +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -5101,6 +6277,17 @@ __metadata: languageName: node linkType: hard +"minimist-options@npm:^4.0.2": + version: 4.1.0 + resolution: "minimist-options@npm:4.1.0" + dependencies: + arrify: ^1.0.1 + is-plain-obj: ^1.1.0 + kind-of: ^6.0.3 + checksum: 8c040b3068811e79de1140ca2b708d3e203c8003eb9a414c1ab3cd467fc5f17c9ca02a5aef23bedc51a7f8bfbe77f87e9a7e31ec81fba304cda675b019496f4e + languageName: node + linkType: hard + "minimist@npm:^1.2.8": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -5192,6 +6379,13 @@ __metadata: languageName: node linkType: hard +"mixme@npm:^0.5.1": + version: 0.5.10 + resolution: "mixme@npm:0.5.10" + checksum: 51885f19847b98859645a592917f3939d6f262ba3cc1843a3d7858ac894704b054e7a94737a53163bc1e870e3ea23316ba97d3ba20e1dfd292fe74d5a318be98 + languageName: node + linkType: hard + "mkdirp@npm:^1.0.3": version: 1.0.4 resolution: "mkdirp@npm:1.0.4" @@ -5367,6 +6561,18 @@ __metadata: languageName: node linkType: hard +"normalize-package-data@npm:^2.5.0": + version: 2.5.0 + resolution: "normalize-package-data@npm:2.5.0" + dependencies: + hosted-git-info: ^2.1.4 + resolve: ^1.10.0 + semver: 2 || 3 || 4 || 5 + validate-npm-package-license: ^3.0.1 + checksum: 7999112efc35a6259bc22db460540cae06564aa65d0271e3bdfa86876d08b0e578b7b5b0028ee61b23f1cae9fc0e7847e4edc0948d3068a39a2a82853efc8499 + languageName: node + linkType: hard + "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" @@ -5412,6 +6618,32 @@ __metadata: languageName: node linkType: hard +"object-inspect@npm:^1.13.1": + version: 1.13.1 + resolution: "object-inspect@npm:1.13.1" + checksum: 7d9fa9221de3311dcb5c7c307ee5dc011cdd31dc43624b7c184b3840514e118e05ef0002be5388304c416c0eb592feb46e983db12577fc47e47d5752fbbfb61f + languageName: node + linkType: hard + +"object-keys@npm:^1.1.1": + version: 1.1.1 + resolution: "object-keys@npm:1.1.1" + checksum: b363c5e7644b1e1b04aa507e88dcb8e3a2f52b6ffd0ea801e4c7a62d5aa559affe21c55a07fd4b1fd55fc03a33c610d73426664b20032405d7b92a1414c34d6a + languageName: node + linkType: hard + +"object.assign@npm:^4.1.5": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" + dependencies: + call-bind: ^1.0.5 + define-properties: ^1.2.1 + has-symbols: ^1.0.3 + object-keys: ^1.1.1 + checksum: f9aeac0541661370a1fc86e6a8065eb1668d3e771f7dbb33ee54578201336c057b21ee61207a186dd42db0c62201d91aac703d20d12a79fc79c353eed44d4e25 + languageName: node + linkType: hard + "on-exit-leak-free@npm:^2.1.0": version: 2.1.2 resolution: "on-exit-leak-free@npm:2.1.2" @@ -5437,6 +6669,29 @@ __metadata: languageName: node linkType: hard +"os-tmpdir@npm:~1.0.2": + version: 1.0.2 + resolution: "os-tmpdir@npm:1.0.2" + checksum: 5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d + languageName: node + linkType: hard + +"outdent@npm:^0.5.0": + version: 0.5.0 + resolution: "outdent@npm:0.5.0" + checksum: 6e6c63dd09e9890e67ef9a0b4d35df0b0b850b2059ce3f7e19e4cc1a146b26dc5d8c45df238dbf187dfffc8bd82cd07d37c697544015680bcb9f07f29a36c678 + languageName: node + linkType: hard + +"p-filter@npm:^2.1.0": + version: 2.1.0 + resolution: "p-filter@npm:2.1.0" + dependencies: + p-map: ^2.0.0 + checksum: 76e552ca624ce2233448d68b19eec9de42b695208121998f7e011edce71d1079a83096ee6a2078fb2a59cfa8a5c999f046edf00ebf16a8e780022010b4693234 + languageName: node + linkType: hard + "p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" @@ -5446,7 +6701,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^3.0.1, p-limit@npm:^3.1.0": +"p-limit@npm:^3.0.1, p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -5464,6 +6719,22 @@ __metadata: languageName: node linkType: hard +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: ^3.0.2 + checksum: 1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^2.0.0": + version: 2.1.0 + resolution: "p-map@npm:2.1.0" + checksum: 9e3ad3c9f6d75a5b5661bcad78c91f3a63849189737cd75e4f1225bf9ac205194e5c44aac2ef6f09562b1facdb9bd1425584d7ac375bfaa17b3f1a142dab936d + languageName: node + linkType: hard + "p-map@npm:^4.0.0": version: 4.0.0 resolution: "p-map@npm:4.0.0" @@ -5480,7 +6751,7 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^5.2.0": +"parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" dependencies: @@ -5551,6 +6822,13 @@ __metadata: languageName: node linkType: hard +"pify@npm:^4.0.1": + version: 4.0.1 + resolution: "pify@npm:4.0.1" + checksum: 9c4e34278cb09987685fa5ef81499c82546c033713518f6441778fbec623fc708777fe8ac633097c72d88470d5963094076c7305cafc7ad340aae27cfacd856b + languageName: node + linkType: hard + "pino-abstract-transport@npm:v1.1.0": version: 1.1.0 resolution: "pino-abstract-transport@npm:1.1.0" @@ -5605,6 +6883,13 @@ __metadata: languageName: node linkType: hard +"possible-typed-array-names@npm:^1.0.0": + version: 1.0.0 + resolution: "possible-typed-array-names@npm:1.0.0" + checksum: b32d403ece71e042385cc7856385cecf1cd8e144fa74d2f1de40d1e16035dba097bc189715925e79b67bdd1472796ff168d3a90d296356c9c94d272d5b95f3ae + languageName: node + linkType: hard + "postcss-load-config@npm:^4.0.1": version: 4.0.2 resolution: "postcss-load-config@npm:4.0.2" @@ -5623,7 +6908,19 @@ __metadata: languageName: node linkType: hard -"prettier@npm:2.8.8": +"preferred-pm@npm:^3.0.0": + version: 3.1.3 + resolution: "preferred-pm@npm:3.1.3" + dependencies: + find-up: ^5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: ^4.0.0 + which-pm: 2.0.0 + checksum: 3aa768985487c17d08936670b34939c21b5740e35186312d394c09f2c65fb1938fd4e074d0de5d80091c6a154f4adfa566b614fd4971caf43082c2a119e59d6b + languageName: node + linkType: hard + +"prettier@npm:2.8.8, prettier@npm:^2.7.1": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -5730,6 +7027,13 @@ __metadata: languageName: node linkType: hard +"pseudomap@npm:^1.0.2": + version: 1.0.2 + resolution: "pseudomap@npm:1.0.2" + checksum: 856c0aae0ff2ad60881168334448e898ad7a0e45fe7386d114b150084254c01e200c957cf378378025df4e052c7890c5bd933939b0e0d2ecfcc1dc2f0b2991f5 + languageName: node + linkType: hard + "punycode@npm:^2.1.0": version: 2.3.0 resolution: "punycode@npm:2.3.0" @@ -5744,6 +7048,13 @@ __metadata: languageName: node linkType: hard +"pure-rand@npm:^6.1.0": + version: 6.1.0 + resolution: "pure-rand@npm:6.1.0" + checksum: 8d53bc02bed99eca0b65b505090152ee7e9bd67dd74f8ff32ba1c883b87234067c5bf68d2614759fb217d82594d7a92919e6df80f97885e7b12b42af4bd3316a + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -5758,6 +7069,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^4.0.1": + version: 4.0.1 + resolution: "quick-lru@npm:4.0.1" + checksum: bea46e1abfaa07023e047d3cf1716a06172c4947886c053ede5c50321893711577cb6119360f810cc3ffcd70c4d7db4069c3cee876b358ceff8596e062bd1154 + languageName: node + linkType: hard + "ramda@npm:0.29.0": version: 0.29.0 resolution: "ramda@npm:0.29.0" @@ -5788,6 +7106,41 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: ^4.1.0 + read-pkg: ^5.2.0 + type-fest: ^0.8.1 + checksum: e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 + languageName: node + linkType: hard + +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" + dependencies: + "@types/normalize-package-data": ^2.4.0 + normalize-package-data: ^2.5.0 + parse-json: ^5.0.0 + type-fest: ^0.6.0 + checksum: eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 + languageName: node + linkType: hard + +"read-yaml-file@npm:^1.1.0": + version: 1.1.0 + resolution: "read-yaml-file@npm:1.1.0" + dependencies: + graceful-fs: ^4.1.5 + js-yaml: ^3.6.1 + pify: ^4.0.1 + strip-bom: ^3.0.0 + checksum: 41ee5f075507ef0403328dd54e225a61c3149f915675ce7fd0fd791ddcce2e6c30a9fe0f76ffa7a465c1c157b9b4ad8ded1dcf47dc3b396103eeb013490bbc2e + languageName: node + linkType: hard + "readable-stream@npm:^3.0.2, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" @@ -5828,6 +7181,35 @@ __metadata: languageName: node linkType: hard +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" + dependencies: + indent-string: ^4.0.0 + strip-indent: ^3.0.0 + checksum: fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 9f57c93277b5585d3c83b0cf76be47b473ae8c6d9142a46ce8b0291a04bb2cf902059f0f8445dcabb3fb7378e5fe4bb4ea1e008876343d42e46d3b484534ce38 + languageName: node + linkType: hard + +"regexp.prototype.flags@npm:^1.5.2": + version: 1.5.2 + resolution: "regexp.prototype.flags@npm:1.5.2" + dependencies: + call-bind: ^1.0.6 + define-properties: ^1.2.1 + es-errors: ^1.3.0 + set-function-name: ^2.0.1 + checksum: d7f333667d5c564e2d7a97c56c3075d64c722c9bb51b2b4df6822b2e8096d623a5e63088fb4c83df919b6951ef8113841de8b47de7224872fa6838bc5d8a7d64 + languageName: node + linkType: hard + "reinterval@npm:^1.1.0": version: 1.1.0 resolution: "reinterval@npm:1.1.0" @@ -5849,6 +7231,13 @@ __metadata: languageName: node linkType: hard +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: e9e294695fea08b076457e9ddff854e81bffbe248ed34c1eec348b7abbd22a0d02e8d75506559e2265e96978f3c4720bd77a6dad84755de8162b357eb6c778c7 + languageName: node + linkType: hard + "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -5872,7 +7261,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.20.0": +"resolve@npm:^1.10.0, resolve@npm:^1.20.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -5885,7 +7274,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.20.0#~builtin": +"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -5997,6 +7386,18 @@ __metadata: languageName: node linkType: hard +"safe-array-concat@npm:^1.1.2": + version: 1.1.2 + resolution: "safe-array-concat@npm:1.1.2" + dependencies: + call-bind: ^1.0.7 + get-intrinsic: ^1.2.4 + has-symbols: ^1.0.3 + isarray: ^2.0.5 + checksum: a3b259694754ddfb73ae0663829e396977b99ff21cbe8607f35a469655656da8e271753497e59da8a7575baa94d2e684bea3e10ddd74ba046c0c9b4418ffa0c4 + languageName: node + linkType: hard + "safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" @@ -6011,6 +7412,17 @@ __metadata: languageName: node linkType: hard +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-regex: ^1.1.4 + checksum: 6c7d392ff1ae7a3ae85273450ed02d1d131f1d2c76e177d6b03eb88e6df8fa062639070e7d311802c1615f351f18dc58f9454501c58e28d5ffd9b8f502ba6489 + languageName: node + linkType: hard + "safe-regex2@npm:^2.0.0": version: 2.0.0 resolution: "safe-regex2@npm:2.0.0" @@ -6027,7 +7439,7 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3.0.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 @@ -6052,6 +7464,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.4.1": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 + languageName: node + linkType: hard + "semver@npm:7.x, semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" @@ -6095,6 +7516,41 @@ __metadata: languageName: node linkType: hard +"set-function-length@npm:^1.2.1": + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" + dependencies: + define-data-property: ^1.1.4 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.4 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.2 + checksum: a8248bdacdf84cb0fab4637774d9fb3c7a8e6089866d04c817583ff48e14149c87044ce683d7f50759a8c50fb87c7a7e173535b06169c87ef76f5fb276dfff72 + languageName: node + linkType: hard + +"set-function-name@npm:^2.0.1": + version: 2.0.2 + resolution: "set-function-name@npm:2.0.2" + dependencies: + define-data-property: ^1.1.4 + es-errors: ^1.3.0 + functions-have-names: ^1.2.3 + has-property-descriptors: ^1.0.2 + checksum: d6229a71527fd0404399fc6227e0ff0652800362510822a291925c9d7b48a1ca1a468b11b281471c34cd5a2da0db4f5d7ff315a61d26655e77f6e971e6d0c80f + languageName: node + linkType: hard + +"shebang-command@npm:^1.2.0": + version: 1.2.0 + resolution: "shebang-command@npm:1.2.0" + dependencies: + shebang-regex: ^1.0.0 + checksum: 9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908 + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -6104,6 +7560,13 @@ __metadata: languageName: node linkType: hard +"shebang-regex@npm:^1.0.0": + version: 1.0.0 + resolution: "shebang-regex@npm:1.0.0" + checksum: 404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372 + languageName: node + linkType: hard + "shebang-regex@npm:^3.0.0": version: 3.0.0 resolution: "shebang-regex@npm:3.0.0" @@ -6111,7 +7574,19 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": +"side-channel@npm:^1.0.4": + version: 1.0.6 + resolution: "side-channel@npm:1.0.6" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + object-inspect: ^1.13.1 + checksum: bfc1afc1827d712271453e91b7cd3878ac0efd767495fd4e594c4c2afaa7963b7b510e249572bfd54b0527e66e4a12b61b80c061389e129755f34c493aad9b97 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 @@ -6146,6 +7621,22 @@ __metadata: languageName: node linkType: hard +"smartwrap@npm:^2.0.2": + version: 2.0.2 + resolution: "smartwrap@npm:2.0.2" + dependencies: + array.prototype.flat: ^1.2.3 + breakword: ^1.0.5 + grapheme-splitter: ^1.0.4 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + yargs: ^15.1.0 + bin: + smartwrap: src/terminal-adapter.js + checksum: 1a6833eb1c3d8488b036df66dcab37dcdda5270bb9629c471155785c09ee1b591177a9774c588c43f8fa28833204500019265da2ffed28ac7bbf4589b943d2fa + languageName: node + linkType: hard + "socks-proxy-agent@npm:^7.0.0": version: 7.0.0 resolution: "socks-proxy-agent@npm:7.0.0" @@ -6249,6 +7740,50 @@ __metadata: languageName: node linkType: hard +"spawndamnit@npm:^2.0.0": + version: 2.0.0 + resolution: "spawndamnit@npm:2.0.0" + dependencies: + cross-spawn: ^5.1.0 + signal-exit: ^3.0.2 + checksum: c74b5e264ee5bc13d55692fd422d74c282e4607eb04ac64d19d06796718d89b14921620fa4237ec5635e7acdff21461670ff19850f210225410a353cad0d7fed + languageName: node + linkType: hard + +"spdx-correct@npm:^3.0.0": + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" + dependencies: + spdx-expression-parse: ^3.0.0 + spdx-license-ids: ^3.0.0 + checksum: e9ae98d22f69c88e7aff5b8778dc01c361ef635580e82d29e5c60a6533cc8f4d820803e67d7432581af0cc4fb49973125076ee3b90df191d153e223c004193b2 + languageName: node + linkType: hard + +"spdx-exceptions@npm:^2.1.0": + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^3.0.0": + version: 3.0.1 + resolution: "spdx-expression-parse@npm:3.0.1" + dependencies: + spdx-exceptions: ^2.1.0 + spdx-license-ids: ^3.0.0 + checksum: a1c6e104a2cbada7a593eaa9f430bd5e148ef5290d4c0409899855ce8b1c39652bcc88a725259491a82601159d6dc790bedefc9016c7472f7de8de7361f8ccde + languageName: node + linkType: hard + +"spdx-license-ids@npm:^3.0.0": + version: 3.0.18 + resolution: "spdx-license-ids@npm:3.0.18" + checksum: 457825df5dd1fc0135b0bb848c896143f70945cc2da148afc71c73ed0837d1d651f809006e406d82109c9dd71a8cb39785a3604815fe46bc0548e9d3976f6b69 + languageName: node + linkType: hard + "split2@npm:^4.0.0, split2@npm:^4.2.0": version: 4.2.0 resolution: "split2@npm:4.2.0" @@ -6304,6 +7839,15 @@ __metadata: languageName: node linkType: hard +"stream-transform@npm:^2.1.3": + version: 2.1.3 + resolution: "stream-transform@npm:2.1.3" + dependencies: + mixme: ^0.5.1 + checksum: 26ce872a6812d5c784fa1f042bfd403644bc1c019f64627b5012c4544830a5570bef98b47225b38120c5878b326f3d1a213cd999a2285c98b536e5e202ca5bdf + languageName: node + linkType: hard + "string-length@npm:^4.0.1": version: 4.0.2 resolution: "string-length@npm:4.0.2" @@ -6336,6 +7880,40 @@ __metadata: languageName: node linkType: hard +"string.prototype.trim@npm:^1.2.9": + version: 1.2.9 + resolution: "string.prototype.trim@npm:1.2.9" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.0 + es-object-atoms: ^1.0.0 + checksum: ea2df6ec1e914c9d4e2dc856fa08228e8b1be59b59e50b17578c94a66a176888f417264bb763d4aac638ad3b3dad56e7a03d9317086a178078d131aa293ba193 + languageName: node + linkType: hard + +"string.prototype.trimend@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimend@npm:1.0.8" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: cc3bd2de08d8968a28787deba9a3cb3f17ca5f9f770c91e7e8fa3e7d47f079bad70fadce16f05dda9f261788be2c6e84a942f618c3bed31e42abc5c1084f8dfd + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: df1007a7f580a49d692375d996521dc14fd103acda7f3034b3c558a60b82beeed3a64fa91e494e164581793a8ab0ae2f59578a49896a7af6583c1f20472bce96 + languageName: node + linkType: hard + "string_decoder@npm:^1.1.1, string_decoder@npm:^1.3.0": version: 1.3.0 resolution: "string_decoder@npm:1.3.0" @@ -6363,6 +7941,13 @@ __metadata: languageName: node linkType: hard +"strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-bom@npm:3.0.0" + checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b + languageName: node + linkType: hard + "strip-bom@npm:^4.0.0": version: 4.0.0 resolution: "strip-bom@npm:4.0.0" @@ -6377,6 +7962,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: ^1.0.0 + checksum: 18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -6494,6 +8088,13 @@ __metadata: languageName: node linkType: hard +"term-size@npm:^2.1.0": + version: 2.2.1 + resolution: "term-size@npm:2.2.1" + checksum: 1ed981335483babc1e8206f843e06bd2bf89b85f0bf5a9a9d928033a0fcacdba183c03ba7d91814643015543ba002f1339f7112402a21da8f24b6c56b062a5a9 + languageName: node + linkType: hard + "terser-webpack-plugin@npm:^5.3.7": version: 5.3.9 resolution: "terser-webpack-plugin@npm:5.3.9" @@ -6568,6 +8169,15 @@ __metadata: languageName: node linkType: hard +"tmp@npm:^0.0.33": + version: 0.0.33 + resolution: "tmp@npm:0.0.33" + dependencies: + os-tmpdir: ~1.0.2 + checksum: 902d7aceb74453ea02abbf58c203f4a8fc1cead89b60b31e354f74ed5b3fb09ea817f94fb310f884a5d16987dd9fa5a735412a7c2dd088dd3d415aa819ae3a28 + languageName: node + linkType: hard + "tmp@npm:^0.2.1": version: 0.2.1 resolution: "tmp@npm:0.2.1" @@ -6656,6 +8266,13 @@ __metadata: languageName: node linkType: hard +"trim-newlines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-newlines@npm:3.0.1" + checksum: b530f3fadf78e570cf3c761fb74fef655beff6b0f84b29209bac6c9622db75ad1417f4a7b5d54c96605dcd72734ad44526fef9f396807b90839449eb543c6206 + languageName: node + linkType: hard + "ts-interface-checker@npm:^0.1.9": version: 0.1.13 resolution: "ts-interface-checker@npm:0.1.13" @@ -6817,6 +8434,23 @@ __metadata: languageName: node linkType: hard +"tty-table@npm:^4.1.5": + version: 4.2.3 + resolution: "tty-table@npm:4.2.3" + dependencies: + chalk: ^4.1.2 + csv: ^5.5.3 + kleur: ^4.1.5 + smartwrap: ^2.0.2 + strip-ansi: ^6.0.1 + wcwidth: ^1.0.1 + yargs: ^17.7.1 + bin: + tty-table: adapters/terminal-adapter.js + checksum: 2d6c429dc91c308cd1c8d0f2e102e08bcc10af21bc99b89179fb414dd0edd6a686026ff53111dfd3a814841bbbb44c55cd827e5a7748f35182c62f13fef5a169 + languageName: node + linkType: hard + "turbo-darwin-64@npm:1.10.13": version: 1.10.13 resolution: "turbo-darwin-64@npm:1.10.13" @@ -6966,6 +8600,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: e6bf2e3c449f27d4ef5d56faf8b86feafbc3aec3025fc9a5fbe2db0a2587c44714521f9c30d8516a833c8c506d6263f5cc11267522b10c6ccdb6cc55b0a9d1c4 + languageName: node + linkType: hard + "type-fest@npm:^0.21.3": version: 0.21.3 resolution: "type-fest@npm:0.21.3" @@ -6973,6 +8614,72 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: b2188e6e4b21557f6e92960ec496d28a51d68658018cba8b597bd3ef757721d1db309f120ae987abeeda874511d14b776157ff809f23c6d1ce8f83b9b2b7d60f + languageName: node + linkType: hard + +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 + languageName: node + linkType: hard + +"typed-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-buffer@npm:1.0.2" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-typed-array: ^1.1.13 + checksum: 02ffc185d29c6df07968272b15d5319a1610817916ec8d4cd670ded5d1efe72901541ff2202fcc622730d8a549c76e198a2f74e312eabbfb712ed907d45cbb0b + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: f65e5ecd1cf76b1a2d0d6f631f3ea3cdb5e08da106c6703ffe687d583e49954d570cc80434816d3746e18be889ffe53c58bf3e538081ea4077c26a41055b216d + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-byte-offset@npm:1.0.2" + dependencies: + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: c8645c8794a621a0adcc142e0e2c57b1823bbfa4d590ad2c76b266aa3823895cf7afb9a893bf6685e18454ab1b0241e1a8d885a2d1340948efa4b56add4b5f67 + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.6": + version: 1.0.6 + resolution: "typed-array-length@npm:1.0.6" + dependencies: + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + possible-typed-array-names: ^1.0.0 + checksum: f0315e5b8f0168c29d390ff410ad13e4d511c78e6006df4a104576844812ee447fcc32daab1f3a76c9ef4f64eff808e134528b5b2439de335586b392e9750e5c + languageName: node + linkType: hard + "typedarray@npm:^0.0.6": version: 0.0.6 resolution: "typedarray@npm:0.0.6" @@ -6998,37 +8705,35 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.2.2": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" +"typescript@npm:5.4.5": + version: 5.4.5 + resolution: "typescript@npm:5.4.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c + checksum: 53c879c6fa1e3bcb194b274d4501ba1985894b2c2692fa079db03c5a5a7140587a1e04e1ba03184605d35f439b40192d9e138eb3279ca8eee313c081c8bcd9b0 languageName: node linkType: hard -"typescript@patch:typescript@5.2.2#~builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" +"typescript@patch:typescript@npm%3A5.4.5#~builtin": + version: 5.4.5 + resolution: "typescript@patch:typescript@npm%3A5.4.5#~builtin::version=5.4.5&hash=29ae49" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 0f4da2f15e6f1245e49db15801dbee52f2bbfb267e1c39225afdab5afee1a72839cd86000e65ee9d7e4dfaff12239d28beaf5ee431357fcced15fb08583d72ca - languageName: node - linkType: hard - -"udc@npm:^1.0.0": - version: 1.0.1 - resolution: "udc@npm:1.0.1" - checksum: 302b4bd08feab3f75683bcebfe0dde9eabdb2579400ef3feef09132169842ea83e64441e075b0523c91be3ba1f4668fbb8c7d6918e3032be56a967629c4e7db2 + checksum: 2373c693f3b328f3b2387c3efafe6d257b057a142f9a79291854b14ff4d5367d3d730810aee981726b677ae0fd8329b23309da3b6aaab8263dbdccf1da07a3ba languageName: node linkType: hard -"underscore@npm:^1.8.3": - version: 1.13.6 - resolution: "underscore@npm:1.13.6" - checksum: d5cedd14a9d0d91dd38c1ce6169e4455bb931f0aaf354108e47bd46d3f2da7464d49b2171a5cf786d61963204a42d01ea1332a903b7342ad428deaafaf70ec36 +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + has-bigints: ^1.0.2 + has-symbols: ^1.0.3 + which-boxed-primitive: ^1.0.2 + checksum: b7a1cf5862b5e4b5deb091672ffa579aa274f648410009c81cca63fed3b62b610c4f3b773f912ce545bb4e31edc3138975b5bc777fc6e4817dca51affb6380e9 languageName: node linkType: hard @@ -7073,6 +8778,13 @@ __metadata: languageName: node linkType: hard +"universalify@npm:^0.1.0": + version: 0.1.2 + resolution: "universalify@npm:0.1.2" + checksum: 40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff + languageName: node + linkType: hard + "unleash-client@npm:^5.3.0": version: 5.5.1 resolution: "unleash-client@npm:5.5.1" @@ -7151,6 +8863,16 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-license@npm:^3.0.1": + version: 3.0.4 + resolution: "validate-npm-package-license@npm:3.0.4" + dependencies: + spdx-correct: ^3.0.0 + spdx-expression-parse: ^3.0.0 + checksum: 35703ac889d419cf2aceef63daeadbe4e77227c39ab6287eeb6c1b36a746b364f50ba22e88591f5d017bc54685d8137bc2d328d0a896e4d3fd22093c0f32a9ad + languageName: node + linkType: hard + "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -7170,6 +8892,15 @@ __metadata: languageName: node linkType: hard +"wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" + dependencies: + defaults: ^1.0.3 + checksum: 814e9d1ddcc9798f7377ffa448a5a3892232b9275ebb30a41b529607691c0491de47cba426e917a4d08ded3ee7e9ba2f3fe32e62ee3cd9c7d3bafb7754bd553c + languageName: node + linkType: hard + "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" @@ -7249,6 +8980,60 @@ __metadata: languageName: node linkType: hard +"which-boxed-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "which-boxed-primitive@npm:1.0.2" + dependencies: + is-bigint: ^1.0.1 + is-boolean-object: ^1.1.0 + is-number-object: ^1.0.4 + is-string: ^1.0.5 + is-symbol: ^1.0.3 + checksum: 53ce774c7379071729533922adcca47220228405e1895f26673bbd71bdf7fb09bee38c1d6399395927c6289476b5ae0629863427fd151491b71c4b6cb04f3a5e + languageName: node + linkType: hard + +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + +"which-pm@npm:2.0.0": + version: 2.0.0 + resolution: "which-pm@npm:2.0.0" + dependencies: + load-yaml-file: ^0.2.0 + path-exists: ^4.0.0 + checksum: e556635eaf237b3a101043a21c2890af045db40eac4df3575161d4fb834c2aa65456f81c60d8ea4db2d51fe5ac549d989eeabd17278767c2e4179361338ac5ce + languageName: node + linkType: hard + +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": + version: 1.1.15 + resolution: "which-typed-array@npm:1.1.15" + dependencies: + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.2 + checksum: 65227dcbfadf5677aacc43ec84356d17b5500cb8b8753059bb4397de5cd0c2de681d24e1a7bd575633f976a95f88233abfd6549c2105ef4ebd58af8aa1807c75 + languageName: node + linkType: hard + +"which@npm:^1.2.9": + version: 1.3.1 + resolution: "which@npm:1.3.1" + dependencies: + isexe: ^2.0.0 + bin: + which: ./bin/which + checksum: f2e185c6242244b8426c9df1510e86629192d93c1a986a7d2a591f2c24869e7ffd03d6dac07ca863b2e4c06f59a4cc9916c585b72ee9fa1aa609d0124df15e04 + languageName: node + linkType: hard + "which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -7280,6 +9065,17 @@ __metadata: languageName: node linkType: hard +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a + languageName: node + linkType: hard + "wrap-ansi@npm:^8.1.0": version: 8.1.0 resolution: "wrap-ansi@npm:8.1.0" @@ -7330,6 +9126,13 @@ __metadata: languageName: node linkType: hard +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 014dfcd9b5f4105c3bb397c1c8c6429a9df004aa560964fb36732bfb999bfe83d45ae40aeda5b55d21b1ee53d8291580a32a756a443e064317953f08025b1aa4 + languageName: node + linkType: hard + "y18n@npm:^5.0.5": version: 5.0.8 resolution: "y18n@npm:5.0.8" @@ -7337,6 +9140,13 @@ __metadata: languageName: node linkType: hard +"yallist@npm:^2.1.2": + version: 2.1.2 + resolution: "yallist@npm:2.1.2" + checksum: 9ba99409209f485b6fcb970330908a6d41fa1c933f75e08250316cce19383179a6b70a7e0721b89672ebb6199cc377bf3e432f55100da6a7d6e11902b0a642cb + languageName: node + linkType: hard + "yallist@npm:^3.0.2": version: 3.1.1 resolution: "yallist@npm:3.1.1" @@ -7358,6 +9168,16 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:^18.1.2, yargs-parser@npm:^18.1.3": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + "yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" @@ -7365,7 +9185,26 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.3.1, yargs@npm:^17.7.2": +"yargs@npm:^15.1.0": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: ^6.0.0 + decamelize: ^1.2.0 + find-up: ^4.1.0 + get-caller-file: ^2.0.1 + require-directory: ^2.1.1 + require-main-filename: ^2.0.0 + set-blocking: ^2.0.0 + string-width: ^4.2.0 + which-module: ^2.0.0 + y18n: ^4.0.0 + yargs-parser: ^18.1.2 + checksum: 40b974f508d8aed28598087720e086ecd32a5fd3e945e95ea4457da04ee9bdb8bdd17fd91acff36dc5b7f0595a735929c514c40c402416bbb87c03f6fb782373 + languageName: node + linkType: hard + +"yargs@npm:^17.3.1, yargs@npm:^17.7.1, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: