nuxt-ignis 0.5.0-rc.2 → 0.5.1
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/.data/content/contents.sqlite +0 -0
- package/.nuxt/components.d.ts +402 -208
- package/.nuxt/content/components.ts +201 -104
- package/.nuxt/dev/index.mjs +1041 -712
- package/.nuxt/dev/index.mjs.map +1 -1
- package/.nuxt/dist/server/client.manifest.mjs +1 -18
- package/.nuxt/dist/server/client.precomputed.mjs +1 -0
- package/.nuxt/eslint-typegen.d.ts +56 -2
- package/.nuxt/eslint.config.d.mts +2 -2
- package/.nuxt/eslint.config.mjs +10 -10
- package/.nuxt/imports.d.ts +63 -59
- package/.nuxt/manifest/latest.json +1 -1
- package/.nuxt/manifest/meta/dev.json +1 -1
- package/.nuxt/mdc-highlighter.mjs +4 -0
- package/.nuxt/mdc-image-component.mjs +1 -1
- package/.nuxt/module/nuxt-robots.d.ts +12 -12
- package/.nuxt/module/nuxt-seo-utils.d.ts +10 -10
- package/.nuxt/module/nuxt-site-config.d.ts +8 -8
- package/.nuxt/module/nuxt-sitemap.d.ts +17 -17
- package/.nuxt/nitro.json +4 -4
- package/.nuxt/nuxt.d.ts +12 -11
- package/.nuxt/nuxt.json +2 -2
- package/.nuxt/nuxt.node.d.ts +13 -10
- package/.nuxt/tsconfig.app.json +191 -191
- package/.nuxt/tsconfig.json +194 -194
- package/.nuxt/tsconfig.node.json +105 -105
- package/.nuxt/tsconfig.server.json +128 -128
- package/.nuxt/tsconfig.shared.json +55 -55
- package/.nuxt/types/build.d.ts +2 -1
- package/.nuxt/types/components.d.ts +402 -208
- package/.nuxt/types/i18n-plugin.d.ts +2 -2
- package/.nuxt/types/imports.d.ts +348 -342
- package/.nuxt/types/modules.d.ts +16 -16
- package/.nuxt/types/nitro-imports.d.ts +68 -68
- package/.nuxt/types/nitro-nuxt.d.ts +1 -0
- package/.nuxt/types/nitro-routes.d.ts +20 -20
- package/.nuxt/types/plugins.d.ts +37 -37
- package/.nuxt/types/ui.d.ts +3 -3
- package/.nuxt/ui/drawer.ts +23 -0
- package/.nuxt/ui/progress.ts +3 -3
- package/.nuxt/ui-image-component.ts +1 -1
- package/.output/nitro.json +3 -3
- package/.output/public/_nuxt/1vOq3xiE.js +1 -0
- package/.output/public/_nuxt/22rhGZdI.js +1 -0
- package/.output/public/_nuxt/9eIdSibD.js +1 -0
- package/.output/public/_nuxt/BBmTy930.js +35 -0
- package/.output/public/_nuxt/BKe83Cjx.js +1 -0
- package/.output/public/_nuxt/Bc5GLloR.js +1 -0
- package/.output/public/_nuxt/BdG3SY-u.js +1 -0
- package/.output/public/_nuxt/BeyOQpYA.js +1 -0
- package/.output/public/_nuxt/BqcXd3MY.js +94 -0
- package/.output/public/_nuxt/Bz55A4y1.js +1 -0
- package/.output/public/_nuxt/C2ybsIQ4.js +1 -0
- package/.output/public/_nuxt/C4U5VOMJ.js +1 -0
- package/.output/public/_nuxt/CAJsyjAK.js +1 -0
- package/.output/public/_nuxt/CD9aBAuy.js +1 -0
- package/.output/public/_nuxt/CHOS7x_d.js +1 -0
- package/.output/public/_nuxt/CXhUbdF6.js +1 -0
- package/.output/public/_nuxt/CZWScI5k.js +1 -0
- package/.output/public/_nuxt/DHd34syF.js +1 -0
- package/.output/public/_nuxt/DMbgtwAJ.js +1 -0
- package/.output/public/_nuxt/DR8jhnFO.js +1 -0
- package/.output/public/_nuxt/DTT0LBLY.js +1 -0
- package/.output/public/_nuxt/{aetvq4w9.js → DWV_uL6G.js} +9 -12
- package/.output/public/_nuxt/DdpTKqR-.js +1 -0
- package/.output/public/_nuxt/Df_NcBcC.js +1 -0
- package/.output/public/_nuxt/DhqOMFXQ.js +1 -0
- package/.output/public/_nuxt/Dnp9eFDR.js +1 -0
- package/.output/public/_nuxt/DnqMs_6O.js +1 -0
- package/.output/public/_nuxt/Dq7g_IfY.js +1 -0
- package/.output/public/_nuxt/DsAJWnuW.js +1 -0
- package/.output/public/_nuxt/DvVg7vM_.js +1 -0
- package/.output/public/_nuxt/DwKqLVGx.js +1 -0
- package/.output/public/_nuxt/DxzqnQKF.js +1 -0
- package/.output/public/_nuxt/Y0f1tU-r.js +1 -0
- package/.output/public/_nuxt/atySmcu6.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/7bab2b8f-93ee-4f44-a604-8cd2b41eac60.json +1 -0
- package/.output/public/_nuxt/entry.CtpkPzPO.css +1 -0
- package/.output/public/_nuxt/error-404.DzDu4Ean.css +1 -0
- package/.output/public/_nuxt/error-500.BdNqqJx7.css +1 -0
- package/.output/public/_nuxt/q3i45eMH.js +1 -0
- package/.output/public/_nuxt/vueform.CkWb7x1C.css +1 -0
- package/.output/server/chunks/_/error-500.mjs +1 -1
- package/.output/server/chunks/_/error-500.mjs.map +1 -1
- package/.output/server/chunks/_/nitro.mjs +468 -543
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +4 -0
- package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +10 -33
- package/.output/server/chunks/routes/renderer.mjs.map +1 -1
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +212 -145
- package/.output/server/node_modules/@babel/parser/package.json +3 -3
- package/.output/server/node_modules/@poppinss/utils/package.json +1 -1
- package/.output/server/node_modules/@shikijs/core/package.json +2 -2
- package/.output/server/node_modules/@shikijs/engine-javascript/package.json +2 -2
- package/.output/server/node_modules/@shikijs/engine-oniguruma/package.json +2 -2
- package/.output/server/node_modules/@shikijs/langs/dist/javascript.mjs +1 -1
- package/.output/server/node_modules/@shikijs/langs/dist/typescript.mjs +1 -1
- package/.output/server/node_modules/@shikijs/langs/package.json +11 -3
- package/.output/server/node_modules/@shikijs/themes/package.json +3 -3
- package/.output/server/node_modules/@shikijs/transformers/package.json +3 -3
- package/.output/server/node_modules/@shikijs/types/package.json +1 -1
- package/.output/server/node_modules/detect-libc/lib/detect-libc.js +59 -13
- package/.output/server/node_modules/detect-libc/lib/elf.js +39 -0
- package/.output/server/node_modules/detect-libc/lib/filesystem.js +18 -8
- package/.output/server/node_modules/detect-libc/package.json +5 -2
- package/.output/server/node_modules/devalue/package.json +1 -1
- package/.output/server/node_modules/devalue/src/parse.js +7 -1
- package/.output/server/node_modules/devalue/src/uneval.js +9 -8
- package/.output/server/node_modules/fast-xml-parser/package.json +1 -1
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +3 -2
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
- package/.output/server/node_modules/image-meta/dist/index.mjs +85 -4
- package/.output/server/node_modules/image-meta/package.json +12 -12
- package/.output/server/node_modules/is-arrayish/package.json +1 -1
- package/.output/server/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -2
- package/.output/server/node_modules/node-fetch-native/dist/node.mjs +10 -10
- package/.output/server/node_modules/node-fetch-native/package.json +13 -13
- package/.output/server/node_modules/node-mock-http/dist/index.mjs +1 -1
- package/.output/server/node_modules/node-mock-http/package.json +6 -6
- package/.output/server/node_modules/oauth4webapi/build/index.js +10 -8
- package/.output/server/node_modules/oauth4webapi/package.json +12 -12
- package/.output/server/node_modules/openid-client/build/index.js +1 -1
- package/.output/server/node_modules/openid-client/package.json +7 -7
- package/.output/server/node_modules/secure-json-parse/index.js +35 -0
- package/.output/server/node_modules/secure-json-parse/package.json +2 -3
- package/.output/server/node_modules/semver/classes/semver.js +19 -5
- package/.output/server/node_modules/semver/internal/identifiers.js +4 -0
- package/.output/server/node_modules/semver/package.json +3 -3
- package/.output/server/node_modules/shiki/package.json +9 -9
- package/.output/server/node_modules/simple-swizzle/package.json +1 -1
- package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +6 -513
- package/.output/server/node_modules/unhead/package.json +5 -1
- package/.output/server/node_modules/unist-util-is/lib/index.js +10 -5
- package/.output/server/node_modules/unist-util-is/package.json +12 -9
- package/.output/server/node_modules/unist-util-visit-parents/lib/index.js +8 -7
- package/.output/server/node_modules/unist-util-visit-parents/package.json +18 -13
- package/.output/server/node_modules/yaml/dist/stringify/stringifyString.js +1 -1
- package/.output/server/node_modules/yaml/package.json +2 -1
- package/.output/server/package.json +27 -27
- package/bin/cli.js +23 -16
- package/bin/set-app-vue.js +3 -1
- package/bin/set-css.js +3 -1
- package/bin/set-eslint.js +3 -1
- package/bin/setup.js +10 -7
- package/nuxt.config.ts +13 -1
- package/package.json +15 -12
- package/test/versions.test.ts +65 -0
- package/vitest.config.ts +5 -5
- package/.nuxt/dist/server/client.manifest.json +0 -18
- package/.output/public/_nuxt/1soVlS0z.js +0 -1
- package/.output/public/_nuxt/B7rsWaa2.js +0 -1
- package/.output/public/_nuxt/BFreiu22.js +0 -1
- package/.output/public/_nuxt/BLcTglbc.js +0 -1
- package/.output/public/_nuxt/Bhd4_yFT.js +0 -1
- package/.output/public/_nuxt/Bhpb4lc3.js +0 -1
- package/.output/public/_nuxt/Bi2eMDmd.js +0 -1
- package/.output/public/_nuxt/Bm30MqE0.js +0 -1
- package/.output/public/_nuxt/BqsN2CZp.js +0 -1
- package/.output/public/_nuxt/Bs3IGOdt.js +0 -1
- package/.output/public/_nuxt/ByaiRTkI.js +0 -1
- package/.output/public/_nuxt/C9ePPGPX.js +0 -94
- package/.output/public/_nuxt/CA578xwz.js +0 -1
- package/.output/public/_nuxt/CDttUXKg.js +0 -1
- package/.output/public/_nuxt/CQozUI2A.js +0 -1
- package/.output/public/_nuxt/CSN71QT8.js +0 -1
- package/.output/public/_nuxt/CqCaqSd2.js +0 -1
- package/.output/public/_nuxt/D8v-efI7.js +0 -1
- package/.output/public/_nuxt/DBJqMhGy.js +0 -35
- package/.output/public/_nuxt/DR4hWRk7.js +0 -1
- package/.output/public/_nuxt/DRroQ-Xq.js +0 -1
- package/.output/public/_nuxt/DStnBfJS.js +0 -1
- package/.output/public/_nuxt/DXTYyv-V.js +0 -1
- package/.output/public/_nuxt/DeS1g0YT.js +0 -1
- package/.output/public/_nuxt/Deb6R53f.js +0 -1
- package/.output/public/_nuxt/DiDHllLr.js +0 -1
- package/.output/public/_nuxt/DvwlldUy.js +0 -1
- package/.output/public/_nuxt/DyCICqRh.js +0 -1
- package/.output/public/_nuxt/DzT4wm3Y.js +0 -1
- package/.output/public/_nuxt/E8nje24C.js +0 -1
- package/.output/public/_nuxt/RbPLLy5S.js +0 -1
- package/.output/public/_nuxt/builds/meta/cbc9377a-971e-4db1-b4b1-01807b82ee58.json +0 -1
- package/.output/public/_nuxt/entry.whtwWr_z.css +0 -1
- package/.output/public/_nuxt/error-404.Cq535Uij.css +0 -1
- package/.output/public/_nuxt/error-500.BHm_N15n.css +0 -1
- package/.output/public/_nuxt/jpnxxCHq.js +0 -1
- package/.output/public/_nuxt/sHsV3x2B.js +0 -1
- package/.output/public/_nuxt/sQEqbbg2.js +0 -1
- package/.output/public/_nuxt/vueform.ChEauysg.css +0 -1
- package/.output/server/chunks/build/client.manifest.mjs +0 -511
- package/.output/server/chunks/build/client.manifest.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/langs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.14.0",
|
|
5
5
|
"description": "TextMate grammars for Shiki in ESM",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
"./html-derivative": "./dist/html-derivative.mjs",
|
|
148
148
|
"./html": "./dist/html.mjs",
|
|
149
149
|
"./http": "./dist/http.mjs",
|
|
150
|
+
"./hurl": "./dist/hurl.mjs",
|
|
150
151
|
"./hxml": "./dist/hxml.mjs",
|
|
151
152
|
"./hy": "./dist/hy.mjs",
|
|
152
153
|
"./imba": "./dist/imba.mjs",
|
|
@@ -154,6 +155,8 @@
|
|
|
154
155
|
"./ini": "./dist/ini.mjs",
|
|
155
156
|
"./java": "./dist/java.mjs",
|
|
156
157
|
"./js": "./dist/js.mjs",
|
|
158
|
+
"./cjs": "./dist/cjs.mjs",
|
|
159
|
+
"./mjs": "./dist/mjs.mjs",
|
|
157
160
|
"./javascript": "./dist/javascript.mjs",
|
|
158
161
|
"./jinja-html": "./dist/jinja-html.mjs",
|
|
159
162
|
"./jinja": "./dist/jinja.mjs",
|
|
@@ -168,6 +171,7 @@
|
|
|
168
171
|
"./jsx": "./dist/jsx.mjs",
|
|
169
172
|
"./jl": "./dist/jl.mjs",
|
|
170
173
|
"./julia": "./dist/julia.mjs",
|
|
174
|
+
"./kdl": "./dist/kdl.mjs",
|
|
171
175
|
"./kt": "./dist/kt.mjs",
|
|
172
176
|
"./kts": "./dist/kts.mjs",
|
|
173
177
|
"./kotlin": "./dist/kotlin.mjs",
|
|
@@ -214,6 +218,7 @@
|
|
|
214
218
|
"./pascal": "./dist/pascal.mjs",
|
|
215
219
|
"./perl": "./dist/perl.mjs",
|
|
216
220
|
"./php": "./dist/php.mjs",
|
|
221
|
+
"./pkl": "./dist/pkl.mjs",
|
|
217
222
|
"./plsql": "./dist/plsql.mjs",
|
|
218
223
|
"./pot": "./dist/pot.mjs",
|
|
219
224
|
"./potx": "./dist/potx.mjs",
|
|
@@ -247,6 +252,7 @@
|
|
|
247
252
|
"./regexp": "./dist/regexp.mjs",
|
|
248
253
|
"./rel": "./dist/rel.mjs",
|
|
249
254
|
"./riscv": "./dist/riscv.mjs",
|
|
255
|
+
"./rosmsg": "./dist/rosmsg.mjs",
|
|
250
256
|
"./rst": "./dist/rst.mjs",
|
|
251
257
|
"./rb": "./dist/rb.mjs",
|
|
252
258
|
"./ruby": "./dist/ruby.mjs",
|
|
@@ -301,6 +307,8 @@
|
|
|
301
307
|
"./turtle": "./dist/turtle.mjs",
|
|
302
308
|
"./twig": "./dist/twig.mjs",
|
|
303
309
|
"./ts": "./dist/ts.mjs",
|
|
310
|
+
"./cts": "./dist/cts.mjs",
|
|
311
|
+
"./mts": "./dist/mts.mjs",
|
|
304
312
|
"./typescript": "./dist/typescript.mjs",
|
|
305
313
|
"./tsp": "./dist/tsp.mjs",
|
|
306
314
|
"./typespec": "./dist/typespec.mjs",
|
|
@@ -346,10 +354,10 @@
|
|
|
346
354
|
"dist"
|
|
347
355
|
],
|
|
348
356
|
"dependencies": {
|
|
349
|
-
"@shikijs/types": "3.
|
|
357
|
+
"@shikijs/types": "3.14.0"
|
|
350
358
|
},
|
|
351
359
|
"devDependencies": {
|
|
352
|
-
"tm-grammars": "^1.
|
|
360
|
+
"tm-grammars": "^1.25.1"
|
|
353
361
|
},
|
|
354
362
|
"scripts": {
|
|
355
363
|
"build": "pnpm prepare"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/themes",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.14.0",
|
|
5
5
|
"description": "TextMate themes for Shiki in ESM",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
"dist"
|
|
88
88
|
],
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@shikijs/types": "3.
|
|
90
|
+
"@shikijs/types": "3.14.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"tm-themes": "^1.10.
|
|
93
|
+
"tm-themes": "^1.10.12"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|
|
96
96
|
"build": "pnpm prepare"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/transformers",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.14.0",
|
|
5
5
|
"description": "Collective of common transformers transformers for Shiki",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@shikijs/core": "3.
|
|
31
|
-
"@shikijs/types": "3.
|
|
30
|
+
"@shikijs/core": "3.14.0",
|
|
31
|
+
"@shikijs/types": "3.14.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "unbuild",
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
const childProcess = require('child_process');
|
|
7
7
|
const { isLinux, getReport } = require('./process');
|
|
8
|
-
const { LDD_PATH, readFile, readFileSync } = require('./filesystem');
|
|
8
|
+
const { LDD_PATH, SELF_PATH, readFile, readFileSync } = require('./filesystem');
|
|
9
|
+
const { interpreterPath } = require('./elf');
|
|
9
10
|
|
|
11
|
+
let cachedFamilyInterpreter;
|
|
10
12
|
let cachedFamilyFilesystem;
|
|
11
13
|
let cachedVersionFilesystem;
|
|
12
14
|
|
|
@@ -82,7 +84,19 @@ const familyFromCommand = (out) => {
|
|
|
82
84
|
return null;
|
|
83
85
|
};
|
|
84
86
|
|
|
87
|
+
const familyFromInterpreterPath = (path) => {
|
|
88
|
+
if (path) {
|
|
89
|
+
if (path.includes('/ld-musl-')) {
|
|
90
|
+
return MUSL;
|
|
91
|
+
} else if (path.includes('/ld-linux-')) {
|
|
92
|
+
return GLIBC;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
};
|
|
97
|
+
|
|
85
98
|
const getFamilyFromLddContent = (content) => {
|
|
99
|
+
content = content.toString();
|
|
86
100
|
if (content.includes('musl')) {
|
|
87
101
|
return MUSL;
|
|
88
102
|
}
|
|
@@ -116,6 +130,32 @@ const familyFromFilesystemSync = () => {
|
|
|
116
130
|
return cachedFamilyFilesystem;
|
|
117
131
|
};
|
|
118
132
|
|
|
133
|
+
const familyFromInterpreter = async () => {
|
|
134
|
+
if (cachedFamilyInterpreter !== undefined) {
|
|
135
|
+
return cachedFamilyInterpreter;
|
|
136
|
+
}
|
|
137
|
+
cachedFamilyInterpreter = null;
|
|
138
|
+
try {
|
|
139
|
+
const selfContent = await readFile(SELF_PATH);
|
|
140
|
+
const path = interpreterPath(selfContent);
|
|
141
|
+
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
|
142
|
+
} catch (e) {}
|
|
143
|
+
return cachedFamilyInterpreter;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const familyFromInterpreterSync = () => {
|
|
147
|
+
if (cachedFamilyInterpreter !== undefined) {
|
|
148
|
+
return cachedFamilyInterpreter;
|
|
149
|
+
}
|
|
150
|
+
cachedFamilyInterpreter = null;
|
|
151
|
+
try {
|
|
152
|
+
const selfContent = readFileSync(SELF_PATH);
|
|
153
|
+
const path = interpreterPath(selfContent);
|
|
154
|
+
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
|
155
|
+
} catch (e) {}
|
|
156
|
+
return cachedFamilyInterpreter;
|
|
157
|
+
};
|
|
158
|
+
|
|
119
159
|
/**
|
|
120
160
|
* Resolves with the libc family when it can be determined, `null` otherwise.
|
|
121
161
|
* @returns {Promise<?string>}
|
|
@@ -123,13 +163,16 @@ const familyFromFilesystemSync = () => {
|
|
|
123
163
|
const family = async () => {
|
|
124
164
|
let family = null;
|
|
125
165
|
if (isLinux()) {
|
|
126
|
-
family = await
|
|
166
|
+
family = await familyFromInterpreter();
|
|
127
167
|
if (!family) {
|
|
128
|
-
family =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
168
|
+
family = await familyFromFilesystem();
|
|
169
|
+
if (!family) {
|
|
170
|
+
family = familyFromReport();
|
|
171
|
+
}
|
|
172
|
+
if (!family) {
|
|
173
|
+
const out = await safeCommand();
|
|
174
|
+
family = familyFromCommand(out);
|
|
175
|
+
}
|
|
133
176
|
}
|
|
134
177
|
}
|
|
135
178
|
return family;
|
|
@@ -142,13 +185,16 @@ const family = async () => {
|
|
|
142
185
|
const familySync = () => {
|
|
143
186
|
let family = null;
|
|
144
187
|
if (isLinux()) {
|
|
145
|
-
family =
|
|
188
|
+
family = familyFromInterpreterSync();
|
|
146
189
|
if (!family) {
|
|
147
|
-
family =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
190
|
+
family = familyFromFilesystemSync();
|
|
191
|
+
if (!family) {
|
|
192
|
+
family = familyFromReport();
|
|
193
|
+
}
|
|
194
|
+
if (!family) {
|
|
195
|
+
const out = safeCommandSync();
|
|
196
|
+
family = familyFromCommand(out);
|
|
197
|
+
}
|
|
152
198
|
}
|
|
153
199
|
}
|
|
154
200
|
return family;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Copyright 2017 Lovell Fuller and others.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const interpreterPath = (elf) => {
|
|
7
|
+
if (elf.length < 64) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
if (elf.readUInt32BE(0) !== 0x7F454C46) {
|
|
11
|
+
// Unexpected magic bytes
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
if (elf.readUInt8(4) !== 2) {
|
|
15
|
+
// Not a 64-bit ELF
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (elf.readUInt8(5) !== 1) {
|
|
19
|
+
// Not little-endian
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const offset = elf.readUInt32LE(32);
|
|
23
|
+
const size = elf.readUInt16LE(54);
|
|
24
|
+
const count = elf.readUInt16LE(56);
|
|
25
|
+
for (let i = 0; i < count; i++) {
|
|
26
|
+
const headerOffset = offset + (i * size);
|
|
27
|
+
const type = elf.readUInt32LE(headerOffset);
|
|
28
|
+
if (type === 3) {
|
|
29
|
+
const fileOffset = elf.readUInt32LE(headerOffset + 8);
|
|
30
|
+
const fileSize = elf.readUInt32LE(headerOffset + 32);
|
|
31
|
+
return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, '');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
module.exports = {
|
|
38
|
+
interpreterPath
|
|
39
|
+
};
|
|
@@ -5,37 +5,47 @@
|
|
|
5
5
|
|
|
6
6
|
const fs = require('fs');
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* The path where we can find the ldd
|
|
10
|
-
*/
|
|
11
8
|
const LDD_PATH = '/usr/bin/ldd';
|
|
9
|
+
const SELF_PATH = '/proc/self/exe';
|
|
10
|
+
const MAX_LENGTH = 2048;
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Read the content of a file synchronous
|
|
15
14
|
*
|
|
16
15
|
* @param {string} path
|
|
17
|
-
* @returns {
|
|
16
|
+
* @returns {Buffer}
|
|
18
17
|
*/
|
|
19
|
-
const readFileSync = (path) =>
|
|
18
|
+
const readFileSync = (path) => {
|
|
19
|
+
const fd = fs.openSync(path, 'r');
|
|
20
|
+
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
21
|
+
const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
|
|
22
|
+
fs.close(fd, () => {});
|
|
23
|
+
return buffer.subarray(0, bytesRead);
|
|
24
|
+
};
|
|
20
25
|
|
|
21
26
|
/**
|
|
22
27
|
* Read the content of a file
|
|
23
28
|
*
|
|
24
29
|
* @param {string} path
|
|
25
|
-
* @returns {Promise<
|
|
30
|
+
* @returns {Promise<Buffer>}
|
|
26
31
|
*/
|
|
27
32
|
const readFile = (path) => new Promise((resolve, reject) => {
|
|
28
|
-
fs.
|
|
33
|
+
fs.open(path, 'r', (err, fd) => {
|
|
29
34
|
if (err) {
|
|
30
35
|
reject(err);
|
|
31
36
|
} else {
|
|
32
|
-
|
|
37
|
+
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
38
|
+
fs.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
|
|
39
|
+
resolve(buffer.subarray(0, bytesRead));
|
|
40
|
+
fs.close(fd, () => {});
|
|
41
|
+
});
|
|
33
42
|
}
|
|
34
43
|
});
|
|
35
44
|
});
|
|
36
45
|
|
|
37
46
|
module.exports = {
|
|
38
47
|
LDD_PATH,
|
|
48
|
+
SELF_PATH,
|
|
39
49
|
readFileSync,
|
|
40
50
|
readFile
|
|
41
51
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "detect-libc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Node.js module to detect the C standard library (libc) implementation family and version",
|
|
5
5
|
"main": "lib/detect-libc.js",
|
|
6
6
|
"files": [
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js",
|
|
12
|
+
"changelog": "conventional-changelog -i CHANGELOG.md -s",
|
|
12
13
|
"bench": "node benchmark/detect-libc",
|
|
13
14
|
"bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js"
|
|
14
15
|
},
|
|
15
16
|
"repository": {
|
|
16
17
|
"type": "git",
|
|
17
|
-
"url": "git://github.com/lovell/detect-libc"
|
|
18
|
+
"url": "git://github.com/lovell/detect-libc.git"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [
|
|
20
21
|
"libc",
|
|
@@ -30,6 +31,8 @@
|
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"ava": "^2.4.0",
|
|
32
33
|
"benchmark": "^2.1.4",
|
|
34
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
35
|
+
"eslint-config-standard": "^13.0.1",
|
|
33
36
|
"nyc": "^15.1.0",
|
|
34
37
|
"proxyquire": "^2.1.3",
|
|
35
38
|
"semistandard": "^14.2.3"
|
|
@@ -60,7 +60,13 @@ export function unflatten(parsed, revivers) {
|
|
|
60
60
|
|
|
61
61
|
const reviver = revivers?.[type];
|
|
62
62
|
if (reviver) {
|
|
63
|
-
|
|
63
|
+
let i = value[1];
|
|
64
|
+
if (typeof i !== 'number') {
|
|
65
|
+
// if it's not a number, it was serialized by a builtin reviver
|
|
66
|
+
// so we need to munge it into the format expected by a custom reviver
|
|
67
|
+
i = values.push(value[1]) - 1;
|
|
68
|
+
}
|
|
69
|
+
return (hydrated[index] = reviver(hydrate(i)));
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
switch (type) {
|
|
@@ -17,7 +17,7 @@ const reserved =
|
|
|
17
17
|
/**
|
|
18
18
|
* Turn a value into the JavaScript that creates an equivalent value
|
|
19
19
|
* @param {any} value
|
|
20
|
-
* @param {(value: any) => string | void} [replacer]
|
|
20
|
+
* @param {(value: any, uneval: (value: any) => string) => string | void} [replacer]
|
|
21
21
|
*/
|
|
22
22
|
export function uneval(value, replacer) {
|
|
23
23
|
const counts = new Map();
|
|
@@ -42,7 +42,7 @@ export function uneval(value, replacer) {
|
|
|
42
42
|
counts.set(thing, 1);
|
|
43
43
|
|
|
44
44
|
if (replacer) {
|
|
45
|
-
const str = replacer(thing);
|
|
45
|
+
const str = replacer(thing, (value) => uneval(value, replacer));
|
|
46
46
|
|
|
47
47
|
if (typeof str === 'string') {
|
|
48
48
|
custom.set(thing, str);
|
|
@@ -245,17 +245,18 @@ export function uneval(value, replacer) {
|
|
|
245
245
|
return `${type}.from(${stringify_string(thing.toString())})`;
|
|
246
246
|
|
|
247
247
|
default:
|
|
248
|
-
const
|
|
248
|
+
const keys = Object.keys(thing);
|
|
249
|
+
const obj = keys
|
|
249
250
|
.map((key) => `${safe_key(key)}:${stringify(thing[key])}`)
|
|
250
|
-
.join(',')
|
|
251
|
+
.join(',');
|
|
251
252
|
const proto = Object.getPrototypeOf(thing);
|
|
252
253
|
if (proto === null) {
|
|
253
|
-
return
|
|
254
|
-
? `
|
|
255
|
-
: `
|
|
254
|
+
return keys.length > 0
|
|
255
|
+
? `{${obj},__proto__:null}`
|
|
256
|
+
: `{__proto__:null}`;
|
|
256
257
|
}
|
|
257
258
|
|
|
258
|
-
return obj
|
|
259
|
+
return `{${obj}}`;
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
|