{"id":20832228,"url":"https://github.com/scbd/bioland-cli","last_synced_at":"2025-10-30T08:02:55.516Z","repository":{"id":53380440,"uuid":"421857356","full_name":"scbd/bioland-cli","owner":"scbd","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-15T19:23:54.000Z","size":307,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-18T20:39:18.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scbd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-27T14:44:55.000Z","updated_at":"2022-08-04T19:49:18.000Z","dependencies_parsed_at":"2024-11-18T01:35:44.504Z","dependency_job_id":null,"html_url":"https://github.com/scbd/bioland-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fbioland-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fbioland-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fbioland-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fbioland-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scbd","download_url":"https://codeload.github.com/scbd/bioland-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243182575,"owners_count":20249656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T00:10:49.147Z","updated_at":"2025-10-30T08:02:55.491Z","avatar_url":"https://github.com/scbd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bioland-cli\n\n\nconst   generalCommands   = [ 'backUp', 'cache',  'reload',  'custom', 'initTestSite' ]\n\nyarn bcli backUp // backs up all sites\nyarn bcli backUp be // backs up belgium\n\nyarn bcli reload  (-d)- updates ddev, drush and reverse proxy with new sites from the config\n\nyarn bcli initTestSite ht (-d)// makes changes as per checklist \n\nyarn bcli custom ./scripts/bcli/my-custom-script.mjs\n\n\ncustom script:\n\nexport default async (branch, commandArgs, { Util }) =\u003e {\n\n    const sites = JSON.parse(JSON.stringify(Util.config.siteCodes))\n\n    for (const countryCode of sites ){\n        await fixPagesDemo(countryCode, Util)\n\n        await Util.endPool(countryCode)\n        await Util.sleep(10000)\n    }\n}\n\nasync function fixPagesDemo(site, Util){\n\n    const locale        = await Util.getDefaultLocale(site)\n    const defaultLocale = locale === 'en'? '' : 'en'\n\n    await Util.deleteNode(site, 'node/article', '0daa3f7b-373d-427a-8051-19fb1d44d4d0', defaultLocale)\n\n    await Util.deleteNode(site, 'node/article', 'b8dfd60a-1a51-4621-92ac-fd2b05c305b5', defaultLocale)\n    await Util.deleteNode(site, 'node/article', '8cfac351-900b-4024-a519-5784db8d3f2b', defaultLocale)\n\n    const data    = { data: { type: \"menu_link_content--menu_link_content\", id:'72aff607-a2e4-4635-80ad-623b3fa35cce', attributes: { enabled: 0   } } }\n\n    await Util.patch(site, 'menu_link_content/menu_link_content', '72aff607-a2e4-4635-80ad-623b3fa35cce', data, defaultLocale)\n\n    consola.info(`${site}: articles deleted`)\n}\n\ninitTestSite\n\n1. ad site to config https://github.com/scbd/bioland-config.git, dev should be dev env https://github.com/scbd/bioland-config.git#dev and push\n2. ssh into server\n3. cd bioland \u0026\u0026 yarn clean-install - (pulls latest config)\n4. yarn bcli reload (-d) - updates drupal/ddev/reverse proxy with folder and config files, (-d) for dev server\n5. ddev restart (load new configs)\n6. yarn bcli initTestSite ${newSiteCode}\n7. if custom url, have client cname the domain  to ${code}.bioland.infra.cbd.int and  point ${code}.bioland.infra.cbd.int to cdn.bioland.infra.cbd.int\n8. ddev drush @${newSiteCode} cr\n9. login, manually add remove languages\n10. manually add GA code - (if not a country)\n11. manually configure SAML - (if not a country code such as 'asean')\n\n\nSAML Config - if not a country code\n\n\n1. in a local bioland directory, run 'yarn bcli generateSpList' which will create a file in that directory spList.js\n2. tunnel into the main swarm (us3 usually)\n3. create new secret, spList.${numberAny}.js and copy value of generated spList.js into your new secret\n4. go to the website-accounts service, and change the add the new secret you created with location '/usr/src/app/saml/service-providers/list.js'\n5. delete the old secret with the same location '\t/usr/src/app/saml/service-providers/list.js'\n6. then apply changes\n7. then test the saml","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscbd%2Fbioland-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscbd%2Fbioland-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscbd%2Fbioland-cli/lists"}