extension-create 3.12.0 → 3.13.0
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/dist/lib/messages.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export declare function initializingGitForRepositoryFailed(gitCommand: string, g
|
|
|
16
16
|
export declare function initializingGitForRepositoryProcessError(projectName: string, error: any): string;
|
|
17
17
|
export declare function initializingGitForRepositoryError(projectName: string, error: any): string;
|
|
18
18
|
export declare function installingDependencies(): string;
|
|
19
|
-
export declare function installingBuildDependencies(dependencies: string[]): string;
|
|
20
19
|
export declare function foundSpecializedDependencies(count: number): string;
|
|
21
20
|
export declare function installingProjectIntegrations(integrations: string[]): string;
|
|
22
21
|
export declare function installingDependenciesFailed(gitCommand: string, gitArgs: string[], code: number | null): string;
|
package/dist/module.cjs
CHANGED
|
@@ -146,9 +146,6 @@ function initializingGitForRepositoryError(projectName, error) {
|
|
|
146
146
|
function installingDependencies() {
|
|
147
147
|
return `${statusPrefix} Installing project-specific dependencies... ${external_pintor_default().gray('(This may take a moment)')}`;
|
|
148
148
|
}
|
|
149
|
-
function installingBuildDependencies(dependencies) {
|
|
150
|
-
return `${statusPrefix} Installing general build dependencies... ${external_pintor_default().gray('(This may take a moment)')}`;
|
|
151
|
-
}
|
|
152
149
|
function foundSpecializedDependencies(count) {
|
|
153
150
|
return `${statusPrefix} Found ${external_pintor_default().yellow(String(count))} specialized integration${1 === count ? '' : 's'} needing installation...`;
|
|
154
151
|
}
|
|
@@ -884,17 +881,6 @@ function resolveDevelopRoot(projectPath) {
|
|
|
884
881
|
return null;
|
|
885
882
|
}
|
|
886
883
|
}
|
|
887
|
-
function resolveBuildDepsPath(developRoot) {
|
|
888
|
-
return external_path_namespaceObject.join(developRoot, 'webpack', 'webpack-lib', 'build-dependencies.json');
|
|
889
|
-
}
|
|
890
|
-
function loadBuildDependencies(developRoot) {
|
|
891
|
-
const metadataPath = resolveBuildDepsPath(developRoot);
|
|
892
|
-
if (!external_fs_namespaceObject.existsSync(metadataPath)) {
|
|
893
|
-
console.warn(`${installingBuildDependencies([])} (build-dependencies.json missing; skipping build deps install)`);
|
|
894
|
-
return {};
|
|
895
|
-
}
|
|
896
|
-
return JSON.parse(external_fs_namespaceObject.readFileSync(metadataPath, 'utf8'));
|
|
897
|
-
}
|
|
898
884
|
function readPackageJson(projectPath) {
|
|
899
885
|
try {
|
|
900
886
|
const raw = external_fs_namespaceObject.readFileSync(external_path_namespaceObject.join(projectPath, 'package.json'), 'utf8');
|
|
@@ -1029,39 +1015,6 @@ function buildOptionalInstallArgs(pm, dependencies, installDir) {
|
|
|
1029
1015
|
'--legacy-peer-deps'
|
|
1030
1016
|
];
|
|
1031
1017
|
}
|
|
1032
|
-
function buildBuildInstallArgs(pm, dependencies, dependencyMap) {
|
|
1033
|
-
const depsWithVersions = dependencies.map((dep)=>`${dep}@${dependencyMap[dep]}`);
|
|
1034
|
-
if ('yarn' === pm) return [
|
|
1035
|
-
'add',
|
|
1036
|
-
...depsWithVersions
|
|
1037
|
-
];
|
|
1038
|
-
if ('pnpm' === pm) return [
|
|
1039
|
-
'add',
|
|
1040
|
-
'--save',
|
|
1041
|
-
...depsWithVersions
|
|
1042
|
-
];
|
|
1043
|
-
if ('bun' === pm) return [
|
|
1044
|
-
'add',
|
|
1045
|
-
...depsWithVersions
|
|
1046
|
-
];
|
|
1047
|
-
return [
|
|
1048
|
-
'install',
|
|
1049
|
-
'--save',
|
|
1050
|
-
...depsWithVersions
|
|
1051
|
-
];
|
|
1052
|
-
}
|
|
1053
|
-
function resolveMissingBuildDeps(developRoot) {
|
|
1054
|
-
const dependencyMap = loadBuildDependencies(developRoot);
|
|
1055
|
-
const candidates = Object.keys(dependencyMap);
|
|
1056
|
-
const missing = candidates.filter((dep)=>!canResolve(dep, [
|
|
1057
|
-
developRoot,
|
|
1058
|
-
process.cwd()
|
|
1059
|
-
]));
|
|
1060
|
-
return {
|
|
1061
|
-
dependencies: missing,
|
|
1062
|
-
dependencyMap
|
|
1063
|
-
};
|
|
1064
|
-
}
|
|
1065
1018
|
function resolveMissingOptionalDeps(developRoot, projectPath) {
|
|
1066
1019
|
const plan = detectOptionalDependencies(projectPath);
|
|
1067
1020
|
const dependenciesByIntegration = {};
|
|
@@ -1086,19 +1039,6 @@ function resolveMissingOptionalDeps(developRoot, projectPath) {
|
|
|
1086
1039
|
dependenciesByIntegration
|
|
1087
1040
|
};
|
|
1088
1041
|
}
|
|
1089
|
-
async function installBuildDependencies(developRoot, plan) {
|
|
1090
|
-
if (0 === plan.dependencies.length) return;
|
|
1091
|
-
const pm = detectPackageManagerFromEnv();
|
|
1092
|
-
const installMessage = installingBuildDependencies(plan.dependencies);
|
|
1093
|
-
console.log(installMessage);
|
|
1094
|
-
const args = buildBuildInstallArgs(pm, plan.dependencies, plan.dependencyMap);
|
|
1095
|
-
const stdio = 'development' === process.env.EXTENSION_ENV ? 'inherit' : 'ignore';
|
|
1096
|
-
const result = await runInstall(pm, args, {
|
|
1097
|
-
cwd: developRoot,
|
|
1098
|
-
stdio
|
|
1099
|
-
});
|
|
1100
|
-
if (0 !== result.code) throw new Error(installingDependenciesFailed(pm, args, result.code));
|
|
1101
|
-
}
|
|
1102
1042
|
async function installOptionalDependencies(developRoot, projectPath, plan) {
|
|
1103
1043
|
if (0 === plan.dependencies.length) return;
|
|
1104
1044
|
const pm = detectPackageManagerFromEnv();
|
|
@@ -1124,8 +1064,6 @@ async function installInternalDependencies(projectPath) {
|
|
|
1124
1064
|
if ('test' === process.env.EXTENSION_ENV || 'true' === process.env.EXTENSION_SKIP_INTERNAL_INSTALL) return;
|
|
1125
1065
|
const developRoot = resolveDevelopRoot(projectPath);
|
|
1126
1066
|
if (!developRoot) return;
|
|
1127
|
-
const buildPlan = resolveMissingBuildDeps(developRoot);
|
|
1128
|
-
if (buildPlan.dependencies.length > 0) await installBuildDependencies(developRoot, buildPlan);
|
|
1129
1067
|
const optionalPlan = resolveMissingOptionalDeps(developRoot, projectPath);
|
|
1130
1068
|
if (optionalPlan.dependencies.length > 0) await installOptionalDependencies(developRoot, projectPath, optionalPlan);
|
|
1131
1069
|
}
|
|
@@ -3,18 +3,12 @@ type OptionalDepsPlan = {
|
|
|
3
3
|
dependencies: string[];
|
|
4
4
|
dependenciesByIntegration: Record<string, string[]>;
|
|
5
5
|
};
|
|
6
|
-
type BuildDepsPlan = {
|
|
7
|
-
dependencies: string[];
|
|
8
|
-
dependencyMap: Record<string, string>;
|
|
9
|
-
};
|
|
10
6
|
declare function resolveDevelopRoot(projectPath: string): string | null;
|
|
11
7
|
declare function detectOptionalDependencies(projectPath: string): OptionalDepsPlan;
|
|
12
|
-
declare function resolveMissingBuildDeps(developRoot: string): BuildDepsPlan;
|
|
13
8
|
declare function resolveMissingOptionalDeps(developRoot: string, projectPath: string): OptionalDepsPlan;
|
|
14
9
|
export declare function installInternalDependencies(projectPath: string): Promise<void>;
|
|
15
10
|
export declare const __testing__: {
|
|
16
11
|
resolveDevelopRoot: typeof resolveDevelopRoot;
|
|
17
|
-
resolveMissingBuildDeps: typeof resolveMissingBuildDeps;
|
|
18
12
|
resolveMissingOptionalDeps: typeof resolveMissingOptionalDeps;
|
|
19
13
|
detectOptionalDependencies: typeof detectOptionalDependencies;
|
|
20
14
|
};
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"name": "extension-create",
|
|
27
|
-
"version": "3.
|
|
27
|
+
"version": "3.13.0",
|
|
28
28
|
"description": "The standalone extension creation engine for Extension.js",
|
|
29
29
|
"author": {
|
|
30
30
|
"name": "Cezar Augusto",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
],
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"adm-zip": "^0.5.16",
|
|
76
|
-
"axios": "^1.
|
|
76
|
+
"axios": "^1.15.0",
|
|
77
77
|
"cross-spawn": "^7.0.6",
|
|
78
78
|
"go-git-it": "^5.1.5",
|
|
79
79
|
"pintor": "0.3.0",
|