@strapi/plugin-cloud 5.0.0-beta.3 → 5.0.0-beta.4

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.
@@ -41,7 +41,7 @@ const index = {
41
41
  defaultMessage: name
42
42
  },
43
43
  Component: async () => {
44
- const { App } = await import("./App-7ZM9Y1c8.mjs");
44
+ const { App } = await import("./App-Cb_RPKuS.mjs");
45
45
  return App;
46
46
  }
47
47
  });
@@ -58,7 +58,7 @@ const index = {
58
58
  const { locales } = app;
59
59
  const importedTrads = await Promise.all(
60
60
  locales.map((locale) => {
61
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-evVkl65r.mjs"), "./translations/fr.json": () => import("./fr-e4xtqkR1.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
61
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-DqzxMgb_.mjs"), "./translations/fr.json": () => import("./fr-3fwSSssz.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
62
62
  return {
63
63
  data: prefixPluginTranslations(data, pluginId),
64
64
  locale
@@ -78,4 +78,4 @@ export {
78
78
  index as i,
79
79
  pluginId as p
80
80
  };
81
- //# sourceMappingURL=index-evD85LNg.mjs.map
81
+ //# sourceMappingURL=index-UMAvZjFA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-evD85LNg.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/components/Initializer.tsx","../../admin/src/components/PluginIcon.tsx","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'cloud';\n","/**\n *\n * Initializer\n *\n */\n\nimport { useEffect, useRef } from 'react';\n\nimport { pluginId } from '../pluginId';\n\ntype InitializerProps = {\n setPlugin: (id: string) => void;\n};\n\nconst Initializer = ({ setPlugin }: InitializerProps) => {\n const ref = useRef(setPlugin);\n\n useEffect(() => {\n ref.current(pluginId);\n }, []);\n\n return null;\n};\n\nexport { Initializer };\n","/**\n *\n * PluginIcon\n *\n */\n\nimport { Cloud } from '@strapi/icons';\n\nconst PluginIcon = () => <Cloud />;\n\nexport { PluginIcon };\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","/* eslint-disable check-file/filename-naming-convention */\n\nimport { Initializer } from './components/Initializer';\nimport { PluginIcon } from './components/PluginIcon';\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nconst name = 'Deploy';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n const { backendURL } = window.strapi;\n\n // Only add the plugin menu link and registering it if the project is on development (localhost).\n if (backendURL?.includes('localhost')) {\n app.addMenuLink({\n to: `plugins/${pluginId}`,\n icon: PluginIcon,\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: name,\n },\n Component: async () => {\n const { App } = await import('./pages/App');\n\n return App;\n },\n });\n const plugin = {\n id: pluginId,\n initializer: Initializer,\n isReady: false,\n name,\n };\n\n app.registerPlugin(plugin);\n }\n },\n\n async registerTrads(app: any) {\n const { locales } = app;\n\n const importedTrads = await Promise.all(\n (locales as any[]).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;ACcxB,MAAM,cAAc,CAAC,EAAE,gBAAkC;AACjD,QAAA,MAAM,OAAO,SAAS;AA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EAAE,SAAS,WAAW;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;"}
1
+ {"version":3,"file":"index-UMAvZjFA.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/components/Initializer.tsx","../../admin/src/components/PluginIcon.tsx","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'cloud';\n","/**\n *\n * Initializer\n *\n */\n\nimport { useEffect, useRef } from 'react';\n\nimport { pluginId } from '../pluginId';\n\ntype InitializerProps = {\n setPlugin: (id: string) => void;\n};\n\nconst Initializer = ({ setPlugin }: InitializerProps) => {\n const ref = useRef(setPlugin);\n\n useEffect(() => {\n ref.current(pluginId);\n }, []);\n\n return null;\n};\n\nexport { Initializer };\n","/**\n *\n * PluginIcon\n *\n */\n\nimport { Cloud } from '@strapi/icons';\n\nconst PluginIcon = () => <Cloud />;\n\nexport { PluginIcon };\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","/* eslint-disable check-file/filename-naming-convention */\n\nimport { Initializer } from './components/Initializer';\nimport { PluginIcon } from './components/PluginIcon';\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nconst name = 'Deploy';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n const { backendURL } = window.strapi;\n\n // Only add the plugin menu link and registering it if the project is on development (localhost).\n if (backendURL?.includes('localhost')) {\n app.addMenuLink({\n to: `plugins/${pluginId}`,\n icon: PluginIcon,\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: name,\n },\n Component: async () => {\n const { App } = await import('./pages/App');\n\n return App;\n },\n });\n const plugin = {\n id: pluginId,\n initializer: Initializer,\n isReady: false,\n name,\n };\n\n app.registerPlugin(plugin);\n }\n },\n\n async registerTrads(app: any) {\n const { locales } = app;\n\n const importedTrads = await Promise.all(\n (locales as any[]).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;ACcxB,MAAM,cAAc,CAAC,EAAE,gBAAkC;AACjD,QAAA,MAAM,OAAO,SAAS;AAE5B,YAAU,MAAM;AACd,QAAI,QAAQ,QAAQ;AAAA,EACtB,GAAG,CAAE,CAAA;AAEE,SAAA;AACT;ACdA,MAAM,aAAa,MAAM,oBAAC,OAAM,EAAA;ACNhC,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;ACHA,MAAM,OAAO;AAGb,MAAe,QAAA;AAAA,EACb,SAAS,KAAU;AACX,UAAA,EAAE,WAAW,IAAI,OAAO;AAG1B,QAAA,YAAY,SAAS,WAAW,GAAG;AACrC,UAAI,YAAY;AAAA,QACd,IAAI,WAAW,QAAQ;AAAA,QACvB,MAAM;AAAA,QACN,WAAW;AAAA,UACT,IAAI,GAAG,QAAQ;AAAA,UACf,gBAAgB;AAAA,QAClB;AAAA,QACA,WAAW,YAAY;AACrB,gBAAM,EAAE,IAAA,IAAQ,MAAM,OAAO,oBAAa;AAEnC,iBAAA;AAAA,QACT;AAAA,MAAA,CACD;AACD,YAAM,SAAS;AAAA,QACb,IAAI;AAAA,QACJ,aAAa;AAAA,QACb,SAAS;AAAA,QACT;AAAA,MAAA;AAGF,UAAI,eAAe,MAAM;AAAA,IAC3B;AAAA,EACF;AAAA,EAEA,MAAM,cAAc,KAAU;AACtB,UAAA,EAAE,QAAY,IAAA;AAEd,UAAA,gBAAgB,MAAM,QAAQ;AAAA,MACjC,QAAkB,IAAI,CAAC,WAAW;AAC1B,eAAA,qCAA+B,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,mBAAA,GAAA,0BAAA,MAAA,OAAA,mBAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,WAAW;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;"}
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-s-vQ-OuP.js");
2
+ const index = require("../_chunks/index-DtM6OFXR.js");
3
3
  module.exports = index.index;
4
4
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-evD85LNg.mjs";
1
+ import { i } from "../_chunks/index-UMAvZjFA.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-cloud",
3
- "version": "5.0.0-beta.3",
3
+ "version": "5.0.0-beta.4",
4
4
  "description": "Instructions to deploy your local project to Strapi Cloud",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -41,16 +41,16 @@
41
41
  "react-intl": "6.6.2"
42
42
  },
43
43
  "devDependencies": {
44
- "@strapi/strapi": "5.0.0-beta.3",
44
+ "@strapi/strapi": "5.0.0-beta.4",
45
45
  "@types/react": "18.2.66",
46
46
  "@types/react-dom": "18.2.22",
47
47
  "@types/styled-components": "5.1.34",
48
- "eslint-config-custom": "5.0.0-beta.3",
48
+ "eslint-config-custom": "5.0.0-beta.4",
49
49
  "react": "18.2.0",
50
50
  "react-dom": "18.2.0",
51
51
  "react-router-dom": "6.22.3",
52
52
  "styled-components": "5.3.11",
53
- "tsconfig": "5.0.0-beta.3",
53
+ "tsconfig": "5.0.0-beta.4",
54
54
  "typescript": "5.2.2"
55
55
  },
56
56
  "peerDependencies": {
@@ -70,5 +70,5 @@
70
70
  "kind": "plugin",
71
71
  "displayName": "Strapi Cloud"
72
72
  },
73
- "gitHead": "cff608ed925db31db7f6cb84aac4a0576f54e90c"
73
+ "gitHead": "18019758d6ccd252f2f00bcc32c191402af2e60a"
74
74
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"en-IGOLzfH6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"en-evVkl65r.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fr-e4xtqkR1.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fr-o9I0MEIB.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}