@spree/cli 3.0.2 → 3.1.0

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.
@@ -16,10 +16,10 @@
16
16
  "lint:fix": "biome check --fix ."
17
17
  },
18
18
  "dependencies": {
19
- "@spree/admin-sdk": "^1.0.0-beta.2",
20
- "@spree/dashboard": "^1.0.0-beta.3",
21
- "@spree/dashboard-core": "^1.0.0-beta.3",
22
- "@spree/dashboard-ui": "^1.0.0-beta.3",
19
+ "@spree/admin-sdk": "^1.0.0-beta.3",
20
+ "@spree/dashboard": "^1.0.0-beta.4",
21
+ "@spree/dashboard-core": "^1.0.0-beta.4",
22
+ "@spree/dashboard-ui": "^1.0.0-beta.4",
23
23
  "@tanstack/react-query": "^5.100.9",
24
24
  "@tanstack/react-router": "^1.169.2",
25
25
  "react": "^19.2.6",
@@ -52,6 +52,7 @@ import { Route as SettingsPayoutsRouteImport } from './../../dashboard/src/route
52
52
  import { Route as SettingsPaymentMethodsRouteImport } from './../../dashboard/src/routes/_authenticated/$storeId/settings/payment-methods'
53
53
  import { Route as SettingsPackageTypesRouteImport } from './../../dashboard/src/routes/_authenticated/$storeId/settings/package-types'
54
54
  import { Route as SettingsMarketsRouteImport } from './../../dashboard/src/routes/_authenticated/$storeId/settings/markets'
55
+ import { Route as SettingsMarketplaceRouteImport } from './../../dashboard/src/routes/_authenticated/$storeId/settings/marketplace'
55
56
  import { Route as SettingsIntegrationsRouteImport } from './../../dashboard/src/routes/_authenticated/$storeId/settings/integrations'
56
57
  import { Route as SettingsEmailsRouteImport } from './../../dashboard/src/routes/_authenticated/$storeId/settings/emails'
57
58
  import { Route as SettingsCustomFieldDefinitionsRouteImport } from './../../dashboard/src/routes/_authenticated/$storeId/settings/custom-field-definitions'
@@ -324,6 +325,11 @@ const SettingsMarketsRoute = SettingsMarketsRouteImport.update({
324
325
  path: '/markets',
325
326
  getParentRoute: () => SettingsRoute,
326
327
  } as any)
328
+ const SettingsMarketplaceRoute = SettingsMarketplaceRouteImport.update({
329
+ id: '/marketplace',
330
+ path: '/marketplace',
331
+ getParentRoute: () => SettingsRoute,
332
+ } as any)
327
333
  const SettingsIntegrationsRoute = SettingsIntegrationsRouteImport.update({
328
334
  id: '/integrations',
329
335
  path: '/integrations',
@@ -659,6 +665,7 @@ export interface FileRoutesByFullPath {
659
665
  '/$storeId/settings/custom-field-definitions': typeof SettingsCustomFieldDefinitionsRoute
660
666
  '/$storeId/settings/emails': typeof SettingsEmailsRoute
661
667
  '/$storeId/settings/integrations': typeof SettingsIntegrationsRoute
668
+ '/$storeId/settings/marketplace': typeof SettingsMarketplaceRoute
662
669
  '/$storeId/settings/markets': typeof SettingsMarketsRoute
663
670
  '/$storeId/settings/package-types': typeof SettingsPackageTypesRoute
664
671
  '/$storeId/settings/payment-methods': typeof SettingsPaymentMethodsRoute
@@ -756,6 +763,7 @@ export interface FileRoutesByTo {
756
763
  '/$storeId/settings/custom-field-definitions': typeof SettingsCustomFieldDefinitionsRoute
757
764
  '/$storeId/settings/emails': typeof SettingsEmailsRoute
758
765
  '/$storeId/settings/integrations': typeof SettingsIntegrationsRoute
766
+ '/$storeId/settings/marketplace': typeof SettingsMarketplaceRoute
759
767
  '/$storeId/settings/markets': typeof SettingsMarketsRoute
760
768
  '/$storeId/settings/package-types': typeof SettingsPackageTypesRoute
761
769
  '/$storeId/settings/payment-methods': typeof SettingsPaymentMethodsRoute
@@ -857,6 +865,7 @@ export interface FileRoutesById {
857
865
  '/_authenticated/$storeId/settings/custom-field-definitions': typeof SettingsCustomFieldDefinitionsRoute
858
866
  '/_authenticated/$storeId/settings/emails': typeof SettingsEmailsRoute
859
867
  '/_authenticated/$storeId/settings/integrations': typeof SettingsIntegrationsRoute
868
+ '/_authenticated/$storeId/settings/marketplace': typeof SettingsMarketplaceRoute
860
869
  '/_authenticated/$storeId/settings/markets': typeof SettingsMarketsRoute
861
870
  '/_authenticated/$storeId/settings/package-types': typeof SettingsPackageTypesRoute
862
871
  '/_authenticated/$storeId/settings/payment-methods': typeof SettingsPaymentMethodsRoute
@@ -958,6 +967,7 @@ export interface FileRouteTypes {
958
967
  | '/$storeId/settings/custom-field-definitions'
959
968
  | '/$storeId/settings/emails'
960
969
  | '/$storeId/settings/integrations'
970
+ | '/$storeId/settings/marketplace'
961
971
  | '/$storeId/settings/markets'
962
972
  | '/$storeId/settings/package-types'
963
973
  | '/$storeId/settings/payment-methods'
@@ -1055,6 +1065,7 @@ export interface FileRouteTypes {
1055
1065
  | '/$storeId/settings/custom-field-definitions'
1056
1066
  | '/$storeId/settings/emails'
1057
1067
  | '/$storeId/settings/integrations'
1068
+ | '/$storeId/settings/marketplace'
1058
1069
  | '/$storeId/settings/markets'
1059
1070
  | '/$storeId/settings/package-types'
1060
1071
  | '/$storeId/settings/payment-methods'
@@ -1155,6 +1166,7 @@ export interface FileRouteTypes {
1155
1166
  | '/_authenticated/$storeId/settings/custom-field-definitions'
1156
1167
  | '/_authenticated/$storeId/settings/emails'
1157
1168
  | '/_authenticated/$storeId/settings/integrations'
1169
+ | '/_authenticated/$storeId/settings/marketplace'
1158
1170
  | '/_authenticated/$storeId/settings/markets'
1159
1171
  | '/_authenticated/$storeId/settings/package-types'
1160
1172
  | '/_authenticated/$storeId/settings/payment-methods'
@@ -1522,6 +1534,13 @@ declare module '@tanstack/react-router' {
1522
1534
  preLoaderRoute: typeof SettingsMarketsRouteImport
1523
1535
  parentRoute: typeof SettingsRoute
1524
1536
  }
1537
+ '/_authenticated/$storeId/settings/marketplace': {
1538
+ id: '/_authenticated/$storeId/settings/marketplace'
1539
+ path: '/marketplace'
1540
+ fullPath: '/$storeId/settings/marketplace'
1541
+ preLoaderRoute: typeof SettingsMarketplaceRouteImport
1542
+ parentRoute: typeof SettingsRoute
1543
+ }
1525
1544
  '/_authenticated/$storeId/settings/integrations': {
1526
1545
  id: '/_authenticated/$storeId/settings/integrations'
1527
1546
  path: '/integrations'
@@ -1918,6 +1937,7 @@ interface SettingsRouteChildren {
1918
1937
  SettingsCustomFieldDefinitionsRoute: typeof SettingsCustomFieldDefinitionsRoute
1919
1938
  SettingsEmailsRoute: typeof SettingsEmailsRoute
1920
1939
  SettingsIntegrationsRoute: typeof SettingsIntegrationsRoute
1940
+ SettingsMarketplaceRoute: typeof SettingsMarketplaceRoute
1921
1941
  SettingsMarketsRoute: typeof SettingsMarketsRoute
1922
1942
  SettingsPackageTypesRoute: typeof SettingsPackageTypesRoute
1923
1943
  SettingsPaymentMethodsRoute: typeof SettingsPaymentMethodsRoute
@@ -1950,6 +1970,7 @@ const SettingsRouteChildren: SettingsRouteChildren = {
1950
1970
  SettingsCustomFieldDefinitionsRoute: SettingsCustomFieldDefinitionsRoute,
1951
1971
  SettingsEmailsRoute: SettingsEmailsRoute,
1952
1972
  SettingsIntegrationsRoute: SettingsIntegrationsRoute,
1973
+ SettingsMarketplaceRoute: SettingsMarketplaceRoute,
1953
1974
  SettingsMarketsRoute: SettingsMarketsRoute,
1954
1975
  SettingsPackageTypesRoute: SettingsPackageTypesRoute,
1955
1976
  SettingsPaymentMethodsRoute: SettingsPaymentMethodsRoute,
@@ -2,32 +2,25 @@
2
2
 
3
3
  A Spree plugin: **{{name}}**.
4
4
 
5
- This is a hybrid Node/Ruby monorepo with two halves:
5
+ This monorepo holds the dashboard half of the plugin:
6
6
 
7
7
  - `packages/dashboard/` — TypeScript dashboard plugin (extends the Spree 6.0 admin via [`@spree/dashboard-core`](https://www.npmjs.com/package/@spree/dashboard-core))
8
- - `engine/` — Ruby Rails engine (Spree extension gem) that ships the Admin API endpoints and ActiveRecord models
9
8
 
10
- Both halves work together: the engine ships `/api/v3/admin/...` endpoints, the dashboard plugin calls them via the SDK's `request` method.
9
+ The example pages call `/api/v3/admin/{{name}}` endpoints through the SDK's `request` method. Those endpoints don't exist yet — they belong in a Spree extension gem (a Rails engine) that you create separately, with its model, Admin API controller and permission scope, as described in [Creating an extension](https://spreecommerce.org/docs/developer/contributing/creating-an-extension). Then point your Spree host's Gemfile at it:
10
+
11
+ ```ruby
12
+ gem '{{ruby_name}}', path: '../path/to/{{ruby_name}}'
13
+ ```
11
14
 
12
15
  ## Development setup
13
16
 
14
17
  ```bash
15
- # Install JavaScript dependencies
16
18
  pnpm install
17
-
18
- # Install Ruby dependencies for the engine
19
- cd engine && bundle install && cd ..
19
+ pnpm build # type-checks the plugin (it ships TypeScript source)
20
20
  ```
21
21
 
22
22
  ## Running against a Spree host app
23
23
 
24
- The engine needs to live alongside a Spree host (typically scaffolded via `create-spree-app`). Point your host's Gemfile at the local engine:
25
-
26
- ```ruby
27
- # in your Spree host's Gemfile
28
- gem '{{ruby_name}}', path: '../path/to/{{plugin_name}}/engine'
29
- ```
30
-
31
24
  Activate the dashboard plugin with a side-effect import in the host's `main.tsx`, before the router mounts. This runs `defineDashboardPlugin` so the nav entry, route, slot widget, and table column register:
32
25
 
33
26
  ```tsx
@@ -45,7 +38,7 @@ If you'd rather opt out of auto-discovery and register manually, pass an explici
45
38
  - [Plugin overview](https://spreecommerce.org/docs/developer/dashboard/plugins/overview) — packaging + publishing your plugin to npm
46
39
  - [Slots catalog](https://spreecommerce.org/docs/developer/dashboard/slots-catalog) — every named slot the dashboard exposes
47
40
  - [Custom Admin Endpoints](https://spreecommerce.org/docs/developer/sdk/admin/extending) — adding your own API endpoints
48
- - [Spree Extensions guide](https://spreecommerce.org/docs/developer/customization/extensions) — the Rails-engine side
41
+ - [Creating an extension](https://spreecommerce.org/docs/developer/contributing/creating-an-extension) — the Rails-engine side
49
42
 
50
43
  ## License
51
44
 
@@ -12,11 +12,15 @@
12
12
  "exports": {
13
13
  ".": "./src/index.tsx"
14
14
  },
15
+ "sideEffects": [
16
+ "./src/index.tsx"
17
+ ],
15
18
  "files": [
16
19
  "src",
17
20
  "README.md"
18
21
  ],
19
22
  "scripts": {
23
+ "build": "tsc --noEmit",
20
24
  "lint": "biome check src",
21
25
  "lint:fix": "biome check --fix src",
22
26
  "typecheck": "tsc --noEmit"
@@ -28,9 +32,9 @@
28
32
  }
29
33
  },
30
34
  "peerDependencies": {
31
- "@spree/admin-sdk": "^0.6.0",
32
- "@spree/dashboard-core": "^0.10.0",
33
- "@spree/dashboard-ui": "^0.10.0",
35
+ "@spree/admin-sdk": "{{spree_admin_sdk_range}}",
36
+ "@spree/dashboard-core": "{{spree_dashboard_core_range}}",
37
+ "@spree/dashboard-ui": "{{spree_dashboard_ui_range}}",
34
38
  "@tanstack/react-query": "^5",
35
39
  "@tanstack/react-router": "^1",
36
40
  "i18next": "^26",
@@ -16,10 +16,10 @@
16
16
  "lint:fix": "biome check --fix ."
17
17
  },
18
18
  "dependencies": {
19
- "@spree/seller-dashboard": "^1.0.0-beta.3",
20
- "@spree/dashboard-core": "^1.0.0-beta.3",
21
- "@spree/dashboard-ui": "^1.0.0-beta.3",
22
- "@spree/seller-sdk": "^1.0.0-beta.2",
19
+ "@spree/seller-dashboard": "^1.0.0-beta.4",
20
+ "@spree/dashboard-core": "^1.0.0-beta.4",
21
+ "@spree/dashboard-ui": "^1.0.0-beta.4",
22
+ "@spree/seller-sdk": "^1.0.0-beta.3",
23
23
  "@tanstack/react-query": "^5.100.9",
24
24
  "@tanstack/react-router": "^1.169.2",
25
25
  "react": "^19.2.6",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/cli",
3
- "version": "3.0.2",
3
+ "version": "3.1.0",
4
4
  "description": "CLI for managing Spree Commerce projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,7 +45,7 @@
45
45
  "typescript": "^6.0.3",
46
46
  "vitest": "^4.1.5",
47
47
  "yaml": "^2.8.4",
48
- "@spree/admin-sdk": "^1.0.0-beta.2"
48
+ "@spree/admin-sdk": "^1.0.0-beta.3"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=20"