Skip to content

Commit 7b84af7

Browse files
committed
shift @simulacrum/server to useService helpers
1 parent fca99a1 commit 7b84af7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+367
-1852
lines changed

.changes/config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
"deps": "Dependencies"
2727
},
2828
"packages": {
29+
"@simulacrum/server": {
30+
"path": "./packages/server",
31+
"manager": "javascript",
32+
"dependencies": []
33+
},
2934
"@simulacrum/foundation-simulator": {
3035
"path": "./packages/foundation",
3136
"manager": "javascript",

.changes/server-useService.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@simulacrum/server": minor:enhance
3+
---
4+
5+
BREAKING CHANGE: Shift to helpers to allow one to more easily set up and run simulators. This provides an `effection` Operation to allow one to easily run processes through a function. This is useful for starting up simulators as required for a test.

package-lock.json

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

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"version": "0.0.0",
44
"private": true,
55
"description": "Composable simulations for testing, development, and application previews",
6+
"author": "Frontside Engineering <engineering@frontside.com>",
7+
"license": "MIT",
68
"scripts": {
79
"clean": "npm run clean --workspaces",
810
"test": "npm run test --workspaces",
@@ -24,22 +26,21 @@
2426
"simulation",
2527
"emulation"
2628
],
27-
"author": "Charles Lowell <cowboyd@frontside.io>",
28-
"license": "MIT",
2929
"bugs": {
3030
"url": "https://github.com/thefrontside/simulacrum/issues"
3131
},
3232
"homepage": "https://github.com/thefrontside/simulacrum#readme",
3333
"engines": {
3434
"node": ">=20",
35-
"npm": ">=10"
35+
"npm": ">=11"
3636
},
3737
"volta": {
3838
"node": "20.19.1",
3939
"npm": "11.3.0"
4040
},
4141
"devDependencies": {
4242
"@frontside/tsconfig": "^3.0.0",
43-
"@graphql-codegen/cli": "^5.x.x"
43+
"@graphql-codegen/cli": "^5.x.x",
44+
"tsx": "^4.20.5"
4445
}
4546
}

packages/server/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/server/.projectile

Whitespace-only changes.

packages/server/package.json

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,46 @@
11
{
22
"name": "@simulacrum/server",
33
"version": "0.6.3",
4-
"description": "A server containing simulation state, and the control API to manipulate it",
5-
"main": "dist/index.js",
6-
"scripts": {
7-
"clean": "echo skip",
8-
"test": "echo noop",
9-
"prepack": "echo \"tsc --build tsconfig.dist.json\"",
10-
"build": "npm run prepack",
11-
"lint": "echo noop",
12-
"start": "node dist/start.js",
13-
"watch": "ts-node -P ./tsconfig.watch.json ./watch.ts"
4+
"description": "Helpers and control plane to handle simulators and observability",
5+
"author": "Frontside Engineering <engineering@frontside.com>",
6+
"license": "MIT",
7+
"bugs": {
8+
"url": "https://github.com/thefrontside/simulacrum/issues"
149
},
1510
"repository": {
1611
"type": "git",
17-
"url": "git+https://github.com/thefrontside/simulacrum.git"
12+
"url": "git+https://github.com/thefrontside/simulacrum.git",
13+
"directory": "packages/server"
1814
},
1915
"keywords": [
2016
"simulation",
21-
"emulation"
17+
"emulation",
18+
"mock",
19+
"mocking",
20+
"integration testing"
2221
],
23-
"author": "Frontside Engineering <engineering@frontside.com>",
24-
"license": "MIT",
25-
"bugs": {
26-
"url": "https://github.com/thefrontside/simulacrum/issues"
22+
"type": "module",
23+
"scripts": {
24+
"clean": "echo skip",
25+
"test": "node --import tsx --test test/*.test.ts",
26+
"prepack": "tsc -build tsconfig.esm.json",
27+
"build": "npm run prepack",
28+
"lint": "echo noop",
29+
"test:service-main": "node --import tsx ./test/service-main.ts"
30+
},
31+
"dependencies": {
32+
"effection": "^3.6.0",
33+
"@effectionx/tinyexec": "^0.2.0",
34+
"@effectionx/context-api": "^0.1.0"
2735
},
28-
"homepage": "https://github.com/thefrontside/simulacrum#readme",
29-
"dependencies": {},
3036
"devDependencies": {},
37+
"exports": {
38+
"development": "./src/index.ts",
39+
"import": {
40+
"types": "./dist/index.d.ts",
41+
"default": "./dist/index.js"
42+
}
43+
},
3144
"volta": {
3245
"extends": "../../package.json"
3346
}

packages/server/src/config/paths.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/server/src/echo.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/server/src/effect.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)