@virtru/dsp-sdk 0.4.1 → 0.6.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 +15 -1
- package/README.md +81 -3
- package/dist/src/fips.d.ts +7 -0
- package/dist/src/fips.js +12 -0
- package/dist/src/lib/dsp.d.ts +17 -1
- package/dist/src/lib/dsp.js +28 -5
- package/dist/src/lib/fips-crypto/asymmetric.d.ts +35 -0
- package/dist/src/lib/fips-crypto/asymmetric.js +116 -0
- package/dist/src/lib/fips-crypto/key-format.d.ts +51 -0
- package/dist/src/lib/fips-crypto/key-format.js +233 -0
- package/dist/src/lib/fips-crypto/keys.d.ts +26 -0
- package/dist/src/lib/fips-crypto/keys.js +123 -0
- package/dist/src/lib/fips-crypto/primitives.d.ts +41 -0
- package/dist/src/lib/fips-crypto/primitives.js +105 -0
- package/dist/src/lib/fips-crypto/symmetric.d.ts +61 -0
- package/dist/src/lib/fips-crypto/symmetric.js +152 -0
- package/dist/src/lib/fips-crypto-service.d.ts +5 -0
- package/dist/src/lib/fips-crypto-service.js +44 -0
- package/dist/src/lib/utils.d.ts +8 -2
- package/dist/src/lib/utils.js +8 -9
- package/package.json +31 -5
- package/.prettierrc +0 -3
- package/.rush/temp/chunked-rush-logs/dsp-sdk._phase_build.chunks.jsonl +0 -12
- package/.rush/temp/chunked-rush-logs/dsp-sdk._phase_test.chunks.jsonl +0 -43
- package/.rush/temp/package-deps__phase_build.json +0 -68
- package/.rush/temp/shrinkwrap-deps.json +0 -1257
- package/CHANGELOG.json +0 -278
- package/buf.gen.yaml +0 -17
- package/buf.yaml +0 -4
- package/config/jest.config.json +0 -6
- package/config/rig.json +0 -8
- package/dist/tests/dsp-client.test.d.ts +0 -1
- package/dist/tests/dsp-client.test.js +0 -73
- package/dist/tests/dsp.test.d.ts +0 -1
- package/dist/tests/dsp.test.js +0 -92
- package/dist/tests/mocks/create-export-artifacts.d.ts +0 -2
- package/dist/tests/mocks/create-export-artifacts.js +0 -13
- package/dist/tests/mocks/tagging-pdp-tag.d.ts +0 -2
- package/dist/tests/mocks/tagging-pdp-tag.js +0 -11
- package/dist/tests/mocks/well-known-configuration.d.ts +0 -2
- package/dist/tests/mocks/well-known-configuration.js +0 -12
- package/dist/tests/setup-msw.d.ts +0 -9
- package/dist/tests/setup-msw.js +0 -30
- package/eslint.config.mjs +0 -28
- package/lib-commonjs/src/gen/buf/validate/validate_pb.js +0 -487
- package/lib-commonjs/src/gen/config/v1/config_pb.js +0 -142
- package/lib-commonjs/src/gen/config/v1/kas_config_pb.js +0 -72
- package/lib-commonjs/src/gen/config/v1/meta_pb.js +0 -36
- package/lib-commonjs/src/gen/config/v1/outlook_config_pb.js +0 -67
- package/lib-commonjs/src/gen/config/v1/secureviewer_config_pb.js +0 -67
- package/lib-commonjs/src/gen/config/v1/tagging_pb.js +0 -246
- package/lib-commonjs/src/gen/google/api/annotations_pb.js +0 -33
- package/lib-commonjs/src/gen/google/api/http_pb.js +0 -44
- package/lib-commonjs/src/gen/policyimportexport/v1/policy_import_export_pb.js +0 -93
- package/lib-commonjs/src/gen/shared/v1/shared_pb.js +0 -95
- package/lib-commonjs/src/gen/tagging/pdp/v2/tagging_pb.js +0 -277
- package/lib-commonjs/src/gen/version/v1/version_pb.js +0 -40
- package/lib-commonjs/src/gen/virtru/common/common_pb.js +0 -76
- package/lib-commonjs/src/gen/virtru/policy/certificates/v1/certificates_pb.js +0 -77
- package/lib-commonjs/src/gen/virtru/policy/objects_pb.js +0 -143
- package/lib-commonjs/src/index.js +0 -48
- package/lib-commonjs/src/lib/client.js +0 -66
- package/lib-commonjs/src/lib/consts.js +0 -10
- package/lib-commonjs/src/lib/dsp.js +0 -49
- package/lib-commonjs/src/lib/utils.js +0 -402
- package/lib-commonjs/tests/dsp-client.test.js +0 -75
- package/lib-commonjs/tests/dsp.test.js +0 -94
- package/lib-commonjs/tests/mocks/create-export-artifacts.js +0 -17
- package/lib-commonjs/tests/mocks/tagging-pdp-tag.js +0 -15
- package/lib-commonjs/tests/mocks/well-known-configuration.js +0 -16
- package/lib-commonjs/tests/setup-msw.js +0 -33
- package/src/gen/buf/validate/validate_pb.ts +0 -4879
- package/src/gen/config/formatters/testdata/v1/test_pb.ts +0 -287
- package/src/gen/config/v1/config_connect.ts +0 -111
- package/src/gen/config/v1/config_pb.ts +0 -439
- package/src/gen/config/v1/kas_config_pb.ts +0 -183
- package/src/gen/config/v1/meta_pb.ts +0 -72
- package/src/gen/config/v1/outlook_config_pb.ts +0 -242
- package/src/gen/config/v1/secureviewer_config_pb.ts +0 -161
- package/src/gen/config/v1/tagging_pb.ts +0 -456
- package/src/gen/google/api/annotations_pb.ts +0 -43
- package/src/gen/google/api/http_pb.ts +0 -486
- package/src/gen/helloworld/v1/helloworld_connect.ts +0 -49
- package/src/gen/helloworld/v1/helloworld_pb.ts +0 -104
- package/src/gen/kas/nanotdf/v1/nanotdf_rewrap_connect.ts +0 -39
- package/src/gen/kas/nanotdf/v1/nanotdf_rewrap_pb.ts +0 -207
- package/src/gen/policyimportexport/v1/policy_import_export_connect.ts +0 -56
- package/src/gen/policyimportexport/v1/policy_import_export_pb.ts +0 -332
- package/src/gen/shared/v1/shared_connect.ts +0 -61
- package/src/gen/shared/v1/shared_pb.ts +0 -240
- package/src/gen/shared/v2/shared_connect.ts +0 -39
- package/src/gen/shared/v2/shared_pb.ts +0 -122
- package/src/gen/tagging/pdp/v2/externalprocessors/processor_connect.ts +0 -156
- package/src/gen/tagging/pdp/v2/externalprocessors/processor_pb.ts +0 -709
- package/src/gen/tagging/pdp/v2/stanag/stanag_pb.ts +0 -953
- package/src/gen/tagging/pdp/v2/tagging_connect.ts +0 -73
- package/src/gen/tagging/pdp/v2/tagging_pb.ts +0 -1064
- package/src/gen/version/v1/version_connect.ts +0 -31
- package/src/gen/version/v1/version_pb.ts +0 -143
- package/src/gen/virtru/common/common_pb.ts +0 -201
- package/src/gen/virtru/policy/certificates/v1/certificates_connect.ts +0 -44
- package/src/gen/virtru/policy/certificates/v1/certificates_pb.ts +0 -305
- package/src/gen/virtru/policy/objects_pb.ts +0 -253
- package/src/gen/web-admin/v1/config_connect.ts +0 -52
- package/src/gen/web-admin/v1/config_pb.ts +0 -173
- package/src/index.ts +0 -62
- package/src/lib/client.ts +0 -90
- package/src/lib/consts.ts +0 -8
- package/src/lib/dsp.ts +0 -65
- package/src/lib/utils.test.ts +0 -412
- package/src/lib/utils.ts +0 -524
- package/src/vite-env.d.ts +0 -7
- package/temp/build/lint/_eslint-5eVG3S6w.json +0 -30
- package/temp/test/jest/haste-map-b055a9550e6d9f9b43d8ad29b1607278-49d19aee56a0732eca9c014a51272338-8710993d07b75a801b0956e67ffc46fa +0 -0
- package/tests/dsp-client.test.ts +0 -95
- package/tests/dsp.test.ts +0 -119
- package/tests/mocks/create-export-artifacts.ts +0 -16
- package/tests/mocks/tagging-pdp-tag.ts +0 -13
- package/tests/mocks/well-known-configuration.ts +0 -15
- package/tests/setup-msw.ts +0 -35
- package/tsconfig.json +0 -32
- package/update-protos.sh +0 -63
- package/vitest.config.ts +0 -32
package/tests/dsp.test.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Virtru Corporation. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { expect, test, vi, beforeEach } from 'vitest';
|
|
8
|
-
import { DSP } from '../src';
|
|
9
|
-
import { mockTaggingPDPResponse } from './mocks/tagging-pdp-tag';
|
|
10
|
-
import { type AuthProvider, HttpRequest, withHeaders } from '@opentdf/sdk';
|
|
11
|
-
import { mockWellKnownConfiguration } from './mocks/well-known-configuration';
|
|
12
|
-
|
|
13
|
-
const platformUrl = 'https://dsp.example.com';
|
|
14
|
-
|
|
15
|
-
// Mock fetch globally
|
|
16
|
-
const mockFetch = vi.fn();
|
|
17
|
-
global.fetch = mockFetch;
|
|
18
|
-
|
|
19
|
-
const authProvider = <AuthProvider>{
|
|
20
|
-
updateClientPublicKey: async () => {},
|
|
21
|
-
withCreds: async (req: HttpRequest): Promise<HttpRequest> =>
|
|
22
|
-
withHeaders(req, {
|
|
23
|
-
Authorization: 'Bearer dummy auth token for testing purposes',
|
|
24
|
-
}),
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
beforeEach(() => {
|
|
28
|
-
mockFetch.mockReset();
|
|
29
|
-
|
|
30
|
-
// Setup default mock responses
|
|
31
|
-
mockFetch.mockImplementation(async (url: string) => {
|
|
32
|
-
if (url.includes('/tagging.pdp.v2.TaggingPDPService/Tag')) {
|
|
33
|
-
return {
|
|
34
|
-
ok: true,
|
|
35
|
-
status: 200,
|
|
36
|
-
json: async () => mockTaggingPDPResponse(),
|
|
37
|
-
headers: new Headers({
|
|
38
|
-
'Content-Type': 'application/json',
|
|
39
|
-
}),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
url.includes(
|
|
45
|
-
'/wellknownconfiguration.WellKnownService/GetWellKnownConfiguration'
|
|
46
|
-
)
|
|
47
|
-
) {
|
|
48
|
-
return {
|
|
49
|
-
ok: true,
|
|
50
|
-
status: 200,
|
|
51
|
-
json: async () => mockWellKnownConfiguration(),
|
|
52
|
-
headers: new Headers({
|
|
53
|
-
'Content-Type': 'application/json',
|
|
54
|
-
}),
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
ok: false,
|
|
60
|
-
status: 404,
|
|
61
|
-
json: async () => ({}),
|
|
62
|
-
headers: new Headers(),
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
test('should create a new DSP instance with platformUrl', () => {
|
|
68
|
-
const dsp = new DSP({ platformUrl, authProvider });
|
|
69
|
-
expect(dsp).toBeInstanceOf(DSP);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
test('should throw an error if platformUrl is not provided', () => {
|
|
73
|
-
expect(() => new DSP({ authProvider } as never)).toThrowError(
|
|
74
|
-
'platformUrl is required for DSP client'
|
|
75
|
-
);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
test('should create a new DSP instance with platformUrl and authProvider', () => {
|
|
79
|
-
const dsp = new DSP({ platformUrl, authProvider });
|
|
80
|
-
expect(dsp).toBeInstanceOf(DSP);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
test('should perform RPC calls using the DSP client service', async () => {
|
|
84
|
-
const dsp = new DSP({ platformUrl, authProvider });
|
|
85
|
-
const result = await dsp.services.v2.taggingPDPService.tag({});
|
|
86
|
-
expect(result.$typeName).toBe('tagging.pdp.v2.TaggingPDPResponse');
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
test('should perform RPC calls via internal PlatformClient service', async () => {
|
|
90
|
-
const dsp = new DSP({ platformUrl, authProvider });
|
|
91
|
-
const result = await dsp.services.v1.wellknown.getWellKnownConfiguration({});
|
|
92
|
-
expect(result.$typeName).toBe(
|
|
93
|
-
'wellknownconfiguration.GetWellKnownConfigurationResponse'
|
|
94
|
-
);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
test('should use provided interceptors when making RPC calls', async () => {
|
|
98
|
-
const mockInterceptor = vi.fn((next) => next);
|
|
99
|
-
const dsp = new DSP({
|
|
100
|
-
platformUrl,
|
|
101
|
-
authProvider,
|
|
102
|
-
interceptors: [mockInterceptor],
|
|
103
|
-
});
|
|
104
|
-
await dsp.services.v2.taggingPDPService.tag({});
|
|
105
|
-
expect(mockInterceptor).toHaveBeenCalled();
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
test('should expose expected service structure', () => {
|
|
109
|
-
const dsp = new DSP({ platformUrl, authProvider });
|
|
110
|
-
expect(dsp.services).toHaveProperty('v1');
|
|
111
|
-
expect(dsp.services.v2).toHaveProperty('taggingPDPService');
|
|
112
|
-
expect(dsp.services.v1).toHaveProperty('wellknown');
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
test('should throw if authProvider is missing', () => {
|
|
116
|
-
expect(() => new DSP({ platformUrl } as never)).toThrowError(
|
|
117
|
-
'Client ID or custom AuthProvider must be defined'
|
|
118
|
-
);
|
|
119
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Virtru Corporation. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { type CreateExportArtifactsResponse } from '@src/gen/policyimportexport/v1/policy_import_export_pb';
|
|
8
|
-
|
|
9
|
-
export const mockCreateExportArtifactsResponse =
|
|
10
|
-
(): CreateExportArtifactsResponse => ({
|
|
11
|
-
$typeName: 'policyimportexport.v1.CreateExportArtifactsResponse',
|
|
12
|
-
artifact: {
|
|
13
|
-
case: undefined,
|
|
14
|
-
value: undefined,
|
|
15
|
-
},
|
|
16
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Virtru Corporation. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { type TaggingPDPResponse } from '@src/gen/tagging/pdp/v2/tagging_pb';
|
|
8
|
-
|
|
9
|
-
export const mockTaggingPDPResponse = (): TaggingPDPResponse => ({
|
|
10
|
-
$typeName: 'tagging.pdp.v2.TaggingPDPResponse',
|
|
11
|
-
events: [],
|
|
12
|
-
tags: [],
|
|
13
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Virtru Corporation. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { type GetWellKnownConfigurationResponse } from '@opentdf/sdk/platform/wellknownconfiguration/wellknown_configuration_pb.js';
|
|
8
|
-
|
|
9
|
-
export const mockWellKnownConfiguration =
|
|
10
|
-
(): GetWellKnownConfigurationResponse => ({
|
|
11
|
-
$typeName: 'wellknownconfiguration.GetWellKnownConfigurationResponse',
|
|
12
|
-
configuration: {
|
|
13
|
-
wellKnown: {},
|
|
14
|
-
},
|
|
15
|
-
});
|
package/tests/setup-msw.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Virtru Corporation. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { type SetupWorker, setupWorker } from 'msw/browser';
|
|
8
|
-
import { beforeAll, afterEach, afterAll } from 'vitest';
|
|
9
|
-
import { HttpHandler } from 'msw';
|
|
10
|
-
|
|
11
|
-
let worker: SetupWorker | undefined;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Sets up the MSW (Mock Service Worker) for testing.
|
|
15
|
-
*
|
|
16
|
-
* @param handlers - An array of HTTP handlers to be used with MSW.
|
|
17
|
-
* @returns The MSW worker instance.
|
|
18
|
-
*/
|
|
19
|
-
export function setupMSW(handlers: HttpHandler[]): SetupWorker | undefined {
|
|
20
|
-
if (!worker) {
|
|
21
|
-
worker = setupWorker(...handlers);
|
|
22
|
-
|
|
23
|
-
beforeAll(async () => {
|
|
24
|
-
await worker!.start();
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
afterEach(() => worker!.resetHandlers());
|
|
28
|
-
afterAll(() => worker!.stop());
|
|
29
|
-
} else {
|
|
30
|
-
// If worker already exists, just update handlers
|
|
31
|
-
worker.resetHandlers(...handlers);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return worker;
|
|
35
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"baseUrl": ".",
|
|
9
|
-
"paths": {
|
|
10
|
-
"@src/*": ["src/*"]
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
/* Bundler mode */
|
|
14
|
-
"moduleResolution": "bundler",
|
|
15
|
-
"allowImportingTsExtensions": false,
|
|
16
|
-
"verbatimModuleSyntax": true,
|
|
17
|
-
"moduleDetection": "force",
|
|
18
|
-
"noEmit": false,
|
|
19
|
-
"declaration": true,
|
|
20
|
-
"outDir": "dist",
|
|
21
|
-
"emitDeclarationOnly": false,
|
|
22
|
-
|
|
23
|
-
/* Linting */
|
|
24
|
-
"strict": true,
|
|
25
|
-
"noUnusedLocals": true,
|
|
26
|
-
"noUnusedParameters": true,
|
|
27
|
-
// "erasableSyntaxOnly": false,
|
|
28
|
-
"noFallthroughCasesInSwitch": true
|
|
29
|
-
// "noUncheckedSideEffectImports": true
|
|
30
|
-
},
|
|
31
|
-
"include": ["tests"]
|
|
32
|
-
}
|
package/update-protos.sh
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -e
|
|
4
|
-
|
|
5
|
-
REPO_URL="git@github.com:virtru-corp/data-security-platform.git"
|
|
6
|
-
CLONE_DIR=".dsp"
|
|
7
|
-
DEST_DIR="src/gen/"
|
|
8
|
-
FILES_TO_COPY="sdk_web/src/gen/"
|
|
9
|
-
|
|
10
|
-
echo "Cloning repository..."
|
|
11
|
-
if test -d "$CLONE_DIR"; then
|
|
12
|
-
echo "Repo exists? Try: rm -rf '$CLONE_DIR'"
|
|
13
|
-
exit 1
|
|
14
|
-
fi
|
|
15
|
-
git clone --depth=1 "$REPO_URL" "$CLONE_DIR"
|
|
16
|
-
|
|
17
|
-
echo "Updating repo buf.gen.yaml to generate for dsp-sdk..."
|
|
18
|
-
echo >>"$CLONE_DIR/buf.gen.yaml"
|
|
19
|
-
# Copy buf.gen.yaml over to our cloned reposiroty, modifying it to output to our src/gen/ directory
|
|
20
|
-
sed '1,/plugins:/d' buf.gen.yaml | sed 's# src/gen# ../src/gen#' >>"$CLONE_DIR/buf.gen.yaml"
|
|
21
|
-
|
|
22
|
-
pushd "$CLONE_DIR"
|
|
23
|
-
|
|
24
|
-
echo "Generating protos..."
|
|
25
|
-
make proto-generate
|
|
26
|
-
|
|
27
|
-
popd
|
|
28
|
-
|
|
29
|
-
echo "Removing repo..."
|
|
30
|
-
rm -rf "$CLONE_DIR"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
echo "Prepending copyright headers to TypeScript files..."
|
|
34
|
-
VIRTRU_LICENSE=$(cat <<EOF
|
|
35
|
-
/*
|
|
36
|
-
* Copyright (c) Virtru Corporation. All rights reserved.
|
|
37
|
-
*
|
|
38
|
-
* Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
|
|
39
|
-
*/
|
|
40
|
-
EOF
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
# Find all .ts files and loop through them
|
|
44
|
-
git status --porcelain | grep -E '(M|A)' | cut -b 4- | sed "s#^#$(git rev-parse --show-toplevel)/#" | sed "s#^$(pwd)/##" | sort | uniq | grep "$DEST_DIR" | while read -r ts_file; do
|
|
45
|
-
echo "Processing $ts_file..."
|
|
46
|
-
TMPFILE="${ts_file}.tmp"
|
|
47
|
-
|
|
48
|
-
# Prepend header: Concatenate header + original file -> temp file, then move back
|
|
49
|
-
rm -f "$TMPFILE"
|
|
50
|
-
touch "$TMPFILE"
|
|
51
|
-
echo "$VIRTRU_LICENSE" >$TMPFILE
|
|
52
|
-
echo >>$TMPFILE
|
|
53
|
-
cat "$ts_file" >>"$TMPFILE"
|
|
54
|
-
mv "$TMPFILE" "$ts_file"
|
|
55
|
-
done
|
|
56
|
-
|
|
57
|
-
echo "Re-adding to stage, for prettier..."
|
|
58
|
-
git add src/gen
|
|
59
|
-
|
|
60
|
-
echo "Running prettier..."
|
|
61
|
-
rush prettier
|
|
62
|
-
|
|
63
|
-
echo "Protos updated successfully!"
|
package/vitest.config.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Virtru Corporation. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { defineConfig } from 'vitest/config';
|
|
8
|
-
import path from 'path';
|
|
9
|
-
|
|
10
|
-
export default defineConfig({
|
|
11
|
-
plugins: [],
|
|
12
|
-
test: {
|
|
13
|
-
environment: 'jsdom',
|
|
14
|
-
globals: true,
|
|
15
|
-
setupFiles: [],
|
|
16
|
-
include: ['tests/**/*.test.ts', 'src/**/*.test.ts'],
|
|
17
|
-
},
|
|
18
|
-
build: {
|
|
19
|
-
outDir: 'dist',
|
|
20
|
-
},
|
|
21
|
-
resolve: {
|
|
22
|
-
alias: {
|
|
23
|
-
'@src': path.resolve(__dirname, 'src'),
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
define: {
|
|
27
|
-
global: {},
|
|
28
|
-
process: {
|
|
29
|
-
env: {},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
});
|