extension-create 3.18.4 → 3.18.5-canary.local-b4fd0431
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/package-manager.d.ts +1 -4
- package/dist/lib/utils.d.ts +1 -1
- package/dist/module.cjs +14 -32
- package/package.json +8 -7
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function detectPackageManagerFromEnv(): PackageManagerName;
|
|
3
|
-
export declare function getPackageManagerSpecFromEnv(): string | null;
|
|
4
|
-
export {};
|
|
1
|
+
export { detectPackageManagerFromEnv, getPackageManagerSpec as getPackageManagerSpecFromEnv } from 'prefers-yarn';
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function copyDirectoryWithSymlinks(source: string, destination: string): Promise<void>;
|
|
2
2
|
export declare function moveDirectoryContents(source: string, destination: string): Promise<void>;
|
|
3
|
-
export declare function getInstallCommand(): Promise<"
|
|
3
|
+
export declare function getInstallCommand(): Promise<import("prefers-yarn").PackageManagerName>;
|
|
4
4
|
export declare function isDirectoryWriteable(directory: string, projectName: string, logger: {
|
|
5
5
|
log(...args: any[]): void;
|
|
6
6
|
error(...args: any[]): void;
|
package/dist/module.cjs
CHANGED
|
@@ -13,11 +13,15 @@ var __webpack_require__ = {};
|
|
|
13
13
|
};
|
|
14
14
|
})();
|
|
15
15
|
(()=>{
|
|
16
|
-
__webpack_require__.d = (exports1,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
17
|
+
var define = (defs, kind)=>{
|
|
18
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
[kind]: defs[key]
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
define(getters, "get");
|
|
24
|
+
define(values, "value");
|
|
21
25
|
};
|
|
22
26
|
})();
|
|
23
27
|
(()=>{
|
|
@@ -42,29 +46,7 @@ const external_path_namespaceObject = require("path");
|
|
|
42
46
|
const external_fs_namespaceObject = require("fs");
|
|
43
47
|
const external_pintor_namespaceObject = require("pintor");
|
|
44
48
|
var external_pintor_default = /*#__PURE__*/ __webpack_require__.n(external_pintor_namespaceObject);
|
|
45
|
-
const
|
|
46
|
-
function detectPackageManagerFromEnv() {
|
|
47
|
-
const userAgent = (process.env.npm_config_user_agent || '').toLowerCase();
|
|
48
|
-
if (userAgent.includes('pnpm')) return 'pnpm';
|
|
49
|
-
if (userAgent.includes('yarn')) return 'yarn';
|
|
50
|
-
if (userAgent.includes('bun')) return 'bun';
|
|
51
|
-
if (userAgent.includes('npm')) return 'npm';
|
|
52
|
-
const execPath = (process.env.npm_execpath || process.env.NPM_EXEC_PATH || process.env.BUN_INSTALL || '').toLowerCase();
|
|
53
|
-
if (execPath.includes('pnpm')) return 'pnpm';
|
|
54
|
-
if (execPath.includes('yarn')) return 'yarn';
|
|
55
|
-
if (execPath.includes('bun')) return 'bun';
|
|
56
|
-
execPath.includes('npm');
|
|
57
|
-
return 'npm';
|
|
58
|
-
}
|
|
59
|
-
function getPackageManagerSpecFromEnv() {
|
|
60
|
-
const userAgent = process.env.npm_config_user_agent || '';
|
|
61
|
-
const match = userAgent.match(userAgentPattern);
|
|
62
|
-
if (!match) return null;
|
|
63
|
-
const name = match[1];
|
|
64
|
-
const version = match[2];
|
|
65
|
-
if (!name || !version) return null;
|
|
66
|
-
return `${name}@${version}`;
|
|
67
|
-
}
|
|
49
|
+
const external_prefers_yarn_namespaceObject = require("prefers-yarn");
|
|
68
50
|
const statusPrefix = external_pintor_default().brightBlue('⏵⏵⏵');
|
|
69
51
|
function destinationNotWriteable(workingDir) {
|
|
70
52
|
const workingDirFolder = external_path_namespaceObject.basename(workingDir);
|
|
@@ -88,7 +70,7 @@ function noUrlAllowed() {
|
|
|
88
70
|
}
|
|
89
71
|
async function successfullInstall(projectPath, projectName, depsInstalled) {
|
|
90
72
|
const relativePath = external_path_namespaceObject.relative(process.cwd(), projectPath);
|
|
91
|
-
const pm = detectPackageManagerFromEnv();
|
|
73
|
+
const pm = (0, external_prefers_yarn_namespaceObject.detectPackageManagerFromEnv)();
|
|
92
74
|
let command = 'npm run';
|
|
93
75
|
let installCmd = 'npm install';
|
|
94
76
|
switch(pm){
|
|
@@ -262,7 +244,7 @@ async function moveDirectoryContents(source, destination) {
|
|
|
262
244
|
});
|
|
263
245
|
}
|
|
264
246
|
async function getInstallCommand() {
|
|
265
|
-
return detectPackageManagerFromEnv();
|
|
247
|
+
return (0, external_prefers_yarn_namespaceObject.detectPackageManagerFromEnv)();
|
|
266
248
|
}
|
|
267
249
|
async function isDirectoryWriteable(directory, projectName, logger) {
|
|
268
250
|
try {
|
|
@@ -495,7 +477,7 @@ async function overridePackageJson(projectPath, projectName, { template = "javas
|
|
|
495
477
|
...packageJson.devDependencies || {},
|
|
496
478
|
extension: 'development' === process.env.EXTENSION_ENV ? '*' : resolveExtensionDevDependencyVersion(cliVersion)
|
|
497
479
|
};
|
|
498
|
-
const packageManagerSpec = packageJson.packageManager ||
|
|
480
|
+
const packageManagerSpec = packageJson.packageManager || (0, external_prefers_yarn_namespaceObject.getPackageManagerSpec)();
|
|
499
481
|
const packageMetadata = {
|
|
500
482
|
...packageJson,
|
|
501
483
|
name: external_path_namespaceObject.basename(projectPath),
|
|
@@ -1046,7 +1028,7 @@ function resolveMissingOptionalDeps(developRoot, projectPath) {
|
|
|
1046
1028
|
}
|
|
1047
1029
|
async function installOptionalDependencies(developRoot, projectPath, plan, logger) {
|
|
1048
1030
|
if (0 === plan.dependencies.length) return;
|
|
1049
|
-
const pm = detectPackageManagerFromEnv();
|
|
1031
|
+
const pm = (0, external_prefers_yarn_namespaceObject.detectPackageManagerFromEnv)();
|
|
1050
1032
|
const stdio = 'development' === process.env.EXTENSION_ENV ? 'inherit' : 'ignore';
|
|
1051
1033
|
logger.log(foundSpecializedDependencies(plan.integrations.length));
|
|
1052
1034
|
for (const [index, integration] of plan.integrations.entries()){
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"directory": "programs/create"
|
|
8
8
|
},
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
10
|
+
"node": ">=22"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"templates"
|
|
26
26
|
],
|
|
27
27
|
"name": "extension-create",
|
|
28
|
-
"version": "3.18.
|
|
28
|
+
"version": "3.18.5-canary.local-b4fd0431",
|
|
29
29
|
"description": "The standalone extension creation engine for Extension.js",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Cezar Augusto",
|
|
@@ -77,21 +77,22 @@
|
|
|
77
77
|
"axios": "^1.16.0",
|
|
78
78
|
"cross-spawn": "^7.0.6",
|
|
79
79
|
"go-git-it": "^5.1.5",
|
|
80
|
-
"pintor": "0.3.0"
|
|
80
|
+
"pintor": "0.3.0",
|
|
81
|
+
"prefers-yarn": "2.0.1"
|
|
81
82
|
},
|
|
82
83
|
"devDependencies": {
|
|
83
84
|
"@biomejs/biome": "^2.2.4",
|
|
84
85
|
"@changesets/cli": "^2.29.8",
|
|
85
|
-
"@rslib/core": "^0.
|
|
86
|
+
"@rslib/core": "^0.23.1",
|
|
86
87
|
"@types/adm-zip": "^0.5.7",
|
|
87
88
|
"@types/chrome": "^0.1.33",
|
|
88
89
|
"@types/cross-spawn": "^6.0.6",
|
|
89
|
-
"@types/node": "^
|
|
90
|
+
"@types/node": "^22",
|
|
90
91
|
"@types/webextension-polyfill": "0.12.4",
|
|
91
|
-
"@vitest/coverage-v8": "^4.1.
|
|
92
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
92
93
|
"tsconfig": "*",
|
|
93
94
|
"typescript": "6.0.2",
|
|
94
|
-
"vitest": "^4.1.
|
|
95
|
+
"vitest": "^4.1.9",
|
|
95
96
|
"webextension-polyfill": "^0.12.0"
|
|
96
97
|
}
|
|
97
98
|
}
|