@simplysf/simply-package 3.0.2 → 3.0.3
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/simply/package/dependencies/install.d.ts +1 -1
- package/lib/commands/simply/package/dependencies/install.js +1 -1
- package/lib/commands/simply/package/dependencies/install.js.map +1 -1
- package/lib/commands/simply/package/dependencies/manage.d.ts +1 -2
- package/lib/commands/simply/package/dependencies/manage.js +1 -3
- package/lib/commands/simply/package/dependencies/manage.js.map +1 -1
- package/lib/commands/simply/package/version/get.d.ts +1 -1
- package/lib/commands/simply/package/version/get.js +1 -1
- package/lib/commands/simply/package/version/get.js.map +1 -1
- package/package.json +4 -4
- package/lib/common/packageUtils.d.ts +0 -19
- package/lib/common/packageUtils.js +0 -43
- package/lib/common/packageUtils.js.map +0 -1
- package/lib/common/packageVersionLookup.d.ts +0 -56
- package/lib/common/packageVersionLookup.js +0 -141
- package/lib/common/packageVersionLookup.js.map +0 -1
- package/lib/common/packageVersionService.d.ts +0 -65
- package/lib/common/packageVersionService.js +0 -347
- package/lib/common/packageVersionService.js.map +0 -1
- package/lib/common/sfdxProjectService.d.ts +0 -19
- package/lib/common/sfdxProjectService.js +0 -160
- package/lib/common/sfdxProjectService.js.map +0 -1
- package/lib/schemas/manage/dependencyChange.d.ts +0 -20
- package/lib/schemas/manage/dependencyChange.js +0 -17
- package/lib/schemas/manage/dependencyChange.js.map +0 -1
- package/lib/schemas/manage/parsedDependency.d.ts +0 -26
- package/lib/schemas/manage/parsedDependency.js +0 -49
- package/lib/schemas/manage/parsedDependency.js.map +0 -1
- package/lib/schemas/sfdx-project/packageDirs.d.ts +0 -22
- package/lib/schemas/sfdx-project/packageDirs.js +0 -44
- package/lib/schemas/sfdx-project/packageDirs.js.map +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2026, Clay Chipps.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { PACKAGE_PREFIX_PACKAGE2, PACKAGE_PREFIX_SUBSCRIBER_PACKAGE_VERSION } from '../../common/packageUtils.js';
|
|
17
|
-
/**
|
|
18
|
-
* Parse a resolved dependency (alias already resolved to an ID) into a {@link ParsedDependency}.
|
|
19
|
-
*
|
|
20
|
-
* @param resolvedPackage - The dependency's `package` field, already resolved from an alias to
|
|
21
|
-
* either a `SubscriberPackageVersionId` (04t) or `Package2Id` (0Ho).
|
|
22
|
-
* @param versionNumber - The dependency's `versionNumber` field, if `resolvedPackage` is a
|
|
23
|
-
* `Package2Id`. Ignored for pinned `SubscriberPackageVersionId` dependencies.
|
|
24
|
-
* @returns The parsed dependency. Neither `subscriberPackageVersionId` nor `package2Id` is set
|
|
25
|
-
* if `resolvedPackage` doesn't match either prefix.
|
|
26
|
-
*/
|
|
27
|
-
export function parseDependency(resolvedPackage, versionNumber) {
|
|
28
|
-
const result = { isLatest: false, isPinned: false };
|
|
29
|
-
if (resolvedPackage.startsWith(PACKAGE_PREFIX_SUBSCRIBER_PACKAGE_VERSION)) {
|
|
30
|
-
result.subscriberPackageVersionId = resolvedPackage;
|
|
31
|
-
result.isPinned = true;
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
if (resolvedPackage.startsWith(PACKAGE_PREFIX_PACKAGE2)) {
|
|
35
|
-
result.package2Id = resolvedPackage;
|
|
36
|
-
result.versionNumber = versionNumber;
|
|
37
|
-
const versionWorking = (versionNumber ?? '').toUpperCase().replace('-LATEST', '').replace('.LATEST', '');
|
|
38
|
-
const parts = versionWorking.split('.');
|
|
39
|
-
result.majorVersion = parts[0] ? parseInt(parts[0], 10) : undefined;
|
|
40
|
-
result.minorVersion = parts[1] ? parseInt(parts[1], 10) : undefined;
|
|
41
|
-
result.patchVersion = parts[2] ? parseInt(parts[2], 10) : undefined;
|
|
42
|
-
result.buildVersion = parts[3] ? parseInt(parts[3], 10) : undefined;
|
|
43
|
-
result.isLatest = (versionNumber ?? '').toUpperCase().endsWith('LATEST');
|
|
44
|
-
result.isPinned = !result.isLatest;
|
|
45
|
-
return result;
|
|
46
|
-
}
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=parsedDependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parsedDependency.js","sourceRoot":"","sources":["../../../src/schemas/manage/parsedDependency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,yCAAyC,EAAE,MAAM,8BAA8B,CAAC;AAkBlH;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,eAAuB,EAAE,aAAsB;IAC7E,MAAM,MAAM,GAAqB,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAEtE,IAAI,eAAe,CAAC,UAAU,CAAC,yCAAyC,CAAC,EAAE,CAAC;QAC1E,MAAM,CAAC,0BAA0B,GAAG,eAAe,CAAC;QACpD,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,eAAe,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC;QACxD,MAAM,CAAC,UAAU,GAAG,eAAe,CAAC;QACpC,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;QAErC,MAAM,cAAc,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4
|
-
package: z.ZodString;
|
|
5
|
-
versionNumber: z.ZodOptional<z.ZodString>;
|
|
6
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
8
|
-
/** Package directory with package (requires versionNumber) */
|
|
9
|
-
export declare const BasePackageDirWithDependenciesSchema: z.ZodObject<{
|
|
10
|
-
default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
11
|
-
path: z.ZodString;
|
|
12
|
-
dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
-
package: z.ZodString;
|
|
14
|
-
versionNumber: z.ZodOptional<z.ZodString>;
|
|
15
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
16
|
-
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
/** A single entry in a package directory's `dependencies` array. */
|
|
19
|
-
export type PackageDirDependency = z.infer<typeof PackageDirDependencySchema>;
|
|
20
|
-
/** A package directory entry that declares a `dependencies` array. */
|
|
21
|
-
export type BasePackageDirWithDependencies = z.infer<typeof BasePackageDirWithDependenciesSchema>;
|
|
22
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2026, Clay Chipps.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { z } from 'zod';
|
|
17
|
-
/** A single entry in a package directory's `dependencies` array. */
|
|
18
|
-
const PackageDirDependencySchema = z
|
|
19
|
-
.object({
|
|
20
|
-
package: z.string(),
|
|
21
|
-
versionNumber: z.string().optional(),
|
|
22
|
-
branch: z.string().optional(),
|
|
23
|
-
})
|
|
24
|
-
.catchall(z.unknown());
|
|
25
|
-
/** Base properties for all package directories */
|
|
26
|
-
const BasePackageDirPropsSchema = z.object({
|
|
27
|
-
default: z
|
|
28
|
-
.boolean()
|
|
29
|
-
.default(true)
|
|
30
|
-
.optional()
|
|
31
|
-
.describe('If you have specified more than one path, include this parameter for the default path to indicate which is the default package directory.'),
|
|
32
|
-
path: z
|
|
33
|
-
.string()
|
|
34
|
-
.meta({ title: 'Path' })
|
|
35
|
-
.describe("If you don't specify a path, the Salesforce CLI uses a placeholder when you create a package."),
|
|
36
|
-
});
|
|
37
|
-
/** Package directory with package (requires versionNumber) */
|
|
38
|
-
export const BasePackageDirWithDependenciesSchema = BasePackageDirPropsSchema.extend({
|
|
39
|
-
dependencies: z
|
|
40
|
-
.array(PackageDirDependencySchema)
|
|
41
|
-
.optional()
|
|
42
|
-
.describe('To specify dependencies for 2GP within the same Dev Hub, use either the package version alias or a combination of the package name and the version number.'),
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=packageDirs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"packageDirs.js","sourceRoot":"","sources":["../../../src/schemas/sfdx-project/packageDirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oEAAoE;AACpE,MAAM,0BAA0B,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC;KACD,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEzB,kDAAkD;AAClD,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC;SACP,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,EAAE;SACV,QAAQ,CACP,2IAA2I,CAC5I;IACH,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;SACvB,QAAQ,CAAC,+FAA+F,CAAC;CAC7G,CAAC,CAAC;AAEH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oCAAoC,GAAG,yBAAyB,CAAC,MAAM,CAAC;IACnF,YAAY,EAAE,CAAC;SACZ,KAAK,CAAC,0BAA0B,CAAC;SACjC,QAAQ,EAAE;SACV,QAAQ,CACP,4JAA4J,CAC7J;CACJ,CAAC,CAAC"}
|