u/fanf2/rpc.d.ts.git
2 years agoBrainwave master
Tony Finch [Thu, 17 May 2018 12:32:54 +0000 (13:32 +0100)]
Brainwave

2 years agoPause for thought
Tony Finch [Mon, 14 May 2018 14:35:00 +0000 (15:35 +0100)]
Pause for thought

2 years agoNeed a lower-level network error
Tony Finch [Fri, 11 May 2018 10:33:34 +0000 (11:33 +0100)]
Need a lower-level network error

2 years agoList all outputs so `make clean` works
Tony Finch [Thu, 10 May 2018 19:29:57 +0000 (20:29 +0100)]
List all outputs so `make clean` works

2 years agoDistinguish between concurrent and sequential multicalls
Tony Finch [Thu, 10 May 2018 19:04:50 +0000 (20:04 +0100)]
Distinguish between concurrent and sequential multicalls

2 years agoMissing dependency
Tony Finch [Thu, 10 May 2018 18:51:39 +0000 (19:51 +0100)]
Missing dependency

2 years agoAutomatically generate example stubs
Tony Finch [Thu, 10 May 2018 18:50:02 +0000 (19:50 +0100)]
Automatically generate example stubs

2 years agoFix rpc server declarations
Tony Finch [Thu, 10 May 2018 18:49:46 +0000 (19:49 +0100)]
Fix rpc server declarations

2 years agoPrune obsolete file
Tony Finch [Thu, 10 May 2018 18:26:02 +0000 (19:26 +0100)]
Prune obsolete file

2 years agoRemove files that are now generated
Tony Finch [Thu, 10 May 2018 18:19:47 +0000 (19:19 +0100)]
Remove files that are now generated

2 years agoWrite to output files
Tony Finch [Thu, 10 May 2018 18:18:00 +0000 (19:18 +0100)]
Write to output files

2 years agoPreen iteration over methods
Tony Finch [Thu, 10 May 2018 18:17:39 +0000 (19:17 +0100)]
Preen iteration over methods

2 years agoPreen
Tony Finch [Thu, 10 May 2018 17:56:39 +0000 (18:56 +0100)]
Preen

2 years agoDone generating server stubs?
Tony Finch [Thu, 10 May 2018 16:46:47 +0000 (17:46 +0100)]
Done generating server stubs?

2 years agoNeater server stub method definitions
Tony Finch [Thu, 10 May 2018 16:11:46 +0000 (17:11 +0100)]
Neater server stub method definitions

2 years agoA handy util for looking at TypeScript AST structure
Tony Finch [Thu, 10 May 2018 16:11:13 +0000 (17:11 +0100)]
A handy util for looking at TypeScript AST structure

2 years agoConstructing the server stubs
Tony Finch [Thu, 10 May 2018 15:54:31 +0000 (16:54 +0100)]
Constructing the server stubs

2 years agoMore RPC server bits
Tony Finch [Thu, 10 May 2018 14:58:02 +0000 (15:58 +0100)]
More RPC server bits

2 years agoCLeaning up some variable names and starting on the server stubs
Tony Finch [Thu, 10 May 2018 13:45:00 +0000 (14:45 +0100)]
CLeaning up some variable names and starting on the server stubs

2 years agoPreen retval logistics
Tony Finch [Wed, 9 May 2018 14:17:47 +0000 (15:17 +0100)]
Preen retval logistics

2 years agoEmit top-level RPC types
Tony Finch [Wed, 9 May 2018 14:15:10 +0000 (15:15 +0100)]
Emit top-level RPC types

2 years agoEmit import clauses, with ugly workaround
Tony Finch [Wed, 9 May 2018 13:58:44 +0000 (14:58 +0100)]
Emit import clauses, with ugly workaround

2 years agoRefactoring done
Tony Finch [Wed, 9 May 2018 11:15:24 +0000 (12:15 +0100)]
Refactoring done

2 years agoRefactoring declaration generators into methods
Tony Finch [Wed, 9 May 2018 11:09:04 +0000 (12:09 +0100)]
Refactoring declaration generators into methods

2 years agoPrune WIP notes
Tony Finch [Wed, 9 May 2018 10:54:46 +0000 (11:54 +0100)]
Prune WIP notes

2 years agoMethod parameters
Tony Finch [Wed, 9 May 2018 10:54:25 +0000 (11:54 +0100)]
Method parameters

2 years agoRequest types
Tony Finch [Tue, 8 May 2018 19:20:51 +0000 (20:20 +0100)]
Request types

2 years agoAlias type definitions for retvals
Tony Finch [Tue, 8 May 2018 18:39:02 +0000 (19:39 +0100)]
Alias type definitions for retvals

2 years agoDRY out the union types a bit
Tony Finch [Tue, 8 May 2018 18:16:01 +0000 (19:16 +0100)]
DRY out the union types a bit

2 years agoStarting to emit declarations
Tony Finch [Tue, 8 May 2018 17:49:41 +0000 (18:49 +0100)]
Starting to emit declarations

2 years agoNow enumerating the methods we care about (I think)
Tony Finch [Tue, 8 May 2018 16:30:10 +0000 (17:30 +0100)]
Now enumerating the methods we care about (I think)

2 years agoGradually writing AST walker for stub generation
Tony Finch [Tue, 8 May 2018 15:50:03 +0000 (16:50 +0100)]
Gradually writing AST walker for stub generation

2 years agoFactor out getProgram() helper
Tony Finch [Tue, 8 May 2018 13:49:47 +0000 (14:49 +0100)]
Factor out getProgram() helper

2 years agoMake the generr data type field optional
Tony Finch [Tue, 8 May 2018 12:48:47 +0000 (13:48 +0100)]
Make the generr data type field optional

2 years agoTypeScript option fiddling
Tony Finch [Fri, 4 May 2018 20:12:07 +0000 (21:12 +0100)]
TypeScript option fiddling

2 years agoSplit runtime from dev dependencies
Tony Finch [Fri, 4 May 2018 20:11:12 +0000 (21:11 +0100)]
Split runtime from dev dependencies

2 years agoTest is also working
Tony Finch [Fri, 4 May 2018 20:10:27 +0000 (21:10 +0100)]
Test is also working

2 years agoError type revamp
Tony Finch [Fri, 4 May 2018 20:09:32 +0000 (21:09 +0100)]
Error type revamp

2 years agoDisentangle circular dependencies
Tony Finch [Fri, 4 May 2018 20:08:54 +0000 (21:08 +0100)]
Disentangle circular dependencies

2 years agoCall the string dispatch function
Tony Finch [Fri, 4 May 2018 20:08:17 +0000 (21:08 +0100)]
Call the string dispatch function

2 years agoAdd an Example.fail method
Tony Finch [Fri, 4 May 2018 20:07:46 +0000 (21:07 +0100)]
Add an Example.fail method

2 years agoSeparate built-in errors from app errors
Tony Finch [Fri, 4 May 2018 20:06:17 +0000 (21:06 +0100)]
Separate built-in errors from app errors

2 years agoPreen
Tony Finch [Fri, 4 May 2018 17:24:14 +0000 (18:24 +0100)]
Preen

2 years agoUse a pipeline style for generr
Tony Finch [Fri, 4 May 2018 17:23:29 +0000 (18:23 +0100)]
Use a pipeline style for generr

2 years agoGenerate error types from a terse description
Tony Finch [Fri, 4 May 2018 15:59:52 +0000 (16:59 +0100)]
Generate error types from a terse description

2 years agoA possibly-supportable format for validation error data
Tony Finch [Fri, 4 May 2018 14:21:59 +0000 (15:21 +0100)]
A possibly-supportable format for validation error data

2 years agoAllow dispatching untyped json as well as strings
Tony Finch [Thu, 3 May 2018 18:03:30 +0000 (19:03 +0100)]
Allow dispatching untyped json as well as strings

2 years agoErrors are only lowered in the server dispatch code
Tony Finch [Thu, 3 May 2018 17:48:24 +0000 (18:48 +0100)]
Errors are only lowered in the server dispatch code

2 years agoThrow error message and error info from schema validator
Tony Finch [Thu, 3 May 2018 16:50:07 +0000 (17:50 +0100)]
Throw error message and error info from schema validator

2 years agoA bit of preening
Tony Finch [Thu, 3 May 2018 16:24:18 +0000 (17:24 +0100)]
A bit of preening

2 years agoClassification of errors
Tony Finch [Thu, 3 May 2018 15:43:43 +0000 (16:43 +0100)]
Classification of errors

2 years agoEnsure we have schema definitions for retval types
Tony Finch [Thu, 3 May 2018 15:27:57 +0000 (16:27 +0100)]
Ensure we have schema definitions for retval types

2 years agoValidation basically working, tho error messages are naff
Tony Finch [Thu, 3 May 2018 14:21:06 +0000 (15:21 +0100)]
Validation basically working, tho error messages are naff

2 years agoLog when startup complete
Tony Finch [Thu, 3 May 2018 14:20:45 +0000 (15:20 +0100)]
Log when startup complete

2 years agoProbably best not to do fiddly cleanups
Tony Finch [Thu, 3 May 2018 13:44:49 +0000 (14:44 +0100)]
Probably best not to do fiddly cleanups

2 years agoI think we need an explicit $id at the root of the schema
Tony Finch [Thu, 3 May 2018 13:18:40 +0000 (14:18 +0100)]
I think we need an explicit $id at the root of the schema

At least, this way AJV is able to give me a validator in
a way that makes some sense, though it would be nice if
I could avoid having to name things...

2 years agoCheck schema compilation worked
Tony Finch [Tue, 1 May 2018 21:17:29 +0000 (22:17 +0100)]
Check schema compilation worked

2 years agoCorrect content-type on responses
Tony Finch [Tue, 1 May 2018 21:17:15 +0000 (22:17 +0100)]
Correct content-type on responses

2 years agoClassful refactoring nearly done...
Tony Finch [Tue, 1 May 2018 21:01:46 +0000 (22:01 +0100)]
Classful refactoring nearly done...

2 years agoMore useful untyped request schemas for the dispatcher
Tony Finch [Tue, 1 May 2018 20:42:11 +0000 (21:42 +0100)]
More useful untyped request schemas for the dispatcher

2 years agoAppease AJV's pedantry about schema versions
Tony Finch [Tue, 1 May 2018 20:22:10 +0000 (21:22 +0100)]
Appease AJV's pedantry about schema versions

2 years agoUnprivileged listening socket
Tony Finch [Tue, 1 May 2018 20:21:05 +0000 (21:21 +0100)]
Unprivileged listening socket

2 years agoClassful refactoring continues
Tony Finch [Tue, 1 May 2018 19:57:47 +0000 (20:57 +0100)]
Classful refactoring continues

Switch from djv to ajv, since ajv has type declarations.

Use 'rpc' as the namespace tag, in the absence of something
more specific.

Still need to rewrite server-dispatch.

Still fighting the schema business.

2 years agotjs: check for errors from TypeScript API
Tony Finch [Tue, 1 May 2018 19:12:07 +0000 (20:12 +0100)]
tjs: check for errors from TypeScript API

2 years agoClean up the schema a bit. Still missing method return types
Tony Finch [Tue, 1 May 2018 17:06:06 +0000 (18:06 +0100)]
Clean up the schema a bit. Still missing method return types

2 years agoGenerate combined and cleaned-up schema
Tony Finch [Tue, 1 May 2018 15:55:01 +0000 (16:55 +0100)]
Generate combined and cleaned-up schema

This might be included in the overall RPC stub generator.

2 years agoPreen top-level schema type name
Tony Finch [Tue, 1 May 2018 14:23:44 +0000 (15:23 +0100)]
Preen top-level schema type name

2 years agoUpdate example-types to match new interface
Tony Finch [Mon, 30 Apr 2018 17:05:46 +0000 (18:05 +0100)]
Update example-types to match new interface

2 years agosimplify the basic JSON-RPC types
Tony Finch [Mon, 30 Apr 2018 16:17:16 +0000 (17:17 +0100)]
simplify the basic JSON-RPC types

2 years agoREADME: experiments with types
Tony Finch [Mon, 30 Apr 2018 11:22:21 +0000 (12:22 +0100)]
README: experiments with types

2 years agoREADME: sketch overall plan
Tony Finch [Mon, 30 Apr 2018 10:47:59 +0000 (11:47 +0100)]
README: sketch overall plan

2 years agoREADME: move note on pending transactions elsewhere
Tony Finch [Mon, 30 Apr 2018 10:47:39 +0000 (11:47 +0100)]
README: move note on pending transactions elsewhere

2 years agoUse new typeful schema for example
Tony Finch [Sun, 29 Apr 2018 15:36:04 +0000 (16:36 +0100)]
Use new typeful schema for example

2 years agoMake example into a class
Tony Finch [Sun, 29 Apr 2018 15:35:29 +0000 (16:35 +0100)]
Make example into a class

2 years agoAdd transactions to the schema
Tony Finch [Sun, 29 Apr 2018 15:13:00 +0000 (16:13 +0100)]
Add transactions to the schema

2 years agoParametrized RPC types, for splitting generic and application-specific schemas
Tony Finch [Sun, 29 Apr 2018 13:47:15 +0000 (14:47 +0100)]
Parametrized RPC types, for splitting generic and application-specific schemas

