setup: initialize project with package.json, tsconfig, tsup, vitest, src skeleton, and test placeholders
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
|
*.js.map
|
||||||
*.tgz
|
*.tgz
|
||||||
coverage/
|
coverage/
|
||||||
.vitest/
|
.vitest/
|
||||||
3079
package-lock.json
generated
Normal file
3079
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
135
package.json
Normal file
135
package.json
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
{
|
||||||
|
"name": "@alkdev/flowgraph",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "Workflow graph library — DAG-based operation orchestration over graphology, with ujsx template composition and reactive execution",
|
||||||
|
"type": "module",
|
||||||
|
"main": "./dist/index.cjs",
|
||||||
|
"module": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/index.d.cts",
|
||||||
|
"default": "./dist/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/component": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/component/index.d.ts",
|
||||||
|
"default": "./dist/component/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/component/index.d.cts",
|
||||||
|
"default": "./dist/component/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/host": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/host/index.d.ts",
|
||||||
|
"default": "./dist/host/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/host/index.d.cts",
|
||||||
|
"default": "./dist/host/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/schema": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/schema/index.d.ts",
|
||||||
|
"default": "./dist/schema/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/schema/index.d.cts",
|
||||||
|
"default": "./dist/schema/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/graph": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/graph/index.d.ts",
|
||||||
|
"default": "./dist/graph/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/graph/index.d.cts",
|
||||||
|
"default": "./dist/graph/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/reactive": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/reactive/index.d.ts",
|
||||||
|
"default": "./dist/reactive/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/reactive/index.d.cts",
|
||||||
|
"default": "./dist/reactive/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/analysis": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/analysis/index.d.ts",
|
||||||
|
"default": "./dist/analysis/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/analysis/index.d.cts",
|
||||||
|
"default": "./dist/analysis/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/error": {
|
||||||
|
"import": {
|
||||||
|
"types": "./dist/error/index.d.ts",
|
||||||
|
"default": "./dist/error/index.js"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"types": "./dist/error/index.d.cts",
|
||||||
|
"default": "./dist/error/index.cjs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"build:tsc": "tsc",
|
||||||
|
"test": "vitest run",
|
||||||
|
"test:watch": "vitest",
|
||||||
|
"test:coverage": "vitest run --coverage",
|
||||||
|
"lint": "tsc --noEmit",
|
||||||
|
"prepublishOnly": "npm run build"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"flowgraph",
|
||||||
|
"dag",
|
||||||
|
"workflow",
|
||||||
|
"graphology",
|
||||||
|
"ujsx",
|
||||||
|
"operations"
|
||||||
|
],
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@alkdev/typebox": "^0.34.49",
|
||||||
|
"@alkdev/ujsx": "^0.1.0",
|
||||||
|
"@preact/signals-core": "^1.14.1",
|
||||||
|
"graphology": "^0.26.0",
|
||||||
|
"graphology-dag": "^0.4.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@alkdev/operations": "^0.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^22.0.0",
|
||||||
|
"@vitest/coverage-v8": "^3.2.4",
|
||||||
|
"tsup": "^8.5.1",
|
||||||
|
"typescript": "^5.7.0",
|
||||||
|
"vitest": "^3.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
src/analysis/defaults.ts
Normal file
1
src/analysis/defaults.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/analysis/index.ts
Normal file
1
src/analysis/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/analysis/type-compat.ts
Normal file
1
src/analysis/type-compat.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/analysis/workflow.ts
Normal file
1
src/analysis/workflow.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/component/conditional.ts
Normal file
1
src/component/conditional.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/component/index.ts
Normal file
1
src/component/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/component/map.ts
Normal file
1
src/component/map.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/component/operation.ts
Normal file
1
src/component/operation.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/component/parallel.ts
Normal file
1
src/component/parallel.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/component/sequential.ts
Normal file
1
src/component/sequential.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/error/index.ts
Normal file
1
src/error/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/graph/construction.ts
Normal file
1
src/graph/construction.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/graph/index.ts
Normal file
1
src/graph/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/graph/mutation.ts
Normal file
1
src/graph/mutation.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/graph/queries.ts
Normal file
1
src/graph/queries.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/graph/validation.ts
Normal file
1
src/graph/validation.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/host/graphology.ts
Normal file
1
src/host/graphology.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/host/index.ts
Normal file
1
src/host/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/host/reactive.ts
Normal file
1
src/host/reactive.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/index.ts
Normal file
1
src/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/reactive/index.ts
Normal file
1
src/reactive/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/reactive/node-status.ts
Normal file
1
src/reactive/node-status.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/reactive/workflow.ts
Normal file
1
src/reactive/workflow.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/schema/edge.ts
Normal file
1
src/schema/edge.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/schema/enums.ts
Normal file
1
src/schema/enums.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/schema/graph.ts
Normal file
1
src/schema/graph.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/schema/index.ts
Normal file
1
src/schema/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
1
src/schema/node.ts
Normal file
1
src/schema/node.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
7
test/analysis/type-compat.test.ts
Normal file
7
test/analysis/type-compat.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('analysis type-compat', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/analysis/workflow.test.ts
Normal file
7
test/analysis/workflow.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('analysis workflow', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/component/components.test.ts
Normal file
7
test/component/components.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('components', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/error/errors.test.ts
Normal file
7
test/error/errors.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('errors', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/graph/construction.test.ts
Normal file
7
test/graph/construction.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('graph construction', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/graph/mutation.test.ts
Normal file
7
test/graph/mutation.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('graph mutation', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/graph/queries.test.ts
Normal file
7
test/graph/queries.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('graph queries', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/graph/validation.test.ts
Normal file
7
test/graph/validation.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('graph validation', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/host/graphology.test.ts
Normal file
7
test/host/graphology.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('graphology host', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/host/reactive.test.ts
Normal file
7
test/host/reactive.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('reactive host', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
7
test/schema/enums.test.ts
Normal file
7
test/schema/enums.test.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
|
||||||
|
describe('schema enums', () => {
|
||||||
|
it('placeholder', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
26
tsconfig.json
Normal file
26
tsconfig.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"lib": ["ES2022"],
|
||||||
|
"module": "Node16",
|
||||||
|
"moduleResolution": "Node16",
|
||||||
|
"outDir": "./dist",
|
||||||
|
"rootDir": "./src",
|
||||||
|
"strict": true,
|
||||||
|
"declaration": true,
|
||||||
|
"declarationMap": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"noUncheckedIndexedAccess": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"erasableSyntaxOnly": true
|
||||||
|
},
|
||||||
|
"include": ["src/**/*.ts"],
|
||||||
|
"exclude": ["node_modules", "dist", "test"]
|
||||||
|
}
|
||||||
19
tsup.config.ts
Normal file
19
tsup.config.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { defineConfig } from 'tsup';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: {
|
||||||
|
index: 'src/index.ts',
|
||||||
|
'component/index': 'src/component/index.ts',
|
||||||
|
'host/index': 'src/host/index.ts',
|
||||||
|
'schema/index': 'src/schema/index.ts',
|
||||||
|
'graph/index': 'src/graph/index.ts',
|
||||||
|
'reactive/index': 'src/reactive/index.ts',
|
||||||
|
'analysis/index': 'src/analysis/index.ts',
|
||||||
|
'error/index': 'src/error/index.ts',
|
||||||
|
},
|
||||||
|
format: ['esm', 'cjs'],
|
||||||
|
dts: true,
|
||||||
|
sourcemap: true,
|
||||||
|
clean: true,
|
||||||
|
target: 'es2022',
|
||||||
|
});
|
||||||
19
vitest.config.ts
Normal file
19
vitest.config.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { defineConfig } from 'vitest/config';
|
||||||
|
import path from 'node:path';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': path.resolve(__dirname, 'src'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
globals: true,
|
||||||
|
include: ['test/**/*.test.ts'],
|
||||||
|
coverage: {
|
||||||
|
provider: 'v8',
|
||||||
|
include: ['src/**/*.ts'],
|
||||||
|
exclude: ['src/**/index.ts'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user