@hideandseeklab/aoox 0.1.0-alpha.12 → 0.1.0-alpha.13

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.
@@ -0,0 +1,69 @@
1
+ /**
2
+ * What `aoox install` does when it meets an existing installation. Pure so every
3
+ * branch is unit-tested; the command only executes the returned plan.
4
+ *
5
+ * Why this exists: `--force` used to overwrite `.env.dist` with new random
6
+ * POSTGRES_PASSWORD/JWT_SECRET/ENCRYPTION_KEY without a backup, while the old
7
+ * postgres volume kept the old password — the API could no longer connect.
8
+ */
9
+ export interface InstallPlanInput {
10
+ /** Does `<dir>/docker-compose.dist.yml` exist? */
11
+ composeExists: boolean;
12
+ /** Value of `--confirm-wipe` (must equal the resolved install dir). */
13
+ confirmWipe?: string;
14
+ /** Resolved absolute install dir. */
15
+ dir: string;
16
+ /** Does `<dir>/.env.dist` exist? */
17
+ envExists: boolean;
18
+ force: boolean;
19
+ /** Does the existing `.env.dist` hold all of POSTGRES_PASSWORD, JWT_SECRET, ENCRYPTION_KEY? */
20
+ hasSecrets: boolean;
21
+ /** A terminal is attached to stdin (a typed confirmation is possible). */
22
+ interactive: boolean;
23
+ /** Newest `<dir>/backups/<stamp>` that holds a `.env.dist` (for the hint when a database volume is left over). */
24
+ latestBackup?: string;
25
+ /** Volumes the stack declares that already exist on this Docker host (empty when Docker is not installed yet). */
26
+ leftoverVolumes?: string[];
27
+ newSecrets: boolean;
28
+ wipeData: boolean;
29
+ yes: boolean;
30
+ }
31
+ export type InstallPlan = {
32
+ backup: true;
33
+ confirm: 'flag' | 'typed';
34
+ kind: 'wipe';
35
+ }
36
+ /** Nothing installed in the folder: generate everything, no backup. */
37
+ | {
38
+ backup: true;
39
+ confirm: 'prompt' | 'yes-flag';
40
+ kind: 'reuse';
41
+ }
42
+ /** Existing install, `--force`: back up, keep every secret and existing value, refresh files. */
43
+ | {
44
+ kind: 'error';
45
+ message: string;
46
+ suggestions: string[];
47
+ }
48
+ /** Existing install, `--force --new-secrets --wipe-data`: back up, `down -v`, new secrets. */
49
+ | {
50
+ kind: 'fresh';
51
+ };
52
+ export declare function planInstall(i: InstallPlanInput): InstallPlan;
53
+ /** Text shown before a wipe — must say plainly what is lost. */
54
+ export declare function wipeWarning(dir: string, leftover?: string[]): string[];
55
+ export interface ExplicitInstallFlags {
56
+ acmeEmail?: string;
57
+ adminEmail?: string;
58
+ adminName?: string;
59
+ adminPassword?: string;
60
+ apiDomain?: string;
61
+ terminalSshUser?: string;
62
+ webDomain?: string;
63
+ }
64
+ /**
65
+ * `.env.dist` keys the user set explicitly on the command line. In reuse mode
66
+ * only these replace an existing value; everything else the installer would
67
+ * write keeps what the installation already has.
68
+ */
69
+ export declare function explicitOverrides(f: ExplicitInstallFlags): Record<string, string>;
@@ -0,0 +1,86 @@
1
+ const REINSTALL_HINT = 'To repair/refresh an existing installation without losing data: `sudo aoox reinstall`.';
2
+ function fail(message, ...suggestions) {
3
+ return { kind: 'error', message, suggestions };
4
+ }
5
+ // eslint-disable-next-line complexity -- one flat decision table, easier to audit than split helpers
6
+ export function planInstall(i) {
7
+ if ((i.newSecrets || i.wipeData) && !i.force) {
8
+ return fail('--new-secrets and --wipe-data only make sense together with --force.', REINSTALL_HINT);
9
+ }
10
+ if (i.newSecrets && !i.wipeData) {
11
+ return fail('--new-secrets without --wipe-data is refused: new secrets cannot unlock the existing database. The old postgres volume keeps the old password, so the API could no longer connect and every stored credential would be undecryptable.', 'To start completely from scratch (this DELETES all data): --force --new-secrets --wipe-data', 'To keep your data: use --force without --new-secrets (existing secrets are reused), or `sudo aoox reinstall`.');
12
+ }
13
+ if (i.wipeData && !i.newSecrets) {
14
+ return fail('--wipe-data without --new-secrets is refused: wiping the data and then reusing the old secrets is a half-reset (leftover credentials, 2FA and encryption key tied to data that is gone). A clean start always gets new secrets.', 'For a completely fresh install: --force --new-secrets --wipe-data');
15
+ }
16
+ if (i.confirmWipe !== undefined && !(i.force && i.newSecrets && i.wipeData)) {
17
+ return fail('--confirm-wipe only applies together with --force --new-secrets --wipe-data.');
18
+ }
19
+ const existing = i.composeExists || i.envExists;
20
+ const leftover = i.leftoverVolumes ?? [];
21
+ if (!existing && leftover.length === 0)
22
+ return { kind: 'fresh' };
23
+ if (!existing && !(i.newSecrets && i.wipeData))
24
+ return leftoverFailure(i, leftover);
25
+ if (!i.force) {
26
+ return fail(`An installation already exists in ${i.dir}.`, REINSTALL_HINT, 'To reinstall over it keeping your data and secrets (previous files are backed up first): add --force.', 'To start completely from scratch (DELETES all data): --force --new-secrets --wipe-data');
27
+ }
28
+ if (i.newSecrets && i.wipeData) {
29
+ if (i.confirmWipe !== undefined) {
30
+ if (i.confirmWipe !== i.dir) {
31
+ return fail(`--confirm-wipe must be exactly the install directory (${i.dir}); got "${i.confirmWipe}".`);
32
+ }
33
+ return { backup: true, confirm: 'flag', kind: 'wipe' };
34
+ }
35
+ if (!i.interactive) {
36
+ return fail(`Wiping ${i.dir} needs an explicit confirmation, and --yes alone is not enough.`, `Add --confirm-wipe=${i.dir} (non-interactive), or run it in a terminal and type the path when asked.`);
37
+ }
38
+ return { backup: true, confirm: 'typed', kind: 'wipe' };
39
+ }
40
+ if (!i.hasSecrets) {
41
+ return fail(`${i.dir}/.env.dist is missing POSTGRES_PASSWORD, JWT_SECRET or ENCRYPTION_KEY, so the existing secrets cannot be reused (inventing new ones would cut off the existing data).`, 'Restore .env.dist from your backup, then run it again.', 'If you really want to discard the old data: --force --new-secrets --wipe-data');
42
+ }
43
+ return { backup: true, confirm: i.yes ? 'yes-flag' : 'prompt', kind: 'reuse' };
44
+ }
45
+ function leftoverFailure(i, leftover) {
46
+ const restore = i.latestBackup
47
+ ? `Restore the old settings and repair in place (keeps the data): cp ${i.latestBackup}/.env.dist ${i.dir}/.env.dist && sudo aoox reinstall --dir ${i.dir}`
48
+ : `Restore the old .env.dist (POSTGRES_PASSWORD, JWT_SECRET, ENCRYPTION_KEY) into ${i.dir}/.env.dist from wherever you saved it, then run: sudo aoox reinstall --dir ${i.dir}`;
49
+ return fail(`Docker already has data volumes from an earlier aoox installation: ${leftover.join(', ')}. A new install would generate a new POSTGRES_PASSWORD that cannot open that data, and the API would never start. Nothing was changed.`, restore, 'Or start from scratch and DELETE that data: sudo aoox install --force --new-secrets --wipe-data');
50
+ }
51
+ /** Text shown before a wipe — must say plainly what is lost. */
52
+ export function wipeWarning(dir, leftover = []) {
53
+ const left = leftover.length > 0 ? [`Leftover Docker volumes that are removed too: ${leftover.join(', ')}.`] : [];
54
+ return [
55
+ ...left,
56
+ `This will PERMANENTLY DELETE the aoox panel data in ${dir}:`,
57
+ ' - the panel database (users, projects, applications, domains, settings) — the postgres volume is removed with `docker compose down -v`',
58
+ ' - every stored credential (registry, git, S3, notifications, 2FA, API tokens) — new secrets are generated',
59
+ 'Not deleted: containers/volumes aoox created for your applications, databases and registry, and the files in the install folder. The previous .env.dist and compose files are copied to the backups folder first (they only contain the OLD secrets, which no longer match anything).',
60
+ ];
61
+ }
62
+ /**
63
+ * `.env.dist` keys the user set explicitly on the command line. In reuse mode
64
+ * only these replace an existing value; everything else the installer would
65
+ * write keeps what the installation already has.
66
+ */
67
+ export function explicitOverrides(f) {
68
+ const out = {};
69
+ if (f.webDomain && f.apiDomain) {
70
+ out.WEB_DOMAIN = f.webDomain;
71
+ out.API_DOMAIN = f.apiDomain;
72
+ out.WEB_ORIGIN = `https://${f.webDomain}`;
73
+ out.PUBLIC_API_URL = `https://${f.apiDomain}`;
74
+ }
75
+ if (f.acmeEmail)
76
+ out.PROXY_ACME_EMAIL = f.acmeEmail;
77
+ if (f.adminEmail)
78
+ out.ADMIN_EMAIL = f.adminEmail;
79
+ if (f.adminName)
80
+ out.ADMIN_NAME = f.adminName;
81
+ if (f.adminPassword)
82
+ out.ADMIN_PASSWORD = f.adminPassword;
83
+ if (f.terminalSshUser)
84
+ out.TERMINAL_SSH_USER = f.terminalSshUser;
85
+ return out;
86
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Named volumes the panel stack keeps its data in. If one of them is still on
3
+ * the machine when `aoox install` starts from an empty folder, the new random
4
+ * POSTGRES_PASSWORD cannot open the old data, so the installer must notice
5
+ * before it writes anything.
6
+ */
7
+ /** Compose project name (`name:` at the top level of the compose file), `aoox` by default. */
8
+ export declare function composeProjectName(compose: string): string;
9
+ /**
10
+ * Docker names of the volumes the compose file declares at the top level:
11
+ * `<project>_<key>` unless the entry sets its own `name:`; `external: true`
12
+ * volumes belong to someone else and are skipped.
13
+ */
14
+ export declare function declaredVolumeNames(compose: string): string[];
15
+ /** The declared volumes that already exist on this Docker host (`docker volume ls` names). */
16
+ export declare function leftoverVolumes(declared: string[], existing: Iterable<string>): string[];
17
+ /** Newest `<dir>/backups/<stamp>/` that holds a `.env.dist`, or undefined. Stamps sort chronologically. */
18
+ export declare function latestEnvBackup(dir: string): Promise<string | undefined>;
@@ -0,0 +1,69 @@
1
+ import { readdir, stat } from 'node:fs/promises';
2
+ /**
3
+ * Named volumes the panel stack keeps its data in. If one of them is still on
4
+ * the machine when `aoox install` starts from an empty folder, the new random
5
+ * POSTGRES_PASSWORD cannot open the old data, so the installer must notice
6
+ * before it writes anything.
7
+ */
8
+ /** Compose project name (`name:` at the top level of the compose file), `aoox` by default. */
9
+ export function composeProjectName(compose) {
10
+ const m = /^name:\s*["']?([A-Za-z0-9_.-]+)["']?\s*(?:#.*)?$/m.exec(compose);
11
+ return m?.[1] ?? 'aoox';
12
+ }
13
+ /**
14
+ * Docker names of the volumes the compose file declares at the top level:
15
+ * `<project>_<key>` unless the entry sets its own `name:`; `external: true`
16
+ * volumes belong to someone else and are skipped.
17
+ */
18
+ export function declaredVolumeNames(compose) {
19
+ const project = composeProjectName(compose);
20
+ const lines = compose.split(/\r?\n/);
21
+ const start = lines.findIndex((l) => /^volumes:\s*(?:#.*)?$/.test(l));
22
+ if (start === -1)
23
+ return [];
24
+ const entries = [];
25
+ for (const line of lines.slice(start + 1)) {
26
+ if (/^\S/.test(line))
27
+ break; // next top-level key
28
+ const key = /^ {2}([A-Za-z0-9_.-]+):/.exec(line);
29
+ if (key)
30
+ entries.push({ body: [], key: key[1] });
31
+ else if (entries.length > 0)
32
+ entries.at(-1).body.push(line);
33
+ }
34
+ const names = [];
35
+ for (const { body, key } of entries) {
36
+ const text = body.join('\n');
37
+ if (/^\s+external:\s*true\b/m.test(text))
38
+ continue;
39
+ const own = /^\s+name:\s*["']?([A-Za-z0-9_.-]+)["']?/m.exec(text);
40
+ names.push(own ? own[1] : `${project}_${key}`);
41
+ }
42
+ return names;
43
+ }
44
+ /** The declared volumes that already exist on this Docker host (`docker volume ls` names). */
45
+ export function leftoverVolumes(declared, existing) {
46
+ const have = new Set(existing);
47
+ return declared.filter((n) => have.has(n));
48
+ }
49
+ /** Newest `<dir>/backups/<stamp>/` that holds a `.env.dist`, or undefined. Stamps sort chronologically. */
50
+ export async function latestEnvBackup(dir) {
51
+ let stamps;
52
+ try {
53
+ stamps = await readdir(`${dir}/backups`);
54
+ }
55
+ catch {
56
+ return undefined;
57
+ }
58
+ for (const stamp of stamps.sort().reverse()) {
59
+ try {
60
+ // eslint-disable-next-line no-await-in-loop
61
+ await stat(`${dir}/backups/${stamp}/.env.dist`);
62
+ return `${dir}/backups/${stamp}`;
63
+ }
64
+ catch {
65
+ /* no env in this backup */
66
+ }
67
+ }
68
+ return undefined;
69
+ }
@@ -64,3 +64,10 @@ export declare function summarizeDiff(before: string, after: string, max?: numbe
64
64
  removed: number;
65
65
  };
66
66
  export declare function backupStamp(d?: Date): string;
67
+ /**
68
+ * Copies `.env.dist` plus the given compose files (those that exist) to
69
+ * `backupDir` (mode 700; the `.env.dist` copy 600 because it holds the
70
+ * secrets). Shared by `aoox reinstall` and `aoox install --force`. Returns the
71
+ * names that were copied.
72
+ */
73
+ export declare function backupInstallFiles(dir: string, backupDir: string, names: Iterable<string>): Promise<string[]>;
@@ -202,3 +202,31 @@ export function summarizeDiff(before, after, max = 30) {
202
202
  export function backupStamp(d = new Date()) {
203
203
  return d.toISOString().replaceAll(/[:.]/g, '-');
204
204
  }
205
+ /**
206
+ * Copies `.env.dist` plus the given compose files (those that exist) to
207
+ * `backupDir` (mode 700; the `.env.dist` copy 600 because it holds the
208
+ * secrets). Shared by `aoox reinstall` and `aoox install --force`. Returns the
209
+ * names that were copied.
210
+ */
211
+ export async function backupInstallFiles(dir, backupDir, names) {
212
+ const { chmod, copyFile, mkdir, stat } = await import('node:fs/promises');
213
+ await mkdir(backupDir, { mode: 0o700, recursive: true });
214
+ const copied = [];
215
+ for (const name of new Set(['.env.dist', ...names])) {
216
+ try {
217
+ // eslint-disable-next-line no-await-in-loop
218
+ await stat(`${dir}/${name}`);
219
+ }
220
+ catch {
221
+ continue;
222
+ }
223
+ // eslint-disable-next-line no-await-in-loop
224
+ await copyFile(`${dir}/${name}`, `${backupDir}/${name}`);
225
+ // .env.dist holds the secrets — the copy must be just as private.
226
+ // eslint-disable-next-line no-await-in-loop
227
+ if (name === '.env.dist')
228
+ await chmod(`${backupDir}/${name}`, 0o600);
229
+ copied.push(name);
230
+ }
231
+ return copied;
232
+ }
@@ -149,6 +149,8 @@ export interface LinkView {
149
149
  export interface LinkOwnerDetail {
150
150
  /** The owner's own `KEY=VALUE` text; it always wins over the linked sets. */
151
151
  env: null | string;
152
+ /** True when the panel left `env` out because the caller is a project viewer. */
153
+ envHidden?: boolean;
152
154
  id: string;
153
155
  name: string;
154
156
  projectId: string;
@@ -80,7 +80,9 @@
80
80
  "description": "Install aoox (postgres + api + web) on a fresh VPS with Docker Compose",
81
81
  "examples": [
82
82
  "sudo <%= config.bin %> <%= command.id %>",
83
- "sudo <%= config.bin %> <%= command.id %> --web-domain panel.example.com --api-domain api.panel.example.com --acme-email me@example.com"
83
+ "sudo <%= config.bin %> <%= command.id %> --web-domain panel.example.com --api-domain api.panel.example.com --acme-email me@example.com",
84
+ "sudo <%= config.bin %> <%= command.id %> --force # reinstall over an existing install, keeping data and secrets",
85
+ "sudo <%= config.bin %> <%= command.id %> --force --new-secrets --wipe-data # start from scratch (deletes all panel data)"
84
86
  ],
85
87
  "flags": {
86
88
  "acme-email": {
@@ -127,6 +129,13 @@
127
129
  "multiple": false,
128
130
  "type": "option"
129
131
  },
132
+ "confirm-wipe": {
133
+ "description": "Non-interactive confirmation for --wipe-data: must be exactly the install directory (--yes alone is not enough)",
134
+ "name": "confirm-wipe",
135
+ "hasDynamicHelp": false,
136
+ "multiple": false,
137
+ "type": "option"
138
+ },
130
139
  "dir": {
131
140
  "description": "Installation directory",
132
141
  "name": "dir",
@@ -136,11 +145,17 @@
136
145
  "type": "option"
137
146
  },
138
147
  "force": {
139
- "description": "Overwrite an existing installation in --dir",
148
+ "description": "Reinstall over an existing installation in --dir: previous files are backed up to <dir>/backups/ and existing secrets and values are kept (data survives)",
140
149
  "name": "force",
141
150
  "allowNo": false,
142
151
  "type": "boolean"
143
152
  },
153
+ "new-secrets": {
154
+ "description": "Only with --force --wipe-data: generate new secrets for a completely fresh install (DELETES all panel data)",
155
+ "name": "new-secrets",
156
+ "allowNo": false,
157
+ "type": "boolean"
158
+ },
144
159
  "no-terminal-authorize": {
145
160
  "description": "Do not create/authorize the web Terminal SSH key automatically (do it in Settings > Terminal instead)",
146
161
  "name": "no-terminal-authorize",
@@ -164,9 +179,15 @@
164
179
  "multiple": false,
165
180
  "type": "option"
166
181
  },
182
+ "wipe-data": {
183
+ "description": "Only with --force --new-secrets: run `docker compose down -v` first, removing the panel database volume (and any leftover panel volumes from an earlier install) (DELETES all panel data)",
184
+ "name": "wipe-data",
185
+ "allowNo": false,
186
+ "type": "boolean"
187
+ },
167
188
  "yes": {
168
189
  "char": "y",
169
- "description": "Do not ask for any confirmation",
190
+ "description": "Do not ask for any confirmation (does not confirm a wipe)",
170
191
  "name": "yes",
171
192
  "allowNo": false,
172
193
  "type": "boolean"
@@ -1664,6 +1685,56 @@
1664
1685
  "unset.js"
1665
1686
  ]
1666
1687
  },
1688
+ "update:panel": {
1689
+ "aliases": [],
1690
+ "args": {},
1691
+ "description": "Check for or apply updates to the aoox panel itself (the aoox-api and aoox-web images)",
1692
+ "examples": [
1693
+ "<%= config.bin %> <%= command.id %>",
1694
+ "<%= config.bin %> <%= command.id %> --apply"
1695
+ ],
1696
+ "flags": {
1697
+ "token": {
1698
+ "char": "t",
1699
+ "description": "API token (aoox_…); defaults to the value from `aoox login`",
1700
+ "env": "AOOX_TOKEN",
1701
+ "name": "token",
1702
+ "hasDynamicHelp": false,
1703
+ "multiple": false,
1704
+ "type": "option"
1705
+ },
1706
+ "url": {
1707
+ "char": "u",
1708
+ "description": "Dashboard URL (the address you open the dashboard with, e.g. https://dashboard.example.com); defaults to the value from `aoox login`",
1709
+ "env": "AOOX_URL",
1710
+ "name": "url",
1711
+ "hasDynamicHelp": false,
1712
+ "multiple": false,
1713
+ "type": "option"
1714
+ },
1715
+ "apply": {
1716
+ "description": "Apply the update if one is available (pull + restart)",
1717
+ "name": "apply",
1718
+ "allowNo": false,
1719
+ "type": "boolean"
1720
+ }
1721
+ },
1722
+ "hasDynamicHelp": false,
1723
+ "hiddenAliases": [],
1724
+ "id": "update:panel",
1725
+ "pluginAlias": "@hideandseeklab/aoox",
1726
+ "pluginName": "@hideandseeklab/aoox",
1727
+ "pluginType": "core",
1728
+ "strict": true,
1729
+ "enableJsonFlag": false,
1730
+ "isESM": true,
1731
+ "relativePath": [
1732
+ "dist",
1733
+ "commands",
1734
+ "update",
1735
+ "panel.js"
1736
+ ]
1737
+ },
1667
1738
  "registry:build": {
1668
1739
  "aliases": [],
1669
1740
  "args": {
@@ -1818,22 +1889,13 @@
1818
1889
  "domain.js"
1819
1890
  ]
1820
1891
  },
1821
- "registry:push": {
1892
+ "registry:password": {
1822
1893
  "aliases": [],
1823
- "args": {
1824
- "image": {
1825
- "description": "Image name and version (short or full), e.g. myapp:1.0.0. Omit it (or the version) to read them from the project in the current directory: package.json, pyproject.toml, Cargo.toml, composer.json, pubspec.yaml, *.csproj, pom.xml, a VERSION file or a git tag",
1826
- "name": "image",
1827
- "required": false
1828
- }
1829
- },
1830
- "description": "Push a local image to the aoox registry (refuses a version that already exists there). A name or version you leave out is taken from the project (you confirm it first, or pass --yes)",
1894
+ "args": {},
1895
+ "description": "Show or reset the password of the self-hosted registry",
1831
1896
  "examples": [
1832
- "<%= config.bin %> <%= command.id %> myapp:1.0.0",
1833
- "<%= config.bin %> <%= command.id %>",
1834
- "<%= config.bin %> <%= command.id %> myapp",
1835
- "<%= config.bin %> <%= command.id %> registry.example.com/myapp:1.0.0",
1836
- "<%= config.bin %> <%= command.id %> myapp:1.0.0 --force"
1897
+ "<%= config.bin %> <%= command.id %> --show",
1898
+ "<%= config.bin %> <%= command.id %> --reset --yes"
1837
1899
  ],
1838
1900
  "flags": {
1839
1901
  "token": {
@@ -1854,22 +1916,21 @@
1854
1916
  "multiple": false,
1855
1917
  "type": "option"
1856
1918
  },
1857
- "force": {
1858
- "description": "Overwrite a version that already exists in the registry (also lets a version be taken from a git tag HEAD is past)",
1859
- "name": "force",
1919
+ "reset": {
1920
+ "description": "Generate a new password (owner only). Images are kept; docker login again afterwards",
1921
+ "name": "reset",
1860
1922
  "allowNo": false,
1861
1923
  "type": "boolean"
1862
1924
  },
1863
- "registry": {
1864
- "description": "Registry ID; defaults to the self-hosted registry",
1865
- "name": "registry",
1866
- "hasDynamicHelp": false,
1867
- "multiple": false,
1868
- "type": "option"
1925
+ "show": {
1926
+ "description": "Print the current username, address and password",
1927
+ "name": "show",
1928
+ "allowNo": false,
1929
+ "type": "boolean"
1869
1930
  },
1870
1931
  "yes": {
1871
1932
  "char": "y",
1872
- "description": "Do not ask to confirm an image name or version taken from the project",
1933
+ "description": "Confirm --reset without asking",
1873
1934
  "name": "yes",
1874
1935
  "allowNo": false,
1875
1936
  "type": "boolean"
@@ -1877,26 +1938,36 @@
1877
1938
  },
1878
1939
  "hasDynamicHelp": false,
1879
1940
  "hiddenAliases": [],
1880
- "id": "registry:push",
1941
+ "id": "registry:password",
1881
1942
  "pluginAlias": "@hideandseeklab/aoox",
1882
1943
  "pluginName": "@hideandseeklab/aoox",
1883
1944
  "pluginType": "core",
1884
1945
  "strict": true,
1946
+ "enableJsonFlag": false,
1885
1947
  "isESM": true,
1886
1948
  "relativePath": [
1887
1949
  "dist",
1888
1950
  "commands",
1889
1951
  "registry",
1890
- "push.js"
1952
+ "password.js"
1891
1953
  ]
1892
1954
  },
1893
- "update:panel": {
1955
+ "registry:push": {
1894
1956
  "aliases": [],
1895
- "args": {},
1896
- "description": "Check for or apply updates to the aoox panel itself (the aoox-api and aoox-web images)",
1957
+ "args": {
1958
+ "image": {
1959
+ "description": "Image name and version (short or full), e.g. myapp:1.0.0. Omit it (or the version) to read them from the project in the current directory: package.json, pyproject.toml, Cargo.toml, composer.json, pubspec.yaml, *.csproj, pom.xml, a VERSION file or a git tag",
1960
+ "name": "image",
1961
+ "required": false
1962
+ }
1963
+ },
1964
+ "description": "Push a local image to the aoox registry (refuses a version that already exists there). A name or version you leave out is taken from the project (you confirm it first, or pass --yes)",
1897
1965
  "examples": [
1966
+ "<%= config.bin %> <%= command.id %> myapp:1.0.0",
1898
1967
  "<%= config.bin %> <%= command.id %>",
1899
- "<%= config.bin %> <%= command.id %> --apply"
1968
+ "<%= config.bin %> <%= command.id %> myapp",
1969
+ "<%= config.bin %> <%= command.id %> registry.example.com/myapp:1.0.0",
1970
+ "<%= config.bin %> <%= command.id %> myapp:1.0.0 --force"
1900
1971
  ],
1901
1972
  "flags": {
1902
1973
  "token": {
@@ -1917,29 +1988,42 @@
1917
1988
  "multiple": false,
1918
1989
  "type": "option"
1919
1990
  },
1920
- "apply": {
1921
- "description": "Apply the update if one is available (pull + restart)",
1922
- "name": "apply",
1991
+ "force": {
1992
+ "description": "Overwrite a version that already exists in the registry (also lets a version be taken from a git tag HEAD is past)",
1993
+ "name": "force",
1994
+ "allowNo": false,
1995
+ "type": "boolean"
1996
+ },
1997
+ "registry": {
1998
+ "description": "Registry ID; defaults to the self-hosted registry",
1999
+ "name": "registry",
2000
+ "hasDynamicHelp": false,
2001
+ "multiple": false,
2002
+ "type": "option"
2003
+ },
2004
+ "yes": {
2005
+ "char": "y",
2006
+ "description": "Do not ask to confirm an image name or version taken from the project",
2007
+ "name": "yes",
1923
2008
  "allowNo": false,
1924
2009
  "type": "boolean"
1925
2010
  }
1926
2011
  },
1927
2012
  "hasDynamicHelp": false,
1928
2013
  "hiddenAliases": [],
1929
- "id": "update:panel",
2014
+ "id": "registry:push",
1930
2015
  "pluginAlias": "@hideandseeklab/aoox",
1931
2016
  "pluginName": "@hideandseeklab/aoox",
1932
2017
  "pluginType": "core",
1933
2018
  "strict": true,
1934
- "enableJsonFlag": false,
1935
2019
  "isESM": true,
1936
2020
  "relativePath": [
1937
2021
  "dist",
1938
2022
  "commands",
1939
- "update",
1940
- "panel.js"
2023
+ "registry",
2024
+ "push.js"
1941
2025
  ]
1942
2026
  }
1943
2027
  },
1944
- "version": "0.1.0-alpha.12"
2028
+ "version": "0.1.0-alpha.13"
1945
2029
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hideandseeklab/aoox",
3
- "version": "0.1.0-alpha.12",
3
+ "version": "0.1.0-alpha.13",
4
4
  "description": "aoox CLI — build, deploy and manage a self-hosted aoox PaaS from your terminal",
5
5
  "keywords": [
6
6
  "oclif",