@fluidframework/azure-service-utils 2.0.0-internal.7.1.0 → 2.0.0-internal.7.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/azure-service-utils
2
2
 
3
+ ## 2.0.0-internal.7.2.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.0.0-internal.7.1.0
4
8
 
5
9
  Dependency updates only.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/azure-service-utils",
3
- "version": "2.0.0-internal.7.1.0",
3
+ "version": "2.0.0-internal.7.2.0",
4
4
  "description": "Helper service-side utilities for connecting to Azure Fluid Relay service",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,8 +11,20 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./lib/index.d.ts",
18
+ "default": "./lib/index.js"
19
+ },
20
+ "require": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ }
24
+ }
25
+ },
14
26
  "main": "dist/index.js",
15
- "module": "dist/index.js",
27
+ "module": "lib/index.js",
16
28
  "types": "dist/index.d.ts",
17
29
  "dependencies": {
18
30
  "@fluidframework/protocol-definitions": "^3.0.0",
@@ -20,14 +32,13 @@
20
32
  "uuid": "^9.0.0"
21
33
  },
22
34
  "devDependencies": {
23
- "@fluid-tools/build-cli": "^0.25.0",
24
- "@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.0.0-internal.7.0.0",
25
- "@fluidframework/build-common": "^2.0.1",
26
- "@fluidframework/build-tools": "^0.25.0",
35
+ "@fluid-tools/build-cli": "^0.26.1",
36
+ "@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.0.0-internal.7.1.0",
37
+ "@fluidframework/build-common": "^2.0.3",
38
+ "@fluidframework/build-tools": "^0.26.1",
27
39
  "@fluidframework/eslint-config-fluid": "^3.0.0",
28
40
  "@microsoft/api-extractor": "^7.37.0",
29
41
  "@types/jsrsasign": "^8.0.8",
30
- "copyfiles": "^2.4.1",
31
42
  "eslint": "~8.50.0",
32
43
  "eslint-config-prettier": "~9.0.0",
33
44
  "prettier": "~3.0.3",
@@ -45,7 +56,7 @@
45
56
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
46
57
  "build:test": "tsc --project ./src/test/tsconfig.json",
47
58
  "ci:build:docs": "api-extractor run",
48
- "clean": "rimraf --glob 'dist' 'lib' '*.tsbuildinfo' '*.build.log' '_api-extractor-temp'",
59
+ "clean": "rimraf --glob dist lib \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp",
49
60
  "eslint": "eslint --format stylish src",
50
61
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
51
62
  "format": "npm run prettier:fix",
@@ -1,64 +0,0 @@
1
- /**
2
- * A set of helper utilities for building backend APIs for use with
3
- * {@link https://docs.microsoft.com/en-us/azure/azure-fluid-relay/overview/overview | Azure Fluid Relay}.
4
- *
5
- * @remarks
6
- * Note that this library's primary entry-point ({@link generateToken}) is only intended
7
- * to be run in a browser context.
8
- * It is **not** Node.js-compatible.
9
- *
10
- * @packageDocumentation
11
- */
12
-
13
- import { IUser } from '@fluidframework/protocol-definitions';
14
- import { ScopeType } from '@fluidframework/protocol-definitions';
15
-
16
- /**
17
- * IMPORTANT: This function is duplicated in ./packages/runtime/test-runtime-utils/src/generateToken.ts. There is no
18
- * need for different implementations, so they should be kept in sync if changes are needed.
19
- *
20
- * The reason they are duplicated is because we don't want the core Fluid libraries depending on the Azure libraries
21
- * (enforced by layer-check), but both need to expose this function. The test-runtime-utils library is a test lib, which
22
- * layer-check (correctly) reuires only be used as a dev dependency. But in the azure case, we want the function
23
- * exported, so it needs to be sourced from either the package itself or a non-dev dependency.
24
- *
25
- * The previous solution to this was to import the function from azure-service-utils into test-runtime-utils, but that
26
- * no longer works because the azure packages are in a separate release group.
27
- *
28
- * If a token needs to be generated on the client side, you should re-use this function. If you need service-side token
29
- * generation, you should use the function available in the server-services-client package in order to avoid
30
- * interdependencies between service and client packages.
31
- */
32
- /**
33
- * Generates a {@link https://en.wikipedia.org/wiki/JSON_Web_Token | JSON Web Token} (JWT)
34
- * to authorize access to a Routerlicious-based Fluid service.
35
- *
36
- * @remarks Note: this function uses a browser friendly auth library
37
- * ({@link https://www.npmjs.com/package/jsrsasign | jsrsasign}) and may only be used in client (browser) context.
38
- * It is **not** Node.js-compatible.
39
- *
40
- * @param tenantId - See {@link @fluidframework/protocol-definitions#ITokenClaims.tenantId}
41
- * @param key - API key to authenticate user. Must be {@link https://en.wikipedia.org/wiki/UTF-8 | UTF-8}-encoded.
42
- * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}
43
- * @param documentId - See {@link @fluidframework/protocol-definitions#ITokenClaims.documentId}.
44
- * If not specified, the token will not be associated with a document, and an empty string will be used.
45
- * @param user - User with whom generated tokens will be associated.
46
- * If not specified, the token will not be associated with a user, and a randomly generated mock user will be
47
- * used instead.
48
- * See {@link @fluidframework/protocol-definitions#ITokenClaims.user}
49
- * @param lifetime - Used to generate the {@link @fluidframework/protocol-definitions#ITokenClaims.exp | expiration}.
50
- * Expiration = now + lifetime.
51
- * Expressed in seconds.
52
- * Default: 3600 (1 hour).
53
- * @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.
54
- * Default: `1.0`.
55
- *
56
- * @public
57
- */
58
- export declare function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
59
-
60
- export { IUser }
61
-
62
- export { ScopeType }
63
-
64
- export { }
@@ -1,64 +0,0 @@
1
- /**
2
- * A set of helper utilities for building backend APIs for use with
3
- * {@link https://docs.microsoft.com/en-us/azure/azure-fluid-relay/overview/overview | Azure Fluid Relay}.
4
- *
5
- * @remarks
6
- * Note that this library's primary entry-point ({@link generateToken}) is only intended
7
- * to be run in a browser context.
8
- * It is **not** Node.js-compatible.
9
- *
10
- * @packageDocumentation
11
- */
12
-
13
- import { IUser } from '@fluidframework/protocol-definitions';
14
- import { ScopeType } from '@fluidframework/protocol-definitions';
15
-
16
- /**
17
- * IMPORTANT: This function is duplicated in ./packages/runtime/test-runtime-utils/src/generateToken.ts. There is no
18
- * need for different implementations, so they should be kept in sync if changes are needed.
19
- *
20
- * The reason they are duplicated is because we don't want the core Fluid libraries depending on the Azure libraries
21
- * (enforced by layer-check), but both need to expose this function. The test-runtime-utils library is a test lib, which
22
- * layer-check (correctly) reuires only be used as a dev dependency. But in the azure case, we want the function
23
- * exported, so it needs to be sourced from either the package itself or a non-dev dependency.
24
- *
25
- * The previous solution to this was to import the function from azure-service-utils into test-runtime-utils, but that
26
- * no longer works because the azure packages are in a separate release group.
27
- *
28
- * If a token needs to be generated on the client side, you should re-use this function. If you need service-side token
29
- * generation, you should use the function available in the server-services-client package in order to avoid
30
- * interdependencies between service and client packages.
31
- */
32
- /**
33
- * Generates a {@link https://en.wikipedia.org/wiki/JSON_Web_Token | JSON Web Token} (JWT)
34
- * to authorize access to a Routerlicious-based Fluid service.
35
- *
36
- * @remarks Note: this function uses a browser friendly auth library
37
- * ({@link https://www.npmjs.com/package/jsrsasign | jsrsasign}) and may only be used in client (browser) context.
38
- * It is **not** Node.js-compatible.
39
- *
40
- * @param tenantId - See {@link @fluidframework/protocol-definitions#ITokenClaims.tenantId}
41
- * @param key - API key to authenticate user. Must be {@link https://en.wikipedia.org/wiki/UTF-8 | UTF-8}-encoded.
42
- * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}
43
- * @param documentId - See {@link @fluidframework/protocol-definitions#ITokenClaims.documentId}.
44
- * If not specified, the token will not be associated with a document, and an empty string will be used.
45
- * @param user - User with whom generated tokens will be associated.
46
- * If not specified, the token will not be associated with a user, and a randomly generated mock user will be
47
- * used instead.
48
- * See {@link @fluidframework/protocol-definitions#ITokenClaims.user}
49
- * @param lifetime - Used to generate the {@link @fluidframework/protocol-definitions#ITokenClaims.exp | expiration}.
50
- * Expiration = now + lifetime.
51
- * Expressed in seconds.
52
- * Default: 3600 (1 hour).
53
- * @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.
54
- * Default: `1.0`.
55
- *
56
- * @public
57
- */
58
- export declare function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
59
-
60
- export { IUser }
61
-
62
- export { ScopeType }
63
-
64
- export { }
@@ -1,64 +0,0 @@
1
- /**
2
- * A set of helper utilities for building backend APIs for use with
3
- * {@link https://docs.microsoft.com/en-us/azure/azure-fluid-relay/overview/overview | Azure Fluid Relay}.
4
- *
5
- * @remarks
6
- * Note that this library's primary entry-point ({@link generateToken}) is only intended
7
- * to be run in a browser context.
8
- * It is **not** Node.js-compatible.
9
- *
10
- * @packageDocumentation
11
- */
12
-
13
- import { IUser } from '@fluidframework/protocol-definitions';
14
- import { ScopeType } from '@fluidframework/protocol-definitions';
15
-
16
- /**
17
- * IMPORTANT: This function is duplicated in ./packages/runtime/test-runtime-utils/src/generateToken.ts. There is no
18
- * need for different implementations, so they should be kept in sync if changes are needed.
19
- *
20
- * The reason they are duplicated is because we don't want the core Fluid libraries depending on the Azure libraries
21
- * (enforced by layer-check), but both need to expose this function. The test-runtime-utils library is a test lib, which
22
- * layer-check (correctly) reuires only be used as a dev dependency. But in the azure case, we want the function
23
- * exported, so it needs to be sourced from either the package itself or a non-dev dependency.
24
- *
25
- * The previous solution to this was to import the function from azure-service-utils into test-runtime-utils, but that
26
- * no longer works because the azure packages are in a separate release group.
27
- *
28
- * If a token needs to be generated on the client side, you should re-use this function. If you need service-side token
29
- * generation, you should use the function available in the server-services-client package in order to avoid
30
- * interdependencies between service and client packages.
31
- */
32
- /**
33
- * Generates a {@link https://en.wikipedia.org/wiki/JSON_Web_Token | JSON Web Token} (JWT)
34
- * to authorize access to a Routerlicious-based Fluid service.
35
- *
36
- * @remarks Note: this function uses a browser friendly auth library
37
- * ({@link https://www.npmjs.com/package/jsrsasign | jsrsasign}) and may only be used in client (browser) context.
38
- * It is **not** Node.js-compatible.
39
- *
40
- * @param tenantId - See {@link @fluidframework/protocol-definitions#ITokenClaims.tenantId}
41
- * @param key - API key to authenticate user. Must be {@link https://en.wikipedia.org/wiki/UTF-8 | UTF-8}-encoded.
42
- * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}
43
- * @param documentId - See {@link @fluidframework/protocol-definitions#ITokenClaims.documentId}.
44
- * If not specified, the token will not be associated with a document, and an empty string will be used.
45
- * @param user - User with whom generated tokens will be associated.
46
- * If not specified, the token will not be associated with a user, and a randomly generated mock user will be
47
- * used instead.
48
- * See {@link @fluidframework/protocol-definitions#ITokenClaims.user}
49
- * @param lifetime - Used to generate the {@link @fluidframework/protocol-definitions#ITokenClaims.exp | expiration}.
50
- * Expiration = now + lifetime.
51
- * Expressed in seconds.
52
- * Default: 3600 (1 hour).
53
- * @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.
54
- * Default: `1.0`.
55
- *
56
- * @public
57
- */
58
- export declare function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
59
-
60
- export { IUser }
61
-
62
- export { ScopeType }
63
-
64
- export { }
@@ -1,64 +0,0 @@
1
- /**
2
- * A set of helper utilities for building backend APIs for use with
3
- * {@link https://docs.microsoft.com/en-us/azure/azure-fluid-relay/overview/overview | Azure Fluid Relay}.
4
- *
5
- * @remarks
6
- * Note that this library's primary entry-point ({@link generateToken}) is only intended
7
- * to be run in a browser context.
8
- * It is **not** Node.js-compatible.
9
- *
10
- * @packageDocumentation
11
- */
12
-
13
- import { IUser } from '@fluidframework/protocol-definitions';
14
- import { ScopeType } from '@fluidframework/protocol-definitions';
15
-
16
- /**
17
- * IMPORTANT: This function is duplicated in ./packages/runtime/test-runtime-utils/src/generateToken.ts. There is no
18
- * need for different implementations, so they should be kept in sync if changes are needed.
19
- *
20
- * The reason they are duplicated is because we don't want the core Fluid libraries depending on the Azure libraries
21
- * (enforced by layer-check), but both need to expose this function. The test-runtime-utils library is a test lib, which
22
- * layer-check (correctly) reuires only be used as a dev dependency. But in the azure case, we want the function
23
- * exported, so it needs to be sourced from either the package itself or a non-dev dependency.
24
- *
25
- * The previous solution to this was to import the function from azure-service-utils into test-runtime-utils, but that
26
- * no longer works because the azure packages are in a separate release group.
27
- *
28
- * If a token needs to be generated on the client side, you should re-use this function. If you need service-side token
29
- * generation, you should use the function available in the server-services-client package in order to avoid
30
- * interdependencies between service and client packages.
31
- */
32
- /**
33
- * Generates a {@link https://en.wikipedia.org/wiki/JSON_Web_Token | JSON Web Token} (JWT)
34
- * to authorize access to a Routerlicious-based Fluid service.
35
- *
36
- * @remarks Note: this function uses a browser friendly auth library
37
- * ({@link https://www.npmjs.com/package/jsrsasign | jsrsasign}) and may only be used in client (browser) context.
38
- * It is **not** Node.js-compatible.
39
- *
40
- * @param tenantId - See {@link @fluidframework/protocol-definitions#ITokenClaims.tenantId}
41
- * @param key - API key to authenticate user. Must be {@link https://en.wikipedia.org/wiki/UTF-8 | UTF-8}-encoded.
42
- * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}
43
- * @param documentId - See {@link @fluidframework/protocol-definitions#ITokenClaims.documentId}.
44
- * If not specified, the token will not be associated with a document, and an empty string will be used.
45
- * @param user - User with whom generated tokens will be associated.
46
- * If not specified, the token will not be associated with a user, and a randomly generated mock user will be
47
- * used instead.
48
- * See {@link @fluidframework/protocol-definitions#ITokenClaims.user}
49
- * @param lifetime - Used to generate the {@link @fluidframework/protocol-definitions#ITokenClaims.exp | expiration}.
50
- * Expiration = now + lifetime.
51
- * Expressed in seconds.
52
- * Default: 3600 (1 hour).
53
- * @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.
54
- * Default: `1.0`.
55
- *
56
- * @public
57
- */
58
- export declare function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
59
-
60
- export { IUser }
61
-
62
- export { ScopeType }
63
-
64
- export { }