@strapi/plugin-cloud 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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ type TradOptions = Record<string, string>;
2
+ declare const prefixPluginTranslations: (trad: TradOptions, pluginId: string) => TradOptions;
3
+ export { prefixPluginTranslations };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-cloud",
3
- "version": "5.0.0-alpha.0",
3
+ "version": "5.0.0-alpha.1",
4
4
  "description": "Instructions to deploy your local project to Strapi Cloud",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -37,21 +37,21 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@strapi/design-system": "1.16.0",
40
- "@strapi/helper-plugin": "5.0.0-alpha.0",
40
+ "@strapi/helper-plugin": "5.0.0-alpha.1",
41
41
  "@strapi/icons": "1.16.0",
42
42
  "react-intl": "6.6.2"
43
43
  },
44
44
  "devDependencies": {
45
- "@strapi/strapi": "5.0.0-alpha.0",
45
+ "@strapi/strapi": "5.0.0-alpha.1",
46
46
  "@types/react": "18.2.66",
47
47
  "@types/react-dom": "18.2.22",
48
48
  "@types/styled-components": "5.1.34",
49
- "eslint-config-custom": "5.0.0-alpha.0",
49
+ "eslint-config-custom": "5.0.0-alpha.1",
50
50
  "react": "18.2.0",
51
51
  "react-dom": "18.2.0",
52
52
  "react-router-dom": "6.22.3",
53
53
  "styled-components": "5.3.11",
54
- "tsconfig": "5.0.0-alpha.0",
54
+ "tsconfig": "5.0.0-alpha.1",
55
55
  "typescript": "5.2.2"
56
56
  },
57
57
  "peerDependencies": {
@@ -71,5 +71,5 @@
71
71
  "kind": "plugin",
72
72
  "displayName": "Strapi Cloud"
73
73
  },
74
- "gitHead": "ceeb3f383cbaf51eeaa373750a27a2880a10f727"
74
+ "gitHead": "eb70e07ea981311a3ddfbb2fdda0417034b22881"
75
75
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-ZOCAw7B7.js","sources":["../../admin/src/pluginId.ts","../../admin/src/components/Initializer.tsx","../../admin/src/components/PluginIcon.tsx","../../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","/* eslint-disable check-file/filename-naming-convention */\nimport { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport { Initializer } from './components/Initializer';\nimport { PluginIcon } from './components/PluginIcon';\nimport { pluginId } from './pluginId';\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":["useRef","useEffect","jsx","Cloud","prefixPluginTranslations"],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACcxB,MAAM,cAAc,CAAC,EAAE,gBAAkC;AACjD,QAAA,MAAMA,aAAO,SAAS;AAE5BC,QAAAA,UAAU,MAAM;AACd,QAAI,QAAQ,QAAQ;AAAA,EACtB,GAAG,CAAE,CAAA;AAEE,SAAA;AACT;ACdA,MAAM,aAAa,MAAMC,2BAAAA,IAACC,MAAM,OAAA,EAAA;ACDhC,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,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,mBAAa,CAAA;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,qCAAA,kBAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,kBAAA,CAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,WAAW;AACpB,iBAAA;AAAA,YACL,MAAMC,aAAAA,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 +0,0 @@
1
- {"version":3,"file":"index-mK-DufKn.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/components/Initializer.tsx","../../admin/src/components/PluginIcon.tsx","../../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","/* eslint-disable check-file/filename-naming-convention */\nimport { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport { Initializer } from './components/Initializer';\nimport { PluginIcon } from './components/PluginIcon';\nimport { pluginId } from './pluginId';\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":[],"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;ACDhC,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;"}