appos 0.2.1 → 0.2.3-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/auth-schema-7KeUwlcd.mjs +2 -0
- package/dist/bin/concurrently.mjs +2 -0
- package/dist/bin/event-v2sCJkNd.mjs +2 -0
- package/dist/bin/extract-blob-metadata-TqNd9w-6.mjs +2 -0
- package/dist/bin/generate-image-variant-D8H9FxgD.mjs +2 -0
- package/dist/bin/generate-preview-5jLZLX6I.mjs +2 -0
- package/dist/bin/main.mjs +362 -0
- package/dist/bin/purge-attachment-CMlJMNOk.mjs +2 -0
- package/dist/bin/purge-audit-logs-hd6q6vnR.mjs +2 -0
- package/dist/bin/purge-unattached-blobs-BYv5b9R9.mjs +2 -0
- package/dist/bin/track-db-changes-q0Vl7Htm.mjs +2 -0
- package/dist/bin/vite.mjs +2 -0
- package/dist/bin/vitest.mjs +2 -0
- package/dist/bin/workflow-BagSlsMp.mjs +2 -0
- package/dist/bin/youch-handler-Jj6i1XIT.mjs +2 -0
- package/dist/exports/api/_virtual/rolldown_runtime.mjs +1 -0
- package/dist/exports/api/app-context.d.mts +115 -0
- package/dist/exports/api/app-context.mjs +1 -0
- package/dist/exports/api/auth-schema.d.mts +4248 -0
- package/dist/exports/api/auth-schema.mjs +1 -0
- package/dist/exports/api/auth.d.mts +398 -0
- package/dist/exports/api/auth.mjs +1 -0
- package/dist/exports/api/cache.d.mts +44 -0
- package/dist/exports/api/cache.mjs +1 -0
- package/dist/exports/api/config.d.mts +28 -0
- package/dist/exports/api/config.mjs +1 -0
- package/dist/exports/api/container.d.mts +210 -0
- package/dist/exports/api/container.mjs +1 -0
- package/dist/exports/api/database.d.mts +99 -0
- package/dist/exports/api/database.mjs +1 -0
- package/dist/exports/api/event.d.mts +235 -0
- package/dist/exports/api/event.mjs +1 -0
- package/dist/exports/api/i18n.d.mts +34 -0
- package/dist/exports/api/i18n.mjs +1 -0
- package/dist/exports/api/index.d.mts +21 -0
- package/dist/exports/api/index.mjs +1 -0
- package/dist/exports/api/logger.d.mts +21 -0
- package/dist/exports/api/logger.mjs +1 -0
- package/dist/exports/api/mailer.d.mts +70 -0
- package/dist/exports/api/mailer.mjs +1 -0
- package/dist/exports/api/middleware/request-logger.d.mts +24 -0
- package/dist/exports/api/middleware.d.mts +39 -0
- package/dist/exports/api/middleware.mjs +1 -0
- package/dist/exports/api/node_modules/.bun/change-case@5.4.4/node_modules/change-case/dist/index.mjs +1 -0
- package/dist/exports/api/openapi.d.mts +271 -0
- package/dist/exports/api/openapi.mjs +1 -0
- package/dist/exports/api/orm.d.mts +13 -0
- package/dist/exports/api/orm.mjs +1 -0
- package/dist/exports/api/otel.d.mts +40 -0
- package/dist/exports/api/otel.mjs +1 -0
- package/dist/exports/api/packages/appos/src/constants.mjs +1 -0
- package/dist/exports/api/packages/appos/src/instrumentation.d.mts +7 -0
- package/dist/exports/api/packages/appos/src/instrumentation.mjs +1 -0
- package/dist/exports/api/packages/appos/src/web/auth.mjs +1 -0
- package/dist/exports/api/redis.d.mts +34 -0
- package/dist/exports/api/redis.mjs +1 -0
- package/dist/exports/api/storage-schema.d.mts +707 -0
- package/dist/exports/api/storage-schema.mjs +1 -0
- package/dist/exports/api/storage.d.mts +506 -0
- package/dist/exports/api/storage.mjs +1 -0
- package/dist/exports/api/workflow.d.mts +250 -0
- package/dist/exports/api/workflow.mjs +1 -0
- package/dist/exports/api/workflows/_virtual/rolldown_runtime.mjs +1 -0
- package/dist/exports/api/workflows/auth-schema.mjs +1 -0
- package/dist/exports/api/workflows/auth.d.mts +375 -0
- package/dist/exports/api/workflows/cache.d.mts +44 -0
- package/dist/exports/api/workflows/config.d.mts +18 -0
- package/dist/exports/api/workflows/container.d.mts +167 -0
- package/dist/exports/api/workflows/database.d.mts +46 -0
- package/dist/exports/api/workflows/event.d.mts +68 -0
- package/dist/exports/api/workflows/event.mjs +1 -0
- package/dist/exports/api/workflows/extract-blob-metadata.mjs +1 -0
- package/dist/exports/api/workflows/generate-image-variant.d.mts +63 -0
- package/dist/exports/api/workflows/generate-image-variant.mjs +1 -0
- package/dist/exports/api/workflows/generate-preview.mjs +1 -0
- package/dist/exports/api/workflows/index.d.mts +2 -0
- package/dist/exports/api/workflows/index.mjs +1 -0
- package/dist/exports/api/workflows/logger.d.mts +21 -0
- package/dist/exports/api/workflows/mailer.d.mts +70 -0
- package/dist/exports/api/workflows/orm.d.mts +13 -0
- package/dist/exports/api/workflows/purge-attachment.mjs +1 -0
- package/dist/exports/api/workflows/purge-audit-logs.mjs +1 -0
- package/dist/exports/api/workflows/purge-unattached-blobs.mjs +1 -0
- package/dist/exports/api/workflows/redis.mjs +1 -0
- package/dist/exports/api/workflows/storage-schema.d.mts +699 -0
- package/dist/exports/api/workflows/storage.d.mts +396 -0
- package/dist/exports/api/workflows/track-db-changes.d.mts +72 -0
- package/dist/exports/api/workflows/track-db-changes.mjs +1 -0
- package/dist/exports/api/workflows/workflow.d.mts +24 -0
- package/dist/exports/api/workflows/workflow.mjs +1 -0
- package/dist/exports/cli/_virtual/rolldown_runtime.mjs +1 -0
- package/dist/exports/cli/api/auth-schema.mjs +1 -0
- package/dist/exports/cli/api/auth.d.mts +375 -0
- package/dist/exports/cli/api/cache.d.mts +44 -0
- package/dist/exports/cli/api/config.d.mts +18 -0
- package/dist/exports/cli/api/container.d.mts +167 -0
- package/dist/exports/cli/api/database.d.mts +46 -0
- package/dist/exports/cli/api/event.d.mts +68 -0
- package/dist/exports/cli/api/event.mjs +1 -0
- package/dist/exports/cli/api/logger.d.mts +21 -0
- package/dist/exports/cli/api/mailer.d.mts +70 -0
- package/dist/exports/cli/api/orm.d.mts +13 -0
- package/dist/exports/cli/api/redis.mjs +1 -0
- package/dist/exports/cli/api/storage-schema.d.mts +699 -0
- package/dist/exports/cli/api/storage.d.mts +396 -0
- package/dist/exports/cli/api/workflow.d.mts +2 -0
- package/dist/exports/cli/api/workflow.mjs +1 -0
- package/dist/exports/cli/api/workflows/extract-blob-metadata.mjs +1 -0
- package/dist/exports/cli/api/workflows/generate-image-variant.d.mts +63 -0
- package/dist/exports/cli/api/workflows/generate-image-variant.mjs +1 -0
- package/dist/exports/cli/api/workflows/generate-preview.mjs +1 -0
- package/dist/exports/cli/api/workflows/purge-attachment.mjs +1 -0
- package/dist/exports/cli/api/workflows/purge-audit-logs.mjs +1 -0
- package/dist/exports/cli/api/workflows/purge-unattached-blobs.mjs +1 -0
- package/dist/exports/cli/api/workflows/track-db-changes.mjs +1 -0
- package/dist/exports/cli/command.d.mts +54 -0
- package/dist/exports/cli/command.mjs +1 -0
- package/dist/exports/cli/context.d.mts +170 -0
- package/dist/exports/cli/index.d.mts +3 -0
- package/dist/exports/cli/index.mjs +1 -0
- package/dist/exports/devtools/index.d.ts +3 -0
- package/dist/exports/devtools/index.js +1 -0
- package/dist/exports/instrumentation.d.mts +1 -0
- package/dist/exports/instrumentation.mjs +1 -0
- package/dist/exports/tests/_virtual/rolldown_runtime.mjs +1 -0
- package/dist/exports/tests/api.d.mts +86 -0
- package/dist/exports/tests/api.mjs +1 -0
- package/dist/exports/tests/mock.d.mts +1 -0
- package/dist/exports/tests/mock.mjs +1 -0
- package/dist/exports/tests/node_modules/.bun/change-case@5.4.4/node_modules/change-case/dist/index.mjs +1 -0
- package/dist/exports/tests/node_modules/.bun/rate-limit-redis@4.3.1_f1fa5524233c9c60/node_modules/rate-limit-redis/dist/index.mjs +25 -0
- package/dist/exports/tests/packages/appos/src/api/app-context.d.mts +115 -0
- package/dist/exports/tests/packages/appos/src/api/auth-schema.d.mts +4248 -0
- package/dist/exports/tests/packages/appos/src/api/auth-schema.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/auth.d.mts +398 -0
- package/dist/exports/tests/packages/appos/src/api/cache.d.mts +44 -0
- package/dist/exports/tests/packages/appos/src/api/config.d.mts +28 -0
- package/dist/exports/tests/packages/appos/src/api/container.d.mts +210 -0
- package/dist/exports/tests/packages/appos/src/api/database.d.mts +99 -0
- package/dist/exports/tests/packages/appos/src/api/database.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/event.d.mts +235 -0
- package/dist/exports/tests/packages/appos/src/api/event.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/i18n.d.mts +34 -0
- package/dist/exports/tests/packages/appos/src/api/index.d.mts +27 -0
- package/dist/exports/tests/packages/appos/src/api/logger.d.mts +21 -0
- package/dist/exports/tests/packages/appos/src/api/mailer.d.mts +70 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/error-handler.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/health.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/i18n.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/request-logger.d.mts +24 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/request-logger.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/shutdown.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/timeout.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/middleware/youch-handler.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/middleware.d.mts +39 -0
- package/dist/exports/tests/packages/appos/src/api/middleware.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/openapi.d.mts +271 -0
- package/dist/exports/tests/packages/appos/src/api/orm.d.mts +13 -0
- package/dist/exports/tests/packages/appos/src/api/otel.d.mts +40 -0
- package/dist/exports/tests/packages/appos/src/api/redis.d.mts +34 -0
- package/dist/exports/tests/packages/appos/src/api/redis.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/server.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/storage-schema.d.mts +707 -0
- package/dist/exports/tests/packages/appos/src/api/storage.d.mts +506 -0
- package/dist/exports/tests/packages/appos/src/api/workflow.d.mts +250 -0
- package/dist/exports/tests/packages/appos/src/api/workflow.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/extract-blob-metadata.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/generate-image-variant.d.mts +99 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/generate-image-variant.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/generate-preview.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/purge-attachment.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/purge-audit-logs.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/purge-unattached-blobs.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/api/workflows/track-db-changes.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/constants.mjs +1 -0
- package/dist/exports/tests/packages/appos/src/instrumentation.d.mts +7 -0
- package/dist/exports/tests/packages/appos/src/instrumentation.mjs +1 -0
- package/dist/exports/tests/react.d.mts +2 -0
- package/dist/exports/tests/react.mjs +1 -0
- package/dist/exports/tests/setup.d.mts +1 -0
- package/dist/exports/tests/setup.mjs +1 -0
- package/dist/exports/vendors/date.js +1 -0
- package/dist/exports/vendors/toolkit.js +1 -0
- package/dist/exports/vendors/zod.d.ts +1 -0
- package/dist/exports/vendors/zod.js +1 -0
- package/dist/exports/vite/index.d.mts +19 -0
- package/dist/exports/vite/index.mjs +1 -0
- package/dist/exports/vitest/config.d.mts +1 -0
- package/dist/exports/vitest/config.mjs +1 -0
- package/dist/exports/vitest/globals.d.mts +1 -0
- package/dist/exports/vitest/globals.mjs +1 -0
- package/dist/exports/vitest/index.d.mts +1 -0
- package/dist/exports/vitest/index.mjs +1 -0
- package/dist/exports/web/api/auth.d.ts +125 -0
- package/dist/exports/web/api/database.d.ts +4 -0
- package/dist/exports/web/api/logger.d.ts +1 -0
- package/dist/exports/web/auth.d.ts +2388 -0
- package/dist/exports/web/auth.js +1 -0
- package/dist/exports/web/i18n.d.ts +42 -0
- package/dist/exports/web/i18n.js +1 -0
- package/dist/exports/web/index.d.ts +6 -0
- package/dist/exports/web/index.js +1 -0
- package/package.json +138 -98
- package/build/bin/main.mjs +0 -2
- package/build/exports/cli/index.d.mts +0 -325
- package/build/exports/cli/index.mjs +0 -1
- package/build/exports/instrumentation/execAsync-DaIUcs6_.mjs +0 -1
- package/build/exports/instrumentation/getMachineId-bsd-bB6ipDhm.mjs +0 -1
- package/build/exports/instrumentation/getMachineId-darwin-D1Bx5aCe.mjs +0 -2
- package/build/exports/instrumentation/getMachineId-linux-D_R9Tla0.mjs +0 -1
- package/build/exports/instrumentation/getMachineId-unsupported-BZKPE_Ev.mjs +0 -1
- package/build/exports/instrumentation/getMachineId-win-CmPvIqHL.mjs +0 -1
- package/build/exports/instrumentation/instrumentation.d.mts +0 -1
- package/build/exports/instrumentation/instrumentation.mjs +0 -80
- package/build/exports/server/index.d.mts +0 -327
- package/build/exports/server/index.mjs +0 -219
- package/build/exports/server/react-gPO8Jsy-.mjs +0 -13
- package/build/exports/server/server.node-D_9RYjm9.mjs +0 -210
- package/build/exports/store/index.d.mts +0 -58
- package/build/exports/store/index.mjs +0 -15
- package/build/exports/support/datetime.js +0 -1
- package/build/exports/support/utils.js +0 -1
- package/build/exports/support/zod.d.ts +0 -2
- package/build/exports/support/zod.js +0 -23
- package/build/exports/test/dist-DAsoCGWk.mjs +0 -348
- package/build/exports/test/index.d.mts +0 -3
- package/build/exports/test/index.mjs +0 -1
- package/build/exports/test/magic-string.es-BWgiB2kd.mjs +0 -14
- package/build/exports/test/setup.d.mts +0 -1
- package/build/exports/test/setup.mjs +0 -329
- /package/{build/exports/support/datetime.d.ts → dist/exports/vendors/date.d.ts} +0 -0
- /package/{build/exports/support/utils.d.ts → dist/exports/vendors/toolkit.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{passkeyClient as e}from"@better-auth/passkey/client";import{ssoClient as t}from"@better-auth/sso/client";import{adminClient as n,anonymousClient as r,apiKeyClient as i,emailOTPClient as a,magicLinkClient as o,multiSessionClient as s,phoneNumberClient as c,twoFactorClient as l,usernameClient as u}from"better-auth/client/plugins";import{createAuthClient as d}from"better-auth/react";const f=`/auth`,p=``;function m(e){return{emailPassword:e.methods?.emailPassword!==void 0,magicLink:e.methods?.magicLink!==void 0,passkey:e.methods?.passkey!==void 0,phoneOtp:e.methods?.phoneOtp!==void 0,emailOtp:e.methods?.emailOtp!==void 0,oauth:{google:e.oauth?.google===!0,github:e.oauth?.github===!0,apple:e.oauth?.apple===!0,facebook:e.oauth?.facebook===!0},twoFactor:{enabled:e.plugins?.twoFactor!==void 0,totp:e.plugins?.twoFactor?.totp!==void 0,otp:e.plugins?.twoFactor?.otp===!0,backupCodes:e.plugins?.twoFactor?.backupCodes!==void 0},multiSession:e.plugins?.multiSession!==void 0,username:e.plugins?.username!==void 0,anonymous:e.plugins?.anonymous!==void 0,sso:e.plugins?.sso!==void 0}}function h(f){let{config:p,baseURL:h,plugins:g}=f,_=[];return p.plugins?.admin&&_.push(n({ac:p.plugins.admin.ac,roles:p.plugins.admin.roles})),p.plugins?.apiKey&&_.push(i()),p.plugins?.twoFactor&&_.push(l({onTwoFactorRedirect:g?.twoFactor?.onTwoFactorRedirect})),p.methods?.passkey&&_.push(e()),p.methods?.magicLink&&_.push(o()),p.methods?.phoneOtp&&_.push(c()),p.methods?.emailOtp&&_.push(a()),p.plugins?.username&&_.push(u()),p.plugins?.anonymous&&_.push(r()),p.plugins?.multiSession&&_.push(s()),p.plugins?.sso&&_.push(t({domainVerification:p.plugins.sso.domainVerification?{enabled:!0}:void 0})),{client:d({baseURL:(h??p.baseURL??``)||void 0,plugins:_}),features:m(p)}}export{f as AUTH_BASE_PATH,p as AUTH_BASE_URL,h as defineAuthClient,m as defineAuthFeatures};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as i18next0 from "i18next";
|
|
2
|
+
import { InitOptions } from "i18next";
|
|
3
|
+
|
|
4
|
+
//#region src/web/i18n.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* i18n initialization options extending i18next's InitOptions.
|
|
8
|
+
* Used for both server and client initialization.
|
|
9
|
+
*/
|
|
10
|
+
interface I18nInitOptions extends InitOptions {}
|
|
11
|
+
/**
|
|
12
|
+
* Type-safe default options for i18n.
|
|
13
|
+
* Apps should spread these and override as needed.
|
|
14
|
+
*/
|
|
15
|
+
declare const defaultI18nOptions: {
|
|
16
|
+
readonly fallbackLng: "en";
|
|
17
|
+
readonly supportedLngs: readonly ["en"];
|
|
18
|
+
readonly defaultNS: "translation";
|
|
19
|
+
readonly ns: readonly ["translation"];
|
|
20
|
+
readonly interpolation: {
|
|
21
|
+
readonly escapeValue: false;
|
|
22
|
+
};
|
|
23
|
+
readonly react: {
|
|
24
|
+
readonly useSuspense: false;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Client-specific i18n options.
|
|
29
|
+
*/
|
|
30
|
+
interface I18nClientOptions extends I18nInitOptions {
|
|
31
|
+
/** Path to load translations from (default: "/locales/{{lng}}/{{ns}}.json") */
|
|
32
|
+
loadPath?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Initializes i18next for browser/SPA with HTTP backend.
|
|
36
|
+
*
|
|
37
|
+
* @param opts - Client i18n options including loadPath for translation files.
|
|
38
|
+
* @returns A promise that resolves to the initialized i18next instance.
|
|
39
|
+
*/
|
|
40
|
+
declare function defineI18nClient(opts: I18nClientOptions): Promise<i18next0.i18n>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { I18nClientOptions, I18nInitOptions, defaultI18nOptions, defineI18nClient };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"i18next";import{initReactI18next as t}from"react-i18next";import n from"i18next-browser-languagedetector";import r from"i18next-http-backend";const i={fallbackLng:`en`,supportedLngs:[`en`],defaultNS:`translation`,ns:[`translation`],interpolation:{escapeValue:!1},react:{useSuspense:!1}};async function a(i){let{loadPath:a=`/locales/{{lng}}/{{ns}}.json`,...o}=i,s=e.use(r).use(n).use(t);if(import.meta.env.MODE!==`production`){let{HMRPlugin:e}=await import(`i18next-hmr/plugin`);s.use(new e({vite:{client:!0}}))}return await s.init({...o,react:{bindI18n:`loaded languageChanged`,bindI18nStore:`added`,useSuspense:!0},backend:{loadPath:a}}),s}export{i as defaultI18nOptions,a as defineI18nClient};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AUTH_BASE_PATH, AUTH_BASE_URL, AuthFeatures, DefineAuthClientOptions, DefineAuthClientResult, defineAuthClient, defineAuthFeatures } from "./auth.js";
|
|
2
|
+
import { I18nClientOptions, I18nInitOptions, defaultI18nOptions, defineI18nClient } from "./i18n.js";
|
|
3
|
+
import { QueryClient, QueryClientProvider, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
|
+
import { I18nextProvider, Trans, useTranslation } from "react-i18next";
|
|
5
|
+
export * from "i18next";
|
|
6
|
+
export { AUTH_BASE_PATH, AUTH_BASE_URL, AuthFeatures, DefineAuthClientOptions, DefineAuthClientResult, I18nClientOptions, I18nInitOptions, I18nextProvider, QueryClient, QueryClientProvider, Trans, defaultI18nOptions, defineAuthClient, defineAuthFeatures, defineI18nClient, useMutation, useQuery, useQueryClient, useTranslation };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AUTH_BASE_PATH as e,AUTH_BASE_URL as t,defineAuthClient as n,defineAuthFeatures as r}from"./auth.js";import{defaultI18nOptions as i,defineI18nClient as a}from"./i18n.js";import{QueryClient as o,QueryClientProvider as s,useMutation as c,useQuery as l,useQueryClient as u}from"@tanstack/react-query";import{I18nextProvider as d,Trans as f,useTranslation as p}from"react-i18next";export*from"i18next";export{e as AUTH_BASE_PATH,t as AUTH_BASE_URL,d as I18nextProvider,o as QueryClient,s as QueryClientProvider,f as Trans,i as defaultI18nOptions,n as defineAuthClient,r as defineAuthFeatures,a as defineI18nClient,c as useMutation,l as useQuery,u as useQueryClient,p as useTranslation};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appos",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3-0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"release": "release-it",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"requireBranch": "main",
|
|
13
13
|
"requireCleanWorkingDir": true,
|
|
14
14
|
"requireUpstream": true,
|
|
15
|
-
"requireCommits":
|
|
15
|
+
"requireCommits": true,
|
|
16
16
|
"commitMessage": "chore: release v${version}",
|
|
17
17
|
"tagName": "v${version}",
|
|
18
18
|
"tagAnnotation": "Release v${version}",
|
|
@@ -49,169 +49,209 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"exports": {
|
|
52
|
+
"./api": {
|
|
53
|
+
"import": "./dist/exports/api/index.mjs",
|
|
54
|
+
"types": "./dist/exports/api/index.d.mts"
|
|
55
|
+
},
|
|
56
|
+
"./api/orm": {
|
|
57
|
+
"import": "./dist/exports/api/orm.mjs",
|
|
58
|
+
"types": "./dist/exports/api/orm.d.mts"
|
|
59
|
+
},
|
|
60
|
+
"./api/workflows": {
|
|
61
|
+
"import": "./dist/exports/api/workflows/index.mjs",
|
|
62
|
+
"types": "./dist/exports/api/workflows/index.d.mts"
|
|
63
|
+
},
|
|
52
64
|
"./cli": {
|
|
53
|
-
"import": "./
|
|
54
|
-
"types": "./
|
|
65
|
+
"import": "./dist/exports/cli/index.mjs",
|
|
66
|
+
"types": "./dist/exports/cli/index.d.mts"
|
|
55
67
|
},
|
|
56
|
-
"./
|
|
57
|
-
"import": "./
|
|
58
|
-
"types": "./
|
|
68
|
+
"./instrumentation": {
|
|
69
|
+
"import": "./dist/exports/instrumentation.mjs",
|
|
70
|
+
"types": "./dist/exports/instrumentation.d.mts"
|
|
59
71
|
},
|
|
60
|
-
"./
|
|
61
|
-
"import": "./
|
|
62
|
-
"types": "./
|
|
72
|
+
"./devtools": {
|
|
73
|
+
"import": "./dist/exports/devtools/index.js",
|
|
74
|
+
"types": "./dist/exports/devtools/index.d.ts"
|
|
63
75
|
},
|
|
64
|
-
"./
|
|
65
|
-
"import": "./
|
|
66
|
-
"types": "./
|
|
76
|
+
"./tests/api": {
|
|
77
|
+
"import": "./dist/exports/tests/api.mjs",
|
|
78
|
+
"types": "./dist/exports/tests/api.d.mts"
|
|
67
79
|
},
|
|
68
|
-
"./
|
|
69
|
-
"import": "./
|
|
70
|
-
"types": "./
|
|
80
|
+
"./tests/mock": {
|
|
81
|
+
"import": "./dist/exports/tests/mock.mjs",
|
|
82
|
+
"types": "./dist/exports/tests/mock.d.mts"
|
|
71
83
|
},
|
|
72
|
-
"./
|
|
73
|
-
"import": "./
|
|
74
|
-
"types": "./
|
|
84
|
+
"./tests/react": {
|
|
85
|
+
"import": "./dist/exports/tests/react.mjs",
|
|
86
|
+
"types": "./dist/exports/tests/react.d.mts"
|
|
75
87
|
},
|
|
76
|
-
"./
|
|
77
|
-
"import": "./
|
|
78
|
-
"types": "./
|
|
88
|
+
"./tests/setup": {
|
|
89
|
+
"import": "./dist/exports/tests/setup.mjs",
|
|
90
|
+
"types": "./dist/exports/tests/setup.d.mts"
|
|
91
|
+
},
|
|
92
|
+
"./vite": {
|
|
93
|
+
"import": "./dist/exports/vite/index.mjs",
|
|
94
|
+
"types": "./dist/exports/vite/index.d.mts"
|
|
95
|
+
},
|
|
96
|
+
"./vitest": {
|
|
97
|
+
"import": "./dist/exports/vitest/index.mjs",
|
|
98
|
+
"types": "./dist/exports/vitest/index.d.mts"
|
|
99
|
+
},
|
|
100
|
+
"./vitest/config": {
|
|
101
|
+
"import": "./dist/exports/vitest/config.mjs",
|
|
102
|
+
"types": "./dist/exports/vitest/config.d.mts"
|
|
103
|
+
},
|
|
104
|
+
"./vitest/globals": {
|
|
105
|
+
"import": "./dist/exports/vitest/globals.mjs",
|
|
106
|
+
"types": "./dist/exports/vitest/globals.d.mts"
|
|
107
|
+
},
|
|
108
|
+
"./web": {
|
|
109
|
+
"import": "./dist/exports/web/index.js",
|
|
110
|
+
"types": "./dist/exports/web/index.d.ts"
|
|
111
|
+
},
|
|
112
|
+
"./*": {
|
|
113
|
+
"import": "./dist/exports/vendors/*.js",
|
|
114
|
+
"types": "./dist/exports/vendors/*.d.ts"
|
|
79
115
|
}
|
|
80
116
|
},
|
|
81
117
|
"bin": {
|
|
82
|
-
"appos": "./
|
|
118
|
+
"appos": "./dist/bin/main.mjs",
|
|
119
|
+
"concurrently": "./dist/bin/concurrently.mjs",
|
|
120
|
+
"vite": "./dist/bin/vite.mjs",
|
|
121
|
+
"vitest": "./dist/bin/vitest.mjs"
|
|
83
122
|
},
|
|
84
123
|
"files": [
|
|
85
|
-
"
|
|
124
|
+
"dist"
|
|
86
125
|
],
|
|
87
126
|
"imports": {
|
|
88
127
|
"#*": "./*"
|
|
89
128
|
},
|
|
90
129
|
"dependencies": {
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
"devDependencies": {
|
|
96
|
-
"@aws-sdk/client-s3": "^3.929.0",
|
|
97
|
-
"@aws-sdk/s3-request-presigner": "^3.929.0",
|
|
98
|
-
"@babel/preset-typescript": "^7.28.5",
|
|
99
|
-
"@better-auth/sso": "^1.3.34",
|
|
130
|
+
"@aws-sdk/client-s3": "^3.954.0",
|
|
131
|
+
"@aws-sdk/s3-request-presigner": "^3.954.0",
|
|
132
|
+
"@better-auth/passkey": "^1.4.7",
|
|
133
|
+
"@better-auth/sso": "^1.4.7",
|
|
100
134
|
"@clack/prompts": "^0.11.0",
|
|
101
|
-
"@dbos-inc/dbos-sdk": "^4.
|
|
135
|
+
"@dbos-inc/dbos-sdk": "^4.5.13",
|
|
102
136
|
"@dnd-kit/core": "^6.3.1",
|
|
103
137
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
104
138
|
"@dnd-kit/sortable": "^10.0.0",
|
|
105
139
|
"@dnd-kit/utilities": "^3.2.2",
|
|
106
140
|
"@hookform/resolvers": "^5.2.2",
|
|
107
|
-
"@keyv/redis": "^5.1.
|
|
108
|
-
"@marsidev/react-turnstile": "^1.
|
|
109
|
-
"@napi-rs/canvas": "^0.1.
|
|
141
|
+
"@keyv/redis": "^5.1.5",
|
|
142
|
+
"@marsidev/react-turnstile": "^1.4.0",
|
|
143
|
+
"@napi-rs/canvas": "^0.1.84",
|
|
110
144
|
"@opentelemetry/api": "^1.9.0",
|
|
111
|
-
"@opentelemetry/auto-instrumentations-node": "^0.67.
|
|
145
|
+
"@opentelemetry/auto-instrumentations-node": "^0.67.3",
|
|
112
146
|
"@opentelemetry/exporter-trace-otlp-http": "^0.208.0",
|
|
113
147
|
"@opentelemetry/instrumentation": "^0.208.0",
|
|
114
|
-
"@opentelemetry/instrumentation-pino": "^0.55.
|
|
148
|
+
"@opentelemetry/instrumentation-pino": "^0.55.1",
|
|
115
149
|
"@opentelemetry/resources": "^2.2.0",
|
|
116
150
|
"@opentelemetry/sdk-node": "^0.208.0",
|
|
117
151
|
"@opentelemetry/sdk-trace-node": "^2.2.0",
|
|
118
152
|
"@opentelemetry/semantic-conventions": "^1.38.0",
|
|
119
|
-
"@react-email/components": "^1.0.
|
|
153
|
+
"@react-email/components": "^1.0.2",
|
|
120
154
|
"@react-email/render": "^2.0.0",
|
|
121
|
-
"@react-router/
|
|
122
|
-
"@
|
|
123
|
-
"@
|
|
124
|
-
"@
|
|
125
|
-
"@socket.io/redis-streams-adapter": "^0.2.2",
|
|
126
|
-
"@swc/core": "^1.15.1",
|
|
127
|
-
"@tabler/icons-react": "^3.35.0",
|
|
155
|
+
"@react-router/remix-routes-option-adapter": "^7.11.0",
|
|
156
|
+
"@release-it/conventional-changelog": "^10.0.4",
|
|
157
|
+
"@swc/core": "^1.15.7",
|
|
158
|
+
"@tabler/icons-react": "^3.36.0",
|
|
128
159
|
"@tailwindcss/typography": "^0.5.19",
|
|
129
|
-
"@tailwindcss/vite": "^4.1.
|
|
130
|
-
"@tanstack/react-query": "^5.90.
|
|
131
|
-
"@tanstack/react-
|
|
160
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
161
|
+
"@tanstack/react-query": "^5.90.12",
|
|
162
|
+
"@tanstack/react-query-devtools": "^5.91.1",
|
|
163
|
+
"@tanstack/react-router-devtools": "^1.141.6",
|
|
132
164
|
"@testing-library/jest-dom": "^6.9.1",
|
|
133
|
-
"@testing-library/react": "^16.3.
|
|
165
|
+
"@testing-library/react": "^16.3.1",
|
|
134
166
|
"@testing-library/user-event": "^14.6.1",
|
|
135
|
-
"@trpc/client": "^11.
|
|
136
|
-
"@trpc/react-query": "^11.
|
|
137
|
-
"@trpc/server": "^11.
|
|
138
|
-
"@types/
|
|
139
|
-
"@types/
|
|
140
|
-
"@types/
|
|
167
|
+
"@trpc/client": "^11.8.0",
|
|
168
|
+
"@trpc/react-query": "^11.8.0",
|
|
169
|
+
"@trpc/server": "^11.8.0",
|
|
170
|
+
"@types/cors": "^2.8.19",
|
|
171
|
+
"@types/express": "^5.0.6",
|
|
172
|
+
"@types/helmet": "^4.0.0",
|
|
173
|
+
"@types/node": "^25.0.3",
|
|
174
|
+
"@types/nodemailer": "^7.0.4",
|
|
141
175
|
"@types/nprogress": "^0.2.3",
|
|
142
|
-
"@types/pg": "^8.
|
|
143
|
-
"@types/react": "^19.2.
|
|
176
|
+
"@types/pg": "^8.16.0",
|
|
177
|
+
"@types/react": "^19.2.7",
|
|
144
178
|
"@types/react-dom": "^19.2.3",
|
|
145
179
|
"@types/sharp": "^0.32.0",
|
|
146
180
|
"@types/supertest": "^6.0.3",
|
|
147
|
-
"
|
|
148
|
-
"better-auth": "^1.4.
|
|
181
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
182
|
+
"better-auth": "^1.4.7",
|
|
183
|
+
"canvas": "^3.2.0",
|
|
149
184
|
"class-variance-authority": "^0.7.1",
|
|
150
185
|
"clsx": "^2.1.1",
|
|
151
186
|
"cmdk": "^1.1.1",
|
|
187
|
+
"concurrently": "^9.2.1",
|
|
188
|
+
"cors": "^2.8.5",
|
|
152
189
|
"date-fns": "^4.1.0",
|
|
153
|
-
"drizzle-kit": "^1.0.0-beta.
|
|
154
|
-
"drizzle-orm": "^1.0.0-beta.
|
|
155
|
-
"drizzle-
|
|
190
|
+
"drizzle-kit": "^1.0.0-beta.2-f9236e3",
|
|
191
|
+
"drizzle-orm": "^1.0.0-beta.2-f9236e3",
|
|
192
|
+
"drizzle-seed": "^1.0.0-beta.2-f9236e3",
|
|
193
|
+
"drizzle-zod": "^1.0.0-beta.2-f9236e3",
|
|
156
194
|
"embla-carousel-react": "^8.6.0",
|
|
157
|
-
"es-toolkit": "^1.
|
|
195
|
+
"es-toolkit": "^1.43.0",
|
|
196
|
+
"express-rate-limit": "^8.2.1",
|
|
158
197
|
"flydrive": "^1.3.0",
|
|
159
|
-
"
|
|
198
|
+
"helmet": "^8.1.0",
|
|
199
|
+
"i18next": "^25.7.3",
|
|
160
200
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
161
|
-
"i18next-fs-backend": "^2.6.
|
|
201
|
+
"i18next-fs-backend": "^2.6.1",
|
|
162
202
|
"i18next-hmr": "^3.1.5",
|
|
163
203
|
"i18next-http-backend": "^3.0.2",
|
|
164
204
|
"input-otp": "^1.4.2",
|
|
165
|
-
"jsdom": "^27.
|
|
166
|
-
"keyv": "^5.5.
|
|
167
|
-
"lucide-react": "^0.
|
|
168
|
-
"mediabunny": "^1.
|
|
205
|
+
"jsdom": "^27.3.0",
|
|
206
|
+
"keyv": "^5.5.5",
|
|
207
|
+
"lucide-react": "^0.562.0",
|
|
208
|
+
"mediabunny": "^1.27.0",
|
|
169
209
|
"next-themes": "^0.4.6",
|
|
170
|
-
"nodemailer": "^7.0.
|
|
210
|
+
"nodemailer": "^7.0.11",
|
|
171
211
|
"nprogress": "^0.2.0",
|
|
172
|
-
"nuqs": "^2.7.3",
|
|
173
212
|
"openapi-typescript": "^7.10.1",
|
|
174
213
|
"pdf-lib": "^1.17.1",
|
|
214
|
+
"pdfjs-dist": "^5.4.449",
|
|
175
215
|
"pg": "^8.16.3",
|
|
176
216
|
"picocolors": "^1.1.1",
|
|
177
217
|
"pino": "^10.1.0",
|
|
178
|
-
"pino-pretty": "^13.1.
|
|
218
|
+
"pino-pretty": "^13.1.3",
|
|
179
219
|
"radix-ui": "^1.4.3",
|
|
180
|
-
"react": "^19.2.
|
|
181
|
-
"react-
|
|
182
|
-
"react-
|
|
183
|
-
"react-
|
|
184
|
-
"react-
|
|
185
|
-
"react-
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"react-router-mdx": "^1.0.8",
|
|
190
|
-
"recharts": "^3.4.1",
|
|
191
|
-
"redis": "^4.7.1",
|
|
192
|
-
"release-it": "^19.0.6",
|
|
220
|
+
"react": "^19.2.3",
|
|
221
|
+
"react-day-picker": "^9.13.0",
|
|
222
|
+
"react-dom": "^19.2.3",
|
|
223
|
+
"react-hook-form": "^7.68.0",
|
|
224
|
+
"react-i18next": "^16.5.0",
|
|
225
|
+
"react-resizable-panels": "^4.0.7",
|
|
226
|
+
"recharts": "^3.6.0",
|
|
227
|
+
"redis": "^5.10.0",
|
|
228
|
+
"release-it": "^19.1.0",
|
|
193
229
|
"remix-flat-routes": "^0.8.5",
|
|
194
|
-
"
|
|
195
|
-
"socket.io-client": "^4.8.1",
|
|
230
|
+
"sharp": "^0.34.5",
|
|
196
231
|
"sonner": "^2.0.7",
|
|
197
|
-
"superjson": "^2.2.
|
|
232
|
+
"superjson": "^2.2.6",
|
|
198
233
|
"supertest": "^7.1.4",
|
|
199
234
|
"tailwind-merge": "^3.4.0",
|
|
200
|
-
"tailwindcss": "^4.1.
|
|
201
|
-
"tsx": "^4.
|
|
235
|
+
"tailwindcss": "^4.1.18",
|
|
236
|
+
"tsx": "^4.21.0",
|
|
202
237
|
"tw-animate-css": "^1.4.0",
|
|
238
|
+
"ultimate-express": "^2.0.13",
|
|
203
239
|
"vaul": "^1.1.2",
|
|
204
|
-
"vite": "npm:rolldown-vite
|
|
240
|
+
"vite": "npm:rolldown-vite@^7.3.0",
|
|
205
241
|
"vite-plugin-babel": "^1.3.2",
|
|
206
|
-
"vite-tsconfig-paths": "^
|
|
207
|
-
"vitest": "^4.0.
|
|
242
|
+
"vite-tsconfig-paths": "^6.0.3",
|
|
243
|
+
"vitest": "^4.0.16",
|
|
208
244
|
"vitest-mock-extended": "^3.1.0",
|
|
209
245
|
"youch": "^3.3.4",
|
|
210
|
-
"zod": "^4.1
|
|
211
|
-
"zod-openapi": "^5.4.
|
|
246
|
+
"zod": "^4.2.1",
|
|
247
|
+
"zod-openapi": "^5.4.5"
|
|
212
248
|
},
|
|
213
249
|
"trustedDependencies": [
|
|
214
250
|
"canvas",
|
|
215
251
|
"sharp"
|
|
216
|
-
]
|
|
252
|
+
],
|
|
253
|
+
"devDependencies": {
|
|
254
|
+
"change-case": "^5.4.4",
|
|
255
|
+
"rate-limit-redis": "^4.3.1"
|
|
256
|
+
}
|
|
217
257
|
}
|
package/build/bin/main.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import e,{join as t}from"node:path";import n from"node:fs";var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},d=((e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(l(((e,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),o=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+s(i,t,n,a)+t:e+i+t},s=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},c=(e=a)=>{let t=e?o:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=c(),t.exports.createColors=c}))(),1);function f(t,r=t){let i=[];try{let a=n.readdirSync(t,{withFileTypes:!0});for(let n of a){let a=e.join(t,n.name);n.isDirectory()?i.push(...f(a,r)):n.isFile()&&n.name.endsWith(`.ts`)&&i.push(a)}}catch{}return i}function p(t,n){return e.relative(n,t).replace(/\.ts$/,``).replace(/\//g,`:`)}async function m(e,t){let n={},r=[],i=new Map;if(t.opts&&`shape`in t.opts){let e=t.opts.shape;for(let[t,n]of Object.entries(e)){let e=n.meta?.();e?.short&&typeof e.short==`string`&&i.set(e.short,t)}}for(let t=0;t<e.length;t++){let a=e[t];if(a.startsWith(`--`)){let[r,...i]=a.slice(2).split(`=`);if(i.length>0)n[r]=i.join(`=`);else{let i=e[t+1];i&&!i.startsWith(`-`)?(n[r]=i,t++):n[r]=!0}}else if(a.startsWith(`-`)&&a.length>1){let r=a.slice(1);if(r.length>1)for(let e of r){let t=i.get(e);t&&(n[t]=!0)}else{let a=r,o=i.get(a)||a,s=e[t+1];s&&!s.startsWith(`-`)?(n[o]=s,t++):n[o]=!0}}else r.push(a)}let a={};if(t.opts&&`safeParse`in t.opts){let e=t.opts.safeParse(n);if(!e.success){for(let t of e.error.issues){let e=t.path.join(`.`);console.error(d.default.red(`Error:\n --${e} => ${t.message.toLowerCase()}`))}process.exit(1)}a=e.data}let o=[];if(t.args&&`safeParse`in t.args){let e=t.args.safeParse(r);if(!e.success){for(let t of e.error.issues){let e=t.path.join(`.`);console.error(d.default.red(`Error:\n ${e} => ${t.message.toLowerCase()}`))}process.exit(1)}o=e.data}return{args:o,options:a}}function h(e,t){console.log(`${d.default.bold(e.config.APP_NAME)} - ${e.config.APP_DESC}\n`),console.log(`Commands:`);let n=0;for(let[e,r]of t){let t=r.aliases&&r.aliases.length>0?` (${r.aliases.join(`, `)})`:``,i=e.length+t.length;n=Math.max(n,i)}n+=8;for(let[e,r]of t){let t=r.aliases&&r.aliases.length>0?` (${r.aliases.join(`, `)})`:``,i=r.aliases&&r.aliases.length>0?d.default.dim(` (${r.aliases.join(`, `)})`):``,a=`${d.default.cyan(e)}${i}`,o=e.length+t.length,s=` `.repeat(Math.max(0,n-o));console.log(` ${a}${s}${r.description||`No description`}`)}}function g(e,t){console.log(`${t.description||`No description`}`),console.log();let n=`Usage: ${d.default.cyan(e)}`;if(t.args){let e=t.args._def,r=e?.typeName||e?.type;if(r===`ZodTuple`||r===`tuple`){let t=e.items||[];for(let e of t){let t=e,r=t.meta?.()?.name||t._def?.description||`arg`,i=t.isOptional?.()??!1;n+=i?` [${r}]`:` <${r}>`}if(e.rest){let t=e.rest._def?.description||`args`;n+=` [${t}...]`}}else if(r===`ZodArray`||r===`array`){let r=t.args.meta?.()?.name||`args`,i=e.minLength?.value||0;i===0?n+=` [${r}...]`:i===1?n+=` <${r}>`:n+=` <${r}...>`}}if(t.opts&&(n+=` [options]`),console.log(n),console.log(),t.args){let e=t.args._def,n=e?.typeName||e?.type;if(n===`ZodTuple`||n===`tuple`||n===`ZodArray`||n===`array`){if(console.log(`Arguments:`),n===`ZodTuple`||n===`tuple`){let t=e.items||[];for(let e=0;e<t.length;e++){let n=t[e],r=n.meta?.(),i=r?.name||n._def?.description||`arg${e+1}`,a=r?.description||n._def?.description||i,o=n.isOptional?.()??!1?``:` (required)`;console.log(` ${d.default.cyan(i)}${d.default.dim(o)}\t\t${a}`)}if(e.rest){let t=e.rest._def?.description||`additional args`;console.log(` ${d.default.cyan(`${t}...`)}\t\t${t}`)}}else{let n=t.args.meta?.(),r=n?.name||`args`,i=n?.description||``,a=e.minLength?.value||0,o=r;(a===0||a>1)&&(o=`${r}...`);let s=a>0?` (required)`:``;console.log(` ${d.default.cyan(o)}${d.default.dim(s)}\t\t${i}`)}console.log()}}if(console.log(`Options:`),console.log(` ${d.default.cyan(`-h, --help`)}\t\t\tShow help for this command`),t.opts&&`shape`in t.opts){let e=t.opts.shape;for(let[t,n]of Object.entries(e)){let e=n,r=e.meta?.(),i=e.isOptional?.()??!0,a=e._def?.typeName===`ZodBoolean`,o=r?.short?`-${r.short}, `:` `,s=`--${t}`,c=a?``:` <value>`,l=i?``:` (required)`,u=e._def?.defaultValue,f=u===void 0?``:`(default: ${JSON.stringify(u)})`,p=r?.description||``;console.log(` ${d.default.cyan(o+s+c)}\t\t${p} ${d.default.dim(l+f)}`)}}}async function _(e){let t=new Map,n=new Map,r=f(e.commandsDir);for(let i of r)try{let r=(await import(i)).default;if(r&&typeof r==`object`&&`run`in r){let a=p(i,e.commandsDir);if(t.set(a,r),r.aliases)for(let e of r.aliases)n.set(e,a)}}catch(e){console.warn(d.default.yellow(`Warning: Could not load command from ${i}: ${e instanceof Error?e.message:String(e)}`))}return{async run(r=process.argv.slice(2)){let[i,...a]=r;if(!i||i===`--help`||i===`-h`){h(e.container,t);return}let o=n.get(i)||i,s=t.get(o);if(s||(console.error(d.default.red(`Unknown command: ${i}\n`)),h(e.container,t),process.exit(1)),a.includes(`--help`)||a.includes(`-h`)){g(o,s);return}try{let{args:t,options:n}=await m(a,s);await s.run(t,n,e.container)}catch(e){e instanceof Error&&(console.error(d.default.red(`Error:`),e.message),(e.message.includes(`argument`)||e.message.includes(`Invalid arguments`))&&(console.log(),console.log(`Run '${d.default.cyan(`${o} --help`)}' to see usage information.`))),process.exit(1)}},showHelp(){h(e.container,t)},showCommandHelp(e){g(Array.from(t.entries()).find(([t,n])=>n===e)?.[0]||`unknown`,e)}}}const v=`appos`;async function y(){let{defineContainer:e}=await import(t(process.cwd(),v,`container.ts`));await(await _({container:await e(),commandsDir:t(process.cwd(),v,`commands`)})).run(process.argv.slice(2))}try{await y()}catch(e){console.error(e),process.exit(1)}export{};
|