@serve.zone/cli 5.4.0 → 32.8.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/cli.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  process.env.CLI_CALL = 'true';
3
- const cliTool = await import('./dist_ts_cliclient/index.js');
4
- cliTool.runCli();
3
+ const cli = await import("./dist_ts_cliclient/index.js");
4
+ await cli.runCli();
@@ -1,7 +1,11 @@
1
1
  import * as plugins from './plugins.js';
2
2
  import { CliClient } from './classes.cliclient.js';
3
3
  export const runCli = async () => {
4
- const cliQenv = new plugins.qenv.Qenv();
4
+ // The directory the operator runs the CLI in is read for sources, exactly as before, but the
5
+ // `required:` list it may find there is never enforced: that list is the Cloudly server's own
6
+ // start-time contract, and none of a remote server's database, storage or keyring facts is this
7
+ // client's to hold. The one name this client needs is asked for by name on the next line.
8
+ const cliQenv = new plugins.qenv.Qenv(process.cwd(), undefined, false);
5
9
  const cloudlyUrl = await cliQenv.getEnvVarOnDemand('CLOUDLY_URL');
6
10
  const token = process.env.CLOUDLY_TOKEN;
7
11
  const username = process.env.CLOUDLY_USERNAME;
@@ -24,4 +28,4 @@ export const runCli = async () => {
24
28
  // Default action example: list clusters when invoked without subcommands
25
29
  await cliClient.getClusters();
26
30
  };
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90c19jbGljbGllbnQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxjQUFjLENBQUM7QUFDeEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRW5ELE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBRyxLQUFLLElBQUksRUFBRTtJQUMvQixNQUFNLE9BQU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ztJQUNILE1BQU0sU0FBUyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBRXhCLElBQUksS0FBSyxFQUFFLENBQUM7UUFDVixNQUFNLFNBQVMsQ0FBQyxrQkFBa0IsQ0FBQyxLQUFLLEVBQUUsRUFBRSxhQUFhLEVBQUUsSUFBSSxFQUFFLGlCQUFpQixFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7SUFDOUYsQ0FBQztTQUFNLElBQUksUUFBUSxJQUFJLFFBQVEsRUFBRSxDQUFDO1FBQ2hDLE1BQU0sU0FBUyxDQUFDLDRCQUE0QixDQUFDLFFBQVEsRUFBRSxRQUFRLENBQUMsQ0FBQztJQUNuRSxDQUFDO1NBQU0sQ0FBQztRQUNOLE9BQU8sQ0FBQyxHQUFHLENBQUMsa0ZBQWtGLENBQUMsQ0FBQztJQUNsRyxDQUFDO0lBRUQsTUFBTSxTQUFTLEdBQUcsSUFBSSxTQUFTLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDM0MseUVBQXlFO0lBQ3pFLE1BQU0sU0FBUyxDQUFDLFdBQVcsRUFBRSxDQUFDO0FBQ2hDLENBQUMsQ0FBQyJ9
package/package.json CHANGED
@@ -1,39 +1,69 @@
1
1
  {
2
+ "author": "Task Venture Capital GmbH",
3
+ "license": "MIT",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://code.foss.global/serve.zone/cloudly.git"
7
+ },
8
+ "homepage": "https://code.foss.global/serve.zone/cloudly#readme",
9
+ "bugs": {
10
+ "url": "https://code.foss.global/serve.zone/cloudly/issues"
11
+ },
12
+ "keywords": [
13
+ "multi-cloud management",
14
+ "Docker Swarmkit",
15
+ "container orchestration",
16
+ "cloud services",
17
+ "API integration",
18
+ "web interface",
19
+ "CLI",
20
+ "CI/CD integration",
21
+ "cloud providers",
22
+ "DigitalOcean",
23
+ "Hetzner Cloud",
24
+ "Cloudflare",
25
+ "TypeScript",
26
+ "Node.js",
27
+ "infrastructure automation",
28
+ "devOps",
29
+ "secret management",
30
+ "configuration management",
31
+ "task scheduling",
32
+ "logging",
33
+ "SSL management",
34
+ "system logging",
35
+ "cloud API client",
36
+ "frontend",
37
+ "backend",
38
+ "security"
39
+ ],
2
40
  "name": "@serve.zone/cli",
3
- "version": "5.4.0",
41
+ "version": "32.8.0",
4
42
  "type": "module",
5
- "description": "",
43
+ "description": "A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.",
44
+ "main": "./dist_ts_cliclient/index.js",
45
+ "types": "./dist_ts_cliclient/index.d.ts",
6
46
  "exports": {
7
47
  ".": {
48
+ "types": "./dist_ts_cliclient/index.d.ts",
8
49
  "import": "./dist_ts_cliclient/index.js"
9
50
  }
10
51
  },
11
52
  "dependencies": {
12
- "@serve.zone/api": "^5.3.4",
13
- "@serve.zone/interfaces": "^5.5.0",
14
- "@push.rocks/projectinfo": "^5.0.1",
15
- "@push.rocks/qenv": "^6.1.3",
16
- "@push.rocks/smartcli": "^4.0.11"
17
- },
18
- "devDependencies": {
19
- "@git.zone/tsbuild": "2.1.67"
53
+ "@serve.zone/api": "32.0.0",
54
+ "@serve.zone/interfaces": "32.18.0",
55
+ "@push.rocks/projectinfo": "^5.1.0",
56
+ "@push.rocks/qenv": "^8.1.0",
57
+ "@push.rocks/smartcli": "^4.3.0"
20
58
  },
21
- "files": [
22
- "ts/**/*",
23
- "ts_*/**/*",
24
- "dist/**/*",
25
- "dist_*/**/*",
26
- "dist_ts/**/*",
27
- "dist_ts_web/**/*",
28
- "assets/**/*",
29
- "cli.js",
30
- "npmextra.json",
31
- "readme.md"
32
- ],
33
59
  "bin": {
34
60
  "servezone": "./cli.js"
35
61
  },
36
- "scripts": {
37
- "build": "tsbuild tsfolders --allowimplicitany"
38
- }
62
+ "files": [
63
+ "ts_cliclient",
64
+ "dist_ts_cliclient",
65
+ "readme.md",
66
+ "license",
67
+ "cli.js"
68
+ ]
39
69
  }
