@absolutejs/absolute 0.19.0-beta.1050 → 0.19.0-beta.1051
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/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/cli/config/client.js +11 -11
- package/dist/cli/config/server.js +839 -101
- package/dist/cli/index.js +1186 -258
- package/dist/src/cli/config/auth/AuthPanel.d.ts +1 -1
- package/dist/src/cli/config/auth/authScaffolds.d.ts +16 -0
- package/dist/src/cli/config/auth/editAuthConfig.d.ts +5 -0
- package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +14 -0
- package/dist/src/cli/config/auth/scaffoldAuthFeature.d.ts +6 -0
- package/dist/src/cli/config/schema/fromType.d.ts +1 -1
- package/dist/src/cli/config/server.d.ts +31 -0
- package/dist/types/authPanel.d.ts +37 -4
- package/package.json +1 -1
|
@@ -2,5 +2,5 @@ import type { AuthPanelState } from '../../../../types/authPanel';
|
|
|
2
2
|
type AuthPanelProps = {
|
|
3
3
|
state: AuthPanelState;
|
|
4
4
|
};
|
|
5
|
-
export declare const AuthPanel: ({ state }: AuthPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const AuthPanel: ({ state: initial }: AuthPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type AuthScaffoldField = {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export type AuthScaffold = {
|
|
6
|
+
configKey: string;
|
|
7
|
+
exportName: string;
|
|
8
|
+
fields: AuthScaffoldField[];
|
|
9
|
+
generic: boolean;
|
|
10
|
+
imports: string[];
|
|
11
|
+
note: string | null;
|
|
12
|
+
packages: string[];
|
|
13
|
+
typeName: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const AUTH_SCAFFOLDS: Record<string, AuthScaffold>;
|
|
16
|
+
export declare const isScaffoldableFeature: (id: string) => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
export declare const findAuthSettingsPath: (cwd: string, override?: string) => string | null;
|
|
3
|
+
export declare const findAuthSettingsObject: (sourceFile: ts.Node) => ts.ObjectLiteralExpression | null;
|
|
4
|
+
export declare const parseAuthSettingsObject: (configPath: string) => {
|
|
5
|
+
object: ts.ObjectLiteralExpression | null;
|
|
6
|
+
text: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const resolveAuthSettingsState: (cwd: string, override?: string) => {
|
|
9
|
+
available: boolean;
|
|
10
|
+
configPath: string | null;
|
|
11
|
+
current: Record<string, unknown>;
|
|
12
|
+
fields: import("../../../../types/config").FieldNode[];
|
|
13
|
+
opaqueKeys: string[];
|
|
14
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { FieldNode } from '../../../../types/config';
|
|
2
|
-
export declare const introspectType: (cwd: string, typeName: string, exclude?: Set<string
|
|
2
|
+
export declare const introspectType: (cwd: string, typeName: string, exclude?: Set<string>, specifier?: string) => FieldNode[];
|
|
@@ -3,6 +3,7 @@ import type { RuleEditResult } from '../../../types/eslintConfig';
|
|
|
3
3
|
import type { TsEditResult } from '../../../types/tsconfig';
|
|
4
4
|
import type { PrettierEditResult } from '../../../types/prettier';
|
|
5
5
|
import type { AbsoluteConfigEditResult } from '../../../types/absoluteConfig';
|
|
6
|
+
import type { AuthConfigEditResult, AuthScaffoldResult } from '../../../types/authPanel';
|
|
6
7
|
import type { IntegrationAddResult } from '../../../types/integrationsPanel';
|
|
7
8
|
import type { PackageJsonEditResult } from '../../../types/packageJsonPanel';
|
|
8
9
|
export declare const launchConfig: (args: string[], cwd?: string) => Promise<Elysia<"", {
|
|
@@ -301,6 +302,36 @@ export declare const launchConfig: (args: string[], cwd?: string) => Promise<Ely
|
|
|
301
302
|
};
|
|
302
303
|
};
|
|
303
304
|
};
|
|
305
|
+
} & {
|
|
306
|
+
api: {
|
|
307
|
+
auth: {
|
|
308
|
+
post: {
|
|
309
|
+
body: unknown;
|
|
310
|
+
params: {};
|
|
311
|
+
query: unknown;
|
|
312
|
+
headers: unknown;
|
|
313
|
+
response: {
|
|
314
|
+
200: Response | AuthConfigEditResult;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
} & {
|
|
320
|
+
api: {
|
|
321
|
+
auth: {
|
|
322
|
+
scaffold: {
|
|
323
|
+
post: {
|
|
324
|
+
body: unknown;
|
|
325
|
+
params: {};
|
|
326
|
+
query: unknown;
|
|
327
|
+
headers: unknown;
|
|
328
|
+
response: {
|
|
329
|
+
200: AuthScaffoldResult;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
304
335
|
} & {
|
|
305
336
|
api: {
|
|
306
337
|
package: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FieldNode } from './config';
|
|
1
2
|
/** One @absolutejs/auth capability, paired with whether the scanned app actually
|
|
2
3
|
* configured it. `kind` separates features that mount HTTP routes from those that
|
|
3
4
|
* only change behavior (emit events, add a derive, throttle) so the panel can say
|
|
@@ -9,12 +10,33 @@ export type AuthFeatureStatus = {
|
|
|
9
10
|
id: string;
|
|
10
11
|
kind: 'behavior' | 'routes';
|
|
11
12
|
label: string;
|
|
13
|
+
/** Whether `absolute add auth:<id>` / the panel can scaffold starter wiring. */
|
|
14
|
+
scaffoldable: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** Result of scaffolding a feature's starter wiring — shared by the CLI
|
|
17
|
+
* (`absolute add auth:<feature>`) and the panel's "Scaffold wiring" button. */
|
|
18
|
+
export type AuthScaffoldResult = {
|
|
19
|
+
created: string | null;
|
|
20
|
+
installed: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
ok: boolean;
|
|
23
|
+
spreadSnippet: string | null;
|
|
24
|
+
};
|
|
25
|
+
/** The editable, serializable settings slice — introspected from the `AuthSettings`
|
|
26
|
+
* type in @absolutejs/auth and read from the consumer's `auth.config.ts`. Mirrors
|
|
27
|
+
* the absolute.config panel's state. */
|
|
28
|
+
export type AuthSettingsState = {
|
|
29
|
+
/** False when the AuthSettings type couldn't be resolved (auth too old / absent). */
|
|
30
|
+
available: boolean;
|
|
31
|
+
configPath: string | null;
|
|
32
|
+
current: Record<string, unknown>;
|
|
33
|
+
fields: FieldNode[];
|
|
34
|
+
opaqueKeys: string[];
|
|
12
35
|
};
|
|
13
36
|
/** Read-only introspection of an app's @absolutejs/auth setup, produced by
|
|
14
|
-
* `resolveAuthState` and rendered by the Auth panel. The config lives in
|
|
15
|
-
* (the `auth({...})` call), so `introspected` records whether we could
|
|
16
|
-
*
|
|
17
|
-
* reference instead of a per-app status. */
|
|
37
|
+
* `resolveAuthState` and rendered by the Auth panel. The feature config lives in
|
|
38
|
+
* code (the `auth({...})` call), so `introspected` records whether we could read
|
|
39
|
+
* the configured keys; `settings` is the editable serializable slice. */
|
|
18
40
|
export type AuthPanelState = {
|
|
19
41
|
declaredVersion: string | null;
|
|
20
42
|
features: AuthFeatureStatus[];
|
|
@@ -24,6 +46,17 @@ export type AuthPanelState = {
|
|
|
24
46
|
npmUrl: string;
|
|
25
47
|
providerCount: number | null;
|
|
26
48
|
repoUrl: string;
|
|
49
|
+
settings: AuthSettingsState;
|
|
27
50
|
setupPath: string | null;
|
|
28
51
|
usesSpread: boolean;
|
|
29
52
|
};
|
|
53
|
+
export type AuthConfigEditRequest = {
|
|
54
|
+
name: string;
|
|
55
|
+
remove?: boolean;
|
|
56
|
+
value?: unknown;
|
|
57
|
+
};
|
|
58
|
+
export type AuthConfigEditResult = {
|
|
59
|
+
message: string;
|
|
60
|
+
ok: boolean;
|
|
61
|
+
state: AuthPanelState | null;
|
|
62
|
+
};
|