@acryldev/blends 1.7.19 → 1.7.21

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/index.js CHANGED
@@ -95,7 +95,7 @@ var packages = {
95
95
  "path": "../plugins/versions"
96
96
  },
97
97
  "@acryldev/blends-frame": {
98
- "version": "0.2.11",
98
+ "version": "0.2.12",
99
99
  "path": "../plugins/blends-frame"
100
100
  }
101
101
  };
@@ -490,7 +490,10 @@ const appIcon = [
490
490
  join(shell.root, 'lib', 'assets', 'acrylblends-logo.png'),
491
491
  join(shell.root, 'assets', 'acrylblends-logo.png'),
492
492
  ].find((file) => existsSync(file))
493
- if (appIcon === undefined) throw new Error(`no icon: neither ${join(app, 'assets', 'icon.png')} nor ACRYL Blends' logo in ${shell.root}`)
493
+ if (appIcon === undefined)
494
+ throw new Error(
495
+ `no icon: neither ${join(app, 'assets', 'icon.png')} nor ACRYL Blends' logo in ${shell.root}`,
496
+ )
494
497
  manifest.main = shell.main
495
498
  manifest.productName = PRODUCT
496
499
  manifest.description = DESCRIPTION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/blends",
3
- "version": "1.7.19",
3
+ "version": "1.7.21",
4
4
  "description": "The Acryl web framework (import { Acryl } from \"acrylblends\") and the acrylblends command that scaffolds Cordis apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,6 +11,19 @@ export interface NpmPort extends NpmPublishPort {
11
11
  login(registry: string): string
12
12
  }
13
13
 
14
+ /** Why `npm whoami` failed, in words: not signed in (with the command), or what npm said without its pointer to a log file. */
15
+ export function whoamiProblem(stderr: string, registry: string): string {
16
+ const said = stderr
17
+ .split('\n')
18
+ .map((line) => line.replace(/^npm error\s*/u, '').trim())
19
+ .filter((line) => line !== '' && !/^npm (notice|warn)|A complete log of this run/iu.test(line))
20
+ const signedOut =
21
+ /ENEEDAUTH|E401|E403|need auth|Unauthorized|not logged in/iu.test(stderr) || said.length === 0
22
+ return signedOut
23
+ ? `npm whoami failed: you are not signed in to npm on ${registry} (sign in with: npm login --registry ${registry})`
24
+ : `npm whoami failed: ${said.slice(0, 2).join(' ')} (sign in with: npm login --registry ${registry})`
25
+ }
26
+
14
27
  export function npmWithLogin(): NpmPort {
15
28
  return {
16
29
  ...npmCli(),
@@ -27,15 +40,7 @@ export function npmWithLogin(): NpmPort {
27
40
  )
28
41
  const account = (result.stdout ?? '').trim()
29
42
  if (result.status !== 0 || account === '') {
30
- const last =
31
- (result.stderr ?? '')
32
- .trim()
33
- .split('\n')
34
- .filter((line) => !/^npm (notice|warn)/iu.test(line))
35
- .at(-1) ?? 'not signed in'
36
- throw new Error(
37
- `npm whoami failed: ${last} (sign in with: npm login --registry ${registry})`,
38
- )
43
+ throw new Error(whoamiProblem(result.stderr ?? '', registry))
39
44
  }
40
45
  return account
41
46
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/plugin-share",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Share plugins between people. Pull one someone released into the running app: fetched without running anything, checked by digest and for every OS, then installed live. Publish one, only as a plan a person confirmed.",
5
5
  "license": "MIT",
6
6
  "repository": {