@zerolith/cli 0.1.0-alpha.5 → 0.1.0-alpha.6
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 +2 -2
- package/assets.d.ts +260 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -7
- package/src/index.ts +2 -2
- package/zerolith.schema.json +8 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zerolith/cli
|
|
2
2
|
|
|
3
|
-
The `zerolith` command line from npm: `new`, `dev`, which serves a project with its packages resolved from `node_modules` and forwards its API to a backend, `serve`, `build`, which bundles and minifies an application with Rolldown compiled into the binary, `preview`, `importmap`, and `doctor`. The binary is written in Rust; this package carries none itself and depends optionally on one package per platform, so npm installs only the binary that matches the machine.
|
|
3
|
+
The `zerolith` command line from npm: `new`, `dev`, which serves a project with its packages resolved from `node_modules` and forwards its API to a backend, `serve`, `build`, which bundles and minifies an application with Rolldown compiled into the binary, `preview`, `skill`, which writes the zerolith skill for coding agents into a project, `importmap`, and `doctor`. The binary is written in Rust; this package carries none itself and depends optionally on one package per platform, so npm installs only the binary that matches the machine.
|
|
4
4
|
|
|
5
5
|
Install it once and start a project. `new` asks a few questions, each with a default, writes the starter, and installs its dependencies, this package among them:
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ npm install --save-dev @zerolith/cli@alpha
|
|
|
20
20
|
npx zerolith doctor .
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Prebuilt binaries exist for Linux (glibc), macOS, and Windows on x64 and arm64. On any other system, or on Alpine and other musl distributions, install the crate with `cargo install zerolith` and point `ZEROLITH_BINARY_PATH` at the binary; the shim runs that instead. Installing with `--omit=optional` leaves the binary out, and the shim says which platform package to install.
|
|
23
|
+
Prebuilt binaries exist for Linux (glibc), macOS, and Windows on x64 and arm64. On any other system, or on Alpine and other musl distributions, install the crate with `cargo install zerolith --locked` and point `ZEROLITH_BINARY_PATH` at the binary; the shim runs that instead. Installing with `--omit=optional` leaves the binary out, and the shim says which platform package to install.
|
|
24
24
|
|
|
25
25
|
The commands are documented in the [command line guide](https://molexxxx.github.io/zerolith/guide/command-line/).
|
|
26
26
|
|
package/assets.d.ts
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types of the files `zerolith dev` and `zerolith build` turn into
|
|
3
|
+
* values when a module imports them, for a project's `env.d.ts` to
|
|
4
|
+
* reference with `/// <reference types="@zerolith/cli/assets" />`. An
|
|
5
|
+
* image, a font, media, or a document gives its URL, `?url` gives any
|
|
6
|
+
* file's URL, and `?raw` gives a file's text. A project on Vite takes the
|
|
7
|
+
* same types from `vite/client` instead, since both declare these modules.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** A file imported for its text, as in `import notes from "./notes.md?raw"`. */
|
|
11
|
+
declare module "*?raw"
|
|
12
|
+
{
|
|
13
|
+
const text: string;
|
|
14
|
+
export default text;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Any file imported for its URL, as in `import url from "./worker.js?url"`. */
|
|
18
|
+
declare module "*?url"
|
|
19
|
+
{
|
|
20
|
+
const url: string;
|
|
21
|
+
export default url;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A `.apng` file, imported for its URL. */
|
|
25
|
+
declare module "*.apng"
|
|
26
|
+
{
|
|
27
|
+
const url: string;
|
|
28
|
+
export default url;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** A `.bmp` file, imported for its URL. */
|
|
32
|
+
declare module "*.bmp"
|
|
33
|
+
{
|
|
34
|
+
const url: string;
|
|
35
|
+
export default url;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** A `.png` file, imported for its URL. */
|
|
39
|
+
declare module "*.png"
|
|
40
|
+
{
|
|
41
|
+
const url: string;
|
|
42
|
+
export default url;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** A `.jpg` file, imported for its URL. */
|
|
46
|
+
declare module "*.jpg"
|
|
47
|
+
{
|
|
48
|
+
const url: string;
|
|
49
|
+
export default url;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** A `.jpeg` file, imported for its URL. */
|
|
53
|
+
declare module "*.jpeg"
|
|
54
|
+
{
|
|
55
|
+
const url: string;
|
|
56
|
+
export default url;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** A `.jfif` file, imported for its URL. */
|
|
60
|
+
declare module "*.jfif"
|
|
61
|
+
{
|
|
62
|
+
const url: string;
|
|
63
|
+
export default url;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** A `.pjpeg` file, imported for its URL. */
|
|
67
|
+
declare module "*.pjpeg"
|
|
68
|
+
{
|
|
69
|
+
const url: string;
|
|
70
|
+
export default url;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** A `.pjp` file, imported for its URL. */
|
|
74
|
+
declare module "*.pjp"
|
|
75
|
+
{
|
|
76
|
+
const url: string;
|
|
77
|
+
export default url;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** A `.gif` file, imported for its URL. */
|
|
81
|
+
declare module "*.gif"
|
|
82
|
+
{
|
|
83
|
+
const url: string;
|
|
84
|
+
export default url;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** A `.svg` file, imported for its URL. */
|
|
88
|
+
declare module "*.svg"
|
|
89
|
+
{
|
|
90
|
+
const url: string;
|
|
91
|
+
export default url;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** A `.ico` file, imported for its URL. */
|
|
95
|
+
declare module "*.ico"
|
|
96
|
+
{
|
|
97
|
+
const url: string;
|
|
98
|
+
export default url;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** A `.webp` file, imported for its URL. */
|
|
102
|
+
declare module "*.webp"
|
|
103
|
+
{
|
|
104
|
+
const url: string;
|
|
105
|
+
export default url;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** A `.avif` file, imported for its URL. */
|
|
109
|
+
declare module "*.avif"
|
|
110
|
+
{
|
|
111
|
+
const url: string;
|
|
112
|
+
export default url;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** A `.cur` file, imported for its URL. */
|
|
116
|
+
declare module "*.cur"
|
|
117
|
+
{
|
|
118
|
+
const url: string;
|
|
119
|
+
export default url;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** A `.jxl` file, imported for its URL. */
|
|
123
|
+
declare module "*.jxl"
|
|
124
|
+
{
|
|
125
|
+
const url: string;
|
|
126
|
+
export default url;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** A `.mp4` file, imported for its URL. */
|
|
130
|
+
declare module "*.mp4"
|
|
131
|
+
{
|
|
132
|
+
const url: string;
|
|
133
|
+
export default url;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** A `.webm` file, imported for its URL. */
|
|
137
|
+
declare module "*.webm"
|
|
138
|
+
{
|
|
139
|
+
const url: string;
|
|
140
|
+
export default url;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** A `.ogg` file, imported for its URL. */
|
|
144
|
+
declare module "*.ogg"
|
|
145
|
+
{
|
|
146
|
+
const url: string;
|
|
147
|
+
export default url;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** A `.mp3` file, imported for its URL. */
|
|
151
|
+
declare module "*.mp3"
|
|
152
|
+
{
|
|
153
|
+
const url: string;
|
|
154
|
+
export default url;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** A `.wav` file, imported for its URL. */
|
|
158
|
+
declare module "*.wav"
|
|
159
|
+
{
|
|
160
|
+
const url: string;
|
|
161
|
+
export default url;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** A `.flac` file, imported for its URL. */
|
|
165
|
+
declare module "*.flac"
|
|
166
|
+
{
|
|
167
|
+
const url: string;
|
|
168
|
+
export default url;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** A `.aac` file, imported for its URL. */
|
|
172
|
+
declare module "*.aac"
|
|
173
|
+
{
|
|
174
|
+
const url: string;
|
|
175
|
+
export default url;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** A `.opus` file, imported for its URL. */
|
|
179
|
+
declare module "*.opus"
|
|
180
|
+
{
|
|
181
|
+
const url: string;
|
|
182
|
+
export default url;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** A `.mov` file, imported for its URL. */
|
|
186
|
+
declare module "*.mov"
|
|
187
|
+
{
|
|
188
|
+
const url: string;
|
|
189
|
+
export default url;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** A `.m4a` file, imported for its URL. */
|
|
193
|
+
declare module "*.m4a"
|
|
194
|
+
{
|
|
195
|
+
const url: string;
|
|
196
|
+
export default url;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** A `.vtt` file, imported for its URL. */
|
|
200
|
+
declare module "*.vtt"
|
|
201
|
+
{
|
|
202
|
+
const url: string;
|
|
203
|
+
export default url;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** A `.woff` file, imported for its URL. */
|
|
207
|
+
declare module "*.woff"
|
|
208
|
+
{
|
|
209
|
+
const url: string;
|
|
210
|
+
export default url;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** A `.woff2` file, imported for its URL. */
|
|
214
|
+
declare module "*.woff2"
|
|
215
|
+
{
|
|
216
|
+
const url: string;
|
|
217
|
+
export default url;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** A `.eot` file, imported for its URL. */
|
|
221
|
+
declare module "*.eot"
|
|
222
|
+
{
|
|
223
|
+
const url: string;
|
|
224
|
+
export default url;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** A `.ttf` file, imported for its URL. */
|
|
228
|
+
declare module "*.ttf"
|
|
229
|
+
{
|
|
230
|
+
const url: string;
|
|
231
|
+
export default url;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** A `.otf` file, imported for its URL. */
|
|
235
|
+
declare module "*.otf"
|
|
236
|
+
{
|
|
237
|
+
const url: string;
|
|
238
|
+
export default url;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** A `.webmanifest` file, imported for its URL. */
|
|
242
|
+
declare module "*.webmanifest"
|
|
243
|
+
{
|
|
244
|
+
const url: string;
|
|
245
|
+
export default url;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** A `.pdf` file, imported for its URL. */
|
|
249
|
+
declare module "*.pdf"
|
|
250
|
+
{
|
|
251
|
+
const url: string;
|
|
252
|
+
export default url;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** A `.txt` file, imported for its URL. */
|
|
256
|
+
declare module "*.txt"
|
|
257
|
+
{
|
|
258
|
+
const url: string;
|
|
259
|
+
export default url;
|
|
260
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/** The platform packages, keyed by `${platform}-${arch}` as Node reports them. */
|
|
8
8
|
export declare const PLATFORMS: Readonly<Record<string, string>>;
|
|
9
9
|
/** The route around a missing binary, appended to every error. */
|
|
10
|
-
export declare const CARGO_HINT = "Alternatively install the crate with `cargo install zerolith` and point ZEROLITH_BINARY_PATH at the binary.";
|
|
10
|
+
export declare const CARGO_HINT = "Alternatively install the crate with `cargo install zerolith --locked` and point ZEROLITH_BINARY_PATH at the binary.";
|
|
11
11
|
/** What locating needs from the host. */
|
|
12
12
|
export interface Host {
|
|
13
13
|
readonly platform: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kFAAkF;AAClF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOtD,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kFAAkF;AAClF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOtD,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,UAAU,yHACmG,CAAC;AAE3H,yCAAyC;AACzC,MAAM,WAAW,IAAI;IAEjB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6GAA6G;IAC7G,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CACnD;AAED,4CAA4C;AAC5C,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGlF;AAED,oFAAoF;AACpF,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAsBzC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export const PLATFORMS = {
|
|
|
14
14
|
"win32-x64": "@zerolith/cli-win32-x64",
|
|
15
15
|
};
|
|
16
16
|
/** The route around a missing binary, appended to every error. */
|
|
17
|
-
export const CARGO_HINT = "Alternatively install the crate with `cargo install zerolith` and point ZEROLITH_BINARY_PATH at the binary.";
|
|
17
|
+
export const CARGO_HINT = "Alternatively install the crate with `cargo install zerolith --locked` and point ZEROLITH_BINARY_PATH at the binary.";
|
|
18
18
|
/** The binary's file name on a platform. */
|
|
19
19
|
export function binaryName(platform) {
|
|
20
20
|
return platform === "win32" ? "zerolith.exe" : "zerolith";
|
|
@@ -37,7 +37,7 @@ export function locate(host) {
|
|
|
37
37
|
return host.resolve(`${name}/${binaryName(host.platform)}`);
|
|
38
38
|
}
|
|
39
39
|
catch {
|
|
40
|
-
throw new Error(`${name}, the package that carries the zerolith binary for this platform, is not installed. Install @zerolith/cli without --omit=optional (its optional dependencies hold the binaries), or install ${name} directly. ${CARGO_HINT}`);
|
|
40
|
+
throw new Error(`${name}, the package that carries the zerolith binary for this platform, is not installed. Install @zerolith/cli without --omit=optional (its optional dependencies hold the binaries), or install ${name} directly. When npx ran this from a copy it cached before ${name} reached the registry, that copy lacks it: delete the _npx folder in npm's cache, which \`npm config get cache\` prints, and run the command again. ${CARGO_HINT}`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kFAAkF;AAClF,MAAM,CAAC,MAAM,SAAS,GAAqC;IACvD,cAAc,EAAE,4BAA4B;IAC5C,YAAY,EAAE,0BAA0B;IACxC,aAAa,EAAE,2BAA2B;IAC1C,WAAW,EAAE,yBAAyB;IACtC,aAAa,EAAE,2BAA2B;IAC1C,WAAW,EAAE,yBAAyB;CACzC,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,UAAU,GACnB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kFAAkF;AAClF,MAAM,CAAC,MAAM,SAAS,GAAqC;IACvD,cAAc,EAAE,4BAA4B;IAC5C,YAAY,EAAE,0BAA0B;IACxC,aAAa,EAAE,2BAA2B;IAC1C,WAAW,EAAE,yBAAyB;IACtC,aAAa,EAAE,2BAA2B;IAC1C,WAAW,EAAE,yBAAyB;CACzC,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,UAAU,GACnB,sHAAsH,CAAC;AAe3H,4CAA4C;AAC5C,MAAM,UAAU,UAAU,CAAC,QAAgB;IAEvC,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC;AAC9D,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,IAAY;IAE1D,OAAO,SAAS,CAAC,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,MAAM,CAAC,IAAU;IAE7B,IAAI,IAAI,CAAC,QAAQ,EACjB,CAAC;QACG,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IACD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACvD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,EACnC,CAAC;QACG,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACzE,MAAM,IAAI,KAAK,CAAC,uCAAuC,GAAG,KAAK,UAAU,EAAE,CAAC,CAAC;IACjF,CAAC;IACD,IACA,CAAC;QACG,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,MACA,CAAC;QACG,MAAM,IAAI,KAAK,CACX,GAAG,IAAI,+LAA+L,IAAI,6DAA6D,IAAI,uJAAuJ,UAAU,EAAE,CACjb,CAAC;IACN,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerolith/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"description": "The zerolith command line from npm: a production build that bundles and minifies, a dev server that serves TypeScript and JSX without a build step, import maps with integrity hashes, project checks, and the scaffold, as a prebuilt native binary for the platform npm installs on",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "molexxxx",
|
|
@@ -28,12 +28,16 @@
|
|
|
28
28
|
"zerolith": "dist/bin.js"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
|
+
"./assets": {
|
|
32
|
+
"types": "./assets.d.ts"
|
|
33
|
+
},
|
|
31
34
|
"./package.json": "./package.json",
|
|
32
35
|
"./zerolith.schema.json": "./zerolith.schema.json"
|
|
33
36
|
},
|
|
34
37
|
"files": [
|
|
35
38
|
"dist",
|
|
36
39
|
"src",
|
|
40
|
+
"assets.d.ts",
|
|
37
41
|
"zerolith.schema.json",
|
|
38
42
|
"LICENSE",
|
|
39
43
|
"README.md"
|
|
@@ -42,11 +46,11 @@
|
|
|
42
46
|
"build": "tsc -p tsconfig.build.json"
|
|
43
47
|
},
|
|
44
48
|
"optionalDependencies": {
|
|
45
|
-
"@zerolith/cli-darwin-arm64": "0.1.0-alpha.
|
|
46
|
-
"@zerolith/cli-darwin-x64": "0.1.0-alpha.
|
|
47
|
-
"@zerolith/cli-linux-arm64": "0.1.0-alpha.
|
|
48
|
-
"@zerolith/cli-linux-x64": "0.1.0-alpha.
|
|
49
|
-
"@zerolith/cli-win32-arm64": "0.1.0-alpha.
|
|
50
|
-
"@zerolith/cli-win32-x64": "0.1.0-alpha.
|
|
49
|
+
"@zerolith/cli-darwin-arm64": "0.1.0-alpha.6",
|
|
50
|
+
"@zerolith/cli-darwin-x64": "0.1.0-alpha.6",
|
|
51
|
+
"@zerolith/cli-linux-arm64": "0.1.0-alpha.6",
|
|
52
|
+
"@zerolith/cli-linux-x64": "0.1.0-alpha.6",
|
|
53
|
+
"@zerolith/cli-win32-arm64": "0.1.0-alpha.6",
|
|
54
|
+
"@zerolith/cli-win32-x64": "0.1.0-alpha.6"
|
|
51
55
|
}
|
|
52
56
|
}
|
package/src/index.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const PLATFORMS: Readonly<Record<string, string>> = {
|
|
|
17
17
|
|
|
18
18
|
/** The route around a missing binary, appended to every error. */
|
|
19
19
|
export const CARGO_HINT =
|
|
20
|
-
"Alternatively install the crate with `cargo install zerolith` and point ZEROLITH_BINARY_PATH at the binary.";
|
|
20
|
+
"Alternatively install the crate with `cargo install zerolith --locked` and point ZEROLITH_BINARY_PATH at the binary.";
|
|
21
21
|
|
|
22
22
|
/** What locating needs from the host. */
|
|
23
23
|
export interface Host
|
|
@@ -64,7 +64,7 @@ export function locate(host: Host): string
|
|
|
64
64
|
catch
|
|
65
65
|
{
|
|
66
66
|
throw new Error(
|
|
67
|
-
`${name}, the package that carries the zerolith binary for this platform, is not installed. Install @zerolith/cli without --omit=optional (its optional dependencies hold the binaries), or install ${name} directly. ${CARGO_HINT}`,
|
|
67
|
+
`${name}, the package that carries the zerolith binary for this platform, is not installed. Install @zerolith/cli without --omit=optional (its optional dependencies hold the binaries), or install ${name} directly. When npx ran this from a copy it cached before ${name} reached the registry, that copy lacks it: delete the _npx folder in npm's cache, which \`npm config get cache\` prints, and run the command again. ${CARGO_HINT}`,
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
}
|
package/zerolith.schema.json
CHANGED
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"description": "The public path the application is served under, such as /app/, for dev, build, and preview alike. ./ makes every URL the build writes relative to the page.",
|
|
16
16
|
"examples": ["/", "/app/", "./"]
|
|
17
17
|
},
|
|
18
|
+
"allowedHosts": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"description": "Host names dev, serve, and preview answer besides localhost and IP addresses, such as a name in the hosts file or a tunnel's. A request for any other host gets 403, so another site cannot read the project by pointing its own name at the loopback address (DNS rebinding). An entry starting with a dot allows every name under it.",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"examples": [["myapp.test"], [".example.dev"]]
|
|
25
|
+
},
|
|
18
26
|
"proxy": {
|
|
19
27
|
"type": "object",
|
|
20
28
|
"description": "Paths dev, serve, and preview forward to a backend, by the path prefix they start with, such as \"/api\": \"http://127.0.0.1:3000\".",
|