@swirls/cli 0.0.12 → 0.0.14
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 +91 -0
- package/dist/bash-complete.js +1 -1
- package/dist/{chunk-DYXVDG23.js → chunk-QY4A67JY.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +5 -4
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @swirls/cli
|
|
2
|
+
|
|
3
|
+
Swirls command line application for authentication, project setup, code generation, and storage.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
The Swirls CLI can be executed remotely or installed on your machine.
|
|
8
|
+
|
|
9
|
+
### Remote
|
|
10
|
+
|
|
11
|
+
Run with `npx`
|
|
12
|
+
```sh
|
|
13
|
+
npx @swirls/cli <command> [options]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Local
|
|
17
|
+
|
|
18
|
+
Install
|
|
19
|
+
```sh
|
|
20
|
+
npm install -g @swirls/cli
|
|
21
|
+
# or
|
|
22
|
+
bun add -g @swirls/cli
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Run with `swirls`
|
|
26
|
+
```sh
|
|
27
|
+
swirls <command> [options]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
In the command tables below, replace `swirls` with `npx @swirls/cli` when running remotely.
|
|
31
|
+
|
|
32
|
+
## Reference
|
|
33
|
+
|
|
34
|
+
Run `swirls --help` or `npx @swirls/cli --help` for a reference guide. Use `-v` or `--version` to print the CLI version.
|
|
35
|
+
|
|
36
|
+
### Remote
|
|
37
|
+
```sh
|
|
38
|
+
npx @swirls/cli --help
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Local
|
|
42
|
+
```sh
|
|
43
|
+
swirls --help
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Commands
|
|
47
|
+
|
|
48
|
+
### Auth
|
|
49
|
+
|
|
50
|
+
Log in and out of Swirls.
|
|
51
|
+
|
|
52
|
+
| Command | Description |
|
|
53
|
+
|---------|-------------|
|
|
54
|
+
| `swirls auth login` | Log in with an existing account |
|
|
55
|
+
| `swirls auth logout` | Log out |
|
|
56
|
+
|
|
57
|
+
### Dev
|
|
58
|
+
|
|
59
|
+
Configure Swirls and generate code.
|
|
60
|
+
|
|
61
|
+
| Command | Description |
|
|
62
|
+
|---------|-------------|
|
|
63
|
+
| `swirls dev init` | Initialize Swirls configuration file (`swirls.config.ts`) |
|
|
64
|
+
| `swirls dev gen` | Generate application code and types from your Swirls project |
|
|
65
|
+
|
|
66
|
+
### Project
|
|
67
|
+
|
|
68
|
+
Create and manage Swirls projects.
|
|
69
|
+
|
|
70
|
+
| Command | Description |
|
|
71
|
+
|---------|-------------|
|
|
72
|
+
| `swirls project create <name>` | Create a new project |
|
|
73
|
+
|
|
74
|
+
### Storage
|
|
75
|
+
|
|
76
|
+
File storage for your Swirls project. List, upload, download, delete, and get signed URLs for files.
|
|
77
|
+
|
|
78
|
+
| Command | Description |
|
|
79
|
+
|---------|-------------|
|
|
80
|
+
| `swirls storage list [path]` | List files in storage (optional path) |
|
|
81
|
+
| `swirls storage upload <file> [dest]` | Upload a file to storage |
|
|
82
|
+
| `swirls storage download <path> <dest>` | Download a file from storage |
|
|
83
|
+
| `swirls storage delete <path>` | Delete a file from storage |
|
|
84
|
+
| `swirls storage url [--expires value] <path>` | Get a signed URL for a file |
|
|
85
|
+
|
|
86
|
+
### Storage Flags
|
|
87
|
+
|
|
88
|
+
| Flag | Description |
|
|
89
|
+
|------|-------------|
|
|
90
|
+
| `--project <value>` | Project to use (optional; applies to all storage commands) |
|
|
91
|
+
| `--expires <value>` | Expiration for the signed URL (optional; for `swirls storage url` only) |
|
package/dist/bash-complete.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as o,b as s}from"./chunk-
|
|
2
|
+
import{a as o,b as s}from"./chunk-QY4A67JY.js";import{proposeCompletions as r}from"@stricli/core";var t=process.argv.slice(3);process.env.COMP_LINE?.endsWith(" ")&&t.push("");await r(o,t,s(process));try{for(let{completion:p}of await r(o,t,s(process)))process.stdout.write(`${p}
|
|
3
3
|
`)}catch{}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildInstallCommand as R,buildUninstallCommand as L}from"@stricli/auto-complete";import{buildApplication as D,buildRouteMap as I}from"@stricli/core";import{buildCommand as r,buildRouteMap as u}from"@stricli/core";var m=r({loader:async()=>{let{login:e}=await import("./implementation-26623XVE.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Log in with an existing account"}}),f=r({loader:async()=>{let{logout:e}=await import("./implementation-26623XVE.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Log out of an existing account"}}),i=u({routes:{login:m,logout:f},docs:{brief:"Auth commands"}});import{buildCommand as a,buildRouteMap as g}from"@stricli/core";var b=a({loader:async()=>{let{generateCode:e}=await import("./generate-code-OKMZDZXA.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Generate application code and types"}}),h=a({loader:async()=>{let{initializeConfig:e}=await import("./initialize-config-DKTZP3W4.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Initialize Swirls configuration file"}}),s=g({routes:{gen:b,init:h},docs:{brief:"Developer commands"}});import{buildCommand as k,buildRouteMap as C}from"@stricli/core";var w=k({loader:async()=>{let{createProject:e}=await import("./create-project-HOGHQFPY.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Project name",parse:String,placeholder:"name"}]}},docs:{brief:"Create a new project"}}),n=C({routes:{create:w},docs:{brief:"Project commands"}});import{buildCommand as t,buildRouteMap as j}from"@stricli/core";var S=t({loader:async()=>{let{list:e}=await import("./list-O3YBIAFJ.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to list (optional)",parse:String,placeholder:"path",optional:!0}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"List files in storage"}}),y=t({loader:async()=>{let{upload:e}=await import("./upload-L5G6SWZJ.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Local file path to upload",parse:String,placeholder:"file"},{brief:"Destination path in storage (optional)",parse:String,placeholder:"dest",optional:!0}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"Upload a file to storage"}}),x=t({loader:async()=>{let{download:e}=await import("./download-3FOT4FPQ.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"},{brief:"Local destination path",parse:String,placeholder:"dest"}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"Download a file from storage"}}),v=t({loader:async()=>{let{deleteFile:e}=await import("./delete-RSC6OYLX.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"Delete a file from storage"}}),P=t({loader:async()=>{let{url:e}=await import("./url-LHTDDDUD.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0},expires:{kind:"parsed",brief:"Expiration time in seconds (default: 86400 = 24 hours)",parse:Number,optional:!0}}},docs:{brief:"Get a signed URL for a file"}}),p=j({routes:{list:S,upload:y,download:x,delete:v,url:P},docs:{brief:"Storage commands"}});var l="@swirls/cli",c="0.0.
|
|
1
|
+
import{buildInstallCommand as R,buildUninstallCommand as L}from"@stricli/auto-complete";import{buildApplication as D,buildRouteMap as I}from"@stricli/core";import{buildCommand as r,buildRouteMap as u}from"@stricli/core";var m=r({loader:async()=>{let{login:e}=await import("./implementation-26623XVE.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Log in with an existing account"}}),f=r({loader:async()=>{let{logout:e}=await import("./implementation-26623XVE.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Log out of an existing account"}}),i=u({routes:{login:m,logout:f},docs:{brief:"Auth commands"}});import{buildCommand as a,buildRouteMap as g}from"@stricli/core";var b=a({loader:async()=>{let{generateCode:e}=await import("./generate-code-OKMZDZXA.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Generate application code and types"}}),h=a({loader:async()=>{let{initializeConfig:e}=await import("./initialize-config-DKTZP3W4.js");return e},parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Initialize Swirls configuration file"}}),s=g({routes:{gen:b,init:h},docs:{brief:"Developer commands"}});import{buildCommand as k,buildRouteMap as C}from"@stricli/core";var w=k({loader:async()=>{let{createProject:e}=await import("./create-project-HOGHQFPY.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Project name",parse:String,placeholder:"name"}]}},docs:{brief:"Create a new project"}}),n=C({routes:{create:w},docs:{brief:"Project commands"}});import{buildCommand as t,buildRouteMap as j}from"@stricli/core";var S=t({loader:async()=>{let{list:e}=await import("./list-O3YBIAFJ.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to list (optional)",parse:String,placeholder:"path",optional:!0}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"List files in storage"}}),y=t({loader:async()=>{let{upload:e}=await import("./upload-L5G6SWZJ.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Local file path to upload",parse:String,placeholder:"file"},{brief:"Destination path in storage (optional)",parse:String,placeholder:"dest",optional:!0}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"Upload a file to storage"}}),x=t({loader:async()=>{let{download:e}=await import("./download-3FOT4FPQ.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"},{brief:"Local destination path",parse:String,placeholder:"dest"}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"Download a file from storage"}}),v=t({loader:async()=>{let{deleteFile:e}=await import("./delete-RSC6OYLX.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0}}},docs:{brief:"Delete a file from storage"}}),P=t({loader:async()=>{let{url:e}=await import("./url-LHTDDDUD.js");return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"}]},flags:{project:{kind:"parsed",brief:"Project ID (uses config if not specified)",parse:String,optional:!0},expires:{kind:"parsed",brief:"Expiration time in seconds (default: 86400 = 24 hours)",parse:Number,optional:!0}}},docs:{brief:"Get a signed URL for a file"}}),p=j({routes:{list:S,upload:y,download:x,delete:v,url:P},docs:{brief:"Storage commands"}});var l="@swirls/cli",c="0.0.14",d="Swirls command line application";var _=I({routes:{auth:i,dev:s,project:n,storage:p,install:R("cli",{bash:"__cli_bash_complete"}),uninstall:L("cli",{bash:!0})},docs:{brief:d,hideRoute:{install:!0,uninstall:!0}}}),Y=D(_,{name:l,versionInfo:{currentVersion:c}});import z from"fs";import M from"fs/promises";import N from"os";import A from"path";function ie(e){return{fs:z,fsPromise:M,os:N,path:A,process:e}}export{Y as a,ie as b};
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as r,b as o}from"./chunk-
|
|
2
|
+
import{a as r,b as o}from"./chunk-QY4A67JY.js";import{run as i}from"@stricli/core";await i(r,process.argv.slice(2),o(process));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swirls/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Swirls command line application",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Swirls",
|
|
@@ -20,17 +20,18 @@
|
|
|
20
20
|
"build": "if [ \"$SWIRLS_ENV\" = 'production' ]; then tsup; elif command -v op >/dev/null 2>&1; then op run --no-masking --env-file=.env.development -- tsup; else tsup; fi",
|
|
21
21
|
"postbuild": "chmod +x ./dist/cli.js",
|
|
22
22
|
"dev": "op run --no-masking --env-file=.env.development -- tsup --watch",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"pkg:publish": "bun publish",
|
|
24
|
+
"prepublishOnly": "SWIRLS_ENV=production bun run build"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@byteslice/result": "0.3.0",
|
|
28
28
|
"@clerk/clerk-js": "5.109.2",
|
|
29
|
+
"@clerk/shared": "3.44.0",
|
|
29
30
|
"@orpc/client": "1.12.2",
|
|
30
31
|
"@orpc/contract": "1.12.2",
|
|
31
32
|
"@stricli/auto-complete": "1.2.4",
|
|
32
33
|
"@stricli/core": "1.2.4",
|
|
33
|
-
"@swirls/sdk": "0.0.
|
|
34
|
+
"@swirls/sdk": "0.0.3",
|
|
34
35
|
"ink": "6.4.0",
|
|
35
36
|
"ink-select-input": "6.2.0",
|
|
36
37
|
"ink-spinner": "5.0.0",
|