@imagina-build/ias-cli 0.2.2 → 0.3.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/README.md +184 -21
- package/package.json +1 -1
- package/schema/ias.schema.json +46 -1
- package/shared/vault/index.mjs +25 -0
- package/shared/vault/policy-vectors.mjs +237 -0
- package/shared/vault/policy.mjs +427 -0
- package/shared/vault/test-vectors/ias-policy-1/policy.json +4016 -0
- package/shared/vault/vectors.mjs +2 -0
- package/src/apple/capabilities.mjs +96 -0
- package/src/apple/inventory.mjs +75 -0
- package/src/apple/signing.mjs +134 -0
- package/src/applications.mjs +114 -0
- package/src/cli.mjs +28 -10
- package/src/commands/apps/index.mjs +61 -11
- package/src/commands/apps/store.mjs +367 -0
- package/src/commands/auth/index.mjs +3 -3
- package/src/commands/build/index.mjs +2 -0
- package/src/commands/builds/index.mjs +20 -0
- package/src/commands/credentials/apple.mjs +1118 -0
- package/src/commands/credentials/generate.mjs +122 -0
- package/src/commands/credentials/index.mjs +114 -44
- package/src/commands/credentials/seal.mjs +44 -0
- package/src/commands/devices/asc.mjs +50 -8
- package/src/commands/devices/index.mjs +2 -1
- package/src/commands/devices/sync.mjs +57 -4
- package/src/commands/dist/index.mjs +12 -0
- package/src/commands/github/index.mjs +13 -3
- package/src/commands/policy/index.mjs +583 -0
- package/src/commands/policy/policy.mjs +182 -0
- package/src/commands/policy/progress.mjs +20 -0
- package/src/commands/releases/index.mjs +225 -0
- package/src/commands/rollout/index.mjs +186 -0
- package/src/commands/runners/index.mjs +19 -0
- package/src/commands/sdk/index.mjs +31 -4
- package/src/commands/setup/index.mjs +184 -0
- package/src/commands/submit/index.mjs +135 -19
- package/src/commands/testflight/index.mjs +309 -0
- package/src/commands/tokens/index.mjs +99 -0
- package/src/commands/update/index.mjs +26 -5
- package/src/commands/vault/approvers.mjs +5 -1
- package/src/commands/vault/index.mjs +26 -6
- package/src/commands/vault/runners.mjs +48 -2
- package/src/commands/webhooks/index.mjs +19 -5
- package/src/config.mjs +16 -1
- package/src/errors.mjs +52 -6
- package/src/op.mjs +83 -0
- package/src/ota-key.mjs +53 -0
- package/src/provisioning.mjs +281 -0
- package/src/schema.mjs +3 -0
- package/src/setup-state.mjs +76 -0
- package/src/setup.mjs +698 -0
- package/src/team-vault.mjs +2 -2
- package/src/token-store.mjs +1 -1
package/src/team-vault.mjs
CHANGED
|
@@ -26,9 +26,9 @@ const ITEM = /^op:\/\/([^/\s]+)\/([^/]+)$/;
|
|
|
26
26
|
* vault <host>. Returns { reference, vault, title }.
|
|
27
27
|
*/
|
|
28
28
|
export function vaultItem(context, project, server) {
|
|
29
|
-
const reference = context.values?.item ?? context.env.IAS_VAULT_ITEM ?? project?.config?.vault?.item ?? `op://
|
|
29
|
+
const reference = context.values?.item ?? context.env.IAS_VAULT_ITEM ?? project?.config?.vault?.item ?? `op://IAS/IAS vault ${new URL(server).hostname}`;
|
|
30
30
|
const match = ITEM.exec(reference);
|
|
31
|
-
if (!match) throw new IasError(`«${reference}» is not a 1Password item`, { fix: 'it is op://<vault>/<item>, such as op://
|
|
31
|
+
if (!match) throw new IasError(`«${reference}» is not a 1Password item`, { fix: 'it is op://<vault>/<item>, such as op://IAS/IAS vault ias.imagina.build' });
|
|
32
32
|
return { reference, vault: match[1], title: match[2] };
|
|
33
33
|
}
|
|
34
34
|
|
package/src/token-store.mjs
CHANGED
|
@@ -64,7 +64,7 @@ export function storedToken(server, { env = process.env, kind = storeKind(env) }
|
|
|
64
64
|
|
|
65
65
|
/** Keeps `token` for `server`; returns where it went. */
|
|
66
66
|
export function saveToken(server, token, { env = process.env, kind = storeKind(env) } = {}) {
|
|
67
|
-
if (kind === 'none') throw new IasError('this machine keeps no tokens (CI)', { fix: 'set IAS_TOKEN to a robot token (iasr_
|
|
67
|
+
if (kind === 'none') throw new IasError('this machine keeps no tokens (CI)', { fix: 'set IAS_TOKEN to a robot token (iasr_…): ias tokens create makes one (an owner, kept in 1Password), or the panel: the application › Settings › Access' });
|
|
68
68
|
if (!/^iasp_[A-Za-z0-9_-]{43}$/.test(token)) throw new IasError('the server gave a token that is not a personal token (iasp_…)', { fix: 'run ias login again; if it goes on, check the server' });
|
|
69
69
|
if (kind === 'file') {
|
|
70
70
|
const file = tokenFile(env);
|