@ofidj/generator-fidj 3.15.0 → 3.15.1
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
CHANGED
|
@@ -136,6 +136,13 @@ return them to, hands the answer back when they are done, and closes itself. A
|
|
|
136
136
|
browser that will not open one falls back to the full-page redirect. Fidj's own
|
|
137
137
|
console takes the same door for the same reason — one journey, three apps.
|
|
138
138
|
|
|
139
|
+
**The passkey (3.15.0).** Fidj's own shell leads with **Continue with a
|
|
140
|
+
passkey**, the email form under it, and shows the EU wallet door instead of the
|
|
141
|
+
"Your account, with Fidj" note. Every other app keeps its form and reaches the
|
|
142
|
+
passkey through the Fidj window: there is one relying party, Fidj's domain, so a
|
|
143
|
+
passkey cannot be asked for on another app's own page. A passkey sign-in owes the
|
|
144
|
+
same answers as a password one; the agreement is accepted with a second touch.
|
|
145
|
+
|
|
139
146
|
## Compose an existing app as a module
|
|
140
147
|
|
|
141
148
|
Build your application for the `/module/` base URL, then pass its public output to the same generator:
|
package/bin/create-fidj.cjs
CHANGED
|
@@ -24,6 +24,8 @@ try {
|
|
|
24
24
|
domain: { type: "string" },
|
|
25
25
|
module: { type: "string" },
|
|
26
26
|
"module-entry": { type: "string" },
|
|
27
|
+
"module-version": { type: "string" },
|
|
28
|
+
"module-label": { type: "string" },
|
|
27
29
|
local: { type: "boolean" },
|
|
28
30
|
replace: { type: "boolean" },
|
|
29
31
|
help: { type: "boolean" },
|
|
@@ -31,7 +33,7 @@ try {
|
|
|
31
33
|
});
|
|
32
34
|
if (values.help || positionals.length !== 1) {
|
|
33
35
|
console.log(
|
|
34
|
-
"Usage: create-fidj <directory> --app-id <fidjId> [--api-endpoint <url>] [--title <text> --welcome <text> --description <text> --content <html> --domain <hostname>] [--highlight '<heading>|<body>' ...] [--badge <text> ...] [--logo <image>] [--favicon <image>] [--module <built-directory> --module-entry <index.html#/route>] [--oidc-issuer https://api.example/oidc] [--anonymous true|false] [--signin button|inline|both] [--credentials true|false] [--local] [--replace]",
|
|
36
|
+
"Usage: create-fidj <directory> --app-id <fidjId> [--api-endpoint <url>] [--title <text> --welcome <text> --description <text> --content <html> --domain <hostname>] [--highlight '<heading>|<body>' ...] [--badge <text> ...] [--logo <image>] [--favicon <image>] [--module <built-directory> --module-entry <index.html#/route> [--module-version <x.y.z> --module-label <name>]] [--oidc-issuer https://api.example/oidc] [--anonymous true|false] [--signin button|inline|both] [--credentials true|false] [--local] [--replace]",
|
|
35
37
|
);
|
|
36
38
|
process.exitCode = values.help ? 0 : 1;
|
|
37
39
|
} else {
|
|
@@ -55,6 +57,8 @@ try {
|
|
|
55
57
|
domain: values.domain,
|
|
56
58
|
module: values.module,
|
|
57
59
|
moduleEntry: values["module-entry"],
|
|
60
|
+
moduleVersion: values["module-version"],
|
|
61
|
+
moduleLabel: values["module-label"],
|
|
58
62
|
local: values.local || process.env.FIDJ_LOCAL === "true",
|
|
59
63
|
replace: values.replace,
|
|
60
64
|
});
|
package/generators/app/index.js
CHANGED
|
@@ -20,6 +20,8 @@ const TEXT_OPTIONS = [
|
|
|
20
20
|
"domain",
|
|
21
21
|
"module",
|
|
22
22
|
"module-entry",
|
|
23
|
+
"module-version",
|
|
24
|
+
"module-label",
|
|
23
25
|
"logo",
|
|
24
26
|
"favicon",
|
|
25
27
|
];
|
|
@@ -98,6 +100,8 @@ module.exports = class extends Generator {
|
|
|
98
100
|
favicon: this.options.favicon,
|
|
99
101
|
module: this.options.module,
|
|
100
102
|
moduleEntry: this.options["module-entry"],
|
|
103
|
+
moduleVersion: this.options["module-version"],
|
|
104
|
+
moduleLabel: this.options["module-label"],
|
|
101
105
|
domain: this.options.domain,
|
|
102
106
|
sdkPath: this.options["sdk-path"] || process.env.FIDJ_SDK_DIR,
|
|
103
107
|
entryPath: this.options["entry-path"] || process.env.FIDJ_ENTRY_DIR,
|
|
@@ -8,7 +8,11 @@ import "@ofidj/entry/style.css";
|
|
|
8
8
|
const sdk = new FidjNodeService();
|
|
9
9
|
const oidc = config.oidcIssuer ? new FidjOidcClient({issuer: config.oidcIssuer, clientId: config.appId, redirectUri: window.location.origin + window.location.pathname, apiEndpoint: config.apiEndpoint, storage: sessionStorage}) : null;
|
|
10
10
|
const root = document.querySelector<HTMLDivElement>("#app")!;
|
|
11
|
-
showVersionBadge(
|
|
11
|
+
showVersionBadge(
|
|
12
|
+
config.releaseVersion,
|
|
13
|
+
config.title === "Fidj" ? config.apiEndpoint : undefined,
|
|
14
|
+
config.moduleVersion ? {name: config.moduleLabel || "module", version: config.moduleVersion} : undefined,
|
|
15
|
+
);
|
|
12
16
|
const appPath = `/me/apps/${encodeURIComponent(config.appId)}`;
|
|
13
17
|
// Passkeys (v3 P1-4): one relying party, Fidj's own domain. Only Fidj's own
|
|
14
18
|
// shell runs the ceremony on its page; every other app reaches the passkey
|
package/lib/scaffold.cjs
CHANGED
|
@@ -230,6 +230,10 @@ function scaffold(destination, options) {
|
|
|
230
230
|
logo: logo ? "./brand/logo" + logo.extension : "./fidj-logo.png",
|
|
231
231
|
favicon: favicon ? "./brand/favicon" + favicon.extension : "./fidj-logo.png",
|
|
232
232
|
moduleEntry: appModule?.entry || "",
|
|
233
|
+
// A mounted module with its own patch (Fidj's console): the badge names
|
|
234
|
+
// it between the SDK and the API.
|
|
235
|
+
moduleVersion: appModule ? options.moduleVersion || "" : "",
|
|
236
|
+
moduleLabel: options.moduleLabel || "module",
|
|
233
237
|
moduleMount: null,
|
|
234
238
|
domain: options.domain,
|
|
235
239
|
};
|