@tungcorn/spacelens 0.1.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/LICENSE +21 -0
- package/README.md +75 -0
- package/bin/launch.js +88 -0
- package/bin/spacelens-gui.js +6 -0
- package/bin/spacelens.js +6 -0
- package/licenses/GPL-3.0.txt +674 -0
- package/licenses/LGPL-3.0.txt +165 -0
- package/licenses/QT_SOURCE_IDENTITY.txt +14 -0
- package/licenses/QT_SOURCE_OFFER.md +66 -0
- package/licenses/README.txt +21 -0
- package/licenses/THIRD_PARTY_NOTICES.txt +87 -0
- package/native/LICENSE +21 -0
- package/native/Qt6Core.dll +0 -0
- package/native/Qt6Gui.dll +0 -0
- package/native/Qt6Network.dll +0 -0
- package/native/Qt6Svg.dll +0 -0
- package/native/Qt6Widgets.dll +0 -0
- package/native/README.txt +34 -0
- package/native/THIRD_PARTY_NOTICES.txt +87 -0
- package/native/generic/qtuiotouchplugin.dll +0 -0
- package/native/iconengines/qsvgicon.dll +0 -0
- package/native/imageformats/qgif.dll +0 -0
- package/native/imageformats/qico.dll +0 -0
- package/native/imageformats/qjpeg.dll +0 -0
- package/native/imageformats/qsvg.dll +0 -0
- package/native/licenses/GPL-3.0.txt +674 -0
- package/native/licenses/LGPL-3.0.txt +165 -0
- package/native/licenses/QT_SOURCE_IDENTITY.txt +14 -0
- package/native/licenses/QT_SOURCE_OFFER.md +66 -0
- package/native/licenses/README.txt +21 -0
- package/native/networkinformation/qnetworklistmanager.dll +0 -0
- package/native/opengl32sw.dll +0 -0
- package/native/platforms/qwindows.dll +0 -0
- package/native/spacelens-gui.exe +0 -0
- package/native/spacelens.exe +0 -0
- package/native/styles/qmodernwindowsstyle.dll +0 -0
- package/native/tls/qcertonlybackend.dll +0 -0
- package/native/tls/qschannelbackend.dll +0 -0
- package/native/translations/qt_ar.qm +0 -0
- package/native/translations/qt_bg.qm +0 -0
- package/native/translations/qt_ca.qm +0 -0
- package/native/translations/qt_cs.qm +0 -0
- package/native/translations/qt_da.qm +0 -0
- package/native/translations/qt_de.qm +0 -0
- package/native/translations/qt_en.qm +0 -0
- package/native/translations/qt_es.qm +0 -0
- package/native/translations/qt_fa.qm +0 -0
- package/native/translations/qt_fi.qm +0 -0
- package/native/translations/qt_fr.qm +0 -0
- package/native/translations/qt_gd.qm +0 -0
- package/native/translations/qt_he.qm +0 -0
- package/native/translations/qt_hr.qm +0 -0
- package/native/translations/qt_hu.qm +0 -0
- package/native/translations/qt_it.qm +0 -0
- package/native/translations/qt_ja.qm +0 -0
- package/native/translations/qt_ka.qm +0 -0
- package/native/translations/qt_ko.qm +0 -0
- package/native/translations/qt_lg.qm +0 -0
- package/native/translations/qt_lv.qm +0 -0
- package/native/translations/qt_nl.qm +0 -0
- package/native/translations/qt_nn.qm +0 -0
- package/native/translations/qt_pl.qm +0 -0
- package/native/translations/qt_pt_BR.qm +0 -0
- package/native/translations/qt_ru.qm +0 -0
- package/native/translations/qt_sk.qm +0 -0
- package/native/translations/qt_tr.qm +0 -0
- package/native/translations/qt_uk.qm +0 -0
- package/native/translations/qt_zh_CN.qm +0 -0
- package/native/translations/qt_zh_TW.qm +0 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tungcorn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @tungcorn/spacelens
|
|
2
|
+
|
|
3
|
+
SpaceLens is native C++ storage intelligence for Windows.
|
|
4
|
+
|
|
5
|
+
This npm package is an installation channel. It contains the complete
|
|
6
|
+
v0.1.1 distribution: the desktop GUI and the read-only CLI, plus the Qt
|
|
7
|
+
6.8.3 runtime those binaries need. Node and npm are required only to
|
|
8
|
+
install and launch this package. SpaceLens itself remains native C++.
|
|
9
|
+
|
|
10
|
+
This is not a Node SDK. The wrappers do not add commands, transform
|
|
11
|
+
JSON, or authorize filesystem maintenance.
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
- Windows x64 only (`os: win32`, `cpu: x64`)
|
|
16
|
+
- Node.js 18+ (for the launchers)
|
|
17
|
+
- [Microsoft Visual C++ Redistributable (x64)](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist)
|
|
18
|
+
|
|
19
|
+
Binaries are unsigned.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
npm install -g @tungcorn/spacelens
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The tarball already includes the native runtime. Installation does not
|
|
28
|
+
download further GitHub or npm assets.
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
spacelens
|
|
34
|
+
spacelens-gui
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
CLI examples (real verbs from SpaceLens v0.1.1):
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
spacelens version
|
|
41
|
+
spacelens help
|
|
42
|
+
spacelens capabilities --json
|
|
43
|
+
spacelens scan C:\path\to\folder --json
|
|
44
|
+
spacelens top C:\path\to\folder --json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`spacelens ... --json` is safe for scripts and agents: the launcher
|
|
48
|
+
prints no banner and does not rewrite native stdout.
|
|
49
|
+
|
|
50
|
+
## Safety
|
|
51
|
+
|
|
52
|
+
The CLI is read-only.
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
spacelens capabilities --json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
reports `filesystem_mutation: false`.
|
|
59
|
+
|
|
60
|
+
The CLI cannot recycle, restore, delete, move, or declare locations.
|
|
61
|
+
Filesystem maintenance remains GUI-only and explicitly human-authorized
|
|
62
|
+
(Recycle Bin, after confirmation). The npm wrapper exposes no mutation
|
|
63
|
+
API.
|
|
64
|
+
|
|
65
|
+
Uninstalling the npm package removes the staged binaries and shims. It
|
|
66
|
+
does not delete `%LOCALAPPDATA%\SpaceLens\` (indexes, review state,
|
|
67
|
+
maintenance history).
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
SpaceLens-owned files are MIT. See `LICENSE`.
|
|
72
|
+
|
|
73
|
+
Qt remains under its own licenses (LGPL-3.0-only option for this
|
|
74
|
+
dynamic build). Qt is not MIT. Corresponding-source identity and the
|
|
75
|
+
written offer are in `licenses/`.
|
package/bin/launch.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
function packageRootFromBinDir(binDir) {
|
|
8
|
+
return path.join(binDir, '..');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function resolveNative(fileName, rootDir) {
|
|
12
|
+
if (typeof fileName !== 'string' || fileName.length === 0) {
|
|
13
|
+
throw new Error('native file name is required');
|
|
14
|
+
}
|
|
15
|
+
if (fileName !== path.basename(fileName) || /[\\/]/.test(fileName)) {
|
|
16
|
+
throw new Error('native file name must be a basename');
|
|
17
|
+
}
|
|
18
|
+
return path.join(rootDir, 'native', fileName);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function missingMessage(exePath) {
|
|
22
|
+
return `spacelens: native executable not found: ${exePath}\n`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function runNative(fileName, argv, options) {
|
|
26
|
+
const opts = options || {};
|
|
27
|
+
const rootDir = opts.packageRoot || packageRootFromBinDir(__dirname);
|
|
28
|
+
const exePath = opts.nativePath || resolveNative(fileName, rootDir);
|
|
29
|
+
const stdio = opts.stdio || 'inherit';
|
|
30
|
+
const args = Array.isArray(argv) ? argv : [];
|
|
31
|
+
|
|
32
|
+
if (!fs.existsSync(exePath)) {
|
|
33
|
+
const stderr = missingMessage(exePath);
|
|
34
|
+
if (stdio !== 'pipe') {
|
|
35
|
+
process.stderr.write(stderr);
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
status: 1,
|
|
39
|
+
signal: null,
|
|
40
|
+
stdout: '',
|
|
41
|
+
stderr,
|
|
42
|
+
error: new Error('native executable not found'),
|
|
43
|
+
exePath,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const result = spawnSync(exePath, args, {
|
|
48
|
+
stdio,
|
|
49
|
+
shell: false,
|
|
50
|
+
windowsHide: false,
|
|
51
|
+
encoding: stdio === 'pipe' ? opts.encoding || 'utf8' : undefined,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
if (result.error) {
|
|
55
|
+
const stderr = `spacelens: failed to start native executable: ${result.error.message}\n`;
|
|
56
|
+
if (stdio !== 'pipe') {
|
|
57
|
+
process.stderr.write(stderr);
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
status: 1,
|
|
61
|
+
signal: null,
|
|
62
|
+
stdout: result.stdout || '',
|
|
63
|
+
stderr: `${result.stderr || ''}${stderr}`,
|
|
64
|
+
error: result.error,
|
|
65
|
+
exePath,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
status: result.status === null ? 1 : result.status,
|
|
71
|
+
signal: result.signal,
|
|
72
|
+
stdout: result.stdout || '',
|
|
73
|
+
stderr: result.stderr || '',
|
|
74
|
+
error: null,
|
|
75
|
+
exePath,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function exitWithNative(fileName, argv) {
|
|
80
|
+
return runNative(fileName, argv, { stdio: 'inherit' }).status;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
module.exports = {
|
|
84
|
+
packageRootFromBinDir,
|
|
85
|
+
resolveNative,
|
|
86
|
+
runNative,
|
|
87
|
+
exitWithNative,
|
|
88
|
+
};
|