@dotcom-tool-kit/package-json-hook 4.1.0 → 5.0.0-beta.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.
package/.toolkitrc.yml CHANGED
@@ -0,0 +1,7 @@
1
+ installs:
2
+ PackageJson:
3
+ entryPoint: './lib/package-json-helper'
4
+ managesFiles:
5
+ - 'package.json'
6
+
7
+ version: 2
@@ -1,25 +1,27 @@
1
- import { Hook } from '@dotcom-tool-kit/types';
2
- interface PackageJson {
3
- [field: string]: PackageJson | string;
1
+ import type { z } from 'zod';
2
+ import { Hook, HookInstallation } from '@dotcom-tool-kit/base';
3
+ import type { Plugin } from '@dotcom-tool-kit/plugin';
4
+ import { PackageJsonSchema } from '@dotcom-tool-kit/schemas/lib/hooks/package-json';
5
+ import { Conflict } from '@dotcom-tool-kit/conflict';
6
+ interface PackageJsonContents {
7
+ [field: string]: PackageJsonContents | string;
4
8
  }
5
9
  interface PackageJsonStateValue {
6
- hooks: string[];
7
- trailingString: string;
10
+ commands: string[];
11
+ trailingString?: string;
12
+ installedBy: PackageJson;
8
13
  }
9
14
  interface PackageJsonState {
10
- [field: string]: PackageJsonState | PackageJsonStateValue;
15
+ [path: string]: PackageJsonStateValue;
11
16
  }
12
- export declare abstract class PackageJsonHelper extends Hook<PackageJsonState> {
17
+ export default class PackageJson extends Hook<typeof PackageJsonSchema, PackageJsonState> {
13
18
  private _packageJson?;
14
- abstract field: string | string[];
15
- abstract key: string;
16
- abstract hook: string;
17
- trailingString?: string;
18
19
  installGroup: string;
19
20
  filepath: string;
20
- getPackageJson(): Promise<PackageJson>;
21
- private get hookPath();
22
- check(): Promise<boolean>;
21
+ static mergeChildInstallations(plugin: Plugin, childInstallations: (HookInstallation<z.output<typeof PackageJsonSchema>> | Conflict<HookInstallation<z.output<typeof PackageJsonSchema>>>)[]): (HookInstallation<z.output<typeof PackageJsonSchema>> | Conflict<HookInstallation>)[];
22
+ static overrideChildInstallations(plugin: Plugin, parentInstallation: HookInstallation<z.output<typeof PackageJsonSchema>>, childInstallations: (HookInstallation<z.output<typeof PackageJsonSchema>> | Conflict<HookInstallation<z.output<typeof PackageJsonSchema>>>)[]): (HookInstallation<z.output<typeof PackageJsonSchema>> | Conflict<HookInstallation>)[];
23
+ getPackageJson(): Promise<PackageJsonContents>;
24
+ isInstalled(): Promise<boolean>;
23
25
  install(state?: PackageJsonState): Promise<PackageJsonState>;
24
26
  commitInstall(state: PackageJsonState): Promise<void>;
25
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"package-json-helper.d.ts","sourceRoot":"","sources":["../src/package-json-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAQ7C,UAAU,WAAW;IACnB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAA;CACtC;AAED,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,UAAU,gBAAgB;IACxB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,qBAAqB,CAAA;CAC1D;AAED,8BAAsB,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,CAAC;IACpE,OAAO,CAAC,YAAY,CAAC,CAAa;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAIrB,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,YAAY,SAAiB;IAE7B,QAAQ,SAA8C;IAEhD,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC;IAW5C,OAAO,KAAK,QAAQ,GAEnB;IAEK,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAKzB,OAAO,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAU5D,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAa5D"}
1
+ {"version":3,"file":"package-json-helper.d.ts","sourceRoot":"","sources":["../src/package-json-helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AASrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAc,MAAM,2BAA2B,CAAA;AAEhE,UAAU,mBAAmB;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM,CAAA;CAC9C;AAED,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;CACzB;AAED,UAAU,gBAAgB;IACxB,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAAA;CACtC;AAgED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,IAAI,CAAC,OAAO,iBAAiB,EAAE,gBAAgB,CAAC;IACvF,OAAO,CAAC,YAAY,CAAC,CAAqB;IAE1C,YAAY,SAAiB;IAE7B,QAAQ,SAA8C;IAEtD,MAAM,CAAC,uBAAuB,CAC5B,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,CAChB,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,GACpD,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACjE,EAAE,GACF,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC,EAAE;IAexF,MAAM,CAAC,0BAA0B,CAC/B,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,EACxE,kBAAkB,EAAE,CAChB,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,GACpD,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACjE,EAAE,GACF,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC,EAAE;IAsBlF,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAW9C,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAsB/B,OAAO,CAAC,KAAK,GAAE,gBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgChE,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAgB5D"}
@@ -1,20 +1,87 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PackageJsonHelper = void 0;
4
3
  const tslib_1 = require("tslib");
5
- const types_1 = require("@dotcom-tool-kit/types");
4
+ const base_1 = require("@dotcom-tool-kit/base");
6
5
  const fs_1 = tslib_1.__importDefault(require("fs"));
7
6
  const get_1 = tslib_1.__importDefault(require("lodash/get"));
8
- const mapValues_1 = tslib_1.__importDefault(require("lodash/mapValues"));
9
- const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
7
+ const set_1 = tslib_1.__importDefault(require("lodash/set"));
8
+ const partition_1 = tslib_1.__importDefault(require("lodash/partition"));
10
9
  const update_1 = tslib_1.__importDefault(require("lodash/update"));
10
+ const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
11
11
  const path_1 = tslib_1.__importDefault(require("path"));
12
- class PackageJsonHelper extends types_1.Hook {
12
+ const conflict_1 = require("@dotcom-tool-kit/conflict");
13
+ function installationsOverlap(installation, other) {
14
+ for (const [field, object] of Object.entries(installation.options)) {
15
+ for (const key of Object.keys(object)) {
16
+ if (field in other.options && key in other.options[field]) {
17
+ return true;
18
+ }
19
+ }
20
+ }
21
+ return false;
22
+ }
23
+ function partitionInstallations(installation, mergeable, unmergeable) {
24
+ const [noLongerMergeable, stillMergeable] = (0, partition_1.default)(mergeable, (other) => installationsOverlap(installation, other));
25
+ const overlapsWithUnmergeable = unmergeable.some((other) => installationsOverlap(installation, other));
26
+ if (noLongerMergeable.length > 0 || overlapsWithUnmergeable) {
27
+ return [stillMergeable, [...unmergeable, ...noLongerMergeable, installation]];
28
+ }
29
+ return [[...stillMergeable, installation], unmergeable];
30
+ }
31
+ function mergeInstallationResults(plugin, mergeable, unmergeable) {
32
+ const results = [];
33
+ if (mergeable.length > 0) {
34
+ results.push({
35
+ plugin,
36
+ forHook: 'PackageJson',
37
+ hookConstructor: PackageJson,
38
+ options: (0, merge_1.default)({}, ...mergeable.map((installation) => installation.options))
39
+ });
40
+ }
41
+ if (unmergeable.length > 0) {
42
+ results.push({
43
+ plugin,
44
+ conflicting: unmergeable
45
+ });
46
+ }
47
+ return results;
48
+ }
49
+ class PackageJson extends base_1.Hook {
13
50
  constructor() {
14
51
  super(...arguments);
15
52
  this.installGroup = 'package-json';
16
53
  this.filepath = path_1.default.resolve(process.cwd(), 'package.json');
17
54
  }
55
+ static mergeChildInstallations(plugin, childInstallations) {
56
+ let mergeable = [];
57
+ let unmergeable = [];
58
+ for (const installation of childInstallations) {
59
+ if ((0, conflict_1.isConflict)(installation)) {
60
+ unmergeable.push(...installation.conflicting);
61
+ }
62
+ else {
63
+ ;
64
+ [mergeable, unmergeable] = partitionInstallations(installation, mergeable, unmergeable);
65
+ }
66
+ }
67
+ return mergeInstallationResults(plugin, mergeable, unmergeable);
68
+ }
69
+ static overrideChildInstallations(plugin, parentInstallation, childInstallations) {
70
+ const mergeable = [];
71
+ const unmergeable = [];
72
+ for (const installation of childInstallations) {
73
+ if ((0, conflict_1.isConflict)(installation)) {
74
+ const [canHandle, cannotHandle] = (0, partition_1.default)(installation.conflicting, (other) => installationsOverlap(parentInstallation, other));
75
+ mergeable.push(...canHandle);
76
+ unmergeable.push(...cannotHandle);
77
+ }
78
+ else {
79
+ mergeable.push(installation);
80
+ }
81
+ }
82
+ mergeable.push(parentInstallation);
83
+ return mergeInstallationResults(plugin, mergeable, unmergeable);
84
+ }
18
85
  async getPackageJson() {
19
86
  if (!this._packageJson) {
20
87
  const rawPackageJson = await fs_1.default.promises.readFile(this.filepath, 'utf8');
@@ -24,28 +91,59 @@ class PackageJsonHelper extends types_1.Hook {
24
91
  }
25
92
  return this._packageJson;
26
93
  }
27
- get hookPath() {
28
- return Array.isArray(this.field) ? [...this.field, this.key] : [this.field, this.key];
29
- }
30
- async check() {
94
+ async isInstalled() {
31
95
  const packageJson = await this.getPackageJson();
32
- return (0, get_1.default)(packageJson, this.hookPath)?.includes(this.hook);
33
- }
34
- async install(state) {
35
- state ??= {};
36
- // prepend each hook to maintain the same order as previous implementations
37
- (0, update_1.default)(state, this.hookPath, (hookState) => ({
38
- hooks: [this.hook, ...(hookState?.hooks ?? [])],
39
- trailingString: this.trailingString
40
- }));
96
+ // this instance's `options` is a nested object of expected package.json field/command mappings, e.g.
97
+ // { "scripts": { "build": "build:local" } }. in the package.json, they'll have the same structure
98
+ // with a `dotcom-tool-kit` CLI prefix, e.g. { "scripts": { "build": "dotcom-tool-kit build:local" } }.
99
+ // loop through the nested options object, get the same nested key from package.json, and check that
100
+ // field exists, and its string includes the name of the command. if any command from our options is
101
+ // missing, the check should fail.
102
+ for (const [field, object] of Object.entries(this.options)) {
103
+ for (const [key, command] of Object.entries(object)) {
104
+ const currentPackageJsonField = (0, get_1.default)(packageJson, [field, key]);
105
+ if (!currentPackageJsonField || !currentPackageJsonField.includes(command)) {
106
+ return false;
107
+ }
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ async install(state = {}) {
113
+ for (const [field, object] of Object.entries(this.options)) {
114
+ for (const [key, entry] of Object.entries(object)) {
115
+ let trailingString;
116
+ let commands;
117
+ if (Array.isArray(entry)) {
118
+ commands = entry;
119
+ }
120
+ else if (typeof entry === 'string') {
121
+ commands = [entry];
122
+ }
123
+ else {
124
+ commands = Array.isArray(entry.commands) ? entry.commands : [entry.commands];
125
+ trailingString = entry.trailingString;
126
+ }
127
+ (0, update_1.default)(state,
128
+ // full stops in the key shouldn't be treated as path separators
129
+ [field + '.' + key.replace('.', '\\.')], (hookState) => ({
130
+ // prepend each command to maintain the same order as previous implementations
131
+ commands: [...commands, ...(hookState?.commands ?? [])],
132
+ installedBy: this,
133
+ trailingString: trailingString
134
+ }));
135
+ }
136
+ }
41
137
  return state;
42
138
  }
43
139
  async commitInstall(state) {
44
- const reduceHooks = (state) => (0, mapValues_1.default)(state, (field) => Array.isArray(field?.hooks)
45
- ? `dotcom-tool-kit ${field.hooks.join(' ')}${field.trailingString ? ' ' + field.trailingString : ''}`
46
- : reduceHooks(field));
47
- const newPackageJson = (0, merge_1.default)(await this.getPackageJson(), reduceHooks(state));
48
- await fs_1.default.promises.writeFile(this.filepath, JSON.stringify(newPackageJson, null, 2) + '\n');
140
+ const packageJson = await this.getPackageJson();
141
+ for (const [path, installation] of Object.entries(state)) {
142
+ (0, set_1.default)(packageJson,
143
+ // split the path on unescaped full stops
144
+ path.split(/(?<!\\)\./).map((component) => component.replace('\\.', '.')), `dotcom-tool-kit ${installation.commands.join(' ')}${installation.trailingString ? ' ' + installation.trailingString : ''}`);
145
+ }
146
+ await fs_1.default.promises.writeFile(this.filepath, JSON.stringify(packageJson, null, 2) + '\n');
49
147
  }
50
148
  }
51
- exports.PackageJsonHelper = PackageJsonHelper;
149
+ exports.default = PackageJson;
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "@dotcom-tool-kit/package-json-hook",
3
- "version": "4.1.0",
3
+ "version": "5.0.0-beta.0",
4
4
  "description": "",
5
5
  "main": "lib",
6
6
  "scripts": {
7
- "test": "cd ../../ ; npx jest --silent --projects lib/package-json-hook"
7
+ "test": "cd ../../ ; npx jest --silent --projects plugins/package-json-hook"
8
8
  },
9
9
  "keywords": [],
10
10
  "author": "FT.com Platforms Team <platforms-team.customer-products@ft.com>",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
+ "@dotcom-tool-kit/base": "4.0.0-beta.0",
14
+ "@dotcom-tool-kit/conflict": "2.0.0-beta.0",
15
+ "@dotcom-tool-kit/plugin": "2.0.0-beta.0",
13
16
  "@financial-times/package-json": "^3.0.0",
14
17
  "lodash": "^4.17.21",
15
18
  "tslib": "^2.3.1"
@@ -17,14 +20,19 @@
17
20
  "repository": {
18
21
  "type": "git",
19
22
  "url": "https://github.com/financial-times/dotcom-tool-kit.git",
20
- "directory": "lib/package-json-hook"
23
+ "directory": "plugins/package-json-hook"
21
24
  },
22
25
  "bugs": "https://github.com/financial-times/dotcom-tool-kit/issues",
23
- "homepage": "https://github.com/financial-times/dotcom-tool-kit/tree/main/lib/package-json-hook",
26
+ "homepage": "https://github.com/financial-times/dotcom-tool-kit/tree/main/plugins/package-json-hook",
27
+ "peerDependencies": {
28
+ "zod": "^3.22.4"
29
+ },
24
30
  "devDependencies": {
31
+ "@dotcom-tool-kit/schemas": "2.0.0-beta.0",
25
32
  "@jest/globals": "^27.4.6",
26
33
  "@types/lodash": "^4.14.185",
27
- "winston": "^3.5.1"
34
+ "winston": "^3.5.1",
35
+ "zod": "^3.22.4"
28
36
  },
29
37
  "files": [
30
38
  "/lib",
@@ -34,7 +42,7 @@
34
42
  "extends": "../../package.json"
35
43
  },
36
44
  "engines": {
37
- "node": "16.x || 18.x",
38
- "npm": "7.x || 8.x || 9.x"
45
+ "node": "18.x || 20.x",
46
+ "npm": "7.x || 8.x || 9.x || 10.x"
39
47
  }
40
48
  }
package/readme.md ADDED
@@ -0,0 +1,70 @@
1
+ # @dotcom-tool-kit/package-json-hook
2
+
3
+ This plugin manages Tool Kit commands that are run from npm scripts, via a Tool Kit [`Hook`](#hooks) that automatically manages `package.json`.
4
+
5
+ Although you can write npm scripts yourself in `package.json`, this plugin allows other Tool Kit plugins to define them in a repeatable, modular way. Adding custom scripts via configuring this plugin in your `.toolkitrc.yml` means that if a new use case emerges, it's much easier to abstract it into a plugin that can be shared with other Tool Kit users.
6
+
7
+ ## Installation
8
+
9
+ Most repositories won't need to use this plugin directly. It's installed of a dependency of plugins like [`npm`](../npm) which configure it with standard use cases.
10
+
11
+
12
+ Install `@dotcom-tool-kit/package-json-hook` as a `devDependency` in your app:
13
+
14
+ ```sh
15
+ npm install --save-dev @dotcom-tool-kit/package-json-hook
16
+ ```
17
+
18
+ Add the plugin to your [Tool Kit configuration](https://github.com/financial-times/dotcom-tool-kit/blob/main/readme.md#configuration):
19
+
20
+ ```yaml
21
+ plugins:
22
+ - '@dotcom-tool-kit/package-json-hook'
23
+ ```
24
+
25
+ And install this plugin's hooks:
26
+
27
+ ```sh
28
+ npx dotcom-tool-kit --install
29
+ ```
30
+
31
+ <!-- begin autogenerated docs -->
32
+ ## Hooks
33
+
34
+ ### `PackageJson`
35
+
36
+ This hook accepts a nested object with a structure that matches the generated output in `package.json`. The values are used as Tool Kit command names to run. You can provide a single command or an array; multiple commands are concatenated in order.
37
+
38
+ For more complex use cases, you can provide an object instead of a command. The object must contain keys `commands` (as above), and `trailingString` (which will be appended to the resulting `dotcom-tool-kit` CLI invocation). This is useful for tasks that accept a list of files after a trailing `--`.
39
+
40
+ Options provided in your repository's `.toolkitrc.yml` for this hook are merged with any Tool Kit plugin that also provides options for the hook.
41
+
42
+ For example, configuring this hook with the following options:
43
+
44
+ ~~~yml
45
+ options:
46
+ hooks:
47
+ - PackageJson:
48
+ scripts:
49
+ start: 'run:local'
50
+ customScript:
51
+ commands:
52
+ - custom:one
53
+ - custom:two
54
+ trailingString: '--'
55
+ ~~~
56
+
57
+ will result in the following output in `package.json`:
58
+
59
+ ~~~json
60
+ {
61
+ "scripts": {
62
+ "start": "dotcom-tool-kit run:local",
63
+ "customScript": "dotcom-tool-kit custom:one custom:two --"
64
+ }
65
+ }
66
+ ~~~
67
+
68
+ <!-- hide autogenerated schema docs -->
69
+
70
+ <!-- end autogenerated docs -->
package/lib/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { PackageJsonScriptHook, PackageJsonScriptHook as PackageJsonHook } from './script-hook';
2
- export { PackageJsonHelper } from './package-json-helper';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,IAAI,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA"}
package/lib/index.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PackageJsonHelper = exports.PackageJsonHook = exports.PackageJsonScriptHook = void 0;
4
- var script_hook_1 = require("./script-hook");
5
- Object.defineProperty(exports, "PackageJsonScriptHook", { enumerable: true, get: function () { return script_hook_1.PackageJsonScriptHook; } });
6
- Object.defineProperty(exports, "PackageJsonHook", { enumerable: true, get: function () { return script_hook_1.PackageJsonScriptHook; } });
7
- var package_json_helper_1 = require("./package-json-helper");
8
- Object.defineProperty(exports, "PackageJsonHelper", { enumerable: true, get: function () { return package_json_helper_1.PackageJsonHelper; } });
@@ -1,5 +0,0 @@
1
- import { PackageJsonHelper } from './package-json-helper';
2
- export declare abstract class PackageJsonScriptHook extends PackageJsonHelper {
3
- field: string;
4
- }
5
- //# sourceMappingURL=script-hook.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"script-hook.d.ts","sourceRoot":"","sources":["../src/script-hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEzD,8BAAsB,qBAAsB,SAAQ,iBAAiB;IACnE,KAAK,SAAY;CAClB"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PackageJsonScriptHook = void 0;
4
- const package_json_helper_1 = require("./package-json-helper");
5
- class PackageJsonScriptHook extends package_json_helper_1.PackageJsonHelper {
6
- constructor() {
7
- super(...arguments);
8
- this.field = 'scripts';
9
- }
10
- }
11
- exports.PackageJsonScriptHook = PackageJsonScriptHook;