@webiny/languages 0.0.0-unstable.0d717d18dd → 0.0.0-unstable.5387e5f7c8
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/Languages.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { Api } from "@webiny/project-aws/api.js";
|
|
3
|
+
import { Admin } from "@webiny/project-aws/admin.js";
|
|
4
|
+
import { FeatureFlag } from "@webiny/project";
|
|
5
|
+
const Languages = ()=>/*#__PURE__*/ react.createElement(FeatureFlag.CanUseMultiTenancy, null, /*#__PURE__*/ react.createElement(Api.Extension, {
|
|
5
6
|
src: import.meta.dirname + "/api/Extension.js"
|
|
6
7
|
}), /*#__PURE__*/ react.createElement(Admin.Extension, {
|
|
7
8
|
src: import.meta.dirname + "/admin/Extension.js"
|
package/Languages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Languages.js","sources":["../src/Languages.tsx"],"sourcesContent":["import React from \"react\";\nimport { Api
|
|
1
|
+
{"version":3,"file":"Languages.js","sources":["../src/Languages.tsx"],"sourcesContent":["import React from \"react\";\nimport { Api } from \"@webiny/project-aws/api.js\";\nimport { Admin } from \"@webiny/project-aws/admin.js\";\nimport { FeatureFlag } from \"@webiny/project\";\n\nexport const Languages = () => {\n return (\n <FeatureFlag.CanUseMultiTenancy>\n {/* Api extensions */}\n <Api.Extension src={import.meta.dirname + \"/api/Extension.js\"} />\n\n {/* Admin extensions */}\n <Admin.Extension src={import.meta.dirname + \"/admin/Extension.js\"} />\n </FeatureFlag.CanUseMultiTenancy>\n );\n};\n"],"names":["Languages","FeatureFlag","Api","Admin"],"mappings":";;;;AAKO,MAAMA,YAAY,IACd,WAAP,GACI,oBAACC,YAAY,kBAAkB,sBAE3B,oBAACC,IAAI,SAAS;QAAC,KAAK,YAAY,OAAO,GAAG;sBAG1C,oBAACC,MAAM,SAAS;QAAC,KAAK,YAAY,OAAO,GAAG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class LanguagesGraphQLSchemaImpl implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): Promise<CoreGraphQLSchemaFactory.SchemaBuilder>;
|
|
4
5
|
}
|
|
5
6
|
export declare const LanguagesGraphQLSchema: typeof LanguagesGraphQLSchemaImpl & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ErrorResponse, Response } from "@webiny/api-graphql";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { ListLanguagesUseCase } from "../features/ListLanguages/index.js";
|
|
3
4
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
4
5
|
class LanguagesGraphQLSchemaImpl {
|
|
@@ -49,6 +50,9 @@ class LanguagesGraphQLSchemaImpl {
|
|
|
49
50
|
});
|
|
50
51
|
return builder;
|
|
51
52
|
}
|
|
53
|
+
constructor(){
|
|
54
|
+
this.getSchemaKey = staticSchemaKey("languages/LanguagesGraphQLSchemaImpl");
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
const LanguagesGraphQLSchema = CoreGraphQLSchemaFactory.createImplementation({
|
|
54
58
|
implementation: LanguagesGraphQLSchemaImpl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api/graphql/LanguagesGraphQLSchema.js","sources":["../../../src/api/graphql/LanguagesGraphQLSchema.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/api-graphql\";\nimport { ListLanguagesUseCase } from \"~/api/features/ListLanguages/index.js\";\nimport { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\n\nclass LanguagesGraphQLSchemaImpl implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): Promise<CoreGraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type LanguagesQuery {\n listLanguages: LanguagesListResponse!\n }\n\n type Language {\n id: ID!\n code: String!\n name: String!\n direction: String\n isDefault: Boolean\n enabled: Boolean\n }\n\n type LanguagesListResponse {\n data: [Language!]\n error: LanguagesError\n }\n\n type LanguagesError {\n code: String!\n message: String!\n data: JSON\n }\n\n extend type Query {\n languages: LanguagesQuery\n }\n `);\n\n // Namespace resolver\n builder.addResolver({\n path: \"Query.languages\",\n resolver: () => {\n return () => ({});\n }\n });\n\n // List languages resolver\n builder.addResolver({\n path: \"LanguagesQuery.listLanguages\",\n dependencies: [ListLanguagesUseCase],\n resolver: (listLanguages: ListLanguagesUseCase.Interface) => {\n return async () => {\n const result = await listLanguages.execute();\n\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const LanguagesGraphQLSchema = CoreGraphQLSchemaFactory.createImplementation({\n implementation: LanguagesGraphQLSchemaImpl,\n dependencies: []\n});\n"],"names":["LanguagesGraphQLSchemaImpl","builder","ListLanguagesUseCase","listLanguages","result","ErrorResponse","Response","LanguagesGraphQLSchema","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"api/graphql/LanguagesGraphQLSchema.js","sources":["../../../src/api/graphql/LanguagesGraphQLSchema.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/api-graphql\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { ListLanguagesUseCase } from \"~/api/features/ListLanguages/index.js\";\nimport { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\n\nclass LanguagesGraphQLSchemaImpl implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"languages/LanguagesGraphQLSchemaImpl\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): Promise<CoreGraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type LanguagesQuery {\n listLanguages: LanguagesListResponse!\n }\n\n type Language {\n id: ID!\n code: String!\n name: String!\n direction: String\n isDefault: Boolean\n enabled: Boolean\n }\n\n type LanguagesListResponse {\n data: [Language!]\n error: LanguagesError\n }\n\n type LanguagesError {\n code: String!\n message: String!\n data: JSON\n }\n\n extend type Query {\n languages: LanguagesQuery\n }\n `);\n\n // Namespace resolver\n builder.addResolver({\n path: \"Query.languages\",\n resolver: () => {\n return () => ({});\n }\n });\n\n // List languages resolver\n builder.addResolver({\n path: \"LanguagesQuery.listLanguages\",\n dependencies: [ListLanguagesUseCase],\n resolver: (listLanguages: ListLanguagesUseCase.Interface) => {\n return async () => {\n const result = await listLanguages.execute();\n\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const LanguagesGraphQLSchema = CoreGraphQLSchemaFactory.createImplementation({\n implementation: LanguagesGraphQLSchemaImpl,\n dependencies: []\n});\n"],"names":["LanguagesGraphQLSchemaImpl","builder","ListLanguagesUseCase","listLanguages","result","ErrorResponse","Response","staticSchemaKey","LanguagesGraphQLSchema","CoreGraphQLSchemaFactory"],"mappings":";;;;AAKA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EACA;QAC/CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4BnC,CAAC;QAGDA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAU,IACC,IAAO,EAAC;QAEvB;QAGAA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc;gBAACC;aAAqB;YACpC,UAAU,CAACC,gBACA;oBACH,MAAMC,SAAS,MAAMD,cAAc,OAAO;oBAE1C,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAGzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEA,OAAOH;IACX;;aA7DO,YAAY,GAAGM,gBAAgB;;AA8D1C;AAEO,MAAMC,yBAAyBC,yBAAyB,oBAAoB,CAAC;IAChF,gBAAgBT;IAChB,cAAc,EAAE;AACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/languages",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.5387e5f7c8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -15,34 +15,33 @@
|
|
|
15
15
|
"author": "Webiny Ltd.",
|
|
16
16
|
"license": "Webiny Enterprise",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@webiny/admin-ui": "0.0.0-unstable.
|
|
19
|
-
"@webiny/api-core": "0.0.0-unstable.
|
|
20
|
-
"@webiny/api-headless-cms": "0.0.0-unstable.
|
|
21
|
-
"@webiny/app": "0.0.0-unstable.
|
|
22
|
-
"@webiny/app-admin": "0.0.0-unstable.
|
|
23
|
-
"@webiny/app-headless-cms": "0.0.0-unstable.
|
|
24
|
-
"@webiny/feature": "0.0.0-unstable.
|
|
25
|
-
"@webiny/icons": "0.0.0-unstable.
|
|
26
|
-
"@webiny/project": "0.0.0-unstable.
|
|
27
|
-
"@webiny/project-aws": "0.0.0-unstable.
|
|
18
|
+
"@webiny/admin-ui": "0.0.0-unstable.5387e5f7c8",
|
|
19
|
+
"@webiny/api-core": "0.0.0-unstable.5387e5f7c8",
|
|
20
|
+
"@webiny/api-headless-cms": "0.0.0-unstable.5387e5f7c8",
|
|
21
|
+
"@webiny/app": "0.0.0-unstable.5387e5f7c8",
|
|
22
|
+
"@webiny/app-admin": "0.0.0-unstable.5387e5f7c8",
|
|
23
|
+
"@webiny/app-headless-cms": "0.0.0-unstable.5387e5f7c8",
|
|
24
|
+
"@webiny/feature": "0.0.0-unstable.5387e5f7c8",
|
|
25
|
+
"@webiny/icons": "0.0.0-unstable.5387e5f7c8",
|
|
26
|
+
"@webiny/project": "0.0.0-unstable.5387e5f7c8",
|
|
27
|
+
"@webiny/project-aws": "0.0.0-unstable.5387e5f7c8",
|
|
28
28
|
"graphql": "16.14.2",
|
|
29
|
-
"mobx": "7.0.
|
|
29
|
+
"mobx": "7.0.3",
|
|
30
30
|
"react": "18.3.1",
|
|
31
31
|
"react-dom": "18.3.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@webiny/api-core-testing": "0.0.0-unstable.
|
|
35
|
-
"@webiny/api-graphql": "0.0.0-unstable.
|
|
36
|
-
"@webiny/build-tools": "0.0.0-unstable.
|
|
37
|
-
"@webiny/db-dynamodb": "0.0.0-unstable.
|
|
38
|
-
"@webiny/di": "
|
|
39
|
-
"@webiny/event-handler-core": "0.0.0-unstable.
|
|
40
|
-
"@webiny/handler": "0.0.0-unstable.
|
|
41
|
-
"@webiny/
|
|
42
|
-
"@webiny/wcp": "0.0.0-unstable.0d717d18dd",
|
|
34
|
+
"@webiny/api-core-testing": "0.0.0-unstable.5387e5f7c8",
|
|
35
|
+
"@webiny/api-graphql": "0.0.0-unstable.5387e5f7c8",
|
|
36
|
+
"@webiny/build-tools": "0.0.0-unstable.5387e5f7c8",
|
|
37
|
+
"@webiny/db-dynamodb": "0.0.0-unstable.5387e5f7c8",
|
|
38
|
+
"@webiny/di": "2.0.0",
|
|
39
|
+
"@webiny/event-handler-core": "0.0.0-unstable.5387e5f7c8",
|
|
40
|
+
"@webiny/handler": "0.0.0-unstable.5387e5f7c8",
|
|
41
|
+
"@webiny/wcp": "0.0.0-unstable.5387e5f7c8",
|
|
43
42
|
"rimraf": "6.1.3",
|
|
44
43
|
"typescript": "7.0.2",
|
|
45
|
-
"vitest": "4.1.
|
|
44
|
+
"vitest": "4.1.11"
|
|
46
45
|
},
|
|
47
46
|
"publishConfig": {
|
|
48
47
|
"access": "public"
|