@norrix/cli 0.0.24 → 0.0.26
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/CHANGELOG.md +42 -0
- package/dist/cli.js +118 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/amplify-config.js +0 -1
- package/dist/lib/cli-settings.d.ts +15 -0
- package/dist/lib/cli-settings.js +50 -0
- package/dist/lib/cli-settings.js.map +1 -0
- package/dist/lib/commands.d.ts +104 -6
- package/dist/lib/commands.js +1339 -155
- package/dist/lib/commands.js.map +1 -1
- package/dist/lib/config-helpers.spec.js +8 -0
- package/dist/lib/config.d.ts +197 -0
- package/dist/lib/config.js +246 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/defaults.js +0 -1
- package/dist/lib/dev-defaults.js +0 -1
- package/dist/lib/fingerprinting.d.ts +8 -0
- package/dist/lib/fingerprinting.js +4 -2
- package/dist/lib/fingerprinting.js.map +1 -1
- package/dist/lib/norrix-cli.js +0 -1
- package/dist/lib/prod-defaults.js +0 -1
- package/dist/lib/workspace.d.ts +138 -0
- package/dist/lib/workspace.js +826 -0
- package/dist/lib/workspace.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
## 0.0.25 (2025-12-29)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **cli:** workspace support ([8737c10](https://github.com/norrixnet/norrix/commit/8737c10))
|
|
6
|
+
- **cli:** pass verbose flag usage to cloud commands ([79d43f1](https://github.com/norrixnet/norrix/commit/79d43f1))
|
|
7
|
+
- **cli:** distribution type for appstore, adhoc and enterprise ([3e6e5b3](https://github.com/norrixnet/norrix/commit/3e6e5b3))
|
|
8
|
+
- **norrix-cli:** add prod/dev profiles via --env/--dev ([94779f7](https://github.com/norrixnet/norrix/commit/94779f7))
|
|
9
|
+
- **next-app,norrix-cli,workflows:** expose norrixEnv routing info ([7d321e0](https://github.com/norrixnet/norrix/commit/7d321e0))
|
|
10
|
+
- **workflows,norrix-cli,next-app:** split dev/prod execution context and harden CLI env loading ([0cbf369](https://github.com/norrixnet/norrix/commit/0cbf369))
|
|
11
|
+
- **cli:** improve success output ([5e63a08](https://github.com/norrixnet/norrix/commit/5e63a08))
|
|
12
|
+
- **cli:** improve success output to include version/build ([df6c98e](https://github.com/norrixnet/norrix/commit/df6c98e))
|
|
13
|
+
- **cli:** fingerprint handling ([e8c8a81](https://github.com/norrixnet/norrix/commit/e8c8a81))
|
|
14
|
+
|
|
15
|
+
### 🩹 Fixes
|
|
16
|
+
|
|
17
|
+
- **cli:** config parsing ([5cb0a42](https://github.com/norrixnet/norrix/commit/5cb0a42))
|
|
18
|
+
|
|
19
|
+
### ❤️ Thank You
|
|
20
|
+
|
|
21
|
+
- Nathan Walker
|
|
22
|
+
- Owen Carey @owenthcarey
|
|
23
|
+
|
|
24
|
+
## 0.0.24 (2025-12-28)
|
|
25
|
+
|
|
26
|
+
### 🚀 Features
|
|
27
|
+
|
|
28
|
+
- **cli:** pass verbose flag usage to cloud commands ([c22a326](https://github.com/norrixnet/norrix/commit/c22a326))
|
|
29
|
+
- **cli:** distribution type for appstore, adhoc and enterprise ([0ef7f14](https://github.com/norrixnet/norrix/commit/0ef7f14))
|
|
30
|
+
- **norrix-cli:** add prod/dev profiles via --env/--dev ([94779f7](https://github.com/norrixnet/norrix/commit/94779f7))
|
|
31
|
+
- **norrix-cli:** add prod/dev profiles via --env/--dev ([a56e612](https://github.com/norrixnet/norrix/commit/a56e612))
|
|
32
|
+
- **next-app,norrix-cli,workflows:** expose norrixEnv routing info ([7d321e0](https://github.com/norrixnet/norrix/commit/7d321e0))
|
|
33
|
+
- **workflows,norrix-cli,next-app:** split dev/prod execution context and harden CLI env loading ([0cbf369](https://github.com/norrixnet/norrix/commit/0cbf369))
|
|
34
|
+
- **cli:** improve success output ([5e63a08](https://github.com/norrixnet/norrix/commit/5e63a08))
|
|
35
|
+
- **cli:** improve success output to include version/build ([df6c98e](https://github.com/norrixnet/norrix/commit/df6c98e))
|
|
36
|
+
- **cli:** fingerprint handling ([e8c8a81](https://github.com/norrixnet/norrix/commit/e8c8a81))
|
|
37
|
+
|
|
38
|
+
### ❤️ Thank You
|
|
39
|
+
|
|
40
|
+
- Nathan Walker
|
|
41
|
+
- Owen Carey @owenthcarey
|
|
42
|
+
|
|
1
43
|
## 0.0.21 (2025-12-18)
|
|
2
44
|
|
|
3
45
|
### 🚀 Features
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Command } from 'commander';
|
|
|
3
3
|
import { readFileSync } from 'fs';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import path from 'path';
|
|
6
|
-
import { build, submit, update, buildStatus, submitStatus, updateStatus, initNorrixCli, signIn, signOut, uploadFile, currentUser, billingCheckout, billingPortal, printFingerprint, compareFingerprint, } from './lib/commands.js';
|
|
6
|
+
import { build, submit, update, buildStatus, submitStatus, updateStatus, orgsList, orgsSelect, orgsCurrent, initNorrixCli, signIn, signOut, uploadFile, currentUser, billingCheckout, billingPortal, printFingerprint, compareFingerprint, envSet, envSetFile, envList, envDelete, envDeleteFile, } from './lib/commands.js';
|
|
7
7
|
import { assertNorrixCliEnv } from './lib/defaults.js';
|
|
8
8
|
/**
|
|
9
9
|
* Norrix CLI
|
|
@@ -57,34 +57,100 @@ program
|
|
|
57
57
|
.argument('[platform]', 'Target platform (android, ios or visionos)')
|
|
58
58
|
.argument('[configuration]', 'Build configuration (debug or release)')
|
|
59
59
|
.argument('[distribution]', 'iOS distribution type for release builds (appstore, adhoc, or enterprise)')
|
|
60
|
-
.
|
|
60
|
+
.option('-p, --project <name>', 'Project name (for workspace builds from root)')
|
|
61
|
+
.option('-c, --nx-config <config>', 'Nx build configuration (e.g., prod, stg, dev)')
|
|
62
|
+
.option('--org <orgId>', 'Target organization id')
|
|
63
|
+
.option('-t, --team-id <id>', 'Apple Developer Team ID (for iOS signing)')
|
|
64
|
+
.option('-v, --version <version>', 'App version (e.g., 1.0.0)')
|
|
65
|
+
.option('-b, --build-number <number>', 'Build number')
|
|
66
|
+
.option('-n, --non-interactive', 'Run without prompts (use defaults/config file)')
|
|
67
|
+
// iOS signing credential flags
|
|
68
|
+
.option('--p12 <path>', 'Path to iOS .p12 certificate')
|
|
69
|
+
.option('--p12-password <password>', 'Password for .p12 certificate')
|
|
70
|
+
.option('--profile <path>', 'Path to iOS .mobileprovision file')
|
|
71
|
+
.option('--asc-key-id <id>', 'App Store Connect API Key ID')
|
|
72
|
+
.option('--asc-issuer-id <id>', 'App Store Connect Issuer ID')
|
|
73
|
+
.option('--asc-key <path>', 'Path to App Store Connect .p8 private key')
|
|
74
|
+
// Android package type flags (override distributionType logic)
|
|
75
|
+
.option('--apk', 'Build APK instead of AAB for Android (overrides distributionType)')
|
|
76
|
+
.option('--aab', 'Build AAB for Android (default for appstore, explicit override)')
|
|
77
|
+
.action((platform, configuration, distribution, options) => build(platform, configuration, distribution, isVerbose, {
|
|
78
|
+
project: options?.project,
|
|
79
|
+
nxConfiguration: options?.nxConfig,
|
|
80
|
+
org: options?.org,
|
|
81
|
+
teamId: options?.teamId,
|
|
82
|
+
version: options?.version,
|
|
83
|
+
buildNumber: options?.buildNumber,
|
|
84
|
+
nonInteractive: options?.nonInteractive,
|
|
85
|
+
p12Path: options?.p12,
|
|
86
|
+
p12Password: options?.p12Password,
|
|
87
|
+
profilePath: options?.profile,
|
|
88
|
+
ascKeyId: options?.ascKeyId,
|
|
89
|
+
ascIssuerId: options?.ascIssuerId,
|
|
90
|
+
ascKeyPath: options?.ascKey,
|
|
91
|
+
androidPackageType: options?.apk ? 'apk' : options?.aab ? 'aab' : undefined,
|
|
92
|
+
}));
|
|
61
93
|
program
|
|
62
94
|
.command('build-status')
|
|
63
95
|
.description('Check the status of a build')
|
|
64
96
|
.argument('<buildId>', 'Build ID to check')
|
|
65
|
-
.
|
|
97
|
+
.option('--org <orgId>', 'Target organization id')
|
|
98
|
+
.action((buildId, options) => buildStatus(buildId, isVerbose, { org: options?.org }));
|
|
66
99
|
program
|
|
67
100
|
.command('submit')
|
|
68
101
|
.description('Submit your app to app stores')
|
|
69
102
|
.argument('[platform]', 'Target platform (android, ios or visionos)')
|
|
70
103
|
.argument('[track]', 'Release track (production, beta, alpha, internal)')
|
|
71
|
-
.
|
|
104
|
+
.option('--org <orgId>', 'Target organization id')
|
|
105
|
+
.option('-n, --non-interactive', 'Skip organization prompt (requires --org or previously selected org)')
|
|
106
|
+
.action((platform, track, options) => submit(platform, track, isVerbose, { org: options?.org, nonInteractive: options?.nonInteractive }));
|
|
72
107
|
program
|
|
73
108
|
.command('submit-status')
|
|
74
109
|
.description('Check the status of a submission')
|
|
75
110
|
.argument('<submitId>', 'Submission ID to check')
|
|
76
|
-
.
|
|
111
|
+
.option('--org <orgId>', 'Target organization id')
|
|
112
|
+
.action((submitId, options) => submitStatus(submitId, isVerbose, { org: options?.org }));
|
|
77
113
|
program
|
|
78
114
|
.command('update')
|
|
79
115
|
.description('Publish over-the-air updates to deployed apps')
|
|
80
116
|
.argument('[platform]', 'Target platform (android, ios or visionos)')
|
|
81
117
|
.argument('[version]', 'Update version (e.g. 2.0.0)')
|
|
82
|
-
.
|
|
118
|
+
.option('-p, --project <name>', 'Project name (for workspace builds from root)')
|
|
119
|
+
.option('-c, --nx-config <config>', 'Nx build configuration (e.g., prod, stg, dev)')
|
|
120
|
+
.option('--org <orgId>', 'Target organization id')
|
|
121
|
+
.option('-a, --app-id <id>', 'App identifier (bundle ID)')
|
|
122
|
+
.option('-b, --build-number <number>', 'Build number')
|
|
123
|
+
.option('-n, --non-interactive', 'Run without prompts (use defaults/config file)')
|
|
124
|
+
.action((platform, version, options) => update(platform, version, isVerbose, {
|
|
125
|
+
project: options?.project,
|
|
126
|
+
nxConfiguration: options?.nxConfig,
|
|
127
|
+
org: options?.org,
|
|
128
|
+
appId: options?.appId,
|
|
129
|
+
buildNumber: options?.buildNumber,
|
|
130
|
+
nonInteractive: options?.nonInteractive,
|
|
131
|
+
}));
|
|
83
132
|
program
|
|
84
133
|
.command('update-status')
|
|
85
134
|
.description('Check the status of an update')
|
|
86
135
|
.argument('<updateId>', 'Update ID to check')
|
|
87
|
-
.
|
|
136
|
+
.option('--org <orgId>', 'Target organization id')
|
|
137
|
+
.action((updateId, options) => updateStatus(updateId, isVerbose, { org: options?.org }));
|
|
138
|
+
// Organization selection commands
|
|
139
|
+
const orgsCommand = program
|
|
140
|
+
.command('orgs')
|
|
141
|
+
.description('List and select the default organization used by the CLI');
|
|
142
|
+
orgsCommand
|
|
143
|
+
.command('list')
|
|
144
|
+
.description('List organizations you belong to')
|
|
145
|
+
.action(() => orgsList(isVerbose));
|
|
146
|
+
orgsCommand
|
|
147
|
+
.command('select')
|
|
148
|
+
.description('Select the default organization for the current environment')
|
|
149
|
+
.action(() => orgsSelect(isVerbose));
|
|
150
|
+
orgsCommand
|
|
151
|
+
.command('current')
|
|
152
|
+
.description('Show the current default organization for the current environment')
|
|
153
|
+
.action(() => orgsCurrent());
|
|
88
154
|
const fingerprintCommand = program
|
|
89
155
|
.command('fingerprint')
|
|
90
156
|
.description('Fingerprint utilities for build/update compatibility checks');
|
|
@@ -131,5 +197,50 @@ program
|
|
|
131
197
|
.command('billing-portal')
|
|
132
198
|
.description('Open Stripe Billing Portal for the current organization')
|
|
133
199
|
.action(() => billingPortal(isVerbose));
|
|
200
|
+
// Environment variables management commands
|
|
201
|
+
const envCommand = program
|
|
202
|
+
.command('env')
|
|
203
|
+
.description('Manage environment variables for build-time injection');
|
|
204
|
+
envCommand
|
|
205
|
+
.command('set')
|
|
206
|
+
.description('Set an environment variable')
|
|
207
|
+
.argument('<name>', 'Env var name (will be available at build time)')
|
|
208
|
+
.argument('<value>', 'Env var value')
|
|
209
|
+
.option('-p, --project <name>', 'Project name to scope this variable to')
|
|
210
|
+
.option('-v, --visibility <type>', 'Visibility type: plaintext | secret (default: secret)')
|
|
211
|
+
.action((name, value, options) => envSet(name, value, isVerbose, {
|
|
212
|
+
project: options?.project,
|
|
213
|
+
visibilityType: options?.visibility,
|
|
214
|
+
}));
|
|
215
|
+
envCommand
|
|
216
|
+
.command('set-file')
|
|
217
|
+
.description('Upload an environment file for build-time injection')
|
|
218
|
+
.argument('<name>', 'File identifier (e.g., .env.azconfig)')
|
|
219
|
+
.argument('<path>', 'Path to the local file to upload')
|
|
220
|
+
.option('-p, --project <name>', 'Project name to scope this file to')
|
|
221
|
+
.option('-d, --dest-path <path>', 'Destination path in CI (defaults to name)')
|
|
222
|
+
.option('-v, --visibility <type>', 'Visibility type: plaintext | secret (default: secret)')
|
|
223
|
+
.action((name, filePath, options) => envSetFile(name, filePath, isVerbose, {
|
|
224
|
+
project: options?.project,
|
|
225
|
+
destPath: options?.destPath,
|
|
226
|
+
visibilityType: options?.visibility,
|
|
227
|
+
}));
|
|
228
|
+
envCommand
|
|
229
|
+
.command('list')
|
|
230
|
+
.description('List all environment variables for a project')
|
|
231
|
+
.option('-p, --project <name>', 'Project name to filter by')
|
|
232
|
+
.action((options) => envList(isVerbose, { project: options?.project }));
|
|
233
|
+
envCommand
|
|
234
|
+
.command('delete')
|
|
235
|
+
.description('Delete an environment variable')
|
|
236
|
+
.argument('<name>', 'Env var name to delete')
|
|
237
|
+
.option('-p, --project <name>', 'Project name scope')
|
|
238
|
+
.action((name, options) => envDelete(name, isVerbose, { project: options?.project }));
|
|
239
|
+
envCommand
|
|
240
|
+
.command('delete-file')
|
|
241
|
+
.description('Delete an environment file')
|
|
242
|
+
.argument('<name>', 'File identifier to delete')
|
|
243
|
+
.option('-p, --project <name>', 'Project name scope')
|
|
244
|
+
.action((name, options) => envDeleteFile(name, isVerbose, { project: options?.project }));
|
|
134
245
|
program.parse();
|
|
135
246
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,MAAM,EACN,OAAO,EACP,UAAU,EACV,WAAW,EACX,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,MAAM,EACN,OAAO,EACP,UAAU,EACV,WAAW,EACX,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,OAAO,EACP,SAAS,EACT,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;;;GAUG;AAEH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,yEAAyE;AACzE,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,C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sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NorrixCliEnv } from './defaults.js';
|
|
2
|
+
type CliProfile = {
|
|
3
|
+
selectedOrgId?: string;
|
|
4
|
+
selectedAt?: string;
|
|
5
|
+
};
|
|
6
|
+
type CliSettings = {
|
|
7
|
+
profiles?: Record<string, CliProfile>;
|
|
8
|
+
};
|
|
9
|
+
export declare function cliProfileKey(env: NorrixCliEnv, apiUrl: string): string;
|
|
10
|
+
export declare function readCliSettings(): CliSettings;
|
|
11
|
+
export declare function writeCliSettings(settings: CliSettings): void;
|
|
12
|
+
export declare function getSelectedOrgId(env: NorrixCliEnv, apiUrl: string): string | undefined;
|
|
13
|
+
export declare function setSelectedOrgId(env: NorrixCliEnv, apiUrl: string, orgId: string): void;
|
|
14
|
+
export declare function clearSelectedOrgId(env: NorrixCliEnv, apiUrl: string): void;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import * as os from 'os';
|
|
4
|
+
const CONFIG_DIR = path.join(os.homedir(), '.config', 'norrix');
|
|
5
|
+
const SETTINGS_FILE = path.join(CONFIG_DIR, 'cli-config.json');
|
|
6
|
+
function ensureDir() {
|
|
7
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
8
|
+
}
|
|
9
|
+
export function cliProfileKey(env, apiUrl) {
|
|
10
|
+
return `${env}|${apiUrl}`;
|
|
11
|
+
}
|
|
12
|
+
export function readCliSettings() {
|
|
13
|
+
try {
|
|
14
|
+
if (!fs.existsSync(SETTINGS_FILE))
|
|
15
|
+
return {};
|
|
16
|
+
const raw = fs.readFileSync(SETTINGS_FILE, 'utf8');
|
|
17
|
+
const parsed = JSON.parse(raw);
|
|
18
|
+
return parsed && typeof parsed === 'object' ? parsed : {};
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export function writeCliSettings(settings) {
|
|
25
|
+
ensureDir();
|
|
26
|
+
fs.writeFileSync(SETTINGS_FILE, JSON.stringify(settings ?? {}, null, 2), 'utf8');
|
|
27
|
+
}
|
|
28
|
+
export function getSelectedOrgId(env, apiUrl) {
|
|
29
|
+
const key = cliProfileKey(env, apiUrl);
|
|
30
|
+
const settings = readCliSettings();
|
|
31
|
+
const orgId = settings?.profiles?.[key]?.selectedOrgId;
|
|
32
|
+
const v = (orgId ?? '').toString().trim();
|
|
33
|
+
return v ? v : undefined;
|
|
34
|
+
}
|
|
35
|
+
export function setSelectedOrgId(env, apiUrl, orgId) {
|
|
36
|
+
const key = cliProfileKey(env, apiUrl);
|
|
37
|
+
const settings = readCliSettings();
|
|
38
|
+
const profiles = settings.profiles ?? {};
|
|
39
|
+
profiles[key] = { selectedOrgId: orgId, selectedAt: new Date().toISOString() };
|
|
40
|
+
writeCliSettings({ ...settings, profiles });
|
|
41
|
+
}
|
|
42
|
+
export function clearSelectedOrgId(env, apiUrl) {
|
|
43
|
+
const key = cliProfileKey(env, apiUrl);
|
|
44
|
+
const settings = readCliSettings();
|
|
45
|
+
const profiles = settings.profiles ?? {};
|
|
46
|
+
if (profiles[key]) {
|
|
47
|
+
delete profiles[key];
|
|
48
|
+
writeCliSettings({ ...settings, profiles });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-settings.js","sourceRoot":"","sources":["../../src/lib/cli-settings.ts"],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AAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
|
package/dist/lib/commands.d.ts
CHANGED
|
@@ -8,38 +8,100 @@ import type { NorrixCliEnv } from './defaults.js';
|
|
|
8
8
|
* - Computes the API base URL used by commands
|
|
9
9
|
*/
|
|
10
10
|
export declare function initNorrixCli(env?: NorrixCliEnv): void;
|
|
11
|
+
export declare function orgsList(verbose?: boolean): Promise<void>;
|
|
12
|
+
export declare function orgsSelect(verbose?: boolean): Promise<void>;
|
|
13
|
+
export declare function orgsCurrent(): Promise<void>;
|
|
11
14
|
export declare function printFingerprint(cliPlatformArg?: string, appId?: string, verbose?: boolean): Promise<void>;
|
|
12
15
|
export declare function compareFingerprint(fromId: string, toArg?: string, verbose?: boolean): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Build command options passed from CLI flags
|
|
18
|
+
*/
|
|
19
|
+
export interface BuildOptions {
|
|
20
|
+
/** Nx project name (for workspace builds from root) */
|
|
21
|
+
project?: string;
|
|
22
|
+
/** Nx build configuration (e.g., 'prod', 'stg', 'dev') */
|
|
23
|
+
nxConfiguration?: string;
|
|
24
|
+
/** Target organization id (overrides persisted selection) */
|
|
25
|
+
org?: string;
|
|
26
|
+
/** Apple Developer Team ID (for iOS signing) */
|
|
27
|
+
teamId?: string;
|
|
28
|
+
/** App version override */
|
|
29
|
+
version?: string;
|
|
30
|
+
/** Build number override */
|
|
31
|
+
buildNumber?: string;
|
|
32
|
+
/** Skip confirmation prompts (use defaults/config file) */
|
|
33
|
+
nonInteractive?: boolean;
|
|
34
|
+
/** Path to iOS .p12 certificate */
|
|
35
|
+
p12Path?: string;
|
|
36
|
+
/** Password for .p12 certificate */
|
|
37
|
+
p12Password?: string;
|
|
38
|
+
/** Path to iOS .mobileprovision file */
|
|
39
|
+
profilePath?: string;
|
|
40
|
+
/** App Store Connect API Key ID */
|
|
41
|
+
ascKeyId?: string;
|
|
42
|
+
/** App Store Connect Issuer ID */
|
|
43
|
+
ascIssuerId?: string;
|
|
44
|
+
/** Path to App Store Connect .p8 private key */
|
|
45
|
+
ascKeyPath?: string;
|
|
46
|
+
/** Android package type override (apk or aab) - takes precedence over distributionType */
|
|
47
|
+
androidPackageType?: 'apk' | 'aab';
|
|
48
|
+
}
|
|
13
49
|
/**
|
|
14
50
|
* Build command implementation
|
|
15
51
|
* Uploads project to S3 and triggers build via the Next.js API gateway -> WarpBuild
|
|
16
52
|
*/
|
|
17
|
-
export declare function build(cliPlatformArg?: string, cliConfigurationArg?: string, cliDistributionArg?: string, verbose?: boolean): Promise<void>;
|
|
53
|
+
export declare function build(cliPlatformArg?: string, cliConfigurationArg?: string, cliDistributionArg?: string, verbose?: boolean, options?: BuildOptions | string): Promise<void>;
|
|
18
54
|
/**
|
|
19
55
|
* Submit command implementation
|
|
20
56
|
* Submits the built app to app stores via the Next.js API gateway
|
|
21
57
|
*/
|
|
22
|
-
export declare function submit(cliPlatformArg?: string, cliTrackArg?: string, verbose?: boolean
|
|
58
|
+
export declare function submit(cliPlatformArg?: string, cliTrackArg?: string, verbose?: boolean, options?: {
|
|
59
|
+
org?: string;
|
|
60
|
+
nonInteractive?: boolean;
|
|
61
|
+
}): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Update command options passed from CLI flags
|
|
64
|
+
*/
|
|
65
|
+
export interface UpdateOptions {
|
|
66
|
+
/** Nx project name (for workspace builds from root) */
|
|
67
|
+
project?: string;
|
|
68
|
+
/** Nx build configuration (e.g., 'prod', 'stg', 'dev') */
|
|
69
|
+
nxConfiguration?: string;
|
|
70
|
+
/** Target organization id (overrides persisted selection) */
|
|
71
|
+
org?: string;
|
|
72
|
+
/** App identifier (bundle ID) */
|
|
73
|
+
appId?: string;
|
|
74
|
+
/** Build number override */
|
|
75
|
+
buildNumber?: string;
|
|
76
|
+
/** Skip confirmation prompts (use defaults/config file) */
|
|
77
|
+
nonInteractive?: boolean;
|
|
78
|
+
}
|
|
23
79
|
/**
|
|
24
80
|
* Update command implementation
|
|
25
81
|
* Publishes over-the-air updates to deployed apps via the Next.js API gateway
|
|
26
82
|
*/
|
|
27
|
-
export declare function update(cliPlatformArg?: string, cliVersionArg?: string, verbose?: boolean): Promise<void>;
|
|
83
|
+
export declare function update(cliPlatformArg?: string, cliVersionArg?: string, verbose?: boolean, options?: UpdateOptions | string): Promise<void>;
|
|
28
84
|
/**
|
|
29
85
|
* Build Status command implementation
|
|
30
86
|
* Checks the status of a build via the Next.js API gateway
|
|
31
87
|
*/
|
|
32
|
-
export declare function buildStatus(buildId: string, verbose?: boolean
|
|
88
|
+
export declare function buildStatus(buildId: string, verbose?: boolean, options?: {
|
|
89
|
+
org?: string;
|
|
90
|
+
}): Promise<void>;
|
|
33
91
|
/**
|
|
34
92
|
* Submit Status command implementation
|
|
35
93
|
* Checks the status of a submission via the Next.js API gateway
|
|
36
94
|
*/
|
|
37
|
-
export declare function submitStatus(submitId: string, verbose?: boolean
|
|
95
|
+
export declare function submitStatus(submitId: string, verbose?: boolean, options?: {
|
|
96
|
+
org?: string;
|
|
97
|
+
}): Promise<void>;
|
|
38
98
|
/**
|
|
39
99
|
* Update Status command implementation
|
|
40
100
|
* Checks the status of an update via the Next.js API gateway
|
|
41
101
|
*/
|
|
42
|
-
export declare function updateStatus(updateId: string, verbose?: boolean
|
|
102
|
+
export declare function updateStatus(updateId: string, verbose?: boolean, options?: {
|
|
103
|
+
org?: string;
|
|
104
|
+
}): Promise<void>;
|
|
43
105
|
/**
|
|
44
106
|
* Sign-In command implementation (email / password via Cognito)
|
|
45
107
|
*/
|
|
@@ -66,3 +128,39 @@ export declare function billingCheckout(priceId?: string, verbose?: boolean): Pr
|
|
|
66
128
|
* Open Stripe billing portal for the current organization
|
|
67
129
|
*/
|
|
68
130
|
export declare function billingPortal(verbose?: boolean): Promise<void>;
|
|
131
|
+
export type EnvVisibilityType = 'plaintext' | 'secret';
|
|
132
|
+
export interface EnvSetOptions {
|
|
133
|
+
project?: string;
|
|
134
|
+
visibilityType?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface EnvSetFileOptions {
|
|
137
|
+
project?: string;
|
|
138
|
+
destPath?: string;
|
|
139
|
+
visibilityType?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface EnvListOptions {
|
|
142
|
+
project?: string;
|
|
143
|
+
}
|
|
144
|
+
export interface EnvDeleteOptions {
|
|
145
|
+
project?: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Set an environment variable for build-time injection
|
|
149
|
+
*/
|
|
150
|
+
export declare function envSet(name: string, value: string, verbose?: boolean, options?: EnvSetOptions): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Upload an environment file for build-time injection
|
|
153
|
+
*/
|
|
154
|
+
export declare function envSetFile(name: string, filePath: string, verbose?: boolean, options?: EnvSetFileOptions): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* List all environment variables/files for a project
|
|
157
|
+
*/
|
|
158
|
+
export declare function envList(verbose?: boolean, options?: EnvListOptions): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Delete an environment variable
|
|
161
|
+
*/
|
|
162
|
+
export declare function envDelete(name: string, verbose?: boolean, options?: EnvDeleteOptions): Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Delete an environment file
|
|
165
|
+
*/
|
|
166
|
+
export declare function envDeleteFile(name: string, verbose?: boolean, options?: EnvDeleteOptions): Promise<void>;
|