@suitegeezus/suitecloud-stacker 25.2.129 → 25.2.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -7
- package/package.json +1 -1
- package/CONTRIBUTING.md +0 -72
- package/commands/CONTRIBUTING.md +0 -7
- package/demo.md +0 -26
package/README.md
CHANGED
|
@@ -17,8 +17,6 @@ The reason you would NOT want to use `src` is if you wanted to use the plugin to
|
|
|
17
17
|
- has extra stuff you don't want to put into the account by accident
|
|
18
18
|
- want to keep it separate
|
|
19
19
|
|
|
20
|
-
One emample in this project is that to do diffs it will automatically create a root `temp` for you.
|
|
21
|
-
|
|
22
20
|
## Attempts to facilitate any activity in an account-based project to be only for that account
|
|
23
21
|
For example, if you try to `file:upload` or `project:deploy` code it will prompt you for the account with only choices relevant to that project.
|
|
24
22
|
|
|
@@ -30,16 +28,16 @@ For example, if you try to `file:upload` or `project:deploy` code it will prompt
|
|
|
30
28
|
Should work same on Windows but i haven't tested it and i might have messed something up for windows so let me know if you have issues and you can help me fix them
|
|
31
29
|
|
|
32
30
|
1. Install SuiteCloud globally using the latest release version
|
|
31
|
+
see [`@suitegeezus/suitecloud-cli`](https://www.npmjs.com/package/@suitegeezus/suitecloud-cli)
|
|
32
|
+
read the documentation for it, to see the additional command line switches.
|
|
33
|
+
|
|
33
34
|
2. Optional: Install nodemon globally
|
|
34
35
|
```shell
|
|
35
36
|
npm install -g nodemon
|
|
36
37
|
```
|
|
37
|
-
3. Install a nice terminal that you like to use.
|
|
38
|
+
3. Optional: Install a nice terminal that you like to use.
|
|
38
39
|
- Highly recommend enhancing the mac shell with iTerm AND [Oh my Zsh!](https://ohmyz.sh/)
|
|
39
|
-
4. Optional:
|
|
40
|
-
- These are entitlements that will help you stay on the latest version of this repo and use customer repos
|
|
41
|
-
- If you can't then you can still use this for your testdrive accounts -- just ask me how
|
|
42
|
-
5Optional: Create an environment variable for SUITECLOUD_DIFF_TOOL
|
|
40
|
+
4. Optional: Create an environment variable for SUITECLOUD_DIFF_TOOL
|
|
43
41
|
```shell
|
|
44
42
|
#➜ set | grep 'DIFF'
|
|
45
43
|
export SUITECLOUD_DIFF_TOOL='/Applications/./IntelliJ\ IDEA.app/Contents/MacOS/idea'
|
package/package.json
CHANGED
package/CONTRIBUTING.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
## the project type is 'commonjs'
|
|
2
|
-
suitecloud-cli will only look for a config with a `.js` and never a `.cjs` extension!! 😓
|
|
3
|
-
this conflicts with how suitescript unit tests are written which is with es6 modules.
|
|
4
|
-
It is possible to use modules with flags on node so that is what we will need to do.
|
|
5
|
-
This means certain files such as suitecloud.config.js may show some resolve errors. There are some other ways to get around this b
|
|
6
|
-
|
|
7
|
-
## Your authentication is setup correctly and you are definitely pushing or pulling from the implied environment
|
|
8
|
-
Unfortunately, we are human and make mistakes. But SDF doesn't care
|
|
9
|
-
When authentication is set it will just assume this is what you want and has no safety net.
|
|
10
|
-
|
|
11
|
-
this project solves this problem by:
|
|
12
|
-
- Using the `@suitegeezus/suitecloud-cli` which has an authid argument available
|
|
13
|
-
- requiring the authid to be passed onto the command line
|
|
14
|
-
- detecting it is set in the hooks
|
|
15
|
-
- optional: erasing the project.json file before and after every execution.
|
|
16
|
-
- prompting you to enter the same authid a second time during the action
|
|
17
|
-
|
|
18
|
-
# Testing
|
|
19
|
-
|
|
20
|
-
This project lacks unit tests. It was initially difficult to figure out how to test a cli such as suitecloud more effectively in a unit test than in on the command line itself especially because it did not publish its hook behaviour. So it was often better to test by running the commands locally.
|
|
21
|
-
|
|
22
|
-
However, there should be unit tests and the stackable system makes it easy to do so.
|
|
23
|
-
|
|
24
|
-
Running the compiler with `map` files and in watch mode helps a lot.
|
|
25
|
-
|
|
26
|
-
# Writing Code
|
|
27
|
-
All code needs to be in Typescript
|
|
28
|
-
|
|
29
|
-
Anything that is a stackable handler should be for a specific command and be in the `commands/` directory.
|
|
30
|
-
|
|
31
|
-
e.g. something for `file:import` goes in `commands/fileImport.ts`
|
|
32
|
-
|
|
33
|
-
Each handler should be function that return `SdfCommand` type. Which has this shape:
|
|
34
|
-
```ts
|
|
35
|
-
interface SdfCommand{
|
|
36
|
-
beforeExecuting?: <O>(options:O)=>Promise<O>;
|
|
37
|
-
onCompleted?: <O>(options:O)=>Promise<O>;
|
|
38
|
-
onError?: <S>(err:S)=>Promise<S>;
|
|
39
|
-
projectFolder?: string;
|
|
40
|
-
/** @description - non native but added for detection */
|
|
41
|
-
stacked: true;
|
|
42
|
-
isStackable: true;
|
|
43
|
-
_origin: string;
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Throwing Errors
|
|
48
|
-
- SDF only passes strings to `onError`
|
|
49
|
-
- SDF always prints the message
|
|
50
|
-
|
|
51
|
-
- so ....
|
|
52
|
-
You should call `makeError` when throwing errors. This will throw a serialized string but log the stack first.
|
|
53
|
-
```ts
|
|
54
|
-
throw onErrorHelper.makeError(origin, new Error('whatever'));
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Your `onError` method should be the returnType of `detectOriginAndReturn`
|
|
58
|
-
|
|
59
|
-
```ts
|
|
60
|
-
onError : async (error:string)=> onErrorHelper.detectOriginAndReturn(
|
|
61
|
-
origin, // : string,
|
|
62
|
-
error, // string-- the non-serialized message
|
|
63
|
-
(e: string /* this will only be the message portion */)=>{
|
|
64
|
-
// you can do things in here like
|
|
65
|
-
// - print a friendlier message when it's not a catastropich error
|
|
66
|
-
// - print a usage
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
```
|
|
70
|
-
If you need the results of an SDF command that is supported and you'll see examples
|
|
71
|
-
|
|
72
|
-
Anything that is re-usable should be somewhere in `sdf/lib`.
|
package/commands/CONTRIBUTING.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
In this folder each library should export handlers related to an SDF command.
|
|
2
|
-
|
|
3
|
-
e.g. fileImport.ts serves `file:import` related commands.
|
|
4
|
-
|
|
5
|
-
These handler should return sdf-expected methods and each method should be stackable / chainable. See [sdf/safeCommands/stack](../safeCommands.ts);
|
|
6
|
-
|
|
7
|
-
Tests would be great. Use proxies to glean the arguments that SDF passed in and use those as your mock options.
|
package/demo.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Overview / Features
|
|
2
|
-
|
|
3
|
-
* build a UserEvent that will help with adhoc debugging
|
|
4
|
-
* 3 different UEs
|
|
5
|
-
* separation of beforeLoad, beforeSubmit, afterSubmit
|
|
6
|
-
* deployable to any record
|
|
7
|
-
* easier ordering of rank
|
|
8
|
-
* each can launch other UEs
|
|
9
|
-
|
|
10
|
-
# Requirements
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# Objects & Scripts
|
|
14
|
-
|
|
15
|
-
## Objects
|
|
16
|
-
1. UserEvent record for each entry point method
|
|
17
|
-
2. script parameter that will accept a scriptid / filepath (string)
|
|
18
|
-
|
|
19
|
-
## Scripts
|
|
20
|
-
1. Script for beforeLoad
|
|
21
|
-
2. Script for beforeSubmit
|
|
22
|
-
3. Script for afterSubmit
|
|
23
|
-
4. A generic function to proxy an unknown script
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|