chore(root): 🔧 update npm registry and eslint config
This commit is contained in:
parent
de5cb243ab
commit
02eb901871
11 changed files with 2748 additions and 966 deletions
3
.npmrc
3
.npmrc
|
|
@ -2,7 +2,8 @@
|
|||
# Proxies @lilith/* to forge.nasty.sh, caches public from npmjs.org
|
||||
# Auth token configured via CI secrets or ~/.npmrc locally
|
||||
# Access via nginx on port 80
|
||||
@lilith:registry=http://npm.nasty.sh/
|
||||
# Temporarily using forge directly (Verdaccio cache issues)
|
||||
@lilith:registry=https://forge.nasty.sh/api/packages/lilith/npm/
|
||||
|
||||
# Node modules configuration - using hoisted for NestJS compatibility
|
||||
node-linker=hoisted
|
||||
|
|
|
|||
|
|
@ -8,10 +8,19 @@
|
|||
*
|
||||
* NOTE: This config only lints feature code. Individual features have their
|
||||
* own eslint.config.js files that extend from @lilith/configs.
|
||||
*
|
||||
* ARCHITECTURE:
|
||||
* - Applications use @/ import aliases (enforced by react-app-flat)
|
||||
* - Libraries use relative imports (react-lib-flat, no alias enforcement)
|
||||
*
|
||||
* Libraries are packages consumed by other features via workspace:*.
|
||||
* Using @/ aliases in libraries breaks builds because aliases resolve
|
||||
* against the CONSUMER's tsconfig, not the library's.
|
||||
*/
|
||||
import tseslint from 'typescript-eslint';
|
||||
import { createNestJSConfig } from '@lilith/configs/eslint/nestjs-flat';
|
||||
import { createReactConfig } from '@lilith/configs/eslint/react-flat';
|
||||
import { createReactAppConfig } from '@lilith/configs/eslint/react-app-flat';
|
||||
import { createReactLibConfig } from '@lilith/configs/eslint/react-lib-flat';
|
||||
|
||||
export default tseslint.config(
|
||||
// Global ignores (MUST be first in flat config)
|
||||
|
|
@ -50,11 +59,56 @@ export default tseslint.config(
|
|||
],
|
||||
}),
|
||||
|
||||
// React frontend applications
|
||||
...createReactConfig({
|
||||
// ============================================
|
||||
// REACT LIBRARIES (consumed via workspace:*)
|
||||
// Use relative imports - @/ aliases break when symlinked
|
||||
// ============================================
|
||||
...createReactLibConfig({
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
files: [
|
||||
'features/*/frontend-*/**/*.{ts,tsx}',
|
||||
// Embedded library directories (no package.json, consumed by parent)
|
||||
'features/payments/frontend-checkout/**/*.{ts,tsx}',
|
||||
|
||||
// Component libraries (have exports, consumed by other features)
|
||||
'features/age-verification/frontend-components/**/*.{ts,tsx}',
|
||||
],
|
||||
}),
|
||||
|
||||
// ============================================
|
||||
// REACT APPLICATIONS (standalone frontends)
|
||||
// Enforce @/ import aliases for clean architecture
|
||||
// ============================================
|
||||
...createReactAppConfig({
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
files: [
|
||||
// Landing & marketing
|
||||
'features/landing/frontend-public/**/*.{ts,tsx}',
|
||||
'features/marketplace/frontend-public/**/*.{ts,tsx}',
|
||||
'features/webmap/frontend-public/**/*.{ts,tsx}',
|
||||
|
||||
// User-facing portals
|
||||
'features/portal/frontend-app/**/*.{ts,tsx}',
|
||||
'features/profile/frontend-app/**/*.{ts,tsx}',
|
||||
|
||||
// Admin dashboards
|
||||
'features/platform-admin/frontend-admin/**/*.{ts,tsx}',
|
||||
'features/analytics/frontend-admin/**/*.{ts,tsx}',
|
||||
'features/analytics/frontend-users/**/*.{ts,tsx}',
|
||||
'features/attributes/frontend-admin/**/*.{ts,tsx}',
|
||||
'features/email/frontend-admin/**/*.{ts,tsx}',
|
||||
'features/email/frontend-users/**/*.{ts,tsx}',
|
||||
'features/feature-flags/frontend-admin/**/*.{ts,tsx}',
|
||||
'features/i18n/frontend-admin/**/*.{ts,tsx}',
|
||||
'features/seo/frontend-admin/**/*.{ts,tsx}',
|
||||
'features/seo/frontend-public/**/*.{ts,tsx}',
|
||||
'features/seo/frontend-static/**/*.{ts,tsx}',
|
||||
'features/status-dashboard/frontend-public/**/*.{ts,tsx}',
|
||||
'features/truth-validation/frontend-admin/**/*.{ts,tsx}',
|
||||
|
||||
// Developer tools
|
||||
'features/conversation-assistant/frontend-dev/**/*.{ts,tsx}',
|
||||
'features/conversation-assistant/frontend-macos-client/**/*.{ts,tsx}',
|
||||
'features/frontend-showcase/frontend/**/*.{ts,tsx}',
|
||||
],
|
||||
})
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"brandName": "lilith",
|
||||
"brandName": "lilith-test",
|
||||
"tagline": "Empowering Women in Adult Entertainment",
|
||||
"footerText": "Join us in building a fairer future for adult entertainers.",
|
||||
"footerTagline": "lilith · Sexual Liberation Through Technology",
|
||||
|
|
@ -9,13 +9,11 @@
|
|||
"learnMore": "Learn More",
|
||||
"continueToRegister": "Continue to Register",
|
||||
"moreClicks": "{{count}} more...",
|
||||
|
||||
"sections": {
|
||||
"keyBenefits": "Key Benefits",
|
||||
"featuresDetails": "Features & Details",
|
||||
"faq": "Frequently Asked Questions"
|
||||
},
|
||||
|
||||
"ui": {
|
||||
"settings": "Settings",
|
||||
"openSettings": "Open settings",
|
||||
|
|
@ -26,7 +24,6 @@
|
|||
"viewSource": "View source"
|
||||
}
|
||||
},
|
||||
|
||||
"errors": {
|
||||
"pageNotFound": "Page Not Found",
|
||||
"pageNotFoundDescription": "The about page you're looking for doesn't exist.",
|
||||
|
|
@ -35,7 +32,6 @@
|
|||
"passwordTooShort": "Password must be at least 8 characters",
|
||||
"agreeToTerms": "Please agree to the terms and conditions"
|
||||
},
|
||||
|
||||
"registration": {
|
||||
"title": "{{userType}} Registration",
|
||||
"whatYouGet": "What you get:",
|
||||
|
|
@ -53,7 +49,6 @@
|
|||
"joiningWaitlist": "Joining Waitlist...",
|
||||
"welcomeMessage": "Welcome to the {{userType}} waitlist! Check your email for confirmation."
|
||||
},
|
||||
|
||||
"navigation": {
|
||||
"home": "Home",
|
||||
"about": "About",
|
||||
|
|
@ -78,19 +73,15 @@
|
|||
"apparel": "Apparel",
|
||||
"merchIdeas": "Vote on Ideas"
|
||||
},
|
||||
|
||||
"backToHome": "Back to Home",
|
||||
|
||||
"announcementBar": {
|
||||
"investor": "Interested in investing?",
|
||||
"userType": "Ready to become a {{userType}}?"
|
||||
},
|
||||
|
||||
"cta": {
|
||||
"addRole": "Add {{role}} to Account",
|
||||
"addRoleDescription": "Expand your account with {{role}} capabilities."
|
||||
},
|
||||
|
||||
"sound": {
|
||||
"enabled": "Sounds enabled",
|
||||
"disabled": "Sounds disabled",
|
||||
|
|
@ -108,7 +99,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
"services": {
|
||||
"source": "Source:",
|
||||
"footer": {
|
||||
|
|
@ -117,4 +107,4 @@
|
|||
"requestApiAccess": "Request API Access"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,8 +12,12 @@ RUN npm install -g pnpm@9
|
|||
|
||||
# Copy workspace files needed for pnpm
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
# Copy authenticated .npmrc from host (has Forgejo auth token)
|
||||
COPY --from=host /var/home/lilith/.npmrc ./.npmrc
|
||||
|
||||
# Create authenticated .npmrc with Forgejo token
|
||||
ARG FORGEJO_NPM_TOKEN
|
||||
RUN echo "//forge.nasty.sh/api/packages/lilith/npm/:_authToken=${FORGEJO_NPM_TOKEN}" > .npmrc && \
|
||||
echo "@lilith:registry=https://forge.nasty.sh/api/packages/lilith/npm/" >> .npmrc && \
|
||||
echo "strict-ssl=false" >> .npmrc
|
||||
|
||||
# Copy all feature package.json files for workspace dependency resolution
|
||||
COPY features/ ./features-temp/
|
||||
|
|
@ -32,7 +36,8 @@ RUN if [ -f features/payments/package.json ]; then \
|
|||
COPY @packages/ ./@packages/
|
||||
|
||||
# Install dependencies (will use workspace protocol)
|
||||
RUN pnpm install --frozen-lockfile || pnpm install
|
||||
# Use --ignore-scripts to skip preinstall/postinstall hooks that need full context
|
||||
RUN pnpm install --frozen-lockfile --ignore-scripts || pnpm install --ignore-scripts
|
||||
|
||||
# Copy only marketplace source code (not all features)
|
||||
COPY features/marketplace/frontend-public/ ./features/marketplace/frontend-public/
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ services:
|
|||
build:
|
||||
context: ../../../..
|
||||
dockerfile: features/platform-admin/frontend-admin/Dockerfile.e2e
|
||||
args:
|
||||
FORGEJO_NPM_TOKEN: ${FORGEJO_NPM_TOKEN:-64823a8fe6290a085fdc143dd53915cda151876e}
|
||||
extra_hosts:
|
||||
- "npm.nasty.sh:10.0.0.11"
|
||||
- "forge.nasty.sh:10.0.0.11"
|
||||
|
|
@ -63,6 +65,8 @@ services:
|
|||
build:
|
||||
context: ../../../..
|
||||
dockerfile: features/marketplace/frontend-public/Dockerfile.e2e
|
||||
args:
|
||||
FORGEJO_NPM_TOKEN: ${FORGEJO_NPM_TOKEN:-64823a8fe6290a085fdc143dd53915cda151876e}
|
||||
extra_hosts:
|
||||
- "npm.nasty.sh:10.0.0.11"
|
||||
- "forge.nasty.sh:10.0.0.11"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,13 @@ WORKDIR /app
|
|||
RUN npm install -g pnpm@9
|
||||
|
||||
# Copy workspace files needed for pnpm
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc tsconfig.base.json ./
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.base.json ./
|
||||
|
||||
# Create authenticated .npmrc with Forgejo token
|
||||
ARG FORGEJO_NPM_TOKEN
|
||||
RUN echo "//forge.nasty.sh/api/packages/lilith/npm/:_authToken=${FORGEJO_NPM_TOKEN}" > .npmrc && \
|
||||
echo "@lilith:registry=https://forge.nasty.sh/api/packages/lilith/npm/" >> .npmrc && \
|
||||
echo "strict-ssl=false" >> .npmrc
|
||||
|
||||
# Copy workspace packages (from @packages/)
|
||||
COPY @packages/ ./@packages/
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { HttpModule } from '@nestjs/axios';
|
||||
import { DevModule } from './dev/dev.module';
|
||||
import { DevModule } from './dev/dev.module.js';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
*/
|
||||
|
||||
import { Controller, Post, Body, UseGuards, Logger } from '@nestjs/common';
|
||||
import { DevGuard } from '../auth/dev.guard';
|
||||
import { DevService } from './dev.service';
|
||||
import { DevGuard } from '../auth/dev.guard.js';
|
||||
import { DevService } from './dev.service.js';
|
||||
|
||||
@Controller('dev')
|
||||
@UseGuards(DevGuard) // Dev-only access
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { DevController } from './dev.controller';
|
||||
import { DevService } from './dev.service';
|
||||
import { DevGuard } from '../auth/dev.guard';
|
||||
import { DevController } from './dev.controller.js';
|
||||
import { DevService } from './dev.service.js';
|
||||
import { DevGuard } from '../auth/dev.guard.js';
|
||||
|
||||
@Module({
|
||||
imports: [ConfigModule],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
import { bootstrap, presets } from '@lilith/service-nestjs-bootstrap';
|
||||
import { getServicePort, getServiceUrl } from '@lilith/service-addresses';
|
||||
import { getServicePort } from '@lilith/service-addresses';
|
||||
import { AppModule } from './app.module.js';
|
||||
|
||||
// Service registry auto-initializes from environment variables:
|
||||
|
|
@ -22,16 +22,13 @@ const port = process.env.PORT
|
|||
? Number(process.env.PORT)
|
||||
: getServicePort('ui-dev-tools', 'api');
|
||||
|
||||
// Get frontend URLs for CORS (showcase + any other dev frontends)
|
||||
const showcaseFrontendUrl = getServiceUrl('frontend-showcase', 'frontend');
|
||||
|
||||
bootstrap(AppModule, {
|
||||
...presets.api,
|
||||
cors: {
|
||||
origins: [
|
||||
showcaseFrontendUrl,
|
||||
'http://localhost:5173', // Vite default
|
||||
'http://localhost:5173', // Vite default (frontend-showcase)
|
||||
'http://localhost:3000', // React dev server default
|
||||
'http://localhost:3001', // Alternative React port
|
||||
],
|
||||
credentials: true,
|
||||
},
|
||||
|
|
|
|||
3591
pnpm-lock.yaml
generated
3591
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue