-
Notifications
You must be signed in to change notification settings - Fork 587
/
Makefile
92 lines (74 loc) · 2.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# This is the public Makefile containing some build commands.
# You can implement some additional personal commands such as login and sync in Makefile.private.mk (unversioned).
# fetch AWS testing credentials
login:
make -f Makefile.private.mk login
# Sync your development fork with upstream.
# Recommended contents:
# gh repo sync {your_github_account_name}/aws-sdk-js-v3 -b main
# git fetch --all
sync:
make -f Makefile.private.mk sync
test-unit: build-s3-browser-bundle
yarn g:vitest run -c vitest.config.ts
yarn g:vitest run -c vitest.config.browser.ts
yarn g:vitest run -c vitest.config.clients.unit.ts
npx jest -c jest.config.js
# typecheck for test code.
test-types:
npx tsc -p tsconfig.test.json
test-protocols: build-s3-browser-bundle
yarn g:vitest run -c vitest.config.protocols.integ.ts
test-integration: build-s3-browser-bundle
rm -rf ./clients/client-sso/node_modules/\@smithy # todo(yarn) incompatible redundant nesting.
yarn g:vitest run -c vitest.config.integ.ts
npx jest -c jest.config.integ.js
make test-protocols;
make test-types;
test-e2e: build-s3-browser-bundle
yarn g:vitest run -c vitest.config.e2e.ts --retry=4
yarn g:vitest run -c vitest.config.browser.e2e.ts --retry=4
build-s3-browser-bundle:
node ./clients/client-s3/test/browser-build/esbuild
# removes nested node_modules folders
clean-nested:
rm -rf ./lib/*/node_modules
rm -rf ./packages/*/node_modules
rm -rf ./clients/*/node_modules
rm -rf ./private/*/node_modules
link-smithy:
rm -rf ./node_modules/\@smithy
ln -s ../../smithy-typescript/packages/ ./node_modules/\@smithy
unlink-smithy:
rm ./node_modules/\@smithy
yarn --check-files
copy-smithy:
node ./scripts/copy-smithy-dist-files
gen-auth:
node ./scripts/cli-dispatcher client sso - gen;
node ./scripts/cli-dispatcher client sts - gen;
node ./scripts/cli-dispatcher client sso-oidc - gen;
node ./scripts/cli-dispatcher client cognito identity - gen;
b-auth:
node ./scripts/cli-dispatcher client sso - deps;
node ./scripts/cli-dispatcher client sts - b;
node ./scripts/cli-dispatcher client sso-oidc - b;
node ./scripts/cli-dispatcher client cognito identity - b;
# Runs build for all packages using Turborepo
turbo-build:
(cd scripts/remote-cache && yarn)
node scripts/remote-cache/ start&
sleep 3
npx turbo run build --api="http://localhost:3000" --team="aws-sdk-js" --token="xyz"
node scripts/remote-cache/ stop
# run turbo build for packages only.
tpk:
npx turbo run build --filter='./packages/*'
# Clears the Turborepo local build cache
turbo-clean:
@read -p "Are you sure you want to delete your local cache? [y/N]: " ans && [ $${ans:-N} = y ]
@echo "\nDeleted cache folders: \n--------"
@find . -name '.turbo' -type d -prune -print -exec rm -rf '{}' + && echo '\n'
server-protocols:
yarn generate-clients -s
yarn test:server-protocols