package/readme.md CHANGED
@@ -20,10 +20,10 @@ It is not currently a full command tree for services, secrets, deployments, logs
20
20
 
21
21
  ## Installation
22
22
 
23
- The package is published from `cloudly/ts_cliclient` via `tspublish.json` under the name `@serve.zone/cli` with the `servezone` binary.
23
+ Every Cloudly release publishes the package from `cloudly/ts_cliclient`, through its `tspublish.json`, under the name `@serve.zone/cli` with the `servezone` binary and at the Cloudly version. Its registry versions therefore jump from 5.5.1 to Cloudly's 32.x line.
24
24
 
25
25
  ```sh
26
- pnpm add -g @serve.zone/cli
26
+ pnpm add --global @serve.zone/cli
27
27
  ```
28
28
 
29
29
  For local development inside the Cloudly repository, build the parent package:
@@ -52,11 +52,11 @@ CLOUDLY_PASSWORD=change-me \
52
52
  servezone
53
53
  ```
54
54
 
55
- When `CLOUDLY_TOKEN` is present, the CLI requests a stateful identity and asks Cloudly to tag the WebSocket connection. When username/password are present instead, it uses Cloudly's admin login flow. If no credentials are provided, the CLI prints a warning before attempting the default cluster-list operation.
55
+ When `CLOUDLY_TOKEN` is present, the CLI exchanges it for an identity and tags the WebSocket with a JWT-only credential. Cloudly verifies the JWT and reconstructs authoritative identity fields from persisted user data. Machine JWTs never outlive their source tokens, and cluster machine users must belong to exactly one persisted cluster. When username/password are present instead, the CLI uses Cloudly's admin login flow. If no credentials are provided, it prints a warning before attempting the default cluster-list operation.
56
56
 
57
57
  ## Programmatic Use
58
58
 
59
- The submodule exports the `runCli()` entry point and uses `CliClient` internally:
59
+ The published submodule exports the `runCli()` entry point. For automation, most callers should use `@serve.zone/api` directly; the internal `CliClient` currently wraps `CloudlyApiClient` only to run the default cluster-list action:
60
60
 
61
61
  ```ts
62
62
  import { CloudlyApiClient } from '@serve.zone/api';
@@ -81,7 +81,7 @@ await cli.getClusters();
81
81
  | `index.ts` | Runtime entry point for the published CLI. |
82
82
  | `classes.cliclient.ts` | Minimal client wrapper; currently exposes `getClusters()`. |
83
83
  | `plugins.ts` | Centralized imports for the submodule. |
84
- | `tspublish.json` | Published package name, dependencies, registry targets, and `servezone` bin metadata. |
84
+ | `tspublish.json` | Published package name, dependencies, `servezone` bin metadata, and `useBase`, which takes the registries from the release's npm target. |
85
85
 
