Migrate from lib/universal/sqlpagectl.ts to lib/std/surveilrctl.ts for the following functionality:
[x] Create new lib/std/surveilrctl.ts - it's now located in lib/std/surveilrctl.ts because it's opinionated and tied to the surveilrStandard Library.
[x] Introduce --load argument to dev command to allow reloading of package.sql.ts or other additional files whenever any watched files change. sqlpagectl.ts behavior was to just reload the modified file instead of the package.sql.ts file which meant that devs had to forcefully change the package.sql.ts to reload it.
[x] When lib/std/surveilrctl.ts is started with dev command it should default to:
watching the current directory and all its *.sql and *.sql.ts files
watching the ../../std directory and subdirectories in case Standard Library is being modified
reloading the package.sql.ts into resource-surveillance.sqlite.db if any *.sql or *.sql.ts files are modified and saved
[x] Update all README.md to remove references to sqlpage.ts.
[x] Replace sqlite3 with surveilr shell by default
[x] Delete lib/universal/sqlpagectl.ts so it's no longer used.
With this done, all that's required in any pattern or service is:
$ cd lib/pattern/fhir-explorer
$ ../../std/surveilrctl.ts dev
Without any parameters surveilrctl.ts dev will now watch the current directory and all its *.sql and *.sql.ts files and reload the package.sql.ts into resource-surveillance.sqlite.db if any *.sql or *.sql.ts files are modified and saved.
Doing the above will no longer require any arguments to be passed in but of course it can be used as follows:
-p, --port <port> - Port to run web server on (Default: 9000)
-w, --watch <path> - watch path(s)
-R, --watch-recurse - Watch subdirectories too (Default: false)
-l, --load <path> - Load these whenever watched files modified (instead of watched files
themselves), defaults to `package.sql.ts`
--external-sqlpage <sqlpage-binary> - Run standalone SQLPage instead of surveilr embedded
--external-sqlite3 <sqlite3-binary> - Run standalone sqlite3 instead of surveilr embedded Rusqlite
--restart-web-server-on-change - Restart the web server on each change, needed for surveir & SQLite (Default: true)
--show-modified-urls-on-change - After reloading sqlpage_files, show the recently modified URLs (Default: false)
Migrate from
lib/universal/sqlpagectl.ts
tolib/std/surveilrctl.ts
for the following functionality:lib/std/surveilrctl.ts
- it's now located inlib/std/surveilrctl.ts
because it's opinionated and tied to thesurveilr
Standard Library.--load
argument todev
command to allow reloading ofpackage.sql.ts
or other additional files whenever any watched files change.sqlpagectl.ts
behavior was to just reload the modified file instead of thepackage.sql.ts
file which meant that devs had to forcefully change thepackage.sql.ts
to reload it.lib/std/surveilrctl.ts
is started withdev
command it should default to:*.sql
and*.sql.ts
files../../std
directory and subdirectories in case Standard Library is being modifiedpackage.sql.ts
intoresource-surveillance.sqlite.db
if any*.sql
or*.sql.ts
files are modified and savedsqlpage.ts
.sqlite3
withsurveilr shell
by defaultlib/universal/sqlpagectl.ts
so it's no longer used.With this done, all that's required in any
pattern
orservice
is:Without any parameters
surveilrctl.ts dev
will now watch the current directory and all its*.sql
and*.sql.ts
files and reload thepackage.sql.ts
intoresource-surveillance.sqlite.db
if any*.sql
or*.sql.ts
files are modified and saved.Doing the above will no longer require any arguments to be passed in but of course it can be used as follows: