Skip to content

Commit

Permalink
feature/fix broken stories and presets
Browse files Browse the repository at this point in the history
  • Loading branch information
dogfrogfog committed Nov 7, 2024
1 parent 15c233f commit 73cb63a
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 111 deletions.
7 changes: 4 additions & 3 deletions apps/storyblok/CLI/sb.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,23 @@ const main = async () => {
// Log in to storyblok CLI

spinner.start("Logging in to storyblok CLI ⏳");
const stdio = "inherit";
try {
execSync("pnpm storyblok logout", {
stdio: "ignore",
stdio,
});
} catch (error) {}

execSync(`pnpm storyblok login --token ${sbPersonalAccessToken}`, {
stdio: "ignore",
stdio,
});
spinner.succeed("Successfully logged in to storyblok CLI ✅");

// Push components and stories to new space

spinner.start("Start filling new space with data ⏳");
execSync(`pnpm push-schemas ${spaceId}`, {
stdio: "ignore",
stdio,
});

await updatePageComponentSectionsField(spaceId);
Expand Down
2 changes: 1 addition & 1 deletion apps/storyblok/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint",
"sb-login": "pnpm storyblok login",
"pull-schemas": "pnpm storyblok pull-components --space 293915 --file-name production --path src/generated/",
"pull-stories": "pnpm storyblok-backup --token 7jqEMtHw7bhVlA9AgyrqXQtt-178697-Dxizdg-gJ66mEWQMH299 --space 293915 --types stories --with-asset-files --output-dir ./src/generated/dump --force --verbose",
"pull-stories": "pnpm storyblok-backup --token [YOUR_TOKEN] --space 293915 --types stories --with-asset-files --output-dir ./src/generated/dump --force --verbose",
"push-schemas": "pnpm storyblok push-components src/generated/components.production.json --presets-source src/generated/presets.production.json --space",
"gen:types": "pnpm pull-schemas && storyblok generate-typescript-typedefs --sourceFilePaths ./src/generated/components.production.json --destinationFilePath src/generated/extracted-types.ts"
},
Expand Down
16 changes: 8 additions & 8 deletions apps/storyblok/src/generated/dump/backup/stories/560303238.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"deleted_at": null,
"sort_by_date": null,
"tag_list": [],
"updated_at": "2024-10-25T12:43:18.054Z",
"updated_at": "2024-11-07T14:43:04.019Z",
"published_at": "2024-10-25T12:43:18.028Z",
"id": 560303238,
"uuid": "32a6be02-b148-40db-8f9b-bf4bd86572b1",
Expand Down Expand Up @@ -38,11 +38,11 @@
{
"_uid": "892b4038-4a39-473f-b3b6-b9b0b2c853bd",
"link": {
"id": "19601884-a1af-4b99-bd95-1a3ca01d5b7a",
"id": "100e8f7a-3486-44da-b6f1-d4e5fb131247",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "home"
"cached_url": "maks"
},
"text": "Home",
"variant": "default",
Expand Down Expand Up @@ -135,7 +135,7 @@
"disble_fe_editor": false
},
"is_startpage": false,
"unpublished_changes": false,
"unpublished_changes": true,
"meta_data": null,
"imported_at": null,
"pinned": false,
Expand All @@ -155,11 +155,11 @@
"expire_at": null,
"first_published_at": "2024-10-09T05:57:45.909Z",
"last_author": {
"id": 251542,
"userid": "eugene",
"friendly_name": "Eugene Boruhov"
"id": 178697,
"userid": "dogfrogfog",
"friendly_name": "maksim Hodasevich"
},
"last_author_id": 251542,
"last_author_id": 178697,
"user_ids": [],
"space_role_ids": [],
"translated_slugs": [],
Expand Down
80 changes: 15 additions & 65 deletions apps/storyblok/src/generated/dump/backup/stories/560836303.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"deleted_at": null,
"sort_by_date": null,
"tag_list": [],
"updated_at": "2024-10-09T16:11:12.776Z",
"updated_at": "2024-11-07T14:44:16.447Z",
"published_at": "2024-10-21T12:06:55.000Z",
"id": 560836303,
"uuid": "8957e46c-ee4d-49ec-93b4-2d06c65d8eb2",
Expand Down Expand Up @@ -146,10 +146,12 @@
}
],
"theme": "light",
"maxWidth": "base",
"component": "linksList",
"marginTop": "none",
"alignVariant": "left",
"marginBottom": "none"
"marginBottom": "none",
"backgroundColor": "none"
}
]
}
Expand Down Expand Up @@ -185,11 +187,11 @@
{
"_uid": "49969ae3-9a59-4f02-91ce-143d983f6b43",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"id": "100e8f7a-3486-44da-b6f1-d4e5fb131247",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
"cached_url": "maks"
},
"text": "link 1",
"variant": "default",
Expand All @@ -198,89 +200,37 @@
{
"_uid": "8531a335-6ba7-41ab-9842-e4a518938f14",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"id": "11a25115-a87f-4896-aafc-37d5d35433eb",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
"cached_url": "home"
},
"text": "link 1",
"variant": "default",
"component": "link"
},
{
"_uid": "c1a83470-ac92-4d42-b6b7-2d77423a99a6",
"_uid": "b6a9e9ac-714b-46a9-8ad5-7f8d60aa921c",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"id": "11a25115-a87f-4896-aafc-37d5d35433eb",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
"cached_url": "home"
},
"text": "link 1",
"variant": "default",
"component": "link"
},
{
"_uid": "0194af4d-4f93-4b18-a721-87823c1a8ed2",
"_uid": "6e8e9d9e-dbdc-4d74-880e-c4b9631ef745",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"id": "11a25115-a87f-4896-aafc-37d5d35433eb",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
},
"text": "link 1",
"variant": "default",
"component": "link"
},
{
"_uid": "b4053a05-4b4e-4114-9dd7-40cf048c0c56",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
},
"text": "link 1",
"variant": "default",
"component": "link"
},
{
"_uid": "6e0e149d-082a-4ab5-97f9-8c9b37f6c4de",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
},
"text": "link 1",
"variant": "default",
"component": "link"
},
{
"_uid": "db4e104f-9578-403f-8f44-c9a6b9faf401",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
},
"text": "link 1",
"variant": "default",
"component": "link"
},
{
"_uid": "845a36b4-a65c-409c-ac59-103ce79b7e52",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "blog"
"cached_url": "home"
},
"text": "link 1",
"variant": "default",
Expand All @@ -305,7 +255,7 @@
"disble_fe_editor": false
},
"is_startpage": false,
"unpublished_changes": false,
"unpublished_changes": true,
"meta_data": null,
"imported_at": null,
"pinned": false,
Expand Down
12 changes: 6 additions & 6 deletions apps/storyblok/src/generated/dump/backup/stories/560838689.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"deleted_at": null,
"sort_by_date": null,
"tag_list": [],
"updated_at": "2024-10-09T16:12:42.553Z",
"updated_at": "2024-11-07T14:43:35.726Z",
"published_at": "2024-10-21T12:06:55.000Z",
"id": 560838689,
"uuid": "9242f0ad-4f23-46b4-a369-227f91b0d3fd",
Expand Down Expand Up @@ -72,11 +72,11 @@
{
"_uid": "2c8c692f-6a31-4967-b160-6cb30374f4a5",
"link": {
"id": "19601884-a1af-4b99-bd95-1a3ca01d5b7a",
"id": "100e8f7a-3486-44da-b6f1-d4e5fb131247",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "home"
"cached_url": "maks"
},
"text": "Home",
"variant": "footerNav",
Expand All @@ -85,11 +85,11 @@
{
"_uid": "653dae7d-dc6e-4a04-b093-bfa3a7477a45",
"link": {
"id": "5d416347-de08-4adb-b496-00b0a083de3a",
"id": "11a25115-a87f-4896-aafc-37d5d35433eb",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": "demo"
"cached_url": "home"
},
"text": "Blog",
"variant": "footerNav",
Expand Down Expand Up @@ -169,7 +169,7 @@
"disble_fe_editor": false
},
"is_startpage": false,
"unpublished_changes": false,
"unpublished_changes": true,
"meta_data": null,
"imported_at": null,
"pinned": false,
Expand Down
114 changes: 112 additions & 2 deletions apps/storyblok/src/generated/dump/backup/stories/571196664.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"deleted_at": null,
"sort_by_date": null,
"tag_list": [],
"updated_at": "2024-11-07T12:57:39.871Z",
"updated_at": "2024-11-07T13:20:06.490Z",
"published_at": "2024-11-07T12:57:39.819Z",
"id": 575494741,
"uuid": "11a25115-a87f-4896-aafc-37d5d35433eb",
Expand Down Expand Up @@ -2148,14 +2148,14 @@
},
"published": true,
"slug": "home",
"path": null,
"path": "",
"full_slug": "home",
"default_root": null,
"disble_fe_editor": false,
"disable_fe_editor": false,
"parent": null,
"is_startpage": false,
"unpublished_changes": false,
"unpublished_changes": true,
"meta_data": null,
"imported_at": null,
"pinned": false,
Expand Down
Loading

0 comments on commit 73cb63a

Please sign in to comment.