smallpen 0.0.0 → 0.1.0-alpha.11
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 +15 -14
- package/bin/smallpen.cjs +4 -0
- package/package.json +11 -30
- package/LICENSE +0 -21
- package/bin/smallpen.js +0 -4
- package/dist/index.d.mts +0 -6
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -21
- package/dist/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# smallpen
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Command-line interface for SmallPen, a local-file design workspace built on
|
|
4
|
+
strict `.smallpen` directory packages. It reads, validates, renders, and
|
|
5
|
+
edits packages through typed Operation Batches, with JSON output for agents.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Requires Node.js 24 or newer.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
```sh
|
|
10
|
+
npm install -g smallpen@alpha
|
|
11
|
+
smallpen --help
|
|
12
|
+
# Guided: answer each returned question with its continuation command.
|
|
13
|
+
smallpen init ./workspace --json
|
|
14
|
+
smallpen validate ./workspace/product.smallpen --json
|
|
15
|
+
smallpen render ./workspace/product.smallpen --output product.png --json
|
|
16
|
+
```
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
Every command has its own help: `smallpen <command> --help`.
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Arguments and exit codes are passed directly to the OpenPencil CLI. The original
|
|
16
|
-
`openpencil` command remains available through `@open-pencil/cli`.
|
|
17
|
-
|
|
18
|
-
## License
|
|
19
|
-
|
|
20
|
-
MIT
|
|
20
|
+
This package is a thin launcher for `@smallpen/cli`, which holds the
|
|
21
|
+
implementation.
|
package/bin/smallpen.cjs
ADDED
package/package.json
CHANGED
|
@@ -1,41 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smallpen",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "SmallPen command-line
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.mts",
|
|
10
|
-
"import": "./dist/index.mjs",
|
|
11
|
-
"default": "./dist/index.mjs"
|
|
12
|
-
}
|
|
3
|
+
"version": "0.1.0-alpha.11",
|
|
4
|
+
"description": "SmallPen command-line interface",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
13
7
|
},
|
|
14
|
-
"main": "./dist/index.mjs",
|
|
15
|
-
"types": "./dist/index.d.mts",
|
|
16
8
|
"bin": {
|
|
17
|
-
"smallpen": "./bin/smallpen.
|
|
9
|
+
"smallpen": "./bin/smallpen.cjs"
|
|
18
10
|
},
|
|
19
11
|
"files": [
|
|
20
|
-
"bin"
|
|
21
|
-
"dist",
|
|
22
|
-
"README.md",
|
|
23
|
-
"LICENSE"
|
|
12
|
+
"bin"
|
|
24
13
|
],
|
|
25
|
-
"sideEffects": false,
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/open-pencil/open-pencil.git",
|
|
29
|
-
"directory": "packages/smallpen-cli"
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://openpencil.dev",
|
|
32
|
-
"bugs": {
|
|
33
|
-
"url": "https://github.com/open-pencil/open-pencil/issues"
|
|
34
|
-
},
|
|
35
14
|
"dependencies": {
|
|
36
|
-
"@
|
|
15
|
+
"@smallpen/cli": "0.1.0-alpha.11"
|
|
37
16
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/SmallRaw/SmallPen.git",
|
|
20
|
+
"directory": "smallpen/apps/npm-cli"
|
|
40
21
|
}
|
|
41
22
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Danila Poyarkov
|
|
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/bin/smallpen.js
DELETED
package/dist/index.d.mts
DELETED
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";iBAIgB;iBASA,eAAe"}
|
package/dist/index.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { dirname, resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
//#region src/index.ts
|
|
5
|
-
function resolveOpenPencilCLI() {
|
|
6
|
-
try {
|
|
7
|
-
return fileURLToPath(import.meta.resolve("@open-pencil/cli/bin/openpencil.js"));
|
|
8
|
-
} catch {
|
|
9
|
-
const libraryEntry = fileURLToPath(import.meta.resolve("@open-pencil/cli/library"));
|
|
10
|
-
return resolve(dirname(libraryEntry), "..", "..", "bin", "openpencil.js");
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function runSmallPenCLI(args = process.argv.slice(2)) {
|
|
14
|
-
const result = spawnSync(process.execPath, [resolveOpenPencilCLI(), ...args], { stdio: "inherit" });
|
|
15
|
-
if (result.error) throw result.error;
|
|
16
|
-
return result.status ?? 1;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { resolveOpenPencilCLI, runSmallPenCLI };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { spawnSync } from 'node:child_process'\nimport { dirname, resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nexport function resolveOpenPencilCLI(): string {\n try {\n return fileURLToPath(import.meta.resolve('@open-pencil/cli/bin/openpencil.js'))\n } catch {\n const libraryEntry = fileURLToPath(import.meta.resolve('@open-pencil/cli/library'))\n return resolve(dirname(libraryEntry), '..', '..', 'bin', 'openpencil.js')\n }\n}\n\nexport function runSmallPenCLI(args: readonly string[] = process.argv.slice(2)): number {\n const result = spawnSync(process.execPath, [resolveOpenPencilCLI(), ...args], {\n stdio: 'inherit'\n })\n\n if (result.error) throw result.error\n return result.status ?? 1\n}\n"],"mappings":";;;;AAIA,SAAgB,uBAA+B;CAC7C,IAAI;EACF,OAAO,cAAc,YAAY,QAAQ,oCAAoC,CAAC;CAChF,QAAQ;EACN,MAAM,eAAe,cAAc,YAAY,QAAQ,0BAA0B,CAAC;EAClF,OAAO,QAAQ,QAAQ,YAAY,GAAG,MAAM,MAAM,OAAO,eAAe;CAC1E;AACF;AAEA,SAAgB,eAAe,OAA0B,QAAQ,KAAK,MAAM,CAAC,GAAW;CACtF,MAAM,SAAS,UAAU,QAAQ,UAAU,CAAC,qBAAqB,GAAG,GAAG,IAAI,GAAG,EAC5E,OAAO,UACT,CAAC;CAED,IAAI,OAAO,OAAO,MAAM,OAAO;CAC/B,OAAO,OAAO,UAAU;AAC1B"}
|