create-ortha-app 0.4.0 → 0.4.2
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/dist/lib/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/lib/ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAiBH,eAAO,MAAM,IAAI,SAJC,MAAM,KAAG,MAIG,CAAC;AAC/B,eAAO,MAAM,GAAG,SALE,MAAM,KAAG,MAKE,CAAC;AAC9B,eAAO,MAAM,GAAG,SANE,MAAM,KAAG,MAMG,CAAC;AAC/B,eAAO,MAAM,KAAK,SAPA,MAAM,KAAG,MAOK,CAAC;AACjC,eAAO,MAAM,MAAM,SARD,MAAM,KAAG,MAQM,CAAC;AAClC,eAAO,MAAM,IAAI,SATC,MAAM,KAAG,MASI,CAAC;AAChC,eAAO,MAAM,OAAO,SAVF,MAAM,KAAG,MAUO,CAAC;AAEnC,oEAAoE;AACpE,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1C;AA+BD,6BAA6B;AAC7B,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAW5D;AAED,gCAAgC;AAChC,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAG3C;AAED,+BAA+B;AAC/B,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED,6BAA6B;AAC7B,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,6BAA6B;AAC7B,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED,sCAAsC;AACtC,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAExC;AAED,kDAAkD;AAClD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;GAKG;AACH,wBAAsB,WAAW,CAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAuE/B"}
|
package/dist/lib/ui.js
CHANGED
|
@@ -139,6 +139,14 @@ function interactive() {
|
|
|
139
139
|
* restores it, because a process that exits while still in raw mode leaves the
|
|
140
140
|
* user's terminal with no echo, and they have to type `reset` blind to get it
|
|
141
141
|
* back.
|
|
142
|
+
*
|
|
143
|
+
* Listeners rather than `for await (const chunk of stdin)`, because an answered
|
|
144
|
+
* picker leaves that loop early — and a Node stream iterator destroys its
|
|
145
|
+
* stream when the loop is left early. The first picker would answer fine and
|
|
146
|
+
* take stdin down with it, and the next one would paint its rows and then
|
|
147
|
+
* reject with `AbortError: The operation was aborted` before the user could
|
|
148
|
+
* press a key. The wizard asks four of these in a row, so the loop has to leave
|
|
149
|
+
* stdin readable for the next one.
|
|
142
150
|
*/
|
|
143
151
|
async function readKeys(handle) {
|
|
144
152
|
const { stdin } = process;
|
|
@@ -147,12 +155,34 @@ async function readKeys(handle) {
|
|
|
147
155
|
stdin.resume();
|
|
148
156
|
stdin.setEncoding('utf8');
|
|
149
157
|
try {
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
return await new Promise((resolve, reject) => {
|
|
159
|
+
const stop = () => {
|
|
160
|
+
stdin.off('data', onData);
|
|
161
|
+
stdin.off('end', onEnd);
|
|
162
|
+
stdin.off('error', onError);
|
|
163
|
+
};
|
|
164
|
+
const onData = (chunk) => {
|
|
165
|
+
const outcome = handle(String(chunk));
|
|
166
|
+
if (outcome === 'continue')
|
|
167
|
+
return;
|
|
168
|
+
stop();
|
|
169
|
+
resolve(outcome);
|
|
170
|
+
};
|
|
171
|
+
// Only reachable when stdin is not a terminal, since Ctrl-D in raw
|
|
172
|
+
// mode is a keypress rather than end-of-input. Treated as a cancel:
|
|
173
|
+
// there is no one left to answer with.
|
|
174
|
+
const onEnd = () => {
|
|
175
|
+
stop();
|
|
176
|
+
resolve('cancel');
|
|
177
|
+
};
|
|
178
|
+
const onError = (cause) => {
|
|
179
|
+
stop();
|
|
180
|
+
reject(cause);
|
|
181
|
+
};
|
|
182
|
+
stdin.on('data', onData);
|
|
183
|
+
stdin.on('end', onEnd);
|
|
184
|
+
stdin.on('error', onError);
|
|
185
|
+
});
|
|
156
186
|
}
|
|
157
187
|
finally {
|
|
158
188
|
stdin.setRawMode(wasRaw === true);
|
package/package.json
CHANGED
|
@@ -8,8 +8,15 @@
|
|
|
8
8
|
/* Tailwind excludes `node_modules` from its automatic content detection, so
|
|
9
9
|
without this line none of the classes inside the Ortha packages are seen and
|
|
10
10
|
the whole admin renders unstyled. The published packages ship compiled JS
|
|
11
|
-
with the class strings intact, which is what this scans.
|
|
12
|
-
|
|
11
|
+
with the class strings intact, which is what this scans.
|
|
12
|
+
|
|
13
|
+
This MUST stay a bare directory path. A `@source` that contains a glob is
|
|
14
|
+
still filtered through the ignore rules — `node_modules` among them — so a
|
|
15
|
+
pattern reaching into each package's `dist` matches nothing, and the
|
|
16
|
+
stylesheet quietly comes out ~15 kB with no component utilities in it. Only
|
|
17
|
+
a literal directory is registered as an explicit content root that bypasses
|
|
18
|
+
those rules. */
|
|
19
|
+
@source "../../../node_modules/@orthacms";
|
|
13
20
|
|
|
14
21
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
15
22
|
|