@sfship/plugin-ship 1.0.0-beta.2
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/LICENSE.txt +206 -0
- package/README.md +164 -0
- package/lib/commands/ship/flow/eject.d.ts +15 -0
- package/lib/commands/ship/flow/eject.js +55 -0
- package/lib/commands/ship/flow/eject.js.map +1 -0
- package/lib/commands/ship/flow/info.d.ts +15 -0
- package/lib/commands/ship/flow/info.js +86 -0
- package/lib/commands/ship/flow/info.js.map +1 -0
- package/lib/commands/ship/flow/list.d.ts +12 -0
- package/lib/commands/ship/flow/list.js +51 -0
- package/lib/commands/ship/flow/list.js.map +1 -0
- package/lib/commands/ship/flow/run.d.ts +16 -0
- package/lib/commands/ship/flow/run.js +90 -0
- package/lib/commands/ship/flow/run.js.map +1 -0
- package/lib/commands/ship/project/init.d.ts +13 -0
- package/lib/commands/ship/project/init.js +81 -0
- package/lib/commands/ship/project/init.js.map +1 -0
- package/lib/commands/ship/service/connect/github.d.ts +12 -0
- package/lib/commands/ship/service/connect/github.js +47 -0
- package/lib/commands/ship/service/connect/github.js.map +1 -0
- package/lib/commands/ship/service/delete.d.ts +13 -0
- package/lib/commands/ship/service/delete.js +44 -0
- package/lib/commands/ship/service/delete.js.map +1 -0
- package/lib/commands/ship/service/info.d.ts +13 -0
- package/lib/commands/ship/service/info.js +51 -0
- package/lib/commands/ship/service/info.js.map +1 -0
- package/lib/commands/ship/service/list.d.ts +9 -0
- package/lib/commands/ship/service/list.js +55 -0
- package/lib/commands/ship/service/list.js.map +1 -0
- package/lib/commands/ship/task/info.d.ts +15 -0
- package/lib/commands/ship/task/info.js +75 -0
- package/lib/commands/ship/task/info.js.map +1 -0
- package/lib/commands/ship/task/list.d.ts +12 -0
- package/lib/commands/ship/task/list.js +45 -0
- package/lib/commands/ship/task/list.js.map +1 -0
- package/lib/commands/ship/task/run.d.ts +16 -0
- package/lib/commands/ship/task/run.js +72 -0
- package/lib/commands/ship/task/run.js.map +1 -0
- package/lib/core/config.dependency.schema.d.ts +24 -0
- package/lib/core/config.dependency.schema.js +34 -0
- package/lib/core/config.dependency.schema.js.map +1 -0
- package/lib/core/config.loader.d.ts +23 -0
- package/lib/core/config.loader.js +62 -0
- package/lib/core/config.loader.js.map +1 -0
- package/lib/core/config.ship.schema.d.ts +174 -0
- package/lib/core/config.ship.schema.js +67 -0
- package/lib/core/config.ship.schema.js.map +1 -0
- package/lib/core/error.d.ts +29 -0
- package/lib/core/error.js +59 -0
- package/lib/core/error.js.map +1 -0
- package/lib/core/file.d.ts +34 -0
- package/lib/core/file.js +123 -0
- package/lib/core/file.js.map +1 -0
- package/lib/core/flow.context.d.ts +22 -0
- package/lib/core/flow.context.js +4 -0
- package/lib/core/flow.context.js.map +1 -0
- package/lib/core/flow.definition.schema.d.ts +60 -0
- package/lib/core/flow.definition.schema.js +56 -0
- package/lib/core/flow.definition.schema.js.map +1 -0
- package/lib/core/flow.interpolate.d.ts +21 -0
- package/lib/core/flow.interpolate.js +64 -0
- package/lib/core/flow.interpolate.js.map +1 -0
- package/lib/core/flow.registry.d.ts +32 -0
- package/lib/core/flow.registry.js +99 -0
- package/lib/core/flow.registry.js.map +1 -0
- package/lib/core/flow.renderer.d.ts +51 -0
- package/lib/core/flow.renderer.js +137 -0
- package/lib/core/flow.renderer.js.map +1 -0
- package/lib/core/flow.runner.d.ts +13 -0
- package/lib/core/flow.runner.js +133 -0
- package/lib/core/flow.runner.js.map +1 -0
- package/lib/core/flow.store.d.ts +24 -0
- package/lib/core/flow.store.js +57 -0
- package/lib/core/flow.store.js.map +1 -0
- package/lib/core/flow.view.d.ts +20 -0
- package/lib/core/flow.view.js +77 -0
- package/lib/core/flow.view.js.map +1 -0
- package/lib/core/flows/create/package.yml +18 -0
- package/lib/core/flows/dependencies/lock.yml +4 -0
- package/lib/core/flows/deploy/beta.yml +38 -0
- package/lib/core/flows/deploy/dev.yml +26 -0
- package/lib/core/flows/deploy/feature.yml +56 -0
- package/lib/core/flows/deploy/qa.yml +51 -0
- package/lib/core/flows/deploy/regression.yml +60 -0
- package/lib/core/flows/deploy/release.yml +38 -0
- package/lib/core/flows/release/beta.yml +25 -0
- package/lib/core/flows/release/production.yml +16 -0
- package/lib/core/org.registry.d.ts +45 -0
- package/lib/core/org.registry.js +76 -0
- package/lib/core/org.registry.js.map +1 -0
- package/lib/core/org.scratch.schema.d.ts +44 -0
- package/lib/core/org.scratch.schema.js +62 -0
- package/lib/core/org.scratch.schema.js.map +1 -0
- package/lib/core/package.dependencies.d.ts +45 -0
- package/lib/core/package.dependencies.js +158 -0
- package/lib/core/package.dependencies.js.map +1 -0
- package/lib/core/package.installer.d.ts +13 -0
- package/lib/core/package.installer.js +60 -0
- package/lib/core/package.installer.js.map +1 -0
- package/lib/core/package.metadata.d.ts +6 -0
- package/lib/core/package.metadata.js +33 -0
- package/lib/core/package.metadata.js.map +1 -0
- package/lib/core/package.namespace.d.ts +10 -0
- package/lib/core/package.namespace.js +40 -0
- package/lib/core/package.namespace.js.map +1 -0
- package/lib/core/package.version.d.ts +42 -0
- package/lib/core/package.version.js +60 -0
- package/lib/core/package.version.js.map +1 -0
- package/lib/core/project.init.d.ts +11 -0
- package/lib/core/project.init.js +121 -0
- package/lib/core/project.init.js.map +1 -0
- package/lib/core/service.d.ts +45 -0
- package/lib/core/service.github.d.ts +98 -0
- package/lib/core/service.github.js +270 -0
- package/lib/core/service.github.js.map +1 -0
- package/lib/core/service.js +91 -0
- package/lib/core/service.js.map +1 -0
- package/lib/core/sfdx-project.d.ts +25 -0
- package/lib/core/sfdx-project.js +39 -0
- package/lib/core/sfdx-project.js.map +1 -0
- package/lib/core/stdout.d.ts +1 -0
- package/lib/core/stdout.js +27 -0
- package/lib/core/stdout.js.map +1 -0
- package/lib/core/task.definition.schema.d.ts +69 -0
- package/lib/core/task.definition.schema.js +33 -0
- package/lib/core/task.definition.schema.js.map +1 -0
- package/lib/core/task.output.d.ts +29 -0
- package/lib/core/task.output.js +39 -0
- package/lib/core/task.output.js.map +1 -0
- package/lib/core/task.param.d.ts +30 -0
- package/lib/core/task.param.js +141 -0
- package/lib/core/task.param.js.map +1 -0
- package/lib/core/task.param.schema.d.ts +22 -0
- package/lib/core/task.param.schema.js +26 -0
- package/lib/core/task.param.schema.js.map +1 -0
- package/lib/core/task.registry.d.ts +22 -0
- package/lib/core/task.registry.js +85 -0
- package/lib/core/task.registry.js.map +1 -0
- package/lib/core/task.view.d.ts +10 -0
- package/lib/core/task.view.js +25 -0
- package/lib/core/task.view.js.map +1 -0
- package/lib/core/tasks/apex/run/test.d.ts +25 -0
- package/lib/core/tasks/apex/run/test.js +85 -0
- package/lib/core/tasks/apex/run/test.js.map +1 -0
- package/lib/core/tasks/data/import/tree.d.ts +12 -0
- package/lib/core/tasks/data/import/tree.js +61 -0
- package/lib/core/tasks/data/import/tree.js.map +1 -0
- package/lib/core/tasks/git/release/create.d.ts +42 -0
- package/lib/core/tasks/git/release/create.js +197 -0
- package/lib/core/tasks/git/release/create.js.map +1 -0
- package/lib/core/tasks/git/release/fetch.d.ts +24 -0
- package/lib/core/tasks/git/release/fetch.js +93 -0
- package/lib/core/tasks/git/release/fetch.js.map +1 -0
- package/lib/core/tasks/git/repo/info.d.ts +12 -0
- package/lib/core/tasks/git/repo/info.js +47 -0
- package/lib/core/tasks/git/repo/info.js.map +1 -0
- package/lib/core/tasks/metadata/deploy.d.ts +12 -0
- package/lib/core/tasks/metadata/deploy.js +39 -0
- package/lib/core/tasks/metadata/deploy.js.map +1 -0
- package/lib/core/tasks/org/assign/permsets.d.ts +12 -0
- package/lib/core/tasks/org/assign/permsets.js +54 -0
- package/lib/core/tasks/org/assign/permsets.js.map +1 -0
- package/lib/core/tasks/org/create/scratch.d.ts +36 -0
- package/lib/core/tasks/org/create/scratch.js +127 -0
- package/lib/core/tasks/org/create/scratch.js.map +1 -0
- package/lib/core/tasks/org/delete/scratch.d.ts +12 -0
- package/lib/core/tasks/org/delete/scratch.js +10 -0
- package/lib/core/tasks/org/delete/scratch.js.map +1 -0
- package/lib/core/tasks/package/create.d.ts +36 -0
- package/lib/core/tasks/package/create.js +93 -0
- package/lib/core/tasks/package/create.js.map +1 -0
- package/lib/core/tasks/package/dependencies/lock.d.ts +6 -0
- package/lib/core/tasks/package/dependencies/lock.js +35 -0
- package/lib/core/tasks/package/dependencies/lock.js.map +1 -0
- package/lib/core/tasks/package/dependencies/verify.d.ts +6 -0
- package/lib/core/tasks/package/dependencies/verify.js +44 -0
- package/lib/core/tasks/package/dependencies/verify.js.map +1 -0
- package/lib/core/tasks/package/install/dependencies.d.ts +22 -0
- package/lib/core/tasks/package/install/dependencies.js +43 -0
- package/lib/core/tasks/package/install/dependencies.js.map +1 -0
- package/lib/core/tasks/package/install/index.d.ts +25 -0
- package/lib/core/tasks/package/install/index.js +37 -0
- package/lib/core/tasks/package/install/index.js.map +1 -0
- package/lib/core/tasks/package/version/create.d.ts +36 -0
- package/lib/core/tasks/package/version/create.js +133 -0
- package/lib/core/tasks/package/version/create.js.map +1 -0
- package/lib/core/tasks/package/version/promote.d.ts +30 -0
- package/lib/core/tasks/package/version/promote.js +79 -0
- package/lib/core/tasks/package/version/promote.js.map +1 -0
- package/lib/core/tasks/package/version/resolve-latest.d.ts +24 -0
- package/lib/core/tasks/package/version/resolve-latest.js +78 -0
- package/lib/core/tasks/package/version/resolve-latest.js.map +1 -0
- package/lib/core/tasks/package/version/resolve-next.d.ts +24 -0
- package/lib/core/tasks/package/version/resolve-next.js +49 -0
- package/lib/core/tasks/package/version/resolve-next.js.map +1 -0
- package/lib/core/tasks/project/deploy/start.d.ts +22 -0
- package/lib/core/tasks/project/deploy/start.js +117 -0
- package/lib/core/tasks/project/deploy/start.js.map +1 -0
- package/lib/core/tasks/project/reset/tracking.d.ts +25 -0
- package/lib/core/tasks/project/reset/tracking.js +32 -0
- package/lib/core/tasks/project/reset/tracking.js.map +1 -0
- package/lib/core/tasks/util/file/exists.d.ts +24 -0
- package/lib/core/tasks/util/file/exists.js +53 -0
- package/lib/core/tasks/util/file/exists.js.map +1 -0
- package/lib/core/tasks/util/file/find.d.ts +30 -0
- package/lib/core/tasks/util/file/find.js +70 -0
- package/lib/core/tasks/util/file/find.js.map +1 -0
- package/lib/core/tasks/util/log.d.ts +13 -0
- package/lib/core/tasks/util/log.js +10 -0
- package/lib/core/tasks/util/log.js.map +1 -0
- package/lib/core/templates/README.md +35 -0
- package/lib/core/tree.d.ts +7 -0
- package/lib/core/tree.js +42 -0
- package/lib/core/tree.js.map +1 -0
- package/messages/service.connect.github.md +16 -0
- package/messages/ship.flow.eject.md +21 -0
- package/messages/ship.flow.info.md +21 -0
- package/messages/ship.flow.list.md +15 -0
- package/messages/ship.flow.run.md +23 -0
- package/messages/ship.project.init.md +23 -0
- package/messages/ship.service.delete.md +19 -0
- package/messages/ship.service.info.md +19 -0
- package/messages/ship.service.list.md +11 -0
- package/messages/ship.task.info.md +25 -0
- package/messages/ship.task.list.md +15 -0
- package/messages/ship.task.run.md +29 -0
- package/oclif.lock +10313 -0
- package/oclif.manifest.json +707 -0
- package/package.json +254 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TaskContext } from '../../../task.definition.schema.js';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
description: string;
|
|
4
|
+
params: ({
|
|
5
|
+
name: string;
|
|
6
|
+
type: "string";
|
|
7
|
+
required: true;
|
|
8
|
+
description: string;
|
|
9
|
+
default?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
name: string;
|
|
12
|
+
type: "string";
|
|
13
|
+
required: false;
|
|
14
|
+
default: string;
|
|
15
|
+
description: string;
|
|
16
|
+
})[];
|
|
17
|
+
outputs: {
|
|
18
|
+
name: string;
|
|
19
|
+
type: "boolean";
|
|
20
|
+
description: string;
|
|
21
|
+
}[];
|
|
22
|
+
run({ flow, params, output }: TaskContext): Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
* you may not use this file except in compliance with the License.
|
|
4
|
+
* You may obtain a copy of the License at
|
|
5
|
+
*
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
* See the License for the specific language governing permissions and
|
|
12
|
+
* limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
import { resolve } from 'node:path';
|
|
15
|
+
import { pathExists } from '../../../file.js';
|
|
16
|
+
import { ExpectedError } from '../../../error.js';
|
|
17
|
+
export default {
|
|
18
|
+
description: 'Checks whether a file or directory exists. Mirrors `test -e` / `-f` / `-d`. Outputs `exists` for use in step `if` gates.',
|
|
19
|
+
params: [
|
|
20
|
+
{
|
|
21
|
+
name: 'path',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
description: 'Path to check. Relative paths resolve against the project directory.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'kind',
|
|
28
|
+
type: 'string',
|
|
29
|
+
required: false,
|
|
30
|
+
default: 'any',
|
|
31
|
+
description: 'What to check for: `any` (mirrors `test -e`, default), `file` (`-f`), or `dir` (`-d`).',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
outputs: [
|
|
35
|
+
{
|
|
36
|
+
name: 'exists',
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
description: 'True if the path exists and matches `kind`; otherwise false.',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
42
|
+
async run({ flow, params, output }) {
|
|
43
|
+
const target = resolve(flow.projectDir, params['path']);
|
|
44
|
+
const kind = params['kind'];
|
|
45
|
+
if (!['any', 'file', 'dir'].includes(kind)) {
|
|
46
|
+
throw new ExpectedError(`Invalid kind "${kind}". Use one of: any, file, dir.`);
|
|
47
|
+
}
|
|
48
|
+
const exists = pathExists(target, kind);
|
|
49
|
+
flow.log(`${target} ${exists ? 'exists' : 'does not exist'} (kind: ${kind})`);
|
|
50
|
+
output.set('exists', exists);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=exists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exists.js","sourceRoot":"","sources":["../../../../../src/core/tasks/util/file/exists.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAe;IACb,WAAW,EACT,0HAA0H;IAC5H,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,sEAAsE;SACpF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,wFAAwF;SACtG;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,8DAA8D;SAC5E;KACF;IACD,4DAA4D;IAC5D,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAe;QAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAW,CAAC,CAAC;QAClE,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAW,CAAC;QACtC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3C,MAAM,IAAI,aAAa,CAAC,iBAAiB,IAAI,gCAAgC,CAAC,CAAC;QACjF,CAAC;QAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,IAA8B,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,WAAW,IAAI,GAAG,CAAC,CAAC;QAC9E,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC/B,CAAC;CACuB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TaskContext } from '../../../task.definition.schema.js';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
description: string;
|
|
4
|
+
params: ({
|
|
5
|
+
name: string;
|
|
6
|
+
type: "string";
|
|
7
|
+
required: true;
|
|
8
|
+
description: string;
|
|
9
|
+
default?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
name: string;
|
|
12
|
+
type: "string";
|
|
13
|
+
required: false;
|
|
14
|
+
default: string;
|
|
15
|
+
description: string;
|
|
16
|
+
} | {
|
|
17
|
+
name: string;
|
|
18
|
+
type: "boolean";
|
|
19
|
+
required: false;
|
|
20
|
+
default: true;
|
|
21
|
+
description: string;
|
|
22
|
+
})[];
|
|
23
|
+
outputs: {
|
|
24
|
+
name: string;
|
|
25
|
+
type: "string";
|
|
26
|
+
description: string;
|
|
27
|
+
}[];
|
|
28
|
+
run({ flow, params, output }: TaskContext): Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
* you may not use this file except in compliance with the License.
|
|
4
|
+
* You may obtain a copy of the License at
|
|
5
|
+
*
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
* See the License for the specific language governing permissions and
|
|
12
|
+
* limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
import { resolve } from 'node:path';
|
|
15
|
+
import { findFiles } from '../../../file.js';
|
|
16
|
+
export default {
|
|
17
|
+
description: 'Finds files in a directory whose names match a glob pattern.',
|
|
18
|
+
params: [
|
|
19
|
+
{
|
|
20
|
+
name: 'path',
|
|
21
|
+
type: 'string',
|
|
22
|
+
required: true,
|
|
23
|
+
description: 'Directory to search, relative to the project root.',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'pattern',
|
|
27
|
+
type: 'string',
|
|
28
|
+
required: false,
|
|
29
|
+
default: '*',
|
|
30
|
+
description: 'Glob pattern matched against the filename without extension. Case-insensitive. Defaults to "*".',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'recursive',
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
required: false,
|
|
36
|
+
default: true,
|
|
37
|
+
description: 'Recurse into subdirectories. Defaults to true.',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'strip-extension',
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
required: false,
|
|
43
|
+
default: true,
|
|
44
|
+
description: 'Strip file extensions from results. Defaults to true.',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
outputs: [
|
|
48
|
+
{
|
|
49
|
+
name: 'files',
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Comma-separated list of matching file names.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'count',
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Number of matching files found.',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
async run({ flow, params, output }) {
|
|
60
|
+
const dir = resolve(flow.projectDir, params['path']);
|
|
61
|
+
const pattern = params['pattern'] ?? '*';
|
|
62
|
+
const recursive = params['recursive'] !== false;
|
|
63
|
+
const stripExtension = params['strip-extension'] !== false;
|
|
64
|
+
const files = await findFiles(dir, { pattern, recursive, stripExtension });
|
|
65
|
+
flow.log(`Found ${files.length} file(s) matching "${pattern}" in ${params['path']}.`);
|
|
66
|
+
output.set('files', files.join(','));
|
|
67
|
+
output.set('count', String(files.length));
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../../src/core/tasks/util/file/find.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,eAAe;IACb,WAAW,EAAE,8DAA8D;IAC3E,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,oDAAoD;SAClE;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,GAAG;YACZ,WAAW,EAAE,iGAAiG;SAC/G;QACD;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,gDAAgD;SAC9D;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,uDAAuD;SACrE;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,8CAA8C;SAC5D;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;SAC/C;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAe;QAC7C,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAW,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAI,MAAM,CAAC,SAAS,CAAwB,IAAI,GAAG,CAAC;QACjE,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC;QAChD,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,KAAK,KAAK,CAAC;QAE3D,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;QAE3E,IAAI,CAAC,GAAG,CAAC,SAAS,KAAK,CAAC,MAAM,sBAAsB,OAAO,QAAQ,MAAM,CAAC,MAAM,CAAW,GAAG,CAAC,CAAC;QAChG,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,CAAC;CACuB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TaskContext } from '../../task.definition.schema.js';
|
|
2
|
+
/** Logs a message to the flow output. Useful for progress indicators and debug output in flows. */
|
|
3
|
+
declare const _default: {
|
|
4
|
+
description: string;
|
|
5
|
+
params: {
|
|
6
|
+
name: string;
|
|
7
|
+
type: "string";
|
|
8
|
+
required: true;
|
|
9
|
+
description: string;
|
|
10
|
+
}[];
|
|
11
|
+
run({ flow, params }: TaskContext): Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Logs a message to the flow output. Useful for progress indicators and debug output in flows. */
|
|
2
|
+
export default {
|
|
3
|
+
description: 'Logs a message to the flow output.',
|
|
4
|
+
params: [{ name: 'message', type: 'string', required: true, description: 'The message to log.' }],
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
6
|
+
async run({ flow, params }) {
|
|
7
|
+
flow.log(params['message']);
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../../src/core/tasks/util/log.ts"],"names":[],"mappings":"AAeA,mGAAmG;AACnG,eAAe;IACb,WAAW,EAAE,oCAAoC;IACjD,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACjG,4DAA4D;IAC5D,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAe;QACrC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAW,CAAC,CAAC;IACxC,CAAC;CACuB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# SF Ship Documentation
|
|
2
|
+
|
|
3
|
+
## Create a Dev Org
|
|
4
|
+
|
|
5
|
+
Spin up a personal scratch org with your source deployed and dependencies installed:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
sf ship flow run deploy/dev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Retrieve Metadata
|
|
12
|
+
|
|
13
|
+
After making changes in the org, pull them back locally:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
sf project retrieve start
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Create a Release
|
|
20
|
+
|
|
21
|
+
Build and promote a new package version through environments:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
sf ship flow run release/beta
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Promote a Package Version
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
sf ship flow run release/production
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Documentation
|
|
34
|
+
|
|
35
|
+
TODO
|
package/lib/core/tree.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function insert(tree, parts) {
|
|
2
|
+
const [head, ...rest] = parts;
|
|
3
|
+
if (rest.length === 0) {
|
|
4
|
+
if (!tree.has(head))
|
|
5
|
+
tree.set(head, null);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
if (!tree.has(head) || tree.get(head) === null)
|
|
9
|
+
tree.set(head, new Map());
|
|
10
|
+
insert(tree.get(head), rest);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function renderLines(tree, prefix = '') {
|
|
14
|
+
const lines = [];
|
|
15
|
+
const entries = [...tree.entries()];
|
|
16
|
+
for (const [i, [key, children]] of entries.entries()) {
|
|
17
|
+
const isLast = i === entries.length - 1;
|
|
18
|
+
const connector = isLast ? '└── ' : '├── ';
|
|
19
|
+
const childPrefix = prefix + (isLast ? ' ' : '│ ');
|
|
20
|
+
if (children === null) {
|
|
21
|
+
lines.push(`${prefix}${connector}${key}`);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
lines.push(`${prefix}${connector}${key}/`);
|
|
25
|
+
lines.push(...renderLines(children, childPrefix));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return lines;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Renders a list of slash-separated paths as an ASCII tree.
|
|
32
|
+
*
|
|
33
|
+
* @param names - Sorted list of slash-separated path names.
|
|
34
|
+
* @returns The tree as a single string ready to print.
|
|
35
|
+
*/
|
|
36
|
+
export function renderTree(names) {
|
|
37
|
+
const tree = new Map();
|
|
38
|
+
for (const name of names)
|
|
39
|
+
insert(tree, name.split('/'));
|
|
40
|
+
return renderLines(tree).join('\n');
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/core/tree.ts"],"names":[],"mappings":"AAeA,SAAS,MAAM,CAAC,IAAU,EAAE,KAAe;IACzC,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IAC9B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI;YAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QAC1E,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAS,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,IAAU,EAAE,MAAM,GAAG,EAAE;IAC1C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACpC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QACrD,MAAM,MAAM,GAAG,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QACxC,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QAC3C,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,SAAS,GAAG,GAAG,EAAE,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,SAAS,GAAG,GAAG,GAAG,CAAC,CAAC;YAC3C,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,KAAe;IACxC,MAAM,IAAI,GAAS,IAAI,GAAG,EAAE,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACxD,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Connect a GitHub account to plugin-ship via OAuth.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Opens a browser-based OAuth flow to authenticate with GitHub. Once connected, plugin-ship can interact with your repositories on your behalf.
|
|
8
|
+
|
|
9
|
+
# flags.alias.summary
|
|
10
|
+
|
|
11
|
+
Alias for this GitHub account. Defaults to "default".
|
|
12
|
+
|
|
13
|
+
# examples
|
|
14
|
+
|
|
15
|
+
- <%= config.bin %> <%= command.id %>
|
|
16
|
+
- <%= config.bin %> <%= command.id %> --alias work
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Copy a standard flow into your project for customization.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Copies a built-in flow definition into your project's .ship/flows/ directory so you can modify it. Fails if the flow is not a built-in, or if the destination file already exists.
|
|
8
|
+
|
|
9
|
+
# args.flowName.summary
|
|
10
|
+
|
|
11
|
+
The name of the built-in flow to eject.
|
|
12
|
+
|
|
13
|
+
# flags.config.summary
|
|
14
|
+
|
|
15
|
+
Path to the ship.yml config file.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Eject the ci flow into your project:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> ci
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Show details for a flow.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Displays the description, accepted params, and step-by-step breakdown for a named flow.
|
|
8
|
+
|
|
9
|
+
# args.flowName.summary
|
|
10
|
+
|
|
11
|
+
The name of the flow to inspect.
|
|
12
|
+
|
|
13
|
+
# flags.config.summary
|
|
14
|
+
|
|
15
|
+
Path to the ship.yml config file.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Show details for a flow:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> ci
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
List all flows defined in ship.yml.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Reads ship.yml and prints the names of all defined flows.
|
|
8
|
+
|
|
9
|
+
# flags.config.summary
|
|
10
|
+
|
|
11
|
+
Path to the ship.yml config file.
|
|
12
|
+
|
|
13
|
+
# examples
|
|
14
|
+
|
|
15
|
+
- <%= config.bin %> <%= command.id %>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Run a flow defined in ship.yml.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Reads ship.yml from the current directory, finds the named flow, and executes its tasks in sequence.
|
|
8
|
+
|
|
9
|
+
# flags.name.summary
|
|
10
|
+
|
|
11
|
+
Kebab-cased name of the flow to run, found in `ship.yml` such as `deploy-dev-org`.
|
|
12
|
+
|
|
13
|
+
# flags.config.summary
|
|
14
|
+
|
|
15
|
+
Path to the ship.yml config file.
|
|
16
|
+
|
|
17
|
+
# flags.param.summary
|
|
18
|
+
|
|
19
|
+
Flow parameter in key=value format.
|
|
20
|
+
|
|
21
|
+
# examples
|
|
22
|
+
|
|
23
|
+
- <%= config.bin %> <%= command.id %> my_flow
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Initialize a new plugin-ship project in the current directory.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Runs sf project generate to scaffold a standard Salesforce project, then patches sfdx-project.json with 2GP settings and writes ship.yml and .ship/orgs scratch org definitions. Existing files are left untouched.
|
|
8
|
+
|
|
9
|
+
# flags.template.summary
|
|
10
|
+
|
|
11
|
+
Template to use for project generation.
|
|
12
|
+
|
|
13
|
+
# flags.api-version.summary
|
|
14
|
+
|
|
15
|
+
Override the API version used for API requests made by this command.
|
|
16
|
+
|
|
17
|
+
# flags.lwc-language.summary
|
|
18
|
+
|
|
19
|
+
Default language to use for LWC components (javascript or typescript).
|
|
20
|
+
|
|
21
|
+
# examples
|
|
22
|
+
|
|
23
|
+
- <%= config.bin %> <%= command.id %>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Remove a stored service credential.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Deletes the credential from the OS keychain and removes the associated metadata file.
|
|
8
|
+
|
|
9
|
+
# args.service.summary
|
|
10
|
+
|
|
11
|
+
The service name (e.g. github.com).
|
|
12
|
+
|
|
13
|
+
# args.alias.summary
|
|
14
|
+
|
|
15
|
+
The account alias (e.g. default).
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- <%= config.bin %> <%= command.id %> github.com default
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Show details for a stored service credential.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Prints the metadata for a stored service credential identified by service name and alias.
|
|
8
|
+
|
|
9
|
+
# args.service.summary
|
|
10
|
+
|
|
11
|
+
The service name (e.g. github).
|
|
12
|
+
|
|
13
|
+
# args.alias.summary
|
|
14
|
+
|
|
15
|
+
The account alias (e.g. default).
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- <%= config.bin %> <%= command.id %> github.com default
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Show details for a task.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Displays the description, accepted params, and store outputs for a built-in or custom task.
|
|
8
|
+
|
|
9
|
+
# args.taskName.summary
|
|
10
|
+
|
|
11
|
+
The name of the task to inspect.
|
|
12
|
+
|
|
13
|
+
# flags.config.summary
|
|
14
|
+
|
|
15
|
+
Path to the ship.yml config file.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Show details for a built-in task:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> org/create/scratch
|
|
22
|
+
|
|
23
|
+
- Show details for a custom task:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> my-custom-task
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
List all available tasks.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Prints built-in tasks and any custom tasks found in the `.ship/tasks/` directory.
|
|
8
|
+
|
|
9
|
+
# flags.config.summary
|
|
10
|
+
|
|
11
|
+
Path to the ship.yml config file.
|
|
12
|
+
|
|
13
|
+
# examples
|
|
14
|
+
|
|
15
|
+
- <%= config.bin %> <%= command.id %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Run a single ship task.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Runs a built-in or custom task directly, outside of a flow. Useful for testing and one-off operations.
|
|
8
|
+
|
|
9
|
+
# args.taskName.summary
|
|
10
|
+
|
|
11
|
+
The name of the task to run.
|
|
12
|
+
|
|
13
|
+
# flags.config.summary
|
|
14
|
+
|
|
15
|
+
Path to the ship.yml config file.
|
|
16
|
+
|
|
17
|
+
# flags.param.summary
|
|
18
|
+
|
|
19
|
+
Task parameter in key=value format.
|
|
20
|
+
|
|
21
|
+
# examples
|
|
22
|
+
|
|
23
|
+
- Run the log task:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> log --param message=hello
|
|
26
|
+
|
|
27
|
+
- Run a custom task:
|
|
28
|
+
|
|
29
|
+
<%= config.bin %> <%= command.id %> create-scratch-org --param scratch-def=dev
|