@maligator/cli 0.1.0-alpha.3 → 0.1.0-alpha.30
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 +43 -92
- package/THIRD_PARTY_NOTICES.md +6357 -0
- package/application-api.d.ts +23 -0
- package/index.d.ts +94 -14
- package/package.json +13 -3
- package/platform-api.d.ts +6 -0
- package/process-api.d.ts +281 -0
- package/test-api.d.ts +230 -0
- package/workers-api.d.ts +445 -0
- package/workers-host-api.d.ts +135 -0
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ maligator run -- first-argument "two words"
|
|
|
38
38
|
|
|
39
39
|
`maligator init` creates `maligator.build.ts`. If it cannot find an existing entry
|
|
40
40
|
point, it also creates `src/index.ts`. `doctor` checks the native build toolchain,
|
|
41
|
-
`build` produces a development executable, and `run`
|
|
41
|
+
`build` produces a development executable, and `run` compiles a development image and executes it while
|
|
42
42
|
forwarding everything after `--` to the application.
|
|
43
43
|
|
|
44
44
|
Useful commands:
|
|
@@ -50,99 +50,51 @@ maligator init
|
|
|
50
50
|
maligator doctor [--verbose] [--target rust-triple]
|
|
51
51
|
maligator build [entry] [--production] [--artifact directory] [--target rust-triple] [--config path]
|
|
52
52
|
maligator run [entry] [--config path] [-- args...]
|
|
53
|
+
maligator dev [entry] [--config path] [-- args...]
|
|
54
|
+
maligator test [path ...] [--run name] [--shuffle [seed]] [--repeat count] [--bail]
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
Run commands from the project root. Maligator does not search parent directories
|
|
56
58
|
for configuration.
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
maligator
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
intl: { enabled: false },
|
|
91
|
-
},
|
|
92
|
-
surface: {
|
|
93
|
-
webPlatform: false,
|
|
94
|
-
node: false,
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
All fields are optional. Maligator excludes optional engine and host surfaces unless
|
|
100
|
-
the configuration requests them. See the
|
|
101
|
-
[full configuration reference](https://github.com/dirkdev98/maligator#configuration)
|
|
102
|
-
for assets, Intl features, Node compatibility, web-platform support, and target
|
|
103
|
-
selection.
|
|
104
|
-
|
|
105
|
-
## TypeScript
|
|
106
|
-
|
|
107
|
-
The package includes declarations for `maligator.build.ts` and Maligator's runtime
|
|
108
|
-
globals. Keeping the generated build file inside your TypeScript project makes the
|
|
109
|
-
types available automatically:
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
const path = mal.assets.materialize("templates", {
|
|
113
|
-
baseDirectory: ".cache/my-application",
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const server = Mal.serve({
|
|
117
|
-
hostname: "127.0.0.1",
|
|
118
|
-
port: 3000,
|
|
119
|
-
async fetch(request) {
|
|
120
|
-
return new Response(`Hello from ${request.url}`);
|
|
121
|
-
},
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
console.log(path, server.port);
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
`mal` is present when `surface.maligator` is enabled. `Mal` and `Mal.serve` are
|
|
128
|
-
present when `surface.webPlatform` is enabled. The declarations describe both
|
|
129
|
-
optional surfaces, while `maligator.build.ts` controls which globals exist in the
|
|
130
|
-
compiled application.
|
|
131
|
-
|
|
132
|
-
If your `tsconfig.json` excludes `maligator.build.ts`, load the declarations
|
|
133
|
-
explicitly:
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"compilerOptions": {
|
|
138
|
-
"types": ["@maligator/cli"]
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
```
|
|
60
|
+
`run` and `dev` use compile-time-specialized runtimes embedded in the platform
|
|
61
|
+
package for locked or mutable primordials, configured assets, the Web and Node
|
|
62
|
+
surfaces, and Realm support when Intl is disabled. Those profiles do not need a local
|
|
63
|
+
native toolchain. `dev` retains compiler identities between edits and restarts a fresh
|
|
64
|
+
application VM after every successful rebuild. Build failures keep the watcher alive
|
|
65
|
+
for recovery on the next edit.
|
|
66
|
+
|
|
67
|
+
## Documentation
|
|
68
|
+
|
|
69
|
+
Use the [guides](https://maligator.ddv.tools/guides) for application workflows and
|
|
70
|
+
the [API reference](https://maligator.ddv.tools/api) for exact contracts.
|
|
71
|
+
|
|
72
|
+
- [Getting started](https://maligator.ddv.tools/guides/getting-started)
|
|
73
|
+
- [Development](https://maligator.ddv.tools/guides/development) and
|
|
74
|
+
[TypeScript](https://maligator.ddv.tools/guides/typescript)
|
|
75
|
+
- [Application testing](https://maligator.ddv.tools/guides/testing)
|
|
76
|
+
- [Workers](https://maligator.ddv.tools/guides/workers)
|
|
77
|
+
- [Build configuration](https://maligator.ddv.tools/guides/build-configuration)
|
|
78
|
+
- [Embedded files](https://maligator.ddv.tools/guides/assets) and
|
|
79
|
+
[HTTP](https://maligator.ddv.tools/guides/http)
|
|
80
|
+
- [Production](https://maligator.ddv.tools/guides/production) and
|
|
81
|
+
[profiling](https://maligator.ddv.tools/guides/profiling)
|
|
82
|
+
- [CLI commands and flags](https://maligator.ddv.tools/api/cli)
|
|
83
|
+
|
|
84
|
+
The package ships types for configuration, runtime globals, and public `maligator:`
|
|
85
|
+
modules. Include `@maligator/cli` in `compilerOptions.types` when your TypeScript
|
|
86
|
+
project excludes the build file. Declarations do not enable optional runtime surfaces;
|
|
87
|
+
choose those in `maligator.build.ts`.
|
|
88
|
+
|
|
89
|
+
Every page has a Markdown counterpart. The
|
|
90
|
+
[public symbol index](https://maligator.ddv.tools/reference.json) provides signatures,
|
|
91
|
+
defaults, availability, and direct links.
|
|
142
92
|
|
|
143
93
|
## Build toolchain
|
|
144
94
|
|
|
145
|
-
|
|
95
|
+
`maligator test` and supported `maligator run` profiles use the development runtime
|
|
96
|
+
embedded in the platform CLI and do not require a native toolchain. Native `build`
|
|
97
|
+
commands and development runs using Intl require:
|
|
146
98
|
|
|
147
99
|
- A C23 compiler and archive tool: Apple clang, clang 19 or newer, or GCC 15 or
|
|
148
100
|
newer
|
|
@@ -152,15 +104,14 @@ The compiler CLI is prebuilt, but compiling an application requires:
|
|
|
152
104
|
On macOS, install Apple command-line tools with `xcode-select --install`. On Linux,
|
|
153
105
|
install a recent compiler and set `CC` and `CXX` when it is not your system default.
|
|
154
106
|
Run `maligator doctor --verbose` for resolved tool paths, versions, capabilities,
|
|
155
|
-
and installation hints.
|
|
156
|
-
[native
|
|
157
|
-
|
|
107
|
+
and installation hints.
|
|
108
|
+
[Set up native builds](https://maligator.ddv.tools/guides/native-toolchain) has the
|
|
109
|
+
full requirements and cross-compilation instructions.
|
|
158
110
|
|
|
159
111
|
## Alpha support
|
|
160
112
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
release notes before upgrading on another host. Windows is not supported.
|
|
113
|
+
Native packages cover macOS and glibc-based Linux on arm64 and x64. Windows is not
|
|
114
|
+
supported.
|
|
164
115
|
|
|
165
116
|
There is no source-build fallback for the CLI package. The alpha binaries are
|
|
166
117
|
unsigned, and macOS binaries are not notarized. APIs, configuration, and supported
|