svelte-command 1.1.21 → 1.1.24

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Svelte v3](https://img.shields.io/badge/svelte-v3-orange.svg)](https://svelte.dev)
2
2
  [![npm](https://img.shields.io/npm/v/svelte-command.svg)](https://www.npmjs.com/package/svelte-command)
3
3
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
4
- [![minified size](https://badgen.net/bundlephobia/min/svelte-command)](https://bundlephobia.com/result?p=svelte-command)
4
+ [![Open Bundle](https://bundlejs.com/badge-light.svg)](https://bundlejs.com/?q=svelte-command)
5
5
  [![downloads](http://img.shields.io/npm/dm/svelte-command.svg?style=flat-square)](https://npmjs.org/package/svelte-command)
6
6
  [![GitHub Issues](https://img.shields.io/github/issues/arlac77/svelte-command.svg?style=flat-square)](https://github.com/arlac77/svelte-command/issues)
7
7
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Farlac77%2Fsvelte-command%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/arlac77/svelte-command/goto)
@@ -37,7 +37,7 @@ general command execution handling for svelte components
37
37
 
38
38
  ### Parameters
39
39
 
40
- * `subscription` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
40
+ * `subscription` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
41
41
 
42
42
  ## Command
43
43
 
@@ -45,18 +45,18 @@ general command execution handling for svelte components
45
45
 
46
46
  ### Parameters
47
47
 
48
- * `_start`
48
+ * `_start`  
49
49
  * `options` (optional, default `{}`)
50
50
 
51
51
  ### Properties
52
52
 
53
- * `title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
54
- * `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
55
- * `shortcuts` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
56
- * `disabled` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
57
- * `active` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
58
- * `failed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
59
- * `completed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
53
+ * `title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
54
+ * `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
55
+ * `shortcuts` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
56
+ * `disabled` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
57
+ * `active` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
58
+ * `failed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
59
+ * `completed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
60
60
 
61
61
  ## ConfirmCommand
62
62
 
@@ -66,7 +66,7 @@ Ask for confirmation before esxecution a given Command.
66
66
 
67
67
  ### Parameters
68
68
 
69
- * `command`
69
+ * `command`  
70
70
 
71
71
  ## FetchCommand
72
72
 
@@ -76,8 +76,8 @@ Command executing a fetch request.
76
76
 
77
77
  ### Parameters
78
78
 
79
- * `url`
80
- * `fetchOptions`
79
+ * `url`  
80
+ * `fetchOptions`  
81
81
  * `options` (optional, default `{}`)
82
82
 
83
83
  ## handleFailedResponse
@@ -86,9 +86,9 @@ Extract error description from response
86
86
 
87
87
  ### Parameters
88
88
 
89
- * `response` **FetchResponse**
89
+ * `response` **FetchResponse** 
90
90
 
91
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
91
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
92
92
 
93
93
  # install
94
94
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-command",
3
- "version": "1.1.21",
3
+ "version": "1.1.24",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,7 +24,7 @@
24
24
  "prepare": "vite build",
25
25
  "start": "vite",
26
26
  "test": "npm run test:ava && npm run test:cafe",
27
- "test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 9000 --app-init-delay 3000 --app vite",
27
+ "test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 3000 --app-init-delay 3000 --app \"vite preview\"",
28
28
  "test:ava": "ava --timeout 2m tests/*.mjs",
29
29
  "docs": "documentation readme --section=API ./src/**/*.mjs",
30
30
  "lint": "npm run lint:docs",
@@ -35,18 +35,18 @@
35
35
  "@semantic-release/commit-analyzer": "^9.0.2",
36
36
  "@semantic-release/exec": "^6.0.3",
37
37
  "@semantic-release/release-notes-generator": "^10.0.3",
38
- "@sveltejs/vite-plugin-svelte": "^1.0.1",
39
- "ava": "^4.3.0",
40
- "documentation": "^13.2.5",
41
- "mf-styling": "^1.2.31",
42
- "npm-pkgbuild": "^10.9.2",
38
+ "@sveltejs/vite-plugin-svelte": "^1.0.2",
39
+ "ava": "^4.3.1",
40
+ "documentation": "^14.0.0",
41
+ "mf-styling": "^1.3.0",
42
+ "npm-pkgbuild": "^10.14.8",
43
43
  "semantic-release": "^19.0.3",
44
- "svelte": "^3.48.0",
45
- "testcafe": "^1.19.0",
46
- "vite": "^3.0.0"
44
+ "svelte": "^3.49.0",
45
+ "testcafe": "^1.20.1",
46
+ "vite": "^3.0.9"
47
47
  },
48
48
  "optionalDependencies": {
49
- "mf-hosting": "^1.7.1"
49
+ "mf-hosting": "^1.7.2"
50
50
  },
51
51
  "repository": {
52
52
  "type": "git",
@@ -61,7 +61,8 @@
61
61
  "${install.dir}": "build/",
62
62
  "${nginx.sites.dir}${name}.conf": "pkg/nginx.conf"
63
63
  },
64
- "groups": "examples"
64
+ "groups": "examples",
65
+ "description": "example showing ${name} features in action"
65
66
  },
66
67
  "release": {
67
68
  "plugins": [
@@ -83,7 +84,7 @@
83
84
  "arlac77/template-ava",
84
85
  "arlac77/template-cloudflare",
85
86
  "arlac77/template-pacman",
86
- "arlac77/template-svelte-component#next"
87
+ "arlac77/template-svelte-component"
87
88
  ]
88
89
  }
89
90
  }
package/src/command.mjs CHANGED
@@ -1,4 +1,7 @@
1
1
  export class BasicCommand {
2
+
3
+ subscriptions = new Set();
4
+
2
5
  constructor(start, properties, options = {}) {
3
6
  if (options.timeout !== undefined) {
4
7
  properties.timeout = { value: options.timeout };
@@ -7,7 +10,6 @@ export class BasicCommand {
7
10
  Object.defineProperties(this, {
8
11
  _start: { value: start },
9
12
  _cancel: { value: options.cancel || (() => {}) },
10
- subscriptions: { value: new Set() },
11
13
  ...properties
12
14
  });
13
15
 
package/vite.config.js DELETED
@@ -1,43 +0,0 @@
1
- import { svelte } from "@sveltejs/vite-plugin-svelte";
2
- import { defineConfig } from "vite";
3
-
4
- export default defineConfig(async ({ command, mode }) => {
5
- const { extractFromPackage } = await import(
6
- new URL("node_modules/npm-pkgbuild/src/module.mjs", import.meta.url)
7
- );
8
- const res = extractFromPackage({
9
- dir: new URL("./", import.meta.url).pathname
10
- });
11
- const first = await res.next();
12
- const pkg = first.value;
13
- const properties = pkg.properties;
14
- const base = properties["http.path"] + "/";
15
- const production = mode === "production";
16
-
17
- process.env["VITE_NAME"] = properties.name;
18
- process.env["VITE_DESCRIPTION"] = properties.description;
19
- process.env["VITE_VERSION"] = properties.version;
20
-
21
- const open = process.env.CI ? {} : { open: base };
22
-
23
- return {
24
- base,
25
- root: "tests/app/src",
26
- worker: { format: "es" },
27
- plugins: [
28
- svelte({
29
- compilerOptions: {
30
- dev: !production
31
- }
32
- })
33
- ],
34
- server: { host: true, ...open },
35
- build: {
36
- outDir: "../../../build",
37
- target: "esnext",
38
- emptyOutDir: true,
39
- minify: production,
40
- sourcemap: true
41
- }
42
- };
43
- });