@suitegeezus/suitecloud-stacker 25.2.127
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/.idea/compiler.xml +6 -0
- package/.idea/git_toolbox_blame.xml +6 -0
- package/.idea/git_toolbox_prj.xml +15 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/suitecloud-stacker.iml +9 -0
- package/.idea/vcs.xml +6 -0
- package/CONTRIBUTING.md +72 -0
- package/README.md +242 -0
- package/bin/updateModule.d.ts +6 -0
- package/bin/updateModule.js +12 -0
- package/commands/CONTRIBUTING.md +7 -0
- package/commands/accountManageauth.d.ts +93 -0
- package/commands/accountManageauth.js +228 -0
- package/commands/accountSetup.d.ts +56 -0
- package/commands/accountSetup.js +218 -0
- package/commands/customhook/compiless.d.ts +10 -0
- package/commands/customhook/compiless.js +46 -0
- package/commands/customhook/watchss.d.ts +14 -0
- package/commands/customhook/watchss.js +77 -0
- package/commands/fileImport.d.ts +31 -0
- package/commands/fileImport.js +503 -0
- package/commands/fileList.d.ts +19 -0
- package/commands/fileList.js +40 -0
- package/commands/fileUpload.d.ts +52 -0
- package/commands/fileUpload.js +355 -0
- package/commands/generic.d.ts +5 -0
- package/commands/generic.js +13 -0
- package/commands/objectImport.d.ts +32 -0
- package/commands/objectImport.js +287 -0
- package/commands/objectList.d.ts +13 -0
- package/commands/objectList.js +78 -0
- package/commands/projectCreate.d.ts +31 -0
- package/commands/projectCreate.js +506 -0
- package/commands/projectDeploy.d.ts +25 -0
- package/commands/projectDeploy.js +371 -0
- package/commands/projectPackage.d.ts +10 -0
- package/commands/projectPackage.js +32 -0
- package/commands/projectValidate.d.ts +21 -0
- package/commands/projectValidate.js +112 -0
- package/commands/sdfAcs_authmap.d.ts +15 -0
- package/commands/sdfAcs_authmap.js +26 -0
- package/commands/sdfAcs_clean.d.ts +20 -0
- package/commands/sdfAcs_clean.js +22 -0
- package/deleteManifest.cjs +11 -0
- package/demo.md +26 -0
- package/index.d.ts +284 -0
- package/lib/MakeJestTestsFromDeploy.d.ts +13 -0
- package/lib/MakeJestTestsFromDeploy.js +60 -0
- package/lib/addGitKeep.d.ts +5 -0
- package/lib/addGitKeep.js +40 -0
- package/lib/addSdfObjectDirs.d.ts +5 -0
- package/lib/addSdfObjectDirs.js +16 -0
- package/lib/callCli.d.ts +7 -0
- package/lib/callCli.js +26 -0
- package/lib/compileHelper.d.ts +44 -0
- package/lib/compileHelper.js +196 -0
- package/lib/deleteProjectJson.d.ts +6 -0
- package/lib/deleteProjectJson.js +16 -0
- package/lib/deployFileHelper.d.ts +77 -0
- package/lib/deployFileHelper.js +249 -0
- package/lib/handleRootProjectJson.d.ts +10 -0
- package/lib/handleRootProjectJson.js +30 -0
- package/lib/isProd.d.ts +9 -0
- package/lib/isProd.js +13 -0
- package/lib/logHelper.d.ts +5 -0
- package/lib/logHelper.js +13 -0
- package/lib/logger.d.ts +6 -0
- package/lib/logger.js +10 -0
- package/lib/makeDeployXml.d.ts +6 -0
- package/lib/makeDeployXml.js +30 -0
- package/lib/makeJest.d.ts +12 -0
- package/lib/makeJest.js +58 -0
- package/lib/makeManifestXml.d.ts +6 -0
- package/lib/makeManifestXml.js +21 -0
- package/lib/makeProjectJson.d.ts +6 -0
- package/lib/makeProjectJson.js +16 -0
- package/lib/onErrorHelper.d.ts +31 -0
- package/lib/onErrorHelper.js +93 -0
- package/lib/pathHelpers.d.ts +133 -0
- package/lib/pathHelpers.js +428 -0
- package/lib/pause.d.ts +6 -0
- package/lib/pause.js +10 -0
- package/lib/projectJsonHelpers.d.ts +29 -0
- package/lib/projectJsonHelpers.js +92 -0
- package/lib/promptHelpers.d.ts +77 -0
- package/lib/promptHelpers.js +195 -0
- package/lib/removeFiles.d.ts +20 -0
- package/lib/removeFiles.js +46 -0
- package/lib/sdf.d.ts +11 -0
- package/lib/sdf.js +158 -0
- package/lib/spawnSuitecloudChild.d.ts +30 -0
- package/lib/spawnSuitecloudChild.js +88 -0
- package/lib/switchAuth.d.ts +17 -0
- package/lib/switchAuth.js +23 -0
- package/lib/tempFileHelper.d.ts +29 -0
- package/lib/tempFileHelper.js +70 -0
- package/lib/updateModule.d.ts +10 -0
- package/lib/updateModule.js +79 -0
- package/lib/validators.d.ts +12 -0
- package/lib/validators.js +25 -0
- package/package.json +38 -0
- package/safeCommands.d.ts +95 -0
- package/safeCommands.js +959 -0
- package/sdf.config.js +15 -0
- package/sdf.exe.js +16 -0
- package/templates/customizations.projectroot.d.ts +74 -0
- package/templates/makeModuleTypeDef.d.ts +5 -0
- package/templates/makeModuleTypeDef.js +29 -0
- package/templates/sdfGitIgnore.txt +42 -0
- package/templates/suitecloud.config.js +17 -0
- package/templates/tsconfig.ss21.projectroot.json +64 -0
- package/types/colors.d.ts +43 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file /Users/geraldgillespie/code/nsaccounts/sdf/lib/tempFileHelper
|
|
4
|
+
* @author Gerald Gillespie <gerald.gillespie@fullscript.com>
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.removeTempFiles = exports.consumeTempFile = exports.makeTempFile = exports.FileNames = void 0;
|
|
8
|
+
const fs = require("node:fs/promises");
|
|
9
|
+
const nodePath = require("node:path");
|
|
10
|
+
const spawnSuitecloud = require("./spawnSuitecloudChild");
|
|
11
|
+
const promptHelpers = require("./promptHelpers");
|
|
12
|
+
exports.FileNames = {
|
|
13
|
+
accountManagementList: 'accountlist.json',
|
|
14
|
+
objectList: 'objectlist.json',
|
|
15
|
+
fileList: 'filelist.json'
|
|
16
|
+
};
|
|
17
|
+
const getPrefix = () => {
|
|
18
|
+
process.stdout.write(promptHelpers.goColor('SUBTLE', '\npids:', [process.env[spawnSuitecloud.getChildEnv()], process.pid].join(':')));
|
|
19
|
+
return ['sdftemp', String(process.env[spawnSuitecloud.getChildEnv()] || process.pid)].join('.');
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @description - usually a temp file is:
|
|
23
|
+
* - created by an 'onCompleted' handler on a child process
|
|
24
|
+
* - consumed by a 'beforeExecuting' handler of a parent process
|
|
25
|
+
* - therefore watch out for file cleanup activities
|
|
26
|
+
* @param {string} fileName
|
|
27
|
+
* @param {string} data - serialized data
|
|
28
|
+
* @returns {Promise<string>} - the new file and path
|
|
29
|
+
*/
|
|
30
|
+
const makeTempFile = async (fileName, data) => {
|
|
31
|
+
const prefix = getPrefix();
|
|
32
|
+
const path = nodePath.join(process.cwd(), [prefix, fileName].join('_'));
|
|
33
|
+
await fs.writeFile(path, data, { encoding: 'utf-8' });
|
|
34
|
+
process.stdout.write(promptHelpers.goColor('SUBTLE', '\nTemp file created', path));
|
|
35
|
+
return path;
|
|
36
|
+
};
|
|
37
|
+
exports.makeTempFile = makeTempFile;
|
|
38
|
+
/**
|
|
39
|
+
* @description - read and delete the temp file
|
|
40
|
+
* @param {string} fileName
|
|
41
|
+
* @returns {Promise<string>}
|
|
42
|
+
*/
|
|
43
|
+
const consumeTempFile = async (fileName) => {
|
|
44
|
+
const prefix = getPrefix();
|
|
45
|
+
const path = nodePath.join(process.cwd(), [prefix, fileName].join('_'));
|
|
46
|
+
const contents = await fs.readFile(path, { encoding: 'utf-8' });
|
|
47
|
+
// await fs.rm(path).catch(e => console.error(e));
|
|
48
|
+
process.stdout.write(promptHelpers.goColor('SUBTLE', '\nTemp file consumed (DISBALED)', path));
|
|
49
|
+
return contents;
|
|
50
|
+
};
|
|
51
|
+
exports.consumeTempFile = consumeTempFile;
|
|
52
|
+
/**
|
|
53
|
+
* @description - removes temp files
|
|
54
|
+
*/
|
|
55
|
+
const removeTempFiles = async (prefix) => {
|
|
56
|
+
const files = await fs.readdir(process.cwd());
|
|
57
|
+
const toClean = files.filter((f) => f.startsWith(prefix || getPrefix()));
|
|
58
|
+
if (files.length > 0) {
|
|
59
|
+
process.stdout.write(promptHelpers.goColor('INFO', `\nCleaning ${toClean.length} temp files `));
|
|
60
|
+
await Promise.allSettled(toClean.map(async (file) => {
|
|
61
|
+
if (file.startsWith(prefix || getPrefix()))
|
|
62
|
+
await fs.rm(file).catch((e) => console.error(e));
|
|
63
|
+
})).catch(() => {
|
|
64
|
+
process.stdout.write('❌\n');
|
|
65
|
+
});
|
|
66
|
+
process.stdout.write('✅\n');
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.removeTempFiles = removeTempFiles;
|
|
70
|
+
//# sourceMappingURL=tempFileHelper.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file /Users/geraldgillespie/code/nsaccounts/sdf/bin/updateModule
|
|
3
|
+
* - keeps module up to date with what is in the current directory
|
|
4
|
+
* @author Gerald Gillespie <gerald.gillespie@fullscript.com>
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @description - Keep the module.d.ts file up to date with all relevant scripts that are in the current directory tree
|
|
8
|
+
* Filters out test files
|
|
9
|
+
*/
|
|
10
|
+
export declare const updateModuleTypeDef: () => Promise<void>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file /Users/geraldgillespie/code/nsaccounts/sdf/bin/updateModule
|
|
4
|
+
* - keeps module up to date with what is in the current directory
|
|
5
|
+
* @author Gerald Gillespie <gerald.gillespie@fullscript.com>
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.updateModuleTypeDef = void 0;
|
|
9
|
+
const fs = require("node:fs/promises");
|
|
10
|
+
const nodePath = require("node:path");
|
|
11
|
+
/** @internal
|
|
12
|
+
* @see makeModuleTypeDef
|
|
13
|
+
* */
|
|
14
|
+
const makeModuleContent = (list, GoRoot) => {
|
|
15
|
+
// remove their extensions and make them unique
|
|
16
|
+
const unique = new Set(list.map((x) => x.replace(/(\.d)?\.[jt]s$/, '')));
|
|
17
|
+
const rootFromSS = GoRoot ? GoRoot.replace(/^.*(\bSuiteScripts\b.*)$/, '/$1') : '';
|
|
18
|
+
const toReturn = `/**
|
|
19
|
+
* This a map of modules used by Go. And provides resolution and typing of those paths.
|
|
20
|
+
* N/* modules are implicit and do not need to be listed here
|
|
21
|
+
* @example
|
|
22
|
+
* const myUtilityLib = Go['/SuiteScripts/Apps/MyApp/utils/myUtility'];
|
|
23
|
+
* const Nrecord = Go['N/record'];
|
|
24
|
+
* const asyncNrecord = await Go.promise['N/record'];
|
|
25
|
+
* \`\`\`
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
export type ModuleMap = {
|
|
29
|
+
//'/SuiteScripts/Apps/MyApp/utils/myUtility': typeof import('/SuiteScripts/Apps/MyApp/utils/myUtility');
|
|
30
|
+
${[...unique]
|
|
31
|
+
.map((l) => l.replace(/^.*(\bSuiteScripts\b.*)$/, '/$1'))
|
|
32
|
+
.flatMap((m) => {
|
|
33
|
+
const tuple = [];
|
|
34
|
+
tuple.push(` '${m}': typeof import('${m}');`);
|
|
35
|
+
if (rootFromSS) {
|
|
36
|
+
const relative = nodePath.relative(rootFromSS, m);
|
|
37
|
+
if (/\//.test(relative))
|
|
38
|
+
tuple.push(` '${relative}': typeof import('${m}');`);
|
|
39
|
+
else
|
|
40
|
+
tuple.push(` './${relative}': typeof import('${m}');`);
|
|
41
|
+
}
|
|
42
|
+
return tuple;
|
|
43
|
+
})
|
|
44
|
+
.sort()
|
|
45
|
+
.join('\n')}
|
|
46
|
+
} // do not add N here. add that in the local index Module Map
|
|
47
|
+
`;
|
|
48
|
+
return toReturn;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @description - Keep the module.d.ts file up to date with all relevant scripts that are in the current directory tree
|
|
52
|
+
* Filters out test files
|
|
53
|
+
*/
|
|
54
|
+
const updateModuleTypeDef = async () => {
|
|
55
|
+
const cwd = process.cwd();
|
|
56
|
+
if (!/\bFileCabinet\b.\bSuiteScripts\b/.test(cwd))
|
|
57
|
+
throw new Error('must provide a path that contains SuiteScripts');
|
|
58
|
+
const list = await fs.readdir(process.cwd(), { recursive: true });
|
|
59
|
+
//
|
|
60
|
+
const moduleFilesToUpdate = [];
|
|
61
|
+
const toList = list.flatMap((l) => {
|
|
62
|
+
if (/module.d.ts/.test(l)) {
|
|
63
|
+
moduleFilesToUpdate.push(nodePath.join(process.cwd(), l));
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
if (!/\.ts$/.test(l))
|
|
67
|
+
return [];
|
|
68
|
+
// no tests
|
|
69
|
+
if (/__tests__/.test(l))
|
|
70
|
+
return [];
|
|
71
|
+
return [nodePath.join(process.cwd(), l)];
|
|
72
|
+
});
|
|
73
|
+
const [utilsFile] = toList.filter((m) => /\butils\/utils\b/.test(m));
|
|
74
|
+
await Promise.allSettled(moduleFilesToUpdate.map(async (modFile) => {
|
|
75
|
+
await fs.writeFile(modFile, makeModuleContent(toList, nodePath.dirname(utilsFile)), { encoding: 'utf-8' });
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
78
|
+
exports.updateModuleTypeDef = updateModuleTypeDef;
|
|
79
|
+
//# sourceMappingURL=updateModule.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file sdf/lib/formatRules.ts
|
|
3
|
+
* @author Gerald Gillespie <gerald.gillespie@fullscript.com>
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* @param name
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export declare const isValidAccountName: (name: string) => boolean;
|
|
11
|
+
export declare const isValidAccountFolderName: (name: string) => boolean;
|
|
12
|
+
export declare const isValidAuthId: (name: string) => boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file sdf/lib/formatRules.ts
|
|
4
|
+
* @author Gerald Gillespie <gerald.gillespie@fullscript.com>
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.isValidAuthId = exports.isValidAccountFolderName = exports.isValidAccountName = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* @param name
|
|
11
|
+
* @returns {boolean}
|
|
12
|
+
*/
|
|
13
|
+
const isValidAccountName = (name) => {
|
|
14
|
+
return /^(TD)?\d+(_(SB)[1-9]\d*|RP)?$/.test(name);
|
|
15
|
+
};
|
|
16
|
+
exports.isValidAccountName = isValidAccountName;
|
|
17
|
+
const isValidAccountFolderName = (name) => {
|
|
18
|
+
return /^(td)?\d+(_(SB)[1-9]\d*|RP|CUS\d?\d?)?$/.test(name);
|
|
19
|
+
};
|
|
20
|
+
exports.isValidAccountFolderName = isValidAccountFolderName;
|
|
21
|
+
const isValidAuthId = (name) => {
|
|
22
|
+
return /[A-Z0-9_-]+$/.test(name);
|
|
23
|
+
};
|
|
24
|
+
exports.isValidAuthId = isValidAuthId;
|
|
25
|
+
//# sourceMappingURL=validators.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@suitegeezus/suitecloud-stacker",
|
|
3
|
+
"version": "25.2.127",
|
|
4
|
+
"description": "SuiteCloud Stacker",
|
|
5
|
+
"main": "safeCommands.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "test",
|
|
8
|
+
"build:sdf": "tsc -p ./tsconfig.json",
|
|
9
|
+
"update:module": "node ./bin/updateModule.js"
|
|
10
|
+
},
|
|
11
|
+
"type": "commonjs",
|
|
12
|
+
"imports": {
|
|
13
|
+
"#root/*": "./*",
|
|
14
|
+
"#sdf/*": "./*"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig":{
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"sdf",
|
|
21
|
+
"netsuite",
|
|
22
|
+
"suitescript"
|
|
23
|
+
],
|
|
24
|
+
"author": "Gerald Gillespie <gerald.gillespie@fullscript.com>",
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@suitegeezus/suitecloud-cli": "^3.1.6-5"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/jest": "^29.5.14",
|
|
31
|
+
"@types/node": "^22.9.0",
|
|
32
|
+
"jest": "^29.7.0",
|
|
33
|
+
"typescript": "^5.2.2"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"minimatch": "^10.0.1"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file sdf/safeCommands.ts
|
|
3
|
+
* @author Gerald Gillespie <gerald.gillespie@fullscript.com>
|
|
4
|
+
*/
|
|
5
|
+
import * as promptHelper from './lib/promptHelpers';
|
|
6
|
+
import { ProjectJsonContents, SdfCommand } from './index';
|
|
7
|
+
import * as accountManageAuth from './commands/accountManageauth';
|
|
8
|
+
import * as accountSetup from './commands/accountSetup';
|
|
9
|
+
import * as fileImports from './commands/fileImport';
|
|
10
|
+
import * as projectCreates from './commands/projectCreate';
|
|
11
|
+
import * as projectDeploys from './commands/projectDeploy';
|
|
12
|
+
import * as fileUpload from "./commands/fileUpload";
|
|
13
|
+
import * as projectValidates from './commands/projectValidate';
|
|
14
|
+
import * as objectLists from './commands/objectList';
|
|
15
|
+
import * as objectImports from './commands/objectImport';
|
|
16
|
+
export declare const promptHelpers: typeof promptHelper;
|
|
17
|
+
export declare const fileImportCommand: typeof fileImports;
|
|
18
|
+
export declare const projectCreateCommand: typeof projectCreates;
|
|
19
|
+
export declare const projectDeployCommand: typeof projectDeploys;
|
|
20
|
+
export declare const projectValidateCommand: typeof projectValidates;
|
|
21
|
+
export declare const objectListCommand: typeof objectLists;
|
|
22
|
+
export declare const objectImportCommand: typeof objectImports;
|
|
23
|
+
export declare const fileUploadCommand: typeof fileUpload;
|
|
24
|
+
export declare const accountSetupCommand: typeof accountSetup;
|
|
25
|
+
export declare const accountManageAuthCommand: typeof accountManageAuth;
|
|
26
|
+
/**
|
|
27
|
+
* @description - if blocked then an error is thrown (useful for temporarily neutering a capability)
|
|
28
|
+
* - the original candidate can satisfy the handler then it will
|
|
29
|
+
* - otherwise the replacement will
|
|
30
|
+
* @param {function} candidate - the root object
|
|
31
|
+
* @param {boolean} doBlock - whether to block access to the true candidate or not -- useful in debugging
|
|
32
|
+
* @param {boolean} debug - Whether to print useful values such as the property, value, arguments
|
|
33
|
+
*/
|
|
34
|
+
export declare const makeFunctionProxy: <T>(candidate: T, doBlock: boolean | Array<string | symbol>, debug: boolean) => T;
|
|
35
|
+
/**
|
|
36
|
+
* @description - converts an "existing" command object into a proxy for both the existing and missing pieces so you can track the inputs and outputs
|
|
37
|
+
* @param {object} existing
|
|
38
|
+
* @param {boolean} doBlock
|
|
39
|
+
* @param {boolean} debug
|
|
40
|
+
*/
|
|
41
|
+
export declare const genericCommandProxy: (existing: object | Function, doBlock: boolean, debug: boolean) => object | Function;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated
|
|
44
|
+
* @description - Take commands and export safe commands.
|
|
45
|
+
* - Proxies the function of each command
|
|
46
|
+
* - Anytime the `authid` option is seen it will strip it out as this is coming from native.
|
|
47
|
+
* - Will replace the `authid` option with a value that is taken from a transient .project.json file. Note that the
|
|
48
|
+
* transient file will only exist if it was called properly.
|
|
49
|
+
* @param options
|
|
50
|
+
*/
|
|
51
|
+
export declare const makeSuiteCloudConfig: (options: {
|
|
52
|
+
commands: object;
|
|
53
|
+
}, authFolderMap?: Record<string, string[]>, extras?: {
|
|
54
|
+
debug: boolean;
|
|
55
|
+
}) => {
|
|
56
|
+
commands: object;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* @description -
|
|
60
|
+
* - Be careful about what you return. Each function in the stack should return options BUT some of the properties in a function are effectively `readonly` --
|
|
61
|
+
* i.e. they are not frozen and do not behave readonly until the very last handler.
|
|
62
|
+
* e.g. if you modify the property `options.arguments.authid` in `beforeExecuting` then you will be able to
|
|
63
|
+
* but the final SDF internal handler will not read the updated value.
|
|
64
|
+
* - Further some functions do not need to export options, BUT this process will pass them on to the next. This is an
|
|
65
|
+
* opportunity to modify those options, but it is a rare cases so be careful
|
|
66
|
+
* @param {string} command - e.g. 'file:import'
|
|
67
|
+
* @returns {Function}
|
|
68
|
+
*/
|
|
69
|
+
export declare const stack: Function;
|
|
70
|
+
/**
|
|
71
|
+
* @description - getters so that stack is not invoked until called and they are readonly
|
|
72
|
+
*/
|
|
73
|
+
export declare const defaultCommands: Record<string, SdfCommand>;
|
|
74
|
+
/**
|
|
75
|
+
* @description - getters
|
|
76
|
+
*/
|
|
77
|
+
export declare const caseCommands: Record<string, SdfCommand>;
|
|
78
|
+
/**
|
|
79
|
+
* @description - THIS MUST BE SYNCHRONOUS - you will get errors if the account is not setup.
|
|
80
|
+
* The way around that is to prompt the user and then they can try again
|
|
81
|
+
* @param options
|
|
82
|
+
* @param {object} extra
|
|
83
|
+
* @param {string[]} [extra.clean] - Files to remove after running. Default is `deploy.xml` and `.project.json`. `sdftemp.*` files are always removed
|
|
84
|
+
* @param {function} [extra.onExit] - callback that run on Exit of the process. Whatever string[] are returned will be printed as lines to the console
|
|
85
|
+
* @param {module} module
|
|
86
|
+
*/
|
|
87
|
+
export declare const makeSafeExports: <T extends ProjectJsonContents & {
|
|
88
|
+
commands: Record<string, SdfCommand>;
|
|
89
|
+
}>(options: T, extra: {
|
|
90
|
+
debug?: boolean;
|
|
91
|
+
block?: boolean;
|
|
92
|
+
autoCreateProjectJson?: boolean;
|
|
93
|
+
clean?: string[];
|
|
94
|
+
onExit?: (...m: any[]) => any;
|
|
95
|
+
}, module: any) => void;
|