diff --git a/LICENSE b/LICENSE index 155a0737f..91d4584d3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 ZenStack Full-stack Development Toolkit +Copyright (c) 2022 ZenStack Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package.json b/package.json index 7881b1c16..273059010 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "zenstack-monorepo", - "version": "1.0.0", + "version": "0.2.1", "description": "", "scripts": { "build": "pnpm -r build", "test": "pnpm -r test", - "lint": "pnpm -r lint" + "lint": "pnpm -r lint", + "publish-all": "pnpm --filter \"./packages/**\" -r publish" }, "keywords": [], "author": "", diff --git a/packages/internal/LICENSE.md b/packages/internal/LICENSE.md new file mode 100644 index 000000000..91d4584d3 --- /dev/null +++ b/packages/internal/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ZenStack + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/internal/README.md b/packages/internal/README.md new file mode 100644 index 000000000..0ae3952f3 --- /dev/null +++ b/packages/internal/README.md @@ -0,0 +1,5 @@ +# ZenStack Internal Library + +This package is an internal library supporting web apps built using ZenStack. + +Visit [Homepage](https://github.com/zenstackhq/zenstack#readme) for more details. diff --git a/packages/internal/package.json b/packages/internal/package.json index 64768aa96..b49b50cc8 100644 --- a/packages/internal/package.json +++ b/packages/internal/package.json @@ -1,6 +1,6 @@ { "name": "@zenstackhq/internal", - "version": "0.1.58", + "version": "0.2.1", "displayName": "ZenStack Internal Library", "description": "ZenStack internal runtime library. This package is for supporting runtime functionality of ZenStack and not supposed to be used directly.", "repository": { diff --git a/packages/runtime/LICENSE.md b/packages/runtime/LICENSE.md new file mode 100644 index 000000000..91d4584d3 --- /dev/null +++ b/packages/runtime/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ZenStack + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/runtime/README.md b/packages/runtime/README.md new file mode 100644 index 000000000..453a79769 --- /dev/null +++ b/packages/runtime/README.md @@ -0,0 +1,5 @@ +# ZenStack Runtime Library + +This package is the runtime library supporting web apps built using ZenStack. + +Visit [Homepage](https://github.com/zenstackhq/zenstack#readme) for more details. diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 009281db6..d4af1d94e 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,7 +1,7 @@ { "name": "@zenstackhq/runtime", "displayName": "ZenStack Runtime Library", - "version": "0.1.58", + "version": "0.2.1", "description": "This package contains runtime library for consuming client and server side code generated by ZenStack.", "repository": { "type": "git", diff --git a/packages/schema/.gitignore b/packages/schema/.gitignore index fd13f0571..54e9b11ea 100644 --- a/packages/schema/.gitignore +++ b/packages/schema/.gitignore @@ -2,3 +2,4 @@ /tests/coverage/ /bundle *.vsix +/README.md diff --git a/packages/schema/LICENSE.md b/packages/schema/LICENSE.md index fc7c225b9..91d4584d3 100644 --- a/packages/schema/LICENSE.md +++ b/packages/schema/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 ZenStack Language Tools +Copyright (c) 2022 ZenStack Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/schema/README.md b/packages/schema/README.md deleted file mode 120000 index fe8400541..000000000 --- a/packages/schema/README.md +++ /dev/null @@ -1 +0,0 @@ -../../README.md \ No newline at end of file diff --git a/packages/schema/package.json b/packages/schema/package.json index 345c73e82..ec43dc37a 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -3,7 +3,7 @@ "publisher": "zenstack", "displayName": "ZenStack Language Tools", "description": "ZenStack is a toolkit that simplifies full-stack development", - "version": "0.1.58", + "version": "0.2.1", "author": { "name": "ZenStack Team" }, @@ -77,7 +77,7 @@ "langium:watch": "langium generate --watch", "watch": "concurrently --kill-others \"npm:langium:watch\" \"npm:bundle-watch\"", "test": "jest", - "prepublishOnly": "pnpm build && pnpm bundle" + "prepublishOnly": "cp ../../README.md ./ && pnpm build && pnpm bundle" }, "dependencies": { "@zenstackhq/internal": "workspace:*", diff --git a/samples/todo/README.md b/samples/todo/README.md index c87e0421d..082df7272 100644 --- a/samples/todo/README.md +++ b/samples/todo/README.md @@ -1,34 +1,11 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# A Collaborative Todo Sample -## Getting Started +This project is a collaborative todo app built with [Next.js](https://nextjs.org), [Next-Auth](nextauth.org), and [ZenStack](https://github.com/zenstackhq/zenstack). -First, run the development server: +See a live deployment at: https://zenstack-todo.vercel.app/. -```bash -npm run dev -# or -yarn dev -``` +Features: -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. - -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +- User signup/signin +- Creating workspaces and inviting members +- Data isolation and permission control diff --git a/samples/todo/package-lock.json b/samples/todo/package-lock.json index 9713daecf..b88f0afd4 100644 --- a/samples/todo/package-lock.json +++ b/samples/todo/package-lock.json @@ -1,17 +1,17 @@ { "name": "todo", - "version": "0.1.0", + "version": "0.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "todo", - "version": "0.1.0", + "version": "0.2.1", "dependencies": { "@heroicons/react": "^2.0.12", "@prisma/client": "^4.4.0", - "@zenstackhq/internal": "^0.1.58", - "@zenstackhq/runtime": "^0.1.58", + "@zenstackhq/internal": "^0.2.1", + "@zenstackhq/runtime": "^0.2.1", "daisyui": "^2.31.0", "moment": "^2.29.4", "nanoid": "^4.0.0", @@ -33,7 +33,7 @@ "postcss": "^8.4.16", "tailwindcss": "^3.1.8", "typescript": "^4.6.2", - "zenstack": "^0.1.58" + "zenstack": "^0.2.1" } }, "node_modules/@babel/code-frame": { @@ -721,9 +721,9 @@ } }, "node_modules/@zenstackhq/internal": { - "version": "0.1.58", - "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.1.58.tgz", - "integrity": "sha512-s55IURh2XBq+Es91fMU+jxfiAVl3jE4luZdXUL0JWd+ZujxQDLbNy4X5oZWWrsHUxHa9ydL7pmsnnT3cFG4keQ==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.2.1.tgz", + "integrity": "sha512-YKLU7l/onhKRyT9fIA5al5+xw/aL511BH/6W6JZeMcDZxnxBuLsk0k31IxVmwM8ylnxWXR97i8YiljTwGXQdIg==", "dependencies": { "bcryptjs": "^2.4.3", "deepcopy": "^2.1.0", @@ -738,9 +738,9 @@ } }, "node_modules/@zenstackhq/runtime": { - "version": "0.1.58", - "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.1.58.tgz", - "integrity": "sha512-3fzd5/tuYvuphX1VzceAsczYY73gefc/dv6/xrkuwIjVMNebP90/e7Hi3GfbpEFiyyJ+rXut2VJAiXV/FZgSWw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.2.1.tgz", + "integrity": "sha512-YgccVDaEibRStAlgY2nMSRctz7m46jp5/rH0i8VBujpN+m01vP3nIzpeT2A842zIJs/dk51r9J5i2dV2JtTLKw==", "dependencies": { "@zenstackhq/internal": "latest" }, @@ -4522,12 +4522,12 @@ } }, "node_modules/zenstack": { - "version": "0.1.58", - "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.1.58.tgz", - "integrity": "sha512-wTTUA9Ns5FY29+5rFu1jOlq4p9xpZJmFLBGXJAyERCGu8I+xB63wQ2G50D6bkk2a0T4uGcjrI8Juhs0Pk1cROA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.2.1.tgz", + "integrity": "sha512-yCJ6TnE9ag8nE75oJ2+/WDkRmIyhSW7vF6sDuoDOOlOQwscX6haMhuugCn72lfGdbsAGQALp2b1PctangbQwQg==", "dev": true, "dependencies": { - "@zenstackhq/internal": "0.1.58", + "@zenstackhq/internal": "0.2.1", "change-case": "^4.1.2", "chevrotain": "^9.1.0", "colors": "^1.4.0", @@ -5011,9 +5011,9 @@ } }, "@zenstackhq/internal": { - "version": "0.1.58", - "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.1.58.tgz", - "integrity": "sha512-s55IURh2XBq+Es91fMU+jxfiAVl3jE4luZdXUL0JWd+ZujxQDLbNy4X5oZWWrsHUxHa9ydL7pmsnnT3cFG4keQ==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.2.1.tgz", + "integrity": "sha512-YKLU7l/onhKRyT9fIA5al5+xw/aL511BH/6W6JZeMcDZxnxBuLsk0k31IxVmwM8ylnxWXR97i8YiljTwGXQdIg==", "requires": { "bcryptjs": "^2.4.3", "deepcopy": "^2.1.0", @@ -5022,9 +5022,9 @@ } }, "@zenstackhq/runtime": { - "version": "0.1.58", - "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.1.58.tgz", - "integrity": "sha512-3fzd5/tuYvuphX1VzceAsczYY73gefc/dv6/xrkuwIjVMNebP90/e7Hi3GfbpEFiyyJ+rXut2VJAiXV/FZgSWw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.2.1.tgz", + "integrity": "sha512-YgccVDaEibRStAlgY2nMSRctz7m46jp5/rH0i8VBujpN+m01vP3nIzpeT2A842zIJs/dk51r9J5i2dV2JtTLKw==", "requires": { "@zenstackhq/internal": "latest" } @@ -7762,12 +7762,12 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" }, "zenstack": { - "version": "0.1.58", - "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.1.58.tgz", - "integrity": "sha512-wTTUA9Ns5FY29+5rFu1jOlq4p9xpZJmFLBGXJAyERCGu8I+xB63wQ2G50D6bkk2a0T4uGcjrI8Juhs0Pk1cROA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.2.1.tgz", + "integrity": "sha512-yCJ6TnE9ag8nE75oJ2+/WDkRmIyhSW7vF6sDuoDOOlOQwscX6haMhuugCn72lfGdbsAGQALp2b1PctangbQwQg==", "dev": true, "requires": { - "@zenstackhq/internal": "0.1.58", + "@zenstackhq/internal": "0.2.1", "change-case": "^4.1.2", "chevrotain": "^9.1.0", "colors": "^1.4.0", diff --git a/samples/todo/package.json b/samples/todo/package.json index 7b9ef63a2..e8e105547 100644 --- a/samples/todo/package.json +++ b/samples/todo/package.json @@ -1,6 +1,6 @@ { "name": "todo", - "version": "0.1.0", + "version": "0.2.1", "private": true, "scripts": { "dev": "next dev", @@ -17,7 +17,8 @@ "dependencies": { "@heroicons/react": "^2.0.12", "@prisma/client": "^4.4.0", - "@zenstackhq/runtime": "latest", + "@zenstackhq/internal": "^0.2.1", + "@zenstackhq/runtime": "^0.2.1", "daisyui": "^2.31.0", "moment": "^2.29.4", "nanoid": "^4.0.0", @@ -39,6 +40,6 @@ "postcss": "^8.4.16", "tailwindcss": "^3.1.8", "typescript": "^4.6.2", - "zenstack": "latest" + "zenstack": "^0.2.1" } }