Comments (4)
The minimal approach was to just expose the tools we already have for (i) migrations, and (ii) starting a default server, using npm's bin functionality, so:
npx govflow-migrate
npx govflow-start
See https://github.com/govflow/govflow/tree/5fe9deca10e18eafa4623c4813992b6b0bda3312#getting-started and 5fe9dec
Kind of hard to verify properly without transpiring the typescript and releasing a version, so will close this issue only when I have also done that.
from govflow.
Nope.
I'm not sure I 100% tracked down the issue - current problem in 0.0.18-alpha
may just be because of missing file extension - but in any event I now see even fixing that won't work as I them need to make the file executable, but, I don't know how to do that on the relevant output file after typescript transpile to javascript (I could force it when we build on CI, but feels wrong).
I guess there is a reason why using a tool like https://github.com/oclif/oclif which is built around typescript will be the best choice here.
Meanwhile, until we dive into using a fully fledged framework for typescript CLIs, the solution is that codebases with govflow as a dependency, that need to run migrations, can write a file like the following and call it as the migration script:
# from https://github.com/govflow/govflow/blob/main/src/cli/migrate.ts
# save as my-migrator.ts
import { initConfig } from '../config';
import { initMigrator } from '../db/engine';
import type { DatabaseEngine } from '../types';
(async () => {
const config = await initConfig();
const { database, settings } = config;
const migrator = initMigrator(database as DatabaseEngine, settings?.databaseExtraMigrationPaths as string);
migrator.runAsCLI();
})();
And run like:
ts-node my-migrator.ts
from govflow.
Should be resolved in 1318330 but I will verify with a build from NPM (did verify locally with global install)
from govflow.
Confirmed working with 0.0.19-alpha
. CLI commands listed in https://github.com/govflow/govflow#getting-started
from govflow.
Related Issues (20)
- Add explicit close date for service requests HOT 1
- Typing repositories and injecting their dependencies HOT 1
- Communication templates missing from published package HOT 1
- Error building projects using Govflow as dependency: migrate cli source code not found HOT 3
- Allow editing of a service for a service request HOT 1
- Repositories and Services
- Limit access to backoffice API by user permissions
- Explicitly create log of events related to each request HOT 1
- Support request submissions by email HOT 1
- Different types of "services" or "request types" HOT 1
- Add user-readable Ticket ID field HOT 3
- Workflow enhancement - assignment and "ownership" logic to users via departments HOT 19
- Support email as an inbound channel HOT 3
- Update display of referenced objects in audit strings HOT 1
- Pluggable auth
- SMS communication HOT 3
- Two-way SMS implementation HOT 1
- Tracking SMS subscription status HOT 1
- Possible enhancements for message disambiguation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from govflow.