Skip to content

Package as library using ocap discipline#10

Open
dckc wants to merge 36 commits into
marcsAtSkyhunter:masterfrom
dckc:package
Open

Package as library using ocap discipline#10
dckc wants to merge 36 commits into
marcsAtSkyhunter:masterfrom
dckc:package

Conversation

@dckc

@dckc dckc commented Mar 6, 2016

Copy link
Copy Markdown

I restored the tests to working order. This is starting to feel pretty solid.

I re-organized my finquick application to depend on this package as suggested in #3 and it works well. Features to date:

  • Current account balances from GnuCash mysql DB
    • real-time updates in response to edits in GnuCash
  • OFX Sync between financial services and GnuCash
    • Fetch credit card transactions using the OFX protocol
    • Fetch transactions by scripted browsing from paypal and some banks
      • Convert to OFX format
    • Preview import
    • Cache fetched data
      • with a slider for max-age
  • Search transactions by amount

I wish I could make screenshots or even a screen-cast, but I only have real (sensitive) data at this point. I'll have to do something about that...

dckc added 30 commits February 25, 2016 21:07
mismatch with es6 specs discovered using flow
Move them closer to other functions that need
similar authority.
  - import powerful objects only
    if (require.main == module), i.e. only when this module
    is invoked from the command line
  - pass access to files, network, randomness explicitly
    rather than using ambient authority
    - to makeConfig(), sslOptions(), makeSturdy(), makeApp()
  - .flowconfig, jshint declarations
  - annotations for exports from caplib, saver
    - name interface types in interfaces/types.js
  - borrow es6 Proxy declaration from typescript
  - adapt misc. node.js API types from typescript
  - tweak commandArgs loop in argMap to not mutate
    strings to numbers in-place
  - tweak copyRecurse isDirectory test to avoid nulls
  - tweak asId to make statically evident that
    it can't return null
  - use single assignment for newContext initialization
  - explicitly check target[method] for null since flow
    doesn't appreciate that it's surrounded by try/catch
While we're at it, get tool support for consistent style from eslint:
  - indent 4 spaces. no tabs. no trailing space
    - one true brace style with the single-line exception
      - except for makeSaver, where emacs got confused
  - double quotes for strings
  - for unused args, use _x name style
    - prune rawSend dead code

relax some of eslint's defaults:
  - console logging is OK
  - reduce filesystem access given to makeSaver
    - ReadAccess, WriteAccess, SyncAccess give access to a specific path
    - just one FileSystem type from node.js
  - server.js: factor run() out of main()
  - use ReadAccess for capper.config, ./ssl/*
    - no need for readFileSync in sslOptions
  - refactor reviverToMaker, reviverToUIPath as
    as Reviver.toMaker and Reviver.sendUI
    - sendUI takes an express Response, which carries authority
      to open files by path name
      - never mind note about express being nearly powerless
  - log errors in showActor
use .done() to raise exceptions
  - let ezSaver() convenience routine require anything
    - use __dirname in makeReviver() to isolate from
      caller's directory
  - move io builders (fsReadAccess ,...) to saver.js
  - pass saver to run() rather than dbfile
  - pass crypto.randomBytes explicitly to makeUnique
  - use ezSaver convenience routine in tests
dckc added 6 commits March 5, 2016 20:00
consolidate routes using /* and req.params[0]
in flow: Jul 18, 2016: 84a1a24@zacharygolba Add Proxy to core declarations
somewhere before node 7.1, the --harmony-proxies option went away;
https://github.com/tvcutsem/harmony-reflect says node groks as of 6.0.
goal is to log Error traces
  - tighten up static types a bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant