@stephenchenorg/astro 8.3.0 → 8.4.1
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/api/index.js
CHANGED
|
@@ -117,8 +117,7 @@ function createGraphQLAPI(globalOptions) {
|
|
|
117
117
|
}
|
|
118
118
|
}).then((data) => resolve(data)).catch((error) => {
|
|
119
119
|
if (error instanceof GraphQLRequestError$1) {
|
|
120
|
-
const
|
|
121
|
-
const code = fieldError?.code;
|
|
120
|
+
const code = (error.fieldErrors?.[0])?.code;
|
|
122
121
|
const errorProps = {
|
|
123
122
|
code,
|
|
124
123
|
message: error.message,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as graphql2 from "graphql";
|
|
2
2
|
|
|
3
3
|
//#region src/company-setting/types.d.ts
|
|
4
4
|
interface DataCompanySetting {
|
|
@@ -42,6 +42,6 @@ declare function createCompanySetting(companySetting: Partial<CompanySetting>):
|
|
|
42
42
|
};
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/company-setting/fragments.d.ts
|
|
45
|
-
declare const companySettingFields:
|
|
45
|
+
declare const companySettingFields: graphql2.DocumentNode;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { CompanySetting, DataCompanySetting, companySettingFields, createCompanySetting };
|
|
@@ -3,10 +3,10 @@ import { PropType, SlotsType } from "vue";
|
|
|
3
3
|
|
|
4
4
|
//#region src/form-validator/types.d.ts
|
|
5
5
|
type FormErrors = Record<string, string[]>;
|
|
6
|
-
interface FormRule {
|
|
7
|
-
validate: (value:
|
|
6
|
+
interface FormRule<T = any> {
|
|
7
|
+
validate: (value: T, form: Record<string, any>) => boolean;
|
|
8
8
|
message: string;
|
|
9
|
-
when?: (value:
|
|
9
|
+
when?: (value: T, form: Record<string, any>) => boolean;
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/form-validator/FormValidator.d.ts
|
|
@@ -44,7 +44,7 @@ declare const FormField: vue15.DefineComponent<vue15.ExtractPropTypes<{
|
|
|
44
44
|
default: () => never[];
|
|
45
45
|
};
|
|
46
46
|
}>> & Readonly<{}>, {
|
|
47
|
-
rules: FormRule[];
|
|
47
|
+
rules: FormRule<any>[];
|
|
48
48
|
}, SlotsType<{
|
|
49
49
|
default: {
|
|
50
50
|
error: string | null;
|
package/dist/page/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as graphql3 from "graphql";
|
|
2
2
|
|
|
3
3
|
//#region src/page/field/fragments.d.ts
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ import * as graphql4 from "graphql";
|
|
|
6
6
|
* Page fields fragment requires explicit import image
|
|
7
7
|
* fields fragment `imageFields` from Image module.
|
|
8
8
|
*/
|
|
9
|
-
declare const pageFields:
|
|
9
|
+
declare const pageFields: graphql3.DocumentNode;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/page/types.d.ts
|
|
12
12
|
interface DataPage {
|
|
@@ -88,7 +88,7 @@ declare function pageTextField(fields: PageField[], key: string): string | null;
|
|
|
88
88
|
declare function pageImageFieldForBackground(fields: PageField[], key: string): string;
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/page/seo-meta/fragments.d.ts
|
|
91
|
-
declare const seoMetaFields: (dummyClass: string) =>
|
|
91
|
+
declare const seoMetaFields: (dummyClass: string) => graphql3.DocumentNode;
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/page/seo-meta/helpers.d.ts
|
|
94
94
|
type UseSeoMetaOptions = Partial<Omit<PageMeta, 'title'>> & {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stephenchenorg/astro",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.4.1",
|
|
5
5
|
"description": "Stephenchenorg Astro 前端通用套件",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://stephenchenorg-astro.netlify.app",
|
|
@@ -96,23 +96,23 @@
|
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
98
98
|
"awesome-graphql-client": "^2.1.0",
|
|
99
|
-
"graphql": "^16.
|
|
99
|
+
"graphql": "^16.12.0",
|
|
100
100
|
"graphql-tag": "^2.12.6",
|
|
101
101
|
"nanostores": "^1.0.1",
|
|
102
|
-
"query-string": "^9.
|
|
102
|
+
"query-string": "^9.3.1"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@astrojs/check": "^0.9.
|
|
106
|
-
"@astrojs/vue": "^5.1.
|
|
107
|
-
"@ycs77/eslint-config": "^
|
|
108
|
-
"astro": "^5.
|
|
109
|
-
"bumpp": "^10.
|
|
110
|
-
"eslint": "^9.
|
|
111
|
-
"eslint-plugin-astro": "^1.
|
|
112
|
-
"eslint-plugin-astro-explicit-wrapper": "^1.0.
|
|
113
|
-
"tsdown": "^0.
|
|
114
|
-
"typescript": "^5.9.
|
|
115
|
-
"vitest": "^
|
|
116
|
-
"vue": "^3.5.
|
|
105
|
+
"@astrojs/check": "^0.9.5",
|
|
106
|
+
"@astrojs/vue": "^5.1.3",
|
|
107
|
+
"@ycs77/eslint-config": "^6.1.0",
|
|
108
|
+
"astro": "^5.15.9",
|
|
109
|
+
"bumpp": "^10.3.1",
|
|
110
|
+
"eslint": "^9.39.1",
|
|
111
|
+
"eslint-plugin-astro": "^1.5.0",
|
|
112
|
+
"eslint-plugin-astro-explicit-wrapper": "^1.0.5",
|
|
113
|
+
"tsdown": "^0.16.5",
|
|
114
|
+
"typescript": "^5.9.3",
|
|
115
|
+
"vitest": "^4.0.10",
|
|
116
|
+
"vue": "^3.5.24"
|
|
117
117
|
}
|
|
118
118
|
}
|