shipstatic 1.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 shipstatic
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,51 @@
1
+ # shipstatic
2
+
3
+ CLI and SDK for [ShipStatic](https://shipstatic.com) — deploy static websites, landing pages, and prototypes instantly from the terminal or code.
4
+
5
+ ## Deploy in seconds — no install, no account
6
+
7
+ ```bash
8
+ npx shipstatic ./dist
9
+ ```
10
+
11
+ That's it. Your site is live on `*.shipstatic.com`. No sign-up, no config, no global install. Got Node? You're ready.
12
+
13
+ The output includes a **claim URL** — visit it to keep the site permanently. Anonymous deployments are public and expire in 3 days.
14
+
15
+ ```javascript
16
+ import Ship from 'shipstatic';
17
+
18
+ const ship = new Ship();
19
+ const result = await ship.deploy('./dist');
20
+ // result.deployment → live URL (happy-cat-abc1234.shipstatic.com)
21
+ // result.claim → visit to keep permanently
22
+ ```
23
+
24
+ ## Install (optional, for repeat use)
25
+
26
+ ```bash
27
+ npm install -g shipstatic # global CLI — the `ship` command
28
+ ```
29
+
30
+ > As a project dependency: `npm install shipstatic`
31
+
32
+ ## What this package is
33
+
34
+ `shipstatic` is the unscoped name for [`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship). It forwards to that package and has **no API of its own** — same CLI, same SDK, shorter name.
35
+
36
+ The two are interchangeable. Install whichever name you prefer; both resolve to the same implementation, so nothing behaves differently:
37
+
38
+ ```javascript
39
+ import Ship from 'shipstatic'; // these are
40
+ import Ship from '@shipstatic/ship'; // the same thing
41
+ ```
42
+
43
+ ## Documentation
44
+
45
+ Every command, SDK method, authentication mode, and custom-domain flow is documented **once**, in [`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship).
46
+
47
+ This README deliberately does not restate any of it. A forwarder that copies its target's documentation is just a second copy to keep true — and the day it stops being true, it is worse than no documentation at all.
48
+
49
+ ## License
50
+
51
+ MIT
package/bin.cjs ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ // The `ship` binary, forwarded.
3
+ //
4
+ // Loaded IN-PROCESS, never spawned. `@shipstatic/ship`'s command tree
5
+ // deliberately avoids `process.exit` so buffered stdout survives a pipe; a
6
+ // spawning trampoline would reintroduce exactly the truncation class that
7
+ // design exists to prevent, and would have to re-plumb exit codes and signals
8
+ // besides. Requiring it means this process IS the CLI.
9
+ //
10
+ // `@shipstatic/ship/cli` is a declared subpath (added in ship 1.1.0). Before
11
+ // that it did not exist, and reaching `dist/cli.cjs` meant path-joining off
12
+ // the resolved main entry — past the exports map whose whole job is to say
13
+ // what is reachable. Do not reintroduce that; raise the dependency instead.
14
+ require('@shipstatic/ship/cli');
package/index.cjs ADDED
@@ -0,0 +1,9 @@
1
+ // The CJS forward.
2
+ //
3
+ // Assigning the required namespace wholesale — rather than re-exporting names
4
+ // one by one — is what keeps this file from being a list that drifts. Ship's
5
+ // own CJS entry is itself an assignment (`module.exports = Ship` plus every
6
+ // named export and a `default`, applied by its post-build step), so forwarding
7
+ // the object preserves the callable-constructor shape, the named exports and
8
+ // `.default` in one line, and gains any export ship adds for free.
9
+ module.exports = require('@shipstatic/ship');
package/index.d.cts ADDED
@@ -0,0 +1,9 @@
1
+ // Types for the CJS forward.
2
+ //
3
+ // A separate file per module format, rather than one shared `.d.ts`, because
4
+ // TypeScript resolves declarations through the SAME conditions as the runtime:
5
+ // under `node16` a `require` of this package must land on CJS types and an
6
+ // `import` on ESM types. One shared file makes `attw` report a format mismatch
7
+ // on whichever half it does not match.
8
+ export * from '@shipstatic/ship';
9
+ export { default } from '@shipstatic/ship';
package/index.d.mts ADDED
@@ -0,0 +1,3 @@
1
+ // Types for the ESM forward. See index.d.cts for why the two are separate.
2
+ export * from '@shipstatic/ship';
3
+ export { default } from '@shipstatic/ship';
package/index.mjs ADDED
@@ -0,0 +1,14 @@
1
+ // The ESM forward, and the browser one.
2
+ //
3
+ // `export *` does NOT carry a default export — that is a language rule, not an
4
+ // oversight — so the second line is load-bearing: without it
5
+ // `import Ship from 'shipstatic'` resolves to undefined while every named
6
+ // import keeps working, which is the kind of break that reaches users rather
7
+ // than CI.
8
+ //
9
+ // This file is also the `browser` condition's target. The specifier below is
10
+ // bare, so a bundler re-resolves `@shipstatic/ship` under its OWN conditions
11
+ // and lands on ship's browser build — the forward stays correct per-platform
12
+ // without this package naming a platform anywhere.
13
+ export * from '@shipstatic/ship';
14
+ export { default } from '@shipstatic/ship';
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "shipstatic",
3
+ "version": "1.1.0",
4
+ "description": "CLI and SDK for ShipStatic — deploy static websites, landing pages, and prototypes instantly. The unscoped name for @shipstatic/ship.",
5
+ "keywords": [
6
+ "shipstatic",
7
+ "static-hosting",
8
+ "deploy",
9
+ "cli",
10
+ "sdk"
11
+ ],
12
+ "homepage": "https://shipstatic.com",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/shipstatic/shipstatic.git"
16
+ },
17
+ "license": "MIT",
18
+ "type": "module",
19
+ "bin": {
20
+ "ship": "./bin.cjs"
21
+ },
22
+ "main": "./index.cjs",
23
+ "module": "./index.mjs",
24
+ "types": "./index.d.cts",
25
+ "exports": {
26
+ ".": {
27
+ "browser": {
28
+ "types": "./index.d.mts",
29
+ "default": "./index.mjs"
30
+ },
31
+ "import": {
32
+ "types": "./index.d.mts",
33
+ "default": "./index.mjs"
34
+ },
35
+ "require": {
36
+ "types": "./index.d.cts",
37
+ "default": "./index.cjs"
38
+ }
39
+ },
40
+ "./cli": "./bin.cjs",
41
+ "./package.json": "./package.json"
42
+ },
43
+ "files": [
44
+ "bin.cjs",
45
+ "index.cjs",
46
+ "index.mjs",
47
+ "index.d.cts",
48
+ "index.d.mts",
49
+ "README.md"
50
+ ],
51
+ "sideEffects": false,
52
+ "engines": {
53
+ "node": ">=20.0.0"
54
+ },
55
+ "packageManager": "pnpm@10.12.4",
56
+ "scripts": {
57
+ "test": "vitest",
58
+ "test:ci": "vitest --run",
59
+ "check:package": "publint && attw --pack . --ignore-rules false-export-default --exclude-entrypoints cli",
60
+ "prepare": "git config core.hooksPath scripts/githooks",
61
+ "lint": "biome check .",
62
+ "format": "biome format --write ."
63
+ },
64
+ "dependencies": {
65
+ "@shipstatic/ship": "^1.1.0"
66
+ },
67
+ "devDependencies": {
68
+ "@arethetypeswrong/cli": "^0.18.5",
69
+ "@biomejs/biome": "2.5.5",
70
+ "publint": "^0.3.12",
71
+ "vitest": "^4.1.10"
72
+ }
73
+ }