@teamvortexsoftware/vortex-fastify-5-sdk 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -26,7 +26,7 @@ configureVortex({
26
26
  return user ? {
27
27
  userId: user.id,
28
28
  identifiers: [{ type: 'email', value: user.email }],
29
- groups: user.groups, // [{ type: 'team', id: '123', name: 'My Team' }]
29
+ groups: user.groups, // [{ type: 'team', groupId: '123', name: 'My Team' }]
30
30
  } : null;
31
31
  },
32
32
 
@@ -130,7 +130,7 @@ configureVortex({
130
130
  return user ? {
131
131
  userId: user.id,
132
132
  identifiers: [{ type: 'email', value: user.email }],
133
- groups: user.groups, // [{ type: 'team', id: '123', name: 'My Team' }]
133
+ groups: user.groups, // [{ type: 'team', groupId: '123', name: 'My Team' }]
134
134
  } : null;
135
135
  },
136
136
 
@@ -179,7 +179,7 @@ configureVortex({
179
179
 
180
180
  canAccessInvitationsByGroup: async (request, reply, user, resource) => {
181
181
  return user?.groups.some(g =>
182
- g.type === resource?.groupType && g.id === resource?.groupId
182
+ g.type === resource?.groupType && g.groupId === resource?.groupId
183
183
  );
184
184
  },
185
185
 
package/dist/config.d.ts CHANGED
@@ -7,7 +7,8 @@ export interface AuthenticatedUser {
7
7
  }[];
8
8
  groups: {
9
9
  type: string;
10
- id: string;
10
+ id?: string;
11
+ groupId?: string;
11
12
  name: string;
12
13
  }[];
13
14
  role?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE;QAAE,IAAI,EAAE,OAAO,GAAG,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxD,MAAM,E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CAAC;IAC9C,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAQD,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAY1D;AAED,wBAAgB,oBAAoB,CAAC,qBAAqB,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,YAAY,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtH;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAKpF;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC,CAwC7D;AAGD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAczH;AAED;;;GAGG;AACH,wBAAgB,2BAA2B;;;;;;;;EAY1C"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@teamvortexsoftware/vortex-fastify-5-sdk",
3
3
  "description": "Drop-in Fastify module for Vortex API integration",
4
4
  "author": "@teamvortexsoftware",
5
- "version": "0.0.1",
5
+ "version": "0.0.2",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
@@ -17,10 +17,10 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "build:stg": "pnpm run distclean && pnpm run build && mkdir -p dist.d/stg && mv dist dist.d/stg && echo && echo 'Build in ./dist.d/stg'",
20
- "prepublish:stg": "cp ./LICENSE ./README.md ./dist.d/stg/ && jq '.name = \"@teamvortexsoftware/vortex-fastify-5-sdk-stg\" | .description = \"Vortex Fastify 5 SDK (STG)\" | del(.scripts.prepack)' ./package.json > ./dist.d/stg/package.json",
20
+ "prepublish:stg": "cp ./LICENSE ./README.md ./dist.d/stg/ && NODE_SDK_VERSION=$(jq -r '.version' ../vortex-node-22-sdk/package.json) && jq --arg nodeVer \"^$NODE_SDK_VERSION\" '.name = \"@teamvortexsoftware/vortex-fastify-5-sdk-stg\" | .description = \"Vortex Fastify 5 SDK (STG)\" | del(.devDependencies.\"@teamvortexsoftware/eslint-config\") | del(.devDependencies.\"@teamvortexsoftware/typescript-config\") | .dependencies.\"@teamvortexsoftware/vortex-node-22-sdk\" = $nodeVer | del(.scripts.prepack)' ./package.json > ./dist.d/stg/package.json",
21
21
  "publish:stg": "pnpm run prepublish:stg && npm publish --userconfig ../../.npmrc --access restricted ./dist.d/stg",
22
22
  "build:prod": "pnpm run distclean && pnpm run build && mkdir -p dist.d/prod && mv dist dist.d/prod && echo && echo 'Build in ./dist.d/prod'",
23
- "prepublish:prod": "cp ./LICENSE ./README.md ./dist.d/prod/ && jq 'del(.scripts.prepack)' ./package.json > ./dist.d/prod/package.json",
23
+ "prepublish:prod": "cp ./LICENSE ./README.md ./dist.d/prod/ && NODE_SDK_VERSION=$(jq -r '.version' ../vortex-node-22-sdk/package.json) && jq --arg nodeVer \"^$NODE_SDK_VERSION\" 'del(.devDependencies.\"@teamvortexsoftware/eslint-config\") | del(.devDependencies.\"@teamvortexsoftware/typescript-config\") | .dependencies.\"@teamvortexsoftware/vortex-node-22-sdk\" = $nodeVer | del(.scripts.prepack)' ./package.json > ./dist.d/prod/package.json",
24
24
  "publish:prod": "pnpm run prepublish:prod && npm publish --userconfig ../../.npmrc --access public ./dist.d/prod",
25
25
  "check-types": "tsc --noEmit",
26
26
  "distclean": "rm -rf ./dist ./dist.d",
@@ -28,7 +28,7 @@
28
28
  "dev": "",
29
29
  "test": "jest",
30
30
  "package": "pnpm run build && cd dist/vortex-fastify-5-sdk && npm pack",
31
- "build": "tsc -b tsconfig.json"
31
+ "build": "cd ../vortex-node-22-sdk && pnpm run build && cd ../vortex-fastify-5-sdk && tsc -b tsconfig.json"
32
32
  },
33
33
  "jest": {
34
34
  "rootDir": "__tests__",
@@ -45,8 +45,6 @@
45
45
  "devDependencies": {
46
46
  "@eslint/js": "^9.24.0",
47
47
  "@jest/globals": "29.7.0",
48
- "@teamvortexsoftware/eslint-config": "workspace:*",
49
- "@teamvortexsoftware/typescript-config": "workspace:*",
50
48
  "eslint": "^9.24.0",
51
49
  "jest": "29.7.0",
52
50
  "typescript-eslint": "^8.30.1",
@@ -55,7 +53,7 @@
55
53
  "typescript": "^5.0.0"
56
54
  },
57
55
  "dependencies": {
58
- "@teamvortexsoftware/vortex-node-22-sdk": "workspace:*"
56
+ "@teamvortexsoftware/vortex-node-22-sdk": "^0.0.7"
59
57
  },
60
58
  "peerDependencies": {
61
59
  "fastify": ">=5.0.0"