Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: morph script to update secrets v1 #4123

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"stacktrace-parser": "^0.1.10",
"statsd-client": "^0.4.7",
"truncate-utf8-bytes": "^1.0.2",
"ts-morph": "^25.0.1",
"ua-parser-js": "^1.0.37",
"unset-value": "^2.0.1",
"uuid": "^9.0.1",
Expand Down
18 changes: 18 additions & 0 deletions test/integrations/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,3 +623,21 @@ export const generateGoogleOAuthMetadata = (jobId: number): any => {
dontBatch: false,
};
};

/**
* Constants for test files
* This file contains constants used in test files to avoid hardcoded values
*/

// Dummy secret value to be used in place of actual API keys, tokens, etc.
export const DUMMY_SECRET = 'DUMMY_SECRET_VALUE';

// Function to base64 encode a string for Basic auth
export const basicEncoded = (string: string, repeat: number = 1): string => {
if (repeat == 1) {
return Buffer.from(string).toString('base64');
} else {
const strings = Array(repeat).fill(string);
return Buffer.from(strings.join(':')).toString('base64');
}
};
11 changes: 11 additions & 0 deletions test/scripts/morph copy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Track replacements
let replacements: Map<
string,
{
type: string;
value: string;
secrets: string[];
variableNames: string[];
token: string;
}
>;
Loading
Loading