@thoughtpivot/flight 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Flight
2
2
 
3
- Flight is a modern, high-performance web application server built on Node.js, designed for building scalable, component-driven applications. It represents the evolution of the [Avian](https://github.com/ispyhumanfly/avian) component application server, incorporating modern best practices and improved developer experience.
3
+ Flight is a modern, high-performance web application server built on Node.js, designed for building scalable, component-driven applications. It is the successor to [Avian](https://github.com/ispyhumanfly/avian): originally created by ThoughtPivot, handed to FlyPaper Technologies, LLC, where Avian matured—Flight builds on those advancements with modern tooling and developer experience.
4
4
 
5
5
  ## Overview
6
6
 
@@ -29,6 +29,10 @@ yarn add @thoughtpivot/flight
29
29
 
30
30
  Previously published on npm as `@spytech/flight`; switch your dependency to `@thoughtpivot/flight`.
31
31
 
32
+ ### Downstream apps (tsx / patch-package)
33
+
34
+ From **v1.0.8** onward, Flight normalizes `require('yargs/yargs')` when loaders such as **tsx** expose it as `{ default: factory }` instead of the factory. If you only added **patch-package** for that workaround, upgrade `@thoughtpivot/flight`, delete `patches/@thoughtpivot+flight+*.patch`, and remove any **postinstall** hook that existed solely to apply it.
35
+
32
36
  ## Quick Start
33
37
 
34
38
  1. Create a new project directory and initialize:
@@ -259,8 +263,10 @@ Contributions are welcome! Please feel free to submit a Pull Request.
259
263
 
260
264
  ## Acknowledgments
261
265
 
262
- Flight is built upon the solid foundation laid by the [Avian](https://github.com/ispyhumanfly/avian) framework, created by FlyPaper Technologies, LLC. We're grateful for their pioneering work in component-driven architecture.
266
+ Flight succeeds the [Avian](https://github.com/ispyhumanfly/avian) framework. Avian began at ThoughtPivot and was later handed to FlyPaper Technologies, LLC, where it grew into the platform many teams relied on. Flight is born from that lineage—the ideas and hardening FlyPaper contributed to Avian—carried forward as ThoughtPivot’s next-generation server.
267
+
268
+ We’re grateful to FlyPaper Technologies for stewarding Avian and advancing component-driven architecture.
263
269
 
264
270
  ## ThoughtPivot
265
271
 
266
- Flight is a [ThoughtPivot](https://github.com/thoughtpivot) technology: developed and maintained as part of the ThoughtPivot organization and ecosystem.
272
+ Today Flight is an official ThoughtPivot technology: developed and maintained by the [ThoughtPivot](https://github.com/thoughtpivot) organization as part of its ecosystem.
package/dist/flight.js CHANGED
@@ -21,7 +21,9 @@ const path_1 = __importDefault(require("path"));
21
21
  const koa_ratelimit_1 = __importDefault(require("koa-ratelimit"));
22
22
  const koa_static_1 = __importDefault(require("koa-static"));
23
23
  const koa_session_1 = __importDefault(require("koa-session"));
24
- const argv = require('yargs/yargs')(process.argv.slice(2)).argv;
24
+ const _yargs = require('yargs/yargs');
25
+ const yargsFactory = typeof _yargs === 'function' ? _yargs : _yargs.default;
26
+ const argv = yargsFactory(process.argv.slice(2)).argv;
25
27
  // Set default session duration (24 hours in milliseconds)
26
28
  const DEFAULT_SESSION_DURATION = 86400000; // 24 hours in milliseconds
27
29
  // Get session duration from environment variable or command line argument
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtpivot/flight",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A web server designed for running full stack, component based applications at enterprise scale.",
5
5
  "main": "src/flight.ts",
6
6
  "publishConfig": {
package/src/flight.ts CHANGED
@@ -19,7 +19,23 @@ import ratelimit from 'koa-ratelimit'
19
19
  import serve from 'koa-static'
20
20
  import session from 'koa-session'
21
21
 
22
- const argv = require('yargs/yargs')(process.argv.slice(2)).argv
22
+ /** CLI argv shape after Flight applies defaults (see block below). */
23
+ interface FlightArgv {
24
+ session_duration?: number
25
+ app_home?: string
26
+ app_key?: string
27
+ app_secret?: string
28
+ port?: number | string
29
+ payload_limit?: string
30
+ disable_vite?: boolean
31
+ mode?: string
32
+ }
33
+
34
+ // tsx (and similar loaders) may expose require('yargs/yargs') as { default: factory } instead of factory.
35
+ type YargsFactoryFn = (args: string[]) => { argv: FlightArgv }
36
+ const _yargs = require('yargs/yargs') as YargsFactoryFn | { default: YargsFactoryFn }
37
+ const yargsFactory: YargsFactoryFn = typeof _yargs === 'function' ? _yargs : _yargs.default
38
+ const argv = yargsFactory(process.argv.slice(2)).argv
23
39
 
24
40
  // Set default session duration (24 hours in milliseconds)
25
41
  const DEFAULT_SESSION_DURATION = 86400000 // 24 hours in milliseconds