zappie 0.1.5 → 0.1.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # zappie
2
2
 
3
+ ## 0.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - e04ce68: `zappie verify --start <path>` opens that route as the menu instead of `/`. It needs `@zappie/verify` 0.3.0 or later, and fails when the installed verify ignores it.
8
+
9
+ ## 0.1.6
10
+
11
+ ### Patch Changes
12
+
13
+ - 9b25eb7: The packages now live in zappie/storefront-packages, and each package's repository, homepage and issues links point there. This release is the first one published from that repository.
14
+
3
15
  ## 0.1.5
4
16
 
5
17
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -91,6 +91,12 @@ function parseOnly(value) {
91
91
  }
92
92
  return [...ids];
93
93
  }
94
+ function parseStart(value) {
95
+ if (!/^\/(?!\/)[^\\]*$/.test(value)) {
96
+ throw new CliError("Pass a route such as /menu for --start.");
97
+ }
98
+ return value;
99
+ }
94
100
  function parsePort(value) {
95
101
  const port = Number(value);
96
102
  if (!/^\d+$/.test(value) || port < 1 || port > 65535) {
@@ -119,6 +125,7 @@ Options:
119
125
  --history Include Git history in the secret scan
120
126
  --suite <name> Run the standard or extended verify suite
121
127
  --only <checks> Run only these verify checks, such as V01,V04 or quick
128
+ --start <path> Verify from this route instead of /
122
129
  --report <file> Save your verification report to a file
123
130
  --no-build Verify the project's existing build without building it again
124
131
  --port <number> Serve verify's local preview on this port. Default: a free port
@@ -162,6 +169,7 @@ function parseCommand(argv) {
162
169
  key: { type: "string" },
163
170
  store: { type: "string" },
164
171
  only: { type: "string" },
172
+ start: { type: "string" },
165
173
  "no-build": { type: "boolean" },
166
174
  port: { type: "string" },
167
175
  artifacts: { type: "string" },
@@ -288,6 +296,7 @@ ${usage}`);
288
296
  key: typeof values.key === "string" ? values.key : void 0,
289
297
  store: typeof values.store === "string" ? values.store : void 0,
290
298
  only: typeof values.only === "string" ? parseOnly(values.only) : void 0,
299
+ startPath: typeof values.start === "string" ? parseStart(values.start) : void 0,
291
300
  build,
292
301
  port,
293
302
  artifacts: typeof values.artifacts === "string" ? values.artifacts : void 0,
@@ -1813,12 +1822,19 @@ async function runProjectVerify(options) {
1813
1822
  ...options.url ? { url: options.url } : {},
1814
1823
  ...options.store ? { store: options.store } : {},
1815
1824
  ...options.only ? { only: options.only } : {},
1825
+ ...options.startPath ? { startPath: options.startPath } : {},
1816
1826
  ...options.build === false ? { build: false } : {},
1817
1827
  ...options.port ? { port: options.port } : {},
1818
1828
  ...options.artifacts ? { artifactsDir: path15.resolve(options.cwd, options.artifacts) } : {},
1819
1829
  ...options.runner ? { runner: options.runner } : {},
1820
1830
  ...options.signal ? { signal: options.signal } : {}
1821
1831
  });
1832
+ const ran = result.environment?.startPath;
1833
+ if (options.startPath && ran !== options.startPath) {
1834
+ throw new CliError(
1835
+ "Your @zappie/verify ignored --start. Update it to 0.3.0 or later."
1836
+ );
1837
+ }
1822
1838
  if (options.report) {
1823
1839
  const file = path15.resolve(options.cwd, options.report);
1824
1840
  await mkdir(path15.dirname(file), { recursive: true });
@@ -1952,6 +1968,7 @@ async function main(argv) {
1952
1968
  ...command.key ? { key: command.key } : {},
1953
1969
  ...command.store ? { store: command.store } : {},
1954
1970
  ...command.only ? { only: command.only } : {},
1971
+ ...command.startPath ? { startPath: command.startPath } : {},
1955
1972
  ...command.build ? {} : { build: false },
1956
1973
  ...command.port ? { port: command.port } : {},
1957
1974
  ...command.artifacts ? { artifacts: command.artifacts } : {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zappie",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Install Zappie kit components and check storefront projects.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,13 +16,13 @@
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/zappie/storefront.git",
19
+ "url": "git+https://github.com/zappie/storefront-packages.git",
20
20
  "directory": "packages/cli"
21
21
  },
22
22
  "license": "MIT",
23
- "homepage": "https://github.com/zappie/storefront#readme",
23
+ "homepage": "https://github.com/zappie/storefront-packages#readme",
24
24
  "bugs": {
25
- "url": "https://github.com/zappie/storefront/issues"
25
+ "url": "https://github.com/zappie/storefront-packages/issues"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public",