somewhere-cli 0.14.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 +17 -0
- package/bin/somewhere.js +8 -0
- package/bin/sw.js +8 -0
- package/bin/swpm.js +8 -0
- package/bin/swpx.js +11 -0
- package/package.json +26 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# somewhere-cli
|
|
2
|
+
|
|
3
|
+
The friendly install name for the [somewhere.tech](https://somewhere.tech) CLI.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm i -g somewhere-cli
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Gives you the `somewhere`, `sw`, `swpx`, and `swpm` commands. This is a thin
|
|
10
|
+
wrapper — all the code lives in [`@somewhere-tech/cli`](https://www.npmjs.com/package/@somewhere-tech/cli),
|
|
11
|
+
which this package installs and re-execs. Use either name; they're the same tool.
|
|
12
|
+
|
|
13
|
+
- `swpx <pkg>` — run a package with `npx` after a security verdict check
|
|
14
|
+
- `swpm install` — `npm install` with an install-time verdict check
|
|
15
|
+
- `somewhere deploy` / `login` / `db` / … — the platform CLI
|
|
16
|
+
|
|
17
|
+
MIT © somewhere.tech
|
package/bin/somewhere.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Re-exec the real `somewhere` bin from @somewhere-tech/cli (see swpx.js).
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const root = dirname(createRequire(import.meta.url).resolve('@somewhere-tech/cli/package.json'));
|
|
8
|
+
await import(pathToFileURL(join(root, 'bin', 'somewhere.js')).href);
|
package/bin/sw.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `sw` is the short alias — same target as `somewhere` (see swpx.js).
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const root = dirname(createRequire(import.meta.url).resolve('@somewhere-tech/cli/package.json'));
|
|
8
|
+
await import(pathToFileURL(join(root, 'bin', 'somewhere.js')).href);
|
package/bin/swpm.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Re-exec the real `swpm` bin from @somewhere-tech/cli (see swpx.js for why).
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const root = dirname(createRequire(import.meta.url).resolve('@somewhere-tech/cli/package.json'));
|
|
8
|
+
await import(pathToFileURL(join(root, 'bin', 'swpm.js')).href);
|
package/bin/swpx.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// somewhere-cli is just a friendlier install name. All logic lives in
|
|
3
|
+
// @somewhere-tech/cli — we resolve its install dir and run its real `swpx` bin
|
|
4
|
+
// in-process (it reads process.argv itself). Resolving via package.json works
|
|
5
|
+
// regardless of the dependency's `exports` map.
|
|
6
|
+
import { createRequire } from 'node:module';
|
|
7
|
+
import { dirname, join } from 'node:path';
|
|
8
|
+
import { pathToFileURL } from 'node:url';
|
|
9
|
+
|
|
10
|
+
const root = dirname(createRequire(import.meta.url).resolve('@somewhere-tech/cli/package.json'));
|
|
11
|
+
await import(pathToFileURL(join(root, 'bin', 'swpx.js')).href);
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "somewhere-cli",
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"description": "Friendly installer for the somewhere.tech CLI — gives you the somewhere, sw, swpx, and swpm commands. Thin wrapper around @somewhere-tech/cli.",
|
|
5
|
+
"keywords": ["somewhere", "somewhere.tech", "cli", "swpx", "swpm", "npm", "security"],
|
|
6
|
+
"homepage": "https://somewhere.tech",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Somewhere-Tech/somewhere-cli-installer.git"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"bin": {
|
|
14
|
+
"somewhere": "bin/somewhere.js",
|
|
15
|
+
"sw": "bin/sw.js",
|
|
16
|
+
"swpx": "bin/swpx.js",
|
|
17
|
+
"swpm": "bin/swpm.js"
|
|
18
|
+
},
|
|
19
|
+
"files": ["bin"],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@somewhere-tech/cli": ">=0.14.0 <1.0.0"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
}
|
|
26
|
+
}
|