From b931bf498e5b09834497b82dffba49ac2f8f2706 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Fri, 25 Nov 2022 00:04:51 +0800 Subject: [PATCH 1/7] merge packages --- .changeset/README.md | 8 + .changeset/config.json | 11 + docs/_sidebar.md | 6 + docs/cli-commands.md | 22 +- docs/get-started/next-js.md | 2 +- docs/runtime-client.md | 3 + docs/runtime-server.md | 3 + docs/runtime-types.md | 3 + package.json | 8 +- packages/internal/.gitignore | 2 - packages/internal/LICENSE.md | 21 - packages/internal/README.md | 5 - packages/internal/jest.config.ts | 35 - packages/internal/package.json | 58 - packages/{internal => runtime}/.eslintrc.json | 0 packages/runtime/client.d.ts | 1 - packages/runtime/client.js | 3 - packages/runtime/hooks.d.ts | 10 - packages/runtime/hooks.js | 3 - packages/runtime/index.d.ts | 3 - packages/runtime/index.js | 1 - packages/runtime/package-lock.json | 512 ------- packages/runtime/package.json | 38 +- packages/runtime/pre/client/index.d.ts | 4 + packages/runtime/pre/client/index.js | 7 + packages/runtime/{ => pre/server}/auth.d.ts | 0 packages/runtime/{ => pre/server}/auth.js | 0 packages/runtime/pre/server/index.d.ts | 16 + packages/runtime/pre/server/index.js | 7 + .../{types.d.ts => pre/types/index.d.ts} | 0 .../runtime/{types.js => pre/types/index.js} | 0 packages/runtime/server.d.ts | 1 - packages/runtime/server.js | 3 - packages/{internal => runtime}/src/client.ts | 0 packages/{internal => runtime}/src/config.ts | 0 .../{internal => runtime}/src/constants.ts | 0 .../src/handler/data/handler.ts | 0 .../src/handler/data/nested-write-vistor.ts | 0 .../src/handler/data/policy-utils.ts | 0 .../src/handler/index.ts | 0 .../src/handler/types.ts | 0 packages/{internal => runtime}/src/index.ts | 0 .../src/request-handler.ts | 0 packages/{internal => runtime}/src/request.ts | 0 packages/{internal => runtime}/src/service.ts | 4 +- packages/{internal => runtime}/src/types.ts | 11 + .../{internal => runtime}/src/validation.ts | 0 packages/{internal => runtime}/tsconfig.json | 4 +- packages/schema/package.json | 2 +- packages/schema/src/cli/cli-util.ts | 63 +- packages/schema/src/cli/index.ts | 8 + packages/schema/src/generator/constants.ts | 2 +- .../generator/prisma/query-guard-generator.ts | 6 +- .../schema/src/generator/react-hooks/index.ts | 6 +- .../schema/src/generator/service/index.ts | 4 +- packages/schema/src/utils/pkg-utils.ts | 63 + pnpm-lock.yaml | 1239 +++++++++++++++-- samples/todo/components/BreadCrumb.tsx | 2 +- samples/todo/components/ManageMembers.tsx | 4 +- samples/todo/components/SpaceMembers.tsx | 2 +- samples/todo/components/Spaces.tsx | 2 +- samples/todo/components/Todo.tsx | 2 +- samples/todo/components/TodoList.tsx | 2 +- samples/todo/lib/context.ts | 2 +- samples/todo/pages/api/auth/[...nextauth].ts | 4 +- samples/todo/pages/api/zenstack/[...path].ts | 2 +- samples/todo/pages/create-space.tsx | 13 +- .../pages/space/[slug]/[listId]/index.tsx | 2 +- samples/todo/pages/space/[slug]/index.tsx | 8 +- .../tests/field-validation-client.test.ts | 2 +- 70 files changed, 1431 insertions(+), 824 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 docs/runtime-client.md create mode 100644 docs/runtime-server.md create mode 100644 docs/runtime-types.md delete mode 100644 packages/internal/.gitignore delete mode 100644 packages/internal/LICENSE.md delete mode 100644 packages/internal/README.md delete mode 100644 packages/internal/jest.config.ts delete mode 100644 packages/internal/package.json rename packages/{internal => runtime}/.eslintrc.json (100%) delete mode 100644 packages/runtime/client.d.ts delete mode 100644 packages/runtime/client.js delete mode 100644 packages/runtime/hooks.d.ts delete mode 100644 packages/runtime/hooks.js delete mode 100644 packages/runtime/index.d.ts delete mode 100644 packages/runtime/index.js delete mode 100644 packages/runtime/package-lock.json create mode 100644 packages/runtime/pre/client/index.d.ts create mode 100644 packages/runtime/pre/client/index.js rename packages/runtime/{ => pre/server}/auth.d.ts (100%) rename packages/runtime/{ => pre/server}/auth.js (100%) create mode 100644 packages/runtime/pre/server/index.d.ts create mode 100644 packages/runtime/pre/server/index.js rename packages/runtime/{types.d.ts => pre/types/index.d.ts} (100%) rename packages/runtime/{types.js => pre/types/index.js} (100%) delete mode 100644 packages/runtime/server.d.ts delete mode 100644 packages/runtime/server.js rename packages/{internal => runtime}/src/client.ts (100%) rename packages/{internal => runtime}/src/config.ts (100%) rename packages/{internal => runtime}/src/constants.ts (100%) rename packages/{internal => runtime}/src/handler/data/handler.ts (100%) rename packages/{internal => runtime}/src/handler/data/nested-write-vistor.ts (100%) rename packages/{internal => runtime}/src/handler/data/policy-utils.ts (100%) rename packages/{internal => runtime}/src/handler/index.ts (100%) rename packages/{internal => runtime}/src/handler/types.ts (100%) rename packages/{internal => runtime}/src/index.ts (100%) rename packages/{internal => runtime}/src/request-handler.ts (100%) rename packages/{internal => runtime}/src/request.ts (100%) rename packages/{internal => runtime}/src/service.ts (100%) rename packages/{internal => runtime}/src/types.ts (97%) rename packages/{internal => runtime}/src/validation.ts (100%) rename packages/{internal => runtime}/tsconfig.json (88%) create mode 100644 packages/schema/src/utils/pkg-utils.ts diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 000000000..e5b6d8d6a --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 000000000..7fcf97338 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 309c6738e..c46bfe260 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -22,6 +22,12 @@ - [Commands](cli-commands.md) +- Runtime API + + - [`@zenstackhq/runtime/types`](runtime-types.md) + - [`@zenstackhq/runtime/client`](runtime-client.md) + - [`@zenstackhq/runtime/server`](runtime-server.md) + - Guide - [Choosing a database](choosing-a-database.md) diff --git a/docs/cli-commands.md b/docs/cli-commands.md index 43b807070..2730da14e 100644 --- a/docs/cli-commands.md +++ b/docs/cli-commands.md @@ -1,6 +1,6 @@ -## CLI commands +# CLI commands -### `init` +## `init` Set up ZenStack for an existing Next.js + Typescript project. @@ -8,7 +8,7 @@ Set up ZenStack for an existing Next.js + Typescript project. npx zenstack init [dir] ``` -### `generate` +## `generate` Generates RESTful CRUD API and React hooks from your model. @@ -22,13 +22,13 @@ _Options_: --schema schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel") ``` -### `migrate` +## `migrate` Update the database schema with migrations. **Sub-commands**: -#### `migrate dev` +### `migrate dev` Create a migration from changes in Prisma schema, apply it to the database, trigger generation of database client. This command wraps `prisma migrate` command. @@ -42,7 +42,7 @@ _Options_: --schema schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel") ``` -#### `migrate reset` +### `migrate reset` Reset your database and apply all migrations. @@ -56,7 +56,7 @@ _Options_: --schema schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel") ``` -#### `migrate deploy` +### `migrate deploy` Apply pending migrations to the database in production/staging. @@ -70,7 +70,7 @@ _Options_: --schema schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel") ``` -#### `migrate status` +### `migrate status` Check the status of migrations in the production/staging database. @@ -84,13 +84,13 @@ _Options_: --schema schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel") ``` -### `db` +## `db` Manage your database schema and lifecycle during development. This command wraps `prisma db` command. **Sub-commands**: -#### `db push` +### `db push` Push the state from model to the database during prototyping. @@ -105,7 +105,7 @@ _Options_: --accept-data-loss Ignore data loss warnings ``` -### `studio` +## `studio` Browse your data with Prisma Studio. This command wraps `prisma studio` command. diff --git a/docs/get-started/next-js.md b/docs/get-started/next-js.md index 9057c12c0..a67201fb8 100644 --- a/docs/get-started/next-js.md +++ b/docs/get-started/next-js.md @@ -48,7 +48,7 @@ Checkout [the starter's documentation](https://github.com/zenstackhq/nextjs-auth ```bash npm i -D zenstack -npm i @zenstackhq/runtime @zenstackhq/internal +npm i @zenstackhq/runtime ``` 2. Install [VSCode extension](https://marketplace.visualstudio.com/items?itemName=zenstack.zenstack) for authoring the model file diff --git a/docs/runtime-client.md b/docs/runtime-client.md new file mode 100644 index 000000000..06ccedc58 --- /dev/null +++ b/docs/runtime-client.md @@ -0,0 +1,3 @@ +# @zenstackhq/runtime/client + +TBD diff --git a/docs/runtime-server.md b/docs/runtime-server.md new file mode 100644 index 000000000..8b7c64de3 --- /dev/null +++ b/docs/runtime-server.md @@ -0,0 +1,3 @@ +# @zenstackhq/runtime/server + +TBD diff --git a/docs/runtime-types.md b/docs/runtime-types.md new file mode 100644 index 000000000..3460a4497 --- /dev/null +++ b/docs/runtime-types.md @@ -0,0 +1,3 @@ +# @zenstackhq/runtime/types + +TBD diff --git a/package.json b/package.json index f69de5a34..c1ba8664c 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,13 @@ "build": "pnpm -r build", "test": "pnpm -r run test --silent", "lint": "pnpm -r lint", - "publish-all": "pnpm --filter \"./packages/**\" -r publish" + "publish-all": "pnpm --filter \"./packages/**\" -r publish", + "publish-dev": "pnpm --filter \"./packages/**\" -r publish --tag dev" }, "keywords": [], "author": "", - "license": "MIT" + "license": "MIT", + "devDependencies": { + "@changesets/cli": "^2.25.2" + } } diff --git a/packages/internal/.gitignore b/packages/internal/.gitignore deleted file mode 100644 index 0d39dd036..000000000 --- a/packages/internal/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/lib -/tests/coverage/ diff --git a/packages/internal/LICENSE.md b/packages/internal/LICENSE.md deleted file mode 100644 index 91d4584d3..000000000 --- a/packages/internal/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 0ae3952f3..000000000 --- a/packages/internal/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# 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/jest.config.ts b/packages/internal/jest.config.ts deleted file mode 100644 index a04ad4290..000000000 --- a/packages/internal/jest.config.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * For a detailed explanation regarding each configuration property and type check, visit: - * https://jestjs.io/docs/configuration - */ - -import tsconfig from './tsconfig.json'; -const moduleNameMapper = require('tsconfig-paths-jest')(tsconfig); - -export default { - // Automatically clear mock calls, instances, contexts and results before every test - clearMocks: true, - - // Automatically reset mock state before every test - resetMocks: true, - - // Indicates whether the coverage information should be collected while executing the test - collectCoverage: true, - - // The directory where Jest should output its coverage files - coverageDirectory: 'tests/coverage', - - // An array of regexp pattern strings used to skip coverage collection - coveragePathIgnorePatterns: ['/node_modules/', '/tests/'], - - // Indicates which provider should be used to instrument code for coverage - coverageProvider: 'v8', - - // A list of reporter names that Jest uses when writing coverage reports - coverageReporters: ['json', 'text', 'lcov', 'clover'], - - // A map from regular expressions to paths to transformers - transform: { '^.+\\.tsx?$': 'ts-jest' }, - - moduleNameMapper, -}; diff --git a/packages/internal/package.json b/packages/internal/package.json deleted file mode 100644 index f0c40e8c4..000000000 --- a/packages/internal/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@zenstackhq/internal", - "version": "0.3.10", - "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": { - "type": "git", - "url": "https://github.com/zenstackhq/zenstack" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "clean": "rimraf lib", - "build": "npm run clean && tsc", - "watch": "tsc --watch", - "lint": "eslint src --ext ts", - "prepublishOnly": "pnpm build" - }, - "keywords": [], - "author": { - "name": "ZenStack Team" - }, - "license": "MIT", - "files": [ - "lib/**/*" - ], - "dependencies": { - "bcryptjs": "^2.4.3", - "colors": "1.4.0", - "cuid": "^2.1.8", - "decimal.js": "^10.4.2", - "deepcopy": "^2.1.0", - "swr": "^1.3.0", - "zod": "^3.19.1", - "zod-validation-error": "^0.2.1" - }, - "peerDependencies": { - "@prisma/client": "^4.4.0", - "next": "^12.3.1", - "react": "^17.0.2 || ^18", - "react-dom": "^17.0.2 || ^18" - }, - "devDependencies": { - "@prisma/client": "^4.4.0", - "@types/bcryptjs": "^2.4.2", - "@types/jest": "^29.0.3", - "@types/node": "^14.18.29", - "@types/uuid": "^8.3.4", - "eslint": "^8.27.0", - "jest": "^29.0.3", - "rimraf": "^3.0.2", - "ts-jest": "^29.0.1", - "ts-node": "^10.9.1", - "tsc-alias": "^1.7.0", - "tsconfig-paths-jest": "^0.0.1", - "typescript": "^4.6.2" - } -} diff --git a/packages/internal/.eslintrc.json b/packages/runtime/.eslintrc.json similarity index 100% rename from packages/internal/.eslintrc.json rename to packages/runtime/.eslintrc.json diff --git a/packages/runtime/client.d.ts b/packages/runtime/client.d.ts deleted file mode 100644 index bc64b93d9..000000000 --- a/packages/runtime/client.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@zenstackhq/internal/lib/client'; diff --git a/packages/runtime/client.js b/packages/runtime/client.js deleted file mode 100644 index d1b7cfc36..000000000 --- a/packages/runtime/client.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - ...require('@zenstackhq/internal/lib/client'), -}; diff --git a/packages/runtime/hooks.d.ts b/packages/runtime/hooks.d.ts deleted file mode 100644 index 15c8dfbe7..000000000 --- a/packages/runtime/hooks.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ServerErrorCode } from './client'; - -export * from '.zenstack/lib/hooks'; -export type HooksError = { - status: number; - info: { - code: ServerErrorCode; - message: string; - }; -}; diff --git a/packages/runtime/hooks.js b/packages/runtime/hooks.js deleted file mode 100644 index ad58e14f8..000000000 --- a/packages/runtime/hooks.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - ...require('.zenstack/lib/hooks'), -}; diff --git a/packages/runtime/index.d.ts b/packages/runtime/index.d.ts deleted file mode 100644 index 4353bf5db..000000000 --- a/packages/runtime/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from '.zenstack/lib'; -import service from '.zenstack/lib'; -export default service; diff --git a/packages/runtime/index.js b/packages/runtime/index.js deleted file mode 100644 index d2848e8ac..000000000 --- a/packages/runtime/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('.zenstack/lib').default; diff --git a/packages/runtime/package-lock.json b/packages/runtime/package-lock.json deleted file mode 100644 index 71dc43805..000000000 --- a/packages/runtime/package-lock.json +++ /dev/null @@ -1,512 +0,0 @@ -{ - "name": "@zenstackhq/runtime", - "version": "0.1.19", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@zenstackhq/runtime", - "version": "0.1.19", - "license": "MIT", - "dependencies": { - "@zenstackhq/internal": "latest" - }, - "peerDependencies": { - "@types/bcryptjs": "^2.4.2", - "bcryptjs": "^2.4.3" - } - }, - "node_modules/@next/env": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.1.tgz", - "integrity": "sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==", - "peer": true - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz", - "integrity": "sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@swc/helpers": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", - "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", - "peer": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@types/bcryptjs": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.2.tgz", - "integrity": "sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==", - "peer": true - }, - "node_modules/@zenstackhq/internal": { - "version": "0.1.21", - "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.1.21.tgz", - "integrity": "sha512-N+7450WUFSOTS1ZU5ySJ/U+4CMZ8thg5ZFzy1FAMIFT67k08/7D4Cw1sbA1yqaH6v5Ynirj36VWf9LFmi90qQw==", - "dependencies": { - "bcryptjs": "^2.4.3", - "deepcopy": "^2.1.0", - "swr": "^1.3.0", - "uuid": "^9.0.0" - }, - "peerDependencies": { - "next": "12.3.1", - "react": "^17.0.2 || ^18", - "react-dom": "^17.0.2 || ^18" - } - }, - "node_modules/bcryptjs": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001418", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz", - "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "peer": true - }, - "node_modules/deepcopy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/deepcopy/-/deepcopy-2.1.0.tgz", - "integrity": "sha512-8cZeTb1ZKC3bdSCP6XOM1IsTczIO73fdqtwa2B0N15eAz7gmyhQo+mc5gnFuulsgN3vIQYmTgbmQVKalH1dKvQ==", - "dependencies": { - "type-detect": "^4.0.8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "peer": true - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "peer": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/next": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz", - "integrity": "sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==", - "peer": true, - "dependencies": { - "@next/env": "12.3.1", - "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.0.7", - "use-sync-external-store": "1.2.0" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=12.22.0" - }, - "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.1", - "@next/swc-android-arm64": "12.3.1", - "@next/swc-darwin-arm64": "12.3.1", - "@next/swc-darwin-x64": "12.3.1", - "@next/swc-freebsd-x64": "12.3.1", - "@next/swc-linux-arm-gnueabihf": "12.3.1", - "@next/swc-linux-arm64-gnu": "12.3.1", - "@next/swc-linux-arm64-musl": "12.3.1", - "@next/swc-linux-x64-gnu": "12.3.1", - "@next/swc-linux-x64-musl": "12.3.1", - "@next/swc-win32-arm64-msvc": "12.3.1", - "@next/swc-win32-ia32-msvc": "12.3.1", - "@next/swc-win32-x64-msvc": "12.3.1" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^6.0.0 || ^7.0.0", - "react": "^17.0.2 || ^18.0.0-0", - "react-dom": "^17.0.2 || ^18.0.0-0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "peer": true - }, - "node_modules/postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "peer": true, - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" - }, - "peerDependencies": { - "react": "^18.2.0" - } - }, - "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/styled-jsx": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/swr": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz", - "integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==", - "peerDependencies": { - "react": "^16.11.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "peer": true - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "peer": true, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "bin": { - "uuid": "dist/bin/uuid" - } - } - }, - "dependencies": { - "@next/env": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.1.tgz", - "integrity": "sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==", - "peer": true - }, - "@next/swc-darwin-arm64": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz", - "integrity": "sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==", - "optional": true, - "peer": true - }, - "@swc/helpers": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", - "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", - "peer": true, - "requires": { - "tslib": "^2.4.0" - } - }, - "@types/bcryptjs": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.2.tgz", - "integrity": "sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==", - "peer": true - }, - "@zenstackhq/internal": { - "version": "0.1.21", - "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.1.21.tgz", - "integrity": "sha512-N+7450WUFSOTS1ZU5ySJ/U+4CMZ8thg5ZFzy1FAMIFT67k08/7D4Cw1sbA1yqaH6v5Ynirj36VWf9LFmi90qQw==", - "requires": { - "bcryptjs": "^2.4.3", - "deepcopy": "^2.1.0", - "swr": "^1.3.0", - "uuid": "^9.0.0" - } - }, - "bcryptjs": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" - }, - "caniuse-lite": { - "version": "1.0.30001418", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz", - "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==", - "peer": true - }, - "deepcopy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/deepcopy/-/deepcopy-2.1.0.tgz", - "integrity": "sha512-8cZeTb1ZKC3bdSCP6XOM1IsTczIO73fdqtwa2B0N15eAz7gmyhQo+mc5gnFuulsgN3vIQYmTgbmQVKalH1dKvQ==", - "requires": { - "type-detect": "^4.0.8" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "peer": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "peer": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "peer": true - }, - "next": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz", - "integrity": "sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==", - "peer": true, - "requires": { - "@next/env": "12.3.1", - "@next/swc-android-arm-eabi": "12.3.1", - "@next/swc-android-arm64": "12.3.1", - "@next/swc-darwin-arm64": "12.3.1", - "@next/swc-darwin-x64": "12.3.1", - "@next/swc-freebsd-x64": "12.3.1", - "@next/swc-linux-arm-gnueabihf": "12.3.1", - "@next/swc-linux-arm64-gnu": "12.3.1", - "@next/swc-linux-arm64-musl": "12.3.1", - "@next/swc-linux-x64-gnu": "12.3.1", - "@next/swc-linux-x64-musl": "12.3.1", - "@next/swc-win32-arm64-msvc": "12.3.1", - "@next/swc-win32-ia32-msvc": "12.3.1", - "@next/swc-win32-x64-msvc": "12.3.1", - "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.0.7", - "use-sync-external-store": "1.2.0" - } - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "peer": true - }, - "postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", - "peer": true, - "requires": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - } - }, - "react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "peer": true, - "requires": { - "loose-envify": "^1.1.0" - } - }, - "react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "peer": true, - "requires": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" - } - }, - "scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "peer": true, - "requires": { - "loose-envify": "^1.1.0" - } - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "peer": true - }, - "styled-jsx": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", - "peer": true, - "requires": {} - }, - "swr": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz", - "integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==", - "requires": {} - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "peer": true - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" - }, - "use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "peer": true, - "requires": {} - }, - "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" - } - } -} diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 866d92df9..0aa1f2479 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -2,22 +2,48 @@ "name": "@zenstackhq/runtime", "displayName": "ZenStack Runtime Library", "version": "0.3.10", - "description": "This package contains runtime library for consuming client and server side code generated by ZenStack.", + "description": "Runtime of ZenStack for both client-side and server-side environments.", "repository": { "type": "git", "url": "https://github.com/zenstackhq/zenstack" }, - "main": "index.js", - "types": "index.d.ts", + "scripts": { + "clean": "rimraf dist", + "build": "npm run clean && tsc && cp -r pre/* dist/ && cp ./package.json dist/", + "watch": "tsc --watch", + "lint": "eslint src --ext ts", + "prepublishOnly": "pnpm build", + "publish-dev": "pnpm publish --tag dev" + }, + "publishConfig": { + "directory": "dist" + }, "dependencies": { - "@zenstackhq/internal": "latest" + "colors": "1.4.0", + "cuid": "^2.1.8", + "decimal.js": "^10.4.2", + "deepcopy": "^2.1.0", + "swr": "^1.3.0", + "tslib": "^2.4.1", + "zod": "^3.19.1", + "zod-validation-error": "^0.2.1" }, "peerDependencies": { "@types/bcryptjs": "^2.4.2", - "bcryptjs": "^2.4.3" + "bcryptjs": "^2.4.3", + "next": "^12.3.1", + "react": "^17.0.2 || ^18", + "react-dom": "^17.0.2 || ^18" }, "author": { "name": "ZenStack Team" }, - "license": "MIT" + "license": "MIT", + "devDependencies": { + "@types/bcryptjs": "^2.4.2", + "@types/jest": "^29.0.3", + "@types/node": "^14.18.29", + "rimraf": "^3.0.2", + "typescript": "^4.9.3" + } } diff --git a/packages/runtime/pre/client/index.d.ts b/packages/runtime/pre/client/index.d.ts new file mode 100644 index 000000000..14f8c9dbc --- /dev/null +++ b/packages/runtime/pre/client/index.d.ts @@ -0,0 +1,4 @@ +export * from '.zenstack/lib/hooks'; +export { HooksError, ServerErrorCode, RequestOptions } from '../lib/types'; +export * as request from '../lib/request'; +export * from '../lib/validation'; diff --git a/packages/runtime/pre/client/index.js b/packages/runtime/pre/client/index.js new file mode 100644 index 000000000..b8504abfe --- /dev/null +++ b/packages/runtime/pre/client/index.js @@ -0,0 +1,7 @@ +const request = require('../lib/request'); + +module.exports = { + ...require('.zenstack/lib/hooks'), + ...require('../lib/validation'), + request, +}; diff --git a/packages/runtime/auth.d.ts b/packages/runtime/pre/server/auth.d.ts similarity index 100% rename from packages/runtime/auth.d.ts rename to packages/runtime/pre/server/auth.d.ts diff --git a/packages/runtime/auth.js b/packages/runtime/pre/server/auth.js similarity index 100% rename from packages/runtime/auth.js rename to packages/runtime/pre/server/auth.js diff --git a/packages/runtime/pre/server/index.d.ts b/packages/runtime/pre/server/index.d.ts new file mode 100644 index 000000000..13bc9471d --- /dev/null +++ b/packages/runtime/pre/server/index.d.ts @@ -0,0 +1,16 @@ +import service from '.zenstack/lib'; + +export type { + FieldInfo, + PolicyKind, + PolicyOperationKind, + RuntimeAttribute, + QueryContext, +} from '../lib/types'; + +export { + requestHandler, + type RequestHandlerOptions, +} from '../lib/request-handler'; + +export default service; diff --git a/packages/runtime/pre/server/index.js b/packages/runtime/pre/server/index.js new file mode 100644 index 000000000..93b5e3896 --- /dev/null +++ b/packages/runtime/pre/server/index.js @@ -0,0 +1,7 @@ +Object.defineProperty(exports, '__esModule', { value: true }); + +exports.default = require('.zenstack/lib').default; + +const exportStar = require('tslib').__exportStar; +exportStar(require('../lib/types'), exports); +exportStar(require('../lib/request-handler'), exports); diff --git a/packages/runtime/types.d.ts b/packages/runtime/pre/types/index.d.ts similarity index 100% rename from packages/runtime/types.d.ts rename to packages/runtime/pre/types/index.d.ts diff --git a/packages/runtime/types.js b/packages/runtime/pre/types/index.js similarity index 100% rename from packages/runtime/types.js rename to packages/runtime/pre/types/index.js diff --git a/packages/runtime/server.d.ts b/packages/runtime/server.d.ts deleted file mode 100644 index 78e8b9bb2..000000000 --- a/packages/runtime/server.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@zenstackhq/internal'; diff --git a/packages/runtime/server.js b/packages/runtime/server.js deleted file mode 100644 index 427500501..000000000 --- a/packages/runtime/server.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - ...require('@zenstackhq/internal'), -}; diff --git a/packages/internal/src/client.ts b/packages/runtime/src/client.ts similarity index 100% rename from packages/internal/src/client.ts rename to packages/runtime/src/client.ts diff --git a/packages/internal/src/config.ts b/packages/runtime/src/config.ts similarity index 100% rename from packages/internal/src/config.ts rename to packages/runtime/src/config.ts diff --git a/packages/internal/src/constants.ts b/packages/runtime/src/constants.ts similarity index 100% rename from packages/internal/src/constants.ts rename to packages/runtime/src/constants.ts diff --git a/packages/internal/src/handler/data/handler.ts b/packages/runtime/src/handler/data/handler.ts similarity index 100% rename from packages/internal/src/handler/data/handler.ts rename to packages/runtime/src/handler/data/handler.ts diff --git a/packages/internal/src/handler/data/nested-write-vistor.ts b/packages/runtime/src/handler/data/nested-write-vistor.ts similarity index 100% rename from packages/internal/src/handler/data/nested-write-vistor.ts rename to packages/runtime/src/handler/data/nested-write-vistor.ts diff --git a/packages/internal/src/handler/data/policy-utils.ts b/packages/runtime/src/handler/data/policy-utils.ts similarity index 100% rename from packages/internal/src/handler/data/policy-utils.ts rename to packages/runtime/src/handler/data/policy-utils.ts diff --git a/packages/internal/src/handler/index.ts b/packages/runtime/src/handler/index.ts similarity index 100% rename from packages/internal/src/handler/index.ts rename to packages/runtime/src/handler/index.ts diff --git a/packages/internal/src/handler/types.ts b/packages/runtime/src/handler/types.ts similarity index 100% rename from packages/internal/src/handler/types.ts rename to packages/runtime/src/handler/types.ts diff --git a/packages/internal/src/index.ts b/packages/runtime/src/index.ts similarity index 100% rename from packages/internal/src/index.ts rename to packages/runtime/src/index.ts diff --git a/packages/internal/src/request-handler.ts b/packages/runtime/src/request-handler.ts similarity index 100% rename from packages/internal/src/request-handler.ts rename to packages/runtime/src/request-handler.ts diff --git a/packages/internal/src/request.ts b/packages/runtime/src/request.ts similarity index 100% rename from packages/internal/src/request.ts rename to packages/runtime/src/request.ts diff --git a/packages/internal/src/service.ts b/packages/runtime/src/service.ts similarity index 100% rename from packages/internal/src/service.ts rename to packages/runtime/src/service.ts index 73f5c1fbb..c72871fc4 100644 --- a/packages/internal/src/service.ts +++ b/packages/runtime/src/service.ts @@ -1,5 +1,7 @@ +import colors from 'colors'; import * as fs from 'fs'; import { EventEmitter } from 'stream'; +import { z } from 'zod'; import { ServiceConfig } from './config'; import { FieldInfo, @@ -9,9 +11,7 @@ import { QueryContext, Service, } from './types'; -import colors from 'colors'; import { validate } from './validation'; -import { z } from 'zod'; export abstract class DefaultService< DbClient extends { diff --git a/packages/internal/src/types.ts b/packages/runtime/src/types.ts similarity index 97% rename from packages/internal/src/types.ts rename to packages/runtime/src/types.ts index 14a7cff07..e3e7ec6e0 100644 --- a/packages/internal/src/types.ts +++ b/packages/runtime/src/types.ts @@ -221,3 +221,14 @@ export type RequestOptions = { // disable data fetching disabled: boolean; }; + +/** + * Hooks invocation error + */ +export type HooksError = { + status: number; + info: { + code: ServerErrorCode; + message: string; + }; +}; diff --git a/packages/internal/src/validation.ts b/packages/runtime/src/validation.ts similarity index 100% rename from packages/internal/src/validation.ts rename to packages/runtime/src/validation.ts diff --git a/packages/internal/tsconfig.json b/packages/runtime/tsconfig.json similarity index 88% rename from packages/internal/tsconfig.json rename to packages/runtime/tsconfig.json index 5f19b5c6d..a8215c9f4 100644 --- a/packages/internal/tsconfig.json +++ b/packages/runtime/tsconfig.json @@ -4,7 +4,7 @@ "module": "CommonJS", "lib": ["ESNext", "DOM"], "sourceMap": true, - "outDir": "lib", + "outDir": "dist/lib", "strict": true, "noUnusedLocals": true, "noImplicitReturns": true, @@ -18,5 +18,5 @@ "paths": {} }, "include": ["src/**/*.ts"], - "exclude": ["lib", "node_modules"] + "exclude": ["dist", "node_modules"] } diff --git a/packages/schema/package.json b/packages/schema/package.json index 1470294b3..fa33229c7 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -82,7 +82,7 @@ "prepublishOnly": "cp ../../README.md ./ && pnpm build" }, "dependencies": { - "@zenstackhq/internal": "workspace:*", + "@zenstackhq/runtime": "workspace:../runtime/dist", "async-exit-hook": "^2.0.1", "change-case": "^4.1.2", "chevrotain": "^9.1.0", diff --git a/packages/schema/src/cli/cli-util.ts b/packages/schema/src/cli/cli-util.ts index 177d8df6f..2f80d5c1c 100644 --- a/packages/schema/src/cli/cli-util.ts +++ b/packages/schema/src/cli/cli-util.ts @@ -6,8 +6,9 @@ import fs from 'fs'; import { LangiumServices } from 'langium'; import { NodeFileSystem } from 'langium/node'; import path from 'path'; -import { ZenStackGenerator } from '../generator'; +import { installPackage } from 'src/utils/pkg-utils'; import { URI } from 'vscode-uri'; +import { ZenStackGenerator } from '../generator'; import { GENERATED_CODE_PATH } from '../generator/constants'; import { Context, GeneratorError } from '../generator/types'; import { CliError } from './cli-error'; @@ -17,19 +18,19 @@ import { CliError } from './cli-error'; */ export async function initProject(projectPath: string) { const schema = path.join(projectPath, 'zenstack', 'schema.zmodel'); + let schemaGenerated = false; + if (fs.existsSync(schema)) { console.warn(colors.yellow(`Model already exists: ${schema}`)); - throw new CliError(`schema file already exists`); - } - - // create a default model - if (!fs.existsSync(path.join(projectPath, 'zenstack'))) { - fs.mkdirSync(path.join(projectPath, 'zenstack')); - } + } else { + // create a default model + if (!fs.existsSync(path.join(projectPath, 'zenstack'))) { + fs.mkdirSync(path.join(projectPath, 'zenstack')); + } - fs.writeFileSync( - schema, - `// This is a sample model to get you started. + fs.writeFileSync( + schema, + `// This is a sample model to get you started. // Learn how to model you app: https://zenstack.dev/#/modeling-your-app. /* @@ -77,26 +78,34 @@ model Post { @@allow('all', author == auth()) } ` - ); + ); - // add zenstack/schema.prisma to .gitignore - const gitIgnorePath = path.join(projectPath, '.gitignore'); - let gitIgnoreContent = ''; - if (fs.existsSync(gitIgnorePath)) { - gitIgnoreContent = - fs.readFileSync(gitIgnorePath, { encoding: 'utf-8' }) + '\n'; - } + // add zenstack/schema.prisma to .gitignore + const gitIgnorePath = path.join(projectPath, '.gitignore'); + let gitIgnoreContent = ''; + if (fs.existsSync(gitIgnorePath)) { + gitIgnoreContent = + fs.readFileSync(gitIgnorePath, { encoding: 'utf-8' }) + '\n'; + } - if (!gitIgnoreContent.includes('zenstack/schema.prisma')) { - gitIgnoreContent += 'zenstack/schema.prisma\n'; - fs.writeFileSync(gitIgnorePath, gitIgnoreContent); + if (!gitIgnoreContent.includes('zenstack/schema.prisma')) { + gitIgnoreContent += 'zenstack/schema.prisma\n'; + fs.writeFileSync(gitIgnorePath, gitIgnoreContent); + } + + schemaGenerated = true; } - console.log(`Sample model generated at: ${colors.green(schema)} + installPackage('zenstack', true, undefined, projectPath); + installPackage('@zenstackhq/runtime', false, undefined, projectPath); + + if (schemaGenerated) { + console.log(`Sample model generated at: ${colors.green(schema)} -Please check the following guide on how to model your app: - https://zenstack.dev/#/modeling-your-app. -`); + Please check the following guide on how to model your app: + https://zenstack.dev/#/modeling-your-app. + `); + } } /** @@ -164,7 +173,7 @@ export async function loadDocument( } export async function runGenerator( - options: { schema: string }, + options: { schema: string; packageManager: string }, includedGenerators?: string[], clearOutput = true ) { diff --git a/packages/schema/src/cli/index.ts b/packages/schema/src/cli/index.ts index a4dadc24f..37c2d1c69 100644 --- a/packages/schema/src/cli/index.ts +++ b/packages/schema/src/cli/index.ts @@ -21,6 +21,7 @@ export const initAction = async (projectPath: string): Promise => { export const generateAction = async (options: { schema: string; + packageManager: string; }): Promise => { await telemetry.trackSpan( 'cli:command:start', @@ -116,11 +117,17 @@ export default async function (): Promise { `schema file (with extension ${schemaExtensions})` ).default('./zenstack/schema.zmodel'); + const pmOption = new Option( + '--package-manager, -p', + 'package manager to use: "npm", "yarn" or "pnpm"' + ).default('auto detect'); + //#region wraps Prisma commands program .command('init') .description('Set up a new ZenStack project.') + .addOption(pmOption) .argument('', 'project path') .action(initAction); @@ -130,6 +137,7 @@ export default async function (): Promise { 'Generates RESTful API and Typescript client for your data model.' ) .addOption(schemaOption) + .addOption(pmOption) .action(generateAction); const migrate = program diff --git a/packages/schema/src/generator/constants.ts b/packages/schema/src/generator/constants.ts index d3ad7fff5..165ed1898 100644 --- a/packages/schema/src/generator/constants.ts +++ b/packages/schema/src/generator/constants.ts @@ -1,4 +1,4 @@ -export const INTERNAL_PACKAGE = '@zenstackhq/internal'; +export const RUNTIME_PACKAGE = '@zenstackhq/runtime'; export const GUARD_FIELD_NAME = 'zenstack_guard'; export const TRANSACTION_FIELD_NAME = 'zenstack_transaction'; export const API_ROUTE_NAME = 'zenstack'; diff --git a/packages/schema/src/generator/prisma/query-guard-generator.ts b/packages/schema/src/generator/prisma/query-guard-generator.ts index 8df9e8d60..f71f8360d 100644 --- a/packages/schema/src/generator/prisma/query-guard-generator.ts +++ b/packages/schema/src/generator/prisma/query-guard-generator.ts @@ -10,12 +10,12 @@ import { PolicyKind, PolicyOperationKind, RuntimeAttribute, -} from '@zenstackhq/internal'; +} from '@zenstackhq/runtime/server'; import path from 'path'; import { Project, SourceFile, VariableDeclarationKind } from 'ts-morph'; import { GUARD_FIELD_NAME, - INTERNAL_PACKAGE, + RUNTIME_PACKAGE, UNKNOWN_USER_ID, } from '../constants'; import { Context } from '../types'; @@ -38,7 +38,7 @@ export default class QueryGuardGenerator { sf.addImportDeclaration({ namedImports: [{ name: 'QueryContext' }], - moduleSpecifier: INTERNAL_PACKAGE, + moduleSpecifier: `${RUNTIME_PACKAGE}/server`, isTypeOnly: true, }); diff --git a/packages/schema/src/generator/react-hooks/index.ts b/packages/schema/src/generator/react-hooks/index.ts index e402480ed..64bc2317a 100644 --- a/packages/schema/src/generator/react-hooks/index.ts +++ b/packages/schema/src/generator/react-hooks/index.ts @@ -5,7 +5,7 @@ import { paramCase } from 'change-case'; import { DataModel } from '@lang/generated/ast'; import colors from 'colors'; import { extractDataModelsWithAllowRules } from '../ast-utils'; -import { API_ROUTE_NAME } from '../constants'; +import { API_ROUTE_NAME, RUNTIME_PACKAGE } from '../constants'; /** * Generate react data query hooks code @@ -51,7 +51,9 @@ export default class ReactHooksGenerator implements Generator { moduleSpecifier: '../../.prisma', }); sf.addStatements([ - `import { request, validate, ServerErrorCode, RequestOptions } from '@zenstackhq/runtime/client';`, + `import * as request from '${RUNTIME_PACKAGE}/lib/request';`, + `import { ServerErrorCode, RequestOptions } from '${RUNTIME_PACKAGE}/lib/types';`, + `import { validate } from '${RUNTIME_PACKAGE}/lib/validation';`, `import { type SWRResponse } from 'swr';`, `import { ${this.getValidator( model, diff --git a/packages/schema/src/generator/service/index.ts b/packages/schema/src/generator/service/index.ts index 2646064cf..8ba3f685a 100644 --- a/packages/schema/src/generator/service/index.ts +++ b/packages/schema/src/generator/service/index.ts @@ -2,7 +2,7 @@ import { Context, Generator } from '../types'; import { Project } from 'ts-morph'; import * as path from 'path'; import colors from 'colors'; -import { INTERNAL_PACKAGE } from '../constants'; +import { RUNTIME_PACKAGE } from '../constants'; /** * Generates ZenStack service code @@ -22,7 +22,7 @@ export default class ServiceGenerator implements Generator { sf.addStatements([ `import { PrismaClient } from "../.prisma";`, - `import { DefaultService } from "${INTERNAL_PACKAGE}";`, + `import { DefaultService } from "${RUNTIME_PACKAGE}/lib/service";`, ]); const cls = sf.addClass({ diff --git a/packages/schema/src/utils/pkg-utils.ts b/packages/schema/src/utils/pkg-utils.ts new file mode 100644 index 000000000..dc65f0009 --- /dev/null +++ b/packages/schema/src/utils/pkg-utils.ts @@ -0,0 +1,63 @@ +import fs from 'fs'; +import path from 'path'; +import { execSync } from './exec-utils'; + +type PackageManagers = 'npm' | 'yarn' | 'pnpm'; + +function getPackageManager(projectPath = '.'): PackageManagers { + if (fs.existsSync(path.join(projectPath, 'yarn.lock'))) { + return 'yarn'; + } else if (fs.existsSync(path.join(projectPath, 'pnpm-lock.yaml'))) { + return 'pnpm'; + } else { + return 'npm'; + } +} + +export function installPackage( + pkg: string, + dev: boolean, + pkgManager: PackageManagers | undefined = undefined, + projectPath = '.' +) { + const manager = pkgManager ?? getPackageManager(projectPath); + console.log(`Installing package "${pkg}" with ${manager}`); + switch (manager) { + case 'yarn': + execSync( + `yarn add --cwd "${projectPath}" ${ + dev ? ' --save-dev' : '' + } ${pkg}` + ); + break; + + case 'pnpm': + execSync( + `pnpm add -C "${projectPath}" ${ + dev ? ' --save-dev' : '' + } ${pkg}` + ); + break; + + default: + execSync( + `npm install --prefix "${projectPath}" ${ + dev ? ' --save-dev' : '' + } ${pkg}` + ); + break; + } +} + +export function ensurePackage( + pkg: string, + dev: boolean, + pkgManager: PackageManagers | undefined = undefined, + projectPath = '.' +) { + try { + require(pkg); + } catch { + installPackage(pkg, dev, pkgManager, projectPath); + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a388b076..86dab9d63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,32 +3,28 @@ lockfileVersion: 5.4 importers: .: - specifiers: {} + specifiers: + '@changesets/cli': ^2.25.2 + devDependencies: + '@changesets/cli': 2.25.2 - packages/internal: + packages/runtime: specifiers: - '@prisma/client': ^4.4.0 '@types/bcryptjs': ^2.4.2 '@types/jest': ^29.0.3 '@types/node': ^14.18.29 - '@types/uuid': ^8.3.4 bcryptjs: ^2.4.3 colors: 1.4.0 cuid: ^2.1.8 decimal.js: ^10.4.2 deepcopy: ^2.1.0 - eslint: ^8.27.0 - jest: ^29.0.3 next: ^12.3.1 react: ^17.0.2 || ^18 react-dom: ^17.0.2 || ^18 rimraf: ^3.0.2 swr: ^1.3.0 - ts-jest: ^29.0.1 - ts-node: ^10.9.1 - tsc-alias: ^1.7.0 - tsconfig-paths-jest: ^0.0.1 - typescript: ^4.6.2 + tslib: ^2.4.1 + typescript: ^4.9.3 zod: ^3.19.1 zod-validation-error: ^0.2.1 dependencies: @@ -37,36 +33,20 @@ importers: cuid: 2.1.8 decimal.js: 10.4.2 deepcopy: 2.1.0 - next: 12.3.1_6tziyx3dehkoeijunclpkpolha + next: 12.3.1_biqbaboplfbrettd7655fr4n2y react: 18.2.0 react-dom: 18.2.0_react@18.2.0 swr: 1.3.0_react@18.2.0 + tslib: 2.4.1 zod: 3.19.1 zod-validation-error: 0.2.1_zod@3.19.1 devDependencies: - '@prisma/client': 4.5.0 '@types/bcryptjs': 2.4.2 - '@types/jest': 29.0.3 - '@types/node': 14.18.29 - '@types/uuid': 8.3.4 - eslint: 8.27.0 - jest: 29.0.3_johvxhudwcpndp4mle25vwrlq4 + '@types/jest': 29.2.0 + '@types/node': 14.18.32 rimraf: 3.0.2 - ts-jest: 29.0.1_poggjixajg6vd6yquly7s7dsj4 - ts-node: 10.9.1_ck2axrxkiif44rdbzjywaqjysa - tsc-alias: 1.7.0 - tsconfig-paths-jest: 0.0.1 - typescript: 4.8.3 - - packages/runtime: - specifiers: - '@types/bcryptjs': ^2.4.2 - '@zenstackhq/internal': latest - bcryptjs: ^2.4.3 - dependencies: - '@types/bcryptjs': 2.4.2 - '@zenstackhq/internal': link:../internal - bcryptjs: 2.4.3 + typescript: 4.9.3 + publishDirectory: dist packages/schema: specifiers: @@ -80,7 +60,7 @@ importers: '@types/vscode': ^1.56.0 '@typescript-eslint/eslint-plugin': ^5.42.0 '@typescript-eslint/parser': ^5.42.0 - '@zenstackhq/internal': workspace:* + '@zenstackhq/runtime': workspace:../runtime/dist async-exit-hook: ^2.0.1 change-case: ^4.1.2 chevrotain: ^9.1.0 @@ -116,7 +96,7 @@ importers: vscode-languageserver-textdocument: ^1.0.7 vscode-uri: ^3.0.6 dependencies: - '@zenstackhq/internal': link:../internal + '@zenstackhq/runtime': link:../runtime/dist async-exit-hook: 2.0.1 change-case: 4.1.2 chevrotain: 9.1.0 @@ -206,16 +186,19 @@ packages: dependencies: '@jridgewell/gen-mapping': 0.1.1 '@jridgewell/trace-mapping': 0.3.17 + dev: true /@babel/code-frame/7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.18.6 + dev: true /@babel/compat-data/7.19.4: resolution: {integrity: sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==} engines: {node: '>=6.9.0'} + dev: true /@babel/core/7.19.3: resolution: {integrity: sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==} @@ -238,6 +221,7 @@ packages: semver: 6.3.0 transitivePeerDependencies: - supports-color + dev: true /@babel/core/7.19.6: resolution: {integrity: sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg==} @@ -269,6 +253,7 @@ packages: '@babel/types': 7.19.4 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 + dev: true /@babel/generator/7.19.6: resolution: {integrity: sha512-oHGRUQeoX1QrKeJIKVe0hwjGqNnVYsM5Nep5zo0uE0m42sLH+Fsd2pStJ5sRM1bNyTUUoz0pe2lTeMJrb/taTA==} @@ -277,6 +262,7 @@ packages: '@babel/types': 7.19.4 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 + dev: true /@babel/helper-compilation-targets/7.19.3_@babel+core@7.19.3: resolution: {integrity: sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==} @@ -289,6 +275,7 @@ packages: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.4 semver: 6.3.0 + dev: true /@babel/helper-compilation-targets/7.19.3_@babel+core@7.19.6: resolution: {integrity: sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==} @@ -306,6 +293,7 @@ packages: /@babel/helper-environment-visitor/7.18.9: resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} engines: {node: '>=6.9.0'} + dev: true /@babel/helper-function-name/7.19.0: resolution: {integrity: sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==} @@ -313,18 +301,21 @@ packages: dependencies: '@babel/template': 7.18.10 '@babel/types': 7.19.4 + dev: true /@babel/helper-hoist-variables/7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.19.4 + dev: true /@babel/helper-module-imports/7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.19.4 + dev: true /@babel/helper-module-transforms/7.19.0: resolution: {integrity: sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==} @@ -340,6 +331,7 @@ packages: '@babel/types': 7.19.4 transitivePeerDependencies: - supports-color + dev: true /@babel/helper-module-transforms/7.19.6: resolution: {integrity: sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==} @@ -367,6 +359,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.19.4 + dev: true /@babel/helper-simple-access/7.19.4: resolution: {integrity: sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==} @@ -380,18 +373,22 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.19.4 + dev: true /@babel/helper-string-parser/7.19.4: resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} engines: {node: '>=6.9.0'} + dev: true /@babel/helper-validator-identifier/7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} + dev: true /@babel/helper-validator-option/7.18.6: resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} engines: {node: '>=6.9.0'} + dev: true /@babel/helpers/7.19.4: resolution: {integrity: sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==} @@ -402,6 +399,7 @@ packages: '@babel/types': 7.19.4 transitivePeerDependencies: - supports-color + dev: true /@babel/highlight/7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} @@ -410,6 +408,7 @@ packages: '@babel/helper-validator-identifier': 7.19.1 chalk: 2.4.2 js-tokens: 4.0.0 + dev: true /@babel/parser/7.19.4: resolution: {integrity: sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==} @@ -417,6 +416,7 @@ packages: hasBin: true dependencies: '@babel/types': 7.19.4 + dev: true /@babel/parser/7.19.6: resolution: {integrity: sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==} @@ -424,6 +424,7 @@ packages: hasBin: true dependencies: '@babel/types': 7.19.4 + dev: true /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.19.3: resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} @@ -683,6 +684,13 @@ packages: '@babel/helper-plugin-utils': 7.19.0 dev: true + /@babel/runtime/7.20.1: + resolution: {integrity: sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.13.11 + dev: true + /@babel/template/7.18.10: resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} engines: {node: '>=6.9.0'} @@ -690,6 +698,7 @@ packages: '@babel/code-frame': 7.18.6 '@babel/parser': 7.19.6 '@babel/types': 7.19.4 + dev: true /@babel/traverse/7.19.4: resolution: {integrity: sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==} @@ -707,6 +716,7 @@ packages: globals: 11.12.0 transitivePeerDependencies: - supports-color + dev: true /@babel/traverse/7.19.6: resolution: {integrity: sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==} @@ -724,6 +734,7 @@ packages: globals: 11.12.0 transitivePeerDependencies: - supports-color + dev: true /@babel/types/7.19.4: resolution: {integrity: sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==} @@ -732,11 +743,195 @@ packages: '@babel/helper-string-parser': 7.19.4 '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 + dev: true /@bcoe/v8-coverage/0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true + /@changesets/apply-release-plan/6.1.2: + resolution: {integrity: sha512-H8TV9E/WtJsDfoDVbrDGPXmkZFSv7W2KLqp4xX4MKZXshb0hsQZUNowUa8pnus9qb/5OZrFFRVsUsDCVHNW/AQ==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/config': 2.2.0 + '@changesets/get-version-range-type': 0.3.2 + '@changesets/git': 1.5.0 + '@changesets/types': 5.2.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.0 + resolve-from: 5.0.0 + semver: 5.7.1 + dev: true + + /@changesets/assemble-release-plan/5.2.2: + resolution: {integrity: sha512-B1qxErQd85AeZgZFZw2bDKyOfdXHhG+X5S+W3Da2yCem8l/pRy4G/S7iOpEcMwg6lH8q2ZhgbZZwZ817D+aLuQ==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.4 + '@changesets/types': 5.2.0 + '@manypkg/get-packages': 1.1.3 + semver: 5.7.1 + dev: true + + /@changesets/changelog-git/0.1.13: + resolution: {integrity: sha512-zvJ50Q+EUALzeawAxax6nF2WIcSsC5PwbuLeWkckS8ulWnuPYx8Fn/Sjd3rF46OzeKA8t30loYYV6TIzp4DIdg==} + dependencies: + '@changesets/types': 5.2.0 + dev: true + + /@changesets/cli/2.25.2: + resolution: {integrity: sha512-ACScBJXI3kRyMd2R8n8SzfttDHi4tmKSwVwXBazJOylQItSRSF4cGmej2E4FVf/eNfGy6THkL9GzAahU9ErZrA==} + hasBin: true + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/apply-release-plan': 6.1.2 + '@changesets/assemble-release-plan': 5.2.2 + '@changesets/changelog-git': 0.1.13 + '@changesets/config': 2.2.0 + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.4 + '@changesets/get-release-plan': 3.0.15 + '@changesets/git': 1.5.0 + '@changesets/logger': 0.0.5 + '@changesets/pre': 1.0.13 + '@changesets/read': 0.5.8 + '@changesets/types': 5.2.0 + '@changesets/write': 0.2.2 + '@manypkg/get-packages': 1.1.3 + '@types/is-ci': 3.0.0 + '@types/semver': 6.2.3 + ansi-colors: 4.1.3 + chalk: 2.4.2 + enquirer: 2.3.6 + external-editor: 3.1.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + is-ci: 3.0.1 + meow: 6.1.1 + outdent: 0.5.0 + p-limit: 2.3.0 + preferred-pm: 3.0.3 + resolve-from: 5.0.0 + semver: 5.7.1 + spawndamnit: 2.0.0 + term-size: 2.2.1 + tty-table: 4.1.6 + dev: true + + /@changesets/config/2.2.0: + resolution: {integrity: sha512-GGaokp3nm5FEDk/Fv2PCRcQCOxGKKPRZ7prcMqxEr7VSsG75MnChQE8plaW1k6V8L2bJE+jZWiRm19LbnproOw==} + dependencies: + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.4 + '@changesets/logger': 0.0.5 + '@changesets/types': 5.2.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.5 + dev: true + + /@changesets/errors/0.1.4: + resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} + dependencies: + extendable-error: 0.1.7 + dev: true + + /@changesets/get-dependents-graph/1.3.4: + resolution: {integrity: sha512-+C4AOrrFY146ydrgKOo5vTZfj7vetNu1tWshOID+UjPUU9afYGDXI8yLnAeib1ffeBXV3TuGVcyphKpJ3cKe+A==} + dependencies: + '@changesets/types': 5.2.0 + '@manypkg/get-packages': 1.1.3 + chalk: 2.4.2 + fs-extra: 7.0.1 + semver: 5.7.1 + dev: true + + /@changesets/get-release-plan/3.0.15: + resolution: {integrity: sha512-W1tFwxE178/en+zSj/Nqbc3mvz88mcdqUMJhRzN1jDYqN3QI4ifVaRF9mcWUU+KI0gyYEtYR65tour690PqTcA==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/assemble-release-plan': 5.2.2 + '@changesets/config': 2.2.0 + '@changesets/pre': 1.0.13 + '@changesets/read': 0.5.8 + '@changesets/types': 5.2.0 + '@manypkg/get-packages': 1.1.3 + dev: true + + /@changesets/get-version-range-type/0.3.2: + resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} + dev: true + + /@changesets/git/1.5.0: + resolution: {integrity: sha512-Xo8AT2G7rQJSwV87c8PwMm6BAc98BnufRMsML7m7Iw8Or18WFvFmxqG5aOL5PBvhgq9KrKvaeIBNIymracSuHg==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/errors': 0.1.4 + '@changesets/types': 5.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + spawndamnit: 2.0.0 + dev: true + + /@changesets/logger/0.0.5: + resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} + dependencies: + chalk: 2.4.2 + dev: true + + /@changesets/parse/0.3.15: + resolution: {integrity: sha512-3eDVqVuBtp63i+BxEWHPFj2P1s3syk0PTrk2d94W9JD30iG+OER0Y6n65TeLlY8T2yB9Fvj6Ev5Gg0+cKe/ZUA==} + dependencies: + '@changesets/types': 5.2.0 + js-yaml: 3.14.1 + dev: true + + /@changesets/pre/1.0.13: + resolution: {integrity: sha512-jrZc766+kGZHDukjKhpBXhBJjVQMied4Fu076y9guY1D3H622NOw8AQaLV3oQsDtKBTrT2AUFjt9Z2Y9Qx+GfA==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/errors': 0.1.4 + '@changesets/types': 5.2.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + dev: true + + /@changesets/read/0.5.8: + resolution: {integrity: sha512-eYaNfxemgX7f7ELC58e7yqQICW5FB7V+bd1lKt7g57mxUrTveYME+JPaBPpYx02nP53XI6CQp6YxnR9NfmFPKw==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/git': 1.5.0 + '@changesets/logger': 0.0.5 + '@changesets/parse': 0.3.15 + '@changesets/types': 5.2.0 + chalk: 2.4.2 + fs-extra: 7.0.1 + p-filter: 2.1.0 + dev: true + + /@changesets/types/4.1.0: + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + dev: true + + /@changesets/types/5.2.0: + resolution: {integrity: sha512-km/66KOqJC+eicZXsm2oq8A8bVTSpkZJ60iPV/Nl5Z5c7p9kk8xxh6XGRTlnludHldxOOfudhnDN2qPxtHmXzA==} + dev: true + + /@changesets/write/0.2.2: + resolution: {integrity: sha512-kCYNHyF3xaId1Q/QE+DF3UTrHTyg3Cj/f++T8S8/EkC+jh1uK2LFnM9h+EzV+fsmnZDrs7r0J4LLpeI/VWC5Hg==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/types': 5.2.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + prettier: 2.8.0 + dev: true + /@chevrotain/types/9.1.0: resolution: {integrity: sha512-3hbCD1CThkv9gnaSIPq0GUXwKni68e0ph6jIHwCvcWiQ4JB2xi8bFxBain0RF04qHUWuDjgnZLj4rLgimuGO+g==} @@ -838,7 +1033,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 chalk: 4.1.2 jest-message-util: 29.2.1 jest-util: 29.2.1 @@ -901,14 +1096,14 @@ packages: '@jest/test-result': 29.2.1 '@jest/transform': 29.2.1 '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.5.0 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 29.2.0 - jest-config: 29.2.1_4f2ldd7um3b3u4eyvetyqsphze + jest-config: 29.2.1_uo4il2aklsrxuk4ro37qmnu2ge jest-haste-map: 29.2.1 jest-message-util: 29.2.1 jest-regex-util: 29.2.0 @@ -945,7 +1140,7 @@ packages: dependencies: '@jest/fake-timers': 29.2.1 '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 jest-mock: 29.2.1 dev: true @@ -1001,7 +1196,7 @@ packages: dependencies: '@jest/types': 29.2.1 '@sinonjs/fake-timers': 9.1.2 - '@types/node': 14.18.32 + '@types/node': 16.11.62 jest-message-util: 29.2.1 jest-mock: 29.2.1 jest-util: 29.2.1 @@ -1084,7 +1279,7 @@ packages: '@jest/transform': 29.2.1 '@jest/types': 29.2.1 '@jridgewell/trace-mapping': 0.3.17 - '@types/node': 14.18.32 + '@types/node': 16.11.62 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -1236,7 +1431,7 @@ packages: '@jest/schemas': 29.0.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 '@types/yargs': 17.0.13 chalk: 4.1.2 dev: true @@ -1247,6 +1442,7 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.14 + dev: true /@jridgewell/gen-mapping/0.3.2: resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} @@ -1255,17 +1451,21 @@ packages: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.14 '@jridgewell/trace-mapping': 0.3.17 + dev: true /@jridgewell/resolve-uri/3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} + dev: true /@jridgewell/set-array/1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} + dev: true /@jridgewell/sourcemap-codec/1.4.14: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + dev: true /@jridgewell/trace-mapping/0.3.16: resolution: {integrity: sha512-LCQ+NeThyJ4k1W2d+vIKdxuSt9R3pQSZ4P92m7EakaYuXcVWbHuT5bjNcqLd4Rdgi6xYWYDvBJZJLZSLanjDcA==} @@ -1279,6 +1479,7 @@ packages: dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 + dev: true /@jridgewell/trace-mapping/0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} @@ -1287,6 +1488,26 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true + /@manypkg/find-root/1.1.0: + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + dependencies: + '@babel/runtime': 7.20.1 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 + dev: true + + /@manypkg/get-packages/1.1.3: + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + dependencies: + '@babel/runtime': 7.20.1 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 + dev: true + /@next/env/12.3.1: resolution: {integrity: sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==} @@ -1455,19 +1676,6 @@ packages: engines: {node: '>=14'} dev: true - /@prisma/client/4.5.0: - resolution: {integrity: sha512-B2cV0OPI1smhdYUxsJoLYQLoMlLH06MUxgFUWQnHodGMX98VRVXKmQE/9OcrTNkqtke5RC+YU24Szxd04tZA2g==} - engines: {node: '>=14.17'} - requiresBuild: true - peerDependencies: - prisma: '*' - peerDependenciesMeta: - prisma: - optional: true - dependencies: - '@prisma/engines-version': 4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452 - dev: true - /@prisma/debug/4.5.0: resolution: {integrity: sha512-zTBisqSCipBN7veltdhuHU89t98BHQWH4qb6rJAla39AulLtsjCOUu5QEBUmXEuND5SChjYP/S9rJ4mVHkcTdg==} dependencies: @@ -1499,10 +1707,6 @@ packages: - supports-color dev: true - /@prisma/engines-version/4.5.0-43.0362da9eebca54d94c8ef5edd3b2e90af99ba452: - resolution: {integrity: sha512-o7LyVx8PPJBLrEzLl6lpxxk2D5VnlM4Fwmrbq0NoT6pr5aa1OuHD9ZG+WJY6TlR/iD9bhmo2LNcxddCMr5Rv2A==} - dev: true - /@prisma/engines/4.5.0: resolution: {integrity: sha512-4t9ir2SbQQr/wMCNU4YpHWp5hU14J2m3wHUZnGJPpmBF8YtkisxyVyQsKd1e6FyLTaGq8LOLhm6VLYHKqKNm+g==} requiresBuild: true @@ -1626,7 +1830,7 @@ packages: /@swc/helpers/0.4.11: resolution: {integrity: sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==} dependencies: - tslib: 2.4.0 + tslib: 2.4.1 /@tootallnate/once/2.0.0: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} @@ -1699,6 +1903,7 @@ packages: /@types/bcryptjs/2.4.2: resolution: {integrity: sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==} + dev: true /@types/cookiejar/2.1.2: resolution: {integrity: sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==} @@ -1707,7 +1912,7 @@ packages: /@types/cross-spawn/6.0.2: resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 16.11.62 dev: true /@types/debug/4.1.7: @@ -1719,7 +1924,13 @@ packages: /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 16.11.62 + dev: true + + /@types/is-ci/3.0.0: + resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} + dependencies: + ci-info: 3.5.0 dev: true /@types/istanbul-lib-coverage/2.0.4: @@ -1756,10 +1967,18 @@ packages: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true + /@types/minimist/1.2.2: + resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} + dev: true + /@types/ms/0.7.31: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} dev: true + /@types/node/12.20.55: + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + dev: true + /@types/node/14.18.29: resolution: {integrity: sha512-LhF+9fbIX4iPzhsRLpK5H7iPdvW8L4IwGciXQIOEcuF62+9nw/VQVsOViAOOGxY3OlOKGLFv0sWwJXdwQeTn6A==} @@ -1791,6 +2010,10 @@ packages: resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} dev: true + /@types/semver/6.2.3: + resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} + dev: true + /@types/semver/7.3.13: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true @@ -2013,6 +2236,11 @@ packages: uri-js: 4.4.1 dev: true + /ansi-colors/4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: true + /ansi-escapes/4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -2030,6 +2258,7 @@ packages: engines: {node: '>=4'} dependencies: color-convert: 1.9.3 + dev: true /ansi-styles/4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -2103,6 +2332,21 @@ packages: engines: {node: '>=8'} dev: true + /array.prototype.flat/1.3.1: + resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.4 + es-shim-unscopables: 1.0.0 + dev: true + + /arrify/1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + dev: true + /asap/2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} dev: true @@ -2279,6 +2523,13 @@ packages: resolution: {integrity: sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==} dev: false + /better-path-resolve/1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + dependencies: + is-windows: 1.0.2 + dev: true + /binary-extensions/2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} @@ -2313,6 +2564,12 @@ packages: dependencies: fill-range: 7.0.1 + /breakword/1.0.5: + resolution: {integrity: sha512-ex5W9DoOQ/LUEU3PMdLs9ua/CYZl1678NUkKOdUSi8Aw5F1idieaiRURCBFJCwVcrD1J8Iy3vfWSloaMwO2qFg==} + dependencies: + wcwidth: 1.0.1 + dev: true + /browserslist/4.21.4: resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -2322,6 +2579,7 @@ packages: electron-to-chromium: 1.4.284 node-releases: 2.0.6 update-browserslist-db: 1.0.10_browserslist@4.21.4 + dev: true /bs-logger/0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} @@ -2370,6 +2628,15 @@ packages: tslib: 2.4.0 dev: false + /camelcase-keys/6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + dev: true + /camelcase/5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -2380,9 +2647,6 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite/1.0.30001409: - resolution: {integrity: sha512-V0mnJ5dwarmhYv8/MzhJ//aW68UpvnQBXv8lJ2QUsvn2pHcmAuNtu8hQEDz37XnA1iE+lRR9CIfGWWpgJ5QedQ==} - /caniuse-lite/1.0.30001422: resolution: {integrity: sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==} @@ -2401,6 +2665,7 @@ packages: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 + dev: true /chalk/4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -2432,6 +2697,10 @@ packages: engines: {node: '>=10'} dev: true + /chardet/0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + dev: true + /checkpoint-client/1.1.21: resolution: {integrity: sha512-bcrcnJncn6uGhj06IIsWvUBPyJWK1ZezDbLCJ//IQEYXkUobhGvOOBlHe9K5x0ZMkAZGinPB4T+lTUmFz/acWQ==} dependencies: @@ -2537,6 +2806,14 @@ packages: string-width: 4.2.3 dev: true + /cliui/6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: true + /cliui/7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: @@ -2576,6 +2853,7 @@ packages: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 + dev: true /color-convert/2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -2586,6 +2864,7 @@ packages: /color-name/1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true /color-name/1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -2670,6 +2949,7 @@ packages: /convert-source-map/1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} + dev: true /cookiejar/2.1.3: resolution: {integrity: sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==} @@ -2705,6 +2985,14 @@ packages: - encoding dev: true + /cross-spawn/5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + dependencies: + lru-cache: 4.1.5 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2734,6 +3022,28 @@ packages: engines: {node: '>= 6'} dev: true + /csv-generate/3.4.3: + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} + dev: true + + /csv-parse/4.16.3: + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} + dev: true + + /csv-stringify/5.6.5: + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} + dev: true + + /csv/5.5.3: + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} + dependencies: + csv-generate: 3.4.3 + csv-parse: 4.16.3 + csv-stringify: 5.6.5 + stream-transform: 2.1.3 + dev: true + /cuid/2.1.8: resolution: {integrity: sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg==} dev: false @@ -2754,6 +3064,19 @@ packages: dependencies: ms: 2.1.2 + /decamelize-keys/1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + dev: true + + /decamelize/1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + dev: true + /decimal.js/10.4.2: resolution: {integrity: sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA==} dev: false @@ -2795,6 +3118,14 @@ packages: clone: 1.0.4 dev: true + /define-properties/1.1.4: + resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} + engines: {node: '>= 0.4'} + dependencies: + has-property-descriptors: 1.0.0 + object-keys: 1.1.1 + dev: true + /del/6.1.1: resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==} engines: {node: '>=10'} @@ -2814,6 +3145,11 @@ packages: engines: {node: '>=0.4.0'} dev: true + /detect-indent/6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + dev: true + /detect-libc/2.0.1: resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} engines: {node: '>=8'} @@ -2906,6 +3242,7 @@ packages: /electron-to-chromium/1.4.284: resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==} + dev: true /emittery/0.10.2: resolution: {integrity: sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==} @@ -2922,6 +3259,13 @@ packages: once: 1.4.0 dev: true + /enquirer/2.3.6: + resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} + engines: {node: '>=8.6'} + dependencies: + ansi-colors: 4.1.3 + dev: true + /entities/2.1.0: resolution: {integrity: sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==} dev: true @@ -2942,16 +3286,61 @@ packages: is-arrayish: 0.2.1 dev: true - /esbuild-android-64/0.15.12: - resolution: {integrity: sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-android-arm64/0.15.12: + /es-abstract/1.20.4: + resolution: {integrity: sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + es-to-primitive: 1.2.1 + function-bind: 1.1.1 + function.prototype.name: 1.1.5 + get-intrinsic: 1.1.3 + get-symbol-description: 1.0.0 + has: 1.0.3 + has-property-descriptors: 1.0.0 + has-symbols: 1.0.3 + internal-slot: 1.0.3 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-weakref: 1.0.2 + object-inspect: 1.12.2 + object-keys: 1.1.1 + object.assign: 4.1.4 + regexp.prototype.flags: 1.4.3 + safe-regex-test: 1.0.0 + string.prototype.trimend: 1.0.6 + string.prototype.trimstart: 1.0.6 + unbox-primitive: 1.0.2 + dev: true + + /es-shim-unscopables/1.0.0: + resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + dependencies: + has: 1.0.3 + dev: true + + /es-to-primitive/1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: true + + /esbuild-android-64/0.15.12: + resolution: {integrity: sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /esbuild-android-arm64/0.15.12: resolution: {integrity: sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA==} engines: {node: '>=12'} cpu: [arm64] @@ -3155,10 +3544,12 @@ packages: /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} + dev: true /escape-string-regexp/1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + dev: true /escape-string-regexp/2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} @@ -3345,6 +3736,19 @@ packages: jest-util: 29.2.1 dev: true + /extendable-error/0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + dev: true + + /external-editor/3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + dev: true + /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -3430,6 +3834,13 @@ packages: path-exists: 4.0.0 dev: true + /find-yarn-workspace-root2/1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + dependencies: + micromatch: 4.0.5 + pkg-dir: 4.2.0 + dev: true + /flat-cache/3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -3477,6 +3888,24 @@ packages: universalify: 2.0.0 dev: true + /fs-extra/7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + + /fs-extra/8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + /fs-extra/9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} engines: {node: '>=10'} @@ -3509,9 +3938,24 @@ packages: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true + /function.prototype.name/1.1.5: + resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.4 + functions-have-names: 1.2.3 + dev: true + + /functions-have-names/1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true + /gensync/1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} + dev: true /get-caller-file/2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} @@ -3536,6 +3980,14 @@ packages: engines: {node: '>=10'} dev: true + /get-symbol-description/1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.1.3 + dev: true + /github-from-package/0.0.0: resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: true @@ -3574,6 +4026,7 @@ packages: /globals/11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} + dev: true /globals/13.17.0: resolution: {integrity: sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==} @@ -3602,20 +4055,43 @@ packages: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true + /hard-rejection/2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + dev: true + + /has-bigints/1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true + /has-flag/3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + dev: true /has-flag/4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} dev: true + /has-property-descriptors/1.0.0: + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + dependencies: + get-intrinsic: 1.1.3 + dev: true + /has-symbols/1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} dev: true + /has-tostringtag/1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + /has-yarn/2.1.0: resolution: {integrity: sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==} engines: {node: '>=8'} @@ -3703,11 +4179,22 @@ packages: - supports-color dev: true + /human-id/1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + dev: true + /human-signals/2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} dev: true + /iconv-lite/0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: true + /ieee754/1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true @@ -3764,10 +4251,25 @@ packages: engines: {node: '>=10'} dev: true + /internal-slot/1.0.3: + resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.1.3 + has: 1.0.3 + side-channel: 1.0.4 + dev: true + /is-arrayish/0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true + /is-bigint/1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 + dev: true + /is-binary-path/2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -3775,12 +4277,39 @@ packages: binary-extensions: 2.2.0 dev: true + /is-boolean-object/1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-callable/1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: true + + /is-ci/3.0.1: + resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} + hasBin: true + dependencies: + ci-info: 3.5.0 + dev: true + /is-core-module/2.11.0: resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} dependencies: has: 1.0.3 dev: true + /is-date-object/1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-docker/2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} @@ -3812,6 +4341,18 @@ packages: engines: {node: '>=8'} dev: true + /is-negative-zero/2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + dev: true + + /is-number-object/1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-number/7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -3826,16 +4367,62 @@ packages: engines: {node: '>=8'} dev: true + /is-plain-obj/1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + dev: true + + /is-regex/1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-shared-array-buffer/1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + dependencies: + call-bind: 1.0.2 + dev: true + /is-stream/2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} dev: true + /is-string/1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-subdir/1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + dependencies: + better-path-resolve: 1.0.0 + dev: true + + /is-symbol/1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + /is-unicode-supported/0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} dev: true + /is-weakref/1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.2 + dev: true + /is-windows/1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -3966,7 +4553,7 @@ packages: '@jest/expect': 29.2.1 '@jest/test-result': 29.2.1 '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -4161,6 +4748,46 @@ packages: - supports-color dev: true + /jest-config/29.2.1_uo4il2aklsrxuk4ro37qmnu2ge: + resolution: {integrity: sha512-EV5F1tQYW/quZV2br2o88hnYEeRzG53Dfi6rSG3TZBuzGQ6luhQBux/RLlU5QrJjCdq3LXxRRM8F1LP6DN1ycA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.19.6 + '@jest/test-sequencer': 29.2.1 + '@jest/types': 29.2.1 + '@types/node': 16.11.62 + babel-jest: 29.2.1_@babel+core@7.19.6 + chalk: 4.1.2 + ci-info: 3.5.0 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 29.2.1 + jest-environment-node: 29.2.1 + jest-get-type: 29.2.0 + jest-regex-util: 29.2.0 + jest-resolve: 29.2.1 + jest-runner: 29.2.1 + jest-util: 29.2.1 + jest-validate: 29.2.1 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.2.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + ts-node: 10.9.1_jcmx33t3olsvcxopqdljsohpme + transitivePeerDependencies: + - supports-color + dev: true + /jest-diff/29.0.3: resolution: {integrity: sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4236,7 +4863,7 @@ packages: '@jest/environment': 29.2.1 '@jest/fake-timers': 29.2.1 '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 jest-mock: 29.2.1 jest-util: 29.2.1 dev: true @@ -4285,7 +4912,7 @@ packages: dependencies: '@jest/types': 29.2.1 '@types/graceful-fs': 4.1.5 - '@types/node': 14.18.32 + '@types/node': 16.11.62 anymatch: 3.1.2 fb-watchman: 2.0.2 graceful-fs: 4.2.10 @@ -4377,7 +5004,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 jest-util: 29.2.1 dev: true @@ -4503,7 +5130,7 @@ packages: '@jest/test-result': 29.2.1 '@jest/transform': 29.2.1 '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 chalk: 4.1.2 emittery: 0.10.2 graceful-fs: 4.2.10 @@ -4564,7 +5191,7 @@ packages: '@jest/test-result': 29.2.1 '@jest/transform': 29.2.1 '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 chalk: 4.1.2 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 @@ -4664,7 +5291,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 chalk: 4.1.2 ci-info: 3.5.0 graceful-fs: 4.2.10 @@ -4715,7 +5342,7 @@ packages: dependencies: '@jest/test-result': 29.2.1 '@jest/types': 29.2.1 - '@types/node': 14.18.32 + '@types/node': 16.11.62 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.10.2 @@ -4736,7 +5363,7 @@ packages: resolution: {integrity: sha512-ROHTZ+oj7sBrgtv46zZ84uWky71AoYi0vEV9CdEtc1FQunsoAGe5HbQmW76nI5QWdvECVPrSi1MCVUmizSavMg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 14.18.32 + '@types/node': 16.11.62 jest-util: 29.2.1 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -4808,6 +5435,7 @@ packages: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true + dev: true /json-parse-even-better-errors/2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -4825,6 +5453,13 @@ packages: resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} engines: {node: '>=6'} hasBin: true + dev: true + + /jsonfile/4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + optionalDependencies: + graceful-fs: 4.2.10 + dev: true /jsonfile/6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -4846,11 +5481,21 @@ packages: prebuild-install: 7.1.1 dev: true + /kind-of/6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + dev: true + /kleur/3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} dev: true + /kleur/4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + dev: true + /langium-cli/0.5.0: resolution: {integrity: sha512-HhJOGuEyTnaaU5oE7X6OoeAWhJw6AsaZGOyNUYUukpP75/m/NvAfMBSSrbY21Os5eXaO8X+xad5lRC3ld6TBWQ==} engines: {node: '>=12.0.0'} @@ -4903,6 +5548,16 @@ packages: uc.micro: 1.0.6 dev: true + /load-yaml-file/0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.10 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: true + /locate-path/5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -4941,6 +5596,10 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.startcase/4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + dev: true + /lodash.union/4.6.0: resolution: {integrity: sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==} dev: true @@ -4969,6 +5628,13 @@ packages: tslib: 2.4.0 dev: false + /lru-cache/4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + dev: true + /lru-cache/6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -4992,6 +5658,16 @@ packages: tmpl: 1.0.5 dev: true + /map-obj/1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + dev: true + + /map-obj/4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + dev: true + /markdown-it/12.3.2: resolution: {integrity: sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==} hasBin: true @@ -5007,6 +5683,23 @@ packages: resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} dev: true + /meow/6.1.1: + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} + dependencies: + '@types/minimist': 1.2.2 + camelcase-keys: 6.2.2 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 2.5.0 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.13.1 + yargs-parser: 18.1.3 + dev: true + /merge-stream/2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -5077,10 +5770,24 @@ packages: dependencies: brace-expansion: 2.0.1 + /minimist-options/4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + dev: true + /minimist/1.2.7: resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} dev: true + /mixme/0.5.4: + resolution: {integrity: sha512-3KYa4m4Vlqx98GPdOHghxSdNtTvcP8E0kkaJ5Dlh+h2DRzF7zpuVVcA8B0QpKd11YJeP9QQ7ASkKzOeu195Wzw==} + engines: {node: '>= 8.0.0'} + dev: true + /mixpanel/0.17.0: resolution: {integrity: sha512-DY5WeOy/hmkPrNiiZugJpWR0iMuOwuj1a3u0bgwB2eUFRV6oIew/pIahhpawdbNjb+Bye4a8ID3gefeNPvL81g==} engines: {node: '>=10.0'} @@ -5158,7 +5865,7 @@ packages: dependencies: '@next/env': 12.3.1 '@swc/helpers': 0.4.11 - caniuse-lite: 1.0.30001409 + caniuse-lite: 1.0.30001422 postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -5181,6 +5888,52 @@ packages: transitivePeerDependencies: - '@babel/core' - babel-plugin-macros + dev: true + + /next/12.3.1_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==} + engines: {node: '>=12.22.0'} + hasBin: true + peerDependencies: + fibers: '>= 3.1.0' + node-sass: ^6.0.0 || ^7.0.0 + react: ^17.0.2 || ^18.0.0-0 + react-dom: ^17.0.2 || ^18.0.0-0 + sass: ^1.3.0 + peerDependenciesMeta: + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + dependencies: + '@next/env': 12.3.1 + '@swc/helpers': 0.4.11 + caniuse-lite: 1.0.30001422 + postcss: 8.4.14 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + styled-jsx: 5.0.7_react@18.2.0 + use-sync-external-store: 1.2.0_react@18.2.0 + optionalDependencies: + '@next/swc-android-arm-eabi': 12.3.1 + '@next/swc-android-arm64': 12.3.1 + '@next/swc-darwin-arm64': 12.3.1 + '@next/swc-darwin-x64': 12.3.1 + '@next/swc-freebsd-x64': 12.3.1 + '@next/swc-linux-arm-gnueabihf': 12.3.1 + '@next/swc-linux-arm64-gnu': 12.3.1 + '@next/swc-linux-arm64-musl': 12.3.1 + '@next/swc-linux-x64-gnu': 12.3.1 + '@next/swc-linux-x64-musl': 12.3.1 + '@next/swc-win32-arm64-msvc': 12.3.1 + '@next/swc-win32-ia32-msvc': 12.3.1 + '@next/swc-win32-x64-msvc': 12.3.1 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + dev: false /no-case/3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} @@ -5222,6 +5975,7 @@ packages: /node-releases/2.0.6: resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} + dev: true /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -5254,6 +6008,21 @@ packages: resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} dev: true + /object-keys/1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + + /object.assign/4.1.4: + resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + /once/1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -5302,6 +6071,15 @@ packages: wcwidth: 1.0.1 dev: true + /os-tmpdir/1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + dev: true + + /outdent/0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + dev: true + /p-filter/2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} @@ -5458,6 +6236,11 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + /pify/4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + dev: true + /pirates/4.0.5: resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} engines: {node: '>= 6'} @@ -5508,11 +6291,27 @@ packages: tunnel-agent: 0.6.0 dev: true + /preferred-pm/3.0.3: + resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} + engines: {node: '>=10'} + dependencies: + find-up: 5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: 4.0.0 + which-pm: 2.0.0 + dev: true + /prelude-ls/1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} dev: true + /prettier/2.8.0: + resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + /pretty-format/29.0.3: resolution: {integrity: sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5567,6 +6366,10 @@ packages: sisteransi: 1.0.5 dev: true + /pseudomap/1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + dev: true + /pump/3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: @@ -5598,6 +6401,11 @@ packages: /queue-microtask/1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + /quick-lru/4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + dev: true + /rc/1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true @@ -5646,6 +6454,16 @@ packages: type-fest: 0.6.0 dev: true + /read-yaml-file/1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.10 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: true + /read/1.0.7: resolution: {integrity: sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==} engines: {node: '>=0.8'} @@ -5687,9 +6505,30 @@ packages: picomatch: 2.3.1 dev: true + /redent/3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + dev: true + + /regenerator-runtime/0.13.11: + resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + dev: true + /regexp-to-ast/0.5.0: resolution: {integrity: sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==} + /regexp.prototype.flags/1.4.3: + resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + functions-have-names: 1.2.3 + dev: true + /regexpp/3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} @@ -5705,6 +6544,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /require-main-filename/2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + dev: true + /resolve-cwd/3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -5779,6 +6622,18 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true + /safe-regex-test/1.0.0: + resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.1.3 + is-regex: 1.1.4 + dev: true + + /safer-buffer/2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: true + /sax/1.2.4: resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} dev: true @@ -5796,6 +6651,7 @@ packages: /semver/6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + dev: true /semver/7.3.7: resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} @@ -5820,6 +6676,17 @@ packages: upper-case-first: 2.0.2 dev: false + /set-blocking/2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + dev: true + + /shebang-command/1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + dependencies: + shebang-regex: 1.0.0 + dev: true + /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -5827,6 +6694,11 @@ packages: shebang-regex: 3.0.0 dev: true + /shebang-regex/1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + dev: true + /shebang-regex/3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -5882,6 +6754,19 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true + /smartwrap/2.0.2: + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} + hasBin: true + dependencies: + array.prototype.flat: 1.3.1 + breakword: 1.0.5 + grapheme-splitter: 1.0.4 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 15.4.1 + dev: true + /snake-case/3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: @@ -5909,6 +6794,13 @@ packages: resolution: {integrity: sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==} dev: true + /spawndamnit/2.0.0: + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + dependencies: + cross-spawn: 5.1.0 + signal-exit: 3.0.7 + dev: true + /spdx-correct/3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: @@ -5942,6 +6834,12 @@ packages: escape-string-regexp: 2.0.0 dev: true + /stream-transform/2.1.3: + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + dependencies: + mixme: 0.5.4 + dev: true + /string-length/4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -5959,6 +6857,22 @@ packages: strip-ansi: 6.0.1 dev: true + /string.prototype.trimend/1.0.6: + resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.4 + dev: true + + /string.prototype.trimstart/1.0.6: + resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.4 + dev: true + /string_decoder/1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: @@ -5978,6 +6892,11 @@ packages: ansi-regex: 5.0.1 dev: true + /strip-bom/3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + dev: true + /strip-bom/4.0.0: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} engines: {node: '>=8'} @@ -6020,6 +6939,23 @@ packages: dependencies: '@babel/core': 7.19.3 react: 18.2.0 + dev: true + + /styled-jsx/5.0.7_react@18.2.0: + resolution: {integrity: sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + dependencies: + react: 18.2.0 + dev: false /superagent/8.0.2: resolution: {integrity: sha512-QtYZ9uaNAMexI7XWl2vAXAh0j4q9H7T0WVEI/y5qaUB3QLwxo+voUgCQ217AokJzUTIVOp0RTo7fhZrwhD7A2Q==} @@ -6055,6 +6991,7 @@ packages: engines: {node: '>=4'} dependencies: has-flag: 3.0.0 + dev: true /supports-color/7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} @@ -6143,6 +7080,11 @@ packages: unique-string: 2.0.0 dev: true + /term-size/2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + dev: true + /terminal-link/2.1.1: resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} engines: {node: '>=8'} @@ -6164,6 +7106,13 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /tmp/0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + dependencies: + os-tmpdir: 1.0.2 + dev: true + /tmp/0.2.1: resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} engines: {node: '>=8.17.0'} @@ -6178,6 +7127,7 @@ packages: /to-fast-properties/2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} + dev: true /to-regex-range/5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} @@ -6194,6 +7144,11 @@ packages: hasBin: true dev: true + /trim-newlines/3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + dev: true + /ts-jest/29.0.1_poggjixajg6vd6yquly7s7dsj4: resolution: {integrity: sha512-htQOHshgvhn93QLxrmxpiQPk69+M1g7govO1g6kf6GsjCv4uvRV0znVmDrrvjUrVCnTYeY4FBxTYYYD4airyJA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -6359,6 +7314,9 @@ packages: /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} + /tslib/2.4.1: + resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + /tsutils/3.21.0_typescript@4.8.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -6369,6 +7327,20 @@ packages: typescript: 4.8.4 dev: true + /tty-table/4.1.6: + resolution: {integrity: sha512-kRj5CBzOrakV4VRRY5kUWbNYvo/FpOsz65DzI5op9P+cHov3+IqPbo1JE1ZnQGkHdZgNFDsrEjrfqqy/Ply9fw==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + chalk: 4.1.2 + csv: 5.5.3 + kleur: 4.1.5 + smartwrap: 2.0.2 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 17.6.0 + dev: true + /tunnel-agent/0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: @@ -6391,6 +7363,11 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + /type-fest/0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + dev: true + /type-fest/0.16.0: resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==} engines: {node: '>=10'} @@ -6436,10 +7413,25 @@ packages: hasBin: true dev: true + /typescript/4.9.3: + resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /uc.micro/1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true + /unbox-primitive/1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.2 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: true + /underscore/1.13.6: resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} dev: true @@ -6456,6 +7448,11 @@ packages: crypto-random-string: 2.0.0 dev: true + /universalify/0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + dev: true + /universalify/2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -6470,6 +7467,7 @@ packages: browserslist: 4.21.4 escalade: 3.1.1 picocolors: 1.0.0 + dev: true /upper-case-first/2.0.2: resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} @@ -6628,6 +7626,35 @@ packages: resolution: {integrity: sha512-5cZ7mecD3eYcMiCH4wtRPA5iFJZ50BJYDfckI5RRpQiktMiYTcn0ccLTZOvcbBume+1304fQztxeNzNS9Gvrnw==} dev: false + /which-boxed-primitive/1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: true + + /which-module/2.0.0: + resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} + dev: true + + /which-pm/2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + dependencies: + load-yaml-file: 0.2.0 + path-exists: 4.0.0 + dev: true + + /which/1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + /which/2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -6641,6 +7668,15 @@ packages: engines: {node: '>=0.10.0'} dev: true + /wrap-ansi/6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + /wrap-ansi/7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -6675,19 +7711,52 @@ packages: engines: {node: '>=4.0'} dev: true + /y18n/4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + dev: true + /y18n/5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} dev: true + /yallist/2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + dev: true + /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + /yargs-parser/18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: true + /yargs-parser/21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} dev: true + /yargs/15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.0 + y18n: 4.0.3 + yargs-parser: 18.1.3 + dev: true + /yargs/17.5.1: resolution: {integrity: sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==} engines: {node: '>=12'} diff --git a/samples/todo/components/BreadCrumb.tsx b/samples/todo/components/BreadCrumb.tsx index 6b02bb4fa..78de41bf9 100644 --- a/samples/todo/components/BreadCrumb.tsx +++ b/samples/todo/components/BreadCrumb.tsx @@ -1,5 +1,5 @@ import { useCurrentSpace } from '@lib/context'; -import { useList } from '@zenstackhq/runtime/hooks'; +import { useList } from '@zenstackhq/runtime/client'; import Link from 'next/link'; import { useRouter } from 'next/router'; diff --git a/samples/todo/components/ManageMembers.tsx b/samples/todo/components/ManageMembers.tsx index 37209c1f3..f72bfdad2 100644 --- a/samples/todo/components/ManageMembers.tsx +++ b/samples/todo/components/ManageMembers.tsx @@ -1,11 +1,11 @@ import { PlusIcon, TrashIcon } from '@heroicons/react/24/outline'; import { useCurrentUser } from '@lib/context'; -import { HooksError, useSpaceUser } from '@zenstackhq/runtime/hooks'; import { Space, SpaceUserRole } from '@zenstackhq/runtime/types'; -import { ServerErrorCode } from '@zenstackhq/runtime/client'; +import { HooksError, ServerErrorCode } from '@zenstackhq/runtime/client'; import { ChangeEvent, KeyboardEvent, useState } from 'react'; import { toast } from 'react-toastify'; import Avatar from './Avatar'; +import { useSpaceUser } from '@zenstackhq/runtime/client'; type Props = { space: Space; diff --git a/samples/todo/components/SpaceMembers.tsx b/samples/todo/components/SpaceMembers.tsx index 16ecc7e82..419692a91 100644 --- a/samples/todo/components/SpaceMembers.tsx +++ b/samples/todo/components/SpaceMembers.tsx @@ -1,4 +1,4 @@ -import { useSpaceUser } from '@zenstackhq/runtime/hooks'; +import { useSpaceUser } from '@zenstackhq/runtime/client'; import { useCurrentSpace } from '@lib/context'; import { PlusIcon } from '@heroicons/react/24/outline'; import Avatar from './Avatar'; diff --git a/samples/todo/components/Spaces.tsx b/samples/todo/components/Spaces.tsx index 936d029f8..aaf52862d 100644 --- a/samples/todo/components/Spaces.tsx +++ b/samples/todo/components/Spaces.tsx @@ -1,4 +1,4 @@ -import { useSpace } from '@zenstackhq/runtime/hooks'; +import { useSpace } from '@zenstackhq/runtime/client'; import Link from 'next/link'; export default function Spaces() { diff --git a/samples/todo/components/Todo.tsx b/samples/todo/components/Todo.tsx index d14b833c1..2739106e6 100644 --- a/samples/todo/components/Todo.tsx +++ b/samples/todo/components/Todo.tsx @@ -1,5 +1,5 @@ import { TrashIcon } from '@heroicons/react/24/outline'; -import { useTodo } from '@zenstackhq/runtime/hooks'; +import { useTodo } from '@zenstackhq/runtime/client'; import { Todo, User } from '@zenstackhq/runtime/types'; import { ChangeEvent, useEffect, useState } from 'react'; import Avatar from './Avatar'; diff --git a/samples/todo/components/TodoList.tsx b/samples/todo/components/TodoList.tsx index c26fcd808..959a2c811 100644 --- a/samples/todo/components/TodoList.tsx +++ b/samples/todo/components/TodoList.tsx @@ -6,7 +6,7 @@ import { User } from 'next-auth'; import Avatar from './Avatar'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import { useList } from '@zenstackhq/runtime/hooks'; +import { useList } from '@zenstackhq/runtime/client'; import TimeInfo from './TimeInfo'; type Props = { diff --git a/samples/todo/lib/context.ts b/samples/todo/lib/context.ts index 33220359b..5793f1d43 100644 --- a/samples/todo/lib/context.ts +++ b/samples/todo/lib/context.ts @@ -1,4 +1,4 @@ -import { useSpace } from '@zenstackhq/runtime/hooks'; +import { useSpace } from '@zenstackhq/runtime/client'; import { Space } from '@zenstackhq/runtime/types'; import { User } from 'next-auth'; import { useSession } from 'next-auth/react'; diff --git a/samples/todo/pages/api/auth/[...nextauth].ts b/samples/todo/pages/api/auth/[...nextauth].ts index ae1b6e660..b53669c61 100644 --- a/samples/todo/pages/api/auth/[...nextauth].ts +++ b/samples/todo/pages/api/auth/[...nextauth].ts @@ -3,8 +3,8 @@ import CredentialsProvider from 'next-auth/providers/credentials'; import { authorize, NextAuthAdapter as Adapter, -} from '@zenstackhq/runtime/auth'; -import service from '@zenstackhq/runtime'; +} from '@zenstackhq/runtime/server/auth'; +import service from '@zenstackhq/runtime/server'; import { nanoid } from 'nanoid'; import { SpaceUserRole } from '@zenstackhq/runtime/types'; diff --git a/samples/todo/pages/api/zenstack/[...path].ts b/samples/todo/pages/api/zenstack/[...path].ts index d078ed3e6..cdae27d69 100644 --- a/samples/todo/pages/api/zenstack/[...path].ts +++ b/samples/todo/pages/api/zenstack/[...path].ts @@ -5,7 +5,7 @@ import { } from '@zenstackhq/runtime/server'; import { authOptions } from '@api/auth/[...nextauth]'; import { unstable_getServerSession } from 'next-auth'; -import service from '@zenstackhq/runtime'; +import service from '@zenstackhq/runtime/server'; const options: RequestHandlerOptions = { async getServerUser(req: NextApiRequest, res: NextApiResponse) { diff --git a/samples/todo/pages/create-space.tsx b/samples/todo/pages/create-space.tsx index fd0dc2fc6..3b4c80759 100644 --- a/samples/todo/pages/create-space.tsx +++ b/samples/todo/pages/create-space.tsx @@ -1,11 +1,14 @@ +import { + ServerErrorCode, + useSpace, + type HooksError, +} from '@zenstackhq/runtime/client'; +import { SpaceUserRole } from '@zenstackhq/runtime/types'; import { NextPage } from 'next'; +import { useSession } from 'next-auth/react'; +import { useRouter } from 'next/router'; import { FormEvent, useState } from 'react'; -import { useSpace, type HooksError } from '@zenstackhq/runtime/hooks'; import { toast } from 'react-toastify'; -import { useRouter } from 'next/router'; -import { useSession } from 'next-auth/react'; -import { SpaceUserRole } from '@zenstackhq/runtime/types'; -import { ServerErrorCode } from '@zenstackhq/runtime/client'; const CreateSpace: NextPage = () => { const { data: session } = useSession(); diff --git a/samples/todo/pages/space/[slug]/[listId]/index.tsx b/samples/todo/pages/space/[slug]/[listId]/index.tsx index 8e61bcdde..b47af7eb5 100644 --- a/samples/todo/pages/space/[slug]/[listId]/index.tsx +++ b/samples/todo/pages/space/[slug]/[listId]/index.tsx @@ -1,4 +1,4 @@ -import { useList, useTodo } from '@zenstackhq/runtime/hooks'; +import { useList, useTodo } from '@zenstackhq/runtime/client'; import { useRouter } from 'next/router'; import { PlusIcon } from '@heroicons/react/24/outline'; import { ChangeEvent, KeyboardEvent, useState } from 'react'; diff --git a/samples/todo/pages/space/[slug]/index.tsx b/samples/todo/pages/space/[slug]/index.tsx index 773f20a3e..6031ab7e5 100644 --- a/samples/todo/pages/space/[slug]/index.tsx +++ b/samples/todo/pages/space/[slug]/index.tsx @@ -1,6 +1,6 @@ import { SpaceContext, UserContext } from '@lib/context'; import { ChangeEvent, FormEvent, useContext, useState } from 'react'; -import { useList } from '@zenstackhq/runtime/hooks'; +import { useList } from '@zenstackhq/runtime/client'; import { toast } from 'react-toastify'; import TodoList from 'components/TodoList'; import BreadCrumb from 'components/BreadCrumb'; @@ -28,8 +28,10 @@ function CreateDialog() { ownerId: user!.id, }, }); - } catch (err) { - toast.error(`Failed to create list: ${err}`); + } catch (err: any) { + toast.error( + `Failed to create list: ${err.info?.message || err.message}` + ); return; } diff --git a/tests/integration/tests/field-validation-client.test.ts b/tests/integration/tests/field-validation-client.test.ts index 741280e48..94b03b912 100644 --- a/tests/integration/tests/field-validation-client.test.ts +++ b/tests/integration/tests/field-validation-client.test.ts @@ -6,7 +6,7 @@ describe('Field validation client-side tests', () => { let origDir: string; const hooksModule = '@zenstackhq/runtime/hooks'; - const requestModule = '@zenstackhq/internal/lib/request'; + const requestModule = '@zenstackhq/runtime/lib/request'; beforeAll(async () => { origDir = path.resolve('.'); From bb18a91e111c0def2a65612c919dd99b75e80bbe Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Fri, 25 Nov 2022 10:24:13 +0800 Subject: [PATCH 2/7] bump version --- package.json | 2 +- packages/runtime/package.json | 2 +- packages/schema/package.json | 2 +- samples/todo/package-lock.json | 110 ++++++++++++++++++--------------- samples/todo/package.json | 12 ++-- 5 files changed, 69 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index c1ba8664c..b2cc5930c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zenstack-monorepo", - "version": "0.3.10", + "version": "0.3.11", "description": "", "scripts": { "build": "pnpm -r build", diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 0aa1f2479..4109beaf3 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,7 +1,7 @@ { "name": "@zenstackhq/runtime", "displayName": "ZenStack Runtime Library", - "version": "0.3.10", + "version": "0.3.11", "description": "Runtime of ZenStack for both client-side and server-side environments.", "repository": { "type": "git", diff --git a/packages/schema/package.json b/packages/schema/package.json index fa33229c7..dc8dc8d73 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -3,7 +3,7 @@ "publisher": "zenstack", "displayName": "ZenStack Language Tools", "description": "A toolkit for modeling data and access policies in full-stack development with Next.js and Typescript", - "version": "0.3.10", + "version": "0.3.11", "author": { "name": "ZenStack Team" }, diff --git a/samples/todo/package-lock.json b/samples/todo/package-lock.json index f4b1e71c4..7a41c7a76 100644 --- a/samples/todo/package-lock.json +++ b/samples/todo/package-lock.json @@ -1,17 +1,16 @@ { "name": "todo", - "version": "0.3.9", + "version": "0.3.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "todo", - "version": "0.3.9", + "version": "0.3.11", "dependencies": { "@heroicons/react": "^2.0.12", "@prisma/client": "^4.4.0", - "@zenstackhq/internal": "^0.3.9", - "@zenstackhq/runtime": "^0.3.9", + "@zenstackhq/runtime": "^0.3.11", "bcryptjs": "^2.4.3", "daisyui": "^2.31.0", "moment": "^2.29.4", @@ -36,7 +35,37 @@ "postcss": "^8.4.16", "tailwindcss": "^3.1.8", "typescript": "^4.6.2", - "zenstack": "^0.3.9" + "zenstack": "^0.3.11" + } + }, + "../../packages/runtime": { + "name": "@zenstackhq/runtime", + "version": "0.3.10", + "extraneous": true, + "license": "MIT", + "dependencies": { + "@zenstackhq/internal": "latest", + "colors": "1.4.0", + "cuid": "^2.1.8", + "decimal.js": "^10.4.2", + "deepcopy": "^2.1.0", + "swr": "^1.3.0", + "zod": "^3.19.1", + "zod-validation-error": "^0.2.1" + }, + "devDependencies": { + "@types/bcryptjs": "^2.4.2", + "@types/jest": "^29.0.3", + "@types/node": "^14.18.29", + "rimraf": "^3.0.2", + "typescript": "^4.9.3" + }, + "peerDependencies": { + "@types/bcryptjs": "^2.4.2", + "bcryptjs": "^2.4.3", + "next": "^12.3.1", + "react": "^17.0.2 || ^18", + "react-dom": "^17.0.2 || ^18" } }, "node_modules/@babel/code-frame": { @@ -722,39 +751,28 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@zenstackhq/internal": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.3.9.tgz", - "integrity": "sha512-dyJW7+WYpTLHiwvZG9GoFn5RJF20Seq/wHiugVYtqLxEnH0Ow7MXLslBnKzTd4Z1TA5/nGY8kynyfiHIhjUPqg==", + "node_modules/@zenstackhq/runtime": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.11.tgz", + "integrity": "sha512-LUxB0QaeeLPnGdC1+H89ViNLL46FF+yGiU2IkvXfWMN5Y+r1zNL4ikVSZCkDa6vJxM8TaBzVEflbps4DJjbCww==", "dependencies": { - "bcryptjs": "^2.4.3", "colors": "1.4.0", "cuid": "^2.1.8", "decimal.js": "^10.4.2", "deepcopy": "^2.1.0", "swr": "^1.3.0", + "tslib": "^2.4.1", "zod": "^3.19.1", "zod-validation-error": "^0.2.1" }, "peerDependencies": { - "@prisma/client": "^4.4.0", + "@types/bcryptjs": "^2.4.2", + "bcryptjs": "^2.4.3", "next": "^12.3.1", "react": "^17.0.2 || ^18", "react-dom": "^17.0.2 || ^18" } }, - "node_modules/@zenstackhq/runtime": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.9.tgz", - "integrity": "sha512-qskz4iVf04c/xsXDQkoMx+BdsjWQj47tHz/PEcuctAeYK9TFjSq/mPBVXIV+ZDsYoEJBz3Utc5JXr93PWer9Hg==", - "dependencies": { - "@zenstackhq/internal": "latest" - }, - "peerDependencies": { - "@types/bcryptjs": "^2.4.2", - "bcryptjs": "^2.4.3" - } - }, "node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -4286,9 +4304,9 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -4587,12 +4605,12 @@ } }, "node_modules/zenstack": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.9.tgz", - "integrity": "sha512-2RAVQE1jPMwO+Y+yHSjAkZ4q/B881ZoUMy6F2PrDBWS0TS7l+FDmsn1DEkhmkKxL3D1P6KetfFz8IYiS0NVaBA==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.11.tgz", + "integrity": "sha512-ypohX9ijyZfzqMR3ZpCyDvuLnfIYo2CdgMZ7NjvZofkiNvlMYBEvP1mvDwM4mVGt9PZFxwkm+XaQvSCMzGnvHg==", "dev": true, "dependencies": { - "@zenstackhq/internal": "0.3.9", + "@zenstackhq/runtime": "0.3.11", "async-exit-hook": "^2.0.1", "change-case": "^4.1.2", "chevrotain": "^9.1.0", @@ -5110,29 +5128,21 @@ } } }, - "@zenstackhq/internal": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@zenstackhq/internal/-/internal-0.3.9.tgz", - "integrity": "sha512-dyJW7+WYpTLHiwvZG9GoFn5RJF20Seq/wHiugVYtqLxEnH0Ow7MXLslBnKzTd4Z1TA5/nGY8kynyfiHIhjUPqg==", + "@zenstackhq/runtime": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.11.tgz", + "integrity": "sha512-LUxB0QaeeLPnGdC1+H89ViNLL46FF+yGiU2IkvXfWMN5Y+r1zNL4ikVSZCkDa6vJxM8TaBzVEflbps4DJjbCww==", "requires": { - "bcryptjs": "^2.4.3", "colors": "1.4.0", "cuid": "^2.1.8", "decimal.js": "^10.4.2", "deepcopy": "^2.1.0", "swr": "^1.3.0", + "tslib": "^2.4.1", "zod": "^3.19.1", "zod-validation-error": "^0.2.1" } }, - "@zenstackhq/runtime": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.9.tgz", - "integrity": "sha512-qskz4iVf04c/xsXDQkoMx+BdsjWQj47tHz/PEcuctAeYK9TFjSq/mPBVXIV+ZDsYoEJBz3Utc5JXr93PWer9Hg==", - "requires": { - "@zenstackhq/internal": "latest" - } - }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -7687,9 +7697,9 @@ } }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" }, "tsutils": { "version": "3.21.0", @@ -7914,12 +7924,12 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" }, "zenstack": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.9.tgz", - "integrity": "sha512-2RAVQE1jPMwO+Y+yHSjAkZ4q/B881ZoUMy6F2PrDBWS0TS7l+FDmsn1DEkhmkKxL3D1P6KetfFz8IYiS0NVaBA==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.11.tgz", + "integrity": "sha512-ypohX9ijyZfzqMR3ZpCyDvuLnfIYo2CdgMZ7NjvZofkiNvlMYBEvP1mvDwM4mVGt9PZFxwkm+XaQvSCMzGnvHg==", "dev": true, "requires": { - "@zenstackhq/internal": "0.3.9", + "@zenstackhq/runtime": "0.3.11", "async-exit-hook": "^2.0.1", "change-case": "^4.1.2", "chevrotain": "^9.1.0", diff --git a/samples/todo/package.json b/samples/todo/package.json index 8e841bd76..32d899f17 100644 --- a/samples/todo/package.json +++ b/samples/todo/package.json @@ -1,6 +1,6 @@ { "name": "todo", - "version": "0.3.10", + "version": "0.3.11", "private": true, "scripts": { "dev": "next dev", @@ -14,14 +14,14 @@ "db:browse": "zenstack studio", "generate": "zenstack generate", "vercel-build": "npm run build && npm run db:deploy", - "deps-local": "npm i -D ../../packages/schema && npm i ../../packages/internal ../../packages/runtime", - "deps-npm": "npm i -D zenstack@latest && npm i @zenstackhq/internal@latest @zenstackhq/runtime@latest" + "deps-local": "npm i -D ../../packages/schema && npm i ../../packages/runtime/dist", + "deps-latest": "npm i -D zenstack@latest && npm i @zenstackhq/runtime@latest", + "deps-dev": "npm i -D zenstack@dev && npm i @zenstackhq/runtime@dev" }, "dependencies": { "@heroicons/react": "^2.0.12", "@prisma/client": "^4.4.0", - "@zenstackhq/internal": "^0.3.9", - "@zenstackhq/runtime": "^0.3.9", + "@zenstackhq/runtime": "^0.3.11", "bcryptjs": "^2.4.3", "daisyui": "^2.31.0", "moment": "^2.29.4", @@ -46,6 +46,6 @@ "postcss": "^8.4.16", "tailwindcss": "^3.1.8", "typescript": "^4.6.2", - "zenstack": "^0.3.9" + "zenstack": "^0.3.11" } } From c63cd6f54a6e4f27ed11d5153b251605da86cabf Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Fri, 25 Nov 2022 11:44:35 +0800 Subject: [PATCH 3/7] temp fix for pnpm project linking --- packages/runtime/package.json | 3 ++- packages/schema/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 4109beaf3..02ec1d9fa 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -16,7 +16,8 @@ "publish-dev": "pnpm publish --tag dev" }, "publishConfig": { - "directory": "dist" + "directory": "dist", + "linkDirectory": true }, "dependencies": { "colors": "1.4.0", diff --git a/packages/schema/package.json b/packages/schema/package.json index dc8dc8d73..5f0ec71a6 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -69,7 +69,7 @@ "vscode:prepublish": "cp ../../README.md ./ && pnpm lint && pnpm build", "vscode:package": "vsce package --no-dependencies", "clean": "rimraf bundle", - "build": "pnpm langium:generate && tsc --noEmit && pnpm bundle && cp -r src/res/* bundle/res/", + "build": "pnpm -C ../runtime build && pnpm langium:generate && tsc --noEmit && pnpm bundle && cp -r src/res/* bundle/res/", "bundle": "npm run clean && node build/bundle.js --minify", "bundle-watch": "node build/bundle.js --watch", "ts:watch": "tsc --watch --noEmit", From 734fee0aad4b0086a6d18c19bc3687875da1d26c Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Fri, 25 Nov 2022 11:59:26 +0800 Subject: [PATCH 4/7] fix tests --- tests/integration/tests/field-validation-client.test.ts | 2 +- tests/integration/tests/field-validation-server.test.ts | 2 +- tests/integration/tests/logging.test.ts | 2 +- tests/integration/tests/operation-coverate.test.ts | 2 +- tests/integration/tests/todo-e2e.test.ts | 2 +- tests/integration/tests/type-coverage.test.ts | 1 - tests/integration/tests/utils.ts | 6 ++---- 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/integration/tests/field-validation-client.test.ts b/tests/integration/tests/field-validation-client.test.ts index 94b03b912..9f625f9fc 100644 --- a/tests/integration/tests/field-validation-client.test.ts +++ b/tests/integration/tests/field-validation-client.test.ts @@ -5,7 +5,7 @@ import { default as fetch, enableFetchMocks } from 'jest-fetch-mock'; describe('Field validation client-side tests', () => { let origDir: string; - const hooksModule = '@zenstackhq/runtime/hooks'; + const hooksModule = '@zenstackhq/runtime/client'; const requestModule = '@zenstackhq/runtime/lib/request'; beforeAll(async () => { diff --git a/tests/integration/tests/field-validation-server.test.ts b/tests/integration/tests/field-validation-server.test.ts index a57ac894d..e39f37b74 100644 --- a/tests/integration/tests/field-validation-server.test.ts +++ b/tests/integration/tests/field-validation-server.test.ts @@ -1,6 +1,6 @@ import path from 'path'; import { makeClient, run, setup } from './utils'; -import { ServerErrorCode } from '../../../packages/internal/src/types'; +import { ServerErrorCode } from '../../../packages/runtime/src/types'; describe('Field validation server-side tests', () => { let origDir: string; diff --git a/tests/integration/tests/logging.test.ts b/tests/integration/tests/logging.test.ts index 9a47dc6a5..9a8f8d729 100644 --- a/tests/integration/tests/logging.test.ts +++ b/tests/integration/tests/logging.test.ts @@ -1,7 +1,7 @@ import path from 'path'; import { makeClient, run, setup } from './utils'; import * as fs from 'fs'; -import type { DefaultService } from '../../../packages/runtime/server'; +import type { DefaultService } from '../../../packages/runtime/src/service'; describe('Logging tests', () => { let origDir: string; diff --git a/tests/integration/tests/operation-coverate.test.ts b/tests/integration/tests/operation-coverate.test.ts index ac34390fc..9cec10ec2 100644 --- a/tests/integration/tests/operation-coverate.test.ts +++ b/tests/integration/tests/operation-coverate.test.ts @@ -1,6 +1,6 @@ import path from 'path'; import { makeClient, run, setup } from './utils'; -import { ServerErrorCode } from '../../../packages/internal/src/types'; +import { ServerErrorCode } from '../../../packages/runtime/src/types'; describe('Operation Coverage Tests', () => { let origDir: string; diff --git a/tests/integration/tests/todo-e2e.test.ts b/tests/integration/tests/todo-e2e.test.ts index 2ca943f08..72455b374 100644 --- a/tests/integration/tests/todo-e2e.test.ts +++ b/tests/integration/tests/todo-e2e.test.ts @@ -1,6 +1,6 @@ import path from 'path'; import { makeClient, run, setup } from './utils'; -import { ServerErrorCode } from '../../../packages/internal/src/types'; +import { ServerErrorCode } from '../../../packages/runtime/src/types'; describe('Todo E2E Tests', () => { let origDir: string; diff --git a/tests/integration/tests/type-coverage.test.ts b/tests/integration/tests/type-coverage.test.ts index 31e99ca28..c26783776 100644 --- a/tests/integration/tests/type-coverage.test.ts +++ b/tests/integration/tests/type-coverage.test.ts @@ -1,6 +1,5 @@ import path from 'path'; import { makeClient, run, setup } from './utils'; -import { ServerErrorCode } from '../../../packages/internal/src/types'; describe('Type Coverage Tests', () => { let origDir: string; diff --git a/tests/integration/tests/utils.ts b/tests/integration/tests/utils.ts index 674692f6b..4cdbf4d96 100644 --- a/tests/integration/tests/utils.ts +++ b/tests/integration/tests/utils.ts @@ -39,8 +39,7 @@ export async function setup(schemaFile: string) { 'prisma', 'zod', '../../../../packages/schema', - '../../../../packages/runtime', - '../../../../packages/internal', + '../../../../packages/runtime/dist', ]; run(`npm i ${dependencies.join(' ')}`); @@ -52,8 +51,7 @@ export async function setup(schemaFile: string) { 'handler.ts', ` import { NextApiRequest, NextApiResponse } from 'next'; - import { type RequestHandlerOptions, requestHandler } from '@zenstackhq/runtime/server'; - import service from '@zenstackhq/runtime'; + import { type RequestHandlerOptions, requestHandler, default as service } from '@zenstackhq/runtime/server'; const options: RequestHandlerOptions = { async getServerUser(req: NextApiRequest, res: NextApiResponse) { From f7089078b67fa06ab35d304bb463a18caefdd830 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Fri, 25 Nov 2022 12:24:45 +0800 Subject: [PATCH 5/7] fix tests --- tests/integration/tests/logging.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration/tests/logging.test.ts b/tests/integration/tests/logging.test.ts index 9a8f8d729..d122efd29 100644 --- a/tests/integration/tests/logging.test.ts +++ b/tests/integration/tests/logging.test.ts @@ -19,8 +19,10 @@ describe('Logging tests', () => { process.chdir(origDir); }); + const getService = () => require('@zenstackhq/runtime/server').default; + it('logging with default settings', async () => { - const service: DefaultService = require('@zenstackhq/runtime'); + const service: DefaultService = getService(); service.reinitialize(); let gotInfoEmit = false; @@ -98,7 +100,7 @@ describe('Logging tests', () => { ` ); - const service: DefaultService = require('@zenstackhq/runtime'); + const service: DefaultService = getService(); service.reinitialize(); let gotInfoEmit = false; @@ -185,7 +187,7 @@ describe('Logging tests', () => { ` ); - const service: DefaultService = require('@zenstackhq/runtime'); + const service: DefaultService = getService(); service.reinitialize(); let gotInfoEmit = false; From 20b2e4e1d088a18ea07f36a7a9a7c2c0797c714f Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Fri, 25 Nov 2022 15:15:21 +0800 Subject: [PATCH 6/7] fix CLI issues --- docs/cli-commands.md | 10 +++++- package.json | 2 +- packages/runtime/package.json | 8 ++--- packages/schema/package.json | 2 +- packages/schema/src/cli/cli-util.ts | 24 ++++++++++---- packages/schema/src/cli/index.ts | 20 ++++++++---- packages/schema/src/utils/pkg-utils.ts | 8 ++--- samples/todo/package-lock.json | 44 ++++++++++++++------------ samples/todo/package.json | 6 ++-- 9 files changed, 75 insertions(+), 49 deletions(-) diff --git a/docs/cli-commands.md b/docs/cli-commands.md index 2730da14e..6866282dc 100644 --- a/docs/cli-commands.md +++ b/docs/cli-commands.md @@ -8,6 +8,12 @@ Set up ZenStack for an existing Next.js + Typescript project. npx zenstack init [dir] ``` +_Options_: + +``` + -p, --package-manager : package manager to use: "npm", "yarn", or "pnpm" (default: auto detect) +``` + ## `generate` Generates RESTful CRUD API and React hooks from your model. @@ -19,7 +25,9 @@ npx zenstack generate [options] _Options_: ``` - --schema schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel") + --schema : schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel") + + -p, --package-manager : package manager to use: "npm", "yarn", or "pnpm" (default: auto detect) ``` ## `migrate` diff --git a/package.json b/package.json index b2cc5930c..f85a235a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zenstack-monorepo", - "version": "0.3.11", + "version": "0.3.12", "description": "", "scripts": { "build": "pnpm -r build", diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 02ec1d9fa..e109c116c 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,7 +1,7 @@ { "name": "@zenstackhq/runtime", "displayName": "ZenStack Runtime Library", - "version": "0.3.11", + "version": "0.3.12", "description": "Runtime of ZenStack for both client-side and server-side environments.", "repository": { "type": "git", @@ -26,13 +26,13 @@ "deepcopy": "^2.1.0", "swr": "^1.3.0", "tslib": "^2.4.1", + "@types/bcryptjs": "^2.4.2", + "bcryptjs": "^2.4.3", "zod": "^3.19.1", "zod-validation-error": "^0.2.1" }, "peerDependencies": { - "@types/bcryptjs": "^2.4.2", - "bcryptjs": "^2.4.3", - "next": "^12.3.1", + "next": "^12.3.1 || ^13", "react": "^17.0.2 || ^18", "react-dom": "^17.0.2 || ^18" }, diff --git a/packages/schema/package.json b/packages/schema/package.json index 5f0ec71a6..329c3c937 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -3,7 +3,7 @@ "publisher": "zenstack", "displayName": "ZenStack Language Tools", "description": "A toolkit for modeling data and access policies in full-stack development with Next.js and Typescript", - "version": "0.3.11", + "version": "0.3.12", "author": { "name": "ZenStack Team" }, diff --git a/packages/schema/src/cli/cli-util.ts b/packages/schema/src/cli/cli-util.ts index 2f80d5c1c..bab3b8d4a 100644 --- a/packages/schema/src/cli/cli-util.ts +++ b/packages/schema/src/cli/cli-util.ts @@ -6,7 +6,7 @@ import fs from 'fs'; import { LangiumServices } from 'langium'; import { NodeFileSystem } from 'langium/node'; import path from 'path'; -import { installPackage } from 'src/utils/pkg-utils'; +import { installPackage, PackageManagers } from '../utils/pkg-utils'; import { URI } from 'vscode-uri'; import { ZenStackGenerator } from '../generator'; import { GENERATED_CODE_PATH } from '../generator/constants'; @@ -16,7 +16,15 @@ import { CliError } from './cli-error'; /** * Initializes an existing project for ZenStack */ -export async function initProject(projectPath: string) { +export async function initProject( + projectPath: string, + packageManager: PackageManagers | undefined +) { + if (!fs.existsSync(projectPath)) { + console.error(`Path does not exist: ${projectPath}`); + throw new CliError('project path does not exist'); + } + const schema = path.join(projectPath, 'zenstack', 'schema.zmodel'); let schemaGenerated = false; @@ -96,16 +104,18 @@ model Post { schemaGenerated = true; } - installPackage('zenstack', true, undefined, projectPath); - installPackage('@zenstackhq/runtime', false, undefined, projectPath); + installPackage('zenstack', true, packageManager, projectPath); + installPackage('@zenstackhq/runtime', false, packageManager, projectPath); if (schemaGenerated) { - console.log(`Sample model generated at: ${colors.green(schema)} + console.log(`Sample model generated at: ${colors.blue(schema)} Please check the following guide on how to model your app: https://zenstack.dev/#/modeling-your-app. - `); + `); } + + console.log(colors.green('\nProject initialized successfully!')); } /** @@ -173,7 +183,7 @@ export async function loadDocument( } export async function runGenerator( - options: { schema: string; packageManager: string }, + options: { schema: string; packageManager: PackageManagers | undefined }, includedGenerators?: string[], clearOutput = true ) { diff --git a/packages/schema/src/cli/index.ts b/packages/schema/src/cli/index.ts index 37c2d1c69..40787e1e3 100644 --- a/packages/schema/src/cli/index.ts +++ b/packages/schema/src/cli/index.ts @@ -3,25 +3,31 @@ import { paramCase } from 'change-case'; import colors from 'colors'; import { Command, Option } from 'commander'; import path from 'path'; +import { PackageManagers } from '../utils/pkg-utils'; import { ZModelLanguageMetaData } from '../language-server/generated/module'; import telemetry from '../telemetry'; import { execSync } from '../utils/exec-utils'; import { CliError } from './cli-error'; import { initProject, runGenerator } from './cli-util'; -export const initAction = async (projectPath: string): Promise => { +export const initAction = async ( + projectPath: string, + options: { + packageManager: PackageManagers | undefined; + } +): Promise => { await telemetry.trackSpan( 'cli:command:start', 'cli:command:complete', 'cli:command:error', { command: 'init' }, - () => initProject(projectPath) + () => initProject(projectPath, options.packageManager) ); }; export const generateAction = async (options: { schema: string; - packageManager: string; + packageManager: PackageManagers | undefined; }): Promise => { await telemetry.trackSpan( 'cli:command:start', @@ -118,9 +124,9 @@ export default async function (): Promise { ).default('./zenstack/schema.zmodel'); const pmOption = new Option( - '--package-manager, -p', - 'package manager to use: "npm", "yarn" or "pnpm"' - ).default('auto detect'); + '-p, --package-manager ', + 'package manager to use' + ).choices(['npm', 'yarn', 'pnpm']); //#region wraps Prisma commands @@ -128,7 +134,7 @@ export default async function (): Promise { .command('init') .description('Set up a new ZenStack project.') .addOption(pmOption) - .argument('', 'project path') + .argument('[path]', 'project path', '.') .action(initAction); program diff --git a/packages/schema/src/utils/pkg-utils.ts b/packages/schema/src/utils/pkg-utils.ts index dc65f0009..9662cb59c 100644 --- a/packages/schema/src/utils/pkg-utils.ts +++ b/packages/schema/src/utils/pkg-utils.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import path from 'path'; import { execSync } from './exec-utils'; -type PackageManagers = 'npm' | 'yarn' | 'pnpm'; +export type PackageManagers = 'npm' | 'yarn' | 'pnpm'; function getPackageManager(projectPath = '.'): PackageManagers { if (fs.existsSync(path.join(projectPath, 'yarn.lock'))) { @@ -25,9 +25,9 @@ export function installPackage( switch (manager) { case 'yarn': execSync( - `yarn add --cwd "${projectPath}" ${ - dev ? ' --save-dev' : '' - } ${pkg}` + `yarn --cwd "${projectPath}" add ${pkg} ${ + dev ? ' --dev' : '' + } --ignore-engines` ); break; diff --git a/samples/todo/package-lock.json b/samples/todo/package-lock.json index 7a41c7a76..678705d5f 100644 --- a/samples/todo/package-lock.json +++ b/samples/todo/package-lock.json @@ -1,16 +1,16 @@ { "name": "todo", - "version": "0.3.11", + "version": "0.3.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "todo", - "version": "0.3.11", + "version": "0.3.12", "dependencies": { "@heroicons/react": "^2.0.12", "@prisma/client": "^4.4.0", - "@zenstackhq/runtime": "^0.3.11", + "@zenstackhq/runtime": "^0.3.12", "bcryptjs": "^2.4.3", "daisyui": "^2.31.0", "moment": "^2.29.4", @@ -35,7 +35,7 @@ "postcss": "^8.4.16", "tailwindcss": "^3.1.8", "typescript": "^4.6.2", - "zenstack": "^0.3.11" + "zenstack": "^0.3.12" } }, "../../packages/runtime": { @@ -752,10 +752,12 @@ } }, "node_modules/@zenstackhq/runtime": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.11.tgz", - "integrity": "sha512-LUxB0QaeeLPnGdC1+H89ViNLL46FF+yGiU2IkvXfWMN5Y+r1zNL4ikVSZCkDa6vJxM8TaBzVEflbps4DJjbCww==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.12.tgz", + "integrity": "sha512-akXxw4h8uHOp4XHw5y1KSjL7A1URtRandWeXU82FLYBG6DKrjBUQuNhY2M+jD6BCboNiLOBzAJ54EPaJVr27uw==", "dependencies": { + "@types/bcryptjs": "^2.4.2", + "bcryptjs": "^2.4.3", "colors": "1.4.0", "cuid": "^2.1.8", "decimal.js": "^10.4.2", @@ -766,9 +768,7 @@ "zod-validation-error": "^0.2.1" }, "peerDependencies": { - "@types/bcryptjs": "^2.4.2", - "bcryptjs": "^2.4.3", - "next": "^12.3.1", + "next": "^12.3.1 || ^13", "react": "^17.0.2 || ^18", "react-dom": "^17.0.2 || ^18" } @@ -4605,12 +4605,12 @@ } }, "node_modules/zenstack": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.11.tgz", - "integrity": "sha512-ypohX9ijyZfzqMR3ZpCyDvuLnfIYo2CdgMZ7NjvZofkiNvlMYBEvP1mvDwM4mVGt9PZFxwkm+XaQvSCMzGnvHg==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.12.tgz", + "integrity": "sha512-oy1LiE18x7E2gGw+N+1eDOS5LXRTTUoYOvnBcBwflSSvHKdGddsIocrlSav/3y8uIwO2JdMjvh6NB88zpc11KA==", "dev": true, "dependencies": { - "@zenstackhq/runtime": "0.3.11", + "@zenstackhq/runtime": "0.3.12", "async-exit-hook": "^2.0.1", "change-case": "^4.1.2", "chevrotain": "^9.1.0", @@ -5129,10 +5129,12 @@ } }, "@zenstackhq/runtime": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.11.tgz", - "integrity": "sha512-LUxB0QaeeLPnGdC1+H89ViNLL46FF+yGiU2IkvXfWMN5Y+r1zNL4ikVSZCkDa6vJxM8TaBzVEflbps4DJjbCww==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@zenstackhq/runtime/-/runtime-0.3.12.tgz", + "integrity": "sha512-akXxw4h8uHOp4XHw5y1KSjL7A1URtRandWeXU82FLYBG6DKrjBUQuNhY2M+jD6BCboNiLOBzAJ54EPaJVr27uw==", "requires": { + "@types/bcryptjs": "^2.4.2", + "bcryptjs": "^2.4.3", "colors": "1.4.0", "cuid": "^2.1.8", "decimal.js": "^10.4.2", @@ -7924,12 +7926,12 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" }, "zenstack": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.11.tgz", - "integrity": "sha512-ypohX9ijyZfzqMR3ZpCyDvuLnfIYo2CdgMZ7NjvZofkiNvlMYBEvP1mvDwM4mVGt9PZFxwkm+XaQvSCMzGnvHg==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/zenstack/-/zenstack-0.3.12.tgz", + "integrity": "sha512-oy1LiE18x7E2gGw+N+1eDOS5LXRTTUoYOvnBcBwflSSvHKdGddsIocrlSav/3y8uIwO2JdMjvh6NB88zpc11KA==", "dev": true, "requires": { - "@zenstackhq/runtime": "0.3.11", + "@zenstackhq/runtime": "0.3.12", "async-exit-hook": "^2.0.1", "change-case": "^4.1.2", "chevrotain": "^9.1.0", diff --git a/samples/todo/package.json b/samples/todo/package.json index 32d899f17..31c6f672f 100644 --- a/samples/todo/package.json +++ b/samples/todo/package.json @@ -1,6 +1,6 @@ { "name": "todo", - "version": "0.3.11", + "version": "0.3.12", "private": true, "scripts": { "dev": "next dev", @@ -21,7 +21,7 @@ "dependencies": { "@heroicons/react": "^2.0.12", "@prisma/client": "^4.4.0", - "@zenstackhq/runtime": "^0.3.11", + "@zenstackhq/runtime": "^0.3.12", "bcryptjs": "^2.4.3", "daisyui": "^2.31.0", "moment": "^2.29.4", @@ -46,6 +46,6 @@ "postcss": "^8.4.16", "tailwindcss": "^3.1.8", "typescript": "^4.6.2", - "zenstack": "^0.3.11" + "zenstack": "^0.3.12" } } From 7b8a5e944dbcc87b10d0032fb141b1b93530bac4 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Fri, 25 Nov 2022 15:23:52 +0800 Subject: [PATCH 7/7] update lock file --- pnpm-lock.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86dab9d63..8c90bcdb2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: cuid: ^2.1.8 decimal.js: ^10.4.2 deepcopy: ^2.1.0 - next: ^12.3.1 + next: ^12.3.1 || ^13 react: ^17.0.2 || ^18 react-dom: ^17.0.2 || ^18 rimraf: ^3.0.2 @@ -28,6 +28,7 @@ importers: zod: ^3.19.1 zod-validation-error: ^0.2.1 dependencies: + '@types/bcryptjs': 2.4.2 bcryptjs: 2.4.3 colors: 1.4.0 cuid: 2.1.8 @@ -41,7 +42,6 @@ importers: zod: 3.19.1 zod-validation-error: 0.2.1_zod@3.19.1 devDependencies: - '@types/bcryptjs': 2.4.2 '@types/jest': 29.2.0 '@types/node': 14.18.32 rimraf: 3.0.2 @@ -1903,7 +1903,6 @@ packages: /@types/bcryptjs/2.4.2: resolution: {integrity: sha512-LiMQ6EOPob/4yUL66SZzu6Yh77cbzJFYll+ZfaPiPPFswtIlA/Fs1MzdKYA7JApHU49zQTbJGX3PDmCpIdDBRQ==} - dev: true /@types/cookiejar/2.1.2: resolution: {integrity: sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==}