Move lib up one level
This commit is contained in:
parent
79997efbb6
commit
0040464ca1
@ -6,10 +6,10 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/garronej/keycloakify.git"
|
"url": "git://github.com/garronej/keycloakify.git"
|
||||||
},
|
},
|
||||||
"main": "dist/lib/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/lib/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf dist/ && tsc -p src/bin && tsc -p src/lib && yarn grant-exec-perms && yarn copy-files dist/",
|
"build": "rimraf dist/ && tsc -p src/bin && tsc -p src && yarn grant-exec-perms && yarn copy-files dist/",
|
||||||
"build:test": "rimraf dist_test/ && tsc -p src/test && yarn copy-files dist_test/",
|
"build:test": "rimraf dist_test/ && tsc -p src/test && yarn copy-files dist_test/",
|
||||||
"grant-exec-perms": "node dist/bin/tools/grant-exec-perms.js",
|
"grant-exec-perms": "node dist/bin/tools/grant-exec-perms.js",
|
||||||
"copy-files": "copyfiles -u 1 src/**/*.ftl",
|
"copy-files": "copyfiles -u 1 src/**/*.ftl",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"scripting-tools": "^0.19.13",
|
"scripting-tools": "^0.19.13",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^5.0.1-rc"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/rest": "^18.12.0",
|
"@octokit/rest": "^18.12.0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { useReducer, useEffect } from "react";
|
import React, { useReducer, useEffect } from "react";
|
||||||
import { assert } from "./tools/assert";
|
import { assert } from "./tools/assert";
|
||||||
import { headInsert } from "./tools/headInsert";
|
import { headInsert } from "./tools/headInsert";
|
||||||
import { pathJoin } from "../bin/tools/pathJoin";
|
import { pathJoin } from "./bin/tools/pathJoin";
|
||||||
import { clsx } from "./tools/clsx";
|
import { clsx } from "./tools/clsx";
|
||||||
import type { TemplateProps } from "./KcProps";
|
import type { TemplateProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "./getKcContext/KcContextBase";
|
import type { KcContextBase } from "./getKcContext/KcContextBase";
|
@ -3,7 +3,7 @@ import * as fs from "fs";
|
|||||||
import { join as pathJoin, basename as pathBasename } from "path";
|
import { join as pathJoin, basename as pathBasename } from "path";
|
||||||
import { replaceImportsFromStaticInJsCode } from "./replacers/replaceImportsFromStaticInJsCode";
|
import { replaceImportsFromStaticInJsCode } from "./replacers/replaceImportsFromStaticInJsCode";
|
||||||
import { replaceImportsInCssCode } from "./replacers/replaceImportsInCssCode";
|
import { replaceImportsInCssCode } from "./replacers/replaceImportsInCssCode";
|
||||||
import { generateFtlFilesCodeFactory, pageIds, themeTypes, ThemeType } from "./generateFtl";
|
import { generateFtlFilesCodeFactory, loginThemePageIds, themeTypes, ThemeType } from "./generateFtl";
|
||||||
import { downloadBuiltinKeycloakTheme } from "../download-builtin-keycloak-theme";
|
import { downloadBuiltinKeycloakTheme } from "../download-builtin-keycloak-theme";
|
||||||
import { mockTestingResourcesCommonPath, mockTestingResourcesPath, mockTestingSubDirOfPublicDirBasename } from "../mockTestingResourcesPath";
|
import { mockTestingResourcesCommonPath, mockTestingResourcesPath, mockTestingSubDirOfPublicDirBasename } from "../mockTestingResourcesPath";
|
||||||
import { isInside } from "../tools/isInside";
|
import { isInside } from "../tools/isInside";
|
||||||
@ -151,7 +151,7 @@ export async function generateKeycloakThemeResources(params: {
|
|||||||
return generateFtlFilesCode;
|
return generateFtlFilesCode;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
[...pageIds, ...(buildOptions.extraPages ?? [])].forEach(pageId => {
|
[...loginThemePageIds, ...(buildOptions.extraLoginPages ?? [])].forEach(pageId => {
|
||||||
const { ftlCode } = generateFtlFilesCode({ pageId });
|
const { ftlCode } = generateFtlFilesCode({ pageId });
|
||||||
|
|
||||||
fs.mkdirSync(themeDirPath, { "recursive": true });
|
fs.mkdirSync(themeDirPath, { "recursive": true });
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { LoginThemePageId } from "../../bin/keycloakify/generateFtl";
|
import type { LoginThemePageId } from "../bin/keycloakify/generateFtl";
|
||||||
import { assert } from "tsafe/assert";
|
import { assert } from "tsafe/assert";
|
||||||
import type { Equals } from "tsafe";
|
import type { Equals } from "tsafe";
|
||||||
import type { MessageKeyBase } from "../i18n";
|
import type { MessageKeyBase } from "../i18n";
|
@ -7,9 +7,9 @@ import { exclude } from "tsafe/exclude";
|
|||||||
import { assert } from "tsafe/assert";
|
import { assert } from "tsafe/assert";
|
||||||
import type { ExtendsKcContextBase } from "./getKcContextFromWindow";
|
import type { ExtendsKcContextBase } from "./getKcContextFromWindow";
|
||||||
import { getKcContextFromWindow } from "./getKcContextFromWindow";
|
import { getKcContextFromWindow } from "./getKcContextFromWindow";
|
||||||
import { pathJoin } from "../../bin/tools/pathJoin";
|
import { pathJoin } from "../bin/tools/pathJoin";
|
||||||
import { pathBasename } from "../tools/pathBasename";
|
import { pathBasename } from "../tools/pathBasename";
|
||||||
import { mockTestingResourcesCommonPath } from "../../bin/mockTestingResourcesPath";
|
import { mockTestingResourcesCommonPath } from "../bin/mockTestingResourcesPath";
|
||||||
import { symToStr } from "tsafe/symToStr";
|
import { symToStr } from "tsafe/symToStr";
|
||||||
|
|
||||||
export function getKcContext<KcContextExtended extends { pageId: string } = never>(params?: {
|
export function getKcContext<KcContextExtended extends { pageId: string } = never>(params?: {
|
@ -1,6 +1,6 @@
|
|||||||
import type { KcContextBase } from "./KcContextBase";
|
import type { KcContextBase } from "./KcContextBase";
|
||||||
import type { AndByDiscriminatingKey } from "../tools/AndByDiscriminatingKey";
|
import type { AndByDiscriminatingKey } from "../tools/AndByDiscriminatingKey";
|
||||||
import { ftlValuesGlobalName } from "../../bin/keycloakify/ftlValuesGlobalName";
|
import { ftlValuesGlobalName } from "../bin/keycloakify/ftlValuesGlobalName";
|
||||||
|
|
||||||
export type ExtendsKcContextBase<KcContextExtended extends { pageId: string }> = [KcContextExtended] extends [never]
|
export type ExtendsKcContextBase<KcContextExtended extends { pageId: string }> = [KcContextExtended] extends [never]
|
||||||
? KcContextBase
|
? KcContextBase
|
@ -1,9 +1,9 @@
|
|||||||
import "minimal-polyfills/Object.fromEntries";
|
import "minimal-polyfills/Object.fromEntries";
|
||||||
import type { KcContextBase, Attribute } from "./KcContextBase";
|
import type { KcContextBase, Attribute } from "./KcContextBase";
|
||||||
//NOTE: Aside because we want to be able to import them from node
|
//NOTE: Aside because we want to be able to import them from node
|
||||||
import { mockTestingResourcesCommonPath, mockTestingResourcesPath } from "../../bin/mockTestingResourcesPath";
|
import { mockTestingResourcesCommonPath, mockTestingResourcesPath } from "../bin/mockTestingResourcesPath";
|
||||||
import { id } from "tsafe/id";
|
import { id } from "tsafe/id";
|
||||||
import { pathJoin } from "../../bin/tools/pathJoin";
|
import { pathJoin } from "../bin/tools/pathJoin";
|
||||||
|
|
||||||
const PUBLIC_URL = process.env["PUBLIC_URL"] ?? "/";
|
const PUBLIC_URL = process.env["PUBLIC_URL"] ?? "/";
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user