diff --git a/api/aeria-sdk.d.ts b/api/aeria-sdk.d.ts new file mode 100644 index 0000000..72c4df8 --- /dev/null +++ b/api/aeria-sdk.d.ts @@ -0,0 +1,539 @@ +import type { + InferProperty, + InferResponse, + SchemaWithId, + MakeEndpoint, + RequestMethod, + CollectionFunctions + +} from '@aeriajs/types' + +declare type MirrorDescriptions = { + "user": { + "$id": "user", + "required": [ + "name", + "roles", + "email" + ], + "form": [ + "name", + "active", + "roles", + "email", + "phone_number", + "picture_file" + ], + "indexes": [ + "name" + ], + "freshItem": { + "active": true + }, + "properties": { + "name": { + "type": "string" + }, + "given_name": { + "readOnly": true + }, + "family_name": { + "readOnly": true + }, + "active": { + "type": "boolean" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "email": { + "type": "string", + "inputType": "email", + "unique": true + }, + "password": { + "type": "string", + "inputType": "password", + "hidden": true + }, + "phone_number": { + "type": "string", + "mask": "(##) #####-####" + }, + "picture_file": { + "$ref": "file", + "accept": [ + "image/*" + ], + "indexes": [ + "filename", + "link", + "mime" + ] + }, + "picture": { + "readOnly": true + }, + "group": { + "type": "string" + }, + "self_registered": { + "type": "boolean", + "readOnly": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + } + }, + "presets": [ + "crud", + "view", + "duplicate" + ], + "layout": { + "name": "grid", + "options": { + "title": "name", + "badge": "roles", + "picture": "picture_file", + "information": "email", + "active": "active", + "translateBadge": true + } + }, + "individualActions": { + "ui:spawnEdit": { + "name": "action.edit", + "icon": "pencil-simple", + "translate": true + }, + "route:/dashboard/user/changepass": { + "name": "Mudar senha", + "icon": "key", + "fetchItem": true + }, + "remove": { + "name": "action.remove", + "icon": "trash", + "ask": true, + "translate": true + }, + "ui:spawnView": { + "name": "action.view", + "icon": "magnifying-glass-plus", + "translate": true + }, + "ui:duplicate": { + "name": "action.duplicate", + "icon": "copy", + "translate": true + } + }, + "icon": "users", + "filters": [ + "name", + "roles", + "email", + "phone_number" + ], + "table": [ + "name", + "roles", + "picture_file", + "active", + "updated_at" + ], + "tableMeta": [ + "email" + ], + "formLayout": { + "fields": { + "given_name": { + "span": 3 + }, + "family_name": { + "span": 3 + } + } + }, + "actions": { + "ui:spawnAdd": { + "name": "action.add", + "icon": "plus", + "translate": true, + "button": true + } + } + }, + "file": { + "$id": "file", + "owned": "always", + "presets": [ + "owned" + ], + "indexes": [ + "filename", + "link", + "mime" + ], + "properties": { + "mime": { + "type": "string" + }, + "size": { + "type": "number" + }, + "last_modified": { + "type": "string", + "format": "date-time" + }, + "filename": { + "type": "string" + }, + "absolute_path": { + "type": "string" + }, + "relative_path": { + "type": "string" + }, + "immutable": { + "type": "boolean" + }, + "link": { + "readOnly": true + }, + "download_link": { + "readOnly": true + }, + "owner": { + "$ref": "user", + "noForm": true, + "indexes": [ + "name" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + } + }, + "actions": { + "deleteAll": { + "name": "Remover", + "ask": true, + "selection": true + } + }, + "individualActions": { + "remove": { + "name": "Remover", + "icon": "trash", + "ask": true + } + } + }, + "tempFile": { + "$id": "tempFile", + "temporary": { + "index": "created_at", + "expireAfterSeconds": 3600 + }, + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + }, + "absolute_path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "mime": { + "type": "number" + }, + "collection": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + } + } + }, + "log": { + "$id": "log", + "required": [ + "context", + "message" + ], + "properties": { + "owner": { + "$ref": "user", + "noForm": true, + "indexes": [ + "name" + ] + }, + "context": { + "type": "string" + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "variable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + } + }, + "icon": "magnifying-glass", + "presets": [ + "view" + ], + "filters": [ + "context", + "message", + "owner" + ], + "individualActions": { + "ui:spawnView": { + "name": "action.view", + "icon": "magnifying-glass-plus", + "translate": true + } + } + }, + "resourceUsage": { + "$id": "resourceUsage", + "required": [], + "properties": { + "hits": { + "type": "integer" + }, + "last_maximum_reach": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + } + } + }, + "pizza": { + "$id": "pizza", + "icon": "pizza", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "flavor": { + "literal": "cheese" + }, + "price": { + "type": "number" + }, + "rating": { + "type": "integer", + "minimum": 1, + "maximum": 5 + }, + "created_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "noForm": true, + "readOnly": true, + "isTimestamp": true + } + }, + "presets": [ + "crud" + ], + "actions": { + "ui:spawnAdd": { + "name": "action.add", + "icon": "plus", + "translate": true, + "button": true + } + }, + "individualActions": { + "ui:spawnEdit": { + "name": "action.edit", + "icon": "pencil-simple", + "translate": true + }, + "remove": { + "name": "action.remove", + "icon": "trash", + "ask": true, + "translate": true + } + } + } +} + + +declare type MirrorRouter = { + "/pizza/topRatedPizzas": { + "GET": null + }, + "/pizza/shampoo123": { + "POST": { + "payload": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "enum": [ + "dog", + "alien", + "human" + ] + } + } + }, + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "now": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } +} + + +declare global { + type Collections = { + [K in keyof MirrorDescriptions]: { + item: SchemaWithId + } + } +} + +declare module 'aeria-sdk' { + import { TopLevelObject, TLOFunctions } from 'aeria-sdk' + + type UnionToIntersection = (T extends any ? ((x: T) => 0) : never) extends ((x: infer R) => 0) + ? R + : never + + type Endpoints = { + [Route in keyof MirrorRouter]: { + [Method in keyof MirrorRouter[Route]]: Method extends RequestMethod + ? MirrorRouter[Route][Method] extends infer Contract + ? Contract extends + | { response: infer RouteResponse } + | { payload: infer RoutePayload } + | { query: infer RoutePayload } + ? MakeEndpoint, InferProperty> + : MakeEndpoint + : never + : never + } extends infer Methods + ? Methods[keyof Methods] + : never + } extends infer Endpoints + ? UnionToIntersection + : never + + type StrongelyTypedTLO = TopLevelObject & Endpoints & { + [K in keyof MirrorDescriptions]: SchemaWithId extends infer Document + ? CollectionFunctions extends infer Functions + ? Omit & { + [P in keyof Functions]: { + POST: Functions[P] + } + } + : never + : never + } + + export const url: string + export const aeria: StrongelyTypedTLO +} + + \ No newline at end of file diff --git a/api/aeria.d.ts b/api/aeria.d.ts new file mode 100644 index 0000000..eb6fe96 --- /dev/null +++ b/api/aeria.d.ts @@ -0,0 +1,33 @@ +// this file will be overwritten +import type {} from '@aeriajs/types' + +declare global { + type UnpackCollections = { + [P in keyof TCollections]: TCollections[P] extends infer Candidate + ? Candidate extends (...args: any[]) => infer Coll + ? Coll + : Candidate + : never + } + + type Collections = typeof import('.') extends infer EntrypointModule + ? 'collections' extends keyof EntrypointModule + ? UnpackCollections + : 'default' extends keyof EntrypointModule + ? EntrypointModule['default'] extends infer Entrypoint + ? 'options' extends keyof Entrypoint + ? 'collections' extends keyof Entrypoint['options'] + ? UnpackCollections + : never + : never + : never + : never + : never +} + +declare module 'aeria' { + import type { Context } from 'aeria' + export const useAeria: () => Promise + export const aeria: Context +} +// \ No newline at end of file diff --git a/api/package.json b/api/package.json index 394043f..bf99374 100644 --- a/api/package.json +++ b/api/package.json @@ -5,18 +5,27 @@ "main": "dist/index.js", "types": "src/index.ts", "scripts": { - "build": "sonata-build -ci", - "migrate": "sonata-build -m", - "dev": "sonata-build -w", - "start": "node -r sonata-api/loader ./release/index.js" + "build": "aeria -ci", + "migrate": "aeria -m", + "dev": "aeria -w", + "start": "node -r aeria/loader ./release/index.js" + }, + "aeriaSdk": { + "apiUrl": { + "development": "http://localhost:3000/api" + }, + "storage": { + "strategy": "localStorage", + "namespace": "aeria" + } }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "sonata-api": "latest" + "aeria": "latest" }, "devDependencies": { - "sonata-build": "latest" + "aeria-build": "latest" } } diff --git a/api/sonata-api.d.ts b/api/sonata-api.d.ts index 75f0dfa..5360c50 100644 --- a/api/sonata-api.d.ts +++ b/api/sonata-api.d.ts @@ -1,5 +1,5 @@ // this file will be overwritten -import type {} from '@sonata-api/types' +import type {} from '@aeriajs/types' declare global { type UnpackCollections = { diff --git a/api/src/collections/index.ts b/api/src/collections/index.ts index 28bcff2..0c3e761 100644 --- a/api/src/collections/index.ts +++ b/api/src/collections/index.ts @@ -7,5 +7,5 @@ export { log, resourceUsage, -} from 'sonata-api' +} from 'aeria' diff --git a/api/src/collections/pizza/index.ts b/api/src/collections/pizza/index.ts index 53c05e9..ebb2649 100644 --- a/api/src/collections/pizza/index.ts +++ b/api/src/collections/pizza/index.ts @@ -1,4 +1,4 @@ -import { defineCollection, get, getAll, insert, remove } from 'sonata-api' +import { defineCollection, get, getAll, insert, remove } from 'aeria' export const pizza = defineCollection({ description: { @@ -9,6 +9,9 @@ export const pizza = defineCollection({ name: { type: 'string', }, + flavor: { + literal: 'cheese', + }, price: { type: 'number', }, diff --git a/api/src/index.ts b/api/src/index.ts index ab0de13..a430c8e 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -1,4 +1,4 @@ -import { init, createRouter } from 'sonata-api' +import { init, createRouter } from 'aeria' import { pizzaRoutes } from './routes/index.js' export * as collections from './collections/index.js' diff --git a/api/src/routes/pizzaRoutes.ts b/api/src/routes/pizzaRoutes.ts index 0f16b81..38ccbc4 100644 --- a/api/src/routes/pizzaRoutes.ts +++ b/api/src/routes/pizzaRoutes.ts @@ -1,4 +1,4 @@ -import { createRouter } from 'sonata-api' +import { createRouter } from 'aeria' export const pizzaRoutes = createRouter() @@ -11,3 +11,53 @@ pizzaRoutes.GET('/topRatedPizzas', (context) => { }) }) +pizzaRoutes.POST('/shampoo123', (context) => { + return [ + { + name: context.request.payload.name, + now: new Date(), + age: 24, + }, + ] + // return context.collections.pizza.functions.getAll({ + // limit: 5, + // sort: { + // rating: -1, + // }, + // }) +}, { + payload: { + type: 'object', + properties: { + name: { + type: 'string', + }, + type: { + enum: [ + 'dog', + 'alien', + 'human', + ], + }, + }, + }, + response: { + type: 'array', + items: { + type: 'object', + properties: { + name: { + type: 'string', + }, + age: { + type: 'number', + }, + now: { + type: 'string', + format: 'date-time', + }, + }, + }, + }, +}) + diff --git a/api/tsconfig.json b/api/tsconfig.json index 9c0e75c..50f9997 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -1,7 +1,12 @@ { - "extends": "sonata-build/config/tsconfig.json", + "extends": "aeria-build/config/tsconfig.json", "compilerOptions": { "outDir": "dist", "preserveSymlinks": true - } + }, + "include": [ + "src", + "@types/*.d.ts", + "sonata-api.d.ts" + ] } diff --git a/package-lock.json b/package-lock.json index ce91aa0..e64dbe4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,10 +29,10 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "sonata-api": "latest" + "aeria": "latest" }, "devDependencies": { - "sonata-build": "latest" + "aeria-build": "latest" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -45,6 +45,212 @@ "node": ">=0.10.0" } }, + "node_modules/@aeria-ui/i18n": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@aeria-ui/i18n/-/i18n-0.0.0.tgz", + "integrity": "sha512-ifDQtjscNVIJYNWpIYJs3GqQsFFN4CJQqm68KV4xdw9PARyA3OAL/VchudxB0Fc2r8Srr+BhrjsRqSsUTLnhNQ==", + "peer": true, + "peerDependencies": { + "@aeriajs/common": "*" + } + }, + "node_modules/@aeria-ui/i18n-ptbr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@aeria-ui/i18n-ptbr/-/i18n-ptbr-0.0.0.tgz", + "integrity": "sha512-rpnuPr4SzefE4gHK+jf9TsRCrzZcjyjJBekRmHzagnX7Q2926swOTWnVM6pS7rjO9AR7XKqloFh88O1MAmMTyw==" + }, + "node_modules/@aeria-ui/state-management": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@aeria-ui/state-management/-/state-management-0.0.0.tgz", + "integrity": "sha512-PRTfZ+jlwIzQrV+0RGYvUPEiUtH1MwrmtTUUtqp71p3vTszlestPS3IzhQNeixGdBPkZ0xpZdm+Eh2KQIkoKeg==", + "peer": true, + "peerDependencies": { + "vue": "*" + } + }, + "node_modules/@aeria-ui/ui": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@aeria-ui/ui/-/ui-0.0.5.tgz", + "integrity": "sha512-OsrNsSY3/fHTm+yLkEG4NJJYrP0N6j9GevGaCKRzXaY3bQQfxOHGQPROxY9/BuAU9rOlOFgRATu5LwCEmJ2zBA==", + "peer": true, + "dependencies": { + "maska": "^2.1.10" + }, + "peerDependencies": { + "@aeria-ui/i18n": "^0.0.0", + "@aeria-ui/state-management": "^0.0.0", + "@aeria-ui/web": "^0.0.5", + "@aeriajs/common": "*", + "vue-router": "*" + } + }, + "node_modules/@aeria-ui/web": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@aeria-ui/web/-/web-0.0.5.tgz", + "integrity": "sha512-8Orlgn7KnkIIsv27MP9rTRxCks4XNR0ik+XD/y+9Sv3NwTrCr33a3QmCMN8GX0XlZYe+sK+Sb0OnwrySeeGttQ==", + "hasInstallScript": true, + "peer": true, + "dependencies": { + "@aeriajs/common": "*", + "@aeriajs/types": "*", + "vue": "^3.4.15", + "vue-demi": "^0.13.6", + "vue-router": "^4.2.5" + }, + "peerDependencies": { + "@aeria-ui/i18n": "^0.0.0", + "@aeria-ui/state-management": "^0.0.0", + "aeria-sdk": "^0.0.17" + } + }, + "node_modules/@aeriajs/access-control": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@aeriajs/access-control/-/access-control-0.0.1.tgz", + "integrity": "sha512-mhZye42BaEOpNv77hYH2f4NdymG8oSAJp7Hm0GJuvQ/gWOB2Cq5dcNNLz9To1FTsw7kEF2gWdt84teOMrkKl/A==", + "peer": true, + "peerDependencies": { + "@aeriajs/common": "^0.0.1", + "@aeriajs/entrypoint": "^0.0.1", + "@aeriajs/types": "^0.0.0" + } + }, + "node_modules/@aeriajs/api": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@aeriajs/api/-/api-0.0.3.tgz", + "integrity": "sha512-A6ci1QaQbhN7VYznn94eGlKPgGZqUlTmhvt5KuaiCQvdDxmSRqjLRupWeSGSG3a7g5I1PX1MfF9szE1YO8PpSQ==", + "hasInstallScript": true, + "peer": true, + "optionalDependencies": { + "mongodb-memory-server": "^8.10.2" + }, + "peerDependencies": { + "@aeriajs/access-control": "^0.0.1", + "@aeriajs/builtins": "^0.0.3", + "@aeriajs/common": "^0.0.1", + "@aeriajs/entrypoint": "^0.0.1", + "@aeriajs/http": "^0.0.3", + "@aeriajs/security": "^0.0.3", + "@aeriajs/types": "^0.0.0", + "@aeriajs/validation": "^0.0.3", + "jsonwebtoken": "^8.5.1", + "mongodb": "^6.1.0" + } + }, + "node_modules/@aeriajs/builtins": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@aeriajs/builtins/-/builtins-0.0.3.tgz", + "integrity": "sha512-c3cDx1dC0yP5fLW/+PT9PJt1EjpqG+RVTanH4QAFpn0DhzAkDfm7jiDmts2i69Q71fpuqRY0G+qqEnJAQd5rsQ==", + "peer": true, + "dependencies": { + "bcrypt": "^5.1.0" + }, + "peerDependencies": { + "@aeriajs/access-control": "^0.0.1", + "@aeriajs/api": "^0.0.3", + "@aeriajs/common": "^0.0.1", + "@aeriajs/entrypoint": "^0.0.1", + "@aeriajs/types": "^0.0.0", + "@aeriajs/validation": "^0.0.3" + } + }, + "node_modules/@aeriajs/builtins-icons": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@aeriajs/builtins-icons/-/builtins-icons-0.0.0.tgz", + "integrity": "sha512-gldi4C7EAzg+pN3dRkMiYQO5gVEeKck3CC/Cud7Ipy4XAFSP0QUpYQHlrZ03BbNVq/7IqdzmUvHvRZdpxv7Ayg==", + "peer": true + }, + "node_modules/@aeriajs/common": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@aeriajs/common/-/common-0.0.1.tgz", + "integrity": "sha512-lf29sgOGOVBNR38j3viZ7Iu3ORtARDYbIvkVdI+Ilgtw9NE3zWZJFjwbt+XC4FXrNZch6ctgt7hbtxsOx4cTfA==", + "peer": true, + "peerDependencies": { + "@aeriajs/types": "^0.0.0", + "bson": "^5.4.0" + } + }, + "node_modules/@aeriajs/entrypoint": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@aeriajs/entrypoint/-/entrypoint-0.0.1.tgz", + "integrity": "sha512-z73I4xwmYLP3dhe7C5mN30YSvho2X35n2vTcXA4XjgWKu72gnAwuKJjKTZUMfE2W1CDk00pCZP9oqFvgNlALuw==", + "peer": true, + "peerDependencies": { + "@aeriajs/common": "^0.0.1", + "@aeriajs/types": "^0.0.0" + } + }, + "node_modules/@aeriajs/http": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@aeriajs/http/-/http-0.0.3.tgz", + "integrity": "sha512-FzUCTxUuva4z/QBPQH7ylsXI38HhbyPssn1+S1i80TFHhu7b7gOE5zh1VEHbhGU+i/Dtd4cKRB+X1Vv3DDI2rw==", + "peer": true, + "peerDependencies": { + "@aeriajs/access-control": "^0.0.1", + "@aeriajs/common": "^0.0.1", + "@aeriajs/types": "^0.0.0", + "@aeriajs/validation": "^0.0.3" + } + }, + "node_modules/@aeriajs/node-http": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@aeriajs/node-http/-/node-http-0.0.3.tgz", + "integrity": "sha512-hvjzSRU0I+WaYLl5e7BkYKnJ6qF3iuGHATlSu1E6j7PRl9o+0iOEB4pRgAk4r4cJjdWbLkC7Moscry8EyP6+XQ==", + "peer": true, + "peerDependencies": { + "@aeriajs/http": "^0.0.3" + } + }, + "node_modules/@aeriajs/security": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@aeriajs/security/-/security-0.0.3.tgz", + "integrity": "sha512-ez3MtPUMMtYQ7mTI00MTe4sp1ogzzGCxD4yUbw14ojHY9VZQDtftbIse3pMQLwUX5z9r7aLc6OooLGb/55carw==", + "peer": true, + "peerDependencies": { + "@aeriajs/api": "^0.0.3", + "@aeriajs/common": "^0.0.1", + "@aeriajs/types": "^0.0.0" + } + }, + "node_modules/@aeriajs/server": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@aeriajs/server/-/server-0.0.3.tgz", + "integrity": "sha512-MxyIwR38ZeS9PWoWPV2Sgvz38F5MDNZYnz1lr1FyDAlU1n/x7pNwBN7YTs3Yb73EmmN94rYfqn9+XMON9c3bLw==", + "peer": true, + "optionalDependencies": { + "@aeriajs/node-http": "^0.0.3" + }, + "peerDependencies": { + "@aeriajs/access-control": "^0.0.1", + "@aeriajs/api": "^0.0.3", + "@aeriajs/builtins": "^0.0.3", + "@aeriajs/common": "^0.0.1", + "@aeriajs/entrypoint": "^0.0.1", + "@aeriajs/http": "^0.0.3", + "@aeriajs/server": "^0.0.3", + "@aeriajs/types": "^0.0.0", + "mongodb": "^6.1.0" + } + }, + "node_modules/@aeriajs/types": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@aeriajs/types/-/types-0.0.0.tgz", + "integrity": "sha512-SMipf1zybYCUKjUw3YD+yyLz7RFg2CtNH30ViEQ8FAqHy++iFXpLIe48qje2/zxHKmIeo0PLuv1vU1tw32MVbQ==", + "peer": true, + "peerDependencies": { + "@phosphor-icons/core": "^2.0.6" + } + }, + "node_modules/@aeriajs/validation": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@aeriajs/validation/-/validation-0.0.3.tgz", + "integrity": "sha512-gmRQ1h0iPKjhrv6wxoQkR4ZW+MQ20nENTaB3BqT28zDIQnQtxcDixzdbRJcCxrLapPFntDsiXVRdQCqWLChBdQ==", + "peer": true, + "peerDependencies": { + "@aeriajs/common": "^0.0.1", + "@aeriajs/types": "^0.0.0", + "mongodb": "^6.1.0" + } + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -1953,19 +2159,29 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.4.tgz", - "integrity": "sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "devOptional": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, + "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "devOptional": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -3008,154 +3224,27 @@ "node": ">=14.0.0" } }, - "node_modules/@sonata-api/access-control": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/@sonata-api/access-control/-/access-control-1.0.20.tgz", - "integrity": "sha512-6x5CDfMB4q2mVIq7xN3OZ50QD4eBnD/T3fKMm7yX1CqKxhea/17apoMXb2WGfcrFwhmWIcL73NCEG+ubcjVvlQ==", - "peer": true, - "peerDependencies": { - "@sonata-api/common": "*", - "@sonata-api/entrypoint": "*", - "@sonata-api/types": "*" - } - }, - "node_modules/@sonata-api/api": { - "version": "1.0.56", - "resolved": "https://registry.npmjs.org/@sonata-api/api/-/api-1.0.56.tgz", - "integrity": "sha512-Kn0Bd8HyW7naIsdzq3BJkZS2cHlLa1MljiycBuT9fOxkn3AH4rYtcPEpbJ5kK6wNnI0FAbXIO9bQyJe5VzTdjA==", - "hasInstallScript": true, - "peer": true, - "optionalDependencies": { - "mongodb-memory-server": "^8.10.2" - }, - "peerDependencies": { - "@sonata-api/access-control": "*", - "@sonata-api/builtins": "*", - "@sonata-api/common": "*", - "@sonata-api/entrypoint": "*", - "@sonata-api/http": "*", - "@sonata-api/security": "*", - "@sonata-api/types": "*", - "@sonata-api/validation": "*", - "jsonwebtoken": "^8.5.1", - "mongodb": "^6.1.0" - } - }, - "node_modules/@sonata-api/builtins": { - "version": "1.0.35", - "resolved": "https://registry.npmjs.org/@sonata-api/builtins/-/builtins-1.0.35.tgz", - "integrity": "sha512-7o4yHDzVJGR8BUmzsS5/EeMo0vGaQSZSqF748227E2obmNVi3vwKqYn/i0qtjsowGu60pU4yd45XQh8jFQWhqw==", - "peer": true, - "dependencies": { - "bcrypt": "^5.1.0" - }, - "peerDependencies": { - "@sonata-api/access-control": "*", - "@sonata-api/api": "*", - "@sonata-api/common": "*", - "@sonata-api/entrypoint": "*", - "@sonata-api/types": "*", - "@sonata-api/validation": "*" - } - }, - "node_modules/@sonata-api/builtins-icons": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@sonata-api/builtins-icons/-/builtins-icons-0.0.3.tgz", - "integrity": "sha512-jaqxSkkFwFs7V5/IjXBLiPBHl0S/hiGpHpd7egaFTjDqYP5IBVMQ4CRiEQOBHNKpJZMWKy4GKGwc5CxhC0soTw==", - "peer": true - }, "node_modules/@sonata-api/common": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/@sonata-api/common/-/common-0.1.27.tgz", "integrity": "sha512-5hEC1NE6u9xj97oZqLYA84v4Rca9lHJrInQTN6yzgW7MPptTpDtZTC5z1mPA035YiOgocQAQOMvAegV6ps/uLw==", + "dev": true, "peer": true, "peerDependencies": { "@sonata-api/types": "*", "bson": "^5.4.0" } }, - "node_modules/@sonata-api/entrypoint": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/@sonata-api/entrypoint/-/entrypoint-0.0.23.tgz", - "integrity": "sha512-2lyaWbgUeC9hLsOLd7DboocT/aXhCrm/g26a8vwnI8JQrV+K36CKxVKuYY5vlNrXvF9Qzvs/1Jq9E1rd0AwejQ==", - "peer": true, - "peerDependencies": { - "@sonata-api/common": "*", - "@sonata-api/types": "*" - } - }, - "node_modules/@sonata-api/http": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/@sonata-api/http/-/http-1.0.25.tgz", - "integrity": "sha512-brOBGo+i9qyl8zc6wv8BnacGBXRxGDPPTadDlJoeADq9K5USsPqdFKk/zh4w6HHmZmxUlYgWhWWWQ3PjnCJSog==", - "peer": true, - "peerDependencies": { - "@sonata-api/access-control": "*", - "@sonata-api/common": "*", - "@sonata-api/types": "*", - "@sonata-api/validation": "*" - } - }, - "node_modules/@sonata-api/node-http": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/@sonata-api/node-http/-/node-http-1.0.16.tgz", - "integrity": "sha512-4+uDPh83Rh3CNIHY70D9uJsqbrkecNGX2GgFDzt45SfxUX8MKJoi+A78mFka+Ehbuj35lqmv5wJzBYj3oYf4Sw==", - "peer": true, - "peerDependencies": { - "@sonata-api/http": "*" - } - }, - "node_modules/@sonata-api/security": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/@sonata-api/security/-/security-1.0.20.tgz", - "integrity": "sha512-Bxjc8CKW6NCNIQVcp01TOdAP4gHX8clhFROfCcW5lakXbAZLphSiyTlrMkb/ABf37tEfyES7123cC4ChH+A4tA==", - "peer": true, - "peerDependencies": { - "@sonata-api/api": "*", - "@sonata-api/common": "*", - "@sonata-api/types": "*" - } - }, - "node_modules/@sonata-api/server": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@sonata-api/server/-/server-1.0.24.tgz", - "integrity": "sha512-gs6s2zZBdhsOtJco8glOXZWw3t9ZxSAuXBXBpBn8ihu88ERafwLg78z35FSlolK2TF6YSGS7H9XtA67keFO7Xw==", - "peer": true, - "optionalDependencies": { - "@sonata-api/node-http": "*" - }, - "peerDependencies": { - "@sonata-api/access-control": "*", - "@sonata-api/api": "*", - "@sonata-api/builtins": "*", - "@sonata-api/common": "*", - "@sonata-api/entrypoint": "*", - "@sonata-api/http": "*", - "@sonata-api/server": "*", - "@sonata-api/types": "*", - "mongodb": "^6.1.0" - } - }, "node_modules/@sonata-api/types": { "version": "0.1.47", "resolved": "https://registry.npmjs.org/@sonata-api/types/-/types-0.1.47.tgz", "integrity": "sha512-aWHQlxGsr7F6d0gCPddtIm4b8tT0cFeVXnAiQBI0B42dk0HIbHMHnjOriwc/FIhJHLa0kax0a7pmjBUHeLwvwA==", + "dev": true, "peer": true, "peerDependencies": { "@phosphor-icons/core": "^2.0.6" } }, - "node_modules/@sonata-api/validation": { - "version": "1.0.22", - "resolved": "https://registry.npmjs.org/@sonata-api/validation/-/validation-1.0.22.tgz", - "integrity": "sha512-Ia77dt5i4OXTEZdYNlgll7wjnfXxbkTSZZpLNyoy3VMzCEx/xHKeNvbOyRNxPY6V6iLW5V2XPSIfyS/bm1klmw==", - "peer": true, - "peerDependencies": { - "@sonata-api/common": "*", - "@sonata-api/types": "*", - "mongodb": "*" - } - }, "node_modules/@stylistic/eslint-plugin": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-1.6.3.tgz", @@ -3829,62 +3918,6 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.21.tgz", "integrity": "sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==" }, - "node_modules/@waltz-ui/i18n": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@waltz-ui/i18n/-/i18n-1.0.8.tgz", - "integrity": "sha512-B2t9ru2xx55rXzEkFDXmnVoqjSCM2yZyHxmXX/YJ9Jxi6nBvBYFAjP7jN86zyJXNZ5Xk6RHNZyLRE0raMtDekw==", - "peer": true, - "peerDependencies": { - "@sonata-api/common": "*" - } - }, - "node_modules/@waltz-ui/i18n-ptbr": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@waltz-ui/i18n-ptbr/-/i18n-ptbr-0.0.4.tgz", - "integrity": "sha512-o+wIAa8We5sJjRNrA2038idtWL4gC32tpbIUyH66Thnv4KctMZGuVFNxFVEAr4ZqC68a5rTRFy5j6TYKqBUneg==" - }, - "node_modules/@waltz-ui/state-management": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/@waltz-ui/state-management/-/state-management-0.1.11.tgz", - "integrity": "sha512-hFJMx1sIZ0pKSC59y28o/ydI1Y06+CEjiCik6onRw3nTEuZN8sifzq8evyizbF8my92u0r1o6A7Czeay8YkpTQ==", - "peer": true, - "peerDependencies": { - "vue": "*" - } - }, - "node_modules/@waltz-ui/ui": { - "version": "1.0.52", - "resolved": "https://registry.npmjs.org/@waltz-ui/ui/-/ui-1.0.52.tgz", - "integrity": "sha512-AIzFDGJJSfPAqdiB265YV4Qyk5HLOgBWWFztL2jmArbC8v5rWe5Nv8oA83PD80tFjFwYOJac/o1evuWAtMpGMg==", - "peer": true, - "dependencies": { - "maska": "^2.1.10" - }, - "peerDependencies": { - "@sonata-api/common": "*", - "@waltz-ui/state-management": "*", - "@waltz-ui/web": "*", - "vue-router": "*" - } - }, - "node_modules/@waltz-ui/web": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/@waltz-ui/web/-/web-1.0.32.tgz", - "integrity": "sha512-EZkpGVk083rjfT3tboQPG19q5uKdR179lo5yPB5EYM367mEoj6jCyiKhJm8SPok6HAGTJ2x5/7AmkD5tiENQ6Q==", - "hasInstallScript": true, - "peer": true, - "dependencies": { - "@sonata-api/common": "*", - "@sonata-api/types": "*", - "vue": "^3.4.15", - "vue-demi": "^0.13.6", - "vue-router": "^4.2.5" - }, - "peerDependencies": { - "@waltz-ui/i18n": "*", - "@waltz-ui/state-management": "*" - } - }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -3920,17 +3953,205 @@ "node": ">=0.4.0" } }, + "node_modules/aeria": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/aeria/-/aeria-0.0.3.tgz", + "integrity": "sha512-SbS4Cm4dVjoFWptOALLH/hDwL0wf4tFCi6n+sKfSloe8GCPV2VHqu06VMIBbjE3Z0zKNBzlxniyhsgebhIwR/w==", + "peerDependencies": { + "@aeriajs/access-control": "^0.0.1", + "@aeriajs/api": "^0.0.3", + "@aeriajs/builtins": "^0.0.3", + "@aeriajs/common": "^0.0.1", + "@aeriajs/entrypoint": "^0.0.1", + "@aeriajs/http": "^0.0.3", + "@aeriajs/node-http": "^0.0.3", + "@aeriajs/security": "^0.0.3", + "@aeriajs/server": "^0.0.3", + "@aeriajs/types": "^0.0.0", + "@aeriajs/validation": "^0.0.3" + } + }, "node_modules/aeria-app-layout": { - "version": "0.0.26", - "resolved": "https://registry.npmjs.org/aeria-app-layout/-/aeria-app-layout-0.0.26.tgz", - "integrity": "sha512-NFfMysBzkAe8ta/n/+nuZSSr5BCC+G14snrtpPtF6V+lW9ENDxm2GmUv3io+RUK7lvF2H+j0W1JWUXF04EsReg==", + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/aeria-app-layout/-/aeria-app-layout-0.0.28.tgz", + "integrity": "sha512-CGNqQ3DCt5XYJnUKWVQbmEw58UafZnudSO60CAhgW6f7f/RAOUQKbwjMtJH1X7Mfb7XwzM8TyZyB1xTSB+BMKQ==", "dependencies": { "less": "^4.2.0" }, "peerDependencies": { - "vue": "*", - "waltz-build": "latest", - "waltz-ui": "latest" + "aeria-ui": "latest", + "aeria-ui-build": "latest", + "vue": "*" + } + }, + "node_modules/aeria-build": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/aeria-build/-/aeria-build-0.0.3.tgz", + "integrity": "sha512-qDk0+zhsx5/fjvb/3b1rrM1FFgtvF4obqbQueDQ/XLAM6UB9HX3yJEVpheQkNXBrGdoJqHaVHIldY48DbzJ6bQ==", + "dev": true, + "dependencies": { + "@rollup/plugin-commonjs": "^25.0.3", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-terser": "^0.4.0", + "@rollup/plugin-typescript": "^11.0.0", + "chokidar": "^3.5.3", + "dotenv": "^16.4.4", + "glob": "^9.3.0", + "rollup": "^3.19.1", + "tslib": "^2.5.0" + }, + "bin": { + "aeria": "bin/index.js" + }, + "peerDependencies": { + "@aeriajs/api": "^0.0.3", + "@aeriajs/builtins": "^0.0.3", + "@aeriajs/common": "^0.0.1", + "@aeriajs/types": "^0.0.0" + } + }, + "node_modules/aeria-build/node_modules/@rollup/plugin-typescript": { + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", + "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/aeria-build/node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/aeria-build/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/aeria-build/node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/aeria-build/node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/aeria-icons": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/aeria-icons/-/aeria-icons-0.0.0.tgz", + "integrity": "sha512-OLLA6YvuXOoLN9gR0eCep2FQg2T9hUU2yEhJoWCJv2JyAao7n4gJtu/6oH5l+4nX31depQ6GJYvfnyHcp5/ZHA==", + "peerDependencies": { + "@phosphor-icons/core": "*", + "@vitejs/plugin-vue": "*", + "glob": "*", + "vite": "*" + } + }, + "node_modules/aeria-sdk": { + "version": "0.0.17", + "resolved": "https://registry.npmjs.org/aeria-sdk/-/aeria-sdk-0.0.17.tgz", + "integrity": "sha512-4w46ErrhInFu4isqvPcf8YAvSdeJCFw5ObZ8E1xit8OzzgOtD9I8vj6sPT+GvDl/uMTLnOB1SyWL7WSkKYv+SQ==", + "bin": { + "aeria-sdk": "bin/index.js" + }, + "peerDependencies": { + "@aeriajs/common": "^0.0.1", + "@aeriajs/types": "^0.0.0" + } + }, + "node_modules/aeria-ui": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/aeria-ui/-/aeria-ui-0.0.5.tgz", + "integrity": "sha512-HgxtgLqe2h+tnFHcbctaroa6X2Fq6Ux6HrTATtvcBF9YAW9sliDJOwIwi8V6GA0nxCDJh0dFOutLACff/BRQmA==", + "peerDependencies": { + "@aeria-ui/i18n": "^0.0.0", + "@aeria-ui/state-management": "^0.0.0", + "@aeria-ui/ui": "^0.0.5", + "@aeria-ui/web": "^0.0.5" + } + }, + "node_modules/aeria-ui-build": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/aeria-ui-build/-/aeria-ui-build-0.0.2.tgz", + "integrity": "sha512-uwma6oyFf5Z+OqgEpgPWBYBIVPBpPMk+AiZGTY0nTyDknVnyiP+aWjcVxwwPkKnxAjNJRrdT4xl9WglOH9B0DA==", + "dependencies": { + "@rollup/plugin-node-resolve": "^15.0.1", + "@vitejs/plugin-vue": "^4.1.0", + "aeria-icons": "*", + "ejs": "^3.1.9", + "js-yaml": "^4.1.0", + "less": "^4.2.0", + "unplugin-auto-import": "^0.15.3", + "unplugin-vue-components": "^0.24.1", + "unplugin-vue-router": "^0.5.5", + "vite": "^5.0.12" + }, + "bin": { + "aeria-ui": "bin/index.js" + }, + "peerDependencies": { + "@aeriajs/builtins-icons": "*", + "@aeriajs/common": "*", + "@aeriajs/types": "*", + "bson": "*", + "vue": "*" } }, "node_modules/agent-base": { @@ -4112,9 +4333,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.17", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", - "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", + "version": "10.4.18", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.18.tgz", + "integrity": "sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g==", "dev": true, "funding": [ { @@ -4131,8 +4352,8 @@ } ], "dependencies": { - "browserslist": "^4.22.2", - "caniuse-lite": "^1.0.30001578", + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001591", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -4384,9 +4605,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001591", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001591.tgz", - "integrity": "sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==", + "version": "1.0.30001594", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz", + "integrity": "sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==", "dev": true, "funding": [ { @@ -4838,9 +5059,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.689", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.689.tgz", - "integrity": "sha512-GatzRKnGPS1go29ep25reM94xxd1Wj8ritU0yRhCJ/tr1Bg8gKnm6R9O/yPOhGQBoLMZ9ezfrpghNaTw97C/PQ==", + "version": "1.4.693", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.693.tgz", + "integrity": "sha512-/if4Ueg0GUQlhCrW2ZlXwDAm40ipuKo+OgeHInlL8sbjt+hzISxZK949fZeJaVsheamrzANXvw1zQTvbxTvSHw==", "dev": true }, "node_modules/emoji-regex": { @@ -5006,20 +5227,24 @@ } }, "node_modules/eslint-config-aeria": { - "version": "0.0.27", - "resolved": "https://registry.npmjs.org/eslint-config-aeria/-/eslint-config-aeria-0.0.27.tgz", - "integrity": "sha512-lqNkOmEGA7x4StQTJXjslBVlWyh/rHxmequS0qrY/h6XbNTlHI2z8BNjCPppzOwKoBhonIse/JjNOXU/i2LgoQ==", + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/eslint-config-aeria/-/eslint-config-aeria-0.0.28.tgz", + "integrity": "sha512-dOunAgFqH5AH3mob6f32pWVG4F6tVdL8r/CJXgMOAbYn3OwFnb9QmkplnAPlK4vevJwbAOAaOv4+sY/95aaiXw==", "dev": true, "peerDependencies": { "@stylistic/eslint-plugin": "^1.5.1", - "@typescript-eslint/eslint-plugin": "^6.16.0" + "@typescript-eslint/eslint-plugin": "^6.16.0", + "@typescript-eslint/parser": "^6.21.0" } }, "node_modules/eslint-plugin-readable-tailwind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-readable-tailwind/-/eslint-plugin-readable-tailwind-1.0.0.tgz", - "integrity": "sha512-8fXb2cjlTRrKxUvGsIfaT04BSoz2ylWodGE25VJ6f0XnSGA4iK4gUkjQyAV8Q3dwJNPNDpdUWPWW9aB9nkA/9A==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-readable-tailwind/-/eslint-plugin-readable-tailwind-1.1.1.tgz", + "integrity": "sha512-tbWXDHNhnxRrktAlLqmihrWZDtciWUvsb9Oc9CuiNEVwSUVR9FqgsQnw+67m5UWSmSy81+G3c2nNulT+JAKW3Q==", "dev": true, + "engines": { + "node": ">=16" + }, "peerDependencies": { "eslint": ">=7", "tailwindcss": ">=3.3.0" @@ -6573,9 +6798,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", - "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "version": "0.30.8", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -8202,133 +8427,6 @@ "npm": ">= 3.0.0" } }, - "node_modules/sonata-api": { - "version": "1.0.22", - "resolved": "https://registry.npmjs.org/sonata-api/-/sonata-api-1.0.22.tgz", - "integrity": "sha512-gjEDKwEJKnP1YY0o3c7jCaSxDAYyetH5jm7YOtDrbLs9Tyi+vp89GYfK6pIqtd5AVxquFF52nHL7EenOsoxY+A==", - "peerDependencies": { - "@sonata-api/access-control": "*", - "@sonata-api/api": "*", - "@sonata-api/builtins": "*", - "@sonata-api/common": "*", - "@sonata-api/entrypoint": "*", - "@sonata-api/http": "*", - "@sonata-api/node-http": "*", - "@sonata-api/security": "*", - "@sonata-api/server": "*", - "@sonata-api/types": "*", - "@sonata-api/validation": "*" - } - }, - "node_modules/sonata-build": { - "version": "1.0.27", - "resolved": "https://registry.npmjs.org/sonata-build/-/sonata-build-1.0.27.tgz", - "integrity": "sha512-v5VDPyzkwKMpeBcNtaiRK6dtK1e+0x+UOli4Epg5LN3+utbRyVZeeQymkRorjIIPt1PePQMOGzaDPg7lTfrnAw==", - "dev": true, - "dependencies": { - "@rollup/plugin-commonjs": "^25.0.3", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-terser": "^0.4.0", - "@rollup/plugin-typescript": "^11.0.0", - "chokidar": "^3.5.3", - "dotenv": "^16.4.4", - "glob": "^9.3.0", - "rollup": "^3.19.1", - "tslib": "^2.5.0" - }, - "bin": { - "sonata-build": "bin/index.js" - }, - "peerDependencies": { - "@sonata-api/api": "*", - "@sonata-api/builtins": "*", - "@sonata-api/common": "*", - "@sonata-api/types": "*" - } - }, - "node_modules/sonata-build/node_modules/@rollup/plugin-typescript": { - "version": "11.1.6", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", - "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^5.1.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", - "tslib": "*", - "typescript": ">=3.7.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - }, - "tslib": { - "optional": true - } - } - }, - "node_modules/sonata-build/node_modules/glob": { - "version": "9.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", - "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sonata-build/node_modules/minimatch": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", - "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sonata-build/node_modules/minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/sonata-build/node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -8950,12 +9048,12 @@ } }, "node_modules/unplugin": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.7.1.tgz", - "integrity": "sha512-JqzORDAPxxs8ErLV4x+LL7bk5pk3YlcWqpSNsIkAZj972KzFZLClc/ekppahKkOczGkwIG6ElFgdOgOlK4tXZw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.8.1.tgz", + "integrity": "sha512-NDAvOEnZmeSRRmjfD0FoLzfve2/9lqceO5bR4J/2V72zphnFdq7UYo3fg6F1y1HfZEaSHa+7bZgbEN+z5x8ZDQ==", "dependencies": { "acorn": "^8.11.3", - "chokidar": "^3.5.3", + "chokidar": "^3.6.0", "webpack-sources": "^3.2.3", "webpack-virtual-modules": "^0.6.1" } @@ -9145,9 +9243,9 @@ } }, "node_modules/vite": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.4.tgz", - "integrity": "sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.5.tgz", + "integrity": "sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==", "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.35", @@ -9342,55 +9440,6 @@ "typescript": "*" } }, - "node_modules/waltz-build": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/waltz-build/-/waltz-build-0.1.17.tgz", - "integrity": "sha512-JNk8jraoZ/zuNFkXb7q9RW7c2NuIJv6n8tqt0dhAVDa1vS2+ETmoGo6Tn6U8TET3zFAxxh9NvLdiYBKuWABlHQ==", - "dependencies": { - "@rollup/plugin-node-resolve": "^15.0.1", - "@vitejs/plugin-vue": "^4.1.0", - "ejs": "^3.1.9", - "js-yaml": "^4.1.0", - "less": "^4.2.0", - "unplugin-auto-import": "^0.15.3", - "unplugin-vue-components": "^0.24.1", - "unplugin-vue-router": "^0.5.5", - "vite": "^5.0.12", - "waltz-icons": "*" - }, - "bin": { - "waltz-build": "bin/index.js" - }, - "peerDependencies": { - "@sonata-api/builtins-icons": "*", - "@sonata-api/common": "*", - "@sonata-api/types": "*", - "bson": "*", - "vue": "*" - } - }, - "node_modules/waltz-icons": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/waltz-icons/-/waltz-icons-0.0.18.tgz", - "integrity": "sha512-1AF4oyPGV7aYBgoJach/t+hRYosBV2c+Do4hxxww/4XEYQwiHgGYOrqL3qeLvdxApuivWKA3VV6Du99Ncpyjxw==", - "peerDependencies": { - "@phosphor-icons/core": "*", - "@vitejs/plugin-vue": "*", - "glob": "*", - "vite": "*" - } - }, - "node_modules/waltz-ui": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/waltz-ui/-/waltz-ui-1.0.5.tgz", - "integrity": "sha512-LW9Gc1ITYrOHrwaxwbL/QuqECcKEh+Hxt8HVf51D7GfbLzu1+g4K2w0HtzTd1iTmNVQpzCHx3f1cVXCXIxFubw==", - "peerDependencies": { - "@waltz-ui/i18n": "*", - "@waltz-ui/state-management": "*", - "@waltz-ui/ui": "*", - "@waltz-ui/web": "*" - } - }, "node_modules/web": { "resolved": "web", "link": true @@ -9600,24 +9649,26 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@waltz-ui/i18n-ptbr": "latest", + "@aeria-ui/i18n-ptbr": "latest", "aeria-app-layout": "latest", - "waltz-ui": "latest" + "aeria-sdk": "latest", + "aeria-ui": "latest" }, "devDependencies": { + "aeria-ui-build": "latest", "autoprefixer": "^10.4.16", "eslint-config-aeriaui": "latest", "eslint-plugin-readable-tailwind": "^1.0.0", "postcss": "^8.4.31", "tailwindcss": "^3.3.5", - "vue-tsc": "^1.8.27", - "waltz-build": "latest" + "vue-tsc": "^1.8.27" } }, "web/node_modules/@eslint/eslintrc": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.0.2.tgz", + "integrity": "sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "ajv": "^6.12.4", @@ -9639,8 +9690,9 @@ }, "web/node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", @@ -9655,8 +9707,9 @@ }, "web/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -9677,8 +9730,9 @@ }, "web/node_modules/eslint-visitor-keys": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, - "license": "Apache-2.0", "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9689,8 +9743,9 @@ }, "web/node_modules/espree": { "version": "10.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.0.1.tgz", + "integrity": "sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==", "dev": true, - "license": "BSD-2-Clause", "peer": true, "dependencies": { "acorn": "^8.11.3", @@ -9706,8 +9761,9 @@ }, "web/node_modules/globals": { "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, - "license": "MIT", "peer": true, "engines": { "node": ">=18" @@ -9718,14 +9774,16 @@ }, "web/node_modules/json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, - "license": "MIT", "peer": true }, "web/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" diff --git a/scripts/postinstall.js b/scripts/postinstall.js index aa58d98..07f235e 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -3,14 +3,29 @@ const fs = require('fs') const path = require('path') const main = async () => { - if( fs.existsSync('sonata-api.d.ts') ) { - await fs.promises.rename('sonata-api.d.ts', - path.join('api', 'sonata-api.d.ts')) + const aeriaUi = path.join('web', '.aeria-ui') + if( fs.existsSync('aeria.d.ts') ) { + await fs.promises.rename('aeria.d.ts', + path.join('api', 'aeria.d.ts')) } - if( fs.existsSync('waltz-ui.d.ts') ) { - await fs.promises.rename('waltz-ui.d.ts', - path.join('web', 'waltz-ui.d.ts')) + if( fs.existsSync('.aeria-ui') ) { + if( !fs.existsSync(aeriaUi) ) { + await fs.promises.rename( + '.aeria-ui', + path.join('web', '.aeria-ui') + ) + } else { + const files = await fs.promises.readdir(aeriaUi) + for( const file of files ) { + await fs.promises.rename( + path.join('.aeria-ui', file), + path.join(aeriaUi, file), + ) + } + + await fs.promises.rmdir('.aeria-ui') + } } } diff --git a/web/.aeria-ui/aeria-ui.d.ts b/web/.aeria-ui/aeria-ui.d.ts new file mode 100644 index 0000000..6e94aef --- /dev/null +++ b/web/.aeria-ui/aeria-ui.d.ts @@ -0,0 +1,48 @@ +// WARNING: this file will be overriden +declare module 'aeria-ui' { + export * from 'aeria-ui/dist' + + type SystemStores = typeof import('@aeria-ui/web/stores') + type UserStores = typeof import('../src/stores') + + type Stores = { + [P in keyof (SystemStores & UserStores)]: ReturnType<(SystemStores & UserStores)[P]> + } + + export const useStore: ( + storeId: TStoreId, + manager?: import('@aeria-ui/state-management').GlobalStateManager + ) => TStoreId extends keyof Stores + ? Stores[TStoreId] + : TStoreId extends keyof Collections + ? 'item' extends keyof Collections[TStoreId] + ? Collections[TStoreId]['item'] extends infer Item + ? Item extends { _id: any } + ? import('aeria-ui').CollectionStore + : never + : never + : never + : never +} + +declare module '@vue/runtime-core' { + import type { TemplateFunctions } from '@aeria-ui/web' + + interface ComponentCustomProperties extends TemplateFunctions { + viewTitle: string + viewIcon: string + instanceConfig: typeof import('aeria-ui-build').InstanceConfig + currentUser: (Collections['user']['item'] extends infer UserCollection + ? UserCollection extends (...args: any[]) => any + ? ReturnType + : UserCollection + : never + ) extends infer Coll + ? Coll['item'] + : never + t: typeof import('@aeria-ui/i18n').t + } +} + +export {} +// \ No newline at end of file diff --git a/web/auto-imports.d.ts b/web/.aeria-ui/auto-imports.d.ts similarity index 89% rename from web/auto-imports.d.ts rename to web/.aeria-ui/auto-imports.d.ts index 1350859..4cf89d5 100644 --- a/web/auto-imports.d.ts +++ b/web/.aeria-ui/auto-imports.d.ts @@ -5,6 +5,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const aeria: typeof import('aeria-sdk')['aeria'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] @@ -50,19 +51,19 @@ declare global { const toValue: typeof import('vue')['toValue'] const triggerRef: typeof import('vue')['triggerRef'] const unref: typeof import('vue')['unref'] - const useAction: typeof import('waltz-ui')['useAction'] + const useAction: typeof import('aeria-ui')['useAction'] const useAttrs: typeof import('vue')['useAttrs'] - const useBreakpoints: typeof import('waltz-ui')['useBreakpoints'] - const useClipboard: typeof import('waltz-ui')['useClipboard'] + const useBreakpoints: typeof import('aeria-ui')['useBreakpoints'] + const useClipboard: typeof import('aeria-ui')['useClipboard'] const useCssModule: typeof import('vue')['useCssModule'] const useCssVars: typeof import('vue')['useCssVars'] const useLink: typeof import('vue-router')['useLink'] - const useNavbar: typeof import('waltz-ui')['useNavbar'] - const useParentStore: typeof import('waltz-ui')['useParentStore'] + const useNavbar: typeof import('aeria-ui')['useNavbar'] + const useParentStore: typeof import('aeria-ui')['useParentStore'] const useRoute: typeof import('vue-router')['useRoute'] const useRouter: typeof import('vue-router')['useRouter'] const useSlots: typeof import('vue')['useSlots'] - const useStore: typeof import('waltz-ui')['useStore'] + const useStore: typeof import('aeria-ui')['useStore'] const watch: typeof import('vue')['watch'] const watchEffect: typeof import('vue')['watchEffect'] const watchPostEffect: typeof import('vue')['watchPostEffect'] diff --git a/web/components.d.ts b/web/.aeria-ui/components.d.ts similarity index 86% rename from web/components.d.ts rename to web/.aeria-ui/components.d.ts index 5acd0ce..524ea40 100644 --- a/web/components.d.ts +++ b/web/.aeria-ui/components.d.ts @@ -9,7 +9,6 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { - AeriaIcon: typeof import('@waltz-ui/ui')['AeriaIcon'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } diff --git a/web/instance.json b/web/instance.json index c662411..c9eed21 100644 --- a/web/instance.json +++ b/web/instance.json @@ -6,8 +6,9 @@ }, "icons": { "libraries": [ - "@waltz-ui/ui", + "@aeria-ui/ui", "aeria-app-layout" ] - } + }, + "preserveSymlinks": true } diff --git a/web/package.json b/web/package.json index 3a05bba..c101956 100644 --- a/web/package.json +++ b/web/package.json @@ -5,18 +5,19 @@ "description": "", "main": "index.js", "scripts": { - "dev": "waltz-build -m serve", + "dev": "aeria-ui -m serve", "lint": "eslint src", "lint:fix": "eslint src --fix", - "build": "vue-tsc --noEmit && waltz-build -m build" + "build": "vue-tsc --noEmit && aeria-ui -m build" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "@waltz-ui/i18n-ptbr": "latest", + "@aeria-ui/i18n-ptbr": "latest", "aeria-app-layout": "latest", - "waltz-ui": "latest" + "aeria-sdk": "latest", + "aeria-ui": "latest" }, "devDependencies": { "autoprefixer": "^10.4.16", @@ -25,6 +26,6 @@ "postcss": "^8.4.31", "tailwindcss": "^3.3.5", "vue-tsc": "^1.8.27", - "waltz-build": "latest" + "aeria-ui-build": "latest" } } diff --git a/web/src/i18n/pt_BR.ts b/web/src/i18n/pt_BR.ts index 3ad4691..b24b6a4 100644 --- a/web/src/i18n/pt_BR.ts +++ b/web/src/i18n/pt_BR.ts @@ -1,4 +1,4 @@ -import { defineLocale } from 'waltz-ui' +import { defineLocale } from 'aeria-ui' export const ptbr = defineLocale({ pizza: [ diff --git a/web/src/index.ts b/web/src/index.ts index 36f3bd8..4900e50 100644 --- a/web/src/index.ts +++ b/web/src/index.ts @@ -1,13 +1,15 @@ -import { useApp, defineOptions, AeriaMain } from 'waltz-ui' -import waltzPtbr from '@waltz-ui/i18n-ptbr' +import { useApp, defineOptions, AeriaMain } from 'aeria-ui' +import waltzPtbr from '@aeria-ui/i18n-ptbr' import { ptbr } from './i18n/index.js' import { routes } from './routes.js' -import '@waltz-ui/ui/style.css' +import '@aeria-ui/ui/style.css' import 'aeria-app-layout/style.css' import './style/main.css' import './style/main.less' +import { aeria } from 'aeria-sdk' + const options = defineOptions({ component: AeriaMain, routes, @@ -27,6 +29,16 @@ const options = defineOptions({ ], }) +;(async () => { + const r = await aeria.pizza.shampoo123.POST({ + name: 'joao', + type: 'dog', + }) + + r.name + r.age +})() + useApp(options).then((app) => { app.mount() }) diff --git a/web/src/pages/dashboard/index.vue b/web/src/pages/dashboard/index.vue index b78daa6..357fc3a 100644 --- a/web/src/pages/dashboard/index.vue +++ b/web/src/pages/dashboard/index.vue @@ -1,3 +1,18 @@ + + diff --git a/web/src/routes.ts b/web/src/routes.ts index a6280a2..223e8a9 100644 --- a/web/src/routes.ts +++ b/web/src/routes.ts @@ -1,4 +1,4 @@ -import { userRoutes, dashboardRoutes } from 'waltz-ui' +import { userRoutes, dashboardRoutes } from 'aeria-ui' import DashboardLayout from './pages/_dashboard.vue' import { AuthWall } from 'aeria-app-layout' diff --git a/web/src/style/main.less b/web/src/style/main.less index 006eef7..8544bcf 100644 --- a/web/src/style/main.less +++ b/web/src/style/main.less @@ -1,5 +1,5 @@ -@import '@waltz-ui/ui/themes/light.less'; -@import '@waltz-ui/ui/themes/dark.less'; +@import '@aeria-ui/ui/themes/light.less'; +@import '@aeria-ui/ui/themes/dark.less'; @brand-color: #e97451; diff --git a/web/tsconfig.json b/web/tsconfig.json index b1a0852..6dd7f47 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -7,13 +7,15 @@ "strict": true, "skipLibCheck": true, "esModuleInterop": true, + "preserveSymlinks": true, "types": [ - "@waltz-ui/ui/vue" + "@aeria-ui/ui/vue" ] }, "include": [ - "../api/@types/*.d.ts", + "../api/aeria-sdk.d.ts", + "@types/*.d.ts", "src", - "*.d.ts" + ".aeria-ui/*.d.ts" ] } diff --git a/web/waltz-ui.d.ts b/web/waltz-ui.d.ts deleted file mode 100644 index 54eab16..0000000 --- a/web/waltz-ui.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -// WARNING: this file will be overriden -declare global { - type UnpackCollections = { - [P in keyof TCollections]: TCollections[P] extends infer Candidate - ? Candidate extends (...args: any[]) => infer Coll - ? Coll - : Candidate - : never - } - - type Collections = typeof import('../api/src') extends infer EntrypointModule - ? 'collections' extends keyof EntrypointModule - ? UnpackCollections - : 'default' extends keyof EntrypointModule - ? EntrypointModule['default'] extends infer Entrypoint - ? 'options' extends keyof Entrypoint - ? 'collections' extends keyof Entrypoint['options'] - ? UnpackCollections - : never - : never - : never - : never - : never -} - -declare module 'waltz-ui' { - export * from 'waltz-ui/dist' - - type SystemStores = typeof import('@waltz-ui/web/stores') - type UserStores = typeof import('./src/stores') - - type Stores = { - [P in keyof (SystemStores & UserStores)]: ReturnType<(SystemStores & UserStores)[P]> - } - - export const useStore: ( - storeId: TStoreId, - manager?: import('@waltz-ui/state-management').GlobalStateManager - ) => TStoreId extends keyof Stores - ? Stores[TStoreId] - : TStoreId extends keyof Collections - ? 'item' extends keyof Collections[TStoreId] - ? Collections[TStoreId]['item'] extends infer Item - ? Item extends { _id: any } - ? import('waltz-ui').CollectionStore - : never - : never - : never - : never -} - -declare module '@vue/runtime-core' { - import type { TemplateFunctions } from '@waltz-ui/web' - - interface ComponentCustomProperties extends TemplateFunctions { - viewTitle: string - viewIcon: string - instanceConfig: typeof import('waltz-build').InstanceConfig - currentUser: (typeof import('../api/src').collections.user extends infer UserCollection - ? UserCollection extends (...args: any[]) => any - ? ReturnType - : UserCollection - : never - ) extends infer Coll - ? Coll['item'] - : never - t: typeof import('@waltz-ui/i18n').t - } -} - -import type { RouteRecordRaw } from 'vue-router' -import type { Icon } from '@sonata-api/types' - -declare global { - const definePage: (page: Partial & { - meta: { - title: string - icon?: Icon - } - }) => void -} - -export {} -// \ No newline at end of file