@mastra/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -0
  3. package/package.json +80 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Ehindero Israel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # Future
2
+
3
+ This is a guide to developing the core package.
4
+
5
+ ### Ensure Docker is Installed
6
+
7
+ If you haven't already, install Docker: (Docker Installation)[https://www.docker.com/]
8
+
9
+ ### Start Docker Containers
10
+
11
+ 1. Navigate to the .dev directory:`cd .dev`
12
+ 2. Start the Docker containers:
13
+ `docker-compose up -d`
14
+
15
+ This command will spin up the necessary services, including the database and the Inngest server.
16
+
17
+ ### Setup Environment Variables
18
+
19
+ 1. Copy the sample environment variable files:
20
+ packages/admin/.env.local.sample
21
+ packages/core/.env.local.sample
22
+ 2. Duplicate and rename each .env.local.sample file to .env:
23
+ cp packages/admin/.env.local.sample packages/admin/.env`
24
+ cp packages/core/.env.local.sample packages/core/.env`
25
+
26
+ Note: We won’t need to do this again after the first setup if the CLI persists credentials.
27
+
28
+ ### Install Dependencies for Core Package
29
+
30
+ 1. Navigate to the core directory:`cd packages/core`
31
+ 2. Install the dependencies:`pnpm install`
32
+
33
+ ### Build and Initialize CLI
34
+
35
+ 1. Navigate to the cli directory:`cd packages/cli`
36
+ 2. Build the project and run the initialization script:`pnpm run build && node dist/index.js init`
37
+ 3. When prompted, supply the necessary credentials:
38
+
39
+ Database URL: postgresql://postgres:postgres@localhost:5432/postgres
40
+ Inngest Server URL: http://localhost:8288
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@mastra/core",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "main": "dist/index.js",
6
+ "module": "dist/mylib.esm.js",
7
+ "typings": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "husky": {
12
+ "hooks": {
13
+ "pre-commit": "dts lint"
14
+ }
15
+ },
16
+ "prettier": {
17
+ "printWidth": 80,
18
+ "semi": true,
19
+ "singleQuote": true,
20
+ "trailingComma": "es5"
21
+ },
22
+ "dependencies": {
23
+ "@badgateway/oauth2-client": "^2.4.0",
24
+ "@date-fns/utc": "^1.2.0",
25
+ "@prisma/client": "^5.18.0",
26
+ "date-fns": "^3.0.5",
27
+ "inngest": "^3.22.3",
28
+ "lodash": "^4.17.21",
29
+ "next": "^14.2.5",
30
+ "prisma": "^5.18.0",
31
+ "qs": "^6.13.0"
32
+ },
33
+ "peerDependencies": {
34
+ "zod": "^3.23.8"
35
+ },
36
+ "engines": {
37
+ "node": ">=20 <22"
38
+ },
39
+ "size-limit": [
40
+ {
41
+ "path": "dist/mylib.cjs.production.min.js",
42
+ "limit": "10 KB"
43
+ },
44
+ {
45
+ "path": "dist/mylib.esm.js",
46
+ "limit": "10 KB"
47
+ }
48
+ ],
49
+ "devDependencies": {
50
+ "@badgateway/oauth2-client": "^2.4.0",
51
+ "@jest/globals": "^29.7.0",
52
+ "@size-limit/preset-small-lib": "^11.1.4",
53
+ "@tsconfig/recommended": "^1.0.7",
54
+ "@types/jest": "^29.5.12",
55
+ "@types/lodash": "^4.17.7",
56
+ "@types/node": "^22.1.0",
57
+ "@types/qs": "^6.9.15",
58
+ "dts-cli": "^2.0.5",
59
+ "husky": "^9.1.4",
60
+ "jest": "^29.7.0",
61
+ "size-limit": "^11.1.4",
62
+ "ts-jest": "^29.2.4",
63
+ "tslib": "^2.6.3",
64
+ "typescript": "^5.5.4"
65
+ },
66
+ "scripts": {
67
+ "check": "tsc --noEmit",
68
+ "analyze": "size-limit --why",
69
+ "build": "dts build && cp ./src/prisma/* ./dist/prisma",
70
+ "build:dev": "dts watch",
71
+ "lint": "dts lint",
72
+ "size": "size-limit",
73
+ "start": "dts watch",
74
+ "test": "jest",
75
+ "clean": "rm -rf dist && rm -rf node_modules",
76
+ "generate": "node --env-file .env ./src/prisma/gen.js && npx prisma generate --schema=./src/prisma/schema.prisma",
77
+ "synchronize": "npx prisma db push --schema=./src/prisma/schema.prisma --force-reset",
78
+ "postinstall": "pnpm generate"
79
+ }
80
+ }