Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"datasourceTemplate": "npm",
"depNameTemplate": "@biomejs/biome",
"fileMatch": ["(^|/)biome.jsonc?$"],
"matchStrings": ["\"https://biomejs.dev/schemas/(?<currentValue>[^\"]+)/schema.json\""]
"matchStrings": [
"\"https://biomejs.dev/schemas/(?<currentValue>[^\"]+)/schema.json\""
]
}
],
"packageRules": [],
Expand Down
18 changes: 9 additions & 9 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('action', () => {
expect(execMock).toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['status']);

expect(errorMock).not.toHaveBeenCalled();
}, 30000);
}, 30_000);

it('handles auto-connect when using a personal access token', async () => {
getInputMock.mockImplementation((name) => {
Expand Down Expand Up @@ -117,7 +117,7 @@ describe('action', () => {
expect(execMock).toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['login', '-a']);
expect(execMock).toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['connect', '-a']);
expect(execMock).toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['status']);
}, 30000);
}, 30_000);

it('does not login but still connects when using an application access token with auto-connect', async () => {
getInputMock.mockImplementation((name) => {
Expand Down Expand Up @@ -147,7 +147,7 @@ describe('action', () => {
expect(execMock).not.toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['login', '-a']);
expect(execMock).toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['connect', '-a']);
expect(execMock).toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['status']);
}, 30000);
}, 30_000);

it('sets environment variables when provided', async () => {
getInputMock.mockImplementation((name) => {
Expand All @@ -172,7 +172,7 @@ describe('action', () => {
expect(process.env.SETTLEMINT_INSTANCE).toBe('test-instance');
expect(process.env.SETTLEMINT_WORKSPACE).toBe('test-workspace');
expect(process.env.SETTLEMINT_ACCESS_TOKEN).toBe('sm_app_1234567890');
}, 30000);
}, 30_000);

it('validates version format', async () => {
getInputMock.mockImplementation((name) => {
Expand All @@ -190,7 +190,7 @@ describe('action', () => {
expect(_setFailedMock).toHaveBeenCalledWith(
"Invalid version format: invalid-version. Must be a valid semver version or 'latest'"
);
}, 30000);
}, 30_000);

it('handles command injection attempts', async () => {
getInputMock.mockImplementation((name) => {
Expand All @@ -210,7 +210,7 @@ describe('action', () => {
expect(_setFailedMock).toHaveBeenCalledWith(
'Failed to execute command: Error: Command contains potentially dangerous characters. Please use simple commands only.'
);
}, 30000);
}, 30_000);

it('supports standalone mode without access token', async () => {
getInputMock.mockImplementation((name) => {
Expand All @@ -234,7 +234,7 @@ describe('action', () => {
expect(execMock).not.toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['login', '-a']);
expect(execMock).not.toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['connect', '-a']);
expect(execMock).toHaveBeenCalledWith('npx -y @settlemint/sdk-cli@latest', ['status']);
}, 30000);
}, 30_000);

it('requires access token when not in standalone mode', async () => {
getInputMock.mockImplementation((name) => {
Expand All @@ -254,7 +254,7 @@ describe('action', () => {

await main.run();
expect(_setFailedMock).toHaveBeenCalledWith('access-token is required when not in standalone or local mode');
}, 30000);
}, 30_000);

it('processes dotEnvFile content', async () => {
getInputMock.mockImplementation((name) => {
Expand All @@ -278,5 +278,5 @@ describe('action', () => {
expect(exportVariableMock).toHaveBeenCalledWith('TEST_VAR', 'test_value');
expect(exportVariableMock).toHaveBeenCalledWith('QUOTED', 'quoted value');
expect(exportVariableMock).toHaveBeenCalledWith('VAR_WITH_EQUALS', 'key=value');
}, 30000);
}, 30_000);
});
43 changes: 26 additions & 17 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["ultracite"],
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"files": {
"ignore": [".vscode/", "dist/"]
"includes": ["**", "!.vscode", "!dist"]
},
"linter": {
"enabled": true,
"rules": {
"style": {
"noNonNullAssertion": "off",
"useNamingConvention": "off"
"noNonNullAssertion": "off"
},
"nursery": {
"noSecrets": "off"
"performance": {
"noNamespaceImport": "off"
}
}
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"attributePosition": "auto",
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120
},
"javascript": {
"formatter": {
"lineWidth": 120
},
"globals": ["jest", "describe", "it", "beforeEach", "afterEach", "expect"]
},
"css": {
"formatter": {
"lineWidth": 120
}
},
"json": {
"formatter": {
"lineWidth": 120
}
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}
}
6 changes: 3 additions & 3 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading