@atlasauth/cli 0.12.0 → 0.14.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/CHANGELOG.md +9 -1
- package/dist/args.d.ts +18 -0
- package/dist/args.js +9 -0
- package/dist/args.js.map +1 -1
- package/dist/commands/config.js +72 -7
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dev.d.ts +8 -0
- package/dist/commands/dev.js +84 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/fga.d.ts +10 -0
- package/dist/commands/fga.js +105 -0
- package/dist/commands/fga.js.map +1 -0
- package/dist/commands/pages.d.ts +14 -0
- package/dist/commands/pages.js +113 -0
- package/dist/commands/pages.js.map +1 -0
- package/dist/context.d.ts +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.js +71 -2
- package/dist/help.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/migrate/appwrite/plugin.d.ts +2 -0
- package/dist/migrate/appwrite/plugin.js +103 -0
- package/dist/migrate/appwrite/plugin.js.map +1 -0
- package/dist/migrate/authentik/plugin.d.ts +2 -0
- package/dist/migrate/authentik/plugin.js +135 -0
- package/dist/migrate/authentik/plugin.js.map +1 -0
- package/dist/migrate/azure-ad-b2c/plugin.d.ts +8 -0
- package/dist/migrate/azure-ad-b2c/plugin.js +165 -0
- package/dist/migrate/azure-ad-b2c/plugin.js.map +1 -0
- package/dist/migrate/cognito/plugin.d.ts +5 -0
- package/dist/migrate/cognito/plugin.js +170 -0
- package/dist/migrate/cognito/plugin.js.map +1 -0
- package/dist/migrate/corbado/plugin.d.ts +2 -0
- package/dist/migrate/corbado/plugin.js +63 -0
- package/dist/migrate/corbado/plugin.js.map +1 -0
- package/dist/migrate/entra-external-id/plugin.d.ts +8 -0
- package/dist/migrate/entra-external-id/plugin.js +12 -0
- package/dist/migrate/entra-external-id/plugin.js.map +1 -0
- package/dist/migrate/export/appwrite-config.d.ts +28 -0
- package/dist/migrate/export/appwrite-config.js +170 -0
- package/dist/migrate/export/appwrite-config.js.map +1 -0
- package/dist/migrate/export/appwrite.d.ts +51 -0
- package/dist/migrate/export/appwrite.js +288 -0
- package/dist/migrate/export/appwrite.js.map +1 -0
- package/dist/migrate/export/authentik-config.d.ts +45 -0
- package/dist/migrate/export/authentik-config.js +357 -0
- package/dist/migrate/export/authentik-config.js.map +1 -0
- package/dist/migrate/export/authentik.d.ts +110 -0
- package/dist/migrate/export/authentik.js +838 -0
- package/dist/migrate/export/authentik.js.map +1 -0
- package/dist/migrate/export/azure-config.d.ts +58 -0
- package/dist/migrate/export/azure-config.js +344 -0
- package/dist/migrate/export/azure-config.js.map +1 -0
- package/dist/migrate/export/azure.d.ts +85 -0
- package/dist/migrate/export/azure.js +373 -0
- package/dist/migrate/export/azure.js.map +1 -0
- package/dist/migrate/export/cognito-config.d.ts +25 -0
- package/dist/migrate/export/cognito-config.js +273 -0
- package/dist/migrate/export/cognito-config.js.map +1 -0
- package/dist/migrate/export/cognito.d.ts +103 -0
- package/dist/migrate/export/cognito.js +441 -0
- package/dist/migrate/export/cognito.js.map +1 -0
- package/dist/migrate/export/corbado-config.d.ts +20 -0
- package/dist/migrate/export/corbado-config.js +63 -0
- package/dist/migrate/export/corbado-config.js.map +1 -0
- package/dist/migrate/export/corbado.d.ts +37 -0
- package/dist/migrate/export/corbado.js +132 -0
- package/dist/migrate/export/corbado.js.map +1 -0
- package/dist/migrate/export/firebase-config.d.ts +24 -0
- package/dist/migrate/export/firebase-config.js +215 -0
- package/dist/migrate/export/firebase-config.js.map +1 -0
- package/dist/migrate/export/firebase.d.ts +102 -0
- package/dist/migrate/export/firebase.js +464 -0
- package/dist/migrate/export/firebase.js.map +1 -0
- package/dist/migrate/export/frontegg-config.d.ts +29 -0
- package/dist/migrate/export/frontegg-config.js +238 -0
- package/dist/migrate/export/frontegg-config.js.map +1 -0
- package/dist/migrate/export/frontegg.d.ts +67 -0
- package/dist/migrate/export/frontegg.js +410 -0
- package/dist/migrate/export/frontegg.js.map +1 -0
- package/dist/migrate/export/fusionauth-config.d.ts +26 -0
- package/dist/migrate/export/fusionauth-config.js +226 -0
- package/dist/migrate/export/fusionauth-config.js.map +1 -0
- package/dist/migrate/export/fusionauth.d.ts +99 -0
- package/dist/migrate/export/fusionauth.js +642 -0
- package/dist/migrate/export/fusionauth.js.map +1 -0
- package/dist/migrate/export/hanko-config.d.ts +27 -0
- package/dist/migrate/export/hanko-config.js +265 -0
- package/dist/migrate/export/hanko-config.js.map +1 -0
- package/dist/migrate/export/hanko.d.ts +52 -0
- package/dist/migrate/export/hanko.js +605 -0
- package/dist/migrate/export/hanko.js.map +1 -0
- package/dist/migrate/export/keycloak-config.d.ts +19 -0
- package/dist/migrate/export/keycloak-config.js +219 -0
- package/dist/migrate/export/keycloak-config.js.map +1 -0
- package/dist/migrate/export/keycloak.d.ts +155 -0
- package/dist/migrate/export/keycloak.js +878 -0
- package/dist/migrate/export/keycloak.js.map +1 -0
- package/dist/migrate/export/ldap.d.ts +53 -0
- package/dist/migrate/export/ldap.js +277 -0
- package/dist/migrate/export/ldap.js.map +1 -0
- package/dist/migrate/export/logto-config.d.ts +27 -0
- package/dist/migrate/export/logto-config.js +264 -0
- package/dist/migrate/export/logto-config.js.map +1 -0
- package/dist/migrate/export/logto.d.ts +150 -0
- package/dist/migrate/export/logto.js +809 -0
- package/dist/migrate/export/logto.js.map +1 -0
- package/dist/migrate/export/magic-config.d.ts +14 -0
- package/dist/migrate/export/magic-config.js +28 -0
- package/dist/migrate/export/magic-config.js.map +1 -0
- package/dist/migrate/export/magic.d.ts +31 -0
- package/dist/migrate/export/magic.js +93 -0
- package/dist/migrate/export/magic.js.map +1 -0
- package/dist/migrate/export/mini-yaml.d.ts +19 -0
- package/dist/migrate/export/mini-yaml.js +581 -0
- package/dist/migrate/export/mini-yaml.js.map +1 -0
- package/dist/migrate/export/nhost-config.d.ts +26 -0
- package/dist/migrate/export/nhost-config.js +360 -0
- package/dist/migrate/export/nhost-config.js.map +1 -0
- package/dist/migrate/export/nhost.d.ts +64 -0
- package/dist/migrate/export/nhost.js +304 -0
- package/dist/migrate/export/nhost.js.map +1 -0
- package/dist/migrate/export/onelogin.d.ts +22 -0
- package/dist/migrate/export/onelogin.js +123 -0
- package/dist/migrate/export/onelogin.js.map +1 -0
- package/dist/migrate/export/ory-config.d.ts +58 -0
- package/dist/migrate/export/ory-config.js +451 -0
- package/dist/migrate/export/ory-config.js.map +1 -0
- package/dist/migrate/export/ory.d.ts +81 -0
- package/dist/migrate/export/ory.js +555 -0
- package/dist/migrate/export/ory.js.map +1 -0
- package/dist/migrate/export/password-detect.d.ts +29 -0
- package/dist/migrate/export/password-detect.js +81 -0
- package/dist/migrate/export/password-detect.js.map +1 -0
- package/dist/migrate/export/pingone.d.ts +36 -0
- package/dist/migrate/export/pingone.js +218 -0
- package/dist/migrate/export/pingone.js.map +1 -0
- package/dist/migrate/export/pocketbase-config.d.ts +28 -0
- package/dist/migrate/export/pocketbase-config.js +180 -0
- package/dist/migrate/export/pocketbase-config.js.map +1 -0
- package/dist/migrate/export/pocketbase.d.ts +52 -0
- package/dist/migrate/export/pocketbase.js +243 -0
- package/dist/migrate/export/pocketbase.js.map +1 -0
- package/dist/migrate/export/project-files.d.ts +15 -0
- package/dist/migrate/export/project-files.js +43 -0
- package/dist/migrate/export/project-files.js.map +1 -0
- package/dist/migrate/export/propelauth-config.d.ts +18 -0
- package/dist/migrate/export/propelauth-config.js +58 -0
- package/dist/migrate/export/propelauth-config.js.map +1 -0
- package/dist/migrate/export/propelauth-harness.test-helper.d.ts +62 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js +109 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js.map +1 -0
- package/dist/migrate/export/propelauth.d.ts +48 -0
- package/dist/migrate/export/propelauth.js +255 -0
- package/dist/migrate/export/propelauth.js.map +1 -0
- package/dist/migrate/export/source-lines.d.ts +17 -0
- package/dist/migrate/export/source-lines.js +43 -0
- package/dist/migrate/export/source-lines.js.map +1 -0
- package/dist/migrate/export/sso-metadata.d.ts +47 -0
- package/dist/migrate/export/sso-metadata.js +180 -0
- package/dist/migrate/export/sso-metadata.js.map +1 -0
- package/dist/migrate/export/stytch-config.d.ts +22 -0
- package/dist/migrate/export/stytch-config.js +102 -0
- package/dist/migrate/export/stytch-config.js.map +1 -0
- package/dist/migrate/export/stytch.d.ts +68 -0
- package/dist/migrate/export/stytch.js +510 -0
- package/dist/migrate/export/stytch.js.map +1 -0
- package/dist/migrate/export/supabase-config.d.ts +48 -0
- package/dist/migrate/export/supabase-config.js +408 -0
- package/dist/migrate/export/supabase-config.js.map +1 -0
- package/dist/migrate/export/supabase.d.ts +86 -0
- package/dist/migrate/export/supabase.js +524 -0
- package/dist/migrate/export/supabase.js.map +1 -0
- package/dist/migrate/export/supertokens-config.d.ts +20 -0
- package/dist/migrate/export/supertokens-config.js +150 -0
- package/dist/migrate/export/supertokens-config.js.map +1 -0
- package/dist/migrate/export/supertokens.d.ts +125 -0
- package/dist/migrate/export/supertokens.js +464 -0
- package/dist/migrate/export/supertokens.js.map +1 -0
- package/dist/migrate/export/table.d.ts +35 -0
- package/dist/migrate/export/table.js +248 -0
- package/dist/migrate/export/table.js.map +1 -0
- package/dist/migrate/export/userfront-config.d.ts +15 -0
- package/dist/migrate/export/userfront-config.js +49 -0
- package/dist/migrate/export/userfront-config.js.map +1 -0
- package/dist/migrate/export/userfront.d.ts +38 -0
- package/dist/migrate/export/userfront.js +189 -0
- package/dist/migrate/export/userfront.js.map +1 -0
- package/dist/migrate/export/workos-config.d.ts +23 -0
- package/dist/migrate/export/workos-config.js +125 -0
- package/dist/migrate/export/workos-config.js.map +1 -0
- package/dist/migrate/export/workos.d.ts +46 -0
- package/dist/migrate/export/workos.js +272 -0
- package/dist/migrate/export/workos.js.map +1 -0
- package/dist/migrate/export/zitadel-config.d.ts +37 -0
- package/dist/migrate/export/zitadel-config.js +279 -0
- package/dist/migrate/export/zitadel-config.js.map +1 -0
- package/dist/migrate/export/zitadel.d.ts +82 -0
- package/dist/migrate/export/zitadel.js +447 -0
- package/dist/migrate/export/zitadel.js.map +1 -0
- package/dist/migrate/firebase/plugin.d.ts +2 -0
- package/dist/migrate/firebase/plugin.js +152 -0
- package/dist/migrate/firebase/plugin.js.map +1 -0
- package/dist/migrate/framework/builtins.js +35 -6
- package/dist/migrate/framework/builtins.js.map +1 -1
- package/dist/migrate/framework/orchestrator.js +3 -2
- package/dist/migrate/framework/orchestrator.js.map +1 -1
- package/dist/migrate/framework/plugin.d.ts +2 -0
- package/dist/migrate/frontegg/plugin.d.ts +2 -0
- package/dist/migrate/frontegg/plugin.js +78 -0
- package/dist/migrate/frontegg/plugin.js.map +1 -0
- package/dist/migrate/fusionauth/plugin.d.ts +2 -0
- package/dist/migrate/fusionauth/plugin.js +109 -0
- package/dist/migrate/fusionauth/plugin.js.map +1 -0
- package/dist/migrate/hanko/plugin.d.ts +2 -0
- package/dist/migrate/hanko/plugin.js +100 -0
- package/dist/migrate/hanko/plugin.js.map +1 -0
- package/dist/migrate/keycloak/plugin.d.ts +2 -0
- package/dist/migrate/keycloak/plugin.js +148 -0
- package/dist/migrate/keycloak/plugin.js.map +1 -0
- package/dist/migrate/ldap/plugin.d.ts +2 -0
- package/dist/migrate/ldap/plugin.js +73 -0
- package/dist/migrate/ldap/plugin.js.map +1 -0
- package/dist/migrate/logto/plugin.d.ts +2 -0
- package/dist/migrate/logto/plugin.js +131 -0
- package/dist/migrate/logto/plugin.js.map +1 -0
- package/dist/migrate/magic/plugin.d.ts +2 -0
- package/dist/migrate/magic/plugin.js +56 -0
- package/dist/migrate/magic/plugin.js.map +1 -0
- package/dist/migrate/nhost/plugin.d.ts +2 -0
- package/dist/migrate/nhost/plugin.js +115 -0
- package/dist/migrate/nhost/plugin.js.map +1 -0
- package/dist/migrate/oidc/plugin.d.ts +2 -0
- package/dist/migrate/oidc/plugin.js +73 -0
- package/dist/migrate/oidc/plugin.js.map +1 -0
- package/dist/migrate/onelogin/plugin.d.ts +2 -0
- package/dist/migrate/onelogin/plugin.js +61 -0
- package/dist/migrate/onelogin/plugin.js.map +1 -0
- package/dist/migrate/ory/plugin.d.ts +2 -0
- package/dist/migrate/ory/plugin.js +186 -0
- package/dist/migrate/ory/plugin.js.map +1 -0
- package/dist/migrate/ping-identity/plugin.d.ts +2 -0
- package/dist/migrate/ping-identity/plugin.js +100 -0
- package/dist/migrate/ping-identity/plugin.js.map +1 -0
- package/dist/migrate/pocketbase/plugin.d.ts +2 -0
- package/dist/migrate/pocketbase/plugin.js +99 -0
- package/dist/migrate/pocketbase/plugin.js.map +1 -0
- package/dist/migrate/propelauth/plugin.d.ts +2 -0
- package/dist/migrate/propelauth/plugin.js +65 -0
- package/dist/migrate/propelauth/plugin.js.map +1 -0
- package/dist/migrate/saml/plugin.d.ts +2 -0
- package/dist/migrate/saml/plugin.js +79 -0
- package/dist/migrate/saml/plugin.js.map +1 -0
- package/dist/migrate/stytch/plugin.d.ts +2 -0
- package/dist/migrate/stytch/plugin.js +97 -0
- package/dist/migrate/stytch/plugin.js.map +1 -0
- package/dist/migrate/supabase/plugin.d.ts +2 -0
- package/dist/migrate/supabase/plugin.js +149 -0
- package/dist/migrate/supabase/plugin.js.map +1 -0
- package/dist/migrate/supertokens/plugin.d.ts +2 -0
- package/dist/migrate/supertokens/plugin.js +114 -0
- package/dist/migrate/supertokens/plugin.js.map +1 -0
- package/dist/migrate/user-table/plugin.d.ts +2 -0
- package/dist/migrate/user-table/plugin.js +62 -0
- package/dist/migrate/user-table/plugin.js.map +1 -0
- package/dist/migrate/userfront/plugin.d.ts +2 -0
- package/dist/migrate/userfront/plugin.js +60 -0
- package/dist/migrate/userfront/plugin.js.map +1 -0
- package/dist/migrate/workos/plugin.d.ts +2 -0
- package/dist/migrate/workos/plugin.js +81 -0
- package/dist/migrate/workos/plugin.js.map +1 -0
- package/dist/migrate/zitadel/plugin.d.ts +2 -0
- package/dist/migrate/zitadel/plugin.js +114 -0
- package/dist/migrate/zitadel/plugin.js.map +1 -0
- package/dist/run.js +6 -0
- package/dist/run.js.map +1 -1
- package/github-action/fga-test/action.yml +43 -0
- package/package.json +9 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fga.js","sourceRoot":"","sources":["../../src/commands/fga.ts"],"names":[],"mappings":";;AA0CA,8BAuBC;AAED,kBAwCC;AA3GD,yCAA6C;AAC7C,+BAA0C;AAC1C,kCAA+C;AAE/C,sCAAqC;AACrC,sCAAsC;AACtC,wCAAqC;AACrC,qCAA6D;AAqB7D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,IAAY,EAAW,EAAE;IACvD,IAAI,CAAC;QACH,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,YAAS,EAAC,IAAI,CAAC,CAAC;IACpE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,iBAAQ,CAAC,GAAG,IAAI,yBAA0B,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,IAAI,CAAC,GAAe,EAAE,IAAgB;IAC7C,MAAM,IAAI,GAAG,IAAA,oBAAW,EAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,OAAO,IAAA,iBAAO,EAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAA,kBAAS,EAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AAChG,CAAC;AAED,uGAAuG;AACvG,SAAgB,SAAS,CAAC,GAAe,EAAE,IAAY;IACrD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,C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CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1J,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;QACvB,IAAI,IAAA,kBAAS,EAAC,CAAC,CAAC;YAAE,IAAA,kBAAS,EAAC,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;;YAChD,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,SAAS,CAAC,CAAC;QAClC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,EAAE,GAAG,IAAA,UAAG,EAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACrD,IAAI,EAAE,KAAK,KAAK,IAAI,EAAE,KAAK,MAAM;QAAE,MAAM,IAAI,iBAAQ,CAAC,+BAA+B,CAAC,CAAC;IACvF,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACxE,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ParsedArgs } from '../args';
|
|
2
|
+
import type { RunContext } from '../context';
|
|
3
|
+
/**
|
|
4
|
+
* `atlas pages` — code-defined hosted-page templates.
|
|
5
|
+
*
|
|
6
|
+
* list each page's live and draft template
|
|
7
|
+
* push <file> --page <p> [--promote] save the file as the draft (and publish it with --promote)
|
|
8
|
+
* preview --page <p> print a signed link to the page with the draft applied
|
|
9
|
+
* promote --page <p> make the draft the live template
|
|
10
|
+
* pull --page <p> [--draft] print the live (or draft) definition as JSON
|
|
11
|
+
* discard --page <p> --status <draft|live>
|
|
12
|
+
* drop the draft, or take the live template down
|
|
13
|
+
*/
|
|
14
|
+
export declare function pages(ctx: RunContext, args: ParsedArgs): Promise<number>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pages = pages;
|
|
4
|
+
const args_1 = require("../args");
|
|
5
|
+
const errors_1 = require("../errors");
|
|
6
|
+
const output_1 = require("../output");
|
|
7
|
+
const shared_1 = require("./shared");
|
|
8
|
+
const PAGES = ['sign-in', 'sign-up', 'user-profile'];
|
|
9
|
+
const COLUMNS = [
|
|
10
|
+
{ header: 'PAGE', get: (p) => p.page },
|
|
11
|
+
{ header: 'LIVE', get: (p) => (p.live ? `v${p.live.version} ${(0, output_1.fmtTime)(p.live.updated_at)}` : '-') },
|
|
12
|
+
{ header: 'DRAFT', get: (p) => (p.draft ? `v${p.draft.version} ${(0, output_1.fmtTime)(p.draft.updated_at)}` : '-') },
|
|
13
|
+
];
|
|
14
|
+
function parsePage(raw) {
|
|
15
|
+
if (!raw || !PAGES.includes(raw))
|
|
16
|
+
throw new errors_1.CliError(`--page is required (one of: ${PAGES.join(', ')}).`);
|
|
17
|
+
return raw;
|
|
18
|
+
}
|
|
19
|
+
/** A template file is the definition itself, or `{ "definition": … }`. */
|
|
20
|
+
function readDefinition(ctx, file) {
|
|
21
|
+
let parsed;
|
|
22
|
+
try {
|
|
23
|
+
parsed = JSON.parse(ctx.readFile(file));
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
throw new errors_1.CliError(`'${file}' is not valid JSON: ${e instanceof Error ? e.message : String(e)}`);
|
|
27
|
+
}
|
|
28
|
+
const doc = parsed;
|
|
29
|
+
const def = doc?.definition ?? (doc?.regions ? doc : undefined);
|
|
30
|
+
if (!def)
|
|
31
|
+
throw new errors_1.CliError(`'${file}' needs a "regions" object (header, above_form, below_form, footer).`);
|
|
32
|
+
return def;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `atlas pages` — code-defined hosted-page templates.
|
|
36
|
+
*
|
|
37
|
+
* list each page's live and draft template
|
|
38
|
+
* push <file> --page <p> [--promote] save the file as the draft (and publish it with --promote)
|
|
39
|
+
* preview --page <p> print a signed link to the page with the draft applied
|
|
40
|
+
* promote --page <p> make the draft the live template
|
|
41
|
+
* pull --page <p> [--draft] print the live (or draft) definition as JSON
|
|
42
|
+
* discard --page <p> --status <draft|live>
|
|
43
|
+
* drop the draft, or take the live template down
|
|
44
|
+
*/
|
|
45
|
+
async function pages(ctx, args) {
|
|
46
|
+
const sub = args.positionals[1];
|
|
47
|
+
const json = (0, shared_1.wantsJson)(args.values);
|
|
48
|
+
const { client } = (0, shared_1.requireClient)(ctx, args.values);
|
|
49
|
+
switch (sub) {
|
|
50
|
+
case 'list': {
|
|
51
|
+
const page = await client.pageTemplates.list();
|
|
52
|
+
if (json)
|
|
53
|
+
(0, output_1.printJson)(ctx.io, page);
|
|
54
|
+
else
|
|
55
|
+
ctx.io.out((0, output_1.renderTable)(COLUMNS, page.data));
|
|
56
|
+
return 0;
|
|
57
|
+
}
|
|
58
|
+
case 'push': {
|
|
59
|
+
const file = (0, shared_1.requireArg)(args.positionals, 2, 'file');
|
|
60
|
+
const page = parsePage((0, args_1.str)(args.values, 'page'));
|
|
61
|
+
let state = await client.pageTemplates.saveDraft(page, readDefinition(ctx, file));
|
|
62
|
+
if (args.values.promote)
|
|
63
|
+
state = await client.pageTemplates.promote(page);
|
|
64
|
+
if (json)
|
|
65
|
+
(0, output_1.printJson)(ctx.io, state);
|
|
66
|
+
else
|
|
67
|
+
ctx.io.out(args.values.promote ? `Saved and published the ${page} template.` : `Saved the ${page} draft. Run 'atlas pages preview --page ${page}' to see it.`);
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
case 'preview': {
|
|
71
|
+
const out = await client.pageTemplates.preview(parsePage((0, args_1.str)(args.values, 'page')));
|
|
72
|
+
if (json)
|
|
73
|
+
(0, output_1.printJson)(ctx.io, out);
|
|
74
|
+
else {
|
|
75
|
+
ctx.io.out(out.url);
|
|
76
|
+
ctx.io.err(`The link works until ${(0, output_1.fmtTime)(out.expires_at)} and shows the draft with a preview banner.`);
|
|
77
|
+
}
|
|
78
|
+
return 0;
|
|
79
|
+
}
|
|
80
|
+
case 'promote': {
|
|
81
|
+
const page = parsePage((0, args_1.str)(args.values, 'page'));
|
|
82
|
+
const state = await client.pageTemplates.promote(page);
|
|
83
|
+
if (json)
|
|
84
|
+
(0, output_1.printJson)(ctx.io, state);
|
|
85
|
+
else
|
|
86
|
+
ctx.io.out(`The ${page} draft is now live.`);
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
89
|
+
case 'pull': {
|
|
90
|
+
const state = await client.pageTemplates.get(parsePage((0, args_1.str)(args.values, 'page')));
|
|
91
|
+
const slot = args.values.draft ? state.draft : state.live;
|
|
92
|
+
if (!slot)
|
|
93
|
+
throw new errors_1.CliError(`There is no ${args.values.draft ? 'draft' : 'live'} template for ${state.page}.`);
|
|
94
|
+
(0, output_1.printJson)(ctx.io, slot.definition);
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
case 'discard': {
|
|
98
|
+
const page = parsePage((0, args_1.str)(args.values, 'page'));
|
|
99
|
+
const status = (0, args_1.str)(args.values, 'status');
|
|
100
|
+
if (status !== 'draft' && status !== 'live')
|
|
101
|
+
throw new errors_1.CliError('--status is required: draft or live.');
|
|
102
|
+
const state = await client.pageTemplates.discard(page, status);
|
|
103
|
+
if (json)
|
|
104
|
+
(0, output_1.printJson)(ctx.io, state);
|
|
105
|
+
else
|
|
106
|
+
ctx.io.out(`Dropped the ${status} ${page} template.`);
|
|
107
|
+
return 0;
|
|
108
|
+
}
|
|
109
|
+
default:
|
|
110
|
+
throw new errors_1.CliError(`Unknown pages command '${sub ?? ''}'. Try: list, push, preview, promote, pull, discard.`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=pages.js.map
|
|
@@ -0,0 +1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S,CAAC,IAAA,UAAG,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;YACjD,MAAM,MAAM,GAAG,IAAA,UAAG,EAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC1C,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,MAAM;gBAAE,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;YACxG,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAC/D,IAAI,IAAI;gBAAE,IAAA,kBAAS,EAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;;gBAC9B,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,eAAe,MAAM,IAAI,IAAI,YAAY,CAAC,CAAC;YAC3D,OAAO,CAAC,CAAC;QACX,CAAC;QACD;YACE,MAAM,IAAI,iBAAQ,CAAC,0BAA0B,GAAG,IAAI,EAAE,sDAAsD,CAAC,CAAC;IAClH,CAAC;AACH,CAAC"}
|
package/dist/context.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { type Prompter } from './prompt';
|
|
|
9
9
|
* enforces — that the command set maps only onto namespaces that really exist,
|
|
10
10
|
* and it keeps the fake a test injects small (five namespaces, not forty).
|
|
11
11
|
*/
|
|
12
|
-
export type ManagementClient = Pick<AtlasClient, 'users' | 'organizations' | 'apiKeys' | 'webhooks' | 'sessions' | 'actions' | 'actionGallery' | 'actionTemplates'>;
|
|
12
|
+
export type ManagementClient = Pick<AtlasClient, 'users' | 'organizations' | 'apiKeys' | 'webhooks' | 'sessions' | 'actions' | 'actionGallery' | 'actionTemplates' | 'pageTemplates'>;
|
|
13
13
|
/**
|
|
14
14
|
* Everything a command touches the outside world through, in one injectable
|
|
15
15
|
* bag. Production wires the real IO/config/prompt/client; every test builds
|
package/dist/help.d.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* out of the handlers so the dispatch code stays about control flow and the
|
|
4
4
|
* copy can be read (and kept consistent) in one place.
|
|
5
5
|
*/
|
|
6
|
-
export declare const TOP_HELP = "atlas \u2014 manage an Atlas instance from the terminal\n\nUsage: atlas <command> [subcommand] [arguments] [options]\n\nCommands:\n login Authenticate and store a profile credential\n (--device: operator sign-in in the browser, no key stored)\n token --resource <id> A one-hour token for one instance/app from your operator sign-in\n keys whoami|list|create|rotate|revoke|revoke-leaked\n Scoped secret keys; new secrets go sealed into 0600 files\n logout Remove a stored profile credential\n whoami Show the active profile and instance\n users list|get|create|delete\n orgs list|get|members\n api-keys list|create|revoke\n webhooks list|create|upsert|update|test|deliveries|redeliver|replay|rotate|reveal\n listen --forward-to <url> Forward live events to your local server, signed (no tunnel)\n move-origin --from --to Move an app to a new domain in one step (--dry-run first)\n csp --framework next|express|nginx\n Print the Content Security Policy sources Atlas needs\n integrations list|get|set|remove|deliveries Identity integrations (chat, docs, consent, referrals, custom)\n partner-platforms list|get|set|registration|token|deliveries|remove\n This instance as a partner platform (signed consent deliveries in)\n id-accounts provision|list|rotate|remove\n Test and review accounts for a Sign in with Atlas app (passwords go to 0600 files)\n admin id-accounts list|provision|extend|rotate|revoke\n admin developer-accounts provision|revoke\n Atlas staff: accounts for other platforms' integration teams\n (operator sign-in with a recent second factor; passwords to 0600 files)\n sessions revoke\n config export|import|plan
|
|
6
|
+
export declare const TOP_HELP = "atlas \u2014 manage an Atlas instance from the terminal\n\nUsage: atlas <command> [subcommand] [arguments] [options]\n\nCommands:\n login Authenticate and store a profile credential\n (--device: operator sign-in in the browser, no key stored)\n token --resource <id> A one-hour token for one instance/app from your operator sign-in\n keys whoami|list|create|rotate|revoke|revoke-leaked\n Scoped secret keys; new secrets go sealed into 0600 files\n logout Remove a stored profile credential\n whoami Show the active profile and instance\n users list|get|create|delete\n orgs list|get|members\n api-keys list|create|revoke\n webhooks list|create|upsert|update|test|deliveries|redeliver|replay|rotate|reveal\n listen --forward-to <url> Forward live events to your local server, signed (no tunnel)\n dev [proxy] Local in-memory Atlas (emulator) / one-origin dev proxy\n move-origin --from --to Move an app to a new domain in one step (--dry-run first)\n csp --framework next|express|nginx\n Print the Content Security Policy sources Atlas needs\n fga test|validate|transform <file>\n Run .fga.yaml test suites, validate and convert authorization models\n integrations list|get|set|remove|deliveries Identity integrations (chat, docs, consent, referrals, custom)\n partner-platforms list|get|set|registration|token|deliveries|remove\n This instance as a partner platform (signed consent deliveries in)\n id-accounts provision|list|rotate|remove\n Test and review accounts for a Sign in with Atlas app (passwords go to 0600 files)\n admin id-accounts list|provision|extend|rotate|revoke\n admin developer-accounts provision|revoke\n Atlas staff: accounts for other platforms' integration teams\n (operator sign-in with a recent second factor; passwords to 0600 files)\n sessions revoke\n config export|import|plan|promote\n Config-as-code: round-trip the instance's config; plan = drift diff;\n promote = copy one environment's config to another\n actions list|deploy|test|logs|gallery|show|install|installs|update|publish\n pages list|push|preview|promote|pull|discard\n Code-defined hosted-page templates: draft, signed preview link, promote\n init Create or complete an app's setup (idempotent); secrets to 0600 files\n preflight Check an instance's setup; non-zero exit on errors (for CI)\n doctor Integration health: webhooks, logout, referrals, email, consent (exit 1 on a failure)\n env Print deploy variables: public values + secret file paths\n client rotate Rotate an OAuth client secret straight into its file\n referrals connect|backfill|status\n Connect a referral platform, backfill, check the connection\n status Atlas status, incidents that concern the instance and its\n upstream status pages; non-zero exit on an outage\n import --from <vendor> <file>\n Move users from Auth0, Clerk, Supabase, Firebase, Cognito,\n Auth.js, WorkOS or Better Auth (resumable; --dry-run first)\n migrate code --from <vendor> [path]\n Rewrite an app's auth code onto Atlas (Clerk, Auth.js,\n Supabase, Auth0, Better Auth); a dry run with a diff unless --yes\n migrate better-auth [path] Move a Better Auth app to Atlas end to end: config, users,\n sessions and code, resumable (--dry-run, --resume, --yes)\n migrate better-auth config [path]\n Translate the app's betterAuth({...}) options into Atlas\n config files plus a report (offline)\n migrate <vendor> [step] [path]\n Move from any vendor (config, export, import, bridge, lazy):\n resumable; vendor credentials never leave this machine\n info [path] Print the environment for a support ticket (versions, SDKs,\n instance, API latency, preflight); secrets redacted\n mcp install Add the Atlas MCP server (docs search) to Cursor, Claude Code,\n Codex or VS Code\n\nGlobal options:\n --profile <name> Use a named profile (default: active, else \"default\")\n --json Emit raw JSON instead of a human table\n --limit <n> Page size for list commands that paginate\n --starting-after <cursor> Pagination cursor (from a prior page's hint)\n -h, --help Show this help, or help for a command\n -v, --version Print the version\n\nEnvironment overrides:\n ATLAS_SECRET_KEY Secret key to use instead of the stored one\n ATLAS_API_BASE API URL to use instead of the stored one\n ATLAS_API_URL Same (the older name); ATLAS_API_BASE wins when both are set\n ATLAS_PLATFORM_KEY Platform key (psk_) for atlas init\n REFERALLI_BASE_URL Referalli base URL for atlas referrals connect\n REFERALLI_API_KEY Referalli merchant key for atlas referrals connect (never stored)\n (the old REFERALLY_BASE_URL / REFERALLY_API_KEY still work, with a notice)\n\nSecrets: a command that receives a secret writes it to a 0600 file under\n~/.config/<product>/ and prints only the path. --print-secret prints it instead.\n\nRun 'atlas <command> --help' for command-specific help.";
|
|
7
7
|
/** Per-command help, keyed by the resource word. */
|
|
8
8
|
export declare const COMMAND_HELP: Record<string, string>;
|
package/dist/help.js
CHANGED
|
@@ -23,9 +23,12 @@ Commands:
|
|
|
23
23
|
api-keys list|create|revoke
|
|
24
24
|
webhooks list|create|upsert|update|test|deliveries|redeliver|replay|rotate|reveal
|
|
25
25
|
listen --forward-to <url> Forward live events to your local server, signed (no tunnel)
|
|
26
|
+
dev [proxy] Local in-memory Atlas (emulator) / one-origin dev proxy
|
|
26
27
|
move-origin --from --to Move an app to a new domain in one step (--dry-run first)
|
|
27
28
|
csp --framework next|express|nginx
|
|
28
29
|
Print the Content Security Policy sources Atlas needs
|
|
30
|
+
fga test|validate|transform <file>
|
|
31
|
+
Run .fga.yaml test suites, validate and convert authorization models
|
|
29
32
|
integrations list|get|set|remove|deliveries Identity integrations (chat, docs, consent, referrals, custom)
|
|
30
33
|
partner-platforms list|get|set|registration|token|deliveries|remove
|
|
31
34
|
This instance as a partner platform (signed consent deliveries in)
|
|
@@ -36,8 +39,12 @@ Commands:
|
|
|
36
39
|
Atlas staff: accounts for other platforms' integration teams
|
|
37
40
|
(operator sign-in with a recent second factor; passwords to 0600 files)
|
|
38
41
|
sessions revoke
|
|
39
|
-
config export|import|plan
|
|
42
|
+
config export|import|plan|promote
|
|
43
|
+
Config-as-code: round-trip the instance's config; plan = drift diff;
|
|
44
|
+
promote = copy one environment's config to another
|
|
40
45
|
actions list|deploy|test|logs|gallery|show|install|installs|update|publish
|
|
46
|
+
pages list|push|preview|promote|pull|discard
|
|
47
|
+
Code-defined hosted-page templates: draft, signed preview link, promote
|
|
41
48
|
init Create or complete an app's setup (idempotent); secrets to 0600 files
|
|
42
49
|
preflight Check an instance's setup; non-zero exit on errors (for CI)
|
|
43
50
|
doctor Integration health: webhooks, logout, referrals, email, consent (exit 1 on a failure)
|
|
@@ -163,10 +170,28 @@ Vendors:
|
|
|
163
170
|
passport passport + express-session (initialize, session, authenticate('jwt'),
|
|
164
171
|
req.isAuthenticated()); strategies and req.user are reported
|
|
165
172
|
iron-session getIronSession() reads of the user id -> auth()
|
|
173
|
+
keycloak keycloak-js, @react-keycloak, keycloak-connect, the Keycloak Auth.js provider
|
|
174
|
+
ory @ory/client, @ory/nextjs, @ory/elements (Kratos and Hydra)
|
|
175
|
+
zitadel @zitadel/react, @zitadel/node, @zitadel/next
|
|
176
|
+
logto @logto/react, @logto/next, @logto/node and the other Logto SDKs
|
|
177
|
+
supertokens supertokens-node, supertokens-web-js, supertokens-auth-react
|
|
178
|
+
authentik react-oidc-context / oidc-client-ts pointed at authentik, @goauthentik/api
|
|
179
|
+
fusionauth @fusionauth/react-sdk, @fusionauth/typescript-client and the other FusionAuth SDKs
|
|
180
|
+
hanko @teamhanko/hanko-elements and hanko-frontend-sdk
|
|
166
181
|
openid-client openid-client (Issuer.discover, authorizationUrl, callback, endSessionUrl)
|
|
167
182
|
jose jose used to verify OIDC ID tokens (jwtVerify + createRemoteJWKSet)
|
|
168
183
|
generic-oidc a hand-rolled relying party (discovery, PKCE, code exchange, JWKS) found
|
|
169
184
|
by its code; replaced by oidc.start / oidc.callback / oidc.logoutUrl
|
|
185
|
+
firebase firebase/auth (modular and v8 compat), react-firebase-hooks, FirebaseUI,
|
|
186
|
+
firebase-admin auth calls; Firebase itself stays for Firestore/Storage
|
|
187
|
+
cognito aws-amplify/auth (v6 and v5 Auth), Hub auth events, @aws-amplify/ui-react,
|
|
188
|
+
amazon-cognito-identity-js, aws-jwt-verify
|
|
189
|
+
azure-ad-b2c @azure/msal-browser, @azure/msal-react, @azure/msal-node, passport-azure-ad
|
|
190
|
+
entra-external-id the same MSAL rewrite, for Entra External ID tenants
|
|
191
|
+
appwrite the Appwrite Account API (new Account(client)), node-appwrite Users/Teams;
|
|
192
|
+
Databases/Storage stay
|
|
193
|
+
pocketbase pb.authStore and collection auth calls; collections and files stay
|
|
194
|
+
nhost @nhost/react / @nhost/nextjs hooks and nhost.auth.*; GraphQL/Storage stay
|
|
170
195
|
|
|
171
196
|
What it rewrites: imports, providers, hooks, server session helpers, middleware,
|
|
172
197
|
sign-in/out calls and env var names, onto native Atlas APIs and the drop-in
|
|
@@ -409,6 +434,16 @@ and no second endpoint. The signing secret belongs to this session only and is
|
|
|
409
434
|
written to a 0600 file (webhook-listen.env): point your verifier at it. --events
|
|
410
435
|
takes names or patterns (user.*, *.created). The session lasts up to an hour;
|
|
411
436
|
Ctrl-C stops it. --count n exits after n events (exit 1 if any forward failed).`,
|
|
437
|
+
dev: `atlas dev — a local, in-memory Atlas
|
|
438
|
+
|
|
439
|
+
Usage:
|
|
440
|
+
atlas dev [--port 4400] [--seed seed.json] [--app http://localhost:3000]
|
|
441
|
+
atlas dev proxy --app <url> --api <fapi url> [--port 4401]
|
|
442
|
+
|
|
443
|
+
The emulator serves the Frontend API, a minimal Backend API, OIDC discovery and
|
|
444
|
+
a mail/SMS catcher at /__emulator/mail. Every code is 424242. With --app it also
|
|
445
|
+
forwards everything it does not own to your app, so both share one origin.
|
|
446
|
+
'dev proxy' does the same against a real instance. No account, no network.`,
|
|
412
447
|
'move-origin': `atlas move-origin — move an app to a new domain
|
|
413
448
|
|
|
414
449
|
Usage: atlas move-origin --from <origin> --to <origin> [--dry-run] [--yes] [--json]
|
|
@@ -419,6 +454,17 @@ allowlist and your Sign in with Atlas apps. Shows the before and after of every
|
|
|
419
454
|
field first and asks before writing (--yes skips the question). After a real
|
|
420
455
|
move it sends a signed test delivery to each webhook endpoint that moved.
|
|
421
456
|
--dry-run prints the diff and writes nothing; running it twice changes nothing.`,
|
|
457
|
+
fga: `atlas fga — author and test authorization models
|
|
458
|
+
|
|
459
|
+
Usage:
|
|
460
|
+
atlas fga test <suite.fga.yaml> [--store <id>] [--json]
|
|
461
|
+
atlas fga validate <model.fga|model.json>
|
|
462
|
+
atlas fga transform <model.fga|model.json> [--to dsl|json]
|
|
463
|
+
|
|
464
|
+
A test file follows the OpenFGA format: model (DSL text) or model_file, tuples or tuple_file,
|
|
465
|
+
and tests, each with check, list_objects and list_users assertions. The suite runs in memory on
|
|
466
|
+
the Atlas engine; no stored tuples are read or written. Exit code 1 when any test fails, so it
|
|
467
|
+
gates CI. Prints which model relations the assertions cover.`,
|
|
422
468
|
csp: `atlas csp — the Content Security Policy sources Atlas needs
|
|
423
469
|
|
|
424
470
|
Usage: atlas csp [--framework next|express|nginx] [--shape redirect|panel|button]
|
|
@@ -600,6 +646,7 @@ Usage:
|
|
|
600
646
|
atlas config export [--dir <path>] [--format json|yaml]
|
|
601
647
|
atlas config import [--dir <path>] [--format json|yaml] [--dry-run] [--prune]
|
|
602
648
|
atlas config plan [--dir <path>] [--format json|yaml] [--prune] [--exit-code] [--json]
|
|
649
|
+
atlas config promote --from <profile> --to <profile> [--dry-run] [--prune] [--yes] [--format json|yaml]
|
|
603
650
|
|
|
604
651
|
export Read the instance's current config (instance/auth config, OAuth clients
|
|
605
652
|
and providers, SSO connections, resource servers, JWT templates, roles,
|
|
@@ -618,13 +665,35 @@ plan A Terraform-style, read-only diff of the directory against the live
|
|
|
618
665
|
instance: field-by-field before -> after for updates. --exit-code exits 2
|
|
619
666
|
when there is drift (for CI); --json for tooling.
|
|
620
667
|
|
|
668
|
+
promote Copy one environment's configuration to another (development ->
|
|
669
|
+
staging -> production). Each environment is a profile holding that
|
|
670
|
+
instance's secret key ('atlas login --profile staging'). Uses the same
|
|
671
|
+
plan/apply engine as import; --dry-run prints the plan only, and
|
|
672
|
+
applying to a live key needs --yes. Secrets never travel.
|
|
673
|
+
|
|
621
674
|
Secrets never live on disk. Inject a credential at import with a \${ENV_VAR}
|
|
622
675
|
placeholder in a file (e.g. a provider "client_secret": "\${GOOGLE_SECRET}").`,
|
|
676
|
+
pages: `atlas pages — code-defined hosted-page templates
|
|
677
|
+
|
|
678
|
+
Usage:
|
|
679
|
+
atlas pages list [--json]
|
|
680
|
+
atlas pages push <file> --page <sign-in|sign-up|user-profile> [--promote] [--json]
|
|
681
|
+
atlas pages preview --page <page> [--json]
|
|
682
|
+
atlas pages promote --page <page> [--json]
|
|
683
|
+
atlas pages pull --page <page> [--draft]
|
|
684
|
+
atlas pages discard --page <page> --status <draft|live> [--json]
|
|
685
|
+
|
|
686
|
+
A template is a JSON file of components (heading, text, image, link, button_link,
|
|
687
|
+
list, divider, spacer, columns) in four regions around the sign-in card: header,
|
|
688
|
+
above_form, below_form and footer. There is no raw HTML, CSS or script; Atlas
|
|
689
|
+
validates the file and renders it. push saves a draft only; the live page does not
|
|
690
|
+
change until promote (or push --promote). preview prints a signed link, valid for an
|
|
691
|
+
hour, that shows the draft with a preview banner.`,
|
|
623
692
|
actions: `atlas actions — manage Actions (tenant code run in the auth pipeline)
|
|
624
693
|
|
|
625
694
|
Usage:
|
|
626
695
|
atlas actions list [--json]
|
|
627
|
-
atlas actions deploy <file> --trigger <
|
|
696
|
+
atlas actions deploy <file> --trigger <trigger> [--name <n>] [--json]
|
|
628
697
|
atlas actions test <file> [--trigger <t>] [--json]
|
|
629
698
|
atlas actions logs <action-id> [--json]
|
|
630
699
|
|
package/dist/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAuFgC,CAAC;AAEzD,oDAAoD;AACvC,QAAA,YAAY,GAA2B;IAClD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CA8GmC;IAC5C,IAAI,EAAE;;;;;;;;;;gEAUwD;IAC9D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAmCiE;IACzE,GAAG,EAAE;;;;;;;;;;;;;;;+CAewC;IAC7C,MAAM,EAAE;;;;;;;;;;;;sCAY4B;IACpC,SAAS,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yEAkD4D;IAEvE,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;wEAoB+D;IAEtE,KAAK,EAAE;;;;;4CAKmC;IAE1C,IAAI,EAAE;;;;;;;;;;;;qBAYa;IAEnB,MAAM,EAAE;;uCAE6B;IAErC,MAAM,EAAE;;gDAEsC;IAE9C,KAAK,EAAE;;;;;;wCAM+B;IAEtC,IAAI,EAAE;;;;;uCAK+B;IAErC,UAAU,EAAE;;;;;;8CAMgC;IAE5C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;4DAoBgD;IAC1D,MAAM,EAAE;;;;;;;;;;;;gFAYsE;IAC9E,GAAG,EAAE;;;;;;;;;2EASoE;IACzE,aAAa,EAAE;;;;;;;;;gFAS+D;IAC9E,GAAG,EAAE;;;;;;;;;;6DAUsD;IAC3D,GAAG,EAAE;;;;;;;;;;;;;;;+DAewD;IAE7D,mBAAmB,EAAE;;;;;;;;;;;;;;;;oCAgBa;IAElC,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CA6BqC;IAE5C,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;qBAwBI;IAEnB,YAAY,EAAE;;;;;;;;;;;;;;qCAcqB;IAEnC,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yEA+BiE;IAEvE,SAAS,EAAE;;;;;;oDAMuC;IAElD,MAAM,EAAE;;;;;;;;iEAQuD;IAE/D,GAAG,EAAE;;;;;;;;;;mDAU4C;IAEjD,MAAM,EAAE;;;;;;;;wDAQ8C;IAEtD,QAAQ,EAAE;;;8CAGkC;IAE5C,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EAgCoE;IAC5E,KAAK,EAAE;;;;;;;;;;;;;;;kDAeyC;IAChD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;qEA0B0D;CACpE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { webhooks } from './commands/webhooks';
|
|
|
20
20
|
export { sessions } from './commands/sessions';
|
|
21
21
|
export { config } from './commands/config';
|
|
22
22
|
export { actions } from './commands/actions';
|
|
23
|
+
export { pages } from './commands/pages';
|
|
23
24
|
export { init } from './commands/init';
|
|
24
25
|
export { preflight, envCommand, client } from './commands/project-commands';
|
|
25
26
|
export { referrals } from './commands/referrals';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BETTER_AUTH_MIGRATION_STEPS = exports.migrateBetterAuth = exports.translateBetterAuth = exports.planConfigImport = exports.migrate = exports.manifestPath = exports.writeManifest = exports.readManifest = exports.deliverSecret = exports.productDir = exports.renderDotenv = exports.parseDotenv = exports.readEnvFile = exports.writeSecretFile = exports.referrals = exports.client = exports.envCommand = exports.preflight = exports.init = exports.actions = exports.config = exports.sessions = exports.webhooks = exports.apiKeys = exports.orgs = exports.users = exports.whoami = exports.logout = exports.login = exports.getVersion = exports.defaultPrompter = exports.defaultConfigPath = exports.MemoryConfigStore = exports.FileConfigStore = exports.captureIO = exports.defaultIO = exports.CliError = exports.isNotFound = exports.createConfigHttp = exports.defaultContext = exports.run = void 0;
|
|
3
|
+
exports.BETTER_AUTH_MIGRATION_STEPS = exports.migrateBetterAuth = exports.translateBetterAuth = exports.planConfigImport = exports.migrate = exports.manifestPath = exports.writeManifest = exports.readManifest = exports.deliverSecret = exports.productDir = exports.renderDotenv = exports.parseDotenv = exports.readEnvFile = exports.writeSecretFile = exports.referrals = exports.client = exports.envCommand = exports.preflight = exports.init = exports.pages = exports.actions = exports.config = exports.sessions = exports.webhooks = exports.apiKeys = exports.orgs = exports.users = exports.whoami = exports.logout = exports.login = exports.getVersion = exports.defaultPrompter = exports.defaultConfigPath = exports.MemoryConfigStore = exports.FileConfigStore = exports.captureIO = exports.defaultIO = exports.CliError = exports.isNotFound = exports.createConfigHttp = exports.defaultContext = exports.run = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Library surface of `@atlasauth/cli`. The package ships a bin (`atlas`), but
|
|
6
6
|
* exporting the pieces lets the handlers be unit-tested with injected deps and
|
|
@@ -46,6 +46,8 @@ var config_2 = require("./commands/config");
|
|
|
46
46
|
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_2.config; } });
|
|
47
47
|
var actions_1 = require("./commands/actions");
|
|
48
48
|
Object.defineProperty(exports, "actions", { enumerable: true, get: function () { return actions_1.actions; } });
|
|
49
|
+
var pages_1 = require("./commands/pages");
|
|
50
|
+
Object.defineProperty(exports, "pages", { enumerable: true, get: function () { return pages_1.pages; } });
|
|
49
51
|
var init_1 = require("./commands/init");
|
|
50
52
|
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_1.init; } });
|
|
51
53
|
var project_commands_1 = require("./commands/project-commands");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA0C;AAAjC,0FAAA,GAAG,OAAA;AACZ,qCAAmF;AAA1E,yGAAA,cAAc,OAAA;AACvB,6CAA8E;AAArE,+GAAA,gBAAgB,OAAA;AAAE,yGAAA,UAAU,OAAA;AACrC,mCAAoC;AAA3B,kGAAA,QAAQ,OAAA;AACjB,2BAAqE;AAA5D,+FAAA,SAAS,OAAA;AAAE,+FAAA,SAAS,OAAA;AAC7B,mCAOkB;AANhB,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AACjB,2GAAA,iBAAiB,OAAA;AAKnB,mCAA0D;AAAjD,yGAAA,eAAe,OAAA;AACxB,qCAAuC;AAA9B,qGAAA,UAAU,OAAA;AAEnB,0EAA0E;AAC1E,wCAAwD;AAA/C,6FAAA,KAAK,OAAA;AAAE,8FAAA,MAAM,OAAA;AAAE,8FAAA,MAAM,OAAA;AAC9B,0CAAyC;AAAhC,8FAAA,KAAK,OAAA;AACd,wCAAuC;AAA9B,4FAAA,IAAI,OAAA;AACb,gDAA8C;AAArC,mGAAA,OAAO,OAAA;AAChB,gDAA+C;AAAtC,oGAAA,QAAQ,OAAA;AACjB,gDAA+C;AAAtC,oGAAA,QAAQ,OAAA;AACjB,4CAA2C;AAAlC,gGAAA,MAAM,OAAA;AACf,8CAA6C;AAApC,kGAAA,OAAO,OAAA;AAChB,wCAAuC;AAA9B,4FAAA,IAAI,OAAA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C,8FAAA,KAAK,OAAA;AACd,wCAAuC;AAA9B,4FAAA,IAAI,OAAA;AACb,gDAA8C;AAArC,mGAAA,OAAO,OAAA;AAChB,gDAA+C;AAAtC,oGAAA,QAAQ,OAAA;AACjB,gDAA+C;AAAtC,oGAAA,QAAQ,OAAA;AACjB,4CAA2C;AAAlC,gGAAA,MAAM,OAAA;AACf,8CAA6C;AAApC,kGAAA,OAAO,OAAA;AAChB,0CAAyC;AAAhC,8FAAA,KAAK,OAAA;AACd,wCAAuC;AAA9B,4FAAA,IAAI,OAAA;AACb,gEAA4E;AAAnE,6GAAA,SAAS,OAAA;AAAE,8GAAA,UAAU,OAAA;AAAE,0GAAA,MAAM,OAAA;AACtC,kDAAiD;AAAxC,sGAAA,SAAS,OAAA;AAClB,qCAOmB;AANjB,0GAAA,eAAe,OAAA;AACf,sGAAA,WAAW,OAAA;AACX,sGAAA,WAAW,OAAA;AACX,uGAAA,YAAY,OAAA;AACZ,qGAAA,UAAU,OAAA;AACV,wGAAA,aAAa,OAAA;AAEf,qCAOmB;AANjB,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAAa,OAAA;AACb,uGAAA,YAAY,OAAA;AAKd,8CAA6C;AAApC,kGAAA,OAAO,OAAA;AAChB,4CAA0F;AAAjF,0GAAA,gBAAgB,OAAA;AACzB,6DAA+H;AAAtH,gHAAA,mBAAmB,OAAA;AAC5B,mEAA6G;AAApG,iHAAA,iBAAiB,OAAA;AAAE,2HAAA,KAAK,OAA+B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appwritePlugin = void 0;
|
|
4
|
+
const appwrite_1 = require("../export/appwrite");
|
|
5
|
+
const appwrite_config_1 = require("../export/appwrite-config");
|
|
6
|
+
const errors_1 = require("../../errors");
|
|
7
|
+
const plugin_kit_1 = require("../export/plugin-kit");
|
|
8
|
+
const project_files_1 = require("../export/project-files");
|
|
9
|
+
/**
|
|
10
|
+
* `atlas migrate appwrite` — an Appwrite project (Cloud or self-hosted): auth
|
|
11
|
+
* settings from appwrite.json and the project document, users with their
|
|
12
|
+
* hashes and hash options, identities, MFA recovery codes, teams, memberships
|
|
13
|
+
* and invitations through the Server API (an API key on this machine), the
|
|
14
|
+
* `appwrite` remote bridge (Appwrite vouches for a live session once), lazy
|
|
15
|
+
* migration through the Account API for anyone the export missed, and the
|
|
16
|
+
* `appwrite` codemod.
|
|
17
|
+
*/
|
|
18
|
+
const ENDPOINT = { flag: '--appwrite-endpoint', env: 'APPWRITE_ENDPOINT', label: 'the Appwrite API endpoint including /v1 (default https://cloud.appwrite.io/v1)', required: false };
|
|
19
|
+
const PROJECT_ID = { flag: '--appwrite-project-id', env: 'APPWRITE_PROJECT_ID', label: 'the Appwrite project id', required: true };
|
|
20
|
+
const API_KEY = { flag: '--appwrite-api-key', env: 'APPWRITE_API_KEY', label: 'an Appwrite API key with users.read and teams.read', required: true, secret: true };
|
|
21
|
+
const RECOVERY_CODES = { flag: '--appwrite-recovery-codes', env: 'APPWRITE_RECOVERY_CODES', label: 'true to export MFA recovery codes', required: false };
|
|
22
|
+
const SKIP_TEAMS = { flag: '--appwrite-skip-teams', env: 'APPWRITE_SKIP_TEAMS', label: 'true to leave teams out', required: false };
|
|
23
|
+
const CONFIG_FILE = { flag: '--appwrite-config', env: 'APPWRITE_CONFIG_FILE', label: 'appwrite.json (after appwrite pull settings)', required: false };
|
|
24
|
+
const PROJECT_FILE = { flag: '--appwrite-project-file', env: 'APPWRITE_PROJECT_FILE', label: 'the project document (appwrite projects get --project-id <id> --json)', required: false };
|
|
25
|
+
function endpointOf(p) {
|
|
26
|
+
return (p.credential(ENDPOINT) ?? appwrite_1.APPWRITE_CLOUD).trim().replace(/\/+$/, '');
|
|
27
|
+
}
|
|
28
|
+
exports.appwritePlugin = {
|
|
29
|
+
vendor: 'appwrite',
|
|
30
|
+
source: 'appwrite',
|
|
31
|
+
label: 'Appwrite',
|
|
32
|
+
help: 'Move an Appwrite project: its auth methods, session and password settings and OAuth providers as Atlas config; its users with their password hashes (Argon2, bcrypt, scrypt, Firebase scrypt, MD5, SHA, phpass), labels, prefs, OAuth identities, MFA recovery codes, teams, memberships and invitations; a zero-logout bridge that asks Appwrite about each live session once; lazy migration for anyone left; and the code. Your API key stays on this machine.',
|
|
33
|
+
config: {
|
|
34
|
+
reads: 'appwrite.json (appwrite pull settings) and, for OAuth providers, the project document (appwrite projects get --json)',
|
|
35
|
+
credentials: [CONFIG_FILE, PROJECT_FILE, ENDPOINT, { ...PROJECT_ID, required: false }],
|
|
36
|
+
async translate(p) {
|
|
37
|
+
const file = (0, project_files_1.projectFile)(p, CONFIG_FILE, ['appwrite.json', 'appwrite.config.json']);
|
|
38
|
+
const projectText = (0, plugin_kit_1.localFile)(p, PROJECT_FILE, 'text');
|
|
39
|
+
if (!file && !projectText)
|
|
40
|
+
throw new errors_1.CliError('Appwrite: no appwrite.json in this folder. Run appwrite pull settings, or pass --set appwrite-config=<file> / --set appwrite-project-file=<appwrite projects get --json output>.');
|
|
41
|
+
let project;
|
|
42
|
+
if (projectText) {
|
|
43
|
+
try {
|
|
44
|
+
project = JSON.parse(projectText);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
throw new errors_1.CliError('Appwrite: the project document is not JSON (use appwrite projects get --project-id <id> --json).');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return (0, plugin_kit_1.vendorStep)('Appwrite', async () => (0, appwrite_config_1.translateAppwriteConfig)({ file, project, endpoint: p.credential(ENDPOINT), projectId: p.credential({ ...PROJECT_ID, required: false }) }));
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
export: {
|
|
54
|
+
reads: 'the Appwrite Server API (users with hashes, identities, MFA, teams and memberships)',
|
|
55
|
+
credentials: [ENDPOINT, PROJECT_ID, API_KEY, RECOVERY_CODES, SKIP_TEAMS],
|
|
56
|
+
limits: [
|
|
57
|
+
'TOTP secrets are encrypted at rest and Appwrite has no API to read them: those users enrol an authenticator app again. Recovery codes move with --set appwrite-recovery-codes=true.',
|
|
58
|
+
'Sessions are stored as hashes and cannot be exported: the appwrite bridge preset asks Appwrite about each live session once instead.',
|
|
59
|
+
'A SHA hash imported into Appwrite without a version is ambiguous (SHA3-512 on 1.x, SHA-256 on 2.x): the export picks by digest length and warns.',
|
|
60
|
+
'OAuth access and refresh tokens are not exported: users keep their link and re-consent when your app next calls the provider.',
|
|
61
|
+
],
|
|
62
|
+
async run(p, writer, resume) {
|
|
63
|
+
const set = await (0, plugin_kit_1.vendorStep)('Appwrite', () => (0, appwrite_1.exportAppwrite)({
|
|
64
|
+
endpoint: endpointOf(p),
|
|
65
|
+
projectId: (0, plugin_kit_1.need)(p, PROJECT_ID),
|
|
66
|
+
apiKey: (0, plugin_kit_1.need)(p, API_KEY),
|
|
67
|
+
recoveryCodes: (0, project_files_1.truthyCredential)(p, RECOVERY_CODES),
|
|
68
|
+
skipTeams: (0, project_files_1.truthyCredential)(p, SKIP_TEAMS),
|
|
69
|
+
fetchImpl: p.fetch,
|
|
70
|
+
onProgress: (m) => p.say(` reading ${m}`),
|
|
71
|
+
}));
|
|
72
|
+
await (0, plugin_kit_1.writeRecordSet)(set, writer, resume, p.say);
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
bridge: {
|
|
76
|
+
preset: 'appwrite',
|
|
77
|
+
vars(p, t) {
|
|
78
|
+
const vars = { ...t?.bridge?.vars };
|
|
79
|
+
const endpoint = p.credential(ENDPOINT);
|
|
80
|
+
if (endpoint || !vars.endpoint_url)
|
|
81
|
+
vars.endpoint_url = endpointOf(p);
|
|
82
|
+
const project = p.credential({ ...PROJECT_ID, required: false });
|
|
83
|
+
if (project)
|
|
84
|
+
vars.project_id = project;
|
|
85
|
+
return vars;
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
lazy: {
|
|
89
|
+
preset: 'appwrite',
|
|
90
|
+
config(p, t) {
|
|
91
|
+
const config = { ...t?.lazy?.config };
|
|
92
|
+
const endpoint = p.credential(ENDPOINT);
|
|
93
|
+
if (endpoint || !config.endpoint)
|
|
94
|
+
config.endpoint = endpointOf(p);
|
|
95
|
+
const project = p.credential({ ...PROJECT_ID, required: false });
|
|
96
|
+
if (project)
|
|
97
|
+
config.project_id = project;
|
|
98
|
+
return config;
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
codemod: 'appwrite',
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/migrate/appwrite/plugin.ts"],"names":[],"mappings":";;;AAAA,iDAAoE;AACpE,+DAAoE;AACpE,yCAAwC;AAExC,qDAAmF;AACnF,2DAAwE;AAExE;;;;;;;;GAQG;AAEH,MAAM,QAAQ,GAAmB,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE,mBAAmB,EAAE,KAAK,EAAE,gFAAgF,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACrM,MAAM,UAAU,GAAmB,EAAE,IAAI,EAAE,uBAAuB,EAAE,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACnJ,MAAM,OAAO,GAAmB,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,oDAAoD,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACnL,MAAM,cAAc,GAAmB,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,EAAE,yBAAyB,EAAE,KAAK,EAAE,mCAAmC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC1K,MAAM,UAAU,GAAmB,EAAE,IAAI,EAAE,uBAAuB,EAAE,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,yBAAyB,EAAE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