@telos-dev-team/dealernode-permissions 1.0.3
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.
- package/.github/workflows/publish.yml +38 -0
- package/README.md +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/permissions.d.ts +703 -0
- package/dist/permissions.js +765 -0
- package/package.json +21 -0
- package/src/index.ts +1 -0
- package/src/permissions.ts +784 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Publish to GitHub Packages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
packages: write
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: 22
|
|
22
|
+
registry-url: https://npm.pkg.github.com
|
|
23
|
+
|
|
24
|
+
- run: npm ci
|
|
25
|
+
|
|
26
|
+
- name: Bump version and publish
|
|
27
|
+
env:
|
|
28
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
+
run: |
|
|
30
|
+
git config user.name "github-actions[bot]"
|
|
31
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
32
|
+
npm version patch --no-git-tag-version
|
|
33
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
34
|
+
npm publish
|
|
35
|
+
git add package.json package-lock.json
|
|
36
|
+
git commit -m "chore: release v${VERSION}"
|
|
37
|
+
git tag "v${VERSION}"
|
|
38
|
+
git push && git push --tags
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# dealernode-permissions
|
|
2
|
+
|
|
3
|
+
Shared permissions constants for dealernode projects (backend, frontend, migration).
|
|
4
|
+
|
|
5
|
+
Published to GitHub Packages. Pushes to `main` trigger automatic publishing via GitHub Actions.
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
Add a `.npmrc` file to the root of your consuming project:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
@telos-dev-team:registry=https://npm.pkg.github.com
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @telos-dev-team/dealernode-permissions
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { PERMISSIONS } from '@telos-dev-team/dealernode-permissions';
|
|
25
|
+
|
|
26
|
+
const canViewDeals = PERMISSIONS.DEAL.OPERATIONS.VIEW; // 'deal.operations.view'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Update
|
|
30
|
+
|
|
31
|
+
When permissions change, update in consuming projects:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm update @telos-dev-team/dealernode-permissions
|
|
35
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PERMISSIONS, Permission } from './permissions';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PERMISSIONS = void 0;
|
|
4
|
+
var permissions_1 = require("./permissions");
|
|
5
|
+
Object.defineProperty(exports, "PERMISSIONS", { enumerable: true, get: function () { return permissions_1.PERMISSIONS; } });
|