Skip to content

Commit 19c2c93

Browse files
authored
move lunadefend into folder (lunasec-io#696)
* move lunadefend into folder * add required dependencies * lunadefend unit tests locally work correctly * refactor github workflows to be more descriptive * fix docs build * update package json to have correct paths * update workflow Former-commit-id: 50d9854 Former-commit-id: f61cd5f3ae406adac950b9bfc720acf97668e7cf
1 parent ea8dfa0 commit 19c2c93

File tree

453 files changed

+6511
-5766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

453 files changed

+6511
-5766
lines changed

.eslintrc.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ module.exports = {
5454
ecmaVersion: 12,
5555
sourceType: 'module',
5656
project: [
57-
'js/sdks/packages/vue-sdk/tsconfig.json',
58-
'js/sdks/tsconfig.json',
57+
'lunadefend/js/sdks/packages/vue-sdk/tsconfig.json',
58+
'lunadefend/js/sdks/tsconfig.json',
5959
'lunadefend/js/demo-apps/packages/demo-back-end/tsconfig.json',
6060
'lunadefend/js/demo-apps/packages/react-front-end/tsconfig.json',
61-
'js/internal-infrastructure/metrics-server-backend/tsconfig.json',
62-
'js/internal-infrastructure/s3-redirect-generator/tsconfig.json',
61+
'lunadefend/js/internal-infrastructure/metrics-server-backend/tsconfig.json',
62+
'lunadefend/js/internal-infrastructure/s3-redirect-generator/tsconfig.json',
6363
'lunatrace/bsl/common/tsconfig.json',
6464
'lunatrace/bsl/frontend/tsconfig.json',
6565
'lunatrace/bsl/backend-cdk/tsconfig.json',

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ docs/** linguist-documentation
22
.yarn/** linguist-vendored
33

44
# Inventory of Generated Files. Some may be ignored.
5-
js/sdks/packages/tokenizer-sdk/src/generated/** linguist-generated merge=ours
5+
lunadefend/js/sdks/packages/tokenizer-sdk/src/generated/** linguist-generated merge=ours
66
lunatrace/schema.graphql linguist-generated merge=ours
77
lunatrace/bsl/backend/src/github/api/generated.ts linguist-generated merge=ours
88
lunatrace/bsl/backend/src/graphql-yoga/generated-resolver-types.ts linguist-generated merge=ours

.github/workflows/go.yaml .github/workflows/check-go-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Go
1+
name: Check Go Build
22

33
# This workflow posts hasura changes as a comment.
44
on:

.github/workflows/check-deps.yaml .github/workflows/check-yarn-dependencies.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
name: Check Dependencies
15+
name: Check Yarn Dependencies
1616

1717
# This workflow checks to make sure that all dependency binaries are valid, to prevent a sneaky commit doing something malicious
1818
on:

.github/workflows/documentation.yaml .github/workflows/documentation-release.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
name: documentation
15+
name: Documentation Build and Release
1616

1717
on:
1818
push:
@@ -56,7 +56,7 @@ jobs:
5656
yarn compile:dev:infrastructure
5757
5858
- name: Build Repo
59-
working-directory: js/sdks
59+
working-directory: lunadefend/js/sdks
6060
run: yarn compile:release
6161
# - name: Set env.BRANCH
6262
# run: echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3 | cut -d'-' -f 2)" >> $GITHUB_ENV

.github/workflows/integration.yaml .github/workflows/lunadefend/integration.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ on:
2121
pull_request:
2222
branches: ['**', '**']
2323
paths:
24-
- .disabled
24+
#- '.github/**'
25+
- 'lunadefend/**'
2526

2627
push:
2728
branches: [master]
2829
paths:
29-
- .disabled
30+
#- '.github/**'
31+
- 'lunadefend/**'
3032

3133
# Allows you to run this workflow manually from the Actions tab
3234
workflow_dispatch:
File renamed without changes.

.github/workflows/release.yml .github/workflows/lunadefend/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
name: LunaSec Release
15+
name: LunaDefend Release
1616

1717
on:
1818
workflow_dispatch:

.github/workflows/guides.yaml .github/workflows/lunatrace/guides-release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
name: guides
15+
name: LunaTrace Guides Release
1616

1717
on:
1818
push:

.github/workflows/lunatrace.yaml .github/workflows/lunatrace/integration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: LunaTrace
1+
name: LunaTrace Integration Test
22

33
# This workflow posts hasura changes as a comment.
44
on:

.idea/lunasec-monorepo.iml

+15-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CODEOWNERS

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ lunatrace/bsl/logger @factoidforrest
88
.github/ @factoidforrest @freeqaz
99

1010
# Chris
11-
lunatrace/bsl/backend-cdk
12-
13-
# Gabe
14-
docs/ @G00b
11+
lunatrace/bsl/backend-cdk @breadchris
12+
lunatrace/cli @breadchris
13+
docs/blog @breadchris
1514

1615

1716
# CODEOWNERS DOCUMENTATION AND EXAMPLES BELOW ---------------------------------------------------------------------

docs/blog/2021-11-02-our-ci-setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ We looked around at other big projects like ours and saw that some of them use m
6666
That's okay, but we wanted more programmatic control over Docker Compose, so we wrote a script that generates the YAML file.
6767

6868
We (okay, it was my very smart coworker) even generated
69-
[typescript types](https://github.com/lunasec-io/lunasec/blob/master/js/sdks/packages/cli/src/docker-compose/docker-compose-types.ts)
69+
[typescript types](https://github.com/lunasec-io/lunasec/blob/master/lunadefend/js/sdks/packages/cli/src/docker-compose/docker-compose-types.ts)
7070
for the YAML file from the official JSON Schema definition.
7171

72-
[Here's the code](https://github.com/lunasec-io/lunasec/blob/master/js/sdks/packages/cli/src/docker-compose/lunasec-stack.ts)
72+
[Here's the code](https://github.com/lunasec-io/lunasec/blob/master/lunadefend/js/sdks/packages/cli/src/docker-compose/lunasec-stack.ts)
7373
that handles generating the `docker-compose.yaml`. As you can see, it's pretty darn clean, with each container represented as a function that returns
7474
a config object. I work with some smart folks. Hopefully someday Docker Compose (or something similar) is going to
7575
expose a JS SDK we can call to set up the cluster programmatically,

docs/docusaurus.config.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ module.exports = {
7272
'docusaurus-plugin-typedoc',
7373
{
7474
id: 'typedoc-react-sdk',
75-
entryPoints: ['../js/sdks/packages/react-sdk/src/types/component-types.ts'],
75+
entryPoints: ['../lunadefend/js/sdks/packages/react-sdk/src/types/component-types.ts'],
7676
defaultCategory:'Component',
77-
tsconfig: '../js/sdks/packages/react-sdk/tsconfig.json',
77+
tsconfig: '../lunadefend/js/sdks/packages/react-sdk/tsconfig.json',
7878
watch: process.env.TYPEDOC_WATCH,
7979
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
8080
docsRoot: 'pages',
@@ -91,8 +91,8 @@ module.exports = {
9191
'docusaurus-plugin-typedoc',
9292
{
9393
id: 'typedoc-node-sdk',
94-
entryPoints: ['../js/sdks/packages/node-sdk/src/index.ts'],
95-
tsconfig: '../js/sdks/packages/node-sdk/tsconfig.json',
94+
entryPoints: ['../lunadefend/js/sdks/packages/node-sdk/src/index.ts'],
95+
tsconfig: '../lunadefend/js/sdks/packages/node-sdk/tsconfig.json',
9696
watch: process.env.TYPEDOC_WATCH,
9797
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
9898
docsRoot: 'pages',
@@ -109,8 +109,8 @@ module.exports = {
109109
'docusaurus-plugin-typedoc',
110110
{
111111
id: 'typedoc-tokenizer',
112-
entryPoints: ['../js/sdks/packages/tokenizer-sdk/src/index.ts'],
113-
tsconfig: '../js/sdks/packages/tokenizer-sdk/tsconfig.json',
112+
entryPoints: ['../lunadefend/js/sdks/packages/tokenizer-sdk/src/index.ts'],
113+
tsconfig: '../lunadefend/js/sdks/packages/tokenizer-sdk/tsconfig.json',
114114
watch: process.env.TYPEDOC_WATCH,
115115
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
116116
docsRoot: 'pages',
@@ -128,8 +128,8 @@ module.exports = {
128128
'docusaurus-plugin-typedoc',
129129
{
130130
id: 'typedoc-cli',
131-
entryPoints: ['../js/sdks/packages/cli/src/config/types.ts'],
132-
tsconfig: '../js/sdks/packages/cli/tsconfig.json',
131+
entryPoints: ['../lunadefend/js/sdks/packages/cli/src/config/types.ts'],
132+
tsconfig: '../lunadefend/js/sdks/packages/cli/tsconfig.json',
133133
watch: process.env.TYPEDOC_WATCH,
134134
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
135135
docsRoot: 'pages',
@@ -173,15 +173,15 @@ module.exports = {
173173
items: [
174174
{
175175
type: 'doc',
176-
docId: 'lunadefend/overview/introduction',
176+
docId: 'lunatrace/overview/introduction',
177177
position: 'left',
178-
label: 'LunaDefend'
178+
label: 'LunaTrace'
179179
},
180-
{
180+
{
181181
type: 'doc',
182-
docId: 'lunatrace/overview/introduction',
182+
docId: 'lunadefend/overview/introduction',
183183
position: 'left',
184-
label: 'LunaTrace'
184+
label: 'LunaDefend'
185185
},
186186
{
187187
to: '/docs/blog',

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"clear": "docusaurus clear",
1616
"write-translations": "docusaurus write-translations",
1717
"write-heading-ids": "docusaurus write-heading-ids",
18-
"openapi:generate": "redoc-cli bundle ../api-spec/schema/full-tokenizer.yaml --output static/tokenizer-api-spec-static/index.html"
18+
"openapi:generate": "redoc-cli bundle ../lunadefend/api-spec/schema/full-tokenizer.yaml --output static/tokenizer-api-spec-static/index.html"
1919
},
2020
"dependencies": {
2121
"@docusaurus/core": "2.0.0-beta.9",

docs/pages/lunadefend/cli/deploy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sidebar_position: 3
2323
LunaDefend can be deployed to AWS using the LunaDefend CLI, available in the `@lunasec/cli` npm package. More information on installing and using the CLI can be
2424
found in the [Getting Started Guide](/pages/lunadefend/getting-started/dedicated-tokenizer/introduction)
2525

26-
The deploy command configures a deployment by reading the closest `lunasec.js` file to the current directory. The CLI tool will
26+
The deploy command configures a deployment by reading the closest `lunadefend.js` file to the current directory. The CLI tool will
2727
recursively search in parent directories for this file until it gets to the root of the file system.
2828

2929
For a standard deployment of LunaDefend, you will only need to specify:

docs/pages/lunadefend/deployment/analytics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = {
4848
}
4949
}
5050
```
51-
in your `lunasec.json` config before LunaDefend is deployed. Setting this flag will disable deploying the Lambda that collects metrics every
51+
in your `lunadefend.js` config before LunaDefend is deployed. Setting this flag will disable deploying the Lambda that collects metrics every
5252
24 hours.
5353

5454
Regardless, thank you for using LunaDefend and helping to improve the security of software across the world. We really

docs/pages/lunadefend/deployment/deploy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In order to deploy LunaDefend into your infrastructure, you are going to need tw
2929

3030
The CLI can be installed via NPM, as described in the [getting started guide](/pages/lunadefend/getting-started/dedicated-tokenizer/introduction/#cli).
3131

32-
The LunaDefend CLI tool needs a configuration file which reflects your infrastructure. To do this, create the file (or add to your existing) `lunasec.js`
32+
The LunaDefend CLI tool needs a configuration file which reflects your infrastructure. To do this, create the file (or add to your existing) `lunadefend.js`
3333
and put this as its contents:
3434
```js
3535
module.exports = {

docs/pages/lunadefend/getting-started/dedicated-tokenizer/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ lunasec --version
5454
```
5555
and we should see that the CLI is installed.
5656

57-
The LunaDefend CLI needs to be configured to know where your application's front and back end are. To do this, in the root of your repository create the file `lunasec.js` with the contents:
57+
The LunaDefend CLI needs to be configured to know where your application's front and back end are. To do this, in the root of your repository create the file `lunadefend.js` with the contents:
5858
```js
5959
module.exports = {
6060
development: {

docs/pages/lunadefend/how-it-works/grants.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ applications that might need to detokenize a token more than 15 minutes after it
3636
[can be customized](/pages/lunadefend/node-sdk/classes/Grants/)
3737
during creation if you find that you need a longer duration, up to your configured maximum.
3838

39-
The default duration and maximum duration can be configured in your `lunasec.js` [config file](/pages/lunadefend/cli-config/interfaces/DeploymentConfigOptions/),
39+
The default duration and maximum duration can be configured in your `lunadefend.js` [config file](/pages/lunadefend/cli-config/interfaces/DeploymentConfigOptions/),
4040
in the grants options.
4141

4242
### Alternatives

0 commit comments

Comments
 (0)