goblin-malin 0.1.3 → 0.1.6
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/LICENSE +132 -132
- package/dist/assets/themes/dark.json +74 -74
- package/dist/assets/themes/light.json +74 -74
- package/dist/{chunk-ZQ7B4MTU.js → chunk-2PHPGCAV.js} +1 -1
- package/dist/{chunk-UKXZ4MCQ.js → chunk-5KB7X57L.js} +8 -5
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{metadata-FLO2QNLY.js → metadata-Y7BJ4AA2.js} +1 -1
- package/package.json +135 -135
- package/scripts/save-install-source.mjs +40 -40
package/LICENSE
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
# PolyForm Noncommercial License 1.0.0
|
|
2
|
-
|
|
3
|
-
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
-
|
|
5
|
-
## Acceptance
|
|
6
|
-
|
|
7
|
-
In order to get any license under these terms, you must agree
|
|
8
|
-
to them as both strict obligations and conditions to all
|
|
9
|
-
your licenses.
|
|
10
|
-
|
|
11
|
-
## Copyright License
|
|
12
|
-
|
|
13
|
-
The licensor grants you a copyright license for the
|
|
14
|
-
software to do everything you might do with the software
|
|
15
|
-
that would otherwise infringe the licensor's copyright
|
|
16
|
-
in it for any permitted purpose. However, you may
|
|
17
|
-
only distribute the software according to the
|
|
18
|
-
Distribution License section below, and you may only
|
|
19
|
-
make changes or new works based on the software according
|
|
20
|
-
to the Changes and New Works License section below.
|
|
21
|
-
|
|
22
|
-
## Distribution License
|
|
23
|
-
|
|
24
|
-
The licensor grants you an additional copyright license
|
|
25
|
-
to distribute copies of the software. Your license
|
|
26
|
-
to distribute covers distributing the software with
|
|
27
|
-
changes and new works permitted by the
|
|
28
|
-
Changes and New Works License section below.
|
|
29
|
-
|
|
30
|
-
## Notices
|
|
31
|
-
|
|
32
|
-
You must ensure that anyone who gets a copy of
|
|
33
|
-
any part of the software from you also gets a copy
|
|
34
|
-
of these terms or the URL for them above, as well as
|
|
35
|
-
copies of any plain-text lines beginning with `Required Notice:`
|
|
36
|
-
that the licensor provided with the software. For example:
|
|
37
|
-
|
|
38
|
-
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
39
|
-
|
|
40
|
-
## Changes and New Works License
|
|
41
|
-
|
|
42
|
-
The licensor grants you an additional copyright license to
|
|
43
|
-
make changes and new works based on the software for
|
|
44
|
-
any permitted purpose.
|
|
45
|
-
|
|
46
|
-
## Patent License
|
|
47
|
-
|
|
48
|
-
The licensor grants you a patent license for the software that
|
|
49
|
-
covers patent claims the licensor can license, or becomes able
|
|
50
|
-
to license, that you would infringe by using the software.
|
|
51
|
-
|
|
52
|
-
## Noncommercial Purposes
|
|
53
|
-
|
|
54
|
-
Any noncommercial purpose is a permitted purpose.
|
|
55
|
-
|
|
56
|
-
## Personal Uses
|
|
57
|
-
|
|
58
|
-
Personal use for research, experiment, and testing for
|
|
59
|
-
the benefit of public knowledge, personal study,
|
|
60
|
-
private entertainment, hobby projects, amateur pursuits,
|
|
61
|
-
or religious observance, without any anticipated
|
|
62
|
-
commercial application, is use for a noncommercial purpose.
|
|
63
|
-
|
|
64
|
-
## Noncommercial Organizations
|
|
65
|
-
|
|
66
|
-
Use by any charitable organization, educational institution,
|
|
67
|
-
public research organization, public safety or health
|
|
68
|
-
organization, environmental protection organization,
|
|
69
|
-
or government institution is use for a noncommercial
|
|
70
|
-
purpose regardless of the source of funding or obligations
|
|
71
|
-
resulting from the funding.
|
|
72
|
-
|
|
73
|
-
## Fair Use
|
|
74
|
-
|
|
75
|
-
You may have "fair use" rights for the software under the
|
|
76
|
-
law. These terms do not limit them.
|
|
77
|
-
|
|
78
|
-
## No Other Rights
|
|
79
|
-
|
|
80
|
-
These terms do not allow you to sublicense or transfer
|
|
81
|
-
any of your licenses to anyone else, or prevent the
|
|
82
|
-
licensor from granting licenses to anyone else. These
|
|
83
|
-
terms do not imply any other licenses.
|
|
84
|
-
|
|
85
|
-
## Patent Defense
|
|
86
|
-
|
|
87
|
-
If you make any written claim that the software infringes
|
|
88
|
-
or contributes to infringement of any patent, your patent
|
|
89
|
-
license for the software granted under these terms ends
|
|
90
|
-
immediately. If your company makes such a claim, your
|
|
91
|
-
patent license ends immediately for work on behalf of
|
|
92
|
-
your company.
|
|
93
|
-
|
|
94
|
-
## Violations
|
|
95
|
-
|
|
96
|
-
The first time you are notified in writing that you have
|
|
97
|
-
violated any of these terms, or done anything with the
|
|
98
|
-
software not covered by your licenses, your licenses
|
|
99
|
-
can nonetheless continue if you come into full compliance
|
|
100
|
-
with these terms, and take practical steps to correct
|
|
101
|
-
past violations, within 32 days of receiving notice.
|
|
102
|
-
Otherwise, all your licenses end immediately.
|
|
103
|
-
|
|
104
|
-
## No Liability
|
|
105
|
-
|
|
106
|
-
*As far as the law allows, the software comes as is,
|
|
107
|
-
without any warranty or condition, and the licensor
|
|
108
|
-
will not be liable to you for any damages arising out
|
|
109
|
-
of these terms or the use or nature of the software,
|
|
110
|
-
under any kind of legal claim.*
|
|
111
|
-
|
|
112
|
-
## Definitions
|
|
113
|
-
|
|
114
|
-
The **licensor** is the individual or entity offering
|
|
115
|
-
these terms, and the **software** is the software the
|
|
116
|
-
licensor makes available under these terms.
|
|
117
|
-
|
|
118
|
-
**You** refers to the individual or entity agreeing
|
|
119
|
-
to these terms.
|
|
120
|
-
|
|
121
|
-
**Your company** is any legal entity, sole proprietorship,
|
|
122
|
-
or other kind of organization that you work for, plus all
|
|
123
|
-
organizations that have control over, are under the control of,
|
|
124
|
-
or are under common control with that organization. **Control**
|
|
125
|
-
means ownership of substantially all the assets of an entity,
|
|
126
|
-
or the power to direct its management and legal affairs.
|
|
127
|
-
|
|
128
|
-
**Your licenses** are all the licenses granted to you for the
|
|
129
|
-
software under these terms.
|
|
130
|
-
|
|
131
|
-
**Use** means anything you do with the software requiring
|
|
132
|
-
one of your licenses.
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to the
|
|
18
|
+
Distribution License section below, and you may only
|
|
19
|
+
make changes or new works based on the software according
|
|
20
|
+
to the Changes and New Works License section below.
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by the
|
|
28
|
+
Changes and New Works License section below.
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of
|
|
33
|
+
any part of the software from you also gets a copy
|
|
34
|
+
of these terms or the URL for them above, as well as
|
|
35
|
+
copies of any plain-text lines beginning with `Required Notice:`
|
|
36
|
+
that the licensor provided with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for
|
|
44
|
+
any permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Noncommercial Purposes
|
|
53
|
+
|
|
54
|
+
Any noncommercial purpose is a permitted purpose.
|
|
55
|
+
|
|
56
|
+
## Personal Uses
|
|
57
|
+
|
|
58
|
+
Personal use for research, experiment, and testing for
|
|
59
|
+
the benefit of public knowledge, personal study,
|
|
60
|
+
private entertainment, hobby projects, amateur pursuits,
|
|
61
|
+
or religious observance, without any anticipated
|
|
62
|
+
commercial application, is use for a noncommercial purpose.
|
|
63
|
+
|
|
64
|
+
## Noncommercial Organizations
|
|
65
|
+
|
|
66
|
+
Use by any charitable organization, educational institution,
|
|
67
|
+
public research organization, public safety or health
|
|
68
|
+
organization, environmental protection organization,
|
|
69
|
+
or government institution is use for a noncommercial
|
|
70
|
+
purpose regardless of the source of funding or obligations
|
|
71
|
+
resulting from the funding.
|
|
72
|
+
|
|
73
|
+
## Fair Use
|
|
74
|
+
|
|
75
|
+
You may have "fair use" rights for the software under the
|
|
76
|
+
law. These terms do not limit them.
|
|
77
|
+
|
|
78
|
+
## No Other Rights
|
|
79
|
+
|
|
80
|
+
These terms do not allow you to sublicense or transfer
|
|
81
|
+
any of your licenses to anyone else, or prevent the
|
|
82
|
+
licensor from granting licenses to anyone else. These
|
|
83
|
+
terms do not imply any other licenses.
|
|
84
|
+
|
|
85
|
+
## Patent Defense
|
|
86
|
+
|
|
87
|
+
If you make any written claim that the software infringes
|
|
88
|
+
or contributes to infringement of any patent, your patent
|
|
89
|
+
license for the software granted under these terms ends
|
|
90
|
+
immediately. If your company makes such a claim, your
|
|
91
|
+
patent license ends immediately for work on behalf of
|
|
92
|
+
your company.
|
|
93
|
+
|
|
94
|
+
## Violations
|
|
95
|
+
|
|
96
|
+
The first time you are notified in writing that you have
|
|
97
|
+
violated any of these terms, or done anything with the
|
|
98
|
+
software not covered by your licenses, your licenses
|
|
99
|
+
can nonetheless continue if you come into full compliance
|
|
100
|
+
with these terms, and take practical steps to correct
|
|
101
|
+
past violations, within 32 days of receiving notice.
|
|
102
|
+
Otherwise, all your licenses end immediately.
|
|
103
|
+
|
|
104
|
+
## No Liability
|
|
105
|
+
|
|
106
|
+
*As far as the law allows, the software comes as is,
|
|
107
|
+
without any warranty or condition, and the licensor
|
|
108
|
+
will not be liable to you for any damages arising out
|
|
109
|
+
of these terms or the use or nature of the software,
|
|
110
|
+
under any kind of legal claim.*
|
|
111
|
+
|
|
112
|
+
## Definitions
|
|
113
|
+
|
|
114
|
+
The **licensor** is the individual or entity offering
|
|
115
|
+
these terms, and the **software** is the software the
|
|
116
|
+
licensor makes available under these terms.
|
|
117
|
+
|
|
118
|
+
**You** refers to the individual or entity agreeing
|
|
119
|
+
to these terms.
|
|
120
|
+
|
|
121
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
122
|
+
or other kind of organization that you work for, plus all
|
|
123
|
+
organizations that have control over, are under the control of,
|
|
124
|
+
or are under common control with that organization. **Control**
|
|
125
|
+
means ownership of substantially all the assets of an entity,
|
|
126
|
+
or the power to direct its management and legal affairs.
|
|
127
|
+
|
|
128
|
+
**Your licenses** are all the licenses granted to you for the
|
|
129
|
+
software under these terms.
|
|
130
|
+
|
|
131
|
+
**Use** means anything you do with the software requiring
|
|
132
|
+
one of your licenses.
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"palette": {
|
|
3
|
-
"blue": "#58a6ff",
|
|
4
|
-
"cyan": "#39c5cf",
|
|
5
|
-
"red": "#ff7b72",
|
|
6
|
-
"green": "#56d364",
|
|
7
|
-
"yellow": "#e3b341",
|
|
8
|
-
"orange": "#f0883e",
|
|
9
|
-
"purple": "#d2a8ff",
|
|
10
|
-
"pink": "#f778ba",
|
|
11
|
-
"white": "#e6edf3",
|
|
12
|
-
"gray": "#8b949e",
|
|
13
|
-
"grayDark": "#484f58"
|
|
14
|
-
},
|
|
15
|
-
"ui": {
|
|
16
|
-
"background": "#000000",
|
|
17
|
-
"rowBackground": "#111111",
|
|
18
|
-
"rowActiveDimmedBackground": "#1d1d1d",
|
|
19
|
-
"rowActiveBackground": "#2f2f2f",
|
|
20
|
-
"border": "#39c5cf",
|
|
21
|
-
"separator": "#39c5cf",
|
|
22
|
-
"selection": "#58a6ff",
|
|
23
|
-
"tabActive": "#58a6ff",
|
|
24
|
-
"tabInactive": "#8b949e",
|
|
25
|
-
"panelTitle": "#e6edf3",
|
|
26
|
-
"progressFill": "#56d364",
|
|
27
|
-
"progressEmpty": "#484f58",
|
|
28
|
-
"modalBorder": "#39c5cf",
|
|
29
|
-
"focusIndicator": "#58a6ff",
|
|
30
|
-
"dimText": "#484f58"
|
|
31
|
-
},
|
|
32
|
-
"text": {
|
|
33
|
-
"primary": "#e6edf3",
|
|
34
|
-
"secondary": "#8b949e",
|
|
35
|
-
"muted": "#484f58",
|
|
36
|
-
"hint": "#8b949e",
|
|
37
|
-
"active": "#e6edf3",
|
|
38
|
-
"heading": "#e6edf3"
|
|
39
|
-
},
|
|
40
|
-
"status": {
|
|
41
|
-
"processing": "#388bfd",
|
|
42
|
-
"pending": "#e6edf3",
|
|
43
|
-
"success": "#56d364",
|
|
44
|
-
"warning": "#e3b341",
|
|
45
|
-
"error": "#ff7b72",
|
|
46
|
-
"skipped": "#8b949e",
|
|
47
|
-
"locked": "#e6edf3",
|
|
48
|
-
"downloading": "#e3b341"
|
|
49
|
-
},
|
|
50
|
-
"field": {
|
|
51
|
-
"normal": "#e6edf3",
|
|
52
|
-
"overridden": "#e3b341",
|
|
53
|
-
"missing": "#8b949e",
|
|
54
|
-
"selected": "#56d364",
|
|
55
|
-
"error": "#ff7b72"
|
|
56
|
-
},
|
|
57
|
-
"confidence": {
|
|
58
|
-
"primary": "#00fbff",
|
|
59
|
-
"high": "#56d364",
|
|
60
|
-
"medium": "#e3b341",
|
|
61
|
-
"low": "#8b949e",
|
|
62
|
-
"veryLow": "#ff7b72"
|
|
63
|
-
},
|
|
64
|
-
"diff": {
|
|
65
|
-
"base": "#8b949e",
|
|
66
|
-
"changed": "#39c5cf",
|
|
67
|
-
"modified": "#e3b341"
|
|
68
|
-
},
|
|
69
|
-
"action": {
|
|
70
|
-
"primary": "#e3b341",
|
|
71
|
-
"destructive": "#ff7b72",
|
|
72
|
-
"neutral": "#8b949e"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"palette": {
|
|
3
|
+
"blue": "#58a6ff",
|
|
4
|
+
"cyan": "#39c5cf",
|
|
5
|
+
"red": "#ff7b72",
|
|
6
|
+
"green": "#56d364",
|
|
7
|
+
"yellow": "#e3b341",
|
|
8
|
+
"orange": "#f0883e",
|
|
9
|
+
"purple": "#d2a8ff",
|
|
10
|
+
"pink": "#f778ba",
|
|
11
|
+
"white": "#e6edf3",
|
|
12
|
+
"gray": "#8b949e",
|
|
13
|
+
"grayDark": "#484f58"
|
|
14
|
+
},
|
|
15
|
+
"ui": {
|
|
16
|
+
"background": "#000000",
|
|
17
|
+
"rowBackground": "#111111",
|
|
18
|
+
"rowActiveDimmedBackground": "#1d1d1d",
|
|
19
|
+
"rowActiveBackground": "#2f2f2f",
|
|
20
|
+
"border": "#39c5cf",
|
|
21
|
+
"separator": "#39c5cf",
|
|
22
|
+
"selection": "#58a6ff",
|
|
23
|
+
"tabActive": "#58a6ff",
|
|
24
|
+
"tabInactive": "#8b949e",
|
|
25
|
+
"panelTitle": "#e6edf3",
|
|
26
|
+
"progressFill": "#56d364",
|
|
27
|
+
"progressEmpty": "#484f58",
|
|
28
|
+
"modalBorder": "#39c5cf",
|
|
29
|
+
"focusIndicator": "#58a6ff",
|
|
30
|
+
"dimText": "#484f58"
|
|
31
|
+
},
|
|
32
|
+
"text": {
|
|
33
|
+
"primary": "#e6edf3",
|
|
34
|
+
"secondary": "#8b949e",
|
|
35
|
+
"muted": "#484f58",
|
|
36
|
+
"hint": "#8b949e",
|
|
37
|
+
"active": "#e6edf3",
|
|
38
|
+
"heading": "#e6edf3"
|
|
39
|
+
},
|
|
40
|
+
"status": {
|
|
41
|
+
"processing": "#388bfd",
|
|
42
|
+
"pending": "#e6edf3",
|
|
43
|
+
"success": "#56d364",
|
|
44
|
+
"warning": "#e3b341",
|
|
45
|
+
"error": "#ff7b72",
|
|
46
|
+
"skipped": "#8b949e",
|
|
47
|
+
"locked": "#e6edf3",
|
|
48
|
+
"downloading": "#e3b341"
|
|
49
|
+
},
|
|
50
|
+
"field": {
|
|
51
|
+
"normal": "#e6edf3",
|
|
52
|
+
"overridden": "#e3b341",
|
|
53
|
+
"missing": "#8b949e",
|
|
54
|
+
"selected": "#56d364",
|
|
55
|
+
"error": "#ff7b72"
|
|
56
|
+
},
|
|
57
|
+
"confidence": {
|
|
58
|
+
"primary": "#00fbff",
|
|
59
|
+
"high": "#56d364",
|
|
60
|
+
"medium": "#e3b341",
|
|
61
|
+
"low": "#8b949e",
|
|
62
|
+
"veryLow": "#ff7b72"
|
|
63
|
+
},
|
|
64
|
+
"diff": {
|
|
65
|
+
"base": "#8b949e",
|
|
66
|
+
"changed": "#39c5cf",
|
|
67
|
+
"modified": "#e3b341"
|
|
68
|
+
},
|
|
69
|
+
"action": {
|
|
70
|
+
"primary": "#e3b341",
|
|
71
|
+
"destructive": "#ff7b72",
|
|
72
|
+
"neutral": "#8b949e"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"palette": {
|
|
3
|
-
"blue": "#0969da",
|
|
4
|
-
"cyan": "#1b7c83",
|
|
5
|
-
"red": "#cf222e",
|
|
6
|
-
"green": "#1a7f37",
|
|
7
|
-
"yellow": "#9a6700",
|
|
8
|
-
"orange": "#bc4c00",
|
|
9
|
-
"purple": "#8250df",
|
|
10
|
-
"pink": "#bf3989",
|
|
11
|
-
"white": "#ffffff",
|
|
12
|
-
"gray": "#57606a",
|
|
13
|
-
"grayDark": "#24292f"
|
|
14
|
-
},
|
|
15
|
-
"ui": {
|
|
16
|
-
"background": "#ffffff",
|
|
17
|
-
"rowBackground": "#f6f8fa",
|
|
18
|
-
"rowActiveDimmedBackground": "#d0d7de",
|
|
19
|
-
"rowActiveBackground": "#b0b0b0",
|
|
20
|
-
"border": "#1b7c83",
|
|
21
|
-
"separator": "#1b7c83",
|
|
22
|
-
"selection": "#0969da",
|
|
23
|
-
"tabActive": "#0969da",
|
|
24
|
-
"tabInactive": "#57606a",
|
|
25
|
-
"panelTitle": "#24292f",
|
|
26
|
-
"progressFill": "#1a7f37",
|
|
27
|
-
"progressEmpty": "#d0d7de",
|
|
28
|
-
"modalBorder": "#1b7c83",
|
|
29
|
-
"focusIndicator": "#0969da",
|
|
30
|
-
"dimText": "#d0d7de"
|
|
31
|
-
},
|
|
32
|
-
"text": {
|
|
33
|
-
"primary": "#24292f",
|
|
34
|
-
"secondary": "#57606a",
|
|
35
|
-
"muted": "#d0d7de",
|
|
36
|
-
"hint": "#57606a",
|
|
37
|
-
"active": "#24292f",
|
|
38
|
-
"heading": "#24292f"
|
|
39
|
-
},
|
|
40
|
-
"status": {
|
|
41
|
-
"processing": "#0550ae",
|
|
42
|
-
"pending": "#24292f",
|
|
43
|
-
"success": "#1a7f37",
|
|
44
|
-
"warning": "#9a6700",
|
|
45
|
-
"error": "#cf222e",
|
|
46
|
-
"skipped": "#57606a",
|
|
47
|
-
"locked": "#24292f",
|
|
48
|
-
"downloading": "#9a6700"
|
|
49
|
-
},
|
|
50
|
-
"field": {
|
|
51
|
-
"normal": "#24292f",
|
|
52
|
-
"overridden": "#9a6700",
|
|
53
|
-
"missing": "#57606a",
|
|
54
|
-
"selected": "#1a7f37",
|
|
55
|
-
"error": "#cf222e"
|
|
56
|
-
},
|
|
57
|
-
"confidence": {
|
|
58
|
-
"primary": "#007f81",
|
|
59
|
-
"high": "#1a7f37",
|
|
60
|
-
"medium": "#9a6700",
|
|
61
|
-
"low": "#57606a",
|
|
62
|
-
"veryLow": "#cf222e"
|
|
63
|
-
},
|
|
64
|
-
"diff": {
|
|
65
|
-
"base": "#57606a",
|
|
66
|
-
"changed": "#1b7c83",
|
|
67
|
-
"modified": "#9a6700"
|
|
68
|
-
},
|
|
69
|
-
"action": {
|
|
70
|
-
"primary": "#9a6700",
|
|
71
|
-
"destructive": "#cf222e",
|
|
72
|
-
"neutral": "#57606a"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"palette": {
|
|
3
|
+
"blue": "#0969da",
|
|
4
|
+
"cyan": "#1b7c83",
|
|
5
|
+
"red": "#cf222e",
|
|
6
|
+
"green": "#1a7f37",
|
|
7
|
+
"yellow": "#9a6700",
|
|
8
|
+
"orange": "#bc4c00",
|
|
9
|
+
"purple": "#8250df",
|
|
10
|
+
"pink": "#bf3989",
|
|
11
|
+
"white": "#ffffff",
|
|
12
|
+
"gray": "#57606a",
|
|
13
|
+
"grayDark": "#24292f"
|
|
14
|
+
},
|
|
15
|
+
"ui": {
|
|
16
|
+
"background": "#ffffff",
|
|
17
|
+
"rowBackground": "#f6f8fa",
|
|
18
|
+
"rowActiveDimmedBackground": "#d0d7de",
|
|
19
|
+
"rowActiveBackground": "#b0b0b0",
|
|
20
|
+
"border": "#1b7c83",
|
|
21
|
+
"separator": "#1b7c83",
|
|
22
|
+
"selection": "#0969da",
|
|
23
|
+
"tabActive": "#0969da",
|
|
24
|
+
"tabInactive": "#57606a",
|
|
25
|
+
"panelTitle": "#24292f",
|
|
26
|
+
"progressFill": "#1a7f37",
|
|
27
|
+
"progressEmpty": "#d0d7de",
|
|
28
|
+
"modalBorder": "#1b7c83",
|
|
29
|
+
"focusIndicator": "#0969da",
|
|
30
|
+
"dimText": "#d0d7de"
|
|
31
|
+
},
|
|
32
|
+
"text": {
|
|
33
|
+
"primary": "#24292f",
|
|
34
|
+
"secondary": "#57606a",
|
|
35
|
+
"muted": "#d0d7de",
|
|
36
|
+
"hint": "#57606a",
|
|
37
|
+
"active": "#24292f",
|
|
38
|
+
"heading": "#24292f"
|
|
39
|
+
},
|
|
40
|
+
"status": {
|
|
41
|
+
"processing": "#0550ae",
|
|
42
|
+
"pending": "#24292f",
|
|
43
|
+
"success": "#1a7f37",
|
|
44
|
+
"warning": "#9a6700",
|
|
45
|
+
"error": "#cf222e",
|
|
46
|
+
"skipped": "#57606a",
|
|
47
|
+
"locked": "#24292f",
|
|
48
|
+
"downloading": "#9a6700"
|
|
49
|
+
},
|
|
50
|
+
"field": {
|
|
51
|
+
"normal": "#24292f",
|
|
52
|
+
"overridden": "#9a6700",
|
|
53
|
+
"missing": "#57606a",
|
|
54
|
+
"selected": "#1a7f37",
|
|
55
|
+
"error": "#cf222e"
|
|
56
|
+
},
|
|
57
|
+
"confidence": {
|
|
58
|
+
"primary": "#007f81",
|
|
59
|
+
"high": "#1a7f37",
|
|
60
|
+
"medium": "#9a6700",
|
|
61
|
+
"low": "#57606a",
|
|
62
|
+
"veryLow": "#cf222e"
|
|
63
|
+
},
|
|
64
|
+
"diff": {
|
|
65
|
+
"base": "#57606a",
|
|
66
|
+
"changed": "#1b7c83",
|
|
67
|
+
"modified": "#9a6700"
|
|
68
|
+
},
|
|
69
|
+
"action": {
|
|
70
|
+
"primary": "#9a6700",
|
|
71
|
+
"destructive": "#cf222e",
|
|
72
|
+
"neutral": "#57606a"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getCacheDir,
|
|
12
12
|
globalLogger,
|
|
13
13
|
inkTransport
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2PHPGCAV.js";
|
|
15
15
|
|
|
16
16
|
// src/index.tsx
|
|
17
17
|
import React65 from "react";
|
|
@@ -4624,7 +4624,7 @@ var DownloadTask = class extends Task {
|
|
|
4624
4624
|
}
|
|
4625
4625
|
if (existingSavedPath) {
|
|
4626
4626
|
if (existingSavedPath !== outputPath) {
|
|
4627
|
-
const { moveFile } = await import("./metadata-
|
|
4627
|
+
const { moveFile } = await import("./metadata-Y7BJ4AA2.js");
|
|
4628
4628
|
await moveFile(existingSavedPath, outputPath);
|
|
4629
4629
|
}
|
|
4630
4630
|
outputCreated = true;
|
|
@@ -8195,6 +8195,7 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8195
8195
|
color: selectedIndex === 0 ? theme.ui.focusIndicator : theme.text.primary
|
|
8196
8196
|
}, selectedIndex === 0 ? "\u261B " : " ", "Update with "), /* @__PURE__ */ React28.createElement(Text23, {
|
|
8197
8197
|
color: selectedIndex === 0 ? theme.ui.focusIndicator : theme.action.primary,
|
|
8198
|
+
underline: selectedIndex === 0,
|
|
8198
8199
|
bold: true
|
|
8199
8200
|
}, updateCommand)), /* @__PURE__ */ React28.createElement(Box14, {
|
|
8200
8201
|
flexDirection: "row",
|
|
@@ -8241,7 +8242,7 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8241
8242
|
})), isInProgress && /* @__PURE__ */ React28.createElement(Text23, {
|
|
8242
8243
|
dimColor: true
|
|
8243
8244
|
}, "Please wait..."), !isIdle && !isInProgress && /* @__PURE__ */ React28.createElement(React28.Fragment, null, pkgStatus === "done" && /* @__PURE__ */ React28.createElement(Hint, {
|
|
8244
|
-
label: "
|
|
8245
|
+
label: "Exit",
|
|
8245
8246
|
shortcut: "Enter"
|
|
8246
8247
|
}), /* @__PURE__ */ React28.createElement(Hint, {
|
|
8247
8248
|
label: "Close",
|
|
@@ -9253,11 +9254,13 @@ var Toolbar = /* @__PURE__ */ __name(({ buttons, width, flows, onFlowChange, flo
|
|
|
9253
9254
|
justifyContent: "flex-end",
|
|
9254
9255
|
gap: 1,
|
|
9255
9256
|
height
|
|
9256
|
-
}, updateInfo
|
|
9257
|
+
}, updateInfo ? /* @__PURE__ */ React32.createElement(UpdateBadge, {
|
|
9257
9258
|
version: updateInfo.latestVersion,
|
|
9258
9259
|
isSelected: isActive && focusState.toolbar.selectedButtonIndex === buttons.length,
|
|
9259
9260
|
index: buttons.length
|
|
9260
|
-
})
|
|
9261
|
+
}) : /* @__PURE__ */ React32.createElement(Text27, {
|
|
9262
|
+
dimColor: true
|
|
9263
|
+
}, "v", APP_VERSION))), /* @__PURE__ */ React32.createElement(PrimaryModeTabBar, {
|
|
9261
9264
|
width,
|
|
9262
9265
|
splitPos: splitPositions[0] ?? 0
|
|
9263
9266
|
}));
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "goblin-malin",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A keyboard-driven terminal UI for downloading and tagging music tracks with metadata from Spotify and YouTube",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"imports": {
|
|
9
|
-
"#base": "./src/base/index.ts",
|
|
10
|
-
"#base/*": "./src/base/*.ts",
|
|
11
|
-
"#components": "./src/components/index.ts",
|
|
12
|
-
"#components/*": "./src/components/*.ts",
|
|
13
|
-
"#contexts": "./src/contexts/index.ts",
|
|
14
|
-
"#contexts/*": "./src/contexts/*.ts",
|
|
15
|
-
"#exceptions": "./src/exceptions/index.ts",
|
|
16
|
-
"#exceptions/*": "./src/exceptions/*.ts",
|
|
17
|
-
"#flows": "./src/flows/index.ts",
|
|
18
|
-
"#flows/*": "./src/flows/*.ts",
|
|
19
|
-
"#hooks": "./src/hooks/index.ts",
|
|
20
|
-
"#hooks/*": "./src/hooks/*.ts",
|
|
21
|
-
"#settings": "./src/settings/index.ts",
|
|
22
|
-
"#settings/*": "./src/settings/*.ts",
|
|
23
|
-
"#utils": "./src/utils/index.ts",
|
|
24
|
-
"#utils/*": "./src/utils/*.ts",
|
|
25
|
-
"#assets/*": "./src/assets/*",
|
|
26
|
-
"#types": "./src/types/index.ts",
|
|
27
|
-
"#types/*": "./src/types/*.ts"
|
|
28
|
-
},
|
|
29
|
-
"exports": {
|
|
30
|
-
".": {
|
|
31
|
-
"types": "./dist/index.d.ts",
|
|
32
|
-
"default": "./dist/index.js"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"bin": {
|
|
36
|
-
"goblin-malin": "dist/cli.js"
|
|
37
|
-
},
|
|
38
|
-
"files": [
|
|
39
|
-
"dist",
|
|
40
|
-
"README.md",
|
|
41
|
-
"scripts/save-install-source.mjs"
|
|
42
|
-
],
|
|
43
|
-
"scripts": {
|
|
44
|
-
"dev": "tsx src/cli.ts",
|
|
45
|
-
"start": "ts-node src/index.ts",
|
|
46
|
-
"build": "tsup",
|
|
47
|
-
"type-check": "tsc --noEmit",
|
|
48
|
-
"lint": "eslint src/",
|
|
49
|
-
"format": "prettier --write src/",
|
|
50
|
-
"format:check": "prettier --check src/",
|
|
51
|
-
"postinstall": "node scripts/save-install-source.mjs",
|
|
52
|
-
"package:win": "node scripts/build-sea.mjs",
|
|
53
|
-
"prepack": "node scripts/patch-readme.mjs",
|
|
54
|
-
"postpack": "git checkout -- README.md",
|
|
55
|
-
"prepublishOnly": "tsup"
|
|
56
|
-
},
|
|
57
|
-
"keywords": [
|
|
58
|
-
"music",
|
|
59
|
-
"download",
|
|
60
|
-
"downloader",
|
|
61
|
-
"tui",
|
|
62
|
-
"cli",
|
|
63
|
-
"terminal",
|
|
64
|
-
"spotify",
|
|
65
|
-
"youtube",
|
|
66
|
-
"yt-dlp",
|
|
67
|
-
"metadata",
|
|
68
|
-
"tags",
|
|
69
|
-
"ink",
|
|
70
|
-
"react"
|
|
71
|
-
],
|
|
72
|
-
"author": "Tetraxel",
|
|
73
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
74
|
-
"pkg": {
|
|
75
|
-
"assets": [
|
|
76
|
-
"node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js"
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
"repository": {
|
|
80
|
-
"type": "git",
|
|
81
|
-
"url": "git+https://github.com/Tetraxel/goblin-malin.git"
|
|
82
|
-
},
|
|
83
|
-
"devDependencies": {
|
|
84
|
-
"@eslint/js": "^9.39.4",
|
|
85
|
-
"@swc/core": "^1.10.0",
|
|
86
|
-
"@types/adm-zip": "^0.5.7",
|
|
87
|
-
"@types/dotenv": "^8.2.3",
|
|
88
|
-
"@types/ink": "^2.0.3",
|
|
89
|
-
"@types/ink-select-input": "^3.0.5",
|
|
90
|
-
"@types/ink-spinner": "^3.0.5",
|
|
91
|
-
"@types/ink-text-input": "^2.0.5",
|
|
92
|
-
"@types/node": "^25.6.2",
|
|
93
|
-
"@types/react": "^19.2.14",
|
|
94
|
-
"@yao-pkg/pkg": "^6.20.0",
|
|
95
|
-
"eslint": "^9.39.4",
|
|
96
|
-
"eslint-plugin-react": "^7.37.5",
|
|
97
|
-
"eslint-plugin-react-hooks": "^7.1.1",
|
|
98
|
-
"postject": "^1.0.0-alpha.6",
|
|
99
|
-
"prettier": "^3.8.3",
|
|
100
|
-
"ts-node": "^10.9.2",
|
|
101
|
-
"tsup": "^8.0.0",
|
|
102
|
-
"tsx": "^4.21.0",
|
|
103
|
-
"typescript": "^6.0.3",
|
|
104
|
-
"typescript-eslint": "^8.59.3"
|
|
105
|
-
},
|
|
106
|
-
"dependencies": {
|
|
107
|
-
"7zip-bin": "^5.2.0",
|
|
108
|
-
"@spotify/web-api-ts-sdk": "^1.2.0",
|
|
109
|
-
"adm-zip": "^0.5.17",
|
|
110
|
-
"chalk": "^5.6.2",
|
|
111
|
-
"clipboardy": "^5.3.1",
|
|
112
|
-
"dotenv": "^17.4.2",
|
|
113
|
-
"flac-tagger": "^2.0.0",
|
|
114
|
-
"flat-cache": "^6.1.22",
|
|
115
|
-
"fullscreen-ink": "^0.1.0",
|
|
116
|
-
"ink": "^7.0.2",
|
|
117
|
-
"ink-big-text": "^2.0.0",
|
|
118
|
-
"ink-form": "^2.0.1",
|
|
119
|
-
"ink-gradient": "^4.0.0",
|
|
120
|
-
"ink-link": "^5.0.0",
|
|
121
|
-
"ink-picture": "^1.3.5",
|
|
122
|
-
"ink-select-input": "^6.2.0",
|
|
123
|
-
"ink-spinner": "^5.0.0",
|
|
124
|
-
"ink-text-input": "^6.0.0",
|
|
125
|
-
"musicbrainz-api": "^1.2.1",
|
|
126
|
-
"node-id3": "^0.2.9",
|
|
127
|
-
"open": "^11.0.0",
|
|
128
|
-
"react": "^19.2.6",
|
|
129
|
-
"slsk-client": "^1.1.0",
|
|
130
|
-
"winston": "^3.19.0",
|
|
131
|
-
"winston-transport": "^4.9.0",
|
|
132
|
-
"ytdlp-nodejs": "^3.4.4",
|
|
133
|
-
"ytmusic-api": "^5.3.1"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "goblin-malin",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "A keyboard-driven terminal UI for downloading and tagging music tracks with metadata from Spotify and YouTube",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"imports": {
|
|
9
|
+
"#base": "./src/base/index.ts",
|
|
10
|
+
"#base/*": "./src/base/*.ts",
|
|
11
|
+
"#components": "./src/components/index.ts",
|
|
12
|
+
"#components/*": "./src/components/*.ts",
|
|
13
|
+
"#contexts": "./src/contexts/index.ts",
|
|
14
|
+
"#contexts/*": "./src/contexts/*.ts",
|
|
15
|
+
"#exceptions": "./src/exceptions/index.ts",
|
|
16
|
+
"#exceptions/*": "./src/exceptions/*.ts",
|
|
17
|
+
"#flows": "./src/flows/index.ts",
|
|
18
|
+
"#flows/*": "./src/flows/*.ts",
|
|
19
|
+
"#hooks": "./src/hooks/index.ts",
|
|
20
|
+
"#hooks/*": "./src/hooks/*.ts",
|
|
21
|
+
"#settings": "./src/settings/index.ts",
|
|
22
|
+
"#settings/*": "./src/settings/*.ts",
|
|
23
|
+
"#utils": "./src/utils/index.ts",
|
|
24
|
+
"#utils/*": "./src/utils/*.ts",
|
|
25
|
+
"#assets/*": "./src/assets/*",
|
|
26
|
+
"#types": "./src/types/index.ts",
|
|
27
|
+
"#types/*": "./src/types/*.ts"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"bin": {
|
|
36
|
+
"goblin-malin": "dist/cli.js"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"README.md",
|
|
41
|
+
"scripts/save-install-source.mjs"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"dev": "tsx src/cli.ts",
|
|
45
|
+
"start": "ts-node src/index.ts",
|
|
46
|
+
"build": "tsup",
|
|
47
|
+
"type-check": "tsc --noEmit",
|
|
48
|
+
"lint": "eslint src/",
|
|
49
|
+
"format": "prettier --write src/",
|
|
50
|
+
"format:check": "prettier --check src/",
|
|
51
|
+
"postinstall": "node scripts/save-install-source.mjs",
|
|
52
|
+
"package:win": "node scripts/build-sea.mjs",
|
|
53
|
+
"prepack": "node scripts/patch-readme.mjs",
|
|
54
|
+
"postpack": "git checkout -- README.md",
|
|
55
|
+
"prepublishOnly": "tsup"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"music",
|
|
59
|
+
"download",
|
|
60
|
+
"downloader",
|
|
61
|
+
"tui",
|
|
62
|
+
"cli",
|
|
63
|
+
"terminal",
|
|
64
|
+
"spotify",
|
|
65
|
+
"youtube",
|
|
66
|
+
"yt-dlp",
|
|
67
|
+
"metadata",
|
|
68
|
+
"tags",
|
|
69
|
+
"ink",
|
|
70
|
+
"react"
|
|
71
|
+
],
|
|
72
|
+
"author": "Tetraxel",
|
|
73
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
74
|
+
"pkg": {
|
|
75
|
+
"assets": [
|
|
76
|
+
"node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"repository": {
|
|
80
|
+
"type": "git",
|
|
81
|
+
"url": "git+https://github.com/Tetraxel/goblin-malin.git"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@eslint/js": "^9.39.4",
|
|
85
|
+
"@swc/core": "^1.10.0",
|
|
86
|
+
"@types/adm-zip": "^0.5.7",
|
|
87
|
+
"@types/dotenv": "^8.2.3",
|
|
88
|
+
"@types/ink": "^2.0.3",
|
|
89
|
+
"@types/ink-select-input": "^3.0.5",
|
|
90
|
+
"@types/ink-spinner": "^3.0.5",
|
|
91
|
+
"@types/ink-text-input": "^2.0.5",
|
|
92
|
+
"@types/node": "^25.6.2",
|
|
93
|
+
"@types/react": "^19.2.14",
|
|
94
|
+
"@yao-pkg/pkg": "^6.20.0",
|
|
95
|
+
"eslint": "^9.39.4",
|
|
96
|
+
"eslint-plugin-react": "^7.37.5",
|
|
97
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
98
|
+
"postject": "^1.0.0-alpha.6",
|
|
99
|
+
"prettier": "^3.8.3",
|
|
100
|
+
"ts-node": "^10.9.2",
|
|
101
|
+
"tsup": "^8.0.0",
|
|
102
|
+
"tsx": "^4.21.0",
|
|
103
|
+
"typescript": "^6.0.3",
|
|
104
|
+
"typescript-eslint": "^8.59.3"
|
|
105
|
+
},
|
|
106
|
+
"dependencies": {
|
|
107
|
+
"7zip-bin": "^5.2.0",
|
|
108
|
+
"@spotify/web-api-ts-sdk": "^1.2.0",
|
|
109
|
+
"adm-zip": "^0.5.17",
|
|
110
|
+
"chalk": "^5.6.2",
|
|
111
|
+
"clipboardy": "^5.3.1",
|
|
112
|
+
"dotenv": "^17.4.2",
|
|
113
|
+
"flac-tagger": "^2.0.0",
|
|
114
|
+
"flat-cache": "^6.1.22",
|
|
115
|
+
"fullscreen-ink": "^0.1.0",
|
|
116
|
+
"ink": "^7.0.2",
|
|
117
|
+
"ink-big-text": "^2.0.0",
|
|
118
|
+
"ink-form": "^2.0.1",
|
|
119
|
+
"ink-gradient": "^4.0.0",
|
|
120
|
+
"ink-link": "^5.0.0",
|
|
121
|
+
"ink-picture": "^1.3.5",
|
|
122
|
+
"ink-select-input": "^6.2.0",
|
|
123
|
+
"ink-spinner": "^5.0.0",
|
|
124
|
+
"ink-text-input": "^6.0.0",
|
|
125
|
+
"musicbrainz-api": "^1.2.1",
|
|
126
|
+
"node-id3": "^0.2.9",
|
|
127
|
+
"open": "^11.0.0",
|
|
128
|
+
"react": "^19.2.6",
|
|
129
|
+
"slsk-client": "^1.1.0",
|
|
130
|
+
"winston": "^3.19.0",
|
|
131
|
+
"winston-transport": "^4.9.0",
|
|
132
|
+
"ytdlp-nodejs": "^3.4.4",
|
|
133
|
+
"ytmusic-api": "^5.3.1"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { writeFileSync, mkdirSync, existsSync } from "fs";
|
|
2
|
-
import { join, dirname } from "path";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import os from "os";
|
|
5
|
-
import { execFileSync } from "child_process";
|
|
6
|
-
|
|
7
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
|
-
function detectInstaller() {
|
|
10
|
-
const ua = process.env.npm_config_user_agent ?? "";
|
|
11
|
-
if (ua.startsWith("yarn")) return "yarn";
|
|
12
|
-
if (ua.startsWith("pnpm")) return "pnpm";
|
|
13
|
-
if (ua.startsWith("npm")) return "npm";
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// MUST reflects the paths in src\constants.ts
|
|
18
|
-
function getAppDataDir() {
|
|
19
|
-
switch (process.platform) {
|
|
20
|
-
case "win32":
|
|
21
|
-
return join(process.env.APPDATA ?? join(os.homedir(), "AppData", "Roaming"), "goblin-malin");
|
|
22
|
-
case "darwin":
|
|
23
|
-
return join(os.homedir(), "Library", "Application Support", "goblin-malin");
|
|
24
|
-
default:
|
|
25
|
-
return join(process.env.XDG_DATA_HOME ?? join(os.homedir(), ".local", "share"), "goblin-malin");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const configDir = getAppDataDir();
|
|
30
|
-
mkdirSync(configDir, { recursive: true });
|
|
31
|
-
writeFileSync(
|
|
32
|
-
join(configDir, "install.json"),
|
|
33
|
-
JSON.stringify({ installer: detectInstaller(), installedAt: new Date().toISOString() })
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
// Run compat patch only in dev (script won't exist in published package)
|
|
37
|
-
const patchScript = join(__dirname, "patch-pkg-compat.mjs");
|
|
38
|
-
if (existsSync(patchScript)) {
|
|
39
|
-
execFileSync(process.execPath, [patchScript], { stdio: "inherit" });
|
|
40
|
-
}
|
|
1
|
+
import { writeFileSync, mkdirSync, existsSync } from "fs";
|
|
2
|
+
import { join, dirname } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import os from "os";
|
|
5
|
+
import { execFileSync } from "child_process";
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
function detectInstaller() {
|
|
10
|
+
const ua = process.env.npm_config_user_agent ?? "";
|
|
11
|
+
if (ua.startsWith("yarn")) return "yarn";
|
|
12
|
+
if (ua.startsWith("pnpm")) return "pnpm";
|
|
13
|
+
if (ua.startsWith("npm")) return "npm";
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// MUST reflects the paths in src\constants.ts
|
|
18
|
+
function getAppDataDir() {
|
|
19
|
+
switch (process.platform) {
|
|
20
|
+
case "win32":
|
|
21
|
+
return join(process.env.APPDATA ?? join(os.homedir(), "AppData", "Roaming"), "goblin-malin");
|
|
22
|
+
case "darwin":
|
|
23
|
+
return join(os.homedir(), "Library", "Application Support", "goblin-malin");
|
|
24
|
+
default:
|
|
25
|
+
return join(process.env.XDG_DATA_HOME ?? join(os.homedir(), ".local", "share"), "goblin-malin");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const configDir = getAppDataDir();
|
|
30
|
+
mkdirSync(configDir, { recursive: true });
|
|
31
|
+
writeFileSync(
|
|
32
|
+
join(configDir, "install.json"),
|
|
33
|
+
JSON.stringify({ installer: detectInstaller(), installedAt: new Date().toISOString() })
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
// Run compat patch only in dev (script won't exist in published package)
|
|
37
|
+
const patchScript = join(__dirname, "patch-pkg-compat.mjs");
|
|
38
|
+
if (existsSync(patchScript)) {
|
|
39
|
+
execFileSync(process.execPath, [patchScript], { stdio: "inherit" });
|
|
40
|
+
}
|