1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const path = require("path");
|
4 | class LocationProvider {
|
5 | constructor() {
|
6 | this.integrationRoot = process.cwd();
|
7 | this.bearerDir = path.join(this.integrationRoot, '.bearer');
|
8 | }
|
9 | integrationRootResourcePath(filename) {
|
10 | return path.join(this.integrationRoot, filename);
|
11 | }
|
12 |
|
13 | get srcViewsDir() {
|
14 | return path.join(this.integrationRoot, 'views');
|
15 | }
|
16 | srcViewsDirResource(name) {
|
17 | return path.join(this.srcViewsDir, name);
|
18 | }
|
19 |
|
20 | get srcFunctionsDir() {
|
21 | return path.join(this.integrationRoot, 'functions');
|
22 | }
|
23 | buildViewsResourcePath(resource) {
|
24 | return path.join(this.buildViewsDir, resource);
|
25 | }
|
26 |
|
27 | get buildViewsDir() {
|
28 | return path.join(this.bearerDir, 'views');
|
29 | }
|
30 |
|
31 | get buildViewsComponentsDir() {
|
32 | return path.join(this.buildViewsDir, 'src');
|
33 | }
|
34 |
|
35 | get buildTmpDir() {
|
36 | return path.join(this.bearerDir, 'tmp');
|
37 | }
|
38 |
|
39 | get buildFunctionsDir() {
|
40 | return path.join(this.bearerDir, 'functions');
|
41 | }
|
42 | buildFunctionsResourcePath(resource) {
|
43 | return path.join(this.buildFunctionsDir, resource);
|
44 | }
|
45 | get buildArtifactDir() {
|
46 | return path.join(this.bearerDir, 'artifacts');
|
47 | }
|
48 | buildArtifactResourcePath(resource) {
|
49 | return path.join(this.buildArtifactDir, resource);
|
50 | }
|
51 | get authConfigPath() {
|
52 | return this.integrationRootResourcePath('auth.config.json');
|
53 | }
|
54 | get localConfigPath() {
|
55 | return this.integrationRootResourcePath('local.config.jsonc');
|
56 | }
|
57 | }
|
58 | exports.default = LocationProvider;
|