{"_id":"@bamboo-metrix/bamboo-app-permission-lib","_rev":"2-8f04fbbe5e479428857a7c2ed48f0ffa","name":"@bamboo-metrix/bamboo-app-permission-lib","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@bamboo-metrix/bamboo-app-permission-lib","version":"2.0.0","keywords":["permission"],"author":{"name":"WebProvise"},"license":"MIT","_id":"@bamboo-metrix/bamboo-app-permission-lib@2.0.0","maintainers":[{"name":"jrdn","email":"j@jrdn.org"}],"homepage":"https://gitlab.webprovise.com/bamboo/bamboo-app-permission-lib","dist":{"shasum":"79a19fa320c560d584b01a4bbdc0d95898f15b5a","tarball":"https://registry.npmjs.org/@bamboo-metrix/bamboo-app-permission-lib/-/bamboo-app-permission-lib-2.0.0.tgz","fileCount":25,"integrity":"sha512-VpQ7ubADWUQ6G4hqV/6bQp7poMjr7DzlpRVqX3gZLgcRRG0IhHjOVItdpmLMuTCLYGgE50hzst0e/Gz+4Eyzaw==","signatures":[{"sig":"MEQCIET9eyzYAtrMd00TGW/vK9ghg5vnZdwqNeWLNMB8k9IJAiAdbcUQA5VbK6LDTtglwyUANcv7qp/lz1rGREEW1276tA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99675},"main":"dist/index.js","types":"./dist/index.d.ts","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=10"},"gitHead":"2962773a9e3218f24240ccbde8498fdea72a0c39","scripts":{"lint":"eslint . --no-error-on-unmatched-pattern","test":"cross-env CI=1 react-scripts test --env=jest-environment-jsdom-sixteen","build":"rollup -c","start":"rollup -c -w","deploy":"gh-pages -d example/build","prepare":"npm run build && is-ci || husky install","predeploy":"cd example && yarn install && yarn run build","lint:style":"stylelint 'src/**/*.{css,scss}'","test:watch":"react-scripts test --env=jest-environment-jsdom-sixteen"},"_npmUser":{"name":"jrdn","email":"j@jrdn.org"},"repository":{"url":"https://gitlab.webprovise.com/bamboo/bamboo-app-permission-lib.git","type":"git"},"_npmVersion":"10.7.0","description":"Common permission library for all Bamboo applications","directories":{},"_nodeVersion":"18.20.4","_hasShrinkwrap":false,"packageManager":"pnpm@9.4.0+sha256.b6fd0bfda555e7e584ad7e56b30c68b01d5a04f9ee93989f4b93ca8473c49c74","devDependencies":{"clsx":"^1.1.1","husky":"^6.0.0","is-ci":"^3.0.0","react":"17.0.1","tslib":"^2.8.1","eslint":"^6.8.0","rollup":"^2.49.0","gh-pages":"^2.2.0","prettier":"^2.3.1","cross-env":"^7.0.2","node-sass":"^8.0.0","react-dom":"17.0.1","stylelint":"^13.13.1","typescript":"^4.9.3","@types/jest":"^26.0.24","@types/node":"^16.3.2","lint-staged":"^11.0.0","@types/react":"^17.0.14","babel-eslint":"^10.0.3","react-scripts":"^3.4.1","stylelint-scss":"^3.19.0","microbundle-crl":"^0.13.10","@types/react-dom":"^17.0.9","react-router-dom":"5.2.0","@rollup/plugin-image":"^2.0.6","@testing-library/react":"^12.0.0","@types/react-router-dom":"^5.1.8","@testing-library/jest-dom":"^5.14.1","rollup-plugin-typescript2":"^0.36.0","stylelint-config-prettier":"^8.0.2","stylelint-config-standard":"^22.0.0","@testing-library/user-event":"^13.1.9","jest-environment-jsdom-sixteen":"^2.0.0","rollup-plugin-peer-deps-external":"^2.2.4","@webprovise1/eslint-config-bamboo":"^1.0.3"},"peerDependencies":{"react":"17.0.1","react-dom":"17.0.1","react-router-dom":"5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/bamboo-app-permission-lib_2.0.0_1746826612799_0.778935318731987","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-05-09T21:36:52.680Z","modified":"2025-05-09T21:55:55.679Z","2.0.0":"2025-05-09T21:36:53.022Z"},"author":{"name":"WebProvise"},"license":"MIT","homepage":"https://gitlab.webprovise.com/bamboo/bamboo-app-permission-lib","keywords":["permission"],"repository":{"url":"https://gitlab.webprovise.com/bamboo/bamboo-app-permission-lib.git","type":"git"},"description":"Common permission library for all Bamboo applications","maintainers":[{"email":"ryder.loves.basketball@gmail.com","name":"ryder56"},{"email":"j@jrdn.org","name":"jrdn"}],"readme":"# permission-lib\n\n> Made with create-react-library\n\n## Development\n\n### Required\n\nEnsure your environment has the environment variable `NPM_TOKEN` available or npm scripts will fail with the following error:\n\n```\nerror An unexpected error occurred: \"Failed to replace env in config: ${NPM_TOKEN}\".\n```\n\n- .env file will not work.\n- You will need to add via Environment Variables tool in Windows or simply `export NPM_TOKEN=` in \\*nix terminals. Any value is okay.\n\n### Install dependencies\n\n```bash\n$ yarn install\n```\n\n### Build distribution\n\n```bash\n$ yarn build\n```\n\n## Publish to NPM\n\nReference: https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions\n\nIn shorts:\n\n- POINT 1: Treat the \\<major.minor.patch\\> version as official release or the \"master branch\". Only bump the official version once it needs to be deployed for alpha deployment.\n- POINT 2: If the changes in other applications cannot be merged yet (due to back-end blocking, etc.) but you want to test the integration of the library: bump the major/minor/patch version and add '-alpha.\\<number\\>' (e.g: The current version is 1.0.14, you want to create a test a big feature => the new version is 2.0.0-alpha.1)\n\nNote: For multiple people working on different features, you have to use different versions. (e.g: X and Y are working on different features, they should create separate alpha releases - 1.1.1-alpha.1 and 2.0.0-alpha.1; if they needs to re-release again just bump the specific number after alpha)\n\n### In-implementation features\n\nIf you want to deploy a test version:\n\n- Update the `version` property of `package.json` file using the **second** method (bump the version and add alpha suffix): major.minor.patch-alpha.number\n- Create a merge request along with your changes\n- The merge request pipeline should be triggered, including two steps:\n  - build (to verify if the code can be built) - this step is ran automatically\n  - deploy alpha to npm (to deploy the alpha version to npm) - **this step must be ran manually, you cannot deploy from this step without having alpha suffix in package version**\n    ![deploy alpha to npm](https://gitlab.webprovise.com/bamboo/bamboo-app-permission-lib/uploads/9ebafd91cbf85485c7a4ee2a251133e1/image.png 'deploy alpha to npm')\n- After the alpha version is deployed, update the applications.\n\n### Official release\n\nIf the feature is approved and ready to merge into the master branch. You should do the following\n\n- Update the `version` property of `package.json` file using the **first** method (without alpha suffix): major.minor.patch\n- Push the change to your existing merge request\n- The merge request pipeline should be triggered, including two steps:\n  - build (to verify if the code can be built) - this step is ran automatically\n  - deploy alpha to npm (to deploy the alpha version to npm) - **ignore this step, you cannot deploy from this step without having alpha suffix in package version**\n- Get code review, approval and merge into the master branch. The pipeline will deploy the official version to NPM.\n- After the official release is deployed, update the applications.\n\n## Usage in applications\n\n### Install latest stable version:\n\nMake sure the application project has the `.npmrc` file:\n\n```\n# .npmrc\n@webprovise1:registry=https://registry.npmjs.org\n//registry.npmjs.org/:_authToken=<TOKEN - get from team lead>\n```\n\n```bash\n$ yarn add @webprovise1/bb-permission\n```\n\n### Install local version:\n\n1. In this library project:\n\n```bash\n$ yarn build    # build files\n\n$ yarn link     # mark the project to be ready for local usage\n\n# You should see something like these\nyarn link v1.22.10\nsuccess Registered \"@webprovise1/bb-permission\".\ninfo You can now run `yarn link \"@webprovise1/bb-permission\"` in the projects where you want to use this package and it will be used instead.\nDone in 0.06s.\n```\n\n2. In the application project:\n\n```bash\n# Start using local library\n$ yarn link \"@webprovise1/bb-permission\"\n\n# You should see something like these\nyarn link v1.22.10\nsuccess Using linked package for \"@webprovise1/bb-permission\".\nDone in 0.07s.\n\n# To use the NPM version again\n$ yarn unlink \"@webprovise1/bb-permission\"\n\n# remove and add again if you don't see the original version\n$ yarn remove @webprovise1/bb-permission\n$ yarn add @webprovise1/bb-permission\n\n```\n\n### Import in codebase\n\n```tsx\nimport { PermissionRoute, TracePermission } from '@webprovise1/bb-permission';\n```\n\n## License\n\nMIT © [](https://github.com/)\n","readmeFilename":"README.md"}