@mherod/get-cookie 4.4.2 → 4.5.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/README.md +26 -5
- package/dist/bun.cjs +77 -0
- package/dist/bun.cjs.map +1 -0
- package/dist/bun.d.cts +3 -0
- package/dist/bun.d.ts +3 -0
- package/dist/bun.js +77 -0
- package/dist/bun.js.map +1 -0
- package/dist/cli.cjs +14 -11
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +103 -37
- package/dist/index.d.ts +103 -37
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +77 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +3 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.js +77 -0
- package/dist/node.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -14
- package/.claude/settings.local.json +0 -3
- package/.dependency-cruiser.js +0 -277
- package/.env.example +0 -5
- package/.husky/commit-msg +0 -19
- package/.husky/pre-commit +0 -29
- package/.husky/pre-push +0 -21
- package/.idea/codeStyles/Project.xml +0 -59
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/get-cookie.iml +0 -13
- package/.idea/git_toolbox_prj.xml +0 -15
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -9
- package/.idea/runConfigurations/build.xml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.nvmrc +0 -1
- package/biome.json +0 -117
- package/commitlint.config.js +0 -12
- package/eslint.config.js +0 -255
- package/examples/README.md +0 -71
- package/examples/advanced-usage.ts +0 -56
- package/examples/auth-tokens.ts +0 -143
- package/examples/basic-usage.ts +0 -43
- package/examples/cli-examples.sh +0 -51
- package/examples/comprehensive-demo.ts +0 -202
- package/examples/curl-integration.sh +0 -311
- package/examples/features-demo.sh +0 -260
- package/examples/github-auth.sh +0 -295
- package/examples/quick-start.sh +0 -115
- package/jest.setup.js +0 -34
- package/tsconfig.build.json +0 -9
- package/tsconfig.cli.json +0 -16
- package/tsconfig.tsup.json +0 -12
- package/tsup.cli.ts +0 -59
- package/tsup.lib.ts +0 -46
- package/typedoc.json +0 -17
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mherod/get-cookie",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Node.js module for querying cookies from Chrome, Firefox, and Safari browsers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "src/index.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
7
10
|
"bin": {
|
|
8
11
|
"get-cookie": "./dist/cli.cjs"
|
|
9
12
|
},
|
|
@@ -12,9 +15,24 @@
|
|
|
12
15
|
"exports": {
|
|
13
16
|
".": {
|
|
14
17
|
"types": "./dist/index.d.ts",
|
|
18
|
+
"bun": {
|
|
19
|
+
"types": "./dist/bun.d.ts",
|
|
20
|
+
"import": "./dist/bun.js",
|
|
21
|
+
"require": "./dist/bun.cjs"
|
|
22
|
+
},
|
|
15
23
|
"import": "./dist/index.js",
|
|
16
24
|
"require": "./dist/index.cjs"
|
|
17
25
|
},
|
|
26
|
+
"./node": {
|
|
27
|
+
"types": "./dist/node.d.ts",
|
|
28
|
+
"import": "./dist/node.js",
|
|
29
|
+
"require": "./dist/node.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./bun": {
|
|
32
|
+
"types": "./dist/bun.d.ts",
|
|
33
|
+
"import": "./dist/bun.js",
|
|
34
|
+
"require": "./dist/bun.cjs"
|
|
35
|
+
},
|
|
18
36
|
"./cli": {
|
|
19
37
|
"types": "./dist/cli.d.cts",
|
|
20
38
|
"import": "./dist/cli.cjs",
|
|
@@ -25,7 +43,7 @@
|
|
|
25
43
|
"access": "public"
|
|
26
44
|
},
|
|
27
45
|
"engines": {
|
|
28
|
-
"node": "^20.0.0 || ^22.0.0 || ^24.0.0 || ^25.0.0"
|
|
46
|
+
"node": "^20.0.0 || ^22.0.0 || ^24.0.0 || ^25.0.0 || ^26.0.0"
|
|
29
47
|
},
|
|
30
48
|
"keywords": [],
|
|
31
49
|
"author": "Matthew Herod",
|
|
@@ -33,9 +51,9 @@
|
|
|
33
51
|
"dependencies": {
|
|
34
52
|
"better-sqlite3": "^12.4.1",
|
|
35
53
|
"consola": "^3.4.2",
|
|
36
|
-
"date-fns": "4.
|
|
54
|
+
"date-fns": "4.4.0",
|
|
37
55
|
"destr": "^2.0.5",
|
|
38
|
-
"dotenv": "17.2
|
|
56
|
+
"dotenv": "17.4.2",
|
|
39
57
|
"fast-glob": "^3.3.3",
|
|
40
58
|
"jsonwebtoken": "^9.0.3",
|
|
41
59
|
"lodash-es": "^4.17.23",
|
|
@@ -47,9 +65,9 @@
|
|
|
47
65
|
"@primno/dpapi": "^2.0.1"
|
|
48
66
|
},
|
|
49
67
|
"devDependencies": {
|
|
50
|
-
"@biomejs/biome": "2.
|
|
51
|
-
"@commitlint/cli": "20.
|
|
52
|
-
"@commitlint/config-conventional": "20.
|
|
68
|
+
"@biomejs/biome": "2.4.16",
|
|
69
|
+
"@commitlint/cli": "20.4.2",
|
|
70
|
+
"@commitlint/config-conventional": "20.4.2",
|
|
53
71
|
"@jest/globals": "^30.1.2",
|
|
54
72
|
"@types/better-sqlite3": "^7.6.13",
|
|
55
73
|
"@types/jest": "^30.0.0",
|
|
@@ -57,28 +75,28 @@
|
|
|
57
75
|
"@types/lodash": "^4.17.20",
|
|
58
76
|
"@types/lodash-es": "4.17.12",
|
|
59
77
|
"@types/minimist": "^1.2.5",
|
|
60
|
-
"@types/node": "^
|
|
78
|
+
"@types/node": "^25.5.0",
|
|
61
79
|
"@typescript-eslint/eslint-plugin": "^8.44.1",
|
|
62
80
|
"@typescript-eslint/parser": "^8.44.1",
|
|
63
|
-
"dependency-cruiser": "17.3
|
|
81
|
+
"dependency-cruiser": "17.4.3",
|
|
64
82
|
"eslint": "^9.36.0",
|
|
65
83
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
66
84
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
67
85
|
"eslint-plugin-import": "^2.32.0",
|
|
68
|
-
"eslint-plugin-jsdoc": "^
|
|
69
|
-
"globals": "
|
|
86
|
+
"eslint-plugin-jsdoc": "^62.8.0",
|
|
87
|
+
"globals": "17.6.0",
|
|
70
88
|
"husky": "^9.1.7",
|
|
71
89
|
"jest": "^30.1.3",
|
|
72
90
|
"lint-staged": "^16.2.1",
|
|
73
|
-
"lodash": "4.
|
|
91
|
+
"lodash": "4.18.1",
|
|
74
92
|
"madge": "8.0.0",
|
|
75
|
-
"pnpm": "10.
|
|
93
|
+
"pnpm": "10.30.3",
|
|
76
94
|
"prettier": "^3.6.2",
|
|
77
95
|
"ts-jest": "^29.4.4",
|
|
78
96
|
"ts-node": "^10.9.2",
|
|
79
97
|
"tsc-alias": "^1.8.16",
|
|
80
98
|
"tsup": "^8.5.0",
|
|
81
|
-
"tsx": "4.
|
|
99
|
+
"tsx": "4.22.4",
|
|
82
100
|
"typedoc": "^0.28.13",
|
|
83
101
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
84
102
|
"typescript": "^5.9.2",
|
package/.dependency-cruiser.js
DELETED
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
/** @type {import('dependency-cruiser').IConfiguration} */
|
|
2
|
-
export default {
|
|
3
|
-
forbidden: [
|
|
4
|
-
{
|
|
5
|
-
name: "no-circular",
|
|
6
|
-
severity: "warn",
|
|
7
|
-
comment:
|
|
8
|
-
"This dependency is part of a circular relationship. You might want to revise " +
|
|
9
|
-
"your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ",
|
|
10
|
-
from: {},
|
|
11
|
-
to: {
|
|
12
|
-
circular: true,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: "no-orphans",
|
|
17
|
-
severity: "info",
|
|
18
|
-
comment:
|
|
19
|
-
"This is an orphan module - it's likely not used (anymore?). Either use it or " +
|
|
20
|
-
"remove it. If it's logical this module is an orphan (i.e. it's a config file), " +
|
|
21
|
-
"add an exception for it in your dependency-cruiser config",
|
|
22
|
-
from: {
|
|
23
|
-
orphan: true,
|
|
24
|
-
pathNot: [
|
|
25
|
-
"(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$", // dot files
|
|
26
|
-
"\\.(d\\.ts|test\\.ts|test\\.js|spec\\.ts|spec\\.js)$", // tests
|
|
27
|
-
"(^|/)__tests__/", // test folders
|
|
28
|
-
"(^|/)__mocks__/", // mock folders
|
|
29
|
-
"^src/cli/", // CLI entry points
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
to: {},
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "no-deprecated-core",
|
|
36
|
-
comment:
|
|
37
|
-
"A module depends on a node core module that has been deprecated. Find an alternative - these are " +
|
|
38
|
-
"bound to exist - node doesn't deprecate lightly.",
|
|
39
|
-
severity: "warn",
|
|
40
|
-
from: {},
|
|
41
|
-
to: {
|
|
42
|
-
dependencyTypes: ["core"],
|
|
43
|
-
path: [
|
|
44
|
-
"^(v8/tools/codemap)$",
|
|
45
|
-
"^(v8/tools/consarray)$",
|
|
46
|
-
"^(v8/tools/csvparser)$",
|
|
47
|
-
"^(v8/tools/logreader)$",
|
|
48
|
-
"^(v8/tools/profile_view)$",
|
|
49
|
-
"^(v8/tools/profile)$",
|
|
50
|
-
"^(v8/tools/SourceMap)$",
|
|
51
|
-
"^(v8/tools/splaytree)$",
|
|
52
|
-
"^(v8/tools/tickprocessor-driver)$",
|
|
53
|
-
"^(v8/tools/tickprocessor)$",
|
|
54
|
-
"^(node-inspect/lib/_inspect)$",
|
|
55
|
-
"^(node-inspect/lib/internal/inspect_client)$",
|
|
56
|
-
"^(node-inspect/lib/internal/inspect_repl)$",
|
|
57
|
-
"^(async_hooks)$",
|
|
58
|
-
"^(punycode)$",
|
|
59
|
-
"^(domain)$",
|
|
60
|
-
"^(constants)$",
|
|
61
|
-
"^(sys)$",
|
|
62
|
-
"^(_linklist)$",
|
|
63
|
-
"^(_stream_wrap)$",
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: "not-to-deprecated",
|
|
69
|
-
comment:
|
|
70
|
-
"This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later " +
|
|
71
|
-
"version of that module, or find an alternative. Check out https://www.npmjs.com/package/[the-module-name] " +
|
|
72
|
-
"for details.",
|
|
73
|
-
severity: "warn",
|
|
74
|
-
from: {},
|
|
75
|
-
to: {
|
|
76
|
-
dependencyTypes: ["deprecated"],
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "no-non-package-json",
|
|
81
|
-
severity: "error",
|
|
82
|
-
comment:
|
|
83
|
-
"This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " +
|
|
84
|
-
"That's problematic as the package either (1) won't be available on live (2 - worse) will be " +
|
|
85
|
-
"available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " +
|
|
86
|
-
"in your package.json.",
|
|
87
|
-
from: {},
|
|
88
|
-
to: {
|
|
89
|
-
dependencyTypes: ["npm-no-pkg", "npm-unknown"],
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: "not-to-unresolvable",
|
|
94
|
-
comment:
|
|
95
|
-
"This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " +
|
|
96
|
-
"module: add it to your package.json. In all other cases you likely already know what to do.",
|
|
97
|
-
severity: "error",
|
|
98
|
-
from: {},
|
|
99
|
-
to: {
|
|
100
|
-
couldNotResolve: true,
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: "no-duplicate-dep-types",
|
|
105
|
-
comment:
|
|
106
|
-
"Likely this module depends on an external ('npm') package that occurs more than once " +
|
|
107
|
-
"in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " +
|
|
108
|
-
"maintenance problems later on.",
|
|
109
|
-
severity: "warn",
|
|
110
|
-
from: {},
|
|
111
|
-
to: {
|
|
112
|
-
moreThanOneDependencyType: true,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
/* rules you might want to tweak for your specific situation: */
|
|
117
|
-
{
|
|
118
|
-
name: "not-to-test",
|
|
119
|
-
comment:
|
|
120
|
-
"This module depends on code within a folder that should only contain tests. As tests don't " +
|
|
121
|
-
"implement functionality this is odd. Either you're writing a test outside the test folder " +
|
|
122
|
-
"or there's something in the test folder that isn't a test.",
|
|
123
|
-
severity: "error",
|
|
124
|
-
from: {
|
|
125
|
-
pathNot: "^(src/(__tests__|__mocks__))",
|
|
126
|
-
},
|
|
127
|
-
to: {
|
|
128
|
-
path: "^(src/(__tests__|__mocks__))",
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
name: "not-to-spec",
|
|
133
|
-
comment:
|
|
134
|
-
"This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. " +
|
|
135
|
-
"If there's something in a spec that's of use to other modules, it doesn't have that single " +
|
|
136
|
-
"responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.",
|
|
137
|
-
severity: "error",
|
|
138
|
-
from: {},
|
|
139
|
-
to: {
|
|
140
|
-
path: "\\.(test|spec)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$",
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
name: "not-to-dev-dep",
|
|
145
|
-
severity: "error",
|
|
146
|
-
comment:
|
|
147
|
-
"This module depends on an npm package from the 'devDependencies' section of your " +
|
|
148
|
-
"package.json. It looks like something that ships to production, though. To prevent problems " +
|
|
149
|
-
"with npm packages that aren't there on production declare it (only!) in the 'dependencies'" +
|
|
150
|
-
"section of your package.json. If this module is development only - add it to the " +
|
|
151
|
-
"from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration",
|
|
152
|
-
from: {
|
|
153
|
-
path: "^(src)",
|
|
154
|
-
pathNot: [
|
|
155
|
-
"\\.(test|spec)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$",
|
|
156
|
-
"^(src/(__tests__|__mocks__))",
|
|
157
|
-
],
|
|
158
|
-
},
|
|
159
|
-
to: {
|
|
160
|
-
dependencyTypes: ["npm-dev"],
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
name: "optional-deps-used",
|
|
165
|
-
severity: "info",
|
|
166
|
-
comment:
|
|
167
|
-
"This module depends on an npm package that is declared as an optional dependency " +
|
|
168
|
-
"in your package.json. As this makes sense in limited situations only, it's flagged here. " +
|
|
169
|
-
"If you're using an optional dependency here by design - add an exception to your" +
|
|
170
|
-
"dependency-cruiser config.",
|
|
171
|
-
from: {},
|
|
172
|
-
to: {
|
|
173
|
-
dependencyTypes: ["npm-optional"],
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
name: "peer-deps-used",
|
|
178
|
-
comment:
|
|
179
|
-
"This module depends on an npm package that is declared as a peer dependency " +
|
|
180
|
-
"in your package.json. This makes sense if your package is e.g. a plugin, but in " +
|
|
181
|
-
"other cases - maybe not so much. If the use of a peer dependency is intentional " +
|
|
182
|
-
"add an exception to your dependency-cruiser config.",
|
|
183
|
-
severity: "warn",
|
|
184
|
-
from: {},
|
|
185
|
-
to: {
|
|
186
|
-
dependencyTypes: ["npm-peer"],
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
],
|
|
190
|
-
options: {
|
|
191
|
-
doNotFollow: {
|
|
192
|
-
path: "node_modules",
|
|
193
|
-
},
|
|
194
|
-
tsConfig: {
|
|
195
|
-
fileName: "tsconfig.json",
|
|
196
|
-
},
|
|
197
|
-
tsPreCompilationDeps: true,
|
|
198
|
-
enhancedResolveOptions: {
|
|
199
|
-
exportsFields: ["exports"],
|
|
200
|
-
conditionNames: ["import", "require", "node", "default"],
|
|
201
|
-
mainFields: ["module", "main", "types", "typings"],
|
|
202
|
-
},
|
|
203
|
-
reporterOptions: {
|
|
204
|
-
dot: {
|
|
205
|
-
collapsePattern: "node_modules/[^/]+",
|
|
206
|
-
theme: {
|
|
207
|
-
graph: {
|
|
208
|
-
bgcolor: "transparent",
|
|
209
|
-
color: "#000000",
|
|
210
|
-
fontcolor: "#000000",
|
|
211
|
-
fillcolor: "transparent",
|
|
212
|
-
splines: "ortho",
|
|
213
|
-
},
|
|
214
|
-
node: {
|
|
215
|
-
color: "#000000",
|
|
216
|
-
fillcolor: "#ffffcc",
|
|
217
|
-
fontcolor: "#000000",
|
|
218
|
-
},
|
|
219
|
-
edge: {
|
|
220
|
-
arrowhead: "normal",
|
|
221
|
-
arrowsize: "0.5",
|
|
222
|
-
penwidth: "1.0",
|
|
223
|
-
color: "#757575",
|
|
224
|
-
},
|
|
225
|
-
modules: [
|
|
226
|
-
{
|
|
227
|
-
criteria: { source: "^src/core" },
|
|
228
|
-
attributes: { fillcolor: "#ffcccc" },
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
criteria: { source: "^src/cli" },
|
|
232
|
-
attributes: { fillcolor: "#ccffcc" },
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
criteria: { source: "^src/utils" },
|
|
236
|
-
attributes: { fillcolor: "#ccccff" },
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
criteria: { source: "^src/types" },
|
|
240
|
-
attributes: { fillcolor: "#ffccff" },
|
|
241
|
-
},
|
|
242
|
-
],
|
|
243
|
-
dependencies: [
|
|
244
|
-
{
|
|
245
|
-
criteria: { resolved: "^src/core" },
|
|
246
|
-
attributes: { color: "#ff0000" },
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
criteria: { resolved: "^src/cli" },
|
|
250
|
-
attributes: { color: "#00ff00" },
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
criteria: { resolved: "^src/utils" },
|
|
254
|
-
attributes: { color: "#0000ff" },
|
|
255
|
-
},
|
|
256
|
-
],
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
archi: {
|
|
260
|
-
collapsePattern:
|
|
261
|
-
"^(node_modules|packages|src|lib|app|test(s?)|spec(s?))/[^/]+",
|
|
262
|
-
theme: {
|
|
263
|
-
graph: {
|
|
264
|
-
bgcolor: "transparent",
|
|
265
|
-
color: "#000000",
|
|
266
|
-
fontcolor: "#000000",
|
|
267
|
-
fillcolor: "transparent",
|
|
268
|
-
splines: "ortho",
|
|
269
|
-
},
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
text: {
|
|
273
|
-
highlightFocused: true,
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
};
|
package/.env.example
DELETED
package/.husky/commit-msg
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
# Load nvm and use the project's Node.js version
|
|
4
|
-
export NVM_DIR="$HOME/.nvm"
|
|
5
|
-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
6
|
-
|
|
7
|
-
# Use the version specified in .nvmrc or fallback to default nvm version
|
|
8
|
-
if [ -f .nvmrc ]; then
|
|
9
|
-
nvm use
|
|
10
|
-
else
|
|
11
|
-
nvm use default
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
# Try pnpm first, fallback to npx if pnpm not found
|
|
15
|
-
if command -v pnpm >/dev/null 2>&1; then
|
|
16
|
-
pnpm exec commitlint --edit ${1}
|
|
17
|
-
else
|
|
18
|
-
npx --no -- commitlint --edit ${1}
|
|
19
|
-
fi
|
package/.husky/pre-commit
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
# Load nvm and use the project's Node.js version
|
|
4
|
-
export NVM_DIR="$HOME/.nvm"
|
|
5
|
-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
6
|
-
|
|
7
|
-
# Use the version specified in .nvmrc or fallback to default nvm version
|
|
8
|
-
if [ -f .nvmrc ]; then
|
|
9
|
-
nvm use
|
|
10
|
-
NVM_NODE_VERSION=$(cat .nvmrc | tr -d '\n')
|
|
11
|
-
else
|
|
12
|
-
nvm use default
|
|
13
|
-
NVM_NODE_VERSION=$(nvm alias default | awk '{print $NF}')
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
# Explicitly set PATH to prioritize nvm's Node version
|
|
17
|
-
if [ -n "$NVM_NODE_VERSION" ]; then
|
|
18
|
-
NVM_NODE_PATH=$(nvm which "$NVM_NODE_VERSION" 2>/dev/null)
|
|
19
|
-
if [ -n "$NVM_NODE_PATH" ]; then
|
|
20
|
-
export PATH="$(dirname "$NVM_NODE_PATH"):$PATH"
|
|
21
|
-
fi
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
# Try pnpm first, fallback to npx if pnpm not found
|
|
25
|
-
if command -v pnpm >/dev/null 2>&1; then
|
|
26
|
-
pnpm lint-staged
|
|
27
|
-
else
|
|
28
|
-
npx --no -- lint-staged
|
|
29
|
-
fi
|
package/.husky/pre-push
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Load nvm if available
|
|
2
|
-
export NVM_DIR="$HOME/.nvm"
|
|
3
|
-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
4
|
-
|
|
5
|
-
# Use Node version from .nvmrc if it exists
|
|
6
|
-
[ -f .nvmrc ] && nvm use
|
|
7
|
-
|
|
8
|
-
# Ensure nvm's Node takes precedence in PATH
|
|
9
|
-
if [ -n "$NVM_DIR" ] && [ -d "$NVM_DIR/versions/node" ]; then
|
|
10
|
-
NODE_VERSION=$(nvm version)
|
|
11
|
-
if [ -n "$NODE_VERSION" ] && [ "$NODE_VERSION" != "system" ]; then
|
|
12
|
-
export PATH="$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH"
|
|
13
|
-
fi
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
# Try pnpm first, fallback to npx if pnpm not found
|
|
17
|
-
if command -v pnpm >/dev/null 2>&1; then
|
|
18
|
-
pnpm run validate
|
|
19
|
-
else
|
|
20
|
-
npm run validate
|
|
21
|
-
fi
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<HTMLCodeStyleSettings>
|
|
4
|
-
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
-
<option name="HTML_ENFORCE_QUOTES" value="true" />
|
|
6
|
-
</HTMLCodeStyleSettings>
|
|
7
|
-
<JSCodeStyleSettings version="0">
|
|
8
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
9
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
10
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
11
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
12
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
13
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
14
|
-
<option name="INDENT_CHAINED_CALLS" value="false" />
|
|
15
|
-
</JSCodeStyleSettings>
|
|
16
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
17
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
18
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
19
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
20
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
21
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
22
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
23
|
-
</TypeScriptCodeStyleSettings>
|
|
24
|
-
<VueCodeStyleSettings>
|
|
25
|
-
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
26
|
-
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
27
|
-
</VueCodeStyleSettings>
|
|
28
|
-
<codeStyleSettings language="HTML">
|
|
29
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
30
|
-
<indentOptions>
|
|
31
|
-
<option name="INDENT_SIZE" value="2" />
|
|
32
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
33
|
-
<option name="TAB_SIZE" value="2" />
|
|
34
|
-
</indentOptions>
|
|
35
|
-
</codeStyleSettings>
|
|
36
|
-
<codeStyleSettings language="JavaScript">
|
|
37
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
38
|
-
<indentOptions>
|
|
39
|
-
<option name="INDENT_SIZE" value="2" />
|
|
40
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
41
|
-
<option name="TAB_SIZE" value="2" />
|
|
42
|
-
</indentOptions>
|
|
43
|
-
</codeStyleSettings>
|
|
44
|
-
<codeStyleSettings language="TypeScript">
|
|
45
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
46
|
-
<indentOptions>
|
|
47
|
-
<option name="INDENT_SIZE" value="2" />
|
|
48
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
49
|
-
<option name="TAB_SIZE" value="2" />
|
|
50
|
-
</indentOptions>
|
|
51
|
-
</codeStyleSettings>
|
|
52
|
-
<codeStyleSettings language="Vue">
|
|
53
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
54
|
-
<indentOptions>
|
|
55
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
56
|
-
</indentOptions>
|
|
57
|
-
</codeStyleSettings>
|
|
58
|
-
</code_scheme>
|
|
59
|
-
</component>
|
package/.idea/get-cookie.iml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
|
9
|
-
</content>
|
|
10
|
-
<orderEntry type="inheritedJdk" />
|
|
11
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
12
|
-
</component>
|
|
13
|
-
</module>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="GitToolBoxProjectSettings">
|
|
4
|
-
<option name="commitMessageIssueKeyValidationOverride">
|
|
5
|
-
<BoolValueOverride>
|
|
6
|
-
<option name="enabled" value="true" />
|
|
7
|
-
</BoolValueOverride>
|
|
8
|
-
</option>
|
|
9
|
-
<option name="commitMessageValidationEnabledOverride">
|
|
10
|
-
<BoolValueOverride>
|
|
11
|
-
<option name="enabled" value="true" />
|
|
12
|
-
</BoolValueOverride>
|
|
13
|
-
</option>
|
|
14
|
-
</component>
|
|
15
|
-
</project>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/get-cookie.iml" filepath="$PROJECT_DIR$/.idea/get-cookie.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/prettier.xml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="PrettierConfiguration">
|
|
4
|
-
<option name="myConfigurationMode" value="AUTOMATIC" />
|
|
5
|
-
<option name="myRunOnSave" value="true" />
|
|
6
|
-
<option name="myRunOnReformat" value="true" />
|
|
7
|
-
<option name="myFilesPattern" value="src/{**/*,*}.{js,json,ts}" />
|
|
8
|
-
</component>
|
|
9
|
-
</project>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<component name="ProjectRunConfigurationManager">
|
|
2
|
-
<configuration default="false" name="build" type="js.build_tools.npm" nameIsGenerated="true">
|
|
3
|
-
<package-json value="$PROJECT_DIR$/package.json" />
|
|
4
|
-
<command value="run" />
|
|
5
|
-
<scripts>
|
|
6
|
-
<script value="build" />
|
|
7
|
-
</scripts>
|
|
8
|
-
<node-interpreter value="project" />
|
|
9
|
-
<envs />
|
|
10
|
-
<method v="2" />
|
|
11
|
-
</configuration>
|
|
12
|
-
</component>
|
package/.idea/vcs.xml
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22.0.0
|