@ginjou/nuxt 0.1.0-beta.10 → 0.1.0-beta.12
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/module.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const kit = require('@nuxt/kit');
|
|
4
|
+
const localPkg = require('local-pkg');
|
|
4
5
|
|
|
5
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
7
|
const composables$2 = [
|
|
@@ -31,8 +32,8 @@ const composables$2 = [
|
|
|
31
32
|
name: "useAsyncList"
|
|
32
33
|
},
|
|
33
34
|
{
|
|
34
|
-
from: "./runtime/composables/
|
|
35
|
-
name: "
|
|
35
|
+
from: "./runtime/composables/edit",
|
|
36
|
+
name: "useAsyncEdit"
|
|
36
37
|
},
|
|
37
38
|
{
|
|
38
39
|
from: "./runtime/composables/select",
|
|
@@ -158,9 +159,13 @@ const module$1 = kit.defineNuxtModule({
|
|
|
158
159
|
config.optimizeDeps.include.push(
|
|
159
160
|
"@ginjou/core",
|
|
160
161
|
"@ginjou/vue",
|
|
161
|
-
"@ginjou/with-vue-router"
|
|
162
|
-
"@ginjou/with-vue-i18n"
|
|
162
|
+
"@ginjou/with-vue-router"
|
|
163
163
|
);
|
|
164
|
+
for (const pkg of ["@ginjou/with-vue-i18n"]) {
|
|
165
|
+
if (localPkg.isPackageExists(pkg)) {
|
|
166
|
+
config.optimizeDeps.include.push(pkg);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
164
169
|
});
|
|
165
170
|
kit.addImports(ImportListForTanstackQuery);
|
|
166
171
|
kit.addImports(ImportListForGinjou);
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addImports, addPlugin } from '@nuxt/kit';
|
|
2
|
+
import { isPackageExists } from 'local-pkg';
|
|
2
3
|
|
|
3
4
|
const composables$2 = [
|
|
4
5
|
// Query
|
|
@@ -28,8 +29,8 @@ const composables$2 = [
|
|
|
28
29
|
name: "useAsyncList"
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
|
-
from: "./runtime/composables/
|
|
32
|
-
name: "
|
|
32
|
+
from: "./runtime/composables/edit",
|
|
33
|
+
name: "useAsyncEdit"
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
36
|
from: "./runtime/composables/select",
|
|
@@ -155,9 +156,13 @@ const module$1 = defineNuxtModule({
|
|
|
155
156
|
config.optimizeDeps.include.push(
|
|
156
157
|
"@ginjou/core",
|
|
157
158
|
"@ginjou/vue",
|
|
158
|
-
"@ginjou/with-vue-router"
|
|
159
|
-
"@ginjou/with-vue-i18n"
|
|
159
|
+
"@ginjou/with-vue-router"
|
|
160
160
|
);
|
|
161
|
+
for (const pkg of ["@ginjou/with-vue-i18n"]) {
|
|
162
|
+
if (isPackageExists(pkg)) {
|
|
163
|
+
config.optimizeDeps.include.push(pkg);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
161
166
|
});
|
|
162
167
|
addImports(ImportListForTanstackQuery);
|
|
163
168
|
addImports(ImportListForGinjou);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { BaseRecord, Params } from '@ginjou/core';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UseEditContext, UseEditProps, UseEditResult } from '@ginjou/vue';
|
|
3
3
|
import type { AsyncResult } from '../utils/async.js';
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function useAsyncEdit<TQueryData extends BaseRecord = BaseRecord, TMutationParams extends Params = Params, TQueryError = unknown, TQueryResultData extends BaseRecord = TQueryData, TMutationData extends BaseRecord = TQueryResultData, TMutationError = unknown>(props?: UseEditProps<TQueryData, TMutationParams, TQueryError, TQueryResultData, TMutationData, TMutationError>, context?: UseEditContext): AsyncResult<UseEditResult<TMutationParams, TQueryError, TQueryResultData, TMutationData, TMutationError>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEdit } from "@ginjou/vue";
|
|
2
2
|
import { withAsync } from "../utils/async.js";
|
|
3
|
-
export function
|
|
4
|
-
const result =
|
|
3
|
+
export function useAsyncEdit(props, context) {
|
|
4
|
+
const result = useEdit(props, context);
|
|
5
5
|
return withAsync(result, async () => {
|
|
6
6
|
await result.query.suspense();
|
|
7
7
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ginjou/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.12",
|
|
5
5
|
"author": "zhong666 <hi@zhong666.me>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/aa900031/ginjou#readme",
|
|
@@ -38,8 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@nuxt/kit": "^3.20.1",
|
|
41
|
-
"
|
|
42
|
-
"@ginjou/with-vue-router": "^0.1.0-beta.6"
|
|
41
|
+
"local-pkg": "^1.1.2",
|
|
42
|
+
"@ginjou/with-vue-router": "^0.1.0-beta.6",
|
|
43
|
+
"@ginjou/vue": "^0.1.0-beta.14"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@nuxt/module-builder": "^1.0.2",
|