86
86
  ## License and Legal Information
87
87
 
@@ -2,7 +2,11 @@ import * as plugins from './plugins.js';
2
2
  import { CliClient } from './classes.cliclient.js';
3
3
 
4
4
  export const runCli = async () => {
5
- const cliQenv = new plugins.qenv.Qenv();
5
+ // The directory the operator runs the CLI in is read for sources, exactly as before, but the
6
+ // `required:` list it may find there is never enforced: that list is the Cloudly server's own
7
+ // start-time contract, and none of a remote server's database, storage or keyring facts is this
8
+ // client's to hold. The one name this client needs is asked for by name on the next line.
9
+ const cliQenv = new plugins.qenv.Qenv(process.cwd(), undefined, false);
6
10
  const cloudlyUrl = await cliQenv.getEnvVarOnDemand('CLOUDLY_URL');
7
11
  const token = process.env.CLOUDLY_TOKEN;
8
12
  const username = process.env.CLOUDLY_USERNAME;
@@ -14,4 +14,4 @@ import * as qenv from '@push.rocks/qenv';
14
14
  export {
15
15
  projectinfo,
16
16
  qenv,
17
- }
17
+ }
@@ -20,10 +20,10 @@ It is not currently a full command tree for services, secrets, deployments, logs
20
20
 
21
21
  ## Installation
22
22
 
23
- The package is published from `cloudly/ts_cliclient` via `tspublish.json` under the name `@serve.zone/cli` with the `servezone` binary.
23
+ Every Cloudly release publishes the package from `cloudly/ts_cliclient`, through its `tspublish.json`, under the name `@serve.zone/cli` with the `servezone` binary and at the Cloudly version. Its registry versions therefore jump from 5.5.1 to Cloudly's 32.x line.
24
24
 
25
25
  ```sh
26
- pnpm add -g @serve.zone/cli
26
+ pnpm add --global @serve.zone/cli
27
27
  ```
28
28
 
29
29
  For local development inside the Cloudly repository, build the parent package:
@@ -52,11 +52,11 @@ CLOUDLY_PASSWORD=change-me \
52
52
  servezone
53
53
  ```
54
54
 
55
- When `CLOUDLY_TOKEN` is present, the CLI requests a stateful identity and asks Cloudly to tag the WebSocket connection. When username/password are present instead, it uses Cloudly's admin login flow. If no credentials are provided, the CLI prints a warning before attempting the default cluster-list operation.
55
+ When `CLOUDLY_TOKEN` is present, the CLI exchanges it for an identity and tags the WebSocket with a JWT-only credential. Cloudly verifies the JWT and reconstructs authoritative identity fields from persisted user data. Machine JWTs never outlive their source tokens, and cluster machine users must belong to exactly one persisted cluster. When username/password are present instead, the CLI uses Cloudly's admin login flow. If no credentials are provided, it prints a warning before attempting the default cluster-list operation.
56
56
 
57
57
  ## Programmatic Use
58
58
 
59
- The submodule exports the `runCli()` entry point and uses `CliClient` internally:
59
+ The published submodule exports the `runCli()` entry point. For automation, most callers should use `@serve.zone/api` directly; the internal `CliClient` currently wraps `CloudlyApiClient` only to run the default cluster-list action:
60
60
 
61
61
  ```ts
62
62
  import { CloudlyApiClient } from '@serve.zone/api';
@@ -81,7 +81,7 @@ await cli.getClusters();
81
81
  | `index.ts` | Runtime entry point for the published CLI. |
82
82
  | `classes.cliclient.ts` | Minimal client wrapper; currently exposes `getClusters()`. |
83
83
  | `plugins.ts` | Centralized imports for the submodule. |
84
- | `tspublish.json` | Published package name, dependencies, registry targets, and `servezone` bin metadata. |
84
+ | `tspublish.json` | Published package name, dependencies, `servezone` bin metadata, and `useBase`, which takes the registries from the release's npm target. |
85
85
 
86
86
  ## License and Legal Information
87
87
 
@@ -1,15 +0,0 @@
1
- {
2
- "name": "@serve.zone/cli",
3
- "dependencies": [
4
- "@serve.zone/api",
5
- "@serve.zone/interfaces",
6
- "@push.rocks/projectinfo",
7
- "@push.rocks/qenv",
8
- "@push.rocks/smartcli"
9
- ],
10
- "registries": [
11
- "registry.npmjs.org:public",
12
- "verdaccio.lossless.digital:public"
13
- ],
14
- "bin": ["servezone"]
15
- }