Merge pull request 'development' (#1) from development into main
Some checks failed
armco-org/configs/pipeline/head There was a failure building this commit
Some checks failed
armco-org/configs/pipeline/head There was a failure building this commit
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@ build
|
||||
dist
|
||||
node_modules
|
||||
.DS_Store
|
||||
constants
|
||||
endpoints
|
||||
|
||||
6
Jenkinsfile
vendored
Normal file
6
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
@Library('jenkins-shared') _
|
||||
kanikoPipeline(
|
||||
repoName: 'configs',
|
||||
branch: env.BRANCH_NAME ?: 'main',
|
||||
isNpmLib: true
|
||||
)
|
||||
17
README.md
Normal file
17
README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Armco Configs
|
||||
|
||||
This package provides common configuration files and constants for all Armco applications.
|
||||
|
||||
## Purpose
|
||||
- Centralizes API endpoints and web configuration objects.
|
||||
- Shares session token constants and other config values across projects.
|
||||
|
||||
## Files
|
||||
- `src/endpoints.ts`: Contains all API and web endpoints used by Armco apps, including environment-specific hosts and route definitions.
|
||||
- `src/constants.ts`: Defines session token names and other shared constants.
|
||||
|
||||
## Usage
|
||||
Import from this package in any Armco application to access shared endpoints and constants, ensuring consistency and reducing duplication.
|
||||
|
||||
---
|
||||
Maintained for internal use across the Armco monorepo.
|
||||
@@ -1,12 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Get the directory of the current script
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
rm -rf build
|
||||
npx tsc
|
||||
vite build
|
||||
# Default values
|
||||
DEV_FLAG=""
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"
|
||||
do
|
||||
case $arg in
|
||||
--dev)
|
||||
DEV_FLAG="--dev"
|
||||
shift # Remove --dev from processing
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "[BUILD:SH] Dev flag is: $DEV_FLAG"
|
||||
echo "[BUILD:SH] Removing build if exists"
|
||||
rm -rf build
|
||||
echo "[BUILD:SH] Checking TS Types"
|
||||
npx tsc
|
||||
echo "[BUILD:SH] Initiating build..."
|
||||
# Conditionally use vite-dev.config.ts if --dev flag is present
|
||||
if [ "$DEV_FLAG" == "--dev" ]; then
|
||||
vite build --config vite-dev.config.ts
|
||||
else
|
||||
vite build
|
||||
fi
|
||||
|
||||
echo "[BUILD:SH] Running post processor scripts..."
|
||||
# Run Post processors: Update style imports in .js files, create component modules
|
||||
node "$SCRIPT_DIR/post-processor.js" build/cjs
|
||||
node "$SCRIPT_DIR/post-processor.js" build/es
|
||||
node "$SCRIPT_DIR/post-processor.js" build/cjs $DEV_FLAG
|
||||
node "$SCRIPT_DIR/post-processor.js" build/es $DEV_FLAG
|
||||
|
||||
@@ -7,17 +7,17 @@ const __dirname = dirname(__filename)
|
||||
|
||||
const exclusions = ["index.js"]
|
||||
|
||||
async function generateModule(fileName) {
|
||||
if (!exclusions.includes(fileName)) {
|
||||
async function generateModule(fileName, isDev) {
|
||||
if (!exclusions.includes(fileName) && !fileName.endsWith(".map")) {
|
||||
const dir = fileName.slice(0, -3)
|
||||
const name = `@armco/configs/${dir}`
|
||||
const packageJsonContent = {
|
||||
name,
|
||||
main: `../cjs/${dir}.js`,
|
||||
module: `../es/${dir}.js`,
|
||||
types: `../types/${dir}.d.ts`,
|
||||
main: `../${isDev ? "build/" : ""}cjs/${dir}.js`,
|
||||
module: `../${isDev ? "build/" : ""}es/${dir}.js`,
|
||||
types: `../${isDev ? "build/" : ""}types/${dir}.d.ts`,
|
||||
}
|
||||
const dirPath = resolve(__dirname, `../build/${dir}`)
|
||||
const dirPath = resolve(__dirname, `../${isDev ? "" : "build/"}${dir}`)
|
||||
try {
|
||||
await fs.mkdir(dirPath, { recursive: true })
|
||||
await fs.writeFile(
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { readdir } from "fs/promises"
|
||||
import generateModule from "./generate-module.js"
|
||||
|
||||
async function postProcessor(dir) {
|
||||
async function postProcessor(dir, isDev) {
|
||||
try {
|
||||
const files = await readdir(dir)
|
||||
await Promise.all(
|
||||
files.map(async (file) => {
|
||||
await generateModule(file, dir)
|
||||
await generateModule(file, isDev)
|
||||
}),
|
||||
)
|
||||
} catch (error) {
|
||||
@@ -15,8 +15,10 @@ async function postProcessor(dir) {
|
||||
}
|
||||
|
||||
const targetDir = process.argv[2]
|
||||
const isDev = process.argv.includes("--dev")
|
||||
|
||||
if (targetDir) {
|
||||
postProcessor(targetDir)
|
||||
postProcessor(targetDir, isDev)
|
||||
} else {
|
||||
console.error("Please provide the build directory to run post processor on.")
|
||||
process.exit(1)
|
||||
|
||||
2694
package-lock.json
generated
2694
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
@@ -1,39 +1,26 @@
|
||||
{
|
||||
"name": "@armco/configs",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.11",
|
||||
"type": "module",
|
||||
"main": "build/cjs/index.js",
|
||||
"module": "build/es/index.js",
|
||||
"types": "build/types/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "./build-tools/build.sh",
|
||||
"build:sm": "./build-tools/build.sh --dev",
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint .",
|
||||
"publish:sh": "./publish.sh",
|
||||
"publish:local": "./publish-local.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@armco/types": "^0.0.10",
|
||||
"uuid": "^10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.5.5",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"eslint": "^9.10.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"glob": "^11.0.0",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-config-nick": "^1.0.8",
|
||||
"typescript": "^5.6.2",
|
||||
"vite": "^5.4.6",
|
||||
"vite-plugin-dts": "^4.2.1",
|
||||
"vitest": "^2.1.1"
|
||||
"peerDependencies": {
|
||||
"@armco/types": "^0.0.18",
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"prettier": "prettier-config-nick",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ReStruct-Corporate-Advantage/configs.git"
|
||||
"url": "git+https://gitea.armco.dev/ReStruct-Corporate-Advantage/configs.git"
|
||||
},
|
||||
"keywords": [
|
||||
"components",
|
||||
@@ -46,7 +33,18 @@
|
||||
],
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ReStruct-Corporate-Advantage/configs/issues"
|
||||
"url": "https://gitea.armco.dev/ReStruct-Corporate-Advantage/configs/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ReStruct-Corporate-Advantage/configs#readme"
|
||||
"homepage": "https://gitea.armco.devReStruct-Corporate-Advantage/configs#readme",
|
||||
"devDependencies": {
|
||||
"@armco/types": "^0.0.20",
|
||||
"@types/node": "^24.10.0",
|
||||
"glob": "^11.0.3",
|
||||
"typescript": "^5.9.3",
|
||||
"vite-plugin-dts": "^4.5.4",
|
||||
"vitest": "^4.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/uuid": "^10.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
20
publish.sh
20
publish.sh
@@ -6,11 +6,23 @@ set -e
|
||||
npm --no-git-tag-version version ${semver}
|
||||
npm run build
|
||||
cp package.json build/
|
||||
sed -i '' -E 's/"build"/"*"/' build/package.json
|
||||
|
||||
sed -i '' 's#"build/cjs/index.js"#"cjs/index.js"#' build/package.json
|
||||
sed -i '' 's#"build/es/index.js"#"es/index.js"#' build/package.json
|
||||
sed -i '' 's#"build/types/index.d.ts"#"types/index.d.ts"#' build/package.json
|
||||
# Use Node.js for portable package.json normalization
|
||||
# Pass the target path via env var to avoid Node treating it as a module/script argument
|
||||
PKG_PATH="$(pwd)/build/package.json" node - <<'EOF'
|
||||
const fs = require('fs');
|
||||
const path = process.env.PKG_PATH;
|
||||
const pkg = JSON.parse(fs.readFileSync(path, 'utf8'));
|
||||
pkg.private = false;
|
||||
delete pkg.scripts;
|
||||
delete pkg.devDependencies;
|
||||
if (!pkg.files) pkg.files = ['*'];
|
||||
else pkg.files = pkg.files.map(x => x === 'build' ? '*' : x);
|
||||
['main','module','types'].forEach(k => {
|
||||
if (pkg[k]) pkg[k] = pkg[k].replace(/^build\//, '');
|
||||
});
|
||||
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n');
|
||||
EOF
|
||||
|
||||
cd build
|
||||
npm publish --access public --loglevel verbose
|
||||
|
||||
143
src/constants.ts
143
src/constants.ts
@@ -1,141 +1,2 @@
|
||||
import { ArWebPageLayout, ObjectType } from "@armco/types"
|
||||
|
||||
export const MONTH_INDEX = [
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December",
|
||||
]
|
||||
|
||||
export const WebPageLayout: Record<ArWebPageLayout, ObjectType> = {
|
||||
[ArWebPageLayout.TWOCOL]: {
|
||||
variant: ArWebPageLayout.TWOCOL,
|
||||
gridTemplate: `"ga-a465c242-66be-4693-9a38-466cdb39a1ef ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de" minmax(auto, 1fr) / 1fr 1fr 1fr 1fr`,
|
||||
gridTemplateColumns: "1fr 3fr",
|
||||
demoChildCount: 2,
|
||||
previewChildCount: 2,
|
||||
shortName: "2-col",
|
||||
},
|
||||
[ArWebPageLayout.THREECOL]: {
|
||||
variant: ArWebPageLayout.THREECOL,
|
||||
gridTemplate: `"ga-a465c242-66be-4693-9a38-466cdb39a1ef ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-33a97990-97c8-4b51-83ad-a07b94d7e44f" minmax(auto, 1fr) / 1fr 1fr 1fr 1fr 1fr`,
|
||||
gridTemplateColumns: "1fr 3fr 1fr",
|
||||
demoChildCount: 3,
|
||||
previewChildCount: 3,
|
||||
shortName: "3-col",
|
||||
},
|
||||
[ArWebPageLayout.GRID]: {
|
||||
variant: ArWebPageLayout.GRID,
|
||||
gridTemplate: `"auto" / repeat(auto-fill, minmax(50px, 1fr))`,
|
||||
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
||||
demoChildCount: 18,
|
||||
previewChildCount: 2,
|
||||
gridSize: "20px",
|
||||
shortName: "Grid",
|
||||
},
|
||||
[ArWebPageLayout.CARD]: {
|
||||
variant: ArWebPageLayout.CARD,
|
||||
gridTemplate: `"auto" / repeat(auto-fill, minmax(50px, 1fr))`,
|
||||
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
||||
demoChildCount: 9,
|
||||
previewChildCount: 3,
|
||||
cardSize: "40px",
|
||||
shortName: "Card",
|
||||
},
|
||||
[ArWebPageLayout.HEROLINEARCONTENTBLOCKS]: {
|
||||
variant: ArWebPageLayout.HEROLINEARCONTENTBLOCKS,
|
||||
gridTemplate: `"ga-a465c242-66be-4693-9a38-466cdb39a1ef ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-33a97990-97c8-4b51-83ad-a07b94d7e44f" minmax(auto, 1fr)
|
||||
"ga-a465c242-66be-4693-9a38-466cdb39a1ef ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-33a97990-97c8-4b51-83ad-a07b94d7e44f" minmax(auto, 1fr)
|
||||
"ga-a465c242-66be-4693-9a38-466cdb39a1ef ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-f04da199-e496-4607-87b0-55c9a96d09de ga-33a97990-97c8-4b51-83ad-a07b94d7e44f" minmax(auto, 1fr) / 1fr 1fr 1fr 1fr 1fr`,
|
||||
gridTemplateColumns: "1fr 5fr 1fr",
|
||||
alignContent: "start",
|
||||
demoChildCount: 6,
|
||||
previewChildCount: 3,
|
||||
shortName: "Hero",
|
||||
// gridTemplateRows: "auto auto",
|
||||
},
|
||||
[ArWebPageLayout.HEROSTAGGEREDARCONTENTBLOCKS]: {
|
||||
variant: ArWebPageLayout.HEROSTAGGEREDARCONTENTBLOCKS,
|
||||
gridTemplate: `"ga-877ca8ad-616e-4570-9738-06706091b899 ga-88863f4a-1d44-4b9a-ac96-27eb9af1659d ga-88863f4a-1d44-4b9a-ac96-27eb9af1659d ga-11f867b6-77e9-4fc3-95a2-e909e648cd6b ga-b5de21b4-2567-47a2-a27d-3926a46349bc" minmax(auto, 1fr)
|
||||
"ga-877ca8ad-616e-4570-9738-06706091b899 ga-910a17b5-3d3a-485e-a573-5b123225009f ga-6116aede-0485-45fa-8be9-98b96e40c7e8 ga-6116aede-0485-45fa-8be9-98b96e40c7e8 ga-b5de21b4-2567-47a2-a27d-3926a46349bc" minmax(auto, 1fr)
|
||||
"ga-877ca8ad-616e-4570-9738-06706091b899 ga-106eb101-9c2a-4b08-a0d6-9055ffb51023 ga-106eb101-9c2a-4b08-a0d6-9055ffb51023 ga-9beb0918-9116-47d2-91a1-15c7d384d05c ga-b5de21b4-2567-47a2-a27d-3926a46349bc" minmax(auto, 1fr)
|
||||
"ga-877ca8ad-616e-4570-9738-06706091b899 ga-063202aa-fd61-446e-b5f7-3a2875198774 ga-53075af9-6bf2-4ceb-9f59-f383cac18d53 ga-53075af9-6bf2-4ceb-9f59-f383cac18d53 ga-b5de21b4-2567-47a2-a27d-3926a46349bc" minmax(auto, 1fr) / 1fr 1fr 1fr 1fr 1fr`,
|
||||
gridTemplateColumns: "repeat(7, 1fr)",
|
||||
demoChildCount: 10,
|
||||
previewChildCount: 6,
|
||||
shortName: "Hero Zigzag",
|
||||
},
|
||||
[ArWebPageLayout.HEROSTAGGEREDREVERSEDARCONTENTBLOCKS]: {
|
||||
variant: ArWebPageLayout.HEROSTAGGEREDREVERSEDARCONTENTBLOCKS,
|
||||
gridTemplate: `"ga-13ba6339-ef4a-4db6-9712-3792dbf0492f ga-1e9028b9-252d-48d6-b9eb-a9e52e0ce646 ga-41b568a4-e50e-4002-8446-7ae8363d475e ga-41b568a4-e50e-4002-8446-7ae8363d475e ga-ba38cdec-b539-427a-9add-3f30b6a553e8" minmax(auto, 1fr)
|
||||
"ga-13ba6339-ef4a-4db6-9712-3792dbf0492f ga-2aff911c-85b8-4f14-9a22-3fd2f071a540 ga-2aff911c-85b8-4f14-9a22-3fd2f071a540 ga-9ba1929c-d41d-444e-b35b-8b0976a6e9a7 ga-ba38cdec-b539-427a-9add-3f30b6a553e8" minmax(auto, 1fr)
|
||||
"ga-13ba6339-ef4a-4db6-9712-3792dbf0492f ga-02c7178d-70d2-4c0f-afe6-a253b6ff4244 ga-251f824d-ca2b-4565-b436-f2478aab3363 ga-251f824d-ca2b-4565-b436-f2478aab3363 ga-ba38cdec-b539-427a-9add-3f30b6a553e8" minmax(auto, 1fr)
|
||||
"ga-13ba6339-ef4a-4db6-9712-3792dbf0492f ga-876d6c77-61e3-48ec-85ca-5d67bd41841a ga-876d6c77-61e3-48ec-85ca-5d67bd41841a ga-0fb7ad42-3ccf-4247-9b1a-3b018f6e04d1 ga-ba38cdec-b539-427a-9add-3f30b6a553e8" minmax(auto, 1fr) / 1fr 1fr 1fr 1fr 1fr`,
|
||||
gridTemplateColumns: "repeat(7, 1fr)",
|
||||
demoChildCount: 10,
|
||||
previewChildCount: 6,
|
||||
shortName: "Hero Zigzag 2",
|
||||
},
|
||||
[ArWebPageLayout.STACKED]: {
|
||||
variant: ArWebPageLayout.STACKED,
|
||||
gridTemplate: `"ga-cf5bffc2-e070-426b-9ece-68aacc91cc7a" minmax(auto, 1fr)
|
||||
"ga-376c8c90-41a4-47ab-b19e-2af1794fc114" minmax(auto, 1fr)
|
||||
"ga-8d2030f4-0aed-40c3-98f2-f6ad7dc306bf" minmax(auto, 1fr)
|
||||
"ga-0db7a67b-f5ec-414d-b0aa-f70ee107bb28" minmax(auto, 1fr) / 1fr`,
|
||||
gridTemplateColumns: "1fr",
|
||||
alignContent: "start",
|
||||
demoChildCount: 6,
|
||||
previewChildCount: 3,
|
||||
shortName: "Stacked",
|
||||
},
|
||||
[ArWebPageLayout.TABBED]: {
|
||||
variant: ArWebPageLayout.TABBED,
|
||||
gridTemplate: `"ga-cf5bffc2-e070-426b-9ece-68aacc91cc7a" minmax(auto, 3rem)
|
||||
"ga-9bf3a112-ff62-49e6-9684-10cc00574a92" minmax(auto, 1fr) / 1fr`,
|
||||
gridTemplateColumns: "1fr",
|
||||
gridTemplateRows: "auto 1fr",
|
||||
alignContent: "start",
|
||||
demoChildCount: 2,
|
||||
previewChildCount: 2,
|
||||
shortName: "Tabbed",
|
||||
},
|
||||
[ArWebPageLayout.FULL]: {
|
||||
variant: ArWebPageLayout.FULL,
|
||||
gridTemplate: `"ga-c07d6b3d-ade5-46a9-9b8e-a03971926c2b" minmax(auto, 1fr) / 1fr`,
|
||||
gridTemplateColumns: "1fr",
|
||||
demoChildCount: 1,
|
||||
previewChildCount: 1,
|
||||
shortName: "Full Screen",
|
||||
},
|
||||
[ArWebPageLayout.SPLIT]: {
|
||||
variant: ArWebPageLayout.SPLIT,
|
||||
gridTemplate: `"ga-c07d6b3d-ade5-46a9-9b8e-a03971926c2b ga-df13a62c-ffb5-4d42-8484-920ece1beb36" minmax(auto, 1fr) / 1fr 1fr`,
|
||||
gridTemplateColumns: "1fr 1fr",
|
||||
demoChildCount: 2,
|
||||
previewChildCount: 2,
|
||||
shortName: "Split Screen",
|
||||
},
|
||||
[ArWebPageLayout.CAROUSEL]: {
|
||||
variant: ArWebPageLayout.CAROUSEL,
|
||||
gridTemplate: `"ga-c07d6b3d-ade5-46a9-9b8e-a03971926c2b" minmax(auto, 1fr) / 1fr`,
|
||||
gridTemplateColumns: "1fr",
|
||||
demoChildCount: 1,
|
||||
previewChildCount: 1,
|
||||
shortName: "Carousel",
|
||||
},
|
||||
[ArWebPageLayout.CUSTOM]: {
|
||||
variant: ArWebPageLayout.CUSTOM,
|
||||
gridTemplate: "1fr",
|
||||
demoChildCount: 1,
|
||||
previewChildCount: 1,
|
||||
shortName: "Custom",
|
||||
},
|
||||
}
|
||||
export const SESSION_TOKEN_NAME = "x-access-token"
|
||||
export const SESSION_USER_TOKEN_NAME = "auth-session-user"
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
import { ApiConfig, WebConfig } from "@armco/types"
|
||||
import { ApiConfig, WebConfig } from "./types"
|
||||
|
||||
export const HOST = {
|
||||
development: "http://localhost:5000/api",
|
||||
production: "https://api.armco.tech",
|
||||
production: "https://api.armco.dev",
|
||||
}
|
||||
export const STATIC_HOST = {
|
||||
development: "http://localhost:5001/api",
|
||||
production: "https://static.armco.tech",
|
||||
production: "https://static.armco.dev",
|
||||
}
|
||||
export const TASKER = {
|
||||
development: "http://localhost:5002/api",
|
||||
production: "https://tasks.armco.tech",
|
||||
production: "https://tasks.armco.dev",
|
||||
}
|
||||
export const CONFIG = {
|
||||
development: "http://localhost:5003/api",
|
||||
production: "https://config.armco.tech",
|
||||
production: "https://config.armco.dev",
|
||||
}
|
||||
export const IAM = {
|
||||
development: "http://localhost:5004/api",
|
||||
production: "https://iam.armco.tech",
|
||||
production: "https://iam.armco.dev",
|
||||
}
|
||||
export const SEER = {
|
||||
development: "http://localhost:5005/api",
|
||||
production: "https://telemetry.armco.tech",
|
||||
production: "https://telemetry.armco.dev",
|
||||
}
|
||||
|
||||
export const ICON_ROOT = `${
|
||||
@@ -31,7 +31,7 @@ export const ICON_ROOT = `${
|
||||
|
||||
export const ARMORY = {
|
||||
development: "http://localhost:7992",
|
||||
production: "https://armco.tech",
|
||||
production: "https://armco.dev",
|
||||
}
|
||||
export const IAMCLIENT = {
|
||||
development: "http://localhost:3001",
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
export * from "./endpoints"
|
||||
export * from "./constants"
|
||||
export { default as NAVIGATOR } from "./navigator"
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
import { v4 as uuid } from "uuid"
|
||||
import { AppNavigatorDataType } from "@armco/types"
|
||||
|
||||
const navigator: Array<AppNavigatorDataType> = [
|
||||
{
|
||||
label: "Playgrounds",
|
||||
icon: "tb.TbSoccerField",
|
||||
color: "cornflowerblue",
|
||||
id: uuid(),
|
||||
url: "/playground",
|
||||
items: [
|
||||
{
|
||||
label: "Components",
|
||||
icon: "cg/CgComponents",
|
||||
description: [
|
||||
"Stuffle's opinionated component library.",
|
||||
"Save effort by including this component library to your project.",
|
||||
"Also exists as npm package",
|
||||
],
|
||||
url: "/components",
|
||||
},
|
||||
{
|
||||
label: "Icon Viewer",
|
||||
icon: "gr/GrOverview",
|
||||
url: "/icon",
|
||||
},
|
||||
{
|
||||
label: "Armory",
|
||||
icon: "io5/IoLogoWebComponent",
|
||||
url: "/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Assets",
|
||||
icon: "fa/FaBuromobelexperte",
|
||||
color: "darkcyan",
|
||||
id: uuid(),
|
||||
url: "/assets",
|
||||
items: [
|
||||
{
|
||||
label: "Icons",
|
||||
icon: "fa/FaIcons",
|
||||
url: "/icons",
|
||||
},
|
||||
{
|
||||
label: "Fonts",
|
||||
icon: "bi/BiFontFamily",
|
||||
url: "/fonts",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Tools & Services",
|
||||
icon: "fc/FcServices",
|
||||
id: uuid(),
|
||||
url: "/tools-and-services",
|
||||
items: [
|
||||
{
|
||||
label: "IAM",
|
||||
icon: "fi.FiUsers",
|
||||
url: "/config",
|
||||
},
|
||||
{
|
||||
label: "Analytics",
|
||||
icon: "io/IoMdAnalytics",
|
||||
url: "/config",
|
||||
},
|
||||
{
|
||||
label: "Confitron",
|
||||
icon: "fc.FcDataConfiguration",
|
||||
url: "/config",
|
||||
},
|
||||
{
|
||||
label: "Tasker",
|
||||
icon: "ri.RiPlayList2Fill",
|
||||
url: "/tasks",
|
||||
},
|
||||
{
|
||||
label: "Png to Svg",
|
||||
icon: "si/SiConvertio",
|
||||
},
|
||||
{
|
||||
label: "Svg to Png",
|
||||
icon: "si/SiConvertio",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export default navigator
|
||||
20
src/types.ts
Normal file
20
src/types.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export interface HOSTS {
|
||||
development: string
|
||||
production: string
|
||||
}
|
||||
|
||||
|
||||
export interface ApiConfig {
|
||||
HOST: HOSTS
|
||||
STATIC_HOST: HOSTS
|
||||
IAM: HOSTS
|
||||
CONFIG: HOSTS
|
||||
TASKER: HOSTS
|
||||
SEER: HOSTS
|
||||
}
|
||||
|
||||
export interface WebConfig {
|
||||
ARMORY: HOSTS
|
||||
IAM: HOSTS
|
||||
FORESEER: HOSTS
|
||||
}
|
||||
34
vite-dev.config.ts
Normal file
34
vite-dev.config.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { resolve } from "node:path"
|
||||
import { glob } from "glob"
|
||||
import { defineConfig } from "vitest/config"
|
||||
import dts from "vite-plugin-dts"
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [dts({ outDir: "build/types" })],
|
||||
build: {
|
||||
outDir: "build",
|
||||
lib: {
|
||||
entry: glob.sync(resolve(__dirname, "src/**/*.ts")),
|
||||
},
|
||||
sourcemap: true,
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
external: ["react", "react/jsx-runtime", "react-dom", "uuid"],
|
||||
output: [
|
||||
{
|
||||
format: "es",
|
||||
dir: "build/es",
|
||||
entryFileNames: "[name].js",
|
||||
chunkFileNames: "[name].js",
|
||||
},
|
||||
{
|
||||
format: "cjs",
|
||||
dir: "build/cjs",
|
||||
entryFileNames: "[name].js",
|
||||
chunkFileNames: "[name].js",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user