@ffflorian/windows-shortcut-maker 2.0.1 → 2.0.3

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,4 +1,4 @@
1
- # windows-shortcut-maker [![Build Status](https://action-badges.now.sh/ffflorian/windows-shortcut-maker)](https://github.com/ffflorian/windows-shortcut-maker/actions/) [![npm version](https://img.shields.io/npm/v/@ffflorian/windows-shortcut-maker.svg)](https://www.npmjs.com/package/@ffflorian/windows-shortcut-maker) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=ffflorian/windows-shortcut-maker)](https://dependabot.com)
1
+ # windows-shortcut-maker [![npm version](https://img.shields.io/npm/v/@ffflorian/windows-shortcut-maker.svg)](https://www.npmjs.com/package/@ffflorian/windows-shortcut-maker)
2
2
 
3
3
  Native and lightweight module to make file shortcuts on Windows using Node.js.
4
4
 
@@ -1,4 +1,4 @@
1
- interface ShortcutOptions {
1
+ export interface ShortcutOptions {
2
2
  /** the absolute path including the name of which file should the module make a shortcut (required). */
3
3
  filepath: string;
4
4
  /** create the shortcut even if the original file cannot be found. */
@@ -20,6 +20,5 @@ interface ShortcutOptions {
20
20
  /** the initial window mode adopted by the original file when executed. (e.g. `3` is maximized, `4` is normal and `7` is minimized) */
21
21
  linkWindowMode?: number;
22
22
  }
23
- declare function makeSync(options: ShortcutOptions | string): void;
24
- declare function make(options: ShortcutOptions | string): Promise<void>;
25
- export { make, makeSync, ShortcutOptions };
23
+ export declare function makeSync(options: ShortcutOptions | string): void;
24
+ export declare function make(options: ShortcutOptions | string): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.make = exports.makeSync = void 0;
3
4
  const child_process_1 = require("child_process");
4
5
  const fs = require("fs");
5
6
  const path = require("path");
@@ -54,13 +55,13 @@ function buildArgs(options) {
54
55
  }
55
56
  function makeSync(options) {
56
57
  const checkedOptions = prepare(options);
57
- child_process_1.spawnSync('wscript', buildArgs(checkedOptions));
58
+ (0, child_process_1.spawnSync)('wscript', buildArgs(checkedOptions));
58
59
  }
59
60
  exports.makeSync = makeSync;
60
61
  function make(options) {
61
62
  const checkedOptions = prepare(options);
62
63
  return new Promise((resolve, reject) => {
63
- child_process_1.spawn('wscript', buildArgs(checkedOptions))
64
+ (0, child_process_1.spawn)('wscript', buildArgs(checkedOptions))
64
65
  .on('error', reject)
65
66
  .on('exit', () => resolve());
66
67
  });
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAC/C,yBAAyB;AACzB,6BAA6B;AAyB7B,SAAS,YAAY,CAAC,OAAwB;IAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC3E,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,OAAO;QACxB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,QAAQ,EAAE,OAAO;QACjB,cAAc,EAAE,CAAC;KAClB,CAAC;IACF,uCACK,cAAc,GACd,OAAO,EACV;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,OAAiC;IAChD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO,GAAG,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC;KAC/B;IACD,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAE7C,IAAI,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cA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,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAA,qBAAK,EAAC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;aACxC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;aACnB,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,oBAOC"}
package/package.json CHANGED
@@ -1,39 +1,22 @@
1
1
  {
2
2
  "author": "Pedro Costa <pedrohenriqueteodorodacosta@gmail.com>",
3
3
  "contributors": [
4
- "Florian Keller <github@floriankeller.de>"
4
+ "Florian Imdahl <git@ffflorian.de>"
5
5
  ],
6
6
  "description": "Create Windows shortcuts using a VBScript.",
7
7
  "devDependencies": {
8
- "@ffflorian/prettier-config": "0.0.5",
9
- "@ffflorian/tslint-config": "0.7.0",
10
- "@semantic-release/changelog": "3.0.6",
11
- "@semantic-release/git": "7.0.18",
12
- "@types/node": "~12",
13
- "husky": "3.1.0",
14
- "jasmine": "3.5.0",
15
- "lint-staged": "9.5.0",
16
- "prettier": "1.19.1",
17
- "rimraf": "3.0.0",
18
- "semantic-release": "15.13.31",
19
- "tslint": "5.20.1",
20
- "tslint-config-prettier": "1.18.0",
21
- "tslint-plugin-prettier": "2.0.1",
22
- "typescript": "3.7.3"
8
+ "rimraf": "4.1.2",
9
+ "typescript": "4.9.5"
23
10
  },
24
11
  "engines": {
25
12
  "node": ">= 10.9"
26
13
  },
27
14
  "files": [
28
- "dist",
15
+ "index.d.ts",
16
+ "index.js",
17
+ "index.js.map",
29
18
  "scripts"
30
19
  ],
31
- "homepage": "https://github.com/ffflorian/windows-shortcut-maker",
32
- "husky": {
33
- "hooks": {
34
- "pre-commit": "lint-staged"
35
- }
36
- },
37
20
  "keywords": [
38
21
  "windows",
39
22
  "shortcut",
@@ -44,33 +27,18 @@
44
27
  "url"
45
28
  ],
46
29
  "license": "GPL-3.0",
47
- "lint-staged": {
48
- "*.{json,md}": [
49
- "prettier --write",
50
- "git add"
51
- ],
52
- "src/**/*.ts": [
53
- "tslint --project tsconfig.json --fix",
54
- "git add"
55
- ]
56
- },
57
- "main": "dist/index.js",
30
+ "main": "index.js",
58
31
  "name": "@ffflorian/windows-shortcut-maker",
59
- "prettier": "@ffflorian/prettier-config",
60
- "repository": "https://github.com/ffflorian/windows-shortcut-maker.git",
32
+ "publishConfig": {
33
+ "directory": "flattened"
34
+ },
35
+ "repository": "https://github.com/ffflorian/node-packages/tree/main/packages/windows-shortcut-maker",
61
36
  "scripts": {
62
37
  "build": "tsc",
63
- "clear": "rimraf dist",
64
- "dist": "yarn clear && yarn build",
65
- "fix": "yarn fix:other && yarn fix:ts",
66
- "fix:other": "yarn prettier --write",
67
- "fix:ts": "yarn lint:ts --fix",
68
- "lint": "yarn lint:ts && yarn lint:other",
69
- "lint:other": "yarn prettier --list-different",
70
- "lint:ts": "tslint --project tsconfig.json \"**/*.ts\"",
71
- "prettier": "prettier \"*.{json,md}\"",
72
- "release": "semantic-release",
73
- "test": "exit 0"
38
+ "clean": "rimraf dist",
39
+ "dist": "yarn clean && yarn build",
40
+ "flatten": "node ../publish-flat/dist/cli.js -o flattened",
41
+ "postversion": "node ../publish-flat/dist/cli-copy.js -o flattened/package.json version"
74
42
  },
75
- "version": "2.0.1"
43
+ "version": "2.0.3"
76
44
  }
package/CHANGELOG.md DELETED
@@ -1,49 +0,0 @@
1
- ## [2.0.1](https://github.com/ffflorian/windows-shortcut-maker/compare/v2.0.0...v2.0.1) (2019-12-18)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * Add empty tests ([d99fd6e](https://github.com/ffflorian/windows-shortcut-maker/commit/d99fd6e))
7
-
8
- # [2.0.0](https://github.com/ffflorian/windows-shortcut-maker/compare/v1.1.0...v2.0.0) (2019-07-17)
9
-
10
-
11
- ### Features
12
-
13
- * Set ES6 as target and require Node >= 10.9 ([#79](https://github.com/ffflorian/windows-shortcut-maker/issues/79)) ([e77b9b1](https://github.com/ffflorian/windows-shortcut-maker/commit/e77b9b1))
14
-
15
-
16
- ### BREAKING CHANGES
17
-
18
- * Node.js >= 10.9 is required.
19
-
20
- # [1.1.0](https://github.com/ffflorian/windows-shortcut-maker/compare/v1.0.2...v1.1.0) (2019-04-09)
21
-
22
-
23
- ### Features
24
-
25
- * Custom link path ([#7](https://github.com/ffflorian/windows-shortcut-maker/issues/7)) ([a908298](https://github.com/ffflorian/windows-shortcut-maker/commit/a908298))
26
-
27
- ## [1.0.2](https://github.com/ffflorian/windows-shortcut-maker/compare/v1.0.1...v1.0.2) (2019-04-09)
28
-
29
-
30
- ### Bug Fixes
31
-
32
- * Actually respect force option ([b7986bd](https://github.com/ffflorian/windows-shortcut-maker/commit/b7986bd))
33
-
34
- ## [1.0.1](https://github.com/ffflorian/windows-shortcut-maker/compare/v1.0.0...v1.0.1) (2019-04-09)
35
-
36
- ### Bug Fixes
37
-
38
- - Small fixes ([#6](https://github.com/ffflorian/windows-shortcut-maker/issues/6)) ([b5e00eb](https://github.com/ffflorian/windows-shortcut-maker/commit/b5e00eb))
39
-
40
- # 1.0.0 (2019-04-08)
41
-
42
- ### Bug Fixes
43
-
44
- - npm module name ([29aa1da](https://github.com/ffflorian/windows-shortcut-maker/commit/29aa1da))
45
-
46
- ### Features
47
-
48
- - Async spawn ([#1](https://github.com/ffflorian/windows-shortcut-maker/issues/1)) ([cd42a38](https://github.com/ffflorian/windows-shortcut-maker/commit/cd42a38))
49
- - Rewrite in TypeScript (BREAKING) ([#3](https://github.com/ffflorian/windows-shortcut-maker/issues/3)) ([f3018f6](https://github.com/ffflorian/windows-shortcut-maker/commit/f3018f6))
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,iDAA+C;AAC/C,yBAAyB;AACzB,6BAA6B;AAyB7B,SAAS,YAAY,CAAC,OAAwB;IAC5C,MAAM,OAAO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