@serwist/cli 8.4.4 → 9.0.0-preview.0

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.
Files changed (35) hide show
  1. package/dist/app.d.ts +4 -0
  2. package/dist/app.d.ts.map +1 -0
  3. package/dist/bin.d.ts +8 -0
  4. package/dist/bin.d.ts.map +1 -0
  5. package/dist/lib/cleanup-stack-trace.d.ts +2 -0
  6. package/dist/lib/cleanup-stack-trace.d.ts.map +1 -0
  7. package/dist/lib/constants.d.ts +7 -0
  8. package/dist/lib/constants.d.ts.map +1 -0
  9. package/dist/lib/errors.d.ts +17 -0
  10. package/dist/lib/errors.d.ts.map +1 -0
  11. package/dist/lib/help-text.d.ts +2 -0
  12. package/dist/lib/help-text.d.ts.map +1 -0
  13. package/dist/lib/logger.d.ts +7 -0
  14. package/dist/lib/logger.d.ts.map +1 -0
  15. package/dist/lib/questions/ask-config-location.d.ts +2 -0
  16. package/dist/lib/questions/ask-config-location.d.ts.map +1 -0
  17. package/dist/lib/questions/ask-extensions-to-cache.d.ts +2 -0
  18. package/dist/lib/questions/ask-extensions-to-cache.d.ts.map +1 -0
  19. package/dist/lib/questions/ask-questions.d.ts +9 -0
  20. package/dist/lib/questions/ask-questions.d.ts.map +1 -0
  21. package/dist/lib/questions/ask-root-of-web-app.d.ts +2 -0
  22. package/dist/lib/questions/ask-root-of-web-app.d.ts.map +1 -0
  23. package/dist/lib/questions/ask-start_url-query-params.d.ts +2 -0
  24. package/dist/lib/questions/ask-start_url-query-params.d.ts.map +1 -0
  25. package/dist/lib/questions/ask-sw-dest.d.ts +2 -0
  26. package/dist/lib/questions/ask-sw-dest.d.ts.map +1 -0
  27. package/dist/lib/questions/ask-sw-src.d.ts +2 -0
  28. package/dist/lib/questions/ask-sw-src.d.ts.map +1 -0
  29. package/dist/lib/read-config.d.ts +3 -0
  30. package/dist/lib/read-config.d.ts.map +1 -0
  31. package/dist/lib/run-wizard.d.ts +2 -0
  32. package/dist/lib/run-wizard.d.ts.map +1 -0
  33. package/dist/types.d.ts +7 -0
  34. package/dist/types.d.ts.map +1 -0
  35. package/package.json +16 -7
package/dist/app.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { Result as MeowResult } from "meow";
2
+ import type { SupportedFlags } from "./bin.js";
3
+ export declare const app: (params: MeowResult<SupportedFlags>) => Promise<void>;
4
+ //# sourceMappingURL=app.d.ts.map
@@ -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,8 @@
1
+ #! /usr/bin/env node
2
+ import type { AnyFlags, BooleanFlag } from "./types.js";
3
+ export interface SupportedFlags extends AnyFlags {
4
+ debug: BooleanFlag;
5
+ injectManifest: BooleanFlag;
6
+ watch: BooleanFlag;
7
+ }
8
+ //# sourceMappingURL=bin.d.ts.map
@@ -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"}
@@ -0,0 +1,2 @@
1
+ export declare function cleanupStackTrace(error: Error, moduleName: string): string;
2
+ //# sourceMappingURL=cleanup-stack-trace.d.ts.map
@@ -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,7 @@
1
+ export declare const constants: {
2
+ defaultConfigFile: string;
3
+ ignoredDirectories: string[];
4
+ ignoredFileExtensions: string[];
5
+ ignoreURLParametersMatching: RegExp[];
6
+ };
7
+ //# sourceMappingURL=constants.d.ts.map
@@ -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,7 @@
1
+ export declare const logger: {
2
+ debug: (...args: string[]) => void;
3
+ log: (...args: string[]) => void;
4
+ warn: (...args: string[]) => void;
5
+ error: (...args: string[]) => void;
6
+ };
7
+ //# sourceMappingURL=logger.d.ts.map
@@ -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,2 @@
1
+ export declare function askConfigLocation(): Promise<string>;
2
+ //# sourceMappingURL=ask-config-location.d.ts.map
@@ -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,2 @@
1
+ export declare function askExtensionsToCache(globDirectory: string): Promise<string[]>;
2
+ //# sourceMappingURL=ask-extensions-to-cache.d.ts.map
@@ -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,9 @@
1
+ interface ConfigWithConfigLocation {
2
+ config: {
3
+ [key: string]: any;
4
+ };
5
+ configLocation: string;
6
+ }
7
+ export declare function askQuestions(options?: {}): Promise<ConfigWithConfigLocation>;
8
+ export {};
9
+ //# sourceMappingURL=ask-questions.d.ts.map
@@ -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,2 @@
1
+ export declare function askRootOfWebApp(): Promise<string>;
2
+ //# sourceMappingURL=ask-root-of-web-app.d.ts.map
@@ -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,2 @@
1
+ export declare function askQueryParametersInStartUrl(defaultIgnoredSearchParameters?: RegExp[]): Promise<RegExp[]>;
2
+ //# sourceMappingURL=ask-start_url-query-params.d.ts.map
@@ -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,2 @@
1
+ export declare function askSWDest(defaultDir?: string): Promise<string>;
2
+ //# sourceMappingURL=ask-sw-dest.d.ts.map
@@ -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,2 @@
1
+ export declare function askSWSrc(): Promise<string | null>;
2
+ //# sourceMappingURL=ask-sw-src.d.ts.map
@@ -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,3 @@
1
+ import type { InjectManifestOptions } from "@serwist/build";
2
+ export declare function readConfig(configFile: string): InjectManifestOptions;
3
+ //# sourceMappingURL=read-config.d.ts.map
@@ -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,2 @@
1
+ export declare function runWizard(options?: {}): Promise<void>;
2
+ //# sourceMappingURL=run-wizard.d.ts.map
@@ -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"}
@@ -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": "8.4.4",
3
+ "version": "9.0.0-preview.0",
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": ">=16.0.0"
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.12",
36
- "meow": "13.0.0",
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": "8.4.4"
42
+ "@serwist/build": "9.0.0-preview.0"
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.1",
51
- "@serwist/constants": "8.4.4"
50
+ "rollup": "4.9.6",
51
+ "typescript": "5.4.0-dev.20240203",
52
+ "@serwist/constants": "9.0.0-preview.0"
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",