@serwist/cli 8.4.4 → 9.0.0-preview.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/dist/app.d.ts +4 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/bin.d.ts +8 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +11 -88
- package/dist/lib/cleanup-stack-trace.d.ts +2 -0
- package/dist/lib/cleanup-stack-trace.d.ts.map +1 -0
- package/dist/lib/constants.d.ts +7 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/errors.d.ts +17 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/help-text.d.ts +2 -0
- package/dist/lib/help-text.d.ts.map +1 -0
- package/dist/lib/logger.d.ts +7 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/questions/ask-config-location.d.ts +2 -0
- package/dist/lib/questions/ask-config-location.d.ts.map +1 -0
- package/dist/lib/questions/ask-extensions-to-cache.d.ts +2 -0
- package/dist/lib/questions/ask-extensions-to-cache.d.ts.map +1 -0
- package/dist/lib/questions/ask-questions.d.ts +9 -0
- package/dist/lib/questions/ask-questions.d.ts.map +1 -0
- package/dist/lib/questions/ask-root-of-web-app.d.ts +2 -0
- package/dist/lib/questions/ask-root-of-web-app.d.ts.map +1 -0
- package/dist/lib/questions/ask-start_url-query-params.d.ts +2 -0
- package/dist/lib/questions/ask-start_url-query-params.d.ts.map +1 -0
- package/dist/lib/questions/ask-sw-dest.d.ts +2 -0
- package/dist/lib/questions/ask-sw-dest.d.ts.map +1 -0
- package/dist/lib/questions/ask-sw-src.d.ts +2 -0
- package/dist/lib/questions/ask-sw-src.d.ts.map +1 -0
- package/dist/lib/read-config.d.ts +3 -0
- package/dist/lib/read-config.d.ts.map +1 -0
- package/dist/lib/run-wizard.d.ts +2 -0
- package/dist/lib/run-wizard.d.ts.map +1 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +16 -7
package/dist/app.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AAIjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAyC/C,eAAO,MAAM,GAAG,WAAkB,WAAW,cAAc,CAAC,KAAG,QAAQ,IAAI,CAgG1E,CAAC"}
|
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C,KAAK,EAAE,WAAW,CAAC;IACnB,cAAc,EAAE,WAAW,CAAC;IAC5B,KAAK,EAAE,WAAW,CAAC;CACpB"}
|
package/dist/bin.js
CHANGED
|
@@ -15,13 +15,7 @@ import inquirer from 'inquirer';
|
|
|
15
15
|
import { glob } from 'glob';
|
|
16
16
|
import ora from 'ora';
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
Copyright 2018 Google LLC
|
|
20
|
-
|
|
21
|
-
Use of this source code is governed by an MIT-style
|
|
22
|
-
license that can be found in the LICENSE file or at
|
|
23
|
-
https://opensource.org/licenses/MIT.
|
|
24
|
-
*/ const constants = {
|
|
18
|
+
const constants = {
|
|
25
19
|
defaultConfigFile: "serwist.config.js",
|
|
26
20
|
ignoredDirectories: [
|
|
27
21
|
"node_modules"
|
|
@@ -69,13 +63,10 @@ const logger = {
|
|
|
69
63
|
};
|
|
70
64
|
|
|
71
65
|
const require = createRequire(import.meta.url);
|
|
72
|
-
// A really light wrapper on top of Node's require() to make it easier to stub
|
|
73
|
-
// out reading the configuration during tests.
|
|
74
66
|
function readConfig(configFile) {
|
|
75
67
|
return require(configFile);
|
|
76
68
|
}
|
|
77
69
|
|
|
78
|
-
// The key used for the question/answer.
|
|
79
70
|
const name$3 = "configLocation";
|
|
80
71
|
const configLocationQuestion = {
|
|
81
72
|
name: name$3,
|
|
@@ -83,31 +74,20 @@ const configLocationQuestion = {
|
|
|
83
74
|
type: "input",
|
|
84
75
|
default: constants.defaultConfigFile
|
|
85
76
|
};
|
|
86
|
-
|
|
87
|
-
* @returns The answers from inquirer.
|
|
88
|
-
*/ function askQuestion$5() {
|
|
77
|
+
function askQuestion$5() {
|
|
89
78
|
return inquirer.prompt([
|
|
90
79
|
configLocationQuestion
|
|
91
80
|
]);
|
|
92
81
|
}
|
|
93
82
|
async function askConfigLocation() {
|
|
94
83
|
const answers = await askQuestion$5();
|
|
95
|
-
// The value of the answer when the question type is 'input' is String
|
|
96
|
-
// and it has a default value, the casting is safe.
|
|
97
84
|
const configLocation = answers[name$3].trim();
|
|
98
85
|
assert(configLocation, errors["invalid-config-location"]);
|
|
99
86
|
return configLocation;
|
|
100
87
|
}
|
|
101
88
|
|
|
102
|
-
// The key used for the question/answer.
|
|
103
89
|
const name$2 = "globPatterns";
|
|
104
|
-
|
|
105
|
-
* @param globDirectory The directory used for the root of globbing.
|
|
106
|
-
* @returns The unique file extensions corresponding
|
|
107
|
-
* to all of the files under globDirectory.
|
|
108
|
-
*/ async function getAllFileExtensions(globDirectory) {
|
|
109
|
-
// Use a pattern to match any file that contains a '.', since that signifies
|
|
110
|
-
// the presence of a file extension.
|
|
90
|
+
async function getAllFileExtensions(globDirectory) {
|
|
111
91
|
const files = await glob("**/*.*", {
|
|
112
92
|
cwd: globDirectory,
|
|
113
93
|
nodir: true,
|
|
@@ -120,7 +100,6 @@ const name$2 = "globPatterns";
|
|
|
120
100
|
for (const file of files){
|
|
121
101
|
const extension = upath.extname(file);
|
|
122
102
|
if (extension) {
|
|
123
|
-
// Get rid of the leading . character.
|
|
124
103
|
extensions.add(extension.replace(/^\./, ""));
|
|
125
104
|
}
|
|
126
105
|
}
|
|
@@ -128,13 +107,7 @@ const name$2 = "globPatterns";
|
|
|
128
107
|
...extensions
|
|
129
108
|
];
|
|
130
109
|
}
|
|
131
|
-
|
|
132
|
-
* @param globDirectory The directory used for the root of globbing.
|
|
133
|
-
* @returns The answers from inquirer.
|
|
134
|
-
*/ async function askQuestion$4(globDirectory) {
|
|
135
|
-
// We need to get a list of extensions corresponding to files in the directory
|
|
136
|
-
// to use when asking the next question. That could potentially take some
|
|
137
|
-
// time, so we show a spinner and explanatory text.
|
|
110
|
+
async function askQuestion$4(globDirectory) {
|
|
138
111
|
const spinner = ora({
|
|
139
112
|
text: `Examining files in ${globDirectory}...`,
|
|
140
113
|
stream: process.stdout
|
|
@@ -154,12 +127,8 @@ const name$2 = "globPatterns";
|
|
|
154
127
|
}
|
|
155
128
|
async function askExtensionsToCache(globDirectory) {
|
|
156
129
|
const answers = await askQuestion$4(globDirectory);
|
|
157
|
-
// The return value is an array of strings with the selected values
|
|
158
|
-
// and there is a default, the casting is safe.
|
|
159
130
|
const extensions = answers[name$2];
|
|
160
131
|
assert(extensions.length > 0, errors["no-file-extensions-selected"]);
|
|
161
|
-
// glob isn't happy with a single option inside of a {} group, so use a
|
|
162
|
-
// pattern without a {} group when there's only one extension.
|
|
163
132
|
const extensionsPattern = extensions.length === 1 ? extensions[0] : `{${extensions.join(",")}}`;
|
|
164
133
|
return [
|
|
165
134
|
`**/*.${extensionsPattern}`
|
|
@@ -167,20 +136,14 @@ async function askExtensionsToCache(globDirectory) {
|
|
|
167
136
|
}
|
|
168
137
|
|
|
169
138
|
const ROOT_PROMPT = "Please enter the path to the root of your web app:";
|
|
170
|
-
// The keys used for the questions/answers.
|
|
171
139
|
const questionRootDirectory = "globDirectory";
|
|
172
140
|
const questionManualInput = "manualDirectoryInput";
|
|
173
|
-
|
|
174
|
-
* @returns The subdirectories of the current
|
|
175
|
-
* working directory, with hidden and ignored ones filtered out.
|
|
176
|
-
*/ async function getSubdirectories() {
|
|
141
|
+
async function getSubdirectories() {
|
|
177
142
|
return await glob("*/", {
|
|
178
143
|
ignore: constants.ignoredDirectories.map((directory)=>`${directory}/`)
|
|
179
144
|
});
|
|
180
145
|
}
|
|
181
|
-
|
|
182
|
-
* @returns The answers from inquirer.
|
|
183
|
-
*/ async function askQuestion$3() {
|
|
146
|
+
async function askQuestion$3() {
|
|
184
147
|
const subdirectories = await getSubdirectories();
|
|
185
148
|
if (subdirectories.length > 0) {
|
|
186
149
|
const manualEntryChoice = "Manually enter path";
|
|
@@ -222,12 +185,9 @@ async function askRootOfWebApp() {
|
|
|
222
185
|
}
|
|
223
186
|
|
|
224
187
|
const START_URL_QUERY_PARAMS_PROMPT = "Please enter the search parameter(s) that you would like to ignore (separated by comma):";
|
|
225
|
-
// The keys used for the questions/answers.
|
|
226
188
|
const question_ignoreURLParametersMatching = "ignoreURLParametersMatching";
|
|
227
189
|
const question_shouldAskForIgnoreURLParametersMatching = "shouldAskForIgnoreURLParametersMatching";
|
|
228
|
-
|
|
229
|
-
* @returns The answers from inquirer.
|
|
230
|
-
*/ async function askQuestion$2() {
|
|
190
|
+
async function askQuestion$2() {
|
|
231
191
|
return inquirer.prompt([
|
|
232
192
|
{
|
|
233
193
|
name: question_shouldAskForIgnoreURLParametersMatching,
|
|
@@ -257,12 +217,8 @@ async function askQueryParametersInStartUrl(defaultIgnoredSearchParameters = con
|
|
|
257
217
|
return defaultIgnoredSearchParameters.concat(ignoreSearchParameters.map((searchParam)=>new RegExp(`^${searchParam}`)));
|
|
258
218
|
}
|
|
259
219
|
|
|
260
|
-
// The key used for the question/answer.
|
|
261
220
|
const name$1 = "swDest";
|
|
262
|
-
|
|
263
|
-
* @param defaultDir
|
|
264
|
-
* @returns The answers from inquirer.
|
|
265
|
-
*/ function askQuestion$1(defaultDir) {
|
|
221
|
+
function askQuestion$1(defaultDir) {
|
|
266
222
|
return inquirer.prompt([
|
|
267
223
|
{
|
|
268
224
|
name: name$1,
|
|
@@ -274,18 +230,13 @@ const name$1 = "swDest";
|
|
|
274
230
|
}
|
|
275
231
|
async function askSWDest(defaultDir = ".") {
|
|
276
232
|
const answers = await askQuestion$1(defaultDir);
|
|
277
|
-
// When prompt type is input the return type is string
|
|
278
|
-
// casting is safe
|
|
279
233
|
const swDest = answers[name$1].trim();
|
|
280
234
|
assert(swDest, errors["invalid-sw-dest"]);
|
|
281
235
|
return swDest;
|
|
282
236
|
}
|
|
283
237
|
|
|
284
|
-
// The key used for the question/answer.
|
|
285
238
|
const name = "swSrc";
|
|
286
|
-
|
|
287
|
-
* @returns The answers from inquirer.
|
|
288
|
-
*/ function askQuestion() {
|
|
239
|
+
function askQuestion() {
|
|
289
240
|
return inquirer.prompt([
|
|
290
241
|
{
|
|
291
242
|
name,
|
|
@@ -298,7 +249,6 @@ const name = "swSrc";
|
|
|
298
249
|
}
|
|
299
250
|
async function askSWSrc() {
|
|
300
251
|
const answers = await askQuestion();
|
|
301
|
-
// When prompt type is input the return is string or null
|
|
302
252
|
return answers[name] ? answers[name].trim() : null;
|
|
303
253
|
}
|
|
304
254
|
|
|
@@ -309,7 +259,6 @@ async function askQuestions(options = {}) {
|
|
|
309
259
|
const swSrc = isInjectManifest ? await askSWSrc() : undefined;
|
|
310
260
|
const swDest = await askSWDest(globDirectory);
|
|
311
261
|
const configLocation = await askConfigLocation();
|
|
312
|
-
// See https://github.com/GoogleChrome/workbox/issues/2985
|
|
313
262
|
const ignoreURLParametersMatching = isInjectManifest ? undefined : await askQueryParametersInStartUrl();
|
|
314
263
|
const config = {
|
|
315
264
|
globDirectory,
|
|
@@ -330,7 +279,6 @@ async function askQuestions(options = {}) {
|
|
|
330
279
|
|
|
331
280
|
async function runWizard(options = {}) {
|
|
332
281
|
const { configLocation, config } = await askQuestions(options);
|
|
333
|
-
// See https://github.com/GoogleChrome/workbox/issues/2796
|
|
334
282
|
const contents = `module.exports = ${stringifyObject(config)};`;
|
|
335
283
|
await fse.writeFile(configLocation, contents);
|
|
336
284
|
logger.log(`To build your service worker, run
|
|
@@ -343,11 +291,7 @@ as part of a build process. See https://goo.gl/fdTQBf for details.`);
|
|
|
343
291
|
to ${configLocation}. See ${configDocsURL} for details.`);
|
|
344
292
|
}
|
|
345
293
|
|
|
346
|
-
|
|
347
|
-
* Runs the specified build command with the provided configuration.
|
|
348
|
-
*
|
|
349
|
-
* @param options
|
|
350
|
-
*/ async function runBuildCommand({ config, watch }) {
|
|
294
|
+
async function runBuildCommand({ config, watch }) {
|
|
351
295
|
const { count, filePaths, size, warnings } = await injectManifest(config);
|
|
352
296
|
for (const warning of warnings){
|
|
353
297
|
logger.warn(warning);
|
|
@@ -364,9 +308,7 @@ as part of a build process. See https://goo.gl/fdTQBf for details.`);
|
|
|
364
308
|
}
|
|
365
309
|
}
|
|
366
310
|
const app = async (params)=>{
|
|
367
|
-
// This should not be a user-visible error, unless meow() messes something up.
|
|
368
311
|
assert(params && Array.isArray(params.input), errors["missing-input"]);
|
|
369
|
-
// Default to showing the help message if there's no command provided.
|
|
370
312
|
const [command = "help", option] = params.input;
|
|
371
313
|
switch(command){
|
|
372
314
|
case "wizard":
|
|
@@ -396,7 +338,6 @@ const app = async (params)=>{
|
|
|
396
338
|
throw logger.error(errors["invalid-config-location"]);
|
|
397
339
|
}
|
|
398
340
|
logger.log(`Using configuration from ${configPath}.`);
|
|
399
|
-
// Determine whether we're in --watch mode, or one-off mode.
|
|
400
341
|
if (params?.flags?.watch) {
|
|
401
342
|
const options = {
|
|
402
343
|
ignoreInitial: true
|
|
@@ -432,7 +373,6 @@ const app = async (params)=>{
|
|
|
432
373
|
}
|
|
433
374
|
break;
|
|
434
375
|
}
|
|
435
|
-
// biome-ignore lint/suspicious/noFallthroughSwitchClause: Biome.js doesn't handle functions that return `never`... yet.
|
|
436
376
|
case "help":
|
|
437
377
|
{
|
|
438
378
|
params.showHelp();
|
|
@@ -444,16 +384,6 @@ const app = async (params)=>{
|
|
|
444
384
|
}
|
|
445
385
|
};
|
|
446
386
|
|
|
447
|
-
/*
|
|
448
|
-
Copyright 2018 Google LLC
|
|
449
|
-
|
|
450
|
-
Use of this source code is governed by an MIT-style
|
|
451
|
-
license that can be found in the LICENSE file or at
|
|
452
|
-
https://opensource.org/licenses/MIT.
|
|
453
|
-
*/ // Helper to parse out less relevant info from an Error's stack trace.
|
|
454
|
-
// Removes the initial portion, since that's obtained from error.message.
|
|
455
|
-
// Removes every stack frame earlier than the last instance of moduleName,
|
|
456
|
-
// since that's just frames related to the Node runtime/loader.
|
|
457
387
|
function cleanupStackTrace(error, moduleName) {
|
|
458
388
|
if (!error.stack) {
|
|
459
389
|
return "";
|
|
@@ -472,13 +402,7 @@ function cleanupStackTrace(error, moduleName) {
|
|
|
472
402
|
return frames.slice(startFrame, lastFrame + 1).join("\n");
|
|
473
403
|
}
|
|
474
404
|
|
|
475
|
-
|
|
476
|
-
Copyright 2018 Google LLC
|
|
477
|
-
|
|
478
|
-
Use of this source code is governed by an MIT-style
|
|
479
|
-
license that can be found in the LICENSE file or at
|
|
480
|
-
https://opensource.org/licenses/MIT.
|
|
481
|
-
*/ const helpText = `Usage:
|
|
405
|
+
const helpText = `Usage:
|
|
482
406
|
$ serwist <command> [options]
|
|
483
407
|
|
|
484
408
|
Commands:
|
|
@@ -526,7 +450,6 @@ void (async ()=>{
|
|
|
526
450
|
await app(params);
|
|
527
451
|
} catch (error) {
|
|
528
452
|
if (error instanceof Error) {
|
|
529
|
-
// Show the full error and stack trace if we're run with --debug.
|
|
530
453
|
if (params.flags.debug) {
|
|
531
454
|
if (error.stack) {
|
|
532
455
|
logger.error(`\n${error.stack}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup-stack-trace.d.ts","sourceRoot":"","sources":["../../src/lib/cleanup-stack-trace.ts"],"names":[],"mappings":"AAYA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAiB1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const errors: {
|
|
2
|
+
"missing-input": string;
|
|
3
|
+
"missing-dest-dir-param": string;
|
|
4
|
+
"invalid-common-js-module": string;
|
|
5
|
+
"config-validation-failed": string;
|
|
6
|
+
"serwist-build-runtime-error": string;
|
|
7
|
+
"unknown-command": string;
|
|
8
|
+
"no-file-extensions-found": string;
|
|
9
|
+
"no-file-extensions-selected": string;
|
|
10
|
+
"invalid-sw-dest": string;
|
|
11
|
+
"glob-directory-invalid": string;
|
|
12
|
+
"invalid-config-location": string;
|
|
13
|
+
"sw-src-missing-injection-point": string;
|
|
14
|
+
"no-search-parameters-supplied": string;
|
|
15
|
+
"invalid-search-parameters-supplied": string;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAwBlB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const helpText = "Usage:\n$ serwist <command> [options]\n\nCommands:\n wizard [--injectManifest]\n Runs the configuration wizard, which will generate a\n config file based on answers to questions.\n\n injectManifest [<path/to/config.js>] [--watch]\n Takes an existing service worker file and creates a\n copy of it with a precache manifest \"injected\" into\n it. The precache manifest is generated based on the\n options in the config file (defaults to serwist.config.js).\n If --watch is provided, the CLI will stay running, and will\n rebuild the service worker each time a file in the precache\n manifest changes.\n See https://bit.ly/wb-injectManifest\n\n copyLibraries <path/to/parent/dir>\n Makes a local copy of all of the Workbox libraries inside\n a version directory at the location specified. This is intended\n for developers using injectManifest who prefer using local,\n rather than CDN hosted, libraries.\n\nConfig file:\n In 'injectManifest' mode, the config file should be a\n JavaScript file, in CommonJS module format.\n By default, a config file named serwist.config.js in the current\n directory is assumed, but this can be overridden.\n\nExamples:\n $ serwist wizard\n $ serwist wizard --injectManifest\n $ serwist injectManifest configs/serwist-dev-config.js\n $ serwist copyLibraries build/\n";
|
|
2
|
+
//# sourceMappingURL=help-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-text.d.ts","sourceRoot":"","sources":["../../src/lib/help-text.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,QAAQ,60CAmCpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM;qBACA,MAAM,EAAE,KAAG,IAAI;mBACjB,MAAM,EAAE,KAAG,IAAI;oBACd,MAAM,EAAE,KAAG,IAAI;qBACd,MAAM,EAAE,KAAG,IAAI;CACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-config-location.d.ts","sourceRoot":"","sources":["../../../src/lib/questions/ask-config-location.ts"],"names":[],"mappings":"AAgCA,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CASzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-extensions-to-cache.d.ts","sourceRoot":"","sources":["../../../src/lib/questions/ask-extensions-to-cache.ts"],"names":[],"mappings":"AA8EA,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAWnF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-questions.d.ts","sourceRoot":"","sources":["../../../src/lib/questions/ask-questions.ts"],"names":[],"mappings":"AAeA,UAAU,wBAAwB;IAChC,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAsB,YAAY,CAAC,OAAO,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA6BlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-root-of-web-app.d.ts","sourceRoot":"","sources":["../../../src/lib/questions/ask-root-of-web-app.ts"],"names":[],"mappings":"AAqEA,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAWvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-start_url-query-params.d.ts","sourceRoot":"","sources":["../../../src/lib/questions/ask-start_url-query-params.ts"],"names":[],"mappings":"AA8CA,wBAAsB,4BAA4B,CAChD,8BAA8B,GAAE,MAAM,EAA0C,GAC/E,OAAO,CAAC,MAAM,EAAE,CAAC,CAkBnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-sw-dest.d.ts","sourceRoot":"","sources":["../../../src/lib/questions/ask-sw-dest.ts"],"names":[],"mappings":"AAiCA,wBAAsB,SAAS,CAAC,UAAU,SAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-sw-src.d.ts","sourceRoot":"","sources":["../../../src/lib/questions/ask-sw-src.ts"],"names":[],"mappings":"AA8BA,wBAAsB,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-config.d.ts","sourceRoot":"","sources":["../../src/lib/read-config.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAM5D,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB,CAEpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-wizard.d.ts","sourceRoot":"","sources":["../../src/lib/run-wizard.ts"],"names":[],"mappings":"AAeA,wBAAsB,SAAS,CAAC,OAAO,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB3D"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Flag } from "meow";
|
|
2
|
+
export type StringFlag = Flag<"string", string> | Flag<"string", string[], true>;
|
|
3
|
+
export type BooleanFlag = Flag<"boolean", boolean> | Flag<"boolean", boolean[], true>;
|
|
4
|
+
export type NumberFlag = Flag<"number", number> | Flag<"number", number[], true>;
|
|
5
|
+
export type AnyFlag = StringFlag | BooleanFlag | NumberFlag;
|
|
6
|
+
export type AnyFlags = Record<string, AnyFlag>;
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;AACjF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;AACtF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;AACjF,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-preview.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "@serwist/cli is the command line interface for Serwist.",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"cli"
|
|
17
17
|
],
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=18.0.0"
|
|
20
20
|
},
|
|
21
21
|
"author": "Google's Web DevRel Team, Serwist's Team",
|
|
22
22
|
"license": "MIT",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"common-tags": "1.8.2",
|
|
33
33
|
"fs-extra": "11.2.0",
|
|
34
34
|
"glob": "10.3.10",
|
|
35
|
-
"inquirer": "9.2.
|
|
36
|
-
"meow": "13.
|
|
35
|
+
"inquirer": "9.2.13",
|
|
36
|
+
"meow": "13.1.0",
|
|
37
37
|
"ora": "8.0.1",
|
|
38
38
|
"pretty-bytes": "6.1.1",
|
|
39
39
|
"stringify-object": "5.0.0",
|
|
40
40
|
"upath": "2.0.1",
|
|
41
41
|
"update-notifier": "7.0.0",
|
|
42
|
-
"@serwist/build": "
|
|
42
|
+
"@serwist/build": "9.0.0-preview.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/common-tags": "1.8.4",
|
|
@@ -47,8 +47,17 @@
|
|
|
47
47
|
"@types/inquirer": "9.0.7",
|
|
48
48
|
"@types/stringify-object": "4.0.5",
|
|
49
49
|
"@types/update-notifier": "6.0.8",
|
|
50
|
-
"rollup": "4.9.
|
|
51
|
-
"
|
|
50
|
+
"rollup": "4.9.6",
|
|
51
|
+
"typescript": "5.4.0-dev.20240203",
|
|
52
|
+
"@serwist/constants": "9.0.0-preview.1"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"typescript": ">=5.0.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"typescript": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
52
61
|
},
|
|
53
62
|
"scripts": {
|
|
54
63
|
"build": "rimraf dist && cross-env NODE_ENV=production rollup --config rollup.config.js",
|