2 years agoThis seems to be a working typing for djv
Tony Finch [Sat, 28 Apr 2018 15:55:56 +0000 (16:55 +0100)]
This seems to be a working typing for djv

2 years agoAvoid confusing TypeScript's flow control analysis
Tony Finch [Sat, 28 Apr 2018 15:55:14 +0000 (16:55 +0100)]
Avoid confusing TypeScript's flow control analysis

2 years agoMake schema-based validation more OO and more typeful
Tony Finch [Sat, 28 Apr 2018 14:37:56 +0000 (15:37 +0100)]
Make schema-based validation more OO and more typeful

2 years agoI think this is how server init needs to work
Tony Finch [Sat, 28 Apr 2018 14:07:58 +0000 (15:07 +0100)]
I think this is how server init needs to work

2 years agoThe server's main program needs to be application-specific
Tony Finch [Sat, 28 Apr 2018 14:02:20 +0000 (15:02 +0100)]
The server's main program needs to be application-specific

This is so it can instantiate the application-specific
classes, and so the RPC layer is independent of choice
of framework.

2 years agoSeparate out the example app
Tony Finch [Sat, 28 Apr 2018 13:26:13 +0000 (14:26 +0100)]
Separate out the example app

2 years agoShould be committing more frequently...
Tony Finch [Sat, 28 Apr 2018 13:10:43 +0000 (14:10 +0100)]
Should be committing more frequently...

I got to the point of `tsc` completing without errors, but the run-time
initialization was broken due to what looked like dependency loops -
the schema-based  validator code wasn't ready when it was needed.

So i'm going to split out the example app code, using classes to hold
the runtime state for the app and the server and client stubs.
(I already started doing this so the code is currently broken.)

Hopefully this will also make it more clear where the boundaries are
between the type-safe app code and the less-typed dispatch code.

2 years agoREADME: I have found a (working?) typescript-json-schema
Tony Finch [Wed, 25 Apr 2018 14:15:12 +0000 (15:15 +0100)]
README: I have found a (working?) typescript-json-schema

2 years agoBetter error class names, I think?
Tony Finch [Tue, 24 Apr 2018 18:14:22 +0000 (19:14 +0100)]
Better error class names, I think?

2 years agoUse faucet instead of prove
Tony Finch [Tue, 24 Apr 2018 18:12:45 +0000 (19:12 +0100)]
Use faucet instead of prove

tape produces YAML that upsets TAP::Parser

2 years agoNeed modern libraries
Tony Finch [Tue, 24 Apr 2018 15:51:47 +0000 (16:51 +0100)]
Need modern libraries

2 years agoStart making a TypeScript RPC library
Tony Finch [Tue, 24 Apr 2018 15:43:26 +0000 (16:43 +0100)]
Start making a TypeScript RPC library

2 years agoA note on pending transactions
Tony Finch [Tue, 24 Apr 2018 10:20:24 +0000 (11:20 +0100)]
A note on pending transactions

I'm not sure if this is the best place to write down this thought,
but it can stay here for the time being.

2 years agopreen README experiments
Tony Finch [Mon, 23 Apr 2018 16:30:43 +0000 (17:30 +0100)]
preen README

2 years agoThird attempt: io-ts
Tony Finch [Mon, 23 Apr 2018 16:27:13 +0000 (17:27 +0100)]
Third attempt: io-ts

2 years agoSecond attempt: json2ts
Tony Finch [Mon, 23 Apr 2018 15:33:27 +0000 (16:33 +0100)]
Second attempt: json2ts

2 years agoFirst attempt: typson
Tony Finch [Mon, 23 Apr 2018 15:11:37 +0000 (16:11 +0100)]
First attempt: typson

2 years agoA very basic JSON-RPC setup
Tony Finch [Mon, 23 Apr 2018 14:56:11 +0000 (15:56 +0100)]
A very basic JSON-RPC setup

2 years agopackage.json and other rubric
Tony Finch [Mon, 23 Apr 2018 14:44:07 +0000 (15:44 +0100)]
package.json and other rubric

2 years agoTypeScript options
Tony Finch [Mon, 23 Apr 2018 14:00:35 +0000 (15:00 +0100)]
TypeScript options

2 years agoManifesto
Tony Finch [Mon, 23 Apr 2018 13:51:40 +0000 (14:51 +0100)]
Manifesto

2 years agoStart
Tony Finch [Mon, 23 Apr 2018 13:37:23 +0000 (14:37 +0100)]
Start