@orion-js/core 4.3.3 → 4.4.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Orionjs Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ export declare function build(options: {
2
+ output?: string;
3
+ }): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function checkTs(): Promise<void>;
@@ -0,0 +1,3 @@
1
+ export default function (options: {
2
+ output?: string;
3
+ }): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function checkTs(): void;
@@ -0,0 +1 @@
1
+ export default function (): Promise<void>;
@@ -0,0 +1,4 @@
1
+ export default function ({ name, kit }: {
2
+ kit: any;
3
+ name: any;
4
+ }): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const devBuildPath = "./.orion/build/index.js";
@@ -0,0 +1,2 @@
1
+ import { RunnerOptions } from './runner';
2
+ export default function (options: RunnerOptions, command: any): Promise<void>;
@@ -0,0 +1,5 @@
1
+ import { RunnerOptions } from './index';
2
+ export declare function getArgs(options: RunnerOptions, command: any): {
3
+ startCommand: string;
4
+ args: any[];
5
+ };
@@ -0,0 +1,13 @@
1
+ export interface RunnerOptions {
2
+ shell: boolean;
3
+ clean: boolean;
4
+ node: boolean;
5
+ repl: boolean;
6
+ typecheck: boolean;
7
+ }
8
+ export interface Runner {
9
+ start: () => void;
10
+ restart: () => void;
11
+ stop: () => void;
12
+ }
13
+ export declare function getRunner(options: RunnerOptions, command: any): Runner;
@@ -0,0 +1,2 @@
1
+ import { RunnerOptions } from './index';
2
+ export declare function startProcess(options: RunnerOptions, command: any): import("child_process").ChildProcess;
@@ -0,0 +1 @@
1
+ export default function cleanDirectory(directory?: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function ensureConfigComplies(configPath: string): void;
@@ -0,0 +1 @@
1
+ export declare function getConfigPath(): string;
@@ -0,0 +1,2 @@
1
+ import { Runner, RunnerOptions } from '../runner';
2
+ export default function watchAndCompile(runner: Runner, options: RunnerOptions): Promise<void>;
@@ -0,0 +1,25 @@
1
+ import chokidar from 'chokidar';
2
+ import * as esbuild from 'esbuild';
3
+ import type { Runner, RunnerOptions } from '../runner';
4
+ /**
5
+ * Bundle application code once and rebuild it incrementally on edits.
6
+ *
7
+ * Running the bundle avoids making Node transform every TypeScript module on
8
+ * every restart. Dependencies remain external so their native Node behavior
9
+ * stays identical to a production build.
10
+ */
11
+ export declare function watchAndBundle(runner: Runner, options: RunnerOptions, onFilesChanged?: () => void): Promise<{
12
+ context: esbuild.BuildContext<{
13
+ entryPoints: string[];
14
+ outfile: string;
15
+ tsconfig: string;
16
+ format: "esm";
17
+ platform: "node";
18
+ bundle: true;
19
+ target: string;
20
+ sourcemap: true;
21
+ packages: "external";
22
+ plugins: esbuild.Plugin[];
23
+ }>;
24
+ watcher: chokidar.FSWatcher;
25
+ }>;
@@ -0,0 +1,11 @@
1
+ import type { Runner } from '../runner';
2
+ /**
3
+ * Create a serialized, on-demand TypeScript checker.
4
+ *
5
+ * `tsc --watch` creates a second filesystem watcher for the entire project and
6
+ * can stall when the operating system is already watching many worktrees. A
7
+ * one-off check is both faster and sufficient because the bundle watcher calls
8
+ * this function after every source change. Changes received during an active
9
+ * check collapse into one fresh check, so stale diagnostics never stop the app.
10
+ */
11
+ export declare function watchAndTypecheck(runner: Runner): () => void;
@@ -0,0 +1,2 @@
1
+ import { Runner } from '../runner';
2
+ export declare const watchEnvFile: (runner: Runner) => Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const ensureDirectory: (filePath: any) => boolean;
2
+ export default ensureDirectory;
@@ -0,0 +1 @@
1
+ export default function (command: any): Promise<unknown>;
@@ -0,0 +1 @@
1
+ export default function readFile(filePath: string): string;
@@ -0,0 +1 @@
1
+ export default function (path: string, content: string): Promise<void>;