{"id":25289034,"url":"https://github.com/devcyclehq/js-sdks","last_synced_at":"2025-04-04T20:10:55.608Z","repository":{"id":37072736,"uuid":"448736468","full_name":"DevCycleHQ/js-sdks","owner":"DevCycleHQ","description":"DevCycle - JS Based SDKs","archived":false,"fork":false,"pushed_at":"2025-03-28T18:32:51.000Z","size":40818,"stargazers_count":35,"open_issues_count":5,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-03T09:03:21.473Z","etag":null,"topics":["continuous-delivery","continuous-deployment","devcycle","devops","feature-flags","feature-toggles","openfeature"],"latest_commit_sha":null,"homepage":"https://docs.devcycle.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevCycleHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-01-17T03:00:52.000Z","updated_at":"2025-03-25T20:38:27.000Z","dependencies_parsed_at":"2024-07-22T23:21:41.231Z","dependency_job_id":"04c49e22-7def-4fe3-b0ed-68fad7e3d115","html_url":"https://github.com/DevCycleHQ/js-sdks","commit_stats":{"total_commits":1144,"total_committers":30,"mean_commits":38.13333333333333,"dds":0.7115384615384616,"last_synced_commit":"96f4316894d806e032b45b6b830524fc2f04ecef"},"previous_names":[],"tags_count":2623,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fjs-sdks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fjs-sdks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fjs-sdks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fjs-sdks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevCycleHQ","download_url":"https://codeload.github.com/DevCycleHQ/js-sdks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"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":["continuous-delivery","continuous-deployment","devcycle","devops","feature-flags","feature-toggles","openfeature"],"created_at":"2025-02-12T23:28:02.581Z","updated_at":"2025-04-04T20:10:55.583Z","avatar_url":"https://github.com/DevCycleHQ.png","language":"TypeScript","readme":"## JS SDK Monorepo\nThis is the DevCycle JS SDK Monorepo which contains all the Javascript-based SDKs and public\nshared packages used by DevCycle products.\n\nTo view the README for a specific SDK, navigate to that SDK inside the `sdk` directory.\n\n[Javascript Client SDK](sdk/js)\n\n[React Client SDK](sdk/react)\n\n[Node.js Server SDK](sdk/nodejs)\n\nThere are several examples included in this repository for various SDKs. If you want to run them, proceed to setup:\n\n## Setup\nEnsure you have Node 22.x installed.\n\n1. Clone this repo\n2. Run `yarn` from the root directory. SDKs and dev-apps should now be set up to run via Nx.\n3. Run `aws configure sso`\n4. Run `aws sso login`\n\n\n## Directory Structure\n```\ndev-apps/\n    - contains development test applications using each SDK\nlib/\n    - contains shared Javascript libraries\nscripts/\n    - contains all scripts that are not service or task specific\nsdk/\n    - contains all SDKs\n```\n\n## Running an development test app\nTo run an app, use the `yarn start` command with the name of the example you want to run:\n`yarn start example-react-with-provider`\n\nThe names of the dev-apps are listed in the `workspace.json` file at the root of the repository. All dev-apps are\nlocated in the root-level `dev-apps/` directory.\n\n## Development\nThe repo is managed using `Nx`, a monorepo management tool. It's worth reading their docs here:\nhttps://nx.dev/l/n/getting-started/intro\n\nEvery project in the repo is listed in the `workspace.json` file. Each of these projects will let you run common Nx\ncommands against them. For example, to test the \"nodejs\" project, run:\n\n`nx test nodejs`\n\nThese commands can be run from the root directory, but should work in any directory.\n\nThe full list of relevant Nx commands is below:\n```\nbuild - build the compiled Webpack output of the project\nserve - build and then run the compiled project\ntest  - run the tests using jest\nlint  - run linting\nformat:write - run prettier against the project and write all formatting changes\n```\n\nThere are also several root-level yarn commands for running services:\n```\nyarn start                - start all services in the repo\nyarn start:partial        - start the services you specify (eg. yarn start:partial api,config)\nyarn test                 - run all tests in the repo\nyarn lint                 - lint all projects in the repo\n```\n\n### Running a local npm server to publish to and pull from\n\nThis will update your yarn and npm configs to point to the new registry, and start up the new registry locally.\n\n```\nyarn local-registry enable\nyarn local-registry start\n```\n\nThe first time you run this, you'll need to add your user:\n\n```\nnpm adduser --registry http://localhost:4873\n```\n\nThe username is test, and the password is test.\n\nTo disable the server, just exit the process. Then run:\n\n```\nyarn local-registry disable\n```\n\nKeeping the server active may interfere with normal npm and npx activities, so if anything's acting strange, just kill the server and disable the registry updates.\n\n\u003e :warning: The `npm-safe-publish.sh` script will not use the locally running server!\n\n### Linting and Running Tests\n\nYou can run commands in every javascript project using Nx: `nx run-many --target test --all`\n\nThis allows you to lint and/or test all projects at once.\n\n### Publishing a Release\n**Note:** You need admin privileges to publish a release. If you don't have them, ask someone who does to do the release for you.\n\nSetup:\n- run `aws sso login`\n- run `./scripts/brew-install.sh`\n- ensure you're on the main branch with the latest code\n\nThen use lerna to create new versions of all changed packages (ensure you do this on the main branch)\n`yarn lerna:version`\n\nThis will automatically push the latest tags and version updates to github. \n\nTo publish the versions to npm, you need a one-time password from our NPM account.\n\nTo publish, run:\n`yarn npm-publish --otp=\u003cone-time password\u003e`\n\nThis will publish all the new versions to npm. \n\n#### js.devcycle.com/devcycle.min.js\n\nThe last step is to upload the umd version of the SDK to our S3 bucket.\n\nTo build it, run:\n\n`nx build:cdn js`\n\nThis will create three files in the `dist/sdk/js` folder:\n\n```\n- devcycle.min.js\n- devcycle.min.js.map\n- devcycle.min.js.LICENSE.txt\n```\n\nUpload them all to S3. Ensure that their access controls allow public access.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcyclehq%2Fjs-sdks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevcyclehq%2Fjs-sdks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcyclehq%2Fjs-sdks/lists"}