keycloakify 11.3.19 → 11.3.21
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/bin/124.index.js +676 -0
- package/bin/356.index.js +700 -0
- package/bin/40.index.js +41 -21
- package/bin/{903.index.js → 450.index.js} +2 -680
- package/bin/453.index.js +143 -85
- package/bin/573.index.js +51 -24
- package/bin/{599.index.js → 735.index.js} +438 -121
- package/bin/786.index.js +129 -78
- package/bin/805.index.js +674 -0
- package/bin/854.index.js +68 -0
- package/bin/{780.index.js → 921.index.js} +168 -109
- package/bin/932.index.js +41 -21
- package/bin/97.index.js +125 -75
- package/bin/eject-file.d.ts +7 -0
- package/bin/keycloakify/generateResources/generateMessageProperties.d.ts +1 -1
- package/bin/keycloakify/generateResources/readFieldNameUsage.d.ts +1 -1
- package/bin/main.js +70 -7
- package/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.d.ts +12 -0
- package/bin/postinstall/index.d.ts +1 -0
- package/bin/postinstall/installUiModulesPeerDependencies.d.ts +11 -0
- package/bin/postinstall/managedGitignoreFile.d.ts +14 -0
- package/bin/postinstall/postinstall.d.ts +4 -0
- package/bin/postinstall/uiModuleMeta.d.ts +21 -0
- package/bin/shared/buildContext.d.ts +3 -0
- package/bin/shared/constants.d.ts +2 -1
- package/bin/shared/constants.js +2 -1
- package/bin/shared/constants.js.map +1 -1
- package/bin/shared/customHandler.d.ts +1 -1
- package/bin/shared/customHandler.js.map +1 -1
- package/bin/shared/exitIfUncommittedChanges.d.ts +3 -0
- package/bin/tools/crawlAsync.d.ts +6 -0
- package/bin/tools/getInstalledModuleDirPath.d.ts +5 -0
- package/bin/tools/listInstalledModules.d.ts +12 -0
- package/bin/tools/nodeModulesBinDirPath.d.ts +1 -0
- package/bin/tools/runPrettier.d.ts +17 -0
- package/package.json +34 -6
- package/src/bin/add-story.ts +28 -10
- package/src/bin/eject-file.ts +68 -0
- package/src/bin/eject-page.ts +51 -31
- package/src/bin/initialize-account-theme/initialize-account-theme.ts +4 -32
- package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +2 -16
- package/src/bin/keycloakify/generateResources/generateMessageProperties.ts +1 -1
- package/src/bin/keycloakify/generateResources/generateResources.ts +58 -26
- package/src/bin/keycloakify/generateResources/readFieldNameUsage.ts +1 -1
- package/src/bin/main.ts +50 -0
- package/src/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.ts +73 -0
- package/src/bin/postinstall/index.ts +1 -0
- package/src/bin/postinstall/installUiModulesPeerDependencies.ts +158 -0
- package/src/bin/postinstall/managedGitignoreFile.ts +136 -0
- package/src/bin/postinstall/postinstall.ts +79 -0
- package/src/bin/postinstall/uiModuleMeta.ts +309 -0
- package/src/bin/shared/buildContext.ts +11 -5
- package/src/bin/shared/constants.ts +3 -1
- package/src/bin/shared/customHandler.ts +1 -0
- package/src/bin/shared/customHandler_delegate.ts +2 -27
- package/src/bin/shared/exitIfUncommittedChanges.ts +36 -0
- package/src/bin/tools/crawlAsync.ts +51 -0
- package/src/bin/tools/getInstalledModuleDirPath.ts +51 -0
- package/src/bin/tools/listInstalledModules.ts +131 -0
- package/src/bin/tools/nodeModulesBinDirPath.ts +38 -0
- package/src/bin/tools/npmInstall.ts +411 -15
- package/src/bin/tools/readThisNpmPackageVersion.ts +8 -0
- package/src/bin/tools/runPrettier.ts +106 -0
- package/src/bin/update-kc-gen.ts +28 -17
- package/vite-plugin/index.js +9237 -9163
- package/bin/tools/runFormat.d.ts +0 -3
- package/src/bin/tools/runFormat.ts +0 -76
package/bin/tools/runFormat.d.ts
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
import * as fs from "fs";
|
2
|
-
import { dirname as pathDirname } from "path";
|
3
|
-
import { assert, Equals } from "tsafe/assert";
|
4
|
-
import chalk from "chalk";
|
5
|
-
import { id } from "tsafe/id";
|
6
|
-
import { z } from "zod";
|
7
|
-
import { is } from "tsafe/is";
|
8
|
-
import * as child_process from "child_process";
|
9
|
-
|
10
|
-
export function runFormat(params: { packageJsonFilePath: string }) {
|
11
|
-
const { packageJsonFilePath } = params;
|
12
|
-
|
13
|
-
const parsedPackageJson = (() => {
|
14
|
-
type ParsedPackageJson = {
|
15
|
-
scripts?: Record<string, string>;
|
16
|
-
};
|
17
|
-
|
18
|
-
const zParsedPackageJson = (() => {
|
19
|
-
type TargetType = ParsedPackageJson;
|
20
|
-
|
21
|
-
const zTargetType = z.object({
|
22
|
-
scripts: z.record(z.string()).optional()
|
23
|
-
});
|
24
|
-
|
25
|
-
assert<Equals<z.infer<typeof zTargetType>, TargetType>>();
|
26
|
-
|
27
|
-
return id<z.ZodType<TargetType>>(zTargetType);
|
28
|
-
})();
|
29
|
-
|
30
|
-
const parsedPackageJson = JSON.parse(
|
31
|
-
fs.readFileSync(packageJsonFilePath).toString("utf8")
|
32
|
-
);
|
33
|
-
|
34
|
-
zParsedPackageJson.parse(parsedPackageJson);
|
35
|
-
|
36
|
-
assert(is<ParsedPackageJson>(parsedPackageJson));
|
37
|
-
|
38
|
-
return parsedPackageJson;
|
39
|
-
})();
|
40
|
-
|
41
|
-
const { scripts } = parsedPackageJson;
|
42
|
-
|
43
|
-
if (scripts === undefined) {
|
44
|
-
return;
|
45
|
-
}
|
46
|
-
|
47
|
-
const scriptKeys = Object.keys(scripts);
|
48
|
-
const scriptNames = scriptKeys.filter(scriptKey =>
|
49
|
-
scriptKey.trim().match(/^(lint|format)/)
|
50
|
-
);
|
51
|
-
|
52
|
-
for (const scriptName of scriptNames) {
|
53
|
-
if (!(scriptName in scripts)) {
|
54
|
-
continue;
|
55
|
-
}
|
56
|
-
|
57
|
-
const command = `npm run ${scriptName}`;
|
58
|
-
|
59
|
-
console.log(chalk.grey(`$ ${command}`));
|
60
|
-
|
61
|
-
try {
|
62
|
-
child_process.execSync(`npm run ${scriptName}`, {
|
63
|
-
stdio: "inherit",
|
64
|
-
cwd: pathDirname(packageJsonFilePath)
|
65
|
-
});
|
66
|
-
} catch {
|
67
|
-
console.log(
|
68
|
-
chalk.yellow(
|
69
|
-
`\`${command}\` failed, it does not matter, please format your code manually, continuing...`
|
70
|
-
)
|
71
|
-
);
|
72
|
-
}
|
73
|
-
|
74
|
-
return;
|
75
|
-
}
|
76
|
-
}
|