Skip to content

Commit 97fb1f4

Browse files
committed
feat: add asset-2d, input-core, render-2d, and render-3d packages with capability seams
1 parent f4d4afc commit 97fb1f4

33 files changed

Lines changed: 672 additions & 4 deletions
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Engine Hardening
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'web/**'
7+
- '.github/workflows/engine-hardening.yml'
8+
push:
9+
branches:
10+
- main
11+
- module-refactor
12+
paths:
13+
- 'web/**'
14+
- '.github/workflows/engine-hardening.yml'
15+
16+
jobs:
17+
engine-hardening:
18+
name: engine-hardening
19+
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
working-directory: web
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22
32+
cache: npm
33+
cache-dependency-path: web/package-lock.json
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Run engine hardening gate
39+
run: npm run ci:engine-hardening

web/package-lock.json

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"lint:fix": "lerna run lint:fix --parallel --stream",
1919
"test": "vitest",
2020
"test:architecture": "vitest run --config vitest.config.architecture.ts",
21-
"test:profiles": "vitest run --config vitest.config.architecture.ts tests/architecture/scene-split/runtime-profile-entry.test.ts tests/architecture/scene-split/runtime-profile-smoke.test.ts",
21+
"test:profiles": "vitest run --config vitest.config.architecture.ts tests/architecture/scene-split/runtime-profile-entry.test.ts tests/architecture/scene-split/runtime-profile-smoke.test.ts tests/architecture/scene-split/runtime-profile-capability-graph.test.ts",
2222
"test:render-governance": "vitest run --config vitest.config.architecture.ts tests/architecture/render-split",
2323
"test:input-governance": "vitest run --config vitest.config.architecture.ts tests/architecture/input-split",
2424
"test:consumer-migration": "vitest run --config vitest.config.architecture.ts tests/architecture/scene-split/core-consumer-migration-boundary.test.ts",
@@ -29,6 +29,7 @@
2929
"test:webgl": "playwright test --config playwright.config.ts",
3030
"test:coverage": "vitest --coverage",
3131
"test:all": "npm run test && npm run test:architecture && npm run test:browser && npm run test:webgl",
32+
"ci:engine-hardening": "npm run test:architecture && npm run verify:engine-hardening",
3233
"verify:engine-hardening": "npm run test:hardening && npm run build && npm run examples:build",
3334
"docs": "typedoc"
3435
},

web/packages/asset-2d/package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "@axrone/asset-2d",
3+
"version": "0.1.0",
4+
"main": "./dist/index.js",
5+
"module": "./dist/index.mjs",
6+
"types": "./dist/index.d.ts",
7+
"files": [
8+
"dist"
9+
],
10+
"sideEffects": false,
11+
"exports": {
12+
".": {
13+
"types": "./dist/index.d.ts",
14+
"import": "./dist/index.mjs",
15+
"require": "./dist/index.js"
16+
}
17+
},
18+
"scripts": {
19+
"build": "rollup -c rollup.config.mjs",
20+
"clean": "rimraf dist",
21+
"test": "vitest run"
22+
},
23+
"dependencies": {
24+
"@axrone/asset-core": "^0.1.0"
25+
}
26+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import path from 'node:path';
2+
import { fileURLToPath } from 'node:url';
3+
import { createPackageConfig } from '../../build/create-package-config.mjs';
4+
5+
const packageDir = path.dirname(fileURLToPath(import.meta.url));
6+
7+
export default createPackageConfig({
8+
packageDir,
9+
});

web/packages/asset-2d/src/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export const ASSET_2D_CAPABILITY_ID = 'asset/2d';
2+
export const ASSET_2D_CAPABILITY_PACKAGE = '@axrone/asset-2d';
3+
export const ASSET_2D_OWNER_PACKAGE = '@axrone/asset-core';
4+
5+
const ASSET_2D_CAPABILITY = Object.freeze({
6+
id: ASSET_2D_CAPABILITY_ID,
7+
packageName: ASSET_2D_CAPABILITY_PACKAGE,
8+
ownerPackage: ASSET_2D_OWNER_PACKAGE,
9+
});
10+
11+
export type Asset2DCapability = typeof ASSET_2D_CAPABILITY;
12+
13+
export const getAsset2DCapability = (): Asset2DCapability => ASSET_2D_CAPABILITY;
14+
15+
export * from '@axrone/asset-core';
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"composite": false,
5+
"types": ["node"],
6+
"declaration": true,
7+
"declarationMap": false,
8+
"sourceMap": true
9+
},
10+
"include": ["src/**/*.ts", "../../types/**/*.d.ts"],
11+
"exclude": [
12+
"**/__tests__/**",
13+
"**/*.test.ts",
14+
"**/*.spec.ts",
15+
"**/*.browser.test.ts",
16+
"**/*.browser.spec.ts",
17+
"dist"
18+
]
19+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "@axrone/input-core",
3+
"version": "0.1.0",
4+
"main": "./dist/index.js",
5+
"module": "./dist/index.mjs",
6+
"types": "./dist/index.d.ts",
7+
"files": [
8+
"dist"
9+
],
10+
"sideEffects": false,
11+
"exports": {
12+
".": {
13+
"types": "./dist/index.d.ts",
14+
"import": "./dist/index.mjs",
15+
"require": "./dist/index.js"
16+
}
17+
},
18+
"scripts": {
19+
"build": "rollup -c rollup.config.mjs",
20+
"clean": "rimraf dist",
21+
"test": "vitest run"
22+
},
23+
"dependencies": {
24+
"@axrone/input": "^0.1.0"
25+
}
26+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import path from 'node:path';
2+
import { fileURLToPath } from 'node:url';
3+
import { createPackageConfig } from '../../build/create-package-config.mjs';
4+
5+
const packageDir = path.dirname(fileURLToPath(import.meta.url));
6+
7+
export default createPackageConfig({
8+
packageDir,
9+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export const INPUT_CORE_CAPABILITY_ID = 'input/core';
2+
export const INPUT_CORE_CAPABILITY_PACKAGE = '@axrone/input-core';
3+
export const INPUT_CORE_OWNER_PACKAGE = '@axrone/input';
4+
5+
const INPUT_CORE_CAPABILITY = Object.freeze({
6+
id: INPUT_CORE_CAPABILITY_ID,
7+
packageName: INPUT_CORE_CAPABILITY_PACKAGE,
8+
ownerPackage: INPUT_CORE_OWNER_PACKAGE,
9+
});
10+
11+
export type InputCoreCapability = typeof INPUT_CORE_CAPABILITY;
12+
13+
export const getInputCoreCapability = (): InputCoreCapability => INPUT_CORE_CAPABILITY;
14+
15+
export * from '@axrone/input';

0 commit comments

Comments
 (0)