@sfxcode/nuxt-mongocamp-server 1.9.2 → 2.0.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/README.md +97 -7
- package/dist/module.d.mts +31 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +42 -4
- package/dist/runtime/api/apis/AdminApi.d.ts +9 -9
- package/dist/runtime/api/apis/AdminApi.js +6 -6
- package/dist/runtime/api/apis/ApplicationApi.d.ts +6 -6
- package/dist/runtime/api/apis/ApplicationApi.js +4 -4
- package/dist/runtime/api/apis/AuthApi.d.ts +7 -7
- package/dist/runtime/api/apis/AuthApi.js +6 -6
- package/dist/runtime/api/apis/BucketApi.d.ts +7 -7
- package/dist/runtime/api/apis/BucketApi.js +6 -6
- package/dist/runtime/api/apis/CollectionApi.d.ts +69 -28
- package/dist/runtime/api/apis/CollectionApi.js +46 -21
- package/dist/runtime/api/apis/DatabaseApi.d.ts +5 -5
- package/dist/runtime/api/apis/DatabaseApi.js +4 -4
- package/dist/runtime/api/apis/DocumentApi.d.ts +141 -24
- package/dist/runtime/api/apis/DocumentApi.js +85 -12
- package/dist/runtime/api/apis/FileApi.d.ts +38 -6
- package/dist/runtime/api/apis/FileApi.js +24 -4
- package/dist/runtime/api/apis/IndexApi.d.ts +6 -6
- package/dist/runtime/api/apis/IndexApi.js +4 -4
- package/dist/runtime/api/apis/JobsApi.d.ts +5 -5
- package/dist/runtime/api/apis/JobsApi.js +4 -4
- package/dist/runtime/api/apis/SystemApi.d.ts +1 -1
- package/dist/runtime/api/docs/AdminApi.md +7 -7
- package/dist/runtime/api/docs/ApplicationApi.md +4 -4
- package/dist/runtime/api/docs/AuthApi.md +3 -3
- package/dist/runtime/api/docs/BucketApi.md +3 -3
- package/dist/runtime/api/docs/CollectionApi.md +48 -36
- package/dist/runtime/api/docs/DatabaseApi.md +2 -2
- package/dist/runtime/api/docs/DocumentApi.md +64 -28
- package/dist/runtime/api/docs/FileApi.md +20 -8
- package/dist/runtime/api/docs/IndexApi.md +4 -4
- package/dist/runtime/api/docs/JobsApi.md +2 -2
- package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
- package/dist/runtime/api/models/Capabilities.d.ts +1 -1
- package/dist/runtime/api/models/CapabilityLimits.d.ts +1 -1
- package/dist/runtime/api/models/ClusterInformation.d.ts +1 -1
- package/dist/runtime/api/models/ClusterMemberInformation.d.ts +7 -4
- package/dist/runtime/api/models/CollectionCollation.d.ts +1 -1
- package/dist/runtime/api/models/CollectionOptions.d.ts +1 -1
- package/dist/runtime/api/models/CollectionPermission.d.ts +1 -1
- package/dist/runtime/api/models/CollectionStatus.d.ts +1 -1
- package/dist/runtime/api/models/CollectionSummary.d.ts +1 -1
- package/dist/runtime/api/models/ConnectionStats.d.ts +1 -1
- package/dist/runtime/api/models/CopyRequest.d.ts +1 -1
- package/dist/runtime/api/models/CopyResponse.d.ts +1 -1
- package/dist/runtime/api/models/CountResponse.d.ts +1 -1
- package/dist/runtime/api/models/CreateCollectionResponse.d.ts +1 -1
- package/dist/runtime/api/models/DatabaseInfo.d.ts +1 -1
- package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
- package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
- package/dist/runtime/api/models/FieldInfo.d.ts +1 -1
- package/dist/runtime/api/models/FieldTypeCount.d.ts +1 -1
- package/dist/runtime/api/models/FileInformation.d.ts +1 -1
- package/dist/runtime/api/models/Grant.d.ts +1 -1
- package/dist/runtime/api/models/ImportResponse.d.ts +1 -1
- package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -1
- package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
- package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
- package/dist/runtime/api/models/IndexInfo.d.ts +1 -1
- package/dist/runtime/api/models/IndexKey.d.ts +1 -1
- package/dist/runtime/api/models/IndexOptionsRequest.d.ts +3 -2
- package/dist/runtime/api/models/IndexUsage.d.ts +1 -1
- package/dist/runtime/api/models/InsertError.d.ts +1 -1
- package/dist/runtime/api/models/InsertResponse.d.ts +1 -1
- package/dist/runtime/api/models/JobConfig.d.ts +1 -1
- package/dist/runtime/api/models/JobInformation.d.ts +1 -1
- package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
- package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +1 -1
- package/dist/runtime/api/models/JsonValueAny.d.ts +1 -1
- package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
- package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
- package/dist/runtime/api/models/Login.d.ts +1 -1
- package/dist/runtime/api/models/LoginResult.d.ts +1 -1
- package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
- package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -1
- package/dist/runtime/api/models/MongoFindRequest.d.ts +1 -1
- package/dist/runtime/api/models/MongoIndex.d.ts +1 -1
- package/dist/runtime/api/models/OpCounters.d.ts +1 -1
- package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
- package/dist/runtime/api/models/PipelineStage.d.ts +1 -1
- package/dist/runtime/api/models/RenameRequest.d.ts +1 -1
- package/dist/runtime/api/models/RenameResponse.d.ts +1 -1
- package/dist/runtime/api/models/ReplicaSetState.d.ts +1 -1
- package/dist/runtime/api/models/Role.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
- package/dist/runtime/api/models/SearchRequest.d.ts +1 -1
- package/dist/runtime/api/models/SettingsResponse.d.ts +5 -3
- package/dist/runtime/api/models/SystemInfo.d.ts +1 -1
- package/dist/runtime/api/models/SystemStats.d.ts +1 -1
- package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +1 -1
- package/dist/runtime/api/models/UpdateRequest.d.ts +1 -1
- package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
- package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
- package/dist/runtime/api/models/UserInformation.d.ts +1 -1
- package/dist/runtime/api/models/UserProfile.d.ts +1 -1
- package/dist/runtime/api/models/Version.d.ts +1 -1
- package/dist/runtime/api/runtime.d.ts +1 -1
- package/dist/runtime/composables/mongocampApi.js +7 -0
- package/dist/runtime/composables/mongocampSearch.d.ts +3 -1
- package/dist/runtime/composables/mongocampSearch.js +3 -3
- package/dist/runtime/server/composables/mongocampApi.d.ts +2 -1
- package/dist/runtime/server/composables/mongocampApi.js +11 -5
- package/dist/runtime/server/composables/mongocampServerApi.d.ts +2 -1
- package/dist/runtime/server/composables/mongocampServerApi.js +3 -7
- package/dist/runtime/server/mongocamp/core.d.ts +22 -0
- package/dist/runtime/server/mongocamp/core.js +32 -0
- package/dist/runtime/server/mongocamp/handler.d.ts +3 -0
- package/dist/runtime/server/mongocamp/handler.js +8 -0
- package/dist/runtime/server/mongocamp/plugin.d.ts +3 -0
- package/dist/runtime/server/mongocamp/plugin.js +7 -0
- package/dist/runtime/utils/extendedJson.d.ts +12 -0
- package/dist/runtime/utils/extendedJson.js +60 -0
- package/dist/types.d.mts +1 -1
- package/package.json +40 -27
|
@@ -3,7 +3,7 @@ import type { FilterFieldValue } from '../utils/buildFieldFilterExpression.js';
|
|
|
3
3
|
export declare function useMongocampSearch(): {
|
|
4
4
|
mongoFindRequest: (filter?: object, sort?: object, projection?: object) => MongoFindRequest;
|
|
5
5
|
findRequest: (collection: string, searchParameter?: MongoFindRequest, rows?: number, actualPage?: number) => FindRequest;
|
|
6
|
-
find: (collectionName: string, filter: string | undefined, page?: number, sort?: string[] | undefined, projection?: string[] | undefined, rowsPerPage?: number) => Promise<{
|
|
6
|
+
find: (collectionName: string, filter: string | undefined, page?: number, sort?: string[] | undefined, projection?: string[] | undefined, rowsPerPage?: number, filterCaseInsensitive?: boolean) => Promise<{
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
}[]>;
|
|
9
9
|
findAll: (collectionName: string, page?: number, sort?: string[] | undefined, projection?: string[] | undefined, rowsPerPage?: number) => Promise<{
|
|
@@ -18,6 +18,8 @@ export interface PaginatedFindOptions {
|
|
|
18
18
|
sort?: string[];
|
|
19
19
|
projection?: string[];
|
|
20
20
|
rowsPerPage?: number;
|
|
21
|
+
/** Wildcards of the filter ignore the case (server 2.0.0 matches them case-sensitively by default). */
|
|
22
|
+
filterCaseInsensitive?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export declare function usePaginatedFind(collectionName: string, options?: PaginatedFindOptions): {
|
|
23
25
|
documents: import("vue").Ref<{
|
|
@@ -11,8 +11,8 @@ export function useMongocampSearch() {
|
|
|
11
11
|
const findRequest = (collection, searchParameter = mongoFindRequest(), rows = config.public.mongocamp?.paginationSize, actualPage = 1) => {
|
|
12
12
|
return { collectionName: collection, mongoFindRequest: searchParameter, rowsPerPage: rows, page: actualPage };
|
|
13
13
|
};
|
|
14
|
-
function find(collectionName, filter, page = 1, sort = void 0, projection = void 0, rowsPerPage = config.public.mongocamp?.paginationSize) {
|
|
15
|
-
return documentApi.listDocuments({ collectionName, filter, sort, projection, page, rowsPerPage });
|
|
14
|
+
function find(collectionName, filter, page = 1, sort = void 0, projection = void 0, rowsPerPage = config.public.mongocamp?.paginationSize, filterCaseInsensitive) {
|
|
15
|
+
return documentApi.listDocuments({ collectionName, filter, sort, projection, page, rowsPerPage, filterCaseInsensitive });
|
|
16
16
|
}
|
|
17
17
|
function findAll(collectionName, page = 1, sort = void 0, projection = void 0, rowsPerPage = config.public.mongocamp?.paginationSize) {
|
|
18
18
|
return find(collectionName, void 0, page, sort, projection, rowsPerPage);
|
|
@@ -35,7 +35,7 @@ export function usePaginatedFind(collectionName, options = {}) {
|
|
|
35
35
|
pending.value = true;
|
|
36
36
|
error.value = null;
|
|
37
37
|
try {
|
|
38
|
-
documents.value = await find(collectionName, options.filter, page.value, options.sort, options.projection, rowsPerPage.value);
|
|
38
|
+
documents.value = await find(collectionName, options.filter, page.value, options.sort, options.projection, rowsPerPage.value, options.filterCaseInsensitive);
|
|
39
39
|
} catch (e) {
|
|
40
40
|
error.value = e;
|
|
41
41
|
} finally {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { H3Event } from 'h3';
|
|
2
|
-
|
|
2
|
+
/** The generated client for the server code; `event` is kept for the signature of the earlier versions. */
|
|
3
|
+
export declare function useMongocampApi(_event: H3Event, token?: string): {
|
|
3
4
|
adminApi: import("../../api/index.js").AdminApi;
|
|
4
5
|
applicationApi: import("../../api/index.js").ApplicationApi;
|
|
5
6
|
authApi: import("../../api/index.js").AuthApi;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { useRuntimeConfig } from "
|
|
1
|
+
import { useRuntimeConfig } from "nitro/runtime-config";
|
|
2
|
+
import { useMongocampCore } from "../mongocamp/core.js";
|
|
2
3
|
import { useMongocampServerApi } from "./mongocampServerApi.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
4
|
+
const EmbeddedBase = "http://mongocamp.embedded";
|
|
5
|
+
export function useMongocampApi(_event, token) {
|
|
6
|
+
const config = useRuntimeConfig();
|
|
6
7
|
const apiKey = config.mongocampApiKey;
|
|
7
|
-
|
|
8
|
+
const embedded = config.mongocampServer;
|
|
9
|
+
if (embedded?.enabled) {
|
|
10
|
+
const fetchApi = async (input, init) => (await useMongocampCore(embedded)).fetch(new Request(input, init));
|
|
11
|
+
return useMongocampServerApi(EmbeddedBase, apiKey, token, fetchApi);
|
|
12
|
+
}
|
|
13
|
+
return useMongocampServerApi(config.public.mongocamp?.url, apiKey, token);
|
|
8
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { FetchAPI } from '../../api/index.js';
|
|
2
|
+
export declare function useMongocampServerApi(url: string, key?: string, token?: string, fetchApi?: FetchAPI): {
|
|
2
3
|
adminApi: import("../../api/index.js").AdminApi;
|
|
3
4
|
applicationApi: import("../../api/index.js").ApplicationApi;
|
|
4
5
|
authApi: import("../../api/index.js").AuthApi;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { Configuration } from "../../api/index.js";
|
|
2
2
|
import { createMongocampApis } from "../../utils/createMongocampApis.js";
|
|
3
|
-
export function useMongocampServerApi(url, key, token) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
configuration = new Configuration({ basePath: url, apiKey: key });
|
|
7
|
-
else if (token && token.length > 0)
|
|
8
|
-
configuration = new Configuration({ basePath: url, accessToken: token });
|
|
9
|
-
return createMongocampApis(configuration);
|
|
3
|
+
export function useMongocampServerApi(url, key, token, fetchApi) {
|
|
4
|
+
const credentials = key && key.length > 0 ? { apiKey: key } : token && token.length > 0 ? { accessToken: token } : {};
|
|
5
|
+
return createMongocampApis(new Configuration({ basePath: url, ...credentials, ...fetchApi ? { fetchApi } : {} }));
|
|
10
6
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MongocampServer } from '@sfxcode/mongocamp-server-core';
|
|
2
|
+
/** The settings of the embedded server in the private runtime config (`runtimeConfig.mongocampServer`). */
|
|
3
|
+
export interface EmbeddedServerConfig {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
prefix: string;
|
|
6
|
+
connectionUri: string;
|
|
7
|
+
config: Record<string, unknown>;
|
|
8
|
+
jobs: boolean;
|
|
9
|
+
version: {
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The MongoCamp server of this Nitro instance, created with the first request. The env variables of the Scala server (`CONNECTION_*`,
|
|
16
|
+
* `AUTH_*`, ...) are read by the core and win over `config`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useMongocampCore(settings?: EmbeddedServerConfig): Promise<MongocampServer>;
|
|
19
|
+
/** Closes the server (database, scheduler, timers) when Nitro stops. */
|
|
20
|
+
export declare function closeMongocampCore(): Promise<void>;
|
|
21
|
+
/** A request for the core: the path without the prefix, the body as a stream. */
|
|
22
|
+
export declare function toCoreRequest(request: Request, prefix: string): Request;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createMongocampServer } from "@sfxcode/mongocamp-server-core";
|
|
2
|
+
import { useRuntimeConfig } from "nitro/runtime-config";
|
|
3
|
+
let server;
|
|
4
|
+
export function useMongocampCore(settings = useRuntimeConfig().mongocampServer) {
|
|
5
|
+
if (!settings.enabled) {
|
|
6
|
+
return Promise.reject(new Error('[mongocamp] the embedded server is not enabled (module option "server.enabled")'));
|
|
7
|
+
}
|
|
8
|
+
server ??= createMongocampServer({
|
|
9
|
+
connectionUri: settings.connectionUri || void 0,
|
|
10
|
+
config: settings.config,
|
|
11
|
+
jobs: settings.jobs,
|
|
12
|
+
version: settings.version
|
|
13
|
+
}).catch((error) => {
|
|
14
|
+
server = void 0;
|
|
15
|
+
throw error;
|
|
16
|
+
});
|
|
17
|
+
return server;
|
|
18
|
+
}
|
|
19
|
+
export async function closeMongocampCore() {
|
|
20
|
+
const current = server;
|
|
21
|
+
server = void 0;
|
|
22
|
+
if (current) {
|
|
23
|
+
await (await current.catch(() => void 0))?.close();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function toCoreRequest(request, prefix) {
|
|
27
|
+
const url = new URL(request.url);
|
|
28
|
+
url.pathname = url.pathname.startsWith(prefix) ? url.pathname.slice(prefix.length) || "/" : url.pathname;
|
|
29
|
+
const headers = new Headers(request.headers);
|
|
30
|
+
headers.set("x-forwarded-prefix", prefix);
|
|
31
|
+
return new Request(url, { method: request.method, headers, body: request.body, duplex: "half", signal: request.signal });
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineHandler } from "nitro";
|
|
2
|
+
import { useRuntimeConfig } from "nitro/runtime-config";
|
|
3
|
+
import { toCoreRequest, useMongocampCore } from "./core.js";
|
|
4
|
+
export default defineHandler(async (event) => {
|
|
5
|
+
const settings = useRuntimeConfig().mongocampServer;
|
|
6
|
+
const core = await useMongocampCore(settings);
|
|
7
|
+
return core.fetch(toCoreRequest(event.req, settings.prefix));
|
|
8
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A document of the server with typed values: `ObjectId`, `Date`, `Decimal128`, `Binary`, `BSONRegExp`, ...; numbers stay numbers, an
|
|
3
|
+
* integer beyond 2^53 is a `bigint`.
|
|
4
|
+
*/
|
|
5
|
+
export declare function fromExtendedJson<T = Record<string, unknown>>(document: unknown): T;
|
|
6
|
+
/**
|
|
7
|
+
* A document with typed values (as `fromExtendedJson` gives it) for a request body: relaxed Extended JSON, a text that looks like a date
|
|
8
|
+
* keeps the marker so that the server stores a text, an integer beyond 2^53 (`bigint`, `Long`) is `{"$numberLong": ...}`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toExtendedJson(document: unknown): Record<string, unknown>;
|
|
11
|
+
/** The id of a document (or the id itself) as text: the hex string of an ObjectId, the value of any other id. */
|
|
12
|
+
export declare function documentId(documentOrId: unknown): string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EJSON, Long, ObjectId } from "bson";
|
|
2
|
+
const TextMarker = "$string";
|
|
3
|
+
const isoInstant = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,9})?(?:Z|[+-]\d{2}:\d{2})$/;
|
|
4
|
+
function isPlainObject(value) {
|
|
5
|
+
return value !== null && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype;
|
|
6
|
+
}
|
|
7
|
+
function unwrapTexts(value) {
|
|
8
|
+
if (Array.isArray(value)) {
|
|
9
|
+
return value.map(unwrapTexts);
|
|
10
|
+
}
|
|
11
|
+
if (isPlainObject(value)) {
|
|
12
|
+
const keys = Object.keys(value);
|
|
13
|
+
if (keys.length === 1 && keys[0] === TextMarker && typeof value[TextMarker] === "string") {
|
|
14
|
+
return value[TextMarker];
|
|
15
|
+
}
|
|
16
|
+
return Object.fromEntries(keys.map((key) => [key, unwrapTexts(value[key])]));
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
const maxSafe = BigInt(Number.MAX_SAFE_INTEGER);
|
|
21
|
+
function exactInteger(value) {
|
|
22
|
+
return value > maxSafe || value < -maxSafe ? { $numberLong: value.toString() } : Number(value);
|
|
23
|
+
}
|
|
24
|
+
function markTexts(value) {
|
|
25
|
+
if (typeof value === "string") {
|
|
26
|
+
return isoInstant.test(value) ? { [TextMarker]: value } : value;
|
|
27
|
+
}
|
|
28
|
+
if (typeof value === "bigint") {
|
|
29
|
+
return exactInteger(value);
|
|
30
|
+
}
|
|
31
|
+
if (value instanceof Long) {
|
|
32
|
+
return exactInteger(value.toBigInt());
|
|
33
|
+
}
|
|
34
|
+
if (Array.isArray(value)) {
|
|
35
|
+
return value.map(markTexts);
|
|
36
|
+
}
|
|
37
|
+
if (isPlainObject(value)) {
|
|
38
|
+
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, markTexts(entry)]));
|
|
39
|
+
}
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
export function fromExtendedJson(document) {
|
|
43
|
+
return EJSON.deserialize(unwrapTexts(document), { relaxed: true, useBigInt64: true });
|
|
44
|
+
}
|
|
45
|
+
export function toExtendedJson(document) {
|
|
46
|
+
return EJSON.serialize(markTexts(document), { relaxed: true });
|
|
47
|
+
}
|
|
48
|
+
export function documentId(documentOrId) {
|
|
49
|
+
const id = isPlainObject(documentOrId) && "_id" in documentOrId ? documentOrId._id : documentOrId;
|
|
50
|
+
if (id instanceof ObjectId) {
|
|
51
|
+
return id.toHexString();
|
|
52
|
+
}
|
|
53
|
+
if (isPlainObject(id)) {
|
|
54
|
+
const [key, value] = Object.entries(id)[0] ?? [];
|
|
55
|
+
if ((key === "$oid" || key === "$numberLong" || key === TextMarker) && typeof value === "string") {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return String(id);
|
|
60
|
+
}
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sfxcode/nuxt-mongocamp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -27,40 +27,53 @@
|
|
|
27
27
|
"build": {
|
|
28
28
|
"failOnWarn": false
|
|
29
29
|
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"prepack": "nuxt-module-build build",
|
|
32
|
-
"dev": "nuxi dev playground",
|
|
33
|
-
"dev:build": "nuxi build playground",
|
|
34
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
35
|
-
"release": "npm run lint && npm run test && npm run prepack && changelogen --patch --release && npm publish --access public && git push --follow-tags",
|
|
36
|
-
"lint": "eslint .",
|
|
37
|
-
"lint:fix": "eslint --fix .",
|
|
38
|
-
"test": "vitest run",
|
|
39
|
-
"test:watch": "vitest watch",
|
|
40
|
-
"test:coverage": "vitest run --coverage",
|
|
41
|
-
"test:update": "vitest run --update",
|
|
42
|
-
"test:update:watch": "vitest run --update --watch",
|
|
43
|
-
"api-codegen": "openapi-generator-cli generate -i ./openapi/docs.yaml -g typescript-fetch -o src/runtime/api --additional-properties=typescriptThreePlus=true,supportsES6=true"
|
|
44
|
-
},
|
|
45
30
|
"dependencies": {
|
|
46
|
-
"@nuxt/kit": "^4.
|
|
47
|
-
"@
|
|
31
|
+
"@nuxt/kit": "^4.7.0",
|
|
32
|
+
"@sfxcode/mongocamp-server-core": "2.0.0",
|
|
33
|
+
"@vueuse/nuxt": "^15.1.0",
|
|
34
|
+
"bson": "^7.3.4",
|
|
48
35
|
"consola": "^3.4.2",
|
|
49
36
|
"defu": "^6.1.7"
|
|
50
37
|
},
|
|
51
38
|
"devDependencies": {
|
|
52
|
-
"@nuxt/devtools": "^4.2.
|
|
39
|
+
"@nuxt/devtools": "^4.2.2",
|
|
53
40
|
"@nuxt/eslint-config": "^1.17.0",
|
|
54
41
|
"@nuxt/module-builder": "^1.0.4",
|
|
55
|
-
"@nuxt/schema": "^4.
|
|
42
|
+
"@nuxt/schema": "^4.7.0",
|
|
56
43
|
"@nuxt/test-utils": "^4.4.0",
|
|
57
|
-
"@openapitools/openapi-generator-cli": "^2.
|
|
58
|
-
"@types/node": "^26.6.
|
|
44
|
+
"@openapitools/openapi-generator-cli": "^2.44.0",
|
|
45
|
+
"@types/node": "^26.6.11",
|
|
59
46
|
"@unocss/nuxt": "^66.13.0",
|
|
60
47
|
"changelogen": "^0.6.2",
|
|
61
|
-
"eslint": "^10.
|
|
62
|
-
"
|
|
63
|
-
"
|
|
48
|
+
"eslint": "^10.16.0",
|
|
49
|
+
"h3": "2.0.8",
|
|
50
|
+
"mongodb": "7.9.1",
|
|
51
|
+
"nitro": "3.0.261103-rc",
|
|
52
|
+
"nuxt": "^4.7.0",
|
|
53
|
+
"srvx": "1.0.8",
|
|
54
|
+
"typescript": "6.0.3",
|
|
55
|
+
"vitest": "^5.1.2"
|
|
64
56
|
},
|
|
65
|
-
"
|
|
66
|
-
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"nitro": ">=3.0.261103-rc",
|
|
59
|
+
"nuxt": ">=4.7.0"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"dev": "nuxi dev playground",
|
|
63
|
+
"dev:build": "nuxi build playground",
|
|
64
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
65
|
+
"release": "npm run lint && npm run test && npm run prepack && changelogen --minor --release --no-commit --no-tag && node scripts/sync-versions.mjs --commit && pnpm -r --include-workspace-root --filter @sfxcode/mongocamp-server-core --filter @sfxcode/nuxt-mongocamp-server publish --access public && git push --follow-tags",
|
|
66
|
+
"release:next": "npm run lint && npm run test && npm run prepack && changelogen --prerelease=alpha --release --no-commit --no-tag && node scripts/sync-versions.mjs --commit && pnpm -r --include-workspace-root --filter @sfxcode/mongocamp-server-core --filter @sfxcode/nuxt-mongocamp-server publish --access public --tag next && git push --follow-tags",
|
|
67
|
+
"lint": "eslint .",
|
|
68
|
+
"lint:fix": "eslint --fix .",
|
|
69
|
+
"test": "vitest run",
|
|
70
|
+
"test:watch": "vitest watch",
|
|
71
|
+
"test:coverage": "vitest run --coverage",
|
|
72
|
+
"test:update": "vitest run --update",
|
|
73
|
+
"test:update:watch": "vitest run --update --watch",
|
|
74
|
+
"api-codegen": "openapi-generator-cli generate -i ./openapi/docs.yaml -g typescript-fetch -o src/runtime/api --additional-properties=typescriptThreePlus=true,supportsES6=true",
|
|
75
|
+
"test:contract": "vitest run --config vitest.contract.config.ts",
|
|
76
|
+
"typecheck:server": "pnpm --filter @sfxcode/mongocamp-server-core typecheck",
|
|
77
|
+
"sync-versions": "node scripts/sync-versions.mjs"
|
|
78
|
+
}
|
|
79
|
+
}
|