@strapi/plugin-graphql 5.0.0-alpha.0 → 5.0.0-alpha.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/admin/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const helperPlugin = require("@strapi/helper-plugin");
|
|
3
2
|
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
4
3
|
const v = glob[path];
|
|
5
4
|
if (v) {
|
|
@@ -10,7 +9,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
|
10
9
|
});
|
|
11
10
|
};
|
|
12
11
|
const name$1 = "@strapi/plugin-graphql";
|
|
13
|
-
const version = "
|
|
12
|
+
const version = "5.0.0-alpha.0";
|
|
14
13
|
const description = "Adds GraphQL endpoint with default API methods.";
|
|
15
14
|
const repository = {
|
|
16
15
|
type: "git",
|
|
@@ -64,9 +63,9 @@ const dependencies = {
|
|
|
64
63
|
"@graphql-tools/utils": "^8.13.1",
|
|
65
64
|
"@koa/cors": "3.4.3",
|
|
66
65
|
"@strapi/design-system": "1.16.0",
|
|
67
|
-
"@strapi/helper-plugin": "
|
|
66
|
+
"@strapi/helper-plugin": "5.0.0-alpha.0",
|
|
68
67
|
"@strapi/icons": "1.16.0",
|
|
69
|
-
"@strapi/utils": "
|
|
68
|
+
"@strapi/utils": "5.0.0-alpha.0",
|
|
70
69
|
graphql: "^16.8.1",
|
|
71
70
|
"graphql-depth-limit": "^1.1.0",
|
|
72
71
|
"graphql-playground-middleware-koa": "^1.6.21",
|
|
@@ -78,19 +77,19 @@ const dependencies = {
|
|
|
78
77
|
pluralize: "8.0.0"
|
|
79
78
|
};
|
|
80
79
|
const devDependencies = {
|
|
81
|
-
"@strapi/strapi": "
|
|
82
|
-
"@strapi/types": "
|
|
80
|
+
"@strapi/strapi": "5.0.0-alpha.0",
|
|
81
|
+
"@strapi/types": "5.0.0-alpha.0",
|
|
83
82
|
"@types/graphql-depth-limit": "1.1.5",
|
|
84
83
|
"@types/koa-bodyparser": "4.3.12",
|
|
85
84
|
"@types/koa__cors": "5.0.0",
|
|
86
85
|
"cross-env": "^7.0.3",
|
|
87
|
-
"eslint-config-custom": "
|
|
86
|
+
"eslint-config-custom": "5.0.0-alpha.0",
|
|
88
87
|
koa: "2.13.4",
|
|
89
88
|
react: "^18.2.0",
|
|
90
89
|
"react-dom": "^18.2.0",
|
|
91
90
|
"react-router-dom": "6.22.3",
|
|
92
91
|
"styled-components": "5.3.11",
|
|
93
|
-
tsconfig: "
|
|
92
|
+
tsconfig: "5.0.0-alpha.0",
|
|
94
93
|
typescript: "5.3.2"
|
|
95
94
|
};
|
|
96
95
|
const peerDependencies = {
|
|
@@ -128,6 +127,15 @@ const pluginPkg = {
|
|
|
128
127
|
strapi
|
|
129
128
|
};
|
|
130
129
|
const pluginId = "graphql";
|
|
130
|
+
const prefixPluginTranslations = (trad, pluginId2) => {
|
|
131
|
+
if (!pluginId2) {
|
|
132
|
+
throw new TypeError("pluginId can't be empty");
|
|
133
|
+
}
|
|
134
|
+
return Object.keys(trad).reduce((acc, current) => {
|
|
135
|
+
acc[`${pluginId2}.${current}`] = trad[current];
|
|
136
|
+
return acc;
|
|
137
|
+
}, {});
|
|
138
|
+
};
|
|
131
139
|
const name = pluginPkg.strapi.name;
|
|
132
140
|
const index = {
|
|
133
141
|
// TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.
|
|
@@ -144,7 +152,7 @@ const index = {
|
|
|
144
152
|
locales.map((locale) => {
|
|
145
153
|
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => Promise.resolve().then(() => require("../_chunks/dk-SLrLqAtl.js")), "./translations/en.json": () => Promise.resolve().then(() => require("../_chunks/en-WmmC2MW8.js")), "./translations/es.json": () => Promise.resolve().then(() => require("../_chunks/es-4tl6ikyU.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("../_chunks/fr-cJXSt55N.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("../_chunks/pl-wKw9Xgkw.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("../_chunks/ru-CYAnXR6L.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("../_chunks/sv-XNOe1ctV.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("../_chunks/tr-POFbAHUC.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("../_chunks/zh-Hans-pnigVFnS.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("../_chunks/zh-kJ_DkSIe.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
|
|
146
154
|
return {
|
|
147
|
-
data:
|
|
155
|
+
data: prefixPluginTranslations(data, pluginId),
|
|
148
156
|
locale
|
|
149
157
|
};
|
|
150
158
|
}).catch(() => {
|
package/dist/admin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n","import pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n // TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["pluginId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACExB,MAAM,2BAA2B,CAAC,MAAmBA,cAAkC;AACrF,MAAI,CAACA,WAAU;AACP,UAAA,IAAI,UAAU,yBAAyB;AAAA,EAC/C;AACA,SAAO,OAAO,KAAK,IAAI,EAAE,OAAO,CAAC,KAAK,YAAY;AAChD,QAAI,GAAGA,SAAQ,IAAI,OAAO,EAAE,IAAI,KAAK,OAAO;AACrC,WAAA;AAAA,EACT,GAAG,CAAiB,CAAA;AACtB;ACLA,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAe,QAAA;AAAA;AAAA,EAEb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AAChD,UAAA,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACf,eAAA,qCAA+B,uBAAA,OAAA,EAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,+BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,gCAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,GAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AACpB,iBAAA;AAAA,YACL,MAAM,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QACF,CACD,EACA,MAAM,MAAM;AACJ,iBAAA;AAAA,YACL,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACF,CACD;AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;;"}
|
package/dist/admin/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { prefixPluginTranslations } from "@strapi/helper-plugin";
|
|
2
1
|
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
3
2
|
const v = glob[path];
|
|
4
3
|
if (v) {
|
|
@@ -9,7 +8,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
|
9
8
|
});
|
|
10
9
|
};
|
|
11
10
|
const name$1 = "@strapi/plugin-graphql";
|
|
12
|
-
const version = "
|
|
11
|
+
const version = "5.0.0-alpha.0";
|
|
13
12
|
const description = "Adds GraphQL endpoint with default API methods.";
|
|
14
13
|
const repository = {
|
|
15
14
|
type: "git",
|
|
@@ -63,9 +62,9 @@ const dependencies = {
|
|
|
63
62
|
"@graphql-tools/utils": "^8.13.1",
|
|
64
63
|
"@koa/cors": "3.4.3",
|
|
65
64
|
"@strapi/design-system": "1.16.0",
|
|
66
|
-
"@strapi/helper-plugin": "
|
|
65
|
+
"@strapi/helper-plugin": "5.0.0-alpha.0",
|
|
67
66
|
"@strapi/icons": "1.16.0",
|
|
68
|
-
"@strapi/utils": "
|
|
67
|
+
"@strapi/utils": "5.0.0-alpha.0",
|
|
69
68
|
graphql: "^16.8.1",
|
|
70
69
|
"graphql-depth-limit": "^1.1.0",
|
|
71
70
|
"graphql-playground-middleware-koa": "^1.6.21",
|
|
@@ -77,19 +76,19 @@ const dependencies = {
|
|
|
77
76
|
pluralize: "8.0.0"
|
|
78
77
|
};
|
|
79
78
|
const devDependencies = {
|
|
80
|
-
"@strapi/strapi": "
|
|
81
|
-
"@strapi/types": "
|
|
79
|
+
"@strapi/strapi": "5.0.0-alpha.0",
|
|
80
|
+
"@strapi/types": "5.0.0-alpha.0",
|
|
82
81
|
"@types/graphql-depth-limit": "1.1.5",
|
|
83
82
|
"@types/koa-bodyparser": "4.3.12",
|
|
84
83
|
"@types/koa__cors": "5.0.0",
|
|
85
84
|
"cross-env": "^7.0.3",
|
|
86
|
-
"eslint-config-custom": "
|
|
85
|
+
"eslint-config-custom": "5.0.0-alpha.0",
|
|
87
86
|
koa: "2.13.4",
|
|
88
87
|
react: "^18.2.0",
|
|
89
88
|
"react-dom": "^18.2.0",
|
|
90
89
|
"react-router-dom": "6.22.3",
|
|
91
90
|
"styled-components": "5.3.11",
|
|
92
|
-
tsconfig: "
|
|
91
|
+
tsconfig: "5.0.0-alpha.0",
|
|
93
92
|
typescript: "5.3.2"
|
|
94
93
|
};
|
|
95
94
|
const peerDependencies = {
|
|
@@ -127,6 +126,15 @@ const pluginPkg = {
|
|
|
127
126
|
strapi
|
|
128
127
|
};
|
|
129
128
|
const pluginId = "graphql";
|
|
129
|
+
const prefixPluginTranslations = (trad, pluginId2) => {
|
|
130
|
+
if (!pluginId2) {
|
|
131
|
+
throw new TypeError("pluginId can't be empty");
|
|
132
|
+
}
|
|
133
|
+
return Object.keys(trad).reduce((acc, current) => {
|
|
134
|
+
acc[`${pluginId2}.${current}`] = trad[current];
|
|
135
|
+
return acc;
|
|
136
|
+
}, {});
|
|
137
|
+
};
|
|
130
138
|
const name = pluginPkg.strapi.name;
|
|
131
139
|
const index = {
|
|
132
140
|
// TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.
|
package/dist/admin/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n","import pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n // TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n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AAM,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QACF,CACD,EACA,MAAM,MAAM;AACJ,iBAAA;AAAA,YACL,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACF,CACD;AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-graphql",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.1",
|
|
4
4
|
"description": "Adds GraphQL endpoint with default API methods.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@graphql-tools/utils": "^8.13.1",
|
|
55
55
|
"@koa/cors": "3.4.3",
|
|
56
56
|
"@strapi/design-system": "1.16.0",
|
|
57
|
-
"@strapi/helper-plugin": "5.0.0-alpha.
|
|
57
|
+
"@strapi/helper-plugin": "5.0.0-alpha.1",
|
|
58
58
|
"@strapi/icons": "1.16.0",
|
|
59
|
-
"@strapi/utils": "5.0.0-alpha.
|
|
59
|
+
"@strapi/utils": "5.0.0-alpha.1",
|
|
60
60
|
"graphql": "^16.8.1",
|
|
61
61
|
"graphql-depth-limit": "^1.1.0",
|
|
62
62
|
"graphql-playground-middleware-koa": "^1.6.21",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
"pluralize": "8.0.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@strapi/strapi": "5.0.0-alpha.
|
|
72
|
-
"@strapi/types": "5.0.0-alpha.
|
|
71
|
+
"@strapi/strapi": "5.0.0-alpha.1",
|
|
72
|
+
"@strapi/types": "5.0.0-alpha.1",
|
|
73
73
|
"@types/graphql-depth-limit": "1.1.5",
|
|
74
74
|
"@types/koa-bodyparser": "4.3.12",
|
|
75
75
|
"@types/koa__cors": "5.0.0",
|
|
76
76
|
"cross-env": "^7.0.3",
|
|
77
|
-
"eslint-config-custom": "5.0.0-alpha.
|
|
77
|
+
"eslint-config-custom": "5.0.0-alpha.1",
|
|
78
78
|
"koa": "2.13.4",
|
|
79
79
|
"react": "^18.2.0",
|
|
80
80
|
"react-dom": "^18.2.0",
|
|
81
81
|
"react-router-dom": "6.22.3",
|
|
82
82
|
"styled-components": "5.3.11",
|
|
83
|
-
"tsconfig": "5.0.0-alpha.
|
|
83
|
+
"tsconfig": "5.0.0-alpha.1",
|
|
84
84
|
"typescript": "5.3.2"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"description": "Adds GraphQL endpoint with default API methods.",
|
|
101
101
|
"kind": "plugin"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "eb70e07ea981311a3ddfbb2fdda0417034b22881"
|
|
104
104
|
}
|