Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @12deg/state-machine
# @prefabs.tech/state-machine

## Packages

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@12degrees/stateful",
"name": "@prefabs.tech/stateful",
"version": "0.4.1",
"private": true,
"homepage": "https://github.com/12deg/stateful#readme",
"homepage": "https://github.com/prefabs-tech/stateful#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/12deg/stateful.git"
"url": "git+https://github.com/prefabs-tech/stateful.git"
},
"author": {
"name": "12 Degrés SAS",
"email": "info@12deg.com",
"url": "https://12deg.com"
"name": "Prefabs Tech",
"email": "pm@prefabs.tech",
"url": "https://github.com/prefabs-tech"
},
"scripts": {
"build": "turbo run build",
Expand Down
20 changes: 10 additions & 10 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "@12degrees/stateful-core",
"name": "@prefabs.tech/stateful-core",
"version": "0.4.1",
"description": "Core shared package for stateful library",
"homepage": "https://github.com/12deg/stateful/tree/main/packages/core#readme",
"homepage": "https://github.com/prefabs-tech/stateful/tree/main/packages/core#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/12deg/stateful.git",
"url": "git+https://github.com/prefabs-tech/stateful.git",
"directory": "packages/core"
},
"author": {
"name": "12 Degrés SAS",
"email": "info@12deg.com",
"url": "https://12deg.com"
"name": "Prefabs Tech",
"email": "pm@prefabs.tech",
"url": "https://github.com/prefabs-tech"
},
"type": "module",
"exports": {
".": {
"import": "./dist/12degrees-stateful-core.js",
"require": "./dist/12degrees-stateful-core.umd.cjs"
"import": "./dist/prefabs-tech-stateful-core.js",
"require": "./dist/prefabs-tech-stateful-core.umd.cjs"
}
},
"main": "./dist/12degrees-stateful-core.umd.cjs",
"module": "./dist/12degrees-stateful-core.js",
"main": "./dist/prefabs-tech-stateful-core.umd.cjs",
"module": "./dist/prefabs-tech-stateful-core.js",
"types": "./dist/types/index.d.ts",
"files": [
"dist"
Expand Down
4 changes: 2 additions & 2 deletions packages/core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default defineConfig(({ mode }) => {
path.dirname(fileURLToPath(import.meta.url)),
"src/index.ts",
),
fileName: "12degrees-stateful-core",
name: "12degreesStatefulCore",
fileName: "prefabs-tech-stateful-core",
name: "prefabsTechStatefulCore",
},
rollupOptions: {
external: Object.keys(peerDependencies),
Expand Down
10 changes: 5 additions & 5 deletions packages/fastify/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @12degrees/stateful/fastify
# @prefabs.tech/stateful-fastify

A fastify plugin for implementing a state machine.

Expand All @@ -11,13 +11,13 @@ A [fastify](https://fastify.dev) server.
Install with npm:

```bash
npm install @12degrees/stateful-fastify
npm install @prefabs.tech/stateful-fastify
```

Install with pnpm:

```bash
pnpm add --filter "@scope/project" @12degrees/stateful-fastify
pnpm add --filter "@scope/project" @prefabs.tech/stateful-fastify
```

## Usage
Expand All @@ -27,7 +27,7 @@ pnpm add --filter "@scope/project" @12degrees/stateful-fastify
Register the plugin with your fastify instance:

```typescript
import plugin from "@12degrees/stateful-fastify";
import plugin from "@prefabs.tech/stateful-fastify";
import Fastify from "fastify";

const start = async () => {
Expand All @@ -53,7 +53,7 @@ start();

```
# ThingController.ts
import statefulPlugin from "@12degrees/stateful-fastify";
import statefulPlugin from "@prefabs.tech/stateful-fastify";
...

const plugin = async (
Expand Down
22 changes: 11 additions & 11 deletions packages/fastify/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "@12degrees/stateful-fastify",
"name": "@prefabs.tech/stateful-fastify",
"version": "0.4.1",
"description": "A fastify plugin for the stateful library",
"homepage": "https://github.com/12deg/stateful/tree/main/packages/fastify#readme",
"homepage": "https://github.com/prefabs-tech/stateful/tree/main/packages/fastify#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/12deg/stateful.git",
"url": "git+https://github.com/prefabs-tech/stateful.git",
"directory": "packages/fastify"
},
"author": {
"name": "12 Degrés SAS",
"email": "info@12deg.com",
"url": "https://12deg.com"
"name": "Prefabs Tech",
"email": "pm@prefabs.tech",
"url": "https://github.com/prefabs-tech"
},
"type": "module",
"exports": {
".": {
"import": "./dist/12degrees-stateful-fastify.js",
"require": "./dist/12degrees-stateful-fastify.umd.cjs"
"import": "./dist/prefabs-tech-stateful-fastify.js",
"require": "./dist/prefabs-tech-stateful-fastify.umd.cjs"
}
},
"main": "./dist/12degrees-stateful-fastify.umd.cjs",
"module": "./dist/12degrees-stateful-fastify.js",
"main": "./dist/prefabs-tech-stateful-fastify.umd.cjs",
"module": "./dist/prefabs-tech-stateful-fastify.js",
"types": "./dist/types/index.d.ts",
"files": [
"dist"
Expand All @@ -35,7 +35,7 @@
"typecheck": "tsc --noEmit -p tsconfig.json --composite false"
},
"dependencies": {
"@12degrees/stateful-core": "0.4.1"
"@prefabs.tech/stateful-core": "0.4.1"
},
"devDependencies": {
"@prefabs.tech/fastify-config": "0.88.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/fastify/src/model/records/service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
import {
StateRecord,
StateRecordCreateInput,
StateRecordUpdateInput,
} from "@12degrees/stateful-core";
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
} from "@prefabs.tech/stateful-core";

import RecordSqlFactory from "./sqlFactory";

Expand Down
6 changes: 3 additions & 3 deletions packages/fastify/src/model/state_transitions/service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
import {
StateTransition,
StateTransitionCreateInput,
StateTransitionUpdateInput,
} from "@12degrees/stateful-core";
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
} from "@prefabs.tech/stateful-core";

import StateTransitionSqlFactory from "./sqlFactory";

Expand Down
6 changes: 3 additions & 3 deletions packages/fastify/src/model/state_transitions_i18n/service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
import {
StateTransitionI18n,
StateTransitionI18nCreateInput,
StateTransitionI18nUpdateInput,
} from "@12degrees/stateful-core";
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
} from "@prefabs.tech/stateful-core";

import StateTransitionI18nSqlFactory from "./sqlFactory";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const updateEntityState = async (
const record = await recordsService.create(recordInput);

fastify.eventBus.emit(
`12degrees/stateful:${entityName}StateChanged`,
`prefabs.tech/stateful:${entityName}StateChanged`,
undefined,
{
entityId,
Expand Down
6 changes: 3 additions & 3 deletions packages/fastify/src/model/states/service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
import {
State,
StateCreateInput,
StateUpdateInput,
} from "@12degrees/stateful-core";
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
} from "@prefabs.tech/stateful-core";

import StateSqlFactory from "./sqlFactory";

Expand Down
6 changes: 3 additions & 3 deletions packages/fastify/src/model/states_i18n/service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
import {
StateI18n,
StateI18nCreateInput,
StateI18nUpdateInput,
} from "@12degrees/stateful-core";
import { ApiConfig } from "@prefabs.tech/fastify-config";
import { BaseService } from "@prefabs.tech/fastify-slonik";
} from "@prefabs.tech/stateful-core";

import StateI18nSqlFactory from "./sqlFactory";

Expand Down
4 changes: 2 additions & 2 deletions packages/fastify/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default defineConfig(({ mode }) => {
path.dirname(fileURLToPath(import.meta.url)),
"src/index.ts",
),
fileName: "12degrees-stateful-fastify",
name: "12degreesStatefulFastify",
fileName: "prefabs-tech-stateful-fastify",
name: "prefabsTechStatefulFastify",
},
rollupOptions: {
external: Object.keys(peerDependencies),
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ship.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function expandPackageList(list, dir = ".") {

// ship.js config
module.exports = {
appName: "@12degrees/stateful",
appName: "@prefabs.tech/stateful",
buildCommand: ({ isYarn, version }) => {
return "pnpm build";
},
Expand Down