@strapi/plugin-cloud 4.14.5 → 4.15.2

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,4 +1,4 @@
1
- import { i } from "../_chunks/index-45c64f7d.mjs";
1
+ import { i } from "../_chunks/index-c46a3b68.mjs";
2
2
  import "@strapi/helper-plugin";
3
3
  import "react";
4
4
  import "react/jsx-runtime";
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * This component is the skeleton around the actual pages, and should only
4
+ * contain code that should be seen on all pages. (e.g. navigation bar)
5
+ *
6
+ */
7
+ declare const App: () => import("react/jsx-runtime").JSX.Element;
8
+ export { App };
@@ -0,0 +1,2 @@
1
+ declare const HomePage: () => import("react/jsx-runtime").JSX.Element;
2
+ export { HomePage };
@@ -0,0 +1 @@
1
+ export declare const pluginId = "cloud";
@@ -0,0 +1,2 @@
1
+ declare const getTrad: (id: string) => string;
2
+ export { getTrad };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-cloud",
3
- "version": "4.14.5",
3
+ "version": "4.15.2",
4
4
  "description": "Instructions to deploy your local project to Strapi Cloud",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -29,44 +29,42 @@
29
29
  "./dist"
30
30
  ],
31
31
  "scripts": {
32
- "build": "NODE_ENV=production strapi plugin:build --force",
32
+ "build": "strapi plugin:build --force",
33
33
  "clean": "run -T rimraf ./dist",
34
- "develop": "tsc -p tsconfig.server.json -w",
35
- "lint": "yarn lint:project && yarn lint:front",
36
- "lint:front": "run -T eslint ./admin -c ./admin/.eslintrc.js",
37
- "lint:project": "run -T eslint . -c ./.eslintrc.js",
34
+ "develop": "strapi plugin:watch",
35
+ "lint": "run -T eslint .",
38
36
  "prepublishOnly": "yarn clean && yarn build",
39
37
  "test:ts:front": "run -T tsc -p admin/tsconfig.json"
40
38
  },
41
39
  "dependencies": {
42
- "@strapi/design-system": "^1.12.0",
43
- "@strapi/helper-plugin": "^4.14.3",
44
- "@strapi/icons": "^1.12.0",
40
+ "@strapi/design-system": "1.13.0",
41
+ "@strapi/helper-plugin": "4.15.2",
42
+ "@strapi/icons": "1.13.0",
45
43
  "react-intl": "6.4.1"
46
44
  },
47
45
  "devDependencies": {
48
- "@strapi/strapi": "4.14.5",
49
- "@types/react": "^18.2.7",
50
- "@types/react-dom": "^18.2.12",
46
+ "@strapi/strapi": "4.15.2",
47
+ "@types/react": "18.2.7",
48
+ "@types/react-dom": "18.2.12",
51
49
  "@types/react-router-dom": "^5.3.3",
52
50
  "@types/styled-components": "5.1.26",
53
- "eslint-config-custom": "4.14.5",
54
- "react": "^18.2.0",
55
- "react-dom": "^18.2.0",
56
- "react-router-dom": "^5.3.4",
57
- "styled-components": "^5.3.3",
58
- "tsconfig": "4.14.5",
51
+ "eslint-config-custom": "4.15.2",
52
+ "react": "18.2.0",
53
+ "react-dom": "18.2.0",
54
+ "react-router-dom": "5.3.4",
55
+ "styled-components": "5.3.3",
56
+ "tsconfig": "4.15.2",
59
57
  "typescript": "5.2.2"
60
58
  },
61
59
  "peerDependencies": {
62
60
  "@strapi/strapi": "^4.4.0",
63
61
  "react": "^17.0.0 || ^18.0.0",
64
62
  "react-dom": "^17.0.0 || ^18.0.0",
65
- "react-router-dom": "^5.3.4",
66
- "styled-components": "^5.3.6"
63
+ "react-router-dom": "5.3.4",
64
+ "styled-components": "5.3.3"
67
65
  },
68
66
  "engines": {
69
- "node": ">=14.19.1 <=18.x.x",
67
+ "node": ">=18.0.0 <=20.x.x",
70
68
  "npm": ">=6.0.0"
71
69
  },
72
70
  "strapi": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-05648af7.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 = 'Strapi Cloud';\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(/* webpackChunkName: \"strapi-plugin-cloud\" */ './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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AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-45c64f7d.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 = 'Strapi Cloud';\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(/* webpackChunkName: \"strapi-plugin-cloud\" */ './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,YAAY,QAAQ;AAAA,QACxB,MAAM;AAAA,QACN,WAAW;AAAA,UACT,IAAI,GAAG,QAAQ;AAAA,UACf,gBAAgB;AAAA,QAClB;AAAA,QACA,WAAW,YAAY;AACf,gBAAA,EAAE,IAAI,IAAI,MAAM;AAAA;AAAA,YAAqD;AAAA,UAAA;AAEpE,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,iBAA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