@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 +21 -0
- package/dist/build/build.d.ts +3 -0
- package/dist/build/checkTs.d.ts +1 -0
- package/dist/build/index.d.ts +3 -0
- package/dist/check/checkTs.d.ts +1 -0
- package/dist/check/index.d.ts +1 -0
- package/dist/create/index.d.ts +4 -0
- package/dist/dev/devBuildPath.d.ts +1 -0
- package/dist/dev/index.d.ts +2 -0
- package/dist/dev/runner/getArgs.d.ts +5 -0
- package/dist/dev/runner/index.d.ts +13 -0
- package/dist/dev/runner/startProcess.d.ts +2 -0
- package/dist/dev/watchAndCompile/cleanDirectory.d.ts +1 -0
- package/dist/dev/watchAndCompile/ensureConfigComplies.d.ts +1 -0
- package/dist/dev/watchAndCompile/getConfigPath.d.ts +1 -0
- package/dist/dev/watchAndCompile/index.d.ts +2 -0
- package/dist/dev/watchAndCompile/watchAndBundle.d.ts +25 -0
- package/dist/dev/watchAndCompile/watchAndTypecheck.d.ts +11 -0
- package/dist/dev/watchAndCompile/writeEnvFile.d.ts +2 -0
- package/dist/handleErrors.d.ts +1 -0
- package/dist/helpers/ensureDirectory.d.ts +2 -0
- package/dist/helpers/execute.d.ts +1 -0
- package/dist/helpers/getFileContents.d.ts +1 -0
- package/dist/helpers/writeFile.d.ts +1 -0
- package/dist/index.cjs +258 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +246 -120
- package/dist/index.js.map +1 -1
- package/dist/info.d.ts +1 -0
- package/dist/prod/index.d.ts +5 -0
- package/dist/prod/runProd.d.ts +2 -0
- package/dist/repl/index.d.ts +5 -0
- package/dist/version.d.ts +2 -0
- package/package.json +12 -13
- package/dist/index.d.cts +0 -1
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 @@
|
|
|
1
|
+
export declare function checkTs(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkTs(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const devBuildPath = "./.orion/build/index.js";
|
|
@@ -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 @@
|
|
|
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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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>;
|