pypeline 1.1.8 → 1.2.1
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/lib/commands/pypeline/init.d.ts +13 -0
- package/lib/commands/pypeline/init.js +149 -0
- package/lib/commands/pypeline/init.js.map +1 -0
- package/lib/config.js +1 -2
- package/lib/config.js.map +1 -1
- package/messages/pypeline.init.md +19 -0
- package/oclif.manifest.json +47 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type InitResult = {
|
|
3
|
+
baselineCreated: boolean;
|
|
4
|
+
gitignoreUpdated: boolean;
|
|
5
|
+
orgsFound: string[];
|
|
6
|
+
orgsMissing: string[];
|
|
7
|
+
};
|
|
8
|
+
export default class Init extends SfCommand<InitResult> {
|
|
9
|
+
static readonly summary: string;
|
|
10
|
+
static readonly description: string;
|
|
11
|
+
static readonly examples: string[];
|
|
12
|
+
run(): Promise<InitResult>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync, appendFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { Messages } from '@salesforce/core';
|
|
5
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
6
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
7
|
+
const messages = Messages.loadMessages('pypeline', 'pypeline.init');
|
|
8
|
+
const GITIGNORE_BLOCK = `
|
|
9
|
+
# ── pypeline — arquivos gerados pelo pipeline ────────────────────────────────
|
|
10
|
+
baseline.txt
|
|
11
|
+
build_deploy/
|
|
12
|
+
lista_arquivos_adicionados.txt
|
|
13
|
+
lista_arquivos_modificados.txt
|
|
14
|
+
lista_arquivos_deletados.txt
|
|
15
|
+
lista_arquivos_naodeletados.txt
|
|
16
|
+
prd_job_id.txt
|
|
17
|
+
deploy_prd_output.log
|
|
18
|
+
deploy_training_output.log
|
|
19
|
+
`;
|
|
20
|
+
const PYPELINE_ENTRIES = [
|
|
21
|
+
'baseline.txt',
|
|
22
|
+
'build_deploy/',
|
|
23
|
+
'lista_arquivos_adicionados.txt',
|
|
24
|
+
'lista_arquivos_modificados.txt',
|
|
25
|
+
'lista_arquivos_deletados.txt',
|
|
26
|
+
'lista_arquivos_naodeletados.txt',
|
|
27
|
+
'prd_job_id.txt',
|
|
28
|
+
'deploy_prd_output.log',
|
|
29
|
+
'deploy_training_output.log',
|
|
30
|
+
];
|
|
31
|
+
const DEFAULT_ORGS = ['devops', 'treino'];
|
|
32
|
+
export default class Init extends SfCommand {
|
|
33
|
+
static summary = messages.getMessage('summary');
|
|
34
|
+
static description = messages.getMessage('description');
|
|
35
|
+
static examples = messages.getMessages('examples');
|
|
36
|
+
async run() {
|
|
37
|
+
const cwd = process.cwd();
|
|
38
|
+
const result = {
|
|
39
|
+
baselineCreated: false,
|
|
40
|
+
gitignoreUpdated: false,
|
|
41
|
+
orgsFound: [],
|
|
42
|
+
orgsMissing: [],
|
|
43
|
+
};
|
|
44
|
+
this.log('\n── pypeline init ───────────────────────────────────────────\n');
|
|
45
|
+
// ── 1. baseline.txt ────────────────────────────────────────────────────
|
|
46
|
+
const baselinePath = join(cwd, 'baseline.txt');
|
|
47
|
+
if (existsSync(baselinePath)) {
|
|
48
|
+
const hash = readFileSync(baselinePath, 'utf8').trim();
|
|
49
|
+
this.log(`✔ baseline.txt já existe (${hash.slice(0, 8)}...)`);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const confirm = await this.confirm({
|
|
53
|
+
message: 'baseline.txt não encontrado. Criar agora com o commit HEAD atual?',
|
|
54
|
+
defaultAnswer: true,
|
|
55
|
+
});
|
|
56
|
+
if (confirm) {
|
|
57
|
+
try {
|
|
58
|
+
const hash = execSync('git rev-parse HEAD', { encoding: 'utf8', cwd }).trim();
|
|
59
|
+
writeFileSync(baselinePath, hash + '\n', 'utf8');
|
|
60
|
+
result.baselineCreated = true;
|
|
61
|
+
this.log(`✔ baseline.txt criado → ${hash.slice(0, 8)}...`);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
this.warn('Não foi possível obter o commit HEAD. Certifique-se de estar em um repositório git.');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.log(' baseline.txt ignorado. Crie manualmente com: git rev-parse HEAD > baseline.txt');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// ── 2. .gitignore ──────────────────────────────────────────────────────
|
|
72
|
+
this.log('');
|
|
73
|
+
const gitignorePath = join(cwd, '.gitignore');
|
|
74
|
+
if (!existsSync(gitignorePath)) {
|
|
75
|
+
const confirm = await this.confirm({
|
|
76
|
+
message: '.gitignore não encontrado. Criar com as entradas do pypeline?',
|
|
77
|
+
defaultAnswer: true,
|
|
78
|
+
});
|
|
79
|
+
if (confirm) {
|
|
80
|
+
writeFileSync(gitignorePath, GITIGNORE_BLOCK.trimStart(), 'utf8');
|
|
81
|
+
result.gitignoreUpdated = true;
|
|
82
|
+
this.log('✔ .gitignore criado com entradas do pypeline.');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
const content = readFileSync(gitignorePath, 'utf8');
|
|
87
|
+
const missing = PYPELINE_ENTRIES.filter((entry) => !content.includes(entry));
|
|
88
|
+
if (missing.length === 0) {
|
|
89
|
+
this.log('✔ .gitignore já contém todas as entradas do pypeline.');
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
this.log(` Entradas ausentes no .gitignore:\n${missing.map((e) => ` - ${e}`).join('\n')}`);
|
|
93
|
+
const confirm = await this.confirm({
|
|
94
|
+
message: 'Adicionar entradas do pypeline ao .gitignore?',
|
|
95
|
+
defaultAnswer: true,
|
|
96
|
+
});
|
|
97
|
+
if (confirm) {
|
|
98
|
+
appendFileSync(gitignorePath, GITIGNORE_BLOCK, 'utf8');
|
|
99
|
+
result.gitignoreUpdated = true;
|
|
100
|
+
this.log('✔ Entradas adicionadas ao .gitignore.');
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.log(' .gitignore não foi alterado.');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// ── 3. Orgs autenticadas ───────────────────────────────────────────────
|
|
108
|
+
this.log('');
|
|
109
|
+
this.log('Verificando orgs autenticadas...');
|
|
110
|
+
try {
|
|
111
|
+
const output = execSync('sf org list --json', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
113
|
+
const parsed = JSON.parse(output);
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
115
|
+
const nonScratch = (parsed?.result?.nonScratchOrgs ?? []);
|
|
116
|
+
const aliases = nonScratch.map((o) => o.alias).filter(Boolean);
|
|
117
|
+
for (const alias of DEFAULT_ORGS) {
|
|
118
|
+
if (aliases.includes(alias)) {
|
|
119
|
+
result.orgsFound.push(alias);
|
|
120
|
+
this.log(`✔ Org '${alias}' autenticada.`);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
result.orgsMissing.push(alias);
|
|
124
|
+
this.warn(`Org '${alias}' não encontrada. Execute: sf org login web --alias ${alias}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
this.warn('Não foi possível verificar as orgs. Execute "sf org list" para checar manualmente.');
|
|
130
|
+
}
|
|
131
|
+
// ── Resumo ─────────────────────────────────────────────────────────────
|
|
132
|
+
this.log('\n────────────────────────────────────────────────────────────');
|
|
133
|
+
if (result.orgsMissing.length === 0 && existsSync(baselinePath)) {
|
|
134
|
+
this.log('✔ Workspace pronto. Execute sf pypeline run para iniciar o pipeline.\n');
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.log(' Alguns itens precisam de atenção antes de rodar o pipeline:');
|
|
138
|
+
if (!existsSync(baselinePath)) {
|
|
139
|
+
this.log(' - Crie o baseline.txt: git rev-parse HEAD > baseline.txt');
|
|
140
|
+
}
|
|
141
|
+
for (const alias of result.orgsMissing) {
|
|
142
|
+
this.log(` - Autentique a org: sf org login web --alias ${alias}`);
|
|
143
|
+
}
|
|
144
|
+
this.log('');
|
|
145
|
+
}
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/commands/pypeline/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;AASpE,MAAM,eAAe,GAAG;;;;;;;;;;;CAWvB,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACvB,cAAc;IACd,eAAe;IACf,gCAAgC;IAChC,gCAAgC;IAChC,8BAA8B;IAC9B,iCAAiC;IACjC,gBAAgB;IAChB,uBAAuB;IACvB,4BAA4B;CAC7B,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAqB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jC,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC5B,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,GAAG,CAAC,WAAW,KAAK,gBAAgB,CAAC,CAAC;gBAC7C,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC/B,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,uDAAuD,KAAK,EAAE,CAAC,CAAC;gBACzF,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;QAClG,CAAC;QAED,0EAA0E;QAC1E,IAAI,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;QAE3E,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAChE,IAAI,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;QACtF,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;YAC1E,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC9B,IAAI,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;YAC3E,CAAC;YACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;gBACvC,IAAI,CAAC,GAAG,CAAC,oDAAoD,KAAK,EAAE,CAAC,CAAC;YACxE,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACf,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
package/lib/config.js
CHANGED
|
@@ -6,9 +6,8 @@ import * as path from 'node:path';
|
|
|
6
6
|
// Todos os caminhos resolvem a partir de process.cwd() — o diretório onde
|
|
7
7
|
// o usuário executa o comando sf. O plugin pode ser instalado em qualquer
|
|
8
8
|
// máquina sem depender de uma estrutura de pastas específica.
|
|
9
|
-
const SF_REPO_NAME = process.env['PYPELINE_SF_REPO'] ?? 'sforce-sfdc-bvsa-organization';
|
|
10
9
|
export const PROJECT_DIR = () => process.cwd();
|
|
11
|
-
export const LOCAL_DIR = () =>
|
|
10
|
+
export const LOCAL_DIR = () => process.cwd();
|
|
12
11
|
export const SCRIPT_DIR = path.dirname(new URL(import.meta.url).pathname);
|
|
13
12
|
// ── Nomes e pastas ─────────────────────────────────────────────────────────
|
|
14
13
|
export const PROJECT_NAME = 'build_deploy';
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,6EAA6E;AAC7E,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAC1E,8DAA8D;AAE9D,MAAM,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,6EAA6E;AAC7E,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAC1E,8DAA8D;AAE9D,MAAM,CAAC,MAAM,WAAW,GAAI,GAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;AACxD,MAAM,CAAC,MAAM,SAAS,GAAM,GAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;AACxD,MAAM,CAAC,MAAM,UAAU,GAAK,IAAI,CAAC,OAAO,CAAC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C;QACzB,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC1B,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC5C,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Initialize the pypeline workspace: create baseline.txt, update .gitignore and verify org authentication.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Runs an interactive setup for the current Salesforce project directory:
|
|
8
|
+
|
|
9
|
+
- Creates baseline.txt with the current HEAD commit (if not present)
|
|
10
|
+
- Adds pypeline entries to .gitignore (if missing)
|
|
11
|
+
- Checks that the default orgs (devops and treino) are authenticated
|
|
12
|
+
|
|
13
|
+
Run this command once after cloning or setting up a new workspace.
|
|
14
|
+
|
|
15
|
+
# examples
|
|
16
|
+
|
|
17
|
+
- Initialize the workspace in the current directory:
|
|
18
|
+
|
|
19
|
+
<%= config.bin %> <%= command.id %>
|
package/oclif.manifest.json
CHANGED
|
@@ -63,6 +63,52 @@
|
|
|
63
63
|
"build:pypeline"
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
|
+
"pypeline:init": {
|
|
67
|
+
"aliases": [],
|
|
68
|
+
"args": {},
|
|
69
|
+
"description": "Runs an interactive setup for the current Salesforce project directory:\n\n- Creates baseline.txt with the current HEAD commit (if not present)\n- Adds pypeline entries to .gitignore (if missing)\n- Checks that the default orgs (devops and treino) are authenticated\n\nRun this command once after cloning or setting up a new workspace.",
|
|
70
|
+
"examples": [
|
|
71
|
+
"Initialize the workspace in the current directory:\n<%= config.bin %> <%= command.id %>"
|
|
72
|
+
],
|
|
73
|
+
"flags": {
|
|
74
|
+
"json": {
|
|
75
|
+
"description": "Format output as json.",
|
|
76
|
+
"helpGroup": "GLOBAL",
|
|
77
|
+
"name": "json",
|
|
78
|
+
"allowNo": false,
|
|
79
|
+
"type": "boolean"
|
|
80
|
+
},
|
|
81
|
+
"flags-dir": {
|
|
82
|
+
"helpGroup": "GLOBAL",
|
|
83
|
+
"name": "flags-dir",
|
|
84
|
+
"summary": "Import flag values from a directory.",
|
|
85
|
+
"hasDynamicHelp": false,
|
|
86
|
+
"multiple": false,
|
|
87
|
+
"type": "option"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"hasDynamicHelp": false,
|
|
91
|
+
"hiddenAliases": [],
|
|
92
|
+
"id": "pypeline:init",
|
|
93
|
+
"pluginAlias": "pypeline",
|
|
94
|
+
"pluginName": "pypeline",
|
|
95
|
+
"pluginType": "core",
|
|
96
|
+
"strict": true,
|
|
97
|
+
"summary": "Initialize the pypeline workspace: create baseline.txt, update .gitignore and verify org authentication.",
|
|
98
|
+
"enableJsonFlag": true,
|
|
99
|
+
"isESM": true,
|
|
100
|
+
"relativePath": [
|
|
101
|
+
"lib",
|
|
102
|
+
"commands",
|
|
103
|
+
"pypeline",
|
|
104
|
+
"init.js"
|
|
105
|
+
],
|
|
106
|
+
"aliasPermutations": [],
|
|
107
|
+
"permutations": [
|
|
108
|
+
"pypeline:init",
|
|
109
|
+
"init:pypeline"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
66
112
|
"pypeline:package": {
|
|
67
113
|
"aliases": [],
|
|
68
114
|
"args": {},
|
|
@@ -458,5 +504,5 @@
|
|
|
458
504
|
]
|
|
459
505
|
}
|
|
460
506
|
},
|
|
461
|
-
"version": "1.1
|
|
507
|
+
"version": "1.2.1"
|
|
462
508
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pypeline",
|
|
3
3
|
"description": "Complete pipeline devops, for build a project based on git repo, generation of package xml, validate on producction enviroment and a quick deploy structure.",
|
|
4
|
-
"version": "1.1
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^4",
|
|
7
7
|
"@salesforce/core": "^8",
|