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

sf-pack v1.1 #13

Merged
merged 6 commits into from
Jan 14, 2025
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cjs/
17 changes: 6 additions & 11 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
module.exports = {
extends: ['eslint-config-salesforce-typescript', 'plugin:sf-plugin/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: [
'./packages/**/tsconfig.json',
'./packages/**/test/tsconfig.json',
'./tsconfig.json',
'./test/tsconfig.json',
],
sourceType: 'module',
},
// ignorePatterns: ["test/**/*.ts"],
root: true,
rules: {
header: 'off',
'@typescript-eslint/quotes': [
'error',
'single',
Expand All @@ -22,11 +13,15 @@ module.exports = {
],

// Lots of 'any' in the code
'import/no-extraneous-dependencies': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'sf-plugin/only-extend-SfCommand': 0,
'no-param-reassign': 0,
'class-methods-use-this': 0,
'arrow-body-style': 0,
'no-await-in-loop': 0,
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"require": "ts-node/register,source-map-support/register",
"require": ["ts-node/register"],
"watch-extensions": "ts",
"recursive": true,
"reporter": "spec",
"timeout": 5000
"timeout": 600000,
"node-option": ["loader=ts-node/esm"]
}
8 changes: 4 additions & 4 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"check-coverage": true,
"lines": 25,
"statements": 25,
"functions": 25,
"branches": 25
"lines": 50,
"statements": 50,
"functions": 50,
"branches": 50
}
5 changes: 5 additions & 0 deletions .sfdevrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"test": {
"testsPath": "test/**/*.test.ts"
},
"wireit": {
"test": {
"dependencies": ["test:compile", "test:only", "lint"]
}
}
}
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,23 @@
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Compile tests"
},
{
"type": "node",
"request": "launch",
"name": "Debug All",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-r",
"ts-node/register",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/test/**/*.test.ts",
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"preLaunchTask": "Compile tests"
}
]
}
57 changes: 1 addition & 56 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,63 +14,8 @@
"focus": false,
"panel": "dedicated"
},
"args": [
"run",
"test:compile"
],
"args": ["run", "test:compile"],
"isBackground": false
},
{
"label": "Run Current Test",
"group": {
"kind": "build",
"isDefault": true
},
"command": "yarn",
"type": "shell",
"presentation": {
"focus": false,
"panel": "dedicated"
},
"args": [
"run",
"nyc",
"--reporter=html",
"--reporter=text",
"mocha",
"'${file}'"
],
"isBackground": false
},
{
"label": "Run All Tests",
"group": {
"kind": "build",
"isDefault": true
},
"command": "yarn",
"type": "shell",
"presentation": {
"focus": false,
"panel": "dedicated"
},
"args": [
"run",
"nyc",
"--reporter=html",
"--reporter=text",
"mocha",
"'test/**/*.test.ts'"
],
"isBackground": false
},
{
"type": "npm",
"script": "build",
"group": "build",
"problemMatcher": [],
"label": "npm: build",
"detail": "sf-build"
}
]
}
21 changes: 0 additions & 21 deletions bin/dev

This file was deleted.

4 changes: 2 additions & 2 deletions bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off
set NODE_ENV=development
node "%~dp0\dev" %*

node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
8 changes: 8 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
// eslint-disable-next-line node/shebang
async function main() {
const { execute } = await import('@oclif/core');
await execute({ development: true, dir: import.meta.url });
}

await main();
3 changes: 0 additions & 3 deletions bin/run

This file was deleted.

9 changes: 9 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node

// eslint-disable-next-line node/shebang
async function main() {
const { execute } = await import('@oclif/core');
await execute({ dir: import.meta.url });
}

await main();
1 change: 1 addition & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
6 changes: 3 additions & 3 deletions lib/commands/admin/user/access.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { CommandBase } from '../../../helpers/command-base';
import { CommandBase } from '../../../helpers/command-base.js';
export default class Access extends CommandBase {
static description: string;
static defaultReportPath: string;
static examples: string[];
static readonly flags: {
appList: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
report: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
appList: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
report: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
};
static getAppAccess(appMenuItems: any[], permissionSetMap: Map<string, any>, getSetupEntityAccessCallback: (id: string, label: string) => Promise<any[]>, getPermissionSetAssignmentCallback: (id: string, label: string) => Promise<any[]>): Promise<Map<string, any[]>>;
protected runInternal(): Promise<void>;
Expand Down
72 changes: 34 additions & 38 deletions lib/commands/admin/user/access.js

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

Loading
